@mjhls/mjh-framework 1.0.279 → 1.0.280

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.
Files changed (47) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/{ADInfeed-f560c2f9.js → ADInfeed-f0bf34d7.js} +1 -1
  3. package/dist/cjs/{AdSlot-f69a31ec.js → AdSlot-9660e9aa.js} +3 -4
  4. package/dist/cjs/DeckContent.js +10 -11
  5. package/dist/cjs/DeckQueue.js +8 -9
  6. package/dist/cjs/{Dfp-7a5533f9.js → Dfp-36d51c84.js} +3 -4
  7. package/dist/cjs/{Figure-fe3e9705.js → Figure-a7cd5161.js} +2 -2
  8. package/dist/cjs/{GridContent-8d5a738c.js → GridContent-4b4bbe7f.js} +13 -14
  9. package/dist/cjs/GridContent.js +7 -8
  10. package/dist/cjs/IssueContentDeck.js +4 -4
  11. package/dist/cjs/IssueDeck.js +5 -5
  12. package/dist/cjs/MasterDeck.js +4 -5
  13. package/dist/cjs/{Normal-7ed9eee9.js → Normal-878318e9.js} +2 -2
  14. package/dist/cjs/PublicationDeck.js +4 -4
  15. package/dist/cjs/QueueDeckExpanded.js +47 -12
  16. package/dist/cjs/{TaxonomyCard-b5074d6e.js → TaxonomyCard-cf5bbc07.js} +5 -5
  17. package/dist/cjs/TaxonomyCard.js +1 -1
  18. package/dist/cjs/TemplateNormal.js +5 -6
  19. package/dist/cjs/ThumbnailCard.js +4 -4
  20. package/dist/cjs/VideoSeriesListing.js +4 -5
  21. package/dist/cjs/{YoutubeGroup-78e6bcc3.js → YoutubeGroup-1ec66294.js} +3 -3
  22. package/dist/cjs/YoutubeGroup.js +1 -1
  23. package/dist/cjs/{index-fa3cec70.js → debounce-fbfce522.js} +483 -0
  24. package/dist/cjs/{get-1f91592f.js → get-858530c2.js} +1 -1
  25. package/dist/cjs/index.js +36 -37
  26. package/dist/cjs/{inherits-9898af5a.js → inherits-3fbaa008.js} +1 -1
  27. package/dist/cjs/{promise-b96c61f8.js → promise-ea10b9c8.js} +1 -1
  28. package/dist/esm/{ADInfeed-a77b2850.js → ADInfeed-cc019fcb.js} +1 -1
  29. package/dist/esm/{AdSlot-69bf3195.js → AdSlot-1f20130d.js} +2 -3
  30. package/dist/esm/DeckContent.js +5 -6
  31. package/dist/esm/DeckQueue.js +3 -4
  32. package/dist/esm/{Dfp-71879c9d.js → Dfp-85f00c9b.js} +1 -2
  33. package/dist/esm/{GridContent-b8b5f361.js → GridContent-1292ff20.js} +5 -6
  34. package/dist/esm/GridContent.js +7 -8
  35. package/dist/esm/MasterDeck.js +3 -4
  36. package/dist/esm/{Normal-21cfb458.js → Normal-a2c50ae2.js} +2 -2
  37. package/dist/esm/QueueDeckExpanded.js +40 -5
  38. package/dist/esm/TemplateNormal.js +5 -6
  39. package/dist/esm/VideoSeriesListing.js +2 -3
  40. package/dist/esm/{index-fa84ea96.js → debounce-d15d4a31.js} +478 -2
  41. package/dist/esm/{get-b2201dc8.js → get-a0244443.js} +1 -1
  42. package/dist/esm/index.js +10 -11
  43. package/dist/esm/{inherits-a75c8a1c.js → inherits-1d7657b5.js} +1 -1
  44. package/dist/esm/{promise-683a9c54.js → promise-eabb7f7e.js} +1 -1
  45. package/package.json +1 -1
  46. package/dist/cjs/debounce-783eb233.js +0 -487
  47. package/dist/esm/debounce-806f886b.js +0 -479
@@ -10,8 +10,8 @@ var Container = _interopDefault(require('react-bootstrap/Container'));
10
10
  var Row = _interopDefault(require('react-bootstrap/Row'));
11
11
  var Col = _interopDefault(require('react-bootstrap/Col'));
12
12
  var Card = _interopDefault(require('react-bootstrap/Card'));
