@revolist/revogrid 4.12.12 → 4.13.2

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 (95) hide show
  1. package/dist/cjs/{column.drag.plugin-0ce0b39a.js → column.drag.plugin-0f367fe1.js} +2 -1
  2. package/dist/cjs/column.drag.plugin-0f367fe1.js.map +1 -0
  3. package/dist/cjs/column.service-b59380a3.js.map +1 -1
  4. package/dist/cjs/{sorting.sign-a1e9d97a.js → grouping.row.renderer-d6119ced.js} +6 -6
  5. package/dist/cjs/grouping.row.renderer-d6119ced.js.map +1 -0
  6. package/dist/cjs/index.cjs.js +7 -6
  7. package/dist/cjs/index.cjs.js.map +1 -1
  8. package/dist/cjs/revo-grid.cjs.entry.js +2 -2
  9. package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
  10. package/dist/cjs/revogr-data_4.cjs.entry.js +5 -5
  11. package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -1
  12. package/dist/cjs/revogr-filter-panel.cjs.entry.js +1 -1
  13. package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -1
  14. package/dist/collection/components/revoGrid/revo-grid-style.css +109 -197
  15. package/dist/collection/plugins/filter/filter.style.css +12 -25
  16. package/dist/collection/plugins/sorting/sorting.plugin.js +2 -0
  17. package/dist/collection/plugins/sorting/sorting.plugin.js.map +1 -1
  18. package/dist/collection/store/selection/selection.store.js.map +1 -1
  19. package/dist/esm/{column.drag.plugin-017c4fb3.js → column.drag.plugin-d201beb7.js} +2 -2
  20. package/dist/esm/{column.drag.plugin-017c4fb3.js.map → column.drag.plugin-d201beb7.js.map} +1 -1
  21. package/dist/esm/column.service-f39c0a1d.js.map +1 -1
  22. package/dist/esm/{sorting.sign-c02e3b12.js → grouping.row.renderer-95f32c6b.js} +6 -6
  23. package/dist/esm/grouping.row.renderer-95f32c6b.js.map +1 -0
  24. package/dist/esm/index.js +3 -3
  25. package/dist/esm/revo-grid.entry.js +2 -2
  26. package/dist/esm/revo-grid.entry.js.map +1 -1
  27. package/dist/esm/revogr-data_4.entry.js +1 -1
  28. package/dist/esm/revogr-filter-panel.entry.js +1 -1
  29. package/dist/esm/revogr-filter-panel.entry.js.map +1 -1
  30. package/dist/revo-grid/app-globals-6b929fd8.js +8 -1
  31. package/dist/revo-grid/app-globals-6b929fd8.js.map +1 -1
  32. package/dist/revo-grid/column.drag.plugin-d201beb7.js +2522 -0
  33. package/dist/revo-grid/column.drag.plugin-d201beb7.js.map +1 -0
  34. package/dist/revo-grid/column.service-f39c0a1d.js +1293 -1
  35. package/dist/revo-grid/column.service-f39c0a1d.js.map +1 -1
  36. package/dist/revo-grid/debounce-b3166f78.js +491 -1
  37. package/dist/revo-grid/debounce-b3166f78.js.map +1 -1
  38. package/dist/revo-grid/dimension.helpers-5567e424.js +3608 -1
  39. package/dist/revo-grid/dimension.helpers-5567e424.js.map +1 -1
  40. package/dist/revo-grid/edit.utils-b59306be.js +13 -1
  41. package/dist/revo-grid/edit.utils-b59306be.js.map +1 -1
  42. package/dist/revo-grid/events-cf0893a3.js +38 -1
  43. package/dist/revo-grid/events-cf0893a3.js.map +1 -1
  44. package/dist/revo-grid/filter.button-84396156.js +34 -1
  45. package/dist/revo-grid/filter.button-84396156.js.map +1 -1
  46. package/dist/revo-grid/grouping.row.renderer-95f32c6b.js +65 -0
  47. package/dist/revo-grid/grouping.row.renderer-95f32c6b.js.map +1 -0
  48. package/dist/revo-grid/header-cell-renderer-31f53644.js +335 -1
  49. package/dist/revo-grid/header-cell-renderer-31f53644.js.map +1 -1
  50. package/dist/revo-grid/index-f6fae858.js +2090 -2
  51. package/dist/revo-grid/index-f6fae858.js.map +1 -1
  52. package/dist/revo-grid/index.esm.js +160 -1
  53. package/dist/revo-grid/index.esm.js.map +1 -1
  54. package/dist/revo-grid/key.utils-3632161b.js +85 -1
  55. package/dist/revo-grid/key.utils-3632161b.js.map +1 -1
  56. package/dist/revo-grid/resize-observer-83c9e167.js +501 -1
  57. package/dist/revo-grid/resize-observer-83c9e167.js.map +1 -1
  58. package/dist/revo-grid/revo-grid.entry.js +1943 -1
  59. package/dist/revo-grid/revo-grid.entry.js.map +1 -1
  60. package/dist/revo-grid/revo-grid.esm.js +21 -1
  61. package/dist/revo-grid/revo-grid.esm.js.map +1 -1
  62. package/dist/revo-grid/revogr-attribution_7.entry.js +1446 -1
  63. package/dist/revo-grid/revogr-attribution_7.entry.js.map +1 -1
  64. package/dist/revo-grid/revogr-clipboard_3.entry.js +455 -1
  65. package/dist/revo-grid/revogr-clipboard_3.entry.js.map +1 -1
  66. package/dist/revo-grid/revogr-data_4.entry.js +960 -1
  67. package/dist/revo-grid/revogr-data_4.entry.js.map +1 -1
  68. package/dist/revo-grid/revogr-filter-panel.entry.js +340 -1
  69. package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -1
  70. package/dist/revo-grid/text-editor-e47e56c3.js +74 -1
  71. package/dist/revo-grid/text-editor-e47e56c3.js.map +1 -1
  72. package/dist/revo-grid/throttle-dec28f5b.js +229 -1
  73. package/dist/revo-grid/throttle-dec28f5b.js.map +1 -1
  74. package/dist/revo-grid/viewport.helpers-7e7f9dad.js +48 -1
  75. package/dist/revo-grid/viewport.helpers-7e7f9dad.js.map +1 -1
  76. package/dist/revo-grid/viewport.store-c18a25a6.js +402 -1
  77. package/dist/revo-grid/viewport.store-c18a25a6.js.map +1 -1
  78. package/dist/types/plugins/sorting/sorting.plugin.d.ts +2 -0
  79. package/dist/types/store/selection/selection.store.d.ts +1 -1
  80. package/hydrate/index.js +7 -7
  81. package/hydrate/index.mjs +7 -7
  82. package/package.json +1 -1
  83. package/standalone/column.service.js.map +1 -1
  84. package/standalone/index.js +1 -1
  85. package/standalone/revo-grid.js +2 -2
  86. package/standalone/revo-grid.js.map +1 -1
  87. package/standalone/revogr-filter-panel.js +1 -1
  88. package/standalone/revogr-filter-panel.js.map +1 -1
  89. package/dist/cjs/column.drag.plugin-0ce0b39a.js.map +0 -1
  90. package/dist/cjs/sorting.sign-a1e9d97a.js.map +0 -1
  91. package/dist/esm/sorting.sign-c02e3b12.js.map +0 -1
  92. package/dist/revo-grid/column.drag.plugin-017c4fb3.js +0 -5
  93. package/dist/revo-grid/column.drag.plugin-017c4fb3.js.map +0 -1
  94. package/dist/revo-grid/sorting.sign-c02e3b12.js +0 -5
  95. package/dist/revo-grid/sorting.sign-c02e3b12.js.map +0 -1
