@ancon/wildcat-utils 1.51.0-check-optimizations.1 → 1.51.0-check-optimizations.3

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 (81) hide show
  1. package/{_baseIsEqual-5e6adb07.mjs → _baseIsEqual-4ee44a4c.mjs} +1 -1
  2. package/{_baseIsEqual-ad544573.js → _baseIsEqual-7e335f42.js} +1 -1
  3. package/_baseIteratee-374c60ca.js +1 -0
  4. package/{_baseIteratee-db1f278d.mjs → _baseIteratee-5fbe491c.mjs} +21 -20
  5. package/_getTag-3d3032da.js +1 -0
  6. package/{_getTag-fcc5160b.mjs → _getTag-ebc0f90e.mjs} +20 -24
  7. package/api/getMediaImageClosestSize.d.ts +2 -0
  8. package/api/getMediaImageClosestSize.js +1 -0
  9. package/api/getMediaImageClosestSize.mjs +31 -0
  10. package/api/index.d.ts +2 -1
  11. package/api/index.js +1 -1
  12. package/api/index.mjs +8 -6
  13. package/card/getPrepaidWalletScanReadingInfo.d.ts +7 -0
  14. package/card/getPrepaidWalletScanReadingInfo.js +1 -0
  15. package/card/getPrepaidWalletScanReadingInfo.mjs +32 -0
  16. package/card/getScannedWalletReadingInfo.d.ts +1 -0
  17. package/card/index.d.ts +2 -0
  18. package/card/index.js +1 -1
  19. package/card/index.mjs +7 -4
  20. package/check/getOrganizedCheckItemModifications.js +1 -1
  21. package/check/getOrganizedCheckItemModifications.mjs +65 -64
  22. package/check/index.js +1 -1
  23. package/check/index.mjs +9 -8
  24. package/checkout/getCheckoutOrderStatusTexts.js +1 -1
  25. package/checkout/getCheckoutOrderStatusTexts.mjs +7 -6
  26. package/checkout/index.js +1 -1
  27. package/checkout/index.mjs +61 -60
  28. package/checkout/isCheckoutItemsAreEqual.js +1 -1
  29. package/checkout/isCheckoutItemsAreEqual.mjs +8 -7
  30. package/hangfire/createHangfirePoller.d.ts +13 -2
  31. package/hangfire/createHangfirePoller.js +1 -1
  32. package/hangfire/createHangfirePoller.mjs +153 -87
  33. package/hangfire/createMakeHangfireRequest.d.ts +2 -0
  34. package/hangfire/createMakeHangfireRequest.js +1 -1
  35. package/hangfire/createMakeHangfireRequest.mjs +18 -17
  36. package/{identity-cf449299.mjs → identity-41198897.mjs} +1 -1
  37. package/{identity-2a048185.js → identity-58f9497d.js} +1 -1
  38. package/index.d.ts +1 -0
  39. package/index.js +1 -1
  40. package/index.mjs +372 -365
  41. package/isObject-361bd834.js +1 -0
  42. package/isObject-b8638513.mjs +7 -0
  43. package/multilingual/createLocalizedCheckDetails.d.ts +16 -0
  44. package/multilingual/createLocalizedCheckDetails.js +1 -0
  45. package/multilingual/createLocalizedCheckDetails.mjs +53 -0
  46. package/multilingual/index.d.ts +2 -0
  47. package/multilingual/index.js +1 -0
  48. package/multilingual/index.mjs +5 -0
  49. package/order/getCheckOrderItemsMappedByTicketItemStatus.js +1 -1
  50. package/order/getCheckOrderItemsMappedByTicketItemStatus.mjs +7 -6
  51. package/order/getCheckOrderMinimumStatusTicketItem.js +1 -1
  52. package/order/getCheckOrderMinimumStatusTicketItem.mjs +20 -19
  53. package/order/index.js +1 -1
  54. package/order/index.mjs +11 -10
  55. package/outlet/getOutletCurrentClosingTimeText.js +1 -1
  56. package/outlet/getOutletCurrentClosingTimeText.mjs +10 -9
  57. package/outlet/getOutletTodayOpeningTimes.js +1 -1
  58. package/outlet/getOutletTodayOpeningTimes.mjs +7 -6
  59. package/outlet/index.d.ts +2 -1
  60. package/outlet/index.js +1 -1
  61. package/outlet/index.mjs +71 -68
  62. package/outlet/isOutletAcceptingPreOrdersWhenClosed.d.ts +2 -0
  63. package/outlet/isOutletAcceptingPreOrdersWhenClosed.js +1 -0
  64. package/outlet/isOutletAcceptingPreOrdersWhenClosed.mjs +14 -0
  65. package/outlet/serviceDateTimesFromOpeningHours.js +1 -1
  66. package/outlet/serviceDateTimesFromOpeningHours.mjs +29 -28
  67. package/package.json +26 -1
  68. package/preOrder/isGroupPreOrder.d.ts +6 -4
  69. package/preOrder/isGroupPreOrder.js +1 -1
  70. package/preOrder/isGroupPreOrder.mjs +4 -4
  71. package/preOrder/isPreOrderLink.d.ts +6 -4
  72. package/preOrder/isPreOrderLink.js +1 -1
  73. package/preOrder/isPreOrderLink.mjs +4 -4
  74. package/preOrder/isPreOrderSharable.d.ts +6 -4
  75. package/preOrder/isPreOrderSharable.js +1 -1
  76. package/preOrder/isPreOrderSharable.mjs +1 -1
  77. package/signalr/SignalR.js +1 -1
  78. package/signalr/SignalR.mjs +62 -62
  79. package/signalr/types.d.ts +2 -0
  80. package/_baseIteratee-ae97e42e.js +0 -1
  81. package/_getTag-d4cd1660.js +0 -1
@@ -1,4 +1,4 @@
1
- import { M as q, e as K, U as M, g as x, a as I, i as $, b as R, c } from "./_getTag-fcc5160b.mjs";
1
+ import { M as q, e as K, U as M, g as x, a as I, i as $, b as R, c } from "./_getTag-ebc0f90e.mjs";
2
2
  import { S as G, a as B, i as C } from "./isObjectLike-54341556.mjs";
3
3
  var J = "__lodash_hash_undefined__";
