@pod-os/elements 0.32.1-rc.0fc2066.0 → 0.32.1-rc.650bacd.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.
Files changed (42) hide show
  1. package/dist/cjs/{dist-O5YU2L4C-731be513.js → dist-O5YU2L4C-25f1cfd1.js} +2 -2
  2. package/dist/cjs/{dist-O5YU2L4C-731be513.js.map → dist-O5YU2L4C-25f1cfd1.js.map} +1 -1
  3. package/dist/cjs/{index-ad3152fe.js → index-8e51b348.js} +9 -3
  4. package/dist/cjs/index-8e51b348.js.map +1 -0
  5. package/dist/cjs/ion-badge_4.cjs.entry.js +1 -1
  6. package/dist/cjs/ion-icon_31.cjs.entry.js +1 -1
  7. package/dist/cjs/{jsonld-X74JI4TL-57175b0c.js → jsonld-X74JI4TL-75fcce98.js} +2 -2
  8. package/dist/cjs/{jsonld-X74JI4TL-57175b0c.js.map → jsonld-X74JI4TL-75fcce98.js.map} +1 -1
  9. package/dist/cjs/pos-container-contents.cjs.entry.js +1 -1
  10. package/dist/cjs/pos-subjects.cjs.entry.js +1 -1
  11. package/dist/components/index10.js +6 -0
  12. package/dist/components/index10.js.map +1 -1
  13. package/dist/elements/elements.esm.js +1 -1
  14. package/dist/elements/{p-9553f91e.entry.js → p-9fc880cd.entry.js} +2 -2
  15. package/dist/elements/{p-6f41afe0.js → p-a794df9b.js} +2 -2
  16. package/dist/elements/p-a962c4b4.js +72 -0
  17. package/dist/elements/p-a962c4b4.js.map +1 -0
  18. package/dist/elements/{p-dc36a132.entry.js → p-aff3b672.entry.js} +2 -2
  19. package/dist/elements/{p-a16916b7.js → p-b044cf9a.js} +2 -2
  20. package/dist/elements/{p-ed5c0c18.entry.js → p-b9400211.entry.js} +2 -2
  21. package/dist/elements/{p-226b6778.entry.js → p-d6be765b.entry.js} +2 -2
  22. package/dist/esm/{dist-O5YU2L4C-d78d21aa.js → dist-O5YU2L4C-a27a7092.js} +2 -2
  23. package/dist/esm/{dist-O5YU2L4C-d78d21aa.js.map → dist-O5YU2L4C-a27a7092.js.map} +1 -1
  24. package/dist/esm/{index-f791fd66.js → index-e9875204.js} +9 -3
  25. package/dist/esm/index-e9875204.js.map +1 -0
  26. package/dist/esm/ion-badge_4.entry.js +1 -1
  27. package/dist/esm/ion-icon_31.entry.js +1 -1
  28. package/dist/esm/{jsonld-X74JI4TL-4f85395c.js → jsonld-X74JI4TL-4325758a.js} +2 -2
  29. package/dist/esm/{jsonld-X74JI4TL-4f85395c.js.map → jsonld-X74JI4TL-4325758a.js.map} +1 -1
  30. package/dist/esm/pos-container-contents.entry.js +1 -1
  31. package/dist/esm/pos-subjects.entry.js +1 -1
  32. package/package.json +1 -1
  33. package/dist/cjs/index-ad3152fe.js.map +0 -1
  34. package/dist/elements/p-a004ecd1.js +0 -72
  35. package/dist/elements/p-a004ecd1.js.map +0 -1
  36. package/dist/esm/index-f791fd66.js.map +0 -1
  37. /package/dist/elements/{p-9553f91e.entry.js.map → p-9fc880cd.entry.js.map} +0 -0
  38. /package/dist/elements/{p-6f41afe0.js.map → p-a794df9b.js.map} +0 -0
  39. /package/dist/elements/{p-dc36a132.entry.js.map → p-aff3b672.entry.js.map} +0 -0
  40. /package/dist/elements/{p-a16916b7.js.map → p-b044cf9a.js.map} +0 -0
  41. /package/dist/elements/{p-ed5c0c18.entry.js.map → p-b9400211.entry.js.map} +0 -0
  42. /package/dist/elements/{p-226b6778.entry.js.map → p-d6be765b.entry.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{d as e}from"./p-a004ecd1.js";var t=e({"../node_modules/rdf-canonize/lib/IdentifierIssuer.js"(e,t){t.exports=class e{constructor(e,t=new Map,n=0){this.prefix=e;this._existing=t;this.counter=n}clone(){const{prefix:t,_existing:n,counter:i}=this;return new e(t,new Map(n),i)}getId(e){const t=e&&this._existing.get(e);if(t){return t}const n=this.prefix+this.counter;this.counter++;if(e){this._existing.set(e,n)}return n}hasId(e){return this._existing.has(e)}getOldIds(){return[...this._existing.keys()]}}}});var n=e({"../node_modules/setimmediate/setImmediate.js"(e){(function(e,t){if(e.setImmediate){return}var n=1;var i={};var o=false;var r=e.document;var s;function a(e){if(typeof e!=="function"){e=new Function(""+e)}var t=new Array(arguments.length-1);for(var o=0;o<t.length;o++){t[o]=arguments[o+1]}var r={callback:e,args:t};i[n]=r;s(n);return n++}function l(e){delete i[e]}function c(e){var n=e.callback;var i=e.args;switch(i.length){case 0:n();break;case 1:n(i[0]);break;case 2:n(i[0],i[1]);break;case 3:n(i[0],i[1],i[2]);break;default:n.apply(t,i);break}}function f(e){if(o){setTimeout(f,0,e)}else{var t=i[e];if(t){o=true;try{c(t)}finally{l(e);o=false}}}}function u(){s=function(e){process.nextTick((function(){f(e)}))}}function d(){if(e.postMessage&&!e.importScripts){var t=true;var n=e.onmessage;e.onmessage=function(){t=false};e.postMessage("","*");e.onmessage=n;return t}}function v(){var t="setImmediate$"+Math.random()+"$";var n=function(n){if(n.source===e&&typeof n.data==="string"&&n.data.indexOf(t)===0){f(+n.data.slice(t.length))}};if(e.addEventListener){e.addEventListener("message",n,false)}else{e.attachEvent("onmessage",n)}s=function(n){e.postMessage(t+n,"*")}}function p(){var e=new MessageChannel;e.port1.onmessage=function(e){var t=e.data;f(t)};s=function(t){e.port2.postMessage(t)}}function h(){var e=r.documentElement;s=function(t){var n=r.createElement("script");n.onreadystatechange=function(){f(t);n.onreadystatechange=null;e.removeChild(n);n=null};e.appendChild(n)}}function y(){s=function(e){setTimeout(f,0,e)}}var w=Object.getPrototypeOf&&Object.getPrototypeOf(e);w=w&&w.setTimeout?w:e;if({}.toString.call(e.process)==="[object process]"){u()}else if(d()){v()}else if(e.MessageChannel){p()}else if(r&&"onreadystatechange"in r.createElement("script")){h()}else{y()}w.setImmediate=a;w.clearImmediate=l})(typeof self==="undefined"?typeof global==="undefined"?e:global:self)}});var i=e({"../node_modules/rdf-canonize/lib/MessageDigest-browser.js"(e,t){n();var i=self.crypto||self.msCrypto;t.exports=class e{constructor(e){if(!(i&&i.subtle)){throw new Error("crypto.subtle not found.")}if(e==="sha256"){this.algorithm={name:"SHA-256"}}else if(e==="sha1"){this.algorithm={name:"SHA-1"}}else{throw new Error(`Unsupported algorithm "${e}".`)}this._content=""}update(e){this._content+=e}async digest(){const e=(new TextEncoder).encode(this._content);const t=new Uint8Array(await i.subtle.digest(this.algorithm,e));let n="";for(let e=0;e<t.length;++e){n+=t[e].toString(16).padStart(2,"0")}return n}}}});var o=e({"../node_modules/rdf-canonize/lib/Permuter.js"(e,t){t.exports=class e{constructor(e){this.current=e.sort();this.done=false;this.dir=new Map;for(let t=0;t<e.length;++t){this.dir.set(e[t],true)}}hasNext(){return!this.done}next(){const{current:e,dir:t}=this;const n=e.slice();let i=null;let o=0;const r=e.length;for(let n=0;n<r;++n){const s=e[n];const a=t.get(s);if((i===null||s>i)&&(a&&n>0&&s>e[n-1]||!a&&n<r-1&&s>e[n+1])){i=s;o=n}}if(i===null){this.done=true}else{const n=t.get(i)?o-1:o+1;e[o]=e[n];e[n]=i;for(const n of e){if(n>i){t.set(n,!t.get(n))}}}return n}}}});var r=e({"../node_modules/rdf-canonize/lib/NQuads.js"(e,t){var n="http://www.w3.org/1999/02/22-rdf-syntax-ns#";var i=n+"langString";var o="http://www.w3.org/2001/XMLSchema#string";var r="NamedNode";var s="BlankNode";var a="Literal";var l="DefaultGraph";var c={};(()=>{const e="(?:<([^:]+:[^>]*)>)";const t="A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�";const n=t+"_";const i=n+"0-9-·̀-ͯ‿-⁀";const o="(_:(?:["+n+"0-9])(?:(?:["+i+".])*(?:["+i+"]))?)";const r=o;const s='"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"';const a="(?:\\^\\^"+e+")";const l="(?:@([a-zA-Z]+(?:-[a-zA-Z0-9]+)*))";const f="(?:"+s+"(?:"+a+"|"+l+")?)";const u="[ \\t]+";const d="[ \\t]*";const v="(?:"+e+"|"+r+")"+u;const p=e+u;const h="(?:"+e+"|"+r+"|"+f+")"+d;const y="(?:\\.|(?:(?:"+e+"|"+r+")"+d+"\\.))";c.eoln=/(?:\r\n)|(?:\n)|(?:\r)/g;c.empty=new RegExp("^"+d+"$");c.quad=new RegExp("^"+d+v+p+h+y+d+"$")})();t.exports=class e{static parse(e){const t=[];const n={};const u=e.split(c.eoln);let d=0;for(const e of u){d++;if(c.empty.test(e)){continue}const u=e.match(c.quad);if(u===null){throw new Error("N-Quads parse error on line "+d+".")}const v={subject:null,predicate:null,object:null,graph:null};if(u[1]!==void 0){v.subject={termType:r,value:u[1]}}else{v.subject={termType:s,value:u[2]}}v.predicate={termType:r,value:u[3]};if(u[4]!==void 0){v.object={termType:r,value:u[4]}}else if(u[5]!==void 0){v.object={termType:s,value:u[5]}}else{v.object={termType:a,value:void 0,datatype:{termType:r}};if(u[7]!==void 0){v.object.datatype.value=u[7]}else if(u[8]!==void 0){v.object.datatype.value=i;v.object.language=u[8]}else{v.object.datatype.value=o}v.object.value=p(u[6])}if(u[9]!==void 0){v.graph={termType:r,value:u[9]}}else if(u[10]!==void 0){v.graph={termType:s,value:u[10]}}else{v.graph={termType:l,value:""}}if(!(v.graph.value in n)){n[v.graph.value]=[v];t.push(v)}else{let e=true;const i=n[v.graph.value];for(const t of i){if(f(t,v)){e=false;break}}if(e){i.push(v);t.push(v)}}}return t}static serialize(t){if(!Array.isArray(t)){t=e.legacyDatasetToQuads(t)}const n=[];for(const i of t){n.push(e.serializeQuad(i))}return n.sort().join("")}static serializeQuadComponents(e,t,n,a){let l="";if(e.termType===r){l+=`<${e.value}>`}else{l+=`${e.value}`}l+=` <${t.value}> `;if(n.termType===r){l+=`<${n.value}>`}else if(n.termType===s){l+=n.value}else{l+=`"${d(n.value)}"`;if(n.datatype.value===i){if(n.language){l+=`@${n.language}`}}else if(n.datatype.value!==o){l+=`^^<${n.datatype.value}>`}}if(a.termType===r){l+=` <${a.value}>`}else if(a.termType===s){l+=` ${a.value}`}l+=" .\n";return l}static serializeQuad(t){return e.serializeQuadComponents(t.subject,t.predicate,t.object,t.graph)}static legacyDatasetToQuads(e){const t=[];const n={"blank node":s,IRI:r,literal:a};for(const c in e){const f=e[c];f.forEach((e=>{const f={};for(const t in e){const s=e[t];const l={termType:n[s.type],value:s.value};if(l.termType===a){l.datatype={termType:r};if("datatype"in s){l.datatype.value=s.datatype}if("language"in s){if(!("datatype"in s)){l.datatype.value=i}l.language=s.language}else if(!("datatype"in s)){l.datatype.value=o}}f[t]=l}if(c==="@default"){f.graph={termType:l,value:""}}else{f.graph={termType:c.startsWith("_:")?s:r,value:c}}t.push(f)}))}return t}};function f(e,t){if(!(e.subject.termType===t.subject.termType&&e.object.termType===t.object.termType)){return false}if(!(e.subject.value===t.subject.value&&e.predicate.value===t.predicate.value&&e.object.value===t.object.value)){return false}if(e.object.termType!==a){return true}return e.object.datatype.termType===t.object.datatype.termType&&e.object.language===t.object.language&&e.object.datatype.value===t.object.datatype.value}var u=/["\\\n\r]/g;function d(e){return e.replace(u,(function(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r"}}))}var v=/(?:\\([tbnrf"'\\]))|(?:\\u([0-9A-Fa-f]{4}))|(?:\\U([0-9A-Fa-f]{8}))/g;function p(e){return e.replace(v,(function(e,t,n,i){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(i){throw new Error("Unsupported U escape")}}))}}});var s=e({"../node_modules/rdf-canonize/lib/URDNA2015.js"(e,n){var s=t();var a=i();var l=o();var c=r();n.exports=class e{constructor({createMessageDigest:e=(()=>new a("sha256")),canonicalIdMap:t=new Map,maxDeepIterations:n=Infinity}={}){this.name="URDNA2015";this.blankNodeInfo=new Map;this.canonicalIssuer=new s("_: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;const n=[...this.blankNodeInfo.keys()];let i=0;for(const e of n){if(++i%100===0){await this._yield()}await this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t})}const o=[...t.keys()].sort();const r=[];for(const e of o){const n=t.get(e);if(n.length>1){r.push(n);continue}const i=n[0];this.canonicalIssuer.getId(i)}for(const e of r){const t=[];for(const n of e){if(this.canonicalIssuer.hasId(n)){continue}const e=new s("_:b");e.getId(n);const i=await this.hashNDegreeQuads(n,e);t.push(i)}t.sort(f);for(const e of t){const t=e.issuer.getOldIds();for(const e of t){this.canonicalIssuer.getId(e)}}}const a=[];for(const e of this.quads){const t=c.serializeQuadComponents(this._componentWithCanonicalId(e.subject),e.predicate,this._componentWithCanonicalId(e.object),this._componentWithCanonicalId(e.graph));a.push(t)}a.sort();return a.join("")}async hashFirstDegreeQuads(e){const t=[];const n=this.blankNodeInfo.get(e);const i=n.quads;for(const n of i){const i={subject:null,predicate:n.predicate,object:null,graph:null};i.subject=this.modifyFirstDegreeComponent(e,n.subject,"subject");i.object=this.modifyFirstDegreeComponent(e,n.object,"object");i.graph=this.modifyFirstDegreeComponent(e,n.graph,"graph");t.push(c.serializeQuad(i))}t.sort();const o=this.createMessageDigest();for(const e of t){o.update(e)}n.hash=await o.digest();return n.hash}async hashRelatedBlankNode(e,t,n,i){let o;if(this.canonicalIssuer.hasId(e)){o=this.canonicalIssuer.getId(e)}else if(n.hasId(e)){o=n.getId(e)}else{o=this.blankNodeInfo.get(e).hash}const r=this.createMessageDigest();r.update(i);if(i!=="g"){r.update(this.getRelatedPredicate(t))}r.update(o);return 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 i=this.createMessageDigest();const o=await this.createHashToRelated(e,t);const r=[...o.keys()].sort();for(const e of r){i.update(e);let n="";let r;const s=new l(o.get(e));let a=0;while(s.hasNext()){const e=s.next();if(++a%3===0){await this._yield()}let i=t.clone();let o="";const l=[];let c=false;for(const t of e){if(this.canonicalIssuer.hasId(t)){o+=this.canonicalIssuer.getId(t)}else{if(!i.hasId(t)){l.push(t)}o+=i.getId(t)}if(n.length!==0&&o>n){c=true;break}}if(c){continue}for(const e of l){const t=await this.hashNDegreeQuads(e,i);o+=i.getId(e);o+=`<${t.hash}>`;i=t.issuer;if(n.length!==0&&o>n){c=true;break}}if(c){continue}if(n.length===0||o<n){n=o;r=i}}i.update(n);t=r}return{hash:await i.digest(),issuer:t}}modifyFirstDegreeComponent(e,t){if(t.termType!=="BlankNode"){return t}return{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return`<${e.predicate.value}>`}async createHashToRelated(e,t){const n=new Map;const i=this.blankNodeInfo.get(e).quads;let o=0;for(const r of i){if(++o%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);const i=t.get(n);if(!i){t.set(n,[e])}else{i.push(e)}}_addBlankNodeQuadInfo({quad:e,component:t}){if(t.termType!=="BlankNode"){return}const n=t.value;const i=this.blankNodeInfo.get(n);if(i){i.quads.add(e)}else{this.blankNodeInfo.set(n,{quads:new Set([e]),hash:null})}}async _addRelatedBlankNodeHash({quad:e,component:t,position:n,id:i,issuer:o,hashToRelated:r}){if(!(t.termType==="BlankNode"&&t.value!==i)){return}const s=t.value;const a=await this.hashRelatedBlankNode(s,e,o,n);const l=r.get(a);if(l){l.push(s)}else{r.set(a,[s])}}_componentWithCanonicalId(e){if(e.termType==="BlankNode"&&!e.value.startsWith(this.canonicalIssuer.prefix)){return{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}return e}async _yield(){return new Promise((e=>setImmediate(e)))}};function f(e,t){return e.hash<t.hash?-1:e.hash>t.hash?1:0}}});var a=e({"../node_modules/rdf-canonize/lib/URGNA2012.js"(e,t){var n=i();var o=s();t.exports=class e extends o{constructor(){super();this.name="URGNA2012";this.createMessageDigest=()=>new n("sha1")}modifyFirstDegreeComponent(e,t,n){if(t.termType!=="BlankNode"){return t}if(n==="graph"){return{termType:"BlankNode",value:"_:g"}}return{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}async createHashToRelated(e,t){const n=new Map;const i=this.blankNodeInfo.get(e).quads;let o=0;for(const r of i){let i;let s;if(r.subject.termType==="BlankNode"&&r.subject.value!==e){s=r.subject.value;i="p"}else if(r.object.termType==="BlankNode"&&r.object.value!==e){s=r.object.value;i="r"}else{continue}if(++o%100===0){await this._yield()}const a=await this.hashRelatedBlankNode(s,r,t,i);const l=n.get(a);if(l){l.push(s)}else{n.set(a,[s])}}return n}}}});var l=e({"../node_modules/rdf-canonize/lib/URDNA2015Sync.js"(e,n){var s=t();var a=i();var l=o();var c=r();n.exports=class e{constructor({createMessageDigest:e=(()=>new a("sha256")),canonicalIdMap:t=new Map,maxDeepIterations:n=Infinity}={}){this.name="URDNA2015";this.blankNodeInfo=new Map;this.canonicalIssuer=new s("_:c14n",t);this.createMessageDigest=e;this.maxDeepIterations=n;this.quads=null;this.deepIterations=null}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;const n=[...this.blankNodeInfo.keys()];for(const e of n){this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t})}const i=[...t.keys()].sort();const o=[];for(const e of i){const n=t.get(e);if(n.length>1){o.push(n);continue}const i=n[0];this.canonicalIssuer.getId(i)}for(const e of o){const t=[];for(const n of e){if(this.canonicalIssuer.hasId(n)){continue}const e=new s("_:b");e.getId(n);const i=this.hashNDegreeQuads(n,e);t.push(i)}t.sort(f);for(const e of t){const t=e.issuer.getOldIds();for(const e of t){this.canonicalIssuer.getId(e)}}}const r=[];for(const e of this.quads){const t=c.serializeQuadComponents(this._componentWithCanonicalId({component:e.subject}),e.predicate,this._componentWithCanonicalId({component:e.object}),this._componentWithCanonicalId({component:e.graph}));r.push(t)}r.sort();return r.join("")}hashFirstDegreeQuads(e){const t=[];const n=this.blankNodeInfo.get(e);const i=n.quads;for(const n of i){const i={subject:null,predicate:n.predicate,object:null,graph:null};i.subject=this.modifyFirstDegreeComponent(e,n.subject,"subject");i.object=this.modifyFirstDegreeComponent(e,n.object,"object");i.graph=this.modifyFirstDegreeComponent(e,n.graph,"graph");t.push(c.serializeQuad(i))}t.sort();const o=this.createMessageDigest();for(const e of t){o.update(e)}n.hash=o.digest();return n.hash}hashRelatedBlankNode(e,t,n,i){let o;if(this.canonicalIssuer.hasId(e)){o=this.canonicalIssuer.getId(e)}else if(n.hasId(e)){o=n.getId(e)}else{o=this.blankNodeInfo.get(e).hash}const r=this.createMessageDigest();r.update(i);if(i!=="g"){r.update(this.getRelatedPredicate(t))}r.update(o);return r.digest()}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 i=this.createMessageDigest();const o=this.createHashToRelated(e,t);const r=[...o.keys()].sort();for(const e of r){i.update(e);let n="";let r;const s=new l(o.get(e));while(s.hasNext()){const e=s.next();let i=t.clone();let o="";const a=[];let l=false;for(const t of e){if(this.canonicalIssuer.hasId(t)){o+=this.canonicalIssuer.getId(t)}else{if(!i.hasId(t)){a.push(t)}o+=i.getId(t)}if(n.length!==0&&o>n){l=true;break}}if(l){continue}for(const e of a){const t=this.hashNDegreeQuads(e,i);o+=i.getId(e);o+=`<${t.hash}>`;i=t.issuer;if(n.length!==0&&o>n){l=true;break}}if(l){continue}if(n.length===0||o<n){n=o;r=i}}i.update(n);t=r}return{hash:i.digest(),issuer:t}}modifyFirstDegreeComponent(e,t){if(t.termType!=="BlankNode"){return t}return{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return`<${e.predicate.value}>`}createHashToRelated(e,t){const n=new Map;const i=this.blankNodeInfo.get(e).quads;for(const o of i){this._addRelatedBlankNodeHash({quad:o,component:o.subject,position:"s",id:e,issuer:t,hashToRelated:n});this._addRelatedBlankNodeHash({quad:o,component:o.object,position:"o",id:e,issuer:t,hashToRelated:n});this._addRelatedBlankNodeHash({quad:o,component:o.graph,position:"g",id:e,issuer:t,hashToRelated:n})}return n}_hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const n=this.hashFirstDegreeQuads(e);const i=t.get(n);if(!i){t.set(n,[e])}else{i.push(e)}}_addBlankNodeQuadInfo({quad:e,component:t}){if(t.termType!=="BlankNode"){return}const n=t.value;const i=this.blankNodeInfo.get(n);if(i){i.quads.add(e)}else{this.blankNodeInfo.set(n,{quads:new Set([e]),hash:null})}}_addRelatedBlankNodeHash({quad:e,component:t,position:n,id:i,issuer:o,hashToRelated:r}){if(!(t.termType==="BlankNode"&&t.value!==i)){return}const s=t.value;const a=this.hashRelatedBlankNode(s,e,o,n);const l=r.get(a);if(l){l.push(s)}else{r.set(a,[s])}}_componentWithCanonicalId({component:e}){if(e.termType==="BlankNode"&&!e.value.startsWith(this.canonicalIssuer.prefix)){return{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}return e}};function f(e,t){return e.hash<t.hash?-1:e.hash>t.hash?1:0}}});var c=e({"../node_modules/rdf-canonize/lib/URGNA2012Sync.js"(e,t){var n=i();var o=l();t.exports=class e extends o{constructor(){super();this.name="URGNA2012";this.createMessageDigest=()=>new n("sha1")}modifyFirstDegreeComponent(e,t,n){if(t.termType!=="BlankNode"){return t}if(n==="graph"){return{termType:"BlankNode",value:"_:g"}}return{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}createHashToRelated(e,t){const n=new Map;const i=this.blankNodeInfo.get(e).quads;for(const o of i){let i;let r;if(o.subject.termType==="BlankNode"&&o.subject.value!==e){r=o.subject.value;i="p"}else if(o.object.termType==="BlankNode"&&o.object.value!==e){r=o.object.value;i="r"}else{continue}const s=this.hashRelatedBlankNode(r,o,t,i);const a=n.get(s);if(a){a.push(r)}else{n.set(s,[r])}}return n}}}});var f=e({"(disabled):rdf-canonize-native"(){}});var u=e({"../node_modules/rdf-canonize/lib/index.js"(e){var n=s();var i=a();var o=l();var u=c();var d;try{d=f()}catch(e){}function v(t){if(!Array.isArray(t)){return e.NQuads.legacyDatasetToQuads(t)}return t}e.NQuads=r();e.IdentifierIssuer=t();e._rdfCanonizeNative=function(e){if(e){d=e}return d};e.canonize=async function(e,t){const o=v(e);if(t.useNative){if(!d){throw new Error("rdf-canonize-native not available")}if(t.createMessageDigest){throw new Error('"createMessageDigest" cannot be used with "useNative".')}return new Promise(((e,n)=>d.canonize(o,t,((t,i)=>t?n(t):e(i)))))}if(t.algorithm==="URDNA2015"){return new n(t).main(o)}if(t.algorithm==="URGNA2012"){if(t.createMessageDigest){throw new Error('"createMessageDigest" cannot be used with "URGNA2012".')}return new i(t).main(o)}if(!("algorithm"in t)){throw new Error("No RDF Dataset Canonicalization algorithm specified.")}throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+t.algorithm)};e._canonizeSync=function(e,t){const n=v(e);if(t.useNative){if(!d){throw new Error("rdf-canonize-native not available")}if(t.createMessageDigest){throw new Error('"createMessageDigest" cannot be used with "useNative".')}return d.canonizeSync(n,t)}if(t.algorithm==="URDNA2015"){return new o(t).main(n)}if(t.algorithm==="URGNA2012"){if(t.createMessageDigest){throw new Error('"createMessageDigest" cannot be used with "URGNA2012".')}return new u(t).main(n)}if(!("algorithm"in t)){throw new Error("No RDF Dataset Canonicalization algorithm specified.")}throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+t.algorithm)}}});var d=e({"../node_modules/rdf-canonize/index.js"(e,t){t.exports=u()}});var v=e({"../node_modules/jsonld/lib/types.js"(e,t){var n={};t.exports=n;n.isArray=Array.isArray;n.isBoolean=e=>typeof e==="boolean"||Object.prototype.toString.call(e)==="[object Boolean]";n.isDouble=e=>n.isNumber(e)&&(String(e).indexOf(".")!==-1||Math.abs(e)>=1e21);n.isEmptyObject=e=>n.isObject(e)&&Object.keys(e).length===0;n.isNumber=e=>typeof e==="number"||Object.prototype.toString.call(e)==="[object Number]";n.isNumeric=e=>!isNaN(parseFloat(e))&&isFinite(e);n.isObject=e=>Object.prototype.toString.call(e)==="[object Object]";n.isString=e=>typeof e==="string"||Object.prototype.toString.call(e)==="[object String]";n.isUndefined=e=>typeof e==="undefined"}});var p=e({"../node_modules/jsonld/lib/graphTypes.js"(e,t){var n=v();var i={};t.exports=i;i.isSubject=e=>{if(n.isObject(e)&&!("@value"in e||"@set"in e||"@list"in e)){const t=Object.keys(e).length;return t>1||!("@id"in e)}return false};i.isSubjectReference=e=>n.isObject(e)&&Object.keys(e).length===1&&"@id"in e;i.isValue=e=>n.isObject(e)&&"@value"in e;i.isList=e=>n.isObject(e)&&"@list"in e;i.isGraph=e=>n.isObject(e)&&"@graph"in e&&Object.keys(e).filter((e=>e!=="@id"&&e!=="@index")).length===1;i.isSimpleGraph=e=>i.isGraph(e)&&!("@id"in e);i.isBlankNode=e=>{if(n.isObject(e)){if("@id"in e){const t=e["@id"];return!n.isString(t)||t.indexOf("_:")===0}return Object.keys(e).length===0||!("@value"in e||"@set"in e||"@list"in e)}return false}}});var h=e({"../node_modules/jsonld/lib/JsonLdError.js"(e,t){t.exports=class e extends Error{constructor(e="An unspecified JSON-LD error occurred.",t="jsonld.Error",n={}){super(e);this.name=t;this.message=e;this.details=n}}}});var y=e({"../node_modules/jsonld/lib/util.js"(e,t){var n=p();var i=v();var o=d().IdentifierIssuer;var r=h();var s=/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/;var a=/(?:<[^>]*?>|"[^"]*?"|[^,])+/g;var l=/\s*<([^>]*?)>\s*(?:;\s*(.*))?/;var c=/(.*?)=(?:(?:"([^"]*?)")|([^"]*?))\s*(?:(?:;\s*)|$)/g;var f=/^@[a-zA-Z]+$/;var u={headers:{accept:"application/ld+json, application/json"}};var y={};t.exports=y;y.IdentifierIssuer=o;y.REGEX_BCP47=s;y.REGEX_KEYWORD=f;y.clone=function(e){if(e&&typeof e==="object"){let t;if(i.isArray(e)){t=[];for(let n=0;n<e.length;++n){t[n]=y.clone(e[n])}}else if(e instanceof Map){t=new Map;for(const[n,i]of e){t.set(n,y.clone(i))}}else if(e instanceof Set){t=new Set;for(const n of e){t.add(y.clone(n))}}else if(i.isObject(e)){t={};for(const n in e){t[n]=y.clone(e[n])}}else{t=e.toString()}return t}return e};y.asArray=function(e){return Array.isArray(e)?e:[e]};y.buildHeaders=(e={})=>{const t=Object.keys(e).some((e=>e.toLowerCase()==="accept"));if(t){throw new RangeError('Accept header may not be specified; only "'+u.headers.accept+'" is supported.')}return Object.assign({Accept:u.headers.accept},e)};y.parseLinkHeader=e=>{const t={};const n=e.match(a);for(let e=0;e<n.length;++e){let i=n[e].match(l);if(!i){continue}const o={target:i[1]};const r=i[2];while(i=c.exec(r)){o[i[1]]=i[2]===void 0?i[3]:i[2]}const s=o.rel||"";if(Array.isArray(t[s])){t[s].push(o)}else if(t.hasOwnProperty(s)){t[s]=[t[s],o]}else{t[s]=o}}return t};y.validateTypeValue=(e,t)=>{if(i.isString(e)){return}if(i.isArray(e)&&e.every((e=>i.isString(e)))){return}if(t&&i.isObject(e)){switch(Object.keys(e).length){case 0:return;case 1:if("@default"in e&&y.asArray(e["@default"]).every((e=>i.isString(e)))){return}}}throw new r('Invalid JSON-LD syntax; "@type" value must a string, an array of strings, an empty object, or a default object.',"jsonld.SyntaxError",{code:"invalid type value",value:e})};y.hasProperty=(e,t)=>{if(e.hasOwnProperty(t)){const n=e[t];return!i.isArray(n)||n.length>0}return false};y.hasValue=(e,t,o)=>{if(y.hasProperty(e,t)){let r=e[t];const s=n.isList(r);if(i.isArray(r)||s){if(s){r=r["@list"]}for(let e=0;e<r.length;++e){if(y.compareValues(o,r[e])){return true}}}else if(!i.isArray(o)){return y.compareValues(o,r)}}return false};y.addValue=(e,t,n,o)=>{o=o||{};if(!("propertyIsArray"in o)){o.propertyIsArray=false}if(!("valueIsArray"in o)){o.valueIsArray=false}if(!("allowDuplicate"in o)){o.allowDuplicate=true}if(!("prependValue"in o)){o.prependValue=false}if(o.valueIsArray){e[t]=n}else if(i.isArray(n)){if(n.length===0&&o.propertyIsArray&&!e.hasOwnProperty(t)){e[t]=[]}if(o.prependValue){n=n.concat(e[t]);e[t]=[]}for(let i=0;i<n.length;++i){y.addValue(e,t,n[i],o)}}else if(e.hasOwnProperty(t)){const r=!o.allowDuplicate&&y.hasValue(e,t,n);if(!i.isArray(e[t])&&(!r||o.propertyIsArray)){e[t]=[e[t]]}if(!r){if(o.prependValue){e[t].unshift(n)}else{e[t].push(n)}}}else{e[t]=o.propertyIsArray?[n]:n}};y.getValues=(e,t)=>[].concat(e[t]||[]);y.removeProperty=(e,t)=>{delete e[t]};y.removeValue=(e,t,n,i)=>{i=i||{};if(!("propertyIsArray"in i)){i.propertyIsArray=false}const o=y.getValues(e,t).filter((e=>!y.compareValues(e,n)));if(o.length===0){y.removeProperty(e,t)}else if(o.length===1&&!i.propertyIsArray){e[t]=o[0]}else{e[t]=o}};y.relabelBlankNodes=(e,t)=>{t=t||{};const n=t.issuer||new o("_:b");return w(n,e)};y.compareValues=(e,t)=>{if(e===t){return true}if(n.isValue(e)&&n.isValue(t)&&e["@value"]===t["@value"]&&e["@type"]===t["@type"]&&e["@language"]===t["@language"]&&e["@index"]===t["@index"]){return true}if(i.isObject(e)&&"@id"in e&&i.isObject(t)&&"@id"in t){return e["@id"]===t["@id"]}return false};y.compareShortestLeast=(e,t)=>{if(e.length<t.length){return-1}if(t.length<e.length){return 1}if(e===t){return 0}return e<t?-1:1};function w(e,t){if(i.isArray(t)){for(let n=0;n<t.length;++n){t[n]=w(e,t[n])}}else if(n.isList(t)){t["@list"]=w(e,t["@list"])}else if(i.isObject(t)){if(n.isBlankNode(t)){t["@id"]=e.getId(t["@id"])}const i=Object.keys(t).sort();for(let n=0;n<i.length;++n){const o=i[n];if(o!=="@id"){t[o]=w(e,t[o])}}}return t}}});var w=e({"../node_modules/jsonld/lib/constants.js"(e,t){var n="http://www.w3.org/1999/02/22-rdf-syntax-ns#";var i="http://www.w3.org/2001/XMLSchema#";t.exports={LINK_HEADER_REL:"http://www.w3.org/ns/json-ld#context",LINK_HEADER_CONTEXT:"http://www.w3.org/ns/json-ld#context",RDF:n,RDF_LIST:n+"List",RDF_FIRST:n+"first",RDF_REST:n+"rest",RDF_NIL:n+"nil",RDF_TYPE:n+"type",RDF_PLAIN_LITERAL:n+"PlainLiteral",RDF_XML_LITERAL:n+"XMLLiteral",RDF_JSON_LITERAL:n+"JSON",RDF_OBJECT:n+"object",RDF_LANGSTRING:n+"langString",XSD:i,XSD_BOOLEAN:i+"boolean",XSD_DOUBLE:i+"double",XSD_INTEGER:i+"integer",XSD_STRING:i+"string"}}});var x=e({"../node_modules/jsonld/lib/RequestQueue.js"(e,t){t.exports=class e{constructor(){this._requests={}}wrapLoader(e){const t=this;t._loader=e;return 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]}}}}});var m=e({"../node_modules/jsonld/lib/url.js"(e,t){var n=v();var i={};t.exports=i;i.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*))?))?(?:(((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/}};i.parse=(e,t)=>{const n={};const o=i.parsers[t||"full"];const r=o.regex.exec(e);let s=o.keys.length;while(s--){n[o.keys[s]]=r[s]===void 0?null:r[s]}if(n.scheme==="https"&&n.port==="443"||n.scheme==="http"&&n.port==="80"){n.href=n.href.replace(":"+n.port,"");n.authority=n.authority.replace(":"+n.port,"");n.port=null}n.normalizedPath=i.removeDotSegments(n.path);return n};i.prependBase=(e,t)=>{if(e===null){return t}if(i.isAbsolute(t)){return t}if(!e||n.isString(e)){e=i.parse(e||"")}const o=i.parse(t);const r={protocol:e.protocol||""};if(o.authority!==null){r.authority=o.authority;r.path=o.path;r.query=o.query}else{r.authority=e.authority;if(o.path===""){r.path=e.path;if(o.query!==null){r.query=o.query}else{r.query=e.query}}else{if(o.path.indexOf("/")===0){r.path=o.path}else{let t=e.path;t=t.substr(0,t.lastIndexOf("/")+1);if((t.length>0||e.authority)&&t.substr(-1)!=="/"){t+="/"}t+=o.path;r.path=t}r.query=o.query}}if(o.path!==""){r.path=i.removeDotSegments(r.path)}let s=r.protocol;if(r.authority!==null){s+="//"+r.authority}s+=r.path;if(r.query!==null){s+="?"+r.query}if(o.fragment!==null){s+="#"+o.fragment}if(s===""){s="./"}return s};i.removeBase=(e,t)=>{if(e===null){return t}if(!e||n.isString(e)){e=i.parse(e||"")}let o="";if(e.href!==""){o+=(e.protocol||"")+"//"+(e.authority||"")}else if(t.indexOf("//")){o+="//"}if(t.indexOf(o)!==0){return t}const r=i.parse(t.substr(o.length));const s=e.normalizedPath.split("/");const a=r.normalizedPath.split("/");const l=r.fragment||r.query?0:1;while(s.length>0&&a.length>l){if(s[0]!==a[0]){break}s.shift();a.shift()}let c="";if(s.length>0){s.pop();for(let e=0;e<s.length;++e){c+="../"}}c+=a.join("/");if(r.query!==null){c+="?"+r.query}if(r.fragment!==null){c+="#"+r.fragment}if(c===""){c="./"}return c};i.removeDotSegments=e=>{if(e.length===0){return""}const t=e.split("/");const n=[];while(t.length>0){const e=t.shift();const i=t.length===0;if(e==="."){if(i){n.push("")}continue}if(e===".."){n.pop();if(i){n.push("")}continue}n.push(e)}if(e[0]==="/"&&n.length>0&&n[0]!==""){n.unshift("")}if(n.length===1&&n[0]===""){return"/"}return n.join("/")};var o=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;i.isAbsolute=e=>n.isString(e)&&o.test(e);i.isRelative=e=>n.isString(e)}});var g=e({"../node_modules/jsonld/lib/documentLoaders/xhr.js"(e,t){var{parseLinkHeader:n,buildHeaders:i}=y();var{LINK_HEADER_CONTEXT:o}=w();var r=h();var s=x();var{prependBase:a}=m();var l=/(^|(\r\n))link:/i;t.exports=({secure:e,headers:t={},xhr:f}={headers:{}})=>{t=i(t);const u=new s;return u.wrapLoader(d);async function d(i){if(i.indexOf("http:")!==0&&i.indexOf("https:")!==0){throw new r('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:i})}if(e&&i.indexOf("https")!==0){throw new r(`URL could not be dereferenced; secure mode is enabled and the URL's scheme is not "https".`,"jsonld.InvalidUrl",{code:"loading document failed",url:i})}let s;try{s=await c(f,i,t)}catch(e){throw new r("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:i,cause:e})}if(s.status>=400){throw new r("URL could not be dereferenced: "+s.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:i,httpStatusCode:s.status})}let u={contextUrl:null,documentUrl:i,document:s.response};let v=null;const p=s.getResponseHeader("Content-Type");let h;if(l.test(s.getAllResponseHeaders())){h=s.getResponseHeader("Link")}if(h&&p!=="application/ld+json"){const e=n(h);const t=e[o];if(Array.isArray(t)){throw new r("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:i})}if(t){u.contextUrl=t.target}v=e.alternate;if(v&&v.type=="application/ld+json"&&!(p||"").match(/^application\/(\w*\+)?json$/)){u=await d(a(i,v.target))}}return u}};function c(e,t,n){e=e||XMLHttpRequest;const i=new e;return new Promise(((e,o)=>{i.onload=()=>e(i);i.onerror=e=>o(e);i.open("GET",t,true);for(const e in n){i.setRequestHeader(e,n[e])}i.send()}))}}});var b=e({"../node_modules/jsonld/lib/platform-browser.js"(e,t){var n=g();var i={};t.exports=i;i.setupDocumentLoaders=function(e){if(typeof XMLHttpRequest!=="undefined"){e.documentLoaders.xhr=n;e.useDocumentLoader("xhr")}};i.setupGlobals=function(e){if(typeof globalThis.JsonLdProcessor==="undefined"){Object.defineProperty(globalThis,"JsonLdProcessor",{writable:true,enumerable:false,configurable:true,value:e.JsonLdProcessor})}}}});var j=e({"../node_modules/jsonld/node_modules/yallist/iterator.js"(e,t){t.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}}});var S=e({"../node_modules/jsonld/node_modules/yallist/yallist.js"(e,t){t.exports=n;n.Node=s;n.create=n;function n(e){var t=this;if(!(t instanceof n)){t=new n}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach((function(e){t.push(e)}))}else if(arguments.length>0){for(var i=0,o=arguments.length;i<o;i++){t.push(arguments[i])}}return t}n.prototype.removeNode=function(e){if(e.list!==this){throw new Error("removing node which does not belong to this list")}var t=e.next;var n=e.prev;if(t){t.prev=n}if(n){n.next=t}if(e===this.head){this.head=t}if(e===this.tail){this.tail=n}e.list.length--;e.next=null;e.prev=null;e.list=null;return t};n.prototype.unshiftNode=function(e){if(e===this.head){return}if(e.list){e.list.removeNode(e)}var t=this.head;e.list=this;e.next=t;if(t){t.prev=e}this.head=e;if(!this.tail){this.tail=e}this.length++};n.prototype.pushNode=function(e){if(e===this.tail){return}if(e.list){e.list.removeNode(e)}var t=this.tail;e.list=this;e.prev=t;if(t){t.next=e}this.tail=e;if(!this.head){this.head=e}this.length++};n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++){o(this,arguments[e])}return this.length};n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++){r(this,arguments[e])}return this.length};n.prototype.pop=function(){if(!this.tail){return void 0}var e=this.tail.value;this.tail=this.tail.prev;if(this.tail){this.tail.next=null}else{this.head=null}this.length--;return e};n.prototype.shift=function(){if(!this.head){return void 0}var e=this.head.value;this.head=this.head.next;if(this.head){this.head.prev=null}else{this.tail=null}this.length--;return e};n.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,i=0;n!==null;i++){e.call(t,n.value,i,this);n=n.next}};n.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,i=this.length-1;n!==null;i--){e.call(t,n.value,i,this);n=n.prev}};n.prototype.get=function(e){for(var t=0,n=this.head;n!==null&&t<e;t++){n=n.next}if(t===e&&n!==null){return n.value}};n.prototype.getReverse=function(e){for(var t=0,n=this.tail;n!==null&&t<e;t++){n=n.prev}if(t===e&&n!==null){return n.value}};n.prototype.map=function(e,t){t=t||this;var i=new n;for(var o=this.head;o!==null;){i.push(e.call(t,o.value,this));o=o.next}return i};n.prototype.mapReverse=function(e,t){t=t||this;var i=new n;for(var o=this.tail;o!==null;){i.push(e.call(t,o.value,this));o=o.prev}return i};n.prototype.reduce=function(e,t){var n;var i=this.head;if(arguments.length>1){n=t}else if(this.head){i=this.head.next;n=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var o=0;i!==null;o++){n=e(n,i.value,o);i=i.next}return n};n.prototype.reduceReverse=function(e,t){var n;var i=this.tail;if(arguments.length>1){n=t}else if(this.tail){i=this.tail.prev;n=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var o=this.length-1;i!==null;o--){n=e(n,i.value,o);i=i.prev}return n};n.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,n=this.head;n!==null;t++){e[t]=n.value;n=n.next}return e};n.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,n=this.tail;n!==null;t++){e[t]=n.value;n=n.prev}return e};n.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var i=new n;if(t<e||t<0){return i}if(e<0){e=0}if(t>this.length){t=this.length}for(var o=0,r=this.head;r!==null&&o<e;o++){r=r.next}for(;r!==null&&o<t;o++,r=r.next){i.push(r.value)}return i};n.prototype.sliceReverse=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var i=new n;if(t<e||t<0){return i}if(e<0){e=0}if(t>this.length){t=this.length}for(var o=this.length,r=this.tail;r!==null&&o>t;o--){r=r.prev}for(;r!==null&&o>e;o--,r=r.prev){i.push(r.value)}return i};n.prototype.splice=function(e,t,...n){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var o=0,r=this.head;r!==null&&o<e;o++){r=r.next}var s=[];for(var o=0;r&&o<t;o++){s.push(r.value);r=this.removeNode(r)}if(r===null){r=this.tail}if(r!==this.head&&r!==this.tail){r=r.prev}for(var o=0;o<n.length;o++){r=i(this,r,n[o])}return s};n.prototype.reverse=function(){var e=this.head;var t=this.tail;for(var n=e;n!==null;n=n.prev){var i=n.prev;n.prev=n.next;n.next=i}this.head=t;this.tail=e;return this};function i(e,t,n){var i=t===e.head?new s(n,null,t,e):new s(n,t,t.next,e);if(i.next===null){e.tail=i}if(i.prev===null){e.head=i}e.length++;return i}function o(e,t){e.tail=new s(t,e.tail,null,e);if(!e.head){e.head=e.tail}e.length++}function r(e,t){e.head=new s(t,null,e.head,e);if(!e.tail){e.tail=e.head}e.length++}function s(e,t,n,i){if(!(this instanceof s)){return new s(e,t,n,i)}this.list=i;this.value=e;if(t){t.next=this;this.prev=t}else{this.prev=null}if(n){n.prev=this;this.next=n}else{this.next=null}}try{j()(n)}catch(e){}}});var E=e({"../node_modules/jsonld/node_modules/lru-cache/index.js"(e,t){var n=S();var i=Symbol("max");var o=Symbol("length");var r=Symbol("lengthCalculator");var s=Symbol("allowStale");var a=Symbol("maxAge");var l=Symbol("dispose");var c=Symbol("noDisposeOnSet");var f=Symbol("lruList");var u=Symbol("cache");var d=Symbol("updateAgeOnGet");var v=()=>1;var p=class{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||Infinity;const t=e.length||v;this[r]=typeof t!=="function"?v:t;this[s]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[a]=e.maxAge||0;this[l]=e.dispose;this[c]=e.noDisposeOnSet||false;this[d]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||Infinity;w(this)}get max(){return this[i]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[a]=e;w(this)}get maxAge(){return this[a]}set lengthCalculator(e){if(typeof e!=="function")e=v;if(e!==this[r]){this[r]=e;this[o]=0;this[f].forEach((e=>{e.length=this[r](e.value,e.key);this[o]+=e.length}))}w(this)}get lengthCalculator(){return this[r]}get length(){return this[o]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let n=this[f].tail;n!==null;){const i=n.prev;g(this,e,n,t);n=i}}forEach(e,t){t=t||this;for(let n=this[f].head;n!==null;){const i=n.next;g(this,e,n,t);n=i}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){if(this[l]&&this[f]&&this[f].length){this[f].forEach((e=>this[l](e.key,e.value)))}this[u]=new Map;this[f]=new n;this[o]=0}dump(){return this[f].map((e=>y(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,n){n=n||this[a];if(n&&typeof n!=="number")throw new TypeError("maxAge must be a number");const s=n?Date.now():0;const d=this[r](t,e);if(this[u].has(e)){if(d>this[i]){x(this,this[u].get(e));return false}const r=this[u].get(e);const a=r.value;if(this[l]){if(!this[c])this[l](e,a.value)}a.now=s;a.maxAge=n;a.value=t;this[o]+=d-a.length;a.length=d;this.get(e);w(this);return true}const v=new m(e,t,d,s,n);if(v.length>this[i]){if(this[l])this[l](e,t);return false}this[o]+=v.length;this[f].unshift(v);this[u].set(e,this[f].head);w(this);return true}has(e){if(!this[u].has(e))return false;const t=this[u].get(e).value;return!y(this,t)}get(e){return h(this,e,true)}peek(e){return h(this,e,false)}pop(){const e=this[f].tail;if(!e)return null;x(this,e);return e.value}del(e){x(this,this[u].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const i=e[n];const o=i.e||0;if(o===0)this.set(i.k,i.v);else{const e=o-t;if(e>0){this.set(i.k,i.v,e)}}}}prune(){this[u].forEach(((e,t)=>h(this,t,false)))}};var h=(e,t,n)=>{const i=e[u].get(t);if(i){const t=i.value;if(y(e,t)){x(e,i);if(!e[s])return void 0}else{if(n){if(e[d])i.value.now=Date.now();e[f].unshiftNode(i)}}return t.value}};var y=(e,t)=>{if(!t||!t.maxAge&&!e[a])return false;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[a]&&n>e[a]};var w=e=>{if(e[o]>e[i]){for(let t=e[f].tail;e[o]>e[i]&&t!==null;){const n=t.prev;x(e,t);t=n}}};var x=(e,t)=>{if(t){const n=t.value;if(e[l])e[l](n.key,n.value);e[o]-=n.length;e[u].delete(n.key);e[f].removeNode(t)}};var m=class{constructor(e,t,n,i,o){this.key=e;this.value=t;this.length=n;this.now=i;this.maxAge=o||0}};var g=(e,t,n,i)=>{let o=n.value;if(y(e,o)){x(e,n);if(!e[s])o=void 0}if(o)t.call(i,o.value,o.key,e)};t.exports=p}});var I=e({"../node_modules/jsonld/lib/ResolvedContext.js"(e,t){var n=E();var i=10;t.exports=class e{constructor({document:e}){this.document=e;this.cache=new n({max:i})}getProcessed(e){return this.cache.get(e)}setProcessed(e,t){this.cache.set(e,t)}}}});var N=e({"../node_modules/jsonld/lib/ContextResolver.js"(e,t){var{isArray:n,isObject:i,isString:o}=v();var{asArray:r}=y();var{prependBase:s}=m();var a=h();var l=I();var c=10;t.exports=class e{constructor({sharedCache:e}){this.perOpCache=new Map;this.sharedCache=e}async resolve({activeCtx:e,context:t,documentLoader:s,base:a,cycles:c=new Set}){if(t&&i(t)&&t["@context"]){t=t["@context"]}t=r(t);const u=[];for(const r of t){if(o(r)){let t=this._get(r);if(!t){t=await this._resolveRemoteContext({activeCtx:e,url:r,documentLoader:s,base:a,cycles:c})}if(n(t)){u.push(...t)}else{u.push(t)}continue}if(r===null){u.push(new l({document:null}));continue}if(!i(r)){f(t)}const d=JSON.stringify(r);let v=this._get(d);if(!v){v=new l({document:r});this._cacheResolvedContext({key:d,resolved:v,tag:"static"})}u.push(v)}return u}_get(e){let t=this.perOpCache.get(e);if(!t){const n=this.sharedCache.get(e);if(n){t=n.get("static");if(t){this.perOpCache.set(e,t)}}}return t}_cacheResolvedContext({key:e,resolved:t,tag:n}){this.perOpCache.set(e,t);if(n!==void 0){let i=this.sharedCache.get(e);if(!i){i=new Map;this.sharedCache.set(e,i)}i.set(n,t)}return t}async _resolveRemoteContext({activeCtx:e,url:t,documentLoader:n,base:i,cycles:o}){t=s(i,t);const{context:r,remoteDoc:a}=await this._fetchContext({activeCtx:e,url:t,documentLoader:n,cycles:o});i=a.documentUrl||t;u({context:r,base:i});const l=await this.resolve({activeCtx:e,context:r,documentLoader:n,base:i,cycles:o});this._cacheResolvedContext({key:t,resolved:l,tag:a.tag});return l}async _fetchContext({activeCtx:e,url:t,documentLoader:r,cycles:s}){if(s.size>c){throw new a("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:e.processingMode==="json-ld-1.0"?"loading remote context failed":"context overflow",max:c})}if(s.has(t)){throw new a("Cyclical @context URLs detected.","jsonld.ContextUrlError",{code:e.processingMode==="json-ld-1.0"?"recursive context inclusion":"context overflow",url:t})}s.add(t);let l;let f;try{f=await r(t);l=f.document||null;if(o(l)){l=JSON.parse(l)}}catch(e){throw new a(`Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context. URL: "${t}".`,"jsonld.InvalidUrl",{code:"loading remote context failed",url:t,cause:e})}if(!i(l)){throw new a(`Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object. URL: "${t}".`,"jsonld.InvalidUrl",{code:"invalid remote context",url:t})}if(!("@context"in l)){l={"@context":{}}}else{l={"@context":l["@context"]}}if(f.contextUrl){if(!n(l["@context"])){l["@context"]=[l["@context"]]}l["@context"].push(f.contextUrl)}return{context:l,remoteDoc:f}}};function f(e){throw new a("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:e})}function u({context:e,base:t}){if(!e){return}const r=e["@context"];if(o(r)){e["@context"]=s(t,r);return}if(n(r)){for(let e=0;e<r.length;++e){const n=r[e];if(o(n)){r[e]=s(t,n);continue}if(i(n)){u({context:{"@context":n},base:t})}}return}if(!i(r)){return}for(const e in r){u({context:r[e],base:t})}}}});var D=e({"../node_modules/jsonld/lib/NQuads.js"(e,t){t.exports=d().NQuads}});var L=e({"../node_modules/jsonld/lib/events.js"(e,t){var n=h();var{isArray:i}=v();var{asArray:o}=y();var r={};t.exports=r;r.defaultEventHandler=null;r.setupEventHandler=({options:e={}})=>{const t=[].concat(e.safe?r.safeEventHandler:[],e.eventHandler?o(e.eventHandler):[],r.defaultEventHandler?r.defaultEventHandler:[]);return t.length===0?null:t};r.handleEvent=({event:e,options:t})=>{s({event:e,handlers:t.eventHandler})};function s({event:e,handlers:t}){let o=true;for(let r=0;o&&r<t.length;++r){o=false;const a=t[r];if(i(a)){o=s({event:e,handlers:a})}else if(typeof a==="function"){a({event:e,next:()=>{o=true}})}else if(typeof a==="object"){if(e.code in a){a[e.code]({event:e,next:()=>{o=true}})}else{o=true}}else{throw new n("Invalid event handler.","jsonld.InvalidEventHandler",{event:e})}}return o}var a=new Set(["empty object","free-floating scalar","invalid @language value","invalid property","null @id value","null @value value","object with only @id","object with only @language","object with only @list","object with only @value","relative @id reference","relative @type reference","relative @vocab reference","reserved @id value","reserved @reverse value","reserved term","blank node predicate","relative graph reference","relative object reference","relative predicate reference","relative subject reference","rdfDirection not set"]);r.safeEventHandler=function e({event:t,next:i}){if(t.level==="warning"&&a.has(t.code)){throw new n("Safe mode validation error.","jsonld.ValidationError",{event:t})}i()};r.logEventHandler=function e({event:t,next:n}){console.log(`EVENT: ${t.message}`,{event:t});n()};r.logWarningEventHandler=function e({event:t,next:n}){if(t.level==="warning"){console.warn(`WARNING: ${t.message}`,{event:t})}n()};r.unhandledEventHandler=function e({event:t}){throw new n("No handler for event.","jsonld.UnhandledEvent",{event:t})};r.setDefaultEventHandler=function({eventHandler:e}={}){r.defaultEventHandler=e?o(e):null}}});var O=e({"../node_modules/jsonld/lib/context.js"(e,t){var n=y();var i=h();var{isArray:o,isObject:r,isString:s,isUndefined:a}=v();var{isAbsolute:l,isRelative:c,prependBase:f}=m();var{handleEvent:u}=L();var{REGEX_BCP47:d,REGEX_KEYWORD:p,asArray:w,compareShortestLeast:x}=y();var g=new Map;var b=1e4;var j={};t.exports=j;j.process=async({activeCtx:e,localCtx:t,options:n,propagate:a=true,overrideProtected:v=false,cycles:p=new Set})=>{if(r(t)&&"@context"in t&&o(t["@context"])){t=t["@context"]}const h=w(t);if(h.length===0){return e}const y=[];const x=[({event:e,next:t})=>{y.push(e);t()}];if(n.eventHandler){x.push(n.eventHandler)}const m=n;n={...n,eventHandler:x};const g=await n.contextResolver.resolve({activeCtx:e,context:t,documentLoader:n.documentLoader,base:n.base});if(r(g[0].document)&&typeof g[0].document["@propagate"]==="boolean"){a=g[0].document["@propagate"]}let b=e;if(!a&&!b.previousContext){b=b.clone();b.previousContext=e}for(const o of g){let{document:a}=o;e=b;if(a===null){if(!v&&Object.keys(e.protected).length!==0){throw new i("Tried to nullify a context with protected terms outside of a term definition.","jsonld.SyntaxError",{code:"invalid context nullification"})}b=e=j.getInitialContext(n).clone();continue}const h=o.getProcessed(e);if(h){if(m.eventHandler){for(const e of h.events){u({event:e,options:m})}}b=e=h.context;continue}if(r(a)&&"@context"in a){a=a["@context"]}if(!r(a)){throw new i("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:a})}b=b.clone();const w=new Map;if("@version"in a){if(a["@version"]!==1.1){throw new i("Unsupported JSON-LD version: "+a["@version"],"jsonld.UnsupportedVersion",{code:"invalid @version value",context:a})}if(e.processingMode&&e.processingMode==="json-ld-1.0"){throw new i("@version: "+a["@version"]+" not compatible with "+e.processingMode,"jsonld.ProcessingModeConflict",{code:"processing mode conflict",context:a})}b.processingMode="json-ld-1.1";b["@version"]=a["@version"];w.set("@version",true)}b.processingMode=b.processingMode||e.processingMode;if("@base"in a){let e=a["@base"];if(e===null||l(e));else if(c(e)){e=f(b["@base"],e)}else{throw new i('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:a})}b["@base"]=e;w.set("@base",true)}if("@vocab"in a){const e=a["@vocab"];if(e===null){delete b["@vocab"]}else if(!s(e)){throw new i('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:a})}else if(!l(e)&&j.processingMode(b,1)){throw new i('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be an absolute IRI.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:a})}else{const t=S(b,e,{vocab:true,base:true},void 0,void 0,n);if(!l(t)){if(n.eventHandler){u({event:{type:["JsonLdEvent"],code:"relative @vocab reference",level:"warning",message:"Relative @vocab reference found.",details:{vocab:t}},options:n})}}b["@vocab"]=t}w.set("@vocab",true)}if("@language"in a){const e=a["@language"];if(e===null){delete b["@language"]}else if(!s(e)){throw new i('Invalid JSON-LD syntax; the value of "@language" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid default language",context:a})}else{if(!e.match(d)){if(n.eventHandler){u({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:n})}}b["@language"]=e.toLowerCase()}w.set("@language",true)}if("@direction"in a){const t=a["@direction"];if(e.processingMode==="json-ld-1.0"){throw new i("Invalid JSON-LD syntax; @direction not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context member",context:a})}if(t===null){delete b["@direction"]}else if(t!=="ltr"&&t!=="rtl"){throw new i('Invalid JSON-LD syntax; the value of "@direction" in a @context must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:a})}else{b["@direction"]=t}w.set("@direction",true)}if("@propagate"in a){const n=a["@propagate"];if(e.processingMode==="json-ld-1.0"){throw new i("Invalid JSON-LD syntax; @propagate not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:a})}if(typeof n!=="boolean"){throw new i("Invalid JSON-LD syntax; @propagate value must be a boolean.","jsonld.SyntaxError",{code:"invalid @propagate value",context:t})}w.set("@propagate",true)}if("@import"in a){const o=a["@import"];if(e.processingMode==="json-ld-1.0"){throw new i("Invalid JSON-LD syntax; @import not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:a})}if(!s(o)){throw new i("Invalid JSON-LD syntax; @import must be a string.","jsonld.SyntaxError",{code:"invalid @import value",context:t})}const r=await n.contextResolver.resolve({activeCtx:e,context:o,documentLoader:n.documentLoader,base:n.base});if(r.length!==1){throw new i("Invalid JSON-LD syntax; @import must reference a single context.","jsonld.SyntaxError",{code:"invalid remote context",context:t})}const l=r[0].getProcessed(e);if(l){a=l}else{const n=r[0].document;if("@import"in n){throw new i("Invalid JSON-LD syntax: imported context must not include @import.","jsonld.SyntaxError",{code:"invalid context entry",context:t})}for(const e in n){if(!a.hasOwnProperty(e)){a[e]=n[e]}}r[0].setProcessed(e,a)}w.set("@import",true)}w.set("@protected",a["@protected"]||false);for(const e in a){j.createTermDefinition({activeCtx:b,localCtx:a,term:e,defined:w,options:n,overrideProtected:v});if(r(a[e])&&"@context"in a[e]){const t=a[e]["@context"];let o=true;if(s(t)){const e=f(n.base,t);if(p.has(e)){o=false}else{p.add(e)}}if(o){try{await j.process({activeCtx:b.clone(),localCtx:a[e]["@context"],overrideProtected:true,options:n,cycles:p})}catch(t){throw new i("Invalid JSON-LD syntax; invalid scoped context.","jsonld.SyntaxError",{code:"invalid scoped context",context:a[e]["@context"],term:e})}}}}o.setProcessed(e,{context:b,events:y})}return b};j.createTermDefinition=({activeCtx:e,localCtx:t,term:n,defined:a,options:c,overrideProtected:f=false})=>{if(a.has(n)){if(a.get(n)){return}throw new i("Cyclical context definition detected.","jsonld.CyclicalContext",{code:"cyclic IRI mapping",context:t,term:n})}a.set(n,false);let d;if(t.hasOwnProperty(n)){d=t[n]}if(n==="@type"&&r(d)&&(d["@container"]||"@set")==="@set"&&j.processingMode(e,1.1)){const e=["@container","@id","@protected"];const o=Object.keys(d);if(o.length===0||o.some((t=>!e.includes(t)))){throw new i("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:n})}}else if(j.isKeyword(n)){throw new i("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:n})}else if(n.match(p)){if(c.eventHandler){u({event:{type:["JsonLdEvent"],code:"reserved term",level:"warning",message:'Terms beginning with "@" are reserved for future use and dropped.',details:{term:n}},options:c})}return}else if(n===""){throw new i("Invalid JSON-LD syntax; a term cannot be an empty string.","jsonld.SyntaxError",{code:"invalid term definition",context:t})}const v=e.mappings.get(n);if(e.mappings.has(n)){e.mappings.delete(n)}let h=false;if(s(d)||d===null){h=true;d={"@id":d}}if(!r(d)){throw new i("Invalid JSON-LD syntax; @context term values must be strings or objects.","jsonld.SyntaxError",{code:"invalid term definition",context:t})}const y={};e.mappings.set(n,y);y.reverse=false;const w=["@container","@id","@language","@reverse","@type"];if(j.processingMode(e,1.1)){w.push("@context","@direction","@index","@nest","@prefix","@protected")}for(const e in d){if(!w.includes(e)){throw new i("Invalid JSON-LD syntax; a term definition must not contain "+e,"jsonld.SyntaxError",{code:"invalid term definition",context:t})}}const x=n.indexOf(":");y._termHasColon=x>0;if("@reverse"in d){if("@id"in d){throw new i("Invalid JSON-LD syntax; a @reverse term definition must not contain @id.","jsonld.SyntaxError",{code:"invalid reverse property",context:t})}if("@nest"in d){throw new i("Invalid JSON-LD syntax; a @reverse term definition must not contain @nest.","jsonld.SyntaxError",{code:"invalid reverse property",context:t})}const o=d["@reverse"];if(!s(o)){throw new i("Invalid JSON-LD syntax; a @context @reverse value must be a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t})}if(o.match(p)){if(c.eventHandler){u({event:{type:["JsonLdEvent"],code:"reserved @reverse value",level:"warning",message:'@reverse values beginning with "@" are reserved for future use and dropped.',details:{reverse:o}},options:c})}if(v){e.mappings.set(n,v)}else{e.mappings.delete(n)}return}const r=S(e,o,{vocab:true,base:false},t,a,c);if(!l(r)){throw new i("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})}y["@id"]=r;y.reverse=true}else if("@id"in d){let o=d["@id"];if(o&&!s(o)){throw new i("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(o===null){y["@id"]=null}else if(!j.isKeyword(o)&&o.match(p)){if(c.eventHandler){u({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:'@id values beginning with "@" are reserved for future use and dropped.',details:{id:o}},options:c})}if(v){e.mappings.set(n,v)}else{e.mappings.delete(n)}return}else if(o!==n){o=S(e,o,{vocab:true,base:false},t,a,c);if(!l(o)&&!j.isKeyword(o)){throw new i("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(/(?::[^:])|\//)){const r=new Map(a).set(n,true);const s=S(e,n,{vocab:true,base:false},t,r,c);if(s!==o){throw new i("Invalid JSON-LD syntax; term in form of IRI must expand to definition.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t})}}y["@id"]=o;y._prefix=h&&!y._termHasColon&&o.match(/[:\/\?#\[\]@]$/)!==null}}if(!("@id"in y)){if(y._termHasColon){const i=n.substr(0,x);if(t.hasOwnProperty(i)){j.createTermDefinition({activeCtx:e,localCtx:t,term:i,defined:a,options:c})}if(e.mappings.has(i)){const t=n.substr(x+1);y["@id"]=e.mappings.get(i)["@id"]+t}else{y["@id"]=n}}else if(n==="@type"){y["@id"]=n}else{if(!("@vocab"in e)){throw new i("Invalid JSON-LD syntax; @context terms must define an @id.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t,term:n})}y["@id"]=e["@vocab"]+n}}if(d["@protected"]===true||a.get("@protected")===true&&d["@protected"]!==false){e.protected[n]=true;y.protected=true}a.set(n,true);if("@type"in d){let n=d["@type"];if(!s(n)){throw new i("Invalid JSON-LD syntax; an @context @type value must be a string.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}if(n==="@json"||n==="@none"){if(j.processingMode(e,1)){throw new i(`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(n!=="@id"&&n!=="@vocab"){n=S(e,n,{vocab:true,base:false},t,a,c);if(!l(n)){throw new i("Invalid JSON-LD syntax; an @context @type value must be an absolute IRI.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}if(n.indexOf("_:")===0){throw new i("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})}}y["@type"]=n}if("@container"in d){const n=s(d["@container"])?[d["@container"]]:d["@container"]||[];const r=["@list","@set","@index","@language"];let a=true;const l=n.includes("@set");if(j.processingMode(e,1.1)){r.push("@graph","@id","@type");if(n.includes("@list")){if(n.length!==1){throw new i("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=>e!=="@graph"&&e!=="@id"&&e!=="@index"&&e!=="@set"))){throw new i("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{a&=n.length<=(l?2:1)}if(n.includes("@type")){y["@type"]=y["@type"]||"@id";if(!["@id","@vocab"].includes(y["@type"])){throw new i("Invalid JSON-LD syntax; container: @type requires @type to be @id or @vocab.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}}}else{a&=!o(d["@container"]);a&=n.length<=1}a&=n.every((e=>r.includes(e)));a&=!(l&&n.includes("@list"));if(!a){throw new i("Invalid JSON-LD syntax; @context @container value must be one of the following: "+r.join(", "),"jsonld.SyntaxError",{code:"invalid container mapping",context:t})}if(y.reverse&&!n.every((e=>["@index","@set"].includes(e)))){throw new i("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})}y["@container"]=n}if("@index"in d){if(!("@container"in d)||!y["@container"].includes("@index")){throw new i(`Invalid JSON-LD syntax; @index without @index in @container: "${d["@index"]}" on term "${n}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t})}if(!s(d["@index"])||d["@index"].indexOf("@")===0){throw new i(`Invalid JSON-LD syntax; @index must expand to an IRI: "${d["@index"]}" on term "${n}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t})}y["@index"]=d["@index"]}if("@context"in d){y["@context"]=d["@context"]}if("@language"in d&&!("@type"in d)){let e=d["@language"];if(e!==null&&!s(e)){throw new i("Invalid JSON-LD syntax; @context @language value must be a string or null.","jsonld.SyntaxError",{code:"invalid language mapping",context:t})}if(e!==null){e=e.toLowerCase()}y["@language"]=e}if("@prefix"in d){if(n.match(/:|\//)){throw new i("Invalid JSON-LD syntax; @context @prefix used on a compact IRI term","jsonld.SyntaxError",{code:"invalid term definition",context:t})}if(j.isKeyword(y["@id"])){throw new i("Invalid JSON-LD syntax; keywords may not be used as prefixes","jsonld.SyntaxError",{code:"invalid term definition",context:t})}if(typeof d["@prefix"]==="boolean"){y._prefix=d["@prefix"]===true}else{throw new i("Invalid JSON-LD syntax; @context value for @prefix must be boolean","jsonld.SyntaxError",{code:"invalid @prefix value",context:t})}}if("@direction"in d){const e=d["@direction"];if(e!==null&&e!=="ltr"&&e!=="rtl"){throw new i('Invalid JSON-LD syntax; @direction value must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:t})}y["@direction"]=e}if("@nest"in d){const e=d["@nest"];if(!s(e)||e!=="@nest"&&e.indexOf("@")===0){throw new i("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})}y["@nest"]=e}const m=y["@id"];if(m==="@context"||m==="@preserve"){throw new i("Invalid JSON-LD syntax; @context and @preserve cannot be aliased.","jsonld.SyntaxError",{code:"invalid keyword alias",context:t})}if(v&&v.protected&&!f){e.protected[n]=true;y.protected=true;if(!E(v,y)){throw new i("Invalid JSON-LD syntax; tried to redefine a protected term.","jsonld.SyntaxError",{code:"protected term redefinition",context:t,term:n})}}};j.expandIri=(e,t,n,i)=>S(e,t,n,void 0,void 0,i);function S(e,t,n,i,o,a){if(t===null||!s(t)||j.isKeyword(t)){return t}if(t.match(p)){return null}if(i&&i.hasOwnProperty(t)&&o.get(t)!==true){j.createTermDefinition({activeCtx:e,localCtx:i,term:t,defined:o,options:a})}n=n||{};if(n.vocab){const n=e.mappings.get(t);if(n===null){return null}if(r(n)&&"@id"in n){return n["@id"]}}const c=t.indexOf(":");if(c>0){const n=t.substr(0,c);const r=t.substr(c+1);if(n==="_"||r.indexOf("//")===0){return t}if(i&&i.hasOwnProperty(n)){j.createTermDefinition({activeCtx:e,localCtx:i,term:n,defined:o,options:a})}const s=e.mappings.get(n);if(s&&s._prefix){return s["@id"]+r}if(l(t)){return t}}if(n.vocab&&"@vocab"in e){const n=e["@vocab"]+t;t=n}else if(n.base){let n;let i;if("@base"in e){if(e["@base"]){i=f(a.base,e["@base"]);n=f(i,t)}else{i=e["@base"];n=t}}else{i=a.base;n=f(a.base,t)}t=n}return t}j.getInitialContext=e=>{const t=JSON.stringify({processingMode:e.processingMode});const i=g.get(t);if(i){return i}const o={processingMode:e.processingMode,mappings:new Map,inverse:null,getInverse:r,clone:l,revertToPreviousContext:c,protected:{}};if(g.size===b){g.clear()}g.set(t,o);return o;function r(){const e=this;if(e.inverse){return e.inverse}const t=e.inverse={};const n=e.fastCurieMap={};const i={};const o=(e["@language"]||"@none").toLowerCase();const r=e["@direction"];const l=e.mappings;const c=[...l.keys()].sort(x);for(const e of c){const s=l.get(e);if(s===null){continue}let c=s["@container"]||"@none";c=[].concat(c).sort().join("");if(s["@id"]===null){continue}const f=w(s["@id"]);for(const l of f){let f=t[l];const u=j.isKeyword(l);if(!f){t[l]=f={};if(!u&&!s._termHasColon){i[l]=[e];const t={iri:l,terms:i[l]};if(l[0]in n){n[l[0]].push(t)}else{n[l[0]]=[t]}}}else if(!u&&!s._termHasColon){i[l].push(e)}if(!f[c]){f[c]={"@language":{},"@type":{},"@any":{}}}f=f[c];a(e,f["@any"],"@none");if(s.reverse){a(e,f["@type"],"@reverse")}else if(s["@type"]==="@none"){a(e,f["@any"],"@none");a(e,f["@language"],"@none");a(e,f["@type"],"@none")}else if("@type"in s){a(e,f["@type"],s["@type"])}else if("@language"in s&&"@direction"in s){const t=s["@language"];const n=s["@direction"];if(t&&n){a(e,f["@language"],`${t}_${n}`.toLowerCase())}else if(t){a(e,f["@language"],t.toLowerCase())}else if(n){a(e,f["@language"],`_${n}`)}else{a(e,f["@language"],"@null")}}else if("@language"in s){a(e,f["@language"],(s["@language"]||"@null").toLowerCase())}else if("@direction"in s){if(s["@direction"]){a(e,f["@language"],`_${s["@direction"]}`)}else{a(e,f["@language"],"@none")}}else if(r){a(e,f["@language"],`_${r}`);a(e,f["@language"],"@none");a(e,f["@type"],"@none")}else{a(e,f["@language"],o);a(e,f["@language"],"@none");a(e,f["@type"],"@none")}}}for(const e in n){s(n,e,1)}return t}function s(e,t,n){const i=e[t];const o=e[t]={};let r;let a;for(const e of i){r=e.iri;if(n>=r.length){a=""}else{a=r[n]}if(a in o){o[a].push(e)}else{o[a]=[e]}}for(const e in o){if(e===""){continue}s(o,e,n+1)}}function a(e,t,n){if(!t.hasOwnProperty(n)){t[n]=e}}function l(){const e={};e.mappings=n.clone(this.mappings);e.clone=this.clone;e.inverse=null;e.getInverse=this.getInverse;e.protected=n.clone(this.protected);if(this.previousContext){e.previousContext=this.previousContext.clone()}e.revertToPreviousContext=this.revertToPreviousContext;if("@base"in this){e["@base"]=this["@base"]}if("@language"in this){e["@language"]=this["@language"]}if("@vocab"in this){e["@vocab"]=this["@vocab"]}return e}function c(){if(!this.previousContext){return this}return this.previousContext.clone()}};j.getContextValue=(e,t,n)=>{if(t===null){if(n==="@context"){return void 0}return null}if(e.mappings.has(t)){const i=e.mappings.get(t);if(a(n)){return i}if(i.hasOwnProperty(n)){return i[n]}}if(n==="@language"&&n in e){return e[n]}if(n==="@direction"&&n in e){return e[n]}if(n==="@context"){return void 0}return null};j.processingMode=(e,t)=>{if(t.toString()>="1.1"){return!e.processingMode||e.processingMode>="json-ld-"+t.toString()}else{return e.processingMode==="json-ld-1.0"}};j.isKeyword=e=>{if(!s(e)||e[0]!=="@"){return false}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 true}return false};function E(e,t){if(!(e&&typeof e==="object")||!(t&&typeof t==="object")){return e===t}const n=Array.isArray(e);if(n!==Array.isArray(t)){return false}if(n){if(e.length!==t.length){return false}for(let n=0;n<e.length;++n){if(!E(e[n],t[n])){return false}}return true}const i=Object.keys(e);const o=Object.keys(t);if(i.length!==o.length){return false}for(const n in e){let i=e[n];let o=t[n];if(n==="@container"){if(Array.isArray(i)&&Array.isArray(o)){i=i.slice().sort();o=o.slice().sort()}}if(!E(i,o)){return false}}return true}}});var R=e({"../node_modules/jsonld/lib/expand.js"(e,t){var n=h();var{isArray:i,isObject:o,isEmptyObject:r,isString:s,isUndefined:a}=v();var{isList:l,isValue:c,isGraph:f,isSubject:u}=p();var{expandIri:d,getContextValue:w,isKeyword:x,process:g,processingMode:b}=O();var{isAbsolute:j}=m();var{REGEX_BCP47:S,REGEX_KEYWORD:E,addValue:I,asArray:N,getValues:D,validateTypeValue:R}=y();var{handleEvent:C}=L();var _={};t.exports=_;_.expand=async({activeCtx:e,activeProperty:t=null,element:l,options:c={},insideList:f=false,insideIndex:u=false,typeScopedContext:v=null})=>{if(l===null||l===void 0){return null}if(t==="@default"){c=Object.assign({},c,{isFrame:false})}if(!i(l)&&!o(l)){if(!f&&(t===null||d(e,t,{vocab:true},c)==="@graph")){if(c.eventHandler){C({event:{type:["JsonLdEvent"],code:"free-floating scalar",level:"warning",message:"Dropping free-floating scalar not in a list.",details:{value:l}},options:c})}return null}return J({activeCtx:e,activeProperty:t,value:l,options:c})}if(i(l)){let n=[];const o=w(e,t,"@container")||[];f=f||o.includes("@list");for(let o=0;o<l.length;++o){let r=await _.expand({activeCtx:e,activeProperty:t,element:l[o],options:c,insideIndex:u,typeScopedContext:v});if(f&&i(r)){r={"@list":r}}if(r===null){continue}if(i(r)){n=n.concat(r)}else{n.push(r)}}return n}const p=d(e,t,{vocab:true},c);const h=w(e,t,"@context");v=v||(e.previousContext?e:null);let y=Object.keys(l).sort();let x=!u;if(x&&v&&y.length<=2&&!y.includes("@context")){for(const t of y){const n=d(v,t,{vocab:true},c);if(n==="@value"){x=false;e=v;break}if(n==="@id"&&y.length===1){x=false;break}}}if(x){e=e.revertToPreviousContext()}if(!a(h)){e=await g({activeCtx:e,localCtx:h,propagate:true,overrideProtected:true,options:c})}if("@context"in l){e=await g({activeCtx:e,localCtx:l["@context"],options:c})}v=e;let m=null;for(const t of y){const n=d(e,t,{vocab:true},c);if(n==="@type"){m=m||t;const n=l[t];const i=Array.isArray(n)?n.length>1?n.slice().sort():n:[n];for(const t of i){const n=w(v,t,"@context");if(!a(n)){e=await g({activeCtx:e,localCtx:n,options:c,propagate:false})}}}}let S={};await A({activeCtx:e,activeProperty:t,expandedActiveProperty:p,element:l,expandedParent:S,options:c,insideList:f,typeKey:m,typeScopedContext:v});y=Object.keys(S);let E=y.length;if("@value"in S){if("@type"in S&&("@language"in S||"@direction"in S)){throw new n('Invalid JSON-LD syntax; an element containing "@value" may not contain both "@type" and either "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:S})}let t=E-1;if("@type"in S){t-=1}if("@index"in S){t-=1}if("@language"in S){t-=1}if("@direction"in S){t-=1}if(t!==0){throw new n('Invalid JSON-LD syntax; an element containing "@value" may only have an "@index" property and either "@type" or either or both "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:S})}const i=S["@value"]===null?[]:N(S["@value"]);const o=D(S,"@type");if(b(e,1.1)&&o.includes("@json")&&o.length===1);else if(i.length===0){if(c.eventHandler){C({event:{type:["JsonLdEvent"],code:"null @value value",level:"warning",message:"Dropping null @value value.",details:{value:S}},options:c})}S=null}else if(!i.every((e=>s(e)||r(e)))&&"@language"in S){throw new n("Invalid JSON-LD syntax; only strings may be language-tagged.","jsonld.SyntaxError",{code:"invalid language-tagged value",element:S})}else if(!o.every((e=>j(e)&&!(s(e)&&e.indexOf("_:")===0)||r(e)))){throw new n('Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',"jsonld.SyntaxError",{code:"invalid typed value",element:S})}}else if("@type"in S&&!i(S["@type"])){S["@type"]=[S["@type"]]}else if("@set"in S||"@list"in S){if(E>1&&!(E===2&&"@index"in S)){throw new n('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:S})}if("@set"in S){S=S["@set"];y=Object.keys(S);E=y.length}}else if(E===1&&"@language"in S){if(c.eventHandler){C({event:{type:["JsonLdEvent"],code:"object with only @language",level:"warning",message:"Dropping object with only @language.",details:{value:S}},options:c})}S=null}if(o(S)&&!c.keepFreeFloatingNodes&&!f&&(t===null||p==="@graph"||(w(e,t,"@container")||[]).includes("@graph"))){S=T({value:S,count:E,options:c})}return S};function T({value:e,count:t,options:n}){if(t===0||"@value"in e||"@list"in e||t===1&&"@id"in e){if(n.eventHandler){let i;let o;if(t===0){i="empty object";o="Dropping empty object."}else if("@value"in e){i="object with only @value";o="Dropping object with only @value."}else if("@list"in e){i="object with only @list";o="Dropping object with only @list."}else if(t===1&&"@id"in e){i="object with only @id";o="Dropping object with only @id."}C({event:{type:["JsonLdEvent"],code:i,level:"warning",message:o,details:{value:e}},options:n})}return null}return e}async function A({activeCtx:e,activeProperty:t,expandedActiveProperty:f,element:v,expandedParent:p,options:h={},insideList:y,typeKey:m,typeScopedContext:E}){const D=Object.keys(v).sort();const L=[];let O;const J=v[m]&&d(e,i(v[m])?v[m][0]:v[m],{vocab:true},{...h,typeExpansion:true})==="@json";for(const y of D){let m=v[y];let D;if(y==="@context"){continue}const A=d(e,y,{vocab:true},h);if(A===null||!(j(A)||x(A))){if(h.eventHandler){C({event:{type:["JsonLdEvent"],code:"invalid property",level:"warning",message:"Dropping property that did not expand into an absolute IRI or keyword.",details:{property:y,expandedProperty:A}},options:h})}continue}if(x(A)){if(f==="@reverse"){throw new n("Invalid JSON-LD syntax; a keyword cannot be used as a @reverse property.","jsonld.SyntaxError",{code:"invalid reverse property map",value:m})}if(A in p&&A!=="@included"&&A!=="@type"){throw new n("Invalid JSON-LD syntax; colliding keywords detected.","jsonld.SyntaxError",{code:"colliding keywords",keyword:A})}}if(A==="@id"){if(!s(m)){if(!h.isFrame){throw new n('Invalid JSON-LD syntax; "@id" value must a string.',"jsonld.SyntaxError",{code:"invalid @id value",value:m})}if(o(m)){if(!r(m)){throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:m})}}else if(i(m)){if(!m.every((e=>s(e)))){throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:m})}}else{throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:m})}}I(p,"@id",N(m).map((t=>{if(s(t)){const n=d(e,t,{base:true},h);if(h.eventHandler){if(n===null){if(t===null){C({event:{type:["JsonLdEvent"],code:"null @id value",level:"warning",message:"Null @id found.",details:{id:t}},options:h})}else{C({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:t}},options:h})}}else if(!j(n)){C({event:{type:["JsonLdEvent"],code:"relative @id reference",level:"warning",message:"Relative @id reference found.",details:{id:t,expandedId:n}},options:h})}}return n}return t})),{propertyIsArray:h.isFrame});continue}if(A==="@type"){if(o(m)){m=Object.fromEntries(Object.entries(m).map((([e,t])=>[d(E,e,{vocab:true}),N(t).map((e=>d(E,e,{base:true,vocab:true},{...h,typeExpansion:true})))])))}R(m,h.isFrame);I(p,"@type",N(m).map((e=>{if(s(e)){const t=d(E,e,{base:true,vocab:true},{...h,typeExpansion:true});if(t!=="@json"&&!j(t)){if(h.eventHandler){C({event:{type:["JsonLdEvent"],code:"relative @type reference",level:"warning",message:"Relative @type reference found.",details:{type:e}},options:h})}}return t}return e})),{propertyIsArray:!!h.isFrame});continue}if(A==="@included"&&b(e,1.1)){const i=N(await _.expand({activeCtx:e,activeProperty:t,element:m,options:h}));if(!i.every((e=>u(e)))){throw new n("Invalid JSON-LD syntax; values of @included must expand to node objects.","jsonld.SyntaxError",{code:"invalid @included value",value:m})}I(p,"@included",i,{propertyIsArray:true});continue}if(A==="@graph"&&!(o(m)||i(m))){throw new n('Invalid JSON-LD syntax; "@graph" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid @graph value",value:m})}if(A==="@value"){O=m;if(J&&b(e,1.1)){p["@value"]=m}else{I(p,"@value",m,{propertyIsArray:h.isFrame})}continue}if(A==="@language"){if(m===null){continue}if(!s(m)&&!h.isFrame){throw new n('Invalid JSON-LD syntax; "@language" value must be a string.',"jsonld.SyntaxError",{code:"invalid language-tagged string",value:m})}m=N(m).map((e=>s(e)?e.toLowerCase():e));for(const e of m){if(s(e)&&!e.match(S)){if(h.eventHandler){C({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:h})}}}I(p,"@language",m,{propertyIsArray:h.isFrame});continue}if(A==="@direction"){if(!s(m)&&!h.isFrame){throw new n('Invalid JSON-LD syntax; "@direction" value must be a string.',"jsonld.SyntaxError",{code:"invalid base direction",value:m})}m=N(m);for(const e of m){if(s(e)&&e!=="ltr"&&e!=="rtl"){throw new n('Invalid JSON-LD syntax; "@direction" must be "ltr" or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",value:m})}}I(p,"@direction",m,{propertyIsArray:h.isFrame});continue}if(A==="@index"){if(!s(m)){throw new n('Invalid JSON-LD syntax; "@index" value must be a string.',"jsonld.SyntaxError",{code:"invalid @index value",value:m})}I(p,"@index",m);continue}if(A==="@reverse"){if(!o(m)){throw new n('Invalid JSON-LD syntax; "@reverse" value must be an object.',"jsonld.SyntaxError",{code:"invalid @reverse value",value:m})}D=await _.expand({activeCtx:e,activeProperty:"@reverse",element:m,options:h});if("@reverse"in D){for(const e in D["@reverse"]){I(p,e,D["@reverse"][e],{propertyIsArray:true})}}let t=p["@reverse"]||null;for(const e in D){if(e==="@reverse"){continue}if(t===null){t=p["@reverse"]={}}I(t,e,[],{propertyIsArray:true});const i=D[e];for(let o=0;o<i.length;++o){const r=i[o];if(c(r)||l(r)){throw new n('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:D})}I(t,e,r,{propertyIsArray:true})}}continue}if(A==="@nest"){L.push(y);continue}let M=e;const U=w(e,y,"@context");if(!a(U)){M=await g({activeCtx:e,localCtx:U,propagate:true,overrideProtected:true,options:h})}const B=w(e,y,"@container")||[];if(B.includes("@language")&&o(m)){const e=w(M,y,"@direction");D=k(M,m,e,h)}else if(B.includes("@index")&&o(m)){const t=B.includes("@graph");const n=w(M,y,"@index")||"@index";const i=n!=="@index"&&d(e,n,{vocab:true},h);D=await P({activeCtx:M,options:h,activeProperty:y,value:m,asGraph:t,indexKey:n,propertyIndex:i})}else if(B.includes("@id")&&o(m)){const e=B.includes("@graph");D=await P({activeCtx:M,options:h,activeProperty:y,value:m,asGraph:e,indexKey:"@id"})}else if(B.includes("@type")&&o(m)){D=await P({activeCtx:M.revertToPreviousContext(),options:h,activeProperty:y,value:m,asGraph:false,indexKey:"@type"})}else{const n=A==="@list";if(n||A==="@set"){let e=t;if(n&&f==="@graph"){e=null}D=await _.expand({activeCtx:M,activeProperty:e,element:m,options:h,insideList:n})}else if(w(e,y,"@type")==="@json"){D={"@type":"@json","@value":m}}else{D=await _.expand({activeCtx:M,activeProperty:y,element:m,options:h,insideList:false})}}if(D===null&&A!=="@value"){continue}if(A!=="@list"&&!l(D)&&B.includes("@list")){D={"@list":N(D)}}if(B.includes("@graph")&&!B.some((e=>e==="@id"||e==="@index"))){D=N(D);if(!h.isFrame){D=D.filter((e=>{const t=Object.keys(e).length;return T({value:e,count:t,options:h})!==null}))}if(D.length===0){continue}D=D.map((e=>({"@graph":N(e)})))}if(M.mappings.has(y)&&M.mappings.get(y).reverse){const e=p["@reverse"]=p["@reverse"]||{};D=N(D);for(let t=0;t<D.length;++t){const i=D[t];if(c(i)||l(i)){throw new n('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:D})}I(e,A,i,{propertyIsArray:true})}continue}I(p,A,D,{propertyIsArray:true})}if("@value"in p){if(p["@type"]==="@json"&&b(e,1.1));else if((o(O)||i(O))&&!h.isFrame){throw new n('Invalid JSON-LD syntax; "@value" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid value object value",value:O})}}for(const r of L){const s=i(v[r])?v[r]:[v[r]];for(const i of s){if(!o(i)||Object.keys(i).some((t=>d(e,t,{vocab:true},h)==="@value"))){throw new n("Invalid JSON-LD syntax; nested value must be a node object.","jsonld.SyntaxError",{code:"invalid @nest value",value:i})}await A({activeCtx:e,activeProperty:t,expandedActiveProperty:f,element:i,expandedParent:p,options:h,insideList:y,typeScopedContext:E,typeKey:m})}}}function J({activeCtx:e,activeProperty:t,value:n,options:i}){if(n===null||n===void 0){return null}const o=d(e,t,{vocab:true},i);if(o==="@id"){return d(e,n,{base:true},i)}else if(o==="@type"){return d(e,n,{vocab:true,base:true},{...i,typeExpansion:true})}const r=w(e,t,"@type");if((r==="@id"||o==="@graph")&&s(n)){const o=d(e,n,{base:true},i);if(o===null&&n.match(E)){if(i.eventHandler){C({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:t}},options:i})}}return{"@id":o}}if(r==="@vocab"&&s(n)){return{"@id":d(e,n,{vocab:true,base:true},i)}}if(x(o)){return n}const a={};if(r&&!["@id","@vocab","@none"].includes(r)){a["@type"]=r}else if(s(n)){const n=w(e,t,"@language");if(n!==null){a["@language"]=n}const i=w(e,t,"@direction");if(i!==null){a["@direction"]=i}}if(!["boolean","number","string"].includes(typeof n)){n=n.toString()}a["@value"]=n;return a}function k(e,t,o,r){const a=[];const l=Object.keys(t).sort();for(const c of l){const l=d(e,c,{vocab:true},r);let f=t[c];if(!i(f)){f=[f]}for(const e of f){if(e===null){continue}if(!s(e)){throw new n("Invalid JSON-LD syntax; language map values must be strings.","jsonld.SyntaxError",{code:"invalid language map value",languageMap:t})}const i={"@value":e};if(l!=="@none"){if(!c.match(S)){if(r.eventHandler){C({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:c}},options:r})}}i["@language"]=c.toLowerCase()}if(o){i["@direction"]=o}a.push(i)}}return a}async function P({activeCtx:e,options:t,activeProperty:o,value:r,asGraph:s,indexKey:l,propertyIndex:u}){const v=[];const p=Object.keys(r).sort();const h=l==="@type";for(let y of p){if(h){const n=w(e,y,"@context");if(!a(n)){e=await g({activeCtx:e,localCtx:n,propagate:false,options:t})}}let p=r[y];if(!i(p)){p=[p]}p=await _.expand({activeCtx:e,activeProperty:o,element:p,options:t,insideList:false,insideIndex:true});let x;if(u){if(y==="@none"){x="@none"}else{x=J({activeCtx:e,activeProperty:l,value:y,options:t})}}else{x=d(e,y,{vocab:true},t)}if(l==="@id"){y=d(e,y,{base:true},t)}else if(h){y=x}for(let e of p){if(s&&!f(e)){e={"@graph":[e]}}if(l==="@type"){if(x==="@none");else if(e["@type"]){e["@type"]=[y].concat(e["@type"])}else{e["@type"]=[y]}}else if(c(e)&&!["@language","@type","@index"].includes(l)){throw new n(`Invalid JSON-LD syntax; Attempt to add illegal key to value object: "${l}".`,"jsonld.SyntaxError",{code:"invalid value object",value:e})}else if(u){if(x!=="@none"){I(e,u,x,{propertyIsArray:true,prependValue:true})}}else if(x!=="@none"&&!(l in e)){e[l]=y}v.push(e)}}return v}}});var C=e({"../node_modules/jsonld/lib/nodeMap.js"(e,t){var{isKeyword:n}=O();var i=p();var o=v();var r=y();var s=h();var a={};t.exports=a;a.createMergedNodeMap=(e,t)=>{t=t||{};const n=t.issuer||new r.IdentifierIssuer("_:b");const i={"@default":{}};a.createNodeMap(e,i,"@default",n);return a.mergeNodeMaps(i)};a.createNodeMap=(e,t,l,c,f,u)=>{if(o.isArray(e)){for(const n of e){a.createNodeMap(n,t,l,c,void 0,u)}return}if(!o.isObject(e)){if(u){u.push(e)}return}if(i.isValue(e)){if("@type"in e){let t=e["@type"];if(t.indexOf("_:")===0){e["@type"]=t=c.getId(t)}}if(u){u.push(e)}return}else if(u&&i.isList(e)){const n=[];a.createNodeMap(e["@list"],t,l,c,f,n);u.push({"@list":n});return}if("@type"in e){const t=e["@type"];for(const e of t){if(e.indexOf("_:")===0){c.getId(e)}}}if(o.isUndefined(f)){f=i.isBlankNode(e)?c.getId(e["@id"]):e["@id"]}if(u){u.push({"@id":f})}const d=t[l];const v=d[f]=d[f]||{};v["@id"]=f;const p=Object.keys(e).sort();for(let o of p){if(o==="@id"){continue}if(o==="@reverse"){const n={"@id":f};const o=e["@reverse"];for(const e in o){const s=o[e];for(const o of s){let s=o["@id"];if(i.isBlankNode(o)){s=c.getId(s)}a.createNodeMap(o,t,l,c,s);r.addValue(d[s],e,n,{propertyIsArray:true,allowDuplicate:false})}}continue}if(o==="@graph"){if(!(f in t)){t[f]={}}a.createNodeMap(e[o],t,f,c);continue}if(o==="@included"){a.createNodeMap(e[o],t,l,c);continue}if(o!=="@type"&&n(o)){if(o==="@index"&&o in v&&(e[o]!==v[o]||e[o]["@id"]!==v[o]["@id"])){throw new s("Invalid JSON-LD syntax; conflicting @index property detected.","jsonld.SyntaxError",{code:"conflicting indexes",subject:v})}v[o]=e[o];continue}const u=e[o];if(o.indexOf("_:")===0){o=c.getId(o)}if(u.length===0){r.addValue(v,o,[],{propertyIsArray:true});continue}for(let e of u){if(o==="@type"){e=e.indexOf("_:")===0?c.getId(e):e}if(i.isSubject(e)||i.isSubjectReference(e)){if("@id"in e&&!e["@id"]){continue}const n=i.isBlankNode(e)?c.getId(e["@id"]):e["@id"];r.addValue(v,o,{"@id":n},{propertyIsArray:true,allowDuplicate:false});a.createNodeMap(e,t,l,c,n)}else if(i.isValue(e)){r.addValue(v,o,e,{propertyIsArray:true,allowDuplicate:false})}else if(i.isList(e)){const n=[];a.createNodeMap(e["@list"],t,l,c,f,n);e={"@list":n};r.addValue(v,o,e,{propertyIsArray:true,allowDuplicate:false})}else{a.createNodeMap(e,t,l,c,f);r.addValue(v,o,e,{propertyIsArray:true,allowDuplicate:false})}}}};a.mergeNodeMapGraphs=e=>{const t={};for(const i of Object.keys(e).sort()){for(const o of Object.keys(e[i]).sort()){const s=e[i][o];if(!(o in t)){t[o]={"@id":o}}const a=t[o];for(const e of Object.keys(s).sort()){if(n(e)&&e!=="@type"){a[e]=r.clone(s[e])}else{for(const t of s[e]){r.addValue(a,e,r.clone(t),{propertyIsArray:true,allowDuplicate:false})}}}}}return t};a.mergeNodeMaps=e=>{const t=e["@default"];const n=Object.keys(e).sort();for(const o of n){if(o==="@default"){continue}const n=e[o];let r=t[o];if(!r){t[o]=r={"@id":o,"@graph":[]}}else if(!("@graph"in r)){r["@graph"]=[]}const s=r["@graph"];for(const e of Object.keys(n).sort()){const t=n[e];if(!i.isSubjectReference(t)){s.push(t)}}}return t}}});var _=e({"../node_modules/jsonld/lib/flatten.js"(e,t){var{isSubjectReference:n}=p();var{createMergedNodeMap:i}=C();var o={};t.exports=o;o.flatten=e=>{const t=i(e);const o=[];const r=Object.keys(t).sort();for(let e=0;e<r.length;++e){const i=t[r[e]];if(!n(i)){o.push(i)}}return o}}});var T=e({"../node_modules/jsonld/lib/fromRdf.js"(e,t){var n=h();var i=p();var o=v();var{REGEX_BCP47:r,addValue:s}=y();var{handleEvent:a}=L();var{RDF_LIST:l,RDF_FIRST:c,RDF_REST:f,RDF_NIL:u,RDF_TYPE:d,RDF_JSON_LITERAL:x,XSD_BOOLEAN:m,XSD_DOUBLE:g,XSD_INTEGER:b,XSD_STRING:j}=w();var S={};t.exports=S;S.fromRDF=async(e,t)=>{const{useRdfType:r=false,useNativeTypes:a=false,rdfDirection:v=null}=t;const p={};const h={"@default":p};const y={};if(v){if(v==="compound-literal"){throw new n("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:v})}else if(v!=="i18n-datatype"){throw new n("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:v})}}for(const n of e){const e=n.graph.termType==="DefaultGraph"?"@default":n.graph.value;if(!(e in h)){h[e]={}}if(e!=="@default"&&!(e in p)){p[e]={"@id":e}}const i=h[e];const o=n.subject.value;const l=n.predicate.value;const c=n.object;if(!(o in i)){i[o]={"@id":o}}const f=i[o];const w=c.termType.endsWith("Node");if(w&&!(c.value in i)){i[c.value]={"@id":c.value}}if(l===d&&!r&&w){s(f,"@type",c.value,{propertyIsArray:true});continue}const x=E(c,a,v,t);s(f,l,x,{propertyIsArray:true});if(w){if(c.value===u){const e=i[c.value];if(!("usages"in e)){e.usages=[]}e.usages.push({node:f,property:l,value:x})}else if(c.value in y){y[c.value]=false}else{y[c.value]={node:f,property:l,value:x}}}}for(const e in h){const t=h[e];if(!(u in t)){continue}const n=t[u];if(!n.usages){continue}for(let e of n.usages){let n=e.node;let r=e.property;let s=e.value;const a=[];const u=[];let d=Object.keys(n).length;while(r===f&&o.isObject(y[n["@id"]])&&o.isArray(n[c])&&n[c].length===1&&o.isArray(n[f])&&n[f].length===1&&(d===3||d===4&&o.isArray(n["@type"])&&n["@type"].length===1&&n["@type"][0]===l)){a.push(n[c][0]);u.push(n["@id"]);e=y[n["@id"]];n=e.node;r=e.property;s=e.value;d=Object.keys(n).length;if(!i.isBlankNode(n)){break}}delete s["@id"];s["@list"]=a.reverse();for(const e of u){delete t[e]}}delete n.usages}const w=[];const x=Object.keys(p).sort();for(const e of x){const t=p[e];if(e in h){const n=t["@graph"]=[];const o=h[e];const r=Object.keys(o).sort();for(const e of r){const t=o[e];if(!i.isSubjectReference(t)){n.push(t)}}}if(!i.isSubjectReference(t)){w.push(t)}}return w};function E(e,t,i,s){if(e.termType.endsWith("Node")){return{"@id":e.value}}const l={"@value":e.value};if(e.language){if(!e.language.match(r)){if(s.eventHandler){a({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e.language}},options:s})}}l["@language"]=e.language}else{let c=e.datatype.value;if(!c){c=j}if(c===x){c="@json";try{l["@value"]=JSON.parse(l["@value"])}catch(e){throw new n("JSON literal could not be parsed.","jsonld.InvalidJsonLiteral",{code:"invalid JSON literal",value:l["@value"],cause:e})}}if(t){if(c===m){if(l["@value"]==="true"){l["@value"]=true}else if(l["@value"]==="false"){l["@value"]=false}}else if(o.isNumeric(l["@value"])){if(c===b){const e=parseInt(l["@value"],10);if(e.toFixed(0)===l["@value"]){l["@value"]=e}}else if(c===g){l["@value"]=parseFloat(l["@value"])}}if(![m,b,g,j].includes(c)){l["@type"]=c}}else if(i==="i18n-datatype"&&c.startsWith("https://www.w3.org/ns/i18n#")){const[,e,t]=c.split(/[#_]/);if(e.length>0){l["@language"]=e;if(!e.match(r)){if(s.eventHandler){a({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:s})}}}l["@direction"]=t}else if(c!==j){l["@type"]=c}}return l}}});var A=e({"../node_modules/jsonld/node_modules/canonicalize/lib/canonicalize.js"(e,t){t.exports=function e(t){if(t===null||typeof t!=="object"||t.toJSON!=null){return JSON.stringify(t)}if(Array.isArray(t)){return"["+t.reduce(((t,n,i)=>{const o=i===0?"":",";const r=n===void 0||typeof n==="symbol"?null:n;return t+o+e(r)}),"")+"]"}return"{"+Object.keys(t).sort().reduce(((n,i,o)=>{if(t[i]===void 0||typeof t[i]==="symbol"){return n}const r=n.length===0?"":",";return n+r+e(i)+":"+e(t[i])}),"")+"}"}}});var J=e({"../node_modules/jsonld/lib/toRdf.js"(e,t){var{createNodeMap:n}=C();var{isKeyword:i}=O();var o=p();var r=A();var s=h();var a=v();var l=y();var{handleEvent:c}=L();var{RDF_FIRST:f,RDF_REST:u,RDF_NIL:d,RDF_TYPE:x,RDF_JSON_LITERAL:g,RDF_LANGSTRING:b,XSD_BOOLEAN:j,XSD_DOUBLE:S,XSD_INTEGER:E,XSD_STRING:I}=w();var{isAbsolute:N}=m();var D={};t.exports=D;D.toRDF=(e,t)=>{const i=new l.IdentifierIssuer("_:b");const o={"@default":{}};n(e,o,"@default",i);const r=[];const s=Object.keys(o).sort();for(const e of s){let n;if(e==="@default"){n={termType:"DefaultGraph",value:""}}else if(N(e)){if(e.startsWith("_:")){n={termType:"BlankNode"}}else{n={termType:"NamedNode"}}n.value=e}else{if(t.eventHandler){c({event:{type:["JsonLdEvent"],code:"relative graph reference",level:"warning",message:"Relative graph reference found.",details:{graph:e}},options:t})}continue}R(r,o[e],n,i,t)}return r};function R(e,t,n,o,r){const s=Object.keys(t).sort();for(const a of s){const s=t[a];const l=Object.keys(s).sort();for(let t of l){const l=s[t];if(t==="@type"){t=x}else if(i(t)){continue}for(const i of l){const s={termType:a.startsWith("_:")?"BlankNode":"NamedNode",value:a};if(!N(a)){if(r.eventHandler){c({event:{type:["JsonLdEvent"],code:"relative subject reference",level:"warning",message:"Relative subject reference found.",details:{subject:a}},options:r})}continue}const l={termType:t.startsWith("_:")?"BlankNode":"NamedNode",value:t};if(!N(t)){if(r.eventHandler){c({event:{type:["JsonLdEvent"],code:"relative predicate reference",level:"warning",message:"Relative predicate reference found.",details:{predicate:t}},options:r})}continue}if(l.termType==="BlankNode"&&!r.produceGeneralizedRdf){if(r.eventHandler){c({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 f=T(i,o,e,n,r.rdfDirection,r);if(f){e.push({subject:s,predicate:l,object:f,graph:n})}}}}}function _(e,t,n,i,o,r){const s={termType:"NamedNode",value:f};const a={termType:"NamedNode",value:u};const l={termType:"NamedNode",value:d};const c=e.pop();const v=c?{termType:"BlankNode",value:t.getId()}:l;let p=v;for(const l of e){const e=T(l,t,n,i,o,r);const c={termType:"BlankNode",value:t.getId()};n.push({subject:p,predicate:s,object:e,graph:i});n.push({subject:p,predicate:a,object:c,graph:i});p=c}if(c){const e=T(c,t,n,i,o,r);n.push({subject:p,predicate:s,object:e,graph:i});n.push({subject:p,predicate:a,object:l,graph:i})}return v}function T(e,t,n,i,l,f){const u={};if(o.isValue(e)){u.termType="Literal";u.value=void 0;u.datatype={termType:"NamedNode"};let t=e["@value"];const n=e["@type"]||null;if(n==="@json"){u.value=r(t);u.datatype.value=g}else if(a.isBoolean(t)){u.value=t.toString();u.datatype.value=n||j}else if(a.isDouble(t)||n===S){if(!a.isDouble(t)){t=parseFloat(t)}u.value=t.toExponential(15).replace(/(\d)0*e\+?/,"$1E");u.datatype.value=n||S}else if(a.isNumber(t)){u.value=t.toFixed(0);u.datatype.value=n||E}else if("@direction"in e&&l==="i18n-datatype"){const n=(e["@language"]||"").toLowerCase();const i=e["@direction"];const o=`https://www.w3.org/ns/i18n#${n}_${i}`;u.datatype.value=o;u.value=t}else if("@direction"in e&&l==="compound-literal"){throw new s("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:l})}else if("@direction"in e&&l){throw new s("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:l})}else if("@language"in e){if("@direction"in e&&!l){if(f.eventHandler){c({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:u.value}},options:f})}}u.value=t;u.datatype.value=n||b;u.language=e["@language"]}else{if("@direction"in e&&!l){if(f.eventHandler){c({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:u.value}},options:f})}}u.value=t;u.datatype.value=n||I}}else if(o.isList(e)){const o=_(e["@list"],t,n,i,l,f);u.termType=o.termType;u.value=o.value}else{const t=a.isObject(e)?e["@id"]:e;u.termType=t.startsWith("_:")?"BlankNode":"NamedNode";u.value=t}if(u.termType==="NamedNode"&&!N(u.value)){if(f.eventHandler){c({event:{type:["JsonLdEvent"],code:"relative object reference",level:"warning",message:"Relative object reference found.",details:{object:u.value}},options:f})}return null}return u}}});var k=e({"../node_modules/jsonld/lib/frame.js"(e,t){var{isKeyword:n}=O();var i=p();var o=v();var r=y();var s=m();var a=h();var{createNodeMap:l,mergeNodeMapGraphs:c}=C();var f={};t.exports=f;f.frameMergedOrDefault=(e,t,n)=>{const i={options:n,embedded:false,graph:"@default",graphMap:{"@default":{}},subjectStack:[],link:{},bnodeMap:{}};const o=new r.IdentifierIssuer("_:b");l(e,i.graphMap,"@default",o);if(n.merged){i.graphMap["@merged"]=c(i.graphMap);i.graph="@merged"}i.subjects=i.graphMap[i.graph];const s=[];f.frame(i,Object.keys(i.subjects).sort(),t,s);if(n.pruneBlankNodeIdentifiers){n.bnodesToClear=Object.keys(i.bnodeMap).filter((e=>i.bnodeMap[e].length===1))}n.link={};return S(s,n)};f.frame=(e,t,s,l,c=null)=>{x(s);s=s[0];const v=e.options;const p={embed:w(s,v,"embed"),explicit:w(s,v,"explicit"),requireAll:w(s,v,"requireAll")};if(!e.link.hasOwnProperty(e.graph)){e.link[e.graph]={}}const h=e.link[e.graph];const y=g(e,t,s,p);const m=Object.keys(y).sort();for(const x of m){const m=y[x];if(c===null){e.uniqueEmbeds={[e.graph]:{}}}else{e.uniqueEmbeds[e.graph]=e.uniqueEmbeds[e.graph]||{}}if(p.embed==="@link"&&x in h){E(l,c,h[x]);continue}const g={"@id":x};if(x.indexOf("_:")===0){r.addValue(e.bnodeMap,x,g,{propertyIsArray:true})}h[x]=g;if((p.embed==="@first"||p.embed==="@last")&&e.is11){throw new a("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:s})}if(!e.embedded&&e.uniqueEmbeds[e.graph].hasOwnProperty(x)){continue}if(e.embedded&&(p.embed==="@never"||d(m,e.graph,e.subjectStack))){E(l,c,g);continue}if(e.embedded&&(p.embed=="@first"||p.embed=="@once")&&e.uniqueEmbeds[e.graph].hasOwnProperty(x)){E(l,c,g);continue}if(p.embed==="@last"){if(x in e.uniqueEmbeds[e.graph]){j(e,x)}}e.uniqueEmbeds[e.graph][x]={parent:l,property:c};e.subjectStack.push({subject:m,graph:e.graph});if(x in e.graphMap){let t=false;let n=null;if(!("@graph"in s)){t=e.graph!=="@merged";n={}}else{n=s["@graph"][0];t=!(x==="@merged"||x==="@default");if(!o.isObject(n)){n={}}}if(t){f.frame({...e,graph:x,embedded:false},Object.keys(e.graphMap[x]).sort(),[n],g,"@graph")}}if("@included"in s){f.frame({...e,embedded:false},t,s["@included"],g,"@included")}for(const t of Object.keys(m).sort()){if(n(t)){g[t]=r.clone(m[t]);if(t==="@type"){for(const t of m["@type"]){if(t.indexOf("_:")===0){r.addValue(e.bnodeMap,t,g,{propertyIsArray:true})}}}continue}if(p.explicit&&!(t in s)){continue}for(const n of m[t]){const o=t in s?s[t]:u(p);if(i.isList(n)){const o=s[t]&&s[t][0]&&s[t][0]["@list"]?s[t][0]["@list"]:u(p);const a={"@list":[]};E(g,t,a);const l=n["@list"];for(const t of l){if(i.isSubjectReference(t)){f.frame({...e,embedded:true},[t["@id"]],o,a,"@list")}else{E(a,"@list",r.clone(t))}}}else if(i.isSubjectReference(n)){f.frame({...e,embedded:true},[n["@id"]],o,g,t)}else if(N(o[0],n)){E(g,t,r.clone(n))}}}for(const e of Object.keys(s).sort()){if(e==="@type"){if(!o.isObject(s[e][0])||!("@default"in s[e][0])){continue}}else if(n(e)){continue}const t=s[e][0]||{};const i=w(t,v,"omitDefault");if(!i&&!(e in g)){let n="@null";if("@default"in t){n=r.clone(t["@default"])}if(!o.isArray(n)){n=[n]}g[e]=[{"@preserve":n}]}}for(const t of Object.keys(s["@reverse"]||{}).sort()){const n=s["@reverse"][t];for(const i of Object.keys(e.subjects)){const o=r.getValues(e.subjects[i],t);if(o.some((e=>e["@id"]===x))){g["@reverse"]=g["@reverse"]||{};r.addValue(g["@reverse"],t,[],{propertyIsArray:true});f.frame({...e,embedded:true},[i],n,g["@reverse"][t],c)}}}E(l,c,g);e.subjectStack.pop()}};f.cleanupNull=(e,t)=>{if(o.isArray(e)){const n=e.map((e=>f.cleanupNull(e,t)));return n.filter((e=>e))}if(e==="@null"){return null}if(o.isObject(e)){if("@id"in e){const n=e["@id"];if(t.link.hasOwnProperty(n)){const i=t.link[n].indexOf(e);if(i!==-1){return t.link[n][i]}t.link[n].push(e)}else{t.link[n]=[e]}}for(const n in e){e[n]=f.cleanupNull(e[n],t)}}return e};function u(e){const t={};for(const n in e){if(e[n]!==void 0){t["@"+n]=[e[n]]}}return[t]}function d(e,t,n){for(let i=n.length-1;i>=0;--i){const o=n[i];if(o.graph===t&&o.subject["@id"]===e["@id"]){return true}}return false}function w(e,t,n){const i="@"+n;let o=i in e?e[i][0]:t[n];if(n==="embed"){if(o===true){o="@once"}else if(o===false){o="@never"}else if(o!=="@always"&&o!=="@never"&&o!=="@link"&&o!=="@first"&&o!=="@last"&&o!=="@once"){throw new a("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:e})}}return o}function x(e){if(!o.isArray(e)||e.length!==1||!o.isObject(e[0])){throw new a("Invalid JSON-LD syntax; a JSON-LD frame must be a single object.","jsonld.SyntaxError",{frame:e})}if("@id"in e[0]){for(const t of r.asArray(e[0]["@id"])){if(!(o.isObject(t)||s.isAbsolute(t))||o.isString(t)&&t.indexOf("_:")===0){throw new a("Invalid JSON-LD syntax; invalid @id in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e})}}}if("@type"in e[0]){for(const t of r.asArray(e[0]["@type"])){if(!(o.isObject(t)||s.isAbsolute(t)||t==="@json")||o.isString(t)&&t.indexOf("_:")===0){throw new a("Invalid JSON-LD syntax; invalid @type in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e})}}}}function g(e,t,n,i){const o={};for(const r of t){const t=e.graphMap[e.graph][r];if(b(e,t,n,i)){o[r]=t}}return o}function b(e,t,s,a){let l=true;let c=false;for(const f in s){let u=false;const d=r.getValues(t,f);const v=r.getValues(s,f).length===0;if(f==="@id"){if(o.isEmptyObject(s["@id"][0]||{})){u=true}else if(s["@id"].length>=0){u=s["@id"].includes(d[0])}if(!a.requireAll){return u}}else if(f==="@type"){l=false;if(v){if(d.length>0){return false}u=true}else if(s["@type"].length===1&&o.isEmptyObject(s["@type"][0])){u=d.length>0}else{for(const e of s["@type"]){if(o.isObject(e)&&"@default"in e){u=true}else{u=u||d.some((t=>t===e))}}}if(!a.requireAll){return u}}else if(n(f)){continue}else{const t=r.getValues(s,f)[0];let n=false;if(t){x([t]);n="@default"in t}l=false;if(d.length===0&&n){continue}if(d.length>0&&v){return false}if(t===void 0){if(d.length>0){return false}u=true}else{if(i.isList(t)){const n=t["@list"][0];if(i.isList(d[0])){const t=d[0]["@list"];if(i.isValue(n)){u=t.some((e=>N(n,e)))}else if(i.isSubject(n)||i.isSubjectReference(n)){u=t.some((t=>I(e,n,t,a)))}}}else if(i.isValue(t)){u=d.some((e=>N(t,e)))}else if(i.isSubjectReference(t)){u=d.some((n=>I(e,t,n,a)))}else if(o.isObject(t)){u=d.length>0}else{u=false}}}if(!u&&a.requireAll){return false}c=c||u}return l||c}function j(e,t){const n=e.uniqueEmbeds[e.graph];const i=n[t];const s=i.parent;const a=i.property;const l={"@id":t};if(o.isArray(s)){for(let e=0;e<s.length;++e){if(r.compareValues(s[e],l)){s[e]=l;break}}}else{const e=o.isArray(s[a]);r.removeValue(s,a,l,{propertyIsArray:e});r.addValue(s,a,l,{propertyIsArray:e})}const c=e=>{const t=Object.keys(n);for(const i of t){if(i in n&&o.isObject(n[i].parent)&&n[i].parent["@id"]===e){delete n[i];c(i)}}};c(t)}function S(e,t){if(o.isArray(e)){return e.map((e=>S(e,t)))}if(o.isObject(e)){if("@preserve"in e){return e["@preserve"][0]}if(i.isValue(e)){return e}if(i.isList(e)){e["@list"]=S(e["@list"],t);return e}if("@id"in e){const n=e["@id"];if(t.link.hasOwnProperty(n)){const i=t.link[n].indexOf(e);if(i!==-1){return t.link[n][i]}t.link[n].push(e)}else{t.link[n]=[e]}}for(const n in e){if(n==="@id"&&t.bnodesToClear.includes(e[n])){delete e["@id"];continue}e[n]=S(e[n],t)}}return e}function E(e,t,n){if(o.isObject(e)){r.addValue(e,t,n,{propertyIsArray:true})}else{e.push(n)}}function I(e,t,n,i){if(!("@id"in n)){return false}const o=e.subjects[n["@id"]];return o&&b(e,o,t,i)}function N(e,t){const n=t["@value"];const i=t["@type"];const r=t["@language"];const s=e["@value"]?o.isArray(e["@value"])?e["@value"]:[e["@value"]]:[];const a=e["@type"]?o.isArray(e["@type"])?e["@type"]:[e["@type"]]:[];const l=e["@language"]?o.isArray(e["@language"])?e["@language"]:[e["@language"]]:[];if(s.length===0&&a.length===0&&l.length===0){return true}if(!(s.includes(n)||o.isEmptyObject(s[0]))){return false}if(!(!i&&a.length===0||a.includes(i)||i&&o.isEmptyObject(a[0]))){return false}if(!(!r&&l.length===0||l.includes(r)||r&&o.isEmptyObject(l[0]))){return false}return true}}});var P=e({"../node_modules/jsonld/lib/compact.js"(e,t){var n=h();var{isArray:i,isObject:o,isString:r,isUndefined:s}=v();var{isList:a,isValue:l,isGraph:c,isSimpleGraph:f,isSubjectReference:u}=p();var{expandIri:d,getContextValue:w,isKeyword:x,process:g,processingMode:b}=O();var{removeBase:j,prependBase:S}=m();var{REGEX_KEYWORD:E,addValue:I,asArray:N,compareShortestLeast:D}=y();var L={};t.exports=L;L.compact=async({activeCtx:e,activeProperty:t=null,element:d,options:v={}})=>{if(i(d)){let n=[];for(let i=0;i<d.length;++i){const o=await L.compact({activeCtx:e,activeProperty:t,element:d[i],options:v});if(o===null){continue}n.push(o)}if(v.compactArrays&&n.length===1){const i=w(e,t,"@container")||[];if(i.length===0){n=n[0]}}return n}const p=w(e,t,"@context");if(!s(p)){e=await g({activeCtx:e,localCtx:p,propagate:true,overrideProtected:true,options:v})}if(o(d)){if(v.link&&"@id"in d&&v.link.hasOwnProperty(d["@id"])){const e=v.link[d["@id"]];for(let t=0;t<e.length;++t){if(e[t].expanded===d){return e[t].compacted}}}if(l(d)||u(d)){const n=L.compactValue({activeCtx:e,activeProperty:t,value:d,options:v});if(v.link&&u(d)){if(!v.link.hasOwnProperty(d["@id"])){v.link[d["@id"]]=[]}v.link[d["@id"]].push({expanded:d,compacted:n})}return n}if(a(d)){const n=w(e,t,"@container")||[];if(n.includes("@list")){return L.compact({activeCtx:e,activeProperty:t,element:d["@list"],options:v})}}const p=t==="@reverse";const h={};const y=e;if(!l(d)&&!u(d)){e=e.revertToPreviousContext()}const m=w(y,t,"@context");if(!s(m)){e=await g({activeCtx:e,localCtx:m,propagate:true,overrideProtected:true,options:v})}if(v.link&&"@id"in d){if(!v.link.hasOwnProperty(d["@id"])){v.link[d["@id"]]=[]}v.link[d["@id"]].push({expanded:d,compacted:h})}let j=d["@type"]||[];if(j.length>1){j=Array.from(j).sort()}const S=e;for(const t of j){const n=L.compactIri({activeCtx:S,iri:t,relativeTo:{vocab:true}});const i=w(y,n,"@context");if(!s(i)){e=await g({activeCtx:e,localCtx:i,options:v,propagate:false})}}const E=Object.keys(d).sort();for(const s of E){const u=d[s];if(s==="@id"){let t=N(u).map((t=>L.compactIri({activeCtx:e,iri:t,relativeTo:{vocab:false},base:v.base})));if(t.length===1){t=t[0]}const n=L.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:true}});h[n]=t;continue}if(s==="@type"){let t=N(u).map((e=>L.compactIri({activeCtx:y,iri:e,relativeTo:{vocab:true}})));if(t.length===1){t=t[0]}const n=L.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:true}});const o=w(e,n,"@container")||[];const r=o.includes("@set")&&b(e,1.1);const s=r||i(t)&&u.length===0;I(h,n,t,{propertyIsArray:s});continue}if(s==="@reverse"){const t=await L.compact({activeCtx:e,activeProperty:"@reverse",element:u,options:v});for(const n in t){if(e.mappings.has(n)&&e.mappings.get(n).reverse){const i=t[n];const o=w(e,n,"@container")||[];const r=o.includes("@set")||!v.compactArrays;I(h,n,i,{propertyIsArray:r});delete t[n]}}if(Object.keys(t).length>0){const n=L.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:true}});I(h,n,t)}continue}if(s==="@preserve"){const n=await L.compact({activeCtx:e,activeProperty:t,element:u,options:v});if(!(i(n)&&n.length===0)){I(h,s,n)}continue}if(s==="@index"){const n=w(e,t,"@container")||[];if(n.includes("@index")){continue}const i=L.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:true}});I(h,i,u);continue}if(s!=="@graph"&&s!=="@list"&&s!=="@included"&&x(s)){const t=L.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:true}});I(h,t,u);continue}if(!i(u)){throw new n("JSON-LD expansion error; expanded value must be an array.","jsonld.SyntaxError")}if(u.length===0){const t=L.compactIri({activeCtx:e,iri:s,value:u,relativeTo:{vocab:true},reverse:p});const n=e.mappings.has(t)?e.mappings.get(t)["@nest"]:null;let i=h;if(n){C(e,n,v);if(!o(h[n])){h[n]={}}i=h[n]}I(i,t,u,{propertyIsArray:true})}for(const t of u){const n=L.compactIri({activeCtx:e,iri:s,value:t,relativeTo:{vocab:true},reverse:p});const u=e.mappings.has(n)?e.mappings.get(n)["@nest"]:null;let d=h;if(u){C(e,u,v);if(!o(h[u])){h[u]={}}d=h[u]}const y=w(e,n,"@container")||[];const x=c(t);const m=a(t);let g;if(m){g=t["@list"]}else if(x){g=t["@graph"]}let b=await L.compact({activeCtx:e,activeProperty:n,element:m||x?g:t,options:v});if(m){if(!i(b)){b=[b]}if(!y.includes("@list")){b={[L.compactIri({activeCtx:e,iri:"@list",relativeTo:{vocab:true}})]:b};if("@index"in t){b[L.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:true}})]=t["@index"]}}else{I(d,n,b,{valueIsArray:true,allowDuplicate:true});continue}}if(x){if(y.includes("@graph")&&(y.includes("@id")||y.includes("@index")&&f(t))){let i;if(d.hasOwnProperty(n)){i=d[n]}else{d[n]=i={}}const o=(y.includes("@id")?t["@id"]:t["@index"])||L.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:true}});I(i,o,b,{propertyIsArray:!v.compactArrays||y.includes("@set")})}else if(y.includes("@graph")&&f(t)){if(i(b)&&b.length>1){b={"@included":b}}I(d,n,b,{propertyIsArray:!v.compactArrays||y.includes("@set")})}else{if(i(b)&&b.length===1&&v.compactArrays){b=b[0]}b={[L.compactIri({activeCtx:e,iri:"@graph",relativeTo:{vocab:true}})]:b};if("@id"in t){b[L.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:true}})]=t["@id"]}if("@index"in t){b[L.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:true}})]=t["@index"]}I(d,n,b,{propertyIsArray:!v.compactArrays||y.includes("@set")})}}else if(y.includes("@language")||y.includes("@index")||y.includes("@id")||y.includes("@type")){let i;if(d.hasOwnProperty(n)){i=d[n]}else{d[n]=i={}}let o;if(y.includes("@language")){if(l(b)){b=b["@value"]}o=t["@language"]}else if(y.includes("@index")){const i=w(e,n,"@index")||"@index";const s=L.compactIri({activeCtx:e,iri:i,relativeTo:{vocab:true}});if(i==="@index"){o=t["@index"];delete b[s]}else{let e;[o,...e]=N(b[i]||[]);if(!r(o)){o=null}else{switch(e.length){case 0:delete b[i];break;case 1:b[i]=e[0];break;default:b[i]=e;break}}}}else if(y.includes("@id")){const t=L.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:true}});o=b[t];delete b[t]}else if(y.includes("@type")){const i=L.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:true}});let r;[o,...r]=N(b[i]||[]);switch(r.length){case 0:delete b[i];break;case 1:b[i]=r[0];break;default:b[i]=r;break}if(Object.keys(b).length===1&&"@id"in t){b=await L.compact({activeCtx:e,activeProperty:n,element:{"@id":t["@id"]},options:v})}}if(!o){o=L.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:true}})}I(i,o,b,{propertyIsArray:y.includes("@set")})}else{const e=!v.compactArrays||y.includes("@set")||y.includes("@list")||i(b)&&b.length===0||s==="@list"||s==="@graph";I(d,n,b,{propertyIsArray:e})}}}return h}return d};L.compactIri=({activeCtx:e,iri:t,value:i=null,relativeTo:r={vocab:false},reverse:s=false,base:f=null})=>{if(t===null){return t}if(e.isPropertyTermScoped&&e.previousContext){e=e.previousContext}const u=e.getInverse();if(x(t)&&t in u&&"@none"in u[t]&&"@type"in u[t]["@none"]&&"@none"in u[t]["@none"]["@type"]){return u[t]["@none"]["@type"]["@none"]}if(r.vocab&&t in u){const n=e["@language"]||"@none";const r=[];if(o(i)&&"@index"in i&&!("@graph"in i)){r.push("@index","@index@set")}if(o(i)&&"@preserve"in i){i=i["@preserve"][0]}if(c(i)){if("@index"in i){r.push("@graph@index","@graph@index@set","@index","@index@set")}if("@id"in i){r.push("@graph@id","@graph@id@set")}r.push("@graph","@graph@set","@set");if(!("@index"in i)){r.push("@graph@index","@graph@index@set","@index","@index@set")}if(!("@id"in i)){r.push("@graph@id","@graph@id@set")}}else if(o(i)&&!l(i)){r.push("@id","@id@set","@type","@set@type")}let f="@language";let u="@null";if(s){f="@type";u="@reverse";r.push("@set")}else if(a(i)){if(!("@index"in i)){r.push("@list")}const e=i["@list"];if(e.length===0){f="@any";u="@none"}else{let t=e.length===0?n:null;let i=null;for(let n=0;n<e.length;++n){const o=e[n];let r="@none";let s="@none";if(l(o)){if("@direction"in o){const e=(o["@language"]||"").toLowerCase();const t=o["@direction"];r=`${e}_${t}`}else if("@language"in o){r=o["@language"].toLowerCase()}else if("@type"in o){s=o["@type"]}else{r="@null"}}else{s="@id"}if(t===null){t=r}else if(r!==t&&l(o)){t="@none"}if(i===null){i=s}else if(s!==i){i="@none"}if(t==="@none"&&i==="@none"){break}}t=t||"@none";i=i||"@none";if(i!=="@none"){f="@type";u=i}else{u=t}}}else{if(l(i)){if("@language"in i&&!("@index"in i)){r.push("@language","@language@set");u=i["@language"];const e=i["@direction"];if(e){u=`${u}_${e}`}}else if("@direction"in i&&!("@index"in i)){u=`_${i["@direction"]}`}else if("@type"in i){f="@type";u=i["@type"]}}else{f="@type";u="@id"}r.push("@set")}r.push("@none");if(o(i)&&!("@index"in i)){r.push("@index","@index@set")}if(l(i)&&Object.keys(i).length===1){r.push("@language","@language@set")}const d=R(e,t,i,r,f,u);if(d!==null){return d}}if(r.vocab){if("@vocab"in e){const n=e["@vocab"];if(t.indexOf(n)===0&&t!==n){const i=t.substr(n.length);if(!e.mappings.has(i)){return i}}}}let d=null;const v=[];let p=e.fastCurieMap;const h=t.length-1;for(let e=0;e<h&&t[e]in p;++e){p=p[t[e]];if(""in p){v.push(p[""][0])}}for(let n=v.length-1;n>=0;--n){const o=v[n];const r=o.terms;for(const n of r){const r=n+":"+t.substr(o.iri.length);const s=e.mappings.get(n)._prefix&&(!e.mappings.has(r)||i===null&&e.mappings.get(r)["@id"]===t);if(s&&(d===null||D(r,d)<0)){d=r}}}if(d!==null){return d}for(const[i,o]of e.mappings){if(o&&o._prefix&&t.startsWith(i+":")){throw new n(`Absolute IRI "${t}" confused with prefix "${i}".`,"jsonld.SyntaxError",{code:"IRI confused with prefix",context:e})}}if(!r.vocab){if("@base"in e){if(!e["@base"]){return t}else{const n=j(S(f,e["@base"]),t);return E.test(n)?`./${n}`:n}}else{return j(f,t)}}return t};L.compactValue=({activeCtx:e,activeProperty:t,value:n,options:i})=>{if(l(n)){const i=w(e,t,"@type");const o=w(e,t,"@language");const s=w(e,t,"@direction");const a=w(e,t,"@container")||[];const l="@index"in n&&!a.includes("@index");if(!l&&i!=="@none"){if(n["@type"]===i){return n["@value"]}if("@language"in n&&n["@language"]===o&&"@direction"in n&&n["@direction"]===s){return n["@value"]}if("@language"in n&&n["@language"]===o){return n["@value"]}if("@direction"in n&&n["@direction"]===s){return n["@value"]}}const c=Object.keys(n).length;const f=c===1||c===2&&"@index"in n&&!l;const u="@language"in e;const d=r(n["@value"]);const v=e.mappings.has(t)&&e.mappings.get(t)["@language"]===null;if(f&&i!=="@none"&&(!u||!d||v)){return n["@value"]}const p={};if(l){p[L.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:true}})]=n["@index"]}if("@type"in n){p[L.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:true}})]=L.compactIri({activeCtx:e,iri:n["@type"],relativeTo:{vocab:true}})}else if("@language"in n){p[L.compactIri({activeCtx:e,iri:"@language",relativeTo:{vocab:true}})]=n["@language"]}if("@direction"in n){p[L.compactIri({activeCtx:e,iri:"@direction",relativeTo:{vocab:true}})]=n["@direction"]}p[L.compactIri({activeCtx:e,iri:"@value",relativeTo:{vocab:true}})]=n["@value"];return p}const o=d(e,t,{vocab:true},i);const s=w(e,t,"@type");const a=L.compactIri({activeCtx:e,iri:n["@id"],relativeTo:{vocab:s==="@vocab"},base:i.base});if(s==="@id"||s==="@vocab"||o==="@graph"){return a}return{[L.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:true}})]:a}};function R(e,t,n,i,r,s){if(s===null){s="@null"}const a=[];if((s==="@id"||s==="@reverse")&&o(n)&&"@id"in n){if(s==="@reverse"){a.push("@reverse")}const t=L.compactIri({activeCtx:e,iri:n["@id"],relativeTo:{vocab:true}});if(e.mappings.has(t)&&e.mappings.get(t)&&e.mappings.get(t)["@id"]===n["@id"]){a.push.apply(a,["@vocab","@id"])}else{a.push.apply(a,["@id","@vocab"])}}else{a.push(s);const e=a.find((e=>e.includes("_")));if(e){a.push(e.replace(/^[^_]+_/,"_"))}}a.push("@none");const l=e.inverse[t];for(const e of i){if(!(e in l)){continue}const t=l[e][r];for(const e of a){if(!(e in t)){continue}return t[e]}}return null}function C(e,t,i){if(d(e,t,{vocab:true},i)!=="@nest"){throw new n("JSON-LD compact error; nested property must have an @nest value resolving to @nest.","jsonld.SyntaxError",{code:"invalid @nest value"})}}}});var M=e({"../node_modules/jsonld/lib/JsonLdProcessor.js"(e,t){t.exports=e=>{class t{toString(){return"[object JsonLdProcessor]"}}Object.defineProperty(t,"prototype",{writable:false,enumerable:false});Object.defineProperty(t.prototype,"constructor",{writable:true,enumerable:false,configurable:true,value:t});t.compact=function(t,n){if(arguments.length<2){return Promise.reject(new TypeError("Could not compact, too few arguments."))}return e.compact(t,n)};t.expand=function(t){if(arguments.length<1){return Promise.reject(new TypeError("Could not expand, too few arguments."))}return e.expand(t)};t.flatten=function(t){if(arguments.length<1){return Promise.reject(new TypeError("Could not flatten, too few arguments."))}return e.flatten(t)};return t}}});var U=e({"../node_modules/jsonld/lib/jsonld.js"(e,t){var n=d();var i=b();var o=y();var r=N();var s=o.IdentifierIssuer;var a=h();var l=E();var c=D();var{expand:f}=R();var{flatten:u}=_();var{fromRDF:w}=T();var{toRDF:g}=J();var{frameMergedOrDefault:j,cleanupNull:S}=k();var{isArray:I,isObject:A,isString:U}=v();var{isSubjectReference:B}=p();var{expandIri:F,getInitialContext:$,process:z,processingMode:G}=O();var{compact:q,compactIri:H}=P();var{createNodeMap:X,createMergedNodeMap:K,mergeNodeMaps:V}=C();var{logEventHandler:Q,logWarningEventHandler:Z,safeEventHandler:W,setDefaultEventHandler:Y,setupEventHandler:ee,strictEventHandler:te,unhandledEventHandler:ne}=L();var ie=function(e){const t={};const d=100;const v=new l({max:d});e.compact=async function(t,n,i){if(arguments.length<2){throw new TypeError("Could not compact, too few arguments.")}if(n===null){throw new a("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"})}if(t===null){return null}i=p(i,{base:U(t)?t:"",compactArrays:true,compactToRelative:true,graph:false,skipExpansion:false,link:false,issuer:new s("_:b"),contextResolver:new r({sharedCache:v})});if(i.link){i.skipExpansion=true}if(!i.compactToRelative){delete i.base}let l;if(i.skipExpansion){l=t}else{l=await e.expand(t,i)}const c=await e.processContext($(i),n,i);let f=await q({activeCtx:c,element:l,options:i});if(i.compactArrays&&!i.graph&&I(f)){if(f.length===1){f=f[0]}else if(f.length===0){f={}}}else if(i.graph&&A(f)){f=[f]}if(A(n)&&"@context"in n){n=n["@context"]}n=o.clone(n);if(!I(n)){n=[n]}const u=n;n=[];for(let e=0;e<u.length;++e){if(!A(u[e])||Object.keys(u[e]).length>0){n.push(u[e])}}const d=n.length>0;if(n.length===1){n=n[0]}if(I(f)){const e=H({activeCtx:c,iri:"@graph",relativeTo:{vocab:true}});const t=f;f={};if(d){f["@context"]=n}f[e]=t}else if(A(f)&&d){const e=f;f={"@context":n};for(const t in e){f[t]=e[t]}}return f};e.expand=async function(t,n){if(arguments.length<1){throw new TypeError("Could not expand, too few arguments.")}n=p(n,{keepFreeFloatingNodes:false,contextResolver:new r({sharedCache:v})});const i={};const s=[];if("expandContext"in n){const e=o.clone(n.expandContext);if(A(e)&&"@context"in e){i.expandContext=e}else{i.expandContext={"@context":e}}s.push(i.expandContext)}let a;if(!U(t)){i.input=o.clone(t)}else{const o=await e.get(t,n);a=o.documentUrl;i.input=o.document;if(o.contextUrl){i.remoteContext={"@context":o.contextUrl};s.push(i.remoteContext)}}if(!("base"in n)){n.base=a||""}let l=$(n);for(const e of s){l=await z({activeCtx:l,localCtx:e,options:n})}let c=await f({activeCtx:l,element:i.input,options:n});if(A(c)&&"@graph"in c&&Object.keys(c).length===1){c=c["@graph"]}else if(c===null){c=[]}if(!I(c)){c=[c]}return c};e.flatten=async function(t,n,i){if(arguments.length<1){return new TypeError("Could not flatten, too few arguments.")}if(typeof n==="function"){n=null}else{n=n||null}i=p(i,{base:U(t)?t:"",contextResolver:new r({sharedCache:v})});const o=await e.expand(t,i);const s=u(o);if(n===null){return s}i.graph=true;i.skipExpansion=true;const a=await e.compact(s,n,i);return a};e.frame=async function(t,n,i){if(arguments.length<2){throw new TypeError("Could not frame, too few arguments.")}i=p(i,{base:U(t)?t:"",embed:"@once",explicit:false,requireAll:false,omitDefault:false,bnodesToClear:[],contextResolver:new r({sharedCache:v})});if(U(n)){const t=await e.get(n,i);n=t.document;if(t.contextUrl){let e=n["@context"];if(!e){e=t.contextUrl}else if(I(e)){e.push(t.contextUrl)}else{e=[e,t.contextUrl]}n["@context"]=e}}const o=n?n["@context"]||{}:{};const s=await e.processContext($(i),o,i);if(!i.hasOwnProperty("omitGraph")){i.omitGraph=G(s,1.1)}if(!i.hasOwnProperty("pruneBlankNodeIdentifiers")){i.pruneBlankNodeIdentifiers=G(s,1.1)}const a=await e.expand(t,i);const l={...i};l.isFrame=true;l.keepFreeFloatingNodes=true;const c=await e.expand(n,l);const f=Object.keys(n).map((e=>F(s,e,{vocab:true})));l.merged=!f.includes("@graph");l.is11=G(s,1.1);const u=j(a,c,l);l.graph=!i.omitGraph;l.skipExpansion=true;l.link={};l.framing=true;let d=await e.compact(u,o,l);l.link={};d=S(d,l);return d};e.link=async function(t,n,i){const o={};if(n){o["@context"]=n}o["@embed"]="@link";return e.frame(t,o,i)};e.normalize=e.canonize=async function(t,i){if(arguments.length<1){throw new TypeError("Could not canonize, too few arguments.")}i=p(i,{base:U(t)?t:null,algorithm:"URDNA2015",skipExpansion:false,safe:true,contextResolver:new r({sharedCache:v})});if("inputFormat"in i){if(i.inputFormat!=="application/n-quads"&&i.inputFormat!=="application/nquads"){throw new a("Unknown canonicalization input format.","jsonld.CanonizeError")}const e=c.parse(t);return n.canonize(e,i)}const o={...i};delete o.format;o.produceGeneralizedRdf=false;const s=await e.toRDF(t,o);return n.canonize(s,i)};e.fromRDF=async function(e,n){if(arguments.length<1){throw new TypeError("Could not convert from RDF, too few arguments.")}n=p(n,{format:U(e)?"application/n-quads":void 0});const{format:i}=n;let{rdfParser:o}=n;if(i){o=o||t[i];if(!o){throw new a("Unknown input format.","jsonld.UnknownFormat",{format:i})}}else{o=()=>e}const r=await o(e);return w(r,n)};e.toRDF=async function(t,n){if(arguments.length<1){throw new TypeError("Could not convert to RDF, too few arguments.")}n=p(n,{base:U(t)?t:"",skipExpansion:false,contextResolver:new r({sharedCache:v})});let i;if(n.skipExpansion){i=t}else{i=await e.expand(t,n)}const o=g(i,n);if(n.format){if(n.format==="application/n-quads"||n.format==="application/nquads"){return c.serialize(o)}throw new a("Unknown output format.","jsonld.UnknownFormat",{format:n.format})}return o};e.createNodeMap=async function(t,n){if(arguments.length<1){throw new TypeError("Could not create node map, too few arguments.")}n=p(n,{base:U(t)?t:"",contextResolver:new r({sharedCache:v})});const i=await e.expand(t,n);return K(i,n)};e.merge=async function(t,n,i){if(arguments.length<1){throw new TypeError("Could not merge, too few arguments.")}if(!I(t)){throw new TypeError('Could not merge, "docs" must be an array.')}if(typeof n==="function"){n=null}else{n=n||null}i=p(i,{contextResolver:new r({sharedCache:v})});const a=await Promise.all(t.map((t=>{const n={...i};return e.expand(t,n)})));let l=true;if("mergeNodes"in i){l=i.mergeNodes}const c=i.issuer||new s("_:b");const f={"@default":{}};for(let e=0;e<a.length;++e){const t=o.relabelBlankNodes(a[e],{issuer:new s("_:b"+e+"-")});const n=l||e===0?f:{"@default":{}};X(t,n,"@default",c);if(n!==f){for(const e in n){const t=n[e];if(!(e in f)){f[e]=t;continue}const i=f[e];for(const e in t){if(!(e in i)){i[e]=t[e]}}}}}const u=V(f);const d=[];const h=Object.keys(u).sort();for(let e=0;e<h.length;++e){const t=u[h[e]];if(!B(t)){d.push(t)}}if(n===null){return d}i.graph=true;i.skipExpansion=true;const y=await e.compact(d,n,i);return y};Object.defineProperty(e,"documentLoader",{get:()=>e._documentLoader,set:t=>e._documentLoader=t});e.documentLoader=async e=>{throw new a("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:e})};e.get=async function(t,n){let i;if(typeof n.documentLoader==="function"){i=n.documentLoader}else{i=e.documentLoader}const o=await i(t);try{if(!o.document){throw new a("No remote document found at the given URL.","jsonld.NullRemoteDocument")}if(U(o.document)){o.document=JSON.parse(o.document)}}catch(e){throw new a("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:e,remoteDoc:o})}return o};e.processContext=async function(e,t,n){n=p(n,{base:"",contextResolver:new r({sharedCache:v})});if(t===null){return $(n)}t=o.clone(t);if(!(A(t)&&"@context"in t)){t={"@context":t}}return z({activeCtx:e,localCtx:t,options:n})};e.getContextValue=O().getContextValue;e.documentLoaders={};e.useDocumentLoader=function(t){if(!(t in e.documentLoaders)){throw new a('Unknown document loader type: "'+t+'"',"jsonld.UnknownDocumentLoader",{type:t})}e.documentLoader=e.documentLoaders[t].apply(e,Array.prototype.slice.call(arguments,1))};e.registerRDFParser=function(e,n){t[e]=n};e.unregisterRDFParser=function(e){delete t[e]};e.registerRDFParser("application/n-quads",c.parse);e.registerRDFParser("application/nquads",c.parse);e.url=m();e.logEventHandler=Q;e.logWarningEventHandler=Z;e.safeEventHandler=W;e.setDefaultEventHandler=Y;e.strictEventHandler=te;e.unhandledEventHandler=ne;e.util=o;Object.assign(e,o);e.promises=e;e.RequestQueue=x();e.JsonLdProcessor=M()(e);i.setupGlobals(e);i.setupDocumentLoaders(e);function p(t,{documentLoader:n=e.documentLoader,...i}){if(t&&"compactionMap"in t){throw new a('"compactionMap" not supported.',"jsonld.OptionsError")}if(t&&"expansionMap"in t){throw new a('"expansionMap" not supported.',"jsonld.OptionsError")}return Object.assign({},{documentLoader:n},i,t,{eventHandler:ee({options:t})})}return e};var oe=function(){return ie((function(){return oe()}))};ie(oe);t.exports=oe}});const B=U();
1
+ import{d as e}from"./p-a962c4b4.js";var t=e({"../node_modules/rdf-canonize/lib/IdentifierIssuer.js"(e,t){t.exports=class e{constructor(e,t=new Map,n=0){this.prefix=e;this._existing=t;this.counter=n}clone(){const{prefix:t,_existing:n,counter:i}=this;return new e(t,new Map(n),i)}getId(e){const t=e&&this._existing.get(e);if(t){return t}const n=this.prefix+this.counter;this.counter++;if(e){this._existing.set(e,n)}return n}hasId(e){return this._existing.has(e)}getOldIds(){return[...this._existing.keys()]}}}});var n=e({"../node_modules/setimmediate/setImmediate.js"(e){(function(e,t){if(e.setImmediate){return}var n=1;var i={};var o=false;var r=e.document;var s;function a(e){if(typeof e!=="function"){e=new Function(""+e)}var t=new Array(arguments.length-1);for(var o=0;o<t.length;o++){t[o]=arguments[o+1]}var r={callback:e,args:t};i[n]=r;s(n);return n++}function l(e){delete i[e]}function c(e){var n=e.callback;var i=e.args;switch(i.length){case 0:n();break;case 1:n(i[0]);break;case 2:n(i[0],i[1]);break;case 3:n(i[0],i[1],i[2]);break;default:n.apply(t,i);break}}function f(e){if(o){setTimeout(f,0,e)}else{var t=i[e];if(t){o=true;try{c(t)}finally{l(e);o=false}}}}function u(){s=function(e){process.nextTick((function(){f(e)}))}}function d(){if(e.postMessage&&!e.importScripts){var t=true;var n=e.onmessage;e.onmessage=function(){t=false};e.postMessage("","*");e.onmessage=n;return t}}function v(){var t="setImmediate$"+Math.random()+"$";var n=function(n){if(n.source===e&&typeof n.data==="string"&&n.data.indexOf(t)===0){f(+n.data.slice(t.length))}};if(e.addEventListener){e.addEventListener("message",n,false)}else{e.attachEvent("onmessage",n)}s=function(n){e.postMessage(t+n,"*")}}function p(){var e=new MessageChannel;e.port1.onmessage=function(e){var t=e.data;f(t)};s=function(t){e.port2.postMessage(t)}}function h(){var e=r.documentElement;s=function(t){var n=r.createElement("script");n.onreadystatechange=function(){f(t);n.onreadystatechange=null;e.removeChild(n);n=null};e.appendChild(n)}}function y(){s=function(e){setTimeout(f,0,e)}}var w=Object.getPrototypeOf&&Object.getPrototypeOf(e);w=w&&w.setTimeout?w:e;if({}.toString.call(e.process)==="[object process]"){u()}else if(d()){v()}else if(e.MessageChannel){p()}else if(r&&"onreadystatechange"in r.createElement("script")){h()}else{y()}w.setImmediate=a;w.clearImmediate=l})(typeof self==="undefined"?typeof global==="undefined"?e:global:self)}});var i=e({"../node_modules/rdf-canonize/lib/MessageDigest-browser.js"(e,t){n();var i=self.crypto||self.msCrypto;t.exports=class e{constructor(e){if(!(i&&i.subtle)){throw new Error("crypto.subtle not found.")}if(e==="sha256"){this.algorithm={name:"SHA-256"}}else if(e==="sha1"){this.algorithm={name:"SHA-1"}}else{throw new Error(`Unsupported algorithm "${e}".`)}this._content=""}update(e){this._content+=e}async digest(){const e=(new TextEncoder).encode(this._content);const t=new Uint8Array(await i.subtle.digest(this.algorithm,e));let n="";for(let e=0;e<t.length;++e){n+=t[e].toString(16).padStart(2,"0")}return n}}}});var o=e({"../node_modules/rdf-canonize/lib/Permuter.js"(e,t){t.exports=class e{constructor(e){this.current=e.sort();this.done=false;this.dir=new Map;for(let t=0;t<e.length;++t){this.dir.set(e[t],true)}}hasNext(){return!this.done}next(){const{current:e,dir:t}=this;const n=e.slice();let i=null;let o=0;const r=e.length;for(let n=0;n<r;++n){const s=e[n];const a=t.get(s);if((i===null||s>i)&&(a&&n>0&&s>e[n-1]||!a&&n<r-1&&s>e[n+1])){i=s;o=n}}if(i===null){this.done=true}else{const n=t.get(i)?o-1:o+1;e[o]=e[n];e[n]=i;for(const n of e){if(n>i){t.set(n,!t.get(n))}}}return n}}}});var r=e({"../node_modules/rdf-canonize/lib/NQuads.js"(e,t){var n="http://www.w3.org/1999/02/22-rdf-syntax-ns#";var i=n+"langString";var o="http://www.w3.org/2001/XMLSchema#string";var r="NamedNode";var s="BlankNode";var a="Literal";var l="DefaultGraph";var c={};(()=>{const e="(?:<([^:]+:[^>]*)>)";const t="A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�";const n=t+"_";const i=n+"0-9-·̀-ͯ‿-⁀";const o="(_:(?:["+n+"0-9])(?:(?:["+i+".])*(?:["+i+"]))?)";const r=o;const s='"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"';const a="(?:\\^\\^"+e+")";const l="(?:@([a-zA-Z]+(?:-[a-zA-Z0-9]+)*))";const f="(?:"+s+"(?:"+a+"|"+l+")?)";const u="[ \\t]+";const d="[ \\t]*";const v="(?:"+e+"|"+r+")"+u;const p=e+u;const h="(?:"+e+"|"+r+"|"+f+")"+d;const y="(?:\\.|(?:(?:"+e+"|"+r+")"+d+"\\.))";c.eoln=/(?:\r\n)|(?:\n)|(?:\r)/g;c.empty=new RegExp("^"+d+"$");c.quad=new RegExp("^"+d+v+p+h+y+d+"$")})();t.exports=class e{static parse(e){const t=[];const n={};const u=e.split(c.eoln);let d=0;for(const e of u){d++;if(c.empty.test(e)){continue}const u=e.match(c.quad);if(u===null){throw new Error("N-Quads parse error on line "+d+".")}const v={subject:null,predicate:null,object:null,graph:null};if(u[1]!==void 0){v.subject={termType:r,value:u[1]}}else{v.subject={termType:s,value:u[2]}}v.predicate={termType:r,value:u[3]};if(u[4]!==void 0){v.object={termType:r,value:u[4]}}else if(u[5]!==void 0){v.object={termType:s,value:u[5]}}else{v.object={termType:a,value:void 0,datatype:{termType:r}};if(u[7]!==void 0){v.object.datatype.value=u[7]}else if(u[8]!==void 0){v.object.datatype.value=i;v.object.language=u[8]}else{v.object.datatype.value=o}v.object.value=p(u[6])}if(u[9]!==void 0){v.graph={termType:r,value:u[9]}}else if(u[10]!==void 0){v.graph={termType:s,value:u[10]}}else{v.graph={termType:l,value:""}}if(!(v.graph.value in n)){n[v.graph.value]=[v];t.push(v)}else{let e=true;const i=n[v.graph.value];for(const t of i){if(f(t,v)){e=false;break}}if(e){i.push(v);t.push(v)}}}return t}static serialize(t){if(!Array.isArray(t)){t=e.legacyDatasetToQuads(t)}const n=[];for(const i of t){n.push(e.serializeQuad(i))}return n.sort().join("")}static serializeQuadComponents(e,t,n,a){let l="";if(e.termType===r){l+=`<${e.value}>`}else{l+=`${e.value}`}l+=` <${t.value}> `;if(n.termType===r){l+=`<${n.value}>`}else if(n.termType===s){l+=n.value}else{l+=`"${d(n.value)}"`;if(n.datatype.value===i){if(n.language){l+=`@${n.language}`}}else if(n.datatype.value!==o){l+=`^^<${n.datatype.value}>`}}if(a.termType===r){l+=` <${a.value}>`}else if(a.termType===s){l+=` ${a.value}`}l+=" .\n";return l}static serializeQuad(t){return e.serializeQuadComponents(t.subject,t.predicate,t.object,t.graph)}static legacyDatasetToQuads(e){const t=[];const n={"blank node":s,IRI:r,literal:a};for(const c in e){const f=e[c];f.forEach((e=>{const f={};for(const t in e){const s=e[t];const l={termType:n[s.type],value:s.value};if(l.termType===a){l.datatype={termType:r};if("datatype"in s){l.datatype.value=s.datatype}if("language"in s){if(!("datatype"in s)){l.datatype.value=i}l.language=s.language}else if(!("datatype"in s)){l.datatype.value=o}}f[t]=l}if(c==="@default"){f.graph={termType:l,value:""}}else{f.graph={termType:c.startsWith("_:")?s:r,value:c}}t.push(f)}))}return t}};function f(e,t){if(!(e.subject.termType===t.subject.termType&&e.object.termType===t.object.termType)){return false}if(!(e.subject.value===t.subject.value&&e.predicate.value===t.predicate.value&&e.object.value===t.object.value)){return false}if(e.object.termType!==a){return true}return e.object.datatype.termType===t.object.datatype.termType&&e.object.language===t.object.language&&e.object.datatype.value===t.object.datatype.value}var u=/["\\\n\r]/g;function d(e){return e.replace(u,(function(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r"}}))}var v=/(?:\\([tbnrf"'\\]))|(?:\\u([0-9A-Fa-f]{4}))|(?:\\U([0-9A-Fa-f]{8}))/g;function p(e){return e.replace(v,(function(e,t,n,i){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(i){throw new Error("Unsupported U escape")}}))}}});var s=e({"../node_modules/rdf-canonize/lib/URDNA2015.js"(e,n){var s=t();var a=i();var l=o();var c=r();n.exports=class e{constructor({createMessageDigest:e=(()=>new a("sha256")),canonicalIdMap:t=new Map,maxDeepIterations:n=Infinity}={}){this.name="URDNA2015";this.blankNodeInfo=new Map;this.canonicalIssuer=new s("_: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;const n=[...this.blankNodeInfo.keys()];let i=0;for(const e of n){if(++i%100===0){await this._yield()}await this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t})}const o=[...t.keys()].sort();const r=[];for(const e of o){const n=t.get(e);if(n.length>1){r.push(n);continue}const i=n[0];this.canonicalIssuer.getId(i)}for(const e of r){const t=[];for(const n of e){if(this.canonicalIssuer.hasId(n)){continue}const e=new s("_:b");e.getId(n);const i=await this.hashNDegreeQuads(n,e);t.push(i)}t.sort(f);for(const e of t){const t=e.issuer.getOldIds();for(const e of t){this.canonicalIssuer.getId(e)}}}const a=[];for(const e of this.quads){const t=c.serializeQuadComponents(this._componentWithCanonicalId(e.subject),e.predicate,this._componentWithCanonicalId(e.object),this._componentWithCanonicalId(e.graph));a.push(t)}a.sort();return a.join("")}async hashFirstDegreeQuads(e){const t=[];const n=this.blankNodeInfo.get(e);const i=n.quads;for(const n of i){const i={subject:null,predicate:n.predicate,object:null,graph:null};i.subject=this.modifyFirstDegreeComponent(e,n.subject,"subject");i.object=this.modifyFirstDegreeComponent(e,n.object,"object");i.graph=this.modifyFirstDegreeComponent(e,n.graph,"graph");t.push(c.serializeQuad(i))}t.sort();const o=this.createMessageDigest();for(const e of t){o.update(e)}n.hash=await o.digest();return n.hash}async hashRelatedBlankNode(e,t,n,i){let o;if(this.canonicalIssuer.hasId(e)){o=this.canonicalIssuer.getId(e)}else if(n.hasId(e)){o=n.getId(e)}else{o=this.blankNodeInfo.get(e).hash}const r=this.createMessageDigest();r.update(i);if(i!=="g"){r.update(this.getRelatedPredicate(t))}r.update(o);return 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 i=this.createMessageDigest();const o=await this.createHashToRelated(e,t);const r=[...o.keys()].sort();for(const e of r){i.update(e);let n="";let r;const s=new l(o.get(e));let a=0;while(s.hasNext()){const e=s.next();if(++a%3===0){await this._yield()}let i=t.clone();let o="";const l=[];let c=false;for(const t of e){if(this.canonicalIssuer.hasId(t)){o+=this.canonicalIssuer.getId(t)}else{if(!i.hasId(t)){l.push(t)}o+=i.getId(t)}if(n.length!==0&&o>n){c=true;break}}if(c){continue}for(const e of l){const t=await this.hashNDegreeQuads(e,i);o+=i.getId(e);o+=`<${t.hash}>`;i=t.issuer;if(n.length!==0&&o>n){c=true;break}}if(c){continue}if(n.length===0||o<n){n=o;r=i}}i.update(n);t=r}return{hash:await i.digest(),issuer:t}}modifyFirstDegreeComponent(e,t){if(t.termType!=="BlankNode"){return t}return{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return`<${e.predicate.value}>`}async createHashToRelated(e,t){const n=new Map;const i=this.blankNodeInfo.get(e).quads;let o=0;for(const r of i){if(++o%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);const i=t.get(n);if(!i){t.set(n,[e])}else{i.push(e)}}_addBlankNodeQuadInfo({quad:e,component:t}){if(t.termType!=="BlankNode"){return}const n=t.value;const i=this.blankNodeInfo.get(n);if(i){i.quads.add(e)}else{this.blankNodeInfo.set(n,{quads:new Set([e]),hash:null})}}async _addRelatedBlankNodeHash({quad:e,component:t,position:n,id:i,issuer:o,hashToRelated:r}){if(!(t.termType==="BlankNode"&&t.value!==i)){return}const s=t.value;const a=await this.hashRelatedBlankNode(s,e,o,n);const l=r.get(a);if(l){l.push(s)}else{r.set(a,[s])}}_componentWithCanonicalId(e){if(e.termType==="BlankNode"&&!e.value.startsWith(this.canonicalIssuer.prefix)){return{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}return e}async _yield(){return new Promise((e=>setImmediate(e)))}};function f(e,t){return e.hash<t.hash?-1:e.hash>t.hash?1:0}}});var a=e({"../node_modules/rdf-canonize/lib/URGNA2012.js"(e,t){var n=i();var o=s();t.exports=class e extends o{constructor(){super();this.name="URGNA2012";this.createMessageDigest=()=>new n("sha1")}modifyFirstDegreeComponent(e,t,n){if(t.termType!=="BlankNode"){return t}if(n==="graph"){return{termType:"BlankNode",value:"_:g"}}return{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}async createHashToRelated(e,t){const n=new Map;const i=this.blankNodeInfo.get(e).quads;let o=0;for(const r of i){let i;let s;if(r.subject.termType==="BlankNode"&&r.subject.value!==e){s=r.subject.value;i="p"}else if(r.object.termType==="BlankNode"&&r.object.value!==e){s=r.object.value;i="r"}else{continue}if(++o%100===0){await this._yield()}const a=await this.hashRelatedBlankNode(s,r,t,i);const l=n.get(a);if(l){l.push(s)}else{n.set(a,[s])}}return n}}}});var l=e({"../node_modules/rdf-canonize/lib/URDNA2015Sync.js"(e,n){var s=t();var a=i();var l=o();var c=r();n.exports=class e{constructor({createMessageDigest:e=(()=>new a("sha256")),canonicalIdMap:t=new Map,maxDeepIterations:n=Infinity}={}){this.name="URDNA2015";this.blankNodeInfo=new Map;this.canonicalIssuer=new s("_:c14n",t);this.createMessageDigest=e;this.maxDeepIterations=n;this.quads=null;this.deepIterations=null}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;const n=[...this.blankNodeInfo.keys()];for(const e of n){this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t})}const i=[...t.keys()].sort();const o=[];for(const e of i){const n=t.get(e);if(n.length>1){o.push(n);continue}const i=n[0];this.canonicalIssuer.getId(i)}for(const e of o){const t=[];for(const n of e){if(this.canonicalIssuer.hasId(n)){continue}const e=new s("_:b");e.getId(n);const i=this.hashNDegreeQuads(n,e);t.push(i)}t.sort(f);for(const e of t){const t=e.issuer.getOldIds();for(const e of t){this.canonicalIssuer.getId(e)}}}const r=[];for(const e of this.quads){const t=c.serializeQuadComponents(this._componentWithCanonicalId({component:e.subject}),e.predicate,this._componentWithCanonicalId({component:e.object}),this._componentWithCanonicalId({component:e.graph}));r.push(t)}r.sort();return r.join("")}hashFirstDegreeQuads(e){const t=[];const n=this.blankNodeInfo.get(e);const i=n.quads;for(const n of i){const i={subject:null,predicate:n.predicate,object:null,graph:null};i.subject=this.modifyFirstDegreeComponent(e,n.subject,"subject");i.object=this.modifyFirstDegreeComponent(e,n.object,"object");i.graph=this.modifyFirstDegreeComponent(e,n.graph,"graph");t.push(c.serializeQuad(i))}t.sort();const o=this.createMessageDigest();for(const e of t){o.update(e)}n.hash=o.digest();return n.hash}hashRelatedBlankNode(e,t,n,i){let o;if(this.canonicalIssuer.hasId(e)){o=this.canonicalIssuer.getId(e)}else if(n.hasId(e)){o=n.getId(e)}else{o=this.blankNodeInfo.get(e).hash}const r=this.createMessageDigest();r.update(i);if(i!=="g"){r.update(this.getRelatedPredicate(t))}r.update(o);return r.digest()}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 i=this.createMessageDigest();const o=this.createHashToRelated(e,t);const r=[...o.keys()].sort();for(const e of r){i.update(e);let n="";let r;const s=new l(o.get(e));while(s.hasNext()){const e=s.next();let i=t.clone();let o="";const a=[];let l=false;for(const t of e){if(this.canonicalIssuer.hasId(t)){o+=this.canonicalIssuer.getId(t)}else{if(!i.hasId(t)){a.push(t)}o+=i.getId(t)}if(n.length!==0&&o>n){l=true;break}}if(l){continue}for(const e of a){const t=this.hashNDegreeQuads(e,i);o+=i.getId(e);o+=`<${t.hash}>`;i=t.issuer;if(n.length!==0&&o>n){l=true;break}}if(l){continue}if(n.length===0||o<n){n=o;r=i}}i.update(n);t=r}return{hash:i.digest(),issuer:t}}modifyFirstDegreeComponent(e,t){if(t.termType!=="BlankNode"){return t}return{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return`<${e.predicate.value}>`}createHashToRelated(e,t){const n=new Map;const i=this.blankNodeInfo.get(e).quads;for(const o of i){this._addRelatedBlankNodeHash({quad:o,component:o.subject,position:"s",id:e,issuer:t,hashToRelated:n});this._addRelatedBlankNodeHash({quad:o,component:o.object,position:"o",id:e,issuer:t,hashToRelated:n});this._addRelatedBlankNodeHash({quad:o,component:o.graph,position:"g",id:e,issuer:t,hashToRelated:n})}return n}_hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const n=this.hashFirstDegreeQuads(e);const i=t.get(n);if(!i){t.set(n,[e])}else{i.push(e)}}_addBlankNodeQuadInfo({quad:e,component:t}){if(t.termType!=="BlankNode"){return}const n=t.value;const i=this.blankNodeInfo.get(n);if(i){i.quads.add(e)}else{this.blankNodeInfo.set(n,{quads:new Set([e]),hash:null})}}_addRelatedBlankNodeHash({quad:e,component:t,position:n,id:i,issuer:o,hashToRelated:r}){if(!(t.termType==="BlankNode"&&t.value!==i)){return}const s=t.value;const a=this.hashRelatedBlankNode(s,e,o,n);const l=r.get(a);if(l){l.push(s)}else{r.set(a,[s])}}_componentWithCanonicalId({component:e}){if(e.termType==="BlankNode"&&!e.value.startsWith(this.canonicalIssuer.prefix)){return{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}return e}};function f(e,t){return e.hash<t.hash?-1:e.hash>t.hash?1:0}}});var c=e({"../node_modules/rdf-canonize/lib/URGNA2012Sync.js"(e,t){var n=i();var o=l();t.exports=class e extends o{constructor(){super();this.name="URGNA2012";this.createMessageDigest=()=>new n("sha1")}modifyFirstDegreeComponent(e,t,n){if(t.termType!=="BlankNode"){return t}if(n==="graph"){return{termType:"BlankNode",value:"_:g"}}return{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}createHashToRelated(e,t){const n=new Map;const i=this.blankNodeInfo.get(e).quads;for(const o of i){let i;let r;if(o.subject.termType==="BlankNode"&&o.subject.value!==e){r=o.subject.value;i="p"}else if(o.object.termType==="BlankNode"&&o.object.value!==e){r=o.object.value;i="r"}else{continue}const s=this.hashRelatedBlankNode(r,o,t,i);const a=n.get(s);if(a){a.push(r)}else{n.set(s,[r])}}return n}}}});var f=e({"(disabled):rdf-canonize-native"(){}});var u=e({"../node_modules/rdf-canonize/lib/index.js"(e){var n=s();var i=a();var o=l();var u=c();var d;try{d=f()}catch(e){}function v(t){if(!Array.isArray(t)){return e.NQuads.legacyDatasetToQuads(t)}return t}e.NQuads=r();e.IdentifierIssuer=t();e._rdfCanonizeNative=function(e){if(e){d=e}return d};e.canonize=async function(e,t){const o=v(e);if(t.useNative){if(!d){throw new Error("rdf-canonize-native not available")}if(t.createMessageDigest){throw new Error('"createMessageDigest" cannot be used with "useNative".')}return new Promise(((e,n)=>d.canonize(o,t,((t,i)=>t?n(t):e(i)))))}if(t.algorithm==="URDNA2015"){return new n(t).main(o)}if(t.algorithm==="URGNA2012"){if(t.createMessageDigest){throw new Error('"createMessageDigest" cannot be used with "URGNA2012".')}return new i(t).main(o)}if(!("algorithm"in t)){throw new Error("No RDF Dataset Canonicalization algorithm specified.")}throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+t.algorithm)};e._canonizeSync=function(e,t){const n=v(e);if(t.useNative){if(!d){throw new Error("rdf-canonize-native not available")}if(t.createMessageDigest){throw new Error('"createMessageDigest" cannot be used with "useNative".')}return d.canonizeSync(n,t)}if(t.algorithm==="URDNA2015"){return new o(t).main(n)}if(t.algorithm==="URGNA2012"){if(t.createMessageDigest){throw new Error('"createMessageDigest" cannot be used with "URGNA2012".')}return new u(t).main(n)}if(!("algorithm"in t)){throw new Error("No RDF Dataset Canonicalization algorithm specified.")}throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+t.algorithm)}}});var d=e({"../node_modules/rdf-canonize/index.js"(e,t){t.exports=u()}});var v=e({"../node_modules/jsonld/lib/types.js"(e,t){var n={};t.exports=n;n.isArray=Array.isArray;n.isBoolean=e=>typeof e==="boolean"||Object.prototype.toString.call(e)==="[object Boolean]";n.isDouble=e=>n.isNumber(e)&&(String(e).indexOf(".")!==-1||Math.abs(e)>=1e21);n.isEmptyObject=e=>n.isObject(e)&&Object.keys(e).length===0;n.isNumber=e=>typeof e==="number"||Object.prototype.toString.call(e)==="[object Number]";n.isNumeric=e=>!isNaN(parseFloat(e))&&isFinite(e);n.isObject=e=>Object.prototype.toString.call(e)==="[object Object]";n.isString=e=>typeof e==="string"||Object.prototype.toString.call(e)==="[object String]";n.isUndefined=e=>typeof e==="undefined"}});var p=e({"../node_modules/jsonld/lib/graphTypes.js"(e,t){var n=v();var i={};t.exports=i;i.isSubject=e=>{if(n.isObject(e)&&!("@value"in e||"@set"in e||"@list"in e)){const t=Object.keys(e).length;return t>1||!("@id"in e)}return false};i.isSubjectReference=e=>n.isObject(e)&&Object.keys(e).length===1&&"@id"in e;i.isValue=e=>n.isObject(e)&&"@value"in e;i.isList=e=>n.isObject(e)&&"@list"in e;i.isGraph=e=>n.isObject(e)&&"@graph"in e&&Object.keys(e).filter((e=>e!=="@id"&&e!=="@index")).length===1;i.isSimpleGraph=e=>i.isGraph(e)&&!("@id"in e);i.isBlankNode=e=>{if(n.isObject(e)){if("@id"in e){const t=e["@id"];return!n.isString(t)||t.indexOf("_:")===0}return Object.keys(e).length===0||!("@value"in e||"@set"in e||"@list"in e)}return false}}});var h=e({"../node_modules/jsonld/lib/JsonLdError.js"(e,t){t.exports=class e extends Error{constructor(e="An unspecified JSON-LD error occurred.",t="jsonld.Error",n={}){super(e);this.name=t;this.message=e;this.details=n}}}});var y=e({"../node_modules/jsonld/lib/util.js"(e,t){var n=p();var i=v();var o=d().IdentifierIssuer;var r=h();var s=/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/;var a=/(?:<[^>]*?>|"[^"]*?"|[^,])+/g;var l=/\s*<([^>]*?)>\s*(?:;\s*(.*))?/;var c=/(.*?)=(?:(?:"([^"]*?)")|([^"]*?))\s*(?:(?:;\s*)|$)/g;var f=/^@[a-zA-Z]+$/;var u={headers:{accept:"application/ld+json, application/json"}};var y={};t.exports=y;y.IdentifierIssuer=o;y.REGEX_BCP47=s;y.REGEX_KEYWORD=f;y.clone=function(e){if(e&&typeof e==="object"){let t;if(i.isArray(e)){t=[];for(let n=0;n<e.length;++n){t[n]=y.clone(e[n])}}else if(e instanceof Map){t=new Map;for(const[n,i]of e){t.set(n,y.clone(i))}}else if(e instanceof Set){t=new Set;for(const n of e){t.add(y.clone(n))}}else if(i.isObject(e)){t={};for(const n in e){t[n]=y.clone(e[n])}}else{t=e.toString()}return t}return e};y.asArray=function(e){return Array.isArray(e)?e:[e]};y.buildHeaders=(e={})=>{const t=Object.keys(e).some((e=>e.toLowerCase()==="accept"));if(t){throw new RangeError('Accept header may not be specified; only "'+u.headers.accept+'" is supported.')}return Object.assign({Accept:u.headers.accept},e)};y.parseLinkHeader=e=>{const t={};const n=e.match(a);for(let e=0;e<n.length;++e){let i=n[e].match(l);if(!i){continue}const o={target:i[1]};const r=i[2];while(i=c.exec(r)){o[i[1]]=i[2]===void 0?i[3]:i[2]}const s=o.rel||"";if(Array.isArray(t[s])){t[s].push(o)}else if(t.hasOwnProperty(s)){t[s]=[t[s],o]}else{t[s]=o}}return t};y.validateTypeValue=(e,t)=>{if(i.isString(e)){return}if(i.isArray(e)&&e.every((e=>i.isString(e)))){return}if(t&&i.isObject(e)){switch(Object.keys(e).length){case 0:return;case 1:if("@default"in e&&y.asArray(e["@default"]).every((e=>i.isString(e)))){return}}}throw new r('Invalid JSON-LD syntax; "@type" value must a string, an array of strings, an empty object, or a default object.',"jsonld.SyntaxError",{code:"invalid type value",value:e})};y.hasProperty=(e,t)=>{if(e.hasOwnProperty(t)){const n=e[t];return!i.isArray(n)||n.length>0}return false};y.hasValue=(e,t,o)=>{if(y.hasProperty(e,t)){let r=e[t];const s=n.isList(r);if(i.isArray(r)||s){if(s){r=r["@list"]}for(let e=0;e<r.length;++e){if(y.compareValues(o,r[e])){return true}}}else if(!i.isArray(o)){return y.compareValues(o,r)}}return false};y.addValue=(e,t,n,o)=>{o=o||{};if(!("propertyIsArray"in o)){o.propertyIsArray=false}if(!("valueIsArray"in o)){o.valueIsArray=false}if(!("allowDuplicate"in o)){o.allowDuplicate=true}if(!("prependValue"in o)){o.prependValue=false}if(o.valueIsArray){e[t]=n}else if(i.isArray(n)){if(n.length===0&&o.propertyIsArray&&!e.hasOwnProperty(t)){e[t]=[]}if(o.prependValue){n=n.concat(e[t]);e[t]=[]}for(let i=0;i<n.length;++i){y.addValue(e,t,n[i],o)}}else if(e.hasOwnProperty(t)){const r=!o.allowDuplicate&&y.hasValue(e,t,n);if(!i.isArray(e[t])&&(!r||o.propertyIsArray)){e[t]=[e[t]]}if(!r){if(o.prependValue){e[t].unshift(n)}else{e[t].push(n)}}}else{e[t]=o.propertyIsArray?[n]:n}};y.getValues=(e,t)=>[].concat(e[t]||[]);y.removeProperty=(e,t)=>{delete e[t]};y.removeValue=(e,t,n,i)=>{i=i||{};if(!("propertyIsArray"in i)){i.propertyIsArray=false}const o=y.getValues(e,t).filter((e=>!y.compareValues(e,n)));if(o.length===0){y.removeProperty(e,t)}else if(o.length===1&&!i.propertyIsArray){e[t]=o[0]}else{e[t]=o}};y.relabelBlankNodes=(e,t)=>{t=t||{};const n=t.issuer||new o("_:b");return w(n,e)};y.compareValues=(e,t)=>{if(e===t){return true}if(n.isValue(e)&&n.isValue(t)&&e["@value"]===t["@value"]&&e["@type"]===t["@type"]&&e["@language"]===t["@language"]&&e["@index"]===t["@index"]){return true}if(i.isObject(e)&&"@id"in e&&i.isObject(t)&&"@id"in t){return e["@id"]===t["@id"]}return false};y.compareShortestLeast=(e,t)=>{if(e.length<t.length){return-1}if(t.length<e.length){return 1}if(e===t){return 0}return e<t?-1:1};function w(e,t){if(i.isArray(t)){for(let n=0;n<t.length;++n){t[n]=w(e,t[n])}}else if(n.isList(t)){t["@list"]=w(e,t["@list"])}else if(i.isObject(t)){if(n.isBlankNode(t)){t["@id"]=e.getId(t["@id"])}const i=Object.keys(t).sort();for(let n=0;n<i.length;++n){const o=i[n];if(o!=="@id"){t[o]=w(e,t[o])}}}return t}}});var w=e({"../node_modules/jsonld/lib/constants.js"(e,t){var n="http://www.w3.org/1999/02/22-rdf-syntax-ns#";var i="http://www.w3.org/2001/XMLSchema#";t.exports={LINK_HEADER_REL:"http://www.w3.org/ns/json-ld#context",LINK_HEADER_CONTEXT:"http://www.w3.org/ns/json-ld#context",RDF:n,RDF_LIST:n+"List",RDF_FIRST:n+"first",RDF_REST:n+"rest",RDF_NIL:n+"nil",RDF_TYPE:n+"type",RDF_PLAIN_LITERAL:n+"PlainLiteral",RDF_XML_LITERAL:n+"XMLLiteral",RDF_JSON_LITERAL:n+"JSON",RDF_OBJECT:n+"object",RDF_LANGSTRING:n+"langString",XSD:i,XSD_BOOLEAN:i+"boolean",XSD_DOUBLE:i+"double",XSD_INTEGER:i+"integer",XSD_STRING:i+"string"}}});var x=e({"../node_modules/jsonld/lib/RequestQueue.js"(e,t){t.exports=class e{constructor(){this._requests={}}wrapLoader(e){const t=this;t._loader=e;return 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]}}}}});var m=e({"../node_modules/jsonld/lib/url.js"(e,t){var n=v();var i={};t.exports=i;i.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*))?))?(?:(((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/}};i.parse=(e,t)=>{const n={};const o=i.parsers[t||"full"];const r=o.regex.exec(e);let s=o.keys.length;while(s--){n[o.keys[s]]=r[s]===void 0?null:r[s]}if(n.scheme==="https"&&n.port==="443"||n.scheme==="http"&&n.port==="80"){n.href=n.href.replace(":"+n.port,"");n.authority=n.authority.replace(":"+n.port,"");n.port=null}n.normalizedPath=i.removeDotSegments(n.path);return n};i.prependBase=(e,t)=>{if(e===null){return t}if(i.isAbsolute(t)){return t}if(!e||n.isString(e)){e=i.parse(e||"")}const o=i.parse(t);const r={protocol:e.protocol||""};if(o.authority!==null){r.authority=o.authority;r.path=o.path;r.query=o.query}else{r.authority=e.authority;if(o.path===""){r.path=e.path;if(o.query!==null){r.query=o.query}else{r.query=e.query}}else{if(o.path.indexOf("/")===0){r.path=o.path}else{let t=e.path;t=t.substr(0,t.lastIndexOf("/")+1);if((t.length>0||e.authority)&&t.substr(-1)!=="/"){t+="/"}t+=o.path;r.path=t}r.query=o.query}}if(o.path!==""){r.path=i.removeDotSegments(r.path)}let s=r.protocol;if(r.authority!==null){s+="//"+r.authority}s+=r.path;if(r.query!==null){s+="?"+r.query}if(o.fragment!==null){s+="#"+o.fragment}if(s===""){s="./"}return s};i.removeBase=(e,t)=>{if(e===null){return t}if(!e||n.isString(e)){e=i.parse(e||"")}let o="";if(e.href!==""){o+=(e.protocol||"")+"//"+(e.authority||"")}else if(t.indexOf("//")){o+="//"}if(t.indexOf(o)!==0){return t}const r=i.parse(t.substr(o.length));const s=e.normalizedPath.split("/");const a=r.normalizedPath.split("/");const l=r.fragment||r.query?0:1;while(s.length>0&&a.length>l){if(s[0]!==a[0]){break}s.shift();a.shift()}let c="";if(s.length>0){s.pop();for(let e=0;e<s.length;++e){c+="../"}}c+=a.join("/");if(r.query!==null){c+="?"+r.query}if(r.fragment!==null){c+="#"+r.fragment}if(c===""){c="./"}return c};i.removeDotSegments=e=>{if(e.length===0){return""}const t=e.split("/");const n=[];while(t.length>0){const e=t.shift();const i=t.length===0;if(e==="."){if(i){n.push("")}continue}if(e===".."){n.pop();if(i){n.push("")}continue}n.push(e)}if(e[0]==="/"&&n.length>0&&n[0]!==""){n.unshift("")}if(n.length===1&&n[0]===""){return"/"}return n.join("/")};var o=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;i.isAbsolute=e=>n.isString(e)&&o.test(e);i.isRelative=e=>n.isString(e)}});var g=e({"../node_modules/jsonld/lib/documentLoaders/xhr.js"(e,t){var{parseLinkHeader:n,buildHeaders:i}=y();var{LINK_HEADER_CONTEXT:o}=w();var r=h();var s=x();var{prependBase:a}=m();var l=/(^|(\r\n))link:/i;t.exports=({secure:e,headers:t={},xhr:f}={headers:{}})=>{t=i(t);const u=new s;return u.wrapLoader(d);async function d(i){if(i.indexOf("http:")!==0&&i.indexOf("https:")!==0){throw new r('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:i})}if(e&&i.indexOf("https")!==0){throw new r(`URL could not be dereferenced; secure mode is enabled and the URL's scheme is not "https".`,"jsonld.InvalidUrl",{code:"loading document failed",url:i})}let s;try{s=await c(f,i,t)}catch(e){throw new r("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:i,cause:e})}if(s.status>=400){throw new r("URL could not be dereferenced: "+s.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:i,httpStatusCode:s.status})}let u={contextUrl:null,documentUrl:i,document:s.response};let v=null;const p=s.getResponseHeader("Content-Type");let h;if(l.test(s.getAllResponseHeaders())){h=s.getResponseHeader("Link")}if(h&&p!=="application/ld+json"){const e=n(h);const t=e[o];if(Array.isArray(t)){throw new r("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:i})}if(t){u.contextUrl=t.target}v=e.alternate;if(v&&v.type=="application/ld+json"&&!(p||"").match(/^application\/(\w*\+)?json$/)){u=await d(a(i,v.target))}}return u}};function c(e,t,n){e=e||XMLHttpRequest;const i=new e;return new Promise(((e,o)=>{i.onload=()=>e(i);i.onerror=e=>o(e);i.open("GET",t,true);for(const e in n){i.setRequestHeader(e,n[e])}i.send()}))}}});var b=e({"../node_modules/jsonld/lib/platform-browser.js"(e,t){var n=g();var i={};t.exports=i;i.setupDocumentLoaders=function(e){if(typeof XMLHttpRequest!=="undefined"){e.documentLoaders.xhr=n;e.useDocumentLoader("xhr")}};i.setupGlobals=function(e){if(typeof globalThis.JsonLdProcessor==="undefined"){Object.defineProperty(globalThis,"JsonLdProcessor",{writable:true,enumerable:false,configurable:true,value:e.JsonLdProcessor})}}}});var j=e({"../node_modules/jsonld/node_modules/yallist/iterator.js"(e,t){t.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}}});var S=e({"../node_modules/jsonld/node_modules/yallist/yallist.js"(e,t){t.exports=n;n.Node=s;n.create=n;function n(e){var t=this;if(!(t instanceof n)){t=new n}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach((function(e){t.push(e)}))}else if(arguments.length>0){for(var i=0,o=arguments.length;i<o;i++){t.push(arguments[i])}}return t}n.prototype.removeNode=function(e){if(e.list!==this){throw new Error("removing node which does not belong to this list")}var t=e.next;var n=e.prev;if(t){t.prev=n}if(n){n.next=t}if(e===this.head){this.head=t}if(e===this.tail){this.tail=n}e.list.length--;e.next=null;e.prev=null;e.list=null;return t};n.prototype.unshiftNode=function(e){if(e===this.head){return}if(e.list){e.list.removeNode(e)}var t=this.head;e.list=this;e.next=t;if(t){t.prev=e}this.head=e;if(!this.tail){this.tail=e}this.length++};n.prototype.pushNode=function(e){if(e===this.tail){return}if(e.list){e.list.removeNode(e)}var t=this.tail;e.list=this;e.prev=t;if(t){t.next=e}this.tail=e;if(!this.head){this.head=e}this.length++};n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++){o(this,arguments[e])}return this.length};n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++){r(this,arguments[e])}return this.length};n.prototype.pop=function(){if(!this.tail){return void 0}var e=this.tail.value;this.tail=this.tail.prev;if(this.tail){this.tail.next=null}else{this.head=null}this.length--;return e};n.prototype.shift=function(){if(!this.head){return void 0}var e=this.head.value;this.head=this.head.next;if(this.head){this.head.prev=null}else{this.tail=null}this.length--;return e};n.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,i=0;n!==null;i++){e.call(t,n.value,i,this);n=n.next}};n.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,i=this.length-1;n!==null;i--){e.call(t,n.value,i,this);n=n.prev}};n.prototype.get=function(e){for(var t=0,n=this.head;n!==null&&t<e;t++){n=n.next}if(t===e&&n!==null){return n.value}};n.prototype.getReverse=function(e){for(var t=0,n=this.tail;n!==null&&t<e;t++){n=n.prev}if(t===e&&n!==null){return n.value}};n.prototype.map=function(e,t){t=t||this;var i=new n;for(var o=this.head;o!==null;){i.push(e.call(t,o.value,this));o=o.next}return i};n.prototype.mapReverse=function(e,t){t=t||this;var i=new n;for(var o=this.tail;o!==null;){i.push(e.call(t,o.value,this));o=o.prev}return i};n.prototype.reduce=function(e,t){var n;var i=this.head;if(arguments.length>1){n=t}else if(this.head){i=this.head.next;n=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var o=0;i!==null;o++){n=e(n,i.value,o);i=i.next}return n};n.prototype.reduceReverse=function(e,t){var n;var i=this.tail;if(arguments.length>1){n=t}else if(this.tail){i=this.tail.prev;n=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var o=this.length-1;i!==null;o--){n=e(n,i.value,o);i=i.prev}return n};n.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,n=this.head;n!==null;t++){e[t]=n.value;n=n.next}return e};n.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,n=this.tail;n!==null;t++){e[t]=n.value;n=n.prev}return e};n.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var i=new n;if(t<e||t<0){return i}if(e<0){e=0}if(t>this.length){t=this.length}for(var o=0,r=this.head;r!==null&&o<e;o++){r=r.next}for(;r!==null&&o<t;o++,r=r.next){i.push(r.value)}return i};n.prototype.sliceReverse=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var i=new n;if(t<e||t<0){return i}if(e<0){e=0}if(t>this.length){t=this.length}for(var o=this.length,r=this.tail;r!==null&&o>t;o--){r=r.prev}for(;r!==null&&o>e;o--,r=r.prev){i.push(r.value)}return i};n.prototype.splice=function(e,t,...n){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var o=0,r=this.head;r!==null&&o<e;o++){r=r.next}var s=[];for(var o=0;r&&o<t;o++){s.push(r.value);r=this.removeNode(r)}if(r===null){r=this.tail}if(r!==this.head&&r!==this.tail){r=r.prev}for(var o=0;o<n.length;o++){r=i(this,r,n[o])}return s};n.prototype.reverse=function(){var e=this.head;var t=this.tail;for(var n=e;n!==null;n=n.prev){var i=n.prev;n.prev=n.next;n.next=i}this.head=t;this.tail=e;return this};function i(e,t,n){var i=t===e.head?new s(n,null,t,e):new s(n,t,t.next,e);if(i.next===null){e.tail=i}if(i.prev===null){e.head=i}e.length++;return i}function o(e,t){e.tail=new s(t,e.tail,null,e);if(!e.head){e.head=e.tail}e.length++}function r(e,t){e.head=new s(t,null,e.head,e);if(!e.tail){e.tail=e.head}e.length++}function s(e,t,n,i){if(!(this instanceof s)){return new s(e,t,n,i)}this.list=i;this.value=e;if(t){t.next=this;this.prev=t}else{this.prev=null}if(n){n.prev=this;this.next=n}else{this.next=null}}try{j()(n)}catch(e){}}});var E=e({"../node_modules/jsonld/node_modules/lru-cache/index.js"(e,t){var n=S();var i=Symbol("max");var o=Symbol("length");var r=Symbol("lengthCalculator");var s=Symbol("allowStale");var a=Symbol("maxAge");var l=Symbol("dispose");var c=Symbol("noDisposeOnSet");var f=Symbol("lruList");var u=Symbol("cache");var d=Symbol("updateAgeOnGet");var v=()=>1;var p=class{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||Infinity;const t=e.length||v;this[r]=typeof t!=="function"?v:t;this[s]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[a]=e.maxAge||0;this[l]=e.dispose;this[c]=e.noDisposeOnSet||false;this[d]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||Infinity;w(this)}get max(){return this[i]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[a]=e;w(this)}get maxAge(){return this[a]}set lengthCalculator(e){if(typeof e!=="function")e=v;if(e!==this[r]){this[r]=e;this[o]=0;this[f].forEach((e=>{e.length=this[r](e.value,e.key);this[o]+=e.length}))}w(this)}get lengthCalculator(){return this[r]}get length(){return this[o]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let n=this[f].tail;n!==null;){const i=n.prev;g(this,e,n,t);n=i}}forEach(e,t){t=t||this;for(let n=this[f].head;n!==null;){const i=n.next;g(this,e,n,t);n=i}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){if(this[l]&&this[f]&&this[f].length){this[f].forEach((e=>this[l](e.key,e.value)))}this[u]=new Map;this[f]=new n;this[o]=0}dump(){return this[f].map((e=>y(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,n){n=n||this[a];if(n&&typeof n!=="number")throw new TypeError("maxAge must be a number");const s=n?Date.now():0;const d=this[r](t,e);if(this[u].has(e)){if(d>this[i]){x(this,this[u].get(e));return false}const r=this[u].get(e);const a=r.value;if(this[l]){if(!this[c])this[l](e,a.value)}a.now=s;a.maxAge=n;a.value=t;this[o]+=d-a.length;a.length=d;this.get(e);w(this);return true}const v=new m(e,t,d,s,n);if(v.length>this[i]){if(this[l])this[l](e,t);return false}this[o]+=v.length;this[f].unshift(v);this[u].set(e,this[f].head);w(this);return true}has(e){if(!this[u].has(e))return false;const t=this[u].get(e).value;return!y(this,t)}get(e){return h(this,e,true)}peek(e){return h(this,e,false)}pop(){const e=this[f].tail;if(!e)return null;x(this,e);return e.value}del(e){x(this,this[u].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const i=e[n];const o=i.e||0;if(o===0)this.set(i.k,i.v);else{const e=o-t;if(e>0){this.set(i.k,i.v,e)}}}}prune(){this[u].forEach(((e,t)=>h(this,t,false)))}};var h=(e,t,n)=>{const i=e[u].get(t);if(i){const t=i.value;if(y(e,t)){x(e,i);if(!e[s])return void 0}else{if(n){if(e[d])i.value.now=Date.now();e[f].unshiftNode(i)}}return t.value}};var y=(e,t)=>{if(!t||!t.maxAge&&!e[a])return false;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[a]&&n>e[a]};var w=e=>{if(e[o]>e[i]){for(let t=e[f].tail;e[o]>e[i]&&t!==null;){const n=t.prev;x(e,t);t=n}}};var x=(e,t)=>{if(t){const n=t.value;if(e[l])e[l](n.key,n.value);e[o]-=n.length;e[u].delete(n.key);e[f].removeNode(t)}};var m=class{constructor(e,t,n,i,o){this.key=e;this.value=t;this.length=n;this.now=i;this.maxAge=o||0}};var g=(e,t,n,i)=>{let o=n.value;if(y(e,o)){x(e,n);if(!e[s])o=void 0}if(o)t.call(i,o.value,o.key,e)};t.exports=p}});var I=e({"../node_modules/jsonld/lib/ResolvedContext.js"(e,t){var n=E();var i=10;t.exports=class e{constructor({document:e}){this.document=e;this.cache=new n({max:i})}getProcessed(e){return this.cache.get(e)}setProcessed(e,t){this.cache.set(e,t)}}}});var N=e({"../node_modules/jsonld/lib/ContextResolver.js"(e,t){var{isArray:n,isObject:i,isString:o}=v();var{asArray:r}=y();var{prependBase:s}=m();var a=h();var l=I();var c=10;t.exports=class e{constructor({sharedCache:e}){this.perOpCache=new Map;this.sharedCache=e}async resolve({activeCtx:e,context:t,documentLoader:s,base:a,cycles:c=new Set}){if(t&&i(t)&&t["@context"]){t=t["@context"]}t=r(t);const u=[];for(const r of t){if(o(r)){let t=this._get(r);if(!t){t=await this._resolveRemoteContext({activeCtx:e,url:r,documentLoader:s,base:a,cycles:c})}if(n(t)){u.push(...t)}else{u.push(t)}continue}if(r===null){u.push(new l({document:null}));continue}if(!i(r)){f(t)}const d=JSON.stringify(r);let v=this._get(d);if(!v){v=new l({document:r});this._cacheResolvedContext({key:d,resolved:v,tag:"static"})}u.push(v)}return u}_get(e){let t=this.perOpCache.get(e);if(!t){const n=this.sharedCache.get(e);if(n){t=n.get("static");if(t){this.perOpCache.set(e,t)}}}return t}_cacheResolvedContext({key:e,resolved:t,tag:n}){this.perOpCache.set(e,t);if(n!==void 0){let i=this.sharedCache.get(e);if(!i){i=new Map;this.sharedCache.set(e,i)}i.set(n,t)}return t}async _resolveRemoteContext({activeCtx:e,url:t,documentLoader:n,base:i,cycles:o}){t=s(i,t);const{context:r,remoteDoc:a}=await this._fetchContext({activeCtx:e,url:t,documentLoader:n,cycles:o});i=a.documentUrl||t;u({context:r,base:i});const l=await this.resolve({activeCtx:e,context:r,documentLoader:n,base:i,cycles:o});this._cacheResolvedContext({key:t,resolved:l,tag:a.tag});return l}async _fetchContext({activeCtx:e,url:t,documentLoader:r,cycles:s}){if(s.size>c){throw new a("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:e.processingMode==="json-ld-1.0"?"loading remote context failed":"context overflow",max:c})}if(s.has(t)){throw new a("Cyclical @context URLs detected.","jsonld.ContextUrlError",{code:e.processingMode==="json-ld-1.0"?"recursive context inclusion":"context overflow",url:t})}s.add(t);let l;let f;try{f=await r(t);l=f.document||null;if(o(l)){l=JSON.parse(l)}}catch(e){throw new a(`Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context. URL: "${t}".`,"jsonld.InvalidUrl",{code:"loading remote context failed",url:t,cause:e})}if(!i(l)){throw new a(`Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object. URL: "${t}".`,"jsonld.InvalidUrl",{code:"invalid remote context",url:t})}if(!("@context"in l)){l={"@context":{}}}else{l={"@context":l["@context"]}}if(f.contextUrl){if(!n(l["@context"])){l["@context"]=[l["@context"]]}l["@context"].push(f.contextUrl)}return{context:l,remoteDoc:f}}};function f(e){throw new a("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:e})}function u({context:e,base:t}){if(!e){return}const r=e["@context"];if(o(r)){e["@context"]=s(t,r);return}if(n(r)){for(let e=0;e<r.length;++e){const n=r[e];if(o(n)){r[e]=s(t,n);continue}if(i(n)){u({context:{"@context":n},base:t})}}return}if(!i(r)){return}for(const e in r){u({context:r[e],base:t})}}}});var D=e({"../node_modules/jsonld/lib/NQuads.js"(e,t){t.exports=d().NQuads}});var L=e({"../node_modules/jsonld/lib/events.js"(e,t){var n=h();var{isArray:i}=v();var{asArray:o}=y();var r={};t.exports=r;r.defaultEventHandler=null;r.setupEventHandler=({options:e={}})=>{const t=[].concat(e.safe?r.safeEventHandler:[],e.eventHandler?o(e.eventHandler):[],r.defaultEventHandler?r.defaultEventHandler:[]);return t.length===0?null:t};r.handleEvent=({event:e,options:t})=>{s({event:e,handlers:t.eventHandler})};function s({event:e,handlers:t}){let o=true;for(let r=0;o&&r<t.length;++r){o=false;const a=t[r];if(i(a)){o=s({event:e,handlers:a})}else if(typeof a==="function"){a({event:e,next:()=>{o=true}})}else if(typeof a==="object"){if(e.code in a){a[e.code]({event:e,next:()=>{o=true}})}else{o=true}}else{throw new n("Invalid event handler.","jsonld.InvalidEventHandler",{event:e})}}return o}var a=new Set(["empty object","free-floating scalar","invalid @language value","invalid property","null @id value","null @value value","object with only @id","object with only @language","object with only @list","object with only @value","relative @id reference","relative @type reference","relative @vocab reference","reserved @id value","reserved @reverse value","reserved term","blank node predicate","relative graph reference","relative object reference","relative predicate reference","relative subject reference","rdfDirection not set"]);r.safeEventHandler=function e({event:t,next:i}){if(t.level==="warning"&&a.has(t.code)){throw new n("Safe mode validation error.","jsonld.ValidationError",{event:t})}i()};r.logEventHandler=function e({event:t,next:n}){console.log(`EVENT: ${t.message}`,{event:t});n()};r.logWarningEventHandler=function e({event:t,next:n}){if(t.level==="warning"){console.warn(`WARNING: ${t.message}`,{event:t})}n()};r.unhandledEventHandler=function e({event:t}){throw new n("No handler for event.","jsonld.UnhandledEvent",{event:t})};r.setDefaultEventHandler=function({eventHandler:e}={}){r.defaultEventHandler=e?o(e):null}}});var O=e({"../node_modules/jsonld/lib/context.js"(e,t){var n=y();var i=h();var{isArray:o,isObject:r,isString:s,isUndefined:a}=v();var{isAbsolute:l,isRelative:c,prependBase:f}=m();var{handleEvent:u}=L();var{REGEX_BCP47:d,REGEX_KEYWORD:p,asArray:w,compareShortestLeast:x}=y();var g=new Map;var b=1e4;var j={};t.exports=j;j.process=async({activeCtx:e,localCtx:t,options:n,propagate:a=true,overrideProtected:v=false,cycles:p=new Set})=>{if(r(t)&&"@context"in t&&o(t["@context"])){t=t["@context"]}const h=w(t);if(h.length===0){return e}const y=[];const x=[({event:e,next:t})=>{y.push(e);t()}];if(n.eventHandler){x.push(n.eventHandler)}const m=n;n={...n,eventHandler:x};const g=await n.contextResolver.resolve({activeCtx:e,context:t,documentLoader:n.documentLoader,base:n.base});if(r(g[0].document)&&typeof g[0].document["@propagate"]==="boolean"){a=g[0].document["@propagate"]}let b=e;if(!a&&!b.previousContext){b=b.clone();b.previousContext=e}for(const o of g){let{document:a}=o;e=b;if(a===null){if(!v&&Object.keys(e.protected).length!==0){throw new i("Tried to nullify a context with protected terms outside of a term definition.","jsonld.SyntaxError",{code:"invalid context nullification"})}b=e=j.getInitialContext(n).clone();continue}const h=o.getProcessed(e);if(h){if(m.eventHandler){for(const e of h.events){u({event:e,options:m})}}b=e=h.context;continue}if(r(a)&&"@context"in a){a=a["@context"]}if(!r(a)){throw new i("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:a})}b=b.clone();const w=new Map;if("@version"in a){if(a["@version"]!==1.1){throw new i("Unsupported JSON-LD version: "+a["@version"],"jsonld.UnsupportedVersion",{code:"invalid @version value",context:a})}if(e.processingMode&&e.processingMode==="json-ld-1.0"){throw new i("@version: "+a["@version"]+" not compatible with "+e.processingMode,"jsonld.ProcessingModeConflict",{code:"processing mode conflict",context:a})}b.processingMode="json-ld-1.1";b["@version"]=a["@version"];w.set("@version",true)}b.processingMode=b.processingMode||e.processingMode;if("@base"in a){let e=a["@base"];if(e===null||l(e));else if(c(e)){e=f(b["@base"],e)}else{throw new i('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:a})}b["@base"]=e;w.set("@base",true)}if("@vocab"in a){const e=a["@vocab"];if(e===null){delete b["@vocab"]}else if(!s(e)){throw new i('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:a})}else if(!l(e)&&j.processingMode(b,1)){throw new i('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be an absolute IRI.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:a})}else{const t=S(b,e,{vocab:true,base:true},void 0,void 0,n);if(!l(t)){if(n.eventHandler){u({event:{type:["JsonLdEvent"],code:"relative @vocab reference",level:"warning",message:"Relative @vocab reference found.",details:{vocab:t}},options:n})}}b["@vocab"]=t}w.set("@vocab",true)}if("@language"in a){const e=a["@language"];if(e===null){delete b["@language"]}else if(!s(e)){throw new i('Invalid JSON-LD syntax; the value of "@language" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid default language",context:a})}else{if(!e.match(d)){if(n.eventHandler){u({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:n})}}b["@language"]=e.toLowerCase()}w.set("@language",true)}if("@direction"in a){const t=a["@direction"];if(e.processingMode==="json-ld-1.0"){throw new i("Invalid JSON-LD syntax; @direction not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context member",context:a})}if(t===null){delete b["@direction"]}else if(t!=="ltr"&&t!=="rtl"){throw new i('Invalid JSON-LD syntax; the value of "@direction" in a @context must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:a})}else{b["@direction"]=t}w.set("@direction",true)}if("@propagate"in a){const n=a["@propagate"];if(e.processingMode==="json-ld-1.0"){throw new i("Invalid JSON-LD syntax; @propagate not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:a})}if(typeof n!=="boolean"){throw new i("Invalid JSON-LD syntax; @propagate value must be a boolean.","jsonld.SyntaxError",{code:"invalid @propagate value",context:t})}w.set("@propagate",true)}if("@import"in a){const o=a["@import"];if(e.processingMode==="json-ld-1.0"){throw new i("Invalid JSON-LD syntax; @import not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:a})}if(!s(o)){throw new i("Invalid JSON-LD syntax; @import must be a string.","jsonld.SyntaxError",{code:"invalid @import value",context:t})}const r=await n.contextResolver.resolve({activeCtx:e,context:o,documentLoader:n.documentLoader,base:n.base});if(r.length!==1){throw new i("Invalid JSON-LD syntax; @import must reference a single context.","jsonld.SyntaxError",{code:"invalid remote context",context:t})}const l=r[0].getProcessed(e);if(l){a=l}else{const n=r[0].document;if("@import"in n){throw new i("Invalid JSON-LD syntax: imported context must not include @import.","jsonld.SyntaxError",{code:"invalid context entry",context:t})}for(const e in n){if(!a.hasOwnProperty(e)){a[e]=n[e]}}r[0].setProcessed(e,a)}w.set("@import",true)}w.set("@protected",a["@protected"]||false);for(const e in a){j.createTermDefinition({activeCtx:b,localCtx:a,term:e,defined:w,options:n,overrideProtected:v});if(r(a[e])&&"@context"in a[e]){const t=a[e]["@context"];let o=true;if(s(t)){const e=f(n.base,t);if(p.has(e)){o=false}else{p.add(e)}}if(o){try{await j.process({activeCtx:b.clone(),localCtx:a[e]["@context"],overrideProtected:true,options:n,cycles:p})}catch(t){throw new i("Invalid JSON-LD syntax; invalid scoped context.","jsonld.SyntaxError",{code:"invalid scoped context",context:a[e]["@context"],term:e})}}}}o.setProcessed(e,{context:b,events:y})}return b};j.createTermDefinition=({activeCtx:e,localCtx:t,term:n,defined:a,options:c,overrideProtected:f=false})=>{if(a.has(n)){if(a.get(n)){return}throw new i("Cyclical context definition detected.","jsonld.CyclicalContext",{code:"cyclic IRI mapping",context:t,term:n})}a.set(n,false);let d;if(t.hasOwnProperty(n)){d=t[n]}if(n==="@type"&&r(d)&&(d["@container"]||"@set")==="@set"&&j.processingMode(e,1.1)){const e=["@container","@id","@protected"];const o=Object.keys(d);if(o.length===0||o.some((t=>!e.includes(t)))){throw new i("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:n})}}else if(j.isKeyword(n)){throw new i("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:n})}else if(n.match(p)){if(c.eventHandler){u({event:{type:["JsonLdEvent"],code:"reserved term",level:"warning",message:'Terms beginning with "@" are reserved for future use and dropped.',details:{term:n}},options:c})}return}else if(n===""){throw new i("Invalid JSON-LD syntax; a term cannot be an empty string.","jsonld.SyntaxError",{code:"invalid term definition",context:t})}const v=e.mappings.get(n);if(e.mappings.has(n)){e.mappings.delete(n)}let h=false;if(s(d)||d===null){h=true;d={"@id":d}}if(!r(d)){throw new i("Invalid JSON-LD syntax; @context term values must be strings or objects.","jsonld.SyntaxError",{code:"invalid term definition",context:t})}const y={};e.mappings.set(n,y);y.reverse=false;const w=["@container","@id","@language","@reverse","@type"];if(j.processingMode(e,1.1)){w.push("@context","@direction","@index","@nest","@prefix","@protected")}for(const e in d){if(!w.includes(e)){throw new i("Invalid JSON-LD syntax; a term definition must not contain "+e,"jsonld.SyntaxError",{code:"invalid term definition",context:t})}}const x=n.indexOf(":");y._termHasColon=x>0;if("@reverse"in d){if("@id"in d){throw new i("Invalid JSON-LD syntax; a @reverse term definition must not contain @id.","jsonld.SyntaxError",{code:"invalid reverse property",context:t})}if("@nest"in d){throw new i("Invalid JSON-LD syntax; a @reverse term definition must not contain @nest.","jsonld.SyntaxError",{code:"invalid reverse property",context:t})}const o=d["@reverse"];if(!s(o)){throw new i("Invalid JSON-LD syntax; a @context @reverse value must be a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t})}if(o.match(p)){if(c.eventHandler){u({event:{type:["JsonLdEvent"],code:"reserved @reverse value",level:"warning",message:'@reverse values beginning with "@" are reserved for future use and dropped.',details:{reverse:o}},options:c})}if(v){e.mappings.set(n,v)}else{e.mappings.delete(n)}return}const r=S(e,o,{vocab:true,base:false},t,a,c);if(!l(r)){throw new i("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})}y["@id"]=r;y.reverse=true}else if("@id"in d){let o=d["@id"];if(o&&!s(o)){throw new i("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(o===null){y["@id"]=null}else if(!j.isKeyword(o)&&o.match(p)){if(c.eventHandler){u({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:'@id values beginning with "@" are reserved for future use and dropped.',details:{id:o}},options:c})}if(v){e.mappings.set(n,v)}else{e.mappings.delete(n)}return}else if(o!==n){o=S(e,o,{vocab:true,base:false},t,a,c);if(!l(o)&&!j.isKeyword(o)){throw new i("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(/(?::[^:])|\//)){const r=new Map(a).set(n,true);const s=S(e,n,{vocab:true,base:false},t,r,c);if(s!==o){throw new i("Invalid JSON-LD syntax; term in form of IRI must expand to definition.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t})}}y["@id"]=o;y._prefix=h&&!y._termHasColon&&o.match(/[:\/\?#\[\]@]$/)!==null}}if(!("@id"in y)){if(y._termHasColon){const i=n.substr(0,x);if(t.hasOwnProperty(i)){j.createTermDefinition({activeCtx:e,localCtx:t,term:i,defined:a,options:c})}if(e.mappings.has(i)){const t=n.substr(x+1);y["@id"]=e.mappings.get(i)["@id"]+t}else{y["@id"]=n}}else if(n==="@type"){y["@id"]=n}else{if(!("@vocab"in e)){throw new i("Invalid JSON-LD syntax; @context terms must define an @id.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t,term:n})}y["@id"]=e["@vocab"]+n}}if(d["@protected"]===true||a.get("@protected")===true&&d["@protected"]!==false){e.protected[n]=true;y.protected=true}a.set(n,true);if("@type"in d){let n=d["@type"];if(!s(n)){throw new i("Invalid JSON-LD syntax; an @context @type value must be a string.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}if(n==="@json"||n==="@none"){if(j.processingMode(e,1)){throw new i(`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(n!=="@id"&&n!=="@vocab"){n=S(e,n,{vocab:true,base:false},t,a,c);if(!l(n)){throw new i("Invalid JSON-LD syntax; an @context @type value must be an absolute IRI.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}if(n.indexOf("_:")===0){throw new i("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})}}y["@type"]=n}if("@container"in d){const n=s(d["@container"])?[d["@container"]]:d["@container"]||[];const r=["@list","@set","@index","@language"];let a=true;const l=n.includes("@set");if(j.processingMode(e,1.1)){r.push("@graph","@id","@type");if(n.includes("@list")){if(n.length!==1){throw new i("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=>e!=="@graph"&&e!=="@id"&&e!=="@index"&&e!=="@set"))){throw new i("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{a&=n.length<=(l?2:1)}if(n.includes("@type")){y["@type"]=y["@type"]||"@id";if(!["@id","@vocab"].includes(y["@type"])){throw new i("Invalid JSON-LD syntax; container: @type requires @type to be @id or @vocab.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}}}else{a&=!o(d["@container"]);a&=n.length<=1}a&=n.every((e=>r.includes(e)));a&=!(l&&n.includes("@list"));if(!a){throw new i("Invalid JSON-LD syntax; @context @container value must be one of the following: "+r.join(", "),"jsonld.SyntaxError",{code:"invalid container mapping",context:t})}if(y.reverse&&!n.every((e=>["@index","@set"].includes(e)))){throw new i("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})}y["@container"]=n}if("@index"in d){if(!("@container"in d)||!y["@container"].includes("@index")){throw new i(`Invalid JSON-LD syntax; @index without @index in @container: "${d["@index"]}" on term "${n}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t})}if(!s(d["@index"])||d["@index"].indexOf("@")===0){throw new i(`Invalid JSON-LD syntax; @index must expand to an IRI: "${d["@index"]}" on term "${n}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t})}y["@index"]=d["@index"]}if("@context"in d){y["@context"]=d["@context"]}if("@language"in d&&!("@type"in d)){let e=d["@language"];if(e!==null&&!s(e)){throw new i("Invalid JSON-LD syntax; @context @language value must be a string or null.","jsonld.SyntaxError",{code:"invalid language mapping",context:t})}if(e!==null){e=e.toLowerCase()}y["@language"]=e}if("@prefix"in d){if(n.match(/:|\//)){throw new i("Invalid JSON-LD syntax; @context @prefix used on a compact IRI term","jsonld.SyntaxError",{code:"invalid term definition",context:t})}if(j.isKeyword(y["@id"])){throw new i("Invalid JSON-LD syntax; keywords may not be used as prefixes","jsonld.SyntaxError",{code:"invalid term definition",context:t})}if(typeof d["@prefix"]==="boolean"){y._prefix=d["@prefix"]===true}else{throw new i("Invalid JSON-LD syntax; @context value for @prefix must be boolean","jsonld.SyntaxError",{code:"invalid @prefix value",context:t})}}if("@direction"in d){const e=d["@direction"];if(e!==null&&e!=="ltr"&&e!=="rtl"){throw new i('Invalid JSON-LD syntax; @direction value must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:t})}y["@direction"]=e}if("@nest"in d){const e=d["@nest"];if(!s(e)||e!=="@nest"&&e.indexOf("@")===0){throw new i("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})}y["@nest"]=e}const m=y["@id"];if(m==="@context"||m==="@preserve"){throw new i("Invalid JSON-LD syntax; @context and @preserve cannot be aliased.","jsonld.SyntaxError",{code:"invalid keyword alias",context:t})}if(v&&v.protected&&!f){e.protected[n]=true;y.protected=true;if(!E(v,y)){throw new i("Invalid JSON-LD syntax; tried to redefine a protected term.","jsonld.SyntaxError",{code:"protected term redefinition",context:t,term:n})}}};j.expandIri=(e,t,n,i)=>S(e,t,n,void 0,void 0,i);function S(e,t,n,i,o,a){if(t===null||!s(t)||j.isKeyword(t)){return t}if(t.match(p)){return null}if(i&&i.hasOwnProperty(t)&&o.get(t)!==true){j.createTermDefinition({activeCtx:e,localCtx:i,term:t,defined:o,options:a})}n=n||{};if(n.vocab){const n=e.mappings.get(t);if(n===null){return null}if(r(n)&&"@id"in n){return n["@id"]}}const c=t.indexOf(":");if(c>0){const n=t.substr(0,c);const r=t.substr(c+1);if(n==="_"||r.indexOf("//")===0){return t}if(i&&i.hasOwnProperty(n)){j.createTermDefinition({activeCtx:e,localCtx:i,term:n,defined:o,options:a})}const s=e.mappings.get(n);if(s&&s._prefix){return s["@id"]+r}if(l(t)){return t}}if(n.vocab&&"@vocab"in e){const n=e["@vocab"]+t;t=n}else if(n.base){let n;let i;if("@base"in e){if(e["@base"]){i=f(a.base,e["@base"]);n=f(i,t)}else{i=e["@base"];n=t}}else{i=a.base;n=f(a.base,t)}t=n}return t}j.getInitialContext=e=>{const t=JSON.stringify({processingMode:e.processingMode});const i=g.get(t);if(i){return i}const o={processingMode:e.processingMode,mappings:new Map,inverse:null,getInverse:r,clone:l,revertToPreviousContext:c,protected:{}};if(g.size===b){g.clear()}g.set(t,o);return o;function r(){const e=this;if(e.inverse){return e.inverse}const t=e.inverse={};const n=e.fastCurieMap={};const i={};const o=(e["@language"]||"@none").toLowerCase();const r=e["@direction"];const l=e.mappings;const c=[...l.keys()].sort(x);for(const e of c){const s=l.get(e);if(s===null){continue}let c=s["@container"]||"@none";c=[].concat(c).sort().join("");if(s["@id"]===null){continue}const f=w(s["@id"]);for(const l of f){let f=t[l];const u=j.isKeyword(l);if(!f){t[l]=f={};if(!u&&!s._termHasColon){i[l]=[e];const t={iri:l,terms:i[l]};if(l[0]in n){n[l[0]].push(t)}else{n[l[0]]=[t]}}}else if(!u&&!s._termHasColon){i[l].push(e)}if(!f[c]){f[c]={"@language":{},"@type":{},"@any":{}}}f=f[c];a(e,f["@any"],"@none");if(s.reverse){a(e,f["@type"],"@reverse")}else if(s["@type"]==="@none"){a(e,f["@any"],"@none");a(e,f["@language"],"@none");a(e,f["@type"],"@none")}else if("@type"in s){a(e,f["@type"],s["@type"])}else if("@language"in s&&"@direction"in s){const t=s["@language"];const n=s["@direction"];if(t&&n){a(e,f["@language"],`${t}_${n}`.toLowerCase())}else if(t){a(e,f["@language"],t.toLowerCase())}else if(n){a(e,f["@language"],`_${n}`)}else{a(e,f["@language"],"@null")}}else if("@language"in s){a(e,f["@language"],(s["@language"]||"@null").toLowerCase())}else if("@direction"in s){if(s["@direction"]){a(e,f["@language"],`_${s["@direction"]}`)}else{a(e,f["@language"],"@none")}}else if(r){a(e,f["@language"],`_${r}`);a(e,f["@language"],"@none");a(e,f["@type"],"@none")}else{a(e,f["@language"],o);a(e,f["@language"],"@none");a(e,f["@type"],"@none")}}}for(const e in n){s(n,e,1)}return t}function s(e,t,n){const i=e[t];const o=e[t]={};let r;let a;for(const e of i){r=e.iri;if(n>=r.length){a=""}else{a=r[n]}if(a in o){o[a].push(e)}else{o[a]=[e]}}for(const e in o){if(e===""){continue}s(o,e,n+1)}}function a(e,t,n){if(!t.hasOwnProperty(n)){t[n]=e}}function l(){const e={};e.mappings=n.clone(this.mappings);e.clone=this.clone;e.inverse=null;e.getInverse=this.getInverse;e.protected=n.clone(this.protected);if(this.previousContext){e.previousContext=this.previousContext.clone()}e.revertToPreviousContext=this.revertToPreviousContext;if("@base"in this){e["@base"]=this["@base"]}if("@language"in this){e["@language"]=this["@language"]}if("@vocab"in this){e["@vocab"]=this["@vocab"]}return e}function c(){if(!this.previousContext){return this}return this.previousContext.clone()}};j.getContextValue=(e,t,n)=>{if(t===null){if(n==="@context"){return void 0}return null}if(e.mappings.has(t)){const i=e.mappings.get(t);if(a(n)){return i}if(i.hasOwnProperty(n)){return i[n]}}if(n==="@language"&&n in e){return e[n]}if(n==="@direction"&&n in e){return e[n]}if(n==="@context"){return void 0}return null};j.processingMode=(e,t)=>{if(t.toString()>="1.1"){return!e.processingMode||e.processingMode>="json-ld-"+t.toString()}else{return e.processingMode==="json-ld-1.0"}};j.isKeyword=e=>{if(!s(e)||e[0]!=="@"){return false}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 true}return false};function E(e,t){if(!(e&&typeof e==="object")||!(t&&typeof t==="object")){return e===t}const n=Array.isArray(e);if(n!==Array.isArray(t)){return false}if(n){if(e.length!==t.length){return false}for(let n=0;n<e.length;++n){if(!E(e[n],t[n])){return false}}return true}const i=Object.keys(e);const o=Object.keys(t);if(i.length!==o.length){return false}for(const n in e){let i=e[n];let o=t[n];if(n==="@container"){if(Array.isArray(i)&&Array.isArray(o)){i=i.slice().sort();o=o.slice().sort()}}if(!E(i,o)){return false}}return true}}});var R=e({"../node_modules/jsonld/lib/expand.js"(e,t){var n=h();var{isArray:i,isObject:o,isEmptyObject:r,isString:s,isUndefined:a}=v();var{isList:l,isValue:c,isGraph:f,isSubject:u}=p();var{expandIri:d,getContextValue:w,isKeyword:x,process:g,processingMode:b}=O();var{isAbsolute:j}=m();var{REGEX_BCP47:S,REGEX_KEYWORD:E,addValue:I,asArray:N,getValues:D,validateTypeValue:R}=y();var{handleEvent:C}=L();var _={};t.exports=_;_.expand=async({activeCtx:e,activeProperty:t=null,element:l,options:c={},insideList:f=false,insideIndex:u=false,typeScopedContext:v=null})=>{if(l===null||l===void 0){return null}if(t==="@default"){c=Object.assign({},c,{isFrame:false})}if(!i(l)&&!o(l)){if(!f&&(t===null||d(e,t,{vocab:true},c)==="@graph")){if(c.eventHandler){C({event:{type:["JsonLdEvent"],code:"free-floating scalar",level:"warning",message:"Dropping free-floating scalar not in a list.",details:{value:l}},options:c})}return null}return J({activeCtx:e,activeProperty:t,value:l,options:c})}if(i(l)){let n=[];const o=w(e,t,"@container")||[];f=f||o.includes("@list");for(let o=0;o<l.length;++o){let r=await _.expand({activeCtx:e,activeProperty:t,element:l[o],options:c,insideIndex:u,typeScopedContext:v});if(f&&i(r)){r={"@list":r}}if(r===null){continue}if(i(r)){n=n.concat(r)}else{n.push(r)}}return n}const p=d(e,t,{vocab:true},c);const h=w(e,t,"@context");v=v||(e.previousContext?e:null);let y=Object.keys(l).sort();let x=!u;if(x&&v&&y.length<=2&&!y.includes("@context")){for(const t of y){const n=d(v,t,{vocab:true},c);if(n==="@value"){x=false;e=v;break}if(n==="@id"&&y.length===1){x=false;break}}}if(x){e=e.revertToPreviousContext()}if(!a(h)){e=await g({activeCtx:e,localCtx:h,propagate:true,overrideProtected:true,options:c})}if("@context"in l){e=await g({activeCtx:e,localCtx:l["@context"],options:c})}v=e;let m=null;for(const t of y){const n=d(e,t,{vocab:true},c);if(n==="@type"){m=m||t;const n=l[t];const i=Array.isArray(n)?n.length>1?n.slice().sort():n:[n];for(const t of i){const n=w(v,t,"@context");if(!a(n)){e=await g({activeCtx:e,localCtx:n,options:c,propagate:false})}}}}let S={};await A({activeCtx:e,activeProperty:t,expandedActiveProperty:p,element:l,expandedParent:S,options:c,insideList:f,typeKey:m,typeScopedContext:v});y=Object.keys(S);let E=y.length;if("@value"in S){if("@type"in S&&("@language"in S||"@direction"in S)){throw new n('Invalid JSON-LD syntax; an element containing "@value" may not contain both "@type" and either "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:S})}let t=E-1;if("@type"in S){t-=1}if("@index"in S){t-=1}if("@language"in S){t-=1}if("@direction"in S){t-=1}if(t!==0){throw new n('Invalid JSON-LD syntax; an element containing "@value" may only have an "@index" property and either "@type" or either or both "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:S})}const i=S["@value"]===null?[]:N(S["@value"]);const o=D(S,"@type");if(b(e,1.1)&&o.includes("@json")&&o.length===1);else if(i.length===0){if(c.eventHandler){C({event:{type:["JsonLdEvent"],code:"null @value value",level:"warning",message:"Dropping null @value value.",details:{value:S}},options:c})}S=null}else if(!i.every((e=>s(e)||r(e)))&&"@language"in S){throw new n("Invalid JSON-LD syntax; only strings may be language-tagged.","jsonld.SyntaxError",{code:"invalid language-tagged value",element:S})}else if(!o.every((e=>j(e)&&!(s(e)&&e.indexOf("_:")===0)||r(e)))){throw new n('Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',"jsonld.SyntaxError",{code:"invalid typed value",element:S})}}else if("@type"in S&&!i(S["@type"])){S["@type"]=[S["@type"]]}else if("@set"in S||"@list"in S){if(E>1&&!(E===2&&"@index"in S)){throw new n('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:S})}if("@set"in S){S=S["@set"];y=Object.keys(S);E=y.length}}else if(E===1&&"@language"in S){if(c.eventHandler){C({event:{type:["JsonLdEvent"],code:"object with only @language",level:"warning",message:"Dropping object with only @language.",details:{value:S}},options:c})}S=null}if(o(S)&&!c.keepFreeFloatingNodes&&!f&&(t===null||p==="@graph"||(w(e,t,"@container")||[]).includes("@graph"))){S=T({value:S,count:E,options:c})}return S};function T({value:e,count:t,options:n}){if(t===0||"@value"in e||"@list"in e||t===1&&"@id"in e){if(n.eventHandler){let i;let o;if(t===0){i="empty object";o="Dropping empty object."}else if("@value"in e){i="object with only @value";o="Dropping object with only @value."}else if("@list"in e){i="object with only @list";o="Dropping object with only @list."}else if(t===1&&"@id"in e){i="object with only @id";o="Dropping object with only @id."}C({event:{type:["JsonLdEvent"],code:i,level:"warning",message:o,details:{value:e}},options:n})}return null}return e}async function A({activeCtx:e,activeProperty:t,expandedActiveProperty:f,element:v,expandedParent:p,options:h={},insideList:y,typeKey:m,typeScopedContext:E}){const D=Object.keys(v).sort();const L=[];let O;const J=v[m]&&d(e,i(v[m])?v[m][0]:v[m],{vocab:true},{...h,typeExpansion:true})==="@json";for(const y of D){let m=v[y];let D;if(y==="@context"){continue}const A=d(e,y,{vocab:true},h);if(A===null||!(j(A)||x(A))){if(h.eventHandler){C({event:{type:["JsonLdEvent"],code:"invalid property",level:"warning",message:"Dropping property that did not expand into an absolute IRI or keyword.",details:{property:y,expandedProperty:A}},options:h})}continue}if(x(A)){if(f==="@reverse"){throw new n("Invalid JSON-LD syntax; a keyword cannot be used as a @reverse property.","jsonld.SyntaxError",{code:"invalid reverse property map",value:m})}if(A in p&&A!=="@included"&&A!=="@type"){throw new n("Invalid JSON-LD syntax; colliding keywords detected.","jsonld.SyntaxError",{code:"colliding keywords",keyword:A})}}if(A==="@id"){if(!s(m)){if(!h.isFrame){throw new n('Invalid JSON-LD syntax; "@id" value must a string.',"jsonld.SyntaxError",{code:"invalid @id value",value:m})}if(o(m)){if(!r(m)){throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:m})}}else if(i(m)){if(!m.every((e=>s(e)))){throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:m})}}else{throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:m})}}I(p,"@id",N(m).map((t=>{if(s(t)){const n=d(e,t,{base:true},h);if(h.eventHandler){if(n===null){if(t===null){C({event:{type:["JsonLdEvent"],code:"null @id value",level:"warning",message:"Null @id found.",details:{id:t}},options:h})}else{C({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:t}},options:h})}}else if(!j(n)){C({event:{type:["JsonLdEvent"],code:"relative @id reference",level:"warning",message:"Relative @id reference found.",details:{id:t,expandedId:n}},options:h})}}return n}return t})),{propertyIsArray:h.isFrame});continue}if(A==="@type"){if(o(m)){m=Object.fromEntries(Object.entries(m).map((([e,t])=>[d(E,e,{vocab:true}),N(t).map((e=>d(E,e,{base:true,vocab:true},{...h,typeExpansion:true})))])))}R(m,h.isFrame);I(p,"@type",N(m).map((e=>{if(s(e)){const t=d(E,e,{base:true,vocab:true},{...h,typeExpansion:true});if(t!=="@json"&&!j(t)){if(h.eventHandler){C({event:{type:["JsonLdEvent"],code:"relative @type reference",level:"warning",message:"Relative @type reference found.",details:{type:e}},options:h})}}return t}return e})),{propertyIsArray:!!h.isFrame});continue}if(A==="@included"&&b(e,1.1)){const i=N(await _.expand({activeCtx:e,activeProperty:t,element:m,options:h}));if(!i.every((e=>u(e)))){throw new n("Invalid JSON-LD syntax; values of @included must expand to node objects.","jsonld.SyntaxError",{code:"invalid @included value",value:m})}I(p,"@included",i,{propertyIsArray:true});continue}if(A==="@graph"&&!(o(m)||i(m))){throw new n('Invalid JSON-LD syntax; "@graph" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid @graph value",value:m})}if(A==="@value"){O=m;if(J&&b(e,1.1)){p["@value"]=m}else{I(p,"@value",m,{propertyIsArray:h.isFrame})}continue}if(A==="@language"){if(m===null){continue}if(!s(m)&&!h.isFrame){throw new n('Invalid JSON-LD syntax; "@language" value must be a string.',"jsonld.SyntaxError",{code:"invalid language-tagged string",value:m})}m=N(m).map((e=>s(e)?e.toLowerCase():e));for(const e of m){if(s(e)&&!e.match(S)){if(h.eventHandler){C({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:h})}}}I(p,"@language",m,{propertyIsArray:h.isFrame});continue}if(A==="@direction"){if(!s(m)&&!h.isFrame){throw new n('Invalid JSON-LD syntax; "@direction" value must be a string.',"jsonld.SyntaxError",{code:"invalid base direction",value:m})}m=N(m);for(const e of m){if(s(e)&&e!=="ltr"&&e!=="rtl"){throw new n('Invalid JSON-LD syntax; "@direction" must be "ltr" or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",value:m})}}I(p,"@direction",m,{propertyIsArray:h.isFrame});continue}if(A==="@index"){if(!s(m)){throw new n('Invalid JSON-LD syntax; "@index" value must be a string.',"jsonld.SyntaxError",{code:"invalid @index value",value:m})}I(p,"@index",m);continue}if(A==="@reverse"){if(!o(m)){throw new n('Invalid JSON-LD syntax; "@reverse" value must be an object.',"jsonld.SyntaxError",{code:"invalid @reverse value",value:m})}D=await _.expand({activeCtx:e,activeProperty:"@reverse",element:m,options:h});if("@reverse"in D){for(const e in D["@reverse"]){I(p,e,D["@reverse"][e],{propertyIsArray:true})}}let t=p["@reverse"]||null;for(const e in D){if(e==="@reverse"){continue}if(t===null){t=p["@reverse"]={}}I(t,e,[],{propertyIsArray:true});const i=D[e];for(let o=0;o<i.length;++o){const r=i[o];if(c(r)||l(r)){throw new n('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:D})}I(t,e,r,{propertyIsArray:true})}}continue}if(A==="@nest"){L.push(y);continue}let M=e;const U=w(e,y,"@context");if(!a(U)){M=await g({activeCtx:e,localCtx:U,propagate:true,overrideProtected:true,options:h})}const B=w(e,y,"@container")||[];if(B.includes("@language")&&o(m)){const e=w(M,y,"@direction");D=k(M,m,e,h)}else if(B.includes("@index")&&o(m)){const t=B.includes("@graph");const n=w(M,y,"@index")||"@index";const i=n!=="@index"&&d(e,n,{vocab:true},h);D=await P({activeCtx:M,options:h,activeProperty:y,value:m,asGraph:t,indexKey:n,propertyIndex:i})}else if(B.includes("@id")&&o(m)){const e=B.includes("@graph");D=await P({activeCtx:M,options:h,activeProperty:y,value:m,asGraph:e,indexKey:"@id"})}else if(B.includes("@type")&&o(m)){D=await P({activeCtx:M.revertToPreviousContext(),options:h,activeProperty:y,value:m,asGraph:false,indexKey:"@type"})}else{const n=A==="@list";if(n||A==="@set"){let e=t;if(n&&f==="@graph"){e=null}D=await _.expand({activeCtx:M,activeProperty:e,element:m,options:h,insideList:n})}else if(w(e,y,"@type")==="@json"){D={"@type":"@json","@value":m}}else{D=await _.expand({activeCtx:M,activeProperty:y,element:m,options:h,insideList:false})}}if(D===null&&A!=="@value"){continue}if(A!=="@list"&&!l(D)&&B.includes("@list")){D={"@list":N(D)}}if(B.includes("@graph")&&!B.some((e=>e==="@id"||e==="@index"))){D=N(D);if(!h.isFrame){D=D.filter((e=>{const t=Object.keys(e).length;return T({value:e,count:t,options:h})!==null}))}if(D.length===0){continue}D=D.map((e=>({"@graph":N(e)})))}if(M.mappings.has(y)&&M.mappings.get(y).reverse){const e=p["@reverse"]=p["@reverse"]||{};D=N(D);for(let t=0;t<D.length;++t){const i=D[t];if(c(i)||l(i)){throw new n('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:D})}I(e,A,i,{propertyIsArray:true})}continue}I(p,A,D,{propertyIsArray:true})}if("@value"in p){if(p["@type"]==="@json"&&b(e,1.1));else if((o(O)||i(O))&&!h.isFrame){throw new n('Invalid JSON-LD syntax; "@value" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid value object value",value:O})}}for(const r of L){const s=i(v[r])?v[r]:[v[r]];for(const i of s){if(!o(i)||Object.keys(i).some((t=>d(e,t,{vocab:true},h)==="@value"))){throw new n("Invalid JSON-LD syntax; nested value must be a node object.","jsonld.SyntaxError",{code:"invalid @nest value",value:i})}await A({activeCtx:e,activeProperty:t,expandedActiveProperty:f,element:i,expandedParent:p,options:h,insideList:y,typeScopedContext:E,typeKey:m})}}}function J({activeCtx:e,activeProperty:t,value:n,options:i}){if(n===null||n===void 0){return null}const o=d(e,t,{vocab:true},i);if(o==="@id"){return d(e,n,{base:true},i)}else if(o==="@type"){return d(e,n,{vocab:true,base:true},{...i,typeExpansion:true})}const r=w(e,t,"@type");if((r==="@id"||o==="@graph")&&s(n)){const o=d(e,n,{base:true},i);if(o===null&&n.match(E)){if(i.eventHandler){C({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:t}},options:i})}}return{"@id":o}}if(r==="@vocab"&&s(n)){return{"@id":d(e,n,{vocab:true,base:true},i)}}if(x(o)){return n}const a={};if(r&&!["@id","@vocab","@none"].includes(r)){a["@type"]=r}else if(s(n)){const n=w(e,t,"@language");if(n!==null){a["@language"]=n}const i=w(e,t,"@direction");if(i!==null){a["@direction"]=i}}if(!["boolean","number","string"].includes(typeof n)){n=n.toString()}a["@value"]=n;return a}function k(e,t,o,r){const a=[];const l=Object.keys(t).sort();for(const c of l){const l=d(e,c,{vocab:true},r);let f=t[c];if(!i(f)){f=[f]}for(const e of f){if(e===null){continue}if(!s(e)){throw new n("Invalid JSON-LD syntax; language map values must be strings.","jsonld.SyntaxError",{code:"invalid language map value",languageMap:t})}const i={"@value":e};if(l!=="@none"){if(!c.match(S)){if(r.eventHandler){C({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:c}},options:r})}}i["@language"]=c.toLowerCase()}if(o){i["@direction"]=o}a.push(i)}}return a}async function P({activeCtx:e,options:t,activeProperty:o,value:r,asGraph:s,indexKey:l,propertyIndex:u}){const v=[];const p=Object.keys(r).sort();const h=l==="@type";for(let y of p){if(h){const n=w(e,y,"@context");if(!a(n)){e=await g({activeCtx:e,localCtx:n,propagate:false,options:t})}}let p=r[y];if(!i(p)){p=[p]}p=await _.expand({activeCtx:e,activeProperty:o,element:p,options:t,insideList:false,insideIndex:true});let x;if(u){if(y==="@none"){x="@none"}else{x=J({activeCtx:e,activeProperty:l,value:y,options:t})}}else{x=d(e,y,{vocab:true},t)}if(l==="@id"){y=d(e,y,{base:true},t)}else if(h){y=x}for(let e of p){if(s&&!f(e)){e={"@graph":[e]}}if(l==="@type"){if(x==="@none");else if(e["@type"]){e["@type"]=[y].concat(e["@type"])}else{e["@type"]=[y]}}else if(c(e)&&!["@language","@type","@index"].includes(l)){throw new n(`Invalid JSON-LD syntax; Attempt to add illegal key to value object: "${l}".`,"jsonld.SyntaxError",{code:"invalid value object",value:e})}else if(u){if(x!=="@none"){I(e,u,x,{propertyIsArray:true,prependValue:true})}}else if(x!=="@none"&&!(l in e)){e[l]=y}v.push(e)}}return v}}});var C=e({"../node_modules/jsonld/lib/nodeMap.js"(e,t){var{isKeyword:n}=O();var i=p();var o=v();var r=y();var s=h();var a={};t.exports=a;a.createMergedNodeMap=(e,t)=>{t=t||{};const n=t.issuer||new r.IdentifierIssuer("_:b");const i={"@default":{}};a.createNodeMap(e,i,"@default",n);return a.mergeNodeMaps(i)};a.createNodeMap=(e,t,l,c,f,u)=>{if(o.isArray(e)){for(const n of e){a.createNodeMap(n,t,l,c,void 0,u)}return}if(!o.isObject(e)){if(u){u.push(e)}return}if(i.isValue(e)){if("@type"in e){let t=e["@type"];if(t.indexOf("_:")===0){e["@type"]=t=c.getId(t)}}if(u){u.push(e)}return}else if(u&&i.isList(e)){const n=[];a.createNodeMap(e["@list"],t,l,c,f,n);u.push({"@list":n});return}if("@type"in e){const t=e["@type"];for(const e of t){if(e.indexOf("_:")===0){c.getId(e)}}}if(o.isUndefined(f)){f=i.isBlankNode(e)?c.getId(e["@id"]):e["@id"]}if(u){u.push({"@id":f})}const d=t[l];const v=d[f]=d[f]||{};v["@id"]=f;const p=Object.keys(e).sort();for(let o of p){if(o==="@id"){continue}if(o==="@reverse"){const n={"@id":f};const o=e["@reverse"];for(const e in o){const s=o[e];for(const o of s){let s=o["@id"];if(i.isBlankNode(o)){s=c.getId(s)}a.createNodeMap(o,t,l,c,s);r.addValue(d[s],e,n,{propertyIsArray:true,allowDuplicate:false})}}continue}if(o==="@graph"){if(!(f in t)){t[f]={}}a.createNodeMap(e[o],t,f,c);continue}if(o==="@included"){a.createNodeMap(e[o],t,l,c);continue}if(o!=="@type"&&n(o)){if(o==="@index"&&o in v&&(e[o]!==v[o]||e[o]["@id"]!==v[o]["@id"])){throw new s("Invalid JSON-LD syntax; conflicting @index property detected.","jsonld.SyntaxError",{code:"conflicting indexes",subject:v})}v[o]=e[o];continue}const u=e[o];if(o.indexOf("_:")===0){o=c.getId(o)}if(u.length===0){r.addValue(v,o,[],{propertyIsArray:true});continue}for(let e of u){if(o==="@type"){e=e.indexOf("_:")===0?c.getId(e):e}if(i.isSubject(e)||i.isSubjectReference(e)){if("@id"in e&&!e["@id"]){continue}const n=i.isBlankNode(e)?c.getId(e["@id"]):e["@id"];r.addValue(v,o,{"@id":n},{propertyIsArray:true,allowDuplicate:false});a.createNodeMap(e,t,l,c,n)}else if(i.isValue(e)){r.addValue(v,o,e,{propertyIsArray:true,allowDuplicate:false})}else if(i.isList(e)){const n=[];a.createNodeMap(e["@list"],t,l,c,f,n);e={"@list":n};r.addValue(v,o,e,{propertyIsArray:true,allowDuplicate:false})}else{a.createNodeMap(e,t,l,c,f);r.addValue(v,o,e,{propertyIsArray:true,allowDuplicate:false})}}}};a.mergeNodeMapGraphs=e=>{const t={};for(const i of Object.keys(e).sort()){for(const o of Object.keys(e[i]).sort()){const s=e[i][o];if(!(o in t)){t[o]={"@id":o}}const a=t[o];for(const e of Object.keys(s).sort()){if(n(e)&&e!=="@type"){a[e]=r.clone(s[e])}else{for(const t of s[e]){r.addValue(a,e,r.clone(t),{propertyIsArray:true,allowDuplicate:false})}}}}}return t};a.mergeNodeMaps=e=>{const t=e["@default"];const n=Object.keys(e).sort();for(const o of n){if(o==="@default"){continue}const n=e[o];let r=t[o];if(!r){t[o]=r={"@id":o,"@graph":[]}}else if(!("@graph"in r)){r["@graph"]=[]}const s=r["@graph"];for(const e of Object.keys(n).sort()){const t=n[e];if(!i.isSubjectReference(t)){s.push(t)}}}return t}}});var _=e({"../node_modules/jsonld/lib/flatten.js"(e,t){var{isSubjectReference:n}=p();var{createMergedNodeMap:i}=C();var o={};t.exports=o;o.flatten=e=>{const t=i(e);const o=[];const r=Object.keys(t).sort();for(let e=0;e<r.length;++e){const i=t[r[e]];if(!n(i)){o.push(i)}}return o}}});var T=e({"../node_modules/jsonld/lib/fromRdf.js"(e,t){var n=h();var i=p();var o=v();var{REGEX_BCP47:r,addValue:s}=y();var{handleEvent:a}=L();var{RDF_LIST:l,RDF_FIRST:c,RDF_REST:f,RDF_NIL:u,RDF_TYPE:d,RDF_JSON_LITERAL:x,XSD_BOOLEAN:m,XSD_DOUBLE:g,XSD_INTEGER:b,XSD_STRING:j}=w();var S={};t.exports=S;S.fromRDF=async(e,t)=>{const{useRdfType:r=false,useNativeTypes:a=false,rdfDirection:v=null}=t;const p={};const h={"@default":p};const y={};if(v){if(v==="compound-literal"){throw new n("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:v})}else if(v!=="i18n-datatype"){throw new n("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:v})}}for(const n of e){const e=n.graph.termType==="DefaultGraph"?"@default":n.graph.value;if(!(e in h)){h[e]={}}if(e!=="@default"&&!(e in p)){p[e]={"@id":e}}const i=h[e];const o=n.subject.value;const l=n.predicate.value;const c=n.object;if(!(o in i)){i[o]={"@id":o}}const f=i[o];const w=c.termType.endsWith("Node");if(w&&!(c.value in i)){i[c.value]={"@id":c.value}}if(l===d&&!r&&w){s(f,"@type",c.value,{propertyIsArray:true});continue}const x=E(c,a,v,t);s(f,l,x,{propertyIsArray:true});if(w){if(c.value===u){const e=i[c.value];if(!("usages"in e)){e.usages=[]}e.usages.push({node:f,property:l,value:x})}else if(c.value in y){y[c.value]=false}else{y[c.value]={node:f,property:l,value:x}}}}for(const e in h){const t=h[e];if(!(u in t)){continue}const n=t[u];if(!n.usages){continue}for(let e of n.usages){let n=e.node;let r=e.property;let s=e.value;const a=[];const u=[];let d=Object.keys(n).length;while(r===f&&o.isObject(y[n["@id"]])&&o.isArray(n[c])&&n[c].length===1&&o.isArray(n[f])&&n[f].length===1&&(d===3||d===4&&o.isArray(n["@type"])&&n["@type"].length===1&&n["@type"][0]===l)){a.push(n[c][0]);u.push(n["@id"]);e=y[n["@id"]];n=e.node;r=e.property;s=e.value;d=Object.keys(n).length;if(!i.isBlankNode(n)){break}}delete s["@id"];s["@list"]=a.reverse();for(const e of u){delete t[e]}}delete n.usages}const w=[];const x=Object.keys(p).sort();for(const e of x){const t=p[e];if(e in h){const n=t["@graph"]=[];const o=h[e];const r=Object.keys(o).sort();for(const e of r){const t=o[e];if(!i.isSubjectReference(t)){n.push(t)}}}if(!i.isSubjectReference(t)){w.push(t)}}return w};function E(e,t,i,s){if(e.termType.endsWith("Node")){return{"@id":e.value}}const l={"@value":e.value};if(e.language){if(!e.language.match(r)){if(s.eventHandler){a({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e.language}},options:s})}}l["@language"]=e.language}else{let c=e.datatype.value;if(!c){c=j}if(c===x){c="@json";try{l["@value"]=JSON.parse(l["@value"])}catch(e){throw new n("JSON literal could not be parsed.","jsonld.InvalidJsonLiteral",{code:"invalid JSON literal",value:l["@value"],cause:e})}}if(t){if(c===m){if(l["@value"]==="true"){l["@value"]=true}else if(l["@value"]==="false"){l["@value"]=false}}else if(o.isNumeric(l["@value"])){if(c===b){const e=parseInt(l["@value"],10);if(e.toFixed(0)===l["@value"]){l["@value"]=e}}else if(c===g){l["@value"]=parseFloat(l["@value"])}}if(![m,b,g,j].includes(c)){l["@type"]=c}}else if(i==="i18n-datatype"&&c.startsWith("https://www.w3.org/ns/i18n#")){const[,e,t]=c.split(/[#_]/);if(e.length>0){l["@language"]=e;if(!e.match(r)){if(s.eventHandler){a({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:s})}}}l["@direction"]=t}else if(c!==j){l["@type"]=c}}return l}}});var A=e({"../node_modules/jsonld/node_modules/canonicalize/lib/canonicalize.js"(e,t){t.exports=function e(t){if(t===null||typeof t!=="object"||t.toJSON!=null){return JSON.stringify(t)}if(Array.isArray(t)){return"["+t.reduce(((t,n,i)=>{const o=i===0?"":",";const r=n===void 0||typeof n==="symbol"?null:n;return t+o+e(r)}),"")+"]"}return"{"+Object.keys(t).sort().reduce(((n,i,o)=>{if(t[i]===void 0||typeof t[i]==="symbol"){return n}const r=n.length===0?"":",";return n+r+e(i)+":"+e(t[i])}),"")+"}"}}});var J=e({"../node_modules/jsonld/lib/toRdf.js"(e,t){var{createNodeMap:n}=C();var{isKeyword:i}=O();var o=p();var r=A();var s=h();var a=v();var l=y();var{handleEvent:c}=L();var{RDF_FIRST:f,RDF_REST:u,RDF_NIL:d,RDF_TYPE:x,RDF_JSON_LITERAL:g,RDF_LANGSTRING:b,XSD_BOOLEAN:j,XSD_DOUBLE:S,XSD_INTEGER:E,XSD_STRING:I}=w();var{isAbsolute:N}=m();var D={};t.exports=D;D.toRDF=(e,t)=>{const i=new l.IdentifierIssuer("_:b");const o={"@default":{}};n(e,o,"@default",i);const r=[];const s=Object.keys(o).sort();for(const e of s){let n;if(e==="@default"){n={termType:"DefaultGraph",value:""}}else if(N(e)){if(e.startsWith("_:")){n={termType:"BlankNode"}}else{n={termType:"NamedNode"}}n.value=e}else{if(t.eventHandler){c({event:{type:["JsonLdEvent"],code:"relative graph reference",level:"warning",message:"Relative graph reference found.",details:{graph:e}},options:t})}continue}R(r,o[e],n,i,t)}return r};function R(e,t,n,o,r){const s=Object.keys(t).sort();for(const a of s){const s=t[a];const l=Object.keys(s).sort();for(let t of l){const l=s[t];if(t==="@type"){t=x}else if(i(t)){continue}for(const i of l){const s={termType:a.startsWith("_:")?"BlankNode":"NamedNode",value:a};if(!N(a)){if(r.eventHandler){c({event:{type:["JsonLdEvent"],code:"relative subject reference",level:"warning",message:"Relative subject reference found.",details:{subject:a}},options:r})}continue}const l={termType:t.startsWith("_:")?"BlankNode":"NamedNode",value:t};if(!N(t)){if(r.eventHandler){c({event:{type:["JsonLdEvent"],code:"relative predicate reference",level:"warning",message:"Relative predicate reference found.",details:{predicate:t}},options:r})}continue}if(l.termType==="BlankNode"&&!r.produceGeneralizedRdf){if(r.eventHandler){c({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 f=T(i,o,e,n,r.rdfDirection,r);if(f){e.push({subject:s,predicate:l,object:f,graph:n})}}}}}function _(e,t,n,i,o,r){const s={termType:"NamedNode",value:f};const a={termType:"NamedNode",value:u};const l={termType:"NamedNode",value:d};const c=e.pop();const v=c?{termType:"BlankNode",value:t.getId()}:l;let p=v;for(const l of e){const e=T(l,t,n,i,o,r);const c={termType:"BlankNode",value:t.getId()};n.push({subject:p,predicate:s,object:e,graph:i});n.push({subject:p,predicate:a,object:c,graph:i});p=c}if(c){const e=T(c,t,n,i,o,r);n.push({subject:p,predicate:s,object:e,graph:i});n.push({subject:p,predicate:a,object:l,graph:i})}return v}function T(e,t,n,i,l,f){const u={};if(o.isValue(e)){u.termType="Literal";u.value=void 0;u.datatype={termType:"NamedNode"};let t=e["@value"];const n=e["@type"]||null;if(n==="@json"){u.value=r(t);u.datatype.value=g}else if(a.isBoolean(t)){u.value=t.toString();u.datatype.value=n||j}else if(a.isDouble(t)||n===S){if(!a.isDouble(t)){t=parseFloat(t)}u.value=t.toExponential(15).replace(/(\d)0*e\+?/,"$1E");u.datatype.value=n||S}else if(a.isNumber(t)){u.value=t.toFixed(0);u.datatype.value=n||E}else if("@direction"in e&&l==="i18n-datatype"){const n=(e["@language"]||"").toLowerCase();const i=e["@direction"];const o=`https://www.w3.org/ns/i18n#${n}_${i}`;u.datatype.value=o;u.value=t}else if("@direction"in e&&l==="compound-literal"){throw new s("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:l})}else if("@direction"in e&&l){throw new s("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:l})}else if("@language"in e){if("@direction"in e&&!l){if(f.eventHandler){c({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:u.value}},options:f})}}u.value=t;u.datatype.value=n||b;u.language=e["@language"]}else{if("@direction"in e&&!l){if(f.eventHandler){c({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:u.value}},options:f})}}u.value=t;u.datatype.value=n||I}}else if(o.isList(e)){const o=_(e["@list"],t,n,i,l,f);u.termType=o.termType;u.value=o.value}else{const t=a.isObject(e)?e["@id"]:e;u.termType=t.startsWith("_:")?"BlankNode":"NamedNode";u.value=t}if(u.termType==="NamedNode"&&!N(u.value)){if(f.eventHandler){c({event:{type:["JsonLdEvent"],code:"relative object reference",level:"warning",message:"Relative object reference found.",details:{object:u.value}},options:f})}return null}return u}}});var k=e({"../node_modules/jsonld/lib/frame.js"(e,t){var{isKeyword:n}=O();var i=p();var o=v();var r=y();var s=m();var a=h();var{createNodeMap:l,mergeNodeMapGraphs:c}=C();var f={};t.exports=f;f.frameMergedOrDefault=(e,t,n)=>{const i={options:n,embedded:false,graph:"@default",graphMap:{"@default":{}},subjectStack:[],link:{},bnodeMap:{}};const o=new r.IdentifierIssuer("_:b");l(e,i.graphMap,"@default",o);if(n.merged){i.graphMap["@merged"]=c(i.graphMap);i.graph="@merged"}i.subjects=i.graphMap[i.graph];const s=[];f.frame(i,Object.keys(i.subjects).sort(),t,s);if(n.pruneBlankNodeIdentifiers){n.bnodesToClear=Object.keys(i.bnodeMap).filter((e=>i.bnodeMap[e].length===1))}n.link={};return S(s,n)};f.frame=(e,t,s,l,c=null)=>{x(s);s=s[0];const v=e.options;const p={embed:w(s,v,"embed"),explicit:w(s,v,"explicit"),requireAll:w(s,v,"requireAll")};if(!e.link.hasOwnProperty(e.graph)){e.link[e.graph]={}}const h=e.link[e.graph];const y=g(e,t,s,p);const m=Object.keys(y).sort();for(const x of m){const m=y[x];if(c===null){e.uniqueEmbeds={[e.graph]:{}}}else{e.uniqueEmbeds[e.graph]=e.uniqueEmbeds[e.graph]||{}}if(p.embed==="@link"&&x in h){E(l,c,h[x]);continue}const g={"@id":x};if(x.indexOf("_:")===0){r.addValue(e.bnodeMap,x,g,{propertyIsArray:true})}h[x]=g;if((p.embed==="@first"||p.embed==="@last")&&e.is11){throw new a("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:s})}if(!e.embedded&&e.uniqueEmbeds[e.graph].hasOwnProperty(x)){continue}if(e.embedded&&(p.embed==="@never"||d(m,e.graph,e.subjectStack))){E(l,c,g);continue}if(e.embedded&&(p.embed=="@first"||p.embed=="@once")&&e.uniqueEmbeds[e.graph].hasOwnProperty(x)){E(l,c,g);continue}if(p.embed==="@last"){if(x in e.uniqueEmbeds[e.graph]){j(e,x)}}e.uniqueEmbeds[e.graph][x]={parent:l,property:c};e.subjectStack.push({subject:m,graph:e.graph});if(x in e.graphMap){let t=false;let n=null;if(!("@graph"in s)){t=e.graph!=="@merged";n={}}else{n=s["@graph"][0];t=!(x==="@merged"||x==="@default");if(!o.isObject(n)){n={}}}if(t){f.frame({...e,graph:x,embedded:false},Object.keys(e.graphMap[x]).sort(),[n],g,"@graph")}}if("@included"in s){f.frame({...e,embedded:false},t,s["@included"],g,"@included")}for(const t of Object.keys(m).sort()){if(n(t)){g[t]=r.clone(m[t]);if(t==="@type"){for(const t of m["@type"]){if(t.indexOf("_:")===0){r.addValue(e.bnodeMap,t,g,{propertyIsArray:true})}}}continue}if(p.explicit&&!(t in s)){continue}for(const n of m[t]){const o=t in s?s[t]:u(p);if(i.isList(n)){const o=s[t]&&s[t][0]&&s[t][0]["@list"]?s[t][0]["@list"]:u(p);const a={"@list":[]};E(g,t,a);const l=n["@list"];for(const t of l){if(i.isSubjectReference(t)){f.frame({...e,embedded:true},[t["@id"]],o,a,"@list")}else{E(a,"@list",r.clone(t))}}}else if(i.isSubjectReference(n)){f.frame({...e,embedded:true},[n["@id"]],o,g,t)}else if(N(o[0],n)){E(g,t,r.clone(n))}}}for(const e of Object.keys(s).sort()){if(e==="@type"){if(!o.isObject(s[e][0])||!("@default"in s[e][0])){continue}}else if(n(e)){continue}const t=s[e][0]||{};const i=w(t,v,"omitDefault");if(!i&&!(e in g)){let n="@null";if("@default"in t){n=r.clone(t["@default"])}if(!o.isArray(n)){n=[n]}g[e]=[{"@preserve":n}]}}for(const t of Object.keys(s["@reverse"]||{}).sort()){const n=s["@reverse"][t];for(const i of Object.keys(e.subjects)){const o=r.getValues(e.subjects[i],t);if(o.some((e=>e["@id"]===x))){g["@reverse"]=g["@reverse"]||{};r.addValue(g["@reverse"],t,[],{propertyIsArray:true});f.frame({...e,embedded:true},[i],n,g["@reverse"][t],c)}}}E(l,c,g);e.subjectStack.pop()}};f.cleanupNull=(e,t)=>{if(o.isArray(e)){const n=e.map((e=>f.cleanupNull(e,t)));return n.filter((e=>e))}if(e==="@null"){return null}if(o.isObject(e)){if("@id"in e){const n=e["@id"];if(t.link.hasOwnProperty(n)){const i=t.link[n].indexOf(e);if(i!==-1){return t.link[n][i]}t.link[n].push(e)}else{t.link[n]=[e]}}for(const n in e){e[n]=f.cleanupNull(e[n],t)}}return e};function u(e){const t={};for(const n in e){if(e[n]!==void 0){t["@"+n]=[e[n]]}}return[t]}function d(e,t,n){for(let i=n.length-1;i>=0;--i){const o=n[i];if(o.graph===t&&o.subject["@id"]===e["@id"]){return true}}return false}function w(e,t,n){const i="@"+n;let o=i in e?e[i][0]:t[n];if(n==="embed"){if(o===true){o="@once"}else if(o===false){o="@never"}else if(o!=="@always"&&o!=="@never"&&o!=="@link"&&o!=="@first"&&o!=="@last"&&o!=="@once"){throw new a("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:e})}}return o}function x(e){if(!o.isArray(e)||e.length!==1||!o.isObject(e[0])){throw new a("Invalid JSON-LD syntax; a JSON-LD frame must be a single object.","jsonld.SyntaxError",{frame:e})}if("@id"in e[0]){for(const t of r.asArray(e[0]["@id"])){if(!(o.isObject(t)||s.isAbsolute(t))||o.isString(t)&&t.indexOf("_:")===0){throw new a("Invalid JSON-LD syntax; invalid @id in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e})}}}if("@type"in e[0]){for(const t of r.asArray(e[0]["@type"])){if(!(o.isObject(t)||s.isAbsolute(t)||t==="@json")||o.isString(t)&&t.indexOf("_:")===0){throw new a("Invalid JSON-LD syntax; invalid @type in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e})}}}}function g(e,t,n,i){const o={};for(const r of t){const t=e.graphMap[e.graph][r];if(b(e,t,n,i)){o[r]=t}}return o}function b(e,t,s,a){let l=true;let c=false;for(const f in s){let u=false;const d=r.getValues(t,f);const v=r.getValues(s,f).length===0;if(f==="@id"){if(o.isEmptyObject(s["@id"][0]||{})){u=true}else if(s["@id"].length>=0){u=s["@id"].includes(d[0])}if(!a.requireAll){return u}}else if(f==="@type"){l=false;if(v){if(d.length>0){return false}u=true}else if(s["@type"].length===1&&o.isEmptyObject(s["@type"][0])){u=d.length>0}else{for(const e of s["@type"]){if(o.isObject(e)&&"@default"in e){u=true}else{u=u||d.some((t=>t===e))}}}if(!a.requireAll){return u}}else if(n(f)){continue}else{const t=r.getValues(s,f)[0];let n=false;if(t){x([t]);n="@default"in t}l=false;if(d.length===0&&n){continue}if(d.length>0&&v){return false}if(t===void 0){if(d.length>0){return false}u=true}else{if(i.isList(t)){const n=t["@list"][0];if(i.isList(d[0])){const t=d[0]["@list"];if(i.isValue(n)){u=t.some((e=>N(n,e)))}else if(i.isSubject(n)||i.isSubjectReference(n)){u=t.some((t=>I(e,n,t,a)))}}}else if(i.isValue(t)){u=d.some((e=>N(t,e)))}else if(i.isSubjectReference(t)){u=d.some((n=>I(e,t,n,a)))}else if(o.isObject(t)){u=d.length>0}else{u=false}}}if(!u&&a.requireAll){return false}c=c||u}return l||c}function j(e,t){const n=e.uniqueEmbeds[e.graph];const i=n[t];const s=i.parent;const a=i.property;const l={"@id":t};if(o.isArray(s)){for(let e=0;e<s.length;++e){if(r.compareValues(s[e],l)){s[e]=l;break}}}else{const e=o.isArray(s[a]);r.removeValue(s,a,l,{propertyIsArray:e});r.addValue(s,a,l,{propertyIsArray:e})}const c=e=>{const t=Object.keys(n);for(const i of t){if(i in n&&o.isObject(n[i].parent)&&n[i].parent["@id"]===e){delete n[i];c(i)}}};c(t)}function S(e,t){if(o.isArray(e)){return e.map((e=>S(e,t)))}if(o.isObject(e)){if("@preserve"in e){return e["@preserve"][0]}if(i.isValue(e)){return e}if(i.isList(e)){e["@list"]=S(e["@list"],t);return e}if("@id"in e){const n=e["@id"];if(t.link.hasOwnProperty(n)){const i=t.link[n].indexOf(e);if(i!==-1){return t.link[n][i]}t.link[n].push(e)}else{t.link[n]=[e]}}for(const n in e){if(n==="@id"&&t.bnodesToClear.includes(e[n])){delete e["@id"];continue}e[n]=S(e[n],t)}}return e}function E(e,t,n){if(o.isObject(e)){r.addValue(e,t,n,{propertyIsArray:true})}else{e.push(n)}}function I(e,t,n,i){if(!("@id"in n)){return false}const o=e.subjects[n["@id"]];return o&&b(e,o,t,i)}function N(e,t){const n=t["@value"];const i=t["@type"];const r=t["@language"];const s=e["@value"]?o.isArray(e["@value"])?e["@value"]:[e["@value"]]:[];const a=e["@type"]?o.isArray(e["@type"])?e["@type"]:[e["@type"]]:[];const l=e["@language"]?o.isArray(e["@language"])?e["@language"]:[e["@language"]]:[];if(s.length===0&&a.length===0&&l.length===0){return true}if(!(s.includes(n)||o.isEmptyObject(s[0]))){return false}if(!(!i&&a.length===0||a.includes(i)||i&&o.isEmptyObject(a[0]))){return false}if(!(!r&&l.length===0||l.includes(r)||r&&o.isEmptyObject(l[0]))){return false}return true}}});var P=e({"../node_modules/jsonld/lib/compact.js"(e,t){var n=h();var{isArray:i,isObject:o,isString:r,isUndefined:s}=v();var{isList:a,isValue:l,isGraph:c,isSimpleGraph:f,isSubjectReference:u}=p();var{expandIri:d,getContextValue:w,isKeyword:x,process:g,processingMode:b}=O();var{removeBase:j,prependBase:S}=m();var{REGEX_KEYWORD:E,addValue:I,asArray:N,compareShortestLeast:D}=y();var L={};t.exports=L;L.compact=async({activeCtx:e,activeProperty:t=null,element:d,options:v={}})=>{if(i(d)){let n=[];for(let i=0;i<d.length;++i){const o=await L.compact({activeCtx:e,activeProperty:t,element:d[i],options:v});if(o===null){continue}n.push(o)}if(v.compactArrays&&n.length===1){const i=w(e,t,"@container")||[];if(i.length===0){n=n[0]}}return n}const p=w(e,t,"@context");if(!s(p)){e=await g({activeCtx:e,localCtx:p,propagate:true,overrideProtected:true,options:v})}if(o(d)){if(v.link&&"@id"in d&&v.link.hasOwnProperty(d["@id"])){const e=v.link[d["@id"]];for(let t=0;t<e.length;++t){if(e[t].expanded===d){return e[t].compacted}}}if(l(d)||u(d)){const n=L.compactValue({activeCtx:e,activeProperty:t,value:d,options:v});if(v.link&&u(d)){if(!v.link.hasOwnProperty(d["@id"])){v.link[d["@id"]]=[]}v.link[d["@id"]].push({expanded:d,compacted:n})}return n}if(a(d)){const n=w(e,t,"@container")||[];if(n.includes("@list")){return L.compact({activeCtx:e,activeProperty:t,element:d["@list"],options:v})}}const p=t==="@reverse";const h={};const y=e;if(!l(d)&&!u(d)){e=e.revertToPreviousContext()}const m=w(y,t,"@context");if(!s(m)){e=await g({activeCtx:e,localCtx:m,propagate:true,overrideProtected:true,options:v})}if(v.link&&"@id"in d){if(!v.link.hasOwnProperty(d["@id"])){v.link[d["@id"]]=[]}v.link[d["@id"]].push({expanded:d,compacted:h})}let j=d["@type"]||[];if(j.length>1){j=Array.from(j).sort()}const S=e;for(const t of j){const n=L.compactIri({activeCtx:S,iri:t,relativeTo:{vocab:true}});const i=w(y,n,"@context");if(!s(i)){e=await g({activeCtx:e,localCtx:i,options:v,propagate:false})}}const E=Object.keys(d).sort();for(const s of E){const u=d[s];if(s==="@id"){let t=N(u).map((t=>L.compactIri({activeCtx:e,iri:t,relativeTo:{vocab:false},base:v.base})));if(t.length===1){t=t[0]}const n=L.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:true}});h[n]=t;continue}if(s==="@type"){let t=N(u).map((e=>L.compactIri({activeCtx:y,iri:e,relativeTo:{vocab:true}})));if(t.length===1){t=t[0]}const n=L.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:true}});const o=w(e,n,"@container")||[];const r=o.includes("@set")&&b(e,1.1);const s=r||i(t)&&u.length===0;I(h,n,t,{propertyIsArray:s});continue}if(s==="@reverse"){const t=await L.compact({activeCtx:e,activeProperty:"@reverse",element:u,options:v});for(const n in t){if(e.mappings.has(n)&&e.mappings.get(n).reverse){const i=t[n];const o=w(e,n,"@container")||[];const r=o.includes("@set")||!v.compactArrays;I(h,n,i,{propertyIsArray:r});delete t[n]}}if(Object.keys(t).length>0){const n=L.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:true}});I(h,n,t)}continue}if(s==="@preserve"){const n=await L.compact({activeCtx:e,activeProperty:t,element:u,options:v});if(!(i(n)&&n.length===0)){I(h,s,n)}continue}if(s==="@index"){const n=w(e,t,"@container")||[];if(n.includes("@index")){continue}const i=L.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:true}});I(h,i,u);continue}if(s!=="@graph"&&s!=="@list"&&s!=="@included"&&x(s)){const t=L.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:true}});I(h,t,u);continue}if(!i(u)){throw new n("JSON-LD expansion error; expanded value must be an array.","jsonld.SyntaxError")}if(u.length===0){const t=L.compactIri({activeCtx:e,iri:s,value:u,relativeTo:{vocab:true},reverse:p});const n=e.mappings.has(t)?e.mappings.get(t)["@nest"]:null;let i=h;if(n){C(e,n,v);if(!o(h[n])){h[n]={}}i=h[n]}I(i,t,u,{propertyIsArray:true})}for(const t of u){const n=L.compactIri({activeCtx:e,iri:s,value:t,relativeTo:{vocab:true},reverse:p});const u=e.mappings.has(n)?e.mappings.get(n)["@nest"]:null;let d=h;if(u){C(e,u,v);if(!o(h[u])){h[u]={}}d=h[u]}const y=w(e,n,"@container")||[];const x=c(t);const m=a(t);let g;if(m){g=t["@list"]}else if(x){g=t["@graph"]}let b=await L.compact({activeCtx:e,activeProperty:n,element:m||x?g:t,options:v});if(m){if(!i(b)){b=[b]}if(!y.includes("@list")){b={[L.compactIri({activeCtx:e,iri:"@list",relativeTo:{vocab:true}})]:b};if("@index"in t){b[L.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:true}})]=t["@index"]}}else{I(d,n,b,{valueIsArray:true,allowDuplicate:true});continue}}if(x){if(y.includes("@graph")&&(y.includes("@id")||y.includes("@index")&&f(t))){let i;if(d.hasOwnProperty(n)){i=d[n]}else{d[n]=i={}}const o=(y.includes("@id")?t["@id"]:t["@index"])||L.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:true}});I(i,o,b,{propertyIsArray:!v.compactArrays||y.includes("@set")})}else if(y.includes("@graph")&&f(t)){if(i(b)&&b.length>1){b={"@included":b}}I(d,n,b,{propertyIsArray:!v.compactArrays||y.includes("@set")})}else{if(i(b)&&b.length===1&&v.compactArrays){b=b[0]}b={[L.compactIri({activeCtx:e,iri:"@graph",relativeTo:{vocab:true}})]:b};if("@id"in t){b[L.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:true}})]=t["@id"]}if("@index"in t){b[L.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:true}})]=t["@index"]}I(d,n,b,{propertyIsArray:!v.compactArrays||y.includes("@set")})}}else if(y.includes("@language")||y.includes("@index")||y.includes("@id")||y.includes("@type")){let i;if(d.hasOwnProperty(n)){i=d[n]}else{d[n]=i={}}let o;if(y.includes("@language")){if(l(b)){b=b["@value"]}o=t["@language"]}else if(y.includes("@index")){const i=w(e,n,"@index")||"@index";const s=L.compactIri({activeCtx:e,iri:i,relativeTo:{vocab:true}});if(i==="@index"){o=t["@index"];delete b[s]}else{let e;[o,...e]=N(b[i]||[]);if(!r(o)){o=null}else{switch(e.length){case 0:delete b[i];break;case 1:b[i]=e[0];break;default:b[i]=e;break}}}}else if(y.includes("@id")){const t=L.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:true}});o=b[t];delete b[t]}else if(y.includes("@type")){const i=L.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:true}});let r;[o,...r]=N(b[i]||[]);switch(r.length){case 0:delete b[i];break;case 1:b[i]=r[0];break;default:b[i]=r;break}if(Object.keys(b).length===1&&"@id"in t){b=await L.compact({activeCtx:e,activeProperty:n,element:{"@id":t["@id"]},options:v})}}if(!o){o=L.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:true}})}I(i,o,b,{propertyIsArray:y.includes("@set")})}else{const e=!v.compactArrays||y.includes("@set")||y.includes("@list")||i(b)&&b.length===0||s==="@list"||s==="@graph";I(d,n,b,{propertyIsArray:e})}}}return h}return d};L.compactIri=({activeCtx:e,iri:t,value:i=null,relativeTo:r={vocab:false},reverse:s=false,base:f=null})=>{if(t===null){return t}if(e.isPropertyTermScoped&&e.previousContext){e=e.previousContext}const u=e.getInverse();if(x(t)&&t in u&&"@none"in u[t]&&"@type"in u[t]["@none"]&&"@none"in u[t]["@none"]["@type"]){return u[t]["@none"]["@type"]["@none"]}if(r.vocab&&t in u){const n=e["@language"]||"@none";const r=[];if(o(i)&&"@index"in i&&!("@graph"in i)){r.push("@index","@index@set")}if(o(i)&&"@preserve"in i){i=i["@preserve"][0]}if(c(i)){if("@index"in i){r.push("@graph@index","@graph@index@set","@index","@index@set")}if("@id"in i){r.push("@graph@id","@graph@id@set")}r.push("@graph","@graph@set","@set");if(!("@index"in i)){r.push("@graph@index","@graph@index@set","@index","@index@set")}if(!("@id"in i)){r.push("@graph@id","@graph@id@set")}}else if(o(i)&&!l(i)){r.push("@id","@id@set","@type","@set@type")}let f="@language";let u="@null";if(s){f="@type";u="@reverse";r.push("@set")}else if(a(i)){if(!("@index"in i)){r.push("@list")}const e=i["@list"];if(e.length===0){f="@any";u="@none"}else{let t=e.length===0?n:null;let i=null;for(let n=0;n<e.length;++n){const o=e[n];let r="@none";let s="@none";if(l(o)){if("@direction"in o){const e=(o["@language"]||"").toLowerCase();const t=o["@direction"];r=`${e}_${t}`}else if("@language"in o){r=o["@language"].toLowerCase()}else if("@type"in o){s=o["@type"]}else{r="@null"}}else{s="@id"}if(t===null){t=r}else if(r!==t&&l(o)){t="@none"}if(i===null){i=s}else if(s!==i){i="@none"}if(t==="@none"&&i==="@none"){break}}t=t||"@none";i=i||"@none";if(i!=="@none"){f="@type";u=i}else{u=t}}}else{if(l(i)){if("@language"in i&&!("@index"in i)){r.push("@language","@language@set");u=i["@language"];const e=i["@direction"];if(e){u=`${u}_${e}`}}else if("@direction"in i&&!("@index"in i)){u=`_${i["@direction"]}`}else if("@type"in i){f="@type";u=i["@type"]}}else{f="@type";u="@id"}r.push("@set")}r.push("@none");if(o(i)&&!("@index"in i)){r.push("@index","@index@set")}if(l(i)&&Object.keys(i).length===1){r.push("@language","@language@set")}const d=R(e,t,i,r,f,u);if(d!==null){return d}}if(r.vocab){if("@vocab"in e){const n=e["@vocab"];if(t.indexOf(n)===0&&t!==n){const i=t.substr(n.length);if(!e.mappings.has(i)){return i}}}}let d=null;const v=[];let p=e.fastCurieMap;const h=t.length-1;for(let e=0;e<h&&t[e]in p;++e){p=p[t[e]];if(""in p){v.push(p[""][0])}}for(let n=v.length-1;n>=0;--n){const o=v[n];const r=o.terms;for(const n of r){const r=n+":"+t.substr(o.iri.length);const s=e.mappings.get(n)._prefix&&(!e.mappings.has(r)||i===null&&e.mappings.get(r)["@id"]===t);if(s&&(d===null||D(r,d)<0)){d=r}}}if(d!==null){return d}for(const[i,o]of e.mappings){if(o&&o._prefix&&t.startsWith(i+":")){throw new n(`Absolute IRI "${t}" confused with prefix "${i}".`,"jsonld.SyntaxError",{code:"IRI confused with prefix",context:e})}}if(!r.vocab){if("@base"in e){if(!e["@base"]){return t}else{const n=j(S(f,e["@base"]),t);return E.test(n)?`./${n}`:n}}else{return j(f,t)}}return t};L.compactValue=({activeCtx:e,activeProperty:t,value:n,options:i})=>{if(l(n)){const i=w(e,t,"@type");const o=w(e,t,"@language");const s=w(e,t,"@direction");const a=w(e,t,"@container")||[];const l="@index"in n&&!a.includes("@index");if(!l&&i!=="@none"){if(n["@type"]===i){return n["@value"]}if("@language"in n&&n["@language"]===o&&"@direction"in n&&n["@direction"]===s){return n["@value"]}if("@language"in n&&n["@language"]===o){return n["@value"]}if("@direction"in n&&n["@direction"]===s){return n["@value"]}}const c=Object.keys(n).length;const f=c===1||c===2&&"@index"in n&&!l;const u="@language"in e;const d=r(n["@value"]);const v=e.mappings.has(t)&&e.mappings.get(t)["@language"]===null;if(f&&i!=="@none"&&(!u||!d||v)){return n["@value"]}const p={};if(l){p[L.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:true}})]=n["@index"]}if("@type"in n){p[L.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:true}})]=L.compactIri({activeCtx:e,iri:n["@type"],relativeTo:{vocab:true}})}else if("@language"in n){p[L.compactIri({activeCtx:e,iri:"@language",relativeTo:{vocab:true}})]=n["@language"]}if("@direction"in n){p[L.compactIri({activeCtx:e,iri:"@direction",relativeTo:{vocab:true}})]=n["@direction"]}p[L.compactIri({activeCtx:e,iri:"@value",relativeTo:{vocab:true}})]=n["@value"];return p}const o=d(e,t,{vocab:true},i);const s=w(e,t,"@type");const a=L.compactIri({activeCtx:e,iri:n["@id"],relativeTo:{vocab:s==="@vocab"},base:i.base});if(s==="@id"||s==="@vocab"||o==="@graph"){return a}return{[L.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:true}})]:a}};function R(e,t,n,i,r,s){if(s===null){s="@null"}const a=[];if((s==="@id"||s==="@reverse")&&o(n)&&"@id"in n){if(s==="@reverse"){a.push("@reverse")}const t=L.compactIri({activeCtx:e,iri:n["@id"],relativeTo:{vocab:true}});if(e.mappings.has(t)&&e.mappings.get(t)&&e.mappings.get(t)["@id"]===n["@id"]){a.push.apply(a,["@vocab","@id"])}else{a.push.apply(a,["@id","@vocab"])}}else{a.push(s);const e=a.find((e=>e.includes("_")));if(e){a.push(e.replace(/^[^_]+_/,"_"))}}a.push("@none");const l=e.inverse[t];for(const e of i){if(!(e in l)){continue}const t=l[e][r];for(const e of a){if(!(e in t)){continue}return t[e]}}return null}function C(e,t,i){if(d(e,t,{vocab:true},i)!=="@nest"){throw new n("JSON-LD compact error; nested property must have an @nest value resolving to @nest.","jsonld.SyntaxError",{code:"invalid @nest value"})}}}});var M=e({"../node_modules/jsonld/lib/JsonLdProcessor.js"(e,t){t.exports=e=>{class t{toString(){return"[object JsonLdProcessor]"}}Object.defineProperty(t,"prototype",{writable:false,enumerable:false});Object.defineProperty(t.prototype,"constructor",{writable:true,enumerable:false,configurable:true,value:t});t.compact=function(t,n){if(arguments.length<2){return Promise.reject(new TypeError("Could not compact, too few arguments."))}return e.compact(t,n)};t.expand=function(t){if(arguments.length<1){return Promise.reject(new TypeError("Could not expand, too few arguments."))}return e.expand(t)};t.flatten=function(t){if(arguments.length<1){return Promise.reject(new TypeError("Could not flatten, too few arguments."))}return e.flatten(t)};return t}}});var U=e({"../node_modules/jsonld/lib/jsonld.js"(e,t){var n=d();var i=b();var o=y();var r=N();var s=o.IdentifierIssuer;var a=h();var l=E();var c=D();var{expand:f}=R();var{flatten:u}=_();var{fromRDF:w}=T();var{toRDF:g}=J();var{frameMergedOrDefault:j,cleanupNull:S}=k();var{isArray:I,isObject:A,isString:U}=v();var{isSubjectReference:B}=p();var{expandIri:F,getInitialContext:$,process:z,processingMode:G}=O();var{compact:q,compactIri:H}=P();var{createNodeMap:X,createMergedNodeMap:K,mergeNodeMaps:V}=C();var{logEventHandler:Q,logWarningEventHandler:Z,safeEventHandler:W,setDefaultEventHandler:Y,setupEventHandler:ee,strictEventHandler:te,unhandledEventHandler:ne}=L();var ie=function(e){const t={};const d=100;const v=new l({max:d});e.compact=async function(t,n,i){if(arguments.length<2){throw new TypeError("Could not compact, too few arguments.")}if(n===null){throw new a("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"})}if(t===null){return null}i=p(i,{base:U(t)?t:"",compactArrays:true,compactToRelative:true,graph:false,skipExpansion:false,link:false,issuer:new s("_:b"),contextResolver:new r({sharedCache:v})});if(i.link){i.skipExpansion=true}if(!i.compactToRelative){delete i.base}let l;if(i.skipExpansion){l=t}else{l=await e.expand(t,i)}const c=await e.processContext($(i),n,i);let f=await q({activeCtx:c,element:l,options:i});if(i.compactArrays&&!i.graph&&I(f)){if(f.length===1){f=f[0]}else if(f.length===0){f={}}}else if(i.graph&&A(f)){f=[f]}if(A(n)&&"@context"in n){n=n["@context"]}n=o.clone(n);if(!I(n)){n=[n]}const u=n;n=[];for(let e=0;e<u.length;++e){if(!A(u[e])||Object.keys(u[e]).length>0){n.push(u[e])}}const d=n.length>0;if(n.length===1){n=n[0]}if(I(f)){const e=H({activeCtx:c,iri:"@graph",relativeTo:{vocab:true}});const t=f;f={};if(d){f["@context"]=n}f[e]=t}else if(A(f)&&d){const e=f;f={"@context":n};for(const t in e){f[t]=e[t]}}return f};e.expand=async function(t,n){if(arguments.length<1){throw new TypeError("Could not expand, too few arguments.")}n=p(n,{keepFreeFloatingNodes:false,contextResolver:new r({sharedCache:v})});const i={};const s=[];if("expandContext"in n){const e=o.clone(n.expandContext);if(A(e)&&"@context"in e){i.expandContext=e}else{i.expandContext={"@context":e}}s.push(i.expandContext)}let a;if(!U(t)){i.input=o.clone(t)}else{const o=await e.get(t,n);a=o.documentUrl;i.input=o.document;if(o.contextUrl){i.remoteContext={"@context":o.contextUrl};s.push(i.remoteContext)}}if(!("base"in n)){n.base=a||""}let l=$(n);for(const e of s){l=await z({activeCtx:l,localCtx:e,options:n})}let c=await f({activeCtx:l,element:i.input,options:n});if(A(c)&&"@graph"in c&&Object.keys(c).length===1){c=c["@graph"]}else if(c===null){c=[]}if(!I(c)){c=[c]}return c};e.flatten=async function(t,n,i){if(arguments.length<1){return new TypeError("Could not flatten, too few arguments.")}if(typeof n==="function"){n=null}else{n=n||null}i=p(i,{base:U(t)?t:"",contextResolver:new r({sharedCache:v})});const o=await e.expand(t,i);const s=u(o);if(n===null){return s}i.graph=true;i.skipExpansion=true;const a=await e.compact(s,n,i);return a};e.frame=async function(t,n,i){if(arguments.length<2){throw new TypeError("Could not frame, too few arguments.")}i=p(i,{base:U(t)?t:"",embed:"@once",explicit:false,requireAll:false,omitDefault:false,bnodesToClear:[],contextResolver:new r({sharedCache:v})});if(U(n)){const t=await e.get(n,i);n=t.document;if(t.contextUrl){let e=n["@context"];if(!e){e=t.contextUrl}else if(I(e)){e.push(t.contextUrl)}else{e=[e,t.contextUrl]}n["@context"]=e}}const o=n?n["@context"]||{}:{};const s=await e.processContext($(i),o,i);if(!i.hasOwnProperty("omitGraph")){i.omitGraph=G(s,1.1)}if(!i.hasOwnProperty("pruneBlankNodeIdentifiers")){i.pruneBlankNodeIdentifiers=G(s,1.1)}const a=await e.expand(t,i);const l={...i};l.isFrame=true;l.keepFreeFloatingNodes=true;const c=await e.expand(n,l);const f=Object.keys(n).map((e=>F(s,e,{vocab:true})));l.merged=!f.includes("@graph");l.is11=G(s,1.1);const u=j(a,c,l);l.graph=!i.omitGraph;l.skipExpansion=true;l.link={};l.framing=true;let d=await e.compact(u,o,l);l.link={};d=S(d,l);return d};e.link=async function(t,n,i){const o={};if(n){o["@context"]=n}o["@embed"]="@link";return e.frame(t,o,i)};e.normalize=e.canonize=async function(t,i){if(arguments.length<1){throw new TypeError("Could not canonize, too few arguments.")}i=p(i,{base:U(t)?t:null,algorithm:"URDNA2015",skipExpansion:false,safe:true,contextResolver:new r({sharedCache:v})});if("inputFormat"in i){if(i.inputFormat!=="application/n-quads"&&i.inputFormat!=="application/nquads"){throw new a("Unknown canonicalization input format.","jsonld.CanonizeError")}const e=c.parse(t);return n.canonize(e,i)}const o={...i};delete o.format;o.produceGeneralizedRdf=false;const s=await e.toRDF(t,o);return n.canonize(s,i)};e.fromRDF=async function(e,n){if(arguments.length<1){throw new TypeError("Could not convert from RDF, too few arguments.")}n=p(n,{format:U(e)?"application/n-quads":void 0});const{format:i}=n;let{rdfParser:o}=n;if(i){o=o||t[i];if(!o){throw new a("Unknown input format.","jsonld.UnknownFormat",{format:i})}}else{o=()=>e}const r=await o(e);return w(r,n)};e.toRDF=async function(t,n){if(arguments.length<1){throw new TypeError("Could not convert to RDF, too few arguments.")}n=p(n,{base:U(t)?t:"",skipExpansion:false,contextResolver:new r({sharedCache:v})});let i;if(n.skipExpansion){i=t}else{i=await e.expand(t,n)}const o=g(i,n);if(n.format){if(n.format==="application/n-quads"||n.format==="application/nquads"){return c.serialize(o)}throw new a("Unknown output format.","jsonld.UnknownFormat",{format:n.format})}return o};e.createNodeMap=async function(t,n){if(arguments.length<1){throw new TypeError("Could not create node map, too few arguments.")}n=p(n,{base:U(t)?t:"",contextResolver:new r({sharedCache:v})});const i=await e.expand(t,n);return K(i,n)};e.merge=async function(t,n,i){if(arguments.length<1){throw new TypeError("Could not merge, too few arguments.")}if(!I(t)){throw new TypeError('Could not merge, "docs" must be an array.')}if(typeof n==="function"){n=null}else{n=n||null}i=p(i,{contextResolver:new r({sharedCache:v})});const a=await Promise.all(t.map((t=>{const n={...i};return e.expand(t,n)})));let l=true;if("mergeNodes"in i){l=i.mergeNodes}const c=i.issuer||new s("_:b");const f={"@default":{}};for(let e=0;e<a.length;++e){const t=o.relabelBlankNodes(a[e],{issuer:new s("_:b"+e+"-")});const n=l||e===0?f:{"@default":{}};X(t,n,"@default",c);if(n!==f){for(const e in n){const t=n[e];if(!(e in f)){f[e]=t;continue}const i=f[e];for(const e in t){if(!(e in i)){i[e]=t[e]}}}}}const u=V(f);const d=[];const h=Object.keys(u).sort();for(let e=0;e<h.length;++e){const t=u[h[e]];if(!B(t)){d.push(t)}}if(n===null){return d}i.graph=true;i.skipExpansion=true;const y=await e.compact(d,n,i);return y};Object.defineProperty(e,"documentLoader",{get:()=>e._documentLoader,set:t=>e._documentLoader=t});e.documentLoader=async e=>{throw new a("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:e})};e.get=async function(t,n){let i;if(typeof n.documentLoader==="function"){i=n.documentLoader}else{i=e.documentLoader}const o=await i(t);try{if(!o.document){throw new a("No remote document found at the given URL.","jsonld.NullRemoteDocument")}if(U(o.document)){o.document=JSON.parse(o.document)}}catch(e){throw new a("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:e,remoteDoc:o})}return o};e.processContext=async function(e,t,n){n=p(n,{base:"",contextResolver:new r({sharedCache:v})});if(t===null){return $(n)}t=o.clone(t);if(!(A(t)&&"@context"in t)){t={"@context":t}}return z({activeCtx:e,localCtx:t,options:n})};e.getContextValue=O().getContextValue;e.documentLoaders={};e.useDocumentLoader=function(t){if(!(t in e.documentLoaders)){throw new a('Unknown document loader type: "'+t+'"',"jsonld.UnknownDocumentLoader",{type:t})}e.documentLoader=e.documentLoaders[t].apply(e,Array.prototype.slice.call(arguments,1))};e.registerRDFParser=function(e,n){t[e]=n};e.unregisterRDFParser=function(e){delete t[e]};e.registerRDFParser("application/n-quads",c.parse);e.registerRDFParser("application/nquads",c.parse);e.url=m();e.logEventHandler=Q;e.logWarningEventHandler=Z;e.safeEventHandler=W;e.setDefaultEventHandler=Y;e.strictEventHandler=te;e.unhandledEventHandler=ne;e.util=o;Object.assign(e,o);e.promises=e;e.RequestQueue=x();e.JsonLdProcessor=M()(e);i.setupGlobals(e);i.setupDocumentLoaders(e);function p(t,{documentLoader:n=e.documentLoader,...i}){if(t&&"compactionMap"in t){throw new a('"compactionMap" not supported.',"jsonld.OptionsError")}if(t&&"expansionMap"in t){throw new a('"expansionMap" not supported.',"jsonld.OptionsError")}return Object.assign({},{documentLoader:n},i,t,{eventHandler:ee({options:t})})}return e};var oe=function(){return ie((function(){return oe()}))};ie(oe);t.exports=oe}});const B=U();
2
2
  /*! Bundled license information:
3
3
 
4
4
  rdf-canonize/lib/MessageDigest-browser.js:
@@ -68,4 +68,4 @@ jsonld/lib/jsonld.js:
68
68
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
69
69
  *)
70
70
  */export{B as default};
71
- //# sourceMappingURL=p-a16916b7.js.map
71
+ //# sourceMappingURL=p-b044cf9a.js.map