@vertexvis/utils 0.10.2-canary.7 → 0.11.0

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.
@@ -120,7 +120,7 @@ var hexRegex = /^(#|0x)?([A-Fa-f0-9]{6})$/;
120
120
  * Constructs a new color with the given red, green, blue and alpha values. If
121
121
  * alpha is undefined, defaults to 1.
122
122
  */
123
- var create = function (r, g, b, a) {
123
+ var create$2 = function (r, g, b, a) {
124
124
  if (a === void 0) { a = 255; }
125
125
  return { r: r, g: g, b: b, a: a };
126
126
  };
@@ -131,7 +131,7 @@ var create = function (r, g, b, a) {
131
131
  var fromNumber = function (num) {
132
132
  // tslint:disable:no-bitwise
133
133
  var normalized = num & 0xffffff;
134
- return create((normalized >> 16) & 0xff, (normalized >> 8) & 0xff, normalized & 0xff);
134
+ return create$2((normalized >> 16) & 0xff, (normalized >> 8) & 0xff, normalized & 0xff);
135
135
  // tslint:enable:no-bitwise
136
136
  };
137
137
  /**
@@ -153,11 +153,11 @@ var fromHexString = function (str) {
153
153
  var fromCss = function (css) {
154
154
  var rgbMatch = rgbRegex.exec(css);
155
155
  if (rgbMatch != null) {
156
- return create(parseInt(rgbMatch[1]), parseInt(rgbMatch[2]), parseInt(rgbMatch[3]));
156
+ return create$2(parseInt(rgbMatch[1]), parseInt(rgbMatch[2]), parseInt(rgbMatch[3]));
157
157
  }
158
158
  var rgbaMatch = rgbaRegex.exec(css);
159
159
  if (rgbaMatch != null) {
160
- return create(parseInt(rgbaMatch[1]), parseInt(rgbaMatch[2]), parseInt(rgbaMatch[3]), Math.floor(parseFloat(rgbaMatch[4]) * 255));
160
+ return create$2(parseInt(rgbaMatch[1]), parseInt(rgbaMatch[2]), parseInt(rgbaMatch[3]), Math.floor(parseFloat(rgbaMatch[4]) * 255));
161
161
  }
162
162
  if (hexRegex.test(css)) {
163
163
  return fromHexString(css);
@@ -168,7 +168,7 @@ var fromCss = function (css) {
168
168
  * expected to be `[r, g, b]` or `[r, g, b, a]`.
169
169
  */
170
170
  var fromArray = function (rgba) {
171
- return create(rgba[0], rgba[1], rgba[2], rgba[3]);
171
+ return create$2(rgba[0], rgba[1], rgba[2], rgba[3]);
172
172
  };
173
173
  /**
174
174
  * Returns `true` if the color's alpha channel is 0.
@@ -196,7 +196,7 @@ var componentToHex = function (num) {
196
196
 
197
197
  var color = /*#__PURE__*/Object.freeze({
198
198
  __proto__: null,
199
- create: create,
199
+ create: create$2,
200
200
  fromNumber: fromNumber,
201
201
  fromHexString: fromHexString,
202
202
  fromCss: fromCss,
@@ -584,7 +584,7 @@ function isObjectObject(o) {
584
584
  && Object.prototype.toString.call(o) === '[object Object]';
585
585
  }
586
586
 
587
- function isPlainObject(o) {
587
+ function isPlainObject$1(o) {
588
588
  var ctor,prot;
589
589
 
590
590
  if (isObjectObject(o) === false) return false;
@@ -608,11 +608,8 @@ function isPlainObject(o) {
608
608
 
609
609
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
610
610
 
611
- function createCommonjsModule(fn, module) {
612
- return module = { exports: {} }, fn(module, module.exports), module.exports;
613
- }
611
+ var lodash_isequal = {exports: {}};
614
612
 
615
- var lodash_isequal = createCommonjsModule(function (module, exports) {
616
613
  /**
617
614
  * Lodash (Custom Build) <https://lodash.com/>
618
615
  * Build: `lodash modularize exports="npm" -o ./`
@@ -622,6 +619,7 @@ var lodash_isequal = createCommonjsModule(function (module, exports) {
622
619
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
623
620
  */
624
621
 
622
+ (function (module, exports) {
625
623
  /** Used as the size to enable large array optimizations. */
626
624
  var LARGE_ARRAY_SIZE = 200;
627
625
 
@@ -707,7 +705,7 @@ var freeSelf = typeof self == 'object' && self && self.Object === Object && self
707
705
  var root = freeGlobal || freeSelf || Function('return this')();
708
706
 
709
707
  /** Detect free variable `exports`. */
710
- var freeExports = exports && !exports.nodeType && exports;
708
+ var freeExports = exports && !exports.nodeType && exports;
711
709
 
712
710
  /** Detect free variable `module`. */
713
711
  var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
@@ -2461,7 +2459,9 @@ function stubFalse() {
2461
2459
  }
2462
2460
 
2463
2461
  module.exports = isEqual;
2464
- });
2462
+ }(lodash_isequal, lodash_isequal.exports));
2463
+
2464
+ var areEqual = lodash_isequal.exports;
2465
2465
 
2466
2466
  function defaults() {
2467
2467
  var objects = [];
@@ -2479,7 +2479,7 @@ function defaults() {
2479
2479
  if (result[key] == null) {
2480
2480
  result[key] = b[key];
2481
2481
  }
2482
- else if (isPlainObject$1(result[key])) {
2482
+ else if (isPlainObject(result[key])) {
2483
2483
  result[key] = defaults(result[key], b[key]);
2484
2484
  }
2485
2485
  }
@@ -2509,8 +2509,8 @@ function defaults() {
2509
2509
  * isPlainObject(Object.create(null)); //=> false
2510
2510
  * ```
2511
2511
  */
2512
- function isPlainObject$1(obj) {
2513
- return isPlainObject(obj);
2512
+ function isPlainObject(obj) {
2513
+ return isPlainObject$1(obj);
2514
2514
  }
2515
2515
  /**
2516
2516
  * Performs a deep comparison of two objects and returns `true` if they're
@@ -2526,8 +2526,8 @@ function isPlainObject$1(obj) {
2526
2526
  * @param b The object to compare with `a`.
2527
2527
  * @returns `true` if the two objects are equal. Otherwise `false`.
2528
2528
  */
2529
- function isEqual(a, b) {
2530
- return lodash_isequal(a, b);
2529
+ function isEqual$1(a, b) {
2530
+ return areEqual(a, b);
2531
2531
  }
2532
2532
  function toPairs(obj) {
2533
2533
  if (obj != null) {
@@ -2558,8 +2558,8 @@ function fromPairs(pairs) {
2558
2558
  var objects = /*#__PURE__*/Object.freeze({
2559
2559
  __proto__: null,
2560
2560
  defaults: defaults,
2561
- isPlainObject: isPlainObject$1,
2562
- isEqual: isEqual,
2561
+ isPlainObject: isPlainObject,
2562
+ isEqual: isEqual$1,
2563
2563
  toPairs: toPairs,
2564
2564
  fromPairs: fromPairs
2565
2565
  });
@@ -2821,7 +2821,7 @@ var parseAndAddParams = function (baseStr, params) {
2821
2821
  var base = parse(baseStr);
2822
2822
  return params ? addQueryParams(params, base) : base;
2823
2823
  };
2824
- var isEqual$1 = function (a, b) {
2824
+ var isEqual = function (a, b) {
2825
2825
  var queryA = JSON.stringify(sortByQueryName(queryAsArray(a)));
2826
2826
  var queryB = JSON.stringify(sortByQueryName(queryAsArray(b)));
2827
2827
  return (a.scheme === b.scheme &&
@@ -2940,7 +2940,7 @@ var uri = /*#__PURE__*/Object.freeze({
2940
2940
  __proto__: null,
2941
2941
  parse: parse,
2942
2942
  parseAndAddParams: parseAndAddParams,
2943
- isEqual: isEqual$1,
2943
+ isEqual: isEqual,
2944
2944
  replacePath: replacePath,
2945
2945
  pathAsArray: pathAsArray,
2946
2946
  appendPath: appendPath,
@@ -3100,11 +3100,11 @@ function v1(options, buf, offset) {
3100
3100
  return buf || stringify(b);
3101
3101
  }
3102
3102
 
3103
- var create$2 = function () { return v1(); };
3103
+ var create = function () { return v1(); };
3104
3104
 
3105
3105
  var uuid = /*#__PURE__*/Object.freeze({
3106
3106
  __proto__: null,
3107
- create: create$2
3107
+ create: create
3108
3108
  });
3109
3109
 
3110
3110
  var EventDispatcher = /** @class */ (function () {