@instockng/storefront-ui 1.0.24 → 1.0.25

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 (90) hide show
  1. package/dist/index10.mjs +8 -8
  2. package/dist/index132.mjs +1 -1
  3. package/dist/index134.mjs +21 -2
  4. package/dist/index135.mjs +54 -19
  5. package/dist/index136.mjs +28 -55
  6. package/dist/index137.mjs +6 -28
  7. package/dist/index138.mjs +51 -6
  8. package/dist/index139.mjs +5 -51
  9. package/dist/index140.mjs +12 -6
  10. package/dist/index141.mjs +7 -12
  11. package/dist/index142.mjs +27 -6
  12. package/dist/index143.mjs +2 -28
  13. package/dist/index144.mjs +70 -2
  14. package/dist/index145.mjs +164 -67
  15. package/dist/index146.mjs +2 -167
  16. package/dist/index156.mjs +1 -1
  17. package/dist/index157.mjs +1 -1
  18. package/dist/index167.mjs +1 -1
  19. package/dist/index169.mjs +2 -2
  20. package/dist/index170.mjs +5 -5
  21. package/dist/index173.mjs +1 -1
  22. package/dist/index176.mjs +1 -1
  23. package/dist/index184.mjs +1 -1
  24. package/dist/index186.mjs +1 -1
  25. package/dist/index192.mjs +1 -1
  26. package/dist/index203.mjs +1 -1
  27. package/dist/index204.mjs +1 -1
  28. package/dist/index211.mjs +1 -1
  29. package/dist/index213.mjs +2 -2
  30. package/dist/index214.mjs +2 -244
  31. package/dist/index215.mjs +244 -2
  32. package/dist/index216.mjs +2 -33
  33. package/dist/index217.mjs +28 -60
  34. package/dist/index218.mjs +60 -20
  35. package/dist/index219.mjs +25 -2
  36. package/dist/index220.mjs +2 -2
  37. package/dist/index221.mjs +2 -2
  38. package/dist/index234.mjs +31 -2
  39. package/dist/index235.mjs +11 -2
  40. package/dist/index236.mjs +3 -30
  41. package/dist/index237.mjs +3 -10
  42. package/dist/index238.mjs +13 -4
  43. package/dist/index239.mjs +7 -4
  44. package/dist/index240.mjs +12 -13
  45. package/dist/index241.mjs +5 -7
  46. package/dist/index242.mjs +33 -12
  47. package/dist/index243.mjs +31 -5
  48. package/dist/index244.mjs +27 -32
  49. package/dist/index245.mjs +58 -28
  50. package/dist/index246.mjs +2 -28
  51. package/dist/index247.mjs +2 -61
  52. package/dist/index248.mjs +2 -2
  53. package/dist/index249.mjs +2 -2
  54. package/dist/index250.mjs +2 -2
  55. package/dist/index251.mjs +2 -2
  56. package/dist/index252.mjs +2 -91
  57. package/dist/index253.mjs +91 -2
  58. package/dist/index258.mjs +1 -1
  59. package/dist/index263.mjs +1 -1
  60. package/dist/index264.mjs +2 -2
  61. package/dist/index37.mjs +1 -1
  62. package/dist/index38.mjs +1 -1
  63. package/dist/index47.mjs +17 -17
  64. package/dist/index48.mjs +2 -2
  65. package/dist/index61.mjs +153 -2
  66. package/dist/index62.mjs +2 -153
  67. package/dist/index66.mjs +1 -1
  68. package/dist/index73.mjs +1 -1
  69. package/dist/index75.mjs +34 -2
  70. package/dist/index76.mjs +38 -230
  71. package/dist/index77.mjs +2 -6
  72. package/dist/index78.mjs +228 -127
  73. package/dist/index79.mjs +4 -66
  74. package/dist/index80.mjs +124 -77
  75. package/dist/index81.mjs +65 -26
  76. package/dist/index82.mjs +84 -6
  77. package/dist/index83.mjs +26 -72
  78. package/dist/index84.mjs +8 -3
  79. package/dist/index85.mjs +75 -2
  80. package/dist/index86.mjs +3 -82
  81. package/dist/index87.mjs +2 -54
  82. package/dist/index88.mjs +82 -5
  83. package/dist/index89.mjs +53 -4
  84. package/dist/index90.mjs +5 -178
  85. package/dist/index91.mjs +5 -53
  86. package/dist/index92.mjs +178 -68
  87. package/dist/index93.mjs +50 -31
  88. package/dist/index94.mjs +69 -43
  89. package/package.json +1 -1
  90. package/src/components/ShoppingCart.tsx +1 -1
