@learncard/core 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -29480,489 +29480,6 @@ var require_tslib = __commonJS({
29480
29480
  }
29481
29481
  });
29482
29482
 
29483
- // ../../node_modules/.pnpm/cross-fetch@3.1.5/node_modules/cross-fetch/dist/browser-ponyfill.js
29484
- var require_browser_ponyfill = __commonJS({
29485
- "../../node_modules/.pnpm/cross-fetch@3.1.5/node_modules/cross-fetch/dist/browser-ponyfill.js"(exports, module2) {
29486
- var global2 = typeof self !== "undefined" ? self : exports;
29487
- var __self__ = function() {
29488
- function F() {
29489
- this.fetch = false;
29490
- this.DOMException = global2.DOMException;
29491
- }
29492
- __name(F, "F");
29493
- F.prototype = global2;
29494
- return new F();
29495
- }();
29496
- (function(self2) {
29497
- var irrelevant = function(exports2) {
29498
- var support = {
29499
- searchParams: "URLSearchParams" in self2,
29500
- iterable: "Symbol" in self2 && "iterator" in Symbol,
29501
- blob: "FileReader" in self2 && "Blob" in self2 && function() {
29502
- try {
29503
- new Blob();
29504
- return true;
29505
- } catch (e) {
29506
- return false;
29507
- }
29508
- }(),
29509
- formData: "FormData" in self2,
29510
- arrayBuffer: "ArrayBuffer" in self2
29511
- };
29512
- function isDataView(obj) {
29513
- return obj && DataView.prototype.isPrototypeOf(obj);
29514
- }
29515
- __name(isDataView, "isDataView");
29516
- if (support.arrayBuffer) {
29517
- var viewClasses = [
29518
- "[object Int8Array]",
29519
- "[object Uint8Array]",
29520
- "[object Uint8ClampedArray]",
29521
- "[object Int16Array]",
29522
- "[object Uint16Array]",
29523
- "[object Int32Array]",
29524
- "[object Uint32Array]",
29525
- "[object Float32Array]",
29526
- "[object Float64Array]"
29527
- ];
29528
- var isArrayBufferView = ArrayBuffer.isView || function(obj) {
29529
- return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1;
29530
- };
29531
- }
29532
- function normalizeName(name5) {
29533
- if (typeof name5 !== "string") {
29534
- name5 = String(name5);
29535
- }
29536
- if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name5)) {
29537
- throw new TypeError("Invalid character in header field name");
29538
- }
29539
- return name5.toLowerCase();
29540
- }
29541
- __name(normalizeName, "normalizeName");
29542
- function normalizeValue(value) {
29543
- if (typeof value !== "string") {
29544
- value = String(value);
29545
- }
29546
- return value;
29547
- }
29548
- __name(normalizeValue, "normalizeValue");
29549
- function iteratorFor(items) {
29550
- var iterator2 = {
29551
- next: function() {
29552
- var value = items.shift();
29553
- return { done: value === void 0, value };
29554
- }
29555
- };
29556
- if (support.iterable) {
29557
- iterator2[Symbol.iterator] = function() {
29558
- return iterator2;
29559
- };
29560
- }
29561
- return iterator2;
29562
- }
29563
- __name(iteratorFor, "iteratorFor");
29564
- function Headers2(headers) {
29565
- this.map = {};
29566
- if (headers instanceof Headers2) {
29567
- headers.forEach(function(value, name5) {
29568
- this.append(name5, value);
29569
- }, this);
29570
- } else if (Array.isArray(headers)) {
29571
- headers.forEach(function(header) {
29572
- this.append(header[0], header[1]);
29573
- }, this);
29574
- } else if (headers) {
29575
- Object.getOwnPropertyNames(headers).forEach(function(name5) {
29576
- this.append(name5, headers[name5]);
29577
- }, this);
29578
- }
29579
- }
29580
- __name(Headers2, "Headers");
29581
- Headers2.prototype.append = function(name5, value) {
29582
- name5 = normalizeName(name5);
29583
- value = normalizeValue(value);
29584
- var oldValue = this.map[name5];
29585
- this.map[name5] = oldValue ? oldValue + ", " + value : value;
29586
- };
29587
- Headers2.prototype["delete"] = function(name5) {
29588
- delete this.map[normalizeName(name5)];
29589
- };
29590
- Headers2.prototype.get = function(name5) {
29591
- name5 = normalizeName(name5);
29592
- return this.has(name5) ? this.map[name5] : null;
29593
- };
29594
- Headers2.prototype.has = function(name5) {
29595
- return this.map.hasOwnProperty(normalizeName(name5));
29596
- };
29597
- Headers2.prototype.set = function(name5, value) {
29598
- this.map[normalizeName(name5)] = normalizeValue(value);
29599
- };
29600
- Headers2.prototype.forEach = function(callback, thisArg) {
29601
- for (var name5 in this.map) {
29602
- if (this.map.hasOwnProperty(name5)) {
29603
- callback.call(thisArg, this.map[name5], name5, this);
29604
- }
29605
- }
29606
- };
29607
- Headers2.prototype.keys = function() {
29608
- var items = [];
29609
- this.forEach(function(value, name5) {
29610
- items.push(name5);
29611
- });
29612
- return iteratorFor(items);
29613
- };
29614
- Headers2.prototype.values = function() {
29615
- var items = [];
29616
- this.forEach(function(value) {
29617
- items.push(value);
29618
- });
29619
- return iteratorFor(items);
29620
- };
29621
- Headers2.prototype.entries = function() {
29622
- var items = [];
29623
- this.forEach(function(value, name5) {
29624
- items.push([name5, value]);
29625
- });
29626
- return iteratorFor(items);
29627
- };
29628
- if (support.iterable) {
29629
- Headers2.prototype[Symbol.iterator] = Headers2.prototype.entries;
29630
- }
29631
- function consumed(body) {
29632
- if (body.bodyUsed) {
29633
- return Promise.reject(new TypeError("Already read"));
29634
- }
29635
- body.bodyUsed = true;
29636
- }
29637
- __name(consumed, "consumed");
29638
- function fileReaderReady(reader) {
29639
- return new Promise(function(resolve, reject) {
29640
- reader.onload = function() {
29641
- resolve(reader.result);
29642
- };
29643
- reader.onerror = function() {
29644
- reject(reader.error);
29645
- };
29646
- });
29647
- }
29648
- __name(fileReaderReady, "fileReaderReady");
29649
- function readBlobAsArrayBuffer(blob) {
29650
- var reader = new FileReader();
29651
- var promise = fileReaderReady(reader);
29652
- reader.readAsArrayBuffer(blob);
29653
- return promise;
29654
- }
29655
- __name(readBlobAsArrayBuffer, "readBlobAsArrayBuffer");
29656
- function readBlobAsText(blob) {
29657
- var reader = new FileReader();
29658
- var promise = fileReaderReady(reader);
29659
- reader.readAsText(blob);
29660
- return promise;
29661
- }
29662
- __name(readBlobAsText, "readBlobAsText");
29663
- function readArrayBufferAsText(buf2) {
29664
- var view = new Uint8Array(buf2);
29665
- var chars = new Array(view.length);
29666
- for (var i = 0; i < view.length; i++) {
29667
- chars[i] = String.fromCharCode(view[i]);
29668
- }
29669
- return chars.join("");
29670
- }
29671
- __name(readArrayBufferAsText, "readArrayBufferAsText");
29672
- function bufferClone(buf2) {
29673
- if (buf2.slice) {
29674
- return buf2.slice(0);
29675
- } else {
29676
- var view = new Uint8Array(buf2.byteLength);
29677
- view.set(new Uint8Array(buf2));
29678
- return view.buffer;
29679
- }
29680
- }
29681
- __name(bufferClone, "bufferClone");
29682
- function Body() {
29683
- this.bodyUsed = false;
29684
- this._initBody = function(body) {
29685
- this._bodyInit = body;
29686
- if (!body) {
29687
- this._bodyText = "";
29688
- } else if (typeof body === "string") {
29689
- this._bodyText = body;
29690
- } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
29691
- this._bodyBlob = body;
29692
- } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
29693
- this._bodyFormData = body;
29694
- } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
29695
- this._bodyText = body.toString();
29696
- } else if (support.arrayBuffer && support.blob && isDataView(body)) {
29697
- this._bodyArrayBuffer = bufferClone(body.buffer);
29698
- this._bodyInit = new Blob([this._bodyArrayBuffer]);
29699
- } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
29700
- this._bodyArrayBuffer = bufferClone(body);
29701
- } else {
29702
- this._bodyText = body = Object.prototype.toString.call(body);
29703
- }
29704
- if (!this.headers.get("content-type")) {
29705
- if (typeof body === "string") {
29706
- this.headers.set("content-type", "text/plain;charset=UTF-8");
29707
- } else if (this._bodyBlob && this._bodyBlob.type) {
29708
- this.headers.set("content-type", this._bodyBlob.type);
29709
- } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
29710
- this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8");
29711
- }
29712
- }
29713
- };
29714
- if (support.blob) {
29715
- this.blob = function() {
29716
- var rejected = consumed(this);
29717
- if (rejected) {
29718
- return rejected;
29719
- }
29720
- if (this._bodyBlob) {
29721
- return Promise.resolve(this._bodyBlob);
29722
- } else if (this._bodyArrayBuffer) {
29723
- return Promise.resolve(new Blob([this._bodyArrayBuffer]));
29724
- } else if (this._bodyFormData) {
29725
- throw new Error("could not read FormData body as blob");
29726
- } else {
29727
- return Promise.resolve(new Blob([this._bodyText]));
29728
- }
29729
- };
29730
- this.arrayBuffer = function() {
29731
- if (this._bodyArrayBuffer) {
29732
- return consumed(this) || Promise.resolve(this._bodyArrayBuffer);
29733
- } else {
29734
- return this.blob().then(readBlobAsArrayBuffer);
29735
- }
29736
- };
29737
- }
29738
- this.text = function() {
29739
- var rejected = consumed(this);
29740
- if (rejected) {
29741
- return rejected;
29742
- }
29743
- if (this._bodyBlob) {
29744
- return readBlobAsText(this._bodyBlob);
29745
- } else if (this._bodyArrayBuffer) {
29746
- return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer));
29747
- } else if (this._bodyFormData) {
29748
- throw new Error("could not read FormData body as text");
29749
- } else {
29750
- return Promise.resolve(this._bodyText);
29751
- }
29752
- };
29753
- if (support.formData) {
29754
- this.formData = function() {
29755
- return this.text().then(decode12);
29756
- };
29757
- }
29758
- this.json = function() {
29759
- return this.text().then(JSON.parse);
29760
- };
29761
- return this;
29762
- }
29763
- __name(Body, "Body");
29764
- var methods = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
29765
- function normalizeMethod(method) {
29766
- var upcased = method.toUpperCase();
29767
- return methods.indexOf(upcased) > -1 ? upcased : method;
29768
- }
29769
- __name(normalizeMethod, "normalizeMethod");
29770
- function Request2(input, options) {
29771
- options = options || {};
29772
- var body = options.body;
29773
- if (input instanceof Request2) {
29774
- if (input.bodyUsed) {
29775
- throw new TypeError("Already read");
29776
- }
29777
- this.url = input.url;
29778
- this.credentials = input.credentials;
29779
- if (!options.headers) {
29780
- this.headers = new Headers2(input.headers);
29781
- }
29782
- this.method = input.method;
29783
- this.mode = input.mode;
29784
- this.signal = input.signal;
29785
- if (!body && input._bodyInit != null) {
29786
- body = input._bodyInit;
29787
- input.bodyUsed = true;
29788
- }
29789
- } else {
29790
- this.url = String(input);
29791
- }
29792
- this.credentials = options.credentials || this.credentials || "same-origin";
29793
- if (options.headers || !this.headers) {
29794
- this.headers = new Headers2(options.headers);
29795
- }
29796
- this.method = normalizeMethod(options.method || this.method || "GET");
29797
- this.mode = options.mode || this.mode || null;
29798
- this.signal = options.signal || this.signal;
29799
- this.referrer = null;
29800
- if ((this.method === "GET" || this.method === "HEAD") && body) {
29801
- throw new TypeError("Body not allowed for GET or HEAD requests");
29802
- }
29803
- this._initBody(body);
29804
- }
29805
- __name(Request2, "Request");
29806
- Request2.prototype.clone = function() {
29807
- return new Request2(this, { body: this._bodyInit });
29808
- };
29809
- function decode12(body) {
29810
- var form = new FormData();
29811
- body.trim().split("&").forEach(function(bytes) {
29812
- if (bytes) {
29813
- var split = bytes.split("=");
29814
- var name5 = split.shift().replace(/\+/g, " ");
29815
- var value = split.join("=").replace(/\+/g, " ");
29816
- form.append(decodeURIComponent(name5), decodeURIComponent(value));
29817
- }
29818
- });
29819
- return form;
29820
- }
29821
- __name(decode12, "decode");
29822
- function parseHeaders(rawHeaders) {
29823
- var headers = new Headers2();
29824
- var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, " ");
29825
- preProcessedHeaders.split(/\r?\n/).forEach(function(line) {
29826
- var parts = line.split(":");
29827
- var key2 = parts.shift().trim();
29828
- if (key2) {
29829
- var value = parts.join(":").trim();
29830
- headers.append(key2, value);
29831
- }
29832
- });
29833
- return headers;
29834
- }
29835
- __name(parseHeaders, "parseHeaders");
29836
- Body.call(Request2.prototype);
29837
- function Response2(bodyInit, options) {
29838
- if (!options) {
29839
- options = {};
29840
- }
29841
- this.type = "default";
29842
- this.status = options.status === void 0 ? 200 : options.status;
29843
- this.ok = this.status >= 200 && this.status < 300;
29844
- this.statusText = "statusText" in options ? options.statusText : "OK";
29845
- this.headers = new Headers2(options.headers);
29846
- this.url = options.url || "";
29847
- this._initBody(bodyInit);
29848
- }
29849
- __name(Response2, "Response");
29850
- Body.call(Response2.prototype);
29851
- Response2.prototype.clone = function() {
29852
- return new Response2(this._bodyInit, {
29853
- status: this.status,
29854
- statusText: this.statusText,
29855
- headers: new Headers2(this.headers),
29856
- url: this.url
29857
- });
29858
- };
29859
- Response2.error = function() {
29860
- var response = new Response2(null, { status: 0, statusText: "" });
29861
- response.type = "error";
29862
- return response;
29863
- };
29864
- var redirectStatuses = [301, 302, 303, 307, 308];
29865
- Response2.redirect = function(url, status) {
29866
- if (redirectStatuses.indexOf(status) === -1) {
29867
- throw new RangeError("Invalid status code");
29868
- }
29869
- return new Response2(null, { status, headers: { location: url } });
29870
- };
29871
- exports2.DOMException = self2.DOMException;
29872
- try {
29873
- new exports2.DOMException();
29874
- } catch (err) {
29875
- exports2.DOMException = function(message, name5) {
29876
- this.message = message;
29877
- this.name = name5;
29878
- var error = Error(message);
29879
- this.stack = error.stack;
29880
- };
29881
- exports2.DOMException.prototype = Object.create(Error.prototype);
29882
- exports2.DOMException.prototype.constructor = exports2.DOMException;
29883
- }
29884
- function fetch3(input, init4) {
29885
- return new Promise(function(resolve, reject) {
29886
- var request = new Request2(input, init4);
29887
- if (request.signal && request.signal.aborted) {
29888
- return reject(new exports2.DOMException("Aborted", "AbortError"));
29889
- }
29890
- var xhr = new XMLHttpRequest();
29891
- function abortXhr() {
29892
- xhr.abort();
29893
- }
29894
- __name(abortXhr, "abortXhr");
29895
- xhr.onload = function() {
29896
- var options = {
29897
- status: xhr.status,
29898
- statusText: xhr.statusText,
29899
- headers: parseHeaders(xhr.getAllResponseHeaders() || "")
29900
- };
29901
- options.url = "responseURL" in xhr ? xhr.responseURL : options.headers.get("X-Request-URL");
29902
- var body = "response" in xhr ? xhr.response : xhr.responseText;
29903
- resolve(new Response2(body, options));
29904
- };
29905
- xhr.onerror = function() {
29906
- reject(new TypeError("Network request failed"));
29907
- };
29908
- xhr.ontimeout = function() {
29909
- reject(new TypeError("Network request failed"));
29910
- };
29911
- xhr.onabort = function() {
29912
- reject(new exports2.DOMException("Aborted", "AbortError"));
29913
- };
29914
- xhr.open(request.method, request.url, true);
29915
- if (request.credentials === "include") {
29916
- xhr.withCredentials = true;
29917
- } else if (request.credentials === "omit") {
29918
- xhr.withCredentials = false;
29919
- }
29920
- if ("responseType" in xhr && support.blob) {
29921
- xhr.responseType = "blob";
29922
- }
29923
- request.headers.forEach(function(value, name5) {
29924
- xhr.setRequestHeader(name5, value);
29925
- });
29926
- if (request.signal) {
29927
- request.signal.addEventListener("abort", abortXhr);
29928
- xhr.onreadystatechange = function() {
29929
- if (xhr.readyState === 4) {
29930
- request.signal.removeEventListener("abort", abortXhr);
29931
- }
29932
- };
29933
- }
29934
- xhr.send(typeof request._bodyInit === "undefined" ? null : request._bodyInit);
29935
- });
29936
- }
29937
- __name(fetch3, "fetch");
29938
- fetch3.polyfill = true;
29939
- if (!self2.fetch) {
29940
- self2.fetch = fetch3;
29941
- self2.Headers = Headers2;
29942
- self2.Request = Request2;
29943
- self2.Response = Response2;
29944
- }
29945
- exports2.Headers = Headers2;
29946
- exports2.Request = Request2;
29947
- exports2.Response = Response2;
29948
- exports2.fetch = fetch3;
29949
- Object.defineProperty(exports2, "__esModule", { value: true });
29950
- return exports2;
29951
- }({});
29952
- })(__self__);
29953
- __self__.fetch.ponyfill = true;
29954
- delete __self__.fetch.polyfill;
29955
- var ctx = __self__;
29956
- exports = ctx.fetch;
29957
- exports.default = ctx.fetch;
29958
- exports.fetch = ctx.fetch;
29959
- exports.Headers = ctx.Headers;
29960
- exports.Request = ctx.Request;
29961
- exports.Response = ctx.Response;
29962
- module2.exports = exports;
29963
- }
29964
- });
29965
-
29966
29483
  // ../../node_modules/.pnpm/dataloader@2.1.0/node_modules/dataloader/index.js
29967
29484
  var require_dataloader = __commonJS({
29968
29485
  "../../node_modules/.pnpm/dataloader@2.1.0/node_modules/dataloader/index.js"(exports, module2) {
@@ -45491,7 +45008,7 @@ function StreamStatic() {
45491
45008
  __name(StreamStatic, "StreamStatic");
45492
45009
 
45493
45010
  // ../../node_modules/.pnpm/@ceramicnetwork+common@2.3.0/node_modules/@ceramicnetwork/common/lib/utils/http-utils.js
45494
- var import_cross_fetch = __toESM(require_browser_ponyfill(), 1);
45011
+ var import_cross_fetch = __toESM(require("cross-fetch"), 1);
45495
45012
 
45496
45013
  // ../../node_modules/.pnpm/@ceramicnetwork+common@2.3.0/node_modules/@ceramicnetwork/common/lib/utils/abort-signal-utils.js
45497
45014
  function mergeAbortSignals(signals) {