13
- var index$1 = require('./index-39beccb3.js');
14
- var index$2 = require('./index-fa0fb52c.js');
13
+ var index = require('./index-39beccb3.js');
14
+ var index$1 = require('./index-fa0fb52c.js');
15
15
 
16
16
  /*
17
17
  object-assign
@@ -150,7 +150,7 @@ var buildUrl = function buildUrl(props) {
150
150
  throw new Error('Invalid image reference in block, no `_ref` found on `asset`');
151
151
  }
152
152
 
153
- return index$1.node(objectAssign({
153
+ return index.node(objectAssign({
154
154
  projectId: projectId,
155
155
  dataset: dataset
156
156
  }, options.imageOptions || {})).image(node).toString();
@@ -933,7 +933,7 @@ var TaxonomyCard = function TaxonomyCard(props) {
933
933
  getSerializers = props.getSerializers;
934
934
 
935
935
 
936
- var builder = index$1.imageUrlBuilder(client);
936
+ var builder = index.imageUrlBuilder(client);
937
937
 
938
938
  var urlFor = function urlFor(source) {
939
939
  return builder.image(source).auto('format');
@@ -985,7 +985,7 @@ var TaxonomyCard = function TaxonomyCard(props) {
985
985
  Col,
986
986
  null,
987
987
  React__default.createElement(
988
- index$2.LazyLoad,
988
+ index$1.LazyLoad,
989
989
  { height: imageHeight },
990
990
  React__default.createElement(Card.Img, { variant: 'top', src: thumbnailURL })
991
991
  )
@@ -12,7 +12,7 @@ require('react-bootstrap/Card');
12
12
  require('react-dom');
13
13
  require('./index-39beccb3.js');
14
14
  require('./index-fa0fb52c.js');
15
- var TaxonomyCard = require('./TaxonomyCard-b5074d6e.js');
15
+ var TaxonomyCard = require('./TaxonomyCard-cf5bbc07.js');
16
16
 
17
17
 
18
18
 
@@ -3,25 +3,24 @@
3
3
  require('./_commonjsHelpers-06173234.js');
4
4
  require('./_to-object-329a650b.js');
5
5
  require('./web.dom.iterable-0998bdc3.js');
6
- require('./debounce-783eb233.js');
6
+ require('./debounce-fbfce522.js');
7
7
  require('./main-0ea1b808.js');
8
8
  require('./core.get-iterator-method-e049ca4a.js');
9
9
  require('./extends-e94dbea5.js');
10
10
  require('react');
11
- require('./index-fa3cec70.js');
12
11
  require('prop-types');
13
12
  require('react-bootstrap/Container');
14
13
  require('react-bootstrap/Row');
15
14
  require('react-bootstrap/Col');
16
15
  require('next/link');
17
16
  require('./slicedToArray-e38fb29d.js');
18
- require('./AdSlot-f69a31ec.js');
19
- require('./promise-b96c61f8.js');
20
- require('./get-1f91592f.js');
17
+ require('./AdSlot-9660e9aa.js');
18
+ require('./promise-ea10b9c8.js');
19
+ require('./get-858530c2.js');
21
20
  require('react-bootstrap');
22
21
  require('./index.esm-340d3792.js');
23
22
  require('react-bootstrap/Button');
24
- var TemplateNormal = require('./Normal-7ed9eee9.js');
23
+ var TemplateNormal = require('./Normal-878318e9.js');
25
24
  require('react-bootstrap/ListGroup');
26
25
  require('next/head');
27
26
  require('react-bootstrap/Nav');
@@ -7,8 +7,8 @@ var React = require('react');
7
7
  var React__default = _interopDefault(React);
8
8
  require('prop-types');
9
9
  require('react-dom');
10
- var index$1 = require('./index-39beccb3.js');
11
- var index$2 = require('./index-fa0fb52c.js');
10
+ var index = require('./index-39beccb3.js');
11
+ var index$1 = require('./index-fa0fb52c.js');
12
12
  var entities = require('./entities-310b46ee.js');
13
13
  var Media$1 = _interopDefault(require('react-bootstrap/Media'));
14
14
 
@@ -18,7 +18,7 @@ var ThumbnailCard = function ThumbnailCard(_ref) {
18
18
  client = _ref.client,
19
19
  defaultImage = _ref.defaultImage;
20
20
 
21
- var builder = index$1.imageUrlBuilder(client);
21
+ var builder = index.imageUrlBuilder(client);
22
22
 
23
23
  var urlFor = function urlFor(source) {
24
24
  return builder.image(source).auto('format');
@@ -32,7 +32,7 @@ var ThumbnailCard = function ThumbnailCard(_ref) {
32
32
  Media$1,
33
33
  { className: 'mb-3 thumbnail-card' },
34
34
  React__default.createElement(
35
- index$2.LazyLoad,
35
+ index$1.LazyLoad,
36
36
  { height: size },
37
37
  React__default.createElement('img', { width: size, height: size, className: 'mr-3', src: item.thumbnail ? urlFor(item.thumbnail).url() : defaultImage, alt: 'Generic placeholder' })
38
38
  ),
@@ -5,12 +5,11 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
5
5
  require('./_commonjsHelpers-06173234.js');
6
6
  require('./_to-object-329a650b.js');
7
7
  require('./web.dom.iterable-0998bdc3.js');
8
- var debounce = require('./debounce-783eb233.js');
8
+ var debounce = require('./debounce-fbfce522.js');
9
9
  var _extends$2 = require('./extends-e94dbea5.js');
10
- var inherits$2 = require('./inherits-9898af5a.js');
10
+ var inherits$2 = require('./inherits-3fbaa008.js');
11
11
  var React = require('react');
12
12
  var React__default = _interopDefault(React);
13
- var index = require('./index-fa3cec70.js');
14
13
  require('prop-types');
15
14
  var Container = _interopDefault(require('react-bootstrap/Container'));
16
15
  var visibilitySensor = require('./visibility-sensor-b72d9527.js');
@@ -19,7 +18,7 @@ var Router = require('next/router');
19
18
  var Router__default = _interopDefault(Router);
20
19
  require('react-dom');
21
20
  require('./index-fa0fb52c.js');
22
- var YoutubeGroup = require('./YoutubeGroup-78e6bcc3.js');
21
+ var YoutubeGroup = require('./YoutubeGroup-1ec66294.js');
23
22
  require('smoothscroll-polyfill');
24
23
  var index_esm = require('./index.esm-340d3792.js');
25
24
 
@@ -137,7 +136,7 @@ var VideoSeriesListing = function (_React$Component) {
137
136
  pageNumber = parseInt(pageNumber);
138
137
 
139
138
  if (currentPage !== pageNumber) {
140
- index.lib_3.refresh();
139
+ debounce.lib_3.refresh();
141
140
 
142
141
  _this.setState({
143
142
  currentPage: pageNumber
@@ -6,7 +6,7 @@ var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
6
6
  var React = require('react');
7
7
  var React__default = _interopDefault(React);
8
8
  require('next/link');
9
- var index$2 = require('./index-fa0fb52c.js');
9
+ var index$1 = require('./index-fa0fb52c.js');
10
10
  var smoothscroll = _interopDefault(require('smoothscroll-polyfill'));
11
11
 
12
12
  var getYoutubeId = _commonjsHelpers.createCommonjsModule(function (module, exports) {
@@ -144,7 +144,7 @@ var YoutubeGroup = function YoutubeGroup(props) {
144
144
  'div',
145
145
  { className: 'tile__media' },
146
146
  React__default.createElement(
147
- index$2.LazyLoad,
147
+ index$1.LazyLoad,
148
148
  null,
149
149
  React__default.createElement('img', { className: 'tile__img', src: thumbnail, alt: '' })
150
150
  )
@@ -183,7 +183,7 @@ var YoutubeGroup = function YoutubeGroup(props) {
183
183
  'div',
184
184
  { className: 'tile__media' },
185
185
  React__default.createElement(
186
- index$2.LazyLoad,
186
+ index$1.LazyLoad,
187
187
  null,
188
188
  React__default.createElement('img', { className: 'tile__img', src: _thumbnail, alt: '' })
189
189
  )
@@ -6,7 +6,7 @@ require('prop-types');
6
6
  require('next/link');
7
7
  require('react-dom');
8
8
  require('./index-fa0fb52c.js');
9
- var YoutubeGroup = require('./YoutubeGroup-78e6bcc3.js');
9
+ var YoutubeGroup = require('./YoutubeGroup-1ec66294.js');
10
10
  require('smoothscroll-polyfill');
11
11
 
12
12
 
@@ -7,6 +7,8 @@ var React = require('react');
7
7
  var React__default = _interopDefault(React);
8
8
  var PropTypes = _interopDefault(require('prop-types'));
9
9
 
10
+ var _library = true;
11
+
10
12
  var domain;
11
13
 
12
14
  // This constructor is used to store event handlers. Instantiating this is
@@ -1659,6 +1661,487 @@ var lib_1 = lib.DFPSlotsProvider;
1659
1661
  var lib_2 = lib.AdSlot;
1660
1662
  var lib_3 = lib.DFPManager;
1661
1663
 
1664
+ /**
1665
+ * Checks if `value` is the
1666
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
1667
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
1668
+ *
1669
+ * @static
1670
+ * @memberOf _
1671
+ * @since 0.1.0
1672
+ * @category Lang
1673
+ * @param {*} value The value to check.
1674
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
1675
+ * @example
1676
+ *
1677
+ * _.isObject({});
1678
+ * // => true
1679
+ *
1680
+ * _.isObject([1, 2, 3]);
1681
+ * // => true
1682
+ *
1683
+ * _.isObject(_.noop);
1684
+ * // => true
1685
+ *
1686
+ * _.isObject(null);
1687
+ * // => false
1688
+ */
1689
+ function isObject(value) {
1690
+ var type = typeof value;
1691
+ return value != null && (type == 'object' || type == 'function');
1692
+ }
1693
+
1694
+ var isObject_1 = isObject;
1695
+
1696
+ /** Detect free variable `global` from Node.js. */
1697
+ var freeGlobal = typeof _commonjsHelpers.commonjsGlobal == 'object' && _commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.Object === Object && _commonjsHelpers.commonjsGlobal;
1698
+
1699
+ var _freeGlobal = freeGlobal;
1700
+
1701
+ /** Detect free variable `self`. */
1702
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
1703
+
1704
+ /** Used as a reference to the global object. */
1705
+ var root = _freeGlobal || freeSelf || Function('return this')();
1706
+
1707
+ var _root = root;
1708
+
1709
+ /**
1710
+ * Gets the timestamp of the number of milliseconds that have elapsed since
1711
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
1712
+ *
1713
+ * @static
1714
+ * @memberOf _
1715
+ * @since 2.4.0
1716
+ * @category Date
1717
+ * @returns {number} Returns the timestamp.
1718
+ * @example
1719
+ *
1720
+ * _.defer(function(stamp) {
1721
+ * console.log(_.now() - stamp);
1722
+ * }, _.now());
1723
+ * // => Logs the number of milliseconds it took for the deferred invocation.
1724
+ */
1725
+ var now = function() {
1726
+ return _root.Date.now();
1727
+ };
1728
+
1729
+ var now_1 = now;
1730
+
1731
+ /** Built-in value references. */
1732
+ var Symbol$1 = _root.Symbol;
1733
+
1734
+ var _Symbol = Symbol$1;
1735
+
1736
+ /** Used for built-in method references. */
1737
+ var objectProto = Object.prototype;
1738
+
1739
+ /** Used to check objects for own properties. */
1740
+ var hasOwnProperty = objectProto.hasOwnProperty;
1741
+
1742
+ /**
1743
+ * Used to resolve the
1744
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
1745
+ * of values.
1746
+ */
1747
+ var nativeObjectToString = objectProto.toString;
1748
+
1749
+ /** Built-in value references. */
1750
+ var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
1751
+
1752
+ /**
1753
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
1754
+ *
1755
+ * @private
1756
+ * @param {*} value The value to query.
1757
+ * @returns {string} Returns the raw `toStringTag`.
1758
+ */
1759
+ function getRawTag(value) {
1760
+ var isOwn = hasOwnProperty.call(value, symToStringTag),
1761
+ tag = value[symToStringTag];
1762
+
1763
+ try {
1764
+ value[symToStringTag] = undefined;
1765
+ var unmasked = true;
1766
+ } catch (e) {}
1767
+
1768
+ var result = nativeObjectToString.call(value);
1769
+ if (unmasked) {
1770
+ if (isOwn) {
1771
+ value[symToStringTag] = tag;
1772
+ } else {
1773
+ delete value[symToStringTag];
1774
+ }
1775
+ }
1776
+ return result;
1777
+ }
1778
+
1779
+ var _getRawTag = getRawTag;
1780
+
1781
+ /** Used for built-in method references. */
1782
+ var objectProto$1 = Object.prototype;
1783
+
1784
+ /**
1785
+ * Used to resolve the
1786
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
1787
+ * of values.
1788
+ */
1789
+ var nativeObjectToString$1 = objectProto$1.toString;
1790
+
1791
+ /**
1792
+ * Converts `value` to a string using `Object.prototype.toString`.
1793
+ *
1794
+ * @private
1795
+ * @param {*} value The value to convert.
1796
+ * @returns {string} Returns the converted string.
1797
+ */
1798
+ function objectToString(value) {
1799
+ return nativeObjectToString$1.call(value);
1800
+ }
1801
+
1802
+ var _objectToString = objectToString;
1803
+
1804
+ /** `Object#toString` result references. */
1805
+ var nullTag = '[object Null]',
1806
+ undefinedTag = '[object Undefined]';
1807
+
1808
+ /** Built-in value references. */
1809
+ var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
1810
+
1811
+ /**
1812
+ * The base implementation of `getTag` without fallbacks for buggy environments.
1813
+ *
1814
+ * @private
1815
+ * @param {*} value The value to query.
1816
+ * @returns {string} Returns the `toStringTag`.
1817
+ */
1818
+ function baseGetTag(value) {
1819
+ if (value == null) {
1820
+ return value === undefined ? undefinedTag : nullTag;
1821
+ }
1822
+ return (symToStringTag$1 && symToStringTag$1 in Object(value))
1823
+ ? _getRawTag(value)
1824
+ : _objectToString(value);
1825
+ }
1826
+
1827
+ var _baseGetTag = baseGetTag;
1828
+
1829
+ /**
1830
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
1831
+ * and has a `typeof` result of "object".
1832
+ *
1833
+ * @static
1834
+ * @memberOf _
1835
+ * @since 4.0.0
1836
+ * @category Lang
1837
+ * @param {*} value The value to check.
1838
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1839
+ * @example
1840
+ *
1841
+ * _.isObjectLike({});
1842
+ * // => true
1843
+ *
1844
+ * _.isObjectLike([1, 2, 3]);
1845
+ * // => true
1846
+ *
1847
+ * _.isObjectLike(_.noop);
1848
+ * // => false
1849
+ *
1850
+ * _.isObjectLike(null);
1851
+ * // => false
1852
+ */
1853
+ function isObjectLike(value) {
1854
+ return value != null && typeof value == 'object';
1855
+ }
1856
+
1857
+ var isObjectLike_1 = isObjectLike;
1858
+
1859
+ /** `Object#toString` result references. */
1860
+ var symbolTag = '[object Symbol]';
1861
+
1862
+ /**
1863
+ * Checks if `value` is classified as a `Symbol` primitive or object.
1864
+ *
1865
+ * @static
1866
+ * @memberOf _
1867
+ * @since 4.0.0
1868
+ * @category Lang
1869
+ * @param {*} value The value to check.
1870
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
1871
+ * @example
1872
+ *
1873
+ * _.isSymbol(Symbol.iterator);
1874
+ * // => true
1875
+ *
1876
+ * _.isSymbol('abc');
1877
+ * // => false
1878
+ */
1879
+ function isSymbol(value) {
1880
+ return typeof value == 'symbol' ||
1881
+ (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
1882
+ }
1883
+
1884
+ var isSymbol_1 = isSymbol;
1885
+
1886
+ /** Used as references for various `Number` constants. */
1887
+ var NAN = 0 / 0;
1888
+
1889
+ /** Used to match leading and trailing whitespace. */
1890
+ var reTrim = /^\s+|\s+$/g;
1891
+
1892
+ /** Used to detect bad signed hexadecimal string values. */
1893
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
1894
+
1895
+ /** Used to detect binary string values. */
1896
+ var reIsBinary = /^0b[01]+$/i;
1897
+
1898
+ /** Used to detect octal string values. */
1899
+ var reIsOctal = /^0o[0-7]+$/i;
1900
+
1901
+ /** Built-in method references without a dependency on `root`. */
1902
+ var freeParseInt = parseInt;
1903
+
1904
+ /**
1905
+ * Converts `value` to a number.
1906
+ *
1907
+ * @static
1908
+ * @memberOf _
1909
+ * @since 4.0.0
1910
+ * @category Lang
1911
+ * @param {*} value The value to process.
1912
+ * @returns {number} Returns the number.
1913
+ * @example
1914
+ *
1915
+ * _.toNumber(3.2);
1916
+ * // => 3.2
1917
+ *
1918
+ * _.toNumber(Number.MIN_VALUE);
1919
+ * // => 5e-324
1920
+ *
1921
+ * _.toNumber(Infinity);
1922
+ * // => Infinity
1923
+ *
1924
+ * _.toNumber('3.2');
1925
+ * // => 3.2
1926
+ */
1927
+ function toNumber(value) {
1928
+ if (typeof value == 'number') {
1929
+ return value;
1930
+ }
1931
+ if (isSymbol_1(value)) {
1932
+ return NAN;
1933
+ }
1934
+ if (isObject_1(value)) {
1935
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
1936
+ value = isObject_1(other) ? (other + '') : other;
1937
+ }
1938
+ if (typeof value != 'string') {
1939
+ return value === 0 ? value : +value;
1940
+ }
1941
+ value = value.replace(reTrim, '');
1942
+ var isBinary = reIsBinary.test(value);
1943
+ return (isBinary || reIsOctal.test(value))
1944
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
1945
+ : (reIsBadHex.test(value) ? NAN : +value);
1946
+ }
1947
+
1948
+ var toNumber_1 = toNumber;
1949
+
1950
+ /** Error message constants. */
1951
+ var FUNC_ERROR_TEXT = 'Expected a function';
1952
+
1953
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1954
+ var nativeMax = Math.max,
1955
+ nativeMin = Math.min;
1956
+
1957
+ /**
1958
+ * Creates a debounced function that delays invoking `func` until after `wait`
1959
+ * milliseconds have elapsed since the last time the debounced function was
1960
+ * invoked. The debounced function comes with a `cancel` method to cancel
1961
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
1962
+ * Provide `options` to indicate whether `func` should be invoked on the
1963
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
1964
+ * with the last arguments provided to the debounced function. Subsequent
1965
+ * calls to the debounced function return the result of the last `func`
1966
+ * invocation.
1967
+ *
1968
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
1969
+ * invoked on the trailing edge of the timeout only if the debounced function
1970
+ * is invoked more than once during the `wait` timeout.
1971
+ *
1972
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
1973
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
1974
+ *
1975
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
1976
+ * for details over the differences between `_.debounce` and `_.throttle`.
1977
+ *
1978
+ * @static
1979
+ * @memberOf _
1980
+ * @since 0.1.0
1981
+ * @category Function
1982
+ * @param {Function} func The function to debounce.
1983
+ * @param {number} [wait=0] The number of milliseconds to delay.
1984
+ * @param {Object} [options={}] The options object.
1985
+ * @param {boolean} [options.leading=false]
1986
+ * Specify invoking on the leading edge of the timeout.
1987
+ * @param {number} [options.maxWait]
1988
+ * The maximum time `func` is allowed to be delayed before it's invoked.
1989
+ * @param {boolean} [options.trailing=true]
1990
+ * Specify invoking on the trailing edge of the timeout.
1991
+ * @returns {Function} Returns the new debounced function.
1992
+ * @example
1993
+ *
1994
+ * // Avoid costly calculations while the window size is in flux.
1995
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
1996
+ *
1997
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
1998
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
1999
+ * 'leading': true,
2000
+ * 'trailing': false
2001
+ * }));
2002
+ *
2003
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
2004
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
2005
+ * var source = new EventSource('/stream');
2006
+ * jQuery(source).on('message', debounced);
2007
+ *
2008
+ * // Cancel the trailing debounced invocation.
2009
+ * jQuery(window).on('popstate', debounced.cancel);
2010
+ */
2011
+ function debounce(func, wait, options) {
2012
+ var lastArgs,
2013
+ lastThis,
2014
+ maxWait,
2015
+ result,
2016
+ timerId,
2017
+ lastCallTime,
2018
+ lastInvokeTime = 0,
2019
+ leading = false,
2020
+ maxing = false,
2021
+ trailing = true;
2022
+
2023
+ if (typeof func != 'function') {
2024
+ throw new TypeError(FUNC_ERROR_TEXT);
2025
+ }
2026
+ wait = toNumber_1(wait) || 0;
2027
+ if (isObject_1(options)) {
2028
+ leading = !!options.leading;
2029
+ maxing = 'maxWait' in options;
2030
+ maxWait = maxing ? nativeMax(toNumber_1(options.maxWait) || 0, wait) : maxWait;
2031
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
2032
+ }
2033
+
2034
+ function invokeFunc(time) {
2035
+ var args = lastArgs,
2036
+ thisArg = lastThis;
2037
+
2038
+ lastArgs = lastThis = undefined;
2039
+ lastInvokeTime = time;
2040
+ result = func.apply(thisArg, args);
2041
+ return result;
2042
+ }
2043
+
2044
+ function leadingEdge(time) {
2045
+ // Reset any `maxWait` timer.
2046
+ lastInvokeTime = time;
2047
+ // Start the timer for the trailing edge.
2048
+ timerId = setTimeout(timerExpired, wait);
2049
+ // Invoke the leading edge.
2050
+ return leading ? invokeFunc(time) : result;
2051
+ }
2052
+
2053
+ function remainingWait(time) {
2054
+ var timeSinceLastCall = time - lastCallTime,
2055
+ timeSinceLastInvoke = time - lastInvokeTime,
2056
+ timeWaiting = wait - timeSinceLastCall;
2057
+
2058
+ return maxing
2059
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
2060
+ : timeWaiting;
2061
+ }
2062
+
2063
+ function shouldInvoke(time) {
2064
+ var timeSinceLastCall = time - lastCallTime,
2065
+ timeSinceLastInvoke = time - lastInvokeTime;
2066
+
2067
+ // Either this is the first call, activity has stopped and we're at the
2068
+ // trailing edge, the system time has gone backwards and we're treating
2069
+ // it as the trailing edge, or we've hit the `maxWait` limit.
2070
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
2071
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
2072
+ }
2073
+
2074
+ function timerExpired() {
2075
+ var time = now_1();
2076
+ if (shouldInvoke(time)) {
2077
+ return trailingEdge(time);
2078
+ }
2079
+ // Restart the timer.
2080
+ timerId = setTimeout(timerExpired, remainingWait(time));
2081
+ }
2082
+
2083
+ function trailingEdge(time) {
2084
+ timerId = undefined;
2085
+
2086
+ // Only invoke if we have `lastArgs` which means `func` has been
2087
+ // debounced at least once.
2088
+ if (trailing && lastArgs) {
2089
+ return invokeFunc(time);
2090
+ }
2091
+ lastArgs = lastThis = undefined;
2092
+ return result;
2093
+ }
2094
+
2095
+ function cancel() {
2096
+ if (timerId !== undefined) {
2097
+ clearTimeout(timerId);
2098
+ }
2099
+ lastInvokeTime = 0;
2100
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
2101
+ }
2102
+
2103
+ function flush() {
2104
+ return timerId === undefined ? result : trailingEdge(now_1());
2105
+ }
2106
+
2107
+ function debounced() {
2108
+ var time = now_1(),
2109
+ isInvoking = shouldInvoke(time);
2110
+
2111
+ lastArgs = arguments;
2112
+ lastThis = this;
2113
+ lastCallTime = time;
2114
+
2115
+ if (isInvoking) {
2116
+ if (timerId === undefined) {
2117
+ return leadingEdge(lastCallTime);
2118
+ }
2119
+ if (maxing) {
2120
+ // Handle invocations in a tight loop.
2121
+ clearTimeout(timerId);
2122
+ timerId = setTimeout(timerExpired, wait);
2123
+ return invokeFunc(lastCallTime);
2124
+ }
2125
+ }
2126
+ if (timerId === undefined) {
2127
+ timerId = setTimeout(timerExpired, wait);
2128
+ }
2129
+ return result;
2130
+ }
2131
+ debounced.cancel = cancel;
2132
+ debounced.flush = flush;
2133
+ return debounced;
2134
+ }
2135
+
2136
+ var debounce_1 = debounce;
2137
+
2138
+ exports._Symbol = _Symbol;
2139
+ exports._baseGetTag = _baseGetTag;
2140
+ exports._library = _library;
2141
+ exports._root = _root;
2142
+ exports.debounce_1 = debounce_1;
2143
+ exports.isObject_1 = isObject_1;
2144
+ exports.isSymbol_1 = isSymbol_1;
1662
2145
  exports.lib_1 = lib_1;
1663
2146
  exports.lib_2 = lib_2;
1664
2147
  exports.lib_3 = lib_3;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var debounce = require('./debounce-783eb233.js');
3
+ var debounce = require('./debounce-fbfce522.js');
4
4
 
5
5
  /**
6
6
  * Checks if `value` is classified as an `Array` object.