graphdb-workbench
Version:
The web application for GraphDB APIs
2 lines • 117 kB
JavaScript
/*! For license information please see 63222.6b55ce99e6b9068ee6ba.bundle.js.LICENSE.txt */
export const __webpack_id__=63222;export const __webpack_ids__=[63222];export const __webpack_modules__={947:(e,t,n)=>{const o=n(55242),a=n(98871);e.exports=class extends a{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new o("sha1")}modifyFirstDegreeComponent(e,t,n){return"BlankNode"!==t.termType?t:"graph"===n?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}createHashToRelated(e,t){const n=new Map,o=this.blankNodeInfo.get(e).quads;for(const a of o){let o,r;if("BlankNode"===a.subject.termType&&a.subject.value!==e)r=a.subject.value,o="p";else{if("BlankNode"!==a.object.termType||a.object.value===e)continue;r=a.object.value,o="r"}const i=this.hashRelatedBlankNode(r,a,t,o),s=n.get(i);s?s.push(r):n.set(i,[r])}return n}}},2426:e=>{e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},8488:e=>{const t="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",n="http://www.w3.org/2001/XMLSchema#string",o="NamedNode",a="BlankNode",r="Literal",i="DefaultGraph",s={};function l(e,t){return e.subject.termType===t.subject.termType&&e.object.termType===t.object.termType&&e.subject.value===t.subject.value&&e.predicate.value===t.predicate.value&&e.object.value===t.object.value&&(e.object.termType!==r||e.object.datatype.termType===t.object.datatype.termType&&e.object.language===t.object.language&&e.object.datatype.value===t.object.datatype.value)}(()=>{const e="(?:<([^:]+:[^>]*)>)",t="A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�_",n=t+"0-9-·̀-ͯ‿-⁀",o="(_:(?:["+t+"0-9])(?:(?:["+n+".])*(?:["+n+"]))?)",a="[ \\t]+",r="[ \\t]*",i="(?:"+e+"|"+o+")"+a,l=e+a,c="(?:"+e+"|"+o+'|(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"(?:(?:\\^\\^'+e+")|(?:@([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)))?))"+r,d="(?:\\.|(?:(?:"+e+"|"+o+")"+r+"\\.))";s.eoln=/(?:\r\n)|(?:\n)|(?:\r)/g,s.empty=new RegExp("^"+r+"$"),s.quad=new RegExp("^"+r+i+l+c+d+r+"$")})(),e.exports=class e{static parse(e){const c=[],d={},p=e.split(s.eoln);let h=0;for(const e of p){if(h++,s.empty.test(e))continue;const p=e.match(s.quad);if(null===p)throw new Error("N-Quads parse error on line "+h+".");const f={subject:null,predicate:null,object:null,graph:null};if(void 0!==p[1]?f.subject={termType:o,value:p[1]}:f.subject={termType:a,value:p[2]},f.predicate={termType:o,value:p[3]},void 0!==p[4]?f.object={termType:o,value:p[4]}:void 0!==p[5]?f.object={termType:a,value:p[5]}:(f.object={termType:r,value:void 0,datatype:{termType:o}},void 0!==p[7]?f.object.datatype.value=p[7]:void 0!==p[8]?(f.object.datatype.value=t,f.object.language=p[8]):f.object.datatype.value=n,f.object.value=u(p[6])),void 0!==p[9]?f.graph={termType:o,value:p[9]}:void 0!==p[10]?f.graph={termType:a,value:p[10]}:f.graph={termType:i,value:""},f.graph.value in d){let e=!0;const t=d[f.graph.value];for(const n of t)if(l(n,f)){e=!1;break}e&&(t.push(f),c.push(f))}else d[f.graph.value]=[f],c.push(f)}return c}static serialize(t){Array.isArray(t)||(t=e.legacyDatasetToQuads(t));const n=[];for(const o of t)n.push(e.serializeQuad(o));return n.sort().join("")}static serializeQuadComponents(e,r,i,s){let l="";return e.termType===o?l+=`<${e.value}>`:l+=`${e.value}`,l+=` <${r.value}> `,i.termType===o?l+=`<${i.value}>`:i.termType===a?l+=i.value:(l+=`"${function(e){return e.replace(c,function(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r"}})}(i.value)}"`,i.datatype.value===t?i.language&&(l+=`@${i.language}`):i.datatype.value!==n&&(l+=`^^<${i.datatype.value}>`)),s.termType===o?l+=` <${s.value}>`:s.termType===a&&(l+=` ${s.value}`),l+=" .\n",l}static serializeQuad(t){return e.serializeQuadComponents(t.subject,t.predicate,t.object,t.graph)}static legacyDatasetToQuads(e){const s=[],l={"blank node":a,IRI:o,literal:r};for(const c in e)e[c].forEach(e=>{const d={};for(const a in e){const i=e[a],s={termType:l[i.type],value:i.value};s.termType===r&&(s.datatype={termType:o},"datatype"in i&&(s.datatype.value=i.datatype),"language"in i?("datatype"in i||(s.datatype.value=t),s.language=i.language):"datatype"in i||(s.datatype.value=n)),d[a]=s}d.graph="@default"===c?{termType:i,value:""}:{termType:c.startsWith("_:")?a:o,value:c},s.push(d)});return s}};const c=/["\\\n\r]/g,d=/(?:\\([tbnrf"'\\]))|(?:\\u([0-9A-Fa-f]{4}))|(?:\\U([0-9A-Fa-f]{8}))/g;function u(e){return e.replace(d,function(e,t,n,o){if(t)switch(t){case"t":return"\t";case"b":return"\b";case"n":return"\n";case"r":return"\r";case"f":return"\f";case'"':return'"';case"'":return"'";case"\\":return"\\"}if(n)return String.fromCharCode(parseInt(n,16));if(o)throw new Error("Unsupported U escape")})}},12556:e=>{e.exports=class{constructor(){this._requests={}}wrapLoader(e){const t=this;return t._loader=e,function(){return t.add.apply(t,arguments)}}async add(e){let t=this._requests[e];if(t)return Promise.resolve(t);t=this._requests[e]=this._loader(e);try{return await t}finally{delete this._requests[e]}}}},17460:(e,t,n)=>{e.exports=n(88368)},18937:(e,t,n)=>{const o=n(85162);e.exports=class{constructor({document:e}){this.document=e,this.cache=new o({max:10})}getProcessed(e){return this.cache.get(e)}setProcessed(e,t){this.cache.set(e,t)}}},19455:(e,t,n)=>{const o=n(60299),a={};e.exports=a,a.parsers={simple:{keys:["href","scheme","authority","path","query","fragment"],regex:/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/},full:{keys:["href","protocol","scheme","authority","auth","user","password","hostname","port","path","directory","file","query","fragment"],regex:/^(([a-zA-Z][a-zA-Z0-9+-.]*):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(?:(((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/}},a.parse=(e,t)=>{const n={},o=a.parsers[t||"full"],r=o.regex.exec(e);let i=o.keys.length;for(;i--;)n[o.keys[i]]=void 0===r[i]?null:r[i];return("https"===n.scheme&&"443"===n.port||"http"===n.scheme&&"80"===n.port)&&(n.href=n.href.replace(":"+n.port,""),n.authority=n.authority.replace(":"+n.port,""),n.port=null),n.normalizedPath=a.removeDotSegments(n.path),n},a.prependBase=(e,t)=>{if(null===e)return t;if(a.isAbsolute(t))return t;e&&!o.isString(e)||(e=a.parse(e||""));const n=a.parse(t),r={protocol:e.protocol||""};if(null!==n.authority)r.authority=n.authority,r.path=n.path,r.query=n.query;else if(r.authority=e.authority,""===n.path)r.path=e.path,null!==n.query?r.query=n.query:r.query=e.query;else{if(0===n.path.indexOf("/"))r.path=n.path;else{let t=e.path;t=t.substr(0,t.lastIndexOf("/")+1),(t.length>0||e.authority)&&"/"!==t.substr(-1)&&(t+="/"),t+=n.path,r.path=t}r.query=n.query}""!==n.path&&(r.path=a.removeDotSegments(r.path));let i=r.protocol;return null!==r.authority&&(i+="//"+r.authority),i+=r.path,null!==r.query&&(i+="?"+r.query),null!==n.fragment&&(i+="#"+n.fragment),""===i&&(i="./"),i},a.removeBase=(e,t)=>{if(null===e)return t;e&&!o.isString(e)||(e=a.parse(e||""));let n="";if(""!==e.href?n+=(e.protocol||"")+"//"+(e.authority||""):t.indexOf("//")&&(n+="//"),0!==t.indexOf(n))return t;const r=a.parse(t.substr(n.length)),i=e.normalizedPath.split("/"),s=r.normalizedPath.split("/"),l=r.fragment||r.query?0:1;for(;i.length>0&&s.length>l&&i[0]===s[0];)i.shift(),s.shift();let c="";if(i.length>0){i.pop();for(let e=0;e<i.length;++e)c+="../"}return c+=s.join("/"),null!==r.query&&(c+="?"+r.query),null!==r.fragment&&(c+="#"+r.fragment),""===c&&(c="./"),c},a.removeDotSegments=e=>{if(0===e.length)return"";const t=e.split("/"),n=[];for(;t.length>0;){const e=t.shift(),o=0===t.length;"."!==e?".."!==e?n.push(e):(n.pop(),o&&n.push("")):o&&n.push("")}return"/"===e[0]&&n.length>0&&""!==n[0]&&n.unshift(""),1===n.length&&""===n[0]?"/":n.join("/")};const r=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;a.isAbsolute=e=>o.isString(e)&&r.test(e),a.isRelative=e=>o.isString(e)},21622:(e,t,n)=>{const o=n(63884),a={};e.exports=a,a.setupDocumentLoaders=function(e){"undefined"!=typeof XMLHttpRequest&&(e.documentLoaders.xhr=o,e.useDocumentLoader("xhr"))},a.setupGlobals=function(e){void 0===globalThis.JsonLdProcessor&&Object.defineProperty(globalThis,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:e.JsonLdProcessor})}},21833:(e,t,n)=>{const{createNodeMap:o}=n(71804),{isKeyword:a}=n(27409),r=n(85229),i=n(44962),s=n(70050),l=n(60299),c=n(53096),{handleEvent:d}=n(67749),{RDF_FIRST:u,RDF_REST:p,RDF_NIL:h,RDF_TYPE:f,RDF_JSON_LITERAL:v,RDF_LANGSTRING:g,XSD_BOOLEAN:y,XSD_DOUBLE:m,XSD_INTEGER:x,XSD_STRING:b}=n(49447),{isAbsolute:w}=n(19455),j={};function I(e,t,n,o,r){const i=Object.keys(t).sort();for(const s of i){const i=t[s],l=Object.keys(i).sort();for(let t of l){const l=i[t];if("@type"===t)t=f;else if(a(t))continue;for(const a of l){const i={termType:s.startsWith("_:")?"BlankNode":"NamedNode",value:s};if(!w(s)){r.eventHandler&&d({event:{type:["JsonLdEvent"],code:"relative subject reference",level:"warning",message:"Relative subject reference found.",details:{subject:s}},options:r});continue}const l={termType:t.startsWith("_:")?"BlankNode":"NamedNode",value:t};if(!w(t)){r.eventHandler&&d({event:{type:["JsonLdEvent"],code:"relative predicate reference",level:"warning",message:"Relative predicate reference found.",details:{predicate:t}},options:r});continue}if("BlankNode"===l.termType&&!r.produceGeneralizedRdf){r.eventHandler&&d({event:{type:["JsonLdEvent"],code:"blank node predicate",level:"warning",message:"Dropping blank node predicate.",details:{property:o.getOldIds().find(e=>o.getId(e)===t)}},options:r});continue}const c=N(a,o,e,n,r.rdfDirection,r);c&&e.push({subject:i,predicate:l,object:c,graph:n})}}}}function N(e,t,n,o,a,c){const f={};if(r.isValue(e)){f.termType="Literal",f.value=void 0,f.datatype={termType:"NamedNode"};let t=e["@value"];const n=e["@type"]||null;if("@json"===n)f.value=i(t),f.datatype.value=v;else if(l.isBoolean(t))f.value=t.toString(),f.datatype.value=n||y;else if(l.isDouble(t)||n===m)l.isDouble(t)||(t=parseFloat(t)),f.value=t.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),f.datatype.value=n||m;else if(l.isNumber(t))f.value=t.toFixed(0),f.datatype.value=n||x;else if("@direction"in e&&"i18n-datatype"===a){const n=`https://www.w3.org/ns/i18n#${(e["@language"]||"").toLowerCase()}_${e["@direction"]}`;f.datatype.value=n,f.value=t}else{if("@direction"in e&&"compound-literal"===a)throw new s("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:a});if("@direction"in e&&a)throw new s("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:a});"@language"in e?("@direction"in e&&!a&&c.eventHandler&&d({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:f.value}},options:c}),f.value=t,f.datatype.value=n||g,f.language=e["@language"]):("@direction"in e&&!a&&c.eventHandler&&d({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:f.value}},options:c}),f.value=t,f.datatype.value=n||b)}}else if(r.isList(e)){const r=function(e,t,n,o,a,r){const i={termType:"NamedNode",value:u},s={termType:"NamedNode",value:p},l={termType:"NamedNode",value:h},c=e.pop(),d=c?{termType:"BlankNode",value:t.getId()}:l;let f=d;for(const l of e){const e=N(l,t,n,o,a,r),c={termType:"BlankNode",value:t.getId()};n.push({subject:f,predicate:i,object:e,graph:o}),n.push({subject:f,predicate:s,object:c,graph:o}),f=c}if(c){const e=N(c,t,n,o,a,r);n.push({subject:f,predicate:i,object:e,graph:o}),n.push({subject:f,predicate:s,object:l,graph:o})}return d}(e["@list"],t,n,o,a,c);f.termType=r.termType,f.value=r.value}else{const t=l.isObject(e)?e["@id"]:e;f.termType=t.startsWith("_:")?"BlankNode":"NamedNode",f.value=t}return"NamedNode"!==f.termType||w(f.value)?f:(c.eventHandler&&d({event:{type:["JsonLdEvent"],code:"relative object reference",level:"warning",message:"Relative object reference found.",details:{object:f.value}},options:c}),null)}e.exports=j,j.toRDF=(e,t)=>{const n=new c.IdentifierIssuer("_:b"),a={"@default":{}};o(e,a,"@default",n);const r=[],i=Object.keys(a).sort();for(const e of i){let o;if("@default"===e)o={termType:"DefaultGraph",value:""};else{if(!w(e)){t.eventHandler&&d({event:{type:["JsonLdEvent"],code:"relative graph reference",level:"warning",message:"Relative graph reference found.",details:{graph:e}},options:t});continue}o=e.startsWith("_:")?{termType:"BlankNode"}:{termType:"NamedNode"},o.value=e}I(r,a[e],o,n,t)}return r}},23684:e=>{e.exports=e=>{class t{toString(){return"[object JsonLdProcessor]"}}return Object.defineProperty(t,"prototype",{writable:!1,enumerable:!1}),Object.defineProperty(t.prototype,"constructor",{writable:!0,enumerable:!1,configurable:!0,value:t}),t.compact=function(t,n){return arguments.length<2?Promise.reject(new TypeError("Could not compact, too few arguments.")):e.compact(t,n)},t.expand=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not expand, too few arguments.")):e.expand(t)},t.flatten=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not flatten, too few arguments.")):e.flatten(t)},t}},27409:(e,t,n)=>{const o=n(53096),a=n(70050),{isArray:r,isObject:i,isString:s,isUndefined:l}=n(60299),{isAbsolute:c,isRelative:d,prependBase:u}=n(19455),{handleEvent:p}=n(67749),{REGEX_BCP47:h,REGEX_KEYWORD:f,asArray:v,compareShortestLeast:g}=n(53096),y=new Map,m={};function x(e,t,n,o,a,r){if(null===t||!s(t)||m.isKeyword(t))return t;if(t.match(f))return null;if(o&&o.hasOwnProperty(t)&&!0!==a.get(t)&&m.createTermDefinition({activeCtx:e,localCtx:o,term:t,defined:a,options:r}),(n=n||{}).vocab){const n=e.mappings.get(t);if(null===n)return null;if(i(n)&&"@id"in n)return n["@id"]}const l=t.indexOf(":");if(l>0){const n=t.substr(0,l),i=t.substr(l+1);if("_"===n||0===i.indexOf("//"))return t;o&&o.hasOwnProperty(n)&&m.createTermDefinition({activeCtx:e,localCtx:o,term:n,defined:a,options:r});const s=e.mappings.get(n);if(s&&s._prefix)return s["@id"]+i;if(c(t))return t}if(n.vocab&&"@vocab"in e)t=e["@vocab"]+t;else if(n.base){let n,o;"@base"in e?e["@base"]?(o=u(r.base,e["@base"]),n=u(o,t)):(o=e["@base"],n=t):(o=r.base,n=u(r.base,t)),t=n}return t}function b(e,t){if(!e||"object"!=typeof e||!t||"object"!=typeof t)return e===t;const n=Array.isArray(e);if(n!==Array.isArray(t))return!1;if(n){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!b(e[n],t[n]))return!1;return!0}const o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(const n in e){let o=e[n],a=t[n];if("@container"===n&&Array.isArray(o)&&Array.isArray(a)&&(o=o.slice().sort(),a=a.slice().sort()),!b(o,a))return!1}return!0}e.exports=m,m.process=async({activeCtx:e,localCtx:t,options:n,propagate:o=!0,overrideProtected:l=!1,cycles:f=new Set})=>{if(i(t)&&"@context"in t&&r(t["@context"])&&(t=t["@context"]),0===v(t).length)return e;const g=[],y=[({event:e,next:t})=>{g.push(e),t()}];n.eventHandler&&y.push(n.eventHandler);const b=n;n={...n,eventHandler:y};const w=await n.contextResolver.resolve({activeCtx:e,context:t,documentLoader:n.documentLoader,base:n.base});i(w[0].document)&&"boolean"==typeof w[0].document["@propagate"]&&(o=w[0].document["@propagate"]);let j=e;o||j.previousContext||(j=j.clone(),j.previousContext=e);for(const o of w){let{document:r}=o;if(e=j,null===r){if(!l&&0!==Object.keys(e.protected).length)throw new a("Tried to nullify a context with protected terms outside of a term definition.","jsonld.SyntaxError",{code:"invalid context nullification"});j=e=m.getInitialContext(n).clone();continue}const v=o.getProcessed(e);if(v){if(b.eventHandler)for(const e of v.events)p({event:e,options:b});j=e=v.context;continue}if(i(r)&&"@context"in r&&(r=r["@context"]),!i(r))throw new a("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:r});j=j.clone();const y=new Map;if("@version"in r){if(1.1!==r["@version"])throw new a("Unsupported JSON-LD version: "+r["@version"],"jsonld.UnsupportedVersion",{code:"invalid @version value",context:r});if(e.processingMode&&"json-ld-1.0"===e.processingMode)throw new a("@version: "+r["@version"]+" not compatible with "+e.processingMode,"jsonld.ProcessingModeConflict",{code:"processing mode conflict",context:r});j.processingMode="json-ld-1.1",j["@version"]=r["@version"],y.set("@version",!0)}if(j.processingMode=j.processingMode||e.processingMode,"@base"in r){let e=r["@base"];if(null===e||c(e));else{if(!d(e))throw new a('Invalid JSON-LD syntax; the value of "@base" in a @context must be an absolute IRI, a relative IRI, or null.',"jsonld.SyntaxError",{code:"invalid base IRI",context:r});e=u(j["@base"],e)}j["@base"]=e,y.set("@base",!0)}if("@vocab"in r){const e=r["@vocab"];if(null===e)delete j["@vocab"];else{if(!s(e))throw new a('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:r});if(!c(e)&&m.processingMode(j,1))throw new a('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be an absolute IRI.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:r});{const t=x(j,e,{vocab:!0,base:!0},void 0,void 0,n);c(t)||n.eventHandler&&p({event:{type:["JsonLdEvent"],code:"relative @vocab reference",level:"warning",message:"Relative @vocab reference found.",details:{vocab:t}},options:n}),j["@vocab"]=t}}y.set("@vocab",!0)}if("@language"in r){const e=r["@language"];if(null===e)delete j["@language"];else{if(!s(e))throw new a('Invalid JSON-LD syntax; the value of "@language" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid default language",context:r});e.match(h)||n.eventHandler&&p({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:n}),j["@language"]=e.toLowerCase()}y.set("@language",!0)}if("@direction"in r){const t=r["@direction"];if("json-ld-1.0"===e.processingMode)throw new a("Invalid JSON-LD syntax; @direction not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context member",context:r});if(null===t)delete j["@direction"];else{if("ltr"!==t&&"rtl"!==t)throw new a('Invalid JSON-LD syntax; the value of "@direction" in a @context must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:r});j["@direction"]=t}y.set("@direction",!0)}if("@propagate"in r){const n=r["@propagate"];if("json-ld-1.0"===e.processingMode)throw new a("Invalid JSON-LD syntax; @propagate not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:r});if("boolean"!=typeof n)throw new a("Invalid JSON-LD syntax; @propagate value must be a boolean.","jsonld.SyntaxError",{code:"invalid @propagate value",context:t});y.set("@propagate",!0)}if("@import"in r){const o=r["@import"];if("json-ld-1.0"===e.processingMode)throw new a("Invalid JSON-LD syntax; @import not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:r});if(!s(o))throw new a("Invalid JSON-LD syntax; @import must be a string.","jsonld.SyntaxError",{code:"invalid @import value",context:t});const i=await n.contextResolver.resolve({activeCtx:e,context:o,documentLoader:n.documentLoader,base:n.base});if(1!==i.length)throw new a("Invalid JSON-LD syntax; @import must reference a single context.","jsonld.SyntaxError",{code:"invalid remote context",context:t});const l=i[0].getProcessed(e);if(l)r=l;else{const n=i[0].document;if("@import"in n)throw new a("Invalid JSON-LD syntax: imported context must not include @import.","jsonld.SyntaxError",{code:"invalid context entry",context:t});for(const e in n)r.hasOwnProperty(e)||(r[e]=n[e]);i[0].setProcessed(e,r)}y.set("@import",!0)}y.set("@protected",r["@protected"]||!1);for(const e in r)if(m.createTermDefinition({activeCtx:j,localCtx:r,term:e,defined:y,options:n,overrideProtected:l}),i(r[e])&&"@context"in r[e]){const t=r[e]["@context"];let o=!0;if(s(t)){const e=u(n.base,t);f.has(e)?o=!1:f.add(e)}if(o)try{await m.process({activeCtx:j.clone(),localCtx:r[e]["@context"],overrideProtected:!0,options:n,cycles:f})}catch(t){throw new a("Invalid JSON-LD syntax; invalid scoped context.","jsonld.SyntaxError",{code:"invalid scoped context",context:r[e]["@context"],term:e})}}o.setProcessed(e,{context:j,events:g})}return j},m.createTermDefinition=({activeCtx:e,localCtx:t,term:n,defined:o,options:l,overrideProtected:d=!1})=>{if(o.has(n)){if(o.get(n))return;throw new a("Cyclical context definition detected.","jsonld.CyclicalContext",{code:"cyclic IRI mapping",context:t,term:n})}let u;if(o.set(n,!1),t.hasOwnProperty(n)&&(u=t[n]),"@type"===n&&i(u)&&"@set"===(u["@container"]||"@set")&&m.processingMode(e,1.1)){const e=["@container","@id","@protected"],o=Object.keys(u);if(0===o.length||o.some(t=>!e.includes(t)))throw new a("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:n})}else{if(m.isKeyword(n))throw new a("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:n});if(n.match(f))return void(l.eventHandler&&p({event:{type:["JsonLdEvent"],code:"reserved term",level:"warning",message:'Terms beginning with "@" are reserved for future use and dropped.',details:{term:n}},options:l}));if(""===n)throw new a("Invalid JSON-LD syntax; a term cannot be an empty string.","jsonld.SyntaxError",{code:"invalid term definition",context:t})}const h=e.mappings.get(n);e.mappings.has(n)&&e.mappings.delete(n);let v=!1;if((s(u)||null===u)&&(v=!0,u={"@id":u}),!i(u))throw new a("Invalid JSON-LD syntax; @context term values must be strings or objects.","jsonld.SyntaxError",{code:"invalid term definition",context:t});const g={};e.mappings.set(n,g),g.reverse=!1;const y=["@container","@id","@language","@reverse","@type"];m.processingMode(e,1.1)&&y.push("@context","@direction","@index","@nest","@prefix","@protected");for(const e in u)if(!y.includes(e))throw new a("Invalid JSON-LD syntax; a term definition must not contain "+e,"jsonld.SyntaxError",{code:"invalid term definition",context:t});const w=n.indexOf(":");if(g._termHasColon=w>0,"@reverse"in u){if("@id"in u)throw new a("Invalid JSON-LD syntax; a @reverse term definition must not contain @id.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});if("@nest"in u)throw new a("Invalid JSON-LD syntax; a @reverse term definition must not contain @nest.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});const r=u["@reverse"];if(!s(r))throw new a("Invalid JSON-LD syntax; a @context @reverse value must be a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(r.match(f))return l.eventHandler&&p({event:{type:["JsonLdEvent"],code:"reserved @reverse value",level:"warning",message:'@reverse values beginning with "@" are reserved for future use and dropped.',details:{reverse:r}},options:l}),void(h?e.mappings.set(n,h):e.mappings.delete(n));const i=x(e,r,{vocab:!0,base:!1},t,o,l);if(!c(i))throw new a("Invalid JSON-LD syntax; a @context @reverse value must be an absolute IRI or a blank node identifier.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});g["@id"]=i,g.reverse=!0}else if("@id"in u){let r=u["@id"];if(r&&!s(r))throw new a("Invalid JSON-LD syntax; a @context @id value must be an array of strings or a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(null===r)g["@id"]=null;else{if(!m.isKeyword(r)&&r.match(f))return l.eventHandler&&p({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:'@id values beginning with "@" are reserved for future use and dropped.',details:{id:r}},options:l}),void(h?e.mappings.set(n,h):e.mappings.delete(n));if(r!==n){if(r=x(e,r,{vocab:!0,base:!1},t,o,l),!c(r)&&!m.isKeyword(r))throw new a("Invalid JSON-LD syntax; a @context @id value must be an absolute IRI, a blank node identifier, or a keyword.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(n.match(/(?::[^:])|\//)&&x(e,n,{vocab:!0,base:!1},t,new Map(o).set(n,!0),l)!==r)throw new a("Invalid JSON-LD syntax; term in form of IRI must expand to definition.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});g["@id"]=r,g._prefix=v&&!g._termHasColon&&null!==r.match(/[:\/\?#\[\]@]$/)}}}if(!("@id"in g))if(g._termHasColon){const a=n.substr(0,w);if(t.hasOwnProperty(a)&&m.createTermDefinition({activeCtx:e,localCtx:t,term:a,defined:o,options:l}),e.mappings.has(a)){const t=n.substr(w+1);g["@id"]=e.mappings.get(a)["@id"]+t}else g["@id"]=n}else if("@type"===n)g["@id"]=n;else{if(!("@vocab"in e))throw new a("Invalid JSON-LD syntax; @context terms must define an @id.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t,term:n});g["@id"]=e["@vocab"]+n}if((!0===u["@protected"]||!0===o.get("@protected")&&!1!==u["@protected"])&&(e.protected[n]=!0,g.protected=!0),o.set(n,!0),"@type"in u){let n=u["@type"];if(!s(n))throw new a("Invalid JSON-LD syntax; an @context @type value must be a string.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if("@json"===n||"@none"===n){if(m.processingMode(e,1))throw new a(`Invalid JSON-LD syntax; an @context @type value must not be "${n}" in JSON-LD 1.0 mode.`,"jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else if("@id"!==n&&"@vocab"!==n){if(n=x(e,n,{vocab:!0,base:!1},t,o,l),!c(n))throw new a("Invalid JSON-LD syntax; an @context @type value must be an absolute IRI.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if(0===n.indexOf("_:"))throw new a("Invalid JSON-LD syntax; an @context @type value must be an IRI, not a blank node identifier.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}g["@type"]=n}if("@container"in u){const n=s(u["@container"])?[u["@container"]]:u["@container"]||[],o=["@list","@set","@index","@language"];let i=!0;const l=n.includes("@set");if(m.processingMode(e,1.1)){if(o.push("@graph","@id","@type"),n.includes("@list")){if(1!==n.length)throw new a("Invalid JSON-LD syntax; @context @container with @list must have no other values","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else if(n.includes("@graph")){if(n.some(e=>"@graph"!==e&&"@id"!==e&&"@index"!==e&&"@set"!==e))throw new a("Invalid JSON-LD syntax; @context @container with @graph must have no other values other than @id, @index, and @set","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else i&=n.length<=(l?2:1);if(n.includes("@type")&&(g["@type"]=g["@type"]||"@id",!["@id","@vocab"].includes(g["@type"])))throw new a("Invalid JSON-LD syntax; container: @type requires @type to be @id or @vocab.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else i&=!r(u["@container"]),i&=n.length<=1;if(i&=n.every(e=>o.includes(e)),i&=!(l&&n.includes("@list")),!i)throw new a("Invalid JSON-LD syntax; @context @container value must be one of the following: "+o.join(", "),"jsonld.SyntaxError",{code:"invalid container mapping",context:t});if(g.reverse&&!n.every(e=>["@index","@set"].includes(e)))throw new a("Invalid JSON-LD syntax; @context @container value for a @reverse type definition must be @index or @set.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});g["@container"]=n}if("@index"in u){if(!("@container"in u)||!g["@container"].includes("@index"))throw new a(`Invalid JSON-LD syntax; @index without @index in @container: "${u["@index"]}" on term "${n}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});if(!s(u["@index"])||0===u["@index"].indexOf("@"))throw new a(`Invalid JSON-LD syntax; @index must expand to an IRI: "${u["@index"]}" on term "${n}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});g["@index"]=u["@index"]}if("@context"in u&&(g["@context"]=u["@context"]),"@language"in u&&!("@type"in u)){let e=u["@language"];if(null!==e&&!s(e))throw new a("Invalid JSON-LD syntax; @context @language value must be a string or null.","jsonld.SyntaxError",{code:"invalid language mapping",context:t});null!==e&&(e=e.toLowerCase()),g["@language"]=e}if("@prefix"in u){if(n.match(/:|\//))throw new a("Invalid JSON-LD syntax; @context @prefix used on a compact IRI term","jsonld.SyntaxError",{code:"invalid term definition",context:t});if(m.isKeyword(g["@id"]))throw new a("Invalid JSON-LD syntax; keywords may not be used as prefixes","jsonld.SyntaxError",{code:"invalid term definition",context:t});if("boolean"!=typeof u["@prefix"])throw new a("Invalid JSON-LD syntax; @context value for @prefix must be boolean","jsonld.SyntaxError",{code:"invalid @prefix value",context:t});g._prefix=!0===u["@prefix"]}if("@direction"in u){const e=u["@direction"];if(null!==e&&"ltr"!==e&&"rtl"!==e)throw new a('Invalid JSON-LD syntax; @direction value must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:t});g["@direction"]=e}if("@nest"in u){const e=u["@nest"];if(!s(e)||"@nest"!==e&&0===e.indexOf("@"))throw new a("Invalid JSON-LD syntax; @context @nest value must be a string which is not a keyword other than @nest.","jsonld.SyntaxError",{code:"invalid @nest value",context:t});g["@nest"]=e}const j=g["@id"];if("@context"===j||"@preserve"===j)throw new a("Invalid JSON-LD syntax; @context and @preserve cannot be aliased.","jsonld.SyntaxError",{code:"invalid keyword alias",context:t});if(h&&h.protected&&!d&&(e.protected[n]=!0,g.protected=!0,!b(h,g)))throw new a("Invalid JSON-LD syntax; tried to redefine a protected term.","jsonld.SyntaxError",{code:"protected term redefinition",context:t,term:n})},m.expandIri=(e,t,n,o)=>x(e,t,n,void 0,void 0,o),m.getInitialContext=e=>{const t=JSON.stringify({processingMode:e.processingMode}),n=y.get(t);if(n)return n;const a={processingMode:e.processingMode,mappings:new Map,inverse:null,getInverse:function(){const e=this;if(e.inverse)return e.inverse;const t=e.inverse={},n=e.fastCurieMap={},o={},a=(e["@language"]||"@none").toLowerCase(),s=e["@direction"],l=e.mappings,c=[...l.keys()].sort(g);for(const e of c){const r=l.get(e);if(null===r)continue;let c=r["@container"]||"@none";if(c=[].concat(c).sort().join(""),null===r["@id"])continue;const d=v(r["@id"]);for(const l of d){let d=t[l];const u=m.isKeyword(l);if(d)u||r._termHasColon||o[l].push(e);else if(t[l]=d={},!u&&!r._termHasColon){o[l]=[e];const t={iri:l,terms:o[l]};l[0]in n?n[l[0]].push(t):n[l[0]]=[t]}if(d[c]||(d[c]={"@language":{},"@type":{},"@any":{}}),d=d[c],i(e,d["@any"],"@none"),r.reverse)i(e,d["@type"],"@reverse");else if("@none"===r["@type"])i(e,d["@any"],"@none"),i(e,d["@language"],"@none"),i(e,d["@type"],"@none");else if("@type"in r)i(e,d["@type"],r["@type"]);else if("@language"in r&&"@direction"in r){const t=r["@language"],n=r["@direction"];i(e,d["@language"],t&&n?`${t}_${n}`.toLowerCase():t?t.toLowerCase():n?`_${n}`:"@null")}else"@language"in r?i(e,d["@language"],(r["@language"]||"@null").toLowerCase()):"@direction"in r?r["@direction"]?i(e,d["@language"],`_${r["@direction"]}`):i(e,d["@language"],"@none"):s?(i(e,d["@language"],`_${s}`),i(e,d["@language"],"@none"),i(e,d["@type"],"@none")):(i(e,d["@language"],a),i(e,d["@language"],"@none"),i(e,d["@type"],"@none"))}}for(const e in n)r(n,e,1);return t},clone:function(){const e={};return e.mappings=o.clone(this.mappings),e.clone=this.clone,e.inverse=null,e.getInverse=this.getInverse,e.protected=o.clone(this.protected),this.previousContext&&(e.previousContext=this.previousContext.clone()),e.revertToPreviousContext=this.revertToPreviousContext,"@base"in this&&(e["@base"]=this["@base"]),"@language"in this&&(e["@language"]=this["@language"]),"@vocab"in this&&(e["@vocab"]=this["@vocab"]),e},revertToPreviousContext:function(){return this.previousContext?this.previousContext.clone():this},protected:{}};return 1e4===y.size&&y.clear(),y.set(t,a),a;function r(e,t,n){const o=e[t],a=e[t]={};let i,s;for(const e of o)i=e.iri,s=n>=i.length?"":i[n],s in a?a[s].push(e):a[s]=[e];for(const e in a)""!==e&&r(a,e,n+1)}function i(e,t,n){t.hasOwnProperty(n)||(t[n]=e)}},m.getContextValue=(e,t,n)=>{if(null===t){if("@context"===n)return;return null}if(e.mappings.has(t)){const o=e.mappings.get(t);if(l(n))return o;if(o.hasOwnProperty(n))return o[n]}return"@language"===n&&n in e||"@direction"===n&&n in e?e[n]:"@context"!==n?null:void 0},m.processingMode=(e,t)=>t.toString()>="1.1"?!e.processingMode||e.processingMode>="json-ld-"+t.toString():"json-ld-1.0"===e.processingMode,m.isKeyword=e=>{if(!s(e)||"@"!==e[0])return!1;switch(e){case"@base":case"@container":case"@context":case"@default":case"@direction":case"@embed":case"@explicit":case"@graph":case"@id":case"@included":case"@index":case"@json":case"@language":case"@list":case"@nest":case"@none":case"@omitDefault":case"@prefix":case"@preserve":case"@protected":case"@requireAll":case"@reverse":case"@set":case"@type":case"@value":case"@version":case"@vocab":return!0}return!1}},27752:function(e,t,n){!function(e){if(!e.setImmediate){var t,n,o,a,r,i=1,s={},l=!1,c=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?t=function(e){process.nextTick(function(){p(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(a="setImmediate$"+Math.random()+"$",r=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&p(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",r,!1):e.attachEvent("onmessage",r),t=function(t){e.postMessage(a+t,"*")}):e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},t=function(e){o.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?(n=c.documentElement,t=function(e){var t=c.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.appendChild(t)}):t=function(e){setTimeout(p,0,e)},d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var n=new Array(arguments.length-1),o=0;o<n.length;o++)n[o]=arguments[o+1];var a={callback:e,args:n};return s[i]=a,t(i),i++},d.clearImmediate=u}function u(e){delete s[e]}function p(e){if(l)setTimeout(p,0,e);else{var t=s[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{u(e),l=!1}}}}}("undefined"==typeof self?void 0===n.g?this:n.g:self)},30312:(e,t,n)=>{const o=n(55242),a=n(51572);e.exports=class extends a{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new o("sha1")}modifyFirstDegreeComponent(e,t,n){return"BlankNode"!==t.termType?t:"graph"===n?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}async createHashToRelated(e,t){const n=new Map,o=this.blankNodeInfo.get(e).quads;let a=0;for(const r of o){let o,i;if("BlankNode"===r.subject.termType&&r.subject.value!==e)i=r.subject.value,o="p";else{if("BlankNode"!==r.object.termType||r.object.value===e)continue;i=r.object.value,o="r"}++a%100==0&&await this._yield();const s=await this.hashRelatedBlankNode(i,r,t,o),l=n.get(s);l?l.push(i):n.set(s,[i])}return n}}},32722:(e,t,n)=>{const o=n(70050),a=n(85229),r=n(60299),{REGEX_BCP47:i,addValue:s}=n(53096),{handleEvent:l}=n(67749),{RDF_LIST:c,RDF_FIRST:d,RDF_REST:u,RDF_NIL:p,RDF_TYPE:h,RDF_JSON_LITERAL:f,XSD_BOOLEAN:v,XSD_DOUBLE:g,XSD_INTEGER:y,XSD_STRING:m}=n(49447),x={};function b(e,t,n,a){if(e.termType.endsWith("Node"))return{"@id":e.value};const s={"@value":e.value};if(e.language)e.language.match(i)||a.eventHandler&&l({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e.language}},options:a}),s["@language"]=e.language;else{let c=e.datatype.value;if(c||(c=m),c===f){c="@json";try{s["@value"]=JSON.parse(s["@value"])}catch(e){throw new o("JSON literal could not be parsed.","jsonld.InvalidJsonLiteral",{code:"invalid JSON literal",value:s["@value"],cause:e})}}if(t){if(c===v)"true"===s["@value"]?s["@value"]=!0:"false"===s["@value"]&&(s["@value"]=!1);else if(r.isNumeric(s["@value"]))if(c===y){const e=parseInt(s["@value"],10);e.toFixed(0)===s["@value"]&&(s["@value"]=e)}else c===g&&(s["@value"]=parseFloat(s["@value"]));[v,y,g,m].includes(c)||(s["@type"]=c)}else if("i18n-datatype"===n&&c.startsWith("https://www.w3.org/ns/i18n#")){const[,e,t]=c.split(/[#_]/);e.length>0&&(s["@language"]=e,e.match(i)||a.eventHandler&&l({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:a})),s["@direction"]=t}else c!==m&&(s["@type"]=c)}return s}e.exports=x,x.fromRDF=async(e,t)=>{const{useRdfType:n=!1,useNativeTypes:i=!1,rdfDirection:l=null}=t,f={},v={"@default":f},g={};if(l){if("compound-literal"===l)throw new o("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:l});if("i18n-datatype"!==l)throw new o("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:l})}for(const o of e){const e="DefaultGraph"===o.graph.termType?"@default":o.graph.value;e in v||(v[e]={}),"@default"===e||e in f||(f[e]={"@id":e});const a=v[e],r=o.subject.value,c=o.predicate.value,d=o.object;r in a||(a[r]={"@id":r});const u=a[r],y=d.termType.endsWith("Node");if(y&&!(d.value in a)&&(a[d.value]={"@id":d.value}),c===h&&!n&&y){s(u,"@type",d.value,{propertyIsArray:!0});continue}const m=b(d,i,l,t);if(s(u,c,m,{propertyIsArray:!0}),y)if(d.value===p){const e=a[d.value];"usages"in e||(e.usages=[]),e.usages.push({node:u,property:c,value:m})}else d.value in g?g[d.value]=!1:g[d.value]={node:u,property:c,value:m}}for(const e in v){const t=v[e];if(!(p in t))continue;const n=t[p];if(n.usages){for(let e of n.usages){let n=e.node,o=e.property,i=e.value;const s=[],l=[];let p=Object.keys(n).length;for(;o===u&&r.isObject(g[n["@id"]])&&r.isArray(n[d])&&1===n[d].length&&r.isArray(n[u])&&1===n[u].length&&(3===p||4===p&&r.isArray(n["@type"])&&1===n["@type"].length&&n["@type"][0]===c)&&(s.push(n[d][0]),l.push(n["@id"]),e=g[n["@id"]],n=e.node,o=e.property,i=e.value,p=Object.keys(n).length,a.isBlankNode(n)););delete i["@id"],i["@list"]=s.reverse();for(const e of l)delete t[e]}delete n.usages}}const y=[],m=Object.keys(f).sort();for(const e of m){const t=f[e];if(e in v){const n=t["@graph"]=[],o=v[e],r=Object.keys(o).sort();for(const e of r){const t=o[e];a.isSubjectReference(t)||n.push(t)}}a.isSubjectReference(t)||y.push(t)}return y}},44962:e=>{e.exports=function e(t){return null===t||"object"!=typeof t||null!=t.toJSON?JSON.stringify(t):Array.isArray(t)?"["+t.reduce((t,n,o)=>t+(0===o?"":",")+e(void 0===n||"symbol"==typeof n?null:n),"")+"]":"{"+Object.keys(t).sort().reduce((n,o,a)=>void 0===t[o]||"symbol"==typeof t[o]?n:n+(0===n.length?"":",")+e(o)+":"+e(t[o]),"")+"}"}},49447:e=>{const t="http://www.w3.org/1999/02/22-rdf-syntax-ns#",n="http://www.w3.org/2001/XMLSchema#";e.exports={LINK_HEADER_REL:"http://www.w3.org/ns/json-ld#context",LINK_HEADER_CONTEXT:"http://www.w3.org/ns/json-ld#context",RDF:t,RDF_LIST:t+"List",RDF_FIRST:t+"first",RDF_REST:t+"rest",RDF_NIL:t+"nil",RDF_TYPE:t+"type",RDF_PLAIN_LITERAL:t+"PlainLiteral",RDF_XML_LITERAL:t+"XMLLiteral",RDF_JSON_LITERAL:t+"JSON",RDF_OBJECT:t+"object",RDF_LANGSTRING:t+"langString",XSD:n,XSD_BOOLEAN:n+"boolean",XSD_DOUBLE:n+"double",XSD_INTEGER:n+"integer",XSD_STRING:n+"string"}},51572:(e,t,n)=>{const o=n(95366),a=n(55242),r=n(63894),i=n(8488);function s(e,t){return e.hash<t.hash?-1:e.hash>t.hash?1:0}e.exports=class{constructor({createMessageDigest:e=()=>new a("sha256"),canonicalIdMap:t=new Map,maxDeepIterations:n=1/0}={}){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new o("_:c14n",t),this.createMessageDigest=e,this.maxDeepIterations=n,this.quads=null,this.deepIterations=null}async main(e){this.deepIterations=new Map,this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,n=[...this.blankNodeInfo.keys()];let a=0;for(const e of n)++a%100==0&&await this._yield(),await this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const r=[...t.keys()].sort(),l=[];for(const e of r){const n=t.get(e);if(n.length>1){l.push(n);continue}const o=n[0];this.canonicalIssuer.getId(o)}for(const e of l){const t=[];for(const n of e){if(this.canonicalIssuer.hasId(n))continue;const e=new o("_:b");e.getId(n);const a=await this.hashNDegreeQuads(n,e);t.push(a)}t.sort(s);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const c=[];for(const e of this.quads){const t=i.serializeQuadComponents(this._componentWithCanonicalId(e.subject),e.predicate,this._componentWithCanonicalId(e.object),this._componentWithCanonicalId(e.graph));c.push(t)}return c.sort(),c.join("")}async hashFirstDegreeQuads(e){const t=[],n=this.blankNodeInfo.get(e),o=n.quads;for(const n of o){const o={subject:null,predicate:n.predicate,object:null,graph:null};o.subject=this.modifyFirstDegreeComponent(e,n.subject,"subject"),o.object=this.modifyFirstDegreeComponent(e,n.object,"object"),o.graph=this.modifyFirstDegreeComponent(e,n.graph,"graph"),t.push(i.serializeQuad(o))}t.sort();const a=this.createMessageDigest();for(const e of t)a.update(e);return n.hash=await a.digest(),n.hash}async hashRelatedBlankNode(e,t,n,o){let a;a=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):n.hasId(e)?n.getId(e):this.blankNodeInfo.get(e).hash;const r=this.createMessageDigest();return r.update(o),"g"!==o&&r.update(this.getRelatedPredicate(t)),r.update(a),r.digest()}async hashNDegreeQuads(e,t){const n=this.deepIterations.get(e)||0;if(n>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(e,n+1);const o=this.createMessageDigest(),a=await this.createHashToRelated(e,t),i=[...a.keys()].sort();for(const e of i){o.update(e);let n,i="";const s=new r(a.get(e));let l=0;for(;s.hasNext();){const e=s.next();++l%3==0&&await this._yield();let o=t.clone(),a="";const r=[];let c=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?a+=this.canonicalIssuer.getId(t):(o.hasId(t)||r.push(t),a+=o.getId(t)),0!==i.length&&a>i){c=!0;break}if(!c){for(const e of r){const t=await this.hashNDegreeQuads(e,o);if(a+=o.getId(e),a+=`<${t.hash}>`,o=t.issuer,0!==i.length&&a>i){c=!0;break}}c||(0===i.length||a<i)&&(i=a,n=o)}}o.update(i),t=n}return{hash:await o.digest(),issuer:t}}modifyFirstDegreeComponent(e,t){return"BlankNode"!==t.termType?t:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return`<${e.predicate.value}>`}async createHashToRelated(e,t){const n=new Map,o=this.blankNodeInfo.get(e).quads;let a=0;for(const r of o)++a%100==0&&await this._yield(),await Promise.all([this._addRelatedBlankNodeHash({quad:r,component:r.subject,position:"s",id:e,issuer:t,hashToRelated:n}),this._addRelatedBlankNodeHash({quad:r,component:r.object,position:"o",id:e,issuer:t,hashToRelated:n}),this._addRelatedBlankNodeHash({quad:r,component:r.graph,position:"g",id:e,issuer:t,hashToRelated:n})]);return n}async _hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const n=await this.hashFirstDegreeQuads(e),o=t.get(n);o?o.push(e):t.set(n,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const n=t.value,o=this.blankNodeInfo.get(n);o?o.quads.add(e):this.blankNodeInfo.set(n,{quads:new Set([e]),hash:null})}async _addRelatedBlankNodeHash({quad:e,component:t,position:n,id:o,issuer:a,hashToRelated:r}){if("BlankNode"!==t.termType||t.value===o)return;const i=t.value,s=await this.hashRelatedBlankNode(i,e,a,n),l=r.get(s);l?l.push(i):r.set(s,[i])}_componentWithCanonicalId(e){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}async _yield(){return new Promise(e=>setImmediate(e))}}},51591:(e,t,n)=>{const o=n(70050),{isArray:a,isObject:r,isString:i,isUndefined:s}=n(60299),{isList:l,isValue:c,isGraph:d,isSimpleGraph:u,isSubjectReference:p}=n(85229),{expandIri:h,getContextValue:f,isKeyword:v,process:g,processingMode:y}=n(27409),{removeBase:m,prependBase:x}=n(19455),{REGEX_KEYWORD:b,addValue:w,asArray:j,compareShortestLeast:I}=n(53096),N={};function S(e,t,n){if("@nest"!==h(e,t,{vocab:!0},n))throw new o("JSON-LD compact error; nested property must have an @nest value resolving to @nest.","jsonld.SyntaxError",{code:"invalid @nest value"})}e.exports=N,N.compact=async({activeCtx:e,activeProperty:t=null,element:n,options:h={}})=>{if(a(n)){let o=[];for(let a=0;a<n.length;++a){const r=await N.compact({activeCtx:e,activeProperty:t,element:n[a],options:h});null!==r&&o.push(r)}return h.compactArrays&&1===o.length&&0===(f(e,t,"@container")||[]).length&&(o=o[0]),o}const m=f(e,t,"@context");if(s(m)||(e=await g({activeCtx:e,localCtx:m,propagate:!0,overrideProtected:!0,options:h})),r(n)){if(h.link&&"@id"in n&&h.link.hasOwnProperty(n["@id"])){const e=h.link[n["@id"]];for(let t=0;t<e.length;++t)if(e[t].expanded===n)return e[t].compacted}if(c(n)||p(n)){const o=N.compactValue({activeCtx:e,activeProperty:t,value:n,options:h});return h.link&&p(n)&&(h.link.hasOwnProperty(n["@id"])||(h.link[n["@id"]]=[]),h.link[n["@id"]].push({expanded:n,compacted:o})),o}if(l(n)&&(f(e,t,"@container")||[]).includes("@list"))return N.compact({activeCtx:e,activeProperty:t,element:n["@list"],options:h});const m="@reverse"===t,x={},b=e;c(n)||p(n)||(e=e.revertToPreviousContext());const I=f(b,t,"@context");s(I)||(e=await g({activeCtx:e,localCtx:I,propagate:!0,overrideProtected:!0,options:h})),h.link&&"@id"in n&&(h.link.hasOwnProperty(n["@id"])||(h.link[n["@id"]]=[]),h.link[n["@id"]].push({expanded:n,compacted:x}));let O=n["@type"]||[];O.length>1&&(O=Array.from(O).sort());const E=e;for(const t of O){const n=N.compactIri({activeCtx:E,iri:t,relativeTo:{vocab:!0}}),o=f(b,n,"@context");s(o)||(e=await g({activeCtx:e,localCtx:o,options:h,propagate:!1}))}const D=Object.keys(n).sort();for(const s of D){const p=n[s];if("@id"===s){let t=j(p).map(t=>N.compactIri({activeCtx:e,iri:t,relativeTo:{vocab:!1},base:h.base}));1===t.length&&(t=t[0]),x[N.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t;continue}if("@type"===s){let t=j(p).map(e=>N.compactIri({activeCtx:b,iri:e,relativeTo:{vocab:!0}}));1===t.length&&(t=t[0]);const n=N.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}}),o=(f(e,n,"@container")||[]).includes("@set")&&y(e,1.1)||a(t)&&0===p.length;w(x,n,t,{propertyIsArray:o});continue}if("@reverse"===s){const t=await N.compact({activeCtx:e,activeProperty:"@reverse",element:p,options:h});for(const n in t)if(e.mappings.has(n)&&e.mappings.get(n).reverse){const o=t[n],a=(f(e,n,"@container")||[]).includes("@set")||!h.compactArrays;w(x,n,o,{propertyIsArray:a}),delete t[n]}if(Object.keys(t).length>0){const n=N.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(x,n,t)}continue}if("@preserve"===s){const n=await N.compact({activeCtx:e,activeProperty:t,element:p,options:h});a(n)&&0===n.length||w(x,s,n);continue}if("@index"===s){if((f(e,t,"@container")||[]).includes("@index"))continue;const n=N.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(x,n,p);continue}if("@graph"!==s&&"@list"!==s&&"@included"!==s&&v(s)){const t=N.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(x,t,p);continue}if(!a(p))throw new o("JSON-LD expansion error; expanded value must be an array.","jsonld.SyntaxError");if(0===p.length){const t=N.compactIri({activeCtx:e,iri:s,value:p,relativeTo:{vocab:!0},reverse:m}),n=e.mappings.has(t)?e.mappings.get(t)["@nest"]:null;let o=x;n&&(S(e,n,h),r(x[n])||(x[n]={}),o=x[n]),w(o,t,p,{propertyIsArray:!0})}for(const t of p){const n=N.compactIri({activeCtx:e,iri:s,value:t,relativeTo:{vocab:!0},reverse:m}),o=e.mappings.has(n)?e.mappings.get(n)["@nest"]:null;let p=x;o&&(S(e,o,h),r(x[o])||(x[o]={}),p=x[o]);const v=f(e,n,"@container")||[],g=d(t),y=l(t);let b;y?b=t["@list"]:g&&(b=t["@graph"]);let I=await N.compact({activeCtx:e,activeProperty:n,element:y||g?b:t,options:h});if(y){if(a(I)||(I=[I]),v.includes("@list")){w(p,n,I,{valueIsArray:!0,allowDuplicate:!0});continue}I={[N.compactIri({activeCtx:e,iri:"@list",relativeTo:{vocab:!0}})]:I},"@index"in t&&(I[N.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"])}if(g)if(v.includes("@graph")&&(v.includes("@id")||v.includes("@index")&&u(t))){let o;p.hasOwnProperty(n)?o=p[n]:p[n]=o={};const a=(v.includes("@id")?t["@id"]:t["@index"])||N.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}});w(o,a,I,{propertyIsArray:!h.compactArrays||v.includes("@set")})}else v.includes("@graph")&&u(t)?(a(I)&&I.length>1&&(I={"@included":I}),w(p,n,I,{propertyIsArray:!h.compactArrays||v.includes("@set")})):(a(I)&&1===I.length&&h.compactArrays&&(I=I[0]),I={[N.compactIri({activeCtx:e,iri:"@graph",relativeTo:{vocab:!0}})]:I},"@id"in t&&(I[N.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t["@id"]),"@index"in t&&(I[N.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"]),w(p,n,I,{propertyIsArray:!h.compactArrays||v.includes("@set")}));else if(v.includes("@language")||v.includes("@index")||v.includes("@id")||v.includes("@type")){let o,a;if(p.hasOwnProperty(n)?o=p[n]:p[n]=o={},v.includes("@language"))c(I)&&(I=I["@value"]),a=t["@language"];else if(v.includes("@index")){const o=f(e,n,"@index")||"@index",r=N.compactIri({activeCtx:e,iri:o,relativeTo:{vocab:!0}});if("@index"===o)a=t["@index"],delete I[r];else{let e;if([a,...e]=j(I[o]||[]),i(a))switch(e.length){case 0:delete I[o];break;case 1:I[o]=e[0];break;default:I[o]=e}else a=null}}else if(v.includes("@id")){const t=N.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}});a=I[t],delete I[t]}else if(v.includes("@type")){const o=N.compactIri({activeCtx:e,iri