@pod-os/core 0.20.1-rc.f98c05a.0 → 0.21.0
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.
- package/dist/index.js +462 -3
- package/lib/index.js +565 -106
- package/package.json +7 -6
- package/types/problems/index.d.ts +1 -1
package/lib/index.js
CHANGED
|
@@ -11915,7 +11915,7 @@ var PodOS = (() => {
|
|
|
11915
11915
|
* know the class DAG.
|
|
11916
11916
|
* @param types A map of the types
|
|
11917
11917
|
*/
|
|
11918
|
-
bottomTypeURIs(
|
|
11918
|
+
bottomTypeURIs(types2) {
|
|
11919
11919
|
let bots;
|
|
11920
11920
|
let bottom;
|
|
11921
11921
|
let elt;
|
|
@@ -11925,16 +11925,16 @@ var PodOS = (() => {
|
|
|
11925
11925
|
let subs;
|
|
11926
11926
|
let v2;
|
|
11927
11927
|
bots = [];
|
|
11928
|
-
for (let k in
|
|
11929
|
-
if (!
|
|
11930
|
-
v2 =
|
|
11928
|
+
for (let k in types2) {
|
|
11929
|
+
if (!types2.hasOwnProperty(k)) continue;
|
|
11930
|
+
v2 = types2[k];
|
|
11931
11931
|
subs = this.each(void 0, this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"), this.rdfFactory.namedNode(k));
|
|
11932
11932
|
bottom = true;
|
|
11933
11933
|
i = 0;
|
|
11934
11934
|
for (len = subs.length; i < len; i++) {
|
|
11935
11935
|
elt = subs[i];
|
|
11936
11936
|
ref = elt.uri;
|
|
11937
|
-
if (ref in
|
|
11937
|
+
if (ref in types2) {
|
|
11938
11938
|
bottom = false;
|
|
11939
11939
|
break;
|
|
11940
11940
|
}
|
|
@@ -12069,9 +12069,9 @@ var PodOS = (() => {
|
|
|
12069
12069
|
* We use NT representations in this version because they handle blank nodes.
|
|
12070
12070
|
*/
|
|
12071
12071
|
findSubClassesNT(subject8) {
|
|
12072
|
-
let
|
|
12073
|
-
|
|
12074
|
-
return this.transitiveClosure(
|
|
12072
|
+
let types2 = {};
|
|
12073
|
+
types2[subject8.toNT()] = true;
|
|
12074
|
+
return this.transitiveClosure(types2, this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"), true);
|
|
12075
12075
|
}
|
|
12076
12076
|
/**
|
|
12077
12077
|
* Get all the Classes of which we can RDFS-infer the subject is a subclass
|
|
@@ -12082,9 +12082,9 @@ var PodOS = (() => {
|
|
|
12082
12082
|
* We use NT representations in this version because they handle blank nodes.
|
|
12083
12083
|
*/
|
|
12084
12084
|
findSuperClassesNT(subject8) {
|
|
12085
|
-
let
|
|
12086
|
-
|
|
12087
|
-
return this.transitiveClosure(
|
|
12085
|
+
let types2 = {};
|
|
12086
|
+
types2[subject8.toNT()] = true;
|
|
12087
|
+
return this.transitiveClosure(types2, this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"), false);
|
|
12088
12088
|
}
|
|
12089
12089
|
/**
|
|
12090
12090
|
* Get all the Classes of which we can RDFS-infer the subject is a member
|
|
@@ -12104,19 +12104,19 @@ var PodOS = (() => {
|
|
|
12104
12104
|
let ref2;
|
|
12105
12105
|
let ref3;
|
|
12106
12106
|
let st2;
|
|
12107
|
-
let
|
|
12107
|
+
let types2;
|
|
12108
12108
|
rdftype = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type";
|
|
12109
|
-
|
|
12109
|
+
types2 = [];
|
|
12110
12110
|
ref = this.statementsMatching(subject8, void 0, void 0);
|
|
12111
12111
|
for (let i = 0, len = ref.length; i < len; i++) {
|
|
12112
12112
|
st2 = ref[i];
|
|
12113
12113
|
if (st2.predicate.uri === rdftype) {
|
|
12114
|
-
|
|
12114
|
+
types2[st2.object.toNT()] = st2;
|
|
12115
12115
|
} else {
|
|
12116
12116
|
ref1 = this.each(st2.predicate, this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#domain"));
|
|
12117
12117
|
for (let l = 0, len1 = ref1.length; l < len1; l++) {
|
|
12118
12118
|
range3 = ref1[l];
|
|
12119
|
-
|
|
12119
|
+
types2[range3.toNT()] = st2;
|
|
12120
12120
|
}
|
|
12121
12121
|
}
|
|
12122
12122
|
}
|
|
@@ -12126,10 +12126,10 @@ var PodOS = (() => {
|
|
|
12126
12126
|
ref3 = this.each(st2.predicate, this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#range"));
|
|
12127
12127
|
for (let q = 0, len3 = ref3.length; q < len3; q++) {
|
|
12128
12128
|
domain4 = ref3[q];
|
|
12129
|
-
|
|
12129
|
+
types2[domain4.toNT()] = st2;
|
|
12130
12130
|
}
|
|
12131
12131
|
}
|
|
12132
|
-
return this.transitiveClosure(
|
|
12132
|
+
return this.transitiveClosure(types2, this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"), false);
|
|
12133
12133
|
}
|
|
12134
12134
|
/**
|
|
12135
12135
|
* Get all the Classes of which we can RDFS-infer the subject is a member
|
|
@@ -12381,7 +12381,7 @@ var PodOS = (() => {
|
|
|
12381
12381
|
* information-free.
|
|
12382
12382
|
* @param types - The types
|
|
12383
12383
|
*/
|
|
12384
|
-
topTypeURIs(
|
|
12384
|
+
topTypeURIs(types2) {
|
|
12385
12385
|
let i;
|
|
12386
12386
|
let j;
|
|
12387
12387
|
let k;
|
|
@@ -12391,9 +12391,9 @@ var PodOS = (() => {
|
|
|
12391
12391
|
let tops;
|
|
12392
12392
|
let v2;
|
|
12393
12393
|
tops = [];
|
|
12394
|
-
for (k in
|
|
12395
|
-
if (!
|
|
12396
|
-
v2 =
|
|
12394
|
+
for (k in types2) {
|
|
12395
|
+
if (!types2.hasOwnProperty(k)) continue;
|
|
12396
|
+
v2 = types2[k];
|
|
12397
12397
|
n2 = 0;
|
|
12398
12398
|
ref = this.each(this.rdfFactory.namedNode(k), this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"));
|
|
12399
12399
|
for (i = 0, len = ref.length; i < len; i++) {
|
|
@@ -16701,11 +16701,11 @@ var PodOS = (() => {
|
|
|
16701
16701
|
var require_graphTypes = __commonJS({
|
|
16702
16702
|
"../node_modules/jsonld/lib/graphTypes.js"(exports, module3) {
|
|
16703
16703
|
"use strict";
|
|
16704
|
-
var
|
|
16704
|
+
var types2 = require_types();
|
|
16705
16705
|
var api = {};
|
|
16706
16706
|
module3.exports = api;
|
|
16707
16707
|
api.isSubject = (v2) => {
|
|
16708
|
-
if (
|
|
16708
|
+
if (types2.isObject(v2) && !("@value" in v2 || "@set" in v2 || "@list" in v2)) {
|
|
16709
16709
|
const keyCount = Object.keys(v2).length;
|
|
16710
16710
|
return keyCount > 1 || !("@id" in v2);
|
|
16711
16711
|
}
|
|
@@ -16715,31 +16715,31 @@ var PodOS = (() => {
|
|
|
16715
16715
|
// Note: A value is a subject reference if all of these hold true:
|
|
16716
16716
|
// 1. It is an Object.
|
|
16717
16717
|
// 2. It has a single key: @id.
|
|
16718
|
-
|
|
16718
|
+
types2.isObject(v2) && Object.keys(v2).length === 1 && "@id" in v2
|
|
16719
16719
|
);
|
|
16720
16720
|
api.isValue = (v2) => (
|
|
16721
16721
|
// Note: A value is a @value if all of these hold true:
|
|
16722
16722
|
// 1. It is an Object.
|
|
16723
16723
|
// 2. It has the @value property.
|
|
16724
|
-
|
|
16724
|
+
types2.isObject(v2) && "@value" in v2
|
|
16725
16725
|
);
|
|
16726
16726
|
api.isList = (v2) => (
|
|
16727
16727
|
// Note: A value is a @list if all of these hold true:
|
|
16728
16728
|
// 1. It is an Object.
|
|
16729
16729
|
// 2. It has the @list property.
|
|
16730
|
-
|
|
16730
|
+
types2.isObject(v2) && "@list" in v2
|
|
16731
16731
|
);
|
|
16732
16732
|
api.isGraph = (v2) => {
|
|
16733
|
-
return
|
|
16733
|
+
return types2.isObject(v2) && "@graph" in v2 && Object.keys(v2).filter((key3) => key3 !== "@id" && key3 !== "@index").length === 1;
|
|
16734
16734
|
};
|
|
16735
16735
|
api.isSimpleGraph = (v2) => {
|
|
16736
16736
|
return api.isGraph(v2) && !("@id" in v2);
|
|
16737
16737
|
};
|
|
16738
16738
|
api.isBlankNode = (v2) => {
|
|
16739
|
-
if (
|
|
16739
|
+
if (types2.isObject(v2)) {
|
|
16740
16740
|
if ("@id" in v2) {
|
|
16741
16741
|
const id4 = v2["@id"];
|
|
16742
|
-
return !
|
|
16742
|
+
return !types2.isString(id4) || id4.indexOf("_:") === 0;
|
|
16743
16743
|
}
|
|
16744
16744
|
return Object.keys(v2).length === 0 || !("@value" in v2 || "@set" in v2 || "@list" in v2);
|
|
16745
16745
|
}
|
|
@@ -16775,7 +16775,7 @@ var PodOS = (() => {
|
|
|
16775
16775
|
"../node_modules/jsonld/lib/util.js"(exports, module3) {
|
|
16776
16776
|
"use strict";
|
|
16777
16777
|
var graphTypes = require_graphTypes();
|
|
16778
|
-
var
|
|
16778
|
+
var types2 = require_types();
|
|
16779
16779
|
var IdentifierIssuer = require_rdf_canonize().IdentifierIssuer;
|
|
16780
16780
|
var JsonLdError = require_JsonLdError();
|
|
16781
16781
|
var REGEX_BCP47 = /^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/;
|
|
@@ -16796,7 +16796,7 @@ var PodOS = (() => {
|
|
|
16796
16796
|
api.clone = function(value7) {
|
|
16797
16797
|
if (value7 && typeof value7 === "object") {
|
|
16798
16798
|
let rval;
|
|
16799
|
-
if (
|
|
16799
|
+
if (types2.isArray(value7)) {
|
|
16800
16800
|
rval = [];
|
|
16801
16801
|
for (let i = 0; i < value7.length; ++i) {
|
|
16802
16802
|
rval[i] = api.clone(value7[i]);
|
|
@@ -16811,7 +16811,7 @@ var PodOS = (() => {
|
|
|
16811
16811
|
for (const v2 of value7) {
|
|
16812
16812
|
rval.add(api.clone(v2));
|
|
16813
16813
|
}
|
|
16814
|
-
} else if (
|
|
16814
|
+
} else if (types2.isObject(value7)) {
|
|
16815
16815
|
rval = {};
|
|
16816
16816
|
for (const key3 in value7) {
|
|
16817
16817
|
rval[key3] = api.clone(value7[key3]);
|
|
@@ -16862,18 +16862,18 @@ var PodOS = (() => {
|
|
|
16862
16862
|
return rval;
|
|
16863
16863
|
};
|
|
16864
16864
|
api.validateTypeValue = (v2, isFrame) => {
|
|
16865
|
-
if (
|
|
16865
|
+
if (types2.isString(v2)) {
|
|
16866
16866
|
return;
|
|
16867
16867
|
}
|
|
16868
|
-
if (
|
|
16868
|
+
if (types2.isArray(v2) && v2.every((vv) => types2.isString(vv))) {
|
|
16869
16869
|
return;
|
|
16870
16870
|
}
|
|
16871
|
-
if (isFrame &&
|
|
16871
|
+
if (isFrame && types2.isObject(v2)) {
|
|
16872
16872
|
switch (Object.keys(v2).length) {
|
|
16873
16873
|
case 0:
|
|
16874
16874
|
return;
|
|
16875
16875
|
case 1:
|
|
16876
|
-
if ("@default" in v2 && api.asArray(v2["@default"]).every((vv) =>
|
|
16876
|
+
if ("@default" in v2 && api.asArray(v2["@default"]).every((vv) => types2.isString(vv))) {
|
|
16877
16877
|
return;
|
|
16878
16878
|
}
|
|
16879
16879
|
}
|
|
@@ -16887,7 +16887,7 @@ var PodOS = (() => {
|
|
|
16887
16887
|
api.hasProperty = (subject8, property4) => {
|
|
16888
16888
|
if (subject8.hasOwnProperty(property4)) {
|
|
16889
16889
|
const value7 = subject8[property4];
|
|
16890
|
-
return !
|
|
16890
|
+
return !types2.isArray(value7) || value7.length > 0;
|
|
16891
16891
|
}
|
|
16892
16892
|
return false;
|
|
16893
16893
|
};
|
|
@@ -16895,7 +16895,7 @@ var PodOS = (() => {
|
|
|
16895
16895
|
if (api.hasProperty(subject8, property4)) {
|
|
16896
16896
|
let val = subject8[property4];
|
|
16897
16897
|
const isList = graphTypes.isList(val);
|
|
16898
|
-
if (
|
|
16898
|
+
if (types2.isArray(val) || isList) {
|
|
16899
16899
|
if (isList) {
|
|
16900
16900
|
val = val["@list"];
|
|
16901
16901
|
}
|
|
@@ -16904,7 +16904,7 @@ var PodOS = (() => {
|
|
|
16904
16904
|
return true;
|
|
16905
16905
|
}
|
|
16906
16906
|
}
|
|
16907
|
-
} else if (!
|
|
16907
|
+
} else if (!types2.isArray(value7)) {
|
|
16908
16908
|
return api.compareValues(value7, val);
|
|
16909
16909
|
}
|
|
16910
16910
|
}
|
|
@@ -16926,7 +16926,7 @@ var PodOS = (() => {
|
|
|
16926
16926
|
}
|
|
16927
16927
|
if (options.valueIsArray) {
|
|
16928
16928
|
subject8[property4] = value7;
|
|
16929
|
-
} else if (
|
|
16929
|
+
} else if (types2.isArray(value7)) {
|
|
16930
16930
|
if (value7.length === 0 && options.propertyIsArray && !subject8.hasOwnProperty(property4)) {
|
|
16931
16931
|
subject8[property4] = [];
|
|
16932
16932
|
}
|
|
@@ -16939,7 +16939,7 @@ var PodOS = (() => {
|
|
|
16939
16939
|
}
|
|
16940
16940
|
} else if (subject8.hasOwnProperty(property4)) {
|
|
16941
16941
|
const hasValue4 = !options.allowDuplicate && api.hasValue(subject8, property4, value7);
|
|
16942
|
-
if (!
|
|
16942
|
+
if (!types2.isArray(subject8[property4]) && (!hasValue4 || options.propertyIsArray)) {
|
|
16943
16943
|
subject8[property4] = [subject8[property4]];
|
|
16944
16944
|
}
|
|
16945
16945
|
if (!hasValue4) {
|
|
@@ -16985,7 +16985,7 @@ var PodOS = (() => {
|
|
|
16985
16985
|
if (graphTypes.isValue(v1) && graphTypes.isValue(v2) && v1["@value"] === v2["@value"] && v1["@type"] === v2["@type"] && v1["@language"] === v2["@language"] && v1["@index"] === v2["@index"]) {
|
|
16986
16986
|
return true;
|
|
16987
16987
|
}
|
|
16988
|
-
if (
|
|
16988
|
+
if (types2.isObject(v1) && "@id" in v1 && types2.isObject(v2) && "@id" in v2) {
|
|
16989
16989
|
return v1["@id"] === v2["@id"];
|
|
16990
16990
|
}
|
|
16991
16991
|
return false;
|
|
@@ -17003,13 +17003,13 @@ var PodOS = (() => {
|
|
|
17003
17003
|
return a < b ? -1 : 1;
|
|
17004
17004
|
};
|
|
17005
17005
|
function _labelBlankNodes(issuer2, element2) {
|
|
17006
|
-
if (
|
|
17006
|
+
if (types2.isArray(element2)) {
|
|
17007
17007
|
for (let i = 0; i < element2.length; ++i) {
|
|
17008
17008
|
element2[i] = _labelBlankNodes(issuer2, element2[i]);
|
|
17009
17009
|
}
|
|
17010
17010
|
} else if (graphTypes.isList(element2)) {
|
|
17011
17011
|
element2["@list"] = _labelBlankNodes(issuer2, element2["@list"]);
|
|
17012
|
-
} else if (
|
|
17012
|
+
} else if (types2.isObject(element2)) {
|
|
17013
17013
|
if (graphTypes.isBlankNode(element2)) {
|
|
17014
17014
|
element2["@id"] = issuer2.getId(element2["@id"]);
|
|
17015
17015
|
}
|
|
@@ -17094,7 +17094,7 @@ var PodOS = (() => {
|
|
|
17094
17094
|
var require_url = __commonJS({
|
|
17095
17095
|
"../node_modules/jsonld/lib/url.js"(exports, module3) {
|
|
17096
17096
|
"use strict";
|
|
17097
|
-
var
|
|
17097
|
+
var types2 = require_types();
|
|
17098
17098
|
var api = {};
|
|
17099
17099
|
module3.exports = api;
|
|
17100
17100
|
api.parsers = {
|
|
@@ -17155,7 +17155,7 @@ var PodOS = (() => {
|
|
|
17155
17155
|
if (api.isAbsolute(iri)) {
|
|
17156
17156
|
return iri;
|
|
17157
17157
|
}
|
|
17158
|
-
if (!base2 ||
|
|
17158
|
+
if (!base2 || types2.isString(base2)) {
|
|
17159
17159
|
base2 = api.parse(base2 || "");
|
|
17160
17160
|
}
|
|
17161
17161
|
const rel2 = api.parse(iri);
|
|
@@ -17213,7 +17213,7 @@ var PodOS = (() => {
|
|
|
17213
17213
|
if (base2 === null) {
|
|
17214
17214
|
return iri;
|
|
17215
17215
|
}
|
|
17216
|
-
if (!base2 ||
|
|
17216
|
+
if (!base2 || types2.isString(base2)) {
|
|
17217
17217
|
base2 = api.parse(base2 || "");
|
|
17218
17218
|
}
|
|
17219
17219
|
let root = "";
|
|
@@ -17288,8 +17288,8 @@ var PodOS = (() => {
|
|
|
17288
17288
|
return output2.join("/");
|
|
17289
17289
|
};
|
|
17290
17290
|
var isAbsoluteRegex = /^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;
|
|
17291
|
-
api.isAbsolute = (v2) =>
|
|
17292
|
-
api.isRelative = (v2) =>
|
|
17291
|
+
api.isAbsolute = (v2) => types2.isString(v2) && isAbsoluteRegex.test(v2);
|
|
17292
|
+
api.isRelative = (v2) => types2.isString(v2);
|
|
17293
17293
|
}
|
|
17294
17294
|
});
|
|
17295
17295
|
|
|
@@ -19805,8 +19805,8 @@ var PodOS = (() => {
|
|
|
19805
19805
|
if (expandedProperty === "@type") {
|
|
19806
19806
|
typeKey = typeKey || key3;
|
|
19807
19807
|
const value7 = element2[key3];
|
|
19808
|
-
const
|
|
19809
|
-
for (const type5 of
|
|
19808
|
+
const types2 = Array.isArray(value7) ? value7.length > 1 ? value7.slice().sort() : value7 : [value7];
|
|
19809
|
+
for (const type5 of types2) {
|
|
19810
19810
|
const ctx = _getContextValue(typeScopedContext, type5, "@context");
|
|
19811
19811
|
if (!_isUndefined(ctx)) {
|
|
19812
19812
|
activeCtx = await _processContext({
|
|
@@ -19862,8 +19862,8 @@ var PodOS = (() => {
|
|
|
19862
19862
|
);
|
|
19863
19863
|
}
|
|
19864
19864
|
const values2 = rval["@value"] === null ? [] : _asArray(rval["@value"]);
|
|
19865
|
-
const
|
|
19866
|
-
if (_processingMode2(activeCtx, 1.1) &&
|
|
19865
|
+
const types2 = _getValues(rval, "@type");
|
|
19866
|
+
if (_processingMode2(activeCtx, 1.1) && types2.includes("@json") && types2.length === 1) {
|
|
19867
19867
|
} else if (values2.length === 0) {
|
|
19868
19868
|
if (options.eventHandler) {
|
|
19869
19869
|
_handleEvent({
|
|
@@ -19886,7 +19886,7 @@ var PodOS = (() => {
|
|
|
19886
19886
|
"jsonld.SyntaxError",
|
|
19887
19887
|
{ code: "invalid language-tagged value", element: rval }
|
|
19888
19888
|
);
|
|
19889
|
-
} else if (!
|
|
19889
|
+
} else if (!types2.every((t) => _isAbsoluteIri(t) && !(_isString(t) && t.indexOf("_:") === 0) || _isEmptyObject(t))) {
|
|
19890
19890
|
throw new JsonLdError(
|
|
19891
19891
|
'Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',
|
|
19892
19892
|
"jsonld.SyntaxError",
|
|
@@ -20705,7 +20705,7 @@ var PodOS = (() => {
|
|
|
20705
20705
|
"use strict";
|
|
20706
20706
|
var { isKeyword } = require_context();
|
|
20707
20707
|
var graphTypes = require_graphTypes();
|
|
20708
|
-
var
|
|
20708
|
+
var types2 = require_types();
|
|
20709
20709
|
var util = require_util();
|
|
20710
20710
|
var JsonLdError = require_JsonLdError();
|
|
20711
20711
|
var api = {};
|
|
@@ -20718,13 +20718,13 @@ var PodOS = (() => {
|
|
|
20718
20718
|
return api.mergeNodeMaps(graphs);
|
|
20719
20719
|
};
|
|
20720
20720
|
api.createNodeMap = (input2, graphs, graph3, issuer2, name9, list) => {
|
|
20721
|
-
if (
|
|
20721
|
+
if (types2.isArray(input2)) {
|
|
20722
20722
|
for (const node3 of input2) {
|
|
20723
20723
|
api.createNodeMap(node3, graphs, graph3, issuer2, void 0, list);
|
|
20724
20724
|
}
|
|
20725
20725
|
return;
|
|
20726
20726
|
}
|
|
20727
|
-
if (!
|
|
20727
|
+
if (!types2.isObject(input2)) {
|
|
20728
20728
|
if (list) {
|
|
20729
20729
|
list.push(input2);
|
|
20730
20730
|
}
|
|
@@ -20748,14 +20748,14 @@ var PodOS = (() => {
|
|
|
20748
20748
|
return;
|
|
20749
20749
|
}
|
|
20750
20750
|
if ("@type" in input2) {
|
|
20751
|
-
const
|
|
20752
|
-
for (const type5 of
|
|
20751
|
+
const types3 = input2["@type"];
|
|
20752
|
+
for (const type5 of types3) {
|
|
20753
20753
|
if (type5.indexOf("_:") === 0) {
|
|
20754
20754
|
issuer2.getId(type5);
|
|
20755
20755
|
}
|
|
20756
20756
|
}
|
|
20757
20757
|
}
|
|
20758
|
-
if (
|
|
20758
|
+
if (types2.isUndefined(name9)) {
|
|
20759
20759
|
name9 = graphTypes.isBlankNode(input2) ? issuer2.getId(input2["@id"]) : input2["@id"];
|
|
20760
20760
|
}
|
|
20761
20761
|
if (list) {
|
|
@@ -20955,7 +20955,7 @@ var PodOS = (() => {
|
|
|
20955
20955
|
"use strict";
|
|
20956
20956
|
var JsonLdError = require_JsonLdError();
|
|
20957
20957
|
var graphTypes = require_graphTypes();
|
|
20958
|
-
var
|
|
20958
|
+
var types2 = require_types();
|
|
20959
20959
|
var {
|
|
20960
20960
|
REGEX_BCP47,
|
|
20961
20961
|
addValue: _addValue
|
|
@@ -21071,7 +21071,7 @@ var PodOS = (() => {
|
|
|
21071
21071
|
const list = [];
|
|
21072
21072
|
const listNodes = [];
|
|
21073
21073
|
let nodeKeyCount = Object.keys(node3).length;
|
|
21074
|
-
while (property4 === RDF_REST &&
|
|
21074
|
+
while (property4 === RDF_REST && types2.isObject(referencedOnce[node3["@id"]]) && types2.isArray(node3[RDF_FIRST]) && node3[RDF_FIRST].length === 1 && types2.isArray(node3[RDF_REST]) && node3[RDF_REST].length === 1 && (nodeKeyCount === 3 || nodeKeyCount === 4 && types2.isArray(node3["@type"]) && node3["@type"].length === 1 && node3["@type"][0] === RDF_LIST)) {
|
|
21075
21075
|
list.push(node3[RDF_FIRST][0]);
|
|
21076
21076
|
listNodes.push(node3["@id"]);
|
|
21077
21077
|
usage2 = referencedOnce[node3["@id"]];
|
|
@@ -21159,7 +21159,7 @@ var PodOS = (() => {
|
|
|
21159
21159
|
} else if (rval["@value"] === "false") {
|
|
21160
21160
|
rval["@value"] = false;
|
|
21161
21161
|
}
|
|
21162
|
-
} else if (
|
|
21162
|
+
} else if (types2.isNumeric(rval["@value"])) {
|
|
21163
21163
|
if (type5 === XSD_INTEGER) {
|
|
21164
21164
|
const i = parseInt(rval["@value"], 10);
|
|
21165
21165
|
if (i.toFixed(0) === rval["@value"]) {
|
|
@@ -21238,7 +21238,7 @@ var PodOS = (() => {
|
|
|
21238
21238
|
var graphTypes = require_graphTypes();
|
|
21239
21239
|
var jsonCanonicalize = require_canonicalize();
|
|
21240
21240
|
var JsonLdError = require_JsonLdError();
|
|
21241
|
-
var
|
|
21241
|
+
var types2 = require_types();
|
|
21242
21242
|
var util = require_util();
|
|
21243
21243
|
var {
|
|
21244
21244
|
handleEvent: _handleEvent
|
|
@@ -21465,16 +21465,16 @@ var PodOS = (() => {
|
|
|
21465
21465
|
if (datatype3 === "@json") {
|
|
21466
21466
|
object8.value = jsonCanonicalize(value7);
|
|
21467
21467
|
object8.datatype.value = RDF_JSON_LITERAL;
|
|
21468
|
-
} else if (
|
|
21468
|
+
} else if (types2.isBoolean(value7)) {
|
|
21469
21469
|
object8.value = value7.toString();
|
|
21470
21470
|
object8.datatype.value = datatype3 || XSD_BOOLEAN;
|
|
21471
|
-
} else if (
|
|
21472
|
-
if (!
|
|
21471
|
+
} else if (types2.isDouble(value7) || datatype3 === XSD_DOUBLE) {
|
|
21472
|
+
if (!types2.isDouble(value7)) {
|
|
21473
21473
|
value7 = parseFloat(value7);
|
|
21474
21474
|
}
|
|
21475
21475
|
object8.value = value7.toExponential(15).replace(/(\d)0*e\+?/, "$1E");
|
|
21476
21476
|
object8.datatype.value = datatype3 || XSD_DOUBLE;
|
|
21477
|
-
} else if (
|
|
21477
|
+
} else if (types2.isNumber(value7)) {
|
|
21478
21478
|
object8.value = value7.toFixed(0);
|
|
21479
21479
|
object8.datatype.value = datatype3 || XSD_INTEGER;
|
|
21480
21480
|
} else if ("@direction" in item4 && rdfDirection === "i18n-datatype") {
|
|
@@ -21547,7 +21547,7 @@ var PodOS = (() => {
|
|
|
21547
21547
|
object8.termType = _list.termType;
|
|
21548
21548
|
object8.value = _list.value;
|
|
21549
21549
|
} else {
|
|
21550
|
-
const id4 =
|
|
21550
|
+
const id4 = types2.isObject(item4) ? item4["@id"] : item4;
|
|
21551
21551
|
object8.termType = id4.startsWith("_:") ? "BlankNode" : "NamedNode";
|
|
21552
21552
|
object8.value = id4;
|
|
21553
21553
|
}
|
|
@@ -21579,7 +21579,7 @@ var PodOS = (() => {
|
|
|
21579
21579
|
"use strict";
|
|
21580
21580
|
var { isKeyword } = require_context();
|
|
21581
21581
|
var graphTypes = require_graphTypes();
|
|
21582
|
-
var
|
|
21582
|
+
var types2 = require_types();
|
|
21583
21583
|
var util = require_util();
|
|
21584
21584
|
var url7 = require_url();
|
|
21585
21585
|
var JsonLdError = require_JsonLdError();
|
|
@@ -21679,7 +21679,7 @@ var PodOS = (() => {
|
|
|
21679
21679
|
} else {
|
|
21680
21680
|
subframe = frame["@graph"][0];
|
|
21681
21681
|
recurse = !(id4 === "@merged" || id4 === "@default");
|
|
21682
|
-
if (!
|
|
21682
|
+
if (!types2.isObject(subframe)) {
|
|
21683
21683
|
subframe = {};
|
|
21684
21684
|
}
|
|
21685
21685
|
}
|
|
@@ -21757,7 +21757,7 @@ var PodOS = (() => {
|
|
|
21757
21757
|
}
|
|
21758
21758
|
for (const prop of Object.keys(frame).sort()) {
|
|
21759
21759
|
if (prop === "@type") {
|
|
21760
|
-
if (!
|
|
21760
|
+
if (!types2.isObject(frame[prop][0]) || !("@default" in frame[prop][0])) {
|
|
21761
21761
|
continue;
|
|
21762
21762
|
}
|
|
21763
21763
|
} else if (isKeyword(prop)) {
|
|
@@ -21770,7 +21770,7 @@ var PodOS = (() => {
|
|
|
21770
21770
|
if ("@default" in next4) {
|
|
21771
21771
|
preserve = util.clone(next4["@default"]);
|
|
21772
21772
|
}
|
|
21773
|
-
if (!
|
|
21773
|
+
if (!types2.isArray(preserve)) {
|
|
21774
21774
|
preserve = [preserve];
|
|
21775
21775
|
}
|
|
21776
21776
|
output2[prop] = [{ "@preserve": preserve }];
|
|
@@ -21803,14 +21803,14 @@ var PodOS = (() => {
|
|
|
21803
21803
|
}
|
|
21804
21804
|
};
|
|
21805
21805
|
api.cleanupNull = (input2, options) => {
|
|
21806
|
-
if (
|
|
21806
|
+
if (types2.isArray(input2)) {
|
|
21807
21807
|
const noNulls = input2.map((v2) => api.cleanupNull(v2, options));
|
|
21808
21808
|
return noNulls.filter((v2) => v2);
|
|
21809
21809
|
}
|
|
21810
21810
|
if (input2 === "@null") {
|
|
21811
21811
|
return null;
|
|
21812
21812
|
}
|
|
21813
|
-
if (
|
|
21813
|
+
if (types2.isObject(input2)) {
|
|
21814
21814
|
if ("@id" in input2) {
|
|
21815
21815
|
const id4 = input2["@id"];
|
|
21816
21816
|
if (options.link.hasOwnProperty(id4)) {
|
|
@@ -21866,7 +21866,7 @@ var PodOS = (() => {
|
|
|
21866
21866
|
return rval;
|
|
21867
21867
|
}
|
|
21868
21868
|
function _validateFrame(frame) {
|
|
21869
|
-
if (!
|
|
21869
|
+
if (!types2.isArray(frame) || frame.length !== 1 || !types2.isObject(frame[0])) {
|
|
21870
21870
|
throw new JsonLdError(
|
|
21871
21871
|
"Invalid JSON-LD syntax; a JSON-LD frame must be a single object.",
|
|
21872
21872
|
"jsonld.SyntaxError",
|
|
@@ -21875,7 +21875,7 @@ var PodOS = (() => {
|
|
|
21875
21875
|
}
|
|
21876
21876
|
if ("@id" in frame[0]) {
|
|
21877
21877
|
for (const id4 of util.asArray(frame[0]["@id"])) {
|
|
21878
|
-
if (!(
|
|
21878
|
+
if (!(types2.isObject(id4) || url7.isAbsolute(id4)) || types2.isString(id4) && id4.indexOf("_:") === 0) {
|
|
21879
21879
|
throw new JsonLdError(
|
|
21880
21880
|
"Invalid JSON-LD syntax; invalid @id in frame.",
|
|
21881
21881
|
"jsonld.SyntaxError",
|
|
@@ -21886,7 +21886,7 @@ var PodOS = (() => {
|
|
|
21886
21886
|
}
|
|
21887
21887
|
if ("@type" in frame[0]) {
|
|
21888
21888
|
for (const type5 of util.asArray(frame[0]["@type"])) {
|
|
21889
|
-
if (!(
|
|
21889
|
+
if (!(types2.isObject(type5) || url7.isAbsolute(type5) || type5 === "@json") || types2.isString(type5) && type5.indexOf("_:") === 0) {
|
|
21890
21890
|
throw new JsonLdError(
|
|
21891
21891
|
"Invalid JSON-LD syntax; invalid @type in frame.",
|
|
21892
21892
|
"jsonld.SyntaxError",
|
|
@@ -21914,7 +21914,7 @@ var PodOS = (() => {
|
|
|
21914
21914
|
const nodeValues = util.getValues(subject8, key3);
|
|
21915
21915
|
const isEmpty = util.getValues(frame, key3).length === 0;
|
|
21916
21916
|
if (key3 === "@id") {
|
|
21917
|
-
if (
|
|
21917
|
+
if (types2.isEmptyObject(frame["@id"][0] || {})) {
|
|
21918
21918
|
matchThis = true;
|
|
21919
21919
|
} else if (frame["@id"].length >= 0) {
|
|
21920
21920
|
matchThis = frame["@id"].includes(nodeValues[0]);
|
|
@@ -21929,11 +21929,11 @@ var PodOS = (() => {
|
|
|
21929
21929
|
return false;
|
|
21930
21930
|
}
|
|
21931
21931
|
matchThis = true;
|
|
21932
|
-
} else if (frame["@type"].length === 1 &&
|
|
21932
|
+
} else if (frame["@type"].length === 1 && types2.isEmptyObject(frame["@type"][0])) {
|
|
21933
21933
|
matchThis = nodeValues.length > 0;
|
|
21934
21934
|
} else {
|
|
21935
21935
|
for (const type5 of frame["@type"]) {
|
|
21936
|
-
if (
|
|
21936
|
+
if (types2.isObject(type5) && "@default" in type5) {
|
|
21937
21937
|
matchThis = true;
|
|
21938
21938
|
} else {
|
|
21939
21939
|
matchThis = matchThis || nodeValues.some((tt) => tt === type5);
|
|
@@ -21984,7 +21984,7 @@ var PodOS = (() => {
|
|
|
21984
21984
|
matchThis = nodeValues.some((nv) => _valueMatch(thisFrame, nv));
|
|
21985
21985
|
} else if (graphTypes.isSubjectReference(thisFrame)) {
|
|
21986
21986
|
matchThis = nodeValues.some((nv) => _nodeMatch(state2, thisFrame, nv, flags3));
|
|
21987
|
-
} else if (
|
|
21987
|
+
} else if (types2.isObject(thisFrame)) {
|
|
21988
21988
|
matchThis = nodeValues.length > 0;
|
|
21989
21989
|
} else {
|
|
21990
21990
|
matchThis = false;
|
|
@@ -22004,7 +22004,7 @@ var PodOS = (() => {
|
|
|
22004
22004
|
const parent4 = embed.parent;
|
|
22005
22005
|
const property4 = embed.property;
|
|
22006
22006
|
const subject8 = { "@id": id4 };
|
|
22007
|
-
if (
|
|
22007
|
+
if (types2.isArray(parent4)) {
|
|
22008
22008
|
for (let i = 0; i < parent4.length; ++i) {
|
|
22009
22009
|
if (util.compareValues(parent4[i], subject8)) {
|
|
22010
22010
|
parent4[i] = subject8;
|
|
@@ -22012,14 +22012,14 @@ var PodOS = (() => {
|
|
|
22012
22012
|
}
|
|
22013
22013
|
}
|
|
22014
22014
|
} else {
|
|
22015
|
-
const useArray =
|
|
22015
|
+
const useArray = types2.isArray(parent4[property4]);
|
|
22016
22016
|
util.removeValue(parent4, property4, subject8, { propertyIsArray: useArray });
|
|
22017
22017
|
util.addValue(parent4, property4, subject8, { propertyIsArray: useArray });
|
|
22018
22018
|
}
|
|
22019
22019
|
const removeDependents = (id5) => {
|
|
22020
22020
|
const ids = Object.keys(embeds);
|
|
22021
22021
|
for (const next4 of ids) {
|
|
22022
|
-
if (next4 in embeds &&
|
|
22022
|
+
if (next4 in embeds && types2.isObject(embeds[next4].parent) && embeds[next4].parent["@id"] === id5) {
|
|
22023
22023
|
delete embeds[next4];
|
|
22024
22024
|
removeDependents(next4);
|
|
22025
22025
|
}
|
|
@@ -22028,10 +22028,10 @@ var PodOS = (() => {
|
|
|
22028
22028
|
removeDependents(id4);
|
|
22029
22029
|
}
|
|
22030
22030
|
function _cleanupPreserve(input2, options) {
|
|
22031
|
-
if (
|
|
22031
|
+
if (types2.isArray(input2)) {
|
|
22032
22032
|
return input2.map((value7) => _cleanupPreserve(value7, options));
|
|
22033
22033
|
}
|
|
22034
|
-
if (
|
|
22034
|
+
if (types2.isObject(input2)) {
|
|
22035
22035
|
if ("@preserve" in input2) {
|
|
22036
22036
|
return input2["@preserve"][0];
|
|
22037
22037
|
}
|
|
@@ -22065,7 +22065,7 @@ var PodOS = (() => {
|
|
|
22065
22065
|
return input2;
|
|
22066
22066
|
}
|
|
22067
22067
|
function _addFrameOutput(parent4, property4, output2) {
|
|
22068
|
-
if (
|
|
22068
|
+
if (types2.isObject(parent4)) {
|
|
22069
22069
|
util.addValue(parent4, property4, output2, { propertyIsArray: true });
|
|
22070
22070
|
} else {
|
|
22071
22071
|
parent4.push(output2);
|
|
@@ -22082,19 +22082,19 @@ var PodOS = (() => {
|
|
|
22082
22082
|
const v1 = value7["@value"];
|
|
22083
22083
|
const t1 = value7["@type"];
|
|
22084
22084
|
const l1 = value7["@language"];
|
|
22085
|
-
const v2 = pattern7["@value"] ?
|
|
22086
|
-
const t2 = pattern7["@type"] ?
|
|
22087
|
-
const l2 = pattern7["@language"] ?
|
|
22085
|
+
const v2 = pattern7["@value"] ? types2.isArray(pattern7["@value"]) ? pattern7["@value"] : [pattern7["@value"]] : [];
|
|
22086
|
+
const t2 = pattern7["@type"] ? types2.isArray(pattern7["@type"]) ? pattern7["@type"] : [pattern7["@type"]] : [];
|
|
22087
|
+
const l2 = pattern7["@language"] ? types2.isArray(pattern7["@language"]) ? pattern7["@language"] : [pattern7["@language"]] : [];
|
|
22088
22088
|
if (v2.length === 0 && t2.length === 0 && l2.length === 0) {
|
|
22089
22089
|
return true;
|
|
22090
22090
|
}
|
|
22091
|
-
if (!(v2.includes(v1) ||
|
|
22091
|
+
if (!(v2.includes(v1) || types2.isEmptyObject(v2[0]))) {
|
|
22092
22092
|
return false;
|
|
22093
22093
|
}
|
|
22094
|
-
if (!(!t1 && t2.length === 0 || t2.includes(t1) || t1 &&
|
|
22094
|
+
if (!(!t1 && t2.length === 0 || t2.includes(t1) || t1 && types2.isEmptyObject(t2[0]))) {
|
|
22095
22095
|
return false;
|
|
22096
22096
|
}
|
|
22097
|
-
if (!(!l1 && l2.length === 0 || l2.includes(l1) || l1 &&
|
|
22097
|
+
if (!(!l1 && l2.length === 0 || l2.includes(l1) || l1 && types2.isEmptyObject(l2[0]))) {
|
|
22098
22098
|
return false;
|
|
22099
22099
|
}
|
|
22100
22100
|
return true;
|
|
@@ -22237,12 +22237,12 @@ var PodOS = (() => {
|
|
|
22237
22237
|
}
|
|
22238
22238
|
options.link[element2["@id"]].push({ expanded: element2, compacted: rval });
|
|
22239
22239
|
}
|
|
22240
|
-
let
|
|
22241
|
-
if (
|
|
22242
|
-
|
|
22240
|
+
let types2 = element2["@type"] || [];
|
|
22241
|
+
if (types2.length > 1) {
|
|
22242
|
+
types2 = Array.from(types2).sort();
|
|
22243
22243
|
}
|
|
22244
22244
|
const typeContext = activeCtx;
|
|
22245
|
-
for (const type5 of
|
|
22245
|
+
for (const type5 of types2) {
|
|
22246
22246
|
const compactedType = api.compactIri(
|
|
22247
22247
|
{ activeCtx: typeContext, iri: type5, relativeTo: { vocab: true } }
|
|
22248
22248
|
);
|
|
@@ -22594,17 +22594,17 @@ var PodOS = (() => {
|
|
|
22594
22594
|
iri: "@type",
|
|
22595
22595
|
relativeTo: { vocab: true }
|
|
22596
22596
|
});
|
|
22597
|
-
let
|
|
22598
|
-
[key3, ...
|
|
22599
|
-
switch (
|
|
22597
|
+
let types3;
|
|
22598
|
+
[key3, ...types3] = _asArray(compactedItem[typeKey] || []);
|
|
22599
|
+
switch (types3.length) {
|
|
22600
22600
|
case 0:
|
|
22601
22601
|
delete compactedItem[typeKey];
|
|
22602
22602
|
break;
|
|
22603
22603
|
case 1:
|
|
22604
|
-
compactedItem[typeKey] =
|
|
22604
|
+
compactedItem[typeKey] = types3[0];
|
|
22605
22605
|
break;
|
|
22606
22606
|
default:
|
|
22607
|
-
compactedItem[typeKey] =
|
|
22607
|
+
compactedItem[typeKey] = types3;
|
|
22608
22608
|
break;
|
|
22609
22609
|
}
|
|
22610
22610
|
if (Object.keys(compactedItem).length === 1 && "@id" in expandedItem) {
|
|
@@ -36188,6 +36188,465 @@ _:patch
|
|
|
36188
36188
|
};
|
|
36189
36189
|
var fromThrowable = Result.fromThrowable;
|
|
36190
36190
|
|
|
36191
|
+
// ../node_modules/mime/dist/types/standard.js
|
|
36192
|
+
var types = {
|
|
36193
|
+
"application/andrew-inset": ["ez"],
|
|
36194
|
+
"application/appinstaller": ["appinstaller"],
|
|
36195
|
+
"application/applixware": ["aw"],
|
|
36196
|
+
"application/appx": ["appx"],
|
|
36197
|
+
"application/appxbundle": ["appxbundle"],
|
|
36198
|
+
"application/atom+xml": ["atom"],
|
|
36199
|
+
"application/atomcat+xml": ["atomcat"],
|
|
36200
|
+
"application/atomdeleted+xml": ["atomdeleted"],
|
|
36201
|
+
"application/atomsvc+xml": ["atomsvc"],
|
|
36202
|
+
"application/atsc-dwd+xml": ["dwd"],
|
|
36203
|
+
"application/atsc-held+xml": ["held"],
|
|
36204
|
+
"application/atsc-rsat+xml": ["rsat"],
|
|
36205
|
+
"application/automationml-aml+xml": ["aml"],
|
|
36206
|
+
"application/automationml-amlx+zip": ["amlx"],
|
|
36207
|
+
"application/bdoc": ["bdoc"],
|
|
36208
|
+
"application/calendar+xml": ["xcs"],
|
|
36209
|
+
"application/ccxml+xml": ["ccxml"],
|
|
36210
|
+
"application/cdfx+xml": ["cdfx"],
|
|
36211
|
+
"application/cdmi-capability": ["cdmia"],
|
|
36212
|
+
"application/cdmi-container": ["cdmic"],
|
|
36213
|
+
"application/cdmi-domain": ["cdmid"],
|
|
36214
|
+
"application/cdmi-object": ["cdmio"],
|
|
36215
|
+
"application/cdmi-queue": ["cdmiq"],
|
|
36216
|
+
"application/cpl+xml": ["cpl"],
|
|
36217
|
+
"application/cu-seeme": ["cu"],
|
|
36218
|
+
"application/cwl": ["cwl"],
|
|
36219
|
+
"application/dash+xml": ["mpd"],
|
|
36220
|
+
"application/dash-patch+xml": ["mpp"],
|
|
36221
|
+
"application/davmount+xml": ["davmount"],
|
|
36222
|
+
"application/dicom": ["dcm"],
|
|
36223
|
+
"application/docbook+xml": ["dbk"],
|
|
36224
|
+
"application/dssc+der": ["dssc"],
|
|
36225
|
+
"application/dssc+xml": ["xdssc"],
|
|
36226
|
+
"application/ecmascript": ["ecma"],
|
|
36227
|
+
"application/emma+xml": ["emma"],
|
|
36228
|
+
"application/emotionml+xml": ["emotionml"],
|
|
36229
|
+
"application/epub+zip": ["epub"],
|
|
36230
|
+
"application/exi": ["exi"],
|
|
36231
|
+
"application/express": ["exp"],
|
|
36232
|
+
"application/fdf": ["fdf"],
|
|
36233
|
+
"application/fdt+xml": ["fdt"],
|
|
36234
|
+
"application/font-tdpfr": ["pfr"],
|
|
36235
|
+
"application/geo+json": ["geojson"],
|
|
36236
|
+
"application/gml+xml": ["gml"],
|
|
36237
|
+
"application/gpx+xml": ["gpx"],
|
|
36238
|
+
"application/gxf": ["gxf"],
|
|
36239
|
+
"application/gzip": ["gz"],
|
|
36240
|
+
"application/hjson": ["hjson"],
|
|
36241
|
+
"application/hyperstudio": ["stk"],
|
|
36242
|
+
"application/inkml+xml": ["ink", "inkml"],
|
|
36243
|
+
"application/ipfix": ["ipfix"],
|
|
36244
|
+
"application/its+xml": ["its"],
|
|
36245
|
+
"application/java-archive": ["jar", "war", "ear"],
|
|
36246
|
+
"application/java-serialized-object": ["ser"],
|
|
36247
|
+
"application/java-vm": ["class"],
|
|
36248
|
+
"application/javascript": ["*js"],
|
|
36249
|
+
"application/json": ["json", "map"],
|
|
36250
|
+
"application/json5": ["json5"],
|
|
36251
|
+
"application/jsonml+json": ["jsonml"],
|
|
36252
|
+
"application/ld+json": ["jsonld"],
|
|
36253
|
+
"application/lgr+xml": ["lgr"],
|
|
36254
|
+
"application/lost+xml": ["lostxml"],
|
|
36255
|
+
"application/mac-binhex40": ["hqx"],
|
|
36256
|
+
"application/mac-compactpro": ["cpt"],
|
|
36257
|
+
"application/mads+xml": ["mads"],
|
|
36258
|
+
"application/manifest+json": ["webmanifest"],
|
|
36259
|
+
"application/marc": ["mrc"],
|
|
36260
|
+
"application/marcxml+xml": ["mrcx"],
|
|
36261
|
+
"application/mathematica": ["ma", "nb", "mb"],
|
|
36262
|
+
"application/mathml+xml": ["mathml"],
|
|
36263
|
+
"application/mbox": ["mbox"],
|
|
36264
|
+
"application/media-policy-dataset+xml": ["mpf"],
|
|
36265
|
+
"application/mediaservercontrol+xml": ["mscml"],
|
|
36266
|
+
"application/metalink+xml": ["metalink"],
|
|
36267
|
+
"application/metalink4+xml": ["meta4"],
|
|
36268
|
+
"application/mets+xml": ["mets"],
|
|
36269
|
+
"application/mmt-aei+xml": ["maei"],
|
|
36270
|
+
"application/mmt-usd+xml": ["musd"],
|
|
36271
|
+
"application/mods+xml": ["mods"],
|
|
36272
|
+
"application/mp21": ["m21", "mp21"],
|
|
36273
|
+
"application/mp4": ["*mp4", "*mpg4", "mp4s", "m4p"],
|
|
36274
|
+
"application/msix": ["msix"],
|
|
36275
|
+
"application/msixbundle": ["msixbundle"],
|
|
36276
|
+
"application/msword": ["doc", "dot"],
|
|
36277
|
+
"application/mxf": ["mxf"],
|
|
36278
|
+
"application/n-quads": ["nq"],
|
|
36279
|
+
"application/n-triples": ["nt"],
|
|
36280
|
+
"application/node": ["cjs"],
|
|
36281
|
+
"application/octet-stream": [
|
|
36282
|
+
"bin",
|
|
36283
|
+
"dms",
|
|
36284
|
+
"lrf",
|
|
36285
|
+
"mar",
|
|
36286
|
+
"so",
|
|
36287
|
+
"dist",
|
|
36288
|
+
"distz",
|
|
36289
|
+
"pkg",
|
|
36290
|
+
"bpk",
|
|
36291
|
+
"dump",
|
|
36292
|
+
"elc",
|
|
36293
|
+
"deploy",
|
|
36294
|
+
"exe",
|
|
36295
|
+
"dll",
|
|
36296
|
+
"deb",
|
|
36297
|
+
"dmg",
|
|
36298
|
+
"iso",
|
|
36299
|
+
"img",
|
|
36300
|
+
"msi",
|
|
36301
|
+
"msp",
|
|
36302
|
+
"msm",
|
|
36303
|
+
"buffer"
|
|
36304
|
+
],
|
|
36305
|
+
"application/oda": ["oda"],
|
|
36306
|
+
"application/oebps-package+xml": ["opf"],
|
|
36307
|
+
"application/ogg": ["ogx"],
|
|
36308
|
+
"application/omdoc+xml": ["omdoc"],
|
|
36309
|
+
"application/onenote": [
|
|
36310
|
+
"onetoc",
|
|
36311
|
+
"onetoc2",
|
|
36312
|
+
"onetmp",
|
|
36313
|
+
"onepkg",
|
|
36314
|
+
"one",
|
|
36315
|
+
"onea"
|
|
36316
|
+
],
|
|
36317
|
+
"application/oxps": ["oxps"],
|
|
36318
|
+
"application/p2p-overlay+xml": ["relo"],
|
|
36319
|
+
"application/patch-ops-error+xml": ["xer"],
|
|
36320
|
+
"application/pdf": ["pdf"],
|
|
36321
|
+
"application/pgp-encrypted": ["pgp"],
|
|
36322
|
+
"application/pgp-keys": ["asc"],
|
|
36323
|
+
"application/pgp-signature": ["sig", "*asc"],
|
|
36324
|
+
"application/pics-rules": ["prf"],
|
|
36325
|
+
"application/pkcs10": ["p10"],
|
|
36326
|
+
"application/pkcs7-mime": ["p7m", "p7c"],
|
|
36327
|
+
"application/pkcs7-signature": ["p7s"],
|
|
36328
|
+
"application/pkcs8": ["p8"],
|
|
36329
|
+
"application/pkix-attr-cert": ["ac"],
|
|
36330
|
+
"application/pkix-cert": ["cer"],
|
|
36331
|
+
"application/pkix-crl": ["crl"],
|
|
36332
|
+
"application/pkix-pkipath": ["pkipath"],
|
|
36333
|
+
"application/pkixcmp": ["pki"],
|
|
36334
|
+
"application/pls+xml": ["pls"],
|
|
36335
|
+
"application/postscript": ["ai", "eps", "ps"],
|
|
36336
|
+
"application/provenance+xml": ["provx"],
|
|
36337
|
+
"application/pskc+xml": ["pskcxml"],
|
|
36338
|
+
"application/raml+yaml": ["raml"],
|
|
36339
|
+
"application/rdf+xml": ["rdf", "owl"],
|
|
36340
|
+
"application/reginfo+xml": ["rif"],
|
|
36341
|
+
"application/relax-ng-compact-syntax": ["rnc"],
|
|
36342
|
+
"application/resource-lists+xml": ["rl"],
|
|
36343
|
+
"application/resource-lists-diff+xml": ["rld"],
|
|
36344
|
+
"application/rls-services+xml": ["rs"],
|
|
36345
|
+
"application/route-apd+xml": ["rapd"],
|
|
36346
|
+
"application/route-s-tsid+xml": ["sls"],
|
|
36347
|
+
"application/route-usd+xml": ["rusd"],
|
|
36348
|
+
"application/rpki-ghostbusters": ["gbr"],
|
|
36349
|
+
"application/rpki-manifest": ["mft"],
|
|
36350
|
+
"application/rpki-roa": ["roa"],
|
|
36351
|
+
"application/rsd+xml": ["rsd"],
|
|
36352
|
+
"application/rss+xml": ["rss"],
|
|
36353
|
+
"application/rtf": ["rtf"],
|
|
36354
|
+
"application/sbml+xml": ["sbml"],
|
|
36355
|
+
"application/scvp-cv-request": ["scq"],
|
|
36356
|
+
"application/scvp-cv-response": ["scs"],
|
|
36357
|
+
"application/scvp-vp-request": ["spq"],
|
|
36358
|
+
"application/scvp-vp-response": ["spp"],
|
|
36359
|
+
"application/sdp": ["sdp"],
|
|
36360
|
+
"application/senml+xml": ["senmlx"],
|
|
36361
|
+
"application/sensml+xml": ["sensmlx"],
|
|
36362
|
+
"application/set-payment-initiation": ["setpay"],
|
|
36363
|
+
"application/set-registration-initiation": ["setreg"],
|
|
36364
|
+
"application/shf+xml": ["shf"],
|
|
36365
|
+
"application/sieve": ["siv", "sieve"],
|
|
36366
|
+
"application/smil+xml": ["smi", "smil"],
|
|
36367
|
+
"application/sparql-query": ["rq"],
|
|
36368
|
+
"application/sparql-results+xml": ["srx"],
|
|
36369
|
+
"application/sql": ["sql"],
|
|
36370
|
+
"application/srgs": ["gram"],
|
|
36371
|
+
"application/srgs+xml": ["grxml"],
|
|
36372
|
+
"application/sru+xml": ["sru"],
|
|
36373
|
+
"application/ssdl+xml": ["ssdl"],
|
|
36374
|
+
"application/ssml+xml": ["ssml"],
|
|
36375
|
+
"application/swid+xml": ["swidtag"],
|
|
36376
|
+
"application/tei+xml": ["tei", "teicorpus"],
|
|
36377
|
+
"application/thraud+xml": ["tfi"],
|
|
36378
|
+
"application/timestamped-data": ["tsd"],
|
|
36379
|
+
"application/toml": ["toml"],
|
|
36380
|
+
"application/trig": ["trig"],
|
|
36381
|
+
"application/ttml+xml": ["ttml"],
|
|
36382
|
+
"application/ubjson": ["ubj"],
|
|
36383
|
+
"application/urc-ressheet+xml": ["rsheet"],
|
|
36384
|
+
"application/urc-targetdesc+xml": ["td"],
|
|
36385
|
+
"application/voicexml+xml": ["vxml"],
|
|
36386
|
+
"application/wasm": ["wasm"],
|
|
36387
|
+
"application/watcherinfo+xml": ["wif"],
|
|
36388
|
+
"application/widget": ["wgt"],
|
|
36389
|
+
"application/winhlp": ["hlp"],
|
|
36390
|
+
"application/wsdl+xml": ["wsdl"],
|
|
36391
|
+
"application/wspolicy+xml": ["wspolicy"],
|
|
36392
|
+
"application/xaml+xml": ["xaml"],
|
|
36393
|
+
"application/xcap-att+xml": ["xav"],
|
|
36394
|
+
"application/xcap-caps+xml": ["xca"],
|
|
36395
|
+
"application/xcap-diff+xml": ["xdf"],
|
|
36396
|
+
"application/xcap-el+xml": ["xel"],
|
|
36397
|
+
"application/xcap-ns+xml": ["xns"],
|
|
36398
|
+
"application/xenc+xml": ["xenc"],
|
|
36399
|
+
"application/xfdf": ["xfdf"],
|
|
36400
|
+
"application/xhtml+xml": ["xhtml", "xht"],
|
|
36401
|
+
"application/xliff+xml": ["xlf"],
|
|
36402
|
+
"application/xml": ["xml", "xsl", "xsd", "rng"],
|
|
36403
|
+
"application/xml-dtd": ["dtd"],
|
|
36404
|
+
"application/xop+xml": ["xop"],
|
|
36405
|
+
"application/xproc+xml": ["xpl"],
|
|
36406
|
+
"application/xslt+xml": ["*xsl", "xslt"],
|
|
36407
|
+
"application/xspf+xml": ["xspf"],
|
|
36408
|
+
"application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"],
|
|
36409
|
+
"application/yang": ["yang"],
|
|
36410
|
+
"application/yin+xml": ["yin"],
|
|
36411
|
+
"application/zip": ["zip"],
|
|
36412
|
+
"application/zip+dotlottie": ["lottie"],
|
|
36413
|
+
"audio/3gpp": ["*3gpp"],
|
|
36414
|
+
"audio/aac": ["adts", "aac"],
|
|
36415
|
+
"audio/adpcm": ["adp"],
|
|
36416
|
+
"audio/amr": ["amr"],
|
|
36417
|
+
"audio/basic": ["au", "snd"],
|
|
36418
|
+
"audio/midi": ["mid", "midi", "kar", "rmi"],
|
|
36419
|
+
"audio/mobile-xmf": ["mxmf"],
|
|
36420
|
+
"audio/mp3": ["*mp3"],
|
|
36421
|
+
"audio/mp4": ["m4a", "mp4a", "m4b"],
|
|
36422
|
+
"audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"],
|
|
36423
|
+
"audio/ogg": ["oga", "ogg", "spx", "opus"],
|
|
36424
|
+
"audio/s3m": ["s3m"],
|
|
36425
|
+
"audio/silk": ["sil"],
|
|
36426
|
+
"audio/wav": ["wav"],
|
|
36427
|
+
"audio/wave": ["*wav"],
|
|
36428
|
+
"audio/webm": ["weba"],
|
|
36429
|
+
"audio/xm": ["xm"],
|
|
36430
|
+
"font/collection": ["ttc"],
|
|
36431
|
+
"font/otf": ["otf"],
|
|
36432
|
+
"font/ttf": ["ttf"],
|
|
36433
|
+
"font/woff": ["woff"],
|
|
36434
|
+
"font/woff2": ["woff2"],
|
|
36435
|
+
"image/aces": ["exr"],
|
|
36436
|
+
"image/apng": ["apng"],
|
|
36437
|
+
"image/avci": ["avci"],
|
|
36438
|
+
"image/avcs": ["avcs"],
|
|
36439
|
+
"image/avif": ["avif"],
|
|
36440
|
+
"image/bmp": ["bmp", "dib"],
|
|
36441
|
+
"image/cgm": ["cgm"],
|
|
36442
|
+
"image/dicom-rle": ["drle"],
|
|
36443
|
+
"image/dpx": ["dpx"],
|
|
36444
|
+
"image/emf": ["emf"],
|
|
36445
|
+
"image/fits": ["fits"],
|
|
36446
|
+
"image/g3fax": ["g3"],
|
|
36447
|
+
"image/gif": ["gif"],
|
|
36448
|
+
"image/heic": ["heic"],
|
|
36449
|
+
"image/heic-sequence": ["heics"],
|
|
36450
|
+
"image/heif": ["heif"],
|
|
36451
|
+
"image/heif-sequence": ["heifs"],
|
|
36452
|
+
"image/hej2k": ["hej2"],
|
|
36453
|
+
"image/ief": ["ief"],
|
|
36454
|
+
"image/jaii": ["jaii"],
|
|
36455
|
+
"image/jais": ["jais"],
|
|
36456
|
+
"image/jls": ["jls"],
|
|
36457
|
+
"image/jp2": ["jp2", "jpg2"],
|
|
36458
|
+
"image/jpeg": ["jpg", "jpeg", "jpe"],
|
|
36459
|
+
"image/jph": ["jph"],
|
|
36460
|
+
"image/jphc": ["jhc"],
|
|
36461
|
+
"image/jpm": ["jpm", "jpgm"],
|
|
36462
|
+
"image/jpx": ["jpx", "jpf"],
|
|
36463
|
+
"image/jxl": ["jxl"],
|
|
36464
|
+
"image/jxr": ["jxr"],
|
|
36465
|
+
"image/jxra": ["jxra"],
|
|
36466
|
+
"image/jxrs": ["jxrs"],
|
|
36467
|
+
"image/jxs": ["jxs"],
|
|
36468
|
+
"image/jxsc": ["jxsc"],
|
|
36469
|
+
"image/jxsi": ["jxsi"],
|
|
36470
|
+
"image/jxss": ["jxss"],
|
|
36471
|
+
"image/ktx": ["ktx"],
|
|
36472
|
+
"image/ktx2": ["ktx2"],
|
|
36473
|
+
"image/pjpeg": ["jfif"],
|
|
36474
|
+
"image/png": ["png"],
|
|
36475
|
+
"image/sgi": ["sgi"],
|
|
36476
|
+
"image/svg+xml": ["svg", "svgz"],
|
|
36477
|
+
"image/t38": ["t38"],
|
|
36478
|
+
"image/tiff": ["tif", "tiff"],
|
|
36479
|
+
"image/tiff-fx": ["tfx"],
|
|
36480
|
+
"image/webp": ["webp"],
|
|
36481
|
+
"image/wmf": ["wmf"],
|
|
36482
|
+
"message/disposition-notification": ["disposition-notification"],
|
|
36483
|
+
"message/global": ["u8msg"],
|
|
36484
|
+
"message/global-delivery-status": ["u8dsn"],
|
|
36485
|
+
"message/global-disposition-notification": ["u8mdn"],
|
|
36486
|
+
"message/global-headers": ["u8hdr"],
|
|
36487
|
+
"message/rfc822": ["eml", "mime", "mht", "mhtml"],
|
|
36488
|
+
"model/3mf": ["3mf"],
|
|
36489
|
+
"model/gltf+json": ["gltf"],
|
|
36490
|
+
"model/gltf-binary": ["glb"],
|
|
36491
|
+
"model/iges": ["igs", "iges"],
|
|
36492
|
+
"model/jt": ["jt"],
|
|
36493
|
+
"model/mesh": ["msh", "mesh", "silo"],
|
|
36494
|
+
"model/mtl": ["mtl"],
|
|
36495
|
+
"model/obj": ["obj"],
|
|
36496
|
+
"model/prc": ["prc"],
|
|
36497
|
+
"model/step": ["step", "stp", "stpnc", "p21", "210"],
|
|
36498
|
+
"model/step+xml": ["stpx"],
|
|
36499
|
+
"model/step+zip": ["stpz"],
|
|
36500
|
+
"model/step-xml+zip": ["stpxz"],
|
|
36501
|
+
"model/stl": ["stl"],
|
|
36502
|
+
"model/u3d": ["u3d"],
|
|
36503
|
+
"model/vrml": ["wrl", "vrml"],
|
|
36504
|
+
"model/x3d+binary": ["*x3db", "x3dbz"],
|
|
36505
|
+
"model/x3d+fastinfoset": ["x3db"],
|
|
36506
|
+
"model/x3d+vrml": ["*x3dv", "x3dvz"],
|
|
36507
|
+
"model/x3d+xml": ["x3d", "x3dz"],
|
|
36508
|
+
"model/x3d-vrml": ["x3dv"],
|
|
36509
|
+
"text/cache-manifest": ["appcache", "manifest"],
|
|
36510
|
+
"text/calendar": ["ics", "ifb"],
|
|
36511
|
+
"text/coffeescript": ["coffee", "litcoffee"],
|
|
36512
|
+
"text/css": ["css"],
|
|
36513
|
+
"text/csv": ["csv"],
|
|
36514
|
+
"text/html": ["html", "htm", "shtml"],
|
|
36515
|
+
"text/jade": ["jade"],
|
|
36516
|
+
"text/javascript": ["js", "mjs"],
|
|
36517
|
+
"text/jsx": ["jsx"],
|
|
36518
|
+
"text/less": ["less"],
|
|
36519
|
+
"text/markdown": ["md", "markdown"],
|
|
36520
|
+
"text/mathml": ["mml"],
|
|
36521
|
+
"text/mdx": ["mdx"],
|
|
36522
|
+
"text/n3": ["n3"],
|
|
36523
|
+
"text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"],
|
|
36524
|
+
"text/richtext": ["rtx"],
|
|
36525
|
+
"text/rtf": ["*rtf"],
|
|
36526
|
+
"text/sgml": ["sgml", "sgm"],
|
|
36527
|
+
"text/shex": ["shex"],
|
|
36528
|
+
"text/slim": ["slim", "slm"],
|
|
36529
|
+
"text/spdx": ["spdx"],
|
|
36530
|
+
"text/stylus": ["stylus", "styl"],
|
|
36531
|
+
"text/tab-separated-values": ["tsv"],
|
|
36532
|
+
"text/troff": ["t", "tr", "roff", "man", "me", "ms"],
|
|
36533
|
+
"text/turtle": ["ttl"],
|
|
36534
|
+
"text/uri-list": ["uri", "uris", "urls"],
|
|
36535
|
+
"text/vcard": ["vcard"],
|
|
36536
|
+
"text/vtt": ["vtt"],
|
|
36537
|
+
"text/wgsl": ["wgsl"],
|
|
36538
|
+
"text/xml": ["*xml"],
|
|
36539
|
+
"text/yaml": ["yaml", "yml"],
|
|
36540
|
+
"video/3gpp": ["3gp", "3gpp"],
|
|
36541
|
+
"video/3gpp2": ["3g2"],
|
|
36542
|
+
"video/h261": ["h261"],
|
|
36543
|
+
"video/h263": ["h263"],
|
|
36544
|
+
"video/h264": ["h264"],
|
|
36545
|
+
"video/iso.segment": ["m4s"],
|
|
36546
|
+
"video/jpeg": ["jpgv"],
|
|
36547
|
+
"video/jpm": ["*jpm", "*jpgm"],
|
|
36548
|
+
"video/mj2": ["mj2", "mjp2"],
|
|
36549
|
+
"video/mp2t": ["ts", "m2t", "m2ts", "mts"],
|
|
36550
|
+
"video/mp4": ["mp4", "mp4v", "mpg4"],
|
|
36551
|
+
"video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"],
|
|
36552
|
+
"video/ogg": ["ogv"],
|
|
36553
|
+
"video/quicktime": ["qt", "mov"],
|
|
36554
|
+
"video/webm": ["webm"]
|
|
36555
|
+
};
|
|
36556
|
+
Object.freeze(types);
|
|
36557
|
+
var standard_default = types;
|
|
36558
|
+
|
|
36559
|
+
// ../node_modules/mime/dist/src/Mime.js
|
|
36560
|
+
var __classPrivateFieldGet = function(receiver2, state2, kind2, f) {
|
|
36561
|
+
if (kind2 === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
36562
|
+
if (typeof state2 === "function" ? receiver2 !== state2 || !f : !state2.has(receiver2)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
36563
|
+
return kind2 === "m" ? f : kind2 === "a" ? f.call(receiver2) : f ? f.value : state2.get(receiver2);
|
|
36564
|
+
};
|
|
36565
|
+
var _Mime_extensionToType;
|
|
36566
|
+
var _Mime_typeToExtension;
|
|
36567
|
+
var _Mime_typeToExtensions;
|
|
36568
|
+
var Mime = class {
|
|
36569
|
+
constructor(...args) {
|
|
36570
|
+
_Mime_extensionToType.set(this, /* @__PURE__ */ new Map());
|
|
36571
|
+
_Mime_typeToExtension.set(this, /* @__PURE__ */ new Map());
|
|
36572
|
+
_Mime_typeToExtensions.set(this, /* @__PURE__ */ new Map());
|
|
36573
|
+
for (const arg2 of args) {
|
|
36574
|
+
this.define(arg2);
|
|
36575
|
+
}
|
|
36576
|
+
}
|
|
36577
|
+
define(typeMap, force = false) {
|
|
36578
|
+
for (let [type5, extensions] of Object.entries(typeMap)) {
|
|
36579
|
+
type5 = type5.toLowerCase();
|
|
36580
|
+
extensions = extensions.map((ext) => ext.toLowerCase());
|
|
36581
|
+
if (!__classPrivateFieldGet(this, _Mime_typeToExtensions, "f").has(type5)) {
|
|
36582
|
+
__classPrivateFieldGet(this, _Mime_typeToExtensions, "f").set(type5, /* @__PURE__ */ new Set());
|
|
36583
|
+
}
|
|
36584
|
+
const allExtensions = __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type5);
|
|
36585
|
+
let first4 = true;
|
|
36586
|
+
for (let extension3 of extensions) {
|
|
36587
|
+
const starred = extension3.startsWith("*");
|
|
36588
|
+
extension3 = starred ? extension3.slice(1) : extension3;
|
|
36589
|
+
allExtensions?.add(extension3);
|
|
36590
|
+
if (first4) {
|
|
36591
|
+
__classPrivateFieldGet(this, _Mime_typeToExtension, "f").set(type5, extension3);
|
|
36592
|
+
}
|
|
36593
|
+
first4 = false;
|
|
36594
|
+
if (starred)
|
|
36595
|
+
continue;
|
|
36596
|
+
const currentType = __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(extension3);
|
|
36597
|
+
if (currentType && currentType != type5 && !force) {
|
|
36598
|
+
throw new Error(`"${type5} -> ${extension3}" conflicts with "${currentType} -> ${extension3}". Pass \`force=true\` to override this definition.`);
|
|
36599
|
+
}
|
|
36600
|
+
__classPrivateFieldGet(this, _Mime_extensionToType, "f").set(extension3, type5);
|
|
36601
|
+
}
|
|
36602
|
+
}
|
|
36603
|
+
return this;
|
|
36604
|
+
}
|
|
36605
|
+
getType(path3) {
|
|
36606
|
+
if (typeof path3 !== "string")
|
|
36607
|
+
return null;
|
|
36608
|
+
const last3 = path3.replace(/^.*[/\\]/s, "").toLowerCase();
|
|
36609
|
+
const ext = last3.replace(/^.*\./s, "").toLowerCase();
|
|
36610
|
+
const hasPath = last3.length < path3.length;
|
|
36611
|
+
const hasDot = ext.length < last3.length - 1;
|
|
36612
|
+
if (!hasDot && hasPath)
|
|
36613
|
+
return null;
|
|
36614
|
+
return __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(ext) ?? null;
|
|
36615
|
+
}
|
|
36616
|
+
getExtension(type5) {
|
|
36617
|
+
if (typeof type5 !== "string")
|
|
36618
|
+
return null;
|
|
36619
|
+
type5 = type5?.split?.(";")[0];
|
|
36620
|
+
return (type5 && __classPrivateFieldGet(this, _Mime_typeToExtension, "f").get(type5.trim().toLowerCase())) ?? null;
|
|
36621
|
+
}
|
|
36622
|
+
getAllExtensions(type5) {
|
|
36623
|
+
if (typeof type5 !== "string")
|
|
36624
|
+
return null;
|
|
36625
|
+
return __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type5.toLowerCase()) ?? null;
|
|
36626
|
+
}
|
|
36627
|
+
_freeze() {
|
|
36628
|
+
this.define = () => {
|
|
36629
|
+
throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances");
|
|
36630
|
+
};
|
|
36631
|
+
Object.freeze(this);
|
|
36632
|
+
for (const extensions of __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").values()) {
|
|
36633
|
+
Object.freeze(extensions);
|
|
36634
|
+
}
|
|
36635
|
+
return this;
|
|
36636
|
+
}
|
|
36637
|
+
_getTestState() {
|
|
36638
|
+
return {
|
|
36639
|
+
types: __classPrivateFieldGet(this, _Mime_extensionToType, "f"),
|
|
36640
|
+
extensions: __classPrivateFieldGet(this, _Mime_typeToExtension, "f")
|
|
36641
|
+
};
|
|
36642
|
+
}
|
|
36643
|
+
};
|
|
36644
|
+
_Mime_extensionToType = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtension = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtensions = /* @__PURE__ */ new WeakMap();
|
|
36645
|
+
var Mime_default = Mime;
|
|
36646
|
+
|
|
36647
|
+
// ../node_modules/mime/dist/src/index_lite.js
|
|
36648
|
+
var index_lite_default = new Mime_default(standard_default)._freeze();
|
|
36649
|
+
|
|
36191
36650
|
// src/files/FileFetcher.ts
|
|
36192
36651
|
var FileFetcher = class {
|
|
36193
36652
|
constructor(session4) {
|
|
@@ -36228,12 +36687,12 @@ _:patch
|
|
|
36228
36687
|
createNewFile(container2, name9) {
|
|
36229
36688
|
const encodedName = encodeURIComponent(name9);
|
|
36230
36689
|
const url7 = container2.uri + encodedName;
|
|
36231
|
-
const
|
|
36690
|
+
const contentTypeHeader = index_lite_default.getType(encodedName) ?? "text/turtle";
|
|
36232
36691
|
return ResultAsync.fromPromise(
|
|
36233
36692
|
this.session.authenticatedFetch(url7, {
|
|
36234
36693
|
method: "PUT",
|
|
36235
36694
|
headers: {
|
|
36236
|
-
"Content-Type":
|
|
36695
|
+
"Content-Type": contentTypeHeader,
|
|
36237
36696
|
"If-None-Match": "*"
|
|
36238
36697
|
}
|
|
36239
36698
|
}),
|
|
@@ -36242,7 +36701,7 @@ _:patch
|
|
|
36242
36701
|
(response6) => response6.ok ? ok({
|
|
36243
36702
|
url: url7,
|
|
36244
36703
|
name: name9,
|
|
36245
|
-
contentType:
|
|
36704
|
+
contentType: contentTypeHeader
|
|
36246
36705
|
}) : err(httpProblem("The file could not be created", response6))
|
|
36247
36706
|
);
|
|
36248
36707
|
}
|