@valaxyjs/devtools 0.22.6 → 0.22.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { ay as h, C as openBlock, D as createElementBlock, F as renderSlot, ac as normalizeStyle } from './index-DILDCLLM.js';
1
+ import { ay as h, C as createElementBlock, D as openBlock, F as renderSlot, ac as normalizeStyle } from './index-DQQdpzcV.js';
2
2
 
3
3
  function bind(fn, thisArg) {
4
4
  return function wrap() {
@@ -778,7 +778,7 @@ const utils$1 = {
778
778
  *
779
779
  * @returns {Error} The created error.
780
780
  */
781
- function AxiosError(message, code, config, request, response) {
781
+ function AxiosError$1(message, code, config, request, response) {
782
782
  Error.call(this);
783
783
 
784
784
  if (Error.captureStackTrace) {
@@ -798,7 +798,7 @@ function AxiosError(message, code, config, request, response) {
798
798
  }
799
799
  }
800
800
 
801
- utils$1.inherits(AxiosError, Error, {
801
+ utils$1.inherits(AxiosError$1, Error, {
802
802
  toJSON: function toJSON() {
803
803
  return {
804
804
  // Standard
@@ -820,7 +820,7 @@ utils$1.inherits(AxiosError, Error, {
820
820
  }
821
821
  });
822
822
 
823
- const prototype$1 = AxiosError.prototype;
823
+ const prototype$1 = AxiosError$1.prototype;
824
824
  const descriptors = {};
825
825
 
826
826
  [
@@ -841,11 +841,11 @@ const descriptors = {};
841
841
  descriptors[code] = {value: code};
842
842
  });
843
843
 
844
- Object.defineProperties(AxiosError, descriptors);
844
+ Object.defineProperties(AxiosError$1, descriptors);
845
845
  Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
846
846
 
847
847
  // eslint-disable-next-line func-names
848
- AxiosError.from = (error, code, config, request, response, customProps) => {
848
+ AxiosError$1.from = (error, code, config, request, response, customProps) => {
849
849
  const axiosError = Object.create(prototype$1);
850
850
 
851
851
  utils$1.toFlatObject(error, axiosError, function filter(obj) {
@@ -854,7 +854,7 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
854
854
  return prop !== 'isAxiosError';
855
855
  });
856
856
 
857
- AxiosError.call(axiosError, error.message, code, config, request, response);
857
+ AxiosError$1.call(axiosError, error.message, code, config, request, response);
858
858
 
859
859
  axiosError.cause = error;
860
860
 
@@ -950,7 +950,7 @@ const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop)
950
950
  *
951
951
  * @returns
952
952
  */
953
- function toFormData(obj, formData, options) {
953
+ function toFormData$1(obj, formData, options) {
954
954
  if (!utils$1.isObject(obj)) {
955
955
  throw new TypeError('target must be an object');
956
956
  }
@@ -988,7 +988,7 @@ function toFormData(obj, formData, options) {
988
988
  }
989
989
 
990
990
  if (!useBlob && utils$1.isBlob(value)) {
991
- throw new AxiosError('Blob is not supported. Use a Buffer instead.');
991
+ throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
992
992
  }
993
993
 
994
994
  if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
@@ -1119,7 +1119,7 @@ function encode$1(str) {
1119
1119
  function AxiosURLSearchParams(params, options) {
1120
1120
  this._pairs = [];
1121
1121
 
1122
- params && toFormData(params, this, options);
1122
+ params && toFormData$1(params, this, options);
1123
1123
  }
1124
1124
 
1125
1125
  const prototype = AxiosURLSearchParams.prototype;
@@ -1370,7 +1370,7 @@ const platform = {
1370
1370
  /* Injected with object hook! */
1371
1371
 
1372
1372
  function toURLEncodedForm(data, options) {
1373
- return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
1373
+ return toFormData$1(data, new platform.classes.URLSearchParams(), Object.assign({
1374
1374
  visitor: function(value, key, path, helpers) {
1375
1375
  if (platform.isNode && utils$1.isBuffer(value)) {
1376
1376
  this.append(key, value.toString('base64'));
@@ -1498,7 +1498,7 @@ function stringifySafely(rawValue, parser, encoder) {
1498
1498
  }
1499
1499
  }
1500
1500
 
1501
- return (0, JSON.stringify)(rawValue);
1501
+ return (encoder || JSON.stringify)(rawValue);
1502
1502
  }
1503
1503
 
1504
1504
  const defaults = {
@@ -1549,7 +1549,7 @@ const defaults = {
1549
1549
  if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
1550
1550
  const _FormData = this.env && this.env.FormData;
1551
1551
 
1552
- return toFormData(
1552
+ return toFormData$1(
1553
1553
  isFileList ? {'files[]': data} : data,
1554
1554
  _FormData && new _FormData(),
1555
1555
  this.formSerializer
@@ -1583,7 +1583,7 @@ const defaults = {
1583
1583
  } catch (e) {
1584
1584
  if (strictJSONParsing) {
1585
1585
  if (e.name === 'SyntaxError') {
1586
- throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
1586
+ throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
1587
1587
  }
1588
1588
  throw e;
1589
1589
  }
@@ -1750,7 +1750,7 @@ function buildAccessors(obj, header) {
1750
1750
  });
1751
1751
  }
1752
1752
 
1753
- class AxiosHeaders {
1753
+ let AxiosHeaders$1 = class AxiosHeaders {
1754
1754
  constructor(headers) {
1755
1755
  headers && this.set(headers);
1756
1756
  }
@@ -1961,12 +1961,12 @@ class AxiosHeaders {
1961
1961
 
1962
1962
  return this;
1963
1963
  }
1964
- }
1964
+ };
1965
1965
 
1966
- AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
1966
+ AxiosHeaders$1.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
1967
1967
 
1968
1968
  // reserved names hotfix
1969
- utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
1969
+ utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({value}, key) => {
1970
1970
  let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
1971
1971
  return {
1972
1972
  get: () => value,
@@ -1976,7 +1976,7 @@ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
1976
1976
  }
1977
1977
  });
1978
1978
 
1979
- utils$1.freezeMethods(AxiosHeaders);
1979
+ utils$1.freezeMethods(AxiosHeaders$1);
1980
1980
 
1981
1981
  /* Injected with object hook! */
1982
1982
 
@@ -1991,7 +1991,7 @@ utils$1.freezeMethods(AxiosHeaders);
1991
1991
  function transformData(fns, response) {
1992
1992
  const config = this || defaults;
1993
1993
  const context = response || config;
1994
- const headers = AxiosHeaders.from(context.headers);
1994
+ const headers = AxiosHeaders$1.from(context.headers);
1995
1995
  let data = context.data;
1996
1996
 
1997
1997
  utils$1.forEach(fns, function transform(fn) {
@@ -2005,7 +2005,7 @@ function transformData(fns, response) {
2005
2005
 
2006
2006
  /* Injected with object hook! */
2007
2007
 
2008
- function isCancel(value) {
2008
+ function isCancel$1(value) {
2009
2009
  return !!(value && value.__CANCEL__);
2010
2010
  }
2011
2011
 
@@ -2020,13 +2020,13 @@ function isCancel(value) {
2020
2020
  *
2021
2021
  * @returns {CanceledError} The created error.
2022
2022
  */
2023
- function CanceledError(message, config, request) {
2023
+ function CanceledError$1(message, config, request) {
2024
2024
  // eslint-disable-next-line no-eq-null,eqeqeq
2025
- AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
2025
+ AxiosError$1.call(this, message == null ? 'canceled' : message, AxiosError$1.ERR_CANCELED, config, request);
2026
2026
  this.name = 'CanceledError';
2027
2027
  }
2028
2028
 
2029
- utils$1.inherits(CanceledError, AxiosError, {
2029
+ utils$1.inherits(CanceledError$1, AxiosError$1, {
2030
2030
  __CANCEL__: true
2031
2031
  });
2032
2032
 
@@ -2046,9 +2046,9 @@ function settle(resolve, reject, response) {
2046
2046
  if (!response.status || !validateStatus || validateStatus(response.status)) {
2047
2047
  resolve(response);
2048
2048
  } else {
2049
- reject(new AxiosError(
2049
+ reject(new AxiosError$1(
2050
2050
  'Request failed with status code ' + response.status,
2051
- [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
2051
+ [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
2052
2052
  response.config,
2053
2053
  response.request,
2054
2054
  response
@@ -2315,7 +2315,7 @@ function buildFullPath(baseURL, requestedURL) {
2315
2315
 
2316
2316
  /* Injected with object hook! */
2317
2317
 
2318
- const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
2318
+ const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
2319
2319
 
2320
2320
  /**
2321
2321
  * Config-specific merge-function which creates a new config-object
@@ -2326,7 +2326,7 @@ const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing }
2326
2326
  *
2327
2327
  * @returns {Object} New object resulting from merging config2 to config1
2328
2328
  */
2329
- function mergeConfig(config1, config2) {
2329
+ function mergeConfig$1(config1, config2) {
2330
2330
  // eslint-disable-next-line no-param-reassign
2331
2331
  config2 = config2 || {};
2332
2332
  const config = {};
@@ -2420,11 +2420,11 @@ function mergeConfig(config1, config2) {
2420
2420
  /* Injected with object hook! */
2421
2421
 
2422
2422
  const resolveConfig = (config) => {
2423
- const newConfig = mergeConfig({}, config);
2423
+ const newConfig = mergeConfig$1({}, config);
2424
2424
 
2425
2425
  let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
2426
2426
 
2427
- newConfig.headers = headers = AxiosHeaders.from(headers);
2427
+ newConfig.headers = headers = AxiosHeaders$1.from(headers);
2428
2428
 
2429
2429
  newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
2430
2430
 
@@ -2476,7 +2476,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2476
2476
  return new Promise(function dispatchXhrRequest(resolve, reject) {
2477
2477
  const _config = resolveConfig(config);
2478
2478
  let requestData = _config.data;
2479
- const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
2479
+ const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
2480
2480
  let {responseType, onUploadProgress, onDownloadProgress} = _config;
2481
2481
  let onCanceled;
2482
2482
  let uploadThrottled, downloadThrottled;
@@ -2503,7 +2503,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2503
2503
  return;
2504
2504
  }
2505
2505
  // Prepare the response
2506
- const responseHeaders = AxiosHeaders.from(
2506
+ const responseHeaders = AxiosHeaders$1.from(
2507
2507
  'getAllResponseHeaders' in request && request.getAllResponseHeaders()
2508
2508
  );
2509
2509
  const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
@@ -2558,7 +2558,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2558
2558
  return;
2559
2559
  }
2560
2560
 
2561
- reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
2561
+ reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
2562
2562
 
2563
2563
  // Clean up request
2564
2564
  request = null;
@@ -2568,7 +2568,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2568
2568
  request.onerror = function handleError() {
2569
2569
  // Real errors are hidden from us by the browser
2570
2570
  // onerror should only fire if it's a network error
2571
- reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));
2571
+ reject(new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request));
2572
2572
 
2573
2573
  // Clean up request
2574
2574
  request = null;
@@ -2581,9 +2581,9 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2581
2581
  if (_config.timeoutErrorMessage) {
2582
2582
  timeoutErrorMessage = _config.timeoutErrorMessage;
2583
2583
  }
2584
- reject(new AxiosError(
2584
+ reject(new AxiosError$1(
2585
2585
  timeoutErrorMessage,
2586
- transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
2586
+ transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
2587
2587
  config,
2588
2588
  request));
2589
2589
 
@@ -2633,7 +2633,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2633
2633
  if (!request) {
2634
2634
  return;
2635
2635
  }
2636
- reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
2636
+ reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
2637
2637
  request.abort();
2638
2638
  request = null;
2639
2639
  };
@@ -2647,7 +2647,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2647
2647
  const protocol = parseProtocol(_config.url);
2648
2648
 
2649
2649
  if (protocol && platform.protocols.indexOf(protocol) === -1) {
2650
- reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
2650
+ reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config));
2651
2651
  return;
2652
2652
  }
2653
2653
 
@@ -2672,13 +2672,13 @@ const composeSignals = (signals, timeout) => {
2672
2672
  aborted = true;
2673
2673
  unsubscribe();
2674
2674
  const err = reason instanceof Error ? reason : this.reason;
2675
- controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
2675
+ controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
2676
2676
  }
2677
2677
  };
2678
2678
 
2679
2679
  let timer = timeout && setTimeout(() => {
2680
2680
  timer = null;
2681
- onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
2681
+ onabort(new AxiosError$1(`timeout ${timeout} of ms exceeded`, AxiosError$1.ETIMEDOUT));
2682
2682
  }, timeout);
2683
2683
 
2684
2684
  const unsubscribe = () => {
@@ -2839,7 +2839,7 @@ isFetchSupported && (((res) => {
2839
2839
  ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
2840
2840
  !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
2841
2841
  (_, config) => {
2842
- throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
2842
+ throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
2843
2843
  });
2844
2844
  });
2845
2845
  })(new Response));
@@ -2988,7 +2988,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
2988
2988
  return await new Promise((resolve, reject) => {
2989
2989
  settle(resolve, reject, {
2990
2990
  data: responseData,
2991
- headers: AxiosHeaders.from(response.headers),
2991
+ headers: AxiosHeaders$1.from(response.headers),
2992
2992
  status: response.status,
2993
2993
  statusText: response.statusText,
2994
2994
  config,
@@ -3000,14 +3000,14 @@ const fetchAdapter = isFetchSupported && (async (config) => {
3000
3000
 
3001
3001
  if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
3002
3002
  throw Object.assign(
3003
- new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
3003
+ new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
3004
3004
  {
3005
3005
  cause: err.cause || err
3006
3006
  }
3007
3007
  )
3008
3008
  }
3009
3009
 
3010
- throw AxiosError.from(err, err && err.code, config, request);
3010
+ throw AxiosError$1.from(err, err && err.code, config, request);
3011
3011
  }
3012
3012
  });
3013
3013
 
@@ -3056,7 +3056,7 @@ const adapters = {
3056
3056
  adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
3057
3057
 
3058
3058
  if (adapter === undefined) {
3059
- throw new AxiosError(`Unknown adapter '${id}'`);
3059
+ throw new AxiosError$1(`Unknown adapter '${id}'`);
3060
3060
  }
3061
3061
  }
3062
3062
 
@@ -3078,7 +3078,7 @@ const adapters = {
3078
3078
  (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
3079
3079
  'as no adapter specified';
3080
3080
 
3081
- throw new AxiosError(
3081
+ throw new AxiosError$1(
3082
3082
  `There is no suitable adapter to dispatch the request ` + s,
3083
3083
  'ERR_NOT_SUPPORT'
3084
3084
  );
@@ -3104,7 +3104,7 @@ function throwIfCancellationRequested(config) {
3104
3104
  }
3105
3105
 
3106
3106
  if (config.signal && config.signal.aborted) {
3107
- throw new CanceledError(null, config);
3107
+ throw new CanceledError$1(null, config);
3108
3108
  }
3109
3109
  }
3110
3110
 
@@ -3118,7 +3118,7 @@ function throwIfCancellationRequested(config) {
3118
3118
  function dispatchRequest(config) {
3119
3119
  throwIfCancellationRequested(config);
3120
3120
 
3121
- config.headers = AxiosHeaders.from(config.headers);
3121
+ config.headers = AxiosHeaders$1.from(config.headers);
3122
3122
 
3123
3123
  // Transform request data
3124
3124
  config.data = transformData.call(
@@ -3142,11 +3142,11 @@ function dispatchRequest(config) {
3142
3142
  response
3143
3143
  );
3144
3144
 
3145
- response.headers = AxiosHeaders.from(response.headers);
3145
+ response.headers = AxiosHeaders$1.from(response.headers);
3146
3146
 
3147
3147
  return response;
3148
3148
  }, function onAdapterRejection(reason) {
3149
- if (!isCancel(reason)) {
3149
+ if (!isCancel$1(reason)) {
3150
3150
  throwIfCancellationRequested(config);
3151
3151
 
3152
3152
  // Transform response data
@@ -3156,7 +3156,7 @@ function dispatchRequest(config) {
3156
3156
  config.transformResponse,
3157
3157
  reason.response
3158
3158
  );
3159
- reason.response.headers = AxiosHeaders.from(reason.response.headers);
3159
+ reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
3160
3160
  }
3161
3161
  }
3162
3162
 
@@ -3166,7 +3166,7 @@ function dispatchRequest(config) {
3166
3166
 
3167
3167
  /* Injected with object hook! */
3168
3168
 
3169
- const VERSION = "1.7.9";
3169
+ const VERSION$1 = "1.7.9";
3170
3170
  /* Injected with object hook! */
3171
3171
 
3172
3172
  const validators$1 = {};
@@ -3191,15 +3191,15 @@ const deprecatedWarnings = {};
3191
3191
  */
3192
3192
  validators$1.transitional = function transitional(validator, version, message) {
3193
3193
  function formatMessage(opt, desc) {
3194
- return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
3194
+ return '[Axios v' + VERSION$1 + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
3195
3195
  }
3196
3196
 
3197
3197
  // eslint-disable-next-line func-names
3198
3198
  return (value, opt, opts) => {
3199
3199
  if (validator === false) {
3200
- throw new AxiosError(
3200
+ throw new AxiosError$1(
3201
3201
  formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
3202
- AxiosError.ERR_DEPRECATED
3202
+ AxiosError$1.ERR_DEPRECATED
3203
3203
  );
3204
3204
  }
3205
3205
 
@@ -3238,7 +3238,7 @@ validators$1.spelling = function spelling(correctSpelling) {
3238
3238
 
3239
3239
  function assertOptions(options, schema, allowUnknown) {
3240
3240
  if (typeof options !== 'object') {
3241
- throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
3241
+ throw new AxiosError$1('options must be an object', AxiosError$1.ERR_BAD_OPTION_VALUE);
3242
3242
  }
3243
3243
  const keys = Object.keys(options);
3244
3244
  let i = keys.length;
@@ -3249,12 +3249,12 @@ function assertOptions(options, schema, allowUnknown) {
3249
3249
  const value = options[opt];
3250
3250
  const result = value === undefined || validator(value, opt, options);
3251
3251
  if (result !== true) {
3252
- throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
3252
+ throw new AxiosError$1('option ' + opt + ' must be ' + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
3253
3253
  }
3254
3254
  continue;
3255
3255
  }
3256
3256
  if (allowUnknown !== true) {
3257
- throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
3257
+ throw new AxiosError$1('Unknown option ' + opt, AxiosError$1.ERR_BAD_OPTION);
3258
3258
  }
3259
3259
  }
3260
3260
  }
@@ -3275,7 +3275,7 @@ const validators = validator.validators;
3275
3275
  *
3276
3276
  * @return {Axios} A new instance of Axios
3277
3277
  */
3278
- class Axios {
3278
+ let Axios$1 = class Axios {
3279
3279
  constructor(instanceConfig) {
3280
3280
  this.defaults = instanceConfig;
3281
3281
  this.interceptors = {
@@ -3329,7 +3329,7 @@ class Axios {
3329
3329
  config = configOrUrl || {};
3330
3330
  }
3331
3331
 
3332
- config = mergeConfig(this.defaults, config);
3332
+ config = mergeConfig$1(this.defaults, config);
3333
3333
 
3334
3334
  const {transitional, paramsSerializer, headers} = config;
3335
3335
 
@@ -3375,7 +3375,7 @@ class Axios {
3375
3375
  }
3376
3376
  );
3377
3377
 
3378
- config.headers = AxiosHeaders.concat(contextHeaders, headers);
3378
+ config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
3379
3379
 
3380
3380
  // filter out skipped interceptors
3381
3381
  const requestInterceptorChain = [];
@@ -3448,17 +3448,17 @@ class Axios {
3448
3448
  }
3449
3449
 
3450
3450
  getUri(config) {
3451
- config = mergeConfig(this.defaults, config);
3451
+ config = mergeConfig$1(this.defaults, config);
3452
3452
  const fullPath = buildFullPath(config.baseURL, config.url);
3453
3453
  return buildURL(fullPath, config.params, config.paramsSerializer);
3454
3454
  }
3455
- }
3455
+ };
3456
3456
 
3457
3457
  // Provide aliases for supported request methods
3458
3458
  utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
3459
3459
  /*eslint func-names:0*/
3460
- Axios.prototype[method] = function(url, config) {
3461
- return this.request(mergeConfig(config || {}, {
3460
+ Axios$1.prototype[method] = function(url, config) {
3461
+ return this.request(mergeConfig$1(config || {}, {
3462
3462
  method,
3463
3463
  url,
3464
3464
  data: (config || {}).data
@@ -3471,7 +3471,7 @@ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method)
3471
3471
 
3472
3472
  function generateHTTPMethod(isForm) {
3473
3473
  return function httpMethod(url, data, config) {
3474
- return this.request(mergeConfig(config || {}, {
3474
+ return this.request(mergeConfig$1(config || {}, {
3475
3475
  method,
3476
3476
  headers: isForm ? {
3477
3477
  'Content-Type': 'multipart/form-data'
@@ -3482,9 +3482,9 @@ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method)
3482
3482
  };
3483
3483
  }
3484
3484
 
3485
- Axios.prototype[method] = generateHTTPMethod();
3485
+ Axios$1.prototype[method] = generateHTTPMethod();
3486
3486
 
3487
- Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
3487
+ Axios$1.prototype[method + 'Form'] = generateHTTPMethod(true);
3488
3488
  });
3489
3489
 
3490
3490
  /* Injected with object hook! */
@@ -3496,7 +3496,7 @@ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method)
3496
3496
  *
3497
3497
  * @returns {CancelToken}
3498
3498
  */
3499
- class CancelToken {
3499
+ let CancelToken$1 = class CancelToken {
3500
3500
  constructor(executor) {
3501
3501
  if (typeof executor !== 'function') {
3502
3502
  throw new TypeError('executor must be a function.');
@@ -3544,7 +3544,7 @@ class CancelToken {
3544
3544
  return;
3545
3545
  }
3546
3546
 
3547
- token.reason = new CanceledError(message, config, request);
3547
+ token.reason = new CanceledError$1(message, config, request);
3548
3548
  resolvePromise(token.reason);
3549
3549
  });
3550
3550
  }
@@ -3617,7 +3617,7 @@ class CancelToken {
3617
3617
  cancel
3618
3618
  };
3619
3619
  }
3620
- }
3620
+ };
3621
3621
 
3622
3622
  /* Injected with object hook! */
3623
3623
 
@@ -3642,7 +3642,7 @@ class CancelToken {
3642
3642
  *
3643
3643
  * @returns {Function}
3644
3644
  */
3645
- function spread(callback) {
3645
+ function spread$1(callback) {
3646
3646
  return function wrap(arr) {
3647
3647
  return callback.apply(null, arr);
3648
3648
  };
@@ -3657,13 +3657,13 @@ function spread(callback) {
3657
3657
  *
3658
3658
  * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
3659
3659
  */
3660
- function isAxiosError(payload) {
3660
+ function isAxiosError$1(payload) {
3661
3661
  return utils$1.isObject(payload) && (payload.isAxiosError === true);
3662
3662
  }
3663
3663
 
3664
3664
  /* Injected with object hook! */
3665
3665
 
3666
- const HttpStatusCode = {
3666
+ const HttpStatusCode$1 = {
3667
3667
  Continue: 100,
3668
3668
  SwitchingProtocols: 101,
3669
3669
  Processing: 102,
@@ -3729,8 +3729,8 @@ const HttpStatusCode = {
3729
3729
  NetworkAuthenticationRequired: 511,
3730
3730
  };
3731
3731
 
3732
- Object.entries(HttpStatusCode).forEach(([key, value]) => {
3733
- HttpStatusCode[value] = key;
3732
+ Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
3733
+ HttpStatusCode$1[value] = key;
3734
3734
  });
3735
3735
 
3736
3736
  /* Injected with object hook! */
@@ -3743,18 +3743,18 @@ Object.entries(HttpStatusCode).forEach(([key, value]) => {
3743
3743
  * @returns {Axios} A new instance of Axios
3744
3744
  */
3745
3745
  function createInstance(defaultConfig) {
3746
- const context = new Axios(defaultConfig);
3747
- const instance = bind(Axios.prototype.request, context);
3746
+ const context = new Axios$1(defaultConfig);
3747
+ const instance = bind(Axios$1.prototype.request, context);
3748
3748
 
3749
3749
  // Copy axios.prototype to instance
3750
- utils$1.extend(instance, Axios.prototype, context, {allOwnKeys: true});
3750
+ utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
3751
3751
 
3752
3752
  // Copy context to instance
3753
3753
  utils$1.extend(instance, context, null, {allOwnKeys: true});
3754
3754
 
3755
3755
  // Factory for creating new instances
3756
3756
  instance.create = function create(instanceConfig) {
3757
- return createInstance(mergeConfig(defaultConfig, instanceConfig));
3757
+ return createInstance(mergeConfig$1(defaultConfig, instanceConfig));
3758
3758
  };
3759
3759
 
3760
3760
  return instance;
@@ -3764,17 +3764,17 @@ function createInstance(defaultConfig) {
3764
3764
  const axios = createInstance(defaults);
3765
3765
 
3766
3766
  // Expose Axios class to allow class inheritance
3767
- axios.Axios = Axios;
3767
+ axios.Axios = Axios$1;
3768
3768
 
3769
3769
  // Expose Cancel & CancelToken
3770
- axios.CanceledError = CanceledError;
3771
- axios.CancelToken = CancelToken;
3772
- axios.isCancel = isCancel;
3773
- axios.VERSION = VERSION;
3774
- axios.toFormData = toFormData;
3770
+ axios.CanceledError = CanceledError$1;
3771
+ axios.CancelToken = CancelToken$1;
3772
+ axios.isCancel = isCancel$1;
3773
+ axios.VERSION = VERSION$1;
3774
+ axios.toFormData = toFormData$1;
3775
3775
 
3776
3776
  // Expose AxiosError class
3777
- axios.AxiosError = AxiosError;
3777
+ axios.AxiosError = AxiosError$1;
3778
3778
 
3779
3779
  // alias for CanceledError for backward compatibility
3780
3780
  axios.Cancel = axios.CanceledError;
@@ -3784,34 +3784,60 @@ axios.all = function all(promises) {
3784
3784
  return Promise.all(promises);
3785
3785
  };
3786
3786
 
3787
- axios.spread = spread;
3787
+ axios.spread = spread$1;
3788
3788
 
3789
3789
  // Expose isAxiosError
3790
- axios.isAxiosError = isAxiosError;
3790
+ axios.isAxiosError = isAxiosError$1;
3791
3791
 
3792
3792
  // Expose mergeConfig
3793
- axios.mergeConfig = mergeConfig;
3793
+ axios.mergeConfig = mergeConfig$1;
3794
3794
 
3795
- axios.AxiosHeaders = AxiosHeaders;
3795
+ axios.AxiosHeaders = AxiosHeaders$1;
3796
3796
 
3797
3797
  axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
3798
3798
 
3799
3799
  axios.getAdapter = adapters.getAdapter;
3800
3800
 
3801
- axios.HttpStatusCode = HttpStatusCode;
3801
+ axios.HttpStatusCode = HttpStatusCode$1;
3802
3802
 
3803
3803
  axios.default = axios;
3804
3804
 
3805
3805
  /* Injected with object hook! */
3806
3806
 
3807
+ // This module is intended to unwrap Axios default export as named.
3808
+ // Keep top-level export same with static properties
3809
+ // so that it can keep same with es module or cjs
3810
+ const {
3811
+ Axios,
3812
+ AxiosError,
3813
+ CanceledError,
3814
+ isCancel,
3815
+ CancelToken,
3816
+ VERSION,
3817
+ all,
3818
+ Cancel,
3819
+ isAxiosError,
3820
+ spread,
3821
+ toFormData,
3822
+ AxiosHeaders,
3823
+ HttpStatusCode,
3824
+ formToJSON,
3825
+ getAdapter,
3826
+ mergeConfig
3827
+ } = axios;
3828
+
3829
+ /* Injected with object hook! */
3830
+
3807
3831
  const M = {
3832
+ // eslint-disable-next-line vue/multi-word-component-names
3808
3833
  name: "splitpanes",
3809
3834
  emits: ["ready", "resize", "resized", "pane-click", "pane-maximize", "pane-add", "pane-remove", "splitter-click"],
3810
3835
  props: {
3811
3836
  horizontal: { type: Boolean },
3812
- pushOtherPanes: { type: Boolean, default: !0 },
3813
- dblClickSplitter: { type: Boolean, default: !0 },
3814
- rtl: { type: Boolean, default: !1 },
3837
+ pushOtherPanes: { type: Boolean, default: true },
3838
+ dblClickSplitter: { type: Boolean, default: true },
3839
+ rtl: { type: Boolean, default: false },
3840
+ // Right to left direction.
3815
3841
  firstSplitter: { type: Boolean }
3816
3842
  },
3817
3843
  provide() {
@@ -3824,14 +3850,15 @@ const M = {
3824
3850
  },
3825
3851
  data: () => ({
3826
3852
  container: null,
3827
- ready: !1,
3853
+ ready: false,
3828
3854
  panes: [],
3829
3855
  touch: {
3830
- mouseDown: !1,
3831
- dragging: !1,
3856
+ mouseDown: false,
3857
+ dragging: false,
3832
3858
  activeSplitter: null
3833
3859
  },
3834
3860
  splitterTaps: {
3861
+ // Used to detect double click on touch devices.
3835
3862
  splitter: null,
3836
3863
  timeoutId: null
3837
3864
  }
@@ -3840,6 +3867,8 @@ const M = {
3840
3867
  panesCount() {
3841
3868
  return this.panes.length;
3842
3869
  },
3870
+ // Indexed panes by `uid` of Pane components for fast lookup.
3871
+ // Every time a pane is destroyed this index is recomputed.
3843
3872
  indexedPanes() {
3844
3873
  return this.panes.reduce((e, i) => (e[i.id] = i) && e, {});
3845
3874
  }
@@ -3848,32 +3877,35 @@ const M = {
3848
3877
  updatePaneComponents() {
3849
3878
  this.panes.forEach((e) => {
3850
3879
  e.update && e.update({
3880
+ // Panes are indexed by Pane component uid, as they might be inserted at different index.
3851
3881
  [this.horizontal ? "height" : "width"]: `${this.indexedPanes[e.id].size}%`
3852
3882
  });
3853
3883
  });
3854
3884
  },
3855
3885
  bindEvents() {
3856
- document.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), document.addEventListener("mouseup", this.onMouseUp), "ontouchstart" in window && (document.addEventListener("touchmove", this.onMouseMove, { passive: !1 }), document.addEventListener("touchend", this.onMouseUp));
3886
+ document.addEventListener("mousemove", this.onMouseMove, { passive: false }), document.addEventListener("mouseup", this.onMouseUp), "ontouchstart" in window && (document.addEventListener("touchmove", this.onMouseMove, { passive: false }), document.addEventListener("touchend", this.onMouseUp));
3857
3887
  },
3858
3888
  unbindEvents() {
3859
- document.removeEventListener("mousemove", this.onMouseMove, { passive: !1 }), document.removeEventListener("mouseup", this.onMouseUp), "ontouchstart" in window && (document.removeEventListener("touchmove", this.onMouseMove, { passive: !1 }), document.removeEventListener("touchend", this.onMouseUp));
3889
+ document.removeEventListener("mousemove", this.onMouseMove, { passive: false }), document.removeEventListener("mouseup", this.onMouseUp), "ontouchstart" in window && (document.removeEventListener("touchmove", this.onMouseMove, { passive: false }), document.removeEventListener("touchend", this.onMouseUp));
3860
3890
  },
3861
3891
  onMouseDown(e, i) {
3862
- this.bindEvents(), this.touch.mouseDown = !0, this.touch.activeSplitter = i;
3892
+ this.bindEvents(), this.touch.mouseDown = true, this.touch.activeSplitter = i;
3863
3893
  },
3864
3894
  onMouseMove(e) {
3865
- this.touch.mouseDown && (e.preventDefault(), this.touch.dragging = !0, this.calculatePanesSize(this.getCurrentMouseDrag(e)), this.$emit("resize", this.panes.map((i) => ({ min: i.min, max: i.max, size: i.size }))));
3895
+ this.touch.mouseDown && (e.preventDefault(), this.touch.dragging = true, this.calculatePanesSize(this.getCurrentMouseDrag(e)), this.$emit("resize", this.panes.map((i) => ({ min: i.min, max: i.max, size: i.size }))));
3866
3896
  },
3867
3897
  onMouseUp() {
3868
- this.touch.dragging && this.$emit("resized", this.panes.map((e) => ({ min: e.min, max: e.max, size: e.size }))), this.touch.mouseDown = !1, setTimeout(() => {
3869
- this.touch.dragging = !1, this.unbindEvents();
3898
+ this.touch.dragging && this.$emit("resized", this.panes.map((e) => ({ min: e.min, max: e.max, size: e.size }))), this.touch.mouseDown = false, setTimeout(() => {
3899
+ this.touch.dragging = false, this.unbindEvents();
3870
3900
  }, 100);
3871
3901
  },
3902
+ // If touch device, detect double tap manually (2 taps separated by less than 500ms).
3872
3903
  onSplitterClick(e, i) {
3873
3904
  "ontouchstart" in window && (e.preventDefault(), this.dblClickSplitter && (this.splitterTaps.splitter === i ? (clearTimeout(this.splitterTaps.timeoutId), this.splitterTaps.timeoutId = null, this.onSplitterDblClick(e, i), this.splitterTaps.splitter = null) : (this.splitterTaps.splitter = i, this.splitterTaps.timeoutId = setTimeout(() => {
3874
3905
  this.splitterTaps.splitter = null;
3875
3906
  }, 500)))), this.touch.dragging || this.$emit("splitter-click", this.panes[i]);
3876
3907
  },
3908
+ // On splitter dbl click or dbl tap maximize this pane.
3877
3909
  onSplitterDblClick(e, i) {
3878
3910
  let s = 0;
3879
3911
  this.panes = this.panes.map((n, t) => (n.size = t === i ? n.max : n.min, t !== i && (s += n.min), n)), this.panes[i].size -= s, this.$emit("pane-maximize", this.panes[i]), this.$emit("resized", this.panes.map((n) => ({ min: n.min, max: n.max, size: n.size })));
@@ -3881,6 +3913,7 @@ const M = {
3881
3913
  onPaneClick(e, i) {
3882
3914
  this.$emit("pane-click", this.indexedPanes[i]);
3883
3915
  },
3916
+ // Get the cursor position relative to the splitpane container.
3884
3917
  getCurrentMouseDrag(e) {
3885
3918
  const i = this.container.getBoundingClientRect(), { clientX: s, clientY: n } = "ontouchstart" in window && e.touches ? e.touches[0] : e;
3886
3919
  return {
@@ -3888,6 +3921,7 @@ const M = {
3888
3921
  y: n - i.top
3889
3922
  };
3890
3923
  },
3924
+ // Returns the drag percentage of the splitter relative to the container (ranging from 0 to 100%).
3891
3925
  getCurrentDragPercentage(e) {
3892
3926
  e = e[this.horizontal ? "y" : "x"];
3893
3927
  const i = this.container[this.horizontal ? "clientHeight" : "clientWidth"];
@@ -3910,8 +3944,7 @@ const M = {
3910
3944
  }
3911
3945
  if (this.pushOtherPanes) {
3912
3946
  const d = this.doPushOtherPanes(s, a);
3913
- if (!d)
3914
- return;
3947
+ if (!d) return;
3915
3948
  (({ sums: s, panesToResize: r } = d)), o = this.panes[r[0]] || null, h = this.panes[r[1]] || null;
3916
3949
  }
3917
3950
  o !== null && (o.size = Math.min(Math.max(a - s.prevPanesSize - s.prevReachedMinPanes, o.min), o.max)), h !== null && (h.size = Math.min(Math.max(100 - a - s.nextPanesSize - s.nextReachedMinPanes, h.min), h.max));
@@ -3934,9 +3967,11 @@ const M = {
3934
3967
  sumNextPanesSize(e) {
3935
3968
  return this.panes.reduce((i, s, n) => i + (n > e + 1 ? s.size : 0), 0);
3936
3969
  },
3970
+ // Return the previous pane from siblings which has a size (width for vert or height for horz) of more than 0.
3937
3971
  findPrevExpandedPane(e) {
3938
3972
  return [...this.panes].reverse().find((s) => s.index < e && s.size > s.min) || {};
3939
3973
  },
3974
+ // Return the next pane from siblings which has a size (width for vert or height for horz) of more than 0.
3940
3975
  findNextExpandedPane(e) {
3941
3976
  return this.panes.find((s) => s.index > e + 1 && s.size > s.min) || {};
3942
3977
  },
@@ -3946,7 +3981,7 @@ const M = {
3946
3981
  !s && !n && (i.parentNode.removeChild(i), console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."));
3947
3982
  });
3948
3983
  },
3949
- addSplitter(e, i, s = !1) {
3984
+ addSplitter(e, i, s = false) {
3950
3985
  const n = e - 1, t = document.createElement("div");
3951
3986
  t.classList.add("splitpanes__splitter"), s || (t.onmousedown = (a) => this.onMouseDown(a, n), typeof window < "u" && "ontouchstart" in window && (t.ontouchstart = (a) => this.onMouseDown(a, n)), t.onclick = (a) => this.onSplitterClick(a, n + 1)), this.dblClickSplitter && (t.ondblclick = (a) => this.onSplitterDblClick(a, n + 1)), i.parentNode.insertBefore(t, i);
3952
3987
  },
@@ -3960,9 +3995,10 @@ const M = {
3960
3995
  });
3961
3996
  let i = 0;
3962
3997
  e.forEach((s) => {
3963
- s.className.includes("splitpanes__pane") && (!i && this.firstSplitter ? this.addSplitter(i, s, !0) : i && this.addSplitter(i, s), i++);
3998
+ s.className.includes("splitpanes__pane") && (!i && this.firstSplitter ? this.addSplitter(i, s, true) : i && this.addSplitter(i, s), i++);
3964
3999
  });
3965
4000
  },
4001
+ // Called by Pane component on programmatic resize.
3966
4002
  requestUpdate({ target: e, ...i }) {
3967
4003
  const s = this.indexedPanes[e._.uid];
3968
4004
  Object.entries(i).forEach(([n, t]) => s[n] = t);
@@ -4021,6 +4057,57 @@ const M = {
4021
4057
  e && e.givenSize !== null && e.id === r.id || (r.size = Math.max(Math.min(s, r.max), r.min)), n -= r.size, r.size >= r.max && t.push(r.id), r.size <= r.min && a.push(r.id);
4022
4058
  }), n > 0.1 && this.readjustSizes(n, t, a));
4023
4059
  },
4060
+ /* recalculatePaneSizes ({ addedPane, removedPane } = {}) {
4061
+ let leftToAllocate = 100
4062
+ let equalSpaceToAllocate = leftToAllocate / this.panesCount
4063
+ let ungrowable = []
4064
+ let unshrinkable = []
4065
+
4066
+ // When adding a pane with no size, apply min-size if defined otherwise divide another pane
4067
+ // (next or prev) in 2.
4068
+ // if (addedPane && addedPane.size === null) {
4069
+ // if (addedPane.min) addedPane.size = addedPane.min
4070
+ // else {
4071
+ // const paneToDivide = this.panes[addedPane.index + 1] || this.panes[addedPane.index - 1]
4072
+ // if (paneToDivide) {
4073
+ // // @todo: Dividing that pane in 2 could be incorrect if becoming lower than its min size.
4074
+ // addedPane.size = paneToDivide.size / 2
4075
+ // paneToDivide.size /= 2
4076
+ // }
4077
+ // }
4078
+ // }
4079
+
4080
+ this.panes.forEach((pane, i) => {
4081
+ // Added pane - reduce the size of the next pane.
4082
+ if (addedPane && addedPane.index + 1 === i) {
4083
+ pane.size = Math.max(Math.min(100 - this.sumPrevPanesSize(i) - this.sumNextPanesSize(i + 1), pane.max), pane.min)
4084
+ // @todo: if could not allocate correctly, try to allocate in the next pane straight away,
4085
+ // then still do the second loop if not correct.
4086
+ }
4087
+
4088
+ // Removed pane - increase the size of the next pane.
4089
+ else if (removedPane && removedPane.index === i) {
4090
+ pane.size = Math.max(Math.min(100 - this.sumPrevPanesSize(i) - this.sumNextPanesSize(i + 1), pane.max), pane.min)
4091
+ // @todo: if could not allocate correctly, try to allocate in the next pane straight away,
4092
+ // then still do the second loop if not correct.
4093
+ }
4094
+
4095
+ // Initial load and on demand recalculation.
4096
+ else if (!addedPane && !removedPane && pane.size === null) {
4097
+ pane.size = Math.max(Math.min(equalSpaceToAllocate, pane.max), pane.min)
4098
+ }
4099
+
4100
+ leftToAllocate -= pane.size
4101
+
4102
+ if (pane.size >= pane.max) ungrowable.push(pane.id)
4103
+ if (pane.size <= pane.min) unshrinkable.push(pane.id)
4104
+ })
4105
+
4106
+ // Do one more loop to adjust sizes if still wrong.
4107
+ // > 0.1: Prevent maths rounding issues due to bytes.
4108
+ if (Math.abs(leftToAllocate) > 0.1) this.readjustSizes(leftToAllocate, ungrowable, unshrinkable)
4109
+ }, */
4110
+ // Second loop to adjust sizes now that we know more about the panes constraints.
4024
4111
  readjustSizes(e, i, s) {
4025
4112
  let n;
4026
4113
  e > 0 ? n = e / (this.panesCount - i.length) : n = e / (this.panesCount - s.length), this.panes.forEach((t, a) => {
@@ -4038,11 +4125,58 @@ const M = {
4038
4125
  this.ready && console.warn("Splitpanes: Could not resize panes correctly due to their constraints.");
4039
4126
  });
4040
4127
  }
4128
+ /* distributeEmptySpace () {
4129
+ let growablePanes = []
4130
+ let collapsedPanesCount = 0
4131
+ let growableAmount = 0 // Total of how much the current panes can grow to fill blank space.
4132
+ let spaceToDistribute = 100 - this.panes.reduce((sum, pane) => (sum += pane.size) && sum, 0)
4133
+ // Do a first loop to determine if we can distribute the new blank space between all the
4134
+ // expandedPanes, without expanding the collapsed ones.
4135
+ this.panes.forEach(pane => {
4136
+ if (pane.size < pane.max) growablePanes.push(pane)
4137
+
4138
+ if (!pane.size) collapsedPanesCount++
4139
+ else growableAmount += pane.max - pane.size
4140
+ })
4141
+
4142
+ // If the blank space to distribute is too great for the expanded panes, also expand collapsed ones.
4143
+ let expandCollapsedPanes = growableAmount < spaceToDistribute
4144
+
4145
+ // New space to distribute equally.
4146
+ let growablePanesCount = (growablePanes.length - (expandCollapsedPanes ? 0 : collapsedPanesCount))
4147
+ let equalSpaceToDistribute = spaceToDistribute / growablePanesCount
4148
+ // if (growablePanesCount === 1) equalSpace = 100 / this.panesCount
4149
+ let spaceLeftToDistribute = spaceToDistribute
4150
+
4151
+ // Now add the equalSpaceToDistribute to each pane size accordingly.
4152
+ growablePanes.forEach(pane => {
4153
+ if (pane.size < pane.max && (pane.size || (!pane.size && expandCollapsedPanes))) {
4154
+ const newSize = Math.min(pane.size + equalSpaceToDistribute, pane.max)
4155
+ let allocatedSpace = (newSize - pane.size)
4156
+ spaceLeftToDistribute -= allocatedSpace
4157
+ pane.size = newSize
4158
+ // If the equalSpaceToDistribute is not fully added to the current pane, distribute the remainder
4159
+ // to the next panes.
4160
+ // Also fix decimal issue due to bites - E.g. calculating 8.33 and getting 8.3299999999999
4161
+ if (equalSpaceToDistribute - allocatedSpace > 0.1) equalSpaceToDistribute = spaceLeftToDistribute / (--growablePanesCount)
4162
+ }
4163
+ })
4164
+
4165
+ /* Disabled otherwise will show up on hot reload.
4166
+ // if there is still space to allocate show warning message.
4167
+ if (this.panesCount && ~~spaceLeftToDistribute) {
4168
+ // eslint-disable-next-line no-console
4169
+ console.warn('Splitpanes: Could not distribute all the empty space between panes due to their constraints.')
4170
+ } *\/
4171
+
4172
+ this.$emit('resized', this.panes.map(pane => ({ min: pane.min, max: pane.max, size: pane.size })))
4173
+ } */
4041
4174
  },
4042
4175
  watch: {
4043
4176
  panes: {
4044
- deep: !0,
4045
- immediate: !1,
4177
+ // Every time a pane is updated, update the panes accordingly.
4178
+ deep: true,
4179
+ immediate: false,
4046
4180
  handler() {
4047
4181
  this.updatePaneComponents();
4048
4182
  }
@@ -4060,10 +4194,10 @@ const M = {
4060
4194
  }
4061
4195
  },
4062
4196
  beforeUnmount() {
4063
- this.ready = !1;
4197
+ this.ready = false;
4064
4198
  },
4065
4199
  mounted() {
4066
- this.container = this.$refs.container, this.checkSplitpanesNodes(), this.redoSplitters(), this.resetPaneSizes(), this.$emit("ready"), this.ready = !0;
4200
+ this.container = this.$refs.container, this.checkSplitpanesNodes(), this.redoSplitters(), this.resetPaneSizes(), this.$emit("ready"), this.ready = true;
4067
4201
  },
4068
4202
  render() {
4069
4203
  return h(
@@ -4087,6 +4221,7 @@ const M = {
4087
4221
  s[n] = t;
4088
4222
  return s;
4089
4223
  }, x = {
4224
+ // eslint-disable-next-line vue/multi-word-component-names
4090
4225
  name: "pane",
4091
4226
  inject: ["requestUpdate", "onPaneAdd", "onPaneRemove", "onPaneClick"],
4092
4227
  props: {
@@ -4104,6 +4239,7 @@ const M = {
4104
4239
  this.onPaneRemove(this);
4105
4240
  },
4106
4241
  methods: {
4242
+ // Called from the splitpanes component.
4107
4243
  update(e) {
4108
4244
  this.style = e;
4109
4245
  }