From 438ac3548799ae42e8e4fc5314b30c2abd7a2daa Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Sun, 1 Oct 2023 16:51:09 +0800 Subject: [PATCH] Implement Ctrl+S or Command+S for save draft (#1628) * Implement Ctrl+S or Command+S for save draft * rename * add Typecho.savePost * fix upload file size * add new uploader * replace new uploader * fix textarea change * fix preview * refactor post edit * fix issue * fix page edit --------- Co-authored-by: joyqi Co-authored-by: joyqi --- admin/backup.php | 1 + admin/common-js.php | 4 - admin/custom-fields-js.php | 6 +- admin/editor-js.php | 103 +- admin/file-upload-js.php | 217 +- admin/file-upload.php | 4 +- admin/form-js.php | 12 +- admin/js/Moxie.swf | Bin 27640 -> 0 bytes admin/js/hyperdown.js | 2 +- admin/js/jquery-ui.js | 2 +- admin/js/jquery.js | 2 +- admin/js/moxie.js | 1 - admin/js/pagedown.js | 2 +- admin/js/paste.js | 1 - admin/js/plupload.js | 1 - admin/js/purify.js | 2 +- admin/js/timepicker.js | 2 +- admin/js/tokeninput.js | 2 +- admin/js/typecho.js | 2 +- admin/media.php | 140 +- admin/src/js/moxie.js | 11714 --------------------- admin/src/js/pagedown.js | 6 +- admin/src/js/paste.js | 443 - admin/src/js/plupload.js | 2497 ----- admin/src/js/typecho.js | 3 +- admin/write-js.php | 238 +- admin/write-page.php | 3 +- admin/write-post.php | 5 +- tools/package-lock.json | 7288 ++++--------- tools/package.json | 2 +- var/Typecho/Request.php | 2 +- var/Typecho/Widget/Helper/EmptyClass.php | 3 +- var/Widget/Contents/Attachment/Edit.php | 123 +- var/Widget/Contents/EditTrait.php | 566 + var/Widget/Contents/Page/Edit.php | 76 +- var/Widget/Contents/Post/Edit.php | 720 +- var/Widget/Contents/PrepareEditTrait.php | 114 + var/Widget/Metas/Category/Edit.php | 2 +- var/Widget/Metas/Tag/Edit.php | 2 +- 39 files changed, 3215 insertions(+), 21098 deletions(-) delete mode 100755 admin/js/Moxie.swf delete mode 100644 admin/js/moxie.js delete mode 100644 admin/js/paste.js delete mode 100644 admin/js/plupload.js delete mode 100755 admin/src/js/moxie.js delete mode 100644 admin/src/js/paste.js delete mode 100755 admin/src/js/plupload.js create mode 100644 var/Widget/Contents/EditTrait.php create mode 100644 var/Widget/Contents/PrepareEditTrait.php diff --git a/admin/backup.php b/admin/backup.php index 1d98a995..0bbe26bd 100644 --- a/admin/backup.php +++ b/admin/backup.php @@ -84,6 +84,7 @@ $backupFiles = \Widget\Backup::alloc()->listFiles(); diff --git a/admin/custom-fields-js.php b/admin/custom-fields-js.php index 4f27fddc..cf4e07e8 100644 --- a/admin/custom-fields-js.php +++ b/admin/custom-fields-js.php @@ -20,7 +20,7 @@ $(document).ready(function () { $(this).remove(); }); - $(this).parents('form').trigger('field'); + $(this).parents('form').trigger('change'); } }); } @@ -40,10 +40,6 @@ $(document).ready(function () { + '', el = $(html).hide().appendTo('#custom-field table tbody').fadeIn(); - $(':input', el).bind('input change', function () { - $(this).parents('form').trigger('field'); - }); - attachDeleteEvent(el); }); }); diff --git a/admin/editor-js.php b/admin/editor-js.php index 0fd25de3..7c32b1af 100644 --- a/admin/editor-js.php +++ b/admin/editor-js.php @@ -1,17 +1,44 @@ -markdown): ?> + + +markdown): ?> + + - - - 0) { - each(arg, function(value, key) { - var isComplex = inArray(typeOf(value), ['array', 'object']) !== -1; - - if (value === undef || strict && target[key] === undef) { - return true; - } - - if (isComplex && immutable) { - value = shallowCopy(value); - } - - if (typeOf(target[key]) === typeOf(value) && isComplex) { - merge(strict, immutable, [target[key], value]); - } else { - target[key] = value; - } - }); - } - }); - - return target; - } - - - /** - A way to inherit one `class` from another in a consisstent way (more or less) - - @method inherit - @static - @since >1.4.1 - @param {Function} child - @param {Function} parent - @return {Function} Prepared constructor - */ - function inherit(child, parent) { - // copy over all parent properties - for (var key in parent) { - if ({}.hasOwnProperty.call(parent, key)) { - child[key] = parent[key]; - } - } - - // give child `class` a place to define its own methods - function ctor() { - this.constructor = child; - - if (MXI_DEBUG) { - var getCtorName = function(fn) { - var m = fn.toString().match(/^function\s([^\(\s]+)/); - return m ? m[1] : false; - }; - - this.ctorName = getCtorName(child); - } - } - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - - // keep a way to reference parent methods - child.parent = parent.prototype; - return child; - } - - - /** - Executes the callback function for each item in array/object. If you return false in the - callback it will break the loop. - - @method each - @static - @param {Object} obj Object to iterate. - @param {function} callback Callback function to execute for each item. - */ - function each(obj, callback) { - var length, key, i, undef; - - if (obj) { - try { - length = obj.length; - } catch(ex) { - length = undef; - } - - if (length === undef || typeof(length) !== 'number') { - // Loop object items - for (key in obj) { - if (obj.hasOwnProperty(key)) { - if (callback(obj[key], key) === false) { - return; - } - } - } - } else { - // Loop array items - for (i = 0; i < length; i++) { - if (callback(obj[i], i) === false) { - return; - } - } - } - } - } - - /** - Checks if object is empty. - - @method isEmptyObj - @static - @param {Object} o Object to check. - @return {Boolean} - */ - function isEmptyObj(obj) { - var prop; - - if (!obj || typeOf(obj) !== 'object') { - return true; - } - - for (prop in obj) { - return false; - } - - return true; - } - - /** - Recieve an array of functions (usually async) to call in sequence, each function - receives a callback as first argument that it should call, when it completes. Finally, - after everything is complete, main callback is called. Passing truthy value to the - callback as a first argument will interrupt the sequence and invoke main callback - immediately. - - @method inSeries - @static - @param {Array} queue Array of functions to call in sequence - @param {Function} cb Main callback that is called in the end, or in case of error - */ - function inSeries(queue, cb) { - var i = 0, length = queue.length; - - if (typeOf(cb) !== 'function') { - cb = function() {}; - } - - if (!queue || !queue.length) { - cb(); - } - - function callNext(i) { - if (typeOf(queue[i]) === 'function') { - queue[i](function(error) { - /*jshint expr:true */ - ++i < length && !error ? callNext(i) : cb(error); - }); - } - } - callNext(i); - } - - - /** - Recieve an array of functions (usually async) to call in parallel, each function - receives a callback as first argument that it should call, when it completes. After - everything is complete, main callback is called. Passing truthy value to the - callback as a first argument will interrupt the process and invoke main callback - immediately. - - @method inParallel - @static - @param {Array} queue Array of functions to call in sequence - @param {Function} cb Main callback that is called in the end, or in case of erro - */ - function inParallel(queue, cb) { - var count = 0, num = queue.length, cbArgs = new Array(num); - - each(queue, function(fn, i) { - fn(function(error) { - if (error) { - return cb(error); - } - - var args = [].slice.call(arguments); - args.shift(); // strip error - undefined or not - - cbArgs[i] = args; - count++; - - if (count === num) { - cbArgs.unshift(null); - cb.apply(this, cbArgs); - } - }); - }); - } - - - /** - Find an element in array and return it's index if present, otherwise return -1. - - @method inArray - @static - @param {Mixed} needle Element to find - @param {Array} array - @return {Int} Index of the element, or -1 if not found - */ - function inArray(needle, array) { - if (array) { - if (Array.prototype.indexOf) { - return Array.prototype.indexOf.call(array, needle); - } - - for (var i = 0, length = array.length; i < length; i++) { - if (array[i] === needle) { - return i; - } - } - } - return -1; - } - - - /** - Returns elements of first array if they are not present in second. And false - otherwise. - - @private - @method arrayDiff - @param {Array} needles - @param {Array} array - @return {Array|Boolean} - */ - function arrayDiff(needles, array) { - var diff = []; - - if (typeOf(needles) !== 'array') { - needles = [needles]; - } - - if (typeOf(array) !== 'array') { - array = [array]; - } - - for (var i in needles) { - if (inArray(needles[i], array) === -1) { - diff.push(needles[i]); - } - } - return diff.length ? diff : false; - } - - - /** - Find intersection of two arrays. - - @private - @method arrayIntersect - @param {Array} array1 - @param {Array} array2 - @return {Array} Intersection of two arrays or null if there is none - */ - function arrayIntersect(array1, array2) { - var result = []; - each(array1, function(item) { - if (inArray(item, array2) !== -1) { - result.push(item); - } - }); - return result.length ? result : null; - } - - - /** - Forces anything into an array. - - @method toArray - @static - @param {Object} obj Object with length field. - @return {Array} Array object containing all items. - */ - function toArray(obj) { - var i, arr = []; - - for (i = 0; i < obj.length; i++) { - arr[i] = obj[i]; - } - - return arr; - } - - - /** - Generates an unique ID. The only way a user would be able to get the same ID is if the two persons - at the same exact millisecond manage to get the same 5 random numbers between 0-65535; it also uses - a counter so each ID is guaranteed to be unique for the given page. It is more probable for the earth - to be hit with an asteroid. - - @method guid - @static - @param {String} prefix to prepend (by default 'o' will be prepended). - @method guid - @return {String} Virtually unique id. - */ - var guid = (function() { - var counter = 0; - - return function(prefix) { - var guid = new Date().getTime().toString(32), i; - - for (i = 0; i < 5; i++) { - guid += Math.floor(Math.random() * 65535).toString(32); - } - - return (prefix || 'o_') + guid + (counter++).toString(32); - }; - }()); - - - /** - Trims white spaces around the string - - @method trim - @static - @param {String} str - @return {String} - */ - function trim(str) { - if (!str) { - return str; - } - return String.prototype.trim ? String.prototype.trim.call(str) : str.toString().replace(/^\s*/, '').replace(/\s*$/, ''); - } - - - /** - Parses the specified size string into a byte value. For example 10kb becomes 10240. - - @method parseSizeStr - @static - @param {String/Number} size String to parse or number to just pass through. - @return {Number} Size in bytes. - */ - function parseSizeStr(size) { - if (typeof(size) !== 'string') { - return size; - } - - var muls = { - t: 1099511627776, - g: 1073741824, - m: 1048576, - k: 1024 - }, - mul; - - size = /^([0-9\.]+)([tmgk]?)$/.exec(size.toLowerCase().replace(/[^0-9\.tmkg]/g, '')); - mul = size[2]; - size = +size[1]; - - if (muls.hasOwnProperty(mul)) { - size *= muls[mul]; - } - return Math.floor(size); - } - - - /** - * Pseudo sprintf implementation - simple way to replace tokens with specified values. - * - * @param {String} str String with tokens - * @return {String} String with replaced tokens - */ - function sprintf(str) { - var args = [].slice.call(arguments, 1); - - return str.replace(/%([a-z])/g, function($0, $1) { - var value = args.shift(); - - switch ($1) { - case 's': - return value + ''; - - case 'd': - return parseInt(value, 10); - - case 'f': - return parseFloat(value); - - case 'c': - return ''; - - default: - return value; - } - }); - } - - - - function delay(cb, timeout) { - var self = this; - setTimeout(function() { - cb.call(self); - }, timeout || 1); - } - - - return { - guid: guid, - typeOf: typeOf, - extend: extend, - extendIf: extendIf, - extendImmutable: extendImmutable, - extendImmutableIf: extendImmutableIf, - clone: clone, - inherit: inherit, - each: each, - isEmptyObj: isEmptyObj, - inSeries: inSeries, - inParallel: inParallel, - inArray: inArray, - arrayDiff: arrayDiff, - arrayIntersect: arrayIntersect, - toArray: toArray, - trim: trim, - sprintf: sprintf, - parseSizeStr: parseSizeStr, - delay: delay - }; -}); - -// Included from: src/javascript/core/utils/Encode.js - -/** - * Encode.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/core/utils/Encode -@public -@static -*/ - -define('moxie/core/utils/Encode', [], function() { - - /** - Encode string with UTF-8 - - @method utf8_encode - @static - @param {String} str String to encode - @return {String} UTF-8 encoded string - */ - var utf8_encode = function(str) { - return unescape(encodeURIComponent(str)); - }; - - /** - Decode UTF-8 encoded string - - @method utf8_decode - @static - @param {String} str String to decode - @return {String} Decoded string - */ - var utf8_decode = function(str_data) { - return decodeURIComponent(escape(str_data)); - }; - - /** - Decode Base64 encoded string (uses browser's default method if available), - from: https://raw.github.com/kvz/phpjs/master/functions/url/base64_decode.js - - @method atob - @static - @param {String} data String to decode - @return {String} Decoded string - */ - var atob = function(data, utf8) { - if (typeof(window.atob) === 'function') { - return utf8 ? utf8_decode(window.atob(data)) : window.atob(data); - } - - // http://kevin.vanzonneveld.net - // + original by: Tyler Akins (http://rumkin.com) - // + improved by: Thunder.m - // + input by: Aman Gupta - // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) - // + bugfixed by: Onno Marsman - // + bugfixed by: Pellentesque Malesuada - // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) - // + input by: Brett Zamir (http://brett-zamir.me) - // + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) - // * example 1: base64_decode('S2V2aW4gdmFuIFpvbm5ldmVsZA=='); - // * returns 1: 'Kevin van Zonneveld' - // mozilla has this native - // - but breaks in 2.0.0.12! - //if (typeof this.window.atob == 'function') { - // return atob(data); - //} - var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, - ac = 0, - dec = "", - tmp_arr = []; - - if (!data) { - return data; - } - - data += ''; - - do { // unpack four hexets into three octets using index points in b64 - h1 = b64.indexOf(data.charAt(i++)); - h2 = b64.indexOf(data.charAt(i++)); - h3 = b64.indexOf(data.charAt(i++)); - h4 = b64.indexOf(data.charAt(i++)); - - bits = h1 << 18 | h2 << 12 | h3 << 6 | h4; - - o1 = bits >> 16 & 0xff; - o2 = bits >> 8 & 0xff; - o3 = bits & 0xff; - - if (h3 == 64) { - tmp_arr[ac++] = String.fromCharCode(o1); - } else if (h4 == 64) { - tmp_arr[ac++] = String.fromCharCode(o1, o2); - } else { - tmp_arr[ac++] = String.fromCharCode(o1, o2, o3); - } - } while (i < data.length); - - dec = tmp_arr.join(''); - - return utf8 ? utf8_decode(dec) : dec; - }; - - /** - Base64 encode string (uses browser's default method if available), - from: https://raw.github.com/kvz/phpjs/master/functions/url/base64_encode.js - - @method btoa - @static - @param {String} data String to encode - @return {String} Base64 encoded string - */ - var btoa = function(data, utf8) { - if (utf8) { - data = utf8_encode(data); - } - - if (typeof(window.btoa) === 'function') { - return window.btoa(data); - } - - // http://kevin.vanzonneveld.net - // + original by: Tyler Akins (http://rumkin.com) - // + improved by: Bayron Guevara - // + improved by: Thunder.m - // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) - // + bugfixed by: Pellentesque Malesuada - // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) - // + improved by: Rafał Kukawski (http://kukawski.pl) - // * example 1: base64_encode('Kevin van Zonneveld'); - // * returns 1: 'S2V2aW4gdmFuIFpvbm5ldmVsZA==' - // mozilla has this native - // - but breaks in 2.0.0.12! - var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, - ac = 0, - enc = "", - tmp_arr = []; - - if (!data) { - return data; - } - - do { // pack three octets into four hexets - o1 = data.charCodeAt(i++); - o2 = data.charCodeAt(i++); - o3 = data.charCodeAt(i++); - - bits = o1 << 16 | o2 << 8 | o3; - - h1 = bits >> 18 & 0x3f; - h2 = bits >> 12 & 0x3f; - h3 = bits >> 6 & 0x3f; - h4 = bits & 0x3f; - - // use hexets to index into b64, and append result to encoded string - tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4); - } while (i < data.length); - - enc = tmp_arr.join(''); - - var r = data.length % 3; - - return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3); - }; - - - return { - utf8_encode: utf8_encode, - utf8_decode: utf8_decode, - atob: atob, - btoa: btoa - }; -}); - -// Included from: src/javascript/core/utils/Env.js - -/** - * Env.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/core/utils/Env -@public -@static -*/ - -define("moxie/core/utils/Env", [ - "moxie/core/utils/Basic" -], function(Basic) { - - /** - * UAParser.js v0.7.7 - * Lightweight JavaScript-based User-Agent string parser - * https://github.com/faisalman/ua-parser-js - * - * Copyright © 2012-2015 Faisal Salman - * Dual licensed under GPLv2 & MIT - */ - var UAParser = (function (undefined) { - - ////////////// - // Constants - ///////////// - - - var EMPTY = '', - UNKNOWN = '?', - FUNC_TYPE = 'function', - UNDEF_TYPE = 'undefined', - OBJ_TYPE = 'object', - MAJOR = 'major', - MODEL = 'model', - NAME = 'name', - TYPE = 'type', - VENDOR = 'vendor', - VERSION = 'version', - ARCHITECTURE= 'architecture', - CONSOLE = 'console', - MOBILE = 'mobile', - TABLET = 'tablet'; - - - /////////// - // Helper - ////////// - - - var util = { - has : function (str1, str2) { - return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1; - }, - lowerize : function (str) { - return str.toLowerCase(); - } - }; - - - /////////////// - // Map helper - ////////////// - - - var mapper = { - - rgx : function () { - - // loop through all regexes maps - for (var result, i = 0, j, k, p, q, matches, match, args = arguments; i < args.length; i += 2) { - - var regex = args[i], // even sequence (0,2,4,..) - props = args[i + 1]; // odd sequence (1,3,5,..) - - // construct object barebones - if (typeof(result) === UNDEF_TYPE) { - result = {}; - for (p in props) { - q = props[p]; - if (typeof(q) === OBJ_TYPE) { - result[q[0]] = undefined; - } else { - result[q] = undefined; - } - } - } - - // try matching uastring with regexes - for (j = k = 0; j < regex.length; j++) { - matches = regex[j].exec(this.getUA()); - if (!!matches) { - for (p = 0; p < props.length; p++) { - match = matches[++k]; - q = props[p]; - // check if given property is actually array - if (typeof(q) === OBJ_TYPE && q.length > 0) { - if (q.length == 2) { - if (typeof(q[1]) == FUNC_TYPE) { - // assign modified match - result[q[0]] = q[1].call(this, match); - } else { - // assign given value, ignore regex match - result[q[0]] = q[1]; - } - } else if (q.length == 3) { - // check whether function or regex - if (typeof(q[1]) === FUNC_TYPE && !(q[1].exec && q[1].test)) { - // call function (usually string mapper) - result[q[0]] = match ? q[1].call(this, match, q[2]) : undefined; - } else { - // sanitize match using given regex - result[q[0]] = match ? match.replace(q[1], q[2]) : undefined; - } - } else if (q.length == 4) { - result[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined; - } - } else { - result[q] = match ? match : undefined; - } - } - break; - } - } - - if(!!matches) break; // break the loop immediately if match found - } - return result; - }, - - str : function (str, map) { - - for (var i in map) { - // check if array - if (typeof(map[i]) === OBJ_TYPE && map[i].length > 0) { - for (var j = 0; j < map[i].length; j++) { - if (util.has(map[i][j], str)) { - return (i === UNKNOWN) ? undefined : i; - } - } - } else if (util.has(map[i], str)) { - return (i === UNKNOWN) ? undefined : i; - } - } - return str; - } - }; - - - /////////////// - // String map - ////////////// - - - var maps = { - - browser : { - oldsafari : { - major : { - '1' : ['/8', '/1', '/3'], - '2' : '/4', - '?' : '/' - }, - version : { - '1.0' : '/8', - '1.2' : '/1', - '1.3' : '/3', - '2.0' : '/412', - '2.0.2' : '/416', - '2.0.3' : '/417', - '2.0.4' : '/419', - '?' : '/' - } - } - }, - - device : { - sprint : { - model : { - 'Evo Shift 4G' : '7373KT' - }, - vendor : { - 'HTC' : 'APA', - 'Sprint' : 'Sprint' - } - } - }, - - os : { - windows : { - version : { - 'ME' : '4.90', - 'NT 3.11' : 'NT3.51', - 'NT 4.0' : 'NT4.0', - '2000' : 'NT 5.0', - 'XP' : ['NT 5.1', 'NT 5.2'], - 'Vista' : 'NT 6.0', - '7' : 'NT 6.1', - '8' : 'NT 6.2', - '8.1' : 'NT 6.3', - 'RT' : 'ARM' - } - } - } - }; - - - ////////////// - // Regex map - ///////////// - - - var regexes = { - - browser : [[ - - // Presto based - /(opera\smini)\/([\w\.-]+)/i, // Opera Mini - /(opera\s[mobiletab]+).+version\/([\w\.-]+)/i, // Opera Mobi/Tablet - /(opera).+version\/([\w\.]+)/i, // Opera > 9.80 - /(opera)[\/\s]+([\w\.]+)/i // Opera < 9.80 - - ], [NAME, VERSION], [ - - /\s(opr)\/([\w\.]+)/i // Opera Webkit - ], [[NAME, 'Opera'], VERSION], [ - - // Mixed - /(kindle)\/([\w\.]+)/i, // Kindle - /(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]+)*/i, - // Lunascape/Maxthon/Netfront/Jasmine/Blazer - - // Trident based - /(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i, - // Avant/IEMobile/SlimBrowser/Baidu - /(?:ms|\()(ie)\s([\w\.]+)/i, // Internet Explorer - - // Webkit/KHTML based - /(rekonq)\/([\w\.]+)*/i, // Rekonq - /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi)\/([\w\.-]+)/i - // Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron - ], [NAME, VERSION], [ - - /(trident).+rv[:\s]([\w\.]+).+like\sgecko/i // IE11 - ], [[NAME, 'IE'], VERSION], [ - - /(edge)\/((\d+)?[\w\.]+)/i // Microsoft Edge - ], [NAME, VERSION], [ - - /(yabrowser)\/([\w\.]+)/i // Yandex - ], [[NAME, 'Yandex'], VERSION], [ - - /(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon - ], [[NAME, /_/g, ' '], VERSION], [ - - /(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i, - // Chrome/OmniWeb/Arora/Tizen/Nokia - /(uc\s?browser|qqbrowser)[\/\s]?([\w\.]+)/i - // UCBrowser/QQBrowser - ], [NAME, VERSION], [ - - /(dolfin)\/([\w\.]+)/i // Dolphin - ], [[NAME, 'Dolphin'], VERSION], [ - - /((?:android.+)crmo|crios)\/([\w\.]+)/i // Chrome for Android/iOS - ], [[NAME, 'Chrome'], VERSION], [ - - /XiaoMi\/MiuiBrowser\/([\w\.]+)/i // MIUI Browser - ], [VERSION, [NAME, 'MIUI Browser']], [ - - /android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)/i // Android Browser - ], [VERSION, [NAME, 'Android Browser']], [ - - /FBAV\/([\w\.]+);/i // Facebook App for iOS - ], [VERSION, [NAME, 'Facebook']], [ - - /version\/([\w\.]+).+?mobile\/\w+\s(safari)/i // Mobile Safari - ], [VERSION, [NAME, 'Mobile Safari']], [ - - /version\/([\w\.]+).+?(mobile\s?safari|safari)/i // Safari & Safari Mobile - ], [VERSION, NAME], [ - - /webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i // Safari < 3.0 - ], [NAME, [VERSION, mapper.str, maps.browser.oldsafari.version]], [ - - /(konqueror)\/([\w\.]+)/i, // Konqueror - /(webkit|khtml)\/([\w\.]+)/i - ], [NAME, VERSION], [ - - // Gecko based - /(navigator|netscape)\/([\w\.-]+)/i // Netscape - ], [[NAME, 'Netscape'], VERSION], [ - /(swiftfox)/i, // Swiftfox - /(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i, - // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror - /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/([\w\.-]+)/i, - // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix - /(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i, // Mozilla - - // Other - /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf)[\/\s]?([\w\.]+)/i, - // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf - /(links)\s\(([\w\.]+)/i, // Links - /(gobrowser)\/?([\w\.]+)*/i, // GoBrowser - /(ice\s?browser)\/v?([\w\._]+)/i, // ICE Browser - /(mosaic)[\/\s]([\w\.]+)/i // Mosaic - ], [NAME, VERSION] - ], - - engine : [[ - - /windows.+\sedge\/([\w\.]+)/i // EdgeHTML - ], [VERSION, [NAME, 'EdgeHTML']], [ - - /(presto)\/([\w\.]+)/i, // Presto - /(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m - /(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i, // KHTML/Tasman/Links - /(icab)[\/\s]([23]\.[\d\.]+)/i // iCab - ], [NAME, VERSION], [ - - /rv\:([\w\.]+).*(gecko)/i // Gecko - ], [VERSION, NAME] - ], - - os : [[ - - // Windows based - /microsoft\s(windows)\s(vista|xp)/i // Windows (iTunes) - ], [NAME, VERSION], [ - /(windows)\snt\s6\.2;\s(arm)/i, // Windows RT - /(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i - ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [ - /(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i - ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [ - - // Mobile/Embedded OS - /\((bb)(10);/i // BlackBerry 10 - ], [[NAME, 'BlackBerry'], VERSION], [ - /(blackberry)\w*\/?([\w\.]+)*/i, // Blackberry - /(tizen)[\/\s]([\w\.]+)/i, // Tizen - /(android|webos|palm\os|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i, - // Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki - /linux;.+(sailfish);/i // Sailfish OS - ], [NAME, VERSION], [ - /(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i // Symbian - ], [[NAME, 'Symbian'], VERSION], [ - /\((series40);/i // Series 40 - ], [NAME], [ - /mozilla.+\(mobile;.+gecko.+firefox/i // Firefox OS - ], [[NAME, 'Firefox OS'], VERSION], [ - - // Console - /(nintendo|playstation)\s([wids3portablevu]+)/i, // Nintendo/Playstation - - // GNU/Linux based - /(mint)[\/\s\(]?(\w+)*/i, // Mint - /(mageia|vectorlinux)[;\s]/i, // Mageia/VectorLinux - /(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?([\w\.-]+)*/i, - // Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware - // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus - /(hurd|linux)\s?([\w\.]+)*/i, // Hurd/Linux - /(gnu)\s?([\w\.]+)*/i // GNU - ], [NAME, VERSION], [ - - /(cros)\s[\w]+\s([\w\.]+\w)/i // Chromium OS - ], [[NAME, 'Chromium OS'], VERSION],[ - - // Solaris - /(sunos)\s?([\w\.]+\d)*/i // Solaris - ], [[NAME, 'Solaris'], VERSION], [ - - // BSD based - /\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly - ], [NAME, VERSION],[ - - /(ip[honead]+)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i // iOS - ], [[NAME, 'iOS'], [VERSION, /_/g, '.']], [ - - /(mac\sos\sx)\s?([\w\s\.]+\w)*/i, - /(macintosh|mac(?=_powerpc)\s)/i // Mac OS - ], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [ - - // Other - /((?:open)?solaris)[\/\s-]?([\w\.]+)*/i, // Solaris - /(haiku)\s(\w+)/i, // Haiku - /(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i, // AIX - /(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i, - // Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS - /(unix)\s?([\w\.]+)*/i // UNIX - ], [NAME, VERSION] - ] - }; - - - ///////////////// - // Constructor - //////////////// - - - var UAParser = function (uastring) { - - var ua = uastring || ((window && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY); - - this.getBrowser = function () { - return mapper.rgx.apply(this, regexes.browser); - }; - this.getEngine = function () { - return mapper.rgx.apply(this, regexes.engine); - }; - this.getOS = function () { - return mapper.rgx.apply(this, regexes.os); - }; - this.getResult = function() { - return { - ua : this.getUA(), - browser : this.getBrowser(), - engine : this.getEngine(), - os : this.getOS() - }; - }; - this.getUA = function () { - return ua; - }; - this.setUA = function (uastring) { - ua = uastring; - return this; - }; - this.setUA(ua); - }; - - return UAParser; - })(); - - - function version_compare(v1, v2, operator) { - // From: http://phpjs.org/functions - // + original by: Philippe Jausions (http://pear.php.net/user/jausions) - // + original by: Aidan Lister (http://aidanlister.com/) - // + reimplemented by: Kankrelune (http://www.webfaktory.info/) - // + improved by: Brett Zamir (http://brett-zamir.me) - // + improved by: Scott Baker - // + improved by: Theriault - // * example 1: version_compare('8.2.5rc', '8.2.5a'); - // * returns 1: 1 - // * example 2: version_compare('8.2.50', '8.2.52', '<'); - // * returns 2: true - // * example 3: version_compare('5.3.0-dev', '5.3.0'); - // * returns 3: -1 - // * example 4: version_compare('4.1.0.52','4.01.0.51'); - // * returns 4: 1 - - // Important: compare must be initialized at 0. - var i = 0, - x = 0, - compare = 0, - // vm maps textual PHP versions to negatives so they're less than 0. - // PHP currently defines these as CASE-SENSITIVE. It is important to - // leave these as negatives so that they can come before numerical versions - // and as if no letters were there to begin with. - // (1alpha is < 1 and < 1.1 but > 1dev1) - // If a non-numerical value can't be mapped to this table, it receives - // -7 as its value. - vm = { - 'dev': -6, - 'alpha': -5, - 'a': -5, - 'beta': -4, - 'b': -4, - 'RC': -3, - 'rc': -3, - '#': -2, - 'p': 1, - 'pl': 1 - }, - // This function will be called to prepare each version argument. - // It replaces every _, -, and + with a dot. - // It surrounds any nonsequence of numbers/dots with dots. - // It replaces sequences of dots with a single dot. - // version_compare('4..0', '4.0') == 0 - // Important: A string of 0 length needs to be converted into a value - // even less than an unexisting value in vm (-7), hence [-8]. - // It's also important to not strip spaces because of this. - // version_compare('', ' ') == 1 - prepVersion = function (v) { - v = ('' + v).replace(/[_\-+]/g, '.'); - v = v.replace(/([^.\d]+)/g, '.$1.').replace(/\.{2,}/g, '.'); - return (!v.length ? [-8] : v.split('.')); - }, - // This converts a version component to a number. - // Empty component becomes 0. - // Non-numerical component becomes a negative number. - // Numerical component becomes itself as an integer. - numVersion = function (v) { - return !v ? 0 : (isNaN(v) ? vm[v] || -7 : parseInt(v, 10)); - }; - - v1 = prepVersion(v1); - v2 = prepVersion(v2); - x = Math.max(v1.length, v2.length); - for (i = 0; i < x; i++) { - if (v1[i] == v2[i]) { - continue; - } - v1[i] = numVersion(v1[i]); - v2[i] = numVersion(v2[i]); - if (v1[i] < v2[i]) { - compare = -1; - break; - } else if (v1[i] > v2[i]) { - compare = 1; - break; - } - } - if (!operator) { - return compare; - } - - // Important: operator is CASE-SENSITIVE. - // "No operator" seems to be treated as "<." - // Any other values seem to make the function return null. - switch (operator) { - case '>': - case 'gt': - return (compare > 0); - case '>=': - case 'ge': - return (compare >= 0); - case '<=': - case 'le': - return (compare <= 0); - case '==': - case '=': - case 'eq': - return (compare === 0); - case '<>': - case '!=': - case 'ne': - return (compare !== 0); - case '': - case '<': - case 'lt': - return (compare < 0); - default: - return null; - } - } - - - var can = (function() { - var caps = { - access_global_ns: function () { - return !!window.moxie; - }, - - define_property: (function() { - /* // currently too much extra code required, not exactly worth it - try { // as of IE8, getters/setters are supported only on DOM elements - var obj = {}; - if (Object.defineProperty) { - Object.defineProperty(obj, 'prop', { - enumerable: true, - configurable: true - }); - return true; - } - } catch(ex) {} - - if (Object.prototype.__defineGetter__ && Object.prototype.__defineSetter__) { - return true; - }*/ - return false; - }()), - - create_canvas: function() { - // On the S60 and BB Storm, getContext exists, but always returns undefined - // so we actually have to call getContext() to verify - // github.com/Modernizr/Modernizr/issues/issue/97/ - var el = document.createElement('canvas'); - var isSupported = !!(el.getContext && el.getContext('2d')); - caps.create_canvas = isSupported; - return isSupported; - }, - - return_response_type: function(responseType) { - try { - if (Basic.inArray(responseType, ['', 'text', 'document']) !== -1) { - return true; - } else if (window.XMLHttpRequest) { - var xhr = new XMLHttpRequest(); - xhr.open('get', '/'); // otherwise Gecko throws an exception - if ('responseType' in xhr) { - xhr.responseType = responseType; - // as of 23.0.1271.64, Chrome switched from throwing exception to merely logging it to the console (why? o why?) - if (xhr.responseType !== responseType) { - return false; - } - return true; - } - } - } catch (ex) {} - return false; - }, - - use_blob_uri: function() { - var URL = window.URL; - caps.use_blob_uri = (URL && - 'createObjectURL' in URL && - 'revokeObjectURL' in URL && - (Env.browser !== 'IE' || Env.verComp(Env.version, '11.0.46', '>=')) // IE supports createObjectURL, but not fully, for example it fails to use it as a src for the image - ); - return caps.use_blob_uri; - }, - - // ideas for this heavily come from Modernizr (http://modernizr.com/) - use_data_uri: (function() { - var du = new Image(); - - du.onload = function() { - caps.use_data_uri = (du.width === 1 && du.height === 1); - }; - - setTimeout(function() { - du.src = "data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=="; - }, 1); - return false; - }()), - - use_data_uri_over32kb: function() { // IE8 - return caps.use_data_uri && (Env.browser !== 'IE' || Env.version >= 9); - }, - - use_data_uri_of: function(bytes) { - return (caps.use_data_uri && bytes < 33000 || caps.use_data_uri_over32kb()); - }, - - use_fileinput: function() { - if (navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/)) { - return false; - } - - var el = document.createElement('input'); - el.setAttribute('type', 'file'); - return caps.use_fileinput = !el.disabled; - }, - - use_webgl: function() { - var canvas = document.createElement('canvas'); - var gl = null, isSupported; - try { - gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl"); - } - catch(e) {} - - if (!gl) { // it seems that sometimes it doesn't throw exception, but still fails to get context - gl = null; - } - - isSupported = !!gl; - caps.use_webgl = isSupported; // save result of our check - canvas = undefined; - return isSupported; - } - }; - - return function(cap) { - var args = [].slice.call(arguments); - args.shift(); // shift of cap - return Basic.typeOf(caps[cap]) === 'function' ? caps[cap].apply(this, args) : !!caps[cap]; - }; - }()); - - - var uaResult = new UAParser().getResult(); - - - var Env = { - can: can, - - uaParser: UAParser, - - browser: uaResult.browser.name, - version: uaResult.browser.version, - os: uaResult.os.name, // everybody intuitively types it in a lowercase for some reason - osVersion: uaResult.os.version, - - verComp: version_compare, - - swf_url: "../flash/Moxie.swf", - xap_url: "../silverlight/Moxie.xap", - global_event_dispatcher: "moxie.core.EventTarget.instance.dispatchEvent" - }; - - // for backward compatibility - // @deprecated Use `Env.os` instead - Env.OS = Env.os; - - if (MXI_DEBUG) { - Env.debug = { - runtime: true, - events: false - }; - - Env.log = function() { - - function logObj(data) { - // TODO: this should recursively print out the object in a pretty way - console.appendChild(document.createTextNode(data + "\n")); - } - - // if debugger present, IE8 might have window.console.log method, but not be able to apply on it (why...) - if (window && window.console && window.console.log && window.console.log.apply) { - window.console.log.apply(window.console, arguments); - } else if (document) { - var console = document.getElementById('moxie-console'); - if (!console) { - console = document.createElement('pre'); - console.id = 'moxie-console'; - //console.style.display = 'none'; - document.body.appendChild(console); - } - - var data = arguments[0]; - if (Basic.typeOf(data) === 'string') { - data = Basic.sprintf.apply(this, arguments); - } else if (Basic.inArray(Basic.typeOf(data), ['object', 'array']) !== -1) { - logObj(data); - return; - } - - console.appendChild(document.createTextNode(data + "\n")); - } - }; - } - - return Env; -}); - -// Included from: src/javascript/core/Exceptions.js - -/** - * Exceptions.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -define('moxie/core/Exceptions', [ - 'moxie/core/utils/Basic' -], function(Basic) { - - function _findKey(obj, value) { - var key; - for (key in obj) { - if (obj[key] === value) { - return key; - } - } - return null; - } - - /** - @class moxie/core/Exception - */ - return { - RuntimeError: (function() { - var namecodes = { - NOT_INIT_ERR: 1, - EXCEPTION_ERR: 3, - NOT_SUPPORTED_ERR: 9, - JS_ERR: 4 - }; - - function RuntimeError(code, message) { - this.code = code; - this.name = _findKey(namecodes, code); - this.message = this.name + (message || ": RuntimeError " + this.code); - } - - Basic.extend(RuntimeError, namecodes); - RuntimeError.prototype = Error.prototype; - return RuntimeError; - }()), - - OperationNotAllowedException: (function() { - - function OperationNotAllowedException(code) { - this.code = code; - this.name = 'OperationNotAllowedException'; - } - - Basic.extend(OperationNotAllowedException, { - NOT_ALLOWED_ERR: 1 - }); - - OperationNotAllowedException.prototype = Error.prototype; - - return OperationNotAllowedException; - }()), - - ImageError: (function() { - var namecodes = { - WRONG_FORMAT: 1, - MAX_RESOLUTION_ERR: 2, - INVALID_META_ERR: 3 - }; - - function ImageError(code) { - this.code = code; - this.name = _findKey(namecodes, code); - this.message = this.name + ": ImageError " + this.code; - } - - Basic.extend(ImageError, namecodes); - ImageError.prototype = Error.prototype; - - return ImageError; - }()), - - FileException: (function() { - var namecodes = { - NOT_FOUND_ERR: 1, - SECURITY_ERR: 2, - ABORT_ERR: 3, - NOT_READABLE_ERR: 4, - ENCODING_ERR: 5, - NO_MODIFICATION_ALLOWED_ERR: 6, - INVALID_STATE_ERR: 7, - SYNTAX_ERR: 8 - }; - - function FileException(code) { - this.code = code; - this.name = _findKey(namecodes, code); - this.message = this.name + ": FileException " + this.code; - } - - Basic.extend(FileException, namecodes); - FileException.prototype = Error.prototype; - return FileException; - }()), - - DOMException: (function() { - var namecodes = { - INDEX_SIZE_ERR: 1, - DOMSTRING_SIZE_ERR: 2, - HIERARCHY_REQUEST_ERR: 3, - WRONG_DOCUMENT_ERR: 4, - INVALID_CHARACTER_ERR: 5, - NO_DATA_ALLOWED_ERR: 6, - NO_MODIFICATION_ALLOWED_ERR: 7, - NOT_FOUND_ERR: 8, - NOT_SUPPORTED_ERR: 9, - INUSE_ATTRIBUTE_ERR: 10, - INVALID_STATE_ERR: 11, - SYNTAX_ERR: 12, - INVALID_MODIFICATION_ERR: 13, - NAMESPACE_ERR: 14, - INVALID_ACCESS_ERR: 15, - VALIDATION_ERR: 16, - TYPE_MISMATCH_ERR: 17, - SECURITY_ERR: 18, - NETWORK_ERR: 19, - ABORT_ERR: 20, - URL_MISMATCH_ERR: 21, - QUOTA_EXCEEDED_ERR: 22, - TIMEOUT_ERR: 23, - INVALID_NODE_TYPE_ERR: 24, - DATA_CLONE_ERR: 25 - }; - - function DOMException(code) { - this.code = code; - this.name = _findKey(namecodes, code); - this.message = this.name + ": DOMException " + this.code; - } - - Basic.extend(DOMException, namecodes); - DOMException.prototype = Error.prototype; - return DOMException; - }()), - - EventException: (function() { - function EventException(code) { - this.code = code; - this.name = 'EventException'; - } - - Basic.extend(EventException, { - UNSPECIFIED_EVENT_TYPE_ERR: 0 - }); - - EventException.prototype = Error.prototype; - - return EventException; - }()) - }; -}); - -// Included from: src/javascript/core/utils/Dom.js - -/** - * Dom.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/core/utils/Dom -@public -@static -*/ - -define('moxie/core/utils/Dom', ['moxie/core/utils/Env'], function(Env) { - - /** - Get DOM Element by it's id. - - @method get - @param {String} id Identifier of the DOM Element - @return {DOMElement} - */ - var get = function(id) { - if (typeof id !== 'string') { - return id; - } - return document.getElementById(id); - }; - - /** - Checks if specified DOM element has specified class. - - @method hasClass - @static - @param {Object} obj DOM element like object to add handler to. - @param {String} name Class name - */ - var hasClass = function(obj, name) { - if (!obj.className) { - return false; - } - - var regExp = new RegExp("(^|\\s+)"+name+"(\\s+|$)"); - return regExp.test(obj.className); - }; - - /** - Adds specified className to specified DOM element. - - @method addClass - @static - @param {Object} obj DOM element like object to add handler to. - @param {String} name Class name - */ - var addClass = function(obj, name) { - if (!hasClass(obj, name)) { - obj.className = !obj.className ? name : obj.className.replace(/\s+$/, '') + ' ' + name; - } - }; - - /** - Removes specified className from specified DOM element. - - @method removeClass - @static - @param {Object} obj DOM element like object to add handler to. - @param {String} name Class name - */ - var removeClass = function(obj, name) { - if (obj.className) { - var regExp = new RegExp("(^|\\s+)"+name+"(\\s+|$)"); - obj.className = obj.className.replace(regExp, function($0, $1, $2) { - return $1 === ' ' && $2 === ' ' ? ' ' : ''; - }); - } - }; - - /** - Returns a given computed style of a DOM element. - - @method getStyle - @static - @param {Object} obj DOM element like object. - @param {String} name Style you want to get from the DOM element - */ - var getStyle = function(obj, name) { - if (obj.currentStyle) { - return obj.currentStyle[name]; - } else if (window.getComputedStyle) { - return window.getComputedStyle(obj, null)[name]; - } - }; - - - /** - Returns the absolute x, y position of an Element. The position will be returned in a object with x, y fields. - - @method getPos - @static - @param {Element} node HTML element or element id to get x, y position from. - @param {Element} root Optional root element to stop calculations at. - @return {object} Absolute position of the specified element object with x, y fields. - */ - var getPos = function(node, root) { - var x = 0, y = 0, parent, doc = document, nodeRect, rootRect; - - node = node; - root = root || doc.body; - - // Returns the x, y cordinate for an element on IE 6 and IE 7 - function getIEPos(node) { - var bodyElm, rect, x = 0, y = 0; - - if (node) { - rect = node.getBoundingClientRect(); - bodyElm = doc.compatMode === "CSS1Compat" ? doc.documentElement : doc.body; - x = rect.left + bodyElm.scrollLeft; - y = rect.top + bodyElm.scrollTop; - } - - return { - x : x, - y : y - }; - } - - // Use getBoundingClientRect on IE 6 and IE 7 but not on IE 8 in standards mode - if (node && node.getBoundingClientRect && Env.browser === 'IE' && (!doc.documentMode || doc.documentMode < 8)) { - nodeRect = getIEPos(node); - rootRect = getIEPos(root); - - return { - x : nodeRect.x - rootRect.x, - y : nodeRect.y - rootRect.y - }; - } - - parent = node; - while (parent && parent != root && parent.nodeType) { - x += parent.offsetLeft || 0; - y += parent.offsetTop || 0; - parent = parent.offsetParent; - } - - parent = node.parentNode; - while (parent && parent != root && parent.nodeType) { - x -= parent.scrollLeft || 0; - y -= parent.scrollTop || 0; - parent = parent.parentNode; - } - - return { - x : x, - y : y - }; - }; - - /** - Returns the size of the specified node in pixels. - - @method getSize - @static - @param {Node} node Node to get the size of. - @return {Object} Object with a w and h property. - */ - var getSize = function(node) { - return { - w : node.offsetWidth || node.clientWidth, - h : node.offsetHeight || node.clientHeight - }; - }; - - return { - get: get, - hasClass: hasClass, - addClass: addClass, - removeClass: removeClass, - getStyle: getStyle, - getPos: getPos, - getSize: getSize - }; -}); - -// Included from: src/javascript/core/EventTarget.js - -/** - * EventTarget.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -define('moxie/core/EventTarget', [ - 'moxie/core/utils/Env', - 'moxie/core/Exceptions', - 'moxie/core/utils/Basic' -], function(Env, x, Basic) { - - // hash of event listeners by object uid - var eventpool = {}; - - /** - Parent object for all event dispatching components and objects - - @class moxie/core/EventTarget - @constructor EventTarget - */ - function EventTarget() { - /** - Unique id of the event dispatcher, usually overriden by children - - @property uid - @type String - */ - this.uid = Basic.guid(); - } - - - Basic.extend(EventTarget.prototype, { - - /** - Can be called from within a child in order to acquire uniqie id in automated manner - - @method init - */ - init: function() { - if (!this.uid) { - this.uid = Basic.guid('uid_'); - } - }, - - /** - Register a handler to a specific event dispatched by the object - - @method addEventListener - @param {String} type Type or basically a name of the event to subscribe to - @param {Function} fn Callback function that will be called when event happens - @param {Number} [priority=0] Priority of the event handler - handlers with higher priorities will be called first - @param {Object} [scope=this] A scope to invoke event handler in - */ - addEventListener: function(type, fn, priority, scope) { - var self = this, list; - - // without uid no event handlers can be added, so make sure we got one - if (!this.hasOwnProperty('uid')) { - this.uid = Basic.guid('uid_'); - } - - type = Basic.trim(type); - - if (/\s/.test(type)) { - // multiple event types were passed for one handler - Basic.each(type.split(/\s+/), function(type) { - self.addEventListener(type, fn, priority, scope); - }); - return; - } - - type = type.toLowerCase(); - priority = parseInt(priority, 10) || 0; - - list = eventpool[this.uid] && eventpool[this.uid][type] || []; - list.push({fn : fn, priority : priority, scope : scope || this}); - - if (!eventpool[this.uid]) { - eventpool[this.uid] = {}; - } - eventpool[this.uid][type] = list; - }, - - /** - Check if any handlers were registered to the specified event - - @method hasEventListener - @param {String} [type] Type or basically a name of the event to check - @return {Mixed} Returns a handler if it was found and false, if - not - */ - hasEventListener: function(type) { - var list; - if (type) { - type = type.toLowerCase(); - list = eventpool[this.uid] && eventpool[this.uid][type]; - } else { - list = eventpool[this.uid]; - } - return list ? list : false; - }, - - /** - Unregister the handler from the event, or if former was not specified - unregister all handlers - - @method removeEventListener - @param {String} type Type or basically a name of the event - @param {Function} [fn] Handler to unregister - */ - removeEventListener: function(type, fn) { - var self = this, list, i; - - type = type.toLowerCase(); - - if (/\s/.test(type)) { - // multiple event types were passed for one handler - Basic.each(type.split(/\s+/), function(type) { - self.removeEventListener(type, fn); - }); - return; - } - - list = eventpool[this.uid] && eventpool[this.uid][type]; - - if (list) { - if (fn) { - for (i = list.length - 1; i >= 0; i--) { - if (list[i].fn === fn) { - list.splice(i, 1); - break; - } - } - } else { - list = []; - } - - // delete event list if it has become empty - if (!list.length) { - delete eventpool[this.uid][type]; - - // and object specific entry in a hash if it has no more listeners attached - if (Basic.isEmptyObj(eventpool[this.uid])) { - delete eventpool[this.uid]; - } - } - } - }, - - /** - Remove all event handlers from the object - - @method removeAllEventListeners - */ - removeAllEventListeners: function() { - if (eventpool[this.uid]) { - delete eventpool[this.uid]; - } - }, - - /** - Dispatch the event - - @method dispatchEvent - @param {String/Object} Type of event or event object to dispatch - @param {Mixed} [...] Variable number of arguments to be passed to a handlers - @return {Boolean} true by default and false if any handler returned false - */ - dispatchEvent: function(type) { - var uid, list, args, tmpEvt, evt = {}, result = true, undef; - - if (Basic.typeOf(type) !== 'string') { - // we can't use original object directly (because of Silverlight) - tmpEvt = type; - - if (Basic.typeOf(tmpEvt.type) === 'string') { - type = tmpEvt.type; - - if (tmpEvt.total !== undef && tmpEvt.loaded !== undef) { // progress event - evt.total = tmpEvt.total; - evt.loaded = tmpEvt.loaded; - } - evt.async = tmpEvt.async || false; - } else { - throw new x.EventException(x.EventException.UNSPECIFIED_EVENT_TYPE_ERR); - } - } - - // check if event is meant to be dispatched on an object having specific uid - if (type.indexOf('::') !== -1) { - (function(arr) { - uid = arr[0]; - type = arr[1]; - }(type.split('::'))); - } else { - uid = this.uid; - } - - type = type.toLowerCase(); - - list = eventpool[uid] && eventpool[uid][type]; - - if (list) { - // sort event list by prority - list.sort(function(a, b) { return b.priority - a.priority; }); - - args = [].slice.call(arguments); - - // first argument will be pseudo-event object - args.shift(); - evt.type = type; - args.unshift(evt); - - if (MXI_DEBUG && Env.debug.events) { - Env.log("%cEvent '%s' fired on %s", 'color: #999;', evt.type, (this.ctorName ? this.ctorName + '::' : '') + uid); - } - - // Dispatch event to all listeners - var queue = []; - Basic.each(list, function(handler) { - // explicitly set the target, otherwise events fired from shims do not get it - args[0].target = handler.scope; - // if event is marked as async, detach the handler - if (evt.async) { - queue.push(function(cb) { - setTimeout(function() { - cb(handler.fn.apply(handler.scope, args) === false); - }, 1); - }); - } else { - queue.push(function(cb) { - cb(handler.fn.apply(handler.scope, args) === false); // if handler returns false stop propagation - }); - } - }); - if (queue.length) { - Basic.inSeries(queue, function(err) { - result = !err; - }); - } - } - return result; - }, - - /** - Register a handler to the event type that will run only once - - @method bindOnce - @since >1.4.1 - @param {String} type Type or basically a name of the event to subscribe to - @param {Function} fn Callback function that will be called when event happens - @param {Number} [priority=0] Priority of the event handler - handlers with higher priorities will be called first - @param {Object} [scope=this] A scope to invoke event handler in - */ - bindOnce: function(type, fn, priority, scope) { - var self = this; - self.bind.call(this, type, function cb() { - self.unbind(type, cb); - return fn.apply(this, arguments); - }, priority, scope); - }, - - /** - Alias for addEventListener - - @method bind - @protected - */ - bind: function() { - this.addEventListener.apply(this, arguments); - }, - - /** - Alias for removeEventListener - - @method unbind - @protected - */ - unbind: function() { - this.removeEventListener.apply(this, arguments); - }, - - /** - Alias for removeAllEventListeners - - @method unbindAll - @protected - */ - unbindAll: function() { - this.removeAllEventListeners.apply(this, arguments); - }, - - /** - Alias for dispatchEvent - - @method trigger - @protected - */ - trigger: function() { - return this.dispatchEvent.apply(this, arguments); - }, - - - /** - Handle properties of on[event] type. - - @method handleEventProps - @private - */ - handleEventProps: function(dispatches) { - var self = this; - - this.bind(dispatches.join(' '), function(e) { - var prop = 'on' + e.type.toLowerCase(); - if (Basic.typeOf(this[prop]) === 'function') { - this[prop].apply(this, arguments); - } - }); - - // object must have defined event properties, even if it doesn't make use of them - Basic.each(dispatches, function(prop) { - prop = 'on' + prop.toLowerCase(prop); - if (Basic.typeOf(self[prop]) === 'undefined') { - self[prop] = null; - } - }); - } - - }); - - - EventTarget.instance = new EventTarget(); - - return EventTarget; -}); - -// Included from: src/javascript/runtime/Runtime.js - -/** - * Runtime.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -define('moxie/runtime/Runtime', [ - "moxie/core/utils/Env", - "moxie/core/utils/Basic", - "moxie/core/utils/Dom", - "moxie/core/EventTarget" -], function(Env, Basic, Dom, EventTarget) { - var runtimeConstructors = {}, runtimes = {}; - - /** - Common set of methods and properties for every runtime instance - - @class moxie/runtime/Runtime - - @param {Object} options - @param {String} type Sanitized name of the runtime - @param {Object} [caps] Set of capabilities that differentiate specified runtime - @param {Object} [modeCaps] Set of capabilities that do require specific operational mode - @param {String} [preferredMode='browser'] Preferred operational mode to choose if no required capabilities were requested - */ - function Runtime(options, type, caps, modeCaps, preferredMode) { - /** - Dispatched when runtime is initialized and ready. - Results in RuntimeInit on a connected component. - - @event Init - */ - - /** - Dispatched when runtime fails to initialize. - Results in RuntimeError on a connected component. - - @event Error - */ - - var self = this - , _shim - , _uid = Basic.guid(type + '_') - , defaultMode = preferredMode || 'browser' - ; - - options = options || {}; - - // register runtime in private hash - runtimes[_uid] = this; - - /** - Default set of capabilities, which can be redifined later by specific runtime - - @private - @property caps - @type Object - */ - caps = Basic.extend({ - // Runtime can: - // provide access to raw binary data of the file - access_binary: false, - // provide access to raw binary data of the image (image extension is optional) - access_image_binary: false, - // display binary data as thumbs for example - display_media: false, - // make cross-domain requests - do_cors: false, - // accept files dragged and dropped from the desktop - drag_and_drop: false, - // filter files in selection dialog by their extensions - filter_by_extension: true, - // resize image (and manipulate it raw data of any file in general) - resize_image: false, - // periodically report how many bytes of total in the file were uploaded (loaded) - report_upload_progress: false, - // provide access to the headers of http response - return_response_headers: false, - // support response of specific type, which should be passed as an argument - // e.g. runtime.can('return_response_type', 'blob') - return_response_type: false, - // return http status code of the response - return_status_code: true, - // send custom http header with the request - send_custom_headers: false, - // pick up the files from a dialog - select_file: false, - // select whole folder in file browse dialog - select_folder: false, - // select multiple files at once in file browse dialog - select_multiple: true, - // send raw binary data, that is generated after image resizing or manipulation of other kind - send_binary_string: false, - // send cookies with http request and therefore retain session - send_browser_cookies: true, - // send data formatted as multipart/form-data - send_multipart: true, - // slice the file or blob to smaller parts - slice_blob: false, - // upload file without preloading it to memory, stream it out directly from disk - stream_upload: false, - // programmatically trigger file browse dialog - summon_file_dialog: false, - // upload file of specific size, size should be passed as argument - // e.g. runtime.can('upload_filesize', '500mb') - upload_filesize: true, - // initiate http request with specific http method, method should be passed as argument - // e.g. runtime.can('use_http_method', 'put') - use_http_method: true - }, caps); - - - // default to the mode that is compatible with preferred caps - if (options.preferred_caps) { - defaultMode = Runtime.getMode(modeCaps, options.preferred_caps, defaultMode); - } - - if (MXI_DEBUG && Env.debug.runtime) { - Env.log("\tdefault mode: %s", defaultMode); - } - - // small extension factory here (is meant to be extended with actual extensions constructors) - _shim = (function() { - var objpool = {}; - return { - exec: function(uid, comp, fn, args) { - if (_shim[comp]) { - if (!objpool[uid]) { - objpool[uid] = { - context: this, - instance: new _shim[comp]() - }; - } - if (objpool[uid].instance[fn]) { - return objpool[uid].instance[fn].apply(this, args); - } - } - }, - - removeInstance: function(uid) { - delete objpool[uid]; - }, - - removeAllInstances: function() { - var self = this; - Basic.each(objpool, function(obj, uid) { - if (Basic.typeOf(obj.instance.destroy) === 'function') { - obj.instance.destroy.call(obj.context); - } - self.removeInstance(uid); - }); - } - }; - }()); - - - // public methods - Basic.extend(this, { - /** - Specifies whether runtime instance was initialized or not - - @property initialized - @type {Boolean} - @default false - */ - initialized: false, // shims require this flag to stop initialization retries - - /** - Unique ID of the runtime - - @property uid - @type {String} - */ - uid: _uid, - - /** - Runtime type (e.g. flash, html5, etc) - - @property type - @type {String} - */ - type: type, - - /** - Runtime (not native one) may operate in browser or client mode. - - @property mode - @private - @type {String|Boolean} current mode or false, if none possible - */ - mode: Runtime.getMode(modeCaps, (options.required_caps), defaultMode), - - /** - id of the DOM container for the runtime (if available) - - @property shimid - @type {String} - */ - shimid: _uid + '_container', - - /** - Number of connected clients. If equal to zero, runtime can be destroyed - - @property clients - @type {Number} - */ - clients: 0, - - /** - Runtime initialization options - - @property options - @type {Object} - */ - options: options, - - /** - Checks if the runtime has specific capability - - @method can - @param {String} cap Name of capability to check - @param {Mixed} [value] If passed, capability should somehow correlate to the value - @param {Object} [refCaps] Set of capabilities to check the specified cap against (defaults to internal set) - @return {Boolean} true if runtime has such capability and false, if - not - */ - can: function(cap, value) { - var refCaps = arguments[2] || caps; - - // if cap var is a comma-separated list of caps, convert it to object (key/value) - if (Basic.typeOf(cap) === 'string' && Basic.typeOf(value) === 'undefined') { - cap = Runtime.parseCaps(cap); - } - - if (Basic.typeOf(cap) === 'object') { - for (var key in cap) { - if (!this.can(key, cap[key], refCaps)) { - return false; - } - } - return true; - } - - // check the individual cap - if (Basic.typeOf(refCaps[cap]) === 'function') { - return refCaps[cap].call(this, value); - } else { - return (value === refCaps[cap]); - } - }, - - /** - Returns container for the runtime as DOM element - - @method getShimContainer - @return {DOMElement} - */ - getShimContainer: function() { - var container, shimContainer = Dom.get(this.shimid); - - // if no container for shim, create one - if (!shimContainer) { - container = Dom.get(this.options.container) || document.body; - - // create shim container and insert it at an absolute position into the outer container - shimContainer = document.createElement('div'); - shimContainer.id = this.shimid; - shimContainer.className = 'moxie-shim moxie-shim-' + this.type; - - Basic.extend(shimContainer.style, { - position: 'absolute', - top: '0px', - left: '0px', - width: '1px', - height: '1px', - overflow: 'hidden' - }); - - container.appendChild(shimContainer); - container = null; - } - - return shimContainer; - }, - - /** - Returns runtime as DOM element (if appropriate) - - @method getShim - @return {DOMElement} - */ - getShim: function() { - return _shim; - }, - - /** - Invokes a method within the runtime itself (might differ across the runtimes) - - @method shimExec - @param {Mixed} [] - @protected - @return {Mixed} Depends on the action and component - */ - shimExec: function(component, action) { - var args = [].slice.call(arguments, 2); - return self.getShim().exec.call(this, this.uid, component, action, args); - }, - - /** - Operaional interface that is used by components to invoke specific actions on the runtime - (is invoked in the scope of component) - - @method exec - @param {Mixed} []* - @protected - @return {Mixed} Depends on the action and component - */ - exec: function(component, action) { // this is called in the context of component, not runtime - var args = [].slice.call(arguments, 2); - - if (self[component] && self[component][action]) { - return self[component][action].apply(this, args); - } - return self.shimExec.apply(this, arguments); - }, - - /** - Destroys the runtime (removes all events and deletes DOM structures) - - @method destroy - */ - destroy: function() { - if (!self) { - return; // obviously already destroyed - } - - var shimContainer = Dom.get(this.shimid); - if (shimContainer) { - shimContainer.parentNode.removeChild(shimContainer); - } - - if (_shim) { - _shim.removeAllInstances(); - } - - this.unbindAll(); - delete runtimes[this.uid]; - this.uid = null; // mark this runtime as destroyed - _uid = self = _shim = shimContainer = null; - } - }); - - // once we got the mode, test against all caps - if (this.mode && options.required_caps && !this.can(options.required_caps)) { - this.mode = false; - } - } - - - /** - Default order to try different runtime types - - @property order - @type String - @static - */ - Runtime.order = 'html5,flash,silverlight,html4'; - - - /** - Retrieves runtime from private hash by it's uid - - @method getRuntime - @private - @static - @param {String} uid Unique identifier of the runtime - @return {Runtime|Boolean} Returns runtime, if it exists and false, if - not - */ - Runtime.getRuntime = function(uid) { - return runtimes[uid] ? runtimes[uid] : false; - }; - - - /** - Register constructor for the Runtime of new (or perhaps modified) type - - @method addConstructor - @static - @param {String} type Runtime type (e.g. flash, html5, etc) - @param {Function} construct Constructor for the Runtime type - */ - Runtime.addConstructor = function(type, constructor) { - constructor.prototype = EventTarget.instance; - runtimeConstructors[type] = constructor; - }; - - - /** - Get the constructor for the specified type. - - method getConstructor - @static - @param {String} type Runtime type (e.g. flash, html5, etc) - @return {Function} Constructor for the Runtime type - */ - Runtime.getConstructor = function(type) { - return runtimeConstructors[type] || null; - }; - - - /** - Get info about the runtime (uid, type, capabilities) - - @method getInfo - @static - @param {String} uid Unique identifier of the runtime - @return {Mixed} Info object or null if runtime doesn't exist - */ - Runtime.getInfo = function(uid) { - var runtime = Runtime.getRuntime(uid); - - if (runtime) { - return { - uid: runtime.uid, - type: runtime.type, - mode: runtime.mode, - can: function() { - return runtime.can.apply(runtime, arguments); - } - }; - } - return null; - }; - - - /** - Convert caps represented by a comma-separated string to the object representation. - - @method parseCaps - @static - @param {String} capStr Comma-separated list of capabilities - @return {Object} - */ - Runtime.parseCaps = function(capStr) { - var capObj = {}; - - if (Basic.typeOf(capStr) !== 'string') { - return capStr || {}; - } - - Basic.each(capStr.split(','), function(key) { - capObj[key] = true; // we assume it to be - true - }); - - return capObj; - }; - - /** - Test the specified runtime for specific capabilities. - - @method can - @static - @param {String} type Runtime type (e.g. flash, html5, etc) - @param {String|Object} caps Set of capabilities to check - @return {Boolean} Result of the test - */ - Runtime.can = function(type, caps) { - var runtime - , constructor = Runtime.getConstructor(type) - , mode - ; - if (constructor) { - runtime = new constructor({ - required_caps: caps - }); - mode = runtime.mode; - runtime.destroy(); - return !!mode; - } - return false; - }; - - - /** - Figure out a runtime that supports specified capabilities. - - @method thatCan - @static - @param {String|Object} caps Set of capabilities to check - @param {String} [runtimeOrder] Comma-separated list of runtimes to check against - @return {String} Usable runtime identifier or null - */ - Runtime.thatCan = function(caps, runtimeOrder) { - var types = (runtimeOrder || Runtime.order).split(/\s*,\s*/); - for (var i in types) { - if (Runtime.can(types[i], caps)) { - return types[i]; - } - } - return null; - }; - - - /** - Figure out an operational mode for the specified set of capabilities. - - @method getMode - @static - @param {Object} modeCaps Set of capabilities that depend on particular runtime mode - @param {Object} [requiredCaps] Supplied set of capabilities to find operational mode for - @param {String|Boolean} [defaultMode='browser'] Default mode to use - @return {String|Boolean} Compatible operational mode - */ - Runtime.getMode = function(modeCaps, requiredCaps, defaultMode) { - var mode = null; - - if (Basic.typeOf(defaultMode) === 'undefined') { // only if not specified - defaultMode = 'browser'; - } - - if (requiredCaps && !Basic.isEmptyObj(modeCaps)) { - // loop over required caps and check if they do require the same mode - Basic.each(requiredCaps, function(value, cap) { - if (modeCaps.hasOwnProperty(cap)) { - var capMode = modeCaps[cap](value); - - // make sure we always have an array - if (typeof(capMode) === 'string') { - capMode = [capMode]; - } - - if (!mode) { - mode = capMode; - } else if (!(mode = Basic.arrayIntersect(mode, capMode))) { - // if cap requires conflicting mode - runtime cannot fulfill required caps - - if (MXI_DEBUG && Env.debug.runtime) { - Env.log("\t\t%s: %s (conflicting mode requested: %s)", cap, value, capMode); - } - - return (mode = false); - } - } - - if (MXI_DEBUG && Env.debug.runtime) { - Env.log("\t\t%s: %s (compatible modes: %s)", cap, value, mode); - } - }); - - if (mode) { - return Basic.inArray(defaultMode, mode) !== -1 ? defaultMode : mode[0]; - } else if (mode === false) { - return false; - } - } - return defaultMode; - }; - - - /** - * Third party shims (Flash and Silverlight) require global event target against which they - * will fire their events. However when moxie is not loaded to global namespace, default - * event target is not accessible and we have to create artificial ones. - * - * @method getGlobalEventTarget - * @static - * @return {String} Name of the global event target - */ - Runtime.getGlobalEventTarget = function() { - if (/^moxie\./.test(Env.global_event_dispatcher) && !Env.can('access_global_ns')) { - var uniqueCallbackName = Basic.guid('moxie_event_target_'); - - window[uniqueCallbackName] = function(e, data) { - EventTarget.instance.dispatchEvent(e, data); - }; - - Env.global_event_dispatcher = uniqueCallbackName; - } - - return Env.global_event_dispatcher; - }; - - - /** - Capability check that always returns true - - @private - @static - @return {True} - */ - Runtime.capTrue = function() { - return true; - }; - - /** - Capability check that always returns false - - @private - @static - @return {False} - */ - Runtime.capFalse = function() { - return false; - }; - - /** - Evaluate the expression to boolean value and create a function that always returns it. - - @private - @static - @param {Mixed} expr Expression to evaluate - @return {Function} Function returning the result of evaluation - */ - Runtime.capTest = function(expr) { - return function() { - return !!expr; - }; - }; - - return Runtime; -}); - -// Included from: src/javascript/runtime/RuntimeClient.js - -/** - * RuntimeClient.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -define('moxie/runtime/RuntimeClient', [ - 'moxie/core/utils/Env', - 'moxie/core/Exceptions', - 'moxie/core/utils/Basic', - 'moxie/runtime/Runtime' -], function(Env, x, Basic, Runtime) { - /** - Set of methods and properties, required by a component to acquire ability to connect to a runtime - - @class moxie/runtime/RuntimeClient - */ - return function RuntimeClient() { - var runtime; - - Basic.extend(this, { - /** - Connects to the runtime specified by the options. Will either connect to existing runtime or create a new one. - Increments number of clients connected to the specified runtime. - - @private - @method connectRuntime - @param {Mixed} options Can be a runtme uid or a set of key-value pairs defining requirements and pre-requisites - */ - connectRuntime: function(options) { - var comp = this, ruid; - - function initialize(items) { - var type, constructor; - - // if we ran out of runtimes - if (!items.length) { - comp.trigger('RuntimeError', new x.RuntimeError(x.RuntimeError.NOT_INIT_ERR)); - runtime = null; - return; - } - - type = items.shift().toLowerCase(); - constructor = Runtime.getConstructor(type); - if (!constructor) { - if (MXI_DEBUG && Env.debug.runtime) { - Env.log("Constructor for '%s' runtime is not available.", type); - } - initialize(items); - return; - } - - if (MXI_DEBUG && Env.debug.runtime) { - Env.log("Trying runtime: %s", type); - Env.log(options); - } - - // try initializing the runtime - runtime = new constructor(options); - - runtime.bind('Init', function() { - // mark runtime as initialized - runtime.initialized = true; - - if (MXI_DEBUG && Env.debug.runtime) { - Env.log("Runtime '%s' initialized", runtime.type); - } - - // jailbreak ... - setTimeout(function() { - runtime.clients++; - comp.ruid = runtime.uid; - // this will be triggered on component - comp.trigger('RuntimeInit', runtime); - }, 1); - }); - - runtime.bind('Error', function() { - if (MXI_DEBUG && Env.debug.runtime) { - Env.log("Runtime '%s' failed to initialize", runtime.type); - } - - runtime.destroy(); // runtime cannot destroy itself from inside at a right moment, thus we do it here - initialize(items); - }); - - runtime.bind('Exception', function(e, err) { - var message = err.name + "(#" + err.code + ")" + (err.message ? ", from: " + err.message : ''); - - if (MXI_DEBUG && Env.debug.runtime) { - Env.log("Runtime '%s' has thrown an exception: %s", this.type, message); - } - comp.trigger('RuntimeError', new x.RuntimeError(x.RuntimeError.EXCEPTION_ERR, message)); - }); - - if (MXI_DEBUG && Env.debug.runtime) { - Env.log("\tselected mode: %s", runtime.mode); - } - - // check if runtime managed to pick-up operational mode - if (!runtime.mode) { - runtime.trigger('Error'); - return; - } - - runtime.init(); - } - - // check if a particular runtime was requested - if (Basic.typeOf(options) === 'string') { - ruid = options; - } else if (Basic.typeOf(options.ruid) === 'string') { - ruid = options.ruid; - } - - if (ruid) { - runtime = Runtime.getRuntime(ruid); - if (runtime) { - comp.ruid = ruid; - runtime.clients++; - return runtime; - } else { - // there should be a runtime and there's none - weird case - throw new x.RuntimeError(x.RuntimeError.NOT_INIT_ERR); - } - } - - // initialize a fresh one, that fits runtime list and required features best - initialize((options.runtime_order || Runtime.order).split(/\s*,\s*/)); - }, - - - /** - Disconnects from the runtime. Decrements number of clients connected to the specified runtime. - - @private - @method disconnectRuntime - */ - disconnectRuntime: function() { - if (runtime && --runtime.clients <= 0) { - runtime.destroy(); - } - - // once the component is disconnected, it shouldn't have access to the runtime - runtime = null; - }, - - - /** - Returns the runtime to which the client is currently connected. - - @method getRuntime - @return {Runtime} Runtime or null if client is not connected - */ - getRuntime: function() { - if (runtime && runtime.uid) { - return runtime; - } - return runtime = null; // make sure we do not leave zombies rambling around - }, - - - /** - Handy shortcut to safely invoke runtime extension methods. - - @private - @method exec - @return {Mixed} Whatever runtime extension method returns - */ - exec: function() { - return runtime ? runtime.exec.apply(this, arguments) : null; - }, - - - /** - Test runtime client for specific capability - - @method can - @param {String} cap - @return {Bool} - */ - can: function(cap) { - return runtime ? runtime.can(cap) : false; - } - - }); - }; - - -}); - -// Included from: src/javascript/file/Blob.js - -/** - * Blob.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -define('moxie/file/Blob', [ - 'moxie/core/utils/Basic', - 'moxie/core/utils/Encode', - 'moxie/runtime/RuntimeClient' -], function(Basic, Encode, RuntimeClient) { - - var blobpool = {}; - - /** - @class moxie/file/Blob - @constructor - @param {String} ruid Unique id of the runtime, to which this blob belongs to - @param {Object} blob Object "Native" blob object, as it is represented in the runtime - */ - function Blob(ruid, blob) { - - function _sliceDetached(start, end, type) { - var blob, data = blobpool[this.uid]; - - if (Basic.typeOf(data) !== 'string' || !data.length) { - return null; // or throw exception - } - - blob = new Blob(null, { - type: type, - size: end - start - }); - blob.detach(data.substr(start, blob.size)); - - return blob; - } - - RuntimeClient.call(this); - - if (ruid) { - this.connectRuntime(ruid); - } - - if (!blob) { - blob = {}; - } else if (Basic.typeOf(blob) === 'string') { // dataUrl or binary string - blob = { data: blob }; - } - - Basic.extend(this, { - - /** - Unique id of the component - - @property uid - @type {String} - */ - uid: blob.uid || Basic.guid('uid_'), - - /** - Unique id of the connected runtime, if falsy, then runtime will have to be initialized - before this Blob can be used, modified or sent - - @property ruid - @type {String} - */ - ruid: ruid, - - /** - Size of blob - - @property size - @type {Number} - @default 0 - */ - size: blob.size || 0, - - /** - Mime type of blob - - @property type - @type {String} - @default '' - */ - type: blob.type || '', - - /** - @method slice - @param {Number} [start=0] - */ - slice: function(start, end, type) { - if (this.isDetached()) { - return _sliceDetached.apply(this, arguments); - } - return this.getRuntime().exec.call(this, 'Blob', 'slice', this.getSource(), start, end, type); - }, - - /** - Returns "native" blob object (as it is represented in connected runtime) or null if not found - - @method getSource - @return {Blob} Returns "native" blob object or null if not found - */ - getSource: function() { - if (!blobpool[this.uid]) { - return null; - } - return blobpool[this.uid]; - }, - - /** - Detaches blob from any runtime that it depends on and initialize with standalone value - - @method detach - @protected - @param {DOMString} [data=''] Standalone value - */ - detach: function(data) { - if (this.ruid) { - this.getRuntime().exec.call(this, 'Blob', 'destroy'); - this.disconnectRuntime(); - this.ruid = null; - } - - data = data || ''; - - // if dataUrl, convert to binary string - if (data.substr(0, 5) == 'data:') { - var base64Offset = data.indexOf(';base64,'); - this.type = data.substring(5, base64Offset); - data = Encode.atob(data.substring(base64Offset + 8)); - } - - this.size = data.length; - - blobpool[this.uid] = data; - }, - - /** - Checks if blob is standalone (detached of any runtime) - - @method isDetached - @protected - @return {Boolean} - */ - isDetached: function() { - return !this.ruid && Basic.typeOf(blobpool[this.uid]) === 'string'; - }, - - /** - Destroy Blob and free any resources it was using - - @method destroy - */ - destroy: function() { - this.detach(); - delete blobpool[this.uid]; - } - }); - - - if (blob.data) { - this.detach(blob.data); // auto-detach if payload has been passed - } else { - blobpool[this.uid] = blob; - } - } - - return Blob; -}); - -// Included from: src/javascript/core/I18n.js - -/** - * I18n.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -define("moxie/core/I18n", [ - "moxie/core/utils/Basic" -], function(Basic) { - var i18n = {}; - - /** - @class moxie/core/I18n - */ - return { - /** - * Extends the language pack object with new items. - * - * @param {Object} pack Language pack items to add. - * @return {Object} Extended language pack object. - */ - addI18n: function(pack) { - return Basic.extend(i18n, pack); - }, - - /** - * Translates the specified string by checking for the english string in the language pack lookup. - * - * @param {String} str String to look for. - * @return {String} Translated string or the input string if it wasn't found. - */ - translate: function(str) { - return i18n[str] || str; - }, - - /** - * Shortcut for translate function - * - * @param {String} str String to look for. - * @return {String} Translated string or the input string if it wasn't found. - */ - _: function(str) { - return this.translate(str); - }, - - /** - * Pseudo sprintf implementation - simple way to replace tokens with specified values. - * - * @param {String} str String with tokens - * @return {String} String with replaced tokens - */ - sprintf: function(str) { - var args = [].slice.call(arguments, 1); - - return str.replace(/%[a-z]/g, function() { - var value = args.shift(); - return Basic.typeOf(value) !== 'undefined' ? value : ''; - }); - } - }; -}); - -// Included from: src/javascript/core/utils/Mime.js - -/** - * Mime.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/core/utils/Mime -@public -@static -*/ - -define("moxie/core/utils/Mime", [ - "moxie/core/utils/Basic", - "moxie/core/I18n" -], function(Basic, I18n) { - - var mimeData = "" + - "application/msword,doc dot," + - "application/pdf,pdf," + - "application/pgp-signature,pgp," + - "application/postscript,ps ai eps," + - "application/rtf,rtf," + - "application/vnd.ms-excel,xls xlb xlt xla," + - "application/vnd.ms-powerpoint,ppt pps pot ppa," + - "application/zip,zip," + - "application/x-shockwave-flash,swf swfl," + - "application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx," + - "application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx," + - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx," + - "application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx," + - "application/vnd.openxmlformats-officedocument.presentationml.template,potx," + - "application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx," + - "application/x-javascript,js," + - "application/json,json," + - "audio/mpeg,mp3 mpga mpega mp2," + - "audio/x-wav,wav," + - "audio/x-m4a,m4a," + - "audio/ogg,oga ogg," + - "audio/aiff,aiff aif," + - "audio/flac,flac," + - "audio/aac,aac," + - "audio/ac3,ac3," + - "audio/x-ms-wma,wma," + - "image/bmp,bmp," + - "image/gif,gif," + - "image/jpeg,jpg jpeg jpe," + - "image/photoshop,psd," + - "image/png,png," + - "image/svg+xml,svg svgz," + - "image/tiff,tiff tif," + - "text/plain,asc txt text diff log," + - "text/html,htm html xhtml," + - "text/css,css," + - "text/csv,csv," + - "text/rtf,rtf," + - "video/mpeg,mpeg mpg mpe m2v," + - "video/quicktime,qt mov," + - "video/mp4,mp4," + - "video/x-m4v,m4v," + - "video/x-flv,flv," + - "video/x-ms-wmv,wmv," + - "video/avi,avi," + - "video/webm,webm," + - "video/3gpp,3gpp 3gp," + - "video/3gpp2,3g2," + - "video/vnd.rn-realvideo,rv," + - "video/ogg,ogv," + - "video/x-matroska,mkv," + - "application/vnd.oasis.opendocument.formula-template,otf," + - "application/octet-stream,exe"; - - - /** - * Map of mimes to extensions - * - * @property mimes - * @type {Object} - */ - var mimes = {}; - - /** - * Map of extensions to mimes - * - * @property extensions - * @type {Object} - */ - var extensions = {}; - - - /** - * Parses mimeData string into a mimes and extensions lookup maps. String should have the - * following format: - * - * application/msword,doc dot,application/pdf,pdf, ... - * - * so mime-type followed by comma and followed by space-separated list of associated extensions, - * then comma again and then another mime-type, etc. - * - * If invoked externally will replace override internal lookup maps with user-provided data. - * - * @method addMimeType - * @param {String} mimeData - */ - var addMimeType = function (mimeData) { - var items = mimeData.split(/,/), i, ii, ext; - - for (i = 0; i < items.length; i += 2) { - ext = items[i + 1].split(/ /); - - // extension to mime lookup - for (ii = 0; ii < ext.length; ii++) { - mimes[ext[ii]] = items[i]; - } - // mime to extension lookup - extensions[items[i]] = ext; - } - }; - - - var extList2mimes = function (filters, addMissingExtensions) { - var ext, i, ii, type, mimes = []; - - // convert extensions to mime types list - for (i = 0; i < filters.length; i++) { - ext = filters[i].extensions.toLowerCase().split(/\s*,\s*/); - - for (ii = 0; ii < ext.length; ii++) { - - // if there's an asterisk in the list, then accept attribute is not required - if (ext[ii] === '*') { - return []; - } - - type = mimes[ext[ii]]; - - // future browsers should filter by extension, finally - if (addMissingExtensions && /^\w+$/.test(ext[ii])) { - mimes.push('.' + ext[ii]); - } else if (type && Basic.inArray(type, mimes) === -1) { - mimes.push(type); - } else if (!type) { - // if we have no type in our map, then accept all - return []; - } - } - } - return mimes; - }; - - - var mimes2exts = function(mimes) { - var exts = []; - - Basic.each(mimes, function(mime) { - mime = mime.toLowerCase(); - - if (mime === '*') { - exts = []; - return false; - } - - // check if this thing looks like mime type - var m = mime.match(/^(\w+)\/(\*|\w+)$/); - if (m) { - if (m[2] === '*') { - // wildcard mime type detected - Basic.each(extensions, function(arr, mime) { - if ((new RegExp('^' + m[1] + '/')).test(mime)) { - [].push.apply(exts, extensions[mime]); - } - }); - } else if (extensions[mime]) { - [].push.apply(exts, extensions[mime]); - } - } - }); - return exts; - }; - - - var mimes2extList = function(mimes) { - var accept = [], exts = []; - - if (Basic.typeOf(mimes) === 'string') { - mimes = Basic.trim(mimes).split(/\s*,\s*/); - } - - exts = mimes2exts(mimes); - - accept.push({ - title: I18n.translate('Files'), - extensions: exts.length ? exts.join(',') : '*' - }); - - return accept; - }; - - /** - * Extract extension from the given filename - * - * @method getFileExtension - * @param {String} fileName - * @return {String} File extension - */ - var getFileExtension = function(fileName) { - var matches = fileName && fileName.match(/\.([^.]+)$/); - if (matches) { - return matches[1].toLowerCase(); - } - return ''; - }; - - - /** - * Get file mime-type from it's filename - will try to match the extension - * against internal mime-type lookup map - * - * @method getFileMime - * @param {String} fileName - * @return File mime-type if found or an empty string if not - */ - var getFileMime = function(fileName) { - return mimes[getFileExtension(fileName)] || ''; - }; - - - addMimeType(mimeData); - - return { - mimes: mimes, - extensions: extensions, - addMimeType: addMimeType, - extList2mimes: extList2mimes, - mimes2exts: mimes2exts, - mimes2extList: mimes2extList, - getFileExtension: getFileExtension, - getFileMime: getFileMime - } -}); - -// Included from: src/javascript/file/FileInput.js - -/** - * FileInput.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -define('moxie/file/FileInput', [ - 'moxie/core/utils/Basic', - 'moxie/core/utils/Env', - 'moxie/core/utils/Mime', - 'moxie/core/utils/Dom', - 'moxie/core/Exceptions', - 'moxie/core/EventTarget', - 'moxie/core/I18n', - 'moxie/runtime/Runtime', - 'moxie/runtime/RuntimeClient' -], function(Basic, Env, Mime, Dom, x, EventTarget, I18n, Runtime, RuntimeClient) { - /** - Provides a convenient way to create cross-browser file-picker. Generates file selection dialog on click, - converts selected files to _File_ objects, to be used in conjunction with _Image_, preloaded in memory - with _FileReader_ or uploaded to a server through _XMLHttpRequest_. - - @class moxie/file/FileInput - @constructor - @extends EventTarget - @uses RuntimeClient - @param {Object|String|DOMElement} options If options is string or node, argument is considered as _browse\_button_. - @param {String|DOMElement} options.browse_button DOM Element to turn into file picker. - @param {Array} [options.accept] Array of mime types to accept. By default accepts all. - @param {Boolean} [options.multiple=false] Enable selection of multiple files. - @param {Boolean} [options.directory=false] Turn file input into the folder input (cannot be both at the same time). - @param {String|DOMElement} [options.container] DOM Element to use as a container for file-picker. Defaults to parentNode - for _browse\_button_. - @param {Object|String} [options.required_caps] Set of required capabilities, that chosen runtime must support. - - @example -
- Browse... -
- - - */ - var dispatches = [ - /** - Dispatched when runtime is connected and file-picker is ready to be used. - - @event ready - @param {Object} event - */ - 'ready', - - /** - Dispatched right after [ready](#event_ready) event, and whenever [refresh()](#method_refresh) is invoked. - Check [corresponding documentation entry](#method_refresh) for more info. - - @event refresh - @param {Object} event - */ - - /** - Dispatched when selection of files in the dialog is complete. - - @event change - @param {Object} event - */ - 'change', - - 'cancel', // TODO: might be useful - - /** - Dispatched when mouse cursor enters file-picker area. Can be used to style element - accordingly. - - @event mouseenter - @param {Object} event - */ - 'mouseenter', - - /** - Dispatched when mouse cursor leaves file-picker area. Can be used to style element - accordingly. - - @event mouseleave - @param {Object} event - */ - 'mouseleave', - - /** - Dispatched when functional mouse button is pressed on top of file-picker area. - - @event mousedown - @param {Object} event - */ - 'mousedown', - - /** - Dispatched when functional mouse button is released on top of file-picker area. - - @event mouseup - @param {Object} event - */ - 'mouseup' - ]; - - function FileInput(options) { - if (MXI_DEBUG) { - Env.log("Instantiating FileInput..."); - } - - var container, browseButton, defaults; - - // if flat argument passed it should be browse_button id - if (Basic.inArray(Basic.typeOf(options), ['string', 'node']) !== -1) { - options = { browse_button : options }; - } - - // this will help us to find proper default container - browseButton = Dom.get(options.browse_button); - if (!browseButton) { - // browse button is required - throw new x.DOMException(x.DOMException.NOT_FOUND_ERR); - } - - // figure out the options - defaults = { - accept: [{ - title: I18n.translate('All Files'), - extensions: '*' - }], - multiple: false, - required_caps: false, - container: browseButton.parentNode || document.body - }; - - options = Basic.extend({}, defaults, options); - - // convert to object representation - if (typeof(options.required_caps) === 'string') { - options.required_caps = Runtime.parseCaps(options.required_caps); - } - - // normalize accept option (could be list of mime types or array of title/extensions pairs) - if (typeof(options.accept) === 'string') { - options.accept = Mime.mimes2extList(options.accept); - } - - container = Dom.get(options.container); - // make sure we have container - if (!container) { - container = document.body; - } - - // make container relative, if it's not - if (Dom.getStyle(container, 'position') === 'static') { - container.style.position = 'relative'; - } - - container = browseButton = null; // IE - - RuntimeClient.call(this); - - Basic.extend(this, { - /** - Unique id of the component - - @property uid - @protected - @readOnly - @type {String} - @default UID - */ - uid: Basic.guid('uid_'), - - /** - Unique id of the connected runtime, if any. - - @property ruid - @protected - @type {String} - */ - ruid: null, - - /** - Unique id of the runtime container. Useful to get hold of it for various manipulations. - - @property shimid - @protected - @type {String} - */ - shimid: null, - - /** - Array of selected moxie.file.File objects - - @property files - @type {Array} - @default null - */ - files: null, - - /** - Initializes the file-picker, connects it to runtime and dispatches event ready when done. - - @method init - */ - init: function() { - var self = this; - - self.bind('RuntimeInit', function(e, runtime) { - self.ruid = runtime.uid; - self.shimid = runtime.shimid; - - self.bind("Ready", function() { - self.trigger("Refresh"); - }, 999); - - // re-position and resize shim container - self.bind('Refresh', function() { - var pos, size, browseButton, shimContainer, zIndex; - - browseButton = Dom.get(options.browse_button); - shimContainer = Dom.get(runtime.shimid); // do not use runtime.getShimContainer(), since it will create container if it doesn't exist - - if (browseButton) { - pos = Dom.getPos(browseButton, Dom.get(options.container)); - size = Dom.getSize(browseButton); - zIndex = parseInt(Dom.getStyle(browseButton, 'z-index'), 10) || 0; - - if (shimContainer) { - Basic.extend(shimContainer.style, { - top: pos.y + 'px', - left: pos.x + 'px', - width: size.w + 'px', - height: size.h + 'px', - zIndex: zIndex + 1 - }); - } - } - shimContainer = browseButton = null; - }); - - runtime.exec.call(self, 'FileInput', 'init', options); - }); - - // runtime needs: options.required_features, options.runtime_order and options.container - self.connectRuntime(Basic.extend({}, options, { - required_caps: { - select_file: true - } - })); - }, - - - /** - * Get current option value by its name - * - * @method getOption - * @param name - * @return {Mixed} - */ - getOption: function(name) { - return options[name]; - }, - - - /** - * Sets a new value for the option specified by name - * - * @method setOption - * @param name - * @param value - */ - setOption: function(name, value) { - if (!options.hasOwnProperty(name)) { - return; - } - - var oldValue = options[name]; - - switch (name) { - case 'accept': - if (typeof(value) === 'string') { - value = Mime.mimes2extList(value); - } - break; - - case 'container': - case 'required_caps': - throw new x.FileException(x.FileException.NO_MODIFICATION_ALLOWED_ERR); - } - - options[name] = value; - this.exec('FileInput', 'setOption', name, value); - - this.trigger('OptionChanged', name, value, oldValue); - }, - - /** - Disables file-picker element, so that it doesn't react to mouse clicks. - - @method disable - @param {Boolean} [state=true] Disable component if - true, enable if - false - */ - disable: function(state) { - var runtime = this.getRuntime(); - if (runtime) { - this.exec('FileInput', 'disable', Basic.typeOf(state) === 'undefined' ? true : state); - } - }, - - - /** - Reposition and resize dialog trigger to match the position and size of browse_button element. - - @method refresh - */ - refresh: function() { - this.trigger("Refresh"); - }, - - - /** - Destroy component. - - @method destroy - */ - destroy: function() { - var runtime = this.getRuntime(); - if (runtime) { - runtime.exec.call(this, 'FileInput', 'destroy'); - this.disconnectRuntime(); - } - - if (Basic.typeOf(this.files) === 'array') { - // no sense in leaving associated files behind - Basic.each(this.files, function(file) { - file.destroy(); - }); - } - this.files = null; - - this.unbindAll(); - } - }); - - this.handleEventProps(dispatches); - } - - FileInput.prototype = EventTarget.instance; - - return FileInput; -}); - -// Included from: src/javascript/file/File.js - -/** - * File.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -define('moxie/file/File', [ - 'moxie/core/utils/Basic', - 'moxie/core/utils/Mime', - 'moxie/file/Blob' -], function(Basic, Mime, Blob) { - /** - @class moxie/file/File - @extends Blob - @constructor - @param {String} ruid Unique id of the runtime, to which this blob belongs to - @param {Object} file Object "Native" file object, as it is represented in the runtime - */ - function File(ruid, file) { - if (!file) { // avoid extra errors in case we overlooked something - file = {}; - } - - Blob.apply(this, arguments); - - if (!this.type) { - this.type = Mime.getFileMime(file.name); - } - - // sanitize file name or generate new one - var name; - if (file.name) { - name = file.name.replace(/\\/g, '/'); - name = name.substr(name.lastIndexOf('/') + 1); - } else if (this.type) { - var prefix = this.type.split('/')[0]; - name = Basic.guid((prefix !== '' ? prefix : 'file') + '_'); - - if (Mime.extensions[this.type]) { - name += '.' + Mime.extensions[this.type][0]; // append proper extension if possible - } - } - - - Basic.extend(this, { - /** - File name - - @property name - @type {String} - @default UID - */ - name: name || Basic.guid('file_'), - - /** - Relative path to the file inside a directory - - @property relativePath - @type {String} - @default '' - */ - relativePath: '', - - /** - Date of last modification - - @property lastModifiedDate - @type {String} - @default now - */ - lastModifiedDate: file.lastModifiedDate || (new Date()).toLocaleString() // Thu Aug 23 2012 19:40:00 GMT+0400 (GET) - }); - } - - File.prototype = Blob.prototype; - - return File; -}); - -// Included from: src/javascript/file/FileDrop.js - -/** - * FileDrop.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -define('moxie/file/FileDrop', [ - 'moxie/core/I18n', - 'moxie/core/utils/Dom', - 'moxie/core/Exceptions', - 'moxie/core/utils/Basic', - 'moxie/core/utils/Env', - 'moxie/file/File', - 'moxie/runtime/RuntimeClient', - 'moxie/core/EventTarget', - 'moxie/core/utils/Mime' -], function(I18n, Dom, x, Basic, Env, File, RuntimeClient, EventTarget, Mime) { - /** - Turn arbitrary DOM element to a drop zone accepting files. Converts selected files to _File_ objects, to be used - in conjunction with _Image_, preloaded in memory with _FileReader_ or uploaded to a server through - _XMLHttpRequest_. - - @example -
- Drop files here -
-
-
- - - - @class moxie/file/FileDrop - @constructor - @extends EventTarget - @uses RuntimeClient - @param {Object|String} options If options has typeof string, argument is considered as options.drop_zone - @param {String|DOMElement} options.drop_zone DOM Element to turn into a drop zone - @param {Array} [options.accept] Array of mime types to accept. By default accepts all - @param {Object|String} [options.required_caps] Set of required capabilities, that chosen runtime must support - */ - var dispatches = [ - /** - Dispatched when runtime is connected and drop zone is ready to accept files. - - @event ready - @param {Object} event - */ - 'ready', - - /** - Dispatched when dragging cursor enters the drop zone. - - @event dragenter - @param {Object} event - */ - 'dragenter', - - /** - Dispatched when dragging cursor leaves the drop zone. - - @event dragleave - @param {Object} event - */ - 'dragleave', - - /** - Dispatched when file is dropped onto the drop zone. - - @event drop - @param {Object} event - */ - 'drop', - - /** - Dispatched if error occurs. - - @event error - @param {Object} event - */ - 'error' - ]; - - function FileDrop(options) { - if (MXI_DEBUG) { - Env.log("Instantiating FileDrop..."); - } - - var self = this, defaults; - - // if flat argument passed it should be drop_zone id - if (typeof(options) === 'string') { - options = { drop_zone : options }; - } - - // figure out the options - defaults = { - accept: [{ - title: I18n.translate('All Files'), - extensions: '*' - }], - required_caps: { - drag_and_drop: true - } - }; - - options = typeof(options) === 'object' ? Basic.extend({}, defaults, options) : defaults; - - // this will help us to find proper default container - options.container = Dom.get(options.drop_zone) || document.body; - - // make container relative, if it is not - if (Dom.getStyle(options.container, 'position') === 'static') { - options.container.style.position = 'relative'; - } - - // normalize accept option (could be list of mime types or array of title/extensions pairs) - if (typeof(options.accept) === 'string') { - options.accept = Mime.mimes2extList(options.accept); - } - - RuntimeClient.call(self); - - Basic.extend(self, { - uid: Basic.guid('uid_'), - - ruid: null, - - files: null, - - init: function() { - self.bind('RuntimeInit', function(e, runtime) { - self.ruid = runtime.uid; - runtime.exec.call(self, 'FileDrop', 'init', options); - self.dispatchEvent('ready'); - }); - - // runtime needs: options.required_features, options.runtime_order and options.container - self.connectRuntime(options); // throws RuntimeError - }, - - destroy: function() { - var runtime = this.getRuntime(); - if (runtime) { - runtime.exec.call(this, 'FileDrop', 'destroy'); - this.disconnectRuntime(); - } - this.files = null; - - this.unbindAll(); - } - }); - - this.handleEventProps(dispatches); - } - - FileDrop.prototype = EventTarget.instance; - - return FileDrop; -}); - -// Included from: src/javascript/file/FileReader.js - -/** - * FileReader.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -define('moxie/file/FileReader', [ - 'moxie/core/utils/Basic', - 'moxie/core/utils/Encode', - 'moxie/core/Exceptions', - 'moxie/core/EventTarget', - 'moxie/file/Blob', - 'moxie/runtime/RuntimeClient' -], function(Basic, Encode, x, EventTarget, Blob, RuntimeClient) { - /** - Utility for preloading o.Blob/o.File objects in memory. By design closely follows [W3C FileReader](http://www.w3.org/TR/FileAPI/#dfn-filereader) - interface. Where possible uses native FileReader, where - not falls back to shims. - - @class moxie/file/FileReader - @constructor FileReader - @extends EventTarget - @uses RuntimeClient - */ - var dispatches = [ - - /** - Dispatched when the read starts. - - @event loadstart - @param {Object} event - */ - 'loadstart', - - /** - Dispatched while reading (and decoding) blob, and reporting partial Blob data (progess.loaded/progress.total). - - @event progress - @param {Object} event - */ - 'progress', - - /** - Dispatched when the read has successfully completed. - - @event load - @param {Object} event - */ - 'load', - - /** - Dispatched when the read has been aborted. For instance, by invoking the abort() method. - - @event abort - @param {Object} event - */ - 'abort', - - /** - Dispatched when the read has failed. - - @event error - @param {Object} event - */ - 'error', - - /** - Dispatched when the request has completed (either in success or failure). - - @event loadend - @param {Object} event - */ - 'loadend' - ]; - - function FileReader() { - - RuntimeClient.call(this); - - Basic.extend(this, { - /** - UID of the component instance. - - @property uid - @type {String} - */ - uid: Basic.guid('uid_'), - - /** - Contains current state of FileReader object. Can take values of FileReader.EMPTY, FileReader.LOADING - and FileReader.DONE. - - @property readyState - @type {Number} - @default FileReader.EMPTY - */ - readyState: FileReader.EMPTY, - - /** - Result of the successful read operation. - - @property result - @type {String} - */ - result: null, - - /** - Stores the error of failed asynchronous read operation. - - @property error - @type {DOMError} - */ - error: null, - - /** - Initiates reading of File/Blob object contents to binary string. - - @method readAsBinaryString - @param {Blob|File} blob Object to preload - */ - readAsBinaryString: function(blob) { - _read.call(this, 'readAsBinaryString', blob); - }, - - /** - Initiates reading of File/Blob object contents to dataURL string. - - @method readAsDataURL - @param {Blob|File} blob Object to preload - */ - readAsDataURL: function(blob) { - _read.call(this, 'readAsDataURL', blob); - }, - - /** - Initiates reading of File/Blob object contents to string. - - @method readAsText - @param {Blob|File} blob Object to preload - */ - readAsText: function(blob) { - _read.call(this, 'readAsText', blob); - }, - - /** - Aborts preloading process. - - @method abort - */ - abort: function() { - this.result = null; - - if (Basic.inArray(this.readyState, [FileReader.EMPTY, FileReader.DONE]) !== -1) { - return; - } else if (this.readyState === FileReader.LOADING) { - this.readyState = FileReader.DONE; - } - - this.exec('FileReader', 'abort'); - - this.trigger('abort'); - this.trigger('loadend'); - }, - - /** - Destroy component and release resources. - - @method destroy - */ - destroy: function() { - this.abort(); - this.exec('FileReader', 'destroy'); - this.disconnectRuntime(); - this.unbindAll(); - } - }); - - // uid must already be assigned - this.handleEventProps(dispatches); - - this.bind('Error', function(e, err) { - this.readyState = FileReader.DONE; - this.error = err; - }, 999); - - this.bind('Load', function(e) { - this.readyState = FileReader.DONE; - }, 999); - - - function _read(op, blob) { - var self = this; - - this.trigger('loadstart'); - - if (this.readyState === FileReader.LOADING) { - this.trigger('error', new x.DOMException(x.DOMException.INVALID_STATE_ERR)); - this.trigger('loadend'); - return; - } - - // if source is not o.Blob/o.File - if (!(blob instanceof Blob)) { - this.trigger('error', new x.DOMException(x.DOMException.NOT_FOUND_ERR)); - this.trigger('loadend'); - return; - } - - this.result = null; - this.readyState = FileReader.LOADING; - - if (blob.isDetached()) { - var src = blob.getSource(); - switch (op) { - case 'readAsText': - case 'readAsBinaryString': - this.result = src; - break; - case 'readAsDataURL': - this.result = 'data:' + blob.type + ';base64,' + Encode.btoa(src); - break; - } - this.readyState = FileReader.DONE; - this.trigger('load'); - this.trigger('loadend'); - } else { - this.connectRuntime(blob.ruid); - this.exec('FileReader', 'read', op, blob); - } - } - } - - /** - Initial FileReader state - - @property EMPTY - @type {Number} - @final - @static - @default 0 - */ - FileReader.EMPTY = 0; - - /** - FileReader switches to this state when it is preloading the source - - @property LOADING - @type {Number} - @final - @static - @default 1 - */ - FileReader.LOADING = 1; - - /** - Preloading is complete, this is a final state - - @property DONE - @type {Number} - @final - @static - @default 2 - */ - FileReader.DONE = 2; - - FileReader.prototype = EventTarget.instance; - - return FileReader; -}); - -// Included from: src/javascript/core/utils/Url.js - -/** - * Url.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/core/utils/Url -@public -@static -*/ - -define('moxie/core/utils/Url', [ - 'moxie/core/utils/Basic' -], function(Basic) { - /** - Parse url into separate components and fill in absent parts with parts from current url, - based on https://raw.github.com/kvz/phpjs/master/functions/url/parse_url.js - - @method parseUrl - @static - @param {String} url Url to parse (defaults to empty string if undefined) - @return {Object} Hash containing extracted uri components - */ - var parseUrl = function(url, currentUrl) { - var key = ['source', 'scheme', 'authority', 'userInfo', 'user', 'pass', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'fragment'] - , i = key.length - , ports = { - http: 80, - https: 443 - } - , uri = {} - , regex = /^(?:([^:\/?#]+):)?(?:\/\/()(?:(?:()(?:([^:@\/]*):?([^:@\/]*))?@)?(\[[\da-fA-F:]+\]|[^:\/?#]*)(?::(\d*))?))?()(?:(()(?:(?:[^?#\/]*\/)*)()(?:[^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/ - , m = regex.exec(url || '') - , isRelative - , isSchemeLess = /^\/\/\w/.test(url) - ; - - switch (Basic.typeOf(currentUrl)) { - case 'undefined': - currentUrl = parseUrl(document.location.href, false); - break; - - case 'string': - currentUrl = parseUrl(currentUrl, false); - break; - } - - while (i--) { - if (m[i]) { - uri[key[i]] = m[i]; - } - } - - isRelative = !isSchemeLess && !uri.scheme; - - if (isSchemeLess || isRelative) { - uri.scheme = currentUrl.scheme; - } - - // when url is relative, we set the origin and the path ourselves - if (isRelative) { - uri.host = currentUrl.host; - uri.port = currentUrl.port; - - var path = ''; - // for urls without trailing slash we need to figure out the path - if (/^[^\/]/.test(uri.path)) { - path = currentUrl.path; - // if path ends with a filename, strip it - if (/\/[^\/]*\.[^\/]*$/.test(path)) { - path = path.replace(/\/[^\/]+$/, '/'); - } else { - // avoid double slash at the end (see #127) - path = path.replace(/\/?$/, '/'); - } - } - uri.path = path + (uri.path || ''); // site may reside at domain.com or domain.com/subdir - } - - if (!uri.port) { - uri.port = ports[uri.scheme] || 80; - } - - uri.port = parseInt(uri.port, 10); - - if (!uri.path) { - uri.path = "/"; - } - - delete uri.source; - - return uri; - }; - - /** - Resolve url - among other things will turn relative url to absolute - - @method resolveUrl - @static - @param {String|Object} url Either absolute or relative, or a result of parseUrl call - @return {String} Resolved, absolute url - */ - var resolveUrl = function(url) { - var ports = { // we ignore default ports - http: 80, - https: 443 - } - , urlp = typeof(url) === 'object' ? url : parseUrl(url); - ; - - return urlp.scheme + '://' + urlp.host + (urlp.port !== ports[urlp.scheme] ? ':' + urlp.port : '') + urlp.path + (urlp.query ? urlp.query : ''); - }; - - /** - Check if specified url has the same origin as the current document - - @method hasSameOrigin - @static - @param {String|Object} url - @return {Boolean} - */ - var hasSameOrigin = function(url) { - function origin(url) { - return [url.scheme, url.host, url.port].join('/'); - } - - if (typeof url === 'string') { - url = parseUrl(url); - } - - return origin(parseUrl()) === origin(url); - }; - - return { - parseUrl: parseUrl, - resolveUrl: resolveUrl, - hasSameOrigin: hasSameOrigin - }; -}); - -// Included from: src/javascript/runtime/RuntimeTarget.js - -/** - * RuntimeTarget.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -define('moxie/runtime/RuntimeTarget', [ - 'moxie/core/utils/Basic', - 'moxie/runtime/RuntimeClient', - "moxie/core/EventTarget" -], function(Basic, RuntimeClient, EventTarget) { - /** - Instance of this class can be used as a target for the events dispatched by shims, - when allowing them onto components is for either reason inappropriate - - @class moxie/runtime/RuntimeTarget - @constructor - @protected - @extends EventTarget - */ - function RuntimeTarget() { - this.uid = Basic.guid('uid_'); - - RuntimeClient.call(this); - - this.destroy = function() { - this.disconnectRuntime(); - this.unbindAll(); - }; - } - - RuntimeTarget.prototype = EventTarget.instance; - - return RuntimeTarget; -}); - -// Included from: src/javascript/file/FileReaderSync.js - -/** - * FileReaderSync.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -define('moxie/file/FileReaderSync', [ - 'moxie/core/utils/Basic', - 'moxie/runtime/RuntimeClient', - 'moxie/core/utils/Encode' -], function(Basic, RuntimeClient, Encode) { - /** - Synchronous FileReader implementation. Something like this is available in WebWorkers environment, here - it can be used to read only preloaded blobs/files and only below certain size (not yet sure what that'd be, - but probably < 1mb). Not meant to be used directly by user. - - @class moxie/file/FileReaderSync - @private - @constructor - */ - return function() { - RuntimeClient.call(this); - - Basic.extend(this, { - uid: Basic.guid('uid_'), - - readAsBinaryString: function(blob) { - return _read.call(this, 'readAsBinaryString', blob); - }, - - readAsDataURL: function(blob) { - return _read.call(this, 'readAsDataURL', blob); - }, - - /*readAsArrayBuffer: function(blob) { - return _read.call(this, 'readAsArrayBuffer', blob); - },*/ - - readAsText: function(blob) { - return _read.call(this, 'readAsText', blob); - } - }); - - function _read(op, blob) { - if (blob.isDetached()) { - var src = blob.getSource(); - switch (op) { - case 'readAsBinaryString': - return src; - case 'readAsDataURL': - return 'data:' + blob.type + ';base64,' + Encode.btoa(src); - case 'readAsText': - var txt = ''; - for (var i = 0, length = src.length; i < length; i++) { - txt += String.fromCharCode(src[i]); - } - return txt; - } - } else { - var result = this.connectRuntime(blob.ruid).exec.call(this, 'FileReaderSync', 'read', op, blob); - this.disconnectRuntime(); - return result; - } - } - }; -}); - -// Included from: src/javascript/xhr/FormData.js - -/** - * FormData.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -define("moxie/xhr/FormData", [ - "moxie/core/Exceptions", - "moxie/core/utils/Basic", - "moxie/file/Blob" -], function(x, Basic, Blob) { - /** - FormData - - @class moxie/xhr/FormData - @constructor - */ - function FormData() { - var _blob, _fields = []; - - Basic.extend(this, { - /** - Append another key-value pair to the FormData object - - @method append - @param {String} name Name for the new field - @param {String|Blob|Array|Object} value Value for the field - */ - append: function(name, value) { - var self = this, valueType = Basic.typeOf(value); - - // according to specs value might be either Blob or String - if (value instanceof Blob) { - _blob = { - name: name, - value: value // unfortunately we can only send single Blob in one FormData - }; - } else if ('array' === valueType) { - name += '[]'; - - Basic.each(value, function(value) { - self.append(name, value); - }); - } else if ('object' === valueType) { - Basic.each(value, function(value, key) { - self.append(name + '[' + key + ']', value); - }); - } else if ('null' === valueType || 'undefined' === valueType || 'number' === valueType && isNaN(value)) { - self.append(name, "false"); - } else { - _fields.push({ - name: name, - value: value.toString() - }); - } - }, - - /** - Checks if FormData contains Blob. - - @method hasBlob - @return {Boolean} - */ - hasBlob: function() { - return !!this.getBlob(); - }, - - /** - Retrieves blob. - - @method getBlob - @return {Object} Either Blob if found or null - */ - getBlob: function() { - return _blob && _blob.value || null; - }, - - /** - Retrieves blob field name. - - @method getBlobName - @return {String} Either Blob field name or null - */ - getBlobName: function() { - return _blob && _blob.name || null; - }, - - /** - Loop over the fields in FormData and invoke the callback for each of them. - - @method each - @param {Function} cb Callback to call for each field - */ - each: function(cb) { - Basic.each(_fields, function(field) { - cb(field.value, field.name); - }); - - if (_blob) { - cb(_blob.value, _blob.name); - } - }, - - destroy: function() { - _blob = null; - _fields = []; - } - }); - } - - return FormData; -}); - -// Included from: src/javascript/xhr/XMLHttpRequest.js - -/** - * XMLHttpRequest.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -define("moxie/xhr/XMLHttpRequest", [ - "moxie/core/utils/Basic", - "moxie/core/Exceptions", - "moxie/core/EventTarget", - "moxie/core/utils/Encode", - "moxie/core/utils/Url", - "moxie/runtime/Runtime", - "moxie/runtime/RuntimeTarget", - "moxie/file/Blob", - "moxie/file/FileReaderSync", - "moxie/xhr/FormData", - "moxie/core/utils/Env", - "moxie/core/utils/Mime" -], function(Basic, x, EventTarget, Encode, Url, Runtime, RuntimeTarget, Blob, FileReaderSync, FormData, Env, Mime) { - - var httpCode = { - 100: 'Continue', - 101: 'Switching Protocols', - 102: 'Processing', - - 200: 'OK', - 201: 'Created', - 202: 'Accepted', - 203: 'Non-Authoritative Information', - 204: 'No Content', - 205: 'Reset Content', - 206: 'Partial Content', - 207: 'Multi-Status', - 226: 'IM Used', - - 300: 'Multiple Choices', - 301: 'Moved Permanently', - 302: 'Found', - 303: 'See Other', - 304: 'Not Modified', - 305: 'Use Proxy', - 306: 'Reserved', - 307: 'Temporary Redirect', - - 400: 'Bad Request', - 401: 'Unauthorized', - 402: 'Payment Required', - 403: 'Forbidden', - 404: 'Not Found', - 405: 'Method Not Allowed', - 406: 'Not Acceptable', - 407: 'Proxy Authentication Required', - 408: 'Request Timeout', - 409: 'Conflict', - 410: 'Gone', - 411: 'Length Required', - 412: 'Precondition Failed', - 413: 'Request Entity Too Large', - 414: 'Request-URI Too Long', - 415: 'Unsupported Media Type', - 416: 'Requested Range Not Satisfiable', - 417: 'Expectation Failed', - 422: 'Unprocessable Entity', - 423: 'Locked', - 424: 'Failed Dependency', - 426: 'Upgrade Required', - - 500: 'Internal Server Error', - 501: 'Not Implemented', - 502: 'Bad Gateway', - 503: 'Service Unavailable', - 504: 'Gateway Timeout', - 505: 'HTTP Version Not Supported', - 506: 'Variant Also Negotiates', - 507: 'Insufficient Storage', - 510: 'Not Extended' - }; - - function XMLHttpRequestUpload() { - this.uid = Basic.guid('uid_'); - } - - XMLHttpRequestUpload.prototype = EventTarget.instance; - - /** - Implementation of XMLHttpRequest - - @class moxie/xhr/XMLHttpRequest - @constructor - @uses RuntimeClient - @extends EventTarget - */ - var dispatches = [ - 'loadstart', - - 'progress', - - 'abort', - - 'error', - - 'load', - - 'timeout', - - 'loadend' - - // readystatechange (for historical reasons) - ]; - - var NATIVE = 1, RUNTIME = 2; - - function XMLHttpRequest() { - var self = this, - // this (together with _p() @see below) is here to gracefully upgrade to setter/getter syntax where possible - props = { - /** - The amount of milliseconds a request can take before being terminated. Initially zero. Zero means there is no timeout. - - @property timeout - @type Number - @default 0 - */ - timeout: 0, - - /** - Current state, can take following values: - UNSENT (numeric value 0) - The object has been constructed. - - OPENED (numeric value 1) - The open() method has been successfully invoked. During this state request headers can be set using setRequestHeader() and the request can be made using the send() method. - - HEADERS_RECEIVED (numeric value 2) - All redirects (if any) have been followed and all HTTP headers of the final response have been received. Several response members of the object are now available. - - LOADING (numeric value 3) - The response entity body is being received. - - DONE (numeric value 4) - - @property readyState - @type Number - @default 0 (UNSENT) - */ - readyState: XMLHttpRequest.UNSENT, - - /** - True when user credentials are to be included in a cross-origin request. False when they are to be excluded - in a cross-origin request and when cookies are to be ignored in its response. Initially false. - - @property withCredentials - @type Boolean - @default false - */ - withCredentials: false, - - /** - Returns the HTTP status code. - - @property status - @type Number - @default 0 - */ - status: 0, - - /** - Returns the HTTP status text. - - @property statusText - @type String - */ - statusText: "", - - /** - Returns the response type. Can be set to change the response type. Values are: - the empty string (default), "arraybuffer", "blob", "document", "json", and "text". - - @property responseType - @type String - */ - responseType: "", - - /** - Returns the document response entity body. - - Throws an "InvalidStateError" exception if responseType is not the empty string or "document". - - @property responseXML - @type Document - */ - responseXML: null, - - /** - Returns the text response entity body. - - Throws an "InvalidStateError" exception if responseType is not the empty string or "text". - - @property responseText - @type String - */ - responseText: null, - - /** - Returns the response entity body (http://www.w3.org/TR/XMLHttpRequest/#response-entity-body). - Can become: ArrayBuffer, Blob, Document, JSON, Text - - @property response - @type Mixed - */ - response: null - }, - - _async = true, - _url, - _method, - _headers = {}, - _user, - _password, - _encoding = null, - _mimeType = null, - - // flags - _sync_flag = false, - _send_flag = false, - _upload_events_flag = false, - _upload_complete_flag = false, - _error_flag = false, - _same_origin_flag = false, - - // times - _start_time, - _timeoutset_time, - - _finalMime = null, - _finalCharset = null, - - _options = {}, - _xhr, - _responseHeaders = '', - _responseHeadersBag - ; - - - Basic.extend(this, props, { - /** - Unique id of the component - - @property uid - @type String - */ - uid: Basic.guid('uid_'), - - /** - Target for Upload events - - @property upload - @type XMLHttpRequestUpload - */ - upload: new XMLHttpRequestUpload(), - - - /** - Sets the request method, request URL, synchronous flag, request username, and request password. - - Throws a "SyntaxError" exception if one of the following is true: - - method is not a valid HTTP method. - url cannot be resolved. - url contains the "user:password" format in the userinfo production. - Throws a "SecurityError" exception if method is a case-insensitive match for CONNECT, TRACE or TRACK. - - Throws an "InvalidAccessError" exception if one of the following is true: - - Either user or password is passed as argument and the origin of url does not match the XMLHttpRequest origin. - There is an associated XMLHttpRequest document and either the timeout attribute is not zero, - the withCredentials attribute is true, or the responseType attribute is not the empty string. - - - @method open - @param {String} method HTTP method to use on request - @param {String} url URL to request - @param {Boolean} [async=true] If false request will be done in synchronous manner. Asynchronous by default. - @param {String} [user] Username to use in HTTP authentication process on server-side - @param {String} [password] Password to use in HTTP authentication process on server-side - */ - open: function(method, url, async, user, password) { - var urlp; - - // first two arguments are required - if (!method || !url) { - throw new x.DOMException(x.DOMException.SYNTAX_ERR); - } - - // 2 - check if any code point in method is higher than U+00FF or after deflating method it does not match the method - if (/[\u0100-\uffff]/.test(method) || Encode.utf8_encode(method) !== method) { - throw new x.DOMException(x.DOMException.SYNTAX_ERR); - } - - // 3 - if (!!~Basic.inArray(method.toUpperCase(), ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT', 'TRACE', 'TRACK'])) { - _method = method.toUpperCase(); - } - - - // 4 - allowing these methods poses a security risk - if (!!~Basic.inArray(_method, ['CONNECT', 'TRACE', 'TRACK'])) { - throw new x.DOMException(x.DOMException.SECURITY_ERR); - } - - // 5 - url = Encode.utf8_encode(url); - - // 6 - Resolve url relative to the XMLHttpRequest base URL. If the algorithm returns an error, throw a "SyntaxError". - urlp = Url.parseUrl(url); - - _same_origin_flag = Url.hasSameOrigin(urlp); - - // 7 - manually build up absolute url - _url = Url.resolveUrl(url); - - // 9-10, 12-13 - if ((user || password) && !_same_origin_flag) { - throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR); - } - - _user = user || urlp.user; - _password = password || urlp.pass; - - // 11 - _async = async || true; - - if (_async === false && (_p('timeout') || _p('withCredentials') || _p('responseType') !== "")) { - throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR); - } - - // 14 - terminate abort() - - // 15 - terminate send() - - // 18 - _sync_flag = !_async; - _send_flag = false; - _headers = {}; - _reset.call(this); - - // 19 - _p('readyState', XMLHttpRequest.OPENED); - - // 20 - this.dispatchEvent('readystatechange'); - }, - - /** - Appends an header to the list of author request headers, or if header is already - in the list of author request headers, combines its value with value. - - Throws an "InvalidStateError" exception if the state is not OPENED or if the send() flag is set. - Throws a "SyntaxError" exception if header is not a valid HTTP header field name or if value - is not a valid HTTP header field value. - - @method setRequestHeader - @param {String} header - @param {String|Number} value - */ - setRequestHeader: function(header, value) { - var uaHeaders = [ // these headers are controlled by the user agent - "accept-charset", - "accept-encoding", - "access-control-request-headers", - "access-control-request-method", - "connection", - "content-length", - "cookie", - "cookie2", - "content-transfer-encoding", - "date", - "expect", - "host", - "keep-alive", - "origin", - "referer", - "te", - "trailer", - "transfer-encoding", - "upgrade", - "user-agent", - "via" - ]; - - // 1-2 - if (_p('readyState') !== XMLHttpRequest.OPENED || _send_flag) { - throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); - } - - // 3 - if (/[\u0100-\uffff]/.test(header) || Encode.utf8_encode(header) !== header) { - throw new x.DOMException(x.DOMException.SYNTAX_ERR); - } - - // 4 - /* this step is seemingly bypassed in browsers, probably to allow various unicode characters in header values - if (/[\u0100-\uffff]/.test(value) || Encode.utf8_encode(value) !== value) { - throw new x.DOMException(x.DOMException.SYNTAX_ERR); - }*/ - - header = Basic.trim(header).toLowerCase(); - - // setting of proxy-* and sec-* headers is prohibited by spec - if (!!~Basic.inArray(header, uaHeaders) || /^(proxy\-|sec\-)/.test(header)) { - return false; - } - - // camelize - // browsers lowercase header names (at least for custom ones) - // header = header.replace(/\b\w/g, function($1) { return $1.toUpperCase(); }); - - if (!_headers[header]) { - _headers[header] = value; - } else { - // http://tools.ietf.org/html/rfc2616#section-4.2 (last paragraph) - _headers[header] += ', ' + value; - } - return true; - }, - - /** - * Test if the specified header is already set on this request. - * Returns a header value or boolean false if it's not yet set. - * - * @method hasRequestHeader - * @param {String} header Name of the header to test - * @return {Boolean|String} - */ - hasRequestHeader: function(header) { - return header && _headers[header.toLowerCase()] || false; - }, - - /** - Returns all headers from the response, with the exception of those whose field name is Set-Cookie or Set-Cookie2. - - @method getAllResponseHeaders - @return {String} reponse headers or empty string - */ - getAllResponseHeaders: function() { - return _responseHeaders || ''; - }, - - /** - Returns the header field value from the response of which the field name matches header, - unless the field name is Set-Cookie or Set-Cookie2. - - @method getResponseHeader - @param {String} header - @return {String} value(s) for the specified header or null - */ - getResponseHeader: function(header) { - header = header.toLowerCase(); - - if (_error_flag || !!~Basic.inArray(header, ['set-cookie', 'set-cookie2'])) { - return null; - } - - if (_responseHeaders && _responseHeaders !== '') { - // if we didn't parse response headers until now, do it and keep for later - if (!_responseHeadersBag) { - _responseHeadersBag = {}; - Basic.each(_responseHeaders.split(/\r\n/), function(line) { - var pair = line.split(/:\s+/); - if (pair.length === 2) { // last line might be empty, omit - pair[0] = Basic.trim(pair[0]); // just in case - _responseHeadersBag[pair[0].toLowerCase()] = { // simply to retain header name in original form - header: pair[0], - value: Basic.trim(pair[1]) - }; - } - }); - } - if (_responseHeadersBag.hasOwnProperty(header)) { - return _responseHeadersBag[header].header + ': ' + _responseHeadersBag[header].value; - } - } - return null; - }, - - /** - Sets the Content-Type header for the response to mime. - Throws an "InvalidStateError" exception if the state is LOADING or DONE. - Throws a "SyntaxError" exception if mime is not a valid media type. - - @method overrideMimeType - @param String mime Mime type to set - */ - overrideMimeType: function(mime) { - var matches, charset; - - // 1 - if (!!~Basic.inArray(_p('readyState'), [XMLHttpRequest.LOADING, XMLHttpRequest.DONE])) { - throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); - } - - // 2 - mime = Basic.trim(mime.toLowerCase()); - - if (/;/.test(mime) && (matches = mime.match(/^([^;]+)(?:;\scharset\=)?(.*)$/))) { - mime = matches[1]; - if (matches[2]) { - charset = matches[2]; - } - } - - if (!Mime.mimes[mime]) { - throw new x.DOMException(x.DOMException.SYNTAX_ERR); - } - - // 3-4 - _finalMime = mime; - _finalCharset = charset; - }, - - /** - Initiates the request. The optional argument provides the request entity body. - The argument is ignored if request method is GET or HEAD. - - Throws an "InvalidStateError" exception if the state is not OPENED or if the send() flag is set. - - @method send - @param {Blob|Document|String|FormData} [data] Request entity body - @param {Object} [options] Set of requirements and pre-requisities for runtime initialization - */ - send: function(data, options) { - if (Basic.typeOf(options) === 'string') { - _options = { ruid: options }; - } else if (!options) { - _options = {}; - } else { - _options = options; - } - - // 1-2 - if (this.readyState !== XMLHttpRequest.OPENED || _send_flag) { - throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); - } - - // 3 - // sending Blob - if (data instanceof Blob) { - _options.ruid = data.ruid; - _mimeType = data.type || 'application/octet-stream'; - } - - // FormData - else if (data instanceof FormData) { - if (data.hasBlob()) { - var blob = data.getBlob(); - _options.ruid = blob.ruid; - _mimeType = blob.type || 'application/octet-stream'; - } - } - - // DOMString - else if (typeof data === 'string') { - _encoding = 'UTF-8'; - _mimeType = 'text/plain;charset=UTF-8'; - - // data should be converted to Unicode and encoded as UTF-8 - data = Encode.utf8_encode(data); - } - - // if withCredentials not set, but requested, set it automatically - if (!this.withCredentials) { - this.withCredentials = (_options.required_caps && _options.required_caps.send_browser_cookies) && !_same_origin_flag; - } - - // 4 - storage mutex - // 5 - _upload_events_flag = (!_sync_flag && this.upload.hasEventListener()); // DSAP - // 6 - _error_flag = false; - // 7 - _upload_complete_flag = !data; - // 8 - Asynchronous steps - if (!_sync_flag) { - // 8.1 - _send_flag = true; - // 8.2 - // this.dispatchEvent('loadstart'); // will be dispatched either by native or runtime xhr - // 8.3 - //if (!_upload_complete_flag) { - // this.upload.dispatchEvent('loadstart'); // will be dispatched either by native or runtime xhr - //} - } - // 8.5 - Return the send() method call, but continue running the steps in this algorithm. - _doXHR.call(this, data); - }, - - /** - Cancels any network activity. - - @method abort - */ - abort: function() { - _error_flag = true; - _sync_flag = false; - - if (!~Basic.inArray(_p('readyState'), [XMLHttpRequest.UNSENT, XMLHttpRequest.OPENED, XMLHttpRequest.DONE])) { - _p('readyState', XMLHttpRequest.DONE); - _send_flag = false; - - if (_xhr) { - _xhr.getRuntime().exec.call(_xhr, 'XMLHttpRequest', 'abort', _upload_complete_flag); - } else { - throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); - } - - _upload_complete_flag = true; - } else { - _p('readyState', XMLHttpRequest.UNSENT); - } - }, - - destroy: function() { - if (_xhr) { - if (Basic.typeOf(_xhr.destroy) === 'function') { - _xhr.destroy(); - } - _xhr = null; - } - - this.unbindAll(); - - if (this.upload) { - this.upload.unbindAll(); - this.upload = null; - } - } - }); - - this.handleEventProps(dispatches.concat(['readystatechange'])); // for historical reasons - this.upload.handleEventProps(dispatches); - - /* this is nice, but maybe too lengthy - - // if supported by JS version, set getters/setters for specific properties - o.defineProperty(this, 'readyState', { - configurable: false, - - get: function() { - return _p('readyState'); - } - }); - - o.defineProperty(this, 'timeout', { - configurable: false, - - get: function() { - return _p('timeout'); - }, - - set: function(value) { - - if (_sync_flag) { - throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR); - } - - // timeout still should be measured relative to the start time of request - _timeoutset_time = (new Date).getTime(); - - _p('timeout', value); - } - }); - - // the withCredentials attribute has no effect when fetching same-origin resources - o.defineProperty(this, 'withCredentials', { - configurable: false, - - get: function() { - return _p('withCredentials'); - }, - - set: function(value) { - // 1-2 - if (!~o.inArray(_p('readyState'), [XMLHttpRequest.UNSENT, XMLHttpRequest.OPENED]) || _send_flag) { - throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); - } - - // 3-4 - if (_anonymous_flag || _sync_flag) { - throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR); - } - - // 5 - _p('withCredentials', value); - } - }); - - o.defineProperty(this, 'status', { - configurable: false, - - get: function() { - return _p('status'); - } - }); - - o.defineProperty(this, 'statusText', { - configurable: false, - - get: function() { - return _p('statusText'); - } - }); - - o.defineProperty(this, 'responseType', { - configurable: false, - - get: function() { - return _p('responseType'); - }, - - set: function(value) { - // 1 - if (!!~o.inArray(_p('readyState'), [XMLHttpRequest.LOADING, XMLHttpRequest.DONE])) { - throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); - } - - // 2 - if (_sync_flag) { - throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR); - } - - // 3 - _p('responseType', value.toLowerCase()); - } - }); - - o.defineProperty(this, 'responseText', { - configurable: false, - - get: function() { - // 1 - if (!~o.inArray(_p('responseType'), ['', 'text'])) { - throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); - } - - // 2-3 - if (_p('readyState') !== XMLHttpRequest.DONE && _p('readyState') !== XMLHttpRequest.LOADING || _error_flag) { - throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); - } - - return _p('responseText'); - } - }); - - o.defineProperty(this, 'responseXML', { - configurable: false, - - get: function() { - // 1 - if (!~o.inArray(_p('responseType'), ['', 'document'])) { - throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); - } - - // 2-3 - if (_p('readyState') !== XMLHttpRequest.DONE || _error_flag) { - throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); - } - - return _p('responseXML'); - } - }); - - o.defineProperty(this, 'response', { - configurable: false, - - get: function() { - if (!!~o.inArray(_p('responseType'), ['', 'text'])) { - if (_p('readyState') !== XMLHttpRequest.DONE && _p('readyState') !== XMLHttpRequest.LOADING || _error_flag) { - return ''; - } - } - - if (_p('readyState') !== XMLHttpRequest.DONE || _error_flag) { - return null; - } - - return _p('response'); - } - }); - - */ - - function _p(prop, value) { - if (!props.hasOwnProperty(prop)) { - return; - } - if (arguments.length === 1) { // get - return Env.can('define_property') ? props[prop] : self[prop]; - } else { // set - if (Env.can('define_property')) { - props[prop] = value; - } else { - self[prop] = value; - } - } - } - - /* - function _toASCII(str, AllowUnassigned, UseSTD3ASCIIRules) { - // TODO: http://tools.ietf.org/html/rfc3490#section-4.1 - return str.toLowerCase(); - } - */ - - - function _doXHR(data) { - var self = this; - - _start_time = new Date().getTime(); - - _xhr = new RuntimeTarget(); - - function loadEnd() { - if (_xhr) { // it could have been destroyed by now - _xhr.destroy(); - _xhr = null; - } - self.dispatchEvent('loadend'); - self = null; - } - - function exec(runtime) { - _xhr.bind('LoadStart', function(e) { - _p('readyState', XMLHttpRequest.LOADING); - self.dispatchEvent('readystatechange'); - - self.dispatchEvent(e); - - if (_upload_events_flag) { - self.upload.dispatchEvent(e); - } - }); - - _xhr.bind('Progress', function(e) { - if (_p('readyState') !== XMLHttpRequest.LOADING) { - _p('readyState', XMLHttpRequest.LOADING); // LoadStart unreliable (in Flash for example) - self.dispatchEvent('readystatechange'); - } - self.dispatchEvent(e); - }); - - _xhr.bind('UploadProgress', function(e) { - if (_upload_events_flag) { - self.upload.dispatchEvent({ - type: 'progress', - lengthComputable: false, - total: e.total, - loaded: e.loaded - }); - } - }); - - _xhr.bind('Load', function(e) { - _p('readyState', XMLHttpRequest.DONE); - _p('status', Number(runtime.exec.call(_xhr, 'XMLHttpRequest', 'getStatus') || 0)); - _p('statusText', httpCode[_p('status')] || ""); - - _p('response', runtime.exec.call(_xhr, 'XMLHttpRequest', 'getResponse', _p('responseType'))); - - if (!!~Basic.inArray(_p('responseType'), ['text', ''])) { - _p('responseText', _p('response')); - } else if (_p('responseType') === 'document') { - _p('responseXML', _p('response')); - } - - _responseHeaders = runtime.exec.call(_xhr, 'XMLHttpRequest', 'getAllResponseHeaders'); - - self.dispatchEvent('readystatechange'); - - if (_p('status') > 0) { // status 0 usually means that server is unreachable - if (_upload_events_flag) { - self.upload.dispatchEvent(e); - } - self.dispatchEvent(e); - } else { - _error_flag = true; - self.dispatchEvent('error'); - } - loadEnd(); - }); - - _xhr.bind('Abort', function(e) { - self.dispatchEvent(e); - loadEnd(); - }); - - _xhr.bind('Error', function(e) { - _error_flag = true; - _p('readyState', XMLHttpRequest.DONE); - self.dispatchEvent('readystatechange'); - _upload_complete_flag = true; - self.dispatchEvent(e); - loadEnd(); - }); - - runtime.exec.call(_xhr, 'XMLHttpRequest', 'send', { - url: _url, - method: _method, - async: _async, - user: _user, - password: _password, - headers: _headers, - mimeType: _mimeType, - encoding: _encoding, - responseType: self.responseType, - withCredentials: self.withCredentials, - options: _options - }, data); - } - - // clarify our requirements - if (typeof(_options.required_caps) === 'string') { - _options.required_caps = Runtime.parseCaps(_options.required_caps); - } - - _options.required_caps = Basic.extend({}, _options.required_caps, { - return_response_type: self.responseType - }); - - if (data instanceof FormData) { - _options.required_caps.send_multipart = true; - } - - if (!Basic.isEmptyObj(_headers)) { - _options.required_caps.send_custom_headers = true; - } - - if (!_same_origin_flag) { - _options.required_caps.do_cors = true; - } - - - if (_options.ruid) { // we do not need to wait if we can connect directly - exec(_xhr.connectRuntime(_options)); - } else { - _xhr.bind('RuntimeInit', function(e, runtime) { - exec(runtime); - }); - _xhr.bind('RuntimeError', function(e, err) { - self.dispatchEvent('RuntimeError', err); - }); - _xhr.connectRuntime(_options); - } - } - - - function _reset() { - _p('responseText', ""); - _p('responseXML', null); - _p('response', null); - _p('status', 0); - _p('statusText', ""); - _start_time = _timeoutset_time = null; - } - } - - XMLHttpRequest.UNSENT = 0; - XMLHttpRequest.OPENED = 1; - XMLHttpRequest.HEADERS_RECEIVED = 2; - XMLHttpRequest.LOADING = 3; - XMLHttpRequest.DONE = 4; - - XMLHttpRequest.prototype = EventTarget.instance; - - return XMLHttpRequest; -}); - -// Included from: src/javascript/runtime/Transporter.js - -/** - * Transporter.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -define("moxie/runtime/Transporter", [ - "moxie/core/utils/Basic", - "moxie/core/utils/Encode", - "moxie/runtime/RuntimeClient", - "moxie/core/EventTarget" -], function(Basic, Encode, RuntimeClient, EventTarget) { - - /** - @class moxie/runtime/Transporter - @private - @constructor - */ - function Transporter() { - var mod, _runtime, _data, _size, _pos, _chunk_size; - - RuntimeClient.call(this); - - Basic.extend(this, { - uid: Basic.guid('uid_'), - - state: Transporter.IDLE, - - result: null, - - transport: function(data, type, options) { - var self = this; - - options = Basic.extend({ - chunk_size: 204798 - }, options); - - // should divide by three, base64 requires this - if ((mod = options.chunk_size % 3)) { - options.chunk_size += 3 - mod; - } - - _chunk_size = options.chunk_size; - - _reset.call(this); - _data = data; - _size = data.length; - - if (Basic.typeOf(options) === 'string' || options.ruid) { - _run.call(self, type, this.connectRuntime(options)); - } else { - // we require this to run only once - var cb = function(e, runtime) { - self.unbind("RuntimeInit", cb); - _run.call(self, type, runtime); - }; - this.bind("RuntimeInit", cb); - this.connectRuntime(options); - } - }, - - abort: function() { - var self = this; - - self.state = Transporter.IDLE; - if (_runtime) { - _runtime.exec.call(self, 'Transporter', 'clear'); - self.trigger("TransportingAborted"); - } - - _reset.call(self); - }, - - - destroy: function() { - this.unbindAll(); - _runtime = null; - this.disconnectRuntime(); - _reset.call(this); - } - }); - - function _reset() { - _size = _pos = 0; - _data = this.result = null; - } - - function _run(type, runtime) { - var self = this; - - _runtime = runtime; - - //self.unbind("RuntimeInit"); - - self.bind("TransportingProgress", function(e) { - _pos = e.loaded; - - if (_pos < _size && Basic.inArray(self.state, [Transporter.IDLE, Transporter.DONE]) === -1) { - _transport.call(self); - } - }, 999); - - self.bind("TransportingComplete", function() { - _pos = _size; - self.state = Transporter.DONE; - _data = null; // clean a bit - self.result = _runtime.exec.call(self, 'Transporter', 'getAsBlob', type || ''); - }, 999); - - self.state = Transporter.BUSY; - self.trigger("TransportingStarted"); - _transport.call(self); - } - - function _transport() { - var self = this, - chunk, - bytesLeft = _size - _pos; - - if (_chunk_size > bytesLeft) { - _chunk_size = bytesLeft; - } - - chunk = Encode.btoa(_data.substr(_pos, _chunk_size)); - _runtime.exec.call(self, 'Transporter', 'receive', chunk, _size); - } - } - - Transporter.IDLE = 0; - Transporter.BUSY = 1; - Transporter.DONE = 2; - - Transporter.prototype = EventTarget.instance; - - return Transporter; -}); - -// Included from: src/javascript/image/Image.js - -/** - * Image.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -define("moxie/image/Image", [ - "moxie/core/utils/Basic", - "moxie/core/utils/Dom", - "moxie/core/Exceptions", - "moxie/file/FileReaderSync", - "moxie/xhr/XMLHttpRequest", - "moxie/runtime/Runtime", - "moxie/runtime/RuntimeClient", - "moxie/runtime/Transporter", - "moxie/core/utils/Env", - "moxie/core/EventTarget", - "moxie/file/Blob", - "moxie/file/File", - "moxie/core/utils/Encode" -], function(Basic, Dom, x, FileReaderSync, XMLHttpRequest, Runtime, RuntimeClient, Transporter, Env, EventTarget, Blob, File, Encode) { - /** - Image preloading and manipulation utility. Additionally it provides access to image meta info (Exif, GPS) and raw binary data. - - @class moxie/image/Image - @constructor - @extends EventTarget - */ - var dispatches = [ - 'progress', - - /** - Dispatched when loading is complete. - - @event load - @param {Object} event - */ - 'load', - - 'error', - - /** - Dispatched when resize operation is complete. - - @event resize - @param {Object} event - */ - 'resize', - - /** - Dispatched when visual representation of the image is successfully embedded - into the corresponsing container. - - @event embedded - @param {Object} event - */ - 'embedded' - ]; - - function Image() { - - RuntimeClient.call(this); - - Basic.extend(this, { - /** - Unique id of the component - - @property uid - @type {String} - */ - uid: Basic.guid('uid_'), - - /** - Unique id of the connected runtime, if any. - - @property ruid - @type {String} - */ - ruid: null, - - /** - Name of the file, that was used to create an image, if available. If not equals to empty string. - - @property name - @type {String} - @default "" - */ - name: "", - - /** - Size of the image in bytes. Actual value is set only after image is preloaded. - - @property size - @type {Number} - @default 0 - */ - size: 0, - - /** - Width of the image. Actual value is set only after image is preloaded. - - @property width - @type {Number} - @default 0 - */ - width: 0, - - /** - Height of the image. Actual value is set only after image is preloaded. - - @property height - @type {Number} - @default 0 - */ - height: 0, - - /** - Mime type of the image. Currently only image/jpeg and image/png are supported. Actual value is set only after image is preloaded. - - @property type - @type {String} - @default "" - */ - type: "", - - /** - Holds meta info (Exif, GPS). Is populated only for image/jpeg. Actual value is set only after image is preloaded. - - @property meta - @type {Object} - @default {} - */ - meta: {}, - - /** - Alias for load method, that takes another moxie.image.Image object as a source (see load). - - @method clone - @param {Image} src Source for the image - @param {Boolean} [exact=false] Whether to activate in-depth clone mode - */ - clone: function() { - this.load.apply(this, arguments); - }, - - /** - Loads image from various sources. Currently the source for new image can be: moxie.image.Image, - moxie.file.Blob/moxie.file.File, native Blob/File, dataUrl or URL. Depending on the type of the - source, arguments - differ. When source is URL, Image will be downloaded from remote destination - and loaded in memory. - - @example - var img = new moxie.image.Image(); - img.onload = function() { - var blob = img.getAsBlob(); - - var formData = new moxie.xhr.FormData(); - formData.append('file', blob); - - var xhr = new moxie.xhr.XMLHttpRequest(); - xhr.onload = function() { - // upload complete - }; - xhr.open('post', 'upload.php'); - xhr.send(formData); - }; - img.load("http://www.moxiecode.com/images/mox-logo.jpg"); // notice file extension (.jpg) - - - @method load - @param {Image|Blob|File|String} src Source for the image - @param {Boolean|Object} [mixed] - */ - load: function() { - _load.apply(this, arguments); - }, - - - /** - Resizes the image to fit the specified width/height. If crop is specified, image will also be - cropped to the exact dimensions. - - @method resize - @since 3.0 - @param {Object} options - @param {Number} options.width Resulting width - @param {Number} [options.height=width] Resulting height (optional, if not supplied will default to width) - @param {String} [options.type='image/jpeg'] MIME type of the resulting image - @param {Number} [options.quality=90] In the case of JPEG, controls the quality of resulting image - @param {Boolean} [options.crop='cc'] If not falsy, image will be cropped, by default from center - @param {Boolean} [options.fit=true] Whether to upscale the image to fit the exact dimensions - @param {Boolean} [options.preserveHeaders=true] Whether to preserve meta headers (on JPEGs after resize) - @param {String} [options.resample='default'] Resampling algorithm to use during resize - @param {Boolean} [options.multipass=true] Whether to scale the image in steps (results in better quality) - */ - resize: function(options) { - var self = this; - var orientation; - var scale; - - var srcRect = { - x: 0, - y: 0, - width: self.width, - height: self.height - }; - - var opts = Basic.extendIf({ - width: self.width, - height: self.height, - type: self.type || 'image/jpeg', - quality: 90, - crop: false, - fit: true, - preserveHeaders: true, - resample: 'default', - multipass: true - }, options); - - try { - if (!self.size) { // only preloaded image objects can be used as source - throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); - } - - // no way to reliably intercept the crash due to high resolution, so we simply avoid it - if (self.width > Image.MAX_RESIZE_WIDTH || self.height > Image.MAX_RESIZE_HEIGHT) { - throw new x.ImageError(x.ImageError.MAX_RESOLUTION_ERR); - } - - // take into account orientation tag - orientation = (self.meta && self.meta.tiff && self.meta.tiff.Orientation) || 1; - - if (Basic.inArray(orientation, [5,6,7,8]) !== -1) { // values that require 90 degree rotation - var tmp = opts.width; - opts.width = opts.height; - opts.height = tmp; - } - - if (opts.crop) { - scale = Math.max(opts.width/self.width, opts.height/self.height); - - if (options.fit) { - // first scale it up or down to fit the original image - srcRect.width = Math.min(Math.ceil(opts.width/scale), self.width); - srcRect.height = Math.min(Math.ceil(opts.height/scale), self.height); - - // recalculate the scale for adapted dimensions - scale = opts.width/srcRect.width; - } else { - srcRect.width = Math.min(opts.width, self.width); - srcRect.height = Math.min(opts.height, self.height); - - // now we do not need to scale it any further - scale = 1; - } - - if (typeof(opts.crop) === 'boolean') { - opts.crop = 'cc'; - } - - switch (opts.crop.toLowerCase().replace(/_/, '-')) { - case 'rb': - case 'right-bottom': - srcRect.x = self.width - srcRect.width; - srcRect.y = self.height - srcRect.height; - break; - - case 'cb': - case 'center-bottom': - srcRect.x = Math.floor((self.width - srcRect.width) / 2); - srcRect.y = self.height - srcRect.height; - break; - - case 'lb': - case 'left-bottom': - srcRect.x = 0; - srcRect.y = self.height - srcRect.height; - break; - - case 'lt': - case 'left-top': - srcRect.x = 0; - srcRect.y = 0; - break; - - case 'ct': - case 'center-top': - srcRect.x = Math.floor((self.width - srcRect.width) / 2); - srcRect.y = 0; - break; - - case 'rt': - case 'right-top': - srcRect.x = self.width - srcRect.width; - srcRect.y = 0; - break; - - case 'rc': - case 'right-center': - case 'right-middle': - srcRect.x = self.width - srcRect.width; - srcRect.y = Math.floor((self.height - srcRect.height) / 2); - break; - - - case 'lc': - case 'left-center': - case 'left-middle': - srcRect.x = 0; - srcRect.y = Math.floor((self.height - srcRect.height) / 2); - break; - - case 'cc': - case 'center-center': - case 'center-middle': - default: - srcRect.x = Math.floor((self.width - srcRect.width) / 2); - srcRect.y = Math.floor((self.height - srcRect.height) / 2); - } - - // original image might be smaller than requested crop, so - avoid negative values - srcRect.x = Math.max(srcRect.x, 0); - srcRect.y = Math.max(srcRect.y, 0); - } else { - scale = Math.min(opts.width/self.width, opts.height/self.height); - - // do not upscale if we were asked to not fit it - if (scale > 1 && !opts.fit) { - scale = 1; - } - } - - this.exec('Image', 'resize', srcRect, scale, opts); - } catch(ex) { - // for now simply trigger error event - self.trigger('error', ex.code); - } - }, - - /** - Downsizes the image to fit the specified width/height. If crop is supplied, image will be cropped to exact dimensions. - - @method downsize - @deprecated use resize() - */ - downsize: function(options) { - var defaults = { - width: this.width, - height: this.height, - type: this.type || 'image/jpeg', - quality: 90, - crop: false, - fit: false, - preserveHeaders: true, - resample: 'default' - }, opts; - - if (typeof(options) === 'object') { - opts = Basic.extend(defaults, options); - } else { - // for backward compatibility - opts = Basic.extend(defaults, { - width: arguments[0], - height: arguments[1], - crop: arguments[2], - preserveHeaders: arguments[3] - }); - } - - this.resize(opts); - }, - - /** - Alias for downsize(width, height, true). (see downsize) - - @method crop - @param {Number} width Resulting width - @param {Number} [height=width] Resulting height (optional, if not supplied will default to width) - @param {Boolean} [preserveHeaders=true] Whether to preserve meta headers (on JPEGs after resize) - */ - crop: function(width, height, preserveHeaders) { - this.downsize(width, height, true, preserveHeaders); - }, - - getAsCanvas: function() { - if (!Env.can('create_canvas')) { - throw new x.RuntimeError(x.RuntimeError.NOT_SUPPORTED_ERR); - } - return this.exec('Image', 'getAsCanvas'); - }, - - /** - Retrieves image in it's current state as moxie.file.Blob object. Cannot be run on empty or image in progress (throws - DOMException.INVALID_STATE_ERR). - - @method getAsBlob - @param {String} [type="image/jpeg"] Mime type of resulting blob. Can either be image/jpeg or image/png - @param {Number} [quality=90] Applicable only together with mime type image/jpeg - @return {Blob} Image as Blob - */ - getAsBlob: function(type, quality) { - if (!this.size) { - throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); - } - return this.exec('Image', 'getAsBlob', type || 'image/jpeg', quality || 90); - }, - - /** - Retrieves image in it's current state as dataURL string. Cannot be run on empty or image in progress (throws - DOMException.INVALID_STATE_ERR). - - @method getAsDataURL - @param {String} [type="image/jpeg"] Mime type of resulting blob. Can either be image/jpeg or image/png - @param {Number} [quality=90] Applicable only together with mime type image/jpeg - @return {String} Image as dataURL string - */ - getAsDataURL: function(type, quality) { - if (!this.size) { - throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); - } - return this.exec('Image', 'getAsDataURL', type || 'image/jpeg', quality || 90); - }, - - /** - Retrieves image in it's current state as binary string. Cannot be run on empty or image in progress (throws - DOMException.INVALID_STATE_ERR). - - @method getAsBinaryString - @param {String} [type="image/jpeg"] Mime type of resulting blob. Can either be image/jpeg or image/png - @param {Number} [quality=90] Applicable only together with mime type image/jpeg - @return {String} Image as binary string - */ - getAsBinaryString: function(type, quality) { - var dataUrl = this.getAsDataURL(type, quality); - return Encode.atob(dataUrl.substring(dataUrl.indexOf('base64,') + 7)); - }, - - /** - Embeds a visual representation of the image into the specified node. Depending on the runtime, - it might be a canvas, an img node or a thrid party shim object (Flash or SilverLight - very rare, - can be used in legacy browsers that do not have canvas or proper dataURI support). - - @method embed - @param {DOMElement} el DOM element to insert the image object into - @param {Object} [options] - @param {Number} [options.width] The width of an embed (defaults to the image width) - @param {Number} [options.height] The height of an embed (defaults to the image height) - @param {String} [options.type="image/jpeg"] Mime type - @param {Number} [options.quality=90] Quality of an embed, if mime type is image/jpeg - @param {Boolean} [options.crop=false] Whether to crop an embed to the specified dimensions - @param {Boolean} [options.fit=true] By default thumbs will be up- or downscaled as necessary to fit the dimensions - */ - embed: function(el, options) { - var self = this - , runtime // this has to be outside of all the closures to contain proper runtime - ; - - var opts = Basic.extend({ - width: this.width, - height: this.height, - type: this.type || 'image/jpeg', - quality: 90, - fit: true, - resample: 'nearest' - }, options); - - - function render(type, quality) { - var img = this; - - // if possible, embed a canvas element directly - if (Env.can('create_canvas')) { - var canvas = img.getAsCanvas(); - if (canvas) { - el.appendChild(canvas); - canvas = null; - img.destroy(); - self.trigger('embedded'); - return; - } - } - - var dataUrl = img.getAsDataURL(type, quality); - if (!dataUrl) { - throw new x.ImageError(x.ImageError.WRONG_FORMAT); - } - - if (Env.can('use_data_uri_of', dataUrl.length)) { - el.innerHTML = ''; - img.destroy(); - self.trigger('embedded'); - } else { - var tr = new Transporter(); - - tr.bind("TransportingComplete", function() { - runtime = self.connectRuntime(this.result.ruid); - - self.bind("Embedded", function() { - // position and size properly - Basic.extend(runtime.getShimContainer().style, { - //position: 'relative', - top: '0px', - left: '0px', - width: img.width + 'px', - height: img.height + 'px' - }); - - // some shims (Flash/SilverLight) reinitialize, if parent element is hidden, reordered or it's - // position type changes (in Gecko), but since we basically need this only in IEs 6/7 and - // sometimes 8 and they do not have this problem, we can comment this for now - /*tr.bind("RuntimeInit", function(e, runtime) { - tr.destroy(); - runtime.destroy(); - onResize.call(self); // re-feed our image data - });*/ - - runtime = null; // release - }, 999); - - runtime.exec.call(self, "ImageView", "display", this.result.uid, width, height); - img.destroy(); - }); - - tr.transport(Encode.atob(dataUrl.substring(dataUrl.indexOf('base64,') + 7)), type, { - required_caps: { - display_media: true - }, - runtime_order: 'flash,silverlight', - container: el - }); - } - } - - try { - if (!(el = Dom.get(el))) { - throw new x.DOMException(x.DOMException.INVALID_NODE_TYPE_ERR); - } - - if (!this.size) { // only preloaded image objects can be used as source - throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); - } - - // high-resolution images cannot be consistently handled across the runtimes - if (this.width > Image.MAX_RESIZE_WIDTH || this.height > Image.MAX_RESIZE_HEIGHT) { - //throw new x.ImageError(x.ImageError.MAX_RESOLUTION_ERR); - } - - var imgCopy = new Image(); - - imgCopy.bind("Resize", function() { - render.call(this, opts.type, opts.quality); - }); - - imgCopy.bind("Load", function() { - this.downsize(opts); - }); - - // if embedded thumb data is available and dimensions are big enough, use it - if (this.meta.thumb && this.meta.thumb.width >= opts.width && this.meta.thumb.height >= opts.height) { - imgCopy.load(this.meta.thumb.data); - } else { - imgCopy.clone(this, false); - } - - return imgCopy; - } catch(ex) { - // for now simply trigger error event - this.trigger('error', ex.code); - } - }, - - /** - Properly destroys the image and frees resources in use. If any. Recommended way to dispose - moxie.image.Image object. - - @method destroy - */ - destroy: function() { - if (this.ruid) { - this.getRuntime().exec.call(this, 'Image', 'destroy'); - this.disconnectRuntime(); - } - if (this.meta && this.meta.thumb) { - // thumb is blob, make sure we destroy it first - this.meta.thumb.data.destroy(); - } - this.unbindAll(); - } - }); - - - // this is here, because in order to bind properly, we need uid, which is created above - this.handleEventProps(dispatches); - - this.bind('Load Resize', function() { - return _updateInfo.call(this); // if operation fails (e.g. image is neither PNG nor JPEG) cancel all pending events - }, 999); - - - function _updateInfo(info) { - try { - if (!info) { - info = this.exec('Image', 'getInfo'); - } - - this.size = info.size; - this.width = info.width; - this.height = info.height; - this.type = info.type; - this.meta = info.meta; - - // update file name, only if empty - if (this.name === '') { - this.name = info.name; - } - - return true; - } catch(ex) { - this.trigger('error', ex.code); - return false; - } - } - - - function _load(src) { - var srcType = Basic.typeOf(src); - - try { - // if source is Image - if (src instanceof Image) { - if (!src.size) { // only preloaded image objects can be used as source - throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); - } - _loadFromImage.apply(this, arguments); - } - // if source is o.Blob/o.File - else if (src instanceof Blob) { - if (!~Basic.inArray(src.type, ['image/jpeg', 'image/png'])) { - throw new x.ImageError(x.ImageError.WRONG_FORMAT); - } - _loadFromBlob.apply(this, arguments); - } - // if native blob/file - else if (Basic.inArray(srcType, ['blob', 'file']) !== -1) { - _load.call(this, new File(null, src), arguments[1]); - } - // if String - else if (srcType === 'string') { - // if dataUrl String - if (src.substr(0, 5) === 'data:') { - _load.call(this, new Blob(null, { data: src }), arguments[1]); - } - // else assume Url, either relative or absolute - else { - _loadFromUrl.apply(this, arguments); - } - } - // if source seems to be an img node - else if (srcType === 'node' && src.nodeName.toLowerCase() === 'img') { - _load.call(this, src.src, arguments[1]); - } - else { - throw new x.DOMException(x.DOMException.TYPE_MISMATCH_ERR); - } - } catch(ex) { - // for now simply trigger error event - this.trigger('error', ex.code); - } - } - - - function _loadFromImage(img, exact) { - var runtime = this.connectRuntime(img.ruid); - this.ruid = runtime.uid; - runtime.exec.call(this, 'Image', 'loadFromImage', img, (Basic.typeOf(exact) === 'undefined' ? true : exact)); - } - - - function _loadFromBlob(blob, options) { - var self = this; - - self.name = blob.name || ''; - - function exec(runtime) { - self.ruid = runtime.uid; - runtime.exec.call(self, 'Image', 'loadFromBlob', blob); - } - - if (blob.isDetached()) { - this.bind('RuntimeInit', function(e, runtime) { - exec(runtime); - }); - - // convert to object representation - if (options && typeof(options.required_caps) === 'string') { - options.required_caps = Runtime.parseCaps(options.required_caps); - } - - this.connectRuntime(Basic.extend({ - required_caps: { - access_image_binary: true, - resize_image: true - } - }, options)); - } else { - exec(this.connectRuntime(blob.ruid)); - } - } - - - function _loadFromUrl(url, options) { - var self = this, xhr; - - xhr = new XMLHttpRequest(); - - xhr.open('get', url); - xhr.responseType = 'blob'; - - xhr.onprogress = function(e) { - self.trigger(e); - }; - - xhr.onload = function() { - _loadFromBlob.call(self, xhr.response, true); - }; - - xhr.onerror = function(e) { - self.trigger(e); - }; - - xhr.onloadend = function() { - xhr.destroy(); - }; - - xhr.bind('RuntimeError', function(e, err) { - self.trigger('RuntimeError', err); - }); - - xhr.send(null, options); - } - } - - // virtual world will crash on you if image has a resolution higher than this: - Image.MAX_RESIZE_WIDTH = 8192; - Image.MAX_RESIZE_HEIGHT = 8192; - - Image.prototype = EventTarget.instance; - - return Image; -}); - -// Included from: src/javascript/runtime/html5/Runtime.js - -/** - * Runtime.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/*global File:true */ - -/** -Defines constructor for HTML5 runtime. - -@class moxie/runtime/html5/Runtime -@private -*/ -define("moxie/runtime/html5/Runtime", [ - "moxie/core/utils/Basic", - "moxie/core/Exceptions", - "moxie/runtime/Runtime", - "moxie/core/utils/Env" -], function(Basic, x, Runtime, Env) { - - var type = "html5", extensions = {}; - - function Html5Runtime(options) { - var I = this - , Test = Runtime.capTest - , True = Runtime.capTrue - ; - - var caps = Basic.extend({ - access_binary: Test(window.FileReader || window.File && window.File.getAsDataURL), - access_image_binary: function() { - return I.can('access_binary') && !!extensions.Image; - }, - display_media: Test( - (Env.can('create_canvas') || Env.can('use_data_uri_over32kb')) && - defined('moxie/image/Image') - ), - do_cors: Test(window.XMLHttpRequest && 'withCredentials' in new XMLHttpRequest()), - drag_and_drop: Test(function() { - // this comes directly from Modernizr: http://www.modernizr.com/ - var div = document.createElement('div'); - // IE has support for drag and drop since version 5, but doesn't support dropping files from desktop - return (('draggable' in div) || ('ondragstart' in div && 'ondrop' in div)) && - (Env.browser !== 'IE' || Env.verComp(Env.version, 9, '>')); - }()), - filter_by_extension: Test(function() { // if you know how to feature-detect this, please suggest - return !( - (Env.browser === 'Chrome' && Env.verComp(Env.version, 28, '<')) || - (Env.browser === 'IE' && Env.verComp(Env.version, 10, '<')) || - (Env.browser === 'Safari' && Env.verComp(Env.version, 7, '<')) || - (Env.browser === 'Firefox' && Env.verComp(Env.version, 37, '<')) - ); - }()), - return_response_headers: True, - return_response_type: function(responseType) { - if (responseType === 'json' && !!window.JSON) { // we can fake this one even if it's not supported - return true; - } - return Env.can('return_response_type', responseType); - }, - return_status_code: True, - report_upload_progress: Test(window.XMLHttpRequest && new XMLHttpRequest().upload), - resize_image: function() { - return I.can('access_binary') && Env.can('create_canvas'); - }, - select_file: function() { - return Env.can('use_fileinput') && window.File; - }, - select_folder: function() { - return I.can('select_file') && ( - Env.browser === 'Chrome' && Env.verComp(Env.version, 21, '>=') || - Env.browser === 'Firefox' && Env.verComp(Env.version, 42, '>=') // https://developer.mozilla.org/en-US/Firefox/Releases/42 - ); - }, - select_multiple: function() { - // it is buggy on Safari Windows and iOS - return I.can('select_file') && - !(Env.browser === 'Safari' && Env.os === 'Windows') && - !(Env.os === 'iOS' && Env.verComp(Env.osVersion, "7.0.0", '>') && Env.verComp(Env.osVersion, "8.0.0", '<')); - }, - send_binary_string: Test(window.XMLHttpRequest && (new XMLHttpRequest().sendAsBinary || (window.Uint8Array && window.ArrayBuffer))), - send_custom_headers: Test(window.XMLHttpRequest), - send_multipart: function() { - return !!(window.XMLHttpRequest && new XMLHttpRequest().upload && window.FormData) || I.can('send_binary_string'); - }, - slice_blob: Test(window.File && (File.prototype.mozSlice || File.prototype.webkitSlice || File.prototype.slice)), - stream_upload: function(){ - return I.can('slice_blob') && I.can('send_multipart'); - }, - summon_file_dialog: function() { // yeah... some dirty sniffing here... - return I.can('select_file') && !( - (Env.browser === 'Firefox' && Env.verComp(Env.version, 4, '<')) || - (Env.browser === 'Opera' && Env.verComp(Env.version, 12, '<')) || - (Env.browser === 'IE' && Env.verComp(Env.version, 10, '<')) - ); - }, - upload_filesize: True, - use_http_method: True - }, - arguments[2] - ); - - Runtime.call(this, options, (arguments[1] || type), caps); - - - Basic.extend(this, { - - init : function() { - this.trigger("Init"); - }, - - destroy: (function(destroy) { // extend default destroy method - return function() { - destroy.call(I); - destroy = I = null; - }; - }(this.destroy)) - }); - - Basic.extend(this.getShim(), extensions); - } - - Runtime.addConstructor(type, Html5Runtime); - - return extensions; -}); - -// Included from: src/javascript/runtime/html5/file/Blob.js - -/** - * Blob.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/html5/file/Blob -@private -*/ -define("moxie/runtime/html5/file/Blob", [ - "moxie/runtime/html5/Runtime", - "moxie/file/Blob" -], function(extensions, Blob) { - - function HTML5Blob() { - function w3cBlobSlice(blob, start, end) { - var blobSlice; - - if (window.File.prototype.slice) { - try { - blob.slice(); // depricated version will throw WRONG_ARGUMENTS_ERR exception - return blob.slice(start, end); - } catch (e) { - // depricated slice method - return blob.slice(start, end - start); - } - // slice method got prefixed: https://bugzilla.mozilla.org/show_bug.cgi?id=649672 - } else if ((blobSlice = window.File.prototype.webkitSlice || window.File.prototype.mozSlice)) { - return blobSlice.call(blob, start, end); - } else { - return null; // or throw some exception - } - } - - this.slice = function() { - return new Blob(this.getRuntime().uid, w3cBlobSlice.apply(this, arguments)); - }; - - this.destroy = function() { - this.getRuntime().getShim().removeInstance(this.uid); - }; - } - - return (extensions.Blob = HTML5Blob); -}); - -// Included from: src/javascript/core/utils/Events.js - -/** - * Events.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/core/utils/Events -@public -@static -*/ - -define('moxie/core/utils/Events', [ - 'moxie/core/utils/Basic' -], function(Basic) { - var eventhash = {}, uid = 'moxie_' + Basic.guid(); - - // IE W3C like event funcs - function preventDefault() { - this.returnValue = false; - } - - function stopPropagation() { - this.cancelBubble = true; - } - - /** - Adds an event handler to the specified object and store reference to the handler - in objects internal Plupload registry (@see removeEvent). - - @method addEvent - @static - @param {Object} obj DOM element like object to add handler to. - @param {String} name Name to add event listener to. - @param {Function} callback Function to call when event occurs. - @param {String} [key] that might be used to add specifity to the event record. - */ - var addEvent = function(obj, name, callback, key) { - var func, events; - - name = name.toLowerCase(); - - // Add event listener - if (obj.addEventListener) { - func = callback; - - obj.addEventListener(name, func, false); - } else if (obj.attachEvent) { - func = function() { - var evt = window.event; - - if (!evt.target) { - evt.target = evt.srcElement; - } - - evt.preventDefault = preventDefault; - evt.stopPropagation = stopPropagation; - - callback(evt); - }; - - obj.attachEvent('on' + name, func); - } - - // Log event handler to objects internal mOxie registry - if (!obj[uid]) { - obj[uid] = Basic.guid(); - } - - if (!eventhash.hasOwnProperty(obj[uid])) { - eventhash[obj[uid]] = {}; - } - - events = eventhash[obj[uid]]; - - if (!events.hasOwnProperty(name)) { - events[name] = []; - } - - events[name].push({ - func: func, - orig: callback, // store original callback for IE - key: key - }); - }; - - - /** - Remove event handler from the specified object. If third argument (callback) - is not specified remove all events with the specified name. - - @method removeEvent - @static - @param {Object} obj DOM element to remove event listener(s) from. - @param {String} name Name of event listener to remove. - @param {Function|String} [callback] might be a callback or unique key to match. - */ - var removeEvent = function(obj, name, callback) { - var type, undef; - - name = name.toLowerCase(); - - if (obj[uid] && eventhash[obj[uid]] && eventhash[obj[uid]][name]) { - type = eventhash[obj[uid]][name]; - } else { - return; - } - - for (var i = type.length - 1; i >= 0; i--) { - // undefined or not, key should match - if (type[i].orig === callback || type[i].key === callback) { - if (obj.removeEventListener) { - obj.removeEventListener(name, type[i].func, false); - } else if (obj.detachEvent) { - obj.detachEvent('on'+name, type[i].func); - } - - type[i].orig = null; - type[i].func = null; - type.splice(i, 1); - - // If callback was passed we are done here, otherwise proceed - if (callback !== undef) { - break; - } - } - } - - // If event array got empty, remove it - if (!type.length) { - delete eventhash[obj[uid]][name]; - } - - // If mOxie registry has become empty, remove it - if (Basic.isEmptyObj(eventhash[obj[uid]])) { - delete eventhash[obj[uid]]; - - // IE doesn't let you remove DOM object property with - delete - try { - delete obj[uid]; - } catch(e) { - obj[uid] = undef; - } - } - }; - - - /** - Remove all kind of events from the specified object - - @method removeAllEvents - @static - @param {Object} obj DOM element to remove event listeners from. - @param {String} [key] unique key to match, when removing events. - */ - var removeAllEvents = function(obj, key) { - if (!obj || !obj[uid]) { - return; - } - - Basic.each(eventhash[obj[uid]], function(events, name) { - removeEvent(obj, name, key); - }); - }; - - return { - addEvent: addEvent, - removeEvent: removeEvent, - removeAllEvents: removeAllEvents - }; -}); - -// Included from: src/javascript/runtime/html5/file/FileInput.js - -/** - * FileInput.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/html5/file/FileInput -@private -*/ -define("moxie/runtime/html5/file/FileInput", [ - "moxie/runtime/html5/Runtime", - "moxie/file/File", - "moxie/core/utils/Basic", - "moxie/core/utils/Dom", - "moxie/core/utils/Events", - "moxie/core/utils/Mime", - "moxie/core/utils/Env" -], function(extensions, File, Basic, Dom, Events, Mime, Env) { - - function FileInput() { - var _options, _browseBtnZIndex; // save original z-index - - Basic.extend(this, { - init: function(options) { - var comp = this, I = comp.getRuntime(), input, shimContainer, mimes, browseButton, zIndex, top; - - _options = options; - - // figure out accept string - mimes = Mime.extList2mimes(_options.accept, I.can('filter_by_extension')); - - shimContainer = I.getShimContainer(); - - shimContainer.innerHTML = ''; - - input = Dom.get(I.uid); - - // prepare file input to be placed underneath the browse_button element - Basic.extend(input.style, { - position: 'absolute', - top: 0, - left: 0, - width: '100%', - height: '100%' - }); - - - browseButton = Dom.get(_options.browse_button); - _browseBtnZIndex = Dom.getStyle(browseButton, 'z-index') || 'auto'; - - // Route click event to the input[type=file] element for browsers that support such behavior - if (I.can('summon_file_dialog')) { - if (Dom.getStyle(browseButton, 'position') === 'static') { - browseButton.style.position = 'relative'; - } - - Events.addEvent(browseButton, 'click', function(e) { - var input = Dom.get(I.uid); - if (input && !input.disabled) { // for some reason FF (up to 8.0.1 so far) lets to click disabled input[type=file] - input.click(); - } - e.preventDefault(); - }, comp.uid); - - comp.bind('Refresh', function() { - zIndex = parseInt(_browseBtnZIndex, 10) || 1; - - Dom.get(_options.browse_button).style.zIndex = zIndex; - this.getRuntime().getShimContainer().style.zIndex = zIndex - 1; - }); - } - - /* Since we have to place input[type=file] on top of the browse_button for some browsers, - browse_button loses interactivity, so we restore it here */ - top = I.can('summon_file_dialog') ? browseButton : shimContainer; - - Events.addEvent(top, 'mouseover', function() { - comp.trigger('mouseenter'); - }, comp.uid); - - Events.addEvent(top, 'mouseout', function() { - comp.trigger('mouseleave'); - }, comp.uid); - - Events.addEvent(top, 'mousedown', function() { - comp.trigger('mousedown'); - }, comp.uid); - - Events.addEvent(Dom.get(_options.container), 'mouseup', function() { - comp.trigger('mouseup'); - }, comp.uid); - - // it shouldn't be possible to tab into the hidden element - (I.can('summon_file_dialog') ? input : browseButton).setAttribute('tabindex', -1); - - input.onchange = function onChange() { // there should be only one handler for this - comp.files = []; - - Basic.each(this.files, function(file) { - var relativePath = ''; - - if (_options.directory) { - // folders are represented by dots, filter them out (Chrome 11+) - if (file.name == ".") { - // if it looks like a folder... - return true; - } - } - - if (file.webkitRelativePath) { - relativePath = '/' + file.webkitRelativePath.replace(/^\//, ''); - } - - file = new File(I.uid, file); - file.relativePath = relativePath; - - comp.files.push(file); - }); - - // clearing the value enables the user to select the same file again if they want to - if (Env.browser !== 'IE' && Env.browser !== 'IEMobile') { - this.value = ''; - } else { - // in IE input[type="file"] is read-only so the only way to reset it is to re-insert it - var clone = this.cloneNode(true); - this.parentNode.replaceChild(clone, this); - clone.onchange = onChange; - } - - if (comp.files.length) { - comp.trigger('change'); - } - }; - - // ready event is perfectly asynchronous - comp.trigger({ - type: 'ready', - async: true - }); - - shimContainer = null; - }, - - - setOption: function(name, value) { - var I = this.getRuntime(); - var input = Dom.get(I.uid); - - switch (name) { - case 'accept': - if (value) { - var mimes = value.mimes || Mime.extList2mimes(value, I.can('filter_by_extension')); - input.setAttribute('accept', mimes.join(',')); - } else { - input.removeAttribute('accept'); - } - break; - - case 'directory': - if (value && I.can('select_folder')) { - input.setAttribute('directory', ''); - input.setAttribute('webkitdirectory', ''); - } else { - input.removeAttribute('directory'); - input.removeAttribute('webkitdirectory'); - } - break; - - case 'multiple': - if (value && I.can('select_multiple')) { - input.setAttribute('multiple', ''); - } else { - input.removeAttribute('multiple'); - } - - } - }, - - - disable: function(state) { - var I = this.getRuntime(), input; - - if ((input = Dom.get(I.uid))) { - input.disabled = !!state; - } - }, - - destroy: function() { - var I = this.getRuntime() - , shim = I.getShim() - , shimContainer = I.getShimContainer() - , container = _options && Dom.get(_options.container) - , browseButton = _options && Dom.get(_options.browse_button) - ; - - if (container) { - Events.removeAllEvents(container, this.uid); - } - - if (browseButton) { - Events.removeAllEvents(browseButton, this.uid); - browseButton.style.zIndex = _browseBtnZIndex; // reset to original value - } - - if (shimContainer) { - Events.removeAllEvents(shimContainer, this.uid); - shimContainer.innerHTML = ''; - } - - shim.removeInstance(this.uid); - - _options = shimContainer = container = browseButton = shim = null; - } - }); - } - - return (extensions.FileInput = FileInput); -}); - -// Included from: src/javascript/runtime/html5/file/FileDrop.js - -/** - * FileDrop.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/html5/file/FileDrop -@private -*/ -define("moxie/runtime/html5/file/FileDrop", [ - "moxie/runtime/html5/Runtime", - 'moxie/file/File', - "moxie/core/utils/Basic", - "moxie/core/utils/Dom", - "moxie/core/utils/Events", - "moxie/core/utils/Mime" -], function(extensions, File, Basic, Dom, Events, Mime) { - - function FileDrop() { - var _files = [], _allowedExts = [], _options, _ruid; - - Basic.extend(this, { - init: function(options) { - var comp = this, dropZone; - - _options = options; - _ruid = comp.ruid; // every dropped-in file should have a reference to the runtime - _allowedExts = _extractExts(_options.accept); - dropZone = _options.container; - - Events.addEvent(dropZone, 'dragover', function(e) { - if (!_hasFiles(e)) { - return; - } - e.preventDefault(); - e.dataTransfer.dropEffect = 'copy'; - }, comp.uid); - - Events.addEvent(dropZone, 'drop', function(e) { - if (!_hasFiles(e)) { - return; - } - e.preventDefault(); - - _files = []; - - // Chrome 21+ accepts folders via Drag'n'Drop - if (e.dataTransfer.items && e.dataTransfer.items[0].webkitGetAsEntry) { - _readItems(e.dataTransfer.items, function() { - comp.files = _files; - comp.trigger("drop"); - }); - } else { - Basic.each(e.dataTransfer.files, function(file) { - _addFile(file); - }); - comp.files = _files; - comp.trigger("drop"); - } - }, comp.uid); - - Events.addEvent(dropZone, 'dragenter', function(e) { - comp.trigger("dragenter"); - }, comp.uid); - - Events.addEvent(dropZone, 'dragleave', function(e) { - comp.trigger("dragleave"); - }, comp.uid); - }, - - destroy: function() { - Events.removeAllEvents(_options && Dom.get(_options.container), this.uid); - _ruid = _files = _allowedExts = _options = null; - this.getRuntime().getShim().removeInstance(this.uid); - } - }); - - - function _hasFiles(e) { - if (!e.dataTransfer || !e.dataTransfer.types) { // e.dataTransfer.files is not available in Gecko during dragover - return false; - } - - var types = Basic.toArray(e.dataTransfer.types || []); - - return Basic.inArray("Files", types) !== -1 || - Basic.inArray("public.file-url", types) !== -1 || // Safari < 5 - Basic.inArray("application/x-moz-file", types) !== -1 // Gecko < 1.9.2 (< Firefox 3.6) - ; - } - - - function _addFile(file, relativePath) { - if (_isAcceptable(file)) { - var fileObj = new File(_ruid, file); - fileObj.relativePath = relativePath || ''; - _files.push(fileObj); - } - } - - - function _extractExts(accept) { - var exts = []; - for (var i = 0; i < accept.length; i++) { - [].push.apply(exts, accept[i].extensions.split(/\s*,\s*/)); - } - return Basic.inArray('*', exts) === -1 ? exts : []; - } - - - function _isAcceptable(file) { - if (!_allowedExts.length) { - return true; - } - var ext = Mime.getFileExtension(file.name); - return !ext || Basic.inArray(ext, _allowedExts) !== -1; - } - - - function _readItems(items, cb) { - var entries = []; - Basic.each(items, function(item) { - var entry = item.webkitGetAsEntry(); - // Address #998 (https://code.google.com/p/chromium/issues/detail?id=332579) - if (entry) { - // file() fails on OSX when the filename contains a special character (e.g. umlaut): see #61 - if (entry.isFile) { - _addFile(item.getAsFile(), entry.fullPath); - } else { - entries.push(entry); - } - } - }); - - if (entries.length) { - _readEntries(entries, cb); - } else { - cb(); - } - } - - - function _readEntries(entries, cb) { - var queue = []; - Basic.each(entries, function(entry) { - queue.push(function(cbcb) { - _readEntry(entry, cbcb); - }); - }); - Basic.inSeries(queue, function() { - cb(); - }); - } - - - function _readEntry(entry, cb) { - if (entry.isFile) { - entry.file(function(file) { - _addFile(file, entry.fullPath); - cb(); - }, function() { - // fire an error event maybe - cb(); - }); - } else if (entry.isDirectory) { - _readDirEntry(entry, cb); - } else { - cb(); // not file, not directory? what then?.. - } - } - - - function _readDirEntry(dirEntry, cb) { - var entries = [], dirReader = dirEntry.createReader(); - - // keep quering recursively till no more entries - function getEntries(cbcb) { - dirReader.readEntries(function(moreEntries) { - if (moreEntries.length) { - [].push.apply(entries, moreEntries); - getEntries(cbcb); - } else { - cbcb(); - } - }, cbcb); - } - - // ...and you thought FileReader was crazy... - getEntries(function() { - _readEntries(entries, cb); - }); - } - } - - return (extensions.FileDrop = FileDrop); -}); - -// Included from: src/javascript/runtime/html5/file/FileReader.js - -/** - * FileReader.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/html5/file/FileReader -@private -*/ -define("moxie/runtime/html5/file/FileReader", [ - "moxie/runtime/html5/Runtime", - "moxie/core/utils/Encode", - "moxie/core/utils/Basic" -], function(extensions, Encode, Basic) { - - function FileReader() { - var _fr, _convertToBinary = false; - - Basic.extend(this, { - - read: function(op, blob) { - var comp = this; - - comp.result = ''; - - _fr = new window.FileReader(); - - _fr.addEventListener('progress', function(e) { - comp.trigger(e); - }); - - _fr.addEventListener('load', function(e) { - comp.result = _convertToBinary ? _toBinary(_fr.result) : _fr.result; - comp.trigger(e); - }); - - _fr.addEventListener('error', function(e) { - comp.trigger(e, _fr.error); - }); - - _fr.addEventListener('loadend', function(e) { - _fr = null; - comp.trigger(e); - }); - - if (Basic.typeOf(_fr[op]) === 'function') { - _convertToBinary = false; - _fr[op](blob.getSource()); - } else if (op === 'readAsBinaryString') { // readAsBinaryString is depricated in general and never existed in IE10+ - _convertToBinary = true; - _fr.readAsDataURL(blob.getSource()); - } - }, - - abort: function() { - if (_fr) { - _fr.abort(); - } - }, - - destroy: function() { - _fr = null; - this.getRuntime().getShim().removeInstance(this.uid); - } - }); - - function _toBinary(str) { - return Encode.atob(str.substring(str.indexOf('base64,') + 7)); - } - } - - return (extensions.FileReader = FileReader); -}); - -// Included from: src/javascript/runtime/html5/xhr/XMLHttpRequest.js - -/** - * XMLHttpRequest.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/*global ActiveXObject:true */ - -/** -@class moxie/runtime/html5/xhr/XMLHttpRequest -@private -*/ -define("moxie/runtime/html5/xhr/XMLHttpRequest", [ - "moxie/runtime/html5/Runtime", - "moxie/core/utils/Basic", - "moxie/core/utils/Mime", - "moxie/core/utils/Url", - "moxie/file/File", - "moxie/file/Blob", - "moxie/xhr/FormData", - "moxie/core/Exceptions", - "moxie/core/utils/Env" -], function(extensions, Basic, Mime, Url, File, Blob, FormData, x, Env) { - - function XMLHttpRequest() { - var self = this - , _xhr - , _filename - ; - - Basic.extend(this, { - send: function(meta, data) { - var target = this - , isGecko2_5_6 = (Env.browser === 'Mozilla' && Env.verComp(Env.version, 4, '>=') && Env.verComp(Env.version, 7, '<')) - , isAndroidBrowser = Env.browser === 'Android Browser' - , mustSendAsBinary = false - ; - - // extract file name - _filename = meta.url.replace(/^.+?\/([\w\-\.]+)$/, '$1').toLowerCase(); - - _xhr = _getNativeXHR(); - _xhr.open(meta.method, meta.url, meta.async, meta.user, meta.password); - - - // prepare data to be sent - if (data instanceof Blob) { - if (data.isDetached()) { - mustSendAsBinary = true; - } - data = data.getSource(); - } else if (data instanceof FormData) { - - if (data.hasBlob()) { - if (data.getBlob().isDetached()) { - data = _prepareMultipart.call(target, data); // _xhr must be instantiated and be in OPENED state - mustSendAsBinary = true; - } else if ((isGecko2_5_6 || isAndroidBrowser) && Basic.typeOf(data.getBlob().getSource()) === 'blob' && window.FileReader) { - // Gecko 2/5/6 can't send blob in FormData: https://bugzilla.mozilla.org/show_bug.cgi?id=649150 - // Android browsers (default one and Dolphin) seem to have the same issue, see: #613 - _preloadAndSend.call(target, meta, data); - return; // _preloadAndSend will reinvoke send() with transmutated FormData =%D - } - } - - // transfer fields to real FormData - if (data instanceof FormData) { // if still a FormData, e.g. not mangled by _prepareMultipart() - var fd = new window.FormData(); - data.each(function(value, name) { - if (value instanceof Blob) { - fd.append(name, value.getSource()); - } else { - fd.append(name, value); - } - }); - data = fd; - } - } - - - // if XHR L2 - if (_xhr.upload) { - if (meta.withCredentials) { - _xhr.withCredentials = true; - } - - _xhr.addEventListener('load', function(e) { - target.trigger(e); - }); - - _xhr.addEventListener('error', function(e) { - target.trigger(e); - }); - - // additionally listen to progress events - _xhr.addEventListener('progress', function(e) { - target.trigger(e); - }); - - _xhr.upload.addEventListener('progress', function(e) { - target.trigger({ - type: 'UploadProgress', - loaded: e.loaded, - total: e.total - }); - }); - // ... otherwise simulate XHR L2 - } else { - _xhr.onreadystatechange = function onReadyStateChange() { - - // fake Level 2 events - switch (_xhr.readyState) { - - case 1: // XMLHttpRequest.OPENED - // readystatechanged is fired twice for OPENED state (in IE and Mozilla) - neu - break; - - // looks like HEADERS_RECEIVED (state 2) is not reported in Opera (or it's old versions) - neu - case 2: // XMLHttpRequest.HEADERS_RECEIVED - break; - - case 3: // XMLHttpRequest.LOADING - // try to fire progress event for not XHR L2 - var total, loaded; - - try { - if (Url.hasSameOrigin(meta.url)) { // Content-Length not accessible for cross-domain on some browsers - total = _xhr.getResponseHeader('Content-Length') || 0; // old Safari throws an exception here - } - - if (_xhr.responseText) { // responseText was introduced in IE7 - loaded = _xhr.responseText.length; - } - } catch(ex) { - total = loaded = 0; - } - - target.trigger({ - type: 'progress', - lengthComputable: !!total, - total: parseInt(total, 10), - loaded: loaded - }); - break; - - case 4: // XMLHttpRequest.DONE - // release readystatechange handler (mostly for IE) - _xhr.onreadystatechange = function() {}; - - // usually status 0 is returned when server is unreachable, but FF also fails to status 0 for 408 timeout - try { - if (_xhr.status >= 200 && _xhr.status < 400) { - target.trigger('load'); - break; - } - } catch(ex) {} - - target.trigger('error'); - break; - } - }; - } - - - // set request headers - if (!Basic.isEmptyObj(meta.headers)) { - Basic.each(meta.headers, function(value, header) { - _xhr.setRequestHeader(header, value); - }); - } - - // request response type - if ("" !== meta.responseType && 'responseType' in _xhr) { - if ('json' === meta.responseType && !Env.can('return_response_type', 'json')) { // we can fake this one - _xhr.responseType = 'text'; - } else { - _xhr.responseType = meta.responseType; - } - } - - // send ... - if (!mustSendAsBinary) { - _xhr.send(data); - } else { - if (_xhr.sendAsBinary) { // Gecko - _xhr.sendAsBinary(data); - } else { // other browsers having support for typed arrays - (function() { - // mimic Gecko's sendAsBinary - var ui8a = new Uint8Array(data.length); - for (var i = 0; i < data.length; i++) { - ui8a[i] = (data.charCodeAt(i) & 0xff); - } - _xhr.send(ui8a.buffer); - }()); - } - } - - target.trigger('loadstart'); - }, - - getStatus: function() { - // according to W3C spec it should return 0 for readyState < 3, but instead it throws an exception - try { - if (_xhr) { - return _xhr.status; - } - } catch(ex) {} - return 0; - }, - - getResponse: function(responseType) { - var I = this.getRuntime(); - - try { - switch (responseType) { - case 'blob': - var file = new File(I.uid, _xhr.response); - - // try to extract file name from content-disposition if possible (might be - not, if CORS for example) - var disposition = _xhr.getResponseHeader('Content-Disposition'); - if (disposition) { - // extract filename from response header if available - var match = disposition.match(/filename=([\'\"'])([^\1]+)\1/); - if (match) { - _filename = match[2]; - } - } - file.name = _filename; - - // pre-webkit Opera doesn't set type property on the blob response - if (!file.type) { - file.type = Mime.getFileMime(_filename); - } - return file; - - case 'json': - if (!Env.can('return_response_type', 'json')) { - return _xhr.status === 200 && !!window.JSON ? JSON.parse(_xhr.responseText) : null; - } - return _xhr.response; - - case 'document': - return _getDocument(_xhr); - - default: - return _xhr.responseText !== '' ? _xhr.responseText : null; // against the specs, but for consistency across the runtimes - } - } catch(ex) { - return null; - } - }, - - getAllResponseHeaders: function() { - try { - return _xhr.getAllResponseHeaders(); - } catch(ex) {} - return ''; - }, - - abort: function() { - if (_xhr) { - _xhr.abort(); - } - }, - - destroy: function() { - self = _filename = null; - this.getRuntime().getShim().removeInstance(this.uid); - } - }); - - - // here we go... ugly fix for ugly bug - function _preloadAndSend(meta, data) { - var target = this, blob, fr; - - // get original blob - blob = data.getBlob().getSource(); - - // preload blob in memory to be sent as binary string - fr = new window.FileReader(); - fr.onload = function() { - // overwrite original blob - data.append(data.getBlobName(), new Blob(null, { - type: blob.type, - data: fr.result - })); - // invoke send operation again - self.send.call(target, meta, data); - }; - fr.readAsBinaryString(blob); - } - - - function _getNativeXHR() { - if (window.XMLHttpRequest && !(Env.browser === 'IE' && Env.verComp(Env.version, 8, '<'))) { // IE7 has native XHR but it's buggy - return new window.XMLHttpRequest(); - } else { - return (function() { - var progIDs = ['Msxml2.XMLHTTP.6.0', 'Microsoft.XMLHTTP']; // if 6.0 available, use it, otherwise failback to default 3.0 - for (var i = 0; i < progIDs.length; i++) { - try { - return new ActiveXObject(progIDs[i]); - } catch (ex) {} - } - })(); - } - } - - // @credits Sergey Ilinsky (http://www.ilinsky.com/) - function _getDocument(xhr) { - var rXML = xhr.responseXML; - var rText = xhr.responseText; - - // Try parsing responseText (@see: http://www.ilinsky.com/articles/XMLHttpRequest/#bugs-ie-responseXML-content-type) - if (Env.browser === 'IE' && rText && rXML && !rXML.documentElement && /[^\/]+\/[^\+]+\+xml/.test(xhr.getResponseHeader("Content-Type"))) { - rXML = new window.ActiveXObject("Microsoft.XMLDOM"); - rXML.async = false; - rXML.validateOnParse = false; - rXML.loadXML(rText); - } - - // Check if there is no error in document - if (rXML) { - if ((Env.browser === 'IE' && rXML.parseError !== 0) || !rXML.documentElement || rXML.documentElement.tagName === "parsererror") { - return null; - } - } - return rXML; - } - - - function _prepareMultipart(fd) { - var boundary = '----moxieboundary' + new Date().getTime() - , dashdash = '--' - , crlf = '\r\n' - , multipart = '' - , I = this.getRuntime() - ; - - if (!I.can('send_binary_string')) { - throw new x.RuntimeError(x.RuntimeError.NOT_SUPPORTED_ERR); - } - - _xhr.setRequestHeader('Content-Type', 'multipart/form-data; boundary=' + boundary); - - // append multipart parameters - fd.each(function(value, name) { - // Firefox 3.6 failed to convert multibyte characters to UTF-8 in sendAsBinary(), - // so we try it here ourselves with: unescape(encodeURIComponent(value)) - if (value instanceof Blob) { - // Build RFC2388 blob - multipart += dashdash + boundary + crlf + - 'Content-Disposition: form-data; name="' + name + '"; filename="' + unescape(encodeURIComponent(value.name || 'blob')) + '"' + crlf + - 'Content-Type: ' + (value.type || 'application/octet-stream') + crlf + crlf + - value.getSource() + crlf; - } else { - multipart += dashdash + boundary + crlf + - 'Content-Disposition: form-data; name="' + name + '"' + crlf + crlf + - unescape(encodeURIComponent(value)) + crlf; - } - }); - - multipart += dashdash + boundary + dashdash + crlf; - - return multipart; - } - } - - return (extensions.XMLHttpRequest = XMLHttpRequest); -}); - -// Included from: src/javascript/runtime/html5/utils/BinaryReader.js - -/** - * BinaryReader.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/html5/utils/BinaryReader -@private -*/ -define("moxie/runtime/html5/utils/BinaryReader", [ - "moxie/core/utils/Basic" -], function(Basic) { - - - function BinaryReader(data) { - if (data instanceof ArrayBuffer) { - ArrayBufferReader.apply(this, arguments); - } else { - UTF16StringReader.apply(this, arguments); - } - } - - Basic.extend(BinaryReader.prototype, { - - littleEndian: false, - - - read: function(idx, size) { - var sum, mv, i; - - if (idx + size > this.length()) { - throw new Error("You are trying to read outside the source boundaries."); - } - - mv = this.littleEndian - ? 0 - : -8 * (size - 1) - ; - - for (i = 0, sum = 0; i < size; i++) { - sum |= (this.readByteAt(idx + i) << Math.abs(mv + i*8)); - } - return sum; - }, - - - write: function(idx, num, size) { - var mv, i, str = ''; - - if (idx > this.length()) { - throw new Error("You are trying to write outside the source boundaries."); - } - - mv = this.littleEndian - ? 0 - : -8 * (size - 1) - ; - - for (i = 0; i < size; i++) { - this.writeByteAt(idx + i, (num >> Math.abs(mv + i*8)) & 255); - } - }, - - - BYTE: function(idx) { - return this.read(idx, 1); - }, - - - SHORT: function(idx) { - return this.read(idx, 2); - }, - - - LONG: function(idx) { - return this.read(idx, 4); - }, - - - SLONG: function(idx) { // 2's complement notation - var num = this.read(idx, 4); - return (num > 2147483647 ? num - 4294967296 : num); - }, - - - CHAR: function(idx) { - return String.fromCharCode(this.read(idx, 1)); - }, - - - STRING: function(idx, count) { - return this.asArray('CHAR', idx, count).join(''); - }, - - - asArray: function(type, idx, count) { - var values = []; - - for (var i = 0; i < count; i++) { - values[i] = this[type](idx + i); - } - return values; - } - }); - - - function ArrayBufferReader(data) { - var _dv = new DataView(data); - - Basic.extend(this, { - - readByteAt: function(idx) { - return _dv.getUint8(idx); - }, - - - writeByteAt: function(idx, value) { - _dv.setUint8(idx, value); - }, - - - SEGMENT: function(idx, size, value) { - switch (arguments.length) { - case 2: - return data.slice(idx, idx + size); - - case 1: - return data.slice(idx); - - case 3: - if (value === null) { - value = new ArrayBuffer(); - } - - if (value instanceof ArrayBuffer) { - var arr = new Uint8Array(this.length() - size + value.byteLength); - if (idx > 0) { - arr.set(new Uint8Array(data.slice(0, idx)), 0); - } - arr.set(new Uint8Array(value), idx); - arr.set(new Uint8Array(data.slice(idx + size)), idx + value.byteLength); - - this.clear(); - data = arr.buffer; - _dv = new DataView(data); - break; - } - - default: return data; - } - }, - - - length: function() { - return data ? data.byteLength : 0; - }, - - - clear: function() { - _dv = data = null; - } - }); - } - - - function UTF16StringReader(data) { - Basic.extend(this, { - - readByteAt: function(idx) { - return data.charCodeAt(idx); - }, - - - writeByteAt: function(idx, value) { - putstr(String.fromCharCode(value), idx, 1); - }, - - - SEGMENT: function(idx, length, segment) { - switch (arguments.length) { - case 1: - return data.substr(idx); - case 2: - return data.substr(idx, length); - case 3: - putstr(segment !== null ? segment : '', idx, length); - break; - default: return data; - } - }, - - - length: function() { - return data ? data.length : 0; - }, - - clear: function() { - data = null; - } - }); - - - function putstr(segment, idx, length) { - length = arguments.length === 3 ? length : data.length - idx - 1; - data = data.substr(0, idx) + segment + data.substr(length + idx); - } - } - - - return BinaryReader; -}); - -// Included from: src/javascript/runtime/html5/image/JPEGHeaders.js - -/** - * JPEGHeaders.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/html5/image/JPEGHeaders -@private -*/ -define("moxie/runtime/html5/image/JPEGHeaders", [ - "moxie/runtime/html5/utils/BinaryReader", - "moxie/core/Exceptions" -], function(BinaryReader, x) { - - return function JPEGHeaders(data) { - var headers = [], _br, idx, marker, length = 0; - - _br = new BinaryReader(data); - - // Check if data is jpeg - if (_br.SHORT(0) !== 0xFFD8) { - _br.clear(); - throw new x.ImageError(x.ImageError.WRONG_FORMAT); - } - - idx = 2; - - while (idx <= _br.length()) { - marker = _br.SHORT(idx); - - // omit RST (restart) markers - if (marker >= 0xFFD0 && marker <= 0xFFD7) { - idx += 2; - continue; - } - - // no headers allowed after SOS marker - if (marker === 0xFFDA || marker === 0xFFD9) { - break; - } - - length = _br.SHORT(idx + 2) + 2; - - // APPn marker detected - if (marker >= 0xFFE1 && marker <= 0xFFEF) { - headers.push({ - hex: marker, - name: 'APP' + (marker & 0x000F), - start: idx, - length: length, - segment: _br.SEGMENT(idx, length) - }); - } - - idx += length; - } - - _br.clear(); - - return { - headers: headers, - - restore: function(data) { - var max, i, br; - - br = new BinaryReader(data); - - idx = br.SHORT(2) == 0xFFE0 ? 4 + br.SHORT(4) : 2; - - for (i = 0, max = headers.length; i < max; i++) { - br.SEGMENT(idx, 0, headers[i].segment); - idx += headers[i].length; - } - - data = br.SEGMENT(); - br.clear(); - return data; - }, - - strip: function(data) { - var br, headers, jpegHeaders, i; - - jpegHeaders = new JPEGHeaders(data); - headers = jpegHeaders.headers; - jpegHeaders.purge(); - - br = new BinaryReader(data); - - i = headers.length; - while (i--) { - br.SEGMENT(headers[i].start, headers[i].length, ''); - } - - data = br.SEGMENT(); - br.clear(); - return data; - }, - - get: function(name) { - var array = []; - - for (var i = 0, max = headers.length; i < max; i++) { - if (headers[i].name === name.toUpperCase()) { - array.push(headers[i].segment); - } - } - return array; - }, - - set: function(name, segment) { - var array = [], i, ii, max; - - if (typeof(segment) === 'string') { - array.push(segment); - } else { - array = segment; - } - - for (i = ii = 0, max = headers.length; i < max; i++) { - if (headers[i].name === name.toUpperCase()) { - headers[i].segment = array[ii]; - headers[i].length = array[ii].length; - ii++; - } - if (ii >= array.length) { - break; - } - } - }, - - purge: function() { - this.headers = headers = []; - } - }; - }; -}); - -// Included from: src/javascript/runtime/html5/image/ExifParser.js - -/** - * ExifParser.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/html5/image/ExifParser -@private -*/ -define("moxie/runtime/html5/image/ExifParser", [ - "moxie/core/utils/Basic", - "moxie/runtime/html5/utils/BinaryReader", - "moxie/core/Exceptions" -], function(Basic, BinaryReader, x) { - - function ExifParser(data) { - var __super__, tags, tagDescs, offsets, idx, Tiff; - - BinaryReader.call(this, data); - - tags = { - tiff: { - /* - The image orientation viewed in terms of rows and columns. - - 1 = The 0th row is at the visual top of the image, and the 0th column is the visual left-hand side. - 2 = The 0th row is at the visual top of the image, and the 0th column is the visual right-hand side. - 3 = The 0th row is at the visual bottom of the image, and the 0th column is the visual right-hand side. - 4 = The 0th row is at the visual bottom of the image, and the 0th column is the visual left-hand side. - 5 = The 0th row is the visual left-hand side of the image, and the 0th column is the visual top. - 6 = The 0th row is the visual right-hand side of the image, and the 0th column is the visual top. - 7 = The 0th row is the visual right-hand side of the image, and the 0th column is the visual bottom. - 8 = The 0th row is the visual left-hand side of the image, and the 0th column is the visual bottom. - */ - 0x0112: 'Orientation', - 0x010E: 'ImageDescription', - 0x010F: 'Make', - 0x0110: 'Model', - 0x0131: 'Software', - 0x8769: 'ExifIFDPointer', - 0x8825: 'GPSInfoIFDPointer' - }, - exif: { - 0x9000: 'ExifVersion', - 0xA001: 'ColorSpace', - 0xA002: 'PixelXDimension', - 0xA003: 'PixelYDimension', - 0x9003: 'DateTimeOriginal', - 0x829A: 'ExposureTime', - 0x829D: 'FNumber', - 0x8827: 'ISOSpeedRatings', - 0x9201: 'ShutterSpeedValue', - 0x9202: 'ApertureValue' , - 0x9207: 'MeteringMode', - 0x9208: 'LightSource', - 0x9209: 'Flash', - 0x920A: 'FocalLength', - 0xA402: 'ExposureMode', - 0xA403: 'WhiteBalance', - 0xA406: 'SceneCaptureType', - 0xA404: 'DigitalZoomRatio', - 0xA408: 'Contrast', - 0xA409: 'Saturation', - 0xA40A: 'Sharpness' - }, - gps: { - 0x0000: 'GPSVersionID', - 0x0001: 'GPSLatitudeRef', - 0x0002: 'GPSLatitude', - 0x0003: 'GPSLongitudeRef', - 0x0004: 'GPSLongitude' - }, - - thumb: { - 0x0201: 'JPEGInterchangeFormat', - 0x0202: 'JPEGInterchangeFormatLength' - } - }; - - tagDescs = { - 'ColorSpace': { - 1: 'sRGB', - 0: 'Uncalibrated' - }, - - 'MeteringMode': { - 0: 'Unknown', - 1: 'Average', - 2: 'CenterWeightedAverage', - 3: 'Spot', - 4: 'MultiSpot', - 5: 'Pattern', - 6: 'Partial', - 255: 'Other' - }, - - 'LightSource': { - 1: 'Daylight', - 2: 'Fliorescent', - 3: 'Tungsten', - 4: 'Flash', - 9: 'Fine weather', - 10: 'Cloudy weather', - 11: 'Shade', - 12: 'Daylight fluorescent (D 5700 - 7100K)', - 13: 'Day white fluorescent (N 4600 -5400K)', - 14: 'Cool white fluorescent (W 3900 - 4500K)', - 15: 'White fluorescent (WW 3200 - 3700K)', - 17: 'Standard light A', - 18: 'Standard light B', - 19: 'Standard light C', - 20: 'D55', - 21: 'D65', - 22: 'D75', - 23: 'D50', - 24: 'ISO studio tungsten', - 255: 'Other' - }, - - 'Flash': { - 0x0000: 'Flash did not fire', - 0x0001: 'Flash fired', - 0x0005: 'Strobe return light not detected', - 0x0007: 'Strobe return light detected', - 0x0009: 'Flash fired, compulsory flash mode', - 0x000D: 'Flash fired, compulsory flash mode, return light not detected', - 0x000F: 'Flash fired, compulsory flash mode, return light detected', - 0x0010: 'Flash did not fire, compulsory flash mode', - 0x0018: 'Flash did not fire, auto mode', - 0x0019: 'Flash fired, auto mode', - 0x001D: 'Flash fired, auto mode, return light not detected', - 0x001F: 'Flash fired, auto mode, return light detected', - 0x0020: 'No flash function', - 0x0041: 'Flash fired, red-eye reduction mode', - 0x0045: 'Flash fired, red-eye reduction mode, return light not detected', - 0x0047: 'Flash fired, red-eye reduction mode, return light detected', - 0x0049: 'Flash fired, compulsory flash mode, red-eye reduction mode', - 0x004D: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected', - 0x004F: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light detected', - 0x0059: 'Flash fired, auto mode, red-eye reduction mode', - 0x005D: 'Flash fired, auto mode, return light not detected, red-eye reduction mode', - 0x005F: 'Flash fired, auto mode, return light detected, red-eye reduction mode' - }, - - 'ExposureMode': { - 0: 'Auto exposure', - 1: 'Manual exposure', - 2: 'Auto bracket' - }, - - 'WhiteBalance': { - 0: 'Auto white balance', - 1: 'Manual white balance' - }, - - 'SceneCaptureType': { - 0: 'Standard', - 1: 'Landscape', - 2: 'Portrait', - 3: 'Night scene' - }, - - 'Contrast': { - 0: 'Normal', - 1: 'Soft', - 2: 'Hard' - }, - - 'Saturation': { - 0: 'Normal', - 1: 'Low saturation', - 2: 'High saturation' - }, - - 'Sharpness': { - 0: 'Normal', - 1: 'Soft', - 2: 'Hard' - }, - - // GPS related - 'GPSLatitudeRef': { - N: 'North latitude', - S: 'South latitude' - }, - - 'GPSLongitudeRef': { - E: 'East longitude', - W: 'West longitude' - } - }; - - offsets = { - tiffHeader: 10 - }; - - idx = offsets.tiffHeader; - - __super__ = { - clear: this.clear - }; - - // Public functions - Basic.extend(this, { - - read: function() { - try { - return ExifParser.prototype.read.apply(this, arguments); - } catch (ex) { - throw new x.ImageError(x.ImageError.INVALID_META_ERR); - } - }, - - - write: function() { - try { - return ExifParser.prototype.write.apply(this, arguments); - } catch (ex) { - throw new x.ImageError(x.ImageError.INVALID_META_ERR); - } - }, - - - UNDEFINED: function() { - return this.BYTE.apply(this, arguments); - }, - - - RATIONAL: function(idx) { - return this.LONG(idx) / this.LONG(idx + 4) - }, - - - SRATIONAL: function(idx) { - return this.SLONG(idx) / this.SLONG(idx + 4) - }, - - ASCII: function(idx) { - return this.CHAR(idx); - }, - - TIFF: function() { - return Tiff || null; - }, - - - EXIF: function() { - var Exif = null; - - if (offsets.exifIFD) { - try { - Exif = extractTags.call(this, offsets.exifIFD, tags.exif); - } catch(ex) { - return null; - } - - // Fix formatting of some tags - if (Exif.ExifVersion && Basic.typeOf(Exif.ExifVersion) === 'array') { - for (var i = 0, exifVersion = ''; i < Exif.ExifVersion.length; i++) { - exifVersion += String.fromCharCode(Exif.ExifVersion[i]); - } - Exif.ExifVersion = exifVersion; - } - } - - return Exif; - }, - - - GPS: function() { - var GPS = null; - - if (offsets.gpsIFD) { - try { - GPS = extractTags.call(this, offsets.gpsIFD, tags.gps); - } catch (ex) { - return null; - } - - // iOS devices (and probably some others) do not put in GPSVersionID tag (why?..) - if (GPS.GPSVersionID && Basic.typeOf(GPS.GPSVersionID) === 'array') { - GPS.GPSVersionID = GPS.GPSVersionID.join('.'); - } - } - - return GPS; - }, - - - thumb: function() { - if (offsets.IFD1) { - try { - var IFD1Tags = extractTags.call(this, offsets.IFD1, tags.thumb); - - if ('JPEGInterchangeFormat' in IFD1Tags) { - return this.SEGMENT(offsets.tiffHeader + IFD1Tags.JPEGInterchangeFormat, IFD1Tags.JPEGInterchangeFormatLength); - } - } catch (ex) {} - } - return null; - }, - - - setExif: function(tag, value) { - // Right now only setting of width/height is possible - if (tag !== 'PixelXDimension' && tag !== 'PixelYDimension') { return false; } - - return setTag.call(this, 'exif', tag, value); - }, - - - clear: function() { - __super__.clear(); - data = tags = tagDescs = Tiff = offsets = __super__ = null; - } - }); - - - // Check if that's APP1 and that it has EXIF - if (this.SHORT(0) !== 0xFFE1 || this.STRING(4, 5).toUpperCase() !== "EXIF\0") { - throw new x.ImageError(x.ImageError.INVALID_META_ERR); - } - - // Set read order of multi-byte data - this.littleEndian = (this.SHORT(idx) == 0x4949); - - // Check if always present bytes are indeed present - if (this.SHORT(idx+=2) !== 0x002A) { - throw new x.ImageError(x.ImageError.INVALID_META_ERR); - } - - offsets.IFD0 = offsets.tiffHeader + this.LONG(idx += 2); - Tiff = extractTags.call(this, offsets.IFD0, tags.tiff); - - if ('ExifIFDPointer' in Tiff) { - offsets.exifIFD = offsets.tiffHeader + Tiff.ExifIFDPointer; - delete Tiff.ExifIFDPointer; - } - - if ('GPSInfoIFDPointer' in Tiff) { - offsets.gpsIFD = offsets.tiffHeader + Tiff.GPSInfoIFDPointer; - delete Tiff.GPSInfoIFDPointer; - } - - if (Basic.isEmptyObj(Tiff)) { - Tiff = null; - } - - // check if we have a thumb as well - var IFD1Offset = this.LONG(offsets.IFD0 + this.SHORT(offsets.IFD0) * 12 + 2); - if (IFD1Offset) { - offsets.IFD1 = offsets.tiffHeader + IFD1Offset; - } - - - function extractTags(IFD_offset, tags2extract) { - var data = this; - var length, i, tag, type, count, size, offset, value, values = [], hash = {}; - - var types = { - 1 : 'BYTE', - 7 : 'UNDEFINED', - 2 : 'ASCII', - 3 : 'SHORT', - 4 : 'LONG', - 5 : 'RATIONAL', - 9 : 'SLONG', - 10: 'SRATIONAL' - }; - - var sizes = { - 'BYTE' : 1, - 'UNDEFINED' : 1, - 'ASCII' : 1, - 'SHORT' : 2, - 'LONG' : 4, - 'RATIONAL' : 8, - 'SLONG' : 4, - 'SRATIONAL' : 8 - }; - - length = data.SHORT(IFD_offset); - - // The size of APP1 including all these elements shall not exceed the 64 Kbytes specified in the JPEG standard. - - for (i = 0; i < length; i++) { - values = []; - - // Set binary reader pointer to beginning of the next tag - offset = IFD_offset + 2 + i*12; - - tag = tags2extract[data.SHORT(offset)]; - - if (tag === undefined) { - continue; // Not the tag we requested - } - - type = types[data.SHORT(offset+=2)]; - count = data.LONG(offset+=2); - size = sizes[type]; - - if (!size) { - throw new x.ImageError(x.ImageError.INVALID_META_ERR); - } - - offset += 4; - - // tag can only fit 4 bytes of data, if data is larger we should look outside - if (size * count > 4) { - // instead of data tag contains an offset of the data - offset = data.LONG(offset) + offsets.tiffHeader; - } - - // in case we left the boundaries of data throw an early exception - if (offset + size * count >= this.length()) { - throw new x.ImageError(x.ImageError.INVALID_META_ERR); - } - - // special care for the string - if (type === 'ASCII') { - hash[tag] = Basic.trim(data.STRING(offset, count).replace(/\0$/, '')); // strip trailing NULL - continue; - } else { - values = data.asArray(type, offset, count); - value = (count == 1 ? values[0] : values); - - if (tagDescs.hasOwnProperty(tag) && typeof value != 'object') { - hash[tag] = tagDescs[tag][value]; - } else { - hash[tag] = value; - } - } - } - - return hash; - } - - // At the moment only setting of simple (LONG) values, that do not require offset recalculation, is supported - function setTag(ifd, tag, value) { - var offset, length, tagOffset, valueOffset = 0; - - // If tag name passed translate into hex key - if (typeof(tag) === 'string') { - var tmpTags = tags[ifd.toLowerCase()]; - for (var hex in tmpTags) { - if (tmpTags[hex] === tag) { - tag = hex; - break; - } - } - } - offset = offsets[ifd.toLowerCase() + 'IFD']; - length = this.SHORT(offset); - - for (var i = 0; i < length; i++) { - tagOffset = offset + 12 * i + 2; - - if (this.SHORT(tagOffset) == tag) { - valueOffset = tagOffset + 8; - break; - } - } - - if (!valueOffset) { - return false; - } - - try { - this.write(valueOffset, value, 4); - } catch(ex) { - return false; - } - - return true; - } - } - - ExifParser.prototype = BinaryReader.prototype; - - return ExifParser; -}); - -// Included from: src/javascript/runtime/html5/image/JPEG.js - -/** - * JPEG.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/html5/image/JPEG -@private -*/ -define("moxie/runtime/html5/image/JPEG", [ - "moxie/core/utils/Basic", - "moxie/core/Exceptions", - "moxie/runtime/html5/image/JPEGHeaders", - "moxie/runtime/html5/utils/BinaryReader", - "moxie/runtime/html5/image/ExifParser" -], function(Basic, x, JPEGHeaders, BinaryReader, ExifParser) { - - function JPEG(data) { - var _br, _hm, _ep, _info; - - _br = new BinaryReader(data); - - // check if it is jpeg - if (_br.SHORT(0) !== 0xFFD8) { - throw new x.ImageError(x.ImageError.WRONG_FORMAT); - } - - // backup headers - _hm = new JPEGHeaders(data); - - // extract exif info - try { - _ep = new ExifParser(_hm.get('app1')[0]); - } catch(ex) {} - - // get dimensions - _info = _getDimensions.call(this); - - Basic.extend(this, { - type: 'image/jpeg', - - size: _br.length(), - - width: _info && _info.width || 0, - - height: _info && _info.height || 0, - - setExif: function(tag, value) { - if (!_ep) { - return false; // or throw an exception - } - - if (Basic.typeOf(tag) === 'object') { - Basic.each(tag, function(value, tag) { - _ep.setExif(tag, value); - }); - } else { - _ep.setExif(tag, value); - } - - // update internal headers - _hm.set('app1', _ep.SEGMENT()); - }, - - writeHeaders: function() { - if (!arguments.length) { - // if no arguments passed, update headers internally - return _hm.restore(data); - } - return _hm.restore(arguments[0]); - }, - - stripHeaders: function(data) { - return _hm.strip(data); - }, - - purge: function() { - _purge.call(this); - } - }); - - if (_ep) { - this.meta = { - tiff: _ep.TIFF(), - exif: _ep.EXIF(), - gps: _ep.GPS(), - thumb: _getThumb() - }; - } - - - function _getDimensions(br) { - var idx = 0 - , marker - , length - ; - - if (!br) { - br = _br; - } - - // examine all through the end, since some images might have very large APP segments - while (idx <= br.length()) { - marker = br.SHORT(idx += 2); - - if (marker >= 0xFFC0 && marker <= 0xFFC3) { // SOFn - idx += 5; // marker (2 bytes) + length (2 bytes) + Sample precision (1 byte) - return { - height: br.SHORT(idx), - width: br.SHORT(idx += 2) - }; - } - length = br.SHORT(idx += 2); - idx += length - 2; - } - return null; - } - - - function _getThumb() { - var data = _ep.thumb() - , br - , info - ; - - if (data) { - br = new BinaryReader(data); - info = _getDimensions(br); - br.clear(); - - if (info) { - info.data = data; - return info; - } - } - return null; - } - - - function _purge() { - if (!_ep || !_hm || !_br) { - return; // ignore any repeating purge requests - } - _ep.clear(); - _hm.purge(); - _br.clear(); - _info = _hm = _ep = _br = null; - } - } - - return JPEG; -}); - -// Included from: src/javascript/runtime/html5/image/PNG.js - -/** - * PNG.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/html5/image/PNG -@private -*/ -define("moxie/runtime/html5/image/PNG", [ - "moxie/core/Exceptions", - "moxie/core/utils/Basic", - "moxie/runtime/html5/utils/BinaryReader" -], function(x, Basic, BinaryReader) { - - function PNG(data) { - var _br, _hm, _ep, _info; - - _br = new BinaryReader(data); - - // check if it's png - (function() { - var idx = 0, i = 0 - , signature = [0x8950, 0x4E47, 0x0D0A, 0x1A0A] - ; - - for (i = 0; i < signature.length; i++, idx += 2) { - if (signature[i] != _br.SHORT(idx)) { - throw new x.ImageError(x.ImageError.WRONG_FORMAT); - } - } - }()); - - function _getDimensions() { - var chunk, idx; - - chunk = _getChunkAt.call(this, 8); - - if (chunk.type == 'IHDR') { - idx = chunk.start; - return { - width: _br.LONG(idx), - height: _br.LONG(idx += 4) - }; - } - return null; - } - - function _purge() { - if (!_br) { - return; // ignore any repeating purge requests - } - _br.clear(); - data = _info = _hm = _ep = _br = null; - } - - _info = _getDimensions.call(this); - - Basic.extend(this, { - type: 'image/png', - - size: _br.length(), - - width: _info.width, - - height: _info.height, - - purge: function() { - _purge.call(this); - } - }); - - // for PNG we can safely trigger purge automatically, as we do not keep any data for later - _purge.call(this); - - function _getChunkAt(idx) { - var length, type, start, CRC; - - length = _br.LONG(idx); - type = _br.STRING(idx += 4, 4); - start = idx += 4; - CRC = _br.LONG(idx + length); - - return { - length: length, - type: type, - start: start, - CRC: CRC - }; - } - } - - return PNG; -}); - -// Included from: src/javascript/runtime/html5/image/ImageInfo.js - -/** - * ImageInfo.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -Optional image investigation tool for HTML5 runtime. Provides the following features: -- ability to distinguish image type (JPEG or PNG) by signature -- ability to extract image width/height directly from it's internals, without preloading in memory (fast) -- ability to extract APP headers from JPEGs (Exif, GPS, etc) -- ability to replace width/height tags in extracted JPEG headers -- ability to restore APP headers, that were for example stripped during image manipulation - -@class moxie/runtime/html5/image/ImageInfo -@private -@param {String} data Image source as binary string -*/ -define("moxie/runtime/html5/image/ImageInfo", [ - "moxie/core/utils/Basic", - "moxie/core/Exceptions", - "moxie/runtime/html5/image/JPEG", - "moxie/runtime/html5/image/PNG" -], function(Basic, x, JPEG, PNG) { - - return function(data) { - var _cs = [JPEG, PNG], _img; - - // figure out the format, throw: ImageError.WRONG_FORMAT if not supported - _img = (function() { - for (var i = 0; i < _cs.length; i++) { - try { - return new _cs[i](data); - } catch (ex) { - // console.info(ex); - } - } - throw new x.ImageError(x.ImageError.WRONG_FORMAT); - }()); - - Basic.extend(this, { - /** - Image Mime Type extracted from it's depths - - @property type - @type {String} - @default '' - */ - type: '', - - /** - Image size in bytes - - @property size - @type {Number} - @default 0 - */ - size: 0, - - /** - Image width extracted from image source - - @property width - @type {Number} - @default 0 - */ - width: 0, - - /** - Image height extracted from image source - - @property height - @type {Number} - @default 0 - */ - height: 0, - - /** - Sets Exif tag. Currently applicable only for width and height tags. Obviously works only with JPEGs. - - @method setExif - @param {String} tag Tag to set - @param {Mixed} value Value to assign to the tag - */ - setExif: function() {}, - - /** - Restores headers to the source. - - @method writeHeaders - @param {String} data Image source as binary string - @return {String} Updated binary string - */ - writeHeaders: function(data) { - return data; - }, - - /** - Strip all headers from the source. - - @method stripHeaders - @param {String} data Image source as binary string - @return {String} Updated binary string - */ - stripHeaders: function(data) { - return data; - }, - - /** - Dispose resources. - - @method purge - */ - purge: function() { - data = null; - } - }); - - Basic.extend(this, _img); - - this.purge = function() { - _img.purge(); - _img = null; - }; - }; -}); - -// Included from: src/javascript/runtime/html5/image/ResizerCanvas.js - -/** - * ResizerCanvas.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** - * Resizes image/canvas using canvas - */ -define("moxie/runtime/html5/image/ResizerCanvas", [], function() { - - function scale(image, ratio, resample) { - var sD = image.width > image.height ? 'width' : 'height'; // take the largest side - var dD = Math.round(image[sD] * ratio); - var scaleCapped = false; - - if (resample !== 'nearest' && (ratio < 0.5 || ratio > 2)) { - ratio = ratio < 0.5 ? 0.5 : 2; - scaleCapped = true; - } - - var tCanvas = _scale(image, ratio); - - if (scaleCapped) { - return scale(tCanvas, dD / tCanvas[sD], resample); - } else { - return tCanvas; - } - } - - - function _scale(image, ratio) { - var sW = image.width; - var sH = image.height; - var dW = Math.round(sW * ratio); - var dH = Math.round(sH * ratio); - - var canvas = document.createElement('canvas'); - canvas.width = dW; - canvas.height = dH; - canvas.getContext("2d").drawImage(image, 0, 0, sW, sH, 0, 0, dW, dH); - - image = null; // just in case - return canvas; - } - - return { - scale: scale - }; - -}); - -// Included from: src/javascript/runtime/html5/image/Image.js - -/** - * Image.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/html5/image/Image -@private -*/ -define("moxie/runtime/html5/image/Image", [ - "moxie/runtime/html5/Runtime", - "moxie/core/utils/Basic", - "moxie/core/Exceptions", - "moxie/core/utils/Encode", - "moxie/file/Blob", - "moxie/file/File", - "moxie/runtime/html5/image/ImageInfo", - "moxie/runtime/html5/image/ResizerCanvas", - "moxie/core/utils/Mime", - "moxie/core/utils/Env" -], function(extensions, Basic, x, Encode, Blob, File, ImageInfo, ResizerCanvas, Mime, Env) { - - function HTML5Image() { - var me = this - , _img, _imgInfo, _canvas, _binStr, _blob - , _modified = false // is set true whenever image is modified - , _preserveHeaders = true - ; - - Basic.extend(this, { - loadFromBlob: function(blob) { - var I = this.getRuntime() - , asBinary = arguments.length > 1 ? arguments[1] : true - ; - - if (!I.can('access_binary')) { - throw new x.RuntimeError(x.RuntimeError.NOT_SUPPORTED_ERR); - } - - _blob = blob; - - if (blob.isDetached()) { - _binStr = blob.getSource(); - _preload.call(this, _binStr); - return; - } else { - _readAsDataUrl.call(this, blob.getSource(), function(dataUrl) { - if (asBinary) { - _binStr = _toBinary(dataUrl); - } - _preload.call(this, dataUrl); - }); - } - }, - - loadFromImage: function(img, exact) { - this.meta = img.meta; - - _blob = new File(null, { - name: img.name, - size: img.size, - type: img.type - }); - - _preload.call(this, exact ? (_binStr = img.getAsBinaryString()) : img.getAsDataURL()); - }, - - getInfo: function() { - var I = this.getRuntime(), info; - - if (!_imgInfo && _binStr && I.can('access_image_binary')) { - _imgInfo = new ImageInfo(_binStr); - } - - // this stuff below is definitely having fun with itself - info = { - width: _getImg().width || 0, - height: _getImg().height || 0, - type: _blob.type || Mime.getFileMime(_blob.name), - size: _binStr && _binStr.length || _blob.size || 0, - name: _blob.name || '', - meta: null - }; - - if (_preserveHeaders) { - info.meta = _imgInfo && _imgInfo.meta || this.meta || {}; - - // if data was taken from ImageInfo it will be a binary string, so we convert it to blob - if (info.meta && info.meta.thumb && !(info.meta.thumb.data instanceof Blob)) { - info.meta.thumb.data = new Blob(null, { - type: 'image/jpeg', - data: info.meta.thumb.data - }); - } - } - - return info; - }, - - - resize: function(rect, ratio, options) { - var canvas = document.createElement('canvas'); - canvas.width = rect.width; - canvas.height = rect.height; - - canvas.getContext("2d").drawImage(_getImg(), rect.x, rect.y, rect.width, rect.height, 0, 0, canvas.width, canvas.height); - - _canvas = ResizerCanvas.scale(canvas, ratio); - - _preserveHeaders = options.preserveHeaders; - - // rotate if required, according to orientation tag - if (!_preserveHeaders) { - var orientation = (this.meta && this.meta.tiff && this.meta.tiff.Orientation) || 1; - _canvas = _rotateToOrientaion(_canvas, orientation); - } - - this.width = _canvas.width; - this.height = _canvas.height; - - _modified = true; - - this.trigger('Resize'); - }, - - getAsCanvas: function() { - if (!_canvas) { - _canvas = _getCanvas(); - } - _canvas.id = this.uid + '_canvas'; - return _canvas; - }, - - getAsBlob: function(type, quality) { - if (type !== this.type) { - _modified = true; // reconsider the state - return new File(null, { - name: _blob.name || '', - type: type, - data: me.getAsDataURL(type, quality) - }); - } - return new File(null, { - name: _blob.name || '', - type: type, - data: me.getAsBinaryString(type, quality) - }); - }, - - getAsDataURL: function(type) { - var quality = arguments[1] || 90; - - // if image has not been modified, return the source right away - if (!_modified) { - return _img.src; - } - - // make sure we have a canvas to work with - _getCanvas(); - - if ('image/jpeg' !== type) { - return _canvas.toDataURL('image/png'); - } else { - try { - // older Geckos used to result in an exception on quality argument - return _canvas.toDataURL('image/jpeg', quality/100); - } catch (ex) { - return _canvas.toDataURL('image/jpeg'); - } - } - }, - - getAsBinaryString: function(type, quality) { - // if image has not been modified, return the source right away - if (!_modified) { - // if image was not loaded from binary string - if (!_binStr) { - _binStr = _toBinary(me.getAsDataURL(type, quality)); - } - return _binStr; - } - - if ('image/jpeg' !== type) { - _binStr = _toBinary(me.getAsDataURL(type, quality)); - } else { - var dataUrl; - - // if jpeg - if (!quality) { - quality = 90; - } - - // make sure we have a canvas to work with - _getCanvas(); - - try { - // older Geckos used to result in an exception on quality argument - dataUrl = _canvas.toDataURL('image/jpeg', quality/100); - } catch (ex) { - dataUrl = _canvas.toDataURL('image/jpeg'); - } - - _binStr = _toBinary(dataUrl); - - if (_imgInfo) { - _binStr = _imgInfo.stripHeaders(_binStr); - - if (_preserveHeaders) { - // update dimensions info in exif - if (_imgInfo.meta && _imgInfo.meta.exif) { - _imgInfo.setExif({ - PixelXDimension: this.width, - PixelYDimension: this.height - }); - } - - // re-inject the headers - _binStr = _imgInfo.writeHeaders(_binStr); - } - - // will be re-created from fresh on next getInfo call - _imgInfo.purge(); - _imgInfo = null; - } - } - - _modified = false; - - return _binStr; - }, - - destroy: function() { - me = null; - _purge.call(this); - this.getRuntime().getShim().removeInstance(this.uid); - } - }); - - - function _getImg() { - if (!_canvas && !_img) { - throw new x.ImageError(x.DOMException.INVALID_STATE_ERR); - } - return _canvas || _img; - } - - - function _getCanvas() { - var canvas = _getImg(); - if (canvas.nodeName.toLowerCase() == 'canvas') { - return canvas; - } - _canvas = document.createElement('canvas'); - _canvas.width = canvas.width; - _canvas.height = canvas.height; - _canvas.getContext("2d").drawImage(canvas, 0, 0); - return _canvas; - } - - - function _toBinary(str) { - return Encode.atob(str.substring(str.indexOf('base64,') + 7)); - } - - - function _toDataUrl(str, type) { - return 'data:' + (type || '') + ';base64,' + Encode.btoa(str); - } - - - function _preload(str) { - var comp = this; - - _img = new Image(); - _img.onerror = function() { - _purge.call(this); - comp.trigger('error', x.ImageError.WRONG_FORMAT); - }; - _img.onload = function() { - comp.trigger('load'); - }; - - _img.src = str.substr(0, 5) == 'data:' ? str : _toDataUrl(str, _blob.type); - } - - - function _readAsDataUrl(file, callback) { - var comp = this, fr; - - // use FileReader if it's available - if (window.FileReader) { - fr = new FileReader(); - fr.onload = function() { - callback.call(comp, this.result); - }; - fr.onerror = function() { - comp.trigger('error', x.ImageError.WRONG_FORMAT); - }; - fr.readAsDataURL(file); - } else { - return callback.call(this, file.getAsDataURL()); - } - } - - /** - * Transform canvas coordination according to specified frame size and orientation - * Orientation value is from EXIF tag - * @author Shinichi Tomita - */ - function _rotateToOrientaion(img, orientation) { - var RADIANS = Math.PI/180; - var canvas = document.createElement('canvas'); - var ctx = canvas.getContext('2d'); - var width = img.width; - var height = img.height; - - if (Basic.inArray(orientation, [5,6,7,8]) > -1) { - canvas.width = height; - canvas.height = width; - } else { - canvas.width = width; - canvas.height = height; - } - - /** - 1 = The 0th row is at the visual top of the image, and the 0th column is the visual left-hand side. - 2 = The 0th row is at the visual top of the image, and the 0th column is the visual right-hand side. - 3 = The 0th row is at the visual bottom of the image, and the 0th column is the visual right-hand side. - 4 = The 0th row is at the visual bottom of the image, and the 0th column is the visual left-hand side. - 5 = The 0th row is the visual left-hand side of the image, and the 0th column is the visual top. - 6 = The 0th row is the visual right-hand side of the image, and the 0th column is the visual top. - 7 = The 0th row is the visual right-hand side of the image, and the 0th column is the visual bottom. - 8 = The 0th row is the visual left-hand side of the image, and the 0th column is the visual bottom. - */ - switch (orientation) { - case 2: - // horizontal flip - ctx.translate(width, 0); - ctx.scale(-1, 1); - break; - case 3: - // 180 rotate left - ctx.translate(width, height); - ctx.rotate(180 * RADIANS); - break; - case 4: - // vertical flip - ctx.translate(0, height); - ctx.scale(1, -1); - break; - case 5: - // vertical flip + 90 rotate right - ctx.rotate(90 * RADIANS); - ctx.scale(1, -1); - break; - case 6: - // 90 rotate right - ctx.rotate(90 * RADIANS); - ctx.translate(0, -height); - break; - case 7: - // horizontal flip + 90 rotate right - ctx.rotate(90 * RADIANS); - ctx.translate(width, -height); - ctx.scale(-1, 1); - break; - case 8: - // 90 rotate left - ctx.rotate(-90 * RADIANS); - ctx.translate(-width, 0); - break; - } - - ctx.drawImage(img, 0, 0, width, height); - return canvas; - } - - - function _purge() { - if (_imgInfo) { - _imgInfo.purge(); - _imgInfo = null; - } - - _binStr = _img = _canvas = _blob = null; - _modified = false; - } - } - - return (extensions.Image = HTML5Image); -}); - -// Included from: src/javascript/runtime/flash/Runtime.js - -/** - * Runtime.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/*global ActiveXObject:true */ - -/** -Defines constructor for Flash runtime. - -@class moxie/runtime/flash/Runtime -@private -*/ -define("moxie/runtime/flash/Runtime", [ - "moxie/core/utils/Basic", - "moxie/core/utils/Env", - "moxie/core/utils/Dom", - "moxie/core/Exceptions", - "moxie/runtime/Runtime" -], function(Basic, Env, Dom, x, Runtime) { - - var type = 'flash', extensions = {}; - - /** - Get the version of the Flash Player - - @method getShimVersion - @private - @return {Number} Flash Player version - */ - function getShimVersion() { - var version; - - try { - version = navigator.plugins['Shockwave Flash']; - version = version.description; - } catch (e1) { - try { - version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version'); - } catch (e2) { - version = '0.0'; - } - } - version = version.match(/\d+/g); - return parseFloat(version[0] + '.' + version[1]); - } - - - /** - Cross-browser SWF removal - - Especially needed to safely and completely remove a SWF in Internet Explorer - - Originated from SWFObject v2.2 - */ - function removeSWF(id) { - var obj = Dom.get(id); - if (obj && obj.nodeName == "OBJECT") { - if (Env.browser === 'IE') { - obj.style.display = "none"; - (function onInit(){ - // http://msdn.microsoft.com/en-us/library/ie/ms534360(v=vs.85).aspx - if (obj.readyState == 4) { - removeObjectInIE(id); - } - else { - setTimeout(onInit, 10); - } - })(); - } - else { - obj.parentNode.removeChild(obj); - } - } - } - - - function removeObjectInIE(id) { - var obj = Dom.get(id); - if (obj) { - for (var i in obj) { - if (typeof obj[i] == "function") { - obj[i] = null; - } - } - obj.parentNode.removeChild(obj); - } - } - - /** - Constructor for the Flash Runtime - */ - function FlashRuntime(options) { - var I = this, initTimer; - - options = Basic.extend({ swf_url: Env.swf_url }, options); - - Runtime.call(this, options, type, { - access_binary: function(value) { - return value && I.mode === 'browser'; - }, - access_image_binary: function(value) { - return value && I.mode === 'browser'; - }, - display_media: Runtime.capTest(defined('moxie/image/Image')), - do_cors: Runtime.capTrue, - drag_and_drop: false, - report_upload_progress: function() { - return I.mode === 'client'; - }, - resize_image: Runtime.capTrue, - return_response_headers: false, - return_response_type: function(responseType) { - if (responseType === 'json' && !!window.JSON) { - return true; - } - return !Basic.arrayDiff(responseType, ['', 'text', 'document']) || I.mode === 'browser'; - }, - return_status_code: function(code) { - return I.mode === 'browser' || !Basic.arrayDiff(code, [200, 404]); - }, - select_file: Runtime.capTrue, - select_multiple: Runtime.capTrue, - send_binary_string: function(value) { - return value && I.mode === 'browser'; - }, - send_browser_cookies: function(value) { - return value && I.mode === 'browser'; - }, - send_custom_headers: function(value) { - return value && I.mode === 'browser'; - }, - send_multipart: Runtime.capTrue, - slice_blob: function(value) { - return value && I.mode === 'browser'; - }, - stream_upload: function(value) { - return value && I.mode === 'browser'; - }, - summon_file_dialog: false, - upload_filesize: function(size) { - return Basic.parseSizeStr(size) <= 2097152 || I.mode === 'client'; - }, - use_http_method: function(methods) { - return !Basic.arrayDiff(methods, ['GET', 'POST']); - } - }, { - // capabilities that require specific mode - access_binary: function(value) { - return value ? 'browser' : 'client'; - }, - access_image_binary: function(value) { - return value ? 'browser' : 'client'; - }, - report_upload_progress: function(value) { - return value ? 'browser' : 'client'; - }, - return_response_type: function(responseType) { - return Basic.arrayDiff(responseType, ['', 'text', 'json', 'document']) ? 'browser' : ['client', 'browser']; - }, - return_status_code: function(code) { - return Basic.arrayDiff(code, [200, 404]) ? 'browser' : ['client', 'browser']; - }, - send_binary_string: function(value) { - return value ? 'browser' : 'client'; - }, - send_browser_cookies: function(value) { - return value ? 'browser' : 'client'; - }, - send_custom_headers: function(value) { - return value ? 'browser' : 'client'; - }, - slice_blob: function(value) { - return value ? 'browser' : 'client'; - }, - stream_upload: function(value) { - return value ? 'client' : 'browser'; - }, - upload_filesize: function(size) { - return Basic.parseSizeStr(size) >= 2097152 ? 'client' : 'browser'; - } - }, 'client'); - - - // minimal requirement for Flash Player version - if (getShimVersion() < 11.3) { - if (MXI_DEBUG && Env.debug.runtime) { - Env.log("\tFlash didn't meet minimal version requirement (11.3)."); - } - - this.mode = false; // with falsy mode, runtime won't operable, no matter what the mode was before - } - - - Basic.extend(this, { - - getShim: function() { - return Dom.get(this.uid); - }, - - shimExec: function(component, action) { - var args = [].slice.call(arguments, 2); - return I.getShim().exec(this.uid, component, action, args); - }, - - init: function() { - var html, el, container; - - container = this.getShimContainer(); - - // if not the minimal height, shims are not initialized in older browsers (e.g FF3.6, IE6,7,8, Safari 4.0,5.0, etc) - Basic.extend(container.style, { - position: 'absolute', - top: '-8px', - left: '-8px', - width: '9px', - height: '9px', - overflow: 'hidden' - }); - - // insert flash object - html = '' + - '' + - '' + - '' + - ''; - - if (Env.browser === 'IE') { - el = document.createElement('div'); - container.appendChild(el); - el.outerHTML = html; - el = container = null; // just in case - } else { - container.innerHTML = html; - } - - // Init is dispatched by the shim - initTimer = setTimeout(function() { - if (I && !I.initialized) { // runtime might be already destroyed by this moment - I.trigger("Error", new x.RuntimeError(x.RuntimeError.NOT_INIT_ERR)); - - if (MXI_DEBUG && Env.debug.runtime) { - Env.log("\tFlash failed to initialize within a specified period of time (typically 5s)."); - } - } - }, 5000); - }, - - destroy: (function(destroy) { // extend default destroy method - return function() { - removeSWF(I.uid); // SWF removal requires special care in IE - - destroy.call(I); - clearTimeout(initTimer); // initialization check might be still onwait - options = initTimer = destroy = I = null; - }; - }(this.destroy)) - - }, extensions); - } - - Runtime.addConstructor(type, FlashRuntime); - - return extensions; -}); - -// Included from: src/javascript/runtime/flash/file/Blob.js - -/** - * Blob.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/flash/file/Blob -@private -*/ -define("moxie/runtime/flash/file/Blob", [ - "moxie/runtime/flash/Runtime", - "moxie/file/Blob" -], function(extensions, Blob) { - - var FlashBlob = { - slice: function(blob, start, end, type) { - var self = this.getRuntime(); - - if (start < 0) { - start = Math.max(blob.size + start, 0); - } else if (start > 0) { - start = Math.min(start, blob.size); - } - - if (end < 0) { - end = Math.max(blob.size + end, 0); - } else if (end > 0) { - end = Math.min(end, blob.size); - } - - blob = self.shimExec.call(this, 'Blob', 'slice', start, end, type || ''); - - if (blob) { - blob = new Blob(self.uid, blob); - } - return blob; - } - }; - - return (extensions.Blob = FlashBlob); -}); - -// Included from: src/javascript/runtime/flash/file/FileInput.js - -/** - * FileInput.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/flash/file/FileInput -@private -*/ -define("moxie/runtime/flash/file/FileInput", [ - "moxie/runtime/flash/Runtime", - "moxie/file/File", - "moxie/core/utils/Dom", - "moxie/core/utils/Basic" -], function(extensions, File, Dom, Basic) { - - var FileInput = { - init: function(options) { - var comp = this, I = this.getRuntime(); - var browseButton = Dom.get(options.browse_button); - - if (browseButton) { - browseButton.setAttribute('tabindex', -1); - browseButton = null; - } - - this.bind("Change", function() { - var files = I.shimExec.call(comp, 'FileInput', 'getFiles'); - comp.files = []; - Basic.each(files, function(file) { - comp.files.push(new File(I.uid, file)); - }); - }, 999); - - this.getRuntime().shimExec.call(this, 'FileInput', 'init', { - accept: options.accept, - multiple: options.multiple - }); - - this.trigger('ready'); - } - }; - - return (extensions.FileInput = FileInput); -}); - -// Included from: src/javascript/runtime/flash/file/FileReader.js - -/** - * FileReader.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/flash/file/FileReader -@private -*/ -define("moxie/runtime/flash/file/FileReader", [ - "moxie/runtime/flash/Runtime", - "moxie/core/utils/Encode" -], function(extensions, Encode) { - - function _formatData(data, op) { - switch (op) { - case 'readAsText': - return Encode.atob(data, 'utf8'); - case 'readAsBinaryString': - return Encode.atob(data); - case 'readAsDataURL': - return data; - } - return null; - } - - var FileReader = { - read: function(op, blob) { - var comp = this; - - comp.result = ''; - - // special prefix for DataURL read mode - if (op === 'readAsDataURL') { - comp.result = 'data:' + (blob.type || '') + ';base64,'; - } - - comp.bind('Progress', function(e, data) { - if (data) { - comp.result += _formatData(data, op); - } - }, 999); - - return comp.getRuntime().shimExec.call(this, 'FileReader', 'readAsBase64', blob.uid); - } - }; - - return (extensions.FileReader = FileReader); -}); - -// Included from: src/javascript/runtime/flash/file/FileReaderSync.js - -/** - * FileReaderSync.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/flash/file/FileReaderSync -@private -*/ -define("moxie/runtime/flash/file/FileReaderSync", [ - "moxie/runtime/flash/Runtime", - "moxie/core/utils/Encode" -], function(extensions, Encode) { - - function _formatData(data, op) { - switch (op) { - case 'readAsText': - return Encode.atob(data, 'utf8'); - case 'readAsBinaryString': - return Encode.atob(data); - case 'readAsDataURL': - return data; - } - return null; - } - - var FileReaderSync = { - read: function(op, blob) { - var result, self = this.getRuntime(); - - result = self.shimExec.call(this, 'FileReaderSync', 'readAsBase64', blob.uid); - if (!result) { - return null; // or throw ex - } - - // special prefix for DataURL read mode - if (op === 'readAsDataURL') { - result = 'data:' + (blob.type || '') + ';base64,' + result; - } - - return _formatData(result, op, blob.type); - } - }; - - return (extensions.FileReaderSync = FileReaderSync); -}); - -// Included from: src/javascript/runtime/flash/runtime/Transporter.js - -/** - * Transporter.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/flash/runtime/Transporter -@private -*/ -define("moxie/runtime/flash/runtime/Transporter", [ - "moxie/runtime/flash/Runtime", - "moxie/file/Blob" -], function(extensions, Blob) { - - var Transporter = { - getAsBlob: function(type) { - var self = this.getRuntime() - , blob = self.shimExec.call(this, 'Transporter', 'getAsBlob', type) - ; - if (blob) { - return new Blob(self.uid, blob); - } - return null; - } - }; - - return (extensions.Transporter = Transporter); -}); - -// Included from: src/javascript/runtime/flash/xhr/XMLHttpRequest.js - -/** - * XMLHttpRequest.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/flash/xhr/XMLHttpRequest -@private -*/ -define("moxie/runtime/flash/xhr/XMLHttpRequest", [ - "moxie/runtime/flash/Runtime", - "moxie/core/utils/Basic", - "moxie/file/Blob", - "moxie/file/File", - "moxie/file/FileReaderSync", - "moxie/runtime/flash/file/FileReaderSync", - "moxie/xhr/FormData", - "moxie/runtime/Transporter", - "moxie/runtime/flash/runtime/Transporter" -], function(extensions, Basic, Blob, File, FileReaderSync, FileReaderSyncFlash, FormData, Transporter, TransporterFlash) { - - var XMLHttpRequest = { - - send: function(meta, data) { - var target = this, self = target.getRuntime(); - - function send() { - meta.transport = self.mode; - self.shimExec.call(target, 'XMLHttpRequest', 'send', meta, data); - } - - - function appendBlob(name, blob) { - self.shimExec.call(target, 'XMLHttpRequest', 'appendBlob', name, blob.uid); - data = null; - send(); - } - - - function attachBlob(blob, cb) { - var tr = new Transporter(); - - tr.bind("TransportingComplete", function() { - cb(this.result); - }); - - tr.transport(blob.getSource(), blob.type, { - ruid: self.uid - }); - } - - // copy over the headers if any - if (!Basic.isEmptyObj(meta.headers)) { - Basic.each(meta.headers, function(value, header) { - self.shimExec.call(target, 'XMLHttpRequest', 'setRequestHeader', header, value.toString()); // Silverlight doesn't accept integers into the arguments of type object - }); - } - - // transfer over multipart params and blob itself - if (data instanceof FormData) { - var blobField; - data.each(function(value, name) { - if (value instanceof Blob) { - blobField = name; - } else { - self.shimExec.call(target, 'XMLHttpRequest', 'append', name, value); - } - }); - - if (!data.hasBlob()) { - data = null; - send(); - } else { - var blob = data.getBlob(); - if (blob.isDetached()) { - attachBlob(blob, function(attachedBlob) { - blob.destroy(); - appendBlob(blobField, attachedBlob); - }); - } else { - appendBlob(blobField, blob); - } - } - } else if (data instanceof Blob) { - if (data.isDetached()) { - attachBlob(data, function(attachedBlob) { - data.destroy(); - data = attachedBlob.uid; - send(); - }); - } else { - data = data.uid; - send(); - } - } else { - send(); - } - }, - - getResponse: function(responseType) { - var frs, blob, self = this.getRuntime(); - - blob = self.shimExec.call(this, 'XMLHttpRequest', 'getResponseAsBlob'); - - if (blob) { - blob = new File(self.uid, blob); - - if ('blob' === responseType) { - return blob; - } - - try { - frs = new FileReaderSync(); - - if (!!~Basic.inArray(responseType, ["", "text"])) { - return frs.readAsText(blob); - } else if ('json' === responseType && !!window.JSON) { - return JSON.parse(frs.readAsText(blob)); - } - } finally { - blob.destroy(); - } - } - return null; - }, - - abort: function(upload_complete_flag) { - var self = this.getRuntime(); - - self.shimExec.call(this, 'XMLHttpRequest', 'abort'); - - this.dispatchEvent('readystatechange'); - // this.dispatchEvent('progress'); - this.dispatchEvent('abort'); - - //if (!upload_complete_flag) { - // this.dispatchEvent('uploadprogress'); - //} - } - }; - - return (extensions.XMLHttpRequest = XMLHttpRequest); -}); - -// Included from: src/javascript/runtime/flash/image/Image.js - -/** - * Image.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/flash/image/Image -@private -*/ -define("moxie/runtime/flash/image/Image", [ - "moxie/runtime/flash/Runtime", - "moxie/core/utils/Basic", - "moxie/runtime/Transporter", - "moxie/file/Blob", - "moxie/file/FileReaderSync" -], function(extensions, Basic, Transporter, Blob, FileReaderSync) { - - var Image = { - loadFromBlob: function(blob) { - var comp = this, self = comp.getRuntime(); - - function exec(srcBlob) { - self.shimExec.call(comp, 'Image', 'loadFromBlob', srcBlob.uid); - comp = self = null; - } - - if (blob.isDetached()) { // binary string - var tr = new Transporter(); - tr.bind("TransportingComplete", function() { - exec(tr.result.getSource()); - }); - tr.transport(blob.getSource(), blob.type, { ruid: self.uid }); - } else { - exec(blob.getSource()); - } - }, - - loadFromImage: function(img) { - var self = this.getRuntime(); - return self.shimExec.call(this, 'Image', 'loadFromImage', img.uid); - }, - - getInfo: function() { - var self = this.getRuntime() - , info = self.shimExec.call(this, 'Image', 'getInfo') - ; - - if (info.meta && info.meta.thumb && info.meta.thumb.data && !(self.meta.thumb.data instanceof Blob)) { - info.meta.thumb.data = new Blob(self.uid, info.meta.thumb.data); - } - return info; - }, - - getAsBlob: function(type, quality) { - var self = this.getRuntime() - , blob = self.shimExec.call(this, 'Image', 'getAsBlob', type, quality) - ; - if (blob) { - return new Blob(self.uid, blob); - } - return null; - }, - - getAsDataURL: function() { - var self = this.getRuntime() - , blob = self.Image.getAsBlob.apply(this, arguments) - , frs - ; - if (!blob) { - return null; - } - frs = new FileReaderSync(); - return frs.readAsDataURL(blob); - } - }; - - return (extensions.Image = Image); -}); - -// Included from: src/javascript/runtime/silverlight/Runtime.js - -/** - * RunTime.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/*global ActiveXObject:true */ - -/** -Defines constructor for Silverlight runtime. - -@class moxie/runtime/silverlight/Runtime -@private -*/ -define("moxie/runtime/silverlight/Runtime", [ - "moxie/core/utils/Basic", - "moxie/core/utils/Env", - "moxie/core/utils/Dom", - "moxie/core/Exceptions", - "moxie/runtime/Runtime" -], function(Basic, Env, Dom, x, Runtime) { - - var type = "silverlight", extensions = {}; - - function isInstalled(version) { - var isVersionSupported = false, control = null, actualVer, - actualVerArray, reqVerArray, requiredVersionPart, actualVersionPart, index = 0; - - try { - try { - control = new ActiveXObject('AgControl.AgControl'); - - if (control.IsVersionSupported(version)) { - isVersionSupported = true; - } - - control = null; - } catch (e) { - var plugin = navigator.plugins["Silverlight Plug-In"]; - - if (plugin) { - actualVer = plugin.description; - - if (actualVer === "1.0.30226.2") { - actualVer = "2.0.30226.2"; - } - - actualVerArray = actualVer.split("."); - - while (actualVerArray.length > 3) { - actualVerArray.pop(); - } - - while ( actualVerArray.length < 4) { - actualVerArray.push(0); - } - - reqVerArray = version.split("."); - - while (reqVerArray.length > 4) { - reqVerArray.pop(); - } - - do { - requiredVersionPart = parseInt(reqVerArray[index], 10); - actualVersionPart = parseInt(actualVerArray[index], 10); - index++; - } while (index < reqVerArray.length && requiredVersionPart === actualVersionPart); - - if (requiredVersionPart <= actualVersionPart && !isNaN(requiredVersionPart)) { - isVersionSupported = true; - } - } - } - } catch (e2) { - isVersionSupported = false; - } - - return isVersionSupported; - } - - /** - Constructor for the Silverlight Runtime - */ - function SilverlightRuntime(options) { - var I = this, initTimer; - - options = Basic.extend({ xap_url: Env.xap_url }, options); - - Runtime.call(this, options, type, { - access_binary: Runtime.capTrue, - access_image_binary: Runtime.capTrue, - display_media: Runtime.capTest(defined('moxie/image/Image')), - do_cors: Runtime.capTrue, - drag_and_drop: false, - report_upload_progress: Runtime.capTrue, - resize_image: Runtime.capTrue, - return_response_headers: function(value) { - return value && I.mode === 'client'; - }, - return_response_type: function(responseType) { - if (responseType !== 'json') { - return true; - } else { - return !!window.JSON; - } - }, - return_status_code: function(code) { - return I.mode === 'client' || !Basic.arrayDiff(code, [200, 404]); - }, - select_file: Runtime.capTrue, - select_multiple: Runtime.capTrue, - send_binary_string: Runtime.capTrue, - send_browser_cookies: function(value) { - return value && I.mode === 'browser'; - }, - send_custom_headers: function(value) { - return value && I.mode === 'client'; - }, - send_multipart: Runtime.capTrue, - slice_blob: Runtime.capTrue, - stream_upload: true, - summon_file_dialog: false, - upload_filesize: Runtime.capTrue, - use_http_method: function(methods) { - return I.mode === 'client' || !Basic.arrayDiff(methods, ['GET', 'POST']); - } - }, { - // capabilities that require specific mode - return_response_headers: function(value) { - return value ? 'client' : 'browser'; - }, - return_status_code: function(code) { - return Basic.arrayDiff(code, [200, 404]) ? 'client' : ['client', 'browser']; - }, - send_browser_cookies: function(value) { - return value ? 'browser' : 'client'; - }, - send_custom_headers: function(value) { - return value ? 'client' : 'browser'; - }, - use_http_method: function(methods) { - return Basic.arrayDiff(methods, ['GET', 'POST']) ? 'client' : ['client', 'browser']; - } - }); - - - // minimal requirement - if (!isInstalled('2.0.31005.0') || Env.browser === 'Opera') { - if (MXI_DEBUG && Env.debug.runtime) { - Env.log("\tSilverlight is not installed or minimal version (2.0.31005.0) requirement not met (not likely)."); - } - - this.mode = false; - } - - - Basic.extend(this, { - getShim: function() { - return Dom.get(this.uid).content.Moxie; - }, - - shimExec: function(component, action) { - var args = [].slice.call(arguments, 2); - return I.getShim().exec(this.uid, component, action, args); - }, - - init : function() { - var container; - - container = this.getShimContainer(); - - container.innerHTML = '' + - '' + - '' + - '' + - '' + - '' + - ''; - - // Init is dispatched by the shim - initTimer = setTimeout(function() { - if (I && !I.initialized) { // runtime might be already destroyed by this moment - I.trigger("Error", new x.RuntimeError(x.RuntimeError.NOT_INIT_ERR)); - - if (MXI_DEBUG && Env.debug.runtime) { - Env.log("\Silverlight failed to initialize within a specified period of time (5-10s)."); - } - } - }, Env.OS !== 'Windows'? 10000 : 5000); // give it more time to initialize in non Windows OS (like Mac) - }, - - destroy: (function(destroy) { // extend default destroy method - return function() { - destroy.call(I); - clearTimeout(initTimer); // initialization check might be still onwait - options = initTimer = destroy = I = null; - }; - }(this.destroy)) - - }, extensions); - } - - Runtime.addConstructor(type, SilverlightRuntime); - - return extensions; -}); - -// Included from: src/javascript/runtime/silverlight/file/Blob.js - -/** - * Blob.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/silverlight/file/Blob -@private -*/ -define("moxie/runtime/silverlight/file/Blob", [ - "moxie/runtime/silverlight/Runtime", - "moxie/core/utils/Basic", - "moxie/runtime/flash/file/Blob" -], function(extensions, Basic, Blob) { - return (extensions.Blob = Basic.extend({}, Blob)); -}); - -// Included from: src/javascript/runtime/silverlight/file/FileInput.js - -/** - * FileInput.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/silverlight/file/FileInput -@private -*/ -define("moxie/runtime/silverlight/file/FileInput", [ - "moxie/runtime/silverlight/Runtime", - "moxie/file/File", - "moxie/core/utils/Dom", - "moxie/core/utils/Basic" -], function(extensions, File, Dom, Basic) { - - function toFilters(accept) { - var filter = ''; - for (var i = 0; i < accept.length; i++) { - filter += (filter !== '' ? '|' : '') + accept[i].title + " | *." + accept[i].extensions.replace(/,/g, ';*.'); - } - return filter; - } - - - var FileInput = { - init: function(options) { - var comp = this, I = this.getRuntime(); - var browseButton = Dom.get(options.browse_button); - - if (browseButton) { - browseButton.setAttribute('tabindex', -1); - browseButton = null; - } - - this.bind("Change", function() { - var files = I.shimExec.call(comp, 'FileInput', 'getFiles'); - comp.files = []; - Basic.each(files, function(file) { - comp.files.push(new File(I.uid, file)); - }); - }, 999); - - I.shimExec.call(this, 'FileInput', 'init', toFilters(options.accept), options.multiple); - this.trigger('ready'); - }, - - setOption: function(name, value) { - if (name == 'accept') { - value = toFilters(value); - } - this.getRuntime().shimExec.call(this, 'FileInput', 'setOption', name, value); - } - }; - - return (extensions.FileInput = FileInput); -}); - -// Included from: src/javascript/runtime/silverlight/file/FileDrop.js - -/** - * FileDrop.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/silverlight/file/FileDrop -@private -*/ -define("moxie/runtime/silverlight/file/FileDrop", [ - "moxie/runtime/silverlight/Runtime", - "moxie/core/utils/Dom", - "moxie/core/utils/Events" -], function(extensions, Dom, Events) { - - // not exactly useful, since works only in safari (...crickets...) - var FileDrop = { - init: function() { - var comp = this, self = comp.getRuntime(), dropZone; - - dropZone = self.getShimContainer(); - - Events.addEvent(dropZone, 'dragover', function(e) { - e.preventDefault(); - e.stopPropagation(); - e.dataTransfer.dropEffect = 'copy'; - }, comp.uid); - - Events.addEvent(dropZone, 'dragenter', function(e) { - e.preventDefault(); - var flag = Dom.get(self.uid).dragEnter(e); - // If handled, then stop propagation of event in DOM - if (flag) { - e.stopPropagation(); - } - }, comp.uid); - - Events.addEvent(dropZone, 'drop', function(e) { - e.preventDefault(); - var flag = Dom.get(self.uid).dragDrop(e); - // If handled, then stop propagation of event in DOM - if (flag) { - e.stopPropagation(); - } - }, comp.uid); - - return self.shimExec.call(this, 'FileDrop', 'init'); - } - }; - - return (extensions.FileDrop = FileDrop); -}); - -// Included from: src/javascript/runtime/silverlight/file/FileReader.js - -/** - * FileReader.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/silverlight/file/FileReader -@private -*/ -define("moxie/runtime/silverlight/file/FileReader", [ - "moxie/runtime/silverlight/Runtime", - "moxie/core/utils/Basic", - "moxie/runtime/flash/file/FileReader" -], function(extensions, Basic, FileReader) { - return (extensions.FileReader = Basic.extend({}, FileReader)); -}); - -// Included from: src/javascript/runtime/silverlight/file/FileReaderSync.js - -/** - * FileReaderSync.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/silverlight/file/FileReaderSync -@private -*/ -define("moxie/runtime/silverlight/file/FileReaderSync", [ - "moxie/runtime/silverlight/Runtime", - "moxie/core/utils/Basic", - "moxie/runtime/flash/file/FileReaderSync" -], function(extensions, Basic, FileReaderSync) { - return (extensions.FileReaderSync = Basic.extend({}, FileReaderSync)); -}); - -// Included from: src/javascript/runtime/silverlight/runtime/Transporter.js - -/** - * Transporter.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/silverlight/runtime/Transporter -@private -*/ -define("moxie/runtime/silverlight/runtime/Transporter", [ - "moxie/runtime/silverlight/Runtime", - "moxie/core/utils/Basic", - "moxie/runtime/flash/runtime/Transporter" -], function(extensions, Basic, Transporter) { - return (extensions.Transporter = Basic.extend({}, Transporter)); -}); - -// Included from: src/javascript/runtime/silverlight/xhr/XMLHttpRequest.js - -/** - * XMLHttpRequest.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/silverlight/xhr/XMLHttpRequest -@private -*/ -define("moxie/runtime/silverlight/xhr/XMLHttpRequest", [ - "moxie/runtime/silverlight/Runtime", - "moxie/core/utils/Basic", - "moxie/runtime/flash/xhr/XMLHttpRequest", - "moxie/runtime/silverlight/file/FileReaderSync", - "moxie/runtime/silverlight/runtime/Transporter" -], function(extensions, Basic, XMLHttpRequest, FileReaderSyncSilverlight, TransporterSilverlight) { - return (extensions.XMLHttpRequest = Basic.extend({}, XMLHttpRequest)); -}); - -// Included from: src/javascript/runtime/silverlight/image/Image.js - -/** - * Image.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/silverlight/image/Image -@private -*/ -define("moxie/runtime/silverlight/image/Image", [ - "moxie/runtime/silverlight/Runtime", - "moxie/core/utils/Basic", - "moxie/file/Blob", - "moxie/runtime/flash/image/Image" -], function(extensions, Basic, Blob, Image) { - return (extensions.Image = Basic.extend({}, Image, { - - getInfo: function() { - var self = this.getRuntime() - , grps = ['tiff', 'exif', 'gps', 'thumb'] - , info = { meta: {} } - , rawInfo = self.shimExec.call(this, 'Image', 'getInfo') - ; - - if (rawInfo.meta) { - Basic.each(grps, function(grp) { - var meta = rawInfo.meta[grp] - , tag - , i - , length - , value - ; - if (meta && meta.keys) { - info.meta[grp] = {}; - for (i = 0, length = meta.keys.length; i < length; i++) { - tag = meta.keys[i]; - value = meta[tag]; - if (value) { - // convert numbers - if (/^(\d|[1-9]\d+)$/.test(value)) { // integer (make sure doesn't start with zero) - value = parseInt(value, 10); - } else if (/^\d*\.\d+$/.test(value)) { // double - value = parseFloat(value); - } - info.meta[grp][tag] = value; - } - } - } - }); - - // save thumb data as blob - if (info.meta && info.meta.thumb && info.meta.thumb.data && !(self.meta.thumb.data instanceof Blob)) { - info.meta.thumb.data = new Blob(self.uid, info.meta.thumb.data); - } - } - - info.width = parseInt(rawInfo.width, 10); - info.height = parseInt(rawInfo.height, 10); - info.size = parseInt(rawInfo.size, 10); - info.type = rawInfo.type; - info.name = rawInfo.name; - - return info; - }, - - resize: function(rect, ratio, opts) { - this.getRuntime().shimExec.call(this, 'Image', 'resize', rect.x, rect.y, rect.width, rect.height, ratio, opts.preserveHeaders, opts.resample); - } - })); -}); - -// Included from: src/javascript/runtime/html4/Runtime.js - -/** - * Runtime.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/*global File:true */ - -/** -Defines constructor for HTML4 runtime. - -@class moxie/runtime/html4/Runtime -@private -*/ -define("moxie/runtime/html4/Runtime", [ - "moxie/core/utils/Basic", - "moxie/core/Exceptions", - "moxie/runtime/Runtime", - "moxie/core/utils/Env" -], function(Basic, x, Runtime, Env) { - - var type = 'html4', extensions = {}; - - function Html4Runtime(options) { - var I = this - , Test = Runtime.capTest - , True = Runtime.capTrue - ; - - Runtime.call(this, options, type, { - access_binary: Test(window.FileReader || window.File && File.getAsDataURL), - access_image_binary: false, - display_media: Test( - (Env.can('create_canvas') || Env.can('use_data_uri_over32kb')) && - defined('moxie/image/Image') - ), - do_cors: false, - drag_and_drop: false, - filter_by_extension: Test(function() { // if you know how to feature-detect this, please suggest - return !( - (Env.browser === 'Chrome' && Env.verComp(Env.version, 28, '<')) || - (Env.browser === 'IE' && Env.verComp(Env.version, 10, '<')) || - (Env.browser === 'Safari' && Env.verComp(Env.version, 7, '<')) || - (Env.browser === 'Firefox' && Env.verComp(Env.version, 37, '<')) - ); - }()), - resize_image: function() { - return extensions.Image && I.can('access_binary') && Env.can('create_canvas'); - }, - report_upload_progress: false, - return_response_headers: false, - return_response_type: function(responseType) { - if (responseType === 'json' && !!window.JSON) { - return true; - } - return !!~Basic.inArray(responseType, ['text', 'document', '']); - }, - return_status_code: function(code) { - return !Basic.arrayDiff(code, [200, 404]); - }, - select_file: function() { - return Env.can('use_fileinput'); - }, - select_multiple: false, - send_binary_string: false, - send_custom_headers: false, - send_multipart: true, - slice_blob: false, - stream_upload: function() { - return I.can('select_file'); - }, - summon_file_dialog: function() { // yeah... some dirty sniffing here... - return I.can('select_file') && !( - (Env.browser === 'Firefox' && Env.verComp(Env.version, 4, '<')) || - (Env.browser === 'Opera' && Env.verComp(Env.version, 12, '<')) || - (Env.browser === 'IE' && Env.verComp(Env.version, 10, '<')) - ); - }, - upload_filesize: True, - use_http_method: function(methods) { - return !Basic.arrayDiff(methods, ['GET', 'POST']); - } - }); - - - Basic.extend(this, { - init : function() { - this.trigger("Init"); - }, - - destroy: (function(destroy) { // extend default destroy method - return function() { - destroy.call(I); - destroy = I = null; - }; - }(this.destroy)) - }); - - Basic.extend(this.getShim(), extensions); - } - - Runtime.addConstructor(type, Html4Runtime); - - return extensions; -}); - -// Included from: src/javascript/runtime/html4/file/FileInput.js - -/** - * FileInput.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/html4/file/FileInput -@private -*/ -define("moxie/runtime/html4/file/FileInput", [ - "moxie/runtime/html4/Runtime", - "moxie/file/File", - "moxie/core/utils/Basic", - "moxie/core/utils/Dom", - "moxie/core/utils/Events", - "moxie/core/utils/Mime", - "moxie/core/utils/Env" -], function(extensions, File, Basic, Dom, Events, Mime, Env) { - - function FileInput() { - var _uid, _mimes = [], _options, _browseBtnZIndex; // save original z-index; - - function addInput() { - var comp = this, I = comp.getRuntime(), shimContainer, browseButton, currForm, form, input, uid; - - uid = Basic.guid('uid_'); - - shimContainer = I.getShimContainer(); // we get new ref every time to avoid memory leaks in IE - - if (_uid) { // move previous form out of the view - currForm = Dom.get(_uid + '_form'); - if (currForm) { - Basic.extend(currForm.style, { top: '100%' }); - // it shouldn't be possible to tab into the hidden element - currForm.firstChild.setAttribute('tabindex', -1); - } - } - - // build form in DOM, since innerHTML version not able to submit file for some reason - form = document.createElement('form'); - form.setAttribute('id', uid + '_form'); - form.setAttribute('method', 'post'); - form.setAttribute('enctype', 'multipart/form-data'); - form.setAttribute('encoding', 'multipart/form-data'); - - Basic.extend(form.style, { - overflow: 'hidden', - position: 'absolute', - top: 0, - left: 0, - width: '100%', - height: '100%' - }); - - input = document.createElement('input'); - input.setAttribute('id', uid); - input.setAttribute('type', 'file'); - input.setAttribute('accept', _mimes.join(',')); - - if (I.can('summon_file_dialog')) { - input.setAttribute('tabindex', -1); - } - - Basic.extend(input.style, { - fontSize: '999px', - opacity: 0 - }); - - form.appendChild(input); - shimContainer.appendChild(form); - - // prepare file input to be placed underneath the browse_button element - Basic.extend(input.style, { - position: 'absolute', - top: 0, - left: 0, - width: '100%', - height: '100%' - }); - - if (Env.browser === 'IE' && Env.verComp(Env.version, 10, '<')) { - Basic.extend(input.style, { - filter : "progid:DXImageTransform.Microsoft.Alpha(opacity=0)" - }); - } - - input.onchange = function() { // there should be only one handler for this - var file; - - if (!this.value) { - return; - } - - if (this.files) { // check if browser is fresh enough - file = this.files[0]; - } else { - file = { - name: this.value - }; - } - - file = new File(I.uid, file); - - // clear event handler - this.onchange = function() {}; - addInput.call(comp); - - comp.files = [file]; - - // substitute all ids with file uids (consider file.uid read-only - we cannot do it the other way around) - input.setAttribute('id', file.uid); - form.setAttribute('id', file.uid + '_form'); - - comp.trigger('change'); - - input = form = null; - }; - - - // route click event to the input - if (I.can('summon_file_dialog')) { - browseButton = Dom.get(_options.browse_button); - Events.removeEvent(browseButton, 'click', comp.uid); - Events.addEvent(browseButton, 'click', function(e) { - if (input && !input.disabled) { // for some reason FF (up to 8.0.1 so far) lets to click disabled input[type=file] - input.click(); - } - e.preventDefault(); - }, comp.uid); - } - - _uid = uid; - - shimContainer = currForm = browseButton = null; - } - - Basic.extend(this, { - init: function(options) { - var comp = this, I = comp.getRuntime(), shimContainer; - - // figure out accept string - _options = options; - _mimes = Mime.extList2mimes(options.accept, I.can('filter_by_extension')); - - shimContainer = I.getShimContainer(); - - (function() { - var browseButton, zIndex, top; - - browseButton = Dom.get(options.browse_button); - _browseBtnZIndex = Dom.getStyle(browseButton, 'z-index') || 'auto'; - - // Route click event to the input[type=file] element for browsers that support such behavior - if (I.can('summon_file_dialog')) { - if (Dom.getStyle(browseButton, 'position') === 'static') { - browseButton.style.position = 'relative'; - } - - comp.bind('Refresh', function() { - zIndex = parseInt(_browseBtnZIndex, 10) || 1; - - Dom.get(_options.browse_button).style.zIndex = zIndex; - this.getRuntime().getShimContainer().style.zIndex = zIndex - 1; - }); - } else { - // it shouldn't be possible to tab into the hidden element - browseButton.setAttribute('tabindex', -1); - } - - /* Since we have to place input[type=file] on top of the browse_button for some browsers, - browse_button loses interactivity, so we restore it here */ - top = I.can('summon_file_dialog') ? browseButton : shimContainer; - - Events.addEvent(top, 'mouseover', function() { - comp.trigger('mouseenter'); - }, comp.uid); - - Events.addEvent(top, 'mouseout', function() { - comp.trigger('mouseleave'); - }, comp.uid); - - Events.addEvent(top, 'mousedown', function() { - comp.trigger('mousedown'); - }, comp.uid); - - Events.addEvent(Dom.get(options.container), 'mouseup', function() { - comp.trigger('mouseup'); - }, comp.uid); - - browseButton = null; - }()); - - addInput.call(this); - - shimContainer = null; - - // trigger ready event asynchronously - comp.trigger({ - type: 'ready', - async: true - }); - }, - - setOption: function(name, value) { - var I = this.getRuntime(); - var input; - - if (name == 'accept') { - _mimes = value.mimes || Mime.extList2mimes(value, I.can('filter_by_extension')); - } - - // update current input - input = Dom.get(_uid) - if (input) { - input.setAttribute('accept', _mimes.join(',')); - } - }, - - - disable: function(state) { - var input; - - if ((input = Dom.get(_uid))) { - input.disabled = !!state; - } - }, - - destroy: function() { - var I = this.getRuntime() - , shim = I.getShim() - , shimContainer = I.getShimContainer() - , container = _options && Dom.get(_options.container) - , browseButton = _options && Dom.get(_options.browse_button) - ; - - if (container) { - Events.removeAllEvents(container, this.uid); - } - - if (browseButton) { - Events.removeAllEvents(browseButton, this.uid); - browseButton.style.zIndex = _browseBtnZIndex; // reset to original value - } - - if (shimContainer) { - Events.removeAllEvents(shimContainer, this.uid); - shimContainer.innerHTML = ''; - } - - shim.removeInstance(this.uid); - - _uid = _mimes = _options = shimContainer = container = browseButton = shim = null; - } - }); - } - - return (extensions.FileInput = FileInput); -}); - -// Included from: src/javascript/runtime/html4/file/FileReader.js - -/** - * FileReader.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/html4/file/FileReader -@private -*/ -define("moxie/runtime/html4/file/FileReader", [ - "moxie/runtime/html4/Runtime", - "moxie/runtime/html5/file/FileReader" -], function(extensions, FileReader) { - return (extensions.FileReader = FileReader); -}); - -// Included from: src/javascript/runtime/html4/xhr/XMLHttpRequest.js - -/** - * XMLHttpRequest.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/html4/xhr/XMLHttpRequest -@private -*/ -define("moxie/runtime/html4/xhr/XMLHttpRequest", [ - "moxie/runtime/html4/Runtime", - "moxie/core/utils/Basic", - "moxie/core/utils/Dom", - "moxie/core/utils/Url", - "moxie/core/Exceptions", - "moxie/core/utils/Events", - "moxie/file/Blob", - "moxie/xhr/FormData" -], function(extensions, Basic, Dom, Url, x, Events, Blob, FormData) { - - function XMLHttpRequest() { - var _status, _response, _iframe; - - function cleanup(cb) { - var target = this, uid, form, inputs, i, hasFile = false; - - if (!_iframe) { - return; - } - - uid = _iframe.id.replace(/_iframe$/, ''); - - form = Dom.get(uid + '_form'); - if (form) { - inputs = form.getElementsByTagName('input'); - i = inputs.length; - - while (i--) { - switch (inputs[i].getAttribute('type')) { - case 'hidden': - inputs[i].parentNode.removeChild(inputs[i]); - break; - case 'file': - hasFile = true; // flag the case for later - break; - } - } - inputs = []; - - if (!hasFile) { // we need to keep the form for sake of possible retries - form.parentNode.removeChild(form); - } - form = null; - } - - // without timeout, request is marked as canceled (in console) - setTimeout(function() { - Events.removeEvent(_iframe, 'load', target.uid); - if (_iframe.parentNode) { // #382 - _iframe.parentNode.removeChild(_iframe); - } - - // check if shim container has any other children, if - not, remove it as well - var shimContainer = target.getRuntime().getShimContainer(); - if (!shimContainer.children.length) { - shimContainer.parentNode.removeChild(shimContainer); - } - - shimContainer = _iframe = null; - cb(); - }, 1); - } - - Basic.extend(this, { - send: function(meta, data) { - var target = this, I = target.getRuntime(), uid, form, input, blob; - - _status = _response = null; - - function createIframe() { - var container = I.getShimContainer() || document.body - , temp = document.createElement('div') - ; - - // IE 6 won't be able to set the name using setAttribute or iframe.name - temp.innerHTML = ''; - _iframe = temp.firstChild; - container.appendChild(_iframe); - - /* _iframe.onreadystatechange = function() { - console.info(_iframe.readyState); - };*/ - - Events.addEvent(_iframe, 'load', function() { // _iframe.onload doesn't work in IE lte 8 - var el; - - try { - el = _iframe.contentWindow.document || _iframe.contentDocument || window.frames[_iframe.id].document; - - // try to detect some standard error pages - if (/^4(0[0-9]|1[0-7]|2[2346])\s/.test(el.title)) { // test if title starts with 4xx HTTP error - _status = el.title.replace(/^(\d+).*$/, '$1'); - } else { - _status = 200; - // get result - _response = Basic.trim(el.body.innerHTML); - - // we need to fire these at least once - target.trigger({ - type: 'progress', - loaded: _response.length, - total: _response.length - }); - - if (blob) { // if we were uploading a file - target.trigger({ - type: 'uploadprogress', - loaded: blob.size || 1025, - total: blob.size || 1025 - }); - } - } - } catch (ex) { - if (Url.hasSameOrigin(meta.url)) { - // if response is sent with error code, iframe in IE gets redirected to res://ieframe.dll/http_x.htm - // which obviously results to cross domain error (wtf?) - _status = 404; - } else { - cleanup.call(target, function() { - target.trigger('error'); - }); - return; - } - } - - cleanup.call(target, function() { - target.trigger('load'); - }); - }, target.uid); - } // end createIframe - - // prepare data to be sent and convert if required - if (data instanceof FormData && data.hasBlob()) { - blob = data.getBlob(); - uid = blob.uid; - input = Dom.get(uid); - form = Dom.get(uid + '_form'); - if (!form) { - throw new x.DOMException(x.DOMException.NOT_FOUND_ERR); - } - } else { - uid = Basic.guid('uid_'); - - form = document.createElement('form'); - form.setAttribute('id', uid + '_form'); - form.setAttribute('method', meta.method); - form.setAttribute('enctype', 'multipart/form-data'); - form.setAttribute('encoding', 'multipart/form-data'); - - I.getShimContainer().appendChild(form); - } - - // set upload target - form.setAttribute('target', uid + '_iframe'); - - if (data instanceof FormData) { - data.each(function(value, name) { - if (value instanceof Blob) { - if (input) { - input.setAttribute('name', name); - } - } else { - var hidden = document.createElement('input'); - - Basic.extend(hidden, { - type : 'hidden', - name : name, - value : value - }); - - // make sure that input[type="file"], if it's there, comes last - if (input) { - form.insertBefore(hidden, input); - } else { - form.appendChild(hidden); - } - } - }); - } - - // set destination url - form.setAttribute("action", meta.url); - - createIframe(); - form.submit(); - target.trigger('loadstart'); - }, - - getStatus: function() { - return _status; - }, - - getResponse: function(responseType) { - if ('json' === responseType) { - // strip off
..
tags that might be enclosing the response - if (Basic.typeOf(_response) === 'string' && !!window.JSON) { - try { - return JSON.parse(_response.replace(/^\s*]*>/, '').replace(/<\/pre>\s*$/, '')); - } catch (ex) { - return null; - } - } - } else if ('document' === responseType) { - - } - return _response; - }, - - abort: function() { - var target = this; - - if (_iframe && _iframe.contentWindow) { - if (_iframe.contentWindow.stop) { // FireFox/Safari/Chrome - _iframe.contentWindow.stop(); - } else if (_iframe.contentWindow.document.execCommand) { // IE - _iframe.contentWindow.document.execCommand('Stop'); - } else { - _iframe.src = "about:blank"; - } - } - - cleanup.call(this, function() { - // target.dispatchEvent('readystatechange'); - target.dispatchEvent('abort'); - }); - }, - - destroy: function() { - this.getRuntime().getShim().removeInstance(this.uid); - } - }); - } - - return (extensions.XMLHttpRequest = XMLHttpRequest); -}); - -// Included from: src/javascript/runtime/html4/image/Image.js - -/** - * Image.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -/** -@class moxie/runtime/html4/image/Image -@private -*/ -define("moxie/runtime/html4/image/Image", [ - "moxie/runtime/html4/Runtime", - "moxie/runtime/html5/image/Image" -], function(extensions, Image) { - return (extensions.Image = Image); -}); - -expose(["moxie/core/utils/Basic","moxie/core/utils/Encode","moxie/core/utils/Env","moxie/core/Exceptions","moxie/core/utils/Dom","moxie/core/EventTarget","moxie/runtime/Runtime","moxie/runtime/RuntimeClient","moxie/file/Blob","moxie/core/I18n","moxie/core/utils/Mime","moxie/file/FileInput","moxie/file/File","moxie/file/FileDrop","moxie/file/FileReader","moxie/core/utils/Url","moxie/runtime/RuntimeTarget","moxie/xhr/FormData","moxie/xhr/XMLHttpRequest","moxie/image/Image","moxie/core/utils/Events","moxie/runtime/html5/image/ResizerCanvas"]); -})(this); -})); \ No newline at end of file diff --git a/admin/src/js/pagedown.js b/admin/src/js/pagedown.js index aab4f834..05391f6f 100644 --- a/admin/src/js/pagedown.js +++ b/admin/src/js/pagedown.js @@ -1767,6 +1767,8 @@ else hooks.addNoop("enterFakeFullScreen"); hooks.addNoop("exitFullScreen"); + hooks.addNoop("save"); + this.getConverter = function () { return markdownConverter; } var that = this, @@ -3082,11 +3084,13 @@ else doClick(buttons.undo); } break; + case "s": + hooks.save(); + break; default: return; } - if (key.preventDefault) { key.preventDefault(); } diff --git a/admin/src/js/paste.js b/admin/src/js/paste.js deleted file mode 100644 index 21724b42..00000000 --- a/admin/src/js/paste.js +++ /dev/null @@ -1,443 +0,0 @@ -// Generated by CoffeeScript 1.12.7 - -/* -paste.js is an interface to read data ( text / image ) from clipboard in different browsers. It also contains several hacks. - -https://github.com/layerssss/paste.js - */ - -(function() { - var $, Paste, createHiddenEditable, dataURLtoBlob, isFocusable; - - $ = window.jQuery; - - $.paste = function(pasteContainer) { - var pm; - if (typeof console !== "undefined" && console !== null) { - console.log("DEPRECATED: This method is deprecated. Please use $.fn.pastableNonInputable() instead."); - } - pm = Paste.mountNonInputable(pasteContainer); - return pm._container; - }; - - $.fn.pastableNonInputable = function() { - var el, j, len, ref; - ref = this; - for (j = 0, len = ref.length; j < len; j++) { - el = ref[j]; - if (el._pastable || $(el).is('textarea, input:text, [contenteditable]')) { - continue; - } - Paste.mountNonInputable(el); - el._pastable = true; - } - return this; - }; - - $.fn.pastableTextarea = function() { - var el, j, len, ref; - ref = this; - for (j = 0, len = ref.length; j < len; j++) { - el = ref[j]; - if (el._pastable || $(el).is(':not(textarea, input:text)')) { - continue; - } - Paste.mountTextarea(el); - el._pastable = true; - } - return this; - }; - - $.fn.pastableContenteditable = function() { - var el, j, len, ref; - ref = this; - for (j = 0, len = ref.length; j < len; j++) { - el = ref[j]; - if (el._pastable || $(el).is(':not([contenteditable])')) { - continue; - } - Paste.mountContenteditable(el); - el._pastable = true; - } - return this; - }; - - dataURLtoBlob = function(dataURL, sliceSize) { - var b64Data, byteArray, byteArrays, byteCharacters, byteNumbers, contentType, i, m, offset, ref, slice; - if (sliceSize == null) { - sliceSize = 512; - } - if (!(m = dataURL.match(/^data\:([^\;]+)\;base64\,(.+)$/))) { - return null; - } - ref = m, m = ref[0], contentType = ref[1], b64Data = ref[2]; - byteCharacters = atob(b64Data); - byteArrays = []; - offset = 0; - while (offset < byteCharacters.length) { - slice = byteCharacters.slice(offset, offset + sliceSize); - byteNumbers = new Array(slice.length); - i = 0; - while (i < slice.length) { - byteNumbers[i] = slice.charCodeAt(i); - i++; - } - byteArray = new Uint8Array(byteNumbers); - byteArrays.push(byteArray); - offset += sliceSize; - } - return new Blob(byteArrays, { - type: contentType - }); - }; - - createHiddenEditable = function() { - return $(document.createElement('div')).attr('contenteditable', true).attr('aria-hidden', true).attr('tabindex', -1).css({ - width: 1, - height: 1, - position: 'fixed', - left: -100, - overflow: 'hidden', - opacity: 1e-17 - }); - }; - - isFocusable = function(element, hasTabindex) { - var fieldset, focusableIfVisible, img, map, mapName, nodeName; - map = void 0; - mapName = void 0; - img = void 0; - focusableIfVisible = void 0; - fieldset = void 0; - nodeName = element.nodeName.toLowerCase(); - if ('area' === nodeName) { - map = element.parentNode; - mapName = map.name; - if (!element.href || !mapName || map.nodeName.toLowerCase() !== 'map') { - return false; - } - img = $('img[usemap=\'#' + mapName + '\']'); - return img.length > 0 && img.is(':visible'); - } - if (/^(input|select|textarea|button|object)$/.test(nodeName)) { - focusableIfVisible = !element.disabled; - if (focusableIfVisible) { - fieldset = $(element).closest('fieldset')[0]; - if (fieldset) { - focusableIfVisible = !fieldset.disabled; - } - } - } else if ('a' === nodeName) { - focusableIfVisible = element.href || hasTabindex; - } else { - focusableIfVisible = hasTabindex; - } - focusableIfVisible = focusableIfVisible || $(element).is('[contenteditable]'); - return focusableIfVisible && $(element).is(':visible'); - }; - - Paste = (function() { - Paste.prototype._target = null; - - Paste.prototype._container = null; - - Paste.mountNonInputable = function(nonInputable) { - var paste; - paste = new Paste(createHiddenEditable().appendTo(nonInputable), nonInputable); - $(nonInputable).on('click', (function(_this) { - return function(ev) { - if (!(isFocusable(ev.target, false) || window.getSelection().toString())) { - return paste._container.focus(); - } - }; - })(this)); - paste._container.on('focus', (function(_this) { - return function() { - return $(nonInputable).addClass('pastable-focus'); - }; - })(this)); - return paste._container.on('blur', (function(_this) { - return function() { - return $(nonInputable).removeClass('pastable-focus'); - }; - })(this)); - }; - - Paste.mountTextarea = function(textarea) { - var ctlDown, paste, ref, ref1; - if ((typeof DataTransfer !== "undefined" && DataTransfer !== null ? DataTransfer.prototype : void 0) && ((ref = Object.getOwnPropertyDescriptor) != null ? (ref1 = ref.call(Object, DataTransfer.prototype, 'items')) != null ? ref1.get : void 0 : void 0)) { - return this.mountContenteditable(textarea); - } - paste = new Paste(createHiddenEditable().insertBefore(textarea), textarea); - ctlDown = false; - $(textarea).on('keyup', function(ev) { - var ref2; - if ((ref2 = ev.keyCode) === 17 || ref2 === 224) { - ctlDown = false; - } - return null; - }); - $(textarea).on('keydown', function(ev) { - var ref2; - if ((ref2 = ev.keyCode) === 17 || ref2 === 224) { - ctlDown = true; - } - if ((ev.ctrlKey != null) && (ev.metaKey != null)) { - ctlDown = ev.ctrlKey || ev.metaKey; - } - if (ctlDown && ev.keyCode === 86) { - paste._textarea_focus_stolen = true; - paste._container.focus(); - paste._paste_event_fired = false; - setTimeout((function(_this) { - return function() { - if (!paste._paste_event_fired) { - $(textarea).focus(); - return paste._textarea_focus_stolen = false; - } - }; - })(this), 1); - } - return null; - }); - $(textarea).on('paste', (function(_this) { - return function() {}; - })(this)); - $(textarea).on('focus', (function(_this) { - return function() { - if (!paste._textarea_focus_stolen) { - return $(textarea).addClass('pastable-focus'); - } - }; - })(this)); - $(textarea).on('blur', (function(_this) { - return function() { - if (!paste._textarea_focus_stolen) { - return $(textarea).removeClass('pastable-focus'); - } - }; - })(this)); - $(paste._target).on('_pasteCheckContainerDone', (function(_this) { - return function() { - $(textarea).focus(); - return paste._textarea_focus_stolen = false; - }; - })(this)); - return $(paste._target).on('pasteText', (function(_this) { - return function(ev, data) { - var content, curEnd, curStart; - curStart = $(textarea).prop('selectionStart'); - curEnd = $(textarea).prop('selectionEnd'); - content = $(textarea).val(); - $(textarea).val("" + content.slice(0, curStart) + data.text + content.slice(curEnd)); - $(textarea)[0].setSelectionRange(curStart + data.text.length, curStart + data.text.length); - return $(textarea).trigger('change'); - }; - })(this)); - }; - - Paste.mountContenteditable = function(contenteditable) { - var paste; - paste = new Paste(contenteditable, contenteditable); - $(contenteditable).on('focus', (function(_this) { - return function() { - return $(contenteditable).addClass('pastable-focus'); - }; - })(this)); - return $(contenteditable).on('blur', (function(_this) { - return function() { - return $(contenteditable).removeClass('pastable-focus'); - }; - })(this)); - }; - - function Paste(_container, _target) { - this._container = _container; - this._target = _target; - this._container = $(this._container); - this._target = $(this._target).addClass('pastable'); - this._container.on('paste', (function(_this) { - return function(ev) { - var _i, clipboardData, file, fileType, item, j, k, l, len, len1, len2, pastedFilename, reader, ref, ref1, ref2, ref3, ref4, stringIsFilename, text; - _this.originalEvent = (ev.originalEvent !== null ? ev.originalEvent : null); - _this._paste_event_fired = true; - if (((ref = ev.originalEvent) != null ? ref.clipboardData : void 0) != null) { - clipboardData = ev.originalEvent.clipboardData; - if (clipboardData.items) { - pastedFilename = null; - _this.originalEvent.pastedTypes = []; - ref1 = clipboardData.items; - for (j = 0, len = ref1.length; j < len; j++) { - item = ref1[j]; - if (item.type.match(/^text\/(plain|rtf|html)/)) { - _this.originalEvent.pastedTypes.push(item.type); - } - } - ref2 = clipboardData.items; - for (_i = k = 0, len1 = ref2.length; k < len1; _i = ++k) { - item = ref2[_i]; - if (item.type.match(/^image\//)) { - reader = new FileReader(); - reader.onload = function(event) { - return _this._handleImage(event.target.result, _this.originalEvent, pastedFilename); - }; - try { - reader.readAsDataURL(item.getAsFile()); - } catch (error) {} - ev.preventDefault(); - break; - } - if (item.type === 'text/plain') { - if (_i === 0 && clipboardData.items.length > 1 && clipboardData.items[1].type.match(/^image\//)) { - stringIsFilename = true; - fileType = clipboardData.items[1].type; - } - item.getAsString(function(string) { - if (stringIsFilename) { - pastedFilename = string; - return _this._target.trigger('pasteText', { - text: string, - isFilename: true, - fileType: fileType, - originalEvent: _this.originalEvent - }); - } else { - return _this._target.trigger('pasteText', { - text: string, - originalEvent: _this.originalEvent - }); - } - }); - } - if (item.type === 'text/rtf') { - item.getAsString(function(string) { - return _this._target.trigger('pasteTextRich', { - text: string, - originalEvent: _this.originalEvent - }); - }); - } - if (item.type === 'text/html') { - item.getAsString(function(string) { - return _this._target.trigger('pasteTextHtml', { - text: string, - originalEvent: _this.originalEvent - }); - }); - } - } - } else { - if (-1 !== Array.prototype.indexOf.call(clipboardData.types, 'text/plain')) { - text = clipboardData.getData('Text'); - setTimeout(function() { - return _this._target.trigger('pasteText', { - text: text, - originalEvent: _this.originalEvent - }); - }, 1); - } - _this._checkImagesInContainer(function(src) { - return _this._handleImage(src, _this.originalEvent); - }); - } - } - if (clipboardData = window.clipboardData) { - if ((ref3 = (text = clipboardData.getData('Text'))) != null ? ref3.length : void 0) { - setTimeout(function() { - _this._target.trigger('pasteText', { - text: text, - originalEvent: _this.originalEvent - }); - return _this._target.trigger('_pasteCheckContainerDone'); - }, 1); - } else { - ref4 = clipboardData.files; - for (l = 0, len2 = ref4.length; l < len2; l++) { - file = ref4[l]; - _this._handleImage(URL.createObjectURL(file), _this.originalEvent); - } - _this._checkImagesInContainer(function(src) {}); - } - } - return null; - }; - })(this)); - } - - Paste.prototype._handleImage = function(src, e, name) { - var loader; - if (src.match(/^webkit\-fake\-url\:\/\//)) { - return this._target.trigger('pasteImageError', { - message: "You are trying to paste an image in Safari, however we are unable to retieve its data." - }); - } - this._target.trigger('pasteImageStart'); - loader = new Image(); - loader.crossOrigin = "anonymous"; - loader.onload = (function(_this) { - return function() { - var blob, canvas, ctx, dataURL; - canvas = document.createElement('canvas'); - canvas.width = loader.width; - canvas.height = loader.height; - ctx = canvas.getContext('2d'); - ctx.drawImage(loader, 0, 0, canvas.width, canvas.height); - dataURL = null; - try { - dataURL = canvas.toDataURL('image/png'); - blob = dataURLtoBlob(dataURL); - } catch (error) {} - if (dataURL) { - _this._target.trigger('pasteImage', { - blob: blob, - dataURL: dataURL, - width: loader.width, - height: loader.height, - originalEvent: e, - name: name - }); - } - return _this._target.trigger('pasteImageEnd'); - }; - })(this); - loader.onerror = (function(_this) { - return function() { - _this._target.trigger('pasteImageError', { - message: "Failed to get image from: " + src, - url: src - }); - return _this._target.trigger('pasteImageEnd'); - }; - })(this); - return loader.src = src; - }; - - Paste.prototype._checkImagesInContainer = function(cb) { - var img, j, len, ref, timespan; - timespan = Math.floor(1000 * Math.random()); - ref = this._container.find('img'); - for (j = 0, len = ref.length; j < len; j++) { - img = ref[j]; - img["_paste_marked_" + timespan] = true; - } - return setTimeout((function(_this) { - return function() { - var k, len1, ref1; - ref1 = _this._container.find('img'); - for (k = 0, len1 = ref1.length; k < len1; k++) { - img = ref1[k]; - if (!img["_paste_marked_" + timespan]) { - cb(img.src); - $(img).remove(); - } - } - return _this._target.trigger('_pasteCheckContainerDone'); - }; - })(this), 1); - }; - - return Paste; - - })(); - -}).call(this); diff --git a/admin/src/js/plupload.js b/admin/src/js/plupload.js deleted file mode 100755 index fb0b36d4..00000000 --- a/admin/src/js/plupload.js +++ /dev/null @@ -1,2497 +0,0 @@ -/** - * Plupload - multi-runtime File Uploader - * v2.3.6 - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - * - * Date: 2017-11-03 - */ -;(function (global, factory) { - var extract = function() { - var ctx = {}; - factory.apply(ctx, arguments); - return ctx.plupload; - }; - - if (typeof define === "function" && define.amd) { - define("plupload", ['./moxie'], extract); - } else if (typeof module === "object" && module.exports) { - module.exports = extract(require('./moxie')); - } else { - global.plupload = extract(global.moxie); - } -}(this || window, function(moxie) { -/** - * Plupload.js - * - * Copyright 2013, Moxiecode Systems AB - * Released under GPL License. - * - * License: http://www.plupload.com/license - * Contributing: http://www.plupload.com/contributing - */ - -;(function(exports, o, undef) { - -var delay = window.setTimeout; -var fileFilters = {}; -var u = o.core.utils; -var Runtime = o.runtime.Runtime; - -// convert plupload features to caps acceptable by mOxie -function normalizeCaps(settings) { - var features = settings.required_features, caps = {}; - - function resolve(feature, value, strict) { - // Feature notation is deprecated, use caps (this thing here is required for backward compatibility) - var map = { - chunks: 'slice_blob', - jpgresize: 'send_binary_string', - pngresize: 'send_binary_string', - progress: 'report_upload_progress', - multi_selection: 'select_multiple', - dragdrop: 'drag_and_drop', - drop_element: 'drag_and_drop', - headers: 'send_custom_headers', - urlstream_upload: 'send_binary_string', - canSendBinary: 'send_binary', - triggerDialog: 'summon_file_dialog' - }; - - if (map[feature]) { - caps[map[feature]] = value; - } else if (!strict) { - caps[feature] = value; - } - } - - if (typeof(features) === 'string') { - plupload.each(features.split(/\s*,\s*/), function(feature) { - resolve(feature, true); - }); - } else if (typeof(features) === 'object') { - plupload.each(features, function(value, feature) { - resolve(feature, value); - }); - } else if (features === true) { - // check settings for required features - if (settings.chunk_size && settings.chunk_size > 0) { - caps.slice_blob = true; - } - - if (!plupload.isEmptyObj(settings.resize) || settings.multipart === false) { - caps.send_binary_string = true; - } - - if (settings.http_method) { - caps.use_http_method = settings.http_method; - } - - plupload.each(settings, function(value, feature) { - resolve(feature, !!value, true); // strict check - }); - } - - return caps; -} - -/** - * @module plupload - * @static - */ -var plupload = { - /** - * Plupload version will be replaced on build. - * - * @property VERSION - * @for Plupload - * @static - * @final - */ - VERSION : '2.3.6', - - /** - * The state of the queue before it has started and after it has finished - * - * @property STOPPED - * @static - * @final - */ - STOPPED : 1, - - /** - * Upload process is running - * - * @property STARTED - * @static - * @final - */ - STARTED : 2, - - /** - * File is queued for upload - * - * @property QUEUED - * @static - * @final - */ - QUEUED : 1, - - /** - * File is being uploaded - * - * @property UPLOADING - * @static - * @final - */ - UPLOADING : 2, - - /** - * File has failed to be uploaded - * - * @property FAILED - * @static - * @final - */ - FAILED : 4, - - /** - * File has been uploaded successfully - * - * @property DONE - * @static - * @final - */ - DONE : 5, - - // Error constants used by the Error event - - /** - * Generic error for example if an exception is thrown inside Silverlight. - * - * @property GENERIC_ERROR - * @static - * @final - */ - GENERIC_ERROR : -100, - - /** - * HTTP transport error. For example if the server produces a HTTP status other than 200. - * - * @property HTTP_ERROR - * @static - * @final - */ - HTTP_ERROR : -200, - - /** - * Generic I/O error. For example if it wasn't possible to open the file stream on local machine. - * - * @property IO_ERROR - * @static - * @final - */ - IO_ERROR : -300, - - /** - * @property SECURITY_ERROR - * @static - * @final - */ - SECURITY_ERROR : -400, - - /** - * Initialization error. Will be triggered if no runtime was initialized. - * - * @property INIT_ERROR - * @static - * @final - */ - INIT_ERROR : -500, - - /** - * File size error. If the user selects a file that is too large or is empty it will be blocked and - * an error of this type will be triggered. - * - * @property FILE_SIZE_ERROR - * @static - * @final - */ - FILE_SIZE_ERROR : -600, - - /** - * File extension error. If the user selects a file that isn't valid according to the filters setting. - * - * @property FILE_EXTENSION_ERROR - * @static - * @final - */ - FILE_EXTENSION_ERROR : -601, - - /** - * Duplicate file error. If prevent_duplicates is set to true and user selects the same file again. - * - * @property FILE_DUPLICATE_ERROR - * @static - * @final - */ - FILE_DUPLICATE_ERROR : -602, - - /** - * Runtime will try to detect if image is proper one. Otherwise will throw this error. - * - * @property IMAGE_FORMAT_ERROR - * @static - * @final - */ - IMAGE_FORMAT_ERROR : -700, - - /** - * While working on files runtime may run out of memory and will throw this error. - * - * @since 2.1.2 - * @property MEMORY_ERROR - * @static - * @final - */ - MEMORY_ERROR : -701, - - /** - * Each runtime has an upper limit on a dimension of the image it can handle. If bigger, will throw this error. - * - * @property IMAGE_DIMENSIONS_ERROR - * @static - * @final - */ - IMAGE_DIMENSIONS_ERROR : -702, - - /** - * Expose whole moxie (#1469). - * - * @property moxie - * @type Object - * @final - */ - moxie: o, - - /** - * Mime type lookup table. - * - * @property mimeTypes - * @type Object - * @final - */ - mimeTypes : u.Mime.mimes, - - /** - * In some cases sniffing is the only way around :( - */ - ua: u.Env, - - /** - * Gets the true type of the built-in object (better version of typeof). - * @credits Angus Croll (http://javascriptweblog.wordpress.com/) - * - * @method typeOf - * @static - * @param {Object} o Object to check. - * @return {String} Object [[Class]] - */ - typeOf: u.Basic.typeOf, - - /** - * Extends the specified object with another object. - * - * @method extend - * @static - * @param {Object} target Object to extend. - * @param {Object..} obj Multiple objects to extend with. - * @return {Object} Same as target, the extended object. - */ - extend : u.Basic.extend, - - /** - * Generates an unique ID. This is 99.99% unique since it takes the current time and 5 random numbers. - * The only way a user would be able to get the same ID is if the two persons at the same exact millisecond manages - * to get 5 the same random numbers between 0-65535 it also uses a counter so each call will be guaranteed to be page unique. - * It's more probable for the earth to be hit with an asteriod. You can also if you want to be 100% sure set the plupload.guidPrefix property - * to an user unique key. - * - * @method guid - * @static - * @return {String} Virtually unique id. - */ - guid : u.Basic.guid, - - /** - * Get array of DOM Elements by their ids. - * - * @method get - * @param {String} id Identifier of the DOM Element - * @return {Array} - */ - getAll : function get(ids) { - var els = [], el; - - if (plupload.typeOf(ids) !== 'array') { - ids = [ids]; - } - - var i = ids.length; - while (i--) { - el = plupload.get(ids[i]); - if (el) { - els.push(el); - } - } - - return els.length ? els : null; - }, - - /** - Get DOM element by id - - @method get - @param {String} id Identifier of the DOM Element - @return {Node} - */ - get: u.Dom.get, - - /** - * Executes the callback function for each item in array/object. If you return false in the - * callback it will break the loop. - * - * @method each - * @static - * @param {Object} obj Object to iterate. - * @param {function} callback Callback function to execute for each item. - */ - each : u.Basic.each, - - /** - * Returns the absolute x, y position of an Element. The position will be returned in a object with x, y fields. - * - * @method getPos - * @static - * @param {Element} node HTML element or element id to get x, y position from. - * @param {Element} root Optional root element to stop calculations at. - * @return {object} Absolute position of the specified element object with x, y fields. - */ - getPos : u.Dom.getPos, - - /** - * Returns the size of the specified node in pixels. - * - * @method getSize - * @static - * @param {Node} node Node to get the size of. - * @return {Object} Object with a w and h property. - */ - getSize : u.Dom.getSize, - - /** - * Encodes the specified string. - * - * @method xmlEncode - * @static - * @param {String} s String to encode. - * @return {String} Encoded string. - */ - xmlEncode : function(str) { - var xmlEncodeChars = {'<' : 'lt', '>' : 'gt', '&' : 'amp', '"' : 'quot', '\'' : '#39'}, xmlEncodeRegExp = /[<>&\"\']/g; - - return str ? ('' + str).replace(xmlEncodeRegExp, function(chr) { - return xmlEncodeChars[chr] ? '&' + xmlEncodeChars[chr] + ';' : chr; - }) : str; - }, - - /** - * Forces anything into an array. - * - * @method toArray - * @static - * @param {Object} obj Object with length field. - * @return {Array} Array object containing all items. - */ - toArray : u.Basic.toArray, - - /** - * Find an element in array and return its index if present, otherwise return -1. - * - * @method inArray - * @static - * @param {mixed} needle Element to find - * @param {Array} array - * @return {Int} Index of the element, or -1 if not found - */ - inArray : u.Basic.inArray, - - /** - Recieve an array of functions (usually async) to call in sequence, each function - receives a callback as first argument that it should call, when it completes. Finally, - after everything is complete, main callback is called. Passing truthy value to the - callback as a first argument will interrupt the sequence and invoke main callback - immediately. - - @method inSeries - @static - @param {Array} queue Array of functions to call in sequence - @param {Function} cb Main callback that is called in the end, or in case of error - */ - inSeries: u.Basic.inSeries, - - /** - * Extends the language pack object with new items. - * - * @method addI18n - * @static - * @param {Object} pack Language pack items to add. - * @return {Object} Extended language pack object. - */ - addI18n : o.core.I18n.addI18n, - - /** - * Translates the specified string by checking for the english string in the language pack lookup. - * - * @method translate - * @static - * @param {String} str String to look for. - * @return {String} Translated string or the input string if it wasn't found. - */ - translate : o.core.I18n.translate, - - /** - * Pseudo sprintf implementation - simple way to replace tokens with specified values. - * - * @param {String} str String with tokens - * @return {String} String with replaced tokens - */ - sprintf : u.Basic.sprintf, - - /** - * Checks if object is empty. - * - * @method isEmptyObj - * @static - * @param {Object} obj Object to check. - * @return {Boolean} - */ - isEmptyObj : u.Basic.isEmptyObj, - - /** - * Checks if specified DOM element has specified class. - * - * @method hasClass - * @static - * @param {Object} obj DOM element like object to add handler to. - * @param {String} name Class name - */ - hasClass : u.Dom.hasClass, - - /** - * Adds specified className to specified DOM element. - * - * @method addClass - * @static - * @param {Object} obj DOM element like object to add handler to. - * @param {String} name Class name - */ - addClass : u.Dom.addClass, - - /** - * Removes specified className from specified DOM element. - * - * @method removeClass - * @static - * @param {Object} obj DOM element like object to add handler to. - * @param {String} name Class name - */ - removeClass : u.Dom.removeClass, - - /** - * Returns a given computed style of a DOM element. - * - * @method getStyle - * @static - * @param {Object} obj DOM element like object. - * @param {String} name Style you want to get from the DOM element - */ - getStyle : u.Dom.getStyle, - - /** - * Adds an event handler to the specified object and store reference to the handler - * in objects internal Plupload registry (@see removeEvent). - * - * @method addEvent - * @static - * @param {Object} obj DOM element like object to add handler to. - * @param {String} name Name to add event listener to. - * @param {Function} callback Function to call when event occurs. - * @param {String} (optional) key that might be used to add specifity to the event record. - */ - addEvent : u.Events.addEvent, - - /** - * Remove event handler from the specified object. If third argument (callback) - * is not specified remove all events with the specified name. - * - * @method removeEvent - * @static - * @param {Object} obj DOM element to remove event listener(s) from. - * @param {String} name Name of event listener to remove. - * @param {Function|String} (optional) might be a callback or unique key to match. - */ - removeEvent: u.Events.removeEvent, - - /** - * Remove all kind of events from the specified object - * - * @method removeAllEvents - * @static - * @param {Object} obj DOM element to remove event listeners from. - * @param {String} (optional) unique key to match, when removing events. - */ - removeAllEvents: u.Events.removeAllEvents, - - /** - * Cleans the specified name from national characters (diacritics). The result will be a name with only a-z, 0-9 and _. - * - * @method cleanName - * @static - * @param {String} s String to clean up. - * @return {String} Cleaned string. - */ - cleanName : function(name) { - var i, lookup; - - // Replace diacritics - lookup = [ - /[\300-\306]/g, 'A', /[\340-\346]/g, 'a', - /\307/g, 'C', /\347/g, 'c', - /[\310-\313]/g, 'E', /[\350-\353]/g, 'e', - /[\314-\317]/g, 'I', /[\354-\357]/g, 'i', - /\321/g, 'N', /\361/g, 'n', - /[\322-\330]/g, 'O', /[\362-\370]/g, 'o', - /[\331-\334]/g, 'U', /[\371-\374]/g, 'u' - ]; - - for (i = 0; i < lookup.length; i += 2) { - name = name.replace(lookup[i], lookup[i + 1]); - } - - // Replace whitespace - name = name.replace(/\s+/g, '_'); - - // Remove anything else - name = name.replace(/[^a-z0-9_\-\.]+/gi, ''); - - return name; - }, - - /** - * Builds a full url out of a base URL and an object with items to append as query string items. - * - * @method buildUrl - * @static - * @param {String} url Base URL to append query string items to. - * @param {Object} items Name/value object to serialize as a querystring. - * @return {String} String with url + serialized query string items. - */ - buildUrl: function(url, items) { - var query = ''; - - plupload.each(items, function(value, name) { - query += (query ? '&' : '') + encodeURIComponent(name) + '=' + encodeURIComponent(value); - }); - - if (query) { - url += (url.indexOf('?') > 0 ? '&' : '?') + query; - } - - return url; - }, - - /** - * Formats the specified number as a size string for example 1024 becomes 1 KB. - * - * @method formatSize - * @static - * @param {Number} size Size to format as string. - * @return {String} Formatted size string. - */ - formatSize : function(size) { - - if (size === undef || /\D/.test(size)) { - return plupload.translate('N/A'); - } - - function round(num, precision) { - return Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision); - } - - var boundary = Math.pow(1024, 4); - - // TB - if (size > boundary) { - return round(size / boundary, 1) + " " + plupload.translate('tb'); - } - - // GB - if (size > (boundary/=1024)) { - return round(size / boundary, 1) + " " + plupload.translate('gb'); - } - - // MB - if (size > (boundary/=1024)) { - return round(size / boundary, 1) + " " + plupload.translate('mb'); - } - - // KB - if (size > 1024) { - return Math.round(size / 1024) + " " + plupload.translate('kb'); - } - - return size + " " + plupload.translate('b'); - }, - - - /** - * Parses the specified size string into a byte value. For example 10kb becomes 10240. - * - * @method parseSize - * @static - * @param {String|Number} size String to parse or number to just pass through. - * @return {Number} Size in bytes. - */ - parseSize : u.Basic.parseSizeStr, - - - /** - * A way to predict what runtime will be choosen in the current environment with the - * specified settings. - * - * @method predictRuntime - * @static - * @param {Object|String} config Plupload settings to check - * @param {String} [runtimes] Comma-separated list of runtimes to check against - * @return {String} Type of compatible runtime - */ - predictRuntime : function(config, runtimes) { - var up, runtime; - - up = new plupload.Uploader(config); - runtime = Runtime.thatCan(up.getOption().required_features, runtimes || config.runtimes); - up.destroy(); - return runtime; - }, - - /** - * Registers a filter that will be executed for each file added to the queue. - * If callback returns false, file will not be added. - * - * Callback receives two arguments: a value for the filter as it was specified in settings.filters - * and a file to be filtered. Callback is executed in the context of uploader instance. - * - * @method addFileFilter - * @static - * @param {String} name Name of the filter by which it can be referenced in settings.filters - * @param {String} cb Callback - the actual routine that every added file must pass - */ - addFileFilter: function(name, cb) { - fileFilters[name] = cb; - } -}; - - -plupload.addFileFilter('mime_types', function(filters, file, cb) { - if (filters.length && !filters.regexp.test(file.name)) { - this.trigger('Error', { - code : plupload.FILE_EXTENSION_ERROR, - message : plupload.translate('File extension error.'), - file : file - }); - cb(false); - } else { - cb(true); - } -}); - - -plupload.addFileFilter('max_file_size', function(maxSize, file, cb) { - var undef; - - maxSize = plupload.parseSize(maxSize); - - // Invalid file size - if (file.size !== undef && maxSize && file.size > maxSize) { - this.trigger('Error', { - code : plupload.FILE_SIZE_ERROR, - message : plupload.translate('File size error.'), - file : file - }); - cb(false); - } else { - cb(true); - } -}); - - -plupload.addFileFilter('prevent_duplicates', function(value, file, cb) { - if (value) { - var ii = this.files.length; - while (ii--) { - // Compare by name and size (size might be 0 or undefined, but still equivalent for both) - if (file.name === this.files[ii].name && file.size === this.files[ii].size) { - this.trigger('Error', { - code : plupload.FILE_DUPLICATE_ERROR, - message : plupload.translate('Duplicate file error.'), - file : file - }); - cb(false); - return; - } - } - } - cb(true); -}); - -plupload.addFileFilter('prevent_empty', function(value, file, cb) { - if (value && !file.size && file.size !== undef) { - this.trigger('Error', { - code : plupload.FILE_SIZE_ERROR, - message : plupload.translate('File size error.'), - file : file - }); - cb(false); - } else { - cb(true); - } -}); - - -/** -@class Uploader -@constructor - -@param {Object} settings For detailed information about each option check documentation. - @param {String|DOMElement} settings.browse_button id of the DOM element or DOM element itself to use as file dialog trigger. - @param {Number|String} [settings.chunk_size=0] Chunk size in bytes to slice the file into. Shorcuts with b, kb, mb, gb, tb suffixes also supported. `e.g. 204800 or "204800b" or "200kb"`. By default - disabled. - @param {String|DOMElement} [settings.container] id of the DOM element or DOM element itself that will be used to wrap uploader structures. Defaults to immediate parent of the `browse_button` element. - @param {String|DOMElement} [settings.drop_element] id of the DOM element or DOM element itself to use as a drop zone for Drag-n-Drop. - @param {String} [settings.file_data_name="file"] Name for the file field in Multipart formated message. - @param {Object} [settings.filters={}] Set of file type filters. - @param {String|Number} [settings.filters.max_file_size=0] Maximum file size that the user can pick, in bytes. Optionally supports b, kb, mb, gb, tb suffixes. `e.g. "10mb" or "1gb"`. By default - not set. Dispatches `plupload.FILE_SIZE_ERROR`. - @param {Array} [settings.filters.mime_types=[]] List of file types to accept, each one defined by title and list of extensions. `e.g. {title : "Image files", extensions : "jpg,jpeg,gif,png"}`. Dispatches `plupload.FILE_EXTENSION_ERROR` - @param {Boolean} [settings.filters.prevent_duplicates=false] Do not let duplicates into the queue. Dispatches `plupload.FILE_DUPLICATE_ERROR`. - @param {Boolean} [settings.filters.prevent_empty=true] Do not let empty files into the queue (IE10 is known to hang for example when trying to upload such). Dispatches `plupload.FILE_SIZE_ERROR`. - @param {String} [settings.flash_swf_url] URL of the Flash swf. - @param {Object} [settings.headers] Custom headers to send with the upload. Hash of name/value pairs. - @param {String} [settings.http_method="POST"] HTTP method to use during upload (only PUT or POST allowed). - @param {Number} [settings.max_retries=0] How many times to retry the chunk or file, before triggering Error event. - @param {Boolean} [settings.multipart=true] Whether to send file and additional parameters as Multipart formated message. - @param {Object} [settings.multipart_params] Hash of key/value pairs to send with every file upload. - @param {Boolean} [settings.multi_selection=true] Enable ability to select multiple files at once in file dialog. - @param {String|Object} [settings.required_features] Either comma-separated list or hash of required features that chosen runtime should absolutely possess. - @param {Object} [settings.resize] Enable resizng of images on client-side. Applies to `image/jpeg` and `image/png` only. `e.g. {width : 200, height : 200, quality : 90, crop: true}` - @param {Number} [settings.resize.width] If image is bigger, it will be resized. - @param {Number} [settings.resize.height] If image is bigger, it will be resized. - @param {Number} [settings.resize.quality=90] Compression quality for jpegs (1-100). - @param {Boolean} [settings.resize.crop=false] Whether to crop images to exact dimensions. By default they will be resized proportionally. - @param {String} [settings.runtimes="html5,flash,silverlight,html4"] Comma separated list of runtimes, that Plupload will try in turn, moving to the next if previous fails. - @param {String} [settings.silverlight_xap_url] URL of the Silverlight xap. - @param {Boolean} [settings.send_chunk_number=true] Whether to send chunks and chunk numbers, or total and offset bytes. - @param {Boolean} [settings.send_file_name=true] Whether to send file name as additional argument - 'name' (required for chunked uploads and some other cases where file name cannot be sent via normal ways). - @param {String} settings.url URL of the server-side upload handler. - @param {Boolean} [settings.unique_names=false] If true will generate unique filenames for uploaded files. - -*/ -plupload.Uploader = function(options) { - /** - Fires when the current RunTime has been initialized. - - @event Init - @param {plupload.Uploader} uploader Uploader instance sending the event. - */ - - /** - Fires after the init event incase you need to perform actions there. - - @event PostInit - @param {plupload.Uploader} uploader Uploader instance sending the event. - */ - - /** - Fires when the option is changed in via uploader.setOption(). - - @event OptionChanged - @since 2.1 - @param {plupload.Uploader} uploader Uploader instance sending the event. - @param {String} name Name of the option that was changed - @param {Mixed} value New value for the specified option - @param {Mixed} oldValue Previous value of the option - */ - - /** - Fires when the silverlight/flash or other shim needs to move. - - @event Refresh - @param {plupload.Uploader} uploader Uploader instance sending the event. - */ - - /** - Fires when the overall state is being changed for the upload queue. - - @event StateChanged - @param {plupload.Uploader} uploader Uploader instance sending the event. - */ - - /** - Fires when browse_button is clicked and browse dialog shows. - - @event Browse - @since 2.1.2 - @param {plupload.Uploader} uploader Uploader instance sending the event. - */ - - /** - Fires for every filtered file before it is added to the queue. - - @event FileFiltered - @since 2.1 - @param {plupload.Uploader} uploader Uploader instance sending the event. - @param {plupload.File} file Another file that has to be added to the queue. - */ - - /** - Fires when the file queue is changed. In other words when files are added/removed to the files array of the uploader instance. - - @event QueueChanged - @param {plupload.Uploader} uploader Uploader instance sending the event. - */ - - /** - Fires after files were filtered and added to the queue. - - @event FilesAdded - @param {plupload.Uploader} uploader Uploader instance sending the event. - @param {Array} files Array of file objects that were added to queue by the user. - */ - - /** - Fires when file is removed from the queue. - - @event FilesRemoved - @param {plupload.Uploader} uploader Uploader instance sending the event. - @param {Array} files Array of files that got removed. - */ - - /** - Fires just before a file is uploaded. Can be used to cancel the upload for the specified file - by returning false from the handler. - - @event BeforeUpload - @param {plupload.Uploader} uploader Uploader instance sending the event. - @param {plupload.File} file File to be uploaded. - */ - - /** - Fires when a file is to be uploaded by the runtime. - - @event UploadFile - @param {plupload.Uploader} uploader Uploader instance sending the event. - @param {plupload.File} file File to be uploaded. - */ - - /** - Fires while a file is being uploaded. Use this event to update the current file upload progress. - - @event UploadProgress - @param {plupload.Uploader} uploader Uploader instance sending the event. - @param {plupload.File} file File that is currently being uploaded. - */ - - /** - * Fires just before a chunk is uploaded. This event enables you to override settings - * on the uploader instance before the chunk is uploaded. - * - * @event BeforeChunkUpload - * @param {plupload.Uploader} uploader Uploader instance sending the event. - * @param {plupload.File} file File to be uploaded. - * @param {Object} args POST params to be sent. - * @param {Blob} chunkBlob Current blob. - * @param {offset} offset Current offset. - */ - - /** - Fires when file chunk is uploaded. - - @event ChunkUploaded - @param {plupload.Uploader} uploader Uploader instance sending the event. - @param {plupload.File} file File that the chunk was uploaded for. - @param {Object} result Object with response properties. - @param {Number} result.offset The amount of bytes the server has received so far, including this chunk. - @param {Number} result.total The size of the file. - @param {String} result.response The response body sent by the server. - @param {Number} result.status The HTTP status code sent by the server. - @param {String} result.responseHeaders All the response headers as a single string. - */ - - /** - Fires when a file is successfully uploaded. - - @event FileUploaded - @param {plupload.Uploader} uploader Uploader instance sending the event. - @param {plupload.File} file File that was uploaded. - @param {Object} result Object with response properties. - @param {String} result.response The response body sent by the server. - @param {Number} result.status The HTTP status code sent by the server. - @param {String} result.responseHeaders All the response headers as a single string. - */ - - /** - Fires when all files in a queue are uploaded. - - @event UploadComplete - @param {plupload.Uploader} uploader Uploader instance sending the event. - @param {Array} files Array of file objects that was added to queue/selected by the user. - */ - - /** - Fires when a error occurs. - - @event Error - @param {plupload.Uploader} uploader Uploader instance sending the event. - @param {Object} error Contains code, message and sometimes file and other details. - @param {Number} error.code The plupload error code. - @param {String} error.message Description of the error (uses i18n). - */ - - /** - Fires when destroy method is called. - - @event Destroy - @param {plupload.Uploader} uploader Uploader instance sending the event. - */ - var uid = plupload.guid() - , settings - , files = [] - , preferred_caps = {} - , fileInputs = [] - , fileDrops = [] - , startTime - , total - , disabled = false - , xhr - ; - - - // Private methods - function uploadNext() { - var file, count = 0, i; - - if (this.state == plupload.STARTED) { - // Find first QUEUED file - for (i = 0; i < files.length; i++) { - if (!file && files[i].status == plupload.QUEUED) { - file = files[i]; - if (this.trigger("BeforeUpload", file)) { - file.status = plupload.UPLOADING; - this.trigger("UploadFile", file); - } - } else { - count++; - } - } - - // All files are DONE or FAILED - if (count == files.length) { - if (this.state !== plupload.STOPPED) { - this.state = plupload.STOPPED; - this.trigger("StateChanged"); - } - this.trigger("UploadComplete", files); - } - } - } - - - function calcFile(file) { - file.percent = file.size > 0 ? Math.ceil(file.loaded / file.size * 100) : 100; - calc(); - } - - - function calc() { - var i, file; - var loaded; - var loadedDuringCurrentSession = 0; - - // Reset stats - total.reset(); - - // Check status, size, loaded etc on all files - for (i = 0; i < files.length; i++) { - file = files[i]; - - if (file.size !== undef) { - // We calculate totals based on original file size - total.size += file.origSize; - - // Since we cannot predict file size after resize, we do opposite and - // interpolate loaded amount to match magnitude of total - loaded = file.loaded * file.origSize / file.size; - - if (!file.completeTimestamp || file.completeTimestamp > startTime) { - loadedDuringCurrentSession += loaded; - } - - total.loaded += loaded; - } else { - total.size = undef; - } - - if (file.status == plupload.DONE) { - total.uploaded++; - } else if (file.status == plupload.FAILED) { - total.failed++; - } else { - total.queued++; - } - } - - // If we couldn't calculate a total file size then use the number of files to calc percent - if (total.size === undef) { - total.percent = files.length > 0 ? Math.ceil(total.uploaded / files.length * 100) : 0; - } else { - total.bytesPerSec = Math.ceil(loadedDuringCurrentSession / ((+new Date() - startTime || 1) / 1000.0)); - total.percent = total.size > 0 ? Math.ceil(total.loaded / total.size * 100) : 0; - } - } - - - function getRUID() { - var ctrl = fileInputs[0] || fileDrops[0]; - if (ctrl) { - return ctrl.getRuntime().uid; - } - return false; - } - - - function bindEventListeners() { - this.bind('FilesAdded FilesRemoved', function(up) { - up.trigger('QueueChanged'); - up.refresh(); - }); - - this.bind('CancelUpload', onCancelUpload); - - this.bind('BeforeUpload', onBeforeUpload); - - this.bind('UploadFile', onUploadFile); - - this.bind('UploadProgress', onUploadProgress); - - this.bind('StateChanged', onStateChanged); - - this.bind('QueueChanged', calc); - - this.bind('Error', onError); - - this.bind('FileUploaded', onFileUploaded); - - this.bind('Destroy', onDestroy); - } - - - function initControls(settings, cb) { - var self = this, inited = 0, queue = []; - - // common settings - var options = { - runtime_order: settings.runtimes, - required_caps: settings.required_features, - preferred_caps: preferred_caps, - swf_url: settings.flash_swf_url, - xap_url: settings.silverlight_xap_url - }; - - // add runtime specific options if any - plupload.each(settings.runtimes.split(/\s*,\s*/), function(runtime) { - if (settings[runtime]) { - options[runtime] = settings[runtime]; - } - }); - - // initialize file pickers - there can be many - if (settings.browse_button) { - plupload.each(settings.browse_button, function(el) { - queue.push(function(cb) { - var fileInput = new o.file.FileInput(plupload.extend({}, options, { - accept: settings.filters.mime_types, - name: settings.file_data_name, - multiple: settings.multi_selection, - container: settings.container, - browse_button: el - })); - - fileInput.onready = function() { - var info = Runtime.getInfo(this.ruid); - - // for backward compatibility - plupload.extend(self.features, { - chunks: info.can('slice_blob'), - multipart: info.can('send_multipart'), - multi_selection: info.can('select_multiple') - }); - - inited++; - fileInputs.push(this); - cb(); - }; - - fileInput.onchange = function() { - self.addFile(this.files); - }; - - fileInput.bind('mouseenter mouseleave mousedown mouseup', function(e) { - if (!disabled) { - if (settings.browse_button_hover) { - if ('mouseenter' === e.type) { - plupload.addClass(el, settings.browse_button_hover); - } else if ('mouseleave' === e.type) { - plupload.removeClass(el, settings.browse_button_hover); - } - } - - if (settings.browse_button_active) { - if ('mousedown' === e.type) { - plupload.addClass(el, settings.browse_button_active); - } else if ('mouseup' === e.type) { - plupload.removeClass(el, settings.browse_button_active); - } - } - } - }); - - fileInput.bind('mousedown', function() { - self.trigger('Browse'); - }); - - fileInput.bind('error runtimeerror', function() { - fileInput = null; - cb(); - }); - - fileInput.init(); - }); - }); - } - - // initialize drop zones - if (settings.drop_element) { - plupload.each(settings.drop_element, function(el) { - queue.push(function(cb) { - var fileDrop = new o.file.FileDrop(plupload.extend({}, options, { - drop_zone: el - })); - - fileDrop.onready = function() { - var info = Runtime.getInfo(this.ruid); - - // for backward compatibility - plupload.extend(self.features, { - chunks: info.can('slice_blob'), - multipart: info.can('send_multipart'), - dragdrop: info.can('drag_and_drop') - }); - - inited++; - fileDrops.push(this); - cb(); - }; - - fileDrop.ondrop = function() { - self.addFile(this.files); - }; - - fileDrop.bind('error runtimeerror', function() { - fileDrop = null; - cb(); - }); - - fileDrop.init(); - }); - }); - } - - - plupload.inSeries(queue, function() { - if (typeof(cb) === 'function') { - cb(inited); - } - }); - } - - - function resizeImage(blob, params, runtimeOptions, cb) { - var img = new o.image.Image(); - - try { - img.onload = function() { - // no manipulation required if... - if (params.width > this.width && - params.height > this.height && - params.quality === undef && - params.preserve_headers && - !params.crop - ) { - this.destroy(); - cb(blob); - } else { - // otherwise downsize - img.downsize(params.width, params.height, params.crop, params.preserve_headers); - } - }; - - img.onresize = function() { - var resizedBlob = this.getAsBlob(blob.type, params.quality); - this.destroy(); - cb(resizedBlob); - }; - - img.bind('error runtimeerror', function() { - this.destroy(); - cb(blob); - }); - - img.load(blob, runtimeOptions); - } catch(ex) { - cb(blob); - } - } - - - function setOption(option, value, init) { - var self = this, reinitRequired = false; - - function _setOption(option, value, init) { - var oldValue = settings[option]; - - switch (option) { - case 'max_file_size': - if (option === 'max_file_size') { - settings.max_file_size = settings.filters.max_file_size = value; - } - break; - - case 'chunk_size': - if (value = plupload.parseSize(value)) { - settings[option] = value; - settings.send_file_name = true; - } - break; - - case 'multipart': - settings[option] = value; - if (!value) { - settings.send_file_name = true; - } - break; - - case 'http_method': - settings[option] = value.toUpperCase() === 'PUT' ? 'PUT' : 'POST'; - break; - - case 'unique_names': - settings[option] = value; - if (value) { - settings.send_file_name = true; - } - break; - - case 'filters': - // for sake of backward compatibility - if (plupload.typeOf(value) === 'array') { - value = { - mime_types: value - }; - } - - if (init) { - plupload.extend(settings.filters, value); - } else { - settings.filters = value; - } - - // if file format filters are being updated, regenerate the matching expressions - if (value.mime_types) { - if (plupload.typeOf(value.mime_types) === 'string') { - value.mime_types = o.core.utils.Mime.mimes2extList(value.mime_types); - } - - value.mime_types.regexp = (function(filters) { - var extensionsRegExp = []; - - plupload.each(filters, function(filter) { - plupload.each(filter.extensions.split(/,/), function(ext) { - if (/^\s*\*\s*$/.test(ext)) { - extensionsRegExp.push('\\.*'); - } else { - extensionsRegExp.push('\\.' + ext.replace(new RegExp('[' + ('/^$.*+?|()[]{}\\'.replace(/./g, '\\$&')) + ']', 'g'), '\\$&')); - } - }); - }); - - return new RegExp('(' + extensionsRegExp.join('|') + ')$', 'i'); - }(value.mime_types)); - - settings.filters.mime_types = value.mime_types; - } - break; - - case 'resize': - if (value) { - settings.resize = plupload.extend({ - preserve_headers: true, - crop: false - }, value); - } else { - settings.resize = false; - } - break; - - case 'prevent_duplicates': - settings.prevent_duplicates = settings.filters.prevent_duplicates = !!value; - break; - - // options that require reinitialisation - case 'container': - case 'browse_button': - case 'drop_element': - value = 'container' === option - ? plupload.get(value) - : plupload.getAll(value) - ; - - case 'runtimes': - case 'multi_selection': - case 'flash_swf_url': - case 'silverlight_xap_url': - settings[option] = value; - if (!init) { - reinitRequired = true; - } - break; - - default: - settings[option] = value; - } - - if (!init) { - self.trigger('OptionChanged', option, value, oldValue); - } - } - - if (typeof(option) === 'object') { - plupload.each(option, function(value, option) { - _setOption(option, value, init); - }); - } else { - _setOption(option, value, init); - } - - if (init) { - // Normalize the list of required capabilities - settings.required_features = normalizeCaps(plupload.extend({}, settings)); - - // Come up with the list of capabilities that can affect default mode in a multi-mode runtimes - preferred_caps = normalizeCaps(plupload.extend({}, settings, { - required_features: true - })); - } else if (reinitRequired) { - self.trigger('Destroy'); - - initControls.call(self, settings, function(inited) { - if (inited) { - self.runtime = Runtime.getInfo(getRUID()).type; - self.trigger('Init', { runtime: self.runtime }); - self.trigger('PostInit'); - } else { - self.trigger('Error', { - code : plupload.INIT_ERROR, - message : plupload.translate('Init error.') - }); - } - }); - } - } - - - // Internal event handlers - function onBeforeUpload(up, file) { - // Generate unique target filenames - if (up.settings.unique_names) { - var matches = file.name.match(/\.([^.]+)$/), ext = "part"; - if (matches) { - ext = matches[1]; - } - file.target_name = file.id + '.' + ext; - } - } - - - function onUploadFile(up, file) { - var url = up.settings.url; - var chunkSize = up.settings.chunk_size; - var retries = up.settings.max_retries; - var features = up.features; - var offset = 0; - var blob; - - var runtimeOptions = { - runtime_order: up.settings.runtimes, - required_caps: up.settings.required_features, - preferred_caps: preferred_caps, - swf_url: up.settings.flash_swf_url, - xap_url: up.settings.silverlight_xap_url - }; - - // make sure we start at a predictable offset - if (file.loaded) { - offset = file.loaded = chunkSize ? chunkSize * Math.floor(file.loaded / chunkSize) : 0; - } - - function handleError() { - if (retries-- > 0) { - delay(uploadNextChunk, 1000); - } else { - file.loaded = offset; // reset all progress - - up.trigger('Error', { - code : plupload.HTTP_ERROR, - message : plupload.translate('HTTP Error.'), - file : file, - response : xhr.responseText, - status : xhr.status, - responseHeaders: xhr.getAllResponseHeaders() - }); - } - } - - function uploadNextChunk() { - var chunkBlob, args = {}, curChunkSize; - - // make sure that file wasn't cancelled and upload is not stopped in general - if (file.status !== plupload.UPLOADING || up.state === plupload.STOPPED) { - return; - } - - // send additional 'name' parameter only if required - if (up.settings.send_file_name) { - args.name = file.target_name || file.name; - } - - if (chunkSize && features.chunks && blob.size > chunkSize) { // blob will be of type string if it was loaded in memory - curChunkSize = Math.min(chunkSize, blob.size - offset); - chunkBlob = blob.slice(offset, offset + curChunkSize); - } else { - curChunkSize = blob.size; - chunkBlob = blob; - } - - // If chunking is enabled add corresponding args, no matter if file is bigger than chunk or smaller - if (chunkSize && features.chunks) { - // Setup query string arguments - if (up.settings.send_chunk_number) { - args.chunk = Math.ceil(offset / chunkSize); - args.chunks = Math.ceil(blob.size / chunkSize); - } else { // keep support for experimental chunk format, just in case - args.offset = offset; - args.total = blob.size; - } - } - - if (up.trigger('BeforeChunkUpload', file, args, chunkBlob, offset)) { - uploadChunk(args, chunkBlob, curChunkSize); - } - } - - function uploadChunk(args, chunkBlob, curChunkSize) { - var formData; - - xhr = new o.xhr.XMLHttpRequest(); - - // Do we have upload progress support - if (xhr.upload) { - xhr.upload.onprogress = function(e) { - file.loaded = Math.min(file.size, offset + e.loaded); - up.trigger('UploadProgress', file); - }; - } - - xhr.onload = function() { - // check if upload made itself through - if (xhr.status < 200 || xhr.status >= 400) { - handleError(); - return; - } - - retries = up.settings.max_retries; // reset the counter - - // Handle chunk response - if (curChunkSize < blob.size) { - chunkBlob.destroy(); - - offset += curChunkSize; - file.loaded = Math.min(offset, blob.size); - - up.trigger('ChunkUploaded', file, { - offset : file.loaded, - total : blob.size, - response : xhr.responseText, - status : xhr.status, - responseHeaders: xhr.getAllResponseHeaders() - }); - - // stock Android browser doesn't fire upload progress events, but in chunking mode we can fake them - if (plupload.ua.browser === 'Android Browser') { - // doesn't harm in general, but is not required anywhere else - up.trigger('UploadProgress', file); - } - } else { - file.loaded = file.size; - } - - chunkBlob = formData = null; // Free memory - - // Check if file is uploaded - if (!offset || offset >= blob.size) { - // If file was modified, destory the copy - if (file.size != file.origSize) { - blob.destroy(); - blob = null; - } - - up.trigger('UploadProgress', file); - - file.status = plupload.DONE; - file.completeTimestamp = +new Date(); - - up.trigger('FileUploaded', file, { - response : xhr.responseText, - status : xhr.status, - responseHeaders: xhr.getAllResponseHeaders() - }); - } else { - // Still chunks left - delay(uploadNextChunk, 1); // run detached, otherwise event handlers interfere - } - }; - - xhr.onerror = function() { - handleError(); - }; - - xhr.onloadend = function() { - this.destroy(); - }; - - // Build multipart request - if (up.settings.multipart && features.multipart) { - xhr.open(up.settings.http_method, url, true); - - // Set custom headers - plupload.each(up.settings.headers, function(value, name) { - xhr.setRequestHeader(name, value); - }); - - formData = new o.xhr.FormData(); - - // Add multipart params - plupload.each(plupload.extend(args, up.settings.multipart_params), function(value, name) { - formData.append(name, value); - }); - - // Add file and send it - formData.append(up.settings.file_data_name, chunkBlob); - xhr.send(formData, runtimeOptions); - } else { - // if no multipart, send as binary stream - url = plupload.buildUrl(up.settings.url, plupload.extend(args, up.settings.multipart_params)); - - xhr.open(up.settings.http_method, url, true); - - // Set custom headers - plupload.each(up.settings.headers, function(value, name) { - xhr.setRequestHeader(name, value); - }); - - // do not set Content-Type, if it was defined previously (see #1203) - if (!xhr.hasRequestHeader('Content-Type')) { - xhr.setRequestHeader('Content-Type', 'application/octet-stream'); // Binary stream header - } - - xhr.send(chunkBlob, runtimeOptions); - } - } - - - blob = file.getSource(); - - // Start uploading chunks - if (!plupload.isEmptyObj(up.settings.resize) && plupload.inArray(blob.type, ['image/jpeg', 'image/png']) !== -1) { - // Resize if required - resizeImage(blob, up.settings.resize, runtimeOptions, function(resizedBlob) { - blob = resizedBlob; - file.size = resizedBlob.size; - uploadNextChunk(); - }); - } else { - uploadNextChunk(); - } - } - - - function onUploadProgress(up, file) { - calcFile(file); - } - - - function onStateChanged(up) { - if (up.state == plupload.STARTED) { - // Get start time to calculate bps - startTime = (+new Date()); - } else if (up.state == plupload.STOPPED) { - // Reset currently uploading files - for (var i = up.files.length - 1; i >= 0; i--) { - if (up.files[i].status == plupload.UPLOADING) { - up.files[i].status = plupload.QUEUED; - calc(); - } - } - } - } - - - function onCancelUpload() { - if (xhr) { - xhr.abort(); - } - } - - - function onFileUploaded(up) { - calc(); - - // Upload next file but detach it from the error event - // since other custom listeners might want to stop the queue - delay(function() { - uploadNext.call(up); - }, 1); - } - - - function onError(up, err) { - if (err.code === plupload.INIT_ERROR) { - up.destroy(); - } - // Set failed status if an error occured on a file - else if (err.code === plupload.HTTP_ERROR) { - err.file.status = plupload.FAILED; - err.file.completeTimestamp = +new Date(); - calcFile(err.file); - - // Upload next file but detach it from the error event - // since other custom listeners might want to stop the queue - if (up.state == plupload.STARTED) { // upload in progress - up.trigger('CancelUpload'); - delay(function() { - uploadNext.call(up); - }, 1); - } - } - } - - - function onDestroy(up) { - up.stop(); - - // Purge the queue - plupload.each(files, function(file) { - file.destroy(); - }); - files = []; - - if (fileInputs.length) { - plupload.each(fileInputs, function(fileInput) { - fileInput.destroy(); - }); - fileInputs = []; - } - - if (fileDrops.length) { - plupload.each(fileDrops, function(fileDrop) { - fileDrop.destroy(); - }); - fileDrops = []; - } - - preferred_caps = {}; - disabled = false; - startTime = xhr = null; - total.reset(); - } - - - // Default settings - settings = { - chunk_size: 0, - file_data_name: 'file', - filters: { - mime_types: [], - max_file_size: 0, - prevent_duplicates: false, - prevent_empty: true - }, - flash_swf_url: 'js/Moxie.swf', - http_method: 'POST', - max_retries: 0, - multipart: true, - multi_selection: true, - resize: false, - runtimes: Runtime.order, - send_file_name: true, - send_chunk_number: true, - silverlight_xap_url: 'js/Moxie.xap' - }; - - - setOption.call(this, options, null, true); - - // Inital total state - total = new plupload.QueueProgress(); - - // Add public methods - plupload.extend(this, { - - /** - * Unique id for the Uploader instance. - * - * @property id - * @type String - */ - id : uid, - uid : uid, // mOxie uses this to differentiate between event targets - - /** - * Current state of the total uploading progress. This one can either be plupload.STARTED or plupload.STOPPED. - * These states are controlled by the stop/start methods. The default value is STOPPED. - * - * @property state - * @type Number - */ - state : plupload.STOPPED, - - /** - * Map of features that are available for the uploader runtime. Features will be filled - * before the init event is called, these features can then be used to alter the UI for the end user. - * Some of the current features that might be in this map is: dragdrop, chunks, jpgresize, pngresize. - * - * @property features - * @type Object - */ - features : {}, - - /** - * Current runtime name. - * - * @property runtime - * @type String - */ - runtime : null, - - /** - * Current upload queue, an array of File instances. - * - * @property files - * @type Array - * @see plupload.File - */ - files : files, - - /** - * Object with name/value settings. - * - * @property settings - * @type Object - */ - settings : settings, - - /** - * Total progess information. How many files has been uploaded, total percent etc. - * - * @property total - * @type plupload.QueueProgress - */ - total : total, - - - /** - * Initializes the Uploader instance and adds internal event listeners. - * - * @method init - */ - init : function() { - var self = this, opt, preinitOpt, err; - - preinitOpt = self.getOption('preinit'); - if (typeof(preinitOpt) == "function") { - preinitOpt(self); - } else { - plupload.each(preinitOpt, function(func, name) { - self.bind(name, func); - }); - } - - bindEventListeners.call(self); - - // Check for required options - plupload.each(['container', 'browse_button', 'drop_element'], function(el) { - if (self.getOption(el) === null) { - err = { - code : plupload.INIT_ERROR, - message : plupload.sprintf(plupload.translate("%s specified, but cannot be found."), el) - } - return false; - } - }); - - if (err) { - return self.trigger('Error', err); - } - - - if (!settings.browse_button && !settings.drop_element) { - return self.trigger('Error', { - code : plupload.INIT_ERROR, - message : plupload.translate("You must specify either browse_button or drop_element.") - }); - } - - - initControls.call(self, settings, function(inited) { - var initOpt = self.getOption('init'); - if (typeof(initOpt) == "function") { - initOpt(self); - } else { - plupload.each(initOpt, function(func, name) { - self.bind(name, func); - }); - } - - if (inited) { - self.runtime = Runtime.getInfo(getRUID()).type; - self.trigger('Init', { runtime: self.runtime }); - self.trigger('PostInit'); - } else { - self.trigger('Error', { - code : plupload.INIT_ERROR, - message : plupload.translate('Init error.') - }); - } - }); - }, - - /** - * Set the value for the specified option(s). - * - * @method setOption - * @since 2.1 - * @param {String|Object} option Name of the option to change or the set of key/value pairs - * @param {Mixed} [value] Value for the option (is ignored, if first argument is object) - */ - setOption: function(option, value) { - setOption.call(this, option, value, !this.runtime); // until runtime not set we do not need to reinitialize - }, - - /** - * Get the value for the specified option or the whole configuration, if not specified. - * - * @method getOption - * @since 2.1 - * @param {String} [option] Name of the option to get - * @return {Mixed} Value for the option or the whole set - */ - getOption: function(option) { - if (!option) { - return settings; - } - return settings[option]; - }, - - /** - * Refreshes the upload instance by dispatching out a refresh event to all runtimes. - * This would for example reposition flash/silverlight shims on the page. - * - * @method refresh - */ - refresh : function() { - if (fileInputs.length) { - plupload.each(fileInputs, function(fileInput) { - fileInput.trigger('Refresh'); - }); - } - this.trigger('Refresh'); - }, - - /** - * Starts uploading the queued files. - * - * @method start - */ - start : function() { - if (this.state != plupload.STARTED) { - this.state = plupload.STARTED; - this.trigger('StateChanged'); - - uploadNext.call(this); - } - }, - - /** - * Stops the upload of the queued files. - * - * @method stop - */ - stop : function() { - if (this.state != plupload.STOPPED) { - this.state = plupload.STOPPED; - this.trigger('StateChanged'); - this.trigger('CancelUpload'); - } - }, - - - /** - * Disables/enables browse button on request. - * - * @method disableBrowse - * @param {Boolean} disable Whether to disable or enable (default: true) - */ - disableBrowse : function() { - disabled = arguments[0] !== undef ? arguments[0] : true; - - if (fileInputs.length) { - plupload.each(fileInputs, function(fileInput) { - fileInput.disable(disabled); - }); - } - - this.trigger('DisableBrowse', disabled); - }, - - /** - * Returns the specified file object by id. - * - * @method getFile - * @param {String} id File id to look for. - * @return {plupload.File} File object or undefined if it wasn't found; - */ - getFile : function(id) { - var i; - for (i = files.length - 1; i >= 0; i--) { - if (files[i].id === id) { - return files[i]; - } - } - }, - - /** - * Adds file to the queue programmatically. Can be native file, instance of Plupload.File, - * instance of mOxie.File, input[type="file"] element, or array of these. Fires FilesAdded, - * if any files were added to the queue. Otherwise nothing happens. - * - * @method addFile - * @since 2.0 - * @param {plupload.File|mOxie.File|File|Node|Array} file File or files to add to the queue. - * @param {String} [fileName] If specified, will be used as a name for the file - */ - addFile : function(file, fileName) { - var self = this - , queue = [] - , filesAdded = [] - , ruid - ; - - function filterFile(file, cb) { - var queue = []; - plupload.each(self.settings.filters, function(rule, name) { - if (fileFilters[name]) { - queue.push(function(cb) { - fileFilters[name].call(self, rule, file, function(res) { - cb(!res); - }); - }); - } - }); - plupload.inSeries(queue, cb); - } - - /** - * @method resolveFile - * @private - * @param {moxie.file.File|moxie.file.Blob|plupload.File|File|Blob|input[type="file"]} file - */ - function resolveFile(file) { - var type = plupload.typeOf(file); - - // moxie.file.File - if (file instanceof o.file.File) { - if (!file.ruid && !file.isDetached()) { - if (!ruid) { // weird case - return false; - } - file.ruid = ruid; - file.connectRuntime(ruid); - } - resolveFile(new plupload.File(file)); - } - // moxie.file.Blob - else if (file instanceof o.file.Blob) { - resolveFile(file.getSource()); - file.destroy(); - } - // plupload.File - final step for other branches - else if (file instanceof plupload.File) { - if (fileName) { - file.name = fileName; - } - - queue.push(function(cb) { - // run through the internal and user-defined filters, if any - filterFile(file, function(err) { - if (!err) { - // make files available for the filters by updating the main queue directly - files.push(file); - // collect the files that will be passed to FilesAdded event - filesAdded.push(file); - - self.trigger("FileFiltered", file); - } - delay(cb, 1); // do not build up recursions or eventually we might hit the limits - }); - }); - } - // native File or blob - else if (plupload.inArray(type, ['file', 'blob']) !== -1) { - resolveFile(new o.file.File(null, file)); - } - // input[type="file"] - else if (type === 'node' && plupload.typeOf(file.files) === 'filelist') { - // if we are dealing with input[type="file"] - plupload.each(file.files, resolveFile); - } - // mixed array of any supported types (see above) - else if (type === 'array') { - fileName = null; // should never happen, but unset anyway to avoid funny situations - plupload.each(file, resolveFile); - } - } - - ruid = getRUID(); - - resolveFile(file); - - if (queue.length) { - plupload.inSeries(queue, function() { - // if any files left after filtration, trigger FilesAdded - if (filesAdded.length) { - self.trigger("FilesAdded", filesAdded); - } - }); - } - }, - - /** - * Removes a specific file. - * - * @method removeFile - * @param {plupload.File|String} file File to remove from queue. - */ - removeFile : function(file) { - var id = typeof(file) === 'string' ? file : file.id; - - for (var i = files.length - 1; i >= 0; i--) { - if (files[i].id === id) { - return this.splice(i, 1)[0]; - } - } - }, - - /** - * Removes part of the queue and returns the files removed. This will also trigger the - * FilesRemoved and QueueChanged events. - * - * @method splice - * @param {Number} [start=0] Start index to remove from. - * @param {Number} [length] Number of files to remove (defaults to number of files in the queue). - * @return {Array} Array of files that was removed. - */ - splice : function(start, length) { - // Splice and trigger events - var removed = files.splice(start === undef ? 0 : start, length === undef ? files.length : length); - - // if upload is in progress we need to stop it and restart after files are removed - var restartRequired = false; - if (this.state == plupload.STARTED) { // upload in progress - plupload.each(removed, function(file) { - if (file.status === plupload.UPLOADING) { - restartRequired = true; // do not restart, unless file that is being removed is uploading - return false; - } - }); - - if (restartRequired) { - this.stop(); - } - } - - this.trigger("FilesRemoved", removed); - - // Dispose any resources allocated by those files - plupload.each(removed, function(file) { - file.destroy(); - }); - - if (restartRequired) { - this.start(); - } - - return removed; - }, - - /** - Dispatches the specified event name and its arguments to all listeners. - - @method trigger - @param {String} name Event name to fire. - @param {Object..} Multiple arguments to pass along to the listener functions. - */ - - // override the parent method to match Plupload-like event logic - dispatchEvent: function(type) { - var list, args, result; - - type = type.toLowerCase(); - - list = this.hasEventListener(type); - - if (list) { - // sort event list by priority - list.sort(function(a, b) { return b.priority - a.priority; }); - - // first argument should be current plupload.Uploader instance - args = [].slice.call(arguments); - args.shift(); - args.unshift(this); - - for (var i = 0; i < list.length; i++) { - // Fire event, break chain if false is returned - if (list[i].fn.apply(list[i].scope, args) === false) { - return false; - } - } - } - return true; - }, - - /** - Check whether uploader has any listeners to the specified event. - - @method hasEventListener - @param {String} name Event name to check for. - */ - - - /** - Adds an event listener by name. - - @method bind - @param {String} name Event name to listen for. - @param {function} fn Function to call ones the event gets fired. - @param {Object} [scope] Optional scope to execute the specified function in. - @param {Number} [priority=0] Priority of the event handler - handlers with higher priorities will be called first - */ - bind: function(name, fn, scope, priority) { - // adapt moxie EventTarget style to Plupload-like - plupload.Uploader.prototype.bind.call(this, name, fn, priority, scope); - }, - - /** - Removes the specified event listener. - - @method unbind - @param {String} name Name of event to remove. - @param {function} fn Function to remove from listener. - */ - - /** - Removes all event listeners. - - @method unbindAll - */ - - - /** - * Destroys Plupload instance and cleans after itself. - * - * @method destroy - */ - destroy : function() { - this.trigger('Destroy'); - settings = total = null; // purge these exclusively - this.unbindAll(); - } - }); -}; - -plupload.Uploader.prototype = o.core.EventTarget.instance; - -/** - * Constructs a new file instance. - * - * @class File - * @constructor - * - * @param {Object} file Object containing file properties - * @param {String} file.name Name of the file. - * @param {Number} file.size File size. - */ -plupload.File = (function() { - var filepool = {}; - - function PluploadFile(file) { - - plupload.extend(this, { - - /** - * File id this is a globally unique id for the specific file. - * - * @property id - * @type String - */ - id: plupload.guid(), - - /** - * File name for example "myfile.gif". - * - * @property name - * @type String - */ - name: file.name || file.fileName, - - /** - * File type, `e.g image/jpeg` - * - * @property type - * @type String - */ - type: file.type || '', - - /** - * Relative path to the file inside a directory - * - * @property relativePath - * @type String - * @default '' - */ - relativePath: file.relativePath || '', - - /** - * File size in bytes (may change after client-side manupilation). - * - * @property size - * @type Number - */ - size: file.fileSize || file.size, - - /** - * Original file size in bytes. - * - * @property origSize - * @type Number - */ - origSize: file.fileSize || file.size, - - /** - * Number of bytes uploaded of the files total size. - * - * @property loaded - * @type Number - */ - loaded: 0, - - /** - * Number of percentage uploaded of the file. - * - * @property percent - * @type Number - */ - percent: 0, - - /** - * Status constant matching the plupload states QUEUED, UPLOADING, FAILED, DONE. - * - * @property status - * @type Number - * @see plupload - */ - status: plupload.QUEUED, - - /** - * Date of last modification. - * - * @property lastModifiedDate - * @type {String} - */ - lastModifiedDate: file.lastModifiedDate || (new Date()).toLocaleString(), // Thu Aug 23 2012 19:40:00 GMT+0400 (GET) - - - /** - * Set when file becomes plupload.DONE or plupload.FAILED. Is used to calculate proper plupload.QueueProgress.bytesPerSec. - * @private - * @property completeTimestamp - * @type {Number} - */ - completeTimestamp: 0, - - /** - * Returns native window.File object, when it's available. - * - * @method getNative - * @return {window.File} or null, if plupload.File is of different origin - */ - getNative: function() { - var file = this.getSource().getSource(); - return plupload.inArray(plupload.typeOf(file), ['blob', 'file']) !== -1 ? file : null; - }, - - /** - * Returns mOxie.File - unified wrapper object that can be used across runtimes. - * - * @method getSource - * @return {mOxie.File} or null - */ - getSource: function() { - if (!filepool[this.id]) { - return null; - } - return filepool[this.id]; - }, - - /** - * Destroys plupload.File object. - * - * @method destroy - */ - destroy: function() { - var src = this.getSource(); - if (src) { - src.destroy(); - delete filepool[this.id]; - } - } - }); - - filepool[this.id] = file; - } - - return PluploadFile; -}()); - - -/** - * Constructs a queue progress. - * - * @class QueueProgress - * @constructor - */ - plupload.QueueProgress = function() { - var self = this; // Setup alias for self to reduce code size when it's compressed - - /** - * Total queue file size. - * - * @property size - * @type Number - */ - self.size = 0; - - /** - * Total bytes uploaded. - * - * @property loaded - * @type Number - */ - self.loaded = 0; - - /** - * Number of files uploaded. - * - * @property uploaded - * @type Number - */ - self.uploaded = 0; - - /** - * Number of files failed to upload. - * - * @property failed - * @type Number - */ - self.failed = 0; - - /** - * Number of files yet to be uploaded. - * - * @property queued - * @type Number - */ - self.queued = 0; - - /** - * Total percent of the uploaded bytes. - * - * @property percent - * @type Number - */ - self.percent = 0; - - /** - * Bytes uploaded per second. - * - * @property bytesPerSec - * @type Number - */ - self.bytesPerSec = 0; - - /** - * Resets the progress to its initial values. - * - * @method reset - */ - self.reset = function() { - self.size = self.loaded = self.uploaded = self.failed = self.queued = self.percent = self.bytesPerSec = 0; - }; -}; - -exports.plupload = plupload; - -}(this, moxie)); - -})); \ No newline at end of file diff --git a/admin/src/js/typecho.js b/admin/src/js/typecho.js index 2931ee58..bd886421 100644 --- a/admin/src/js/typecho.js +++ b/admin/src/js/typecho.js @@ -10,7 +10,8 @@ } }) }, - uploadComplete : function (file) {} + uploadComplete : function (attachment) {}, + savePost : function (cb) {}, }; })(window); diff --git a/admin/write-js.php b/admin/write-js.php index 8c69f0e4..7d4e3994 100644 --- a/admin/write-js.php +++ b/admin/write-js.php @@ -42,12 +42,12 @@ $(document).ready(function() { Typecho.editorResize('text', 'index('/action/ajax?do=editorResize'); ?>'); // tag autocomplete 提示 - var tags = $('#tags'), tagsPre = []; + const tags = $('#tags'), tagsPre = []; if (tags.length > 0) { - var items = tags.val().split(','), result = []; - for (var i = 0; i < items.length; i ++) { - var tag = items[i]; + const items = tags.val().split(','); + for (let i = 0; i < items.length; i ++) { + const tag = items[i]; if (!tag) { continue; @@ -87,7 +87,7 @@ $(document).ready(function() { result = []; } - if (!result[0] || result[0]['id'] != query) { + if (!result[0] || result[0]['id'] !== query) { result.unshift({ id : val, tags : val @@ -100,17 +100,17 @@ $(document).ready(function() { // tag autocomplete 提示宽度设置 $('#token-input-tags').focus(function() { - var t = $('.token-input-dropdown'), + const t = $('.token-input-dropdown'), offset = t.outerWidth() - t.width(); t.width($('.token-input-list').outerWidth() - offset); }); } // 缩略名自适应宽度 - var slug = $('#slug'); + const slug = $('#slug'); if (slug.length > 0) { - var wrap = $('
').css({ + const wrap = $('
').css({ 'position' : 'relative', 'display' : 'inline-block' }), @@ -126,10 +126,10 @@ $(document).ready(function() { 'minWidth' : '5px', 'position' : 'absolute', 'width' : '100%' - })), originalWidth = slug.width(); + })); function justifySlugWidth() { - var val = slug.val(); + const val = slug.val(); justifySlug.text(val.length > 0 ? val : ' '); } @@ -137,91 +137,106 @@ $(document).ready(function() { justifySlugWidth(); } - // 原始的插入图片和文件 - Typecho.insertFileToEditor = function (file, url, isImage) { - var textarea = $('#text'), sel = textarea.getSelection(), - html = isImage ? '' + file + '' - : '' + file + '', - offset = (sel ? sel.start : 0) + html.length; - - textarea.replaceSelection(html); - textarea.setSelection(offset, offset); - }; - - var submitted = false, form = $('form[name=write_post],form[name=write_page]').submit(function () { - submitted = true; - }), formAction = form.attr('action'), + // 处理保存文章的逻辑 + const form = $('form[name=write_post],form[name=write_page]'), idInput = $('input[name=cid]'), - cid = idInput.val(), draft = $('input[name=draft]'), - draftId = draft.length > 0 ? draft.val() : 0, - btnSave = $('#btn-save').removeAttr('name').removeAttr('value'), - btnSubmit = $('#btn-submit').removeAttr('name').removeAttr('value'), btnPreview = $('#btn-preview'), - doAction = $('').appendTo(form), - locked = false, + autoSave = $('').prependTo('.submit'); + + let cid = idInput.val(), + draftId = draft.length > 0 ? draft.val() : 0, changed = false, - autoSave = $('').prependTo('.submit'), + written = false, lastSaveTime = null; - $(':input', form).bind('input change', function (e) { - var tagName = $(this).prop('tagName'); - - if (tagName.match(/(input|textarea)/i) && e.type == 'change') { - return; - } - - changed = true; + form.on('write', function () { + written = true; + form.trigger('datachange'); }); - form.bind('field', function () { - changed = true; + form.on('change', function () { + if (written) { + form.trigger('datachange'); + } + }); + + $('button[name=do]').click(function () { + $('input[name=do]').val($(this).val()); + }); + + // 自动检测离开页 + $(window).bind('beforeunload', function () { + if (changed && !form.hasClass('submitting')) { + return ''; + } }); // 发送保存请求 - function saveData(cb) { - function callback(o) { + Typecho.savePost = function(cb) { + if (!changed) { + cb && cb(); + return; + } + + const callback = function (o) { lastSaveTime = o.time; cid = o.cid; draftId = o.draftId; idInput.val(cid); autoSave.text('' + ' (' + o.time + ')').effect('highlight', 1000); - locked = false; - btnSave.removeAttr('disabled'); - btnPreview.removeAttr('disabled'); - - if (!!cb) { - cb(o) - } - } + cb && cb(); + }; changed = false; - btnSave.attr('disabled', 'disabled'); - btnPreview.attr('disabled', 'disabled'); autoSave.text(''); - if (typeof FormData !== 'undefined') { - var data = new FormData(form.get(0)); - data.append('do', 'save'); + const data = new FormData(form.get(0)); + data.append('do', 'save'); + form.triggerHandler('submit'); - $.ajax({ - url: formAction, - processData: false, - contentType: false, - type: 'POST', - data: data, - success: callback - }); - } else { - var data = form.serialize() + '&do=save'; - $.post(formAction, data, callback, 'json'); + $.ajax({ + url: form.attr('action'), + processData: false, + contentType: false, + type: 'POST', + data: data, + success: callback, + error: function () { + autoSave.text(''); + }, + complete: function () { + form.trigger('submitted'); + } + }); + }; + + autoSave): ?> + // 自动保存 + let saveTimer = null; + + form.on('datachange', function () { + changed = true; + autoSave.text('' + (lastSaveTime ? ' (: ' + lastSaveTime + ')' : '')); + + if (saveTimer) { + clearTimeout(saveTimer); } - } + + saveTimer = setTimeout(function () { + Typecho.savePost(); + }, 3000); + }); + + form.on('datachange', function () { + changed = true; + }); + // 计算夏令时偏移 - var dstOffset = (function () { - var d = new Date(), + const dstOffset = (function () { + const d = new Date(), jan = new Date(d.getFullYear(), 0, 1), jul = new Date(d.getFullYear(), 6, 1), stdOffset = Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset()); @@ -236,50 +251,14 @@ $(document).ready(function() { // 时区 $('').appendTo(form).val(- (new Date).getTimezoneOffset() * 60); - // 自动保存 -autoSave): ?> - var autoSaveOnce = !!cid; - - function autoSaveListener () { - setInterval(function () { - if (changed && !locked) { - locked = true; - saveData(); - } - }, 10000); - } - - if (autoSaveOnce) { - autoSaveListener(); - } - - $('#text').bind('input propertychange', function () { - if (!locked) { - autoSave.text('' + (lastSaveTime ? ' (: ' + lastSaveTime + ')' : '')); - } - - if (!autoSaveOnce) { - autoSaveOnce = true; - autoSaveListener(); - } - }); - - - // 自动检测离开页 - $(window).bind('beforeunload', function () { - if (changed && !submitted) { - return ''; - } - }); - // 预览功能 - var isFullScreen = false; + let isFullScreen = false; function previewData(cid) { isFullScreen = $(document.body).hasClass('fullscreen'); $(document.body).addClass('fullscreen preview'); - var frame = $('') + const frame = $('') .attr('src', './preview.php?cid=' + cid) .attr('sandbox', 'allow-same-origin allow-scripts') .appendTo(document.body); @@ -292,36 +271,28 @@ $(document).ready(function() { } function cancelPreview() { - if (submitted) { - return; - } - if (!isFullScreen) { $(document.body).removeClass('fullscreen'); } $(document.body).removeClass('preview'); $('.preview-frame').remove(); - }; + } $('#btn-cancel-preview').click(cancelPreview); $(window).bind('message', function (e) { - if (e.originalEvent.data == 'cancelPreview') { + if (e.originalEvent.data === 'cancelPreview') { cancelPreview(); } }); btnPreview.click(function () { if (changed) { - locked = true; - if (confirm('')) { - saveData(function (o) { - previewData(o.draftId); + Typecho.savePost(function () { + previewData(draftId); }); - } else { - locked = false; } } else if (!!draftId) { previewData(draftId); @@ -330,28 +301,13 @@ $(document).ready(function() { } }); - btnSave.click(function () { - doAction.attr('value', 'save'); - }); - - btnSubmit.click(function () { - doAction.attr('value', 'publish'); - }); - // 控制选项和附件的切换 - var fileUploadInit = false; $('#edit-secondary .typecho-option-tabs li').click(function() { - $('#edit-secondary .typecho-option-tabs li').removeClass('active'); - $(this).addClass('active'); - $(this).parents('#edit-secondary').find('.tab-content').addClass('hidden'); - - var selected_tab = $(this).find('a').attr('href'), - selected_el = $(selected_tab).removeClass('hidden'); + $('#edit-secondary .typecho-option-tabs li.active').removeClass('active'); + $('#edit-secondary .tab-content').addClass('hidden'); - if (!fileUploadInit) { - selected_el.trigger('init'); - fileUploadInit = true; - } + const activeTab = $(this).addClass('active').find('a').attr('href'); + $(activeTab).removeClass('hidden'); return false; }); @@ -364,9 +320,9 @@ $(document).ready(function() { // 自动隐藏密码框 $('#visibility').change(function () { - var val = $(this).val(), password = $('#post-password'); + const val = $(this).val(), password = $('#post-password'); - if ('password' == val) { + if ('password' === val) { password.removeClass('hidden'); } else { password.addClass('hidden'); diff --git a/admin/write-page.php b/admin/write-page.php index 89ad10ed..624795a3 100644 --- a/admin/write-page.php +++ b/admin/write-page.php @@ -2,7 +2,7 @@ include 'common.php'; include 'header.php'; include 'menu.php'; -\Widget\Contents\Page\Edit::alloc()->to($page); +\Widget\Contents\Page\Edit::alloc()->prepare()->to($page); ?>
@@ -53,6 +53,7 @@ include 'menu.php'; class="i-caret-left"> + diff --git a/admin/write-post.php b/admin/write-post.php index 41e972b3..3f4802d3 100644 --- a/admin/write-post.php +++ b/admin/write-post.php @@ -2,7 +2,7 @@ include 'common.php'; include 'header.php'; include 'menu.php'; -\Widget\Contents\Post\Edit::alloc()->to($post); +\Widget\Contents\Post\Edit::alloc()->prepare()->to($post); ?>
@@ -58,6 +58,7 @@ include 'menu.php'; class="i-caret-left"> + @@ -114,7 +115,7 @@ include 'menu.php';
-

diff --git a/tools/package-lock.json b/tools/package-lock.json index c59b864d..2c6e2b92 100644 --- a/tools/package-lock.json +++ b/tools/package-lock.json @@ -1,7 +1,7 @@ { "name": "typecho-tools", "version": "1.0.0", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -11,7 +11,7 @@ "dependencies": { "@picocss/pico": "^1.5.0", "chalk": "^4.0.0", - "node-sass": "^6.0.1", + "node-sass": "^9.0.0", "sprite-magic-importer": "^1.6.2", "uglify-js": "^3.11.6" }, @@ -20,31 +20,88 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", - "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dependencies": { - "@babel/highlight": "^7.14.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", - "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dependencies": { - "@babel/helper-validator-identifier": "^7.14.5", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -86,12 +143,12 @@ "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "engines": { "node": ">=4" } @@ -107,6 +164,11 @@ "node": ">=4" } }, + "node_modules/@gar/promisify": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", + "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==" + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -139,10 +201,35 @@ "node": ">= 8" } }, + "node_modules/@npmcli/fs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", + "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "dependencies": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/@npmcli/move-file": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", + "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", + "deprecated": "This functionality has been moved to @npmcli/fs", + "dependencies": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/@picocss/pico": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@picocss/pico/-/pico-1.5.0.tgz", - "integrity": "sha512-1sLeGqpIYHf2ZgVEVqpewWFkfYMCMt4eUU8uINRXI21cUKAPv7Jxft+4567SEWLOjzQKH5EhlbkQdC9tGi/c+A==" + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/@picocss/pico/-/pico-1.5.10.tgz", + "integrity": "sha512-+LafMsrwPxXQMk6sI///TmSInCwwZmq+K7SikyL3N/4GhhwzyPC+TQLUEqmrLyjluR+uIpFFcqjty30Rtr6GxQ==" }, "node_modules/@sindresorhus/is": { "version": "0.7.0", @@ -152,19 +239,27 @@ "node": ">=4" } }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "engines": { + "node": ">= 10" + } + }, "node_modules/@types/glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", "dependencies": { "@types/minimatch": "*", "@types/node": "*" } }, "node_modules/@types/minimatch": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", - "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==" + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==" }, "node_modules/@types/minimist": { "version": "1.2.2", @@ -172,20 +267,42 @@ "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==" }, "node_modules/@types/node": { - "version": "16.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz", - "integrity": "sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw==" + "version": "20.7.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.7.0.tgz", + "integrity": "sha512-zI22/pJW2wUZOVyguFaUL1HABdmSVxpXrzIqkjsHmyUjNhPoWM1CKfvVuXfetHhIok4RY573cqS0mZ1SJEnoTg==" }, "node_modules/@types/normalize-package-data": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", - "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==" + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.2.tgz", + "integrity": "sha512-lqa4UEhhv/2sjjIQgjX8B+RBjj47eo0mzGasklVJ78UKGQY1r0VpB9XHDaZZO9qzEFDdy4MrXLuEaSmPrPSe/A==" }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/agentkeepalive": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -198,14 +315,6 @@ "node": ">=8" } }, - "node_modules/aggregate-error/node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "engines": { - "node": ">=8" - } - }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -221,18 +330,10 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "engines": { - "node": ">=0.4.2" - } - }, "node_modules/ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", "engines": { "node": ">=0.10.0" } @@ -252,9 +353,9 @@ } }, "node_modules/aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" }, "node_modules/arch": { "version": "2.2.0", @@ -278,7 +379,7 @@ "node_modules/archive-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/archive-type/-/archive-type-4.0.0.tgz", - "integrity": "sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA=", + "integrity": "sha512-zV4Ky0v1F8dBrdYElwTvQhweQ0P7Kwc1aluqJsYtOBP01jXcWCyW2IEfI1YiqsG+Iy7ZR+o5LF1N+PGECBxHWA==", "dependencies": { "file-type": "^4.2.0" }, @@ -289,24 +390,40 @@ "node_modules/archive-type/node_modules/file-type": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz", - "integrity": "sha1-G2AOX8ofvcboDApwxxyNul95BsU=", + "integrity": "sha512-f2UbFQEk7LXgWpi5ntcO86OeA/cC80fuDDDaX/fZ2ZGel+AF7leRQqBBW1eJNiiQkrZlAoM6P+VYP5P6bOlDEQ==", "engines": { "node": ">=4" } }, "node_modules/are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", "dependencies": { "delegates": "^1.0.0", - "readable-stream": "^2.0.6" + "readable-stream": "^3.6.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/are-we-there-yet/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" } }, "node_modules/array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "integrity": "sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==", "engines": { "node": ">=0.10.0" } @@ -322,15 +439,15 @@ "node_modules/arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", "engines": { "node": ">=0.10.0" } }, "node_modules/asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dependencies": { "safer-buffer": "~2.1.0" } @@ -338,20 +455,20 @@ "node_modules/assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "engines": { "node": ">=0.8" } }, "node_modules/async": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", - "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=" + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" }, "node_modules/async-foreach": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", - "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", + "integrity": "sha512-VUeSMD8nEGBWaZK4lizI1sf3yEC7pnAQ/mrI7pC2fBz2s/tq5jWWEngTwaf0Gruu/OoXRGLGg1XFqpYBiGTYJA==", "engines": { "node": "*" } @@ -359,20 +476,20 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", "engines": { "node": "*" } }, "node_modules/aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" }, "node_modules/balanced-match": { "version": "1.0.2", @@ -401,7 +518,7 @@ "node_modules/bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", "dependencies": { "tweetnacl": "^0.14.3" } @@ -424,7 +541,7 @@ "node_modules/bin-build/node_modules/cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", "dependencies": { "lru-cache": "^4.0.1", "shebang-command": "^1.2.0", @@ -434,7 +551,7 @@ "node_modules/bin-build/node_modules/execa": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "integrity": "sha512-RztN09XglpYI7aBBrJCPW95jEH7YF1UEPOoX9yDhUTPdp7mK+CQvnLTuD10BNXZ3byLTu2uehZ8EcKT/4CGiFw==", "dependencies": { "cross-spawn": "^5.0.1", "get-stream": "^3.0.0", @@ -451,7 +568,7 @@ "node_modules/bin-build/node_modules/get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "integrity": "sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==", "engines": { "node": ">=4" } @@ -459,11 +576,55 @@ "node_modules/bin-build/node_modules/is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", "engines": { "node": ">=0.10.0" } }, + "node_modules/bin-build/node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/bin-build/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bin-build/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bin-build/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/bin-build/node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==" + }, "node_modules/bin-check": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bin-check/-/bin-check-4.1.0.tgz", @@ -479,7 +640,7 @@ "node_modules/bin-check/node_modules/cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", "dependencies": { "lru-cache": "^4.0.1", "shebang-command": "^1.2.0", @@ -489,7 +650,7 @@ "node_modules/bin-check/node_modules/execa": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "integrity": "sha512-RztN09XglpYI7aBBrJCPW95jEH7YF1UEPOoX9yDhUTPdp7mK+CQvnLTuD10BNXZ3byLTu2uehZ8EcKT/4CGiFw==", "dependencies": { "cross-spawn": "^5.0.1", "get-stream": "^3.0.0", @@ -506,7 +667,7 @@ "node_modules/bin-check/node_modules/get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "integrity": "sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==", "engines": { "node": ">=4" } @@ -514,15 +675,59 @@ "node_modules/bin-check/node_modules/is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", "engines": { "node": ">=0.10.0" } }, + "node_modules/bin-check/node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/bin-check/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bin-check/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bin-check/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/bin-check/node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==" + }, "node_modules/bin-pack": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bin-pack/-/bin-pack-1.0.2.tgz", - "integrity": "sha1-wqAU7b8L7XCjKSBi7UZXe5YSBnk=" + "integrity": "sha512-aOk0SxEon5LF9cMxQFViSKb4qccG6rs7XKyMXIb1J8f8LA2acTIWnHdT0IOTe4gYBbqgjdbuTZ5f+UP+vlh4Mw==" }, "node_modules/bin-version": { "version": "3.1.0", @@ -549,6 +754,14 @@ "node": ">=6" } }, + "node_modules/bin-version-check/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, "node_modules/bin-wrapper": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-4.1.0.tgz", @@ -590,7 +803,7 @@ "node_modules/bin-wrapper/node_modules/download/node_modules/pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", "engines": { "node": ">=4" } @@ -606,7 +819,7 @@ "node_modules/bin-wrapper/node_modules/get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "integrity": "sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==", "engines": { "node": ">=4" } @@ -641,7 +854,7 @@ "node_modules/bin-wrapper/node_modules/got/node_modules/pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", "engines": { "node": ">=4" } @@ -660,7 +873,7 @@ "node_modules/bin-wrapper/node_modules/make-dir/node_modules/pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", "engines": { "node": ">=4" } @@ -695,18 +908,10 @@ "node": ">=4" } }, - "node_modules/bin-wrapper/node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "engines": { - "node": ">=6" - } - }, "node_modules/bin-wrapper/node_modules/prepend-http": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==", "engines": { "node": ">=4" } @@ -714,7 +919,7 @@ "node_modules/bin-wrapper/node_modules/url-parse-lax": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "integrity": "sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==", "dependencies": { "prepend-http": "^2.0.0" }, @@ -791,7 +996,7 @@ "node_modules/buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "engines": { "node": "*" } @@ -799,12 +1004,99 @@ "node_modules/buffer-fill": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" + "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==" + }, + "node_modules/cacache": { + "version": "16.1.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", + "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "dependencies": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/cacache/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/cacache/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cacache/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/cacache/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cacache/node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/cacheable-request": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", - "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", + "integrity": "sha512-vag0O2LKZ/najSoUwDbVlnlCFvhBE/7mGTY2B5FgCBDcRD+oVV1HYTOwM6JZfMg/hIcM6IwnTZ1uQQL5/X3xIQ==", "dependencies": { "clone-response": "1.0.2", "get-stream": "3.0.0", @@ -818,7 +1110,7 @@ "node_modules/cacheable-request/node_modules/get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "integrity": "sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==", "engines": { "node": ">=4" } @@ -826,35 +1118,39 @@ "node_modules/cacheable-request/node_modules/lowercase-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", - "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "integrity": "sha512-RPlX0+PHuvxVDZ7xX+EBVAp4RsVxP/TdDSN2mJYdiq1Lc4Hz7EUSjUI7RZrKKlmrIzVhf6Jo2stj7++gVarS0A==", "engines": { "node": ">=0.10.0" } }, "node_modules/camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, "node_modules/camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", "dependencies": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, "node_modules/caw": { "version": "2.0.1", @@ -902,59 +1198,41 @@ } }, "node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/cliui/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "engines": { - "node": ">=6" - } - }, - "node_modules/cliui/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "engines": { - "node": ">=4" - } - }, - "node_modules/cliui/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/cliui/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dependencies": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/clone": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", "engines": { "node": ">=0.8" } @@ -962,7 +1240,7 @@ "node_modules/clone-response": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "integrity": "sha512-yjLXh88P599UOyPTFX0POsd7WxnbsVsGohcwzHOLspIhhpalPw1BcqED8NblyZLKcGrL8dTgMlcaZxV2jAD41Q==", "dependencies": { "mimic-response": "^1.0.0" } @@ -970,15 +1248,7 @@ "node_modules/clone-stats": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" - }, - "node_modules/code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "engines": { - "node": ">=0.10.0" - } + "integrity": "sha512-dhUqc57gSMCo6TX85FLfe51eC/s+Im2MLkAgJwfaRRexR2tA4dd3eLEW4L6efzHc2iNorrRRXITifnDLlRrhaA==" }, "node_modules/color-convert": { "version": "2.0.1", @@ -996,6 +1266,14 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "bin": { + "color-support": "bin.js" + } + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -1015,12 +1293,12 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/concat-stream": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", - "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", + "integrity": "sha512-H6xsIBfQ94aESBG8jGHXQ7i5AEpy5ZeVaLDOisDICiTCKpqEfr34/KmTrspKQNoLKNu9gTkovlpQcUi630AKiQ==", "engines": [ "node >= 0.8" ], @@ -1033,12 +1311,12 @@ "node_modules/concat-stream/node_modules/process-nextick-args": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + "integrity": "sha512-yN0WQmuCX63LP/TMvAg31nvT6m4vDqJEiiv2CAZqWOGNWutc9DfDk1NPYYmKUFmaVM2UwDowH4u5AHWYP/jxKw==" }, "node_modules/concat-stream/node_modules/readable-stream": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "integrity": "sha512-TXcFfb63BQe1+ySzsHZI/5v1aJPCShfqvWJ64ayNImXMsN1Cd0YGk/wm8KB7/OeessgPc9QvS9Zou8QTkFzsLw==", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", @@ -1051,7 +1329,7 @@ "node_modules/concat-stream/node_modules/string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" }, "node_modules/config-chain": { "version": "1.1.13", @@ -1065,28 +1343,47 @@ "node_modules/console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" }, "node_modules/console-stream": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/console-stream/-/console-stream-0.1.1.tgz", - "integrity": "sha1-oJX+B7IEZZVfL6/Si11yvM2UnUQ=" + "integrity": "sha512-QC/8l9e6ofi6nqZ5PawlDgzmMw3OxIXtvolBzap/F4UDBJlDaZRSNbL/lb41C29FcbSJncBFlJFj2WJoNyZRfQ==" }, "node_modules/content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "dependencies": { - "safe-buffer": "5.1.2" + "safe-buffer": "5.2.1" }, "engines": { "node": ">= 0.6" } }, + "node_modules/content-disposition/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/contentstream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/contentstream/-/contentstream-1.0.0.tgz", - "integrity": "sha1-C9z6RtowRkqGzo+n7OVlQQ3G+aU=", + "integrity": "sha512-jqWbfFZFG9tZbdej7+TzXI4kanABh3BLtTWY6NxqTK5zo6iTIeo5aq4iRVfYsLQ0y8ccQqmJR/J4NeMmEdnR2w==", "dependencies": { "readable-stream": "~1.0.33-1" }, @@ -1097,12 +1394,12 @@ "node_modules/contentstream/node_modules/isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" }, "node_modules/contentstream/node_modules/readable-stream": { "version": "1.0.34", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", @@ -1113,12 +1410,12 @@ "node_modules/contentstream/node_modules/string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" }, "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/cross-spawn": { "version": "7.0.3", @@ -1133,51 +1430,10 @@ "node": ">= 8" } }, - "node_modules/cross-spawn/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/cross-spawn/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cross-spawn/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "engines": { - "node": ">=8" - } - }, - "node_modules/cross-spawn/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "integrity": "sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==", "dependencies": { "array-find-index": "^1.0.1" }, @@ -1188,7 +1444,7 @@ "node_modules/cwise-compiler": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/cwise-compiler/-/cwise-compiler-1.1.3.tgz", - "integrity": "sha1-9NZnQQ6FDToxOn0tt7HlBbsDTMU=", + "integrity": "sha512-WXlK/m+Di8DMMcCjcWr4i+XzcQra9eCdXIJrgh4TUgh0pIS/yJduLxS9JgefsHJ/YVLdgPtXm9r62W92MvanEQ==", "dependencies": { "uniq": "^1.0.0" } @@ -1196,7 +1452,7 @@ "node_modules/dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dependencies": { "assert-plus": "^1.0.0" }, @@ -1207,32 +1463,59 @@ "node_modules/data-uri-to-buffer": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-0.0.3.tgz", - "integrity": "sha1-GK6XmmoMqZSwYlhTkW0mYruuCxo=" + "integrity": "sha512-Cp+jOa8QJef5nXS5hU7M1DWzXPEIoVR3kbV0dQuVGwROZg8bGf1DcCnkmajBTnvghTtSNMUdRrPjgaT6ZQucbw==" + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } }, "node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "engines": { "node": ">=0.10.0" } }, "node_modules/decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", "dependencies": { "decamelize": "^1.1.0", "map-obj": "^1.0.0" }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decamelize-keys/node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", "engines": { "node": ">=0.10.0" } }, "node_modules/decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "engines": { "node": ">=0.10" } @@ -1258,7 +1541,7 @@ "node_modules/decompress-response": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", "dependencies": { "mimic-response": "^1.0.0" }, @@ -1282,7 +1565,7 @@ "node_modules/decompress-tar/node_modules/file-type": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "integrity": "sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ==", "engines": { "node": ">=4" } @@ -1290,7 +1573,7 @@ "node_modules/decompress-tar/node_modules/is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", "engines": { "node": ">=0.10.0" } @@ -1321,7 +1604,7 @@ "node_modules/decompress-tarbz2/node_modules/is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", "engines": { "node": ">=0.10.0" } @@ -1342,7 +1625,7 @@ "node_modules/decompress-targz/node_modules/file-type": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "integrity": "sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ==", "engines": { "node": ">=4" } @@ -1350,7 +1633,7 @@ "node_modules/decompress-targz/node_modules/is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", "engines": { "node": ">=0.10.0" } @@ -1358,7 +1641,7 @@ "node_modules/decompress-unzip": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", - "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", + "integrity": "sha512-1fqeluvxgnn86MOh66u8FjbtJpAFv5wgCT9Iw8rcBqQcCo5tO8eiJw7NNTrvt9n4CRBVq7CstiS922oPgyGLrw==", "dependencies": { "file-type": "^3.8.0", "get-stream": "^2.2.0", @@ -1372,7 +1655,7 @@ "node_modules/decompress-unzip/node_modules/file-type": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", - "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", + "integrity": "sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==", "engines": { "node": ">=0.10.0" } @@ -1380,7 +1663,7 @@ "node_modules/decompress-unzip/node_modules/get-stream": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", - "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", + "integrity": "sha512-AUGhbbemXxrZJRD5cDvKtQxLuYaIbNtDTK8YqupCI393Q2KSTreEsLUN3ZxAWFGiKTzL6nKuzfcIvieflUX9qA==", "dependencies": { "object-assign": "^4.0.1", "pinkie-promise": "^2.0.0" @@ -1389,6 +1672,14 @@ "node": ">=0.10.0" } }, + "node_modules/decompress-unzip/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/decompress/node_modules/make-dir": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", @@ -1403,11 +1694,19 @@ "node_modules/decompress/node_modules/make-dir/node_modules/pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", "engines": { "node": ">=4" } }, + "node_modules/decompress/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/del": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/del/-/del-5.1.0.tgz", @@ -1429,7 +1728,7 @@ "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "engines": { "node": ">=0.4.0" } @@ -1437,7 +1736,7 @@ "node_modules/delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" }, "node_modules/dir-glob": { "version": "3.0.1", @@ -1450,14 +1749,6 @@ "node": ">=8" } }, - "node_modules/dir-glob/node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "engines": { - "node": ">=8" - } - }, "node_modules/download": { "version": "6.2.5", "resolved": "https://registry.npmjs.org/download/-/download-6.2.5.tgz", @@ -1482,7 +1773,7 @@ "node_modules/download/node_modules/file-type": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "integrity": "sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ==", "engines": { "node": ">=4" } @@ -1490,7 +1781,7 @@ "node_modules/download/node_modules/get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "integrity": "sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==", "engines": { "node": ">=4" } @@ -1509,29 +1800,38 @@ "node_modules/download/node_modules/pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", "engines": { "node": ">=4" } }, "node_modules/duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz", + "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==" }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dependencies": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" } }, "node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } }, "node_modules/end-of-stream": { "version": "1.4.4", @@ -1549,6 +1849,11 @@ "node": ">=6" } }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" + }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -1557,10 +1862,18 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "engines": { + "node": ">=6" + } + }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "engines": { "node": ">=0.8.0" } @@ -1600,11 +1913,57 @@ "node_modules/execa/node_modules/is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", "engines": { "node": ">=0.10.0" } }, + "node_modules/execa/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/execa/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/execa/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/executable": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", @@ -1616,6 +1975,14 @@ "node": ">=4" } }, + "node_modules/executable/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/ext-list": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", @@ -1647,7 +2014,7 @@ "node_modules/extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "engines": [ "node >=0.6.0" ] @@ -1658,9 +2025,9 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -1669,7 +2036,7 @@ "micromatch": "^4.0.4" }, "engines": { - "node": ">=8" + "node": ">=8.6.0" } }, "node_modules/fast-json-stable-stringify": { @@ -1678,9 +2045,9 @@ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "node_modules/fastq": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.1.tgz", - "integrity": "sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dependencies": { "reusify": "^1.0.4" } @@ -1688,7 +2055,7 @@ "node_modules/fd-slicer": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "dependencies": { "pend": "~1.2.0" } @@ -1696,7 +2063,7 @@ "node_modules/figures": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "integrity": "sha512-UxKlfCRuCBxSXU4C6t9scbDyWZ4VlaFFdojKtzJuSkuOBQ5CNFum+zZXFwHjo+CxBC1t6zlYPgHIgFjL8ggoEQ==", "dependencies": { "escape-string-regexp": "^1.0.5", "object-assign": "^4.1.0" @@ -1716,7 +2083,7 @@ "node_modules/filename-reserved-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", - "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=", + "integrity": "sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==", "engines": { "node": ">=4" } @@ -1746,15 +2113,15 @@ } }, "node_modules/find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dependencies": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/find-versions": { @@ -1771,7 +2138,7 @@ "node_modules/first-chunk-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", - "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", + "integrity": "sha512-ArRi5axuv66gEsyl3UuK80CzW7t56hem73YGNYxNWTGNKFJUadSb9Gu9SHijYEUi8ulQMf1bJomYNwSCPHhtTQ==", "engines": { "node": ">=0.10.0" } @@ -1779,7 +2146,7 @@ "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", "engines": { "node": "*" } @@ -1800,7 +2167,7 @@ "node_modules/from2": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "integrity": "sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==", "dependencies": { "inherits": "^2.0.1", "readable-stream": "^2.0.0" @@ -1838,7 +2205,7 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "node_modules/function-bind": { "version": "1.1.1", @@ -1846,18 +2213,40 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "node_modules/gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", "dependencies": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/gauge/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/gauge/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, "node_modules/gaze": { @@ -1911,7 +2300,7 @@ "node_modules/get-stdin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "integrity": "sha512-F5aQMywwJ2n85s4hJPTT9RPxGmubonuB10MNYo17/xph174n2MIR33HRguhzVag10O/npM7SPk73LMZNP+FaWw==", "engines": { "node": ">=0.10.0" } @@ -1930,7 +2319,7 @@ "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dependencies": { "assert-plus": "^1.0.0" } @@ -1938,7 +2327,7 @@ "node_modules/gif-encoder": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/gif-encoder/-/gif-encoder-0.4.3.tgz", - "integrity": "sha1-iitP6MqJWkjjoLbLs0CgpqNXGJk=", + "integrity": "sha512-HMfSa+EIng62NbDhM63QGYoc49/m8DcZ9hhBtw+CXX9mKboSpeFVxjZ2WEWaMFZ14MUjfACK7jsrxrJffIVrCg==", "dependencies": { "readable-stream": "~1.1.9" }, @@ -1949,12 +2338,12 @@ "node_modules/gif-encoder/node_modules/isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" }, "node_modules/gif-encoder/node_modules/readable-stream": { "version": "1.1.14", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", @@ -1965,17 +2354,17 @@ "node_modules/gif-encoder/node_modules/string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" }, "node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, @@ -2016,18 +2405,48 @@ } }, "node_modules/globule": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz", - "integrity": "sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.4.tgz", + "integrity": "sha512-OPTIfhMBh7JbBYDpa5b+Q5ptmMWKwcNcFSR/0c6t8V4f3ZAVBEsKNY37QdVqmLRYSMhOUGYrY0QhSoEpzGr/Eg==", "dependencies": { "glob": "~7.1.1", - "lodash": "~4.17.10", + "lodash": "^4.17.21", "minimatch": "~3.0.2" }, "engines": { "node": ">= 0.10" } }, + "node_modules/globule/node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globule/node_modules/minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/got": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", @@ -2055,7 +2474,7 @@ "node_modules/got/node_modules/get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "integrity": "sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==", "engines": { "node": ">=4" } @@ -2063,20 +2482,20 @@ "node_modules/got/node_modules/is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", "engines": { "node": ">=0.10.0" } }, "node_modules/graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", "engines": { "node": ">=4" } @@ -2116,7 +2535,7 @@ "node_modules/has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", "dependencies": { "ansi-regex": "^2.0.0" }, @@ -2154,22 +2573,41 @@ "node_modules/has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" }, "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } }, "node_modules/http-cache-semantics": { "version": "3.8.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==" }, + "node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", "dependencies": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -2180,6 +2618,38 @@ "npm": ">=1.3.7" } }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -2200,9 +2670,9 @@ ] }, "node_modules/ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "engines": { "node": ">= 4" } @@ -2247,21 +2717,31 @@ "node": ">=6" } }, - "node_modules/indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dependencies": { - "repeating": "^2.0.0" - }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "engines": { - "node": ">=0.10.0" + "node": ">=0.8.19" } }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -2280,7 +2760,7 @@ "node_modules/into-stream": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", - "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", + "integrity": "sha512-TcdjPibTksa1NQximqep2r17ISRiNE9fwlfbg3F8ANdvP5/yrFTew86VcO//jk4QTaMlbjypPBq76HN2zaKfZQ==", "dependencies": { "from2": "^2.1.1", "p-is-promise": "^1.1.0" @@ -2292,12 +2772,17 @@ "node_modules/iota-array": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/iota-array/-/iota-array-1.0.0.tgz", - "integrity": "sha1-ge9X/l0FgUzVjCSDYyqZwwoOgIc=" + "integrity": "sha512-pZ2xT+LOHckCatGQ3DcG/a+QuEqvoxqkiL7tvE8nn3uuu+f6i1TtpB5/FtWFbxUuVr5PZCx8KskuGatbJDXOWA==" + }, + "node_modules/ip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" }, "node_modules/is-buffer": { "version": "1.1.6", @@ -2305,9 +2790,9 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "node_modules/is-core-module": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", - "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dependencies": { "has": "^1.0.3" }, @@ -2318,7 +2803,7 @@ "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "engines": { "node": ">=0.10.0" } @@ -2335,20 +2820,17 @@ } }, "node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dependencies": { - "number-is-nan": "^1.0.0" - }, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dependencies": { "is-extglob": "^2.1.1" }, @@ -2356,10 +2838,15 @@ "node": ">=0.10.0" } }, + "node_modules/is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==" + }, "node_modules/is-natural-number": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", - "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=" + "integrity": "sha512-Y4LTamMe0DDQIIAlaer9eKebAlDSV6huy+TWhJVPlzZh2o4tRP5SQWFlLn5N0To4mDD22/qdOq+veo1cSISLgQ==" }, "node_modules/is-number": { "version": "7.0.0", @@ -2396,7 +2883,7 @@ "node_modules/is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", "engines": { "node": ">=0.10.0" } @@ -2431,27 +2918,27 @@ "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" }, "node_modules/is-utf8": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==" }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "node_modules/isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" }, "node_modules/isurl": { "version": "1.0.0", @@ -2466,9 +2953,9 @@ } }, "node_modules/jpeg-js": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.3.tgz", - "integrity": "sha512-ru1HWKek8octvUHFHvE5ZzQ1yAsJmIvRdGWvSoKV52XKyuyYA437QWDttXT8eZXDSbuMpHlLzPDZUPd6idIz+Q==" + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.4.tgz", + "integrity": "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==" }, "node_modules/js-base64": { "version": "2.6.4", @@ -2483,12 +2970,12 @@ "node_modules/jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" }, "node_modules/json-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" + "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==" }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", @@ -2496,9 +2983,9 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "node_modules/json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -2508,28 +2995,28 @@ "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" }, "node_modules/jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "node_modules/jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "engines": [ - "node >=0.6.0" - ], + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", - "json-schema": "0.2.3", + "json-schema": "0.4.0", "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" } }, "node_modules/junk": { @@ -2559,7 +3046,7 @@ "node_modules/layout": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/layout/-/layout-2.2.0.tgz", - "integrity": "sha1-MeRL/BjdEBmz/7II5AKku/4uavQ=", + "integrity": "sha512-+kdgg25XW11BA4cl9vF+SH01HaBipld2Nf/PlU2kSYncAbdUbDoahzrlh6yhR93N/wR2TGgcFoxebzR1LKmZUg==", "dependencies": { "bin-pack": "~1.0.1" }, @@ -2568,14 +3055,14 @@ } }, "node_modules/lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, "node_modules/load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", "dependencies": { "graceful-fs": "^4.1.2", "parse-json": "^2.2.0", @@ -2587,24 +3074,34 @@ "node": ">=0.10.0" } }, - "node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "node_modules/load-json-file/node_modules/parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "error-ex": "^1.2.0" }, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/locate-path/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "node_modules/load-json-file/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "engines": { - "node": ">=4" + "node": ">=0.10.0" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" } }, "node_modules/lodash": { @@ -2615,7 +3112,7 @@ "node_modules/logalot": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/logalot/-/logalot-2.1.0.tgz", - "integrity": "sha1-X46MkNME7fElMJUaVVSruMXj9VI=", + "integrity": "sha512-Ah4CgdSRfeCJagxQhcVNMi9BfGYyEKLa6d7OA6xSbld/Hg3Cf2QiOa1mDpmG7Ve8LOH6DN3mdttzjQAvWTyVkw==", "dependencies": { "figures": "^1.3.5", "squeak": "^1.0.0" @@ -2627,7 +3124,7 @@ "node_modules/longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "integrity": "sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg==", "engines": { "node": ">=0.10.0" } @@ -2635,7 +3132,7 @@ "node_modules/loud-rejection": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "integrity": "sha512-RPNliZOFkqFumDhvYqOaNY4Uz9oJM2K9tC6JWsJJsNdhuONW4LQHRBpb0qf4pJApVffI5N39SwzWZJuEhfd7eQ==", "dependencies": { "currently-unhandled": "^0.4.1", "signal-exit": "^3.0.0" @@ -2655,7 +3152,7 @@ "node_modules/lpad-align": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/lpad-align/-/lpad-align-1.1.2.tgz", - "integrity": "sha1-IfYArBwwlcPG5JfuZyce4ISB/p4=", + "integrity": "sha512-MMIcFmmR9zlGZtBcFOows6c2COMekHCIFJz3ew/rRpKZ1wR4mXDPzvcVqLarux8M33X4TPSq2Jdw8WJj0q0KbQ==", "dependencies": { "get-stdin": "^4.0.1", "indent-string": "^2.1.0", @@ -2669,13 +3166,201 @@ "node": ">=0.10.0" } }, - "node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "node_modules/lpad-align/node_modules/camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lpad-align/node_modules/camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha512-bA/Z/DERHKqoEOrp+qeGKw1QlvEQkGZSc0XaY6VnTxZr+Kv1G5zFwttpjv8qxZ/sBPT4nthwZaAcsAZTJlSKXQ==", "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lpad-align/node_modules/find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", + "dependencies": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lpad-align/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" + }, + "node_modules/lpad-align/node_modules/indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha512-aqwDFWSgSgfRaEwao5lg5KEcVd/2a+D1rvoG7NdilmYz0NwRk6StWpWdz/Hpk34MKPpx7s8XxUqimfcQK6gGlg==", + "dependencies": { + "repeating": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lpad-align/node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lpad-align/node_modules/meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha512-TNdwZs0skRlpPpCUK25StC4VH+tP5GgeY1HQOOGP+lQ2xtdkN2VtT/5tiX9k3IWpkBPV9b3LsAWXn4GGi/PrSA==", + "dependencies": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lpad-align/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/lpad-align/node_modules/path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", + "dependencies": { + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lpad-align/node_modules/path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", + "dependencies": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lpad-align/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lpad-align/node_modules/read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", + "dependencies": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lpad-align/node_modules/read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", + "dependencies": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lpad-align/node_modules/redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha512-qtW5hKzGQZqKoh6JNSD+4lfitfPKGz42e6QwiRmPM5mmKtR0N41AbJRYu0xJi7nhOJ4WDgRkKvAk6tw4WIwR4g==", + "dependencies": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lpad-align/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/lpad-align/node_modules/strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha512-I5iQq6aFMM62fBEAIB/hXzwJD6EEZ0xEGCX2t7oXqaKPIRgt4WruAQ285BISgdkP+HLGWyeGmNJcpIwFeRYRUA==", + "dependencies": { + "get-stdin": "^4.0.1" + }, + "bin": { + "strip-indent": "cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lpad-align/node_modules/trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha512-Nm4cF79FhSTzrLKGDMi3I4utBtFv8qKy4sq1enftf2gMdpqI8oVQTAfySkTz5r49giVzDj88SVZXP4CeYQwjaw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, "node_modules/make-dir": { @@ -2693,334 +3378,56 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } }, - "node_modules/map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "node_modules/make-fetch-happen": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", + "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", "dependencies": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" }, "engines": { - "node": ">=0.10.0" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "engines": { - "node": ">= 8" - } + "node_modules/make-fetch-happen/node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, - "node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.49.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", - "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.32", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", - "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", - "dependencies": { - "mime-db": "1.49.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "engines": { - "node": ">=4" - } - }, - "node_modules/min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "engines": { - "node": ">=4" - } - }, - "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "node_modules/minimist-options": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", - "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", - "dependencies": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0", - "kind-of": "^6.0.3" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/minipass": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", - "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minipass/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/minizlib/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/nan": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", - "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==" - }, - "node_modules/ndarray": { - "version": "1.0.19", - "resolved": "https://registry.npmjs.org/ndarray/-/ndarray-1.0.19.tgz", - "integrity": "sha512-B4JHA4vdyZU30ELBw3g7/p9bZupyew5a7tX1Y/gGeF2hafrPaQZhgrGQfsvgfYbgdFZjYwuEcnaobeM/WMW+HQ==", - "dependencies": { - "iota-array": "^1.0.0", - "is-buffer": "^1.0.2" - } - }, - "node_modules/ndarray-ops": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/ndarray-ops/-/ndarray-ops-1.2.2.tgz", - "integrity": "sha1-WeiNLDKn7ryxvGkPrhQVeVV6YU4=", - "dependencies": { - "cwise-compiler": "^1.0.0" - } - }, - "node_modules/ndarray-pack": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ndarray-pack/-/ndarray-pack-1.2.1.tgz", - "integrity": "sha1-jK6+qqJNXs9w/4YCBjeXfajuWFo=", - "dependencies": { - "cwise-compiler": "^1.1.2", - "ndarray": "^1.0.13" - } - }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" - }, - "node_modules/node-bitmap": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/node-bitmap/-/node-bitmap-0.0.1.tgz", - "integrity": "sha1-GA6scAPgxwdhjvMTaPYvhLKmkJE=", - "engines": { - "node": ">=v0.6.5" - } - }, - "node_modules/node-gyp": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-7.1.2.tgz", - "integrity": "sha512-CbpcIo7C3eMu3dL1c3d0xw449fHIGALIJsRP4DDPHpyiW8vcriNY7ubh9TE4zEKfSxscY7PjeFnshE7h75ynjQ==", - "dependencies": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.3", - "nopt": "^5.0.0", - "npmlog": "^4.1.2", - "request": "^2.88.2", - "rimraf": "^3.0.2", - "semver": "^7.3.2", - "tar": "^6.0.2", - "which": "^2.0.2" - }, - "bin": { - "node-gyp": "bin/node-gyp.js" - }, - "engines": { - "node": ">= 10.12.0" - } - }, - "node_modules/node-gyp/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-gyp/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-gyp/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/node-gyp/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "node_modules/node-sass": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-6.0.1.tgz", - "integrity": "sha512-f+Rbqt92Ful9gX0cGtdYwjTrWAaGURgaK5rZCWOgCNyGWusFYHhbqCCBoFBeat+HKETOU02AyTxNhJV0YZf2jQ==", - "hasInstallScript": true, - "dependencies": { - "async-foreach": "^0.1.3", - "chalk": "^1.1.1", - "cross-spawn": "^7.0.3", - "gaze": "^1.0.0", - "get-stdin": "^4.0.1", - "glob": "^7.0.3", - "lodash": "^4.17.15", - "meow": "^9.0.0", - "nan": "^2.13.2", - "node-gyp": "^7.1.0", - "npmlog": "^4.0.0", - "request": "^2.88.0", - "sass-graph": "2.2.5", - "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" - }, - "bin": { - "node-sass": "bin/node-sass" - }, + "node_modules/make-fetch-happen/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "engines": { "node": ">=12" } }, - "node_modules/node-sass/node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/node-sass/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/node-sass/node_modules/camelcase-keys": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "dependencies": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - }, + "node_modules/map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", "engines": { "node": ">=8" }, @@ -3028,86 +3435,7 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/node-sass/node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/node-sass/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/node-sass/node_modules/hosted-git-info": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", - "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-sass/node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/node-sass/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/node-sass/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-sass/node_modules/map-obj": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", - "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/node-sass/node_modules/meow": { + "node_modules/meow": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", @@ -3132,183 +3460,392 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/node-sass/node_modules/normalize-package-data": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.2.tgz", - "integrity": "sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg==", - "dependencies": { - "hosted-git-info": "^4.0.1", - "resolve": "^1.20.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" - }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "engines": { - "node": ">=10" + "node": ">= 8" } }, - "node_modules/node-sass/node_modules/p-locate": { + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minimist-options": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", "dependencies": { - "p-limit": "^2.2.0" + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" }, "engines": { - "node": ">=8" + "node": ">= 6" } }, - "node_modules/node-sass/node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" + "yallist": "^4.0.0" }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/node-sass/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "engines": { "node": ">=8" } }, - "node_modules/node-sass/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "node_modules/minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" + "minipass": "^3.0.0" }, "engines": { - "node": ">=8" + "node": ">= 8" } }, - "node_modules/node-sass/node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "node_modules/minipass-fetch": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", + "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" }, "engines": { - "node": ">=8" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "optionalDependencies": { + "encoding": "^0.1.13" } }, - "node_modules/node-sass/node_modules/read-pkg-up/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "engines": { - "node": ">=8" - } - }, - "node_modules/node-sass/node_modules/read-pkg/node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" - }, - "node_modules/node-sass/node_modules/read-pkg/node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" } }, - "node_modules/node-sass/node_modules/read-pkg/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "bin": { - "semver": "bin/semver" - } - }, - "node_modules/node-sass/node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/node-sass/node_modules/redent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", - "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", - "dependencies": { - "indent-string": "^4.0.0", - "strip-indent": "^3.0.0" + "mkdirp": "bin/cmd.js" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/node-sass/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/nan": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==" + }, + "node_modules/ndarray": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/ndarray/-/ndarray-1.0.19.tgz", + "integrity": "sha512-B4JHA4vdyZU30ELBw3g7/p9bZupyew5a7tX1Y/gGeF2hafrPaQZhgrGQfsvgfYbgdFZjYwuEcnaobeM/WMW+HQ==", "dependencies": { - "lru-cache": "^6.0.0" + "iota-array": "^1.0.0", + "is-buffer": "^1.0.2" + } + }, + "node_modules/ndarray-ops": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/ndarray-ops/-/ndarray-ops-1.2.2.tgz", + "integrity": "sha512-BppWAFRjMYF7N/r6Ie51q6D4fs0iiGmeXIACKY66fLpnwIui3Wc3CXiD/30mgLbDjPpSLrsqcp3Z62+IcHZsDw==", + "dependencies": { + "cwise-compiler": "^1.0.0" + } + }, + "node_modules/ndarray-pack": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ndarray-pack/-/ndarray-pack-1.2.1.tgz", + "integrity": "sha512-51cECUJMT0rUZNQa09EoKsnFeDL4x2dHRT0VR5U2H5ZgEcm95ZDWcMA5JShroXjHOejmAD/fg8+H+OvUnVXz2g==", + "dependencies": { + "cwise-compiler": "^1.1.2", + "ndarray": "^1.0.13" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + }, + "node_modules/node-bitmap": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/node-bitmap/-/node-bitmap-0.0.1.tgz", + "integrity": "sha512-Jx5lPaaLdIaOsj2mVLWMWulXF6GQVdyLvNSxmiYCvZ8Ma2hfKX0POoR2kgKOqz+oFsRreq0yYZjQ2wjE9VNzCA==", + "engines": { + "node": ">=v0.6.5" + } + }, + "node_modules/node-gyp": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", + "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==", + "dependencies": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^9.1.0", + "nopt": "^5.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" }, "bin": { - "semver": "bin/semver.js" + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": ">= 10.12.0" + } + }, + "node_modules/node-gyp/node_modules/@npmcli/fs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", + "integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==", + "dependencies": { + "@gar/promisify": "^1.0.1", + "semver": "^7.3.5" + } + }, + "node_modules/node-gyp/node_modules/@npmcli/move-file": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", + "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "deprecated": "This functionality has been moved to @npmcli/fs", + "dependencies": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" }, "engines": { "node": ">=10" } }, - "node_modules/node-sass/node_modules/strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "node_modules/node-gyp/node_modules/@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/node-gyp/node_modules/cacache": { + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", + "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", "dependencies": { - "min-indent": "^1.0.0" + "@npmcli/fs": "^1.0.0", + "@npmcli/move-file": "^1.0.1", + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", + "infer-owner": "^1.0.4", + "lru-cache": "^6.0.0", + "minipass": "^3.1.1", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^1.0.3", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^8.0.1", + "tar": "^6.0.2", + "unique-filename": "^1.1.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/node-gyp/node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + }, + "node_modules/node-gyp/node_modules/http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "dependencies": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/node-gyp/node_modules/make-fetch-happen": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", + "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", + "dependencies": { + "agentkeepalive": "^4.1.3", + "cacache": "^15.2.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^6.0.0", + "minipass": "^3.1.3", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^1.3.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.2", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^6.0.0", + "ssri": "^8.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/node-gyp/node_modules/minipass-fetch": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", + "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", + "dependencies": { + "minipass": "^3.1.0", + "minipass-sized": "^1.0.3", + "minizlib": "^2.0.0" }, "engines": { "node": ">=8" + }, + "optionalDependencies": { + "encoding": "^0.1.12" } }, - "node_modules/node-sass/node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/node-sass/node_modules/trim-newlines": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", - "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", - "engines": { - "node": ">=8" - } - }, - "node_modules/node-sass/node_modules/type-fest": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", - "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "node_modules/node-gyp/node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dependencies": { + "aggregate-error": "^3.0.0" + }, "engines": { "node": ">=10" }, @@ -3316,17 +3853,72 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/node-sass/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "node_modules/node-sass/node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "node_modules/node-gyp/node_modules/socks-proxy-agent": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz", + "integrity": "sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ==", + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, "engines": { - "node": ">=10" + "node": ">= 10" + } + }, + "node_modules/node-gyp/node_modules/ssri": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", + "dependencies": { + "minipass": "^3.1.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/node-gyp/node_modules/unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "dependencies": { + "unique-slug": "^2.0.0" + } + }, + "node_modules/node-gyp/node_modules/unique-slug": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "dependencies": { + "imurmurhash": "^0.1.4" + } + }, + "node_modules/node-sass": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-9.0.0.tgz", + "integrity": "sha512-yltEuuLrfH6M7Pq2gAj5B6Zm7m+gdZoG66wTqG6mIZV/zijq3M2OO2HswtT6oBspPyFhHDcaxWpsBm0fRNDHPg==", + "hasInstallScript": true, + "dependencies": { + "async-foreach": "^0.1.3", + "chalk": "^4.1.2", + "cross-spawn": "^7.0.3", + "gaze": "^1.0.0", + "get-stdin": "^4.0.1", + "glob": "^7.0.3", + "lodash": "^4.17.15", + "make-fetch-happen": "^10.0.4", + "meow": "^9.0.0", + "nan": "^2.17.0", + "node-gyp": "^8.4.1", + "sass-graph": "^4.0.1", + "stdout-stream": "^1.4.0", + "true-case-path": "^2.2.1" + }, + "bin": { + "node-sass": "bin/node-sass" + }, + "engines": { + "node": ">=16" } }, "node_modules/nopt": { @@ -3344,14 +3936,17 @@ } }, "node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", "validate-npm-package-license": "^3.0.1" + }, + "engines": { + "node": ">=10" } }, "node_modules/normalize-url": { @@ -3370,7 +3965,7 @@ "node_modules/normalize-url/node_modules/prepend-http": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==", "engines": { "node": ">=4" } @@ -3378,7 +3973,7 @@ "node_modules/normalize-url/node_modules/sort-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", - "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "integrity": "sha512-/dPCrG1s3ePpWm6yBbxZq5Be1dXGLyLn9Z791chDC3NFrpkVbWGzkBwPN1knaciexFXgRJ7hzdnwZ4stHSDmjg==", "dependencies": { "is-plain-obj": "^1.0.0" }, @@ -3401,7 +3996,7 @@ "node_modules/npm-conf/node_modules/pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", "engines": { "node": ">=4" } @@ -3409,7 +4004,7 @@ "node_modules/npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==", "dependencies": { "path-key": "^2.0.0" }, @@ -3417,23 +4012,26 @@ "node": ">=4" } }, - "node_modules/npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dependencies": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" + "node_modules/npm-run-path/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "engines": { + "node": ">=4" } }, - "node_modules/number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "node_modules/npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "dependencies": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/oauth-sign": { @@ -3447,7 +4045,7 @@ "node_modules/obj-extend": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/obj-extend/-/obj-extend-0.1.0.tgz", - "integrity": "sha1-u0SKR3X7les0p4H5CLusLfI9u1s=", + "integrity": "sha512-or9c7Ue2wWCun41DuLP3+LKEUjSZcDSxfCM4HZQSX9tcjLL/yuzTW7MmtVNs+MmN16uDRpDrFmFK/WVSm4vklg==", "engines": { "node": "*" } @@ -3455,7 +4053,7 @@ "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "engines": { "node": ">=0.10.0" } @@ -3468,7 +4066,7 @@ "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dependencies": { "wrappy": "1" } @@ -3495,6 +4093,14 @@ "node": ">=6" } }, + "node_modules/ow/node_modules/type-fest": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.5.2.tgz", + "integrity": "sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==", + "engines": { + "node": ">=6" + } + }, "node_modules/p-cancelable": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", @@ -3506,7 +4112,7 @@ "node_modules/p-event": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-event/-/p-event-1.3.0.tgz", - "integrity": "sha1-jmtPT2XHK8W2/ii3XtqHT5akoIU=", + "integrity": "sha512-hV1zbA7gwqPVFcapfeATaNjQ3J0NuzorHPyG8GPL9g/Y/TplWVBVoCKCXL6Ej2zscrCEv195QNWJXuBH6XZuzA==", "dependencies": { "p-timeout": "^1.1.1" }, @@ -3517,7 +4123,7 @@ "node_modules/p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", "engines": { "node": ">=4" } @@ -3525,7 +4131,7 @@ "node_modules/p-is-promise": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", - "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", + "integrity": "sha512-zL7VE4JVS2IFSkR2GQKDSPEVxkoH43/p7oEnwpdCndKYJO0HVeRB7fA8TJwuLOTBREtK0ea8eHaxdwcpob5dmg==", "engines": { "node": ">=4" } @@ -3545,14 +4151,14 @@ } }, "node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dependencies": { - "p-limit": "^2.0.0" + "p-limit": "^2.2.0" }, "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/p-map": { @@ -3569,7 +4175,7 @@ "node_modules/p-map-series": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-map-series/-/p-map-series-1.0.0.tgz", - "integrity": "sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco=", + "integrity": "sha512-4k9LlvY6Bo/1FcIdV33wqZQES0Py+iKISU9Uc8p8AjWoZPnFKMpVIVD3s0EYn4jzLh1I+WeUZkJ0Yoa4Qfw3Kg==", "dependencies": { "p-reduce": "^1.0.0" }, @@ -3591,7 +4197,7 @@ "node_modules/p-reduce": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", - "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", + "integrity": "sha512-3Tx1T3oM1xO/Y8Gj0sWyE78EIJZ+t+aEmXUdvQgvGmSMri7aPTHoovbXEreWKkL5j21Er60XAWLTzKbAKYOujQ==", "engines": { "node": ">=4" } @@ -3599,7 +4205,7 @@ "node_modules/p-timeout": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", - "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "integrity": "sha512-gb0ryzr+K2qFqFv6qi3khoeqMZF/+ajxQipEF6NteZVnvz9tzdsfAVj3lYtn1gAXvH5lfLwfxEII799gt/mRIA==", "dependencies": { "p-finally": "^1.0.0" }, @@ -3618,47 +4224,50 @@ "node_modules/parse-data-uri": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/parse-data-uri/-/parse-data-uri-0.2.0.tgz", - "integrity": "sha1-vwTYUd1ch7CrI45dAazklLYEtMk=", + "integrity": "sha512-uOtts8NqDcaCt1rIsO3VFDRsAfgE4c6osG4d9z3l4dCBlxYFzni6Di/oNU270SDrjkfZuUvLZx1rxMyqh46Y9w==", "dependencies": { "data-uri-to-buffer": "0.0.3" } }, "node_modules/parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dependencies": { - "error-ex": "^1.2.0" + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dependencies": { - "pinkie-promise": "^2.0.0" - }, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "engines": { "node": ">=0.10.0" } }, "node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/path-parse": { @@ -3667,32 +4276,27 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dependencies": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" }, "node_modules/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" }, "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "engines": { "node": ">=8.6" }, @@ -3701,17 +4305,17 @@ } }, "node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, "node_modules/pinkie": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", "engines": { "node": ">=0.10.0" } @@ -3719,7 +4323,7 @@ "node_modules/pinkie-promise": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", "dependencies": { "pinkie": "^2.0.0" }, @@ -3728,11 +4332,11 @@ } }, "node_modules/pixelsmith": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/pixelsmith/-/pixelsmith-2.4.1.tgz", - "integrity": "sha512-6lVOPf9eBd9bWfxo5efmJcAiF6y65Ui9Ir8IR8jocrj/v/8QoLWZmgnhO7KGUfqkwPLNlCBfxVdjp4QihdPmPQ==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/pixelsmith/-/pixelsmith-2.6.0.tgz", + "integrity": "sha512-1W0C8EVxAPJwsCodw/+dfeEtdSc8JuHFipVylf51PIvh7S7Q33qmVCCzeWQp1y1sXpZ52iXGY2D/ICMyHPIULw==", "dependencies": { - "async": "~0.9.0", + "async": "^3.2.3", "concat-stream": "~1.5.1", "get-pixels": "~3.3.0", "mime-types": "~2.1.7", @@ -3742,7 +4346,7 @@ "vinyl-file": "~1.3.0" }, "engines": { - "node": ">= 8.0.0" + "node": ">= 12.0.0" } }, "node_modules/pngjs": { @@ -3756,7 +4360,7 @@ "node_modules/pngjs-nozlib": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/pngjs-nozlib/-/pngjs-nozlib-1.0.0.tgz", - "integrity": "sha1-nmTWAs/pzOTZ1Zl9BodCmnPwt9c=", + "integrity": "sha512-N1PggqLp9xDqwAoKvGohmZ3m4/N9xpY0nDZivFqQLcpLHmliHnCp9BuNCsOeqHWMuEEgFjpEaq9dZq6RZyy0fA==", "engines": { "iojs": ">= 1.0.0", "node": ">=0.10.0" @@ -3815,7 +4419,7 @@ "node_modules/pngquant-bin/node_modules/get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "integrity": "sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==", "engines": { "node": ">=4" } @@ -3823,15 +4427,61 @@ "node_modules/pngquant-bin/node_modules/is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", "engines": { "node": ">=0.10.0" } }, + "node_modules/pngquant-bin/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/pngquant-bin/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/pngquant-bin/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pngquant-bin/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pngquant-bin/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/prepend-http": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "integrity": "sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg==", "engines": { "node": ">=0.10.0" } @@ -3841,20 +4491,37 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, + "node_modules/promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==" + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=" + "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==" }, "node_modules/pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==" }, "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" }, "node_modules/pump": { "version": "3.0.0", @@ -3866,17 +4533,17 @@ } }, "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "engines": { "node": ">=6" } }, "node_modules/qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "engines": { "node": ">=0.6" } @@ -3922,34 +4589,79 @@ } }, "node_modules/read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", "dependencies": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", "dependencies": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" + }, + "node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/read-pkg/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "engines": { + "node": ">=8" } }, "node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -3961,21 +4673,21 @@ } }, "node_modules/redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", "dependencies": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/repeating": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "integrity": "sha512-ZqtSMuVybkISo2OWvqvm7iHSWngvdaW3IpsT9/uP8v4gMi591LY6h35wdOfvQdWCKFWZWm2Y1Opp4kV7vQKT6A==", "dependencies": { "is-finite": "^1.0.0" }, @@ -4025,23 +4737,22 @@ "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "engines": { "node": ">=0.10.0" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" - }, "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.6", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.6.tgz", + "integrity": "sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==", "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4050,11 +4761,19 @@ "node_modules/responselike": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "integrity": "sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==", "dependencies": { "lowercase-keys": "^1.0.0" } }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "engines": { + "node": ">= 4" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -4111,17 +4830,20 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sass-graph": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz", - "integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-4.0.1.tgz", + "integrity": "sha512-5YCfmGBmxoIRYHnKK2AKzrAkCoQ8ozO+iumT8K4tXJXRVCPf+7s1/9KxTSW3Rbvf+7Y7b4FR3mWyLnQr3PHocA==", "dependencies": { "glob": "^7.0.0", - "lodash": "^4.0.0", - "scss-tokenizer": "^0.2.3", - "yargs": "^13.3.2" + "lodash": "^4.17.11", + "scss-tokenizer": "^0.4.3", + "yargs": "^17.2.1" }, "bin": { "sassgraph": "bin/sassgraph" + }, + "engines": { + "node": ">=12" } }, "node_modules/save-pixels": { @@ -4139,12 +4861,12 @@ } }, "node_modules/scss-tokenizer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.4.3.tgz", + "integrity": "sha512-raKLgf1LI5QMQnG+RxHz6oK0sL3x3I4FN2UDLqgLOGO8hodECNnNh5BXn7fAyBxrA8zVzdQizQ6XjNJQ+uBwMw==", "dependencies": { - "js-base64": "^2.1.8", - "source-map": "^0.4.2" + "js-base64": "^2.4.9", + "source-map": "^0.7.3" } }, "node_modules/seek-bzip": { @@ -4160,11 +4882,17 @@ } }, "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { - "semver": "bin/semver" + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/semver-regex": { @@ -4178,7 +4906,7 @@ "node_modules/semver-truncate": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/semver-truncate/-/semver-truncate-1.1.2.tgz", - "integrity": "sha1-V/Qd5pcHpicJp+AQS6IRcQnqR+g=", + "integrity": "sha512-V1fGg9i4CL3qesB6U0L6XAm4xOJiHmt4QAacazumuasc03BvtFGIMCduv01JWQ69Nv+JST9TqhSCiJoxoY031w==", "dependencies": { "semver": "^5.3.0" }, @@ -4186,34 +4914,42 @@ "node": ">=0.10.0" } }, + "node_modules/semver-truncate/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" }, "node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dependencies": { - "shebang-regex": "^1.0.0" + "shebang-regex": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, "node_modules/slash": { "version": "3.0.0", @@ -4223,10 +4959,45 @@ "node": ">=8" } }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "dependencies": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/sort-keys": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", - "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "integrity": "sha512-vzn8aSqKgytVik0iwdBEi+zevbTYZogewTUM6dtpmGwEcdzbub/TX4bCzRhebDCRC3QzXgJsLRKB2V/Oof7HXg==", "dependencies": { "is-plain-obj": "^1.0.0" }, @@ -4237,7 +5008,7 @@ "node_modules/sort-keys-length": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", - "integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=", + "integrity": "sha512-GRbEOUqCxemTAk/b32F2xa8wDTs+Z1QHOkbhJDQTvv/6G3ZkbJ+frYWsTcc7cBB3Fu4wy4XlLCuNtJuMn7Gsvw==", "dependencies": { "sort-keys": "^1.0.0" }, @@ -4246,20 +5017,17 @@ } }, "node_modules/source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dependencies": { - "amdefine": ">=0.0.4" - }, + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", "engines": { - "node": ">=0.8.0" + "node": ">= 8" } }, "node_modules/spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -4280,9 +5048,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", - "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==" + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.15.tgz", + "integrity": "sha512-lpT8hSQp9jAKp9mhtBU4Xjon8LPGBvLIuBiSVhMEtmLecTh2mO0tlqrAMp47tBXzMr13NJMQ2lf7RpQGLJ3HsQ==" }, "node_modules/sprite-magic-importer": { "version": "1.6.2", @@ -4298,9 +5066,9 @@ } }, "node_modules/spritesmith": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/spritesmith/-/spritesmith-3.4.0.tgz", - "integrity": "sha512-epa/Ib2GzkrzOA6ZMKH+YOX4ooBlRz8JwIV5NQDt9FvqXVHTh4dVn/0oA+n5eeu6wem1CCrtZWODlOqvwXXpyA==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/spritesmith/-/spritesmith-3.4.1.tgz", + "integrity": "sha512-NQZ8c7bZKbtqc0n0V+vVpurV72BwziOXw8AAU/nOdrjcjgCVoy+XUoopbrAYaNfJJgK730U98SB579+YtzfUJw==", "dependencies": { "concat-stream": "~1.5.1", "layout": "~2.2.0", @@ -4315,7 +5083,7 @@ "node_modules/spritesmith/node_modules/semver": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", - "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=", + "integrity": "sha512-5OkOBiw69xqmxOFIXwXsiY1HlE+om8nNptg1ZIf95fzcnfgOv2fLm7pmmGbRJsjJIqPpW5Kwy4wpDBTz5wQlUw==", "bin": { "semver": "bin/semver" } @@ -4323,7 +5091,7 @@ "node_modules/squeak": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/squeak/-/squeak-1.3.0.tgz", - "integrity": "sha1-MwRQN7ZDiLVnZ0uEMiplIQc5FsM=", + "integrity": "sha512-YQL1ulInM+ev8nXX7vfXsCsDh6IqXlrremc1hzi77776BtpWgYJUMto3UM05GSAaGzJgWekszjoKDrVNB5XG+A==", "dependencies": { "chalk": "^1.0.0", "console-stream": "^0.1.1", @@ -4336,7 +5104,7 @@ "node_modules/squeak/node_modules/ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", "engines": { "node": ">=0.10.0" } @@ -4344,7 +5112,7 @@ "node_modules/squeak/node_modules/chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", "dependencies": { "ansi-styles": "^2.2.1", "escape-string-regexp": "^1.0.2", @@ -4359,15 +5127,15 @@ "node_modules/squeak/node_modules/supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", "engines": { "node": ">=0.8.0" } }, "node_modules/sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -4388,6 +5156,17 @@ "node": ">=0.10.0" } }, + "node_modules/ssri": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", + "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", + "dependencies": { + "minipass": "^3.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/stdout-stream": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz", @@ -4399,7 +5178,7 @@ "node_modules/strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "integrity": "sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==", "engines": { "node": ">=0.10.0" } @@ -4413,22 +5192,41 @@ } }, "node_modules/string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, "node_modules/strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", "dependencies": { "ansi-regex": "^2.0.0" }, @@ -4439,7 +5237,7 @@ "node_modules/strip-bom": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", "dependencies": { "is-utf8": "^0.2.0" }, @@ -4450,7 +5248,7 @@ "node_modules/strip-bom-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz", - "integrity": "sha1-5xRDmFd9Uaa+0PoZlPoF9D/ZiO4=", + "integrity": "sha512-7jfJB9YpI2Z0aH3wu10ZqitvYJaE0s5IzFuWE+0pbb4Q/armTloEUShymkDO47YSLnjAW52mlXT//hs9wXNNJQ==", "dependencies": { "first-chunk-stream": "^1.0.0", "strip-bom": "^2.0.0" @@ -4470,23 +5268,20 @@ "node_modules/strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==", "engines": { "node": ">=0.10.0" } }, "node_modules/strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", "dependencies": { - "get-stdin": "^4.0.1" - }, - "bin": { - "strip-indent": "cli.js" + "min-indent": "^1.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/strip-outer": { @@ -4511,20 +5306,31 @@ "node": ">=8" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/tar": { - "version": "6.1.8", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.8.tgz", - "integrity": "sha512-sb9b0cp855NbkMJcskdSYA7b11Q8JsX4qe4pyUAfHp+Y6jBjJeek2ZVlwEfWayshEIwlIzXx0Fain3QG9JPm2A==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", + "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", + "minipass": "^5.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" }, "engines": { - "node": ">= 10" + "node": ">=10" } }, "node_modules/tar-stream": { @@ -4544,15 +5350,18 @@ "node": ">= 0.8.0" } }, - "node_modules/tar/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" + } }, "node_modules/temp-dir": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz", - "integrity": "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=", + "integrity": "sha512-xZFXEGbG7SNC3itwBzI3RYjq/cEhBkx2hJuKGIUOcEULmkQExXiHat2z/qkISYsuR+IKumhEfKKbV5qXmhICFQ==", "engines": { "node": ">=4" } @@ -4560,7 +5369,7 @@ "node_modules/tempfile": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-2.0.0.tgz", - "integrity": "sha1-awRGhWqbERTRhW/8vlCczLCXcmU=", + "integrity": "sha512-ZOn6nJUgvgC09+doCEF3oB+r3ag7kUvlsXEGX069QRD60p+P3uP7XG9N2/at+EyIRGSN//ZY3LyEotA1YpmjuA==", "dependencies": { "temp-dir": "^1.0.0", "uuid": "^3.0.1" @@ -4572,7 +5381,7 @@ "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" }, "node_modules/through2": { "version": "2.0.5", @@ -4586,7 +5395,7 @@ "node_modules/timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "integrity": "sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==", "engines": { "node": ">=0.10.0" } @@ -4620,17 +5429,17 @@ } }, "node_modules/trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/trim-repeated": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", - "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "integrity": "sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==", "dependencies": { "escape-string-regexp": "^1.0.2" }, @@ -4639,17 +5448,14 @@ } }, "node_modules/true-case-path": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", - "integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==", - "dependencies": { - "glob": "^7.1.2" - } + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-2.2.1.tgz", + "integrity": "sha512-0z3j8R7MCjy10kc/g+qg7Ln3alJTodw9aDuVWZa3uiWqfuBMKeAeP2ocWcxoyM3D73yz3Jt/Pu4qPr4wHSdB/Q==" }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dependencies": { "safe-buffer": "^5.0.1" }, @@ -4660,25 +5466,31 @@ "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" }, "node_modules/type-fest": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.5.2.tgz", - "integrity": "sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==", + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.7.tgz", + "integrity": "sha512-ueeb9YybpjhivjbHP2LdFDAjbS948fGEPj+ACAMs4xCMmh72OCOMQWBQKlaN4ZNQ04yfLSDLSx1tGRIoWimObQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/uglify-js": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.1.tgz", - "integrity": "sha512-JhS3hmcVaXlp/xSo3PKY5R0JqKs5M3IV+exdLHW99qKvKivPO4Z8qbej6mte17SOPqAOVMjt/XGgWacnFSzM3g==", + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", "bin": { "uglifyjs": "bin/uglifyjs" }, @@ -4698,7 +5510,29 @@ "node_modules/uniq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" + "integrity": "sha512-Gw+zz50YNKPDKXs+9d+aKAjVwpjNwqzvNpLigIruT4HA9lMZNdMqs9x07kKHB/L9WRzqp4+DlTU5s4wG2esdoA==" + }, + "node_modules/unique-filename": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", + "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "dependencies": { + "unique-slug": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/unique-slug": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", + "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } }, "node_modules/universalify": { "version": "0.1.2", @@ -4719,7 +5553,7 @@ "node_modules/url-parse-lax": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "integrity": "sha512-BVA4lR5PIviy2PMseNd2jbFQ+jwSwQGdJejf5ctd1rEXt0Ypd7yanUK9+lYechVlN5VaTJGsu2U/3MDDu6KgBA==", "dependencies": { "prepend-http": "^1.0.1" }, @@ -4730,7 +5564,7 @@ "node_modules/url-to-options": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", - "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", + "integrity": "sha512-0kQLIzG4fdk/G5NONku64rSH/x32NOA39LVQqlK8Le6lvTF6GGRJpqaQFGgU+CLwySIqBSMdwYM0sYcW9f6P4A==", "engines": { "node": ">= 4" } @@ -4738,7 +5572,7 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/uuid": { "version": "3.4.0", @@ -4761,7 +5595,7 @@ "node_modules/verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "engines": [ "node >=0.6.0" ], @@ -4771,10 +5605,15 @@ "extsprintf": "^1.2.0" } }, + "node_modules/verror/node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" + }, "node_modules/vinyl": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", - "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "integrity": "sha512-Ci3wnR2uuSAWFMSglZuB8Z2apBdtOyz8CV7dC6/U1XbltXBC+IuutUkXQISz01P+US2ouBuesSbV6zILZ6BuzQ==", "dependencies": { "clone": "^1.0.0", "clone-stats": "^0.0.1", @@ -4787,7 +5626,7 @@ "node_modules/vinyl-file": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/vinyl-file/-/vinyl-file-1.3.0.tgz", - "integrity": "sha1-qgVjTTqGe6kUR77bs0r8sm9E9uc=", + "integrity": "sha512-i1CGRaiDs3qJ+Yc8cgtOnrZOwlhY02oDBrWSBKD9uYSsxqQG1RhNXLmR/orke0ye0sbKpVtAUHwhF2rs9A46cQ==", "dependencies": { "graceful-fs": "^4.1.2", "strip-bom": "^2.0.0", @@ -4801,116 +5640,72 @@ "node_modules/vinyl/node_modules/replace-ext": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "integrity": "sha512-AFBWBy9EVRTa/LhEcG8QDP3FvpwZqmvN2QFDuJswFeaVhWnZMp8q3E6Zd90SR04PlIwfGdyVjNyLPyen/ek5CQ==", "engines": { "node": ">= 0.4" } }, "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dependencies": { "isexe": "^2.0.0" }, "bin": { - "which": "bin/which" + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, - "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", "dependencies": { - "string-width": "^1.0.2 || 2" + "string-width": "^1.0.2 || 2 || 3 || 4" } }, "node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "engines": { - "node": ">=6" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/wrap-ansi/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "engines": { - "node": ">=4" - } - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dependencies": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/xtend": { "version": "4.0.2", @@ -4921,3974 +5716,59 @@ } }, "node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } }, "node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" } }, "node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "engines": { + "node": ">=10" } }, - "node_modules/yargs-parser/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "node_modules/yargs/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "engines": { - "node": ">=4" - } - }, - "node_modules/yargs/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" + "node": ">=12" } }, "node_modules/yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" } } - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", - "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", - "requires": { - "@babel/highlight": "^7.14.5" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", - "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==" - }, - "@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", - "requires": { - "@babel/helper-validator-identifier": "^7.14.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@picocss/pico": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@picocss/pico/-/pico-1.5.0.tgz", - "integrity": "sha512-1sLeGqpIYHf2ZgVEVqpewWFkfYMCMt4eUU8uINRXI21cUKAPv7Jxft+4567SEWLOjzQKH5EhlbkQdC9tGi/c+A==" - }, - "@sindresorhus/is": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", - "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==" - }, - "@types/glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA==", - "requires": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "@types/minimatch": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", - "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==" - }, - "@types/minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==" - }, - "@types/node": { - "version": "16.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz", - "integrity": "sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw==" - }, - "@types/normalize-package-data": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", - "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==" - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "dependencies": { - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" - } - } - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" - }, - "arch": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", - "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==" - }, - "archive-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/archive-type/-/archive-type-4.0.0.tgz", - "integrity": "sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA=", - "requires": { - "file-type": "^4.2.0" - }, - "dependencies": { - "file-type": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz", - "integrity": "sha1-G2AOX8ofvcboDApwxxyNul95BsU=" - } - } - }, - "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "async": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", - "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=" - }, - "async-foreach": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", - "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "bin-build": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bin-build/-/bin-build-3.0.0.tgz", - "integrity": "sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA==", - "requires": { - "decompress": "^4.0.0", - "download": "^6.2.2", - "execa": "^0.7.0", - "p-map-series": "^1.0.0", - "tempfile": "^2.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - } - } - }, - "bin-check": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bin-check/-/bin-check-4.1.0.tgz", - "integrity": "sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA==", - "requires": { - "execa": "^0.7.0", - "executable": "^4.1.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - } - } - }, - "bin-pack": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bin-pack/-/bin-pack-1.0.2.tgz", - "integrity": "sha1-wqAU7b8L7XCjKSBi7UZXe5YSBnk=" - }, - "bin-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bin-version/-/bin-version-3.1.0.tgz", - "integrity": "sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ==", - "requires": { - "execa": "^1.0.0", - "find-versions": "^3.0.0" - } - }, - "bin-version-check": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-4.0.0.tgz", - "integrity": "sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ==", - "requires": { - "bin-version": "^3.0.0", - "semver": "^5.6.0", - "semver-truncate": "^1.1.2" - } - }, - "bin-wrapper": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-4.1.0.tgz", - "integrity": "sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q==", - "requires": { - "bin-check": "^4.1.0", - "bin-version-check": "^4.0.0", - "download": "^7.1.0", - "import-lazy": "^3.1.0", - "os-filter-obj": "^2.0.0", - "pify": "^4.0.1" - }, - "dependencies": { - "download": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/download/-/download-7.1.0.tgz", - "integrity": "sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ==", - "requires": { - "archive-type": "^4.0.0", - "caw": "^2.0.1", - "content-disposition": "^0.5.2", - "decompress": "^4.2.0", - "ext-name": "^5.0.0", - "file-type": "^8.1.0", - "filenamify": "^2.0.0", - "get-stream": "^3.0.0", - "got": "^8.3.1", - "make-dir": "^1.2.0", - "p-event": "^2.1.0", - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } - } - }, - "file-type": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-8.1.0.tgz", - "integrity": "sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ==" - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "got": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz", - "integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==", - "requires": { - "@sindresorhus/is": "^0.7.0", - "cacheable-request": "^2.1.1", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "into-stream": "^3.1.0", - "is-retry-allowed": "^1.1.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "mimic-response": "^1.0.0", - "p-cancelable": "^0.4.0", - "p-timeout": "^2.0.1", - "pify": "^3.0.0", - "safe-buffer": "^5.1.1", - "timed-out": "^4.0.1", - "url-parse-lax": "^3.0.0", - "url-to-options": "^1.0.1" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } - } - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } - } - }, - "p-cancelable": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", - "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==" - }, - "p-event": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-2.3.1.tgz", - "integrity": "sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==", - "requires": { - "p-timeout": "^2.0.1" - } - }, - "p-timeout": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", - "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", - "requires": { - "p-finally": "^1.0.0" - } - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" - }, - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" - }, - "url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "requires": { - "prepend-http": "^2.0.0" - } - } - } - }, - "bl": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", - "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "requires": { - "fill-range": "^7.0.1" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" - }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" - }, - "cacheable-request": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", - "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", - "requires": { - "clone-response": "1.0.2", - "get-stream": "3.0.0", - "http-cache-semantics": "3.8.1", - "keyv": "3.0.0", - "lowercase-keys": "1.0.0", - "normalize-url": "2.0.1", - "responselike": "1.0.2" - }, - "dependencies": { - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "lowercase-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", - "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=" - } - } - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - } - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "caw": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/caw/-/caw-2.0.1.tgz", - "integrity": "sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==", - "requires": { - "get-proxy": "^2.0.0", - "isurl": "^1.0.0-alpha5", - "tunnel-agent": "^0.6.0", - "url-to-options": "^1.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" - }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" - }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "requires": { - "mimic-response": "^1.0.0" - } - }, - "clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", - "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", - "requires": { - "inherits": "~2.0.1", - "readable-stream": "~2.0.0", - "typedarray": "~0.0.5" - }, - "dependencies": { - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - }, - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } - }, - "config-chain": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", - "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", - "requires": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - } - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" - }, - "console-stream": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/console-stream/-/console-stream-0.1.1.tgz", - "integrity": "sha1-oJX+B7IEZZVfL6/Si11yvM2UnUQ=" - }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", - "requires": { - "safe-buffer": "5.1.2" - } - }, - "contentstream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/contentstream/-/contentstream-1.0.0.tgz", - "integrity": "sha1-C9z6RtowRkqGzo+n7OVlQQ3G+aU=", - "requires": { - "readable-stream": "~1.0.33-1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "dependencies": { - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "requires": { - "array-find-index": "^1.0.1" - } - }, - "cwise-compiler": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/cwise-compiler/-/cwise-compiler-1.1.3.tgz", - "integrity": "sha1-9NZnQQ6FDToxOn0tt7HlBbsDTMU=", - "requires": { - "uniq": "^1.0.0" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "data-uri-to-buffer": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-0.0.3.tgz", - "integrity": "sha1-GK6XmmoMqZSwYlhTkW0mYruuCxo=" - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", - "requires": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - } - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" - }, - "decompress": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", - "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", - "requires": { - "decompress-tar": "^4.0.0", - "decompress-tarbz2": "^4.0.0", - "decompress-targz": "^4.0.0", - "decompress-unzip": "^4.0.1", - "graceful-fs": "^4.1.10", - "make-dir": "^1.0.0", - "pify": "^2.3.0", - "strip-dirs": "^2.0.0" - }, - "dependencies": { - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } - } - } - } - }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "requires": { - "mimic-response": "^1.0.0" - } - }, - "decompress-tar": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", - "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", - "requires": { - "file-type": "^5.2.0", - "is-stream": "^1.1.0", - "tar-stream": "^1.5.2" - }, - "dependencies": { - "file-type": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - } - } - }, - "decompress-tarbz2": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", - "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", - "requires": { - "decompress-tar": "^4.1.0", - "file-type": "^6.1.0", - "is-stream": "^1.1.0", - "seek-bzip": "^1.0.5", - "unbzip2-stream": "^1.0.9" - }, - "dependencies": { - "file-type": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", - "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - } - } - }, - "decompress-targz": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", - "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", - "requires": { - "decompress-tar": "^4.1.1", - "file-type": "^5.2.0", - "is-stream": "^1.1.0" - }, - "dependencies": { - "file-type": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - } - } - }, - "decompress-unzip": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", - "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", - "requires": { - "file-type": "^3.8.0", - "get-stream": "^2.2.0", - "pify": "^2.3.0", - "yauzl": "^2.4.2" - }, - "dependencies": { - "file-type": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", - "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" - }, - "get-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", - "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", - "requires": { - "object-assign": "^4.0.1", - "pinkie-promise": "^2.0.0" - } - } - } - }, - "del": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/del/-/del-5.1.0.tgz", - "integrity": "sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==", - "requires": { - "globby": "^10.0.1", - "graceful-fs": "^4.2.2", - "is-glob": "^4.0.1", - "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.1", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "slash": "^3.0.0" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "requires": { - "path-type": "^4.0.0" - }, - "dependencies": { - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" - } - } - }, - "download": { - "version": "6.2.5", - "resolved": "https://registry.npmjs.org/download/-/download-6.2.5.tgz", - "integrity": "sha512-DpO9K1sXAST8Cpzb7kmEhogJxymyVUd5qz/vCOSyvwtp2Klj2XcDt5YUuasgxka44SxF0q5RriKIwJmQHG2AuA==", - "requires": { - "caw": "^2.0.0", - "content-disposition": "^0.5.2", - "decompress": "^4.0.0", - "ext-name": "^5.0.0", - "file-type": "5.2.0", - "filenamify": "^2.0.0", - "get-stream": "^3.0.0", - "got": "^7.0.0", - "make-dir": "^1.0.0", - "p-event": "^1.0.0", - "pify": "^3.0.0" - }, - "dependencies": { - "file-type": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=" - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } - } - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } - }, - "env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==" - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - } - } - }, - "executable": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", - "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", - "requires": { - "pify": "^2.2.0" - } - }, - "ext-list": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", - "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", - "requires": { - "mime-db": "^1.28.0" - } - }, - "ext-name": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz", - "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", - "requires": { - "ext-list": "^2.0.0", - "sort-keys-length": "^1.0.0" - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "fastq": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.1.tgz", - "integrity": "sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw==", - "requires": { - "reusify": "^1.0.4" - } - }, - "fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", - "requires": { - "pend": "~1.2.0" - } - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - }, - "file-type": { - "version": "12.4.2", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-12.4.2.tgz", - "integrity": "sha512-UssQP5ZgIOKelfsaB5CuGAL+Y+q7EmONuiwF3N5HAH0t27rvrttgi6Ra9k/+DVaY9UF6+ybxu5pOXLUdA8N7Vg==" - }, - "filename-reserved-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", - "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=" - }, - "filenamify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-2.1.0.tgz", - "integrity": "sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA==", - "requires": { - "filename-reserved-regex": "^2.0.0", - "strip-outer": "^1.0.0", - "trim-repeated": "^1.0.0" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "find-versions": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", - "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", - "requires": { - "semver-regex": "^2.0.0" - } - }, - "first-chunk-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", - "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=" - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" - }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "requires": { - "minipass": "^3.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "gaze": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", - "requires": { - "globule": "^1.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - }, - "get-pixels": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/get-pixels/-/get-pixels-3.3.3.tgz", - "integrity": "sha512-5kyGBn90i9tSMUVHTqkgCHsoWoR+/lGbl4yC83Gefyr0HLIhgSWEx/2F/3YgsZ7UpYNuM6pDhDK7zebrUJ5nXg==", - "requires": { - "data-uri-to-buffer": "0.0.3", - "jpeg-js": "^0.4.1", - "mime-types": "^2.0.1", - "ndarray": "^1.0.13", - "ndarray-pack": "^1.1.1", - "node-bitmap": "0.0.1", - "omggif": "^1.0.5", - "parse-data-uri": "^0.2.0", - "pngjs": "^3.3.3", - "request": "^2.44.0", - "through": "^2.3.4" - } - }, - "get-proxy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz", - "integrity": "sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==", - "requires": { - "npm-conf": "^1.1.0" - } - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "requires": { - "pump": "^3.0.0" - } - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "gif-encoder": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/gif-encoder/-/gif-encoder-0.4.3.tgz", - "integrity": "sha1-iitP6MqJWkjjoLbLs0CgpqNXGJk=", - "requires": { - "readable-stream": "~1.1.9" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } - }, - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "requires": { - "is-glob": "^4.0.1" - } - }, - "globby": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", - "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", - "requires": { - "@types/glob": "^7.1.1", - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.0.3", - "glob": "^7.1.3", - "ignore": "^5.1.1", - "merge2": "^1.2.3", - "slash": "^3.0.0" - } - }, - "globule": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz", - "integrity": "sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA==", - "requires": { - "glob": "~7.1.1", - "lodash": "~4.17.10", - "minimatch": "~3.0.2" - } - }, - "got": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", - "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", - "requires": { - "decompress-response": "^3.2.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-plain-obj": "^1.1.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^1.1.1", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "url-parse-lax": "^1.0.0", - "url-to-options": "^1.0.1" - }, - "dependencies": { - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - } - } - }, - "graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, - "hard-rejection": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", - "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==" - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "has-symbol-support-x": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" - }, - "has-to-string-tag-x": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", - "requires": { - "has-symbol-support-x": "^1.4.1" - } - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" - }, - "http-cache-semantics": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", - "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==" - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==" - }, - "imagemin": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/imagemin/-/imagemin-7.0.1.tgz", - "integrity": "sha512-33AmZ+xjZhg2JMCe+vDf6a9mzWukE7l+wAtesjE7KyteqqKjzxv7aVQeWnul1Ve26mWvEQqyPwl0OctNBfSR9w==", - "requires": { - "file-type": "^12.0.0", - "globby": "^10.0.0", - "graceful-fs": "^4.2.2", - "junk": "^3.1.0", - "make-dir": "^3.0.0", - "p-pipe": "^3.0.0", - "replace-ext": "^1.0.0" - } - }, - "imagemin-pngquant": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/imagemin-pngquant/-/imagemin-pngquant-8.0.0.tgz", - "integrity": "sha512-PVq0diOxO+Zyq/zlMCz2Pfu6mVLHgiT1GpW702OwVlnej+NhS6ZQegYi3OFEDW8d7GxouyR5e8R+t53SMciOeg==", - "requires": { - "execa": "^1.0.0", - "is-png": "^2.0.0", - "is-stream": "^2.0.0", - "ow": "^0.13.2", - "pngquant-bin": "^5.0.0" - } - }, - "import-lazy": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz", - "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==" - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "requires": { - "repeating": "^2.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, - "into-stream": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", - "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", - "requires": { - "from2": "^2.1.1", - "p-is-promise": "^1.1.0" - } - }, - "iota-array": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/iota-array/-/iota-array-1.0.0.tgz", - "integrity": "sha1-ge9X/l0FgUzVjCSDYyqZwwoOgIc=" - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "is-core-module": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", - "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", - "requires": { - "has": "^1.0.3" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==" - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-natural-number": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", - "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=" - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - }, - "is-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", - "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==" - }, - "is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==" - }, - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==" - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" - }, - "is-png": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-png/-/is-png-2.0.0.tgz", - "integrity": "sha512-4KPGizaVGj2LK7xwJIz8o5B2ubu1D/vcQsgOGFEDlpcvgZHto4gBnyd0ig7Ws+67ixmwKoNmu0hYnpo6AaKb5g==" - }, - "is-retry-allowed": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "isurl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", - "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", - "requires": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" - } - }, - "jpeg-js": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.3.tgz", - "integrity": "sha512-ru1HWKek8octvUHFHvE5ZzQ1yAsJmIvRdGWvSoKV52XKyuyYA437QWDttXT8eZXDSbuMpHlLzPDZUPd6idIz+Q==" - }, - "js-base64": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", - "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==" - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" - }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "junk": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/junk/-/junk-3.1.0.tgz", - "integrity": "sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==" - }, - "keyv": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", - "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", - "requires": { - "json-buffer": "3.0.0" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" - }, - "layout": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/layout/-/layout-2.2.0.tgz", - "integrity": "sha1-MeRL/BjdEBmz/7II5AKku/4uavQ=", - "requires": { - "bin-pack": "~1.0.1" - } - }, - "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - } - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "logalot": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/logalot/-/logalot-2.1.0.tgz", - "integrity": "sha1-X46MkNME7fElMJUaVVSruMXj9VI=", - "requires": { - "figures": "^1.3.5", - "squeak": "^1.0.0" - } - }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" - }, - "lpad-align": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/lpad-align/-/lpad-align-1.1.2.tgz", - "integrity": "sha1-IfYArBwwlcPG5JfuZyce4ISB/p4=", - "requires": { - "get-stdin": "^4.0.1", - "indent-string": "^2.1.0", - "longest": "^1.0.0", - "meow": "^3.3.0" - } - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - } - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" - }, - "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - } - }, - "mime-db": { - "version": "1.49.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", - "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==" - }, - "mime-types": { - "version": "2.1.32", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", - "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", - "requires": { - "mime-db": "1.49.0" - } - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" - }, - "min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "minimist-options": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", - "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", - "requires": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0", - "kind-of": "^6.0.3" - } - }, - "minipass": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", - "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", - "requires": { - "yallist": "^4.0.0" - }, - "dependencies": { - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } - } - }, - "minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "requires": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "dependencies": { - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" - }, - "nan": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", - "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==" - }, - "ndarray": { - "version": "1.0.19", - "resolved": "https://registry.npmjs.org/ndarray/-/ndarray-1.0.19.tgz", - "integrity": "sha512-B4JHA4vdyZU30ELBw3g7/p9bZupyew5a7tX1Y/gGeF2hafrPaQZhgrGQfsvgfYbgdFZjYwuEcnaobeM/WMW+HQ==", - "requires": { - "iota-array": "^1.0.0", - "is-buffer": "^1.0.2" - } - }, - "ndarray-ops": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/ndarray-ops/-/ndarray-ops-1.2.2.tgz", - "integrity": "sha1-WeiNLDKn7ryxvGkPrhQVeVV6YU4=", - "requires": { - "cwise-compiler": "^1.0.0" - } - }, - "ndarray-pack": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ndarray-pack/-/ndarray-pack-1.2.1.tgz", - "integrity": "sha1-jK6+qqJNXs9w/4YCBjeXfajuWFo=", - "requires": { - "cwise-compiler": "^1.1.2", - "ndarray": "^1.0.13" - } - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" - }, - "node-bitmap": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/node-bitmap/-/node-bitmap-0.0.1.tgz", - "integrity": "sha1-GA6scAPgxwdhjvMTaPYvhLKmkJE=" - }, - "node-gyp": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-7.1.2.tgz", - "integrity": "sha512-CbpcIo7C3eMu3dL1c3d0xw449fHIGALIJsRP4DDPHpyiW8vcriNY7ubh9TE4zEKfSxscY7PjeFnshE7h75ynjQ==", - "requires": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.3", - "nopt": "^5.0.0", - "npmlog": "^4.1.2", - "request": "^2.88.2", - "rimraf": "^3.0.2", - "semver": "^7.3.2", - "tar": "^6.0.2", - "which": "^2.0.2" - }, - "dependencies": { - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "requires": { - "isexe": "^2.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } - } - }, - "node-sass": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-6.0.1.tgz", - "integrity": "sha512-f+Rbqt92Ful9gX0cGtdYwjTrWAaGURgaK5rZCWOgCNyGWusFYHhbqCCBoFBeat+HKETOU02AyTxNhJV0YZf2jQ==", - "requires": { - "async-foreach": "^0.1.3", - "chalk": "^1.1.1", - "cross-spawn": "^7.0.3", - "gaze": "^1.0.0", - "get-stdin": "^4.0.1", - "glob": "^7.0.3", - "lodash": "^4.17.15", - "meow": "^9.0.0", - "nan": "^2.13.2", - "node-gyp": "^7.1.0", - "npmlog": "^4.0.0", - "request": "^2.88.0", - "sass-graph": "2.2.5", - "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - }, - "camelcase-keys": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "requires": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - } - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "hosted-git-info": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", - "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - }, - "map-obj": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", - "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==" - }, - "meow": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", - "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", - "requires": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize": "^1.2.0", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.18.0", - "yargs-parser": "^20.2.3" - } - }, - "normalize-package-data": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.2.tgz", - "integrity": "sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg==", - "requires": { - "hosted-git-info": "^4.0.1", - "resolve": "^1.20.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==" - } - } - }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "dependencies": { - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" - } - } - }, - "redent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", - "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", - "requires": { - "indent-string": "^4.0.0", - "strip-indent": "^3.0.0" - } - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", - "requires": { - "min-indent": "^1.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - }, - "trim-newlines": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", - "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==" - }, - "type-fest": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", - "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==" - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==" - } - } - }, - "nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-url": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", - "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", - "requires": { - "prepend-http": "^2.0.0", - "query-string": "^5.0.1", - "sort-keys": "^2.0.0" - }, - "dependencies": { - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" - }, - "sort-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", - "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", - "requires": { - "is-plain-obj": "^1.0.0" - } - } - } - }, - "npm-conf": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", - "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", - "requires": { - "config-chain": "^1.1.11", - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - } - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "requires": { - "path-key": "^2.0.0" - } - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, - "obj-extend": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/obj-extend/-/obj-extend-0.1.0.tgz", - "integrity": "sha1-u0SKR3X7les0p4H5CLusLfI9u1s=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "omggif": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.10.tgz", - "integrity": "sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw==" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "os-filter-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/os-filter-obj/-/os-filter-obj-2.0.0.tgz", - "integrity": "sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg==", - "requires": { - "arch": "^2.1.0" - } - }, - "ow": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/ow/-/ow-0.13.2.tgz", - "integrity": "sha512-9wvr+q+ZTDRvXDjL6eDOdFe5WUl/wa5sntf9kAolxqSpkBqaIObwLgFCGXSJASFw+YciXnOVtDWpxXa9cqV94A==", - "requires": { - "type-fest": "^0.5.1" - } - }, - "p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" - }, - "p-event": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-1.3.0.tgz", - "integrity": "sha1-jmtPT2XHK8W2/ii3XtqHT5akoIU=", - "requires": { - "p-timeout": "^1.1.1" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" - }, - "p-is-promise": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", - "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=" - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "p-map-series": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-map-series/-/p-map-series-1.0.0.tgz", - "integrity": "sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco=", - "requires": { - "p-reduce": "^1.0.0" - } - }, - "p-pipe": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-pipe/-/p-pipe-3.1.0.tgz", - "integrity": "sha512-08pj8ATpzMR0Y80x50yJHn37NF6vjrqHutASaX5LiH5npS9XPvrUmscd9MF5R4fuYRHOxQR1FfMIlF7AzwoPqw==" - }, - "p-reduce": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", - "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=" - }, - "p-timeout": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", - "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", - "requires": { - "p-finally": "^1.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "parse-data-uri": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/parse-data-uri/-/parse-data-uri-0.2.0.tgz", - "integrity": "sha1-vwTYUd1ch7CrI45dAazklLYEtMk=", - "requires": { - "data-uri-to-buffer": "0.0.3" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "requires": { - "error-ex": "^1.2.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "^2.0.0" - } - }, - "pixelsmith": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/pixelsmith/-/pixelsmith-2.4.1.tgz", - "integrity": "sha512-6lVOPf9eBd9bWfxo5efmJcAiF6y65Ui9Ir8IR8jocrj/v/8QoLWZmgnhO7KGUfqkwPLNlCBfxVdjp4QihdPmPQ==", - "requires": { - "async": "~0.9.0", - "concat-stream": "~1.5.1", - "get-pixels": "~3.3.0", - "mime-types": "~2.1.7", - "ndarray": "~1.0.15", - "obj-extend": "~0.1.0", - "save-pixels": "~2.3.0", - "vinyl-file": "~1.3.0" - } - }, - "pngjs": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", - "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==" - }, - "pngjs-nozlib": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pngjs-nozlib/-/pngjs-nozlib-1.0.0.tgz", - "integrity": "sha1-nmTWAs/pzOTZ1Zl9BodCmnPwt9c=" - }, - "pngquant-bin": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/pngquant-bin/-/pngquant-bin-5.0.2.tgz", - "integrity": "sha512-OLdT+4JZx5BqE1CFJkrvomYV0aSsv6x2Bba+aWaVc0PMfWlE+ZByNKYAdKeIqsM4uvW1HOSEHnf8KcOnykPNxA==", - "requires": { - "bin-build": "^3.0.0", - "bin-wrapper": "^4.0.1", - "execa": "^0.10.0", - "logalot": "^2.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", - "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - } - } - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=" - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" - }, - "query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "requires": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" - }, - "quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==" - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "requires": { - "is-finite": "^1.0.0" - } - }, - "replace-ext": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", - "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==" - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" - }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "requires": { - "lowercase-keys": "^1.0.0" - } - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "requires": { - "glob": "^7.1.3" - } - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "sass-graph": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz", - "integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==", - "requires": { - "glob": "^7.0.0", - "lodash": "^4.0.0", - "scss-tokenizer": "^0.2.3", - "yargs": "^13.3.2" - } - }, - "save-pixels": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/save-pixels/-/save-pixels-2.3.6.tgz", - "integrity": "sha512-/ayfEWBxt0tFpf5lxSU1S0+/TBn7EiaTZD+6GL+mwizHm3BKCBysnzT6Js7BusDUVcNVLkeJJKLZcBgdpM2leQ==", - "requires": { - "contentstream": "^1.0.0", - "gif-encoder": "~0.4.1", - "jpeg-js": "^0.4.3", - "ndarray": "^1.0.18", - "ndarray-ops": "^1.2.2", - "pngjs-nozlib": "^1.0.0", - "through": "^2.3.4" - } - }, - "scss-tokenizer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", - "requires": { - "js-base64": "^2.1.8", - "source-map": "^0.4.2" - } - }, - "seek-bzip": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", - "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", - "requires": { - "commander": "^2.8.1" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, - "semver-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", - "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==" - }, - "semver-truncate": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/semver-truncate/-/semver-truncate-1.1.2.tgz", - "integrity": "sha1-V/Qd5pcHpicJp+AQS6IRcQnqR+g=", - "requires": { - "semver": "^5.3.0" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" - }, - "sort-keys": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", - "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", - "requires": { - "is-plain-obj": "^1.0.0" - } - }, - "sort-keys-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", - "integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=", - "requires": { - "sort-keys": "^1.0.0" - } - }, - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "requires": { - "amdefine": ">=0.0.4" - } - }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", - "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==" - }, - "sprite-magic-importer": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/sprite-magic-importer/-/sprite-magic-importer-1.6.2.tgz", - "integrity": "sha512-c9/1U6lDInUbkn7HrPJhUH7XtjQyrlxGGSnEOzkR3R1PsP5/EQISVM2ie57D0JAzBgpL1Fb9d1YqkS2aVhwJ6g==", - "requires": { - "del": "^5.1.0", - "fs-extra": "^8.1.0", - "glob": "^7.1.4", - "imagemin": "^7.0.0", - "imagemin-pngquant": "^8.0.0", - "spritesmith": "^3.4.0" - } - }, - "spritesmith": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/spritesmith/-/spritesmith-3.4.0.tgz", - "integrity": "sha512-epa/Ib2GzkrzOA6ZMKH+YOX4ooBlRz8JwIV5NQDt9FvqXVHTh4dVn/0oA+n5eeu6wem1CCrtZWODlOqvwXXpyA==", - "requires": { - "concat-stream": "~1.5.1", - "layout": "~2.2.0", - "pixelsmith": "^2.3.0", - "semver": "~5.0.3", - "through2": "~2.0.0" - }, - "dependencies": { - "semver": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", - "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=" - } - } - }, - "squeak": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/squeak/-/squeak-1.3.0.tgz", - "integrity": "sha1-MwRQN7ZDiLVnZ0uEMiplIQc5FsM=", - "requires": { - "chalk": "^1.0.0", - "console-stream": "^0.1.1", - "lpad-align": "^1.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "stdout-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz", - "integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==", - "requires": { - "readable-stream": "^2.0.1" - } - }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-bom-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz", - "integrity": "sha1-5xRDmFd9Uaa+0PoZlPoF9D/ZiO4=", - "requires": { - "first-chunk-stream": "^1.0.0", - "strip-bom": "^2.0.0" - } - }, - "strip-dirs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", - "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", - "requires": { - "is-natural-number": "^4.0.1" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "requires": { - "get-stdin": "^4.0.1" - } - }, - "strip-outer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", - "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", - "requires": { - "escape-string-regexp": "^1.0.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - }, - "tar": { - "version": "6.1.8", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.8.tgz", - "integrity": "sha512-sb9b0cp855NbkMJcskdSYA7b11Q8JsX4qe4pyUAfHp+Y6jBjJeek2ZVlwEfWayshEIwlIzXx0Fain3QG9JPm2A==", - "requires": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "dependencies": { - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } - } - }, - "tar-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", - "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", - "requires": { - "bl": "^1.0.0", - "buffer-alloc": "^1.2.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.1", - "xtend": "^4.0.0" - } - }, - "temp-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz", - "integrity": "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=" - }, - "tempfile": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-2.0.0.tgz", - "integrity": "sha1-awRGhWqbERTRhW/8vlCczLCXcmU=", - "requires": { - "temp-dir": "^1.0.0", - "uuid": "^3.0.1" - } - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" - }, - "to-buffer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", - "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "requires": { - "is-number": "^7.0.0" - } - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" - }, - "trim-repeated": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", - "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", - "requires": { - "escape-string-regexp": "^1.0.2" - } - }, - "true-case-path": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", - "integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==", - "requires": { - "glob": "^7.1.2" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - }, - "type-fest": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.5.2.tgz", - "integrity": "sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==" - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, - "uglify-js": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.1.tgz", - "integrity": "sha512-JhS3hmcVaXlp/xSo3PKY5R0JqKs5M3IV+exdLHW99qKvKivPO4Z8qbej6mte17SOPqAOVMjt/XGgWacnFSzM3g==" - }, - "unbzip2-stream": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", - "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", - "requires": { - "buffer": "^5.2.1", - "through": "^2.3.8" - } - }, - "uniq": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - } - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "requires": { - "prepend-http": "^1.0.1" - } - }, - "url-to-options": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", - "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "vinyl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", - "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", - "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - }, - "dependencies": { - "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=" - } - } - }, - "vinyl-file": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/vinyl-file/-/vinyl-file-1.3.0.tgz", - "integrity": "sha1-qgVjTTqGe6kUR77bs0r8sm9E9uc=", - "requires": { - "graceful-fs": "^4.1.2", - "strip-bom": "^2.0.0", - "strip-bom-stream": "^1.0.0", - "vinyl": "^1.1.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" - }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "requires": { - "locate-path": "^3.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - } - } - }, - "yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", - "requires": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - } } } diff --git a/tools/package.json b/tools/package.json index 6b220514..17d14a3e 100644 --- a/tools/package.json +++ b/tools/package.json @@ -19,7 +19,7 @@ "dependencies": { "@picocss/pico": "^1.5.0", "chalk": "^4.0.0", - "node-sass": "^6.0.1", + "node-sass": "^9.0.0", "sprite-magic-importer": "^1.6.2", "uglify-js": "^3.11.6" } diff --git a/var/Typecho/Request.php b/var/Typecho/Request.php index 31a1ef76..8c492073 100644 --- a/var/Typecho/Request.php +++ b/var/Typecho/Request.php @@ -183,7 +183,7 @@ class Request $exists = is_array($value) || (is_string($value) && strlen($value) > 0); return $value; } else { - $exists = false; + $exists = true; return $default; } } else { diff --git a/var/Typecho/Widget/Helper/EmptyClass.php b/var/Typecho/Widget/Helper/EmptyClass.php index 1981d96e..c74ffa61 100644 --- a/var/Typecho/Widget/Helper/EmptyClass.php +++ b/var/Typecho/Widget/Helper/EmptyClass.php @@ -41,9 +41,10 @@ class EmptyClass * @access public * @param string $name 方法名 * @param array $args 参数列表 - * @return void + * @return $this */ public function __call(string $name, array $args) { + return $this; } } diff --git a/var/Widget/Contents/Attachment/Edit.php b/var/Widget/Contents/Attachment/Edit.php index 197a7b68..e6297a53 100644 --- a/var/Widget/Contents/Attachment/Edit.php +++ b/var/Widget/Contents/Attachment/Edit.php @@ -7,7 +7,8 @@ use Typecho\Widget\Exception; use Typecho\Widget\Helper\Form; use Typecho\Widget\Helper\Layout; use Widget\ActionInterface; -use Widget\Contents\Post\Edit as PostEdit; +use Widget\Base\Contents; +use Widget\Contents\PrepareEditTrait; use Widget\Notice; use Widget\Upload; @@ -24,8 +25,10 @@ if (!defined('__TYPECHO_ROOT_DIR__')) { * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) * @license GNU General Public License 2.0 */ -class Edit extends PostEdit implements ActionInterface +class Edit extends Contents implements ActionInterface { + use PrepareEditTrait; + /** * 执行函数 * @@ -35,20 +38,6 @@ class Edit extends PostEdit implements ActionInterface { /** 必须为贡献者以上权限 */ $this->user->pass('contributor'); - - /** 获取文章内容 */ - if (!empty($this->request->cid)) { - $this->db->fetchRow($this->select() - ->where('table.contents.type = ?', 'attachment') - ->where('table.contents.cid = ?', $this->request->filter('int')->get('cid')) - ->limit(1), [$this, 'push']); - - if (!$this->have()) { - throw new Exception(_t('文件不存在'), 404); - } elseif (!$this->allow('edit')) { - throw new Exception(_t('没有编辑权限'), 403); - } - } } /** @@ -229,32 +218,7 @@ class Edit extends PostEdit implements ActionInterface $posts = $this->request->filter('int')->getArray('cid'); $deleteCount = 0; - foreach ($posts as $post) { - // 删除插件接口 - self::pluginHandle()->call('delete', $post, $this); - - $condition = $this->db->sql()->where('cid = ?', $post); - $row = $this->db->fetchRow($this->select() - ->where('table.contents.type = ?', 'attachment') - ->where('table.contents.cid = ?', $post) - ->limit(1), [$this, 'push']); - - if ($this->isWriteable(clone $condition) && $this->delete($condition)) { - /** 删除文件 */ - Upload::deleteHandle($row); - - /** 删除评论 */ - $this->db->query($this->db->delete('table.comments') - ->where('cid = ?', $post)); - - // 完成删除插件接口 - self::pluginHandle()->call('finishDelete', $post, $this); - - $deleteCount++; - } - - unset($condition); - } + $this->deleteByIds($posts, $deleteCount); if ($this->request->isAjax()) { $this->response->throwJson($deleteCount > 0 ? ['code' => 200, 'message' => _t('文件已经被删除')] @@ -291,32 +255,7 @@ class Edit extends PostEdit implements ActionInterface ->page($page, 100)), 'cid'); $page++; - foreach ($posts as $post) { - // 删除插件接口 - self::pluginHandle()->call('delete', $post, $this); - - $condition = $this->db->sql()->where('cid = ?', $post); - $row = $this->db->fetchRow($this->select() - ->where('table.contents.type = ?', 'attachment') - ->where('table.contents.cid = ?', $post) - ->limit(1), [$this, 'push']); - - if ($this->isWriteable(clone $condition) && $this->delete($condition)) { - /** 删除文件 */ - Upload::deleteHandle($row); - - /** 删除评论 */ - $this->db->query($this->db->delete('table.comments') - ->where('cid = ?', $post)); - - // 完成删除插件接口 - self::pluginHandle()->call('finishDelete', $post, $this); - - $deleteCount++; - } - - unset($condition); - } + $this->deleteByIds($posts, $deleteCount); } while (count($posts) == 100); /** 设置提示信息 */ @@ -329,6 +268,16 @@ class Edit extends PostEdit implements ActionInterface $this->response->redirect(Common::url('manage-medias.php', $this->options->adminUrl)); } + /** + * @return $this + * @throws Exception + * @throws \Typecho\Db\Exception + */ + public function prepare(): self + { + return $this->prepareEdit('attachment', false, _t('文件不存在')); + } + /** * 绑定动作 * @@ -339,8 +288,44 @@ class Edit extends PostEdit implements ActionInterface { $this->security->protect(); $this->on($this->request->is('do=delete'))->deleteAttachment(); - $this->on($this->have() && $this->request->is('do=update'))->updateAttachment(); + $this->on($this->request->is('do=update')) + ->prepare()->updateAttachment(); $this->on($this->request->is('do=clear'))->clearAttachment(); $this->response->redirect($this->options->adminUrl); } + + /** + * @param array $posts + * @param int $deleteCount + * @return void + */ + protected function deleteByIds(array $posts, int &$deleteCount): void + { + foreach ($posts as $post) { + // 删除插件接口 + self::pluginHandle()->call('delete', $post, $this); + + $condition = $this->db->sql()->where('cid = ?', $post); + $row = $this->db->fetchRow($this->select() + ->where('table.contents.type = ?', 'attachment') + ->where('table.contents.cid = ?', $post) + ->limit(1), [$this, 'push']); + + if ($this->isWriteable(clone $condition) && $this->delete($condition)) { + /** 删除文件 */ + Upload::deleteHandle($row); + + /** 删除评论 */ + $this->db->query($this->db->delete('table.comments') + ->where('cid = ?', $post)); + + // 完成删除插件接口 + self::pluginHandle()->call('finishDelete', $post, $this); + + $deleteCount++; + } + + unset($condition); + } + } } diff --git a/var/Widget/Contents/EditTrait.php b/var/Widget/Contents/EditTrait.php new file mode 100644 index 00000000..d3ede5e4 --- /dev/null +++ b/var/Widget/Contents/EditTrait.php @@ -0,0 +1,566 @@ +have()) { + $defaultFields = $this->getDefaultFieldItems(); + $rows = $this->db->fetchAll($this->db->select()->from('table.fields') + ->where('cid = ?', isset($this->draft) ? $this->draft['cid'] : $this->cid)); + + foreach ($rows as $row) { + $isFieldReadOnly = Contents::pluginHandle() + ->trigger($plugged)->call('isFieldReadOnly', $row['name']); + + if ($plugged && $isFieldReadOnly) { + continue; + } + + $isFieldReadOnly = static::pluginHandle() + ->trigger($plugged)->call('isFieldReadOnly', $row['name']); + + if ($plugged && $isFieldReadOnly) { + continue; + } + + if (!isset($defaultFields[$row['name']])) { + $fields[] = $row; + } + } + } + + return $fields; + } + + /** + * @return array + */ + public function getDefaultFieldItems(): array + { + $defaultFields = []; + $configFile = $this->options->themeFile($this->options->theme, 'functions.php'); + $layout = new Layout(); + $fields = new Config(); + + if ($this->have()) { + $fields = $this->fields; + } + + Contents::pluginHandle()->call('getDefaultFieldItems', $layout); + static::pluginHandle()->call('getDefaultFieldItems', $layout); + + if (file_exists($configFile)) { + require_once $configFile; + + if (function_exists('themeFields')) { + themeFields($layout); + } + + $func = $this->getThemeFieldsHook(); + if (function_exists($func)) { + call_user_func($func, $layout); + } + } + + $items = $layout->getItems(); + foreach ($items as $item) { + if ($item instanceof Element) { + $name = $item->input->getAttribute('name'); + + $isFieldReadOnly = Contents::pluginHandle() + ->trigger($plugged)->call('isFieldReadOnly', $name); + if ($plugged && $isFieldReadOnly) { + continue; + } + + if (preg_match("/^fields\[(.+)\]$/", $name, $matches)) { + $name = $matches[1]; + } else { + $inputName = 'fields[' . $name . ']'; + if (preg_match("/^(.+)\[\]$/", $name, $matches)) { + $name = $matches[1]; + $inputName = 'fields[' . $name . '][]'; + } + + foreach ($item->inputs as $input) { + $input->setAttribute('name', $inputName); + } + } + + if (isset($fields->{$name})) { + $item->value($fields->{$name}); + } + + $elements = $item->container->getItems(); + array_shift($elements); + $div = new Layout('div'); + + foreach ($elements as $el) { + $div->addItem($el); + } + + $defaultFields[$name] = [$item->label, $div]; + } + } + + return $defaultFields; + } + + /** + * 获取自定义字段的hook名称 + * + * @return string + */ + abstract protected function getThemeFieldsHook(): string; + + /** + * getFields + * + * @return array + */ + protected function getFields(): array + { + $fields = []; + $fieldNames = $this->request->getArray('fieldNames'); + + if (!empty($fieldNames)) { + $data = [ + 'fieldNames' => $this->request->getArray('fieldNames'), + 'fieldTypes' => $this->request->getArray('fieldTypes'), + 'fieldValues' => $this->request->getArray('fieldValues') + ]; + foreach ($data['fieldNames'] as $key => $val) { + $val = trim($val); + + if (0 == strlen($val)) { + continue; + } + + $fields[$val] = [$data['fieldTypes'][$key], $data['fieldValues'][$key]]; + } + } + + $customFields = $this->request->getArray('fields'); + foreach ($customFields as $key => $val) { + $fields[$key] = [is_array($val) ? 'json' : 'str', $val]; + } + + return $fields; + } + + /** + * 删除草稿 + * + * @param integer $cid 草稿id + * @throws DbException + */ + protected function deleteDraft(int $cid, bool $hasMetas = true) + { + $this->delete($this->db->sql()->where('cid = ?', $cid)); + + if ($hasMetas) { + /** 删除草稿分类 */ + $this->setCategories($cid, [], false, false); + + /** 删除标签 */ + $this->setTags($cid, null, false, false); + } + } + + /** + * 根据提交值获取created字段值 + * + * @return integer + */ + protected function getCreated(): int + { + $created = $this->options->time; + if ($this->request->is('created')) { + $created = $this->request->get('created'); + } elseif ($this->request->is('date')) { + $dstOffset = $this->request->get('dst', 0); + $timezoneSymbol = $this->options->timezone >= 0 ? '+' : '-'; + $timezoneOffset = abs($this->options->timezone); + $timezone = $timezoneSymbol . str_pad($timezoneOffset / 3600, 2, '0', STR_PAD_LEFT) . ':00'; + [$date, $time] = explode(' ', $this->request->get('date')); + + $created = strtotime("{$date}T{$time}{$timezone}") - $dstOffset; + } elseif ($this->request->is('year&month&day')) { + $second = $this->request->filter('int')->get('sec', date('s')); + $min = $this->request->filter('int')->get('min', date('i')); + $hour = $this->request->filter('int')->get('hour', date('H')); + + $year = $this->request->filter('int')->get('year'); + $month = $this->request->filter('int')->get('month'); + $day = $this->request->filter('int')->get('day'); + + $created = mktime($hour, $min, $second, $month, $day, $year) + - $this->options->timezone + $this->options->serverTimezone; + } elseif ($this->have() && $this->created > 0) { + //如果是修改文章 + $created = $this->created; + } elseif ($this->request->is('do=save')) { + // 如果是草稿而且没有任何输入则保持原状 + $created = 0; + } + + return $created; + } + + /** + * 设置分类 + * + * @param integer $cid 内容id + * @param array $categories 分类id的集合数组 + * @param boolean $beforeCount 是否参与计数 + * @param boolean $afterCount 是否参与计数 + * @throws DbException + */ + protected function setCategories(int $cid, array $categories, bool $beforeCount = true, bool $afterCount = true) + { + $categories = array_unique(array_map('trim', $categories)); + + /** 取出已有category */ + $existCategories = array_column( + $this->db->fetchAll( + $this->db->select('table.metas.mid') + ->from('table.metas') + ->join('table.relationships', 'table.relationships.mid = table.metas.mid') + ->where('table.relationships.cid = ?', $cid) + ->where('table.metas.type = ?', 'category') + ), + 'mid' + ); + + /** 删除已有category */ + if ($existCategories) { + foreach ($existCategories as $category) { + $this->db->query($this->db->delete('table.relationships') + ->where('cid = ?', $cid) + ->where('mid = ?', $category)); + + if ($beforeCount) { + $this->db->query($this->db->update('table.metas') + ->expression('count', 'count - 1') + ->where('mid = ?', $category)); + } + } + } + + /** 插入category */ + if ($categories) { + foreach ($categories as $category) { + /** 如果分类不存在 */ + if ( + !$this->db->fetchRow( + $this->db->select('mid') + ->from('table.metas') + ->where('mid = ?', $category) + ->limit(1) + ) + ) { + continue; + } + + $this->db->query($this->db->insert('table.relationships') + ->rows([ + 'mid' => $category, + 'cid' => $cid + ])); + + if ($afterCount) { + $this->db->query($this->db->update('table.metas') + ->expression('count', 'count + 1') + ->where('mid = ?', $category)); + } + } + } + } + + /** + * 设置内容标签 + * + * @param integer $cid + * @param string|null $tags + * @param boolean $beforeCount 是否参与计数 + * @param boolean $afterCount 是否参与计数 + * @throws DbException + */ + protected function setTags(int $cid, ?string $tags, bool $beforeCount = true, bool $afterCount = true) + { + $tags = str_replace(',', ',', $tags); + $tags = array_unique(array_map('trim', explode(',', $tags))); + $tags = array_filter($tags, [Validate::class, 'xssCheck']); + + /** 取出已有tag */ + $existTags = array_column( + $this->db->fetchAll( + $this->db->select('table.metas.mid') + ->from('table.metas') + ->join('table.relationships', 'table.relationships.mid = table.metas.mid') + ->where('table.relationships.cid = ?', $cid) + ->where('table.metas.type = ?', 'tag') + ), + 'mid' + ); + + /** 删除已有tag */ + if ($existTags) { + foreach ($existTags as $tag) { + if (0 == strlen($tag)) { + continue; + } + + $this->db->query($this->db->delete('table.relationships') + ->where('cid = ?', $cid) + ->where('mid = ?', $tag)); + + if ($beforeCount) { + $this->db->query($this->db->update('table.metas') + ->expression('count', 'count - 1') + ->where('mid = ?', $tag)); + } + } + } + + /** 取出插入tag */ + $insertTags = Metas::alloc()->scanTags($tags); + + /** 插入tag */ + if ($insertTags) { + foreach ($insertTags as $tag) { + if (0 == strlen($tag)) { + continue; + } + + $this->db->query($this->db->insert('table.relationships') + ->rows([ + 'mid' => $tag, + 'cid' => $cid + ])); + + if ($afterCount) { + $this->db->query($this->db->update('table.metas') + ->expression('count', 'count + 1') + ->where('mid = ?', $tag)); + } + } + } + } + + /** + * 同步附件 + * + * @param integer $cid 内容id + * @throws DbException + */ + protected function attach(int $cid) + { + $attachments = $this->request->getArray('attachment'); + if (!empty($attachments)) { + foreach ($attachments as $key => $attachment) { + $this->db->query($this->db->update('table.contents')->rows([ + 'parent' => $cid, + 'status' => 'publish', + 'order' => $key + 1 + ])->where('cid = ? AND type = ?', $attachment, 'attachment')); + } + } + } + + /** + * 取消附件关联 + * + * @param integer $cid 内容id + * @throws DbException + */ + protected function unAttach(int $cid) + { + $this->db->query($this->db->update('table.contents')->rows(['parent' => 0, 'status' => 'publish']) + ->where('parent = ? AND type = ?', $cid, 'attachment')); + } + + /** + * 发布内容 + * + * @param array $contents 内容结构 + * @param boolean $hasMetas 是否有metas + * @throws DbException|Exception + */ + protected function publish(array $contents, bool $hasMetas = true) + { + /** 发布内容, 检查是否具有直接发布的权限 */ + $this->checkStatus($contents); + + /** 真实的内容id */ + $realId = 0; + + /** 是否是从草稿状态发布 */ + $isDraftToPublish = preg_match("/_draft$/", $this->type); + + $isBeforePublish = ('publish' == $this->status); + $isAfterPublish = ('publish' == $contents['status']); + + /** 重新发布现有内容 */ + if ($this->have()) { + + /** 如果它本身不是草稿, 需要删除其草稿 */ + if (!$isDraftToPublish && $this->draft) { + $cid = $this->draft['cid']; + $this->deleteDraft($cid); + $this->deleteFields($cid); + } + + /** 直接将草稿状态更改 */ + if ($this->update($contents, $this->db->sql()->where('cid = ?', $this->cid))) { + $realId = $this->cid; + } + } else { + /** 发布一个新内容 */ + $realId = $this->insert($contents); + } + + if ($realId > 0) { + if ($hasMetas) { + /** 插入分类 */ + if (array_key_exists('category', $contents)) { + $this->setCategories( + $realId, + !empty($contents['category']) && is_array($contents['category']) + ? $contents['category'] : [$this->options->defaultCategory], + !$isDraftToPublish && $isBeforePublish, + $isAfterPublish + ); + } + + /** 插入标签 */ + if (array_key_exists('tags', $contents)) { + $this->setTags($realId, $contents['tags'], !$isDraftToPublish && $isBeforePublish, $isAfterPublish); + } + } + + /** 同步附件 */ + $this->attach($realId); + + /** 保存自定义字段 */ + $this->applyFields($this->getFields(), $realId); + + $this->db->fetchRow($this->select() + ->where('table.contents.cid = ?', $realId)->limit(1), [$this, 'push']); + } + } + + + /** + * 保存内容 + * + * @param array $contents 内容结构 + * @param boolean $hasMetas 是否有metas + * @return integer + * @throws DbException|Exception + */ + protected function save(array $contents, bool $hasMetas = true): int + { + /** 发布内容, 检查是否具有直接发布的权限 */ + $this->checkStatus($contents); + + /** 真实的内容id */ + $realId = 0; + + /** 如果草稿已经存在 */ + if ($this->draft) { + + /** 直接将草稿状态更改 */ + if ($this->update($contents, $this->db->sql()->where('cid = ?', $this->draft['cid']))) { + $realId = $this->draft['cid']; + } + } else { + if ($this->have()) { + $contents['parent'] = $this->cid; + } + + /** 发布一个新内容 */ + $realId = $this->insert($contents); + + if (!$this->have()) { + $this->db->fetchRow( + $this->select()->where('table.contents.cid = ?', $realId)->limit(1), + [$this, 'push'] + ); + } + } + + if ($realId > 0) { + if ($hasMetas) { + /** 插入分类 */ + if (array_key_exists('category', $contents)) { + $this->setCategories($realId, !empty($contents['category']) && is_array($contents['category']) ? + $contents['category'] : [$this->options->defaultCategory], false, false); + } + + /** 插入标签 */ + if (array_key_exists('tags', $contents)) { + $this->setTags($realId, $contents['tags'], false, false); + } + } + + /** 同步附件 */ + $this->attach($this->cid); + + /** 保存自定义字段 */ + $this->applyFields($this->getFields(), $realId); + + return $realId; + } + + return $this->draft['cid']; + } + + /** + * @param array $contents + * @return void + * @throws DbException + * @throws Exception + */ + private function checkStatus(array &$contents) + { + if ($this->user->pass('editor', true)) { + if (empty($contents['visibility'])) { + $contents['status'] = 'publish'; + } elseif ( + !in_array($contents['visibility'], ['private', 'waiting', 'publish', 'hidden']) + ) { + if (empty($contents['password']) || 'password' != $contents['visibility']) { + $contents['password'] = ''; + } + $contents['status'] = 'publish'; + } else { + $contents['status'] = $contents['visibility']; + $contents['password'] = ''; + } + } else { + $contents['status'] = 'waiting'; + $contents['password'] = ''; + } + } +} diff --git a/var/Widget/Contents/Page/Edit.php b/var/Widget/Contents/Page/Edit.php index 4636d6ca..c87f7647 100644 --- a/var/Widget/Contents/Page/Edit.php +++ b/var/Widget/Contents/Page/Edit.php @@ -4,9 +4,12 @@ namespace Widget\Contents\Page; use Typecho\Common; use Typecho\Date; +use Typecho\Db\Exception as DbException; use Typecho\Widget\Exception; -use Widget\Contents\Post\Edit as PostEdit; +use Widget\Base\Contents; +use Widget\Contents\EditTrait; use Widget\ActionInterface; +use Widget\Contents\PrepareEditTrait; use Widget\Notice; use Widget\Service; @@ -23,15 +26,10 @@ if (!defined('__TYPECHO_ROOT_DIR__')) { * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) * @license GNU General Public License 2.0 */ -class Edit extends PostEdit implements ActionInterface +class Edit extends Contents implements ActionInterface { - /** - * 自定义字段的hook名称 - * - * @var string - * @access protected - */ - protected string $themeCustomFieldsHook = 'themePageFields'; + use PrepareEditTrait; + use EditTrait; /** * 执行函数 @@ -39,30 +37,12 @@ class Edit extends PostEdit implements ActionInterface * @access public * @return void * @throws Exception - * @throws \Typecho\Db\Exception + * @throws DbException */ public function execute() { /** 必须为编辑以上权限 */ $this->user->pass('editor'); - - /** 获取文章内容 */ - if ($this->request->is('cid')) { - $this->db->fetchRow($this->select() - ->where('table.contents.type = ? OR table.contents.type = ?', 'page', 'page_draft') - ->where('table.contents.cid = ?', $this->request->filter('int')->get('cid')) - ->limit(1), [$this, 'push']); - - if ('page_draft' == $this->status && $this->parent) { - $this->response->redirect(Common::url('write-page.php?cid=' . $this->parent, $this->options->adminUrl)); - } - - if (!$this->have()) { - throw new Exception(_t('页面不存在'), 404); - } elseif (!$this->allow('edit')) { - throw new Exception(_t('没有编辑权限'), 403); - } - } } /** @@ -94,7 +74,7 @@ class Edit extends PostEdit implements ActionInterface if ($this->request->is('do=publish')) { /** 重新发布已经存在的文章 */ $contents['type'] = 'page'; - $this->publish($contents); + $this->publish($contents, false); // 完成发布插件接口 self::pluginHandle()->call('finishPublish', $contents, $this); @@ -116,7 +96,7 @@ class Edit extends PostEdit implements ActionInterface } else { /** 保存文章 */ $contents['type'] = 'page_draft'; - $this->save($contents); + $draftId = $this->save($contents, false); // 完成发布插件接口 self::pluginHandle()->call('finishSave', $contents, $this); @@ -130,7 +110,7 @@ class Edit extends PostEdit implements ActionInterface 'success' => 1, 'time' => $created->format('H:i:s A'), 'cid' => $this->cid, - 'draftId' => $this->draft['cid'] + 'draftId' => $draftId ]); } else { /** 设置提示信息 */ @@ -145,7 +125,7 @@ class Edit extends PostEdit implements ActionInterface /** * 标记页面 * - * @throws \Typecho\Db\Exception + * @throws DbException */ public function markPage() { @@ -202,7 +182,7 @@ class Edit extends PostEdit implements ActionInterface /** * 删除页面 * - * @throws \Typecho\Db\Exception + * @throws DbException */ public function deletePage() { @@ -238,7 +218,7 @@ class Edit extends PostEdit implements ActionInterface $this->deleteFields($page); if ($draft) { - $this->deleteDraft($draft['cid']); + $this->deleteDraft($draft['cid'], false); $this->deleteFields($draft['cid']); } @@ -263,7 +243,7 @@ class Edit extends PostEdit implements ActionInterface /** * 删除页面所属草稿 * - * @throws \Typecho\Db\Exception + * @throws DbException */ public function deletePageDraft() { @@ -298,7 +278,7 @@ class Edit extends PostEdit implements ActionInterface /** * 页面排序 * - * @throws \Typecho\Db\Exception + * @throws DbException */ public function sortPage() { @@ -319,20 +299,40 @@ class Edit extends PostEdit implements ActionInterface } } + /** + * @return $this + * @throws DbException + * @throws Exception + */ + public function prepare(): self + { + return $this->prepareEdit('page', true, _t('页面不存在')); + } + /** * 绑定动作 * - * @access public * @return void + * @throws DbException + * @throws Exception */ public function action() { $this->security->protect(); - $this->on($this->request->is('do=publish') || $this->request->is('do=save'))->writePage(); + $this->on($this->request->is('do=publish') || $this->request->is('do=save')) + ->prepare()->writePage(); $this->on($this->request->is('do=delete'))->deletePage(); $this->on($this->request->is('do=mark'))->markPage(); $this->on($this->request->is('do=deleteDraft'))->deletePageDraft(); $this->on($this->request->is('do=sort'))->sortPage(); $this->response->redirect($this->options->adminUrl); } + + /** + * @return string + */ + protected function getThemeFieldsHook(): string + { + return 'themePageFields'; + } } diff --git a/var/Widget/Contents/Post/Edit.php b/var/Widget/Contents/Post/Edit.php index 1920e53b..7bc4eeb6 100644 --- a/var/Widget/Contents/Post/Edit.php +++ b/var/Widget/Contents/Post/Edit.php @@ -3,16 +3,14 @@ namespace Widget\Contents\Post; use Typecho\Common; -use Typecho\Config; -use Typecho\Validate; use Typecho\Widget\Exception; -use Typecho\Widget\Helper\Form\Element; -use Typecho\Widget\Helper\Layout; use Widget\Base\Contents; use Widget\Base\Metas; use Widget\ActionInterface; use Typecho\Db\Exception as DbException; use Typecho\Date as TypechoDate; +use Widget\Contents\EditTrait; +use Widget\Contents\PrepareEditTrait; use Widget\Notice; use Widget\Service; @@ -22,17 +20,11 @@ if (!defined('__TYPECHO_ROOT_DIR__')) { /** * 编辑文章组件 - * - * @property-read array|null $draft */ class Edit extends Contents implements ActionInterface { - /** - * 自定义字段的hook名称 - * - * @var string - */ - protected string $themeCustomFieldsHook = 'themePostFields'; + use PrepareEditTrait; + use EditTrait; /** * 执行函数 @@ -43,220 +35,6 @@ class Edit extends Contents implements ActionInterface { /** 必须为贡献者以上权限 */ $this->user->pass('contributor'); - - /** 获取文章内容 */ - if ($this->request->is('cid')) { - $this->db->fetchRow($this->select() - ->where('table.contents.type = ? OR table.contents.type = ?', 'post', 'post_draft') - ->where('table.contents.cid = ?', $this->request->filter('int')->get('cid')) - ->limit(1), [$this, 'push']); - - if ('post_draft' == $this->type && $this->parent) { - $this->response->redirect( - Common::url('write-post.php?cid=' . $this->parent, $this->options->adminUrl) - ); - } - - if (!$this->have()) { - throw new Exception(_t('文章不存在'), 404); - } elseif (!$this->allow('edit')) { - throw new Exception(_t('没有编辑权限'), 403); - } - } - } - - /** - * 获取文章权限 - * - * @param mixed ...$permissions - * @return bool - * @throws Exception|DbException - */ - public function allow(...$permissions): bool - { - $allow = true; - - foreach ($permissions as $permission) { - $permission = strtolower($permission); - - if ('edit' == $permission) { - $allow &= ($this->user->pass('editor', true) || $this->authorId == $this->user->uid); - } else { - $permission = 'allow' . ucfirst(strtolower($permission)); - $optionPermission = 'default' . ucfirst($permission); - $allow &= ($this->{$permission} ?? $this->options->{$optionPermission}); - } - } - - return $allow; - } - - /** - * 过滤堆栈 - * - * @param array $value 每行的值 - * @return array - * @throws DbException - */ - public function filter(array $value): array - { - if ('post' == $value['type'] || 'page' == $value['type']) { - $draft = $this->db->fetchRow(Contents::alloc()->select() - ->where( - 'table.contents.parent = ? AND table.contents.type = ?', - $value['cid'], - $value['type'] . '_draft' - ) - ->limit(1)); - - if (!empty($draft)) { - $draft['slug'] = ltrim($draft['slug'], '@'); - $draft['type'] = $value['type']; - - $draft = parent::filter($draft); - - $draft['tags'] = $this->db->fetchAll($this->db - ->select()->from('table.metas') - ->join('table.relationships', 'table.relationships.mid = table.metas.mid') - ->where('table.relationships.cid = ?', $draft['cid']) - ->where('table.metas.type = ?', 'tag'), [Metas::alloc(), 'filter']); - $draft['cid'] = $value['cid']; - - return $draft; - } - } - - return parent::filter($value); - } - - /** - * 输出文章发布日期 - * - * @param string $format 日期格式 - * @return void - */ - public function date($format = null) - { - if (isset($this->created)) { - parent::date($format); - } else { - echo date($format, $this->options->time + $this->options->timezone - $this->options->serverTimezone); - } - } - - /** - * 获取网页标题 - * - * @return string - */ - public function getMenuTitle(): string - { - return _t('编辑 %s', $this->title); - } - - /** - * getFieldItems - * - * @throws DbException - */ - public function getFieldItems(): array - { - $fields = []; - - if ($this->have()) { - $defaultFields = $this->getDefaultFieldItems(); - $rows = $this->db->fetchAll($this->db->select()->from('table.fields') - ->where('cid = ?', $this->cid)); - - foreach ($rows as $row) { - $isFieldReadOnly = Contents::pluginHandle() - ->trigger($plugged)->call('isFieldReadOnly', $row['name']); - - if ($plugged && $isFieldReadOnly) { - continue; - } - - if (!isset($defaultFields[$row['name']])) { - $fields[] = $row; - } - } - } - - return $fields; - } - - /** - * getDefaultFieldItems - * - * @return array - */ - public function getDefaultFieldItems(): array - { - $defaultFields = []; - $configFile = $this->options->themeFile($this->options->theme, 'functions.php'); - $layout = new Layout(); - $fields = new Config(); - - if ($this->have()) { - $fields = $this->fields; - } - - self::pluginHandle()->call('getDefaultFieldItems', $layout); - - if (file_exists($configFile)) { - require_once $configFile; - - if (function_exists('themeFields')) { - themeFields($layout); - } - - if (function_exists($this->themeCustomFieldsHook)) { - call_user_func($this->themeCustomFieldsHook, $layout); - } - } - - $items = $layout->getItems(); - foreach ($items as $item) { - if ($item instanceof Element) { - $name = $item->input->getAttribute('name'); - - $isFieldReadOnly = Contents::pluginHandle() - ->trigger($plugged)->call('isFieldReadOnly', $name); - if ($plugged && $isFieldReadOnly) { - continue; - } - - if (preg_match("/^fields\[(.+)\]$/", $name, $matches)) { - $name = $matches[1]; - } else { - $inputName = 'fields[' . $name . ']'; - if (preg_match("/^(.+)\[\]$/", $name, $matches)) { - $name = $matches[1]; - $inputName = 'fields[' . $name . '][]'; - } - - foreach ($item->inputs as $input) { - $input->setAttribute('name', $inputName); - } - } - - if (isset($fields->{$name})) { - $item->value($fields->{$name}); - } - - $elements = $item->container->getItems(); - array_shift($elements); - $div = new Layout('div'); - - foreach ($elements as $el) { - $div->addItem($el); - } - - $defaultFields[$name] = [$item->label, $div]; - } - } - - return $defaultFields; } /** @@ -294,7 +72,9 @@ class Edit extends Contents implements ActionInterface self::pluginHandle()->call('finishPublish', $contents, $this); /** 发送ping */ - $trackback = array_filter(array_unique(preg_split("/(\r|\n|\r\n)/", trim($this->request->get('trackback'))))); + $trackback = array_filter( + array_unique(preg_split("/(\r|\n|\r\n)/", trim($this->request->get('trackback')))) + ); Service::alloc()->sendPing($this, $trackback); /** 设置提示信息 */ @@ -313,7 +93,7 @@ class Edit extends Contents implements ActionInterface } else { /** 保存文章 */ $contents['type'] = 'post_draft'; - $this->save($contents); + $draftId = $this->save($contents); // 完成保存插件接口 self::pluginHandle()->call('finishSave', $contents, $this); @@ -327,7 +107,7 @@ class Edit extends Contents implements ActionInterface 'success' => 1, 'time' => $created->format('H:i:s A'), 'cid' => $this->cid, - 'draftId' => $this->draft['cid'] + 'draftId' => $draftId ]); } else { /** 设置提示信息 */ @@ -339,325 +119,6 @@ class Edit extends Contents implements ActionInterface } } - /** - * 根据提交值获取created字段值 - * - * @return integer - */ - protected function getCreated(): int - { - $created = $this->options->time; - if ($this->request->is('created')) { - $created = $this->request->get('created'); - } elseif ($this->request->is('date')) { - $dstOffset = $this->request->get('dst', 0); - $timezoneSymbol = $this->options->timezone >= 0 ? '+' : '-'; - $timezoneOffset = abs($this->options->timezone); - $timezone = $timezoneSymbol . str_pad($timezoneOffset / 3600, 2, '0', STR_PAD_LEFT) . ':00'; - [$date, $time] = explode(' ', $this->request->get('date')); - - $created = strtotime("{$date}T{$time}{$timezone}") - $dstOffset; - } elseif ($this->request->is('year&month&day')) { - $second = $this->request->filter('int')->get('sec', date('s')); - $min = $this->request->filter('int')->get('min', date('i')); - $hour = $this->request->filter('int')->get('hour', date('H')); - - $year = $this->request->filter('int')->get('year'); - $month = $this->request->filter('int')->get('month'); - $day = $this->request->filter('int')->get('day'); - - $created = mktime($hour, $min, $second, $month, $day, $year) - - $this->options->timezone + $this->options->serverTimezone; - } elseif ($this->have() && $this->created > 0) { - //如果是修改文章 - $created = $this->created; - } elseif ($this->request->is('do=save')) { - // 如果是草稿而且没有任何输入则保持原状 - $created = 0; - } - - return $created; - } - - /** - * 发布内容 - * - * @param array $contents 内容结构 - * @throws DbException|Exception - */ - protected function publish(array $contents) - { - /** 发布内容, 检查是否具有直接发布的权限 */ - $this->checkStatus($contents); - - /** 真实的内容id */ - $realId = 0; - - /** 是否是从草稿状态发布 */ - $isDraftToPublish = ('post_draft' == $this->type || 'page_draft' == $this->type); - - $isBeforePublish = ('publish' == $this->status); - $isAfterPublish = ('publish' == $contents['status']); - - /** 重新发布现有内容 */ - if ($this->have()) { - - /** 如果它本身不是草稿, 需要删除其草稿 */ - if (!$isDraftToPublish && $this->draft) { - $cid = $this->draft['cid']; - $this->deleteDraft($cid); - $this->deleteFields($cid); - } - - /** 直接将草稿状态更改 */ - if ($this->update($contents, $this->db->sql()->where('cid = ?', $this->cid))) { - $realId = $this->cid; - } - } else { - /** 发布一个新内容 */ - $realId = $this->insert($contents); - } - - if ($realId > 0) { - /** 插入分类 */ - if (array_key_exists('category', $contents)) { - $this->setCategories( - $realId, - !empty($contents['category']) && is_array($contents['category']) - ? $contents['category'] : [$this->options->defaultCategory], - !$isDraftToPublish && $isBeforePublish, - $isAfterPublish - ); - } - - /** 插入标签 */ - if (array_key_exists('tags', $contents)) { - $this->setTags($realId, $contents['tags'], !$isDraftToPublish && $isBeforePublish, $isAfterPublish); - } - - /** 同步附件 */ - $this->attach($realId); - - /** 保存自定义字段 */ - $this->applyFields($this->getFields(), $realId); - - $this->db->fetchRow($this->select()->where('table.contents.cid = ?', $realId)->limit(1), [$this, 'push']); - } - } - - /** - * 删除草稿 - * - * @param integer $cid 草稿id - * @throws DbException - */ - protected function deleteDraft(int $cid) - { - $this->delete($this->db->sql()->where('cid = ?', $cid)); - - /** 删除草稿分类 */ - $this->setCategories($cid, [], false, false); - - /** 删除标签 */ - $this->setTags($cid, null, false, false); - } - - /** - * 设置分类 - * - * @param integer $cid 内容id - * @param array $categories 分类id的集合数组 - * @param boolean $beforeCount 是否参与计数 - * @param boolean $afterCount 是否参与计数 - * @throws DbException - */ - public function setCategories(int $cid, array $categories, bool $beforeCount = true, bool $afterCount = true) - { - $categories = array_unique(array_map('trim', $categories)); - - /** 取出已有category */ - $existCategories = array_column( - $this->db->fetchAll( - $this->db->select('table.metas.mid') - ->from('table.metas') - ->join('table.relationships', 'table.relationships.mid = table.metas.mid') - ->where('table.relationships.cid = ?', $cid) - ->where('table.metas.type = ?', 'category') - ), - 'mid' - ); - - /** 删除已有category */ - if ($existCategories) { - foreach ($existCategories as $category) { - $this->db->query($this->db->delete('table.relationships') - ->where('cid = ?', $cid) - ->where('mid = ?', $category)); - - if ($beforeCount) { - $this->db->query($this->db->update('table.metas') - ->expression('count', 'count - 1') - ->where('mid = ?', $category)); - } - } - } - - /** 插入category */ - if ($categories) { - foreach ($categories as $category) { - /** 如果分类不存在 */ - if ( - !$this->db->fetchRow( - $this->db->select('mid') - ->from('table.metas') - ->where('mid = ?', $category) - ->limit(1) - ) - ) { - continue; - } - - $this->db->query($this->db->insert('table.relationships') - ->rows([ - 'mid' => $category, - 'cid' => $cid - ])); - - if ($afterCount) { - $this->db->query($this->db->update('table.metas') - ->expression('count', 'count + 1') - ->where('mid = ?', $category)); - } - } - } - } - - /** - * 设置内容标签 - * - * @param integer $cid - * @param string|null $tags - * @param boolean $beforeCount 是否参与计数 - * @param boolean $afterCount 是否参与计数 - * @throws DbException - */ - public function setTags(int $cid, ?string $tags, bool $beforeCount = true, bool $afterCount = true) - { - $tags = str_replace(',', ',', $tags); - $tags = array_unique(array_map('trim', explode(',', $tags))); - $tags = array_filter($tags, [Validate::class, 'xssCheck']); - - /** 取出已有tag */ - $existTags = array_column( - $this->db->fetchAll( - $this->db->select('table.metas.mid') - ->from('table.metas') - ->join('table.relationships', 'table.relationships.mid = table.metas.mid') - ->where('table.relationships.cid = ?', $cid) - ->where('table.metas.type = ?', 'tag') - ), - 'mid' - ); - - /** 删除已有tag */ - if ($existTags) { - foreach ($existTags as $tag) { - if (0 == strlen($tag)) { - continue; - } - - $this->db->query($this->db->delete('table.relationships') - ->where('cid = ?', $cid) - ->where('mid = ?', $tag)); - - if ($beforeCount) { - $this->db->query($this->db->update('table.metas') - ->expression('count', 'count - 1') - ->where('mid = ?', $tag)); - } - } - } - - /** 取出插入tag */ - $insertTags = Metas::alloc()->scanTags($tags); - - /** 插入tag */ - if ($insertTags) { - foreach ($insertTags as $tag) { - if (0 == strlen($tag)) { - continue; - } - - $this->db->query($this->db->insert('table.relationships') - ->rows([ - 'mid' => $tag, - 'cid' => $cid - ])); - - if ($afterCount) { - $this->db->query($this->db->update('table.metas') - ->expression('count', 'count + 1') - ->where('mid = ?', $tag)); - } - } - } - } - - /** - * 同步附件 - * - * @param integer $cid 内容id - * @throws DbException - */ - protected function attach(int $cid) - { - $attachments = $this->request->getArray('attachment'); - if (!empty($attachments)) { - foreach ($attachments as $key => $attachment) { - $this->db->query($this->db->update('table.contents')->rows([ - 'parent' => $cid, - 'status' => 'publish', - 'order' => $key + 1 - ])->where('cid = ? AND type = ?', $attachment, 'attachment')); - } - } - } - - /** - * getFields - * - * @return array - */ - protected function getFields(): array - { - $fields = []; - $fieldNames = $this->request->getArray('fieldNames'); - - if (!empty($fieldNames)) { - $data = [ - 'fieldNames' => $this->request->getArray('fieldNames'), - 'fieldTypes' => $this->request->getArray('fieldTypes'), - 'fieldValues' => $this->request->getArray('fieldValues') - ]; - foreach ($data['fieldNames'] as $key => $val) { - $val = trim($val); - - if (0 == strlen($val)) { - continue; - } - - $fields[$val] = [$data['fieldTypes'][$key], $data['fieldValues'][$key]]; - } - } - - $customFields = $this->request->getArray('fields'); - foreach ($customFields as $key => $val) { - $fields[$key] = [is_array($val) ? 'json' : 'str', $val]; - } - - return $fields; - } - /** * 获取页面偏移的URL Query * @@ -677,63 +138,6 @@ class Edit extends Contents implements ActionInterface ); } - /** - * 保存内容 - * - * @param array $contents 内容结构 - * @throws DbException|Exception - */ - protected function save(array $contents) - { - /** 发布内容, 检查是否具有直接发布的权限 */ - $this->checkStatus($contents); - - /** 真实的内容id */ - $realId = 0; - - /** 如果草稿已经存在 */ - if ($this->draft) { - - /** 直接将草稿状态更改 */ - if ($this->update($contents, $this->db->sql()->where('cid = ?', $this->draft['cid']))) { - $realId = $this->draft['cid']; - } - } else { - if ($this->have()) { - $contents['parent'] = $this->cid; - } - - /** 发布一个新内容 */ - $realId = $this->insert($contents); - - if (!$this->have()) { - $this->db->fetchRow( - $this->select()->where('table.contents.cid = ?', $realId)->limit(1), - [$this, 'push'] - ); - } - } - - if ($realId > 0) { - /** 插入分类 */ - if (array_key_exists('category', $contents)) { - $this->setCategories($realId, !empty($contents['category']) && is_array($contents['category']) ? - $contents['category'] : [$this->options->defaultCategory], false, false); - } - - /** 插入标签 */ - if (array_key_exists('tags', $contents)) { - $this->setTags($realId, $contents['tags'], false, false); - } - - /** 同步附件 */ - $this->attach($this->cid); - - /** 保存自定义字段 */ - $this->applyFields($this->getFields(), $realId); - } - } - /** * 标记文章 * @@ -895,18 +299,6 @@ class Edit extends Contents implements ActionInterface $this->response->goBack(); } - /** - * 取消附件关联 - * - * @param integer $cid 内容id - * @throws DbException - */ - protected function unAttach(int $cid) - { - $this->db->query($this->db->update('table.contents')->rows(['parent' => 0, 'status' => 'publish']) - ->where('parent = ? AND type = ?', $cid, 'attachment')); - } - /** * 删除文章所属草稿 * @@ -942,13 +334,26 @@ class Edit extends Contents implements ActionInterface $this->response->goBack(); } + /** + * @return $this + * @throws DbException + * @throws Exception + */ + public function prepare(): self + { + return $this->prepareEdit('post', true, _t('文章不存在')); + } + /** * 绑定动作 + * + * @throws Exception|DbException */ public function action() { $this->security->protect(); - $this->on($this->request->is('do=publish') || $this->request->is('do=save'))->writePost(); + $this->on($this->request->is('do=publish') || $this->request->is('do=save')) + ->prepare()->writePost(); $this->on($this->request->is('do=delete'))->deletePost(); $this->on($this->request->is('do=mark'))->markPost(); $this->on($this->request->is('do=deleteDraft'))->deletePostDraft(); @@ -957,83 +362,10 @@ class Edit extends Contents implements ActionInterface } /** - * 将tags取出 - * - * @return array - * @throws DbException + * @return string */ - protected function ___tags(): array + protected function getThemeFieldsHook(): string { - if ($this->have()) { - return $this->db->fetchAll($this->db - ->select()->from('table.metas') - ->join('table.relationships', 'table.relationships.mid = table.metas.mid') - ->where('table.relationships.cid = ?', $this->cid) - ->where('table.metas.type = ?', 'tag'), [Metas::alloc(), 'filter']); - } - - return []; - } - - /** - * 获取当前时间 - * - * @return TypechoDate - */ - protected function ___date(): TypechoDate - { - return new TypechoDate(); - } - - /** - * 当前文章的草稿 - * - * @return array|null - * @throws DbException - */ - protected function ___draft(): ?array - { - if ($this->have()) { - if ('post_draft' == $this->type || 'page_draft' == $this->type) { - return $this->row; - } else { - return $this->db->fetchRow(Contents::alloc()->select() - ->where( - 'table.contents.parent = ? AND (table.contents.type = ? OR table.contents.type = ?)', - $this->cid, - 'post_draft', - 'page_draft' - ) - ->limit(1), [Contents::alloc(), 'filter']); - } - } - - return null; - } - - /** - * @param array $contents - * @return void - */ - private function checkStatus(array &$contents) - { - if ($this->user->pass('editor', true)) { - if (empty($contents['visibility'])) { - $contents['status'] = 'publish'; - } elseif ( - !in_array($contents['visibility'], ['private', 'waiting', 'publish', 'hidden']) - ) { - if (empty($contents['password']) || 'password' != $contents['visibility']) { - $contents['password'] = ''; - } - $contents['status'] = 'publish'; - } else { - $contents['status'] = $contents['visibility']; - $contents['password'] = ''; - } - } else { - $contents['status'] = 'waiting'; - $contents['password'] = ''; - } + return 'themePostFields'; } } diff --git a/var/Widget/Contents/PrepareEditTrait.php b/var/Widget/Contents/PrepareEditTrait.php new file mode 100644 index 00000000..a03a1200 --- /dev/null +++ b/var/Widget/Contents/PrepareEditTrait.php @@ -0,0 +1,114 @@ +request->is('cid')) { + $contentTypes = [$type]; + if ($hasDraft) { + $contentTypes[] = $type . '_draft'; + } + + $this->db->fetchRow($this->select() + ->where('table.contents.type IN ?', $contentTypes) + ->where('table.contents.cid = ?', $this->request->filter('int')->get('cid')) + ->limit(1), [$this, 'push']); + + if (!$this->have()) { + throw new Exception($notFoundMessage, 404); + } + + if ($hasDraft) { + if ($type . '_draft' === $this->type && $this->parent) { + $this->response->redirect( + Common::url('write-' . $type . '.php?cid=' . $this->parent, $this->options->adminUrl) + ); + } + + $draft = $this->type === $type . '_draft' ? $this->row : $this->db->fetchRow($this->select() + ->where('table.contents.parent = ? AND table.contents.type = ?', $this->cid, $type . '_draft') + ->limit(1), [$this, 'filter']); + + if (isset($draft)) { + $draft['slug'] = ltrim($draft['slug'], '@'); + $draft['type'] = $type; + $draft['draft'] = $draft; + $draft['cid'] = $this->cid; + $draft['tags'] = $this->db->fetchAll($this->db + ->select()->from('table.metas') + ->join('table.relationships', 'table.relationships.mid = table.metas.mid') + ->where('table.relationships.cid = ?', $draft['cid']) + ->where('table.metas.type = ?', 'tag'), [Metas::alloc(), 'filter']); + + $this->row = $draft; + } + } + + if (!$this->allow('edit')) { + throw new Exception(_t('没有编辑权限'), 403); + } + } + + return $this; + } + + /** + * @return $this + */ + abstract public function prepare(): self; + + /** + * 获取网页标题 + * + * @return string + */ + public function getMenuTitle(): string + { + return _t('编辑 %s', $this->prepare()->title); + } + + + /** + * 获取权限 + * + * @param mixed ...$permissions + * @return bool + * @throws Exception|DbException + */ + public function allow(...$permissions): bool + { + $allow = true; + + foreach ($permissions as $permission) { + $permission = strtolower($permission); + + if ('edit' == $permission) { + $allow &= ($this->user->pass('editor', true) || $this->authorId == $this->user->uid); + } else { + $permission = 'allow' . ucfirst(strtolower($permission)); + $optionPermission = 'default' . ucfirst($permission); + $allow &= ($this->{$permission} ?? $this->options->{$optionPermission}); + } + } + + return $allow; + } +} diff --git a/var/Widget/Metas/Category/Edit.php b/var/Widget/Metas/Category/Edit.php index c3a0d700..565d181f 100644 --- a/var/Widget/Metas/Category/Edit.php +++ b/var/Widget/Metas/Category/Edit.php @@ -47,7 +47,7 @@ class Edit extends Metas implements ActionInterface ->where('type = ?', 'category') ->where('mid = ?', $mid)->limit(1)); - return (bool)$category; + return isset($category); } /** diff --git a/var/Widget/Metas/Tag/Edit.php b/var/Widget/Metas/Tag/Edit.php index 0f5f5a93..01b9a11b 100644 --- a/var/Widget/Metas/Tag/Edit.php +++ b/var/Widget/Metas/Tag/Edit.php @@ -47,7 +47,7 @@ class Edit extends Metas implements ActionInterface ->where('type = ?', 'tag') ->where('mid = ?', $mid)->limit(1)); - return (bool)$tag; + return isset($tag); } /**