package/dist/index218.mjs CHANGED
@@ -1,28 +1,68 @@
1
1
  'use client';
2
- import { __exports as r } from "./index251.mjs";
3
- import { __require as a } from "./index252.mjs";
4
- var t;
5
- function k() {
6
- return t ? r : (t = 1, function(o) {
7
- Object.defineProperty(o, "__esModule", {
2
+ import { __module as e } from "./index251.mjs";
3
+ var o;
4
+ function X() {
5
+ return o ? e.exports : (o = 1, function(c, E) {
6
+ Object.defineProperty(E, "__esModule", {
8
7
  value: !0
9
- }), Object.defineProperty(o, "getCookieParser", {
10
- enumerable: !0,
11
- get: function() {
8
+ });
9
+ function N(O, u) {
10
+ for (var T in u) Object.defineProperty(O, T, {
11
+ enumerable: !0,
12
+ get: u[T]
13
+ });
14
+ }
15
+ N(E, {
16
+ ACTION_HEADER: function() {
17
+ return f;
18
+ },
19
+ FLIGHT_HEADERS: function() {
20
+ return A;
21
+ },
22
+ NEXT_DID_POSTPONE_HEADER: function() {
23
+ return S;
24
+ },
25
+ NEXT_HMR_REFRESH_HEADER: function() {
26
+ return r;
27
+ },
28
+ NEXT_IS_PRERENDER_HEADER: function() {
29
+ return d;
30
+ },
31
+ NEXT_ROUTER_PREFETCH_HEADER: function() {
32
+ return n;
33
+ },
34
+ NEXT_ROUTER_SEGMENT_PREFETCH_HEADER: function() {
35
+ return R;
36
+ },
37
+ NEXT_ROUTER_STALE_TIME_HEADER: function() {
38
+ return s;
39
+ },
40
+ NEXT_ROUTER_STATE_TREE_HEADER: function() {
41
+ return _;
42
+ },
43
+ NEXT_RSC_UNION_QUERY: function() {
44
+ return D;
45
+ },
46
+ NEXT_URL: function() {
47
+ return H;
48
+ },
49
+ RSC_CONTENT_TYPE_HEADER: function() {
12
50
  return i;
51
+ },
52
+ RSC_HEADER: function() {
53
+ return t;
13
54
  }
14
55
  });
15
- function i(n) {
16
- return function() {
17
- const { cookie: e } = n;
18
- if (!e)
19
- return {};
20
- const { parse: u } = a();
21
- return u(Array.isArray(e) ? e.join("; ") : e);
22
- };
23
- }
24
- }(r), r);
56
+ const t = "RSC", f = "Next-Action", _ = "Next-Router-State-Tree", n = "Next-Router-Prefetch", R = "Next-Router-Segment-Prefetch", r = "Next-HMR-Refresh", H = "Next-Url", i = "text/x-component", A = [
57
+ t,
58
+ _,
59
+ n,
60
+ r,
61
+ R
62
+ ], D = "_rsc", s = "x-nextjs-stale-time", S = "x-nextjs-postponed", d = "x-nextjs-prerender";
63
+ (typeof E.default == "function" || typeof E.default == "object" && E.default !== null) && typeof E.default.__esModule > "u" && (Object.defineProperty(E.default, "__esModule", { value: !0 }), Object.assign(E.default, E), c.exports = E.default);
64
+ }(e, e.exports), e.exports);
25
65
  }
26
66
  export {
27
- k as __require
67
+ X as __require
28
68
  };
package/dist/index219.mjs CHANGED
@@ -1,5 +1,28 @@
1
1
  'use client';
2
- var e = {};
2
+ import { __exports as r } from "./index252.mjs";
3
+ import { __require as a } from "./index253.mjs";
4
+ var t;
5
+ function k() {
6
+ return t ? r : (t = 1, function(o) {
7
+ Object.defineProperty(o, "__esModule", {
8
+ value: !0
9
+ }), Object.defineProperty(o, "getCookieParser", {
10
+ enumerable: !0,
11
+ get: function() {
12
+ return i;
13
+ }
14
+ });
15
+ function i(n) {
16
+ return function() {
17
+ const { cookie: e } = n;
18
+ if (!e)
19
+ return {};
20
+ const { parse: u } = a();
21
+ return u(Array.isArray(e) ? e.join("; ") : e);
22
+ };
23
+ }
24
+ }(r), r);
25
+ }
3
26
  export {
4
- e as __exports
27
+ k as __require
5
28
  };
package/dist/index220.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- var r = { exports: {} };
2
+ var e = {};
3
3
  export {
4
- r as __module
4
+ e as __exports
5
5
  };
package/dist/index221.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- var r = {};
2
+ var r = { exports: {} };
3
3
  export {
4
- r as __exports
4
+ r as __module
5
5
  };
package/dist/index234.mjs CHANGED
@@ -1,5 +1,34 @@
1
1
  'use client';
2
- var r = {};
2
+ import p from "./index88.mjs";
3
+ function i(n) {
4
+ const t = {
5
+ "!": "%21",
6
+ "'": "%27",
7
+ "(": "%28",
8
+ ")": "%29",
9
+ "~": "%7E",
10
+ "%20": "+",
11
+ "%00": "\0"
12
+ };
13
+ return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g, function(r) {
14
+ return t[r];
15
+ });
16
+ }
17
+ function a(n, t) {
18
+ this._pairs = [], n && p(n, this, t);
19
+ }
20
+ const c = a.prototype;
21
+ c.append = function(t, o) {
22
+ this._pairs.push([t, o]);
23
+ };
24
+ c.toString = function(t) {
25
+ const o = t ? function(r) {
26
+ return t.call(this, r, i);
27
+ } : i;
28
+ return this._pairs.map(function(e) {
29
+ return o(e[0]) + "=" + o(e[1]);
30
+ }, "").join("&");
31
+ };
3
32
  export {
4
- r as __exports
33
+ a as default
5
34
  };
package/dist/index235.mjs CHANGED
@@ -1,5 +1,14 @@
1
1
  'use client';
2
- var e = {};
2
+ import i from "./index78.mjs";
3
+ import m from "./index82.mjs";
4
+ import s from "./index92.mjs";
5
+ function h(f, t) {
6
+ const o = this || m, r = t || o, n = s.from(r.headers);
7
+ let a = r.data;
8
+ return i.forEach(f, function(e) {
9
+ a = e.call(o, a, n.normalize(), t ? t.status : void 0);
10
+ }), n.normalize(), a;
11
+ }
3
12
  export {
4
- e as __exports
13
+ h as default
5
14
  };
package/dist/index236.mjs CHANGED
@@ -1,34 +1,7 @@
1
1
  'use client';
2
- import p from "./index86.mjs";
3
- function i(n) {
4
- const t = {
5
- "!": "%21",
6
- "'": "%27",
7
- "(": "%28",
8
- ")": "%29",
9
- "~": "%7E",
10
- "%20": "+",
11
- "%00": "\0"
12
- };
13
- return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g, function(r) {
14
- return t[r];
15
- });
2
+ function e(t) {
3
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
16
4
  }
17
- function a(n, t) {
18
- this._pairs = [], n && p(n, this, t);
19
- }
20
- const c = a.prototype;
21
- c.append = function(t, o) {
22
- this._pairs.push([t, o]);
23
- };
24
- c.toString = function(t) {
25
- const o = t ? function(r) {
26
- return t.call(this, r, i);
27
- } : i;
28
- return this._pairs.map(function(e) {
29
- return o(e[0]) + "=" + o(e[1]);
30
- }, "").join("&");
31
- };
32
5
  export {
33
- a as default
6
+ e as default
34
7
  };
package/dist/index237.mjs CHANGED
@@ -1,14 +1,7 @@
1
1
  'use client';
2
- import i from "./index76.mjs";
3
- import m from "./index80.mjs";
4
- import s from "./index90.mjs";
5
- function h(f, t) {
6
- const o = this || m, r = t || o, n = s.from(r.headers);
7
- let a = r.data;
8
- return i.forEach(f, function(e) {
9
- a = e.call(o, a, n.normalize(), t ? t.status : void 0);
10
- }), n.normalize(), a;
2
+ function n(e, c) {
3
+ return c ? e.replace(/\/?\/$/, "") + "/" + c.replace(/^\/+/, "") : e;
11
4
  }
12
5
  export {
13
- h as default
6
+ n as default
14
7
  };
package/dist/index238.mjs CHANGED
@@ -1,7 +1,16 @@
1
1
  'use client';
2
- function e(t) {
3
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
4
- }
2
+ import o from "./index258.mjs";
3
+ import r from "./index259.mjs";
4
+ import t from "./index260.mjs";
5
+ const l = {
6
+ isBrowser: !0,
7
+ classes: {
8
+ URLSearchParams: o,
9
+ FormData: r,
10
+ Blob: t
11
+ },
12
+ protocols: ["http", "https", "file", "blob", "url", "data"]
13
+ };
5
14
  export {
6
- e as default
15
+ l as default
7
16
  };
package/dist/index239.mjs CHANGED
@@ -1,7 +1,10 @@
1
1
  'use client';
2
- function n(e, c) {
3
- return c ? e.replace(/\/?\/$/, "") + "/" + c.replace(/^\/+/, "") : e;
4
- }
2
+ const e = typeof window < "u" && typeof document < "u", o = typeof navigator == "object" && navigator || void 0, n = e && (!o || ["ReactNative", "NativeScript", "NS"].indexOf(o.product) < 0), t = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
3
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", r = e && window.location.href || "http://localhost";
5
4
  export {
6
- n as default
5
+ e as hasBrowserEnv,
6
+ n as hasStandardBrowserEnv,
7
+ t as hasStandardBrowserWebWorkerEnv,
8
+ o as navigator,
9
+ r as origin
7
10
  };
package/dist/index240.mjs CHANGED
@@ -1,16 +1,15 @@
1
1
  'use client';
2
- import o from "./index258.mjs";
3
- import r from "./index259.mjs";
4
- import t from "./index260.mjs";
5
- const l = {
6
- isBrowser: !0,
7
- classes: {
8
- URLSearchParams: o,
9
- FormData: r,
10
- Blob: t
11
- },
12
- protocols: ["http", "https", "file", "blob", "url", "data"]
13
- };
2
+ import a from "./index89.mjs";
3
+ function E(i, f, t) {
4
+ const u = t.config.validateStatus;
5
+ !t.status || !u || u(t.status) ? i(t) : f(new a(
6
+ "Request failed with status code " + t.status,
7
+ [a.ERR_BAD_REQUEST, a.ERR_BAD_RESPONSE][Math.floor(t.status / 100) - 4],
8
+ t.config,
9
+ t.request,
10
+ t
11
+ ));
12
+ }
14
13
  export {
15
- l as default
14
+ E as default
16
15
  };
package/dist/index241.mjs CHANGED
@@ -1,10 +1,8 @@
1
1
  'use client';
2
- const e = typeof window < "u" && typeof document < "u", o = typeof navigator == "object" && navigator || void 0, n = e && (!o || ["ReactNative", "NativeScript", "NS"].indexOf(o.product) < 0), t = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
3
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", r = e && window.location.href || "http://localhost";
2
+ function o(e) {
3
+ const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
4
+ return t && t[1] || "";
5
+ }
4
6
  export {
5
- e as hasBrowserEnv,
6
- n as hasStandardBrowserEnv,
7
- t as hasStandardBrowserWebWorkerEnv,
8
- o as navigator,
9
- r as origin
7
+ o as default
10
8
  };
package/dist/index242.mjs CHANGED
@@ -1,15 +1,36 @@
1
1
  'use client';
2
- import a from "./index87.mjs";
3
- function E(i, f, t) {
4
- const u = t.config.validateStatus;
5
- !t.status || !u || u(t.status) ? i(t) : f(new a(
6
- "Request failed with status code " + t.status,
7
- [a.ERR_BAD_REQUEST, a.ERR_BAD_RESPONSE][Math.floor(t.status / 100) - 4],
8
- t.config,
9
- t.request,
10
- t
11
- ));
12
- }
2
+ import i from "./index261.mjs";
3
+ import m from "./index262.mjs";
4
+ import f from "./index78.mjs";
5
+ const h = (t, o, a = 3) => {
6
+ let r = 0;
7
+ const c = i(50, 250);
8
+ return m((s) => {
9
+ const n = s.loaded, e = s.lengthComputable ? s.total : void 0, l = n - r, d = c(l), p = n <= e;
10
+ r = n;
11
+ const u = {
12
+ loaded: n,
13
+ total: e,
14
+ progress: e ? n / e : void 0,
15
+ bytes: l,
16
+ rate: d || void 0,
17
+ estimated: d && e && p ? (e - n) / d : void 0,
18
+ event: s,
19
+ lengthComputable: e != null,
20
+ [o ? "download" : "upload"]: !0
21
+ };
22
+ t(u);
23
+ }, a);
24
+ }, v = (t, o) => {
25
+ const a = t != null;
26
+ return [(r) => o[0]({
27
+ lengthComputable: a,
28
+ total: t,
29
+ loaded: r
30
+ }), o[1]];
31
+ }, C = (t) => (...o) => f.asap(() => t(...o));
13
32
  export {
14
- E as default
33
+ C as asyncDecorator,
34
+ v as progressEventDecorator,
35
+ h as progressEventReducer
15
36
  };
package/dist/index243.mjs CHANGED
@@ -1,8 +1,34 @@
1
1
  'use client';
2
- function o(e) {
3
- const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
4
- return t && t[1] || "";
5
- }
2
+ import n from "./index141.mjs";
3
+ import m from "./index78.mjs";
4
+ import c from "./index263.mjs";
5
+ import h from "./index264.mjs";
6
+ import w from "./index137.mjs";
7
+ import b from "./index81.mjs";
8
+ import C from "./index92.mjs";
9
+ import g from "./index134.mjs";
10
+ const E = (a) => {
11
+ const e = b({}, a);
12
+ let { data: i, withXSRFToken: r, xsrfHeaderName: f, xsrfCookieName: d, headers: o, auth: s } = e;
13
+ if (e.headers = o = C.from(o), e.url = g(w(e.baseURL, e.url, e.allowAbsoluteUrls), a.params, a.paramsSerializer), s && o.set(
14
+ "Authorization",
15
+ "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))
16
+ ), m.isFormData(i)) {
17
+ if (n.hasStandardBrowserEnv || n.hasStandardBrowserWebWorkerEnv)
18
+ o.setContentType(void 0);
19
+ else if (m.isFunction(i.getHeaders)) {
20
+ const t = i.getHeaders(), u = ["content-type", "content-length"];
21
+ Object.entries(t).forEach(([l, p]) => {
22
+ u.includes(l.toLowerCase()) && o.set(l, p);
23
+ });
24
+ }
25
+ }
26
+ if (n.hasStandardBrowserEnv && (r && m.isFunction(r) && (r = r(e)), r || r !== !1 && c(e.url))) {
27
+ const t = f && d && h.read(d);
28
+ t && o.set(f, t);
29
+ }
30
+ return e;
31
+ };
6
32
  export {
7
- o as default
33
+ E as default
8
34
  };
package/dist/index244.mjs CHANGED
@@ -1,36 +1,31 @@
1
1
  'use client';
2
- import i from "./index261.mjs";
3
- import m from "./index262.mjs";
4
- import f from "./index76.mjs";
5
- const h = (t, o, a = 3) => {
6
- let r = 0;
7
- const c = i(50, 250);
8
- return m((s) => {
9
- const n = s.loaded, e = s.lengthComputable ? s.total : void 0, l = n - r, d = c(l), p = n <= e;
10
- r = n;
11
- const u = {
12
- loaded: n,
13
- total: e,
14
- progress: e ? n / e : void 0,
15
- bytes: l,
16
- rate: d || void 0,
17
- estimated: d && e && p ? (e - n) / d : void 0,
18
- event: s,
19
- lengthComputable: e != null,
20
- [o ? "download" : "upload"]: !0
2
+ import a from "./index84.mjs";
3
+ import s from "./index89.mjs";
4
+ import m from "./index78.mjs";
5
+ const h = (e, t) => {
6
+ const { length: l } = e = e ? e.filter(Boolean) : [];
7
+ if (t || l) {
8
+ let u = new AbortController(), f;
9
+ const n = function(r) {
10
+ if (!f) {
11
+ f = !0, i();
12
+ const o = r instanceof Error ? r : this.reason;
13
+ u.abort(o instanceof s ? o : new a(o instanceof Error ? o.message : o));
14
+ }
21
15
  };
22
- t(u);
23
- }, a);
24
- }, v = (t, o) => {
25
- const a = t != null;
26
- return [(r) => o[0]({
27
- lengthComputable: a,
28
- total: t,
29
- loaded: r
30
- }), o[1]];
31
- }, C = (t) => (...o) => f.asap(() => t(...o));
16
+ let c = t && setTimeout(() => {
17
+ c = null, n(new s(`timeout ${t} of ms exceeded`, s.ETIMEDOUT));
18
+ }, t);
19
+ const i = () => {
20
+ e && (c && clearTimeout(c), c = null, e.forEach((r) => {
21
+ r.unsubscribe ? r.unsubscribe(n) : r.removeEventListener("abort", n);
22
+ }), e = null);
23
+ };
24
+ e.forEach((r) => r.addEventListener("abort", n));
25
+ const { signal: b } = u;
26
+ return b.unsubscribe = () => m.asap(i), b;
27
+ }
28
+ };
32
29
  export {
33
- C as asyncDecorator,
34
- v as progressEventDecorator,
35
- h as progressEventReducer
30
+ h as default
36
31
  };
package/dist/index245.mjs CHANGED
@@ -1,34 +1,64 @@
1
1
  'use client';
2
- import n from "./index142.mjs";
3
- import m from "./index76.mjs";
4
- import c from "./index263.mjs";
5
- import h from "./index264.mjs";
6
- import w from "./index138.mjs";
7
- import b from "./index79.mjs";
8
- import C from "./index90.mjs";
9
- import g from "./index135.mjs";
10
- const E = (a) => {
11
- const e = b({}, a);
12
- let { data: i, withXSRFToken: r, xsrfHeaderName: f, xsrfCookieName: d, headers: o, auth: s } = e;
13
- if (e.headers = o = C.from(o), e.url = g(w(e.baseURL, e.url, e.allowAbsoluteUrls), a.params, a.paramsSerializer), s && o.set(
14
- "Authorization",
15
- "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))
16
- ), m.isFormData(i)) {
17
- if (n.hasStandardBrowserEnv || n.hasStandardBrowserWebWorkerEnv)
18
- o.setContentType(void 0);
19
- else if (m.isFunction(i.getHeaders)) {
20
- const t = i.getHeaders(), u = ["content-type", "content-length"];
21
- Object.entries(t).forEach(([l, p]) => {
22
- u.includes(l.toLowerCase()) && o.set(l, p);
23
- });
24
- }
2
+ const f = function* (e, t) {
3
+ let n = e.byteLength;
4
+ if (n < t) {
5
+ yield e;
6
+ return;
7
+ }
8
+ let a = 0, r;
9
+ for (; a < n; )
10
+ r = a + t, yield e.slice(a, r), a = r;
11
+ }, w = async function* (e, t) {
12
+ for await (const n of b(e))
13
+ yield* f(n, t);
14
+ }, b = async function* (e) {
15
+ if (e[Symbol.asyncIterator]) {
16
+ yield* e;
17
+ return;
25
18
  }
26
- if (n.hasStandardBrowserEnv && (r && m.isFunction(r) && (r = r(e)), r || r !== !1 && c(e.url))) {
27
- const t = f && d && h.read(d);
28
- t && o.set(f, t);
19
+ const t = e.getReader();
20
+ try {
21
+ for (; ; ) {
22
+ const { done: n, value: a } = await t.read();
23
+ if (n)
24
+ break;
25
+ yield a;
26
+ }
27
+ } finally {
28
+ await t.cancel();
29
29
  }
30
- return e;
30
+ }, h = (e, t, n, a) => {
31
+ const r = w(e, t);
32
+ let d = 0, o, c = (l) => {
33
+ o || (o = !0, a && a(l));
34
+ };
35
+ return new ReadableStream({
36
+ async pull(l) {
37
+ try {
38
+ const { done: i, value: y } = await r.next();
39
+ if (i) {
40
+ c(), l.close();
41
+ return;
42
+ }
43
+ let s = y.byteLength;
44
+ if (n) {
45
+ let u = d += s;
46
+ n(u);
47
+ }
48
+ l.enqueue(new Uint8Array(y));
49
+ } catch (i) {
50
+ throw c(i), i;
51
+ }
52
+ },
53
+ cancel(l) {
54
+ return c(l), r.return();
55
+ }
56
+ }, {
57
+ highWaterMark: 2
58
+ });
31
59
  };
32
60
  export {
33
- E as default
61
+ w as readBytes,
62
+ f as streamChunk,
63
+ h as trackStream
34
64
  };
package/dist/index246.mjs CHANGED
@@ -1,31 +1,5 @@
1
1
  'use client';
2
- import a from "./index82.mjs";
3
- import s from "./index87.mjs";
4
- import m from "./index76.mjs";
5
- const h = (e, t) => {
6
- const { length: l } = e = e ? e.filter(Boolean) : [];
7
- if (t || l) {
8
- let u = new AbortController(), f;
9
- const n = function(r) {
10
- if (!f) {
11
- f = !0, i();
12
- const o = r instanceof Error ? r : this.reason;
13
- u.abort(o instanceof s ? o : new a(o instanceof Error ? o.message : o));
14
- }
15
- };
16
- let c = t && setTimeout(() => {
17
- c = null, n(new s(`timeout ${t} of ms exceeded`, s.ETIMEDOUT));
18
- }, t);
19
- const i = () => {
20
- e && (c && clearTimeout(c), c = null, e.forEach((r) => {
21
- r.unsubscribe ? r.unsubscribe(n) : r.removeEventListener("abort", n);
22
- }), e = null);
23
- };
24
- e.forEach((r) => r.addEventListener("abort", n));
25
- const { signal: b } = u;
26
- return b.unsubscribe = () => m.asap(i), b;
27
- }
28
- };
2
+ var r = {};
29
3
  export {
30
- h as default
4
+ r as __exports
31
5
  };