@@ -1,5 +1,3612 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- import{a as n,b as t,r,S as e,i as u,f as i,c as o,t as a}from"./debounce-b3166f78.js";import{g as s,f as c}from"./index-f6fae858.js";const f=n=>({set(t,r){if(t!=="proxyItems"){return}const e=n.get("items").reduce(((n,t)=>{n.add(t);return n}),new Set);const u=r.reduce(((n,t)=>{if(e.has(t)){n.push(t)}return n}),[]);n.set("items",u)}});function l(n,t,r,e){var u=n.length,i=r+(e?1:-1);while(e?i--:++i<u){if(t(n[i],i,n)){return i}}return-1}function v(){this.__data__=[];this.size=0}function d(n,t){return n===t||n!==n&&t!==t}function h(n,t){var r=n.length;while(r--){if(d(n[r][0],t)){return r}}return-1}var b=Array.prototype;var p=b.splice;function j(n){var t=this.__data__,r=h(t,n);if(r<0){return false}var e=t.length-1;if(r==e){t.pop()}else{p.call(t,r,1)}--this.size;return true}function m(n){var t=this.__data__,r=h(t,n);return r<0?undefined:t[r][1]}function w(n){return h(this.__data__,n)>-1}function y(n,t){var r=this.__data__,e=h(r,n);if(e<0){++this.size;r.push([n,t])}else{r[e][1]=t}return this}function g(n){var t=-1,r=n==null?0:n.length;this.clear();while(++t<r){var e=n[t];this.set(e[0],e[1])}}g.prototype.clear=v;g.prototype["delete"]=j;g.prototype.get=m;g.prototype.has=w;g.prototype.set=y;function O(){this.__data__=new g;this.size=0}function A(n){var t=this.__data__,r=t["delete"](n);this.size=t.size;return r}function _(n){return this.__data__.get(n)}function x(n){return this.__data__.has(n)}var E="[object AsyncFunction]",M="[object Function]",F="[object GeneratorFunction]",D="[object Proxy]";function I(r){if(!n(r)){return false}var e=t(r);return e==M||e==F||e==E||e==D}var R=r["__core-js_shared__"];const S=R;var T=function(){var n=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function C(n){return!!T&&T in n}var P=Function.prototype;var N=P.toString;function L(n){if(n!=null){try{return N.call(n)}catch(n){}try{return n+""}catch(n){}}return""}var U=/[\\^$.*+?()[\]{}|]/g;var k=/^\[object .+?Constructor\]$/;var $=Function.prototype,W=Object.prototype;var B=$.toString;var H=W.hasOwnProperty;var K=RegExp("^"+B.call(H).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function G(t){if(!n(t)||C(t)){return false}var r=I(t)?K:k;return r.test(L(t))}function V(n,t){return n==null?undefined:n[t]}function X(n,t){var r=V(n,t);return G(r)?r:undefined}var z=X(r,"Map");const q=z;var J=X(Object,"create");const Q=J;function Y(){this.__data__=Q?Q(null):{};this.size=0}function Z(n){var t=this.has(n)&&delete this.__data__[n];this.size-=t?1:0;return t}var nn="__lodash_hash_undefined__";var tn=Object.prototype;var rn=tn.hasOwnProperty;function en(n){var t=this.__data__;if(Q){var r=t[n];return r===nn?undefined:r}return rn.call(t,n)?t[n]:undefined}var un=Object.prototype;var on=un.hasOwnProperty;function an(n){var t=this.__data__;return Q?t[n]!==undefined:on.call(t,n)}var sn="__lodash_hash_undefined__";function cn(n,t){var r=this.__data__;this.size+=this.has(n)?0:1;r[n]=Q&&t===undefined?sn:t;return this}function fn(n){var t=-1,r=n==null?0:n.length;this.clear();while(++t<r){var e=n[t];this.set(e[0],e[1])}}fn.prototype.clear=Y;fn.prototype["delete"]=Z;fn.prototype.get=en;fn.prototype.has=an;fn.prototype.set=cn;function ln(){this.size=0;this.__data__={hash:new fn,map:new(q||g),string:new fn}}function vn(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function dn(n,t){var r=n.__data__;return vn(t)?r[typeof t=="string"?"string":"hash"]:r.map}function hn(n){var t=dn(this,n)["delete"](n);this.size-=t?1:0;return t}function bn(n){return dn(this,n).get(n)}function pn(n){return dn(this,n).has(n)}function jn(n,t){var r=dn(this,n),e=r.size;r.set(n,t);this.size+=r.size==e?0:1;return this}function mn(n){var t=-1,r=n==null?0:n.length;this.clear();while(++t<r){var e=n[t];this.set(e[0],e[1])}}mn.prototype.clear=ln;mn.prototype["delete"]=hn;mn.prototype.get=bn;mn.prototype.has=pn;mn.prototype.set=jn;var wn=200;function yn(n,t){var r=this.__data__;if(r instanceof g){var e=r.__data__;if(!q||e.length<wn-1){e.push([n,t]);this.size=++r.size;return this}r=this.__data__=new mn(e)}r.set(n,t);this.size=r.size;return this}function gn(n){var t=this.__data__=new g(n);this.size=t.size}gn.prototype.clear=O;gn.prototype["delete"]=A;gn.prototype.get=_;gn.prototype.has=x;gn.prototype.set=yn;var On="__lodash_hash_undefined__";function An(n){this.__data__.set(n,On);return this}function _n(n){return this.__data__.has(n)}function xn(n){var t=-1,r=n==null?0:n.length;this.__data__=new mn;while(++t<r){this.add(n[t])}}xn.prototype.add=xn.prototype.push=An;xn.prototype.has=_n;function En(n,t){var r=-1,e=n==null?0:n.length;while(++r<e){if(t(n[r],r,n)){return true}}return false}function Mn(n,t){return n.has(t)}var Fn=1,Dn=2;function In(n,t,r,e,u,i){var o=r&Fn,a=n.length,s=t.length;if(a!=s&&!(o&&s>a)){return false}var c=i.get(n);var f=i.get(t);if(c&&f){return c==t&&f==n}var l=-1,v=true,d=r&Dn?new xn:undefined;i.set(n,t);i.set(t,n);while(++l<a){var h=n[l],b=t[l];if(e){var p=o?e(b,h,l,t,n,i):e(h,b,l,n,t,i)}if(p!==undefined){if(p){continue}v=false;break}if(d){if(!En(t,(function(n,t){if(!Mn(d,t)&&(h===n||u(h,n,r,e,i))){return d.push(t)}}))){v=false;break}}else if(!(h===b||u(h,b,r,e,i))){v=false;break}}i["delete"](n);i["delete"](t);return v}var Rn=r.Uint8Array;const Sn=Rn;function Tn(n){var t=-1,r=Array(n.size);n.forEach((function(n,e){r[++t]=[e,n]}));return r}function Cn(n){var t=-1,r=Array(n.size);n.forEach((function(n){r[++t]=n}));return r}var Pn=1,Nn=2;var Ln="[object Boolean]",Un="[object Date]",kn="[object Error]",$n="[object Map]",Wn="[object Number]",Bn="[object RegExp]",Hn="[object Set]",Kn="[object String]",Gn="[object Symbol]";var Vn="[object ArrayBuffer]",Xn="[object DataView]";var zn=e?e.prototype:undefined,qn=zn?zn.valueOf:undefined;function Jn(n,t,r,e,u,i,o){switch(r){case Xn:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset){return false}n=n.buffer;t=t.buffer;case Vn:if(n.byteLength!=t.byteLength||!i(new Sn(n),new Sn(t))){return false}return true;case Ln:case Un:case Wn:return d(+n,+t);case kn:return n.name==t.name&&n.message==t.message;case Bn:case Kn:return n==t+"";case $n:var a=Tn;case Hn:var s=e&Pn;a||(a=Cn);if(n.size!=t.size&&!s){return false}var c=o.get(n);if(c){return c==t}e|=Nn;o.set(n,t);var f=In(a(n),a(t),e,u,i,o);o["delete"](n);return f;case Gn:if(qn){return qn.call(n)==qn.call(t)}}return false}function Qn(n,t){var r=-1,e=t.length,u=n.length;while(++r<e){n[u+r]=t[r]}return n}var Yn=Array.isArray;const Zn=Yn;function nt(n,t,r){var e=t(n);return Zn(n)?e:Qn(e,r(n))}function tt(n,t){var r=-1,e=n==null?0:n.length,u=0,i=[];while(++r<e){var o=n[r];if(t(o,r,n)){i[u++]=o}}return i}function rt(){return[]}var et=Object.prototype;var ut=et.propertyIsEnumerable;var it=Object.getOwnPropertySymbols;var ot=!it?rt:function(n){if(n==null){return[]}n=Object(n);return tt(it(n),(function(t){return ut.call(n,t)}))};const at=ot;function st(n,t){var r=-1,e=Array(n);while(++r<n){e[r]=t(r)}return e}var ct="[object Arguments]";function ft(n){return u(n)&&t(n)==ct}var lt=Object.prototype;var vt=lt.hasOwnProperty;var dt=lt.propertyIsEnumerable;var ht=ft(function(){return arguments}())?ft:function(n){return u(n)&&vt.call(n,"callee")&&!dt.call(n,"callee")};const bt=ht;function pt(){return false}var jt=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var mt=jt&&typeof module=="object"&&module&&!module.nodeType&&module;var wt=mt&&mt.exports===jt;var yt=wt?r.Buffer:undefined;var gt=yt?yt.isBuffer:undefined;var Ot=gt||pt;const At=Ot;var _t=9007199254740991;var xt=/^(?:0|[1-9]\d*)$/;function Et(n,t){var r=typeof n;t=t==null?_t:t;return!!t&&(r=="number"||r!="symbol"&&xt.test(n))&&(n>-1&&n%1==0&&n<t)}var Mt=9007199254740991;function Ft(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Mt}var Dt="[object Arguments]",It="[object Array]",Rt="[object Boolean]",St="[object Date]",Tt="[object Error]",Ct="[object Function]",Pt="[object Map]",Nt="[object Number]",Lt="[object Object]",Ut="[object RegExp]",kt="[object Set]",$t="[object String]",Wt="[object WeakMap]";var Bt="[object ArrayBuffer]",Ht="[object DataView]",Kt="[object Float32Array]",Gt="[object Float64Array]",Vt="[object Int8Array]",Xt="[object Int16Array]",zt="[object Int32Array]",qt="[object Uint8Array]",Jt="[object Uint8ClampedArray]",Qt="[object Uint16Array]",Yt="[object Uint32Array]";var Zt={};Zt[Kt]=Zt[Gt]=Zt[Vt]=Zt[Xt]=Zt[zt]=Zt[qt]=Zt[Jt]=Zt[Qt]=Zt[Yt]=true;Zt[Dt]=Zt[It]=Zt[Bt]=Zt[Rt]=Zt[Ht]=Zt[St]=Zt[Tt]=Zt[Ct]=Zt[Pt]=Zt[Nt]=Zt[Lt]=Zt[Ut]=Zt[kt]=Zt[$t]=Zt[Wt]=false;function nr(n){return u(n)&&Ft(n.length)&&!!Zt[t(n)]}function tr(n){return function(t){return n(t)}}var rr=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var er=rr&&typeof module=="object"&&module&&!module.nodeType&&module;var ur=er&&er.exports===rr;var ir=ur&&i.process;var or=function(){try{var n=er&&er.require&&er.require("util").types;if(n){return n}return ir&&ir.binding&&ir.binding("util")}catch(n){}}();const ar=or;var sr=ar&&ar.isTypedArray;var cr=sr?tr(sr):nr;const fr=cr;var lr=Object.prototype;var vr=lr.hasOwnProperty;function dr(n,t){var r=Zn(n),e=!r&&bt(n),u=!r&&!e&&At(n),i=!r&&!e&&!u&&fr(n),o=r||e||u||i,a=o?st(n.length,String):[],s=a.length;for(var c in n){if((t||vr.call(n,c))&&!(o&&(c=="length"||u&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Et(c,s)))){a.push(c)}}return a}var hr=Object.prototype;function br(n){var t=n&&n.constructor,r=typeof t=="function"&&t.prototype||hr;return n===r}function pr(n,t){return function(r){return n(t(r))}}var jr=pr(Object.keys,Object);const mr=jr;var wr=Object.prototype;var yr=wr.hasOwnProperty;function gr(n){if(!br(n)){return mr(n)}var t=[];for(var r in Object(n)){if(yr.call(n,r)&&r!="constructor"){t.push(r)}}return t}function Or(n){return n!=null&&Ft(n.length)&&!I(n)}function Ar(n){return Or(n)?dr(n):gr(n)}function _r(n){return nt(n,Ar,at)}var xr=1;var Er=Object.prototype;var Mr=Er.hasOwnProperty;function Fr(n,t,r,e,u,i){var o=r&xr,a=_r(n),s=a.length,c=_r(t),f=c.length;if(s!=f&&!o){return false}var l=s;while(l--){var v=a[l];if(!(o?v in t:Mr.call(t,v))){return false}}var d=i.get(n);var h=i.get(t);if(d&&h){return d==t&&h==n}var b=true;i.set(n,t);i.set(t,n);var p=o;while(++l<s){v=a[l];var j=n[v],m=t[v];if(e){var w=o?e(m,j,v,t,n,i):e(j,m,v,n,t,i)}if(!(w===undefined?j===m||u(j,m,r,e,i):w)){b=false;break}p||(p=v=="constructor")}if(b&&!p){var y=n.constructor,g=t.constructor;if(y!=g&&("constructor"in n&&"constructor"in t)&&!(typeof y=="function"&&y instanceof y&&typeof g=="function"&&g instanceof g)){b=false}}i["delete"](n);i["delete"](t);return b}var Dr=X(r,"DataView");const Ir=Dr;var Rr=X(r,"Promise");const Sr=Rr;var Tr=X(r,"Set");const Cr=Tr;var Pr=X(r,"WeakMap");const Nr=Pr;var Lr="[object Map]",Ur="[object Object]",kr="[object Promise]",$r="[object Set]",Wr="[object WeakMap]";var Br="[object DataView]";var Hr=L(Ir),Kr=L(q),Gr=L(Sr),Vr=L(Cr),Xr=L(Nr);var zr=t;if(Ir&&zr(new Ir(new ArrayBuffer(1)))!=Br||q&&zr(new q)!=Lr||Sr&&zr(Sr.resolve())!=kr||Cr&&zr(new Cr)!=$r||Nr&&zr(new Nr)!=Wr){zr=function(n){var r=t(n),e=r==Ur?n.constructor:undefined,u=e?L(e):"";if(u){switch(u){case Hr:return Br;case Kr:return Lr;case Gr:return kr;case Vr:return $r;case Xr:return Wr}}return r}}const qr=zr;var Jr=1;var Qr="[object Arguments]",Yr="[object Array]",Zr="[object Object]";var ne=Object.prototype;var te=ne.hasOwnProperty;function re(n,t,r,e,u,i){var o=Zn(n),a=Zn(t),s=o?Yr:qr(n),c=a?Yr:qr(t);s=s==Qr?Zr:s;c=c==Qr?Zr:c;var f=s==Zr,l=c==Zr,v=s==c;if(v&&At(n)){if(!At(t)){return false}o=true;f=false}if(v&&!f){i||(i=new gn);return o||fr(n)?In(n,t,r,e,u,i):Jn(n,t,s,r,e,u,i)}if(!(r&Jr)){var d=f&&te.call(n,"__wrapped__"),h=l&&te.call(t,"__wrapped__");if(d||h){var b=d?n.value():n,p=h?t.value():t;i||(i=new gn);return u(b,p,r,e,i)}}if(!v){return false}i||(i=new gn);return Fr(n,t,r,e,u,i)}function ee(n,t,r,e,i){if(n===t){return true}if(n==null||t==null||!u(n)&&!u(t)){return n!==n&&t!==t}return re(n,t,r,e,ee,i)}var ue=1,ie=2;function oe(n,t,r,e){var u=r.length,i=u,o=!e;if(n==null){return!i}n=Object(n);while(u--){var a=r[u];if(o&&a[2]?a[1]!==n[a[0]]:!(a[0]in n)){return false}}while(++u<i){a=r[u];var s=a[0],c=n[s],f=a[1];if(o&&a[2]){if(c===undefined&&!(s in n)){return false}}else{var l=new gn;if(e){var v=e(c,f,s,n,t,l)}if(!(v===undefined?ee(f,c,ue|ie,e,l):v)){return false}}}return true}function ae(t){return t===t&&!n(t)}function se(n){var t=Ar(n),r=t.length;while(r--){var e=t[r],u=n[e];t[r]=[e,u,ae(u)]}return t}function ce(n,t){return function(r){if(r==null){return false}return r[n]===t&&(t!==undefined||n in Object(r))}}function fe(n){var t=se(n);if(t.length==1&&t[0][2]){return ce(t[0][0],t[0][1])}return function(r){return r===n||oe(r,n,t)}}var le=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ve=/^\w*$/;function de(n,t){if(Zn(n)){return false}var r=typeof n;if(r=="number"||r=="symbol"||r=="boolean"||n==null||o(n)){return true}return ve.test(n)||!le.test(n)||t!=null&&n in Object(t)}var he="Expected a function";function be(n,t){if(typeof n!="function"||t!=null&&typeof t!="function"){throw new TypeError(he)}var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u)){return i.get(u)}var o=n.apply(this,e);r.cache=i.set(u,o)||i;return o};r.cache=new(be.Cache||mn);return r}be.Cache=mn;var pe=500;function je(n){var t=be(n,(function(n){if(r.size===pe){r.clear()}return n}));var r=t.cache;return t}var me=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var we=/\\(\\)?/g;var ye=je((function(n){var t=[];if(n.charCodeAt(0)===46){t.push("")}n.replace(me,(function(n,r,e,u){t.push(e?u.replace(we,"$1"):r||n)}));return t}));const ge=ye;function Oe(n,t){var r=-1,e=n==null?0:n.length,u=Array(e);while(++r<e){u[r]=t(n[r],r,n)}return u}var Ae=1/0;var _e=e?e.prototype:undefined,xe=_e?_e.toString:undefined;function Ee(n){if(typeof n=="string"){return n}if(Zn(n)){return Oe(n,Ee)+""}if(o(n)){return xe?xe.call(n):""}var t=n+"";return t=="0"&&1/n==-Ae?"-0":t}function Me(n){return n==null?"":Ee(n)}function Fe(n,t){if(Zn(n)){return n}return de(n,t)?[n]:ge(Me(n))}var De=1/0;function Ie(n){if(typeof n=="string"||o(n)){return n}var t=n+"";return t=="0"&&1/n==-De?"-0":t}function Re(n,t){t=Fe(t,n);var r=0,e=t.length;while(n!=null&&r<e){n=n[Ie(t[r++])]}return r&&r==e?n:undefined}function Se(n,t,r){var e=n==null?undefined:Re(n,t);return e===undefined?r:e}function Te(n,t){return n!=null&&t in Object(n)}function Ce(n,t,r){t=Fe(t,n);var e=-1,u=t.length,i=false;while(++e<u){var o=Ie(t[e]);if(!(i=n!=null&&r(n,o))){break}n=n[o]}if(i||++e!=u){return i}u=n==null?0:n.length;return!!u&&Ft(u)&&Et(o,u)&&(Zn(n)||bt(n))}function Pe(n,t){return n!=null&&Ce(n,t,Te)}var Ne=1,Le=2;function Ue(n,t){if(de(n)&&ae(t)){return ce(Ie(n),t)}return function(r){var e=Se(r,n);return e===undefined&&e===t?Pe(r,n):ee(t,e,Ne|Le)}}function ke(n){return n}function $e(n){return function(t){return t==null?undefined:t[n]}}function We(n){return function(t){return Re(t,n)}}function Be(n){return de(n)?$e(Ie(n)):We(n)}function He(n){if(typeof n=="function"){return n}if(n==null){return ke}if(typeof n=="object"){return Zn(n)?Ue(n[0],n[1]):fe(n)}return Be(n)}var Ke=1/0,Ge=17976931348623157e292;function Ve(n){if(!n){return n===0?n:0}n=a(n);if(n===Ke||n===-Ke){var t=n<0?-1:1;return t*Ge}return n===n?n:0}function Xe(n){var t=Ve(n),r=t%1;return t===t?r?t-r:t:0}var ze=Math.max;function qe(n,t,r){var e=n==null?0:n.length;if(!e){return-1}var u=r==null?0:Xe(r);if(u<0){u=ze(e+u,0)}return l(n,He(t),u)}var Je=Math.ceil,Qe=Math.max;function Ye(n,t,r,e){var u=-1,i=Qe(Je((t-n)/(r||1)),0),o=Array(i);while(i--){o[e?i:++u]=n;n+=r}return o}function Ze(t,r,e){if(!n(e)){return false}var u=typeof r;if(u=="number"?Or(e)&&Et(r,e.length):u=="string"&&r in e){return d(e[r],t)}return false}function nu(n){return function(t,r,e){if(e&&typeof e!="number"&&Ze(t,r,e)){r=e=undefined}t=Ve(t);if(r===undefined){r=t;t=0}else{r=Ve(r)}e=e===undefined?t<r?1:-1:Ve(e);return Ye(t,r,e,n)}}var tu=nu();const ru=tu;const eu=(n,t,r)=>{const e=n.get(t);if(!e){n.set(t,[r])}else if(!e.includes(r)){e.push(r)}};const uu=(n,t)=>{let r;return(...e)=>{if(r){clearTimeout(r)}r=setTimeout((()=>{r=0;n(...e)}),t)}};const iu=n=>!("isConnected"in n)||n.isConnected;const ou=uu((n=>{for(let t of n.keys()){n.set(t,n.get(t).filter(iu))}}),2e3);const au=()=>{if(typeof s!=="function"){return{}}const n=new Map;return{dispose:()=>n.clear(),get:t=>{const r=s();if(r){eu(n,t,r)}},set:t=>{const r=n.get(t);if(r){n.set(t,r.filter(c))}ou(n)},reset:()=>{n.forEach((n=>n.forEach(c)));ou(n)}}};const su=n=>typeof n==="function"?n():n;const cu=(n,t=((n,t)=>n!==t))=>{const r=su(n);let e=new Map(Object.entries(r!==null&&r!==void 0?r:{}));const u={dispose:[],get:[],set:[],reset:[]};const i=()=>{var t;e=new Map(Object.entries((t=su(n))!==null&&t!==void 0?t:{}));u.reset.forEach((n=>n()))};const o=()=>{u.dispose.forEach((n=>n()));i()};const a=n=>{u.get.forEach((t=>t(n)));return e.get(n)};const s=(n,r)=>{const i=e.get(n);if(t(r,i,n)){e.set(n,r);u.set.forEach((t=>t(n,r,i)))}};const c=typeof Proxy==="undefined"?{}:new Proxy(r,{get(n,t){return a(t)},ownKeys(n){return Array.from(e.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(n,t){return e.has(t)},set(n,t,r){s(t,r);return true}});const f=(n,t)=>{u[n].push(t);return()=>{fu(u[n],t)}};const l=(t,r)=>{const e=f("set",((n,e)=>{if(n===t){r(e)}}));const u=f("reset",(()=>r(su(n)[t])));return()=>{e();u()}};const v=(...n)=>{const t=n.reduce(((n,t)=>{if(t.set){n.push(f("set",t.set))}if(t.get){n.push(f("get",t.get))}if(t.reset){n.push(f("reset",t.reset))}if(t.dispose){n.push(f("dispose",t.dispose))}return n}),[]);return()=>t.forEach((n=>n()))};const d=n=>{const t=e.get(n);u.set.forEach((r=>r(n,t,t)))};return{state:c,get:a,set:s,on:f,onChange:l,use:v,dispose:o,reset:i,forceUpdate:d}};const fu=(n,t)=>{const r=n.indexOf(t);if(r>=0){n[r]=n[n.length-1];n.length--}};const lu=(n,t)=>{const r=cu(n,t);r.use(au());return r};const vu=n=>({set(t,r){switch(t){case"trimmed":{const t=n.get("proxyItems");const e=du(r);const u=t.filter((n=>!e[n]));n.set("items",u);break}}}});function du(n){const t={};for(let r in n){for(let e in n[r]){t[e]=t[e]||n[r][e]}}return t}function hu(n,t){Object.entries(t).forEach((([t,r])=>{n.set(t,r)}))}const bu=30;const pu=40;const ju="data-rgCol";const mu="data-rgRow";const wu="disabled";const yu="rgCell";const gu="rowHeaders";const Ou="rgHeaderCell";const Au="sortable";const _u="header-rgRow";const xu="actual-rgRow";const Eu="revo-drag-icon";const Mu="revo-draggable";const Fu="focused-cell";const Du="selection-border-range";const Iu="mobile-handler";const Ru="temp-bg-range";const Su="autofill-handle";const Tu="edit-input-wrapper";const Cu="Draggable item";const Pu="__rvgr";const Nu="focused-rgRow";var Lu;(function(n){n[n["MOUSE_LEFT"]=1]="MOUSE_LEFT";n[n["MOUSE_RIGHT"]=3]="MOUSE_RIGHT";n[n["MOUSE_MIDDLE"]=2]="MOUSE_MIDDLE";n[n["BACKSPACE"]=8]="BACKSPACE";n[n["COMMA"]=188]="COMMA";n[n["INSERT"]=45]="INSERT";n[n["DELETE"]=46]="DELETE";n[n["END"]=35]="END";n[n["ENTER"]=13]="ENTER";n[n["ESCAPE"]=27]="ESCAPE";n[n["CONTROL"]=17]="CONTROL";n[n["COMMAND_LEFT"]=91]="COMMAND_LEFT";n[n["COMMAND_RIGHT"]=93]="COMMAND_RIGHT";n[n["COMMAND_FIREFOX"]=224]="COMMAND_FIREFOX";n[n["ALT"]=18]="ALT";n[n["HOME"]=36]="HOME";n[n["PAGE_DOWN"]=34]="PAGE_DOWN";n[n["PAGE_UP"]=33]="PAGE_UP";n[n["PERIOD"]=190]="PERIOD";n[n["SPACE"]=32]="SPACE";n[n["SHIFT"]=16]="SHIFT";n[n["CAPS_LOCK"]=20]="CAPS_LOCK";n[n["TAB"]=9]="TAB";n[n["ARROW_RIGHT"]=39]="ARROW_RIGHT";n[n["ARROW_LEFT"]=37]="ARROW_LEFT";n[n["ARROW_UP"]=38]="ARROW_UP";n[n["ARROW_DOWN"]=40]="ARROW_DOWN";n[n["F1"]=112]="F1";n[n["F2"]=113]="F2";n[n["F3"]=114]="F3";n[n["F4"]=115]="F4";n[n["F5"]=116]="F5";n[n["F6"]=117]="F6";n[n["F7"]=118]="F7";n[n["F8"]=119]="F8";n[n["F9"]=120]="F9";n[n["F10"]=121]="F10";n[n["F11"]=122]="F11";n[n["F12"]=123]="F12";n[n["A"]=65]="A";n[n["C"]=67]="C";n[n["D"]=68]="D";n[n["F"]=70]="F";n[n["L"]=76]="L";n[n["O"]=79]="O";n[n["P"]=80]="P";n[n["S"]=83]="S";n[n["V"]=86]="V";n[n["X"]=88]="X"})(Lu||(Lu={}));var Uu;(function(n){n["ENTER"]="Enter";n["ENTER_NUM"]="NumpadEnter";n["A"]="KeyA";n["C"]="KeyC";n["X"]="KeyX";n["V"]="KeyV";n["ESCAPE"]="Escape";n["TAB"]="Tab";n["BACKSPACE"]="Backspace";n["DELETE"]="Delete";n["ARROW_RIGHT"]="ArrowRight";n["ARROW_LEFT"]="ArrowLeft";n["ARROW_UP"]="ArrowUp";n["ARROW_DOWN"]="ArrowDown";n["SHIFT"]="Shift"})(Uu||(Uu={}));var ku;(function(n){n["ENTER"]="Enter";n["TAB"]="Tab"})(ku||(ku={}));const $u=Lu;var Wu;(function(n){n["mac"]="Mac"})(Wu||(Wu={}));const Bu=Wu;function Hu(n,t=0){const r=[];const e=t+n;for(let n=t;n<e;n++){r.push(n)}return r}function Ku(n,t){return function(r){let e=0;let u=r.length-1;while(e<=u){const i=u+e>>1;const o=t(n,r[i]);if(o>0){e=i+1}else if(o<0){u=i-1}else{return i}}return-e-1}(this)}function Gu(n,t,r){n.splice(Ku.bind(n)(t,r),0,t);return n}function Vu(n,t){return n<t}function Xu(n,t,r=Vu){const e=[];let u=0;let i=0;let o=0;while(o<n.length+t.length){let a=u>=n.length;let s=i>=t.length;if(!a&&(s||r(n[u],t[i]))){e[o]=n[u];u++}else{e[o]=t[i];i++}o++}return e}function zu(n){const t=n.createElement("div");t.style.overflow="scroll";t.style.visibility="hidden";t.style.position="absolute";t.style.top="-9999px";t.style.width="50px";t.style.height="50px";n.body.appendChild(t);const r=t.offsetWidth-t.clientWidth;n.body.removeChild(t);return r}function qu(n,t,r){return(r[1]-r[0])*(n-t[0])/(t[1]-t[0])+r[0]}async function Ju(n=0){await new Promise((t=>{setTimeout((()=>t()),n)}))}function Qu(n,t){t.forEach((t=>{Object.getOwnPropertyNames(t.prototype).forEach((r=>{Object.defineProperty(n.prototype,r,Object.getOwnPropertyDescriptor(t.prototype,r)||Object.create(null))}))}))}class Yu{get store(){return this.dataStore}constructor(n,t){const r=this.dataStore=lu(Object.assign({items:[],proxyItems:[],source:[],groupingDepth:0,groups:{},type:n,trimmed:{},groupingCustomRenderer:undefined},t));r.use(f(r));r.use(vu(r))}updateData(n,t,r=false){if(!r){this.store.set("trimmed",{})}this.store.set("items",[]);const e=ru(0,(n===null||n===void 0?void 0:n.length)||0);hu(this.store,{source:n,proxyItems:[...e]});this.store.set("items",e);if(t){hu(this.store,{groupingDepth:t.depth,groups:t.groups,groupingCustomRenderer:t.customRenderer})}}addTrimmed(n){let t=this.store.get("trimmed");t=Object.assign(Object.assign({},t),n);hu(this.store,{trimmed:t})}setSourceData(n,t=true){ei(this.store,n,t)}setData(n){const t=Object.assign({},n);hu(this.store,t)}refresh(){const n=this.store.get("source");this.store.set("source",[...n])}}function Zu(n,t){const r=n.get("items");return r[t]}function ni(n){const t=n.get("source");return n.get("items").map((n=>t[n]))}const ti=(n,t)=>{const r=n.get("source");return r[ri(n,t)]};const ri=(n,t)=>{const r=n.get("items");return r[t]};function ei(n,t,r=true){const e=n.get("items");const u=n.get("source");for(let n in t){const r=e[n];const i=t[n];u[r]=i}if(r){n.set("source",[...u])}}function ui(n,t,r=true){const e=n.get("source");for(let n in t){e[n]=t[n]}if(r){n.set("source",[...e])}}function ii(n,t){n.set("items",t)}function oi(n,t){const r=n.get("items");const e=n.get("source");const u=qe(e,{prop:t});return r.indexOf(u)}var ai=4294967295,si=ai-1;var ci=Math.floor,fi=Math.min;function li(n,t,r,e){var u=0,i=n==null?0:n.length;if(i===0){return 0}t=r(t);var a=t!==t,s=t===null,c=o(t),f=t===undefined;while(u<i){var l=ci((u+i)/2),v=r(n[l]),d=v!==undefined,h=v===null,b=v===v,p=o(v);if(a){var j=e||b}else if(f){j=b&&(e||d)}else if(s){j=b&&d&&(e||!h)}else if(c){j=b&&d&&!h&&(e||!p)}else if(h||p){j=false}else{j=e?v<=t:v<t}if(j){u=l+1}else{i=l}}return fi(i,si)}var vi=4294967295,di=vi>>>1;function hi(n,t,r){var e=0,u=n==null?e:n.length;if(typeof t=="number"&&t===t&&u<=di){while(e<u){var i=e+u>>>1,a=n[i];if(a!==null&&!o(a)&&(r?a<=t:a<t)){e=i+1}else{u=i}}return u}return li(n,t,ke,r)}function bi(n,t){return hi(n,t)}function pi(n,t={}){const r=[];const e={};const u={};const i=Object.keys(t).map(Number).sort(((n,t)=>n-t));let o;for(let a=0;a<i.length;a++){const s=i[a];const c={itemIndex:s,start:0,end:0};if(o){const t=(s-o.itemIndex-1)*n;c.start=t+o.end}else{c.start=s*n}c.end=c.start+t[s];r.push(c.start);u[s]=e[a]=c;o=c}return{indexes:i,positionIndexes:[...r],positionIndexToItem:Object.assign({},e),indexToItem:u}}const ji=({indexes:n,positionIndexes:t,originItemSize:r,positionIndexToItem:e},u)=>{const i={itemIndex:0,start:0,end:0};const o=n.length?bi(t,u):0;if(!o){i.itemIndex=Math.floor(u/r);i.start=i.itemIndex*r;i.end=i.start+r;return i}const a=e[o-1];if(a.end>u){return a}const s=u-a.end;const c=Math.floor(s/r);i.itemIndex=a.itemIndex+1+c;i.start=a.end+c*r;i.end=i.start+r;return i};function mi(n,t){let r={itemIndex:t,start:0,end:0};if(n.indexToItem[t]){return n.indexToItem[t]}const e=n.indexes.length?bi(n.indexes,t):0;if(!e){r.start=r.itemIndex*n.originItemSize;r.end=r.start+n.originItemSize;return r}const u=n.indexToItem[n.indexes[e-1]];r.start=u.end+(t-u.itemIndex-1)*n.originItemSize;r.end=r.start+n.originItemSize;return r}export{$e as $,gu as A,Au as B,yu as C,Yu as D,_u as E,xu as F,Eu as G,Ou as H,Mu as I,Fu as J,Iu as K,Su as L,bu as M,Tu as N,Cu as O,Pu as P,Nu as Q,pu as R,Du as S,Ru as T,Uu as U,ku as V,lu as W,ke as X,Zn as Y,Xe as Z,Ze as _,ni as a,Or as a0,qr as a1,gr as a2,Ar as a3,He as a4,Bu as a5,$u as a6,qe as a7,X as a8,ti as b,ri as c,ui as d,ii as e,oi as f,Zu as g,du as h,pi as i,ji as j,mi as k,Ku as l,Gu as m,Xu as n,zu as o,f as p,qu as q,Hu as r,ei as s,vu as t,Ju as u,Qu as v,hu as w,ju as x,mu as y,wu as z};
4
+ import { a as isObject, b as baseGetTag, r as root, S as Symbol, i as isObjectLike, f as freeGlobal, c as isSymbol, t as toNumber } from './debounce-b3166f78.js';
5
+ import { g as getRenderingRef, f as forceUpdate } from './index-f6fae858.js';
6
+
7
+ /**
8
+ * Todo:
9
+ * Refactor proxy plugin: when items changed outside proxy get recalculated
10
+ */
11
+ /**
12
+ * Proxy plugin for data source.
13
+ *
14
+ * This plugin is used keep sortint in the data source, even when trimming is applied sorting has to be preserved.
15
+ */
16
+ const proxyPlugin = (store) => ({
17
+ /**
18
+ * Set the value of a property in the store.
19
+ * If the key is 'proxyItems' it will filter the items in the data source according to the new value.
20
+ * The new value should be an array of numbers representing the indexes of the items that should be visible.
21
+ * The method will return a new array of numbers with the indexes of the items that should be visible.
22
+ * The method will also update the 'items' property of the store with the new array.
23
+ */
24
+ set(k, newVal) {
25
+ if (k !== 'proxyItems') {
26
+ return;
27
+ }
28
+ /**
29
+ * Getting existing collection of items (trimmed and filtered)
30
+ * Mark indexes as visible
31
+ */
32
+ const oldItems = store.get('items').reduce((r, v) => {
33
+ r.add(v);
34
+ return r;
35
+ }, new Set());
36
+ /**
37
+ * Check if new values where present in items, keep filtering and trimming
38
+ */
39
+ const newItems = newVal.reduce((r, i) => {
40
+ if (oldItems.has(i)) {
41
+ r.push(i);
42
+ }
43
+ return r;
44
+ }, []);
45
+ store.set('items', newItems);
46
+ },
47
+ });
48
+
49
+ /**
50
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
51
+ * support for iteratee shorthands.
52
+ *
53
+ * @private
54
+ * @param {Array} array The array to inspect.
55
+ * @param {Function} predicate The function invoked per iteration.
56
+ * @param {number} fromIndex The index to search from.
57
+ * @param {boolean} [fromRight] Specify iterating from right to left.
58
+ * @returns {number} Returns the index of the matched value, else `-1`.
59
+ */
60
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
61
+ var length = array.length,
62
+ index = fromIndex + (fromRight ? 1 : -1);
63
+
64
+ while ((fromRight ? index-- : ++index < length)) {
65
+ if (predicate(array[index], index, array)) {
66
+ return index;
67
+ }
68
+ }
69
+ return -1;
70
+ }
71
+
72
+ /**
73
+ * Removes all key-value entries from the list cache.
74
+ *
75
+ * @private
76
+ * @name clear
77
+ * @memberOf ListCache
78
+ */
79
+ function listCacheClear() {
80
+ this.__data__ = [];
81
+ this.size = 0;
82
+ }
83
+
84
+ /**
85
+ * Performs a
86
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
87
+ * comparison between two values to determine if they are equivalent.
88
+ *
89
+ * @static
90
+ * @memberOf _
91
+ * @since 4.0.0
92
+ * @category Lang
93
+ * @param {*} value The value to compare.
94
+ * @param {*} other The other value to compare.
95
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
96
+ * @example
97
+ *
98
+ * var object = { 'a': 1 };
99
+ * var other = { 'a': 1 };
100
+ *
101
+ * _.eq(object, object);
102
+ * // => true
103
+ *
104
+ * _.eq(object, other);
105
+ * // => false
106
+ *
107
+ * _.eq('a', 'a');
108
+ * // => true
109
+ *
110
+ * _.eq('a', Object('a'));
111
+ * // => false
112
+ *
113
+ * _.eq(NaN, NaN);
114
+ * // => true
115
+ */
116
+ function eq(value, other) {
117
+ return value === other || (value !== value && other !== other);
118
+ }
119
+
120
+ /**
121
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
122
+ *
123
+ * @private
124
+ * @param {Array} array The array to inspect.
125
+ * @param {*} key The key to search for.
126
+ * @returns {number} Returns the index of the matched value, else `-1`.
127
+ */
128
+ function assocIndexOf(array, key) {
129
+ var length = array.length;
130
+ while (length--) {
131
+ if (eq(array[length][0], key)) {
132
+ return length;
133
+ }
134
+ }
135
+ return -1;
136
+ }
137
+
138
+ /** Used for built-in method references. */
139
+ var arrayProto = Array.prototype;
140
+
141
+ /** Built-in value references. */
142
+ var splice = arrayProto.splice;
143
+
144
+ /**
145
+ * Removes `key` and its value from the list cache.
146
+ *
147
+ * @private
148
+ * @name delete
149
+ * @memberOf ListCache
150
+ * @param {string} key The key of the value to remove.
151
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
152
+ */
153
+ function listCacheDelete(key) {
154
+ var data = this.__data__,
155
+ index = assocIndexOf(data, key);
156
+
157
+ if (index < 0) {
158
+ return false;
159
+ }
160
+ var lastIndex = data.length - 1;
161
+ if (index == lastIndex) {
162
+ data.pop();
163
+ } else {
164
+ splice.call(data, index, 1);
165
+ }
166
+ --this.size;
167
+ return true;
168
+ }
169
+
170
+ /**
171
+ * Gets the list cache value for `key`.
172
+ *
173
+ * @private
174
+ * @name get
175
+ * @memberOf ListCache
176
+ * @param {string} key The key of the value to get.
177
+ * @returns {*} Returns the entry value.
178
+ */
179
+ function listCacheGet(key) {
180
+ var data = this.__data__,
181
+ index = assocIndexOf(data, key);
182
+
183
+ return index < 0 ? undefined : data[index][1];
184
+ }
185
+
186
+ /**
187
+ * Checks if a list cache value for `key` exists.
188
+ *
189
+ * @private
190
+ * @name has
191
+ * @memberOf ListCache
192
+ * @param {string} key The key of the entry to check.
193
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
194
+ */
195
+ function listCacheHas(key) {
196
+ return assocIndexOf(this.__data__, key) > -1;
197
+ }
198
+
199
+ /**
200
+ * Sets the list cache `key` to `value`.
201
+ *
202
+ * @private
203
+ * @name set
204
+ * @memberOf ListCache
205
+ * @param {string} key The key of the value to set.
206
+ * @param {*} value The value to set.
207
+ * @returns {Object} Returns the list cache instance.
208
+ */
209
+ function listCacheSet(key, value) {
210
+ var data = this.__data__,
211
+ index = assocIndexOf(data, key);
212
+
213
+ if (index < 0) {
214
+ ++this.size;
215
+ data.push([key, value]);
216
+ } else {
217
+ data[index][1] = value;
218
+ }
219
+ return this;
220
+ }
221
+
222
+ /**
223
+ * Creates an list cache object.
224
+ *
225
+ * @private
226
+ * @constructor
227
+ * @param {Array} [entries] The key-value pairs to cache.
228
+ */
229
+ function ListCache(entries) {
230
+ var index = -1,
231
+ length = entries == null ? 0 : entries.length;
232
+
233
+ this.clear();
234
+ while (++index < length) {
235
+ var entry = entries[index];
236
+ this.set(entry[0], entry[1]);
237
+ }
238
+ }
239
+
240
+ // Add methods to `ListCache`.
241
+ ListCache.prototype.clear = listCacheClear;
242
+ ListCache.prototype['delete'] = listCacheDelete;
243
+ ListCache.prototype.get = listCacheGet;
244
+ ListCache.prototype.has = listCacheHas;
245
+ ListCache.prototype.set = listCacheSet;
246
+
247
+ /**
248
+ * Removes all key-value entries from the stack.
249
+ *
250
+ * @private
251
+ * @name clear
252
+ * @memberOf Stack
253
+ */
254
+ function stackClear() {
255
+ this.__data__ = new ListCache;
256
+ this.size = 0;
257
+ }
258
+
259
+ /**
260
+ * Removes `key` and its value from the stack.
261
+ *
262
+ * @private
263
+ * @name delete
264
+ * @memberOf Stack
265
+ * @param {string} key The key of the value to remove.
266
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
267
+ */
268
+ function stackDelete(key) {
269
+ var data = this.__data__,
270
+ result = data['delete'](key);
271
+
272
+ this.size = data.size;
273
+ return result;
274
+ }
275
+
276
+ /**
277
+ * Gets the stack value for `key`.
278
+ *
279
+ * @private
280
+ * @name get
281
+ * @memberOf Stack
282
+ * @param {string} key The key of the value to get.
283
+ * @returns {*} Returns the entry value.
284
+ */
285
+ function stackGet(key) {
286
+ return this.__data__.get(key);
287
+ }
288
+
289
+ /**
290
+ * Checks if a stack value for `key` exists.
291
+ *
292
+ * @private
293
+ * @name has
294
+ * @memberOf Stack
295
+ * @param {string} key The key of the entry to check.
296
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
297
+ */
298
+ function stackHas(key) {
299
+ return this.__data__.has(key);
300
+ }
301
+
302
+ /** `Object#toString` result references. */
303
+ var asyncTag = '[object AsyncFunction]',
304
+ funcTag$1 = '[object Function]',
305
+ genTag = '[object GeneratorFunction]',
306
+ proxyTag = '[object Proxy]';
307
+
308
+ /**
309
+ * Checks if `value` is classified as a `Function` object.
310
+ *
311
+ * @static
312
+ * @memberOf _
313
+ * @since 0.1.0
314
+ * @category Lang
315
+ * @param {*} value The value to check.
316
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
317
+ * @example
318
+ *
319
+ * _.isFunction(_);
320
+ * // => true
321
+ *
322
+ * _.isFunction(/abc/);
323
+ * // => false
324
+ */
325
+ function isFunction(value) {
326
+ if (!isObject(value)) {
327
+ return false;
328
+ }
329
+ // The use of `Object#toString` avoids issues with the `typeof` operator
330
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
331
+ var tag = baseGetTag(value);
332
+ return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
333
+ }
334
+
335
+ /** Used to detect overreaching core-js shims. */
336
+ var coreJsData = root['__core-js_shared__'];
337
+
338
+ const coreJsData$1 = coreJsData;
339
+
340
+ /** Used to detect methods masquerading as native. */
341
+ var maskSrcKey = (function() {
342
+ var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || '');
343
+ return uid ? ('Symbol(src)_1.' + uid) : '';
344
+ }());
345
+
346
+ /**
347
+ * Checks if `func` has its source masked.
348
+ *
349
+ * @private
350
+ * @param {Function} func The function to check.
351
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
352
+ */
353
+ function isMasked(func) {
354
+ return !!maskSrcKey && (maskSrcKey in func);
355
+ }
356
+
357
+ /** Used for built-in method references. */
358
+ var funcProto$1 = Function.prototype;
359
+
360
+ /** Used to resolve the decompiled source of functions. */
361
+ var funcToString$1 = funcProto$1.toString;
362
+
363
+ /**
364
+ * Converts `func` to its source code.
365
+ *
366
+ * @private
367
+ * @param {Function} func The function to convert.
368
+ * @returns {string} Returns the source code.
369
+ */
370
+ function toSource(func) {
371
+ if (func != null) {
372
+ try {
373
+ return funcToString$1.call(func);
374
+ } catch (e) {}
375
+ try {
376
+ return (func + '');
377
+ } catch (e) {}
378
+ }
379
+ return '';
380
+ }
381
+
382
+ /**
383
+ * Used to match `RegExp`
384
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
385
+ */
386
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
387
+
388
+ /** Used to detect host constructors (Safari). */
389
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
390
+
391
+ /** Used for built-in method references. */
392
+ var funcProto = Function.prototype,
393
+ objectProto$9 = Object.prototype;
394
+
395
+ /** Used to resolve the decompiled source of functions. */
396
+ var funcToString = funcProto.toString;
397
+
398
+ /** Used to check objects for own properties. */
399
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
400
+
401
+ /** Used to detect if a method is native. */
402
+ var reIsNative = RegExp('^' +
403
+ funcToString.call(hasOwnProperty$7).replace(reRegExpChar, '\\$&')
404
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
405
+ );
406
+
407
+ /**
408
+ * The base implementation of `_.isNative` without bad shim checks.
409
+ *
410
+ * @private
411
+ * @param {*} value The value to check.
412
+ * @returns {boolean} Returns `true` if `value` is a native function,
413
+ * else `false`.
414
+ */
415
+ function baseIsNative(value) {
416
+ if (!isObject(value) || isMasked(value)) {
417
+ return false;
418
+ }
419
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
420
+ return pattern.test(toSource(value));
421
+ }
422
+
423
+ /**
424
+ * Gets the value at `key` of `object`.
425
+ *
426
+ * @private
427
+ * @param {Object} [object] The object to query.
428
+ * @param {string} key The key of the property to get.
429
+ * @returns {*} Returns the property value.
430
+ */
431
+ function getValue(object, key) {
432
+ return object == null ? undefined : object[key];
433
+ }
434
+
435
+ /**
436
+ * Gets the native function at `key` of `object`.
437
+ *
438
+ * @private
439
+ * @param {Object} object The object to query.
440
+ * @param {string} key The key of the method to get.
441
+ * @returns {*} Returns the function if it's native, else `undefined`.
442
+ */
443
+ function getNative(object, key) {
444
+ var value = getValue(object, key);
445
+ return baseIsNative(value) ? value : undefined;
446
+ }
447
+
448
+ /* Built-in method references that are verified to be native. */
449
+ var Map$1 = getNative(root, 'Map');
450
+
451
+ const Map$2 = Map$1;
452
+
453
+ /* Built-in method references that are verified to be native. */
454
+ var nativeCreate = getNative(Object, 'create');
455
+
456
+ const nativeCreate$1 = nativeCreate;
457
+
458
+ /**
459
+ * Removes all key-value entries from the hash.
460
+ *
461
+ * @private
462
+ * @name clear
463
+ * @memberOf Hash
464
+ */
465
+ function hashClear() {
466
+ this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
467
+ this.size = 0;
468
+ }
469
+
470
+ /**
471
+ * Removes `key` and its value from the hash.
472
+ *
473
+ * @private
474
+ * @name delete
475
+ * @memberOf Hash
476
+ * @param {Object} hash The hash to modify.
477
+ * @param {string} key The key of the value to remove.
478
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
479
+ */
480
+ function hashDelete(key) {
481
+ var result = this.has(key) && delete this.__data__[key];
482
+ this.size -= result ? 1 : 0;
483
+ return result;
484
+ }
485
+
486
+ /** Used to stand-in for `undefined` hash values. */
487
+ var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
488
+
489
+ /** Used for built-in method references. */
490
+ var objectProto$8 = Object.prototype;
491
+
492
+ /** Used to check objects for own properties. */
493
+ var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
494
+
495
+ /**
496
+ * Gets the hash value for `key`.
497
+ *
498
+ * @private
499
+ * @name get
500
+ * @memberOf Hash
501
+ * @param {string} key The key of the value to get.
502
+ * @returns {*} Returns the entry value.
503
+ */
504
+ function hashGet(key) {
505
+ var data = this.__data__;
506
+ if (nativeCreate$1) {
507
+ var result = data[key];
508
+ return result === HASH_UNDEFINED$2 ? undefined : result;
509
+ }
510
+ return hasOwnProperty$6.call(data, key) ? data[key] : undefined;
511
+ }
512
+
513
+ /** Used for built-in method references. */
514
+ var objectProto$7 = Object.prototype;
515
+
516
+ /** Used to check objects for own properties. */
517
+ var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
518
+
519
+ /**
520
+ * Checks if a hash value for `key` exists.
521
+ *
522
+ * @private
523
+ * @name has
524
+ * @memberOf Hash
525
+ * @param {string} key The key of the entry to check.
526
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
527
+ */
528
+ function hashHas(key) {
529
+ var data = this.__data__;
530
+ return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$5.call(data, key);
531
+ }
532
+
533
+ /** Used to stand-in for `undefined` hash values. */
534
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
535
+
536
+ /**
537
+ * Sets the hash `key` to `value`.
538
+ *
539
+ * @private
540
+ * @name set
541
+ * @memberOf Hash
542
+ * @param {string} key The key of the value to set.
543
+ * @param {*} value The value to set.
544
+ * @returns {Object} Returns the hash instance.
545
+ */
546
+ function hashSet(key, value) {
547
+ var data = this.__data__;
548
+ this.size += this.has(key) ? 0 : 1;
549
+ data[key] = (nativeCreate$1 && value === undefined) ? HASH_UNDEFINED$1 : value;
550
+ return this;
551
+ }
552
+
553
+ /**
554
+ * Creates a hash object.
555
+ *
556
+ * @private
557
+ * @constructor
558
+ * @param {Array} [entries] The key-value pairs to cache.
559
+ */
560
+ function Hash(entries) {
561
+ var index = -1,
562
+ length = entries == null ? 0 : entries.length;
563
+
564
+ this.clear();
565
+ while (++index < length) {
566
+ var entry = entries[index];
567
+ this.set(entry[0], entry[1]);
568
+ }
569
+ }
570
+
571
+ // Add methods to `Hash`.
572
+ Hash.prototype.clear = hashClear;
573
+ Hash.prototype['delete'] = hashDelete;
574
+ Hash.prototype.get = hashGet;
575
+ Hash.prototype.has = hashHas;
576
+ Hash.prototype.set = hashSet;
577
+
578
+ /**
579
+ * Removes all key-value entries from the map.
580
+ *
581
+ * @private
582
+ * @name clear
583
+ * @memberOf MapCache
584
+ */
585
+ function mapCacheClear() {
586
+ this.size = 0;
587
+ this.__data__ = {
588
+ 'hash': new Hash,
589
+ 'map': new (Map$2 || ListCache),
590
+ 'string': new Hash
591
+ };
592
+ }
593
+
594
+ /**
595
+ * Checks if `value` is suitable for use as unique object key.
596
+ *
597
+ * @private
598
+ * @param {*} value The value to check.
599
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
600
+ */
601
+ function isKeyable(value) {
602
+ var type = typeof value;
603
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
604
+ ? (value !== '__proto__')
605
+ : (value === null);
606
+ }
607
+
608
+ /**
609
+ * Gets the data for `map`.
610
+ *
611
+ * @private
612
+ * @param {Object} map The map to query.
613
+ * @param {string} key The reference key.
614
+ * @returns {*} Returns the map data.
615
+ */
616
+ function getMapData(map, key) {
617
+ var data = map.__data__;
618
+ return isKeyable(key)
619
+ ? data[typeof key == 'string' ? 'string' : 'hash']
620
+ : data.map;
621
+ }
622
+
623
+ /**
624
+ * Removes `key` and its value from the map.
625
+ *
626
+ * @private
627
+ * @name delete
628
+ * @memberOf MapCache
629
+ * @param {string} key The key of the value to remove.
630
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
631
+ */
632
+ function mapCacheDelete(key) {
633
+ var result = getMapData(this, key)['delete'](key);
634
+ this.size -= result ? 1 : 0;
635
+ return result;
636
+ }
637
+
638
+ /**
639
+ * Gets the map value for `key`.
640
+ *
641
+ * @private
642
+ * @name get
643
+ * @memberOf MapCache
644
+ * @param {string} key The key of the value to get.
645
+ * @returns {*} Returns the entry value.
646
+ */
647
+ function mapCacheGet(key) {
648
+ return getMapData(this, key).get(key);
649
+ }
650
+
651
+ /**
652
+ * Checks if a map value for `key` exists.
653
+ *
654
+ * @private
655
+ * @name has
656
+ * @memberOf MapCache
657
+ * @param {string} key The key of the entry to check.
658
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
659
+ */
660
+ function mapCacheHas(key) {
661
+ return getMapData(this, key).has(key);
662
+ }
663
+
664
+ /**
665
+ * Sets the map `key` to `value`.
666
+ *
667
+ * @private
668
+ * @name set
669
+ * @memberOf MapCache
670
+ * @param {string} key The key of the value to set.
671
+ * @param {*} value The value to set.
672
+ * @returns {Object} Returns the map cache instance.
673
+ */
674
+ function mapCacheSet(key, value) {
675
+ var data = getMapData(this, key),
676
+ size = data.size;
677
+
678
+ data.set(key, value);
679
+ this.size += data.size == size ? 0 : 1;
680
+ return this;
681
+ }
682
+
683
+ /**
684
+ * Creates a map cache object to store key-value pairs.
685
+ *
686
+ * @private
687
+ * @constructor
688
+ * @param {Array} [entries] The key-value pairs to cache.
689
+ */
690
+ function MapCache(entries) {
691
+ var index = -1,
692
+ length = entries == null ? 0 : entries.length;
693
+
694
+ this.clear();
695
+ while (++index < length) {
696
+ var entry = entries[index];
697
+ this.set(entry[0], entry[1]);
698
+ }
699
+ }
700
+
701
+ // Add methods to `MapCache`.
702
+ MapCache.prototype.clear = mapCacheClear;
703
+ MapCache.prototype['delete'] = mapCacheDelete;
704
+ MapCache.prototype.get = mapCacheGet;
705
+ MapCache.prototype.has = mapCacheHas;
706
+ MapCache.prototype.set = mapCacheSet;
707
+
708
+ /** Used as the size to enable large array optimizations. */
709
+ var LARGE_ARRAY_SIZE = 200;
710
+
711
+ /**
712
+ * Sets the stack `key` to `value`.
713
+ *
714
+ * @private
715
+ * @name set
716
+ * @memberOf Stack
717
+ * @param {string} key The key of the value to set.
718
+ * @param {*} value The value to set.
719
+ * @returns {Object} Returns the stack cache instance.
720
+ */
721
+ function stackSet(key, value) {
722
+ var data = this.__data__;
723
+ if (data instanceof ListCache) {
724
+ var pairs = data.__data__;
725
+ if (!Map$2 || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
726
+ pairs.push([key, value]);
727
+ this.size = ++data.size;
728
+ return this;
729
+ }
730
+ data = this.__data__ = new MapCache(pairs);
731
+ }
732
+ data.set(key, value);
733
+ this.size = data.size;
734
+ return this;
735
+ }
736
+
737
+ /**
738
+ * Creates a stack cache object to store key-value pairs.
739
+ *
740
+ * @private
741
+ * @constructor
742
+ * @param {Array} [entries] The key-value pairs to cache.
743
+ */
744
+ function Stack(entries) {
745
+ var data = this.__data__ = new ListCache(entries);
746
+ this.size = data.size;
747
+ }
748
+
749
+ // Add methods to `Stack`.
750
+ Stack.prototype.clear = stackClear;
751
+ Stack.prototype['delete'] = stackDelete;
752
+ Stack.prototype.get = stackGet;
753
+ Stack.prototype.has = stackHas;
754
+ Stack.prototype.set = stackSet;
755
+
756
+ /** Used to stand-in for `undefined` hash values. */
757
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
758
+
759
+ /**
760
+ * Adds `value` to the array cache.
761
+ *
762
+ * @private
763
+ * @name add
764
+ * @memberOf SetCache
765
+ * @alias push
766
+ * @param {*} value The value to cache.
767
+ * @returns {Object} Returns the cache instance.
768
+ */
769
+ function setCacheAdd(value) {
770
+ this.__data__.set(value, HASH_UNDEFINED);
771
+ return this;
772
+ }
773
+
774
+ /**
775
+ * Checks if `value` is in the array cache.
776
+ *
777
+ * @private
778
+ * @name has
779
+ * @memberOf SetCache
780
+ * @param {*} value The value to search for.
781
+ * @returns {number} Returns `true` if `value` is found, else `false`.
782
+ */
783
+ function setCacheHas(value) {
784
+ return this.__data__.has(value);
785
+ }
786
+
787
+ /**
788
+ *
789
+ * Creates an array cache object to store unique values.
790
+ *
791
+ * @private
792
+ * @constructor
793
+ * @param {Array} [values] The values to cache.
794
+ */
795
+ function SetCache(values) {
796
+ var index = -1,
797
+ length = values == null ? 0 : values.length;
798
+
799
+ this.__data__ = new MapCache;
800
+ while (++index < length) {
801
+ this.add(values[index]);
802
+ }
803
+ }
804
+
805
+ // Add methods to `SetCache`.
806
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
807
+ SetCache.prototype.has = setCacheHas;
808
+
809
+ /**
810
+ * A specialized version of `_.some` for arrays without support for iteratee
811
+ * shorthands.
812
+ *
813
+ * @private
814
+ * @param {Array} [array] The array to iterate over.
815
+ * @param {Function} predicate The function invoked per iteration.
816
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
817
+ * else `false`.
818
+ */
819
+ function arraySome(array, predicate) {
820
+ var index = -1,
821
+ length = array == null ? 0 : array.length;
822
+
823
+ while (++index < length) {
824
+ if (predicate(array[index], index, array)) {
825
+ return true;
826
+ }
827
+ }
828
+ return false;
829
+ }
830
+
831
+ /**
832
+ * Checks if a `cache` value for `key` exists.
833
+ *
834
+ * @private
835
+ * @param {Object} cache The cache to query.
836
+ * @param {string} key The key of the entry to check.
837
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
838
+ */
839
+ function cacheHas(cache, key) {
840
+ return cache.has(key);
841
+ }
842
+
843
+ /** Used to compose bitmasks for value comparisons. */
844
+ var COMPARE_PARTIAL_FLAG$5 = 1,
845
+ COMPARE_UNORDERED_FLAG$3 = 2;
846
+
847
+ /**
848
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
849
+ * partial deep comparisons.
850
+ *
851
+ * @private
852
+ * @param {Array} array The array to compare.
853
+ * @param {Array} other The other array to compare.
854
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
855
+ * @param {Function} customizer The function to customize comparisons.
856
+ * @param {Function} equalFunc The function to determine equivalents of values.
857
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
858
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
859
+ */
860
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
861
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5,
862
+ arrLength = array.length,
863
+ othLength = other.length;
864
+
865
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
866
+ return false;
867
+ }
868
+ // Check that cyclic values are equal.
869
+ var arrStacked = stack.get(array);
870
+ var othStacked = stack.get(other);
871
+ if (arrStacked && othStacked) {
872
+ return arrStacked == other && othStacked == array;
873
+ }
874
+ var index = -1,
875
+ result = true,
876
+ seen = (bitmask & COMPARE_UNORDERED_FLAG$3) ? new SetCache : undefined;
877
+
878
+ stack.set(array, other);
879
+ stack.set(other, array);
880
+
881
+ // Ignore non-index properties.
882
+ while (++index < arrLength) {
883
+ var arrValue = array[index],
884
+ othValue = other[index];
885
+
886
+ if (customizer) {
887
+ var compared = isPartial
888
+ ? customizer(othValue, arrValue, index, other, array, stack)
889
+ : customizer(arrValue, othValue, index, array, other, stack);
890
+ }
891
+ if (compared !== undefined) {
892
+ if (compared) {
893
+ continue;
894
+ }
895
+ result = false;
896
+ break;
897
+ }
898
+ // Recursively compare arrays (susceptible to call stack limits).
899
+ if (seen) {
900
+ if (!arraySome(other, function(othValue, othIndex) {
901
+ if (!cacheHas(seen, othIndex) &&
902
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
903
+ return seen.push(othIndex);
904
+ }
905
+ })) {
906
+ result = false;
907
+ break;
908
+ }
909
+ } else if (!(
910
+ arrValue === othValue ||
911
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
912
+ )) {
913
+ result = false;
914
+ break;
915
+ }
916
+ }
917
+ stack['delete'](array);
918
+ stack['delete'](other);
919
+ return result;
920
+ }
921
+
922
+ /** Built-in value references. */
923
+ var Uint8Array = root.Uint8Array;
924
+
925
+ const Uint8Array$1 = Uint8Array;
926
+
927
+ /**
928
+ * Converts `map` to its key-value pairs.
929
+ *
930
+ * @private
931
+ * @param {Object} map The map to convert.
932
+ * @returns {Array} Returns the key-value pairs.
933
+ */
934
+ function mapToArray(map) {
935
+ var index = -1,
936
+ result = Array(map.size);
937
+
938
+ map.forEach(function(value, key) {
939
+ result[++index] = [key, value];
940
+ });
941
+ return result;
942
+ }
943
+
944
+ /**
945
+ * Converts `set` to an array of its values.
946
+ *
947
+ * @private
948
+ * @param {Object} set The set to convert.
949
+ * @returns {Array} Returns the values.
950
+ */
951
+ function setToArray(set) {
952
+ var index = -1,
953
+ result = Array(set.size);
954
+
955
+ set.forEach(function(value) {
956
+ result[++index] = value;
957
+ });
958
+ return result;
959
+ }
960
+
961
+ /** Used to compose bitmasks for value comparisons. */
962
+ var COMPARE_PARTIAL_FLAG$4 = 1,
963
+ COMPARE_UNORDERED_FLAG$2 = 2;
964
+
965
+ /** `Object#toString` result references. */
966
+ var boolTag$1 = '[object Boolean]',
967
+ dateTag$1 = '[object Date]',
968
+ errorTag$1 = '[object Error]',
969
+ mapTag$2 = '[object Map]',
970
+ numberTag$1 = '[object Number]',
971
+ regexpTag$1 = '[object RegExp]',
972
+ setTag$2 = '[object Set]',
973
+ stringTag$1 = '[object String]',
974
+ symbolTag = '[object Symbol]';
975
+
976
+ var arrayBufferTag$1 = '[object ArrayBuffer]',
977
+ dataViewTag$2 = '[object DataView]';
978
+
979
+ /** Used to convert symbols to primitives and strings. */
980
+ var symbolProto$1 = Symbol ? Symbol.prototype : undefined,
981
+ symbolValueOf = symbolProto$1 ? symbolProto$1.valueOf : undefined;
982
+
983
+ /**
984
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
985
+ * the same `toStringTag`.
986
+ *
987
+ * **Note:** This function only supports comparing values with tags of
988
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
989
+ *
990
+ * @private
991
+ * @param {Object} object The object to compare.
992
+ * @param {Object} other The other object to compare.
993
+ * @param {string} tag The `toStringTag` of the objects to compare.
994
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
995
+ * @param {Function} customizer The function to customize comparisons.
996
+ * @param {Function} equalFunc The function to determine equivalents of values.
997
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
998
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
999
+ */
1000
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
1001
+ switch (tag) {
1002
+ case dataViewTag$2:
1003
+ if ((object.byteLength != other.byteLength) ||
1004
+ (object.byteOffset != other.byteOffset)) {
1005
+ return false;
1006
+ }
1007
+ object = object.buffer;
1008
+ other = other.buffer;
1009
+
1010
+ case arrayBufferTag$1:
1011
+ if ((object.byteLength != other.byteLength) ||
1012
+ !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
1013
+ return false;
1014
+ }
1015
+ return true;
1016
+
1017
+ case boolTag$1:
1018
+ case dateTag$1:
1019
+ case numberTag$1:
1020
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
1021
+ // Invalid dates are coerced to `NaN`.
1022
+ return eq(+object, +other);
1023
+
1024
+ case errorTag$1:
1025
+ return object.name == other.name && object.message == other.message;
1026
+
1027
+ case regexpTag$1:
1028
+ case stringTag$1:
1029
+ // Coerce regexes to strings and treat strings, primitives and objects,
1030
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
1031
+ // for more details.
1032
+ return object == (other + '');
1033
+
1034
+ case mapTag$2:
1035
+ var convert = mapToArray;
1036
+
1037
+ case setTag$2:
1038
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
1039
+ convert || (convert = setToArray);
1040
+
1041
+ if (object.size != other.size && !isPartial) {
1042
+ return false;
1043
+ }
1044
+ // Assume cyclic values are equal.
1045
+ var stacked = stack.get(object);
1046
+ if (stacked) {
1047
+ return stacked == other;
1048
+ }
1049
+ bitmask |= COMPARE_UNORDERED_FLAG$2;
1050
+
1051
+ // Recursively compare objects (susceptible to call stack limits).
1052
+ stack.set(object, other);
1053
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
1054
+ stack['delete'](object);
1055
+ return result;
1056
+
1057
+ case symbolTag:
1058
+ if (symbolValueOf) {
1059
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
1060
+ }
1061
+ }
1062
+ return false;
1063
+ }
1064
+
1065
+ /**
1066
+ * Appends the elements of `values` to `array`.
1067
+ *
1068
+ * @private
1069
+ * @param {Array} array The array to modify.
1070
+ * @param {Array} values The values to append.
1071
+ * @returns {Array} Returns `array`.
1072
+ */
1073
+ function arrayPush(array, values) {
1074
+ var index = -1,
1075
+ length = values.length,
1076
+ offset = array.length;
1077
+
1078
+ while (++index < length) {
1079
+ array[offset + index] = values[index];
1080
+ }
1081
+ return array;
1082
+ }
1083
+
1084
+ /**
1085
+ * Checks if `value` is classified as an `Array` object.
1086
+ *
1087
+ * @static
1088
+ * @memberOf _
1089
+ * @since 0.1.0
1090
+ * @category Lang
1091
+ * @param {*} value The value to check.
1092
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
1093
+ * @example
1094
+ *
1095
+ * _.isArray([1, 2, 3]);
1096
+ * // => true
1097
+ *
1098
+ * _.isArray(document.body.children);
1099
+ * // => false
1100
+ *
1101
+ * _.isArray('abc');
1102
+ * // => false
1103
+ *
1104
+ * _.isArray(_.noop);
1105
+ * // => false
1106
+ */
1107
+ var isArray = Array.isArray;
1108
+
1109
+ const isArray$1 = isArray;
1110
+
1111
+ /**
1112
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
1113
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
1114
+ * symbols of `object`.
1115
+ *
1116
+ * @private
1117
+ * @param {Object} object The object to query.
1118
+ * @param {Function} keysFunc The function to get the keys of `object`.
1119
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
1120
+ * @returns {Array} Returns the array of property names and symbols.
1121
+ */
1122
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
1123
+ var result = keysFunc(object);
1124
+ return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
1125
+ }
1126
+
1127
+ /**
1128
+ * A specialized version of `_.filter` for arrays without support for
1129
+ * iteratee shorthands.
1130
+ *
1131
+ * @private
1132
+ * @param {Array} [array] The array to iterate over.
1133
+ * @param {Function} predicate The function invoked per iteration.
1134
+ * @returns {Array} Returns the new filtered array.
1135
+ */
1136
+ function arrayFilter(array, predicate) {
1137
+ var index = -1,
1138
+ length = array == null ? 0 : array.length,
1139
+ resIndex = 0,
1140
+ result = [];
1141
+
1142
+ while (++index < length) {
1143
+ var value = array[index];
1144
+ if (predicate(value, index, array)) {
1145
+ result[resIndex++] = value;
1146
+ }
1147
+ }
1148
+ return result;
1149
+ }
1150
+
1151
+ /**
1152
+ * This method returns a new empty array.
1153
+ *
1154
+ * @static
1155
+ * @memberOf _
1156
+ * @since 4.13.0
1157
+ * @category Util
1158
+ * @returns {Array} Returns the new empty array.
1159
+ * @example
1160
+ *
1161
+ * var arrays = _.times(2, _.stubArray);
1162
+ *
1163
+ * console.log(arrays);
1164
+ * // => [[], []]
1165
+ *
1166
+ * console.log(arrays[0] === arrays[1]);
1167
+ * // => false
1168
+ */
1169
+ function stubArray() {
1170
+ return [];
1171
+ }
1172
+
1173
+ /** Used for built-in method references. */
1174
+ var objectProto$6 = Object.prototype;
1175
+
1176
+ /** Built-in value references. */
1177
+ var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
1178
+
1179
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1180
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
1181
+
1182
+ /**
1183
+ * Creates an array of the own enumerable symbols of `object`.
1184
+ *
1185
+ * @private
1186
+ * @param {Object} object The object to query.
1187
+ * @returns {Array} Returns the array of symbols.
1188
+ */
1189
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
1190
+ if (object == null) {
1191
+ return [];
1192
+ }
1193
+ object = Object(object);
1194
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
1195
+ return propertyIsEnumerable$1.call(object, symbol);
1196
+ });
1197
+ };
1198
+
1199
+ const getSymbols$1 = getSymbols;
1200
+
1201
+ /**
1202
+ * The base implementation of `_.times` without support for iteratee shorthands
1203
+ * or max array length checks.
1204
+ *
1205
+ * @private
1206
+ * @param {number} n The number of times to invoke `iteratee`.
1207
+ * @param {Function} iteratee The function invoked per iteration.
1208
+ * @returns {Array} Returns the array of results.
1209
+ */
1210
+ function baseTimes(n, iteratee) {
1211
+ var index = -1,
1212
+ result = Array(n);
1213
+
1214
+ while (++index < n) {
1215
+ result[index] = iteratee(index);
1216
+ }
1217
+ return result;
1218
+ }
1219
+
1220
+ /** `Object#toString` result references. */
1221
+ var argsTag$2 = '[object Arguments]';
1222
+
1223
+ /**
1224
+ * The base implementation of `_.isArguments`.
1225
+ *
1226
+ * @private
1227
+ * @param {*} value The value to check.
1228
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1229
+ */
1230
+ function baseIsArguments(value) {
1231
+ return isObjectLike(value) && baseGetTag(value) == argsTag$2;
1232
+ }
1233
+
1234
+ /** Used for built-in method references. */
1235
+ var objectProto$5 = Object.prototype;
1236
+
1237
+ /** Used to check objects for own properties. */
1238
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
1239
+
1240
+ /** Built-in value references. */
1241
+ var propertyIsEnumerable = objectProto$5.propertyIsEnumerable;
1242
+
1243
+ /**
1244
+ * Checks if `value` is likely an `arguments` object.
1245
+ *
1246
+ * @static
1247
+ * @memberOf _
1248
+ * @since 0.1.0
1249
+ * @category Lang
1250
+ * @param {*} value The value to check.
1251
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1252
+ * else `false`.
1253
+ * @example
1254
+ *
1255
+ * _.isArguments(function() { return arguments; }());
1256
+ * // => true
1257
+ *
1258
+ * _.isArguments([1, 2, 3]);
1259
+ * // => false
1260
+ */
1261
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
1262
+ return isObjectLike(value) && hasOwnProperty$4.call(value, 'callee') &&
1263
+ !propertyIsEnumerable.call(value, 'callee');
1264
+ };
1265
+
1266
+ const isArguments$1 = isArguments;
1267
+
1268
+ /**
1269
+ * This method returns `false`.
1270
+ *
1271
+ * @static
1272
+ * @memberOf _
1273
+ * @since 4.13.0
1274
+ * @category Util
1275
+ * @returns {boolean} Returns `false`.
1276
+ * @example
1277
+ *
1278
+ * _.times(2, _.stubFalse);
1279
+ * // => [false, false]
1280
+ */
1281
+ function stubFalse() {
1282
+ return false;
1283
+ }
1284
+
1285
+ /** Detect free variable `exports`. */
1286
+ var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;
1287
+
1288
+ /** Detect free variable `module`. */
1289
+ var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module;
1290
+
1291
+ /** Detect the popular CommonJS extension `module.exports`. */
1292
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
1293
+
1294
+ /** Built-in value references. */
1295
+ var Buffer = moduleExports$1 ? root.Buffer : undefined;
1296
+
1297
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1298
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
1299
+
1300
+ /**
1301
+ * Checks if `value` is a buffer.
1302
+ *
1303
+ * @static
1304
+ * @memberOf _
1305
+ * @since 4.3.0
1306
+ * @category Lang
1307
+ * @param {*} value The value to check.
1308
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
1309
+ * @example
1310
+ *
1311
+ * _.isBuffer(new Buffer(2));
1312
+ * // => true
1313
+ *
1314
+ * _.isBuffer(new Uint8Array(2));
1315
+ * // => false
1316
+ */
1317
+ var isBuffer = nativeIsBuffer || stubFalse;
1318
+
1319
+ const isBuffer$1 = isBuffer;
1320
+
1321
+ /** Used as references for various `Number` constants. */
1322
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
1323
+
1324
+ /** Used to detect unsigned integer values. */
1325
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
1326
+
1327
+ /**
1328
+ * Checks if `value` is a valid array-like index.
1329
+ *
1330
+ * @private
1331
+ * @param {*} value The value to check.
1332
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1333
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1334
+ */
1335
+ function isIndex(value, length) {
1336
+ var type = typeof value;
1337
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
1338
+
1339
+ return !!length &&
1340
+ (type == 'number' ||
1341
+ (type != 'symbol' && reIsUint.test(value))) &&
1342
+ (value > -1 && value % 1 == 0 && value < length);
1343
+ }
1344
+
1345
+ /** Used as references for various `Number` constants. */
1346
+ var MAX_SAFE_INTEGER = 9007199254740991;
1347
+
1348
+ /**
1349
+ * Checks if `value` is a valid array-like length.
1350
+ *
1351
+ * **Note:** This method is loosely based on
1352
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1353
+ *
1354
+ * @static
1355
+ * @memberOf _
1356
+ * @since 4.0.0
1357
+ * @category Lang
1358
+ * @param {*} value The value to check.
1359
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1360
+ * @example
1361
+ *
1362
+ * _.isLength(3);
1363
+ * // => true
1364
+ *
1365
+ * _.isLength(Number.MIN_VALUE);
1366
+ * // => false
1367
+ *
1368
+ * _.isLength(Infinity);
1369
+ * // => false
1370
+ *
1371
+ * _.isLength('3');
1372
+ * // => false
1373
+ */
1374
+ function isLength(value) {
1375
+ return typeof value == 'number' &&
1376
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
1377
+ }
1378
+
1379
+ /** `Object#toString` result references. */
1380
+ var argsTag$1 = '[object Arguments]',
1381
+ arrayTag$1 = '[object Array]',
1382
+ boolTag = '[object Boolean]',
1383
+ dateTag = '[object Date]',
1384
+ errorTag = '[object Error]',
1385
+ funcTag = '[object Function]',
1386
+ mapTag$1 = '[object Map]',
1387
+ numberTag = '[object Number]',
1388
+ objectTag$2 = '[object Object]',
1389
+ regexpTag = '[object RegExp]',
1390
+ setTag$1 = '[object Set]',
1391
+ stringTag = '[object String]',
1392
+ weakMapTag$1 = '[object WeakMap]';
1393
+
1394
+ var arrayBufferTag = '[object ArrayBuffer]',
1395
+ dataViewTag$1 = '[object DataView]',
1396
+ float32Tag = '[object Float32Array]',
1397
+ float64Tag = '[object Float64Array]',
1398
+ int8Tag = '[object Int8Array]',
1399
+ int16Tag = '[object Int16Array]',
1400
+ int32Tag = '[object Int32Array]',
1401
+ uint8Tag = '[object Uint8Array]',
1402
+ uint8ClampedTag = '[object Uint8ClampedArray]',
1403
+ uint16Tag = '[object Uint16Array]',
1404
+ uint32Tag = '[object Uint32Array]';
1405
+
1406
+ /** Used to identify `toStringTag` values of typed arrays. */
1407
+ var typedArrayTags = {};
1408
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
1409
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
1410
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
1411
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
1412
+ typedArrayTags[uint32Tag] = true;
1413
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
1414
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
1415
+ typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] =
1416
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
1417
+ typedArrayTags[mapTag$1] = typedArrayTags[numberTag] =
1418
+ typedArrayTags[objectTag$2] = typedArrayTags[regexpTag] =
1419
+ typedArrayTags[setTag$1] = typedArrayTags[stringTag] =
1420
+ typedArrayTags[weakMapTag$1] = false;
1421
+
1422
+ /**
1423
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
1424
+ *
1425
+ * @private
1426
+ * @param {*} value The value to check.
1427
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1428
+ */
1429
+ function baseIsTypedArray(value) {
1430
+ return isObjectLike(value) &&
1431
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
1432
+ }
1433
+
1434
+ /**
1435
+ * The base implementation of `_.unary` without support for storing metadata.
1436
+ *
1437
+ * @private
1438
+ * @param {Function} func The function to cap arguments for.
1439
+ * @returns {Function} Returns the new capped function.
1440
+ */
1441
+ function baseUnary(func) {
1442
+ return function(value) {
1443
+ return func(value);
1444
+ };
1445
+ }
1446
+
1447
+ /** Detect free variable `exports`. */
1448
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
1449
+
1450
+ /** Detect free variable `module`. */
1451
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
1452
+
1453
+ /** Detect the popular CommonJS extension `module.exports`. */
1454
+ var moduleExports = freeModule && freeModule.exports === freeExports;
1455
+
1456
+ /** Detect free variable `process` from Node.js. */
1457
+ var freeProcess = moduleExports && freeGlobal.process;
1458
+
1459
+ /** Used to access faster Node.js helpers. */
1460
+ var nodeUtil = (function() {
1461
+ try {
1462
+ // Use `util.types` for Node.js 10+.
1463
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
1464
+
1465
+ if (types) {
1466
+ return types;
1467
+ }
1468
+
1469
+ // Legacy `process.binding('util')` for Node.js < 10.
1470
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
1471
+ } catch (e) {}
1472
+ }());
1473
+
1474
+ const nodeUtil$1 = nodeUtil;
1475
+
1476
+ /* Node.js helper references. */
1477
+ var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
1478
+
1479
+ /**
1480
+ * Checks if `value` is classified as a typed array.
1481
+ *
1482
+ * @static
1483
+ * @memberOf _
1484
+ * @since 3.0.0
1485
+ * @category Lang
1486
+ * @param {*} value The value to check.
1487
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1488
+ * @example
1489
+ *
1490
+ * _.isTypedArray(new Uint8Array);
1491
+ * // => true
1492
+ *
1493
+ * _.isTypedArray([]);
1494
+ * // => false
1495
+ */
1496
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
1497
+
1498
+ const isTypedArray$1 = isTypedArray;
1499
+
1500
+ /** Used for built-in method references. */
1501
+ var objectProto$4 = Object.prototype;
1502
+
1503
+ /** Used to check objects for own properties. */
1504
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
1505
+
1506
+ /**
1507
+ * Creates an array of the enumerable property names of the array-like `value`.
1508
+ *
1509
+ * @private
1510
+ * @param {*} value The value to query.
1511
+ * @param {boolean} inherited Specify returning inherited property names.
1512
+ * @returns {Array} Returns the array of property names.
1513
+ */
1514
+ function arrayLikeKeys(value, inherited) {
1515
+ var isArr = isArray$1(value),
1516
+ isArg = !isArr && isArguments$1(value),
1517
+ isBuff = !isArr && !isArg && isBuffer$1(value),
1518
+ isType = !isArr && !isArg && !isBuff && isTypedArray$1(value),
1519
+ skipIndexes = isArr || isArg || isBuff || isType,
1520
+ result = skipIndexes ? baseTimes(value.length, String) : [],
1521
+ length = result.length;
1522
+
1523
+ for (var key in value) {
1524
+ if ((inherited || hasOwnProperty$3.call(value, key)) &&
1525
+ !(skipIndexes && (
1526
+ // Safari 9 has enumerable `arguments.length` in strict mode.
1527
+ key == 'length' ||
1528
+ // Node.js 0.10 has enumerable non-index properties on buffers.
1529
+ (isBuff && (key == 'offset' || key == 'parent')) ||
1530
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
1531
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
1532
+ // Skip index properties.
1533
+ isIndex(key, length)
1534
+ ))) {
1535
+ result.push(key);
1536
+ }
1537
+ }
1538
+ return result;
1539
+ }
1540
+
1541
+ /** Used for built-in method references. */
1542
+ var objectProto$3 = Object.prototype;
1543
+
1544
+ /**
1545
+ * Checks if `value` is likely a prototype object.
1546
+ *
1547
+ * @private
1548
+ * @param {*} value The value to check.
1549
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1550
+ */
1551
+ function isPrototype(value) {
1552
+ var Ctor = value && value.constructor,
1553
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$3;
1554
+
1555
+ return value === proto;
1556
+ }
1557
+
1558
+ /**
1559
+ * Creates a unary function that invokes `func` with its argument transformed.
1560
+ *
1561
+ * @private
1562
+ * @param {Function} func The function to wrap.
1563
+ * @param {Function} transform The argument transform.
1564
+ * @returns {Function} Returns the new function.
1565
+ */
1566
+ function overArg(func, transform) {
1567
+ return function(arg) {
1568
+ return func(transform(arg));
1569
+ };
1570
+ }
1571
+
1572
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1573
+ var nativeKeys = overArg(Object.keys, Object);
1574
+
1575
+ const nativeKeys$1 = nativeKeys;
1576
+
1577
+ /** Used for built-in method references. */
1578
+ var objectProto$2 = Object.prototype;
1579
+
1580
+ /** Used to check objects for own properties. */
1581
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
1582
+
1583
+ /**
1584
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
1585
+ *
1586
+ * @private
1587
+ * @param {Object} object The object to query.
1588
+ * @returns {Array} Returns the array of property names.
1589
+ */
1590
+ function baseKeys(object) {
1591
+ if (!isPrototype(object)) {
1592
+ return nativeKeys$1(object);
1593
+ }
1594
+ var result = [];
1595
+ for (var key in Object(object)) {
1596
+ if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
1597
+ result.push(key);
1598
+ }
1599
+ }
1600
+ return result;
1601
+ }
1602
+
1603
+ /**
1604
+ * Checks if `value` is array-like. A value is considered array-like if it's
1605
+ * not a function and has a `value.length` that's an integer greater than or
1606
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
1607
+ *
1608
+ * @static
1609
+ * @memberOf _
1610
+ * @since 4.0.0
1611
+ * @category Lang
1612
+ * @param {*} value The value to check.
1613
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
1614
+ * @example
1615
+ *
1616
+ * _.isArrayLike([1, 2, 3]);
1617
+ * // => true
1618
+ *
1619
+ * _.isArrayLike(document.body.children);
1620
+ * // => true
1621
+ *
1622
+ * _.isArrayLike('abc');
1623
+ * // => true
1624
+ *
1625
+ * _.isArrayLike(_.noop);
1626
+ * // => false
1627
+ */
1628
+ function isArrayLike(value) {
1629
+ return value != null && isLength(value.length) && !isFunction(value);
1630
+ }
1631
+
1632
+ /**
1633
+ * Creates an array of the own enumerable property names of `object`.
1634
+ *
1635
+ * **Note:** Non-object values are coerced to objects. See the
1636
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1637
+ * for more details.
1638
+ *
1639
+ * @static
1640
+ * @since 0.1.0
1641
+ * @memberOf _
1642
+ * @category Object
1643
+ * @param {Object} object The object to query.
1644
+ * @returns {Array} Returns the array of property names.
1645
+ * @example
1646
+ *
1647
+ * function Foo() {
1648
+ * this.a = 1;
1649
+ * this.b = 2;
1650
+ * }
1651
+ *
1652
+ * Foo.prototype.c = 3;
1653
+ *
1654
+ * _.keys(new Foo);
1655
+ * // => ['a', 'b'] (iteration order is not guaranteed)
1656
+ *
1657
+ * _.keys('hi');
1658
+ * // => ['0', '1']
1659
+ */
1660
+ function keys(object) {
1661
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
1662
+ }
1663
+
1664
+ /**
1665
+ * Creates an array of own enumerable property names and symbols of `object`.
1666
+ *
1667
+ * @private
1668
+ * @param {Object} object The object to query.
1669
+ * @returns {Array} Returns the array of property names and symbols.
1670
+ */
1671
+ function getAllKeys(object) {
1672
+ return baseGetAllKeys(object, keys, getSymbols$1);
1673
+ }
1674
+
1675
+ /** Used to compose bitmasks for value comparisons. */
1676
+ var COMPARE_PARTIAL_FLAG$3 = 1;
1677
+
1678
+ /** Used for built-in method references. */
1679
+ var objectProto$1 = Object.prototype;
1680
+
1681
+ /** Used to check objects for own properties. */
1682
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
1683
+
1684
+ /**
1685
+ * A specialized version of `baseIsEqualDeep` for objects with support for
1686
+ * partial deep comparisons.
1687
+ *
1688
+ * @private
1689
+ * @param {Object} object The object to compare.
1690
+ * @param {Object} other The other object to compare.
1691
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
1692
+ * @param {Function} customizer The function to customize comparisons.
1693
+ * @param {Function} equalFunc The function to determine equivalents of values.
1694
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
1695
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
1696
+ */
1697
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
1698
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
1699
+ objProps = getAllKeys(object),
1700
+ objLength = objProps.length,
1701
+ othProps = getAllKeys(other),
1702
+ othLength = othProps.length;
1703
+
1704
+ if (objLength != othLength && !isPartial) {
1705
+ return false;
1706
+ }
1707
+ var index = objLength;
1708
+ while (index--) {
1709
+ var key = objProps[index];
1710
+ if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
1711
+ return false;
1712
+ }
1713
+ }
1714
+ // Check that cyclic values are equal.
1715
+ var objStacked = stack.get(object);
1716
+ var othStacked = stack.get(other);
1717
+ if (objStacked && othStacked) {
1718
+ return objStacked == other && othStacked == object;
1719
+ }
1720
+ var result = true;
1721
+ stack.set(object, other);
1722
+ stack.set(other, object);
1723
+
1724
+ var skipCtor = isPartial;
1725
+ while (++index < objLength) {
1726
+ key = objProps[index];
1727
+ var objValue = object[key],
1728
+ othValue = other[key];
1729
+
1730
+ if (customizer) {
1731
+ var compared = isPartial
1732
+ ? customizer(othValue, objValue, key, other, object, stack)
1733
+ : customizer(objValue, othValue, key, object, other, stack);
1734
+ }
1735
+ // Recursively compare objects (susceptible to call stack limits).
1736
+ if (!(compared === undefined
1737
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
1738
+ : compared
1739
+ )) {
1740
+ result = false;
1741
+ break;
1742
+ }
1743
+ skipCtor || (skipCtor = key == 'constructor');
1744
+ }
1745
+ if (result && !skipCtor) {
1746
+ var objCtor = object.constructor,
1747
+ othCtor = other.constructor;
1748
+
1749
+ // Non `Object` object instances with different constructors are not equal.
1750
+ if (objCtor != othCtor &&
1751
+ ('constructor' in object && 'constructor' in other) &&
1752
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
1753
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
1754
+ result = false;
1755
+ }
1756
+ }
1757
+ stack['delete'](object);
1758
+ stack['delete'](other);
1759
+ return result;
1760
+ }
1761
+
1762
+ /* Built-in method references that are verified to be native. */
1763
+ var DataView = getNative(root, 'DataView');
1764
+
1765
+ const DataView$1 = DataView;
1766
+
1767
+ /* Built-in method references that are verified to be native. */
1768
+ var Promise$1 = getNative(root, 'Promise');
1769
+
1770
+ const Promise$2 = Promise$1;
1771
+
1772
+ /* Built-in method references that are verified to be native. */
1773
+ var Set$1 = getNative(root, 'Set');
1774
+
1775
+ const Set$2 = Set$1;
1776
+
1777
+ /* Built-in method references that are verified to be native. */
1778
+ var WeakMap = getNative(root, 'WeakMap');
1779
+
1780
+ const WeakMap$1 = WeakMap;
1781
+
1782
+ /** `Object#toString` result references. */
1783
+ var mapTag = '[object Map]',
1784
+ objectTag$1 = '[object Object]',
1785
+ promiseTag = '[object Promise]',
1786
+ setTag = '[object Set]',
1787
+ weakMapTag = '[object WeakMap]';
1788
+
1789
+ var dataViewTag = '[object DataView]';
1790
+
1791
+ /** Used to detect maps, sets, and weakmaps. */
1792
+ var dataViewCtorString = toSource(DataView$1),
1793
+ mapCtorString = toSource(Map$2),
1794
+ promiseCtorString = toSource(Promise$2),
1795
+ setCtorString = toSource(Set$2),
1796
+ weakMapCtorString = toSource(WeakMap$1);
1797
+
1798
+ /**
1799
+ * Gets the `toStringTag` of `value`.
1800
+ *
1801
+ * @private
1802
+ * @param {*} value The value to query.
1803
+ * @returns {string} Returns the `toStringTag`.
1804
+ */
1805
+ var getTag = baseGetTag;
1806
+
1807
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
1808
+ if ((DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag) ||
1809
+ (Map$2 && getTag(new Map$2) != mapTag) ||
1810
+ (Promise$2 && getTag(Promise$2.resolve()) != promiseTag) ||
1811
+ (Set$2 && getTag(new Set$2) != setTag) ||
1812
+ (WeakMap$1 && getTag(new WeakMap$1) != weakMapTag)) {
1813
+ getTag = function(value) {
1814
+ var result = baseGetTag(value),
1815
+ Ctor = result == objectTag$1 ? value.constructor : undefined,
1816
+ ctorString = Ctor ? toSource(Ctor) : '';
1817
+
1818
+ if (ctorString) {
1819
+ switch (ctorString) {
1820
+ case dataViewCtorString: return dataViewTag;
1821
+ case mapCtorString: return mapTag;
1822
+ case promiseCtorString: return promiseTag;
1823
+ case setCtorString: return setTag;
1824
+ case weakMapCtorString: return weakMapTag;
1825
+ }
1826
+ }
1827
+ return result;
1828
+ };
1829
+ }
1830
+
1831
+ const getTag$1 = getTag;
1832
+
1833
+ /** Used to compose bitmasks for value comparisons. */
1834
+ var COMPARE_PARTIAL_FLAG$2 = 1;
1835
+
1836
+ /** `Object#toString` result references. */
1837
+ var argsTag = '[object Arguments]',
1838
+ arrayTag = '[object Array]',
1839
+ objectTag = '[object Object]';
1840
+
1841
+ /** Used for built-in method references. */
1842
+ var objectProto = Object.prototype;
1843
+
1844
+ /** Used to check objects for own properties. */
1845
+ var hasOwnProperty = objectProto.hasOwnProperty;
1846
+
1847
+ /**
1848
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
1849
+ * deep comparisons and tracks traversed objects enabling objects with circular
1850
+ * references to be compared.
1851
+ *
1852
+ * @private
1853
+ * @param {Object} object The object to compare.
1854
+ * @param {Object} other The other object to compare.
1855
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
1856
+ * @param {Function} customizer The function to customize comparisons.
1857
+ * @param {Function} equalFunc The function to determine equivalents of values.
1858
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
1859
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
1860
+ */
1861
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
1862
+ var objIsArr = isArray$1(object),
1863
+ othIsArr = isArray$1(other),
1864
+ objTag = objIsArr ? arrayTag : getTag$1(object),
1865
+ othTag = othIsArr ? arrayTag : getTag$1(other);
1866
+
1867
+ objTag = objTag == argsTag ? objectTag : objTag;
1868
+ othTag = othTag == argsTag ? objectTag : othTag;
1869
+
1870
+ var objIsObj = objTag == objectTag,
1871
+ othIsObj = othTag == objectTag,
1872
+ isSameTag = objTag == othTag;
1873
+
1874
+ if (isSameTag && isBuffer$1(object)) {
1875
+ if (!isBuffer$1(other)) {
1876
+ return false;
1877
+ }
1878
+ objIsArr = true;
1879
+ objIsObj = false;
1880
+ }
1881
+ if (isSameTag && !objIsObj) {
1882
+ stack || (stack = new Stack);
1883
+ return (objIsArr || isTypedArray$1(object))
1884
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
1885
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
1886
+ }
1887
+ if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
1888
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
1889
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
1890
+
1891
+ if (objIsWrapped || othIsWrapped) {
1892
+ var objUnwrapped = objIsWrapped ? object.value() : object,
1893
+ othUnwrapped = othIsWrapped ? other.value() : other;
1894
+
1895
+ stack || (stack = new Stack);
1896
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
1897
+ }
1898
+ }
1899
+ if (!isSameTag) {
1900
+ return false;
1901
+ }
1902
+ stack || (stack = new Stack);
1903
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
1904
+ }
1905
+
1906
+ /**
1907
+ * The base implementation of `_.isEqual` which supports partial comparisons
1908
+ * and tracks traversed objects.
1909
+ *
1910
+ * @private
1911
+ * @param {*} value The value to compare.
1912
+ * @param {*} other The other value to compare.
1913
+ * @param {boolean} bitmask The bitmask flags.
1914
+ * 1 - Unordered comparison
1915
+ * 2 - Partial comparison
1916
+ * @param {Function} [customizer] The function to customize comparisons.
1917
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
1918
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1919
+ */
1920
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
1921
+ if (value === other) {
1922
+ return true;
1923
+ }
1924
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
1925
+ return value !== value && other !== other;
1926
+ }
1927
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
1928
+ }
1929
+
1930
+ /** Used to compose bitmasks for value comparisons. */
1931
+ var COMPARE_PARTIAL_FLAG$1 = 1,
1932
+ COMPARE_UNORDERED_FLAG$1 = 2;
1933
+
1934
+ /**
1935
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
1936
+ *
1937
+ * @private
1938
+ * @param {Object} object The object to inspect.
1939
+ * @param {Object} source The object of property values to match.
1940
+ * @param {Array} matchData The property names, values, and compare flags to match.
1941
+ * @param {Function} [customizer] The function to customize comparisons.
1942
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
1943
+ */
1944
+ function baseIsMatch(object, source, matchData, customizer) {
1945
+ var index = matchData.length,
1946
+ length = index,
1947
+ noCustomizer = !customizer;
1948
+
1949
+ if (object == null) {
1950
+ return !length;
1951
+ }
1952
+ object = Object(object);
1953
+ while (index--) {
1954
+ var data = matchData[index];
1955
+ if ((noCustomizer && data[2])
1956
+ ? data[1] !== object[data[0]]
1957
+ : !(data[0] in object)
1958
+ ) {
1959
+ return false;
1960
+ }
1961
+ }
1962
+ while (++index < length) {
1963
+ data = matchData[index];
1964
+ var key = data[0],
1965
+ objValue = object[key],
1966
+ srcValue = data[1];
1967
+
1968
+ if (noCustomizer && data[2]) {
1969
+ if (objValue === undefined && !(key in object)) {
1970
+ return false;
1971
+ }
1972
+ } else {
1973
+ var stack = new Stack;
1974
+ if (customizer) {
1975
+ var result = customizer(objValue, srcValue, key, object, source, stack);
1976
+ }
1977
+ if (!(result === undefined
1978
+ ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack)
1979
+ : result
1980
+ )) {
1981
+ return false;
1982
+ }
1983
+ }
1984
+ }
1985
+ return true;
1986
+ }
1987
+
1988
+ /**
1989
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
1990
+ *
1991
+ * @private
1992
+ * @param {*} value The value to check.
1993
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
1994
+ * equality comparisons, else `false`.
1995
+ */
1996
+ function isStrictComparable(value) {
1997
+ return value === value && !isObject(value);
1998
+ }
1999
+
2000
+ /**
2001
+ * Gets the property names, values, and compare flags of `object`.
2002
+ *
2003
+ * @private
2004
+ * @param {Object} object The object to query.
2005
+ * @returns {Array} Returns the match data of `object`.
2006
+ */
2007
+ function getMatchData(object) {
2008
+ var result = keys(object),
2009
+ length = result.length;
2010
+
2011
+ while (length--) {
2012
+ var key = result[length],
2013
+ value = object[key];
2014
+
2015
+ result[length] = [key, value, isStrictComparable(value)];
2016
+ }
2017
+ return result;
2018
+ }
2019
+
2020
+ /**
2021
+ * A specialized version of `matchesProperty` for source values suitable
2022
+ * for strict equality comparisons, i.e. `===`.
2023
+ *
2024
+ * @private
2025
+ * @param {string} key The key of the property to get.
2026
+ * @param {*} srcValue The value to match.
2027
+ * @returns {Function} Returns the new spec function.
2028
+ */
2029
+ function matchesStrictComparable(key, srcValue) {
2030
+ return function(object) {
2031
+ if (object == null) {
2032
+ return false;
2033
+ }
2034
+ return object[key] === srcValue &&
2035
+ (srcValue !== undefined || (key in Object(object)));
2036
+ };
2037
+ }
2038
+
2039
+ /**
2040
+ * The base implementation of `_.matches` which doesn't clone `source`.
2041
+ *
2042
+ * @private
2043
+ * @param {Object} source The object of property values to match.
2044
+ * @returns {Function} Returns the new spec function.
2045
+ */
2046
+ function baseMatches(source) {
2047
+ var matchData = getMatchData(source);
2048
+ if (matchData.length == 1 && matchData[0][2]) {
2049
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
2050
+ }
2051
+ return function(object) {
2052
+ return object === source || baseIsMatch(object, source, matchData);
2053
+ };
2054
+ }
2055
+
2056
+ /** Used to match property names within property paths. */
2057
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
2058
+ reIsPlainProp = /^\w*$/;
2059
+
2060
+ /**
2061
+ * Checks if `value` is a property name and not a property path.
2062
+ *
2063
+ * @private
2064
+ * @param {*} value The value to check.
2065
+ * @param {Object} [object] The object to query keys on.
2066
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
2067
+ */
2068
+ function isKey(value, object) {
2069
+ if (isArray$1(value)) {
2070
+ return false;
2071
+ }
2072
+ var type = typeof value;
2073
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
2074
+ value == null || isSymbol(value)) {
2075
+ return true;
2076
+ }
2077
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
2078
+ (object != null && value in Object(object));
2079
+ }
2080
+
2081
+ /** Error message constants. */
2082
+ var FUNC_ERROR_TEXT = 'Expected a function';
2083
+
2084
+ /**
2085
+ * Creates a function that memoizes the result of `func`. If `resolver` is
2086
+ * provided, it determines the cache key for storing the result based on the
2087
+ * arguments provided to the memoized function. By default, the first argument
2088
+ * provided to the memoized function is used as the map cache key. The `func`
2089
+ * is invoked with the `this` binding of the memoized function.
2090
+ *
2091
+ * **Note:** The cache is exposed as the `cache` property on the memoized
2092
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
2093
+ * constructor with one whose instances implement the
2094
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
2095
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
2096
+ *
2097
+ * @static
2098
+ * @memberOf _
2099
+ * @since 0.1.0
2100
+ * @category Function
2101
+ * @param {Function} func The function to have its output memoized.
2102
+ * @param {Function} [resolver] The function to resolve the cache key.
2103
+ * @returns {Function} Returns the new memoized function.
2104
+ * @example
2105
+ *
2106
+ * var object = { 'a': 1, 'b': 2 };
2107
+ * var other = { 'c': 3, 'd': 4 };
2108
+ *
2109
+ * var values = _.memoize(_.values);
2110
+ * values(object);
2111
+ * // => [1, 2]
2112
+ *
2113
+ * values(other);
2114
+ * // => [3, 4]
2115
+ *
2116
+ * object.a = 2;
2117
+ * values(object);
2118
+ * // => [1, 2]
2119
+ *
2120
+ * // Modify the result cache.
2121
+ * values.cache.set(object, ['a', 'b']);
2122
+ * values(object);
2123
+ * // => ['a', 'b']
2124
+ *
2125
+ * // Replace `_.memoize.Cache`.
2126
+ * _.memoize.Cache = WeakMap;
2127
+ */
2128
+ function memoize(func, resolver) {
2129
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
2130
+ throw new TypeError(FUNC_ERROR_TEXT);
2131
+ }
2132
+ var memoized = function() {
2133
+ var args = arguments,
2134
+ key = resolver ? resolver.apply(this, args) : args[0],
2135
+ cache = memoized.cache;
2136
+
2137
+ if (cache.has(key)) {
2138
+ return cache.get(key);
2139
+ }
2140
+ var result = func.apply(this, args);
2141
+ memoized.cache = cache.set(key, result) || cache;
2142
+ return result;
2143
+ };
2144
+ memoized.cache = new (memoize.Cache || MapCache);
2145
+ return memoized;
2146
+ }
2147
+
2148
+ // Expose `MapCache`.
2149
+ memoize.Cache = MapCache;
2150
+
2151
+ /** Used as the maximum memoize cache size. */
2152
+ var MAX_MEMOIZE_SIZE = 500;
2153
+
2154
+ /**
2155
+ * A specialized version of `_.memoize` which clears the memoized function's
2156
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
2157
+ *
2158
+ * @private
2159
+ * @param {Function} func The function to have its output memoized.
2160
+ * @returns {Function} Returns the new memoized function.
2161
+ */
2162
+ function memoizeCapped(func) {
2163
+ var result = memoize(func, function(key) {
2164
+ if (cache.size === MAX_MEMOIZE_SIZE) {
2165
+ cache.clear();
2166
+ }
2167
+ return key;
2168
+ });
2169
+
2170
+ var cache = result.cache;
2171
+ return result;
2172
+ }
2173
+
2174
+ /** Used to match property names within property paths. */
2175
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
2176
+
2177
+ /** Used to match backslashes in property paths. */
2178
+ var reEscapeChar = /\\(\\)?/g;
2179
+
2180
+ /**
2181
+ * Converts `string` to a property path array.
2182
+ *
2183
+ * @private
2184
+ * @param {string} string The string to convert.
2185
+ * @returns {Array} Returns the property path array.
2186
+ */
2187
+ var stringToPath = memoizeCapped(function(string) {
2188
+ var result = [];
2189
+ if (string.charCodeAt(0) === 46 /* . */) {
2190
+ result.push('');
2191
+ }
2192
+ string.replace(rePropName, function(match, number, quote, subString) {
2193
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
2194
+ });
2195
+ return result;
2196
+ });
2197
+
2198
+ const stringToPath$1 = stringToPath;
2199
+
2200
+ /**
2201
+ * A specialized version of `_.map` for arrays without support for iteratee
2202
+ * shorthands.
2203
+ *
2204
+ * @private
2205
+ * @param {Array} [array] The array to iterate over.
2206
+ * @param {Function} iteratee The function invoked per iteration.
2207
+ * @returns {Array} Returns the new mapped array.
2208
+ */
2209
+ function arrayMap(array, iteratee) {
2210
+ var index = -1,
2211
+ length = array == null ? 0 : array.length,
2212
+ result = Array(length);
2213
+
2214
+ while (++index < length) {
2215
+ result[index] = iteratee(array[index], index, array);
2216
+ }
2217
+ return result;
2218
+ }
2219
+
2220
+ /** Used as references for various `Number` constants. */
2221
+ var INFINITY$2 = 1 / 0;
2222
+
2223
+ /** Used to convert symbols to primitives and strings. */
2224
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
2225
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
2226
+
2227
+ /**
2228
+ * The base implementation of `_.toString` which doesn't convert nullish
2229
+ * values to empty strings.
2230
+ *
2231
+ * @private
2232
+ * @param {*} value The value to process.
2233
+ * @returns {string} Returns the string.
2234
+ */
2235
+ function baseToString(value) {
2236
+ // Exit early for strings to avoid a performance hit in some environments.
2237
+ if (typeof value == 'string') {
2238
+ return value;
2239
+ }
2240
+ if (isArray$1(value)) {
2241
+ // Recursively convert values (susceptible to call stack limits).
2242
+ return arrayMap(value, baseToString) + '';
2243
+ }
2244
+ if (isSymbol(value)) {
2245
+ return symbolToString ? symbolToString.call(value) : '';
2246
+ }
2247
+ var result = (value + '');
2248
+ return (result == '0' && (1 / value) == -INFINITY$2) ? '-0' : result;
2249
+ }
2250
+
2251
+ /**
2252
+ * Converts `value` to a string. An empty string is returned for `null`
2253
+ * and `undefined` values. The sign of `-0` is preserved.
2254
+ *
2255
+ * @static
2256
+ * @memberOf _
2257
+ * @since 4.0.0
2258
+ * @category Lang
2259
+ * @param {*} value The value to convert.
2260
+ * @returns {string} Returns the converted string.
2261
+ * @example
2262
+ *
2263
+ * _.toString(null);
2264
+ * // => ''
2265
+ *
2266
+ * _.toString(-0);
2267
+ * // => '-0'
2268
+ *
2269
+ * _.toString([1, 2, 3]);
2270
+ * // => '1,2,3'
2271
+ */
2272
+ function toString(value) {
2273
+ return value == null ? '' : baseToString(value);
2274
+ }
2275
+
2276
+ /**
2277
+ * Casts `value` to a path array if it's not one.
2278
+ *
2279
+ * @private
2280
+ * @param {*} value The value to inspect.
2281
+ * @param {Object} [object] The object to query keys on.
2282
+ * @returns {Array} Returns the cast property path array.
2283
+ */
2284
+ function castPath(value, object) {
2285
+ if (isArray$1(value)) {
2286
+ return value;
2287
+ }
2288
+ return isKey(value, object) ? [value] : stringToPath$1(toString(value));
2289
+ }
2290
+
2291
+ /** Used as references for various `Number` constants. */
2292
+ var INFINITY$1 = 1 / 0;
2293
+
2294
+ /**
2295
+ * Converts `value` to a string key if it's not a string or symbol.
2296
+ *
2297
+ * @private
2298
+ * @param {*} value The value to inspect.
2299
+ * @returns {string|symbol} Returns the key.
2300
+ */
2301
+ function toKey(value) {
2302
+ if (typeof value == 'string' || isSymbol(value)) {
2303
+ return value;
2304
+ }
2305
+ var result = (value + '');
2306
+ return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
2307
+ }
2308
+
2309
+ /**
2310
+ * The base implementation of `_.get` without support for default values.
2311
+ *
2312
+ * @private
2313
+ * @param {Object} object The object to query.
2314
+ * @param {Array|string} path The path of the property to get.
2315
+ * @returns {*} Returns the resolved value.
2316
+ */
2317
+ function baseGet(object, path) {
2318
+ path = castPath(path, object);
2319
+
2320
+ var index = 0,
2321
+ length = path.length;
2322
+
2323
+ while (object != null && index < length) {
2324
+ object = object[toKey(path[index++])];
2325
+ }
2326
+ return (index && index == length) ? object : undefined;
2327
+ }
2328
+
2329
+ /**
2330
+ * Gets the value at `path` of `object`. If the resolved value is
2331
+ * `undefined`, the `defaultValue` is returned in its place.
2332
+ *
2333
+ * @static
2334
+ * @memberOf _
2335
+ * @since 3.7.0
2336
+ * @category Object
2337
+ * @param {Object} object The object to query.
2338
+ * @param {Array|string} path The path of the property to get.
2339
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
2340
+ * @returns {*} Returns the resolved value.
2341
+ * @example
2342
+ *
2343
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
2344
+ *
2345
+ * _.get(object, 'a[0].b.c');
2346
+ * // => 3
2347
+ *
2348
+ * _.get(object, ['a', '0', 'b', 'c']);
2349
+ * // => 3
2350
+ *
2351
+ * _.get(object, 'a.b.c', 'default');
2352
+ * // => 'default'
2353
+ */
2354
+ function get(object, path, defaultValue) {
2355
+ var result = object == null ? undefined : baseGet(object, path);
2356
+ return result === undefined ? defaultValue : result;
2357
+ }
2358
+
2359
+ /**
2360
+ * The base implementation of `_.hasIn` without support for deep paths.
2361
+ *
2362
+ * @private
2363
+ * @param {Object} [object] The object to query.
2364
+ * @param {Array|string} key The key to check.
2365
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
2366
+ */
2367
+ function baseHasIn(object, key) {
2368
+ return object != null && key in Object(object);
2369
+ }
2370
+
2371
+ /**
2372
+ * Checks if `path` exists on `object`.
2373
+ *
2374
+ * @private
2375
+ * @param {Object} object The object to query.
2376
+ * @param {Array|string} path The path to check.
2377
+ * @param {Function} hasFunc The function to check properties.
2378
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
2379
+ */
2380
+ function hasPath(object, path, hasFunc) {
2381
+ path = castPath(path, object);
2382
+
2383
+ var index = -1,
2384
+ length = path.length,
2385
+ result = false;
2386
+
2387
+ while (++index < length) {
2388
+ var key = toKey(path[index]);
2389
+ if (!(result = object != null && hasFunc(object, key))) {
2390
+ break;
2391
+ }
2392
+ object = object[key];
2393
+ }
2394
+ if (result || ++index != length) {
2395
+ return result;
2396
+ }
2397
+ length = object == null ? 0 : object.length;
2398
+ return !!length && isLength(length) && isIndex(key, length) &&
2399
+ (isArray$1(object) || isArguments$1(object));
2400
+ }
2401
+
2402
+ /**
2403
+ * Checks if `path` is a direct or inherited property of `object`.
2404
+ *
2405
+ * @static
2406
+ * @memberOf _
2407
+ * @since 4.0.0
2408
+ * @category Object
2409
+ * @param {Object} object The object to query.
2410
+ * @param {Array|string} path The path to check.
2411
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
2412
+ * @example
2413
+ *
2414
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
2415
+ *
2416
+ * _.hasIn(object, 'a');
2417
+ * // => true
2418
+ *
2419
+ * _.hasIn(object, 'a.b');
2420
+ * // => true
2421
+ *
2422
+ * _.hasIn(object, ['a', 'b']);
2423
+ * // => true
2424
+ *
2425
+ * _.hasIn(object, 'b');
2426
+ * // => false
2427
+ */
2428
+ function hasIn(object, path) {
2429
+ return object != null && hasPath(object, path, baseHasIn);
2430
+ }
2431
+
2432
+ /** Used to compose bitmasks for value comparisons. */
2433
+ var COMPARE_PARTIAL_FLAG = 1,
2434
+ COMPARE_UNORDERED_FLAG = 2;
2435
+
2436
+ /**
2437
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
2438
+ *
2439
+ * @private
2440
+ * @param {string} path The path of the property to get.
2441
+ * @param {*} srcValue The value to match.
2442
+ * @returns {Function} Returns the new spec function.
2443
+ */
2444
+ function baseMatchesProperty(path, srcValue) {
2445
+ if (isKey(path) && isStrictComparable(srcValue)) {
2446
+ return matchesStrictComparable(toKey(path), srcValue);
2447
+ }
2448
+ return function(object) {
2449
+ var objValue = get(object, path);
2450
+ return (objValue === undefined && objValue === srcValue)
2451
+ ? hasIn(object, path)
2452
+ : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
2453
+ };
2454
+ }
2455
+
2456
+ /**
2457
+ * This method returns the first argument it receives.
2458
+ *
2459
+ * @static
2460
+ * @since 0.1.0
2461
+ * @memberOf _
2462
+ * @category Util
2463
+ * @param {*} value Any value.
2464
+ * @returns {*} Returns `value`.
2465
+ * @example
2466
+ *
2467
+ * var object = { 'a': 1 };
2468
+ *
2469
+ * console.log(_.identity(object) === object);
2470
+ * // => true
2471
+ */
2472
+ function identity(value) {
2473
+ return value;
2474
+ }
2475
+
2476
+ /**
2477
+ * The base implementation of `_.property` without support for deep paths.
2478
+ *
2479
+ * @private
2480
+ * @param {string} key The key of the property to get.
2481
+ * @returns {Function} Returns the new accessor function.
2482
+ */
2483
+ function baseProperty(key) {
2484
+ return function(object) {
2485
+ return object == null ? undefined : object[key];
2486
+ };
2487
+ }
2488
+
2489
+ /**
2490
+ * A specialized version of `baseProperty` which supports deep paths.
2491
+ *
2492
+ * @private
2493
+ * @param {Array|string} path The path of the property to get.
2494
+ * @returns {Function} Returns the new accessor function.
2495
+ */
2496
+ function basePropertyDeep(path) {
2497
+ return function(object) {
2498
+ return baseGet(object, path);
2499
+ };
2500
+ }
2501
+
2502
+ /**
2503
+ * Creates a function that returns the value at `path` of a given object.
2504
+ *
2505
+ * @static
2506
+ * @memberOf _
2507
+ * @since 2.4.0
2508
+ * @category Util
2509
+ * @param {Array|string} path The path of the property to get.
2510
+ * @returns {Function} Returns the new accessor function.
2511
+ * @example
2512
+ *
2513
+ * var objects = [
2514
+ * { 'a': { 'b': 2 } },
2515
+ * { 'a': { 'b': 1 } }
2516
+ * ];
2517
+ *
2518
+ * _.map(objects, _.property('a.b'));
2519
+ * // => [2, 1]
2520
+ *
2521
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
2522
+ * // => [1, 2]
2523
+ */
2524
+ function property(path) {
2525
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
2526
+ }
2527
+
2528
+ /**
2529
+ * The base implementation of `_.iteratee`.
2530
+ *
2531
+ * @private
2532
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
2533
+ * @returns {Function} Returns the iteratee.
2534
+ */
2535
+ function baseIteratee(value) {
2536
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
2537
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
2538
+ if (typeof value == 'function') {
2539
+ return value;
2540
+ }
2541
+ if (value == null) {
2542
+ return identity;
2543
+ }
2544
+ if (typeof value == 'object') {
2545
+ return isArray$1(value)
2546
+ ? baseMatchesProperty(value[0], value[1])
2547
+ : baseMatches(value);
2548
+ }
2549
+ return property(value);
2550
+ }
2551
+
2552
+ /** Used as references for various `Number` constants. */
2553
+ var INFINITY = 1 / 0,
2554
+ MAX_INTEGER = 1.7976931348623157e+308;
2555
+
2556
+ /**
2557
+ * Converts `value` to a finite number.
2558
+ *
2559
+ * @static
2560
+ * @memberOf _
2561
+ * @since 4.12.0
2562
+ * @category Lang
2563
+ * @param {*} value The value to convert.
2564
+ * @returns {number} Returns the converted number.
2565
+ * @example
2566
+ *
2567
+ * _.toFinite(3.2);
2568
+ * // => 3.2
2569
+ *
2570
+ * _.toFinite(Number.MIN_VALUE);
2571
+ * // => 5e-324
2572
+ *
2573
+ * _.toFinite(Infinity);
2574
+ * // => 1.7976931348623157e+308
2575
+ *
2576
+ * _.toFinite('3.2');
2577
+ * // => 3.2
2578
+ */
2579
+ function toFinite(value) {
2580
+ if (!value) {
2581
+ return value === 0 ? value : 0;
2582
+ }
2583
+ value = toNumber(value);
2584
+ if (value === INFINITY || value === -INFINITY) {
2585
+ var sign = (value < 0 ? -1 : 1);
2586
+ return sign * MAX_INTEGER;
2587
+ }
2588
+ return value === value ? value : 0;
2589
+ }
2590
+
2591
+ /**
2592
+ * Converts `value` to an integer.
2593
+ *
2594
+ * **Note:** This method is loosely based on
2595
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
2596
+ *
2597
+ * @static
2598
+ * @memberOf _
2599
+ * @since 4.0.0
2600
+ * @category Lang
2601
+ * @param {*} value The value to convert.
2602
+ * @returns {number} Returns the converted integer.
2603
+ * @example
2604
+ *
2605
+ * _.toInteger(3.2);
2606
+ * // => 3
2607
+ *
2608
+ * _.toInteger(Number.MIN_VALUE);
2609
+ * // => 0
2610
+ *
2611
+ * _.toInteger(Infinity);
2612
+ * // => 1.7976931348623157e+308
2613
+ *
2614
+ * _.toInteger('3.2');
2615
+ * // => 3
2616
+ */
2617
+ function toInteger(value) {
2618
+ var result = toFinite(value),
2619
+ remainder = result % 1;
2620
+
2621
+ return result === result ? (remainder ? result - remainder : result) : 0;
2622
+ }
2623
+
2624
+ /* Built-in method references for those with the same name as other `lodash` methods. */
2625
+ var nativeMax$1 = Math.max;
2626
+
2627
+ /**
2628
+ * This method is like `_.find` except that it returns the index of the first
2629
+ * element `predicate` returns truthy for instead of the element itself.
2630
+ *
2631
+ * @static
2632
+ * @memberOf _
2633
+ * @since 1.1.0
2634
+ * @category Array
2635
+ * @param {Array} array The array to inspect.
2636
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
2637
+ * @param {number} [fromIndex=0] The index to search from.
2638
+ * @returns {number} Returns the index of the found element, else `-1`.
2639
+ * @example
2640
+ *
2641
+ * var users = [
2642
+ * { 'user': 'barney', 'active': false },
2643
+ * { 'user': 'fred', 'active': false },
2644
+ * { 'user': 'pebbles', 'active': true }
2645
+ * ];
2646
+ *
2647
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
2648
+ * // => 0
2649
+ *
2650
+ * // The `_.matches` iteratee shorthand.
2651
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
2652
+ * // => 1
2653
+ *
2654
+ * // The `_.matchesProperty` iteratee shorthand.
2655
+ * _.findIndex(users, ['active', false]);
2656
+ * // => 0
2657
+ *
2658
+ * // The `_.property` iteratee shorthand.
2659
+ * _.findIndex(users, 'active');
2660
+ * // => 2
2661
+ */
2662
+ function findIndex(array, predicate, fromIndex) {
2663
+ var length = array == null ? 0 : array.length;
2664
+ if (!length) {
2665
+ return -1;
2666
+ }
2667
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
2668
+ if (index < 0) {
2669
+ index = nativeMax$1(length + index, 0);
2670
+ }
2671
+ return baseFindIndex(array, baseIteratee(predicate), index);
2672
+ }
2673
+
2674
+ /* Built-in method references for those with the same name as other `lodash` methods. */
2675
+ var nativeCeil = Math.ceil,
2676
+ nativeMax = Math.max;
2677
+
2678
+ /**
2679
+ * The base implementation of `_.range` and `_.rangeRight` which doesn't
2680
+ * coerce arguments.
2681
+ *
2682
+ * @private
2683
+ * @param {number} start The start of the range.
2684
+ * @param {number} end The end of the range.
2685
+ * @param {number} step The value to increment or decrement by.
2686
+ * @param {boolean} [fromRight] Specify iterating from right to left.
2687
+ * @returns {Array} Returns the range of numbers.
2688
+ */
2689
+ function baseRange(start, end, step, fromRight) {
2690
+ var index = -1,
2691
+ length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
2692
+ result = Array(length);
2693
+
2694
+ while (length--) {
2695
+ result[fromRight ? length : ++index] = start;
2696
+ start += step;
2697
+ }
2698
+ return result;
2699
+ }
2700
+
2701
+ /**
2702
+ * Checks if the given arguments are from an iteratee call.
2703
+ *
2704
+ * @private
2705
+ * @param {*} value The potential iteratee value argument.
2706
+ * @param {*} index The potential iteratee index or key argument.
2707
+ * @param {*} object The potential iteratee object argument.
2708
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
2709
+ * else `false`.
2710
+ */
2711
+ function isIterateeCall(value, index, object) {
2712
+ if (!isObject(object)) {
2713
+ return false;
2714
+ }
2715
+ var type = typeof index;
2716
+ if (type == 'number'
2717
+ ? (isArrayLike(object) && isIndex(index, object.length))
2718
+ : (type == 'string' && index in object)
2719
+ ) {
2720
+ return eq(object[index], value);
2721
+ }
2722
+ return false;
2723
+ }
2724
+
2725
+ /**
2726
+ * Creates a `_.range` or `_.rangeRight` function.
2727
+ *
2728
+ * @private
2729
+ * @param {boolean} [fromRight] Specify iterating from right to left.
2730
+ * @returns {Function} Returns the new range function.
2731
+ */
2732
+ function createRange(fromRight) {
2733
+ return function(start, end, step) {
2734
+ if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
2735
+ end = step = undefined;
2736
+ }
2737
+ // Ensure the sign of `-0` is preserved.
2738
+ start = toFinite(start);
2739
+ if (end === undefined) {
2740
+ end = start;
2741
+ start = 0;
2742
+ } else {
2743
+ end = toFinite(end);
2744
+ }
2745
+ step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
2746
+ return baseRange(start, end, step, fromRight);
2747
+ };
2748
+ }
2749
+
2750
+ /**
2751
+ * Creates an array of numbers (positive and/or negative) progressing from
2752
+ * `start` up to, but not including, `end`. A step of `-1` is used if a negative
2753
+ * `start` is specified without an `end` or `step`. If `end` is not specified,
2754
+ * it's set to `start` with `start` then set to `0`.
2755
+ *
2756
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
2757
+ * floating-point values which can produce unexpected results.
2758
+ *
2759
+ * @static
2760
+ * @since 0.1.0
2761
+ * @memberOf _
2762
+ * @category Util
2763
+ * @param {number} [start=0] The start of the range.
2764
+ * @param {number} end The end of the range.
2765
+ * @param {number} [step=1] The value to increment or decrement by.
2766
+ * @returns {Array} Returns the range of numbers.
2767
+ * @see _.inRange, _.rangeRight
2768
+ * @example
2769
+ *
2770
+ * _.range(4);
2771
+ * // => [0, 1, 2, 3]
2772
+ *
2773
+ * _.range(-4);
2774
+ * // => [0, -1, -2, -3]
2775
+ *
2776
+ * _.range(1, 5);
2777
+ * // => [1, 2, 3, 4]
2778
+ *
2779
+ * _.range(0, 20, 5);
2780
+ * // => [0, 5, 10, 15]
2781
+ *
2782
+ * _.range(0, -4, -1);
2783
+ * // => [0, -1, -2, -3]
2784
+ *
2785
+ * _.range(1, 4, 0);
2786
+ * // => [1, 1, 1]
2787
+ *
2788
+ * _.range(0);
2789
+ * // => []
2790
+ */
2791
+ var range$1 = createRange();
2792
+
2793
+ const range$2 = range$1;
2794
+
2795
+ const appendToMap = (map, propName, value) => {
2796
+ const items = map.get(propName);
2797
+ if (!items) {
2798
+ map.set(propName, [value]);
2799
+ }
2800
+ else if (!items.includes(value)) {
2801
+ items.push(value);
2802
+ }
2803
+ };
2804
+ const debounce = (fn, ms) => {
2805
+ let timeoutId;
2806
+ return (...args) => {
2807
+ if (timeoutId) {
2808
+ clearTimeout(timeoutId);
2809
+ }
2810
+ timeoutId = setTimeout(() => {
2811
+ timeoutId = 0;
2812
+ fn(...args);
2813
+ }, ms);
2814
+ };
2815
+ };
2816
+
2817
+ /**
2818
+ * Check if a possible element isConnected.
2819
+ * The property might not be there, so we check for it.
2820
+ *
2821
+ * We want it to return true if isConnected is not a property,
2822
+ * otherwise we would remove these elements and would not update.
2823
+ *
2824
+ * Better leak in Edge than to be useless.
2825
+ */
2826
+ const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
2827
+ const cleanupElements = debounce((map) => {
2828
+ for (let key of map.keys()) {
2829
+ map.set(key, map.get(key).filter(isConnected));
2830
+ }
2831
+ }, 2000);
2832
+ const stencilSubscription = () => {
2833
+ if (typeof getRenderingRef !== 'function') {
2834
+ // If we are not in a stencil project, we do nothing.
2835
+ // This function is not really exported by @stencil/core.
2836
+ return {};
2837
+ }
2838
+ const elmsToUpdate = new Map();
2839
+ return {
2840
+ dispose: () => elmsToUpdate.clear(),
2841
+ get: (propName) => {
2842
+ const elm = getRenderingRef();
2843
+ if (elm) {
2844
+ appendToMap(elmsToUpdate, propName, elm);
2845
+ }
2846
+ },
2847
+ set: (propName) => {
2848
+ const elements = elmsToUpdate.get(propName);
2849
+ if (elements) {
2850
+ elmsToUpdate.set(propName, elements.filter(forceUpdate));
2851
+ }
2852
+ cleanupElements(elmsToUpdate);
2853
+ },
2854
+ reset: () => {
2855
+ elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
2856
+ cleanupElements(elmsToUpdate);
2857
+ },
2858
+ };
2859
+ };
2860
+
2861
+ const unwrap = (val) => (typeof val === 'function' ? val() : val);
2862
+ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
2863
+ const unwrappedState = unwrap(defaultState);
2864
+ let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
2865
+ const handlers = {
2866
+ dispose: [],
2867
+ get: [],
2868
+ set: [],
2869
+ reset: [],
2870
+ };
2871
+ const reset = () => {
2872
+ var _a;
2873
+ // When resetting the state, the default state may be a function - unwrap it to invoke it.
2874
+ // otherwise, the state won't be properly reset
2875
+ states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
2876
+ handlers.reset.forEach((cb) => cb());
2877
+ };
2878
+ const dispose = () => {
2879
+ // Call first dispose as resetting the state would
2880
+ // cause less updates ;)
2881
+ handlers.dispose.forEach((cb) => cb());
2882
+ reset();
2883
+ };
2884
+ const get = (propName) => {
2885
+ handlers.get.forEach((cb) => cb(propName));
2886
+ return states.get(propName);
2887
+ };
2888
+ const set = (propName, value) => {
2889
+ const oldValue = states.get(propName);
2890
+ if (shouldUpdate(value, oldValue, propName)) {
2891
+ states.set(propName, value);
2892
+ handlers.set.forEach((cb) => cb(propName, value, oldValue));
2893
+ }
2894
+ };
2895
+ const state = (typeof Proxy === 'undefined'
2896
+ ? {}
2897
+ : new Proxy(unwrappedState, {
2898
+ get(_, propName) {
2899
+ return get(propName);
2900
+ },
2901
+ ownKeys(_) {
2902
+ return Array.from(states.keys());
2903
+ },
2904
+ getOwnPropertyDescriptor() {
2905
+ return {
2906
+ enumerable: true,
2907
+ configurable: true,
2908
+ };
2909
+ },
2910
+ has(_, propName) {
2911
+ return states.has(propName);
2912
+ },
2913
+ set(_, propName, value) {
2914
+ set(propName, value);
2915
+ return true;
2916
+ },
2917
+ }));
2918
+ const on = (eventName, callback) => {
2919
+ handlers[eventName].push(callback);
2920
+ return () => {
2921
+ removeFromArray(handlers[eventName], callback);
2922
+ };
2923
+ };
2924
+ const onChange = (propName, cb) => {
2925
+ const unSet = on('set', (key, newValue) => {
2926
+ if (key === propName) {
2927
+ cb(newValue);
2928
+ }
2929
+ });
2930
+ // We need to unwrap the defaultState because it might be a function.
2931
+ // Otherwise we might not be sending the right reset value.
2932
+ const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
2933
+ return () => {
2934
+ unSet();
2935
+ unReset();
2936
+ };
2937
+ };
2938
+ const use = (...subscriptions) => {
2939
+ const unsubs = subscriptions.reduce((unsubs, subscription) => {
2940
+ if (subscription.set) {
2941
+ unsubs.push(on('set', subscription.set));
2942
+ }
2943
+ if (subscription.get) {
2944
+ unsubs.push(on('get', subscription.get));
2945
+ }
2946
+ if (subscription.reset) {
2947
+ unsubs.push(on('reset', subscription.reset));
2948
+ }
2949
+ if (subscription.dispose) {
2950
+ unsubs.push(on('dispose', subscription.dispose));
2951
+ }
2952
+ return unsubs;
2953
+ }, []);
2954
+ return () => unsubs.forEach((unsub) => unsub());
2955
+ };
2956
+ const forceUpdate = (key) => {
2957
+ const oldValue = states.get(key);
2958
+ handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
2959
+ };
2960
+ return {
2961
+ state,
2962
+ get,
2963
+ set,
2964
+ on,
2965
+ onChange,
2966
+ use,
2967
+ dispose,
2968
+ reset,
2969
+ forceUpdate,
2970
+ };
2971
+ };
2972
+ const removeFromArray = (array, item) => {
2973
+ const index = array.indexOf(item);
2974
+ if (index >= 0) {
2975
+ array[index] = array[array.length - 1];
2976
+ array.length--;
2977
+ }
2978
+ };
2979
+
2980
+ const createStore = (defaultState, shouldUpdate) => {
2981
+ const map = createObservableMap(defaultState, shouldUpdate);
2982
+ map.use(stencilSubscription());
2983
+ return map;
2984
+ };
2985
+
2986
+ /**
2987
+ * Hide items from main collection
2988
+ * But keep them in store
2989
+ */
2990
+ const trimmedPlugin = (store) => ({
2991
+ set(k, newVal) {
2992
+ switch (k) {
2993
+ case 'trimmed': {
2994
+ // full sorted items list
2995
+ const proxy = store.get('proxyItems');
2996
+ const trimmed = gatherTrimmedItems(newVal);
2997
+ // filter our physical indexes which are not trimmed
2998
+ const newItems = proxy.filter(v => !trimmed[v]);
2999
+ // set trimmed items in store
3000
+ store.set('items', newItems);
3001
+ break;
3002
+ }
3003
+ }
3004
+ },
3005
+ });
3006
+ function gatherTrimmedItems(trimmedItems) {
3007
+ const trimmed = {};
3008
+ for (let trimmedKey in trimmedItems) {
3009
+ // trimmed overweight not trimmed
3010
+ for (let t in trimmedItems[trimmedKey]) {
3011
+ trimmed[t] = trimmed[t] || trimmedItems[trimmedKey][t];
3012
+ }
3013
+ }
3014
+ return trimmed;
3015
+ }
3016
+
3017
+ /**
3018
+ * Sets the given data on the specified store.
3019
+ *
3020
+ * @param store - The store to set data on.
3021
+ * @param data - The data to set on the store.
3022
+ */
3023
+ function setStore(store, data) {
3024
+ Object.entries(data).forEach(([key, value]) => {
3025
+ store.set(key, value);
3026
+ });
3027
+ }
3028
+
3029
+ const MIN_COL_SIZE = 30;
3030
+ const RESIZE_INTERVAL = 40;
3031
+ const DATA_COL = 'data-rgCol';
3032
+ const DATA_ROW = 'data-rgRow';
3033
+ const DISABLED_CLASS = 'disabled';
3034
+ const CELL_CLASS = 'rgCell';
3035
+ const ROW_HEADER_TYPE = 'rowHeaders';
3036
+ const HEADER_CLASS = 'rgHeaderCell';
3037
+ const HEADER_SORTABLE_CLASS = 'sortable';
3038
+ const HEADER_ROW_CLASS = 'header-rgRow';
3039
+ const HEADER_ACTUAL_ROW_CLASS = 'actual-rgRow';
3040
+ const DRAG_ICON_CLASS = 'revo-drag-icon';
3041
+ const DRAGGABLE_CLASS = 'revo-draggable';
3042
+ const FOCUS_CLASS = 'focused-cell';
3043
+ const SELECTION_BORDER_CLASS = 'selection-border-range';
3044
+ const MOBILE_CLASS = 'mobile-handler';
3045
+ const TMP_SELECTION_BG_CLASS = 'temp-bg-range';
3046
+ const CELL_HANDLER_CLASS = 'autofill-handle';
3047
+ const EDIT_INPUT_WR = 'edit-input-wrapper';
3048
+ const DRAGG_TEXT = 'Draggable item';
3049
+ const GRID_INTERNALS = '__rvgr';
3050
+ const ROW_FOCUSED_CLASS = 'focused-rgRow';
3051
+
3052
+ var codes;
3053
+ (function (codes) {
3054
+ codes[codes["MOUSE_LEFT"] = 1] = "MOUSE_LEFT";
3055
+ codes[codes["MOUSE_RIGHT"] = 3] = "MOUSE_RIGHT";
3056
+ codes[codes["MOUSE_MIDDLE"] = 2] = "MOUSE_MIDDLE";
3057
+ codes[codes["BACKSPACE"] = 8] = "BACKSPACE";
3058
+ codes[codes["COMMA"] = 188] = "COMMA";
3059
+ codes[codes["INSERT"] = 45] = "INSERT";
3060
+ codes[codes["DELETE"] = 46] = "DELETE";
3061
+ codes[codes["END"] = 35] = "END";
3062
+ codes[codes["ENTER"] = 13] = "ENTER";
3063
+ codes[codes["ESCAPE"] = 27] = "ESCAPE";
3064
+ codes[codes["CONTROL"] = 17] = "CONTROL";
3065
+ codes[codes["COMMAND_LEFT"] = 91] = "COMMAND_LEFT";
3066
+ codes[codes["COMMAND_RIGHT"] = 93] = "COMMAND_RIGHT";
3067
+ codes[codes["COMMAND_FIREFOX"] = 224] = "COMMAND_FIREFOX";
3068
+ codes[codes["ALT"] = 18] = "ALT";
3069
+ codes[codes["HOME"] = 36] = "HOME";
3070
+ codes[codes["PAGE_DOWN"] = 34] = "PAGE_DOWN";
3071
+ codes[codes["PAGE_UP"] = 33] = "PAGE_UP";
3072
+ codes[codes["PERIOD"] = 190] = "PERIOD";
3073
+ codes[codes["SPACE"] = 32] = "SPACE";
3074
+ codes[codes["SHIFT"] = 16] = "SHIFT";
3075
+ codes[codes["CAPS_LOCK"] = 20] = "CAPS_LOCK";
3076
+ codes[codes["TAB"] = 9] = "TAB";
3077
+ codes[codes["ARROW_RIGHT"] = 39] = "ARROW_RIGHT";
3078
+ codes[codes["ARROW_LEFT"] = 37] = "ARROW_LEFT";
3079
+ codes[codes["ARROW_UP"] = 38] = "ARROW_UP";
3080
+ codes[codes["ARROW_DOWN"] = 40] = "ARROW_DOWN";
3081
+ codes[codes["F1"] = 112] = "F1";
3082
+ codes[codes["F2"] = 113] = "F2";
3083
+ codes[codes["F3"] = 114] = "F3";
3084
+ codes[codes["F4"] = 115] = "F4";
3085
+ codes[codes["F5"] = 116] = "F5";
3086
+ codes[codes["F6"] = 117] = "F6";
3087
+ codes[codes["F7"] = 118] = "F7";
3088
+ codes[codes["F8"] = 119] = "F8";
3089
+ codes[codes["F9"] = 120] = "F9";
3090
+ codes[codes["F10"] = 121] = "F10";
3091
+ codes[codes["F11"] = 122] = "F11";
3092
+ codes[codes["F12"] = 123] = "F12";
3093
+ codes[codes["A"] = 65] = "A";
3094
+ codes[codes["C"] = 67] = "C";
3095
+ codes[codes["D"] = 68] = "D";
3096
+ codes[codes["F"] = 70] = "F";
3097
+ codes[codes["L"] = 76] = "L";
3098
+ codes[codes["O"] = 79] = "O";
3099
+ codes[codes["P"] = 80] = "P";
3100
+ codes[codes["S"] = 83] = "S";
3101
+ codes[codes["V"] = 86] = "V";
3102
+ codes[codes["X"] = 88] = "X";
3103
+ })(codes || (codes = {}));
3104
+ var codesLetter;
3105
+ (function (codesLetter) {
3106
+ codesLetter["ENTER"] = "Enter";
3107
+ codesLetter["ENTER_NUM"] = "NumpadEnter";
3108
+ codesLetter["A"] = "KeyA";
3109
+ codesLetter["C"] = "KeyC";
3110
+ codesLetter["X"] = "KeyX";
3111
+ codesLetter["V"] = "KeyV";
3112
+ codesLetter["ESCAPE"] = "Escape";
3113
+ codesLetter["TAB"] = "Tab";
3114
+ codesLetter["BACKSPACE"] = "Backspace";
3115
+ codesLetter["DELETE"] = "Delete";
3116
+ codesLetter["ARROW_RIGHT"] = "ArrowRight";
3117
+ codesLetter["ARROW_LEFT"] = "ArrowLeft";
3118
+ codesLetter["ARROW_UP"] = "ArrowUp";
3119
+ codesLetter["ARROW_DOWN"] = "ArrowDown";
3120
+ codesLetter["SHIFT"] = "Shift";
3121
+ })(codesLetter || (codesLetter = {}));
3122
+ var keyValues;
3123
+ (function (keyValues) {
3124
+ keyValues["ENTER"] = "Enter";
3125
+ keyValues["TAB"] = "Tab";
3126
+ })(keyValues || (keyValues = {}));
3127
+ const KeyCodesEnum = codes;
3128
+
3129
+ var osPlatform;
3130
+ (function (osPlatform) {
3131
+ osPlatform["mac"] = "Mac";
3132
+ })(osPlatform || (osPlatform = {}));
3133
+ const OsPlatform = osPlatform;
3134
+
3135
+ /* Generate range on size
3136
+ */
3137
+ function range(size, startAt = 0) {
3138
+ const res = [];
3139
+ const end = startAt + size;
3140
+ for (let i = startAt; i < end; i++) {
3141
+ res.push(i);
3142
+ }
3143
+ return res;
3144
+ }
3145
+ /* Find index position in array */
3146
+ function findPositionInArray(el, compareFn) {
3147
+ return (function (arr) {
3148
+ let m = 0;
3149
+ let n = arr.length - 1;
3150
+ while (m <= n) {
3151
+ const k = (n + m) >> 1;
3152
+ const cmp = compareFn(el, arr[k]);
3153
+ if (cmp > 0) {
3154
+ m = k + 1;
3155
+ }
3156
+ else if (cmp < 0) {
3157
+ n = k - 1;
3158
+ }
3159
+ else {
3160
+ return k;
3161
+ }
3162
+ }
3163
+ return -m - 1;
3164
+ })(this);
3165
+ }
3166
+ /**
3167
+ * Sorted push
3168
+ */
3169
+ function pushSorted(arr, el, fn) {
3170
+ arr.splice(findPositionInArray.bind(arr)(el, fn), 0, el);
3171
+ return arr;
3172
+ }
3173
+ // (arr1[index1] < arr2[index2])
3174
+ function simpleCompare(el1, el2) {
3175
+ return el1 < el2;
3176
+ }
3177
+ /**
3178
+ * Merge sorted array helper function
3179
+ */
3180
+ function mergeSortedArray(arr1, arr2, compareFn = simpleCompare) {
3181
+ const merged = [];
3182
+ let index1 = 0;
3183
+ let index2 = 0;
3184
+ let current = 0;
3185
+ while (current < arr1.length + arr2.length) {
3186
+ let isArr1Depleted = index1 >= arr1.length;
3187
+ let isArr2Depleted = index2 >= arr2.length;
3188
+ if (!isArr1Depleted && (isArr2Depleted || compareFn(arr1[index1], arr2[index2]))) {
3189
+ merged[current] = arr1[index1];
3190
+ index1++;
3191
+ }
3192
+ else {
3193
+ merged[current] = arr2[index2];
3194
+ index2++;
3195
+ }
3196
+ current++;
3197
+ }
3198
+ return merged;
3199
+ }
3200
+ /**
3201
+ * Calculate system scrollbar size
3202
+ */
3203
+ function getScrollbarSize(document) {
3204
+ // Create a temporary div container and append it to the body
3205
+ const container = document.createElement('div');
3206
+ // Apply styling to ensure the div is scrollable
3207
+ container.style.overflow = 'scroll';
3208
+ container.style.visibility = 'hidden'; // make sure the container isn't visible
3209
+ container.style.position = 'absolute';
3210
+ container.style.top = '-9999px'; // move it out of the screen
3211
+ container.style.width = '50px'; // arbitrary width
3212
+ container.style.height = '50px'; // arbitrary height
3213
+ // Append the div to the body
3214
+ document.body.appendChild(container);
3215
+ // Calculate the width of the scrollbar
3216
+ const scrollbarWidth = container.offsetWidth - container.clientWidth;
3217
+ // Remove the div from the body after calculation
3218
+ document.body.removeChild(container);
3219
+ // Return the calculated width of the scrollbar
3220
+ return scrollbarWidth;
3221
+ }
3222
+ /* Scale a value between 2 ranges
3223
+ *
3224
+ * Sample:
3225
+ * // 55 from a 0-100 range to a 0-1000 range (Ranges don't have to be positive)
3226
+ * const n = scaleValue(55, [0,100], [0,1000]);
3227
+ *
3228
+ * Ranges of two values
3229
+ * @from
3230
+ * @to
3231
+ *
3232
+ * ~~ return value does the equivalent of Math.floor but faster.
3233
+ */
3234
+ function scaleValue(value, from, to) {
3235
+ return ((to[1] - to[0]) * (value - from[0])) / (from[1] - from[0]) + to[0];
3236
+ }
3237
+ /**
3238
+ * Async timeout
3239
+ */
3240
+ async function timeout(delay = 0) {
3241
+ await new Promise((r) => {
3242
+ setTimeout(() => r(), delay);
3243
+ });
3244
+ }
3245
+ /**
3246
+ * Type script mixins
3247
+ */
3248
+ function applyMixins(derivedCtor, constructors) {
3249
+ constructors.forEach(baseCtor => {
3250
+ Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
3251
+ Object.defineProperty(derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype, name) || Object.create(null));
3252
+ });
3253
+ });
3254
+ }
3255
+
3256
+ /**
3257
+ * Data store
3258
+ * Manage the state of a data source and provide methods for updating, adding, and refreshing the data.
3259
+ */
3260
+ class DataStore {
3261
+ get store() {
3262
+ return this.dataStore;
3263
+ }
3264
+ constructor(type, storeData) {
3265
+ const store = (this.dataStore = createStore(Object.assign({ items: [], proxyItems: [], source: [], groupingDepth: 0, groups: {}, type, trimmed: {}, groupingCustomRenderer: undefined }, storeData)));
3266
+ store.use(proxyPlugin(store));
3267
+ store.use(trimmedPlugin(store));
3268
+ }
3269
+ /**
3270
+ * full data source update
3271
+ * @param source - data column/rgRow source
3272
+ * @param grouping - grouping information if present
3273
+ */
3274
+ updateData(source, grouping, silent = false) {
3275
+ // during full update we do drop trim
3276
+ if (!silent) {
3277
+ this.store.set('trimmed', {});
3278
+ }
3279
+ // clear items
3280
+ this.store.set('items', []);
3281
+ const items = range$2(0, (source === null || source === void 0 ? void 0 : source.length) || 0);
3282
+ // set proxy first
3283
+ setStore(this.store, {
3284
+ source,
3285
+ proxyItems: [...items],
3286
+ });
3287
+ // update data items
3288
+ this.store.set('items', items);
3289
+ // apply grouping if present
3290
+ if (grouping) {
3291
+ setStore(this.store, {
3292
+ groupingDepth: grouping.depth,
3293
+ groups: grouping.groups,
3294
+ groupingCustomRenderer: grouping.customRenderer,
3295
+ });
3296
+ }
3297
+ }
3298
+ addTrimmed(some) {
3299
+ let trimmed = this.store.get('trimmed');
3300
+ trimmed = Object.assign(Object.assign({}, trimmed), some);
3301
+ setStore(this.store, { trimmed });
3302
+ }
3303
+ setSourceData(items, mutate = true) {
3304
+ setSourceByVirtualIndex(this.store, items, mutate);
3305
+ }
3306
+ // local data update
3307
+ setData(input) {
3308
+ const data = Object.assign({}, input);
3309
+ setStore(this.store, data);
3310
+ }
3311
+ refresh() {
3312
+ const source = this.store.get('source');
3313
+ this.store.set('source', [...source]);
3314
+ }
3315
+ }
3316
+ /**
3317
+ * get physical index by virtual
3318
+ * @param store - store to process
3319
+ */
3320
+ function getPhysical(store, virtualIndex) {
3321
+ const items = store.get('items');
3322
+ return items[virtualIndex];
3323
+ }
3324
+ /**
3325
+ * get all visible items
3326
+ * @param store - store to process
3327
+ */
3328
+ function getVisibleSourceItem(store) {
3329
+ const source = store.get('source');
3330
+ return store.get('items').map(v => source[v]);
3331
+ }
3332
+ /**
3333
+ * get mapped item from source
3334
+ * @param store - store to process
3335
+ * @param virtualIndex - virtual index to process
3336
+ */
3337
+ const getSourceItem = (store, virtualIndex) => {
3338
+ const source = store.get('source');
3339
+ return source[getSourcePhysicalIndex(store, virtualIndex)];
3340
+ };
3341
+ /**
3342
+ * Get physical index from virtual index
3343
+ */
3344
+ const getSourcePhysicalIndex = (store, virtualIndex) => {
3345
+ const items = store.get('items');
3346
+ return items[virtualIndex];
3347
+ };
3348
+ /**
3349
+ * Apply silently item/model/row value to data source
3350
+ * @param store - data source with changes
3351
+ * @param modelByIndex - collection of rows/values with virtual indexes to setup/replace in store/data source
3352
+ * @param mutate - if true, store will be mutated and whole viewport will be re-rendered
3353
+ */
3354
+ function setSourceByVirtualIndex(store, modelByIndex, mutate = true) {
3355
+ const items = store.get('items');
3356
+ const source = store.get('source');
3357
+ for (let virtualIndex in modelByIndex) {
3358
+ const realIndex = items[virtualIndex];
3359
+ const item = modelByIndex[virtualIndex];
3360
+ source[realIndex] = item;
3361
+ }
3362
+ if (mutate) {
3363
+ store.set('source', [...source]);
3364
+ }
3365
+ }
3366
+ /**
3367
+ * set item to source
3368
+ * @param store - store to process
3369
+ * @param modelByIndex - collection of rows with physical indexes to setup
3370
+ * @param mutate - if true, store will be mutated and whole viewport will be re-rendered
3371
+ */
3372
+ function setSourceByPhysicalIndex(store, modelByIndex, mutate = true) {
3373
+ const source = store.get('source');
3374
+ for (let index in modelByIndex) {
3375
+ source[index] = modelByIndex[index];
3376
+ }
3377
+ if (mutate) {
3378
+ store.set('source', [...source]);
3379
+ }
3380
+ }
3381
+ function setItems(store, items) {
3382
+ store.set('items', items);
3383
+ }
3384
+ function getSourceItemVirtualIndexByProp(store, prop) {
3385
+ const items = store.get('items');
3386
+ const source = store.get('source');
3387
+ const physicalIndex = findIndex(source, { prop });
3388
+ return items.indexOf(physicalIndex);
3389
+ }
3390
+
3391
+ /** Used as references for the maximum length and index of an array. */
3392
+ var MAX_ARRAY_LENGTH$1 = 4294967295,
3393
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH$1 - 1;
3394
+
3395
+ /* Built-in method references for those with the same name as other `lodash` methods. */
3396
+ var nativeFloor = Math.floor,
3397
+ nativeMin = Math.min;
3398
+
3399
+ /**
3400
+ * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
3401
+ * which invokes `iteratee` for `value` and each element of `array` to compute
3402
+ * their sort ranking. The iteratee is invoked with one argument; (value).
3403
+ *
3404
+ * @private
3405
+ * @param {Array} array The sorted array to inspect.
3406
+ * @param {*} value The value to evaluate.
3407
+ * @param {Function} iteratee The iteratee invoked per element.
3408
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
3409
+ * @returns {number} Returns the index at which `value` should be inserted
3410
+ * into `array`.
3411
+ */
3412
+ function baseSortedIndexBy(array, value, iteratee, retHighest) {
3413
+ var low = 0,
3414
+ high = array == null ? 0 : array.length;
3415
+ if (high === 0) {
3416
+ return 0;
3417
+ }
3418
+
3419
+ value = iteratee(value);
3420
+ var valIsNaN = value !== value,
3421
+ valIsNull = value === null,
3422
+ valIsSymbol = isSymbol(value),
3423
+ valIsUndefined = value === undefined;
3424
+
3425
+ while (low < high) {
3426
+ var mid = nativeFloor((low + high) / 2),
3427
+ computed = iteratee(array[mid]),
3428
+ othIsDefined = computed !== undefined,
3429
+ othIsNull = computed === null,
3430
+ othIsReflexive = computed === computed,
3431
+ othIsSymbol = isSymbol(computed);
3432
+
3433
+ if (valIsNaN) {
3434
+ var setLow = retHighest || othIsReflexive;
3435
+ } else if (valIsUndefined) {
3436
+ setLow = othIsReflexive && (retHighest || othIsDefined);
3437
+ } else if (valIsNull) {
3438
+ setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
3439
+ } else if (valIsSymbol) {
3440
+ setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
3441
+ } else if (othIsNull || othIsSymbol) {
3442
+ setLow = false;
3443
+ } else {
3444
+ setLow = retHighest ? (computed <= value) : (computed < value);
3445
+ }
3446
+ if (setLow) {
3447
+ low = mid + 1;
3448
+ } else {
3449
+ high = mid;
3450
+ }
3451
+ }
3452
+ return nativeMin(high, MAX_ARRAY_INDEX);
3453
+ }
3454
+
3455
+ /** Used as references for the maximum length and index of an array. */
3456
+ var MAX_ARRAY_LENGTH = 4294967295,
3457
+ HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
3458
+
3459
+ /**
3460
+ * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
3461
+ * performs a binary search of `array` to determine the index at which `value`
3462
+ * should be inserted into `array` in order to maintain its sort order.
3463
+ *
3464
+ * @private
3465
+ * @param {Array} array The sorted array to inspect.
3466
+ * @param {*} value The value to evaluate.
3467
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
3468
+ * @returns {number} Returns the index at which `value` should be inserted
3469
+ * into `array`.
3470
+ */
3471
+ function baseSortedIndex(array, value, retHighest) {
3472
+ var low = 0,
3473
+ high = array == null ? low : array.length;
3474
+
3475
+ if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
3476
+ while (low < high) {
3477
+ var mid = (low + high) >>> 1,
3478
+ computed = array[mid];
3479
+
3480
+ if (computed !== null && !isSymbol(computed) &&
3481
+ (retHighest ? (computed <= value) : (computed < value))) {
3482
+ low = mid + 1;
3483
+ } else {
3484
+ high = mid;
3485
+ }
3486
+ }
3487
+ return high;
3488
+ }
3489
+ return baseSortedIndexBy(array, value, identity, retHighest);
3490
+ }
3491
+
3492
+ /**
3493
+ * Uses a binary search to determine the lowest index at which `value`
3494
+ * should be inserted into `array` in order to maintain its sort order.
3495
+ *
3496
+ * @static
3497
+ * @memberOf _
3498
+ * @since 0.1.0
3499
+ * @category Array
3500
+ * @param {Array} array The sorted array to inspect.
3501
+ * @param {*} value The value to evaluate.
3502
+ * @returns {number} Returns the index at which `value` should be inserted
3503
+ * into `array`.
3504
+ * @example
3505
+ *
3506
+ * _.sortedIndex([30, 50], 40);
3507
+ * // => 1
3508
+ */
3509
+ function sortedIndex(array, value) {
3510
+ return baseSortedIndex(array, value);
3511
+ }
3512
+
3513
+ /**
3514
+ * Pre-calculation
3515
+ * Dimension custom sizes for each cell
3516
+ * Keeps only changed sizes, skips origin size
3517
+ */
3518
+ function calculateDimensionData(originItemSize, newSizes = {}) {
3519
+ const positionIndexes = [];
3520
+ const positionIndexToItem = {};
3521
+ const indexToItem = {};
3522
+ // prepare order sorted new sizes and calculate changed real size
3523
+ const newIndexes = Object.keys(newSizes).map(Number).sort((a, b) => a - b);
3524
+ let previous;
3525
+ for (let i = 0; i < newIndexes.length; i++) {
3526
+ const itemIndex = newIndexes[i];
3527
+ const newItem = {
3528
+ itemIndex,
3529
+ start: 0,
3530
+ end: 0,
3531
+ };
3532
+ // if previous item was changed too
3533
+ if (previous) {
3534
+ const itemsBetween = (itemIndex - previous.itemIndex - 1) * originItemSize;
3535
+ newItem.start = itemsBetween + previous.end;
3536
+ }
3537
+ else {
3538
+ newItem.start = itemIndex * originItemSize;
3539
+ }
3540
+ newItem.end = newItem.start + newSizes[itemIndex];
3541
+ positionIndexes.push(newItem.start);
3542
+ indexToItem[itemIndex] = positionIndexToItem[i] = newItem;
3543
+ previous = newItem;
3544
+ }
3545
+ return {
3546
+ indexes: newIndexes,
3547
+ positionIndexes: [...positionIndexes],
3548
+ positionIndexToItem: Object.assign({}, positionIndexToItem),
3549
+ indexToItem,
3550
+ };
3551
+ }
3552
+ /**
3553
+ * Calculate item by position
3554
+ */
3555
+ const getItemByPosition = ({ indexes, positionIndexes, originItemSize, positionIndexToItem, }, pos) => {
3556
+ const item = {
3557
+ itemIndex: 0,
3558
+ start: 0,
3559
+ end: 0,
3560
+ };
3561
+ const currentPlace = indexes.length ? sortedIndex(positionIndexes, pos) : 0;
3562
+ // not found or first index
3563
+ if (!currentPlace) {
3564
+ item.itemIndex = Math.floor(pos / originItemSize);
3565
+ item.start = item.itemIndex * originItemSize;
3566
+ item.end = item.start + originItemSize;
3567
+ return item;
3568
+ }
3569
+ const positionItem = positionIndexToItem[currentPlace - 1];
3570
+ // if item has specified size
3571
+ if (positionItem.end > pos) {
3572
+ return positionItem;
3573
+ }
3574
+ // special size item was present before
3575
+ const relativePos = pos - positionItem.end;
3576
+ const relativeIndex = Math.floor(relativePos / originItemSize);
3577
+ item.itemIndex = positionItem.itemIndex + 1 + relativeIndex;
3578
+ item.start = positionItem.end + relativeIndex * originItemSize;
3579
+ item.end = item.start + originItemSize;
3580
+ return item;
3581
+ };
3582
+ function getItemByIndex(dimension, index) {
3583
+ let item = {
3584
+ itemIndex: index,
3585
+ start: 0,
3586
+ end: 0,
3587
+ };
3588
+ // if item has specified size
3589
+ if (dimension.indexToItem[index]) {
3590
+ return dimension.indexToItem[index];
3591
+ }
3592
+ const currentPlace = dimension.indexes.length
3593
+ ? sortedIndex(dimension.indexes, index)
3594
+ : 0;
3595
+ // not found or first index
3596
+ if (!currentPlace) {
3597
+ item.start = item.itemIndex * dimension.originItemSize;
3598
+ item.end = item.start + dimension.originItemSize;
3599
+ return item;
3600
+ }
3601
+ // special size item was present before
3602
+ const positionItem = dimension.indexToItem[dimension.indexes[currentPlace - 1]];
3603
+ item.start =
3604
+ positionItem.end +
3605
+ (index - positionItem.itemIndex - 1) * dimension.originItemSize;
3606
+ item.end = item.start + dimension.originItemSize;
3607
+ return item;
3608
+ }
3609
+
3610
+ export { baseProperty as $, ROW_HEADER_TYPE as A, HEADER_SORTABLE_CLASS as B, CELL_CLASS as C, DataStore as D, HEADER_ROW_CLASS as E, HEADER_ACTUAL_ROW_CLASS as F, DRAG_ICON_CLASS as G, HEADER_CLASS as H, DRAGGABLE_CLASS as I, FOCUS_CLASS as J, MOBILE_CLASS as K, CELL_HANDLER_CLASS as L, MIN_COL_SIZE as M, EDIT_INPUT_WR as N, DRAGG_TEXT as O, GRID_INTERNALS as P, ROW_FOCUSED_CLASS as Q, RESIZE_INTERVAL as R, SELECTION_BORDER_CLASS as S, TMP_SELECTION_BG_CLASS as T, codesLetter as U, keyValues as V, createStore as W, identity as X, isArray$1 as Y, toInteger as Z, isIterateeCall as _, getVisibleSourceItem as a, isArrayLike as a0, getTag$1 as a1, baseKeys as a2, keys as a3, baseIteratee as a4, OsPlatform as a5, KeyCodesEnum as a6, findIndex as a7, getNative as a8, getSourceItem as b, getSourcePhysicalIndex as c, setSourceByPhysicalIndex as d, setItems as e, getSourceItemVirtualIndexByProp as f, getPhysical as g, gatherTrimmedItems as h, calculateDimensionData as i, getItemByPosition as j, getItemByIndex as k, findPositionInArray as l, pushSorted as m, mergeSortedArray as n, getScrollbarSize as o, proxyPlugin as p, scaleValue as q, range as r, setSourceByVirtualIndex as s, trimmedPlugin as t, timeout as u, applyMixins as v, setStore as w, DATA_COL as x, DATA_ROW as y, DISABLED_CLASS as z };
3611
+
5
3612
  //# sourceMappingURL=dimension.helpers-5567e424.js.map