@haus-storefront-react/vendure-plugin-configs 0.0.7 → 0.0.8

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.
@@ -0,0 +1,2 @@
1
+ "use strict";const P=require("./index-CATkY-bf.js");function z(w,d){for(var b=0;b<d.length;b++){const y=d[b];if(typeof y!="string"&&!Array.isArray(y)){for(const l in y)if(l!=="default"&&!(l in w)){const p=Object.getOwnPropertyDescriptor(y,l);p&&Object.defineProperty(w,l,p.get?p:{enumerable:!0,get:()=>y[l]})}}}return Object.freeze(Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}))}var A={exports:{}},U;function $(){return U||(U=1,function(w,d){var b=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof P.commonjsGlobal<"u"&&P.commonjsGlobal,y=function(){function p(){this.fetch=!1,this.DOMException=b.DOMException}return p.prototype=b,new p}();(function(p){(function(u){var a=typeof p<"u"&&p||typeof self<"u"&&self||typeof a<"u"&&a,f={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function S(e){return e&&DataView.prototype.isPrototypeOf(e)}if(f.arrayBuffer)var F=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],q=ArrayBuffer.isView||function(e){return e&&F.indexOf(Object.prototype.toString.call(e))>-1};function v(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function E(e){return typeof e!="string"&&(e=String(e)),e}function T(e){var t={next:function(){var r=e.shift();return{done:r===void 0,value:r}}};return f.iterable&&(t[Symbol.iterator]=function(){return t}),t}function s(e){this.map={},e instanceof s?e.forEach(function(t,r){this.append(r,t)},this):Array.isArray(e)?e.forEach(function(t){this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}s.prototype.append=function(e,t){e=v(e),t=E(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},s.prototype.delete=function(e){delete this.map[v(e)]},s.prototype.get=function(e){return e=v(e),this.has(e)?this.map[e]:null},s.prototype.has=function(e){return this.map.hasOwnProperty(v(e))},s.prototype.set=function(e,t){this.map[v(e)]=E(t)},s.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},s.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),T(e)},s.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),T(e)},s.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),T(e)},f.iterable&&(s.prototype[Symbol.iterator]=s.prototype.entries);function B(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function D(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function I(e){var t=new FileReader,r=D(t);return t.readAsArrayBuffer(e),r}function M(e){var t=new FileReader,r=D(t);return t.readAsText(e),r}function H(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}function x(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function R(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?typeof e=="string"?this._bodyText=e:f.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:f.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:f.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():f.arrayBuffer&&f.blob&&S(e)?(this._bodyArrayBuffer=x(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):f.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||q(e))?this._bodyArrayBuffer=x(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||(typeof e=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):f.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},f.blob&&(this.blob=function(){var e=B(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=B(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(I)}),this.text=function(){var e=B(this);if(e)return e;if(this._bodyBlob)return M(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(H(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},f.formData&&(this.formData=function(){return this.text().then(k)}),this.json=function(){return this.text().then(JSON.parse)},this}var L=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function C(e){var t=e.toUpperCase();return L.indexOf(t)>-1?t:e}function m(e,t){if(!(this instanceof m))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var r=t.body;if(e instanceof m){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new s(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!r&&e._bodyInit!=null&&(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new s(t.headers)),this.method=C(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})};function k(e){var t=new FormData;return e.trim().split("&").forEach(function(r){if(r){var n=r.split("="),i=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(o))}}),t}function N(e){var t=new s,r=e.replace(/\r?\n[\t ]+/g," ");return r.split("\r").map(function(n){return n.indexOf(`
2
+ `)===0?n.substr(1,n.length):n}).forEach(function(n){var i=n.split(":"),o=i.shift().trim();if(o){var _=i.join(":").trim();t.append(o,_)}}),t}R.call(m.prototype);function c(e,t){if(!(this instanceof c))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new s(t.headers),this.url=t.url||"",this._initBody(e)}R.call(c.prototype),c.prototype.clone=function(){return new c(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new s(this.headers),url:this.url})},c.error=function(){var e=new c(null,{status:0,statusText:""});return e.type="error",e};var G=[301,302,303,307,308];c.redirect=function(e,t){if(G.indexOf(t)===-1)throw new RangeError("Invalid status code");return new c(null,{status:t,headers:{location:e}})},u.DOMException=a.DOMException;try{new u.DOMException}catch{u.DOMException=function(t,r){this.message=t,this.name=r;var n=Error(t);this.stack=n.stack},u.DOMException.prototype=Object.create(Error.prototype),u.DOMException.prototype.constructor=u.DOMException}function O(e,t){return new Promise(function(r,n){var i=new m(e,t);if(i.signal&&i.signal.aborted)return n(new u.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function _(){o.abort()}o.onload=function(){var h={status:o.status,statusText:o.statusText,headers:N(o.getAllResponseHeaders()||"")};h.url="responseURL"in o?o.responseURL:h.headers.get("X-Request-URL");var g="response"in o?o.response:o.responseText;setTimeout(function(){r(new c(g,h))},0)},o.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},o.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},o.onabort=function(){setTimeout(function(){n(new u.DOMException("Aborted","AbortError"))},0)};function V(h){try{return h===""&&a.location.href?a.location.href:h}catch{return h}}o.open(i.method,V(i.url),!0),i.credentials==="include"?o.withCredentials=!0:i.credentials==="omit"&&(o.withCredentials=!1),"responseType"in o&&(f.blob?o.responseType="blob":f.arrayBuffer&&i.headers.get("Content-Type")&&i.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(o.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof s)?Object.getOwnPropertyNames(t.headers).forEach(function(h){o.setRequestHeader(h,E(t.headers[h]))}):i.headers.forEach(function(h,g){o.setRequestHeader(g,h)}),i.signal&&(i.signal.addEventListener("abort",_),o.onreadystatechange=function(){o.readyState===4&&i.signal.removeEventListener("abort",_)}),o.send(typeof i._bodyInit>"u"?null:i._bodyInit)})}return O.polyfill=!0,a.fetch||(a.fetch=O,a.Headers=s,a.Request=m,a.Response=c),u.Headers=s,u.Request=m,u.Response=c,u.fetch=O,u})({})})(y),y.fetch.ponyfill=!0,delete y.fetch.polyfill;var l=b.fetch?b:y;d=l.fetch,d.default=l.fetch,d.fetch=l.fetch,d.Headers=l.Headers,d.Request=l.Request,d.Response=l.Response,w.exports=d}(A,A.exports)),A.exports}var j=$();const X=P.getDefaultExportFromCjs(j),J=z({__proto__:null,default:X},[j]);exports.browserPonyfill=J;
@@ -0,0 +1,341 @@
1
+ import { c as R, g as z } from "./index-Wcc0o6jA.mjs";
2
+ function $(w, d) {
3
+ for (var b = 0; b < d.length; b++) {
4
+ const y = d[b];
5
+ if (typeof y != "string" && !Array.isArray(y)) {
6
+ for (const h in y)
7
+ if (h !== "default" && !(h in w)) {
8
+ const p = Object.getOwnPropertyDescriptor(y, h);
9
+ p && Object.defineProperty(w, h, p.get ? p : {
10
+ enumerable: !0,
11
+ get: () => y[h]
12
+ });
13
+ }
14
+ }
15
+ }
16
+ return Object.freeze(Object.defineProperty(w, Symbol.toStringTag, { value: "Module" }));
17
+ }
18
+ var A = { exports: {} }, U;
19
+ function X() {
20
+ return U || (U = 1, function(w, d) {
21
+ var b = typeof globalThis < "u" && globalThis || typeof self < "u" && self || typeof R < "u" && R, y = function() {
22
+ function p() {
23
+ this.fetch = !1, this.DOMException = b.DOMException;
24
+ }
25
+ return p.prototype = b, new p();
26
+ }();
27
+ (function(p) {
28
+ (function(u) {
29
+ var a = typeof p < "u" && p || typeof self < "u" && self || typeof a < "u" && a, f = {
30
+ searchParams: "URLSearchParams" in a,
31
+ iterable: "Symbol" in a && "iterator" in Symbol,
32
+ blob: "FileReader" in a && "Blob" in a && function() {
33
+ try {
34
+ return new Blob(), !0;
35
+ } catch {
36
+ return !1;
37
+ }
38
+ }(),
39
+ formData: "FormData" in a,
40
+ arrayBuffer: "ArrayBuffer" in a
41
+ };
42
+ function S(e) {
43
+ return e && DataView.prototype.isPrototypeOf(e);
44
+ }
45
+ if (f.arrayBuffer)
46
+ var F = [
47
+ "[object Int8Array]",
48
+ "[object Uint8Array]",
49
+ "[object Uint8ClampedArray]",
50
+ "[object Int16Array]",
51
+ "[object Uint16Array]",
52
+ "[object Int32Array]",
53
+ "[object Uint32Array]",
54
+ "[object Float32Array]",
55
+ "[object Float64Array]"
56
+ ], I = ArrayBuffer.isView || function(e) {
57
+ return e && F.indexOf(Object.prototype.toString.call(e)) > -1;
58
+ };
59
+ function v(e) {
60
+ if (typeof e != "string" && (e = String(e)), /[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e) || e === "")
61
+ throw new TypeError('Invalid character in header field name: "' + e + '"');
62
+ return e.toLowerCase();
63
+ }
64
+ function E(e) {
65
+ return typeof e != "string" && (e = String(e)), e;
66
+ }
67
+ function T(e) {
68
+ var t = {
69
+ next: function() {
70
+ var r = e.shift();
71
+ return { done: r === void 0, value: r };
72
+ }
73
+ };
74
+ return f.iterable && (t[Symbol.iterator] = function() {
75
+ return t;
76
+ }), t;
77
+ }
78
+ function s(e) {
79
+ this.map = {}, e instanceof s ? e.forEach(function(t, r) {
80
+ this.append(r, t);
81
+ }, this) : Array.isArray(e) ? e.forEach(function(t) {
82
+ this.append(t[0], t[1]);
83
+ }, this) : e && Object.getOwnPropertyNames(e).forEach(function(t) {
84
+ this.append(t, e[t]);
85
+ }, this);
86
+ }
87
+ s.prototype.append = function(e, t) {
88
+ e = v(e), t = E(t);
89
+ var r = this.map[e];
90
+ this.map[e] = r ? r + ", " + t : t;
91
+ }, s.prototype.delete = function(e) {
92
+ delete this.map[v(e)];
93
+ }, s.prototype.get = function(e) {
94
+ return e = v(e), this.has(e) ? this.map[e] : null;
95
+ }, s.prototype.has = function(e) {
96
+ return this.map.hasOwnProperty(v(e));
97
+ }, s.prototype.set = function(e, t) {
98
+ this.map[v(e)] = E(t);
99
+ }, s.prototype.forEach = function(e, t) {
100
+ for (var r in this.map)
101
+ this.map.hasOwnProperty(r) && e.call(t, this.map[r], r, this);
102
+ }, s.prototype.keys = function() {
103
+ var e = [];
104
+ return this.forEach(function(t, r) {
105
+ e.push(r);
106
+ }), T(e);
107
+ }, s.prototype.values = function() {
108
+ var e = [];
109
+ return this.forEach(function(t) {
110
+ e.push(t);
111
+ }), T(e);
112
+ }, s.prototype.entries = function() {
113
+ var e = [];
114
+ return this.forEach(function(t, r) {
115
+ e.push([r, t]);
116
+ }), T(e);
117
+ }, f.iterable && (s.prototype[Symbol.iterator] = s.prototype.entries);
118
+ function B(e) {
119
+ if (e.bodyUsed)
120
+ return Promise.reject(new TypeError("Already read"));
121
+ e.bodyUsed = !0;
122
+ }
123
+ function P(e) {
124
+ return new Promise(function(t, r) {
125
+ e.onload = function() {
126
+ t(e.result);
127
+ }, e.onerror = function() {
128
+ r(e.error);
129
+ };
130
+ });
131
+ }
132
+ function M(e) {
133
+ var t = new FileReader(), r = P(t);
134
+ return t.readAsArrayBuffer(e), r;
135
+ }
136
+ function q(e) {
137
+ var t = new FileReader(), r = P(t);
138
+ return t.readAsText(e), r;
139
+ }
140
+ function H(e) {
141
+ for (var t = new Uint8Array(e), r = new Array(t.length), n = 0; n < t.length; n++)
142
+ r[n] = String.fromCharCode(t[n]);
143
+ return r.join("");
144
+ }
145
+ function D(e) {
146
+ if (e.slice)
147
+ return e.slice(0);
148
+ var t = new Uint8Array(e.byteLength);
149
+ return t.set(new Uint8Array(e)), t.buffer;
150
+ }
151
+ function x() {
152
+ return this.bodyUsed = !1, this._initBody = function(e) {
153
+ this.bodyUsed = this.bodyUsed, this._bodyInit = e, e ? typeof e == "string" ? this._bodyText = e : f.blob && Blob.prototype.isPrototypeOf(e) ? this._bodyBlob = e : f.formData && FormData.prototype.isPrototypeOf(e) ? this._bodyFormData = e : f.searchParams && URLSearchParams.prototype.isPrototypeOf(e) ? this._bodyText = e.toString() : f.arrayBuffer && f.blob && S(e) ? (this._bodyArrayBuffer = D(e.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : f.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(e) || I(e)) ? this._bodyArrayBuffer = D(e) : this._bodyText = e = Object.prototype.toString.call(e) : this._bodyText = "", this.headers.get("content-type") || (typeof e == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : f.searchParams && URLSearchParams.prototype.isPrototypeOf(e) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
154
+ }, f.blob && (this.blob = function() {
155
+ var e = B(this);
156
+ if (e)
157
+ return e;
158
+ if (this._bodyBlob)
159
+ return Promise.resolve(this._bodyBlob);
160
+ if (this._bodyArrayBuffer)
161
+ return Promise.resolve(new Blob([this._bodyArrayBuffer]));
162
+ if (this._bodyFormData)
163
+ throw new Error("could not read FormData body as blob");
164
+ return Promise.resolve(new Blob([this._bodyText]));
165
+ }, this.arrayBuffer = function() {
166
+ if (this._bodyArrayBuffer) {
167
+ var e = B(this);
168
+ return e || (ArrayBuffer.isView(this._bodyArrayBuffer) ? Promise.resolve(
169
+ this._bodyArrayBuffer.buffer.slice(
170
+ this._bodyArrayBuffer.byteOffset,
171
+ this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
172
+ )
173
+ ) : Promise.resolve(this._bodyArrayBuffer));
174
+ } else
175
+ return this.blob().then(M);
176
+ }), this.text = function() {
177
+ var e = B(this);
178
+ if (e)
179
+ return e;
180
+ if (this._bodyBlob)
181
+ return q(this._bodyBlob);
182
+ if (this._bodyArrayBuffer)
183
+ return Promise.resolve(H(this._bodyArrayBuffer));
184
+ if (this._bodyFormData)
185
+ throw new Error("could not read FormData body as text");
186
+ return Promise.resolve(this._bodyText);
187
+ }, f.formData && (this.formData = function() {
188
+ return this.text().then(k);
189
+ }), this.json = function() {
190
+ return this.text().then(JSON.parse);
191
+ }, this;
192
+ }
193
+ var L = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
194
+ function C(e) {
195
+ var t = e.toUpperCase();
196
+ return L.indexOf(t) > -1 ? t : e;
197
+ }
198
+ function m(e, t) {
199
+ if (!(this instanceof m))
200
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
201
+ t = t || {};
202
+ var r = t.body;
203
+ if (e instanceof m) {
204
+ if (e.bodyUsed)
205
+ throw new TypeError("Already read");
206
+ this.url = e.url, this.credentials = e.credentials, t.headers || (this.headers = new s(e.headers)), this.method = e.method, this.mode = e.mode, this.signal = e.signal, !r && e._bodyInit != null && (r = e._bodyInit, e.bodyUsed = !0);
207
+ } else
208
+ this.url = String(e);
209
+ if (this.credentials = t.credentials || this.credentials || "same-origin", (t.headers || !this.headers) && (this.headers = new s(t.headers)), this.method = C(t.method || this.method || "GET"), this.mode = t.mode || this.mode || null, this.signal = t.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && r)
210
+ throw new TypeError("Body not allowed for GET or HEAD requests");
211
+ if (this._initBody(r), (this.method === "GET" || this.method === "HEAD") && (t.cache === "no-store" || t.cache === "no-cache")) {
212
+ var n = /([?&])_=[^&]*/;
213
+ if (n.test(this.url))
214
+ this.url = this.url.replace(n, "$1_=" + (/* @__PURE__ */ new Date()).getTime());
215
+ else {
216
+ var i = /\?/;
217
+ this.url += (i.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime();
218
+ }
219
+ }
220
+ }
221
+ m.prototype.clone = function() {
222
+ return new m(this, { body: this._bodyInit });
223
+ };
224
+ function k(e) {
225
+ var t = new FormData();
226
+ return e.trim().split("&").forEach(function(r) {
227
+ if (r) {
228
+ var n = r.split("="), i = n.shift().replace(/\+/g, " "), o = n.join("=").replace(/\+/g, " ");
229
+ t.append(decodeURIComponent(i), decodeURIComponent(o));
230
+ }
231
+ }), t;
232
+ }
233
+ function N(e) {
234
+ var t = new s(), r = e.replace(/\r?\n[\t ]+/g, " ");
235
+ return r.split("\r").map(function(n) {
236
+ return n.indexOf(`
237
+ `) === 0 ? n.substr(1, n.length) : n;
238
+ }).forEach(function(n) {
239
+ var i = n.split(":"), o = i.shift().trim();
240
+ if (o) {
241
+ var _ = i.join(":").trim();
242
+ t.append(o, _);
243
+ }
244
+ }), t;
245
+ }
246
+ x.call(m.prototype);
247
+ function c(e, t) {
248
+ if (!(this instanceof c))
249
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
250
+ t || (t = {}), this.type = "default", this.status = t.status === void 0 ? 200 : t.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = t.statusText === void 0 ? "" : "" + t.statusText, this.headers = new s(t.headers), this.url = t.url || "", this._initBody(e);
251
+ }
252
+ x.call(c.prototype), c.prototype.clone = function() {
253
+ return new c(this._bodyInit, {
254
+ status: this.status,
255
+ statusText: this.statusText,
256
+ headers: new s(this.headers),
257
+ url: this.url
258
+ });
259
+ }, c.error = function() {
260
+ var e = new c(null, { status: 0, statusText: "" });
261
+ return e.type = "error", e;
262
+ };
263
+ var G = [301, 302, 303, 307, 308];
264
+ c.redirect = function(e, t) {
265
+ if (G.indexOf(t) === -1)
266
+ throw new RangeError("Invalid status code");
267
+ return new c(null, { status: t, headers: { location: e } });
268
+ }, u.DOMException = a.DOMException;
269
+ try {
270
+ new u.DOMException();
271
+ } catch {
272
+ u.DOMException = function(t, r) {
273
+ this.message = t, this.name = r;
274
+ var n = Error(t);
275
+ this.stack = n.stack;
276
+ }, u.DOMException.prototype = Object.create(Error.prototype), u.DOMException.prototype.constructor = u.DOMException;
277
+ }
278
+ function O(e, t) {
279
+ return new Promise(function(r, n) {
280
+ var i = new m(e, t);
281
+ if (i.signal && i.signal.aborted)
282
+ return n(new u.DOMException("Aborted", "AbortError"));
283
+ var o = new XMLHttpRequest();
284
+ function _() {
285
+ o.abort();
286
+ }
287
+ o.onload = function() {
288
+ var l = {
289
+ status: o.status,
290
+ statusText: o.statusText,
291
+ headers: N(o.getAllResponseHeaders() || "")
292
+ };
293
+ l.url = "responseURL" in o ? o.responseURL : l.headers.get("X-Request-URL");
294
+ var g = "response" in o ? o.response : o.responseText;
295
+ setTimeout(function() {
296
+ r(new c(g, l));
297
+ }, 0);
298
+ }, o.onerror = function() {
299
+ setTimeout(function() {
300
+ n(new TypeError("Network request failed"));
301
+ }, 0);
302
+ }, o.ontimeout = function() {
303
+ setTimeout(function() {
304
+ n(new TypeError("Network request failed"));
305
+ }, 0);
306
+ }, o.onabort = function() {
307
+ setTimeout(function() {
308
+ n(new u.DOMException("Aborted", "AbortError"));
309
+ }, 0);
310
+ };
311
+ function V(l) {
312
+ try {
313
+ return l === "" && a.location.href ? a.location.href : l;
314
+ } catch {
315
+ return l;
316
+ }
317
+ }
318
+ o.open(i.method, V(i.url), !0), i.credentials === "include" ? o.withCredentials = !0 : i.credentials === "omit" && (o.withCredentials = !1), "responseType" in o && (f.blob ? o.responseType = "blob" : f.arrayBuffer && i.headers.get("Content-Type") && i.headers.get("Content-Type").indexOf("application/octet-stream") !== -1 && (o.responseType = "arraybuffer")), t && typeof t.headers == "object" && !(t.headers instanceof s) ? Object.getOwnPropertyNames(t.headers).forEach(function(l) {
319
+ o.setRequestHeader(l, E(t.headers[l]));
320
+ }) : i.headers.forEach(function(l, g) {
321
+ o.setRequestHeader(g, l);
322
+ }), i.signal && (i.signal.addEventListener("abort", _), o.onreadystatechange = function() {
323
+ o.readyState === 4 && i.signal.removeEventListener("abort", _);
324
+ }), o.send(typeof i._bodyInit > "u" ? null : i._bodyInit);
325
+ });
326
+ }
327
+ return O.polyfill = !0, a.fetch || (a.fetch = O, a.Headers = s, a.Request = m, a.Response = c), u.Headers = s, u.Request = m, u.Response = c, u.fetch = O, u;
328
+ })({});
329
+ })(y), y.fetch.ponyfill = !0, delete y.fetch.polyfill;
330
+ var h = b.fetch ? b : y;
331
+ d = h.fetch, d.default = h.fetch, d.fetch = h.fetch, d.Headers = h.Headers, d.Request = h.Request, d.Response = h.Response, w.exports = d;
332
+ }(A, A.exports)), A.exports;
333
+ }
334
+ var j = X();
335
+ const J = /* @__PURE__ */ z(j), Q = /* @__PURE__ */ $({
336
+ __proto__: null,
337
+ default: J
338
+ }, [j]);
339
+ export {
340
+ Q as b
341
+ };
package/campaign.js CHANGED
@@ -1,42 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ce=require("./index-CzxpJe9c.js"),g=require("react"),le=require("react-native");var b={exports:{}},v={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var L;function fe(){if(L)return v;L=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function n(i,u,l){var R=null;if(l!==void 0&&(R=""+l),u.key!==void 0&&(R=""+u.key),"key"in u){l={};for(var p in u)p!=="key"&&(l[p]=u[p])}else l=u;return u=l.ref,{$$typeof:t,type:i,key:R,ref:u!==void 0?u:null,props:l}}return v.Fragment=a,v.jsx=n,v.jsxs=n,v}var _={};/**
10
- * @license React
11
- * react-jsx-runtime.development.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var $;function de(){return $||($=1,process.env.NODE_ENV!=="production"&&function(){function t(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case h:return"Fragment";case Z:return"Profiler";case Q:return"StrictMode";case te:return"Suspense";case ne:return"SuspenseList";case oe:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case B:return"Portal";case ee:return(e.displayName||"Context")+".Provider";case K:return(e._context.displayName||"Context")+".Consumer";case re:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ae:return r=e.displayName||null,r!==null?r:t(e.type)||"Memo";case I:r=e._payload,e=e._init;try{return t(e(r))}catch{}}return null}function a(e){return""+e}function n(e){try{a(e);var r=!1}catch{r=!0}if(r){r=console;var o=r.error,s=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",s),a(e)}}function i(e){if(e===h)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===I)return"<...>";try{var r=t(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function u(){var e=O.A;return e===null?null:e.getOwner()}function l(){return Error("react-stack-top-frame")}function R(e){if(Y.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function p(e,r){function o(){D||(D=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}function z(){var e=t(this.type);return q[e]||(q[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function X(e,r,o,s,d,f,S,k){return o=f.ref,e={$$typeof:j,type:e,key:r,props:f,_owner:d},(o!==void 0?o:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:z}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:S}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:k}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function C(e,r,o,s,d,f,S,k){var c=r.children;if(c!==void 0)if(s)if(ue(c)){for(s=0;s<c.length;s++)w(c[s]);Object.freeze&&Object.freeze(c)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else w(c);if(Y.call(r,"key")){c=t(e);var m=Object.keys(r).filter(function(se){return se!=="key"});s=0<m.length?"{key: someKey, "+m.join(": ..., ")+": ...}":"{key: someKey}",M[c+s]||(m=0<m.length?"{"+m.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
- let props = %s;
19
- <%s {...props} />
20
- React keys must be passed directly to JSX without using spread:
21
- let props = %s;
22
- <%s key={someKey} {...props} />`,s,c,m,c),M[c+s]=!0)}if(c=null,o!==void 0&&(n(o),c=""+o),R(r)&&(n(r.key),c=""+r.key),"key"in r){o={};for(var N in r)N!=="key"&&(o[N]=r[N])}else o=r;return c&&p(o,typeof e=="function"?e.displayName||e.name||"Unknown":e),X(e,c,f,d,u(),o,S,k)}function w(e){typeof e=="object"&&e!==null&&e.$$typeof===j&&e._store&&(e._store.validated=1)}var E=g,j=Symbol.for("react.transitional.element"),B=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),Q=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),ee=Symbol.for("react.context"),re=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),ne=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),ie=Symbol.for("react.client.reference"),O=E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=Object.prototype.hasOwnProperty,ue=Array.isArray,y=console.createTask?console.createTask:function(){return null};E={"react-stack-bottom-frame":function(e){return e()}};var D,q={},U=E["react-stack-bottom-frame"].bind(E,l)(),F=y(i(l)),M={};_.Fragment=h,_.jsx=function(e,r,o,s,d){var f=1e4>O.recentlyCreatedOwnerStacks++;return C(e,r,o,!1,s,d,f?Error("react-stack-top-frame"):U,f?y(i(e)):F)},_.jsxs=function(e,r,o,s,d){var f=1e4>O.recentlyCreatedOwnerStacks++;return C(e,r,o,!0,s,d,f?Error("react-stack-top-frame"):U,f?y(i(e)):F)}}()),_}var W;function me(){return W||(W=1,process.env.NODE_ENV==="production"?b.exports=fe():b.exports=de()),b.exports}var Re=me(),P={exports:{}},x={};/**
23
- * @license React
24
- * react-compiler-runtime.production.js
25
- *
26
- * Copyright (c) Meta Platforms, Inc. and affiliates.
27
- *
28
- * This source code is licensed under the MIT license found in the
29
- * LICENSE file in the root directory of this source tree.
30
- */var V;function pe(){if(V)return x;V=1;var t=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return x.c=function(a){return t.H.useMemoCache(a)},x}var A={};/**
31
- * @license React
32
- * react-compiler-runtime.development.js
33
- *
34
- * Copyright (c) Meta Platforms, Inc. and affiliates.
35
- *
36
- * This source code is licensed under the MIT license found in the
37
- * LICENSE file in the root directory of this source tree.
38
- */var G;function ve(){return G||(G=1,process.env.NODE_ENV!=="production"&&function(){var t=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;A.c=function(a){var n=t.H;return n===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
39
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
40
- 2. You might be breaking the Rules of Hooks
41
- 3. You might have more than one copy of React in the same app
42
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),n.useMemoCache(a)}}()),A}var H;function _e(){return H||(H=1,process.env.NODE_ENV==="production"?P.exports=pe():P.exports=ve()),P.exports}var Ee=_e();function be(t){const{src:a,alt:n,...i}=t;return a?{...i,source:{uri:a}}:i}const Pe=g.forwardRef((t,a)=>{const n=Ee.c(5);if(!t.src)return null;let i;n[0]!==t?(i=be(t),n[0]=t,n[1]=i):i=n[1];let u;return n[2]!==a||n[3]!==i?(u=Re.jsx(le.Image,{ref:a,...i}),n[2]=a,n[3]=i,n[4]=u):u=n[4],u});Pe.displayName="PlatformPrimitiveImage";const T=t=>t==null?0:typeof t=="number"?t:"value"in t?t.value:"min"in t?t.min:0,Te=t=>{const a=t.map(u=>T(u.price)),n=Math.min(...a),i=Math.max(...a);return n===void 0||i===void 0?{value:0}:n===i?{value:n}:{min:n,max:i}},J=new ce.VendurePluginConfig({name:"campaign",enableFeatures:{ordinaryPrice:({variant:t,orderLine:a,searchResult:n,product:i})=>{if(a){const u=a.productVariant;return u?.ordinaryPrice?T(u?.ordinaryPrice)*a.quantity:a.discountedLinePriceWithTax}return t?T(t.ordinaryPrice||0):n?T(n.ordinaryPrice||0):i?Te(i.variants):0}},queryUpdates:{}});J.setQueryUpdates({search:{fields:[{items:[{ordinaryPrice:[{operation:"PriceRange",fields:["min, max"],fragment:!0},{operation:"SinglePrice",fields:["value"],fragment:!0}]}]}]},product:{fields:[{ordinaryPrice:[{operation:"PriceRange",fields:["min, max"],fragment:!0},{operation:"SinglePrice",fields:["value"],fragment:!0}]},{variants:["ordinaryPrice"]}]},briefProducts:{fields:[{items:[{ordinaryPrice:[{operation:"PriceRange",fields:["min, max"],fragment:!0},{operation:"SinglePrice",fields:["value"],fragment:!0}]},{variants:["ordinaryPrice"]}]}]},activeOrder:{fields:[{lines:[{productVariant:["ordinaryPrice"]}]}]},orderByCode:{fields:[{lines:[{productVariant:["ordinaryPrice"]}]}]},adjustOrderLine:{fields:[{fields:[{lines:[{productVariant:["ordinaryPrice"]}]}]}]},addItemToOrder:{fields:[{fields:[{lines:[{productVariant:["ordinaryPrice"]}]}]}]}});exports.VendureCampaignPlugin=J;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CATkY-bf.js"),r=require("./index-BKGQQxdW.js"),d=new o.VendurePluginConfig({name:"campaign",enableFeatures:{ordinaryPrice:({variant:i,orderLine:e,searchResult:n,product:a})=>{if(e){const t=e.productVariant;return t?.ordinaryPrice?r.getPrice(t?.ordinaryPrice)*e.quantity:e.discountedLinePriceWithTax}return i?r.getPrice(i.ordinaryPrice||0):n?r.getPrice(n.ordinaryPrice||0):a?r.getProductPriceFromVariants(a.variants):0}},queryUpdates:{}});d.setQueryUpdates({search:{fields:[{items:[{ordinaryPrice:[{operation:"PriceRange",fields:["min, max"],fragment:!0},{operation:"SinglePrice",fields:["value"],fragment:!0}]}]}]},product:{fields:[{ordinaryPrice:[{operation:"PriceRange",fields:["min, max"],fragment:!0},{operation:"SinglePrice",fields:["value"],fragment:!0}]},{variants:["ordinaryPrice"]}]},briefProducts:{fields:[{items:[{ordinaryPrice:[{operation:"PriceRange",fields:["min, max"],fragment:!0},{operation:"SinglePrice",fields:["value"],fragment:!0}]},{variants:["ordinaryPrice"]}]}]},activeOrder:{fields:[{lines:[{productVariant:["ordinaryPrice"]}]}]},orderByCode:{fields:[{lines:[{productVariant:["ordinaryPrice"]}]}]},adjustOrderLine:{fields:[{fields:[{lines:[{productVariant:["ordinaryPrice"]}]}]}]},addItemToOrder:{fields:[{fields:[{lines:[{productVariant:["ordinaryPrice"]}]}]}]}});exports.VendureCampaignPlugin=d;