4
4
  function Q(n) {
@@ -1 +1 @@
1
- "use strict";const l=require("./_getTag-d4cd1660.js"),L=require("./isObjectLike-963267e9.js");var H="__lodash_hash_undefined__";function N(e){return this.__data__.set(e,H),this}function U(e){return this.__data__.has(e)}function P(e){var n=-1,a=e==null?0:e.length;for(this.__data__=new l.MapCache;++n<a;)this.add(e[n])}P.prototype.add=P.prototype.push=N;P.prototype.has=U;function q(e,n){for(var a=-1,f=e==null?0:e.length;++a<f;)if(n(e[a],a,e))return!0;return!1}function C(e,n){return e.has(n)}var F=1,K=2;function G(e,n,a,f,u,r){var s=a&F,g=e.length,t=n.length;if(g!=t&&!(s&&t>g))return!1;var A=r.get(e),T=r.get(n);if(A&&T)return A==n&&T==e;var _=-1,i=!0,p=a&K?new P:void 0;for(r.set(e,n),r.set(n,e);++_<g;){var d=e[_],v=n[_];if(f)var y=s?f(v,d,_,n,e,r):f(d,v,_,e,n,r);if(y!==void 0){if(y)continue;i=!1;break}if(p){if(!q(n,function(O,w){if(!C(p,w)&&(d===O||u(d,O,a,f,r)))return p.push(w)})){i=!1;break}}else if(!(d===v||u(d,v,a,f,r))){i=!1;break}}return r.delete(e),r.delete(n),i}function J(e){var n=-1,a=Array(e.size);return e.forEach(function(f,u){a[++n]=[u,f]}),a}function $(e){var n=-1,a=Array(e.size);return e.forEach(function(f){a[++n]=f}),a}var Q=1,X=2,Y="[object Boolean]",Z="[object Date]",W="[object Error]",h="[object Map]",m="[object Number]",z="[object RegExp]",j="[object Set]",V="[object String]",o="[object Symbol]",k="[object ArrayBuffer]",ee="[object DataView]",c=L.Symbol?L.Symbol.prototype:void 0,D=c?c.valueOf:void 0;function ne(e,n,a,f,u,r,s){switch(a){case ee:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case k:return!(e.byteLength!=n.byteLength||!r(new l.Uint8Array(e),new l.Uint8Array(n)));case Y:case Z:case m:return l.eq(+e,+n);case W:return e.name==n.name&&e.message==n.message;case z:case V:return e==n+"";case h:var g=J;case j:var t=f&Q;if(g||(g=$),e.size!=n.size&&!t)return!1;var A=s.get(e);if(A)return A==n;f|=X,s.set(e,n);var T=G(g(e),g(n),f,u,r,s);return s.delete(e),T;case o:if(D)return D.call(e)==D.call(n)}return!1}var re=1,ae=Object.prototype,fe=ae.hasOwnProperty;function ie(e,n,a,f,u,r){var s=a&re,g=l.getAllKeys(e),t=g.length,A=l.getAllKeys(n),T=A.length;if(t!=T&&!s)return!1;for(var _=t;_--;){var i=g[_];if(!(s?i in n:fe.call(n,i)))return!1}var p=r.get(e),d=r.get(n);if(p&&d)return p==n&&d==e;var v=!0;r.set(e,n),r.set(n,e);for(var y=s;++_<t;){i=g[_];var O=e[i],w=n[i];if(f)var I=s?f(w,O,i,n,e,r):f(O,w,i,e,n,r);if(!(I===void 0?O===w||u(O,w,a,f,r):I)){v=!1;break}y||(y=i=="constructor")}if(v&&!y){var E=e.constructor,S=n.constructor;E!=S&&"constructor"in e&&"constructor"in n&&!(typeof E=="function"&&E instanceof E&&typeof S=="function"&&S instanceof S)&&(v=!1)}return r.delete(e),r.delete(n),v}var se=1,M="[object Arguments]",x="[object Array]",R="[object Object]",ue=Object.prototype,B=ue.hasOwnProperty;function te(e,n,a,f,u,r){var s=L.isArray(e),g=L.isArray(n),t=s?x:l.getTag(e),A=g?x:l.getTag(n);t=t==M?R:t,A=A==M?R:A;var T=t==R,_=A==R,i=t==A;if(i&&l.isBuffer(e)){if(!l.isBuffer(n))return!1;s=!0,T=!1}if(i&&!T)return r||(r=new l.Stack),s||l.isTypedArray(e)?G(e,n,a,f,u,r):ne(e,n,t,a,f,u,r);if(!(a&se)){var p=T&&B.call(e,"__wrapped__"),d=_&&B.call(n,"__wrapped__");if(p||d){var v=p?e.value():e,y=d?n.value():n;return r||(r=new l.Stack),u(v,y,a,f,r)}}return i?(r||(r=new l.Stack),ie(e,n,a,f,u,r)):!1}function b(e,n,a,f,u){return e===n?!0:e==null||n==null||!L.isObjectLike(e)&&!L.isObjectLike(n)?e!==e&&n!==n:te(e,n,a,f,b,u)}exports.SetCache=P;exports.baseIsEqual=b;exports.cacheHas=C;exports.setToArray=$;
1
+ "use strict";const l=require("./_getTag-3d3032da.js"),L=require("./isObjectLike-963267e9.js");var H="__lodash_hash_undefined__";function N(e){return this.__data__.set(e,H),this}function U(e){return this.__data__.has(e)}function P(e){var n=-1,a=e==null?0:e.length;for(this.__data__=new l.MapCache;++n<a;)this.add(e[n])}P.prototype.add=P.prototype.push=N;P.prototype.has=U;function q(e,n){for(var a=-1,f=e==null?0:e.length;++a<f;)if(n(e[a],a,e))return!0;return!1}function C(e,n){return e.has(n)}var F=1,K=2;function G(e,n,a,f,u,r){var s=a&F,g=e.length,t=n.length;if(g!=t&&!(s&&t>g))return!1;var A=r.get(e),T=r.get(n);if(A&&T)return A==n&&T==e;var _=-1,i=!0,p=a&K?new P:void 0;for(r.set(e,n),r.set(n,e);++_<g;){var d=e[_],v=n[_];if(f)var y=s?f(v,d,_,n,e,r):f(d,v,_,e,n,r);if(y!==void 0){if(y)continue;i=!1;break}if(p){if(!q(n,function(O,w){if(!C(p,w)&&(d===O||u(d,O,a,f,r)))return p.push(w)})){i=!1;break}}else if(!(d===v||u(d,v,a,f,r))){i=!1;break}}return r.delete(e),r.delete(n),i}function J(e){var n=-1,a=Array(e.size);return e.forEach(function(f,u){a[++n]=[u,f]}),a}function $(e){var n=-1,a=Array(e.size);return e.forEach(function(f){a[++n]=f}),a}var Q=1,X=2,Y="[object Boolean]",Z="[object Date]",W="[object Error]",h="[object Map]",m="[object Number]",z="[object RegExp]",j="[object Set]",V="[object String]",o="[object Symbol]",k="[object ArrayBuffer]",ee="[object DataView]",c=L.Symbol?L.Symbol.prototype:void 0,D=c?c.valueOf:void 0;function ne(e,n,a,f,u,r,s){switch(a){case ee:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case k:return!(e.byteLength!=n.byteLength||!r(new l.Uint8Array(e),new l.Uint8Array(n)));case Y:case Z:case m:return l.eq(+e,+n);case W:return e.name==n.name&&e.message==n.message;case z:case V:return e==n+"";case h:var g=J;case j:var t=f&Q;if(g||(g=$),e.size!=n.size&&!t)return!1;var A=s.get(e);if(A)return A==n;f|=X,s.set(e,n);var T=G(g(e),g(n),f,u,r,s);return s.delete(e),T;case o:if(D)return D.call(e)==D.call(n)}return!1}var re=1,ae=Object.prototype,fe=ae.hasOwnProperty;function ie(e,n,a,f,u,r){var s=a&re,g=l.getAllKeys(e),t=g.length,A=l.getAllKeys(n),T=A.length;if(t!=T&&!s)return!1;for(var _=t;_--;){var i=g[_];if(!(s?i in n:fe.call(n,i)))return!1}var p=r.get(e),d=r.get(n);if(p&&d)return p==n&&d==e;var v=!0;r.set(e,n),r.set(n,e);for(var y=s;++_<t;){i=g[_];var O=e[i],w=n[i];if(f)var I=s?f(w,O,i,n,e,r):f(O,w,i,e,n,r);if(!(I===void 0?O===w||u(O,w,a,f,r):I)){v=!1;break}y||(y=i=="constructor")}if(v&&!y){var E=e.constructor,S=n.constructor;E!=S&&"constructor"in e&&"constructor"in n&&!(typeof E=="function"&&E instanceof E&&typeof S=="function"&&S instanceof S)&&(v=!1)}return r.delete(e),r.delete(n),v}var se=1,M="[object Arguments]",x="[object Array]",R="[object Object]",ue=Object.prototype,B=ue.hasOwnProperty;function te(e,n,a,f,u,r){var s=L.isArray(e),g=L.isArray(n),t=s?x:l.getTag(e),A=g?x:l.getTag(n);t=t==M?R:t,A=A==M?R:A;var T=t==R,_=A==R,i=t==A;if(i&&l.isBuffer(e)){if(!l.isBuffer(n))return!1;s=!0,T=!1}if(i&&!T)return r||(r=new l.Stack),s||l.isTypedArray(e)?G(e,n,a,f,u,r):ne(e,n,t,a,f,u,r);if(!(a&se)){var p=T&&B.call(e,"__wrapped__"),d=_&&B.call(n,"__wrapped__");if(p||d){var v=p?e.value():e,y=d?n.value():n;return r||(r=new l.Stack),u(v,y,a,f,r)}}return i?(r||(r=new l.Stack),ie(e,n,a,f,u,r)):!1}function b(e,n,a,f,u){return e===n?!0:e==null||n==null||!L.isObjectLike(e)&&!L.isObjectLike(n)?e!==e&&n!==n:te(e,n,a,f,b,u)}exports.SetCache=P;exports.baseIsEqual=b;exports.cacheHas=C;exports.setToArray=$;
@@ -0,0 +1 @@
1
+ "use strict";const a=require("./_getTag-3d3032da.js"),E=require("./_baseIsEqual-7e335f42.js"),R=require("./isObject-361bd834.js"),u=require("./identity-58f9497d.js"),I=require("./isObjectLike-963267e9.js");var _=1,o=2;function q(n,r,e,i){var t=e.length,s=t,l=!i;if(n==null)return!s;for(n=Object(n);t--;){var f=e[t];if(l&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return!1}for(;++t<s;){f=e[t];var A=f[0],g=n[A],h=f[1];if(l&&f[2]){if(g===void 0&&!(A in n))return!1}else{var d=new a.Stack;if(i)var O=i(g,h,A,n,r,d);if(!(O===void 0?E.baseIsEqual(h,g,_|o,i,d):O))return!1}}return!0}function P(n){return n===n&&!R.isObject(n)}function L(n){for(var r=a.keys(n),e=r.length;e--;){var i=r[e],t=n[i];r[e]=[i,t,P(t)]}return r}function y(n,r){return function(e){return e==null?!1:e[n]===r&&(r!==void 0||n in Object(e))}}function M(n){var r=L(n);return r.length==1&&r[0][2]?y(r[0][0],r[0][1]):function(e){return e===n||q(e,n,r)}}function C(n,r,e){var i=n==null?void 0:u.baseGet(n,r);return i===void 0?e:i}function c(n,r){return n!=null&&r in Object(n)}function G(n,r,e){r=u.castPath(r,n);for(var i=-1,t=r.length,s=!1;++i<t;){var l=u.toKey(r[i]);if(!(s=n!=null&&e(n,l)))break;n=n[l]}return s||++i!=t?s:(t=n==null?0:n.length,!!t&&a.isLength(t)&&a.isIndex(l,t)&&(I.isArray(n)||a.isArguments(n)))}function w(n,r){return n!=null&&G(n,r,c)}var D=1,K=2;function F(n,r){return u.isKey(n)&&P(r)?y(u.toKey(n),r):function(e){var i=C(e,n);return i===void 0&&i===r?w(e,n):E.baseIsEqual(r,i,D|K)}}function v(n){return function(r){return r==null?void 0:r[n]}}function x(n){return function(r){return u.baseGet(r,n)}}function S(n){return u.isKey(n)?v(u.toKey(n)):x(n)}function T(n){return typeof n=="function"?n:n==null?u.identity:typeof n=="object"?I.isArray(n)?F(n[0],n[1]):M(n):S(n)}exports.baseIteratee=T;
@@ -1,7 +1,8 @@
1
- import { b as I, d as M, k as _, f as p, h as C, j as L } from "./_getTag-fcc5160b.mjs";
2
- import { b as o } from "./_baseIsEqual-5e6adb07.mjs";
3
- import { b as P, c as w, t as h, a as O, i as y } from "./identity-cf449299.mjs";
4
- import { a as R } from "./isObjectLike-54341556.mjs";
1
+ import { b as p, k as I, d as M, f as _, h as C } from "./_getTag-ebc0f90e.mjs";
2
+ import { b as g } from "./_baseIsEqual-4ee44a4c.mjs";
3
+ import { i as L } from "./isObject-b8638513.mjs";
4
+ import { b as m, c as w, t as h, a as P, i as y } from "./identity-41198897.mjs";
5
+ import { a as O } from "./isObjectLike-54341556.mjs";
5
6
  var D = 1, G = 2;
6
7
  function x(n, r, i, e) {
7
8
  var t = i.length, u = t, s = !e;
@@ -19,22 +20,22 @@ function x(n, r, i, e) {
19
20
  if (a === void 0 && !(l in n))
20
21
  return !1;
21
22
  } else {
22
- var d = new I();
23
+ var o = new p();
23
24
  if (e)
24
- var g = e(a, A, l, n, r, d);
25
- if (!(g === void 0 ? o(A, a, D | G, e, d) : g))
25
+ var d = e(a, A, l, n, r, o);
26
+ if (!(d === void 0 ? g(A, a, D | G, e, o) : d))
26
27
  return !1;
27
28
  }
28
29
  }
29
30
  return !0;
30
31
  }
31
- function m(n) {
32
- return n === n && !M(n);
32
+ function R(n) {
33
+ return n === n && !L(n);
33
34
  }
34
35
  function F(n) {
35
- for (var r = _(n), i = r.length; i--; ) {
36
+ for (var r = I(n), i = r.length; i--; ) {
36
37
  var e = r[i], t = n[e];
37
- r[i] = [e, t, m(t)];
38
+ r[i] = [e, t, R(t)];
38
39
  }
39
40
  return r;
40
41
  }
@@ -50,7 +51,7 @@ function v(n) {
50
51
  };
51
52
  }
52
53
  function S(n, r, i) {
53
- var e = n == null ? void 0 : P(n, r);
54
+ var e = n == null ? void 0 : m(n, r);
54
55
  return e === void 0 ? i : e;
55
56
  }
56
57
  function K(n, r) {
@@ -64,16 +65,16 @@ function N(n, r, i) {
64
65
  break;
65
66
  n = n[s];
66
67
  }
67
- return u || ++e != t ? u : (t = n == null ? 0 : n.length, !!t && p(t) && C(s, t) && (R(n) || L(n)));
68
+ return u || ++e != t ? u : (t = n == null ? 0 : n.length, !!t && M(t) && _(s, t) && (O(n) || C(n)));
68
69
  }
69
70
  function T(n, r) {
70
71
  return n != null && N(n, r, K);
71
72
  }
72
73
  var U = 1, $ = 2;
73
74
  function q(n, r) {
74
- return O(n) && m(r) ? E(h(n), r) : function(i) {
75
+ return P(n) && R(r) ? E(h(n), r) : function(i) {
75
76
  var e = S(i, n);
76
- return e === void 0 && e === r ? T(i, n) : o(r, e, U | $);
77
+ return e === void 0 && e === r ? T(i, n) : g(r, e, U | $);
77
78
  };
78
79
  }
79
80
  function H(n) {
@@ -83,15 +84,15 @@ function H(n) {
83
84
  }
84
85
  function B(n) {
85
86
  return function(r) {
86
- return P(r, n);
87
+ return m(r, n);
87
88
  };
88
89
  }
89
90
  function J(n) {
90
- return O(n) ? H(h(n)) : B(n);
91
+ return P(n) ? H(h(n)) : B(n);
91
92
  }
92
- function Z(n) {
93
- return typeof n == "function" ? n : n == null ? y : typeof n == "object" ? R(n) ? q(n[0], n[1]) : v(n) : J(n);
93
+ function c(n) {
94
+ return typeof n == "function" ? n : n == null ? y : typeof n == "object" ? O(n) ? q(n[0], n[1]) : v(n) : J(n);
94
95
  }
95
96
  export {
96
- Z as b
97
+ c as b
97
98
  };
@@ -0,0 +1 @@
1
+ "use strict";const o=require("./isObjectLike-963267e9.js"),N=require("./isObject-361bd834.js");var ut="[object AsyncFunction]",pt="[object Function]",ft="[object GeneratorFunction]",ht="[object Proxy]";function H(t){if(!N.isObject(t))return!1;var e=o.baseGetTag(t);return e==pt||e==ft||e==ut||e==ht}var lt=o.root["__core-js_shared__"];const m=lt;var I=function(){var t=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function gt(t){return!!I&&I in t}var yt=Function.prototype,_t=yt.toString;function f(t){if(t!=null){try{return _t.call(t)}catch{}try{return t+""}catch{}}return""}var dt=/[\\^$.*+?()[\]{}|]/g,bt=/^\[object .+?Constructor\]$/,vt=Function.prototype,jt=Object.prototype,Tt=vt.toString,At=jt.hasOwnProperty,$t=RegExp("^"+Tt.call(At).replace(dt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function mt(t){if(!N.isObject(t)||gt(t))return!1;var e=H(t)?$t:bt;return e.test(f(t))}function wt(t,e){return t==null?void 0:t[e]}function h(t,e){var r=wt(t,e);return mt(r)?r:void 0}var Ot=h(Object,"create");const b=Ot;function St(){this.__data__=b?b(null):{},this.size=0}function Pt(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Ct="__lodash_hash_undefined__",xt=Object.prototype,It=xt.hasOwnProperty;function Et(t){var e=this.__data__;if(b){var r=e[t];return r===Ct?void 0:r}return It.call(e,t)?e[t]:void 0}var zt=Object.prototype,Mt=zt.hasOwnProperty;function Dt(t){var e=this.__data__;return b?e[t]!==void 0:Mt.call(e,t)}var Gt="__lodash_hash_undefined__";function Ut(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=b&&e===void 0?Gt:e,this}function p(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}p.prototype.clear=St;p.prototype.delete=Pt;p.prototype.get=Et;p.prototype.has=Dt;p.prototype.set=Ut;function Ft(){this.__data__=[],this.size=0}function k(t,e){return t===e||t!==t&&e!==e}function T(t,e){for(var r=t.length;r--;)if(k(t[r][0],e))return r;return-1}var Lt=Array.prototype,Bt=Lt.splice;function Kt(t){var e=this.__data__,r=T(e,t);if(r<0)return!1;var a=e.length-1;return r==a?e.pop():Bt.call(e,r,1),--this.size,!0}function Nt(t){var e=this.__data__,r=T(e,t);return r<0?void 0:e[r][1]}function Ht(t){return T(this.__data__,t)>-1}function kt(t,e){var r=this.__data__,a=T(r,t);return a<0?(++this.size,r.push([t,e])):r[a][1]=e,this}function i(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}i.prototype.clear=Ft;i.prototype.delete=Kt;i.prototype.get=Nt;i.prototype.has=Ht;i.prototype.set=kt;var Rt=h(o.root,"Map");const v=Rt;function Vt(){this.size=0,this.__data__={hash:new p,map:new(v||i),string:new p}}function qt(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function A(t,e){var r=t.__data__;return qt(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Wt(t){var e=A(this,t).delete(t);return this.size-=e?1:0,e}function Jt(t){return A(this,t).get(t)}function Xt(t){return A(this,t).has(t)}function Yt(t,e){var r=A(this,t),a=r.size;return r.set(t,e),this.size+=r.size==a?0:1,this}function l(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}l.prototype.clear=Vt;l.prototype.delete=Wt;l.prototype.get=Jt;l.prototype.has=Xt;l.prototype.set=Yt;function Zt(){this.__data__=new i,this.size=0}function Qt(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function te(t){return this.__data__.get(t)}function ee(t){return this.__data__.has(t)}var re=200;function ae(t,e){var r=this.__data__;if(r instanceof i){var a=r.__data__;if(!v||a.length<re-1)return a.push([t,e]),this.size=++r.size,this;r=this.__data__=new l(a)}return r.set(t,e),this.size=r.size,this}function g(t){var e=this.__data__=new i(t);this.size=e.size}g.prototype.clear=Zt;g.prototype.delete=Qt;g.prototype.get=te;g.prototype.has=ee;g.prototype.set=ae;var ne=o.root.Uint8Array;const oe=ne;function R(t,e){for(var r=-1,a=e.length,c=t.length;++r<a;)t[c+r]=e[r];return t}function V(t,e,r){var a=e(t);return o.isArray(t)?a:R(a,r(t))}function se(t,e){for(var r=-1,a=t==null?0:t.length,c=0,y=[];++r<a;){var _=t[r];e(_,r,t)&&(y[c++]=_)}return y}function q(){return[]}var ie=Object.prototype,ce=ie.propertyIsEnumerable,E=Object.getOwnPropertySymbols,ue=E?function(t){return t==null?[]:(t=Object(t),se(E(t),function(e){return ce.call(t,e)}))}:q;const W=ue;function pe(t,e){for(var r=-1,a=Array(t);++r<t;)a[r]=e(r);return a}var fe="[object Arguments]";function z(t){return o.isObjectLike(t)&&o.baseGetTag(t)==fe}var J=Object.prototype,he=J.hasOwnProperty,le=J.propertyIsEnumerable,ge=z(function(){return arguments}())?z:function(t){return o.isObjectLike(t)&&he.call(t,"callee")&&!le.call(t,"callee")};const X=ge;function ye(){return!1}var Y=typeof exports=="object"&&exports&&!exports.nodeType&&exports,M=Y&&typeof module=="object"&&module&&!module.nodeType&&module,_e=M&&M.exports===Y,D=_e?o.root.Buffer:void 0,de=D?D.isBuffer:void 0,be=de||ye;const Z=be;var ve=9007199254740991,je=/^(?:0|[1-9]\d*)$/;function Q(t,e){var r=typeof t;return e=e??ve,!!e&&(r=="number"||r!="symbol"&&je.test(t))&&t>-1&&t%1==0&&t<e}var Te=9007199254740991;function x(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Te}var Ae="[object Arguments]",$e="[object Array]",me="[object Boolean]",we="[object Date]",Oe="[object Error]",Se="[object Function]",Pe="[object Map]",Ce="[object Number]",xe="[object Object]",Ie="[object RegExp]",Ee="[object Set]",ze="[object String]",Me="[object WeakMap]",De="[object ArrayBuffer]",Ge="[object DataView]",Ue="[object Float32Array]",Fe="[object Float64Array]",Le="[object Int8Array]",Be="[object Int16Array]",Ke="[object Int32Array]",Ne="[object Uint8Array]",He="[object Uint8ClampedArray]",ke="[object Uint16Array]",Re="[object Uint32Array]",n={};n[Ue]=n[Fe]=n[Le]=n[Be]=n[Ke]=n[Ne]=n[He]=n[ke]=n[Re]=!0;n[Ae]=n[$e]=n[De]=n[me]=n[Ge]=n[we]=n[Oe]=n[Se]=n[Pe]=n[Ce]=n[xe]=n[Ie]=n[Ee]=n[ze]=n[Me]=!1;function Ve(t){return o.isObjectLike(t)&&x(t.length)&&!!n[o.baseGetTag(t)]}function tt(t){return function(e){return t(e)}}var et=typeof exports=="object"&&exports&&!exports.nodeType&&exports,d=et&&typeof module=="object"&&module&&!module.nodeType&&module,qe=d&&d.exports===et,w=qe&&o.freeGlobal.process,We=function(){try{var t=d&&d.require&&d.require("util").types;return t||w&&w.binding&&w.binding("util")}catch{}}();const O=We;var G=O&&O.isTypedArray,Je=G?tt(G):Ve;const rt=Je;var Xe=Object.prototype,Ye=Xe.hasOwnProperty;function at(t,e){var r=o.isArray(t),a=!r&&X(t),c=!r&&!a&&Z(t),y=!r&&!a&&!c&&rt(t),_=r||a||c||y,$=_?pe(t.length,String):[],ct=$.length;for(var s in t)(e||Ye.call(t,s))&&!(_&&(s=="length"||c&&(s=="offset"||s=="parent")||y&&(s=="buffer"||s=="byteLength"||s=="byteOffset")||Q(s,ct)))&&$.push(s);return $}var Ze=Object.prototype;function nt(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Ze;return t===r}function ot(t,e){return function(r){return t(e(r))}}var Qe=ot(Object.keys,Object);const tr=Qe;var er=Object.prototype,rr=er.hasOwnProperty;function ar(t){if(!nt(t))return tr(t);var e=[];for(var r in Object(t))rr.call(t,r)&&r!="constructor"&&e.push(r);return e}function st(t){return t!=null&&x(t.length)&&!H(t)}function it(t){return st(t)?at(t):ar(t)}function nr(t){return V(t,it,W)}var or=h(o.root,"DataView");const S=or;var sr=h(o.root,"Promise");const P=sr;var ir=h(o.root,"Set");const j=ir;var cr=h(o.root,"WeakMap");const C=cr;var U="[object Map]",ur="[object Object]",F="[object Promise]",L="[object Set]",B="[object WeakMap]",K="[object DataView]",pr=f(S),fr=f(v),hr=f(P),lr=f(j),gr=f(C),u=o.baseGetTag;(S&&u(new S(new ArrayBuffer(1)))!=K||v&&u(new v)!=U||P&&u(P.resolve())!=F||j&&u(new j)!=L||C&&u(new C)!=B)&&(u=function(t){var e=o.baseGetTag(t),r=e==ur?t.constructor:void 0,a=r?f(r):"";if(a)switch(a){case pr:return K;case fr:return U;case hr:return F;case lr:return L;case gr:return B}return e});const yr=u;exports.MapCache=l;exports.Set=j;exports.Stack=g;exports.Uint8Array=oe;exports.arrayLikeKeys=at;exports.arrayPush=R;exports.baseGetAllKeys=V;exports.baseUnary=tt;exports.eq=k;exports.getAllKeys=nr;exports.getNative=h;exports.getSymbols=W;exports.getTag=yr;exports.isArguments=X;exports.isArrayLike=st;exports.isBuffer=Z;exports.isIndex=Q;exports.isLength=x;exports.isPrototype=nt;exports.isTypedArray=rt;exports.keys=it;exports.nodeUtil=O;exports.overArg=ot;exports.stubArray=q;
@@ -1,8 +1,5 @@
1
1
  import { b as v, r as i, a as V, i as C, f as Y } from "./isObjectLike-54341556.mjs";
2
- function K(t) {
3
- var e = typeof t;
4
- return t != null && (e == "object" || e == "function");
5
- }
2
+ import { i as K } from "./isObject-b8638513.mjs";
6
3
  var Z = "[object AsyncFunction]", Q = "[object Function]", tt = "[object GeneratorFunction]", et = "[object Proxy]";
7
4
  function L(t) {
8
5
  if (!K(t))
@@ -209,7 +206,7 @@ j.prototype.get = Kt;
209
206
  j.prototype.has = Lt;
210
207
  j.prototype.set = qt;
211
208
  var kt = i.Uint8Array;
212
- const br = kt;
209
+ const vr = kt;
213
210
  function Jt(t, e) {
214
211
  for (var r = -1, a = e.length, c = t.length; ++r < a; )
215
212
  t[c + r] = e[r];
@@ -323,7 +320,7 @@ function or(t) {
323
320
  function sr(t) {
324
321
  return or(t) ? Xe(t) : nr(t);
325
322
  }
326
- function vr(t) {
323
+ function jr(t) {
327
324
  return Xt(t, sr, re);
328
325
  }
329
326
  var ir = h(i, "DataView");
@@ -352,31 +349,30 @@ var G = "[object Map]", fr = "[object Object]", B = "[object Promise]", H = "[ob
352
349
  }
353
350
  return e;
354
351
  });
355
- const jr = u;
352
+ const mr = u;
356
353
  export {
357
354
  l as M,
358
355
  S,
359
- br as U,
360
- jr as a,
356
+ vr as U,
357
+ mr as a,
361
358
  j as b,
362
359
  qe as c,
363
- K as d,
360
+ k as d,
364
361
  St as e,
365
- k as f,
366
- vr as g,
367
- _e as h,
362
+ _e as f,
363
+ jr as g,
364
+ ce as h,
368
365
  le as i,
369
- ce as j,
366
+ h as j,
370
367
  sr as k,
371
- h as l,
372
- Ze as m,
373
- or as n,
374
- Xe as o,
375
- re as p,
376
- Qe as q,
377
- Jt as r,
368
+ Ze as l,
369
+ or as m,
370
+ Xe as n,
371
+ re as o,
372
+ Qe as p,
373
+ Jt as q,
374
+ Xt as r,
378
375
  Zt as s,
379
- Xt as t,
380
- F as u,
381
- Ve as v
376
+ F as t,
377
+ Ve as u
382
378
  };
@@ -0,0 +1,2 @@
1
+ declare function getMediaImageClosestSize(width?: number, height?: number): string;
2
+ export default getMediaImageClosestSize;
@@ -0,0 +1 @@
1
+ "use strict";var h=Object.defineProperty;var r=(t,e,i)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var a=(t,e,i)=>(r(t,typeof e!="symbol"?e+"":e,i),i);class s{constructor(e,i=e){a(this,"width");a(this,"height");this.width=e,this.height=i}toMediaApiValue(){return`${this.width}x${this.height}`}}const n=[new s(100),new s(200),new s(400),new s(600)];function u(t,e){if(t||e){const i=Math.max(t||0,e||0);for(const o of n)if(o.width>=i)return o.toMediaApiValue()}return n[n.length-1].toMediaApiValue()}module.exports=u;
@@ -0,0 +1,31 @@
1
+ var h = Object.defineProperty;
2
+ var r = (t, e, i) => e in t ? h(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
3
+ var s = (t, e, i) => (r(t, typeof e != "symbol" ? e + "" : e, i), i);
4
+ class a {
5
+ constructor(e, i = e) {
6
+ s(this, "width");
7
+ s(this, "height");
8
+ this.width = e, this.height = i;
9
+ }
10
+ toMediaApiValue() {
11
+ return `${this.width}x${this.height}`;
12
+ }
13
+ }
14
+ const n = [
15
+ new a(100),
16
+ new a(200),
17
+ new a(400),
18
+ new a(600)
19
+ ];
20
+ function d(t, e) {
21
+ if (t || e) {
22
+ const i = Math.max(t || 0, e || 0);
23
+ for (const o of n)
24
+ if (o.width >= i)
25
+ return o.toMediaApiValue();
26
+ }
27
+ return n[n.length - 1].toMediaApiValue();
28
+ }
29
+ export {
30
+ d as default
31
+ };
package/api/index.d.ts CHANGED
@@ -5,4 +5,5 @@ import generateBackoffWithVariableJitter from './generateBackoffWithVariableJitt
5
5
  import isAcceptedResponse from './isAcceptedResponse';
6
6
  import isNoContentResponse from './isNoContentResponse';
7
7
  import APIFilterBuilder from './APIFilterBuilder';
8
- export { getUrlAndParams, getEndpointWithVersion, generateBackoffWithEqualJitter, generateBackoffWithVariableJitter, isAcceptedResponse, isNoContentResponse, APIFilterBuilder, };
8
+ import getMediaImageClosestSize from './getMediaImageClosestSize';
9
+ export { getUrlAndParams, getEndpointWithVersion, generateBackoffWithEqualJitter, generateBackoffWithVariableJitter, isAcceptedResponse, isNoContentResponse, APIFilterBuilder, getMediaImageClosestSize, };
package/api/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./getUrlAndParams.js"),t=require("./getEndpointWithVersion.js"),i=require("./generateBackoffWithEqualJitter.js"),r=require("./generateBackoffWithVariableJitter.js"),n=require("./isAcceptedResponse.js"),a=require("./isNoContentResponse.js"),o=require("./APIFilterBuilder.js");require("../number/randomIntFromInterval.js");require("./types.js");exports.getUrlAndParams=e;exports.getEndpointWithVersion=t;exports.generateBackoffWithEqualJitter=i;exports.generateBackoffWithVariableJitter=r;exports.isAcceptedResponse=n;exports.isNoContentResponse=a;exports.APIFilterBuilder=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./getUrlAndParams.js"),t=require("./getEndpointWithVersion.js"),i=require("./generateBackoffWithEqualJitter.js"),r=require("./generateBackoffWithVariableJitter.js"),a=require("./isAcceptedResponse.js"),n=require("./isNoContentResponse.js"),o=require("./APIFilterBuilder.js"),s=require("./getMediaImageClosestSize.js");require("../number/randomIntFromInterval.js");require("./types.js");exports.getUrlAndParams=e;exports.getEndpointWithVersion=t;exports.generateBackoffWithEqualJitter=i;exports.generateBackoffWithVariableJitter=r;exports.isAcceptedResponse=a;exports.isNoContentResponse=n;exports.APIFilterBuilder=o;exports.getMediaImageClosestSize=s;
package/api/index.mjs CHANGED
@@ -1,18 +1,20 @@
1
- import { default as a } from "./getUrlAndParams.mjs";
1
+ import { default as o } from "./getUrlAndParams.mjs";
2
2
  import { default as s } from "./getEndpointWithVersion.mjs";
3
- import { default as p } from "./generateBackoffWithEqualJitter.mjs";
3
+ import { default as l } from "./generateBackoffWithEqualJitter.mjs";
4
4
  import { default as d } from "./generateBackoffWithVariableJitter.mjs";
5
5
  import { default as n } from "./isAcceptedResponse.mjs";
6
6
  import { default as x } from "./isNoContentResponse.mjs";
7
- import { default as g } from "./APIFilterBuilder.mjs";
7
+ import { default as c } from "./APIFilterBuilder.mjs";
8
+ import { default as A } from "./getMediaImageClosestSize.mjs";
8
9
  import "../number/randomIntFromInterval.mjs";
9
10
  import "./types.mjs";
10
11
  export {
11
- g as APIFilterBuilder,
12
- p as generateBackoffWithEqualJitter,
12
+ c as APIFilterBuilder,
13
+ l as generateBackoffWithEqualJitter,
13
14
  d as generateBackoffWithVariableJitter,
14
15
  s as getEndpointWithVersion,
15
- a as getUrlAndParams,
16
+ A as getMediaImageClosestSize,
17
+ o as getUrlAndParams,
16
18
  n as isAcceptedResponse,
17
19
  x as isNoContentResponse
18
20
  };
@@ -0,0 +1,7 @@
1
+ import { CardNumberInfo, WalletNumberType } from '@ancon/wildcat-types';
2
+ export default function getPrepaidWalletScanReadingInfo(reading: string,
3
+ /**
4
+ * Indicates whether to remove non-digit characters for non-JSON readings
5
+ * @default false
6
+ */
7
+ sanitize?: boolean): CardNumberInfo<WalletNumberType>;
@@ -0,0 +1 @@
1
+ "use strict";const u=require("@ancon/wildcat-types"),s=require("../isObject-361bd834.js");function l(e){try{return JSON.parse(e)}catch{try{const r=e.trim().replace(/[^\x20-\x7E\x80-\xFF]/g,"");return JSON.parse(r)}catch{return e}}}function i(e,t){const r=l(e);if(s.isObject(r)){const{walletNumber:a,walletNumberType:n}=r;return{cardNumber:a,cardNumberType:n??u.CardNumberType.AutoGenerated}}let c=e;return t&&(c=e.replace(/\D/g,"")),{cardNumber:c,cardNumberType:void 0}}module.exports=i;
@@ -0,0 +1,32 @@
1
+ import { CardNumberType as u } from "@ancon/wildcat-types";
2
+ import { i as o } from "../isObject-b8638513.mjs";
3
+ function l(e) {
4
+ try {
5
+ return JSON.parse(e);
6
+ } catch {
7
+ try {
8
+ const r = e.trim().replace(/[^\x20-\x7E\x80-\xFF]/g, "");
9
+ return JSON.parse(r);
10
+ } catch {
11
+ return e;
12
+ }
13
+ }
14
+ }
15
+ function d(e, t) {
16
+ const r = l(e);
17
+ if (o(r)) {
18
+ const { walletNumber: c, walletNumberType: n } = r;
19
+ return {
20
+ cardNumber: c,
21
+ cardNumberType: n ?? u.AutoGenerated
22
+ };
23
+ }
24
+ let a = e;
25
+ return t && (a = e.replace(/\D/g, "")), {
26
+ cardNumber: a,
27
+ cardNumberType: void 0
28
+ };
29
+ }
30
+ export {
31
+ d as default
32
+ };
@@ -1,4 +1,5 @@
1
1
  import { CardNumberType } from '@ancon/wildcat-types';
2
+ /** @deprecated Use getPrepaidWalletScanReadingInfo instead */
2
3
  export default function getScannedWalletReadingInfo(reading: string): {
3
4
  cardNumber: string;
4
5
  walletNumberType: CardNumberType;
package/card/index.d.ts CHANGED
@@ -3,11 +3,13 @@ import getGiftCardStatus from './getGiftCardStatus';
3
3
  import getWalletCardStatus from './getWalletCardStatus';
4
4
  import getScannedWalletReadingInfo from './getScannedWalletReadingInfo';
5
5
  import isWalletDebitTransaction from './isWalletDebitTransaction';
6
+ import getPrepaidWalletScanReadingInfo from './getPrepaidWalletScanReadingInfo';
6
7
  declare const _default: {
7
8
  isCardExpired: typeof isCardExpired;
8
9
  getGiftCardStatus: typeof getGiftCardStatus;
9
10
  getWalletCardStatus: typeof getWalletCardStatus;
10
11
  getScannedWalletReadingInfo: typeof getScannedWalletReadingInfo;
12
+ getPrepaidWalletScanReadingInfo: typeof getPrepaidWalletScanReadingInfo;
11
13
  isWalletDebitTransaction: typeof isWalletDebitTransaction;
12
14
  };
13
15
  export default _default;
package/card/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("./isCardExpired.js"),r=require("./getGiftCardStatus.js"),t=require("./getWalletCardStatus.js"),a=require("./getScannedWalletReadingInfo.js"),i=require("./isWalletDebitTransaction.js");require("moment");require("./types.js");require("lodash-es");require("@ancon/wildcat-types");require("../string/getParsedJSONFromString.js");const n={isCardExpired:e,getGiftCardStatus:r,getWalletCardStatus:t,getScannedWalletReadingInfo:a,isWalletDebitTransaction:i};module.exports=n;
1
+ "use strict";const e=require("./isCardExpired.js"),r=require("./getGiftCardStatus.js"),t=require("./getWalletCardStatus.js"),a=require("./getScannedWalletReadingInfo.js"),i=require("./isWalletDebitTransaction.js"),n=require("./getPrepaidWalletScanReadingInfo.js");require("moment");require("./types.js");require("lodash-es");require("@ancon/wildcat-types");require("../string/getParsedJSONFromString.js");require("../isObject-361bd834.js");const d={isCardExpired:e,getGiftCardStatus:r,getWalletCardStatus:t,getScannedWalletReadingInfo:a,getPrepaidWalletScanReadingInfo:n,isWalletDebitTransaction:i};module.exports=d;
package/card/index.mjs CHANGED
@@ -2,19 +2,22 @@ import t from "./isCardExpired.mjs";
2
2
  import r from "./getGiftCardStatus.mjs";
3
3
  import o from "./getWalletCardStatus.mjs";
4
4
  import i from "./getScannedWalletReadingInfo.mjs";
5
- import m from "./isWalletDebitTransaction.mjs";
5
+ import a from "./isWalletDebitTransaction.mjs";
6
+ import m from "./getPrepaidWalletScanReadingInfo.mjs";
6
7
  import "moment";
7
8
  import "./types.mjs";
8
9
  import "lodash-es";
9
10
  import "@ancon/wildcat-types";
10
11
  import "../string/getParsedJSONFromString.mjs";
11
- const u = {
12
+ import "../isObject-b8638513.mjs";
13
+ const x = {
12
14
  isCardExpired: t,
13
15
  getGiftCardStatus: r,
14
16
  getWalletCardStatus: o,
15
17
  getScannedWalletReadingInfo: i,
16
- isWalletDebitTransaction: m
18
+ getPrepaidWalletScanReadingInfo: m,
19
+ isWalletDebitTransaction: a
17
20
  };
18
21
  export {
19
- u as default
22
+ x as default
20
23
  };
@@ -1 +1 @@
1
- "use strict";const h=require("@ancon/wildcat-types"),M=require("../toString-b771abdf.js"),P=require("../identity-2a048185.js"),x=require("../_baseIteratee-ae97e42e.js"),k=require("../_getTag-d4cd1660.js"),$=require("../isObjectLike-963267e9.js"),O=require("./getUniqueCheckItemModificationId.js");require("../_baseIsEqual-ad544573.js");function L(n){return function(i,r,e){for(var d=-1,t=Object(i),o=e(i),c=o.length;c--;){var a=o[n?c:++d];if(r(t[a],a,t)===!1)break}return i}}var E=L();const _=E;function G(n,i){return n&&_(n,i,k.keys)}function Q(n,i){return function(r,e){if(r==null)return r;if(!k.isArrayLike(r))return n(r,e);for(var d=r.length,t=i?d:-1,o=Object(r);(i?t--:++t<d)&&e(o[t],t,o)!==!1;);return r}}var U=Q(G);const Z=U;function z(n,i){var r=-1,e=k.isArrayLike(n)?Array(n.length):[];return Z(n,function(d,t,o){e[++r]=i(d,t,o)}),e}function V(n,i){var r=n.length;for(n.sort(i);r--;)n[r]=n[r].value;return n}function j(n,i){if(n!==i){var r=n!==void 0,e=n===null,d=n===n,t=M.isSymbol(n),o=i!==void 0,c=i===null,a=i===i,u=M.isSymbol(i);if(!c&&!u&&!t&&n>i||t&&o&&a&&!c&&!u||e&&o&&a||!r&&a||!d)return 1;if(!e&&!t&&!u&&n<i||u&&r&&d&&!e&&!t||c&&r&&d||!o&&d||!a)return-1}return 0}function H(n,i,r){for(var e=-1,d=n.criteria,t=i.criteria,o=d.length,c=r.length;++e<o;){var a=j(d[e],t[e]);if(a){if(e>=c)return a;var u=r[e];return a*(u=="desc"?-1:1)}}return n.index-i.index}function J(n,i,r){i.length?i=M.arrayMap(i,function(t){return $.isArray(t)?function(o){return P.baseGet(o,t.length===1?t[0]:t)}:t}):i=[P.identity];var e=-1;i=M.arrayMap(i,k.baseUnary(x.baseIteratee));var d=z(n,function(t,o,c){var a=M.arrayMap(i,function(u){return u(t)});return{criteria:a,index:++e,value:t}});return V(d,function(t,o){return H(t,o,r)})}function C(n,i,r,e){return n==null?[]:($.isArray(i)||(i=i==null?[]:[i]),r=e?void 0:r,$.isArray(r)||(r=r==null?[]:[r]),J(n,i,r))}function K(n,i,r){const{add:e,replace:d,remove:t}=(i??[]).reduce((a,u)=>{const{modification:A,position:s,freeAmount:f,name:y="",quantity:p,cost:g,replacementName:T}=u,m=g===0;if(u.modification===h.ModificationType.Add){(f>0||m)&&a.add.push({id:O(u,"-free"),modificationType:A,name:y,freeAmount:m?p:f,quantity:m?p:f,currency:n,position:s,cost:0});const q=p-f;q>0&&!m&&a.add.push({id:O(u),modificationType:A,name:y,quantity:q,freeAmount:0,currency:n,position:s,cost:g*q})}return u.modification===h.ModificationType.Replace&&a.replace.push({id:O(u),modificationType:A,name:y,replacementName:T,freeAmount:f,quantity:p,currency:n,position:s,cost:g}),u.modification===h.ModificationType.Remove&&a.remove.push({id:O(u),modificationType:A,name:y,freeAmount:f,quantity:p,currency:n,position:s,cost:g}),a},{add:[],replace:[],remove:[]}),o=(r??[]).reduce((a,u)=>{const{product:A,freeAmount:s=0,quantity:f,position:y,addOnGroupId:p,productPriceInclTax:g}=u,{hasVariants:T,variantName:m="",productName:q="",productId:B,variantId:F}=A??{},b=g.unitPrice===0;(s>0||b)&&a.push({id:`${p}-${B}-free`,modificationType:h.ModificationType.Add,name:T?m:q,freeAmount:b?f:s,quantity:b?f:s,currency:n,position:y,cost:0,variantId:F});const w=f-s;return w>0&&!b&&a.push({id:`${p}-${B}`,modificationType:h.ModificationType.Add,name:T?m:q,freeAmount:0,quantity:w,currency:n,position:y,cost:g.unitPrice*w,variantId:F}),a},[]);return[...C([...e,...o],["position"],["asc"]),...C(d,["position"],["asc"]),...C(t,["position"],["asc"])]}module.exports=K;
1
+ "use strict";const h=require("@ancon/wildcat-types"),M=require("../toString-b771abdf.js"),P=require("../identity-58f9497d.js"),x=require("../_baseIteratee-374c60ca.js"),k=require("../_getTag-3d3032da.js"),$=require("../isObjectLike-963267e9.js"),O=require("./getUniqueCheckItemModificationId.js");require("../_baseIsEqual-7e335f42.js");require("../isObject-361bd834.js");function L(n){return function(i,r,e){for(var d=-1,t=Object(i),o=e(i),c=o.length;c--;){var a=o[n?c:++d];if(r(t[a],a,t)===!1)break}return i}}var E=L();const _=E;function G(n,i){return n&&_(n,i,k.keys)}function Q(n,i){return function(r,e){if(r==null)return r;if(!k.isArrayLike(r))return n(r,e);for(var d=r.length,t=i?d:-1,o=Object(r);(i?t--:++t<d)&&e(o[t],t,o)!==!1;);return r}}var U=Q(G);const Z=U;function z(n,i){var r=-1,e=k.isArrayLike(n)?Array(n.length):[];return Z(n,function(d,t,o){e[++r]=i(d,t,o)}),e}function V(n,i){var r=n.length;for(n.sort(i);r--;)n[r]=n[r].value;return n}function j(n,i){if(n!==i){var r=n!==void 0,e=n===null,d=n===n,t=M.isSymbol(n),o=i!==void 0,c=i===null,a=i===i,u=M.isSymbol(i);if(!c&&!u&&!t&&n>i||t&&o&&a&&!c&&!u||e&&o&&a||!r&&a||!d)return 1;if(!e&&!t&&!u&&n<i||u&&r&&d&&!e&&!t||c&&r&&d||!o&&d||!a)return-1}return 0}function H(n,i,r){for(var e=-1,d=n.criteria,t=i.criteria,o=d.length,c=r.length;++e<o;){var a=j(d[e],t[e]);if(a){if(e>=c)return a;var u=r[e];return a*(u=="desc"?-1:1)}}return n.index-i.index}function J(n,i,r){i.length?i=M.arrayMap(i,function(t){return $.isArray(t)?function(o){return P.baseGet(o,t.length===1?t[0]:t)}:t}):i=[P.identity];var e=-1;i=M.arrayMap(i,k.baseUnary(x.baseIteratee));var d=z(n,function(t,o,c){var a=M.arrayMap(i,function(u){return u(t)});return{criteria:a,index:++e,value:t}});return V(d,function(t,o){return H(t,o,r)})}function C(n,i,r,e){return n==null?[]:($.isArray(i)||(i=i==null?[]:[i]),r=e?void 0:r,$.isArray(r)||(r=r==null?[]:[r]),J(n,i,r))}function K(n,i,r){const{add:e,replace:d,remove:t}=(i??[]).reduce((a,u)=>{const{modification:A,position:s,freeAmount:f,name:y="",quantity:p,cost:g,replacementName:T}=u,m=g===0;if(u.modification===h.ModificationType.Add){(f>0||m)&&a.add.push({id:O(u,"-free"),modificationType:A,name:y,freeAmount:m?p:f,quantity:m?p:f,currency:n,position:s,cost:0});const q=p-f;q>0&&!m&&a.add.push({id:O(u),modificationType:A,name:y,quantity:q,freeAmount:0,currency:n,position:s,cost:g*q})}return u.modification===h.ModificationType.Replace&&a.replace.push({id:O(u),modificationType:A,name:y,replacementName:T,freeAmount:f,quantity:p,currency:n,position:s,cost:g}),u.modification===h.ModificationType.Remove&&a.remove.push({id:O(u),modificationType:A,name:y,freeAmount:f,quantity:p,currency:n,position:s,cost:g}),a},{add:[],replace:[],remove:[]}),o=(r??[]).reduce((a,u)=>{const{product:A,freeAmount:s=0,quantity:f,position:y,addOnGroupId:p,productPriceInclTax:g}=u,{hasVariants:T,variantName:m="",productName:q="",productId:B,variantId:F}=A??{},b=g.unitPrice===0;(s>0||b)&&a.push({id:`${p}-${B}-free`,modificationType:h.ModificationType.Add,name:T?m:q,freeAmount:b?f:s,quantity:b?f:s,currency:n,position:y,cost:0,variantId:F});const w=f-s;return w>0&&!b&&a.push({id:`${p}-${B}`,modificationType:h.ModificationType.Add,name:T?m:q,freeAmount:0,quantity:w,currency:n,position:y,cost:g.unitPrice*w,variantId:F}),a},[]);return[...C([...e,...o],["position"],["asc"]),...C(d,["position"],["asc"]),...C(t,["position"],["asc"])]}module.exports=K;