From 8412f16dbad95ca77b232f253b8b6df729223cf8 Mon Sep 17 00:00:00 2001 From: GitHub Date: Mon, 24 Jun 2024 05:54:53 +0000 Subject: [PATCH] Update to comunica/comunica#2ee134963e9e7c263171fd9579b4d2ff26ea5279. --- versions/latest/engines/query-sparql-file/comunica-browser.js | 2 +- .../latest/engines/query-sparql-file/comunica-browser.js.map | 2 +- versions/latest/engines/query-sparql-rdfjs/comunica-browser.js | 2 +- .../latest/engines/query-sparql-rdfjs/comunica-browser.js.map | 2 +- versions/latest/engines/query-sparql/comunica-browser.js.map | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/versions/latest/engines/query-sparql-file/comunica-browser.js b/versions/latest/engines/query-sparql-file/comunica-browser.js index 642e7b0..793d183 100644 --- a/versions/latest/engines/query-sparql-file/comunica-browser.js +++ b/versions/latest/engines/query-sparql-file/comunica-browser.js @@ -1,3 +1,3 @@ /*! For license information please see comunica-browser.js.LICENSE.txt */ -var Comunica;(()=>{var e={36885:(e,t,r)=>{var{Buffer:n}=r(1048),a={},o=a.LEFT_BRACE=1,s=a.RIGHT_BRACE=2,c=a.LEFT_BRACKET=3,u=a.RIGHT_BRACKET=4,l=a.COLON=5,d=a.COMMA=6,h=a.TRUE=7,p=a.FALSE=8,f=a.NULL=9,y=a.STRING=10,g=a.NUMBER=11,m=a.START=17,b=a.STOP=18,v=a.TRUE1=33,_=a.TRUE2=34,w=a.TRUE3=35,T=a.FALSE1=49,S=a.FALSE2=50,O=a.FALSE3=51,E=a.FALSE4=52,x=a.NULL1=65,A=a.NULL2=66,R=a.NULL3=67,I=a.NUMBER1=81,P=a.NUMBER3=83,N=a.STRING1=97,D=a.STRING2=98,j=a.STRING3=99,C=a.STRING4=100,M=a.STRING5=101,L=a.STRING6=102,k=a.VALUE=113,F=a.KEY=114,B=a.OBJECT=129,U=a.ARRAY=130,q="\\".charCodeAt(0),V="/".charCodeAt(0),Q="\b".charCodeAt(0),$="\f".charCodeAt(0),H="\n".charCodeAt(0),G="\r".charCodeAt(0),z="\t".charCodeAt(0),K=65536;function X(e){return n.alloc?n.alloc(e):new n(e)}function J(){this.tState=m,this.value=void 0,this.string=void 0,this.stringBuffer=X(K),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=k,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:X(2),3:X(3),4:X(4)},this.offset=-1}J.toknam=function(e){for(var t=Object.keys(a),r=0,n=t.length;r=K&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=e},W.appendStringBuf=function(e,t,r){var n=e.length;"number"==typeof t&&(n="number"==typeof r?r<0?e.length-t+r:r-t:e.length-t),n<0&&(n=0),this.stringBufferOffset+n>K&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),e.copy(this.stringBuffer,this.stringBufferOffset,t,r),this.stringBufferOffset+=n},W.write=function(e){var t;"string"==typeof e&&(e=new n(e));for(var r=0,i=e.length;r=48&&t<64)this.string=String.fromCharCode(t),this.tState=P;else if(32!==t&&9!==t&&10!==t&&13!==t)return this.charError(e,r)}else if(this.tState===N)if(t=e[r],this.bytes_remaining>0){for(var a=0;a=128){if(t<=193||t>244)return this.onError(new Error("Invalid UTF-8 character at position "+r+" in state "+J.toknam(this.tState)));if(t>=194&&t<=223&&(this.bytes_in_sequence=2),t>=224&&t<=239&&(this.bytes_in_sequence=3),t>=240&&t<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+r>e.length){for(var g=0;g<=e.length-1-r;g++)this.temp_buffs[this.bytes_in_sequence][g]=e[r+g];this.bytes_remaining=r+this.bytes_in_sequence-e.length,r=e.length-1}else this.appendStringBuf(e,r,r+this.bytes_in_sequence),r=r+this.bytes_in_sequence-1}else if(34===t)this.tState=m,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(y,this.string),this.offset+=n.byteLength(this.string,"utf8")+1,this.string=void 0;else if(92===t)this.tState=D;else{if(!(t>=32))return this.charError(e,r);this.appendStringChar(t)}else if(this.tState===D)if(34===(t=e[r]))this.appendStringChar(t),this.tState=N;else if(92===t)this.appendStringChar(q),this.tState=N;else if(47===t)this.appendStringChar(V),this.tState=N;else if(98===t)this.appendStringChar(Q),this.tState=N;else if(102===t)this.appendStringChar($),this.tState=N;else if(110===t)this.appendStringChar(H),this.tState=N;else if(114===t)this.appendStringChar(G),this.tState=N;else if(116===t)this.appendStringChar(z),this.tState=N;else{if(117!==t)return this.charError(e,r);this.unicode="",this.tState=j}else if(this.tState===j||this.tState===C||this.tState===M||this.tState===L){if(!((t=e[r])>=48&&t<64||t>64&&t<=70||t>96&&t<=102))return this.charError(e,r);if(this.unicode+=String.fromCharCode(t),this.tState++===L){var b=parseInt(this.unicode,16);this.unicode=void 0,void 0!==this.highSurrogate&&b>=56320&&b<57344?(this.appendStringBuf(new n(String.fromCharCode(this.highSurrogate,b))),this.highSurrogate=void 0):void 0===this.highSurrogate&&b>=55296&&b<56320?this.highSurrogate=b:(void 0!==this.highSurrogate&&(this.appendStringBuf(new n(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new n(String.fromCharCode(b)))),this.tState=N}}else if(this.tState===I||this.tState===P)switch(t=e[r]){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 46:case 101:case 69:case 43:case 45:this.string+=String.fromCharCode(t),this.tState=P;break;default:this.tState=m;var k=this.numberReviver(this.string);if(k)return k;this.offset+=this.string.length-1,this.string=void 0,r--}else if(this.tState===v){if(114!==e[r])return this.charError(e,r);this.tState=_}else if(this.tState===_){if(117!==e[r])return this.charError(e,r);this.tState=w}else if(this.tState===w){if(101!==e[r])return this.charError(e,r);this.tState=m,this.onToken(h,!0),this.offset+=3}else if(this.tState===T){if(97!==e[r])return this.charError(e,r);this.tState=S}else if(this.tState===S){if(108!==e[r])return this.charError(e,r);this.tState=O}else if(this.tState===O){if(115!==e[r])return this.charError(e,r);this.tState=E}else if(this.tState===E){if(101!==e[r])return this.charError(e,r);this.tState=m,this.onToken(p,!1),this.offset+=4}else if(this.tState===x){if(117!==e[r])return this.charError(e,r);this.tState=A}else if(this.tState===A){if(108!==e[r])return this.charError(e,r);this.tState=R}else if(this.tState===R){if(108!==e[r])return this.charError(e,r);this.tState=m,this.onToken(f,null),this.offset+=3}},W.onToken=function(e,t){},W.parseError=function(e,t){this.tState=b,this.onError(new Error("Unexpected "+J.toknam(e)+(t?"("+JSON.stringify(t)+")":"")+" in state "+J.toknam(this.state)))},W.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},W.pop=function(){var e=this.value,t=this.stack.pop();this.value=t.value,this.key=t.key,this.mode=t.mode,this.emit(e),this.mode||(this.state=k)},W.emit=function(e){this.mode&&(this.state=d),this.onValue(e)},W.onValue=function(e){},W.onToken=function(e,t){if(this.state===k)if(e===y||e===g||e===h||e===p||e===f)this.value&&(this.value[this.key]=t),this.emit(t);else if(e===o)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=F,this.mode=B;else if(e===c)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=U,this.state=k;else if(e===s){if(this.mode!==B)return this.parseError(e,t);this.pop()}else{if(e!==u)return this.parseError(e,t);if(this.mode!==U)return this.parseError(e,t);this.pop()}else if(this.state===F)if(e===y)this.key=t,this.state=l;else{if(e!==s)return this.parseError(e,t);this.pop()}else if(this.state===l){if(e!==l)return this.parseError(e,t);this.state=k}else{if(this.state!==d)return this.parseError(e,t);if(e===d)this.mode===U?(this.key++,this.state=k):this.mode===B&&(this.state=F);else{if(!(e===u&&this.mode===U||e===s&&this.mode===B))return this.parseError(e,t);this.pop()}}},W.numberReviver=function(e){var t=Number(e);if(isNaN(t))return this.charError(buffer,i);e.match(/[0-9]+/)==e&&t.toString()!=e?this.onToken(y,e):this.onToken(g,t)},J.C=a,e.exports=J},64265:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fragment=void 0,t.fragment=function(e){let t=function(e){let t=e;(t.endsWith("/")||t.endsWith("#"))&&(t=t.slice(0,t.length-1));const r=[];t.lastIndexOf("/")>0&&r.push(t.lastIndexOf("/")),t.lastIndexOf("#")>0&&r.push(t.lastIndexOf("#"));const n=Math.max(...r);return t.slice(n+1)}(e);return t=t?function(e){var t;const r=null===(t=e.split(/[^a-z0-9]+/gi).filter((e=>""!==e)).map((e=>e[0].toUpperCase()+e.slice(1))).join("").match(/[a-z][a-z0-9]+/gi))||void 0===t?void 0:t[0];return void 0===r?void 0:r[0].toLowerCase()+r.slice(1)}(t):void 0,t||"v"}},37669:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupAllPrefixes=t.prefixToUri=t.uriToPrefix=void 0;const i=r(64265),a=r(30376);t.uriToPrefix=function(e,t){return n(this,void 0,void 0,(function*(){let r;try{r=yield(0,a.lookupPrefix)(e,t)}catch(n){(null==t?void 0:t.mintOnUnknown)&&(r=(0,i.fragment)(e).slice(0,4))}if(void 0!==r&&"object"==typeof(null==t?void 0:t.existingPrefixes)&&r in t.existingPrefixes){let e=0;for(;`${r}${e}`in t.existingPrefixes;)e+=1;r=`${r}${e}`}return r}))},t.prefixToUri=function(e,t){return n(this,void 0,void 0,(function*(){try{return yield(0,a.lookupUri)(e,t)}catch(e){return}}))};var o=r(30376);Object.defineProperty(t,"lookupAllPrefixes",{enumerable:!0,get:function(){return o.lookupAllPrefixes}})},87173:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchContext=t.fetchJson=void 0;const i=r(99766);function a(e,t){var r;return n(this,void 0,void 0,(function*(){const n=null!==(r=null==t?void 0:t.fetch)&&void 0!==r?r:i.fetch;return(yield n(e)).json()}))}t.fetchJson=a,t.fetchContext=function(e,t){return n(this,void 0,void 0,(function*(){return(yield a(e,t))["@context"]}))}},30376:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(12257),t),i(r(39268),t),i(r(91661),t)},91661:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupAllPrefixes=void 0;const i=r(87173);t.lookupAllPrefixes=function(e){return n(this,void 0,void 0,(function*(){return(0,i.fetchContext)("https://prefix.cc/context",e)}))}},12257:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupUri=void 0;const i=r(87173);t.lookupUri=function(e,t){return n(this,void 0,void 0,(function*(){const r=(yield(0,i.fetchContext)(`https://prefix.cc/${e}.file.jsonld`,t))[e];if("string"!=typeof r)throw new Error(`Expected uri to be a string, received: ${r} of type ${typeof r}`);return r}))}},39268:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupPrefix=void 0;const i=r(87173);t.lookupPrefix=function(e,t){return n(this,void 0,void 0,(function*(){const r=new URL("https://prefix.cc/reverse");r.searchParams.append("uri",e),r.searchParams.append("format","jsonld");const n=Object.keys(yield(0,i.fetchContext)(r,t));if(0===n.length)throw new Error("No prefixes returned");return n[0]}))}},99766:function(e,t){var r="undefined"!=typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var r="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in e,o="ArrayBuffer"in e;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=f(t);return t.readAsArrayBuffer(e),r}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,r,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var T=[301,302,303,307,308];w.redirect=function(e,t){if(-1===T.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,r){return new Promise((function(n,a){var o=new v(e,r);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new w(i,r))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=h,e.Request=v,e.Response=w),t.Headers=h,t.Request=v,t.Response=w,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},49126:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SaxesParser=t.EVENTS=void 0;const n=r(94824),i=r(30718),a=r(26457);var o=n.isS,s=n.isChar,c=n.isNameStartChar,u=n.isNameChar,l=n.S_LIST,d=n.NAME_RE,h=i.isChar,p=a.isNCNameStartChar,f=a.isNCNameChar,y=a.NC_NAME_RE;const g="http://www.w3.org/XML/1998/namespace",m="http://www.w3.org/2000/xmlns/",b={__proto__:null,xml:g,xmlns:m},v={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},_=-1,w=-2,T=13,S=33,O=10,E=60,x=61,A=62,R=63,I=93,P=e=>34===e||39===e,N=[34,39],D=[...N,91,A],j=[...N,E,I],C=[x,R,...l],M=[...l,A,38,E];function L(e,t,r){switch(t){case"xml":r!==g&&e.fail(`xml prefix must be bound to ${g}.`);break;case"xmlns":r!==m&&e.fail(`xmlns prefix must be bound to ${m}.`)}switch(r){case m:e.fail(""===t?`the default namespace may not be set to ${r}.`:`may not assign a prefix (even "xmlns") to the URI ${m}.`);break;case g:switch(t){case"xml":break;case"":e.fail(`the default namespace may not be set to ${r}.`);break;default:e.fail("may not assign the xml namespace to another prefix.")}}}const k=e=>y.test(e),F=e=>d.test(e);t.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const B={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};t.SaxesParser=class{get closed(){return this._closed}constructor(e){this.opt=null!=e?e:{},this.fragmentOpt=!!this.opt.fragment;const t=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,t){this.nameStartCheck=p,this.nameCheck=f,this.isName=k,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},b);const e=this.opt.additionalNamespaces;null!=e&&(function(e,t){for(const r of Object.keys(t))L(e,r,t[r])}(this,e),Object.assign(this.ns,e))}else this.nameStartCheck=c,this.nameCheck=u,this.isName=F,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}_init(){var e;this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:t}=this;this.state=t?T:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:r}=this.opt;if(void 0===r){if(!0===this.opt.forceXMLVersion)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");r="1.0"}this.setXMLVersion(r),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(v),null===(e=this.readyHandler)||void 0===e||e.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(e,t){this[B[e]]=t}off(e){this[B[e]]=void 0}makeError(e){var t;let r=null!==(t=this.fileName)&&void 0!==t?t:"";return this.trackPosition&&(r.length>0&&(r+=":"),r+=`${this.line}:${this.column}`),r.length>0&&(r+=": "),new Error(r+e)}fail(e){const t=this.makeError(e),r=this.errorHandler;if(void 0===r)throw t;return r(t),this}write(e){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let t=!1;null===e?(t=!0,e=""):"object"==typeof e&&(e=e.toString()),void 0!==this.carriedFromPrevious&&(e=`${this.carriedFromPrevious}${e}`,this.carriedFromPrevious=void 0);let r=e.length;const n=e.charCodeAt(r-1);!t&&(13===n||n>=55296&&n<=56319)&&(this.carriedFromPrevious=e[r-1],r--,e=e.slice(0,r));const{stateTable:i}=this;for(this.chunk=e,this.i=0;this.i=e.length)return _;const r=e.charCodeAt(t);if(this.column++,r<55296){if(r>=32||9===r)return r;switch(r){case O:return this.line++,this.column=0,this.positionAtNewLine=this.position,O;case 13:return e.charCodeAt(t+1)===O&&(this.i=t+2),this.line++,this.column=0,this.positionAtNewLine=this.position,w;default:return this.fail("disallowed character."),r}}if(r>56319)return r>=57344&&r<=65533||this.fail("disallowed character."),r;const n=65536+1024*(r-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,n>1114111&&this.fail("disallowed character."),n}getCode11(){const{chunk:e,i:t}=this;if(this.prevI=t,this.i=t+1,t>=e.length)return _;const r=e.charCodeAt(t);if(this.column++,r<55296){if(r>31&&r<127||r>159&&8232!==r||9===r)return r;switch(r){case O:return this.line++,this.column=0,this.positionAtNewLine=this.position,O;case 13:{const r=e.charCodeAt(t+1);r!==O&&133!==r||(this.i=t+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,w;default:return this.fail("disallowed character."),r}}if(r>56319)return r>=57344&&r<=65533||this.fail("disallowed character."),r;const n=65536+1024*(r-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,n>1114111&&this.fail("disallowed character."),n}getCodeNorm(){const e=this.getCode();return e===w?O:e}unget(){this.i=this.prevI,this.column--}captureTo(e){let{i:t}=this;const{chunk:r}=this;for(;;){const n=this.getCode(),i=n===w,a=i?O:n;if(a===_||e.includes(a))return this.text+=r.slice(t,this.prevI),a;i&&(this.text+=`${r.slice(t,this.prevI)}\n`,t=this.i)}}captureToChar(e){let{i:t}=this;const{chunk:r}=this;for(;;){let n=this.getCode();switch(n){case w:this.text+=`${r.slice(t,this.prevI)}\n`,t=this.i,n=O;break;case _:return this.text+=r.slice(t),!1}if(n===e)return this.text+=r.slice(t,this.prevI),!0}}captureNameChars(){const{chunk:e,i:t}=this;for(;;){const r=this.getCode();if(r===_)return this.name+=e.slice(t),_;if(!u(r))return this.name+=e.slice(t,this.prevI),r===w?O:r}}skipSpaces(){for(;;){const e=this.getCodeNorm();if(e===_||!o(e))return e}}setXMLVersion(e){this.currentXMLVersion=e,"1.0"===e?(this.isChar=s,this.getCode=this.getCode10):(this.isChar=h,this.getCode=this.getCode11)}sBegin(){65279===this.chunk.charCodeAt(0)&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const e=this.i,t=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),t){case E:if(this.state=15,0!==this.text.length)throw new Error("no-empty text at start");break;case _:break;default:this.unget(),this.state=T,this.xmlDeclPossible=!1}}sDoctype(){var e;const t=this.captureTo(D);switch(t){case A:null===(e=this.doctypeHandler)||void 0===e||e.call(this,this.text),this.text="",this.state=T,this.doctype=!0;break;case _:break;default:this.text+=String.fromCodePoint(t),91===t?this.state=4:P(t)&&(this.state=3,this.q=t)}}sDoctypeQuote(){const e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=2)}sDTD(){const e=this.captureTo(j);e!==_&&(this.text+=String.fromCodePoint(e),e===I?this.state=2:e===E?this.state=6:P(e)&&(this.state=5,this.q=e))}sDTDQuoted(){const e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=4,this.q=null)}sDTDOpenWaka(){const e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case 33:this.state=7,this.openWakaBang="";break;case R:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const e=String.fromCodePoint(this.getCodeNorm()),t=this.openWakaBang+=e;this.text+=e,"-"!==t&&(this.state="--"===t?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=45===e?10:8}sDTDCommentEnded(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===A?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(R)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===A&&(this.state=4)}sText(){0!==this.tags.length?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:e}=this;const{chunk:t}=this;e:for(;;)switch(this.getCode()){case w:this.entity+=`${t.slice(e,this.prevI)}\n`,e=this.i;break;case 59:{const{entityReturnState:r}=this,n=this.entity+t.slice(e,this.prevI);let i;this.state=r,""===n?(this.fail("empty entity name."),i="&;"):(i=this.parseEntity(n),this.entity=""),r===T&&void 0===this.textHandler||(this.text+=i);break e}case _:this.entity+=t.slice(e);break e}}sOpenWaka(){const e=this.getCode();if(c(e))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(e){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case R:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=T,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){var e;const t=this.getCodeNorm();45===t?(this.state=19,null===(e=this.commentHandler)||void 0===e||e.call(this,this.text),this.text=""):(this.text+=`-${String.fromCodePoint(t)}`,this.state=17)}sCommentEnded(){const e=this.getCodeNorm();e!==A?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(e)}`,this.state=17):this.state=T}sCData(){this.captureToChar(I)&&(this.state=21)}sCDataEnding(){const e=this.getCodeNorm();e===I?this.state=22:(this.text+=`]${String.fromCodePoint(e)}`,this.state=20)}sCDataEnding2(){var e;const t=this.getCodeNorm();switch(t){case A:null===(e=this.cdataHandler)||void 0===e||e.call(this,this.text),this.text="",this.state=T;break;case I:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(t)}`,this.state=20}}sPIFirstChar(){const e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=24):e===R||o(e)?(this.fail("processing instruction without a target."),this.state=e===R?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(e),this.state=24)}sPIRest(){const{chunk:e,i:t}=this;for(;;){const r=this.getCodeNorm();if(r===_)return void(this.piTarget+=e.slice(t));if(!this.nameCheck(r)){this.piTarget+=e.slice(t,this.prevI);const n=r===R;n||o(r)?"xml"===this.piTarget?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=n?S:27):this.state=n?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(r));break}}}sPIBody(){if(0===this.text.length){const e=this.getCodeNorm();e===R?this.state=26:o(e)||(this.text=String.fromCodePoint(e))}else this.captureToChar(R)&&(this.state=26)}sPIEnding(){var e;const t=this.getCodeNorm();if(t===A){const{piTarget:t}=this;"xml"===t.toLowerCase()&&this.fail("the XML declaration must appear at the start of the document."),null===(e=this.piHandler)||void 0===e||e.call(this,{target:t,body:this.text}),this.piTarget=this.text="",this.state=T}else t===R?this.text+="?":(this.text+=`?${String.fromCodePoint(t)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const e=this.skipSpaces();e!==R?e!==_&&(this.state=28,this.name=String.fromCodePoint(e)):this.state=S}sXMLDeclName(){const e=this.captureTo(C);if(e===R)return this.state=S,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(o(e)||e===x){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=e===x?30:29}}sXMLDeclEq(){const e=this.getCodeNorm();if(e===R)return this.state=S,void this.fail("XML declaration is incomplete.");o(e)||(e!==x&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const e=this.getCodeNorm();if(e===R)return this.state=S,void this.fail("XML declaration is incomplete.");o(e)||(P(e)?this.q=e:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const e=this.captureTo([this.q,R]);if(e===R)return this.state=S,this.text="",void this.fail("XML declaration is incomplete.");if(e===_)return;const t=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const e=t;this.xmlDecl.version=e,/^1\.[0-9]+$/.test(e)?this.opt.forceXMLVersion||this.setXMLVersion(e):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(t)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=t;break;case"standalone":"yes"!==t&&"no"!==t&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=t}this.name="",this.state=32}sXMLDeclSeparator(){const e=this.getCodeNorm();e!==R?(o(e)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=S}sXMLDeclEnding(){var e;this.getCodeNorm()===A?("xml"!==this.piTarget?this.fail("processing instructions are not allowed before root."):"version"!==this.name&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),null===(e=this.xmldeclHandler)||void 0===e||e.call(this,this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=T):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){var e;const t=this.captureNameChars();if(t===_)return;const r=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=r.ns=Object.create(null)),null===(e=this.openTagStartHandler)||void 0===e||e.call(this,r),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case A:this.openTag();break;case 47:this.state=35;break;default:o(t)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===A?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const e=this.skipSpaces();e!==_&&(c(e)?(this.unget(),this.state=37):e===A?this.openTag():47===e?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const e=this.captureNameChars();e===x?this.state=39:o(e)?this.state=38:e===A?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):e!==_&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const e=this.skipSpaces();switch(e){case _:return;case x:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",e===A?this.openTag():c(e)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const e=this.getCodeNorm();P(e)?(this.q=e,this.state=40):o(e)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:e,chunk:t}=this;let{i:r}=this;for(;;)switch(this.getCode()){case e:return this.pushAttrib(this.name,this.text+t.slice(r,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=t.slice(r,this.prevI),this.state=14,void(this.entityReturnState=40);case O:case w:case 9:this.text+=`${t.slice(r,this.prevI)} `,r=this.i;break;case E:return this.text+=t.slice(r,this.prevI),void this.fail("disallowed character.");case _:return void(this.text+=t.slice(r))}}sAttribValueClosed(){const e=this.getCodeNorm();o(e)?this.state=36:e===A?this.openTag():47===e?this.state=35:c(e)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const e=this.captureTo(M);switch(e){case 38:this.state=14,this.entityReturnState=42;break;case E:this.fail("disallowed character.");break;case _:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",e===A?this.openTag():this.state=36}}sCloseTag(){const e=this.captureNameChars();e===A?this.closeTag():o(e)?this.state=44:e!==_&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case A:this.closeTag();break;case _:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:e,forbiddenState:t}=this;const{chunk:r,textHandler:n}=this;e:for(;;)switch(this.getCode()){case E:if(this.state=15,void 0!==n){const{text:t}=this,i=r.slice(e,this.prevI);0!==t.length?(n(t+i),this.text=""):0!==i.length&&n(i)}t=0;break e;case 38:this.state=14,this.entityReturnState=T,void 0!==n&&(this.text+=r.slice(e,this.prevI)),t=0;break e;case I:switch(t){case 0:t=1;break;case 1:t=2;break;case 2:break;default:throw new Error("impossible state")}break;case A:2===t&&this.fail('the string "]]>" is disallowed in char data.'),t=0;break;case w:void 0!==n&&(this.text+=`${r.slice(e,this.prevI)}\n`),e=this.i,t=0;break;case _:void 0!==n&&(this.text+=r.slice(e));break e;default:t=0}this.forbiddenState=t}handleTextOutsideRoot(){let{i:e}=this;const{chunk:t,textHandler:r}=this;let n=!1;e:for(;;){const i=this.getCode();switch(i){case E:if(this.state=15,void 0!==r){const{text:n}=this,i=t.slice(e,this.prevI);0!==n.length?(r(n+i),this.text=""):0!==i.length&&r(i)}break e;case 38:this.state=14,this.entityReturnState=T,void 0!==r&&(this.text+=t.slice(e,this.prevI)),n=!0;break e;case w:void 0!==r&&(this.text+=`${t.slice(e,this.prevI)}\n`),e=this.i;break;case _:void 0!==r&&(this.text+=t.slice(e));break e;default:o(i)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(e,t){var r;const{prefix:n,local:i}=this.qname(e),a={name:e,prefix:n,local:i,value:t};if(this.attribList.push(a),null===(r=this.attributeHandler)||void 0===r||r.call(this,a),"xmlns"===n){const e=t.trim();"1.0"===this.currentXMLVersion&&""===e&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[i]=e,L(this,i,e)}else if("xmlns"===e){const e=t.trim();this.topNS[""]=e,L(this,"",e)}}pushAttribPlain(e,t){var r;const n={name:e,value:t};this.attribList.push(n),null===(r=this.attributeHandler)||void 0===r||r.call(this,n)}end(){var e,t;this.sawRoot||this.fail("document must contain a root element.");const{tags:r}=this;for(;r.length>0;){const e=r.pop();this.fail(`unclosed tag: ${e.name}`)}0!==this.state&&this.state!==T&&this.fail("unexpected end.");const{text:n}=this;return 0!==n.length&&(null===(e=this.textHandler)||void 0===e||e.call(this,n),this.text=""),this._closed=!0,null===(t=this.endHandler)||void 0===t||t.call(this),this._init(),this}resolve(e){var t,r;let n=this.topNS[e];if(void 0!==n)return n;const{tags:i}=this;for(let t=i.length-1;t>=0;t--)if(n=i[t].ns[e],void 0!==n)return n;return n=this.ns[e],void 0!==n?n:null===(r=(t=this.opt).resolvePrefix)||void 0===r?void 0:r.call(t,e)}qname(e){const t=e.indexOf(":");if(-1===t)return{prefix:"",local:e};const r=e.slice(t+1),n=e.slice(0,t);return(""===n||""===r||r.includes(":"))&&this.fail(`malformed name: ${e}.`),{prefix:n,local:r}}processAttribsNS(){var e;const{attribList:t}=this,r=this.tag;{const{prefix:t,local:n}=this.qname(r.name);r.prefix=t,r.local=n;const i=r.uri=null!==(e=this.resolve(t))&&void 0!==e?e:"";""!==t&&("xmlns"===t&&this.fail('tags may not have "xmlns" as prefix.'),""===i&&(this.fail(`unbound namespace prefix: ${JSON.stringify(t)}.`),r.uri=t))}if(0===t.length)return;const{attributes:n}=r,i=new Set;for(const e of t){const{name:t,prefix:r,local:a}=e;let o,s;""===r?(o="xmlns"===t?m:"",s=t):(o=this.resolve(r),void 0===o&&(this.fail(`unbound namespace prefix: ${JSON.stringify(r)}.`),o=r),s=`{${o}}${a}`),i.has(s)&&this.fail(`duplicate attribute: ${s}.`),i.add(s),e.uri=o,n[t]=e}this.attribList=[]}processAttribsPlain(){const{attribList:e}=this,t=this.tag.attributes;for(const{name:r,value:n}of e)void 0!==t[r]&&this.fail(`duplicate attribute: ${r}.`),t[r]=n;this.attribList=[]}openTag(){var e;this.processAttribs();const{tags:t}=this,r=this.tag;r.isSelfClosing=!1,null===(e=this.openTagHandler)||void 0===e||e.call(this,r),t.push(r),this.state=T,this.name=""}openSelfClosingTag(){var e,t,r;this.processAttribs();const{tags:n}=this,i=this.tag;i.isSelfClosing=!0,null===(e=this.openTagHandler)||void 0===e||e.call(this,i),null===(t=this.closeTagHandler)||void 0===t||t.call(this,i),null===(this.tag=null!==(r=n[n.length-1])&&void 0!==r?r:null)&&(this.closedRoot=!0),this.state=T,this.name=""}closeTag(){const{tags:e,name:t}=this;if(this.state=T,this.name="",""===t)return this.fail("weird empty close tag."),void(this.text+="");const r=this.closeTagHandler;let n=e.length;for(;n-- >0;){const n=this.tag=e.pop();if(this.topNS=n.ns,null==r||r(n),n.name===t)break;this.fail("unexpected close tag.")}0===n?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${t}.`),this.text+=``)}parseEntity(e){if("#"!==e[0]){const t=this.ENTITIES[e];return void 0!==t?t:(this.fail(this.isName(e)?"undefined entity.":"disallowed character in entity name."),`&${e};`)}let t=NaN;return"x"===e[1]&&/^#x[0-9a-f]+$/i.test(e)?t=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(t=parseInt(e.slice(1),10)),this.isChar(t)?String.fromCodePoint(t):(this.fail("malformed character entity."),`&${e};`)}}},52267:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableWebToNodeStream=void 0;const n=r(58521);class i extends n.Readable{constructor(e){super(),this.bytesRead=0,this.released=!1,this.reader=e.getReader()}async _read(){if(this.released)return void this.push(null);this.pendingRead=this.reader.read();const e=await this.pendingRead;delete this.pendingRead,e.done||this.released?this.push(null):(this.bytesRead+=e.value.length,this.push(e.value))}async waitForReadToComplete(){this.pendingRead&&await this.pendingRead}async close(){await this.syncAndRelease()}async syncAndRelease(){this.released=!0,await this.waitForReadToComplete(),await this.reader.releaseLock()}}t.ReadableWebToNodeStream=i},67083:e=>{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},37754:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[];return r=e.on("data",(e=>t.push(e))),n=t,new Promise(((e,t)=>{r.on("end",(()=>e(n))),r.on("error",t)}));var r,n}},2922:(e,t,r)=>{const n=r(82815),i=r(30979),a=r(67458),o=r(21156),s=r(37841);e.exports={DynamicNestedLoopJoin:n,HashJoin:i,NestedLoopJoin:a,SymmetricHashJoin:o,MergeStream:s}},82815:(e,t,r)=>{let n=r(76664),i=n.MultiTransformIterator,a=n.SimpleTransformIterator;e.exports=class extends i{constructor(e,t,r,n){super(e,n),this.funRight=t,this.funJoin=r}_createTransformer(e){return new a(this.funRight(e),{transform:(t,r,n)=>{let i=this.funJoin(e,t);null!==i&&n(i),r()}})}}},30979:(e,t,r)=>{let n=r(76664).AsyncIterator;e.exports=class extends n{constructor(e,t,r,n){super(),this.addedDataListener=!1,this.left=e,this.right=t,this.funHash=r,this.funJoin=n,this.leftMap=new Map,this.match=null,this.matches=[],this.matchIdx=0,this.left.on("error",(e=>this.destroy(e))),this.right.on("error",(e=>this.destroy(e))),this.readable=!1,this.left.on("end",function(){this.readable=!0,this.right.on("readable",(()=>this.readable=!0)),this.right.on("end",(()=>{this.hasResults()||this._end()}))}.bind(this)),this.on("newListener",(e=>{"data"===e&&this._addDataListenerIfNeeded()})),this.left.readable&&this._addDataListenerIfNeeded(),this.left.on("readable",(()=>this._addDataListenerIfNeeded()))}hasResults(){return!this.right.ended||this.matchIdx{const{MultiTransformIterator:n,SimpleTransformIterator:i,scheduleTask:a}=r(76664);e.exports=class extends n{constructor(e,t,r,n){super(e,n),this.right=t,this.funJoin=r,this.on("end",(()=>this.right.close()))}_end(){super._end(),a((()=>this.right.destroy()))}_createTransformer(e){return new i(this.right.clone(),{transform:(t,r,n)=>{let i=this.funJoin(e,t);null!==i&&n(i),r()}})}}},21156:(e,t,r)=>{let n=r(76664).AsyncIterator;e.exports=class extends n{constructor(e,t,r,n){super(),this.left=e,this.right=t,this.funHash=r,this.funJoin=n,this.usedLeft=!1,this.leftMap=new Map,this.rightMap=new Map,this.on("end",(()=>this._cleanup())),this.match=null,this.matches=[],this.matchIdx=0,(this.left.readable||this.right.readable)&&(this.readable=!0),this.left.on("error",(e=>this.destroy(e))),this.right.on("error",(e=>this.destroy(e))),this.left.on("readable",(()=>this.readable=!0)),this.right.on("readable",(()=>this.readable=!0)),this.left.on("end",(()=>{this.hasResults()||this._end()})),this.right.on("end",(()=>{this.hasResults()||this._end()}))}hasResults(){return!this.left.ended||!this.right.ended||!!this.matches&&this.matchIdx{let n=r(76664).AsyncIterator;e.exports=class extends n{constructor(e){super(),Array.isArray(e)||(e=Array.prototype.slice.call(arguments)),this.streams=e;for(let t of e)t.on("readable",(()=>this.emit("readable"))),t.on("end",(()=>this._removeStream(t)));0===this.streams.length&&this.close(),this.idx=this.streams.length-1}_removeStream(e){let t=this.streams.indexOf(e);t<0||(this.streams.splice(t,1),this.idx>=this.streams.length&&--this.idx,0===this.streams.length&&this._end())}close(){super.close();for(let e of this.streams)e.close()}read(){for(let e=0;e{e.exports=function(e){const t=new(r(5868).LoggerVoid),n=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-init/^3.0.0/components/ActorInit.jsonld#ActorInit_default_bus"}),i=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-context-preprocess/^3.0.0/components/ActorContextPreprocess.jsonld#ActorContextPreprocess_default_bus"}),a=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-hash-bindings/^3.0.0/components/ActorHashBindings.jsonld#ActorHashBindings_default_bus"}),o=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-optimize-query-operation/^3.0.0/components/ActorOptimizeQueryOperation.jsonld#ActorOptimizeQueryOperation_default_bus"}),s=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-parse/^3.0.0/components/ActorQueryParse.jsonld#ActorQueryParse_default_bus"}),c=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-result-serialize/^3.0.0/components/ActorQueryResultSerialize.jsonld#ActorQueryResultSerialize_default_bus"}),u=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-source-identify-hypermedia/^3.0.0/components/ActorQuerySourceIdentifyHypermedia.jsonld#ActorQuerySourceIdentifyHypermedia_default_bus"}),l=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^3.0.0/components/ActorDereference.jsonld#ActorDereference_default_bus"}),d=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference-rdf/^3.0.0/components/ActorDereferenceRdf.jsonld#ActorDereferenceRdf_default_bus"}),h=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-entries-sort/^3.0.0/components/ActorRdfJoinEntriesSort.jsonld#ActorRdfJoinEntriesSort_default_bus"}),p=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-selectivity/^3.0.0/components/ActorRdfJoinSelectivity.jsonld#ActorRdfJoinSelectivity_default_bus"}),f=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata/^3.0.0/components/ActorRdfMetadata.jsonld#ActorRdfMetadata_default_bus"}),y=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata-accumulate/^3.0.0/components/ActorRdfMetadataAccumulate.jsonld#ActorRdfMetadataAccumulate_default_bus"}),g=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata-extract/^3.0.0/components/ActorRdfMetadataExtract.jsonld#ActorRdfMetadataExtract_default_bus"}),m=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-parse/^3.0.0/components/ActorRdfParse.jsonld#ActorRdfParse_default_bus"}),b=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-parse-html/^3.0.0/components/ActorRdfParseHtml.jsonld#ActorRdfParseHtml_default_bus"}),v=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia-links/^3.0.0/components/ActorRdfResolveHypermediaLinks.jsonld#ActorRdfResolveHypermediaLinks_default_bus"}),_=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia-links-queue/^3.0.0/components/ActorRdfResolveHypermediaLinksQueue.jsonld#ActorRdfResolveHypermediaLinksQueue_default_bus"}),w=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-serialize/^3.0.0/components/ActorRdfSerialize.jsonld#ActorRdfSerialize_default_bus"}),T=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-hypermedia/^3.0.0/components/ActorRdfUpdateHypermedia.jsonld#ActorRdfUpdateHypermedia_default_bus"}),S=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-quads/^3.0.0/components/ActorRdfUpdateQuads.jsonld#ActorRdfUpdateQuads_default_bus"}),O=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^3.0.0/components/ActorHttp.jsonld#ActorHttp_default_bus"}),E=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^3.0.0/components/ActorHttp.jsonld#ActorHttp_fallback_bus"}),x=new(r(59510).BusQueryOperation)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^3.0.0/components/ActorQueryOperation.jsonld#ActorQueryOperation_default_bus"}),A=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-process/^3.0.0/components/ActorQueryProcess.jsonld#ActorQueryProcess_default_bus"}),R=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-source-identify/^3.0.0/components/ActorQuerySourceIdentify.jsonld#ActorQuerySourceIdentify_default_bus"}),I=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^3.0.0/components/ActorRdfJoin.jsonld#ActorRdfJoin_default_bus"}),P=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http-invalidate/^3.0.0/components/ActorHttpInvalidate.jsonld#ActorHttpInvalidate_default_bus"}),N=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-merge-bindings-context/^3.0.0/components/ActorMergeBindingsContext.jsonld#ActorMergeBindingsContext_default_bus"}),D=(new(r(36251).ActorContextPreprocessConvertShortcuts)({contextKeyShortcuts:{baseIRI:"@comunica/actor-init-query:baseIRI",datetime:"@comunica/actor-http-memento:datetime",destination:"@comunica/bus-rdf-update-quads:destination",explain:"@comunica/actor-init-query:explain",extensionFunctionCreator:"@comunica/actor-init-query:extensionFunctionCreator",extensionFunctions:"@comunica/actor-init-query:extensionFunctions",fetch:"@comunica/bus-http:fetch",functionArgumentsCache:"@comunica/actor-init-query:functionArgumentsCache",httpAuth:"@comunica/bus-http:auth",httpBodyTimeout:"@comunica/bus-http:http-body-timeout",httpIncludeCredentials:"@comunica/bus-http:include-credentials",httpProxyHandler:"@comunica/actor-http-proxy:httpProxyHandler",httpRetryCount:"@comunica/bus-http:http-retry-count",httpRetryDelay:"@comunica/bus-http:http-retry-delay",httpRetryOnServerError:"@comunica/bus-http:http-retry-on-server-error",httpTimeout:"@comunica/bus-http:http-timeout",initialBindings:"@comunica/actor-init-query:initialBindings",lenient:"@comunica/actor-init-query:lenient",log:"@comunica/core:log",noCache:"@comunica/actor-init-query:noCache",queryFormat:"@comunica/actor-init-query:queryFormat",queryTimestamp:"@comunica/actor-init-query:queryTimestamp",readOnly:"@comunica/bus-query-operation:readOnly",recoverBrokenLinks:"@comunica/bus-http-wayback:recover-broken-links",sources:"@comunica/actor-init-query:querySourcesUnidentified",traverse:"@comunica/bus-query-source-identify:traverse",unionDefaultGraph:"@comunica/bus-query-operation:unionDefaultGraph"},name:"urn:comunica:default:context-preprocess/actors#convert-shortcuts",bus:i}),new(r(35451).ActorContextPreprocessSetDefaults)({logger:t,name:"urn:comunica:default:context-preprocess/actors#set-defaults",bus:i}),new(r(41670).ActorContextPreprocessSourceToDestination)({name:"urn:comunica:default:context-preprocess/actors#source-to-destination",bus:i}),new(r(35106).ActorContextPreprocessQuerySourceSkolemize)({name:"urn:comunica:default:context-preprocess/actors#query-source-skolemize",bus:i})),j=new(r(30827).MediatorCombinePipeline)({name:"urn:comunica:default:context-preprocess/mediators#main",bus:i}),C=(new(r(11150).ActorHashBindingsSha1)({name:"urn:comunica:default:hash-bindings/actors#sha1",bus:a}),new(r(25896).MediatorRace)({name:"urn:comunica:default:hash-bindings/mediators#main",bus:a})),M=(new(r(15718).ActorOptimizeQueryOperationRewriteCopy)({name:"urn:comunica:default:optimize-query-operation/actors#rewrite-copy",bus:o}),new(r(83910).ActorOptimizeQueryOperationRewriteMove)({name:"urn:comunica:default:optimize-query-operation/actors#rewrite-move",bus:o}),new(r(63514).ActorOptimizeQueryOperationRewriteAdd)({name:"urn:comunica:default:optimize-query-operation/actors#rewrite-add",bus:o}),new(r(78992).ActorOptimizeQueryOperationGroupSources)({name:"urn:comunica:default:optimize-query-operation/actors#group-sources",bus:o})),L=new(r(30827).MediatorCombinePipeline)({filterErrors:!0,name:"urn:comunica:default:optimize-query-operation/mediators#main",bus:o}),k=(new(r(4911).ActorQueryParseSparql)({prefixes:{dbpedia:"http://dbpedia.org/resource/","dbpedia-owl":"http://dbpedia.org/ontology/",dbpprop:"http://dbpedia.org/property/",dc:"http://purl.org/dc/terms/",dc11:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",foaf:"http://xmlns.com/foaf/0.1/",geo:"http://www.w3.org/2003/01/geo/wgs84_pos#",owl:"http://www.w3.org/2002/07/owl#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",schema:"http://schema.org/",skos:"http://www.w3.org/2008/05/skos#",xsd:"http://www.w3.org/2001/XMLSchema#"},name:"urn:comunica:default:query-parse/actors#sparql",bus:s}),new(r(37067).ActorQueryParseGraphql)({name:"urn:comunica:default:query-parse/actors#graphql",bus:s}),new(r(25896).MediatorRace)({name:"urn:comunica:default:query-parse/mediators#main",bus:s})),F=(new(r(91875).ActorQueryResultSerializeJson)({mediaTypePriorities:{"application/json":1},mediaTypeFormats:{"application/json":"https://comunica.linkeddatafragments.org/#results_JSON"},name:"urn:comunica:default:query-result-serialize/actors#json",bus:c}),new(r(96791).ActorQueryResultSerializeSimple)({mediaTypePriorities:{simple:.9},mediaTypeFormats:{simple:"https://comunica.linkeddatafragments.org/#results_simple"},name:"urn:comunica:default:query-result-serialize/actors#simple",bus:c}),new(r(34357).ActorQueryResultSerializeSparqlCsv)({mediaTypePriorities:{"text/csv":.75},mediaTypeFormats:{"text/csv":"http://www.w3.org/ns/formats/SPARQL_Results_CSV"},name:"urn:comunica:default:query-result-serialize/actors#csv",bus:c}),new(r(78432).ActorQueryResultSerializeSparqlTsv)({mediaTypePriorities:{"text/tab-separated-values":.75},mediaTypeFormats:{"text/tab-separated-values":"http://www.w3.org/ns/formats/SPARQL_Results_TSV"},name:"urn:comunica:default:query-result-serialize/actors#sparql-tsv",bus:c}),new(r(68596).ActorQueryResultSerializeSparqlXml)({mediaTypePriorities:{"application/sparql-results+xml":.8},mediaTypeFormats:{"application/sparql-results+xml":"http://www.w3.org/ns/formats/SPARQL_Results_XML"},name:"urn:comunica:default:query-result-serialize/actors#sparql-xml",bus:c}),new(r(59655).ActorQueryResultSerializeTable)({columnWidth:50,mediaTypePriorities:{table:.6},mediaTypeFormats:{table:"https://comunica.linkeddatafragments.org/#results_table"},name:"urn:comunica:default:query-result-serialize/actors#table",bus:c}),new(r(70017).ActorQueryResultSerializeTree)({mediaTypePriorities:{tree:.5},mediaTypeFormats:{tree:"https://comunica.linkeddatafragments.org/#results_tree"},name:"urn:comunica:default:query-result-serialize/actors#tree",bus:c}),new(r(25896).MediatorRace)({name:"urn:comunica:default:query-result-serialize/mediators#serialize",bus:c})),B=new(r(75884).MediatorCombineUnion)({field:"mediaTypes",name:"urn:comunica:default:query-result-serialize/mediators#mediaType",bus:c}),U=new(r(75884).MediatorCombineUnion)({field:"mediaTypeFormats",name:"urn:comunica:default:query-result-serialize/mediators#mediaTypeFormat",bus:c}),q=new(r(99104).MediatorNumber)({field:"filterFactor",type:"max",ignoreErrors:!0,name:"urn:comunica:default:query-source-identify-hypermedia/mediators#main",bus:u}),V=new(r(35878).ActorDereferenceFallback)({name:"urn:comunica:default:dereference/actors#fallback",bus:l}),Q=new(r(25896).MediatorRace)({name:"urn:comunica:default:dereference/mediators#main",bus:l}),$=new(r(25896).MediatorRace)({name:"urn:comunica:default:dereference-rdf/mediators#main",bus:d}),H=(new(r(36545).ActorRdfJoinEntriesSortCardinality)({name:"urn:comunica:default:rdf-join-entries-sort/actors#cardinality",bus:h}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-join-entries-sort/mediators#main",bus:h})),G=(new(r(16703).ActorRdfJoinSelectivityVariableCounting)({name:"urn:comunica:default:rdf-join-selectivity/actors#variable-counting",bus:p}),new(r(99104).MediatorNumber)({field:"accuracy",type:"max",ignoreErrors:!0,name:"urn:comunica:default:rdf-join-selectivity/mediators#main",bus:p})),z=(new(r(80848).ActorRdfMetadataPrimaryTopic)({metadataToData:!1,dataToMetadataOnInvalidMetadataGraph:!0,name:"urn:comunica:default:rdf-metadata/actors#primary-topic",bus:f}),new(r(64443).ActorRdfMetadataAll)({name:"urn:comunica:default:rdf-metadata/actors#all",bus:f}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-metadata/mediators#main",bus:f})),K=(new(r(27988).ActorRdfMetadataAccumulateCanContainUndefs)({name:"urn:comunica:default:rdf-metadata-accumulate/actors#cancontainundefs",bus:y}),new(r(67243).ActorRdfMetadataAccumulateCardinality)({name:"urn:comunica:default:rdf-metadata-accumulate/actors#cardinality",bus:y}),new(r(91475).ActorRdfMetadataAccumulatePageSize)({name:"urn:comunica:default:rdf-metadata-accumulate/actors#pagesize",bus:y}),new(r(26719).ActorRdfMetadataAccumulateRequestTime)({name:"urn:comunica:default:rdf-metadata-accumulate/actors#requesttime",bus:y}),new(r(75884).MediatorCombineUnion)({field:"metadata",name:"urn:comunica:default:rdf-metadata-accumulate/mediators#main",bus:y})),X=(new(r(85405).ActorRdfMetadataExtractHydraControls)({name:"urn:comunica:default:rdf-metadata-extract/actors#hydra-controls",bus:g}),new(r(57586).ActorRdfMetadataExtractHydraCount)({predicates:["http://www.w3.org/ns/hydra/core#totalItems","http://rdfs.org/ns/void#triples"],name:"urn:comunica:default:rdf-metadata-extract/actors#hydra-count",bus:g}),new(r(54777).ActorRdfMetadataExtractHydraPagesize)({predicates:["http://www.w3.org/ns/hydra/core#itemsPerPage"],name:"urn:comunica:default:rdf-metadata-extract/actors#hydra-pagesize",bus:g}),new(r(7445).ActorRdfMetadataExtractRequestTime)({name:"urn:comunica:default:rdf-metadata-extract/actors#request-time",bus:g}),new(r(40751).ActorRdfMetadataExtractAllowHttpMethods)({name:"urn:comunica:default:rdf-metadata-extract/actors#allow-http-methods",bus:g}),new(r(44549).ActorRdfMetadataExtractPutAccepted)({name:"urn:comunica:default:rdf-metadata-extract/actors#put-accepted",bus:g}),new(r(55282).ActorRdfMetadataExtractPatchSparqlUpdate)({name:"urn:comunica:default:rdf-metadata-extract/actors#patch-sparql-update",bus:g}),new(r(3187).ActorRdfMetadataExtractSparqlService)({inferHttpsEndpoint:!0,name:"urn:comunica:default:rdf-metadata-extract/actors#sparql-service",bus:g}),new(r(75884).MediatorCombineUnion)({filterErrors:!0,field:"metadata",name:"urn:comunica:default:rdf-metadata-extract/mediators#main",bus:g})),J=(new(r(62917).ActorRdfParseN3)({mediaTypePriorities:{"application/n-quads":1,"application/n-triples":.8,"application/trig":.95,"text/n3":.35,"text/turtle":.6},mediaTypeFormats:{"application/n-quads":"http://www.w3.org/ns/formats/N-Quads","application/n-triples":"http://www.w3.org/ns/formats/N-Triples","application/trig":"http://www.w3.org/ns/formats/TriG","text/n3":"http://www.w3.org/ns/formats/N3","text/turtle":"http://www.w3.org/ns/formats/Turtle"},priorityScale:1,name:"urn:comunica:default:rdf-parse/actors#n3",bus:m}),new(r(21487).ActorRdfParseRdfXml)({mediaTypePriorities:{"application/rdf+xml":1},mediaTypeFormats:{"application/rdf+xml":"http://www.w3.org/ns/formats/RDF_XML"},priorityScale:.5,name:"urn:comunica:default:rdf-parse/actors#rdfxml",bus:m}),new(r(8137).ActorRdfParseXmlRdfa)({mediaTypePriorities:{"application/xml":1,"image/svg+xml":1,"text/xml":1},mediaTypeFormats:{"application/xml":"http://www.w3.org/ns/formats/RDFa","image/svg+xml":"http://www.w3.org/ns/formats/RDFa","text/xml":"http://www.w3.org/ns/formats/RDFa"},priorityScale:.3,name:"urn:comunica:default:rdf-parse/actors#xmlrdfa",bus:m}),new(r(43352).ActorRdfParseShaclc)({mediaTypePriorities:{"text/shaclc":1,"text/shaclc-ext":.5},mediaTypeFormats:{"text/shaclc":"http://www.w3.org/ns/formats/Shaclc","text/shaclc-ext":"http://www.w3.org/ns/formats/ShaclcExtended"},priorityScale:.1,name:"urn:comunica:default:rdf-parse/actors#shaclc",bus:m}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-parse/mediators#parse",bus:m})),W=new(r(75884).MediatorCombineUnion)({field:"mediaTypes",name:"urn:comunica:default:rdf-parse/mediators#mediaType",bus:m}),Y=(new(r(28955).ActorRdfParseHtml)({busRdfParseHtml:b,mediaTypePriorities:{"application/xhtml+xml":.9,"text/html":1},mediaTypeFormats:{"application/xhtml+xml":"http://www.w3.org/ns/formats/HTML","text/html":"http://www.w3.org/ns/formats/HTML"},priorityScale:.2,name:"urn:comunica:default:rdf-parse/actors#html",bus:m}),new(r(42421).ActorRdfParseHtmlMicrodata)({name:"urn:comunica:default:rdf-parse-html/actors#microdata",bus:b}),new(r(26585).ActorRdfParseHtmlRdfa)({name:"urn:comunica:default:rdf-parse-html/actors#rdfa",bus:b}),new(r(34541).ActorRdfResolveHypermediaLinksNext)({name:"urn:comunica:default:rdf-resolve-hypermedia-links/actors#next",bus:v}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-resolve-hypermedia-links/mediators#main",bus:v})),Z=(new(r(34120).ActorRdfResolveHypermediaLinksQueueFifo)({name:"urn:comunica:default:rdf-resolve-hypermedia-links-queue/actors#fifo",bus:_}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-resolve-hypermedia-links-queue/mediators#main",bus:_})),ee=(new(r(28510).ActorRdfSerializeN3)({mediaTypePriorities:{"application/n-quads":1,"application/n-triples":.8,"application/trig":.95,"text/n3":.35,"text/turtle":.6},mediaTypeFormats:{"application/n-quads":"http://www.w3.org/ns/formats/N-Quads","application/n-triples":"http://www.w3.org/ns/formats/N-Triples","application/trig":"http://www.w3.org/ns/formats/TriG","text/n3":"http://www.w3.org/ns/formats/N3","text/turtle":"http://www.w3.org/ns/formats/Turtle"},name:"urn:comunica:default:rdf-serialize/actors#n3",bus:w}),new(r(21935).ActorRdfSerializeJsonLd)({jsonStringifyIndentSpaces:2,mediaTypePriorities:{"application/ld+json":1},mediaTypeFormats:{"application/ld+json":"http://www.w3.org/ns/formats/JSON-LD"},priorityScale:.9,name:"urn:comunica:default:rdf-serialize/actors#jsonld",bus:w}),new(r(49343).ActorRdfSerializeShaclc)({mediaTypePriorities:{"text/shaclc":1,"text/shaclc-ext":.5},mediaTypeFormats:{"text/shaclc":"http://www.w3.org/ns/formats/Shaclc","text/shaclc-ext":"http://www.w3.org/ns/formats/ShaclcExtended"},priorityScale:.1,name:"urn:comunica:default:rdf-serialize/actors#shaclc",bus:w}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-serialize/mediators#serialize",bus:w})),te=new(r(75884).MediatorCombineUnion)({field:"mediaTypes",name:"urn:comunica:default:rdf-serialize/mediators#mediaType",bus:w}),re=new(r(75884).MediatorCombineUnion)({field:"mediaTypeFormats",name:"urn:comunica:default:rdf-serialize/mediators#mediaTypeFormat",bus:w}),ne=new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-update-hypermedia/mediators#main",bus:T}),ie=(new(r(76722).ActorRdfUpdateQuadsRdfJsStore)({name:"urn:comunica:default:rdf-update-quads/actors#rdfjs-store",bus:S}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-update-quads/mediators#main",bus:S})),ae=new(r(28590).ActorHttpFetch)({agentOptions:{keepAlive:!0,maxSockets:5},name:"urn:comunica:default:http/actors#fetch",bus:O}),oe=new(r(99104).MediatorNumber)({field:"time",type:"min",ignoreErrors:!0,name:"urn:comunica:default:http/mediators#no-fallback",bus:O}),se=new(r(99104).MediatorNumber)({field:"time",type:"min",ignoreErrors:!0,name:"urn:comunica:default:http/mediators#main",bus:E}),ce=(new(r(26933).ActorQueryOperationSource)({name:"urn:comunica:default:query-operation/actors#source",bus:x}),new(r(99104).MediatorNumber)({field:"httpRequests",type:"min",ignoreErrors:!0,name:"urn:comunica:default:query-operation/mediators#main",bus:x})),ue=new(r(25896).MediatorRace)({name:"urn:comunica:default:query-process/mediators#main",bus:A}),le=new(r(25896).MediatorRace)({name:"urn:comunica:default:query-source-identify/mediators#main",bus:R}),de=new(r(8309).MediatorJoinCoefficientsFixed)({cpuWeight:10,memoryWeight:1,timeWeight:2,ioWeight:100,name:"urn:comunica:default:rdf-join/mediators#main",bus:I}),he=new(r(56320).ActorHttpInvalidateListenable)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-context-preprocess-query-source-identify/^3.0.0/components/ActorContextPreprocessQuerySourceIdentify.jsonld#IActorContextPreprocessQuerySourceIdentifyArgs_default_invalidator",bus:P}),pe=new(r(48284).MediatorAll)({name:"urn:comunica:default:http-invalidate/mediators#main",bus:P}),fe=new(r(56320).ActorHttpInvalidateListenable)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-update-quads-hypermedia/^3.0.0/components/ActorRdfUpdateQuadsHypermedia.jsonld#IActorRdfUpdateQuadsHypermediaArgs_default_invalidator",bus:P}),ye=new(r(56320).ActorHttpInvalidateListenable)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-sparql-json/^3.0.0/components/ActionObserverHttp.jsonld#IActionObserverHttpArgs_default_invalidator",bus:P}),ge=new(r(56320).ActorHttpInvalidateListenable)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-stats/^3.0.0/components/ActionObserverHttp.jsonld#IActionObserverHttpArgs_default_invalidator",bus:P}),me=new(r(75884).MediatorCombineUnion)({field:"mergeHandlers",name:"urn:comunica:default:merge-bindings-context/mediators#main",bus:N}),be=(new(r(35848).ActorRdfJoinSingle)({mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-single",bus:I}),new(r(85345).ActorRdfJoinMultiEmpty)({mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-multi-empty",bus:I}),new(r(6551).ActorRdfJoinMultiBindSource)({selectivityModifier:1e-4,blockSize:16,mediatorJoinEntriesSort:H,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-multi-bind-source",bus:I}),new(r(38868).ActorRdfJoinHash)({mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-hash",bus:I}),new(r(77375).ActorRdfJoinSymmetricHash)({mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-symmetric-hash",bus:I}),new(r(37081).ActorRdfJoinNestedLoop)({mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-nested-loop",bus:I}),new(r(11688).ActorRdfJoinMinusHash)({mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#minus-hash",bus:I}),new(r(98311).ActorRdfJoinMinusHashUndef)({mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#minus-hash-undef",bus:I}),new(r(19726).ActorRdfJoinOptionalHash)({canHandleUndefs:!1,blocking:!1,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#optional-hash-def-nonblocking",bus:I}),new(r(19726).ActorRdfJoinOptionalHash)({canHandleUndefs:!1,blocking:!0,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#optional-hash-def-blocking",bus:I}),new(r(19726).ActorRdfJoinOptionalHash)({canHandleUndefs:!0,blocking:!1,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#optional-hash-undef-nonblocking",bus:I}),new(r(19726).ActorRdfJoinOptionalHash)({canHandleUndefs:!0,blocking:!0,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#optional-hash-undef-blocking",bus:I}),new(r(9391).ActorRdfJoinOptionalNestedLoop)({mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#optional-nested-loop",bus:I}),new(r(54341).ActorDereferenceRdfParse)({mediatorDereference:Q,mediatorParse:J,mediatorParseMediatypes:W,mediaMappings:{htm:"text/html",html:"text/html",json:"application/json",jsonld:"application/ld+json",n3:"text/n3",nq:"application/n-quads",nquads:"application/n-quads",nt:"application/n-triples",ntriples:"application/n-triples",owl:"application/rdf+xml",rdf:"application/rdf+xml",rdfxml:"application/rdf+xml",shaclc:"text/shaclc",shaclce:"text/shaclc-ext",shc:"text/shaclc",shce:"text/shaclc-ext",svg:"image/svg+xml",svgz:"image/svg+xml",trig:"application/trig",ttl:"text/turtle",turtle:"text/turtle",xht:"application/xhtml+xml",xhtml:"application/xhtml+xml",xml:"application/xml"},name:"urn:comunica:default:dereference-rdf/actors#parse",bus:d}),new(r(3549).ActorRdfParseHtmlScript)({mediatorRdfParseMediatypes:W,mediatorRdfParseHandle:J,name:"urn:comunica:default:rdf-parse-html/actors#script",bus:b}),new(r(63543).ActorQueryResultSerializeRdf)({mediatorRdfSerialize:ee,mediatorMediaTypeCombiner:te,mediatorMediaTypeFormatCombiner:re,name:"urn:comunica:default:query-result-serialize/actors#rdf",bus:c}),new(r(55390).ActorHttpWayback)({mediatorHttp:oe,name:"urn:comunica:default:http/actors#wayback",bus:E}),new(r(54168).ActorRdfParseJsonLd)({mediatorHttp:se,mediaTypePriorities:{"application/json":.15,"application/ld+json":1},mediaTypeFormats:{"application/json":"http://www.w3.org/ns/formats/JSON-LD","application/ld+json":"http://www.w3.org/ns/formats/JSON-LD"},priorityScale:.9,name:"urn:comunica:default:rdf-parse/actors#jsonld",bus:m}),new(r(87057).ActorRdfUpdateHypermediaPatchSparqlUpdate)({mediatorHttp:se,name:"urn:comunica:default:rdf-update-hypermedia/actors#patch-sparql-update",bus:T}),new(r(3047).ActorRdfUpdateHypermediaPutLdp)({mediatorHttp:se,mediatorRdfSerializeMediatypes:te,mediatorRdfSerialize:ee,name:"urn:comunica:default:rdf-update-hypermedia/actors#put-ldp",bus:T}),new(r(58916).ActorRdfUpdateHypermediaSparql)({mediatorHttp:se,checkUrlSuffixSparql:!0,checkUrlSuffixUpdate:!0,name:"urn:comunica:default:rdf-update-hypermedia/actors#sparql",bus:T}),new(r(57321).ActorQueryOperationAsk)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#ask",bus:x}),new(r(20888).ActorQueryOperationBgpJoin)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#bgp",bus:x}),new(r(88749).ActorQueryOperationConstruct)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#construct",bus:x}),new(r(13867).ActorQueryOperationDistinctHash)({mediatorHashBindings:C,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#distinct",bus:x}),new(r(37572).ActorQueryOperationFromQuad)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#from",bus:x}),new(r(98893).ActorQueryOperationProject)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#project",bus:x}),new(r(16909).ActorQueryOperationReducedHash)({mediatorHashBindings:C,cacheSize:100,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#reduced",bus:x}),new(r(14922).ActorQueryOperationSlice)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#slice",bus:x}),new(r(19779).ActorQueryOperationUnion)({mediatorRdfMetadataAccumulate:K,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#union",bus:x}),new(r(16733).ActorQueryOperationPathAlt)({mediatorRdfMetadataAccumulate:K,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#path-alt",bus:x}),new(r(88317).ActorQueryOperationPathInv)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#path-inv",bus:x}),new(r(91430).ActorQueryOperationPathLink)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#path-link",bus:x}),new(r(56993).ActorQueryOperationPathNps)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#path-nps",bus:x}),new(r(75233).ActorQueryOperationClear)({mediatorUpdateQuads:ie,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#update-clear",bus:x}),new(r(57886).ActorQueryOperationUpdateCompositeUpdate)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#update-composite",bus:x}),new(r(14876).ActorQueryOperationCreate)({mediatorUpdateQuads:ie,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#update-create",bus:x}),new(r(82465).ActorQueryOperationDrop)({mediatorUpdateQuads:ie,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#update-drop",bus:x}),new(r(29796).ActorQueryOperationLoad)({mediatorUpdateQuads:ie,mediatorQuerySourceIdentify:le,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#update-load",bus:x}),new(r(40980).ActorQueryOperationJoin)({mediatorJoin:de,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#join",bus:x}),new(r(19948).ActorQueryOperationMinus)({mediatorJoin:de,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#minus",bus:x}),new(r(28261).ActorQueryOperationPathSeq)({mediatorJoin:de,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#path-seq",bus:x}),new(r(68841).ActorRdfJoinMultiSmallest)({mediatorJoinEntriesSort:H,mediatorJoin:de,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-multi-smallest",bus:I}),new(r(92107).ActorRdfJoinMultiSmallestFilterBindings)({selectivityModifier:1e-4,blockSize:64,mediatorJoinEntriesSort:H,mediatorJoin:de,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-multi-smallest-filter-bindings",bus:I}),new(r(48989).ActorOptimizeQueryOperationFilterPushdown)({name:"urn:comunica:default:optimize-query-operation/actors#filter-pushdown",bus:o,beforeActors:[M]})),ve=(new(r(68132).ActorDereferenceHttp)({mediatorHttp:se,maxAcceptHeaderLength:1024,maxAcceptHeaderLengthBrowser:128,name:"urn:comunica:default:dereference/actors#http",bus:l,beforeActors:[V]}),new(r(48230).ActorHttpProxy)({mediatorHttp:se,name:"urn:comunica:default:http/actors#proxy",bus:O,beforeActors:[ae]}),new(r(90807).ActorContextPreprocessQuerySourceIdentify)({cacheSize:100,httpInvalidator:he,mediatorQuerySourceIdentify:le,mediatorContextPreprocess:j,name:"urn:comunica:default:context-preprocess/actors#query-source-identify",bus:i,beforeActors:[D]}),new(r(15729).ActorInitQuery)({mediatorQueryProcess:ue,mediatorQueryResultSerialize:F,mediatorQueryResultSerializeMediaTypeCombiner:B,mediatorQueryResultSerializeMediaTypeFormatCombiner:U,mediatorHttpInvalidate:pe,defaultQueryInputFormat:"sparql",allowNoSources:!1,name:"urn:comunica:default:init/actors#query",bus:n})),_e=(new(r(88297).ActorRdfUpdateQuadsHypermedia)({cacheSize:100,httpInvalidator:fe,mediatorDereferenceRdf:$,mediatorMetadata:z,mediatorMetadataExtract:X,mediatorRdfUpdateHypermedia:ne,name:"urn:comunica:default:rdf-update-quads/actors#hypermedia",bus:S}),new(r(34593).ActionObserverHttp)({httpInvalidator:ye,name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-sparql-json/^3.0.0/components/ActorQueryResultSerializeSparqlJson.jsonld#ActorQueryResultSerializeSparqlJson_default_observer",bus:O})),we=new(r(13900).ActionObserverHttp)({httpInvalidator:ge,name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-stats/^3.0.0/components/ActorQueryResultSerializeStats.jsonld#ActorQueryResultSerializeStats_default_observer",bus:O}),Te=(new(r(52378).ActorQuerySourceIdentifyHypermediaQpf)({mediatorMetadata:z,mediatorMetadataExtract:X,mediatorDereferenceRdf:$,mediatorMergeBindingsContext:me,subjectUri:"http://www.w3.org/1999/02/22-rdf-syntax-ns#subject",predicateUri:"http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate",objectUri:"http://www.w3.org/1999/02/22-rdf-syntax-ns#object",graphUri:"http://www.w3.org/ns/sparql-service-description#graph",name:"urn:comunica:default:query-source-identify-hypermedia/actors#qpf",bus:u}),new(r(16025).ActorQuerySourceIdentifyHypermediaSparql)({mediatorHttp:se,mediatorMergeBindingsContext:me,checkUrlSuffix:!0,forceHttpGet:!1,cacheSize:1024,bindMethod:"values",countTimeout:3e3,name:"urn:comunica:default:rdf-resolve-quad-pattern/actors#sparql",bus:u}),new(r(44538).ActorQuerySourceIdentifyHypermediaNone)({mediatorMergeBindingsContext:me,name:"urn:comunica:default:query-source-identify-hypermedia/actors#none",bus:u}),new(r(19724).ActorQueryOperationExtend)({mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#extend",bus:x}),new(r(74578).ActorQueryOperationFilter)({mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#filter",bus:x}),new(r(47007).ActorQueryOperationGroup)({mediatorHashBindings:C,mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#group",bus:x}),new(r(33149).ActorQueryOperationLeftJoin)({mediatorJoin:de,mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#leftjoin",bus:x}),new(r(35021).ActorQueryOperationNop)({mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#nop",bus:x}),new(r(80797).ActorQueryOperationOrderBy)({mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#orderby",bus:x}),new(r(89375).ActorQueryOperationService)({forceSparqlEndpoint:!1,mediatorMergeBindingsContext:me,mediatorQuerySourceIdentify:le,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#service",bus:x}),new(r(14702).ActorQueryOperationValues)({mediatorMergeBindingsContext:me,name:"urn:comunica:default:query-operation/actors#values",bus:x}),new(r(90658).ActorQueryOperationPathOneOrMore)({mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#path-one-or-more",bus:x}),new(r(60436).ActorQueryOperationPathZeroOrMore)({mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#path-zero-or-more",bus:x}),new(r(32091).ActorQueryOperationPathZeroOrOne)({mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#path-zero-or-one",bus:x}),new(r(21638).ActorQueryOperationUpdateDeleteInsert)({mediatorUpdateQuads:ie,mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#update-delete-insert",bus:x}),new(r(94739).ActorQueryProcessSequential)({mediatorContextPreprocess:j,mediatorQueryParse:k,mediatorOptimizeQueryOperation:L,mediatorQueryOperation:ce,mediatorMergeBindingsContext:me,name:"urn:comunica:default:query-process/actors#sequential",bus:A})),Se=new(r(57789).ActorQuerySourceIdentifyHypermedia)({cacheSize:100,maxIterators:64,aggregateTraversalStore:!0,mediatorDereferenceRdf:$,mediatorMetadata:z,mediatorMetadataExtract:X,mediatorMetadataAccumulate:K,mediatorQuerySourceIdentifyHypermedia:q,mediatorRdfResolveHypermediaLinks:Y,mediatorRdfResolveHypermediaLinksQueue:Z,mediatorMergeBindingsContext:me,name:"urn:comunica:default:query-source-identify/actors#hypermedia",bus:R}),Oe=(new(r(498).ActorRdfJoinNone)({mediatorMergeBindingsContext:me,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-none",bus:I}),new(r(82331).ActorRdfJoinMultiBind)({bindOrder:"depth-first",selectivityModifier:1e-4,mediatorJoinEntriesSort:H,mediatorQueryOperation:ce,mediatorMergeBindingsContext:me,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-multi-bind",bus:I}),new(r(64305).ActorRdfJoinOptionalBind)({bindOrder:"depth-first",selectivityModifier:1e-6,mediatorQueryOperation:ce,mediatorMergeBindingsContext:me,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#optional-bind",bus:I}),new(r(34593).ActorQueryResultSerializeSparqlJson)({emitMetadata:!0,httpObserver:_e,mediaTypePriorities:{"application/sparql-results+json":.8},mediaTypeFormats:{"application/sparql-results+json":"http://www.w3.org/ns/formats/SPARQL_Results_JSON"},name:"urn:comunica:default:query-result-serialize/actors#sparql-json",bus:c}),new(r(13900).ActorQueryResultSerializeStats)({httpObserver:we,mediaTypePriorities:{stats:.5},mediaTypeFormats:{stats:"https://comunica.linkeddatafragments.org/#results_stats"},name:"urn:comunica:default:query-result-serialize/actors#stats",bus:c}),new(r(68383).ActorQueryProcessExplainParsed)({queryProcessor:Te,name:"urn:comunica:default:query-process/actors#explain-parsed",bus:A}),new(r(54395).ActorQueryProcessExplainPhysical)({queryProcessor:Te,name:"urn:comunica:default:query-process/actors#explain-physical",bus:A}),new(r(70605).ActorQueryProcessExplainLogical)({queryProcessor:Te,name:"urn:comunica:default:query-process/actors#explain-logical",bus:A}),new(r(94607).ActorOptimizeQueryOperationPruneEmptySourceOperations)({useAskIfSupported:!1,name:"urn:comunica:default:optimize-query-operation/actors#prune-empty-source-operations",bus:o,beforeActors:[be]})),Ee=(new(r(27474).ActorQuerySourceIdentifyRdfJs)({mediatorMergeBindingsContext:me,name:"urn:comunica:default:query-source-identify/actors#rdfjs",bus:R,beforeActors:[Se]}),new(r(84701).ActorQuerySourceIdentifySerialized)({mediatorRdfParse:J,mediatorQuerySourceIdentify:le,name:"urn:comunica:default:query-source-identify/actors#serialized",bus:R,beforeActors:[Se]}),new(r(98498).ActorOptimizeQueryOperationJoinConnected)({name:"urn:comunica:default:optimize-query-operation/actors#join-connected",bus:o,beforeActors:[Oe]})),xe=new(r(28084).ActorOptimizeQueryOperationBgpToJoin)({name:"urn:comunica:default:optimize-query-operation/actors#bgp-to-join",bus:o,beforeActors:[Ee]}),Ae=new(r(46980).ActorOptimizeQueryOperationJoinBgp)({name:"urn:comunica:default:optimize-query-operation/actors#join-bgp",bus:o,beforeActors:[xe]}),Re=new(r(94741).ActorOptimizeQueryOperationAssignSourcesExhaustive)({name:"urn:comunica:default:optimize-query-operation/actors#assign-sources-exhaustive",bus:o,beforeActors:[Ae]});return new(r(78571).ActorOptimizeQueryOperationDescribeToConstructsSubject)({name:"urn:comunica:default:optimize-query-operation/actors#describe-to-constructs-subject",bus:o,beforeActors:[Re]}),ve}},45747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryEngine=void 0;const n=r(15729),i=r(99894);class a extends n.QueryEngineBase{constructor(e=i()){super(e)}}t.QueryEngine=a},90128:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(45747),t)},18423:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorAbstractMediaTyped=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}async run(e){if("handle"in e){const t=e;return{handle:await this.runHandle(t.handle,t.handleMediaType,e.context)}}if("mediaTypes"in e)return{mediaTypes:await this.getMediaTypes(e.context)};if("mediaTypeFormats"in e)return{mediaTypeFormats:await this.getMediaTypeFormats(e.context)};throw new Error("Either a handle, mediaTypes or mediaTypeFormats action needs to be provided")}async test(e){if("handle"in e){const t=e;return{handle:await this.testHandle(t.handle,t.handleMediaType,e.context)}}if("mediaTypes"in e)return{mediaTypes:await this.testMediaType(e.context)};if("mediaTypeFormats"in e)return{mediaTypeFormats:await this.testMediaTypeFormats(e.context)};throw new Error("Either a handle, mediaTypes or mediaTypeFormats action needs to be provided")}}t.ActorAbstractMediaTyped=i},44405:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorAbstractMediaTypedFixed=void 0;const n=r(18423);class i extends n.ActorAbstractMediaTyped{constructor(e){super(e);const t=this.priorityScale||0===this.priorityScale?this.priorityScale:1;if(this.mediaTypePriorities)for(const[e,[r,n]]of Object.entries(this.mediaTypePriorities).entries())this.mediaTypePriorities[r]=t*n;this.mediaTypePriorities=Object.freeze(this.mediaTypePriorities),this.mediaTypeFormats=Object.freeze(this.mediaTypeFormats)}async testHandle(e,t,r){if(!t||!(t in this.mediaTypePriorities))throw new Error(`Unrecognized media type: ${t}`);return await this.testHandleChecked(e,r)}async testMediaType(e){return!0}async getMediaTypes(e){return this.mediaTypePriorities}async testMediaTypeFormats(e){return!0}async getMediaTypeFormats(e){return this.mediaTypeFormats}}t.ActorAbstractMediaTypedFixed=i},75560:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(18423),t),i(r(44405),t)},96331:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorAbstractPath=void 0;const n=r(59510),i=r(32227),a=r(76664),o=r(18050),s=r(22112),c=r(31578),u=r(29345),l=new o.DataFactory;class d extends n.ActorQueryOperationTypedMediated{constructor(e,t){super(e,"path"),this.predicateType=t}async testOperation(e,t){if(e.predicate.type!==this.predicateType)throw new Error(`This Actor only supports ${this.predicateType} Path operations.`);return!0}generateVariable(e,t){return t?!e||e.subject.value!==t&&e.object.value!==t?l.variable(t):this.generateVariable(e,`${t}b`):this.generateVariable(e,"b")}async isPathArbitraryLengthDistinct(e,t){return e.get(i.KeysQueryOperation.isPathArbitraryLengthDistinctKey)?{context:e=e.set(i.KeysQueryOperation.isPathArbitraryLengthDistinctKey,!1),operation:void 0}:{context:e=e.set(i.KeysQueryOperation.isPathArbitraryLengthDistinctKey,!0),operation:n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:d.FACTORY.createDistinct(t),context:e}))}}async predicateStarGraphVariable(e,t,r,i,o,s){const c=this.getPathSources(r),u=this.generateVariable(d.FACTORY.createPath(e,r,t,i)),l=d.FACTORY.createUnion([this.assignPatternSources(d.FACTORY.createPattern(e,u,t,i),c),this.assignPatternSources(d.FACTORY.createPattern(t,u,e,i),c)]),h=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:o,operation:l})),p=new Set;return{bindingsStream:new a.MultiTransformIterator(h.bindingsStream,{multiTransform:n=>{const c=n.get(i);return p.has(c.value)?new a.EmptyIterator:(p.add(c.value),new a.TransformIterator((async()=>{const n=new a.BufferedIterator;return await this.getObjectsPredicateStar(e,r,c,o,{},n,{count:0}),n.transform({transform(e,r,n){n(s.bindings([[t,e],[i,c]])),r()}})}),{maxBufferSize:128}))},autoStart:!1}),metadata:h.metadata}}async getObjectsPredicateStarEval(e,t,r,n,i,a,o){if("Variable"===n.termType)return this.predicateStarGraphVariable(e,r,t,n,i,o);const s=new u.PathVariableObjectIterator(e,t,n,i,this.mediatorQueryOperation,a);return{bindingsStream:s.transform({autoStart:!1,transform(e,t,n){n(o.bindings([[r,e]])),t()}}),async metadata(){const e=await new Promise((e=>{s.getProperty("metadata",(t=>e(t())))}));return e.cardinality.value++,e}}}async getObjectsPredicateStar(e,t,r,i,a,o,c){const u=(0,s.termToString)(e);if(a[u])return;o._push(e),a[u]=e,c.count++;const l=this.generateVariable(),h=d.FACTORY.createPath(e,t,l,r),p=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:h,context:i}));return p.bindingsStream.on("data",(async e=>{const n=e.get(l);await this.getObjectsPredicateStar(n,t,r,i,a,o,c)})),p.bindingsStream.on("end",(()=>{0==--c.count&&o.close()})),p.metadata}async getSubjectAndObjectBindingsPredicateStar(e,t,r,i,a,o,c,u,l,h,p,f){const y=(0,s.termToString)(i)+(0,s.termToString)(o);if(l[y])return;if(p.count++,l[y]=!0,h._push(f.bindings([[e,r],[t,i]])),y in u){const n=await u[y];for(const i of n)await this.getSubjectAndObjectBindingsPredicateStar(e,t,r,i,a,o,c,u,l,h,p,f);return void(0==--p.count&&h.close())}const g=new Promise((async(s,y)=>{const g=[],m=this.generateVariable(),b=d.FACTORY.createPath(i,a,m,o),v=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:b,context:c}));v.bindingsStream.on("data",(async n=>{const i=n.get(m);g.push(i),await this.getSubjectAndObjectBindingsPredicateStar(e,t,r,i,a,o,c,u,l,h,p,f)})),v.bindingsStream.on("error",y),v.bindingsStream.on("end",(()=>{0==--p.count&&h.close(),s(g)}))}));u[y]=g}getPathSources(e){switch(e.type){case c.Algebra.types.ALT:case c.Algebra.types.SEQ:return e.input.flatMap((e=>this.getPathSources(e)));case c.Algebra.types.INV:case c.Algebra.types.ONE_OR_MORE_PATH:case c.Algebra.types.ZERO_OR_MORE_PATH:case c.Algebra.types.ZERO_OR_ONE_PATH:return this.getPathSources(e.path);case c.Algebra.types.LINK:case c.Algebra.types.NPS:{const t=n.ActorQueryOperation.getOperationSource(e);if(!t)throw new Error("Could not find a required source on a link path operation");return[t]}}}assignPatternSources(e,t){if(0===t.length)throw new Error("Attempted to assign zero sources to a pattern during property path handling");return 1===t.length?n.ActorQueryOperation.assignOperationSource(e,t[0]):d.FACTORY.createUnion(t.map((t=>n.ActorQueryOperation.assignOperationSource(e,t))),!0)}}t.ActorAbstractPath=d,d.FACTORY=new c.Factory},29345:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathVariableObjectIterator=void 0;const n=r(59510),i=r(76664),a=r(18050),o=r(22112),s=r(31578),c=new a.DataFactory,u=new s.Factory;class l extends i.BufferedIterator{constructor(e,t,r,n,i,a,o=16){super({autoStart:!0}),this.subject=e,this.predicate=t,this.graph=r,this.context=n,this.mediatorQueryOperation=i,this.maxRunningOperations=o,this.termHashes=new Map,this.runningOperations=[],this.pendingOperations=[],this._push(this.subject,a)}_end(e){for(const e of this.runningOperations)e.destroy();super._end(e)}_push(e,t=!0){let r;if(t&&(r=(0,o.termToString)(e),this.termHashes.has(r)))return;const n=c.variable("b");this.pendingOperations.push({variable:n,operation:u.createPath(e,this.predicate,n,this.graph)}),r&&(this.termHashes.set(r,e),super._push(e))}_read(e,t){const r=this;(async function(){for(;r.runningOperations.lengthr.destroy(e))),i.on("readable",(()=>{r.readable=!0,r._fillBufferAsync()})),i.on("end",(()=>{r.runningOperations.splice(r.runningOperations.indexOf(i),1),r.readable=!0,r._fillBufferAsync()}))),r.setProperty("metadata",t.metadata)}let t,i=0;for(;i!==(i=e);)for(let n=0;n0;n++)null!==(t=r.runningOperations[n].read())&&(e--,r._push(t));0===r.runningOperations.length&&0===r.pendingOperations.length&&r.close()})().then((()=>{t()}),(e=>this.destroy(e)))}}t.PathVariableObjectIterator=l},43543:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(96331),t),i(r(29345),t)},53927:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessConvertShortcuts=void 0;const n=r(32362),i=r(34368);class a extends n.ActorContextPreprocess{constructor(e){super(e)}async test(e){return!0}async run(e){return{context:a.expandShortcuts(e.context,this.contextKeyShortcuts)}}static expandShortcuts(e,t){for(const r of e.keys())t[r.name]&&(e=e.set(new i.ActionContextKey(t[r.name]),e.get(r)).delete(r));return e}}t.ActorContextPreprocessConvertShortcuts=a},36251:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(53927),t)},80352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessQuerySourceIdentify=void 0;const n=r(32362),i=r(32227),a=r(34368),o=r(35069);class s extends n.ActorContextPreprocess{constructor(e){super(e),this.cache=this.cacheSize?new o.LRUCache({max:this.cacheSize}):void 0;const t=this.cache;t&&this.httpInvalidator.addInvalidateListener((({url:e})=>e?t.delete(e):t.clear()))}async test(e){return!0}async run(e){let t=e.context;if(t.has(i.KeysInitQuery.querySourcesUnidentified)){const r=e.context.get(i.KeysInitQuery.querySourcesUnidentified),n=await Promise.all(r.map((e=>this.expandSource(e)))),a=await Promise.all(n.map((async t=>this.identifySource(t,e.context))));t=e.context.delete(i.KeysInitQuery.querySourcesUnidentified).set(i.KeysQueryOperation.querySources,a)}return{context:t}}async expandSource(e){return"string"==typeof e||"match"in e?{value:e}:{...e,context:(await this.mediatorContextPreprocess.mediate({context:a.ActionContext.ensureActionContext(e.context??{})})).context}}identifySource(e,t){let r;return"string"==typeof e.value&&this.cache&&(r=this.cache.get(e.value)),r||(r=this.mediatorQuerySourceIdentify.mediate({querySourceUnidentified:e,context:t}).then((({querySource:e})=>e)),"string"==typeof e.value&&this.cache&&this.cache.set(e.value,r)),r}}t.ActorContextPreprocessQuerySourceIdentify=s},90807:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(80352),t)},16646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessQuerySourceSkolemize=void 0;const n=r(32362),i=r(32227),a=r(84078),o=r(50339);class s extends n.ActorContextPreprocess{constructor(e){super(e)}async test(e){return!0}async run(e){let t=e.context;if(t.has(i.KeysQueryOperation.querySources)){t.has(i.KeysQuerySourceIdentify.sourceIds)||(t=t.set(i.KeysQuerySourceIdentify.sourceIds,new Map));const e=t.getSafe(i.KeysQuerySourceIdentify.sourceIds);let r=t.getSafe(i.KeysQueryOperation.querySources);r=r.map((t=>({source:new a.QuerySourceSkolemized(t.source,(0,o.getSourceId)(e,t.source)),context:t.context}))),t=t.set(i.KeysQueryOperation.querySources,r)}return{context:t}}}t.ActorContextPreprocessQuerySourceSkolemize=s},84078:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceSkolemized=void 0;const n=r(72394),i=r(76664),a=r(50339);t.QuerySourceSkolemized=class{constructor(e,t){this.innerSource=e,this.sourceId=t}async getSelectorShape(e){return this.innerSource.getSelectorShape(e)}queryBindings(e,t,r){const o=(0,a.deskolemizeOperation)(e,this.sourceId);if(!o){const e=new i.ArrayIterator([],{autoStart:!1});return e.setProperty("metadata",{state:new n.MetadataValidationState,cardinality:{type:"exact",value:0},canContainUndefs:!1,variables:[]}),e}return(0,a.skolemizeBindingsStream)(this.innerSource.queryBindings(o,t,r),this.sourceId)}queryBoolean(e,t){return this.innerSource.queryBoolean(e,t)}queryQuads(e,t){const r=(0,a.deskolemizeOperation)(e,this.sourceId);if(!r){const e=new i.ArrayIterator([],{autoStart:!1});return e.setProperty("metadata",{state:new n.MetadataValidationState,cardinality:{type:"exact",value:0}}),e}return(0,a.skolemizeQuadStream)(this.innerSource.queryQuads(r,t),this.sourceId)}queryVoid(e,t){return this.innerSource.queryVoid(e,t)}get referenceValue(){return this.innerSource.referenceValue}toString(){return`${this.innerSource.toString()}(SkolemID:${this.sourceId})`}}},35106:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(16646),t),i(r(84078),t),i(r(50339),t)},50339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deskolemizeOperation=t.deskolemizeQuad=t.deskolemizeTermNestedThrowing=t.deskolemizeTerm=t.skolemizeBindingsStream=t.skolemizeQuadStream=t.skolemizeBindings=t.skolemizeQuad=t.skolemizeTerm=t.getSourceId=t.SKOLEM_PREFIX=void 0;const n=r(85156),i=r(18050),a=r(13252),o=r(31578),s=new i.DataFactory;function c(e,r){return"BlankNode"===e.termType?new n.BlankNodeScoped(`bc_${r}_${e.value}`,s.namedNode(`${t.SKOLEM_PREFIX}${r}:${e.value}`)):e}function u(e,t){return(0,a.mapTermsNested)(e,(e=>c(e,t)))}function l(e,t){return e.map((e=>"Quad"===e.termType?u(e,t):c(e,t)))}function d(e,r){if("BlankNode"===e.termType&&"skolemized"in e&&(e=e.skolemized),"NamedNode"===e.termType&&e.value.startsWith(t.SKOLEM_PREFIX)){const n=e.value.indexOf(":",t.SKOLEM_PREFIX.length);if(e.value.slice(t.SKOLEM_PREFIX.length,n)===r){const t=e.value.slice(n+1,e.value.length);return s.blankNode(t)}return null}return e}function h(e,t){if("Quad"===e.termType)return(0,a.mapTermsNested)(e,(e=>{const r=d(e,t);if(!r)throw new Error("Skolemized term is not in scope for this source");return r}));const r=d(e,t);if(null===r)throw new Error("Skolemized term is not in scope for this source");return r}t.SKOLEM_PREFIX="urn:comunica_skolem:source_",t.getSourceId=function(e,t){let r=e.get(t.referenceValue);return void 0===r&&(r=`${e.size}`,e.set(t.referenceValue,r)),r},t.skolemizeTerm=c,t.skolemizeQuad=u,t.skolemizeBindings=l,t.skolemizeQuadStream=function(e,t){const r=e.map((e=>u(e,t)));return function t(){e.getProperty("metadata",(e=>{r.setProperty("metadata",e),e.state.addInvalidateListener(t)}))}(),r},t.skolemizeBindingsStream=function(e,t){const r=e.map((e=>l(e,t)));return function t(){e.getProperty("metadata",(e=>{r.setProperty("metadata",e),e.state.addInvalidateListener(t)}))}(),r},t.deskolemizeTerm=d,t.deskolemizeTermNestedThrowing=h,t.deskolemizeQuad=function(e,t){return(0,a.mapTermsNested)(e,(e=>d(e,t)??e))},t.deskolemizeOperation=function(e,t){try{return o.Util.mapOperation(e,{[o.Algebra.types.PATTERN]:(e,r)=>({result:Object.assign(r.createPattern(h(e.subject,t),h(e.predicate,t),h(e.object,t),h(e.graph,t)),{metadata:e.metadata}),recurse:!1}),[o.Algebra.types.PATH]:(e,r)=>({result:Object.assign(r.createPath(h(e.subject,t),e.predicate,h(e.object,t),h(e.graph,t)),{metadata:e.metadata}),recurse:!1})})}catch{}}},65239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessSetDefaults=void 0;const n=r(32362),i=r(32227);class a extends n.ActorContextPreprocess{constructor(e){super(e),this.defaultFunctionArgumentsCache={}}async test(e){return!0}async run(e){let t=e.context;if(e.initialize){t=t.setDefault(i.KeysInitQuery.queryTimestamp,new Date).setDefault(i.KeysQuerySourceIdentify.sourceIds,new Map).setDefault(i.KeysCore.log,this.logger).setDefault(i.KeysInitQuery.functionArgumentsCache,this.defaultFunctionArgumentsCache).setDefault(i.KeysQuerySourceIdentify.hypermediaSourcesAggregatedStores,new Map);let e={language:"sparql",version:"1.1"};t.has(i.KeysInitQuery.queryFormat)?(e=t.get(i.KeysInitQuery.queryFormat),"graphql"===e.language&&(t=t.setDefault(i.KeysInitQuery.graphqlSingularizeVariables,{}))):t=t.set(i.KeysInitQuery.queryFormat,e)}return{context:t}}}t.ActorContextPreprocessSetDefaults=a},35451:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(65239),t)},58952:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessSourceToDestination=void 0;const n=r(32362),i=r(32227);class a extends n.ActorContextPreprocess{constructor(e){super(e)}async test(e){return!0}async run(e){if(e.context.get(i.KeysInitQuery.querySourcesUnidentified)&&!e.context.get(i.KeysRdfUpdateQuads.destination)){const t=e.context.get(i.KeysInitQuery.querySourcesUnidentified);if(1===t.length)return{context:e.context.set(i.KeysRdfUpdateQuads.destination,t[0])}}return e}}t.ActorContextPreprocessSourceToDestination=a},41670:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(58952),t)},1741:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceFallback=void 0;const n=r(47702);class i extends n.ActorDereference{constructor(e){super(e)}async test(e){return!0}async run(e){return this.handleDereferenceErrors(e,new Error(`Could not dereference '${e.url}'`))}}t.ActorDereferenceFallback=i},35878:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(1741),t)},3968:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceHttp=void 0;const n=r(60376);class i extends n.ActorDereferenceHttpBase{getMaxAcceptHeaderLength(){return this.maxAcceptHeaderLengthBrowser}}t.ActorDereferenceHttp=i},60376:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceHttpBase=t.mediaTypesToAcceptString=void 0;const n=r(47702),i=r(74870),a=r(10288),o=r(9929),s=r(76574),c=/^[^ ;]*/u;function u(e,t){const r=[],n=Object.entries(e).map((([e,t])=>({mediaType:e,priority:t}))).sort(((e,t)=>t.priority===e.priority?e.mediaType.localeCompare(t.mediaType):t.priority-e.priority));let i=n.length-1;for(const{mediaType:e,priority:a}of n){const n=e+(1===a?"":`;q=${a.toFixed(3).replace(/0*$/u,"")}`);if(i+n.length>t){for(;i+9>t;)i-=(r.pop()??"").length+1;r.push("*/*;q=0.1");break}r.push(n),i+=n.length}return 0===r.length?"*/*":r.join(",")}t.mediaTypesToAcceptString=u;class l extends n.ActorDereference{constructor(e){super(e)}async test({url:e}){if(!/^https?:/u.test(e))throw new Error(`Cannot retrieve ${e} because it is not an HTTP(S) URL.`);return!0}async run(e){let t=!0;const r=new a.Headers(e.headers);let l;r.append("Accept",u(await(e.mediaTypes?.())??{},this.getMaxAcceptHeaderLength()));const d=Date.now();try{l=await this.mediatorHttp.mediate({context:e.context,init:{headers:r,method:e.method},input:e.url})}catch(t){return this.handleDereferenceErrors(e,t)}const h=(0,o.resolve)(l.url,e.url),p=Date.now()-d;if(200!==l.status){t=!1;const r=l.body?await s(i.ActorHttp.toNodeReadable(l.body)):"empty response";if(!e.acceptErrors){const t=new Error(`Could not retrieve ${e.url} (HTTP status ${l.status}):\n${r}`);return this.handleDereferenceErrors(e,t,l.headers,p)}}const f=c.exec(l.headers.get("content-type")??"")?.[0];return{url:h,data:t?i.ActorHttp.toNodeReadable(l.body):(0,n.emptyReadable)(),exists:t,requestTime:p,headers:l.headers,mediaType:"text/plain"===f?void 0:f}}}t.ActorDereferenceHttpBase=l},68132:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(3968),t),i(r(60376),t)},96636:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceRdfParse=void 0;const n=r(53583);class i extends n.ActorDereferenceRdf{constructor(e){super(e)}async getMetadata(e){return{baseIRI:e.url}}}t.ActorDereferenceRdfParse=i},54341:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(96636),t)},48040:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHashBindingsSha1=void 0;const n=r(38431),i=r(99499),a=r(22112),o=r(62168);class s extends n.ActorHashBindings{async test(e){if(!e.allowHashCollisions)throw new Error(`Actor ${this.name} can not provide hash functions without hash collisions`);return!0}async run(e){return{hashFunction:e=>(0,i.sha1)().update(o(Object.fromEntries([...e].map((([e,t])=>[(0,a.termToString)(e),(0,a.termToString)(t)]))))).digest("hex"),hashCollisions:!0}}}t.ActorHashBindingsSha1=s},11150:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(48040),t)},51803:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpFetch=void 0;const n=r(74870),i=r(32227);r(90482);const a=r(63562);class o extends n.ActorHttp{constructor(e){super(e),this.userAgent=o.createUserAgent(),this.fetchInitPreprocessor=new a.FetchInitPreprocessor(e.agentOptions)}static createUserAgent(){return`Comunica/actor-http-fetch (${void 0===globalThis.navigator?`Node.js ${process.version}; ${process.platform}`:`Browser-${globalThis.navigator.userAgent}`})`}async test(e){return{time:Number.POSITIVE_INFINITY}}static async getResponse(e,t,r,n,i,a){let o,s=n+1;for(;s-- >0;)try{const n=await e(t,r);if(a&&n.status>=500&&n.status<600)throw new Error(`Server replied with response code ${n.status}: ${n.statusText}`);return n}catch(e){if(o=e,r.signal?.aborted)throw e;s>0&&await new Promise(((e,t)=>{setTimeout(e,i),r.signal?.addEventListener("abort",(()=>{t(new Error("Fetch aborted by timeout."))}))}))}throw n>0?new Error(`Number of fetch retries (${n}) exceeded. Last error: ${String(o)}`):o}async run(e){const t=e.init?.headers??{};e.init=e.init??{},e.init.headers=new Headers(t),e.init.headers.has("user-agent")||e.init.headers.append("user-agent",this.userAgent);const r=e.context.get(i.KeysHttp.auth);r&&e.init.headers.append("Authorization",`Basic ${Buffer.from(r).toString("base64")}`),this.logInfo(e.context,`Requesting ${"string"==typeof e.input?e.input:e.input.url}`,(()=>({headers:n.ActorHttp.headersToHash(new Headers(e.init.headers)),method:e.init.method??"GET"}))),e.init?.headers&&"append"in e.init.headers&&e.context.has(i.KeysHttp.fetch)&&(e.init.headers=n.ActorHttp.headersToHash(e.init.headers));let a={...e.init};e.context.get(i.KeysHttp.includeCredentials)&&(a.credentials="include");const s=e.context?.get(i.KeysHttp.httpTimeout);let c,u;if(void 0!==s){const e=await this.fetchInitPreprocessor.createAbortController();a.signal=e.signal,u=()=>e.abort(),c=setTimeout((()=>u()),s)}try{a=await this.fetchInitPreprocessor.handle(a);const t=e.context?.get(i.KeysHttp.httpRetryCount)??0,r=e.context?.get(i.KeysHttp.httpRetryDelay)??0,n=e.context?.get(i.KeysHttp.httpRetryOnServerError)??!1,s=e.context?.get(i.KeysHttp.fetch),l=await o.getResponse(s??fetch,e.input,a,t,r,n);return void 0!==c&&(e.context?.get(i.KeysHttp.httpBodyTimeout)&&l.body?(u=()=>l.body?.cancel(new Error(`HTTP timeout when reading the body of ${l.url}.\nThis error can be disabled by modifying the 'httpBodyTimeout' and/or 'httpTimeout' options.`)),l.body.on("close",(()=>{clearTimeout(c)}))):clearTimeout(c)),l.body&&!l.body.cancel&&(l.body.cancel=async e=>{l.body.destroy(e),void 0!==c&&clearTimeout(c)}),l}catch(e){throw void 0!==c&&clearTimeout(c),e}}}t.ActorHttpFetch=o},63562:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchInitPreprocessor=void 0;const n=r(74870);t.FetchInitPreprocessor=class{async handle(e){if(e.headers){const t=new Headers(e.headers);t.has("user-agent")&&t.delete("user-agent"),e.headers=t}if(e?.headers&&"append"in e.headers&&(e.headers=n.ActorHttp.headersToHash(e.headers)),e.body&&"string"!=typeof e.body&&"getReader"in e.body){const t=e.body.getReader(),r=[];for(;;){const{done:e,value:n}=await t.read();if(e)break;r.push(n)}e.body=r.join("")}return{keepalive:!e.body,...e}}async createAbortController(){return new AbortController}}},28590:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(51803),t)},57643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpProxy=void 0;const n=r(74870),i=r(32227);class a extends n.ActorHttp{constructor(e){super(e)}async test(e){const t=e.context.get(i.KeysHttpProxy.httpProxyHandler);if(!t)throw new Error(`Actor ${this.name} could not find a proxy handler in the context.`);if(!await t.getProxy(e))throw new Error(`Actor ${this.name} could not determine a proxy for the given request.`);return{time:Number.POSITIVE_INFINITY}}async run(e){const t="string"==typeof e.input?e.input:e.input.url,r=e.context.get(i.KeysHttpProxy.httpProxyHandler),n=await this.mediatorHttp.mediate({...await r.getProxy(e),context:e.context.delete(i.KeysHttpProxy.httpProxyHandler)});return Object.defineProperty(n,"url",{configurable:!0,enumerable:!0,get:()=>n.headers.get("x-final-url")??t}),n}}t.ActorHttpProxy=a},76862:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyHandlerStatic=void 0,t.ProxyHandlerStatic=class{constructor(e){this.prefixUrl=e}async getProxy(e){return{init:e.init,input:this.modifyInput(e.input)}}modifyInput(e){return"string"==typeof e?this.prefixUrl+e:new Request(this.prefixUrl+e.url,e)}}},48230:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(57643),t),i(r(76862),t)},363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpWayback=void 0;const n=r(74870),i=r(32227),a=r(76574);r(90482);const o="http://wayback.archive-it.org/";function s(e){const t=new Request(e.input,e.init);return{input:new Request(new URL(`/${t.url}`,o),t)}}function c(e){const t=e.get(i.KeysHttpProxy.httpProxyHandler);return t?e=>t.getProxy(s(e)):e=>Promise.resolve(s(e))}class u extends n.ActorHttp{constructor(e){super(e)}async test(e){return!0}async run(e){let t=await this.mediatorHttp.mediate(e);if(404===t.status&&e.context.get(i.KeysHttpWayback.recoverBrokenLinks)){let r=await this.mediatorHttp.mediate({...e,context:e.context.set(i.KeysHttpWayback.recoverBrokenLinks,!1).set(i.KeysHttpProxy.httpProxyHandler,{getProxy:c(e.context)})});200===r.status&&([t,r]=[r,t]);const{body:o}=r;o&&("cancel"in o&&"function"==typeof o.cancel?await o.cancel():"destroy"in o&&"function"==typeof o.destroy?o.destroy():await a(n.ActorHttp.toNodeReadable(o)))}return t}}t.ActorHttpWayback=u},55390:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(363),t)},94394:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorInitQuery=void 0;const n=r(59266);"undefined"==typeof process&&(globalThis.process=r(39907));class i extends n.ActorInitQueryBase{}t.ActorInitQuery=i},59266:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorInitQueryBase=void 0;const n=r(99784);class i extends n.ActorInit{async test(e){return!0}async run(e){throw new Error("ActorInitSparql#run is not supported in the browser.")}}t.ActorInitQueryBase=i},52295:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryEngineBase=void 0;const n=r(32227),i=r(34368);class a{constructor(e){this.actorInitQuery=e}async queryBindings(e,t){return this.queryOfType(e,t,"bindings")}async queryQuads(e,t){return this.queryOfType(e,t,"quads")}async queryBoolean(e,t){return this.queryOfType(e,t,"boolean")}async queryVoid(e,t){return this.queryOfType(e,t,"void")}async queryOfType(e,t,r){const n=await this.query(e,t);if(n.resultType===r)return await n.execute();throw new Error(`Query result type '${r}' was expected, while '${n.resultType}' was found.`)}async query(e,t){const r=await this.queryOrExplain(e,t);if("explain"in r)throw new Error("Tried to explain a query when in query-only mode");return r}async explain(e,t,r){return t.explain=r,await this.queryOrExplain(e,t)}async queryOrExplain(e,t){const r=i.ActionContext.ensureActionContext(t);r.get(n.KeysInitQuery.noCache)&&await this.invalidateHttpCache();const{result:o}=await this.actorInitQuery.mediatorQueryProcess.mediate({query:e,context:r});return"explain"in o?o:a.internalToFinalResult(o)}async getResultMediaTypes(e){return e=i.ActionContext.ensureActionContext(e),(await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeCombiner.mediate({context:e,mediaTypes:!0})).mediaTypes}async getResultMediaTypeFormats(e){return e=i.ActionContext.ensureActionContext(e),(await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeFormatCombiner.mediate({context:e,mediaTypeFormats:!0})).mediaTypeFormats}async resultToString(e,t,r){if(r=i.ActionContext.ensureActionContext(r),!t)switch(e.resultType){case"bindings":t="application/json";break;case"quads":t="application/trig";break;default:t="simple"}const n={...await a.finalToInternalResult(e),context:r};return(await this.actorInitQuery.mediatorQueryResultSerialize.mediate({context:r,handle:n,handleMediaType:t})).handle}invalidateHttpCache(e,t){return t=i.ActionContext.ensureActionContext(t),this.actorInitQuery.mediatorHttpInvalidate.mediate({url:e,context:t})}static internalToFinalResult(e){switch(e.type){case"bindings":return{resultType:"bindings",execute:async()=>e.bindingsStream,metadata:async()=>await e.metadata(),context:e.context};case"quads":return{resultType:"quads",execute:async()=>e.quadStream,metadata:async()=>await e.metadata(),context:e.context};case"boolean":return{resultType:"boolean",execute:async()=>e.execute(),context:e.context};case"void":return{resultType:"void",execute:async()=>e.execute(),context:e.context}}}static async finalToInternalResult(e){switch(e.resultType){case"bindings":return{type:"bindings",bindingsStream:await e.execute(),metadata:async()=>await e.metadata()};case"quads":return{type:"quads",quadStream:await e.execute(),metadata:async()=>await e.metadata()};case"boolean":return{type:"boolean",execute:()=>e.execute()};case"void":return{type:"void",execute:()=>e.execute()}}}}t.QueryEngineBase=a},15729:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryEngineBase=void 0,i(r(59266),t),i(r(94394),t);var a=r(52295);Object.defineProperty(t,"QueryEngineBase",{enumerable:!0,get:function(){return a.QueryEngineBase}})},35153:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationAssignSourcesExhaustive=void 0;const n=r(6716),i=r(59510),a=r(86789),o=r(32227),s=r(31578);class c extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){const t=e.context.get(o.KeysQueryOperation.querySources)??[];if(0===t.length)return{operation:e.operation,context:e.context};if(1===t.length){const r=t[0],n=e.context.get(o.KeysRdfUpdateQuads.destination);if(!n||r.source.referenceValue===(0,a.getDataDestinationValue)(n))try{const t=await r.source.getSelectorShape(e.context);if(i.ActorQueryOperation.doesShapeAcceptOperation(t,e.operation))return{operation:i.ActorQueryOperation.assignOperationSource(e.operation,r),context:e.context}}catch{}}return{operation:this.assignExhaustive(e.operation,t),context:e.context.delete(o.KeysInitQuery.queryString)}}assignExhaustive(e,t){const r=this;return s.Util.mapOperation(e,{[s.Algebra.types.PATTERN]:(e,r)=>1===t.length?{result:i.ActorQueryOperation.assignOperationSource(e,t[0]),recurse:!1}:{result:r.createUnion(t.map((t=>i.ActorQueryOperation.assignOperationSource(e,t)))),recurse:!1},[s.Algebra.types.LINK]:(e,r)=>1===t.length?{result:i.ActorQueryOperation.assignOperationSource(e,t[0]),recurse:!1}:{result:r.createAlt(t.map((t=>i.ActorQueryOperation.assignOperationSource(e,t)))),recurse:!1},[s.Algebra.types.NPS]:(e,r)=>1===t.length?{result:i.ActorQueryOperation.assignOperationSource(e,t[0]),recurse:!1}:{result:r.createAlt(t.map((t=>i.ActorQueryOperation.assignOperationSource(e,t)))),recurse:!1},[s.Algebra.types.SERVICE]:e=>({result:e,recurse:!1}),[s.Algebra.types.CONSTRUCT]:(e,n)=>({result:n.createConstruct(r.assignExhaustive(e.input,t),e.template),recurse:!1}),[s.Algebra.types.DELETE_INSERT]:(e,n)=>({result:n.createDeleteInsert(e.delete,e.insert,e.where?r.assignExhaustive(e.where,t):void 0),recurse:!1})})}}t.ActorOptimizeQueryOperationAssignSourcesExhaustive=c},94741:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(35153),t)},37919:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationBgpToJoin=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{bgp:(e,t)=>({recurse:!1,result:t.createJoin(e.patterns)})}),context:e.context}}}t.ActorOptimizeQueryOperationBgpToJoin=a},28084:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(37919),t)},64372:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationDescribeToConstructsSubject=void 0;const n=r(6716),i=r(18050),a=r(31578),o=new i.DataFactory,s=new a.Factory;class c extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){if(e.operation.type!==a.Algebra.types.DESCRIBE)throw new Error(`Actor ${this.name} only supports describe operations, but got ${e.operation.type}`);return!0}async run(e){const t=e.operation,r=t.terms.filter((e=>"Variable"!==e.termType)).map((e=>{const t=[o.quad(e,o.variable("__predicate"),o.variable("__object"))];return t.forEach((e=>e.type="pattern")),{input:{type:a.Algebra.types.BGP,patterns:t},template:t,type:"construct"}}));if(r.length!==t.terms.length){let e=[];t.terms.filter((e=>"Variable"===e.termType)).forEach(((t,r)=>{const n=[o.quad(t,o.variable(`__predicate${r}`),o.variable(`__object${r}`))];n.forEach((e=>e.type="pattern")),e=[...e,...n]})),r.push({input:{type:a.Algebra.types.JOIN,input:[t.input,{type:a.Algebra.types.BGP,patterns:e}]},template:e,type:a.Algebra.types.CONSTRUCT})}return{operation:s.createUnion(r,!1),context:e.context}}}t.ActorOptimizeQueryOperationDescribeToConstructsSubject=c},78571:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(64372),t)},18348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationFilterPushdown=void 0;const n=r(6716),i=r(13252),a=r(31578);class o extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){const t=this;return{operation:a.Util.mapOperation(e.operation,{filter(r,n){const i=t.getExpressionVariables(r.expression);return{recurse:!0,result:t.filterPushdown(r.expression,i,r.input,n,e.context)}}}),context:e.context}}getExpressionVariables(e){switch(e.expressionType){case a.Algebra.expressionTypes.AGGREGATE:case a.Algebra.expressionTypes.WILDCARD:throw new Error(`Getting expression variables is not supported for ${e.expressionType}`);case a.Algebra.expressionTypes.EXISTENCE:return a.Util.inScopeVariables(e.input);case a.Algebra.expressionTypes.NAMED:return[];case a.Algebra.expressionTypes.OPERATOR:return(0,i.uniqTerms)(e.args.flatMap((e=>this.getExpressionVariables(e))));case a.Algebra.expressionTypes.TERM:return"Variable"===e.term.termType?[e.term]:[]}}getOverlappingOperations(e,t){const r=[],n=[],i=[];for(const o of e.input){const e=a.Util.inScopeVariables(o);this.variablesSubSetOf(t,e)?r.push(o):this.variablesIntersect(t,e)?n.push(o):i.push(o)}return{fullyOverlapping:r,partiallyOverlapping:n,notOverlapping:i}}filterPushdown(e,t,r,n,i){switch(r.type){case a.Algebra.types.EXTEND:return this.variablesIntersect([r.variable],t)?n.createFilter(r,e):n.createExtend(this.filterPushdown(e,t,r.input,n,i),r.variable,r.expression);case a.Algebra.types.FILTER:return n.createFilter(this.filterPushdown(e,t,r.input,n,i),r.expression);case a.Algebra.types.JOIN:{if(0===r.input.length)return n.createFilter(r,e);const{fullyOverlapping:a,partiallyOverlapping:o,notOverlapping:s}=this.getOverlappingOperations(r,t),c=[];return this.logDebug(i,`Push down filter across join entries with ${a.length} fully overlapping, ${o.length} partially overlapping, and ${s.length} not overlapping`),a.length>0&&c.push(n.createJoin(a.map((r=>this.filterPushdown(e,t,r,n,i))))),o.length>0&&c.push(n.createFilter(n.createJoin(o,!1),e)),s.length>0&&c.push(...s),1===c.length?c[0]:n.createJoin(c)}case a.Algebra.types.NOP:return r;case a.Algebra.types.PROJECT:return this.variablesIntersect(r.variables,t)?n.createProject(this.filterPushdown(e,t,r.input,n,i),r.variables):r;case a.Algebra.types.UNION:{const{fullyOverlapping:a,partiallyOverlapping:o,notOverlapping:s}=this.getOverlappingOperations(r,t),c=[];return this.logDebug(i,`Push down filter across union entries with ${a.length} fully overlapping, ${o.length} partially overlapping, and ${s.length} not overlapping`),a.length>0&&c.push(n.createUnion(a.map((r=>this.filterPushdown(e,t,r,n,i))))),o.length>0&&c.push(n.createFilter(n.createUnion(o,!1),e)),s.length>0&&c.push(...s),1===c.length?c[0]:n.createUnion(c)}case a.Algebra.types.VALUES:return this.variablesIntersect(r.variables,t)?n.createFilter(r,e):r;case a.Algebra.types.LEFT_JOIN:case a.Algebra.types.MINUS:case a.Algebra.types.ALT:case a.Algebra.types.ASK:case a.Algebra.types.BGP:case a.Algebra.types.CONSTRUCT:case a.Algebra.types.DESCRIBE:case a.Algebra.types.DISTINCT:case a.Algebra.types.EXPRESSION:case a.Algebra.types.FROM:case a.Algebra.types.GRAPH:case a.Algebra.types.GROUP:case a.Algebra.types.INV:case a.Algebra.types.LINK:case a.Algebra.types.NPS:case a.Algebra.types.ONE_OR_MORE_PATH:case a.Algebra.types.ORDER_BY:case a.Algebra.types.PATTERN:case a.Algebra.types.REDUCED:case a.Algebra.types.SEQ:case a.Algebra.types.SERVICE:case a.Algebra.types.SLICE:case a.Algebra.types.PATH:case a.Algebra.types.ZERO_OR_MORE_PATH:case a.Algebra.types.ZERO_OR_ONE_PATH:case a.Algebra.types.COMPOSITE_UPDATE:case a.Algebra.types.DELETE_INSERT:case a.Algebra.types.LOAD:case a.Algebra.types.CLEAR:case a.Algebra.types.CREATE:case a.Algebra.types.DROP:case a.Algebra.types.ADD:case a.Algebra.types.MOVE:case a.Algebra.types.COPY:return n.createFilter(r,e)}}variablesIntersect(e,t){return e.some((e=>t.some((t=>e.equals(t)))))}variablesSubSetOf(e,t){return e.length<=t.length&&e.every((e=>t.some((t=>e.equals(t)))))}}t.ActorOptimizeQueryOperationFilterPushdown=o},48989:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(18348),t)},14400:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationGroupSources=void 0;const n=r(6716),i=r(59510),a=r(31578),o=new a.Factory;class s extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){if(i.ActorQueryOperation.getOperationSource(e.operation))throw new Error(`Actor ${this.name} does not work with top-level operation sources.`);return!0}async run(e){return{operation:await this.groupOperation(e.operation,e.context),context:e.context}}async groupOperation(e,t){if(i.ActorQueryOperation.getOperationSource(e)??!("input"in e))return e;if(!Array.isArray(e.input)){const r=await this.groupOperation(e.input,t);if(r.metadata?.scopedSource){const n=i.ActorQueryOperation.getOperationSource(r);i.ActorQueryOperation.doesShapeAcceptOperation(await n.source.getSelectorShape(t),e)&&(this.logDebug(t,`Hoist 1 source-specific operation into a single ${e.type} operation for ${n.source.toString()}`),i.ActorQueryOperation.removeOperationSource(r),e=i.ActorQueryOperation.assignOperationSource(e,n))}return{...e,input:r}}const r=await Promise.all(e.input.map((e=>this.groupOperation(e,t)))),n=this.clusterOperationsWithEqualSources(r);if(1===n.length){const r=n[0],a=i.ActorQueryOperation.getOperationSource(n[0][0]);return{...await this.moveSourceAnnotationUpwardsIfPossible(e,r,a,t),input:r}}if(n.length===r.length)return{...e,input:r};let s;switch(e.type){case a.Algebra.types.JOIN:s=o.createJoin.bind(o);break;case a.Algebra.types.UNION:s=o.createUnion.bind(o);break;case a.Algebra.types.ALT:s=o.createAlt.bind(o);break;case a.Algebra.types.SEQ:s=o.createSeq.bind(o);break;default:throw new Error(`Unsupported operation '${e.type}' detected while grouping sources`)}return await this.groupOperationMulti(n,s,t)}async groupOperationMulti(e,t,r){let n=!0;const a=await Promise.all(e.map((async e=>{const a=i.ActorQueryOperation.getOperationSource(e[0]),o=await this.moveSourceAnnotationUpwardsIfPossible(t(e,!0),e,a,r);return i.ActorQueryOperation.getOperationSource(o)&&(n=!1),o})));return t(a,n)}clusterOperationsWithEqualSources(e){const t=new Map,r=[];for(const n of e){const e=i.ActorQueryOperation.getOperationSource(n);e?(t.has(e)||t.set(e,[]),t.get(e).push(n)):r.push(n)}const n=[];r.length>0&&n.push(r);for(const[e,r]of t.entries())n.push(r.map((t=>i.ActorQueryOperation.assignOperationSource(t,e))));return n}async moveSourceAnnotationUpwardsIfPossible(e,t,r,n){if(r&&i.ActorQueryOperation.doesShapeAcceptOperation(await r.source.getSelectorShape(n),e)){this.logDebug(n,`Hoist ${t.length} source-specific operations into a single ${e.type} operation for ${r.source.toString()}`),e=i.ActorQueryOperation.assignOperationSource(e,r);for(const e of t)i.ActorQueryOperation.removeOperationSource(e)}return e}}t.ActorOptimizeQueryOperationGroupSources=s},78992:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(14400),t)},90042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationJoinBgp=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{join:(e,t)=>e.input.every((e=>"bgp"===e.type))?{recurse:!1,result:t.createBgp(e.input.flatMap((e=>e.patterns)))}:{recurse:!1,result:e}}),context:e.context}}}t.ActorOptimizeQueryOperationJoinBgp=a},46980:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(90042),t)},33186:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationJoinConnected=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{join:(e,t)=>({recurse:!1,result:a.cluster(e,t)})}),context:e.context}}static cluster(e,t){let r,n=e.input.map((e=>({inScopeVariables:Object.fromEntries(i.Util.inScopeVariables(e).map((e=>[e.value,!0]))),entries:[e]})));do{r=n,n=a.clusterIteration(r)}while(r.length!==n.length);const o=n.map((e=>t.createJoin(e.entries)));return 1===o.length?o[0]:t.createJoin(o,!1)}static clusterIteration(e){const t=[];for(const r of e){let e=!1;for(const n of t)if(a.haveOverlappingVariables(r.inScopeVariables,n.inScopeVariables)){n.entries=[...n.entries,...r.entries],n.inScopeVariables={...n.inScopeVariables,...r.inScopeVariables},e=!0;break}e||t.push({inScopeVariables:r.inScopeVariables,entries:r.entries})}return t}static haveOverlappingVariables(e,t){for(const r of Object.keys(e))if(t[r])return!0;return!1}}t.ActorOptimizeQueryOperationJoinConnected=a},98498:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(33186),t)},92834:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationPruneEmptySourceOperations=void 0;const n=r(6716),i=r(59510),a=r(32227),o=r(18050),s=r(31578),c=new s.Factory,u=new o.DataFactory;class l extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){if(i.ActorQueryOperation.getOperationSource(e.operation))throw new Error(`Actor ${this.name} does not work with top-level operation sources.`);return!0}async run(e){let t=e.operation;const r=[],n=this;s.Util.recurseOperation(t,{[s.Algebra.types.UNION]:e=>(n.collectMultiOperationInputs(e.input,r,s.Algebra.types.PATTERN),!0),[s.Algebra.types.ALT]:e=>(n.collectMultiOperationInputs(e.input,r,s.Algebra.types.LINK),!1),[s.Algebra.types.SERVICE]:()=>!1});const a=new Set;return await Promise.all(r.map((async t=>{const r="link"===t.type?c.createPattern(u.variable("?s"),t.iri,u.variable("?o")):t;await this.hasSourceResults(i.ActorQueryOperation.getOperationSource(t),r,e.context)||a.add(t)}))),a.size>0&&(this.logDebug(e.context,`Pruning ${a.size} source-specific operations`),t=s.Util.mapOperation(t,{[s.Algebra.types.UNION]:(e,t)=>n.mapMultiOperation(e,a,(e=>t.createUnion(e))),[s.Algebra.types.ALT]:(e,t)=>n.mapMultiOperation(e,a,(e=>t.createAlt(e)))}),t=s.Util.mapOperation(t,{[s.Algebra.types.PROJECT](e,t){let r=!1;return s.Util.recurseOperation(e,{[s.Algebra.types.UNION]:e=>(0===e.input.length&&(r=!0),!0),[s.Algebra.types.ALT]:e=>(0===e.input.length&&(r=!0),!0)}),r?{recurse:!1,result:t.createUnion([])}:{recurse:!0,result:e}}})),{operation:t,context:e.context}}collectMultiOperationInputs(e,t,r){for(const n of e)i.ActorQueryOperation.getOperationSource(n)&&n.type===r&&t.push(n)}mapMultiOperation(e,t,r){const n=e.input.filter((e=>!t.has(e)));return n.length===e.input.length?{result:e,recurse:!0}:0===n.length?{result:r([]),recurse:!1}:1===n.length?{result:n[0],recurse:!0}:{result:r(n),recurse:!0}}async hasSourceResults(e,t,r){if(e.context?.get(a.KeysQuerySourceIdentify.traverse))return!0;if(this.useAskIfSupported){const n=c.createAsk(t);if(i.ActorQueryOperation.doesShapeAcceptOperation(await e.source.getSelectorShape(r),n))return e.source.queryBoolean(n,r)}const n=e.source.queryBindings(t,r);return new Promise(((e,t)=>{n.on("error",t),n.getProperty("metadata",(t=>{n.destroy(),e(t.cardinality.value>0)}))}))}}t.ActorOptimizeQueryOperationPruneEmptySourceOperations=l},94607:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(92834),t)},13614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationRewriteAdd=void 0;const n=r(6716),i=r(18050),a=r(31578),o=new i.DataFactory;class s extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){return{operation:a.Util.mapOperation(e.operation,{[a.Algebra.types.ADD](e,t){const r="DEFAULT"===e.destination?o.defaultGraph():e.destination,n="DEFAULT"===e.source?o.defaultGraph():e.source;return{result:t.createDeleteInsert(void 0,[t.createPattern(o.variable("s"),o.variable("p"),o.variable("o"),r)],t.createPattern(o.variable("s"),o.variable("p"),o.variable("o"),n)),recurse:!1}}}),context:e.context}}}t.ActorOptimizeQueryOperationRewriteAdd=s},63514:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(13614),t)},25812:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationRewriteCopy=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{[i.Algebra.types.COPY](e,t){let r;return r="string"==typeof e.destination&&"string"==typeof e.source&&e.destination===e.source||"string"!=typeof e.destination&&"string"!=typeof e.source&&e.destination.equals(e.source)?t.createCompositeUpdate([]):t.createCompositeUpdate([t.createDrop(e.destination,!0),t.createAdd(e.source,e.destination,e.silent)]),{result:r,recurse:!1}}}),context:e.context}}}t.ActorOptimizeQueryOperationRewriteCopy=a},15718:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(25812),t)},90348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationRewriteMove=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{[i.Algebra.types.MOVE](e,t){let r;if("string"==typeof e.destination&&"string"==typeof e.source&&e.destination===e.source||"string"!=typeof e.destination&&"string"!=typeof e.source&&e.destination.equals(e.source))r=t.createCompositeUpdate([]);else{const n=[t.createDrop(e.destination,!0),t.createAdd(e.source,e.destination,e.silent),t.createDrop(e.source)];r=t.createCompositeUpdate(n)}return{result:r,recurse:!1}}}),context:e.context}}}t.ActorOptimizeQueryOperationRewriteMove=a},83910:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(90348),t)},82476:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationAsk=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"ask")}async testOperation(e,t){return!0}async runOperation(e,t){const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t}),{bindingsStream:i}=n.ActorQueryOperation.getSafeBindings(r);return{type:"boolean",execute:async()=>1===(await i.take(1).toArray()).length}}}t.ActorQueryOperationAsk=i},57321:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(82476),t)},9147:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationBgpJoin=void 0;const n=r(59510),i=r(31578);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"bgp")}async testOperation(e,t){return!0}async runOperation(e,t){return this.mediatorQueryOperation.mediate({operation:a.FACTORY.createJoin(e.patterns),context:t})}}t.ActorQueryOperationBgpJoin=a,a.FACTORY=new i.Factory},20888:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(9147),t)},59516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationConstruct=void 0;const n=r(59510),i=r(13252),a=r(31578),o=r(59218);class s extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"construct")}static getVariables(e){return(0,i.uniqTerms)([].concat.apply([],e.map((e=>(0,i.getVariables)((0,i.getTermsNested)(e))))))}async testOperation(e,t){return!0}async runOperation(e,t){const r=s.getVariables(e.template),i={type:a.Algebra.types.PROJECT,input:e.input,variables:r},c=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:i,context:t}));return{metadata:()=>c.metadata().then((t=>({...t,order:void 0,cardinality:{type:t.cardinality.type,value:t.cardinality.value*e.template.length},canContainUndefs:!1,availableOrders:void 0}))),quadStream:new o.BindingsToQuadsIterator(e.template,c.bindingsStream),type:"quads"}}}t.ActorQueryOperationConstruct=s},59218:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsToQuadsIterator=void 0;const n=r(76664),i=r(18050),a=r(13252),o=new i.DataFactory;class s extends n.MultiTransformIterator{constructor(e,t){super(t,{autoStart:!1}),this.template=e,this.blankNodeCounter=0}static bindTerm(e,t){return"Variable"===t.termType?e.get(t):t}static bindQuad(e,t){try{return(0,a.mapTermsNested)(t,(t=>{const r=s.bindTerm(e,t);if(!r)throw new Error("Unbound term");return r}))}catch{}}static localizeBlankNode(e,t){return"BlankNode"===t.termType?o.blankNode(`${t.value}${e}`):t}static localizeQuad(e,t){return(0,a.mapTermsNested)(t,(t=>s.localizeBlankNode(e,t)))}bindTemplate(e,t,r){return t.map(s.localizeQuad.bind(null,r)).map((t=>s.bindQuad.bind(null,e)(t))).filter(Boolean)}_createTransformer(e){return new n.ArrayIterator(this.bindTemplate(e,this.template,this.blankNodeCounter++),{autoStart:!1})}}t.BindingsToQuadsIterator=s},88749:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(59516),t),i(r(59218),t)},50403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationDistinctHash=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"distinct")}async testOperation(e,t){return!0}async runOperation(e,t){const r=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:t}));return{type:"bindings",bindingsStream:r.bindingsStream.filter(await this.newHashFilter(t)),metadata:r.metadata}}async newHashFilter(e){const{hashFunction:t}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:e}),r={};return e=>{const n=t(e);return!(n in r)&&(r[n]=!0)}}}t.ActorQueryOperationDistinctHash=i},13867:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(50403),t)},50372:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationExtend=void 0;const n=r(91674),i=r(59510),a=r(61621);class o extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"extend")}async testOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);return Boolean(new a.AsyncEvaluator(e.expression,i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r))),!0}async runOperation(e,t){const{expression:r,input:o,variable:s}=e,c=i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:o,context:t}));if((await c.metadata()).variables.some((e=>e.equals(s))))throw new Error(`Illegal binding to variable '${s.value}' that has already been bound`);const u=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),l={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,u)},d=new a.AsyncEvaluator(r,l),h=c.bindingsStream.transform({autoStart:!1,transform:async(e,r,i)=>{try{const t=await d.evaluate(e);i(e.set(s,t))}catch(r){(0,a.isExpressionError)(r)?(i(e),this.logWarn(t,`Expression error for extend operation (${r.message})with bindings '${(0,n.bindingsToString)(e)}'`)):h.emit("error",r)}r()}});return{type:"bindings",bindingsStream:h,async metadata(){const e=await c.metadata();return{...e,variables:[...e.variables,s]}}}}}t.ActorQueryOperationExtend=o},19724:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(50372),t)},64452:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationFilter=void 0;const n=r(91674),i=r(59510),a=r(61621);class o extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"filter")}async testOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),o={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r)};return new a.AsyncEvaluator(e.expression,o),!0}async runOperation(e,t){const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t}),o=i.ActorQueryOperation.getSafeBindings(r);i.ActorQueryOperation.validateQueryOutput(o,"bindings");const s=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),c={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,s)},u=new a.AsyncEvaluator(e.expression,c),l=o.bindingsStream.transform({transform:async(e,r,i)=>{try{await u.evaluateAsEBV(e)&&i(e)}catch(r){(0,a.isExpressionError)(r)?this.logWarn(t,"Error occurred while filtering.",(()=>({error:r,bindings:(0,n.bindingsToString)(e)}))):l.emit("error",r)}r()},autoStart:!1});return{type:"bindings",bindingsStream:l,metadata:o.metadata}}}t.ActorQueryOperationFilter=o},74578:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(64452),t)},71819:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationFromQuad=void 0;const n=r(59510),i=r(31578);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"from")}static copyOperation(e,t){const r={};for(const n of Object.keys(e))Array.isArray(e[n])&&"template"!==n?r[n]="variables"===n?e[n]:e[n].map(t):a.ALGEBRA_TYPES.includes(e[n].type)?r[n]=t(e[n]):r[n]=e[n];return r}static applyOperationDefaultGraph(e,t){if("bgp"===e.type&&e.patterns.length>0||"path"===e.type||"pattern"===e.type){if("bgp"===e.type)return a.joinOperations(e.patterns.map((e=>{if("DefaultGraph"!==e.graph.termType)return a.FACTORY.createBgp([e]);const r=t.map((t=>a.FACTORY.createBgp([Object.assign(a.FACTORY.createPattern(e.subject,e.predicate,e.object,t),{metadata:e.metadata})])));return a.unionOperations(r)})));if("DefaultGraph"!==e.graph.termType)return e;const r=t.map((t=>"path"===e.type?a.FACTORY.createPath(e.subject,e.predicate,e.object,t):Object.assign(a.FACTORY.createPattern(e.subject,e.predicate,e.object,t),{metadata:e.metadata})));return a.unionOperations(r)}return a.copyOperation(e,(e=>this.applyOperationDefaultGraph(e,t)))}static applyOperationNamedGraph(e,t,r){if("bgp"===e.type&&e.patterns.length>0||"path"===e.type||"pattern"===e.type){const n="bgp"===e.type?e.patterns[0].graph:e.graph;if("DefaultGraph"===n.termType)return{type:i.Algebra.types.BGP,patterns:[]};if("Variable"===n.termType){if(1===t.length){const r=t[0],i={};i[`?${n.value}`]=r;const o=a.FACTORY.createValues([n],[i]);let s;return s="bgp"===e.type?a.FACTORY.createBgp(e.patterns.map((e=>a.FACTORY.createPattern(e.subject,e.predicate,e.object,r)))):"path"===e.type?a.FACTORY.createPath(e.subject,e.predicate,e.object,r):a.FACTORY.createPattern(e.subject,e.predicate,e.object,r),a.FACTORY.createJoin([o,s])}return a.unionOperations(t.map((t=>a.applyOperationNamedGraph(e,[t],r))))}return[...t,...r].some((e=>e.equals(n)))?e:{type:i.Algebra.types.BGP,patterns:[]}}return a.copyOperation(e,(e=>this.applyOperationNamedGraph(e,t,r)))}static joinOperations(e){if(1===e.length)return e[0];if(e.length>1)return a.FACTORY.createJoin(e);throw new Error("A join can only be applied on at least one operation")}static unionOperations(e){if(1===e.length)return e[0];if(e.length>1)return a.FACTORY.createUnion(e);throw new Error("A union can only be applied on at least one operation")}static createOperation(e){let t=e.input;return e.default.length>0&&(t=a.applyOperationDefaultGraph(t,e.default)),(e.named.length>0||e.default.length>0)&&(t=a.applyOperationNamedGraph(t,e.named,e.default)),t}async testOperation(e,t){return!0}async runOperation(e,t){const r=a.createOperation(e);return this.mediatorQueryOperation.mediate({operation:r,context:t})}}t.ActorQueryOperationFromQuad=a,a.FACTORY=new i.Factory,a.ALGEBRA_TYPES=Object.keys(i.Algebra.types).map((e=>i.Algebra.types[e]))},37572:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(71819),t)},39712:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationGroup=void 0;const n=r(91674),i=r(59510),a=r(61621),o=r(76664),s=r(50626);class c extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"group")}async testOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);for(const n of e.aggregates)new a.AsyncEvaluator(n.expression,i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r));return!0}async runOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),{hashFunction:a}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:t}),{input:c,aggregates:u}=e,l=await this.mediatorQueryOperation.mediate({operation:c,context:t}),d=i.ActorQueryOperation.getSafeBindings(l),h=[...e.variables,...u.map((e=>e.variable))],p=i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r);return{type:"bindings",bindingsStream:new o.TransformIterator((()=>new Promise(((t,n)=>{const i=new s.GroupsState(a,e,p,r);d.bindingsStream.on("end",(async()=>{try{const e=new o.ArrayIterator(await i.collectResults(),{autoStart:!1});t(e)}catch(e){n(e)}})),d.bindingsStream.on("error",n),d.bindingsStream.on("data",(e=>{i.consumeBindings(e).catch(n)}))}))),{autoStart:!1}),metadata:async()=>({...await d.metadata(),variables:h})}}}t.ActorQueryOperationGroup=c},50626:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupsState=void 0;const n=r(61621),i=new(r(18050).DataFactory);t.GroupsState=class{constructor(e,t,r,n){this.hashFunction=e,this.pattern=t,this.sparqleeConfig=r,this.bindingsFactory=n,this.groups=new Map,this.groupsInitializer=new Map,this.groupVariables=new Set(this.pattern.variables.map((e=>e.value))),this.distinctHashes=t.aggregates.some((({distinct:e})=>e))?new Map:null,this.waitCounter=1,this.resultHasBeenCalled=!1}consumeBindings(e){const t=this.resultCheck();if(t)return t;this.waitCounter++;const r=e.filter(((e,t)=>this.groupVariables.has(t.value))),i=this.hashBindings(r);let a,o=this.groupsInitializer.get(i);if(o){const t=o;a=(async()=>{const r=await t;await Promise.all(this.pattern.aggregates.map((async t=>{if(t.distinct){const t=this.hashBindings(e);if(this.distinctHashes.get(i).has(t))return;this.distinctHashes.get(i).add(t)}const n=t.variable.value;await r.aggregators[n].put(e)})))})().then((async()=>{this.subtractWaitCounterAndCollect()}))}else o=(async()=>{const t={};if(await Promise.all(this.pattern.aggregates.map((async r=>{const i=r.variable.value;t[i]=new n.AsyncAggregateEvaluator(r,this.sparqleeConfig),await t[i].put(e)}))),this.distinctHashes){const t=this.hashBindings(e);this.distinctHashes.set(i,new Set([t]))}const a={aggregators:t,bindings:r};return this.groups.set(i,a),this.subtractWaitCounterAndCollect(),a})(),this.groupsInitializer.set(i,o),a=o;return a}subtractWaitCounterAndCollect(){0==--this.waitCounter&&this.handleResultCollection()}handleResultCollection(){let e=[...this.groups].map((([e,t])=>{const{bindings:r,aggregators:n}=t;let a=r;for(const e in n){const t=n[e].result();t&&(a=a.set(i.variable(e),t))}return a}));if(0===e.length&&0===this.groupVariables.size){const t=[];for(const e of this.pattern.aggregates){const r=e.variable,i=n.AsyncAggregateEvaluator.emptyValue(e);void 0!==i&&t.push([r,i])}e=[this.bindingsFactory.bindings(t)]}this.waitResolver(e)}resultCheck(){if(this.resultHasBeenCalled)return Promise.reject(new Error("Calling any function after calling collectResult is invalid."))}collectResults(){const e=this.resultCheck();if(e)return e;this.resultHasBeenCalled=!0;const t=new Promise((e=>{this.waitResolver=e}));return this.subtractWaitCounterAndCollect(),t}hashBindings(e){return this.hashFunction(e)}}},47007:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(39712),t)},54052:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationJoin=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"join")}async testOperation(e,t){return!0}async runOperation(e,t){const r=(await Promise.all(e.input.map((async e=>({output:await this.mediatorQueryOperation.mediate({operation:e,context:t}),operation:e}))))).map((({output:e,operation:t})=>({output:n.ActorQueryOperation.getSafeBindings(e),operation:t})));return this.mediatorJoin.mediate({type:"inner",entries:r,context:t})}}t.ActorQueryOperationJoin=i},40980:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(54052),t)},18152:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationLeftJoin=void 0;const n=r(91674),i=r(59510),a=r(61621);class o extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"leftjoin")}async testOperation(e,t){return!0}async runOperation(e,t){const r=(await Promise.all(e.input.map((async e=>({output:await this.mediatorQueryOperation.mediate({operation:e,context:t}),operation:e}))))).map((({output:e,operation:t})=>({output:i.ActorQueryOperation.getSafeBindings(e),operation:t}))),o=await this.mediatorJoin.mediate({type:"optional",entries:r,context:t});if(e.expression){const s=(await r[1].output.metadata()).variables,c=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),u={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,c)},l=new a.AsyncEvaluator(e.expression,u),d=o.bindingsStream.transform({autoStart:!1,transform:async(e,r,n)=>{if(!s.every((t=>e.has(t.value))))return n(e),r();try{await l.evaluateAsEBV(e)&&n(e)}catch(r){(0,a.isExpressionError)(r)?this.logWarn(t,"Error occurred while filtering.",(()=>({error:r,bindings:e}))):d.emit("error",r)}r()}});o.bindingsStream=d}return o}}t.ActorQueryOperationLeftJoin=o},33149:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(18152),t)},34358:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationMinus=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"minus")}async testOperation(e,t){return!0}async runOperation(e,t){const r=(await Promise.all(e.input.map((async e=>({output:await this.mediatorQueryOperation.mediate({operation:e,context:t}),operation:e}))))).map((({output:e,operation:t})=>({output:n.ActorQueryOperation.getSafeBindings(e),operation:t})));return this.mediatorJoin.mediate({type:"minus",entries:r,context:t})}}t.ActorQueryOperationMinus=i},19948:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(34358),t)},92052:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationNop=void 0;const n=r(91674),i=r(59510),a=r(72394),o=r(76664);class s extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"nop")}async testOperation(e,t){return!0}async runOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);return{bindingsStream:new o.SingletonIterator(r.bindings()),metadata:()=>Promise.resolve({state:new a.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]}),type:"bindings"}}}t.ActorQueryOperationNop=s},35021:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(92052),t)},97236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationOrderBy=void 0;const n=r(91674),i=r(59510),a=r(61621),o=r(31578),s=r(36211);class c extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"orderby"),this.window=e.window??Number.POSITIVE_INFINITY}async testOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);for(let n of e.expressions)n=this.extractSortExpression(n),new a.AsyncEvaluator(n,i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r));return!0}async runOperation(e,t){const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t}),o=i.ActorQueryOperation.getSafeBindings(r),c={window:this.window},u=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),l={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,u)};let{bindingsStream:d}=o;for(let t=e.expressions.length-1;t>=0;t--){let r=e.expressions[t];const n=this.isAscending(r);r=this.extractSortExpression(r);const i=new a.AsyncEvaluator(r,l),o=async(e,t,r)=>{try{r({bindings:e,result:await i.evaluate(e)})}catch(t){(0,a.isExpressionError)(t)||d.emit("error",t),r({bindings:e,result:void 0})}t()},u=d.transform({transform:o}),h=new s.SortIterator(u,((e,t)=>{let r=(0,a.orderTypes)(e.result,t.result);return n||(r*=-1),r}),c);d=h.map((({bindings:e})=>e))}return{type:"bindings",bindingsStream:d,metadata:o.metadata}}extractSortExpression(e){const{expressionType:t,operator:r}=e;return t!==o.Algebra.expressionTypes.OPERATOR?e:"desc"===r?e.args[0]:e}isAscending(e){const{expressionType:t,operator:r}=e;return t!==o.Algebra.expressionTypes.OPERATOR||"desc"!==r}}t.ActorQueryOperationOrderBy=c},36211:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SortIterator=void 0;const n=r(76664);class i extends n.TransformIterator{constructor(e,t,r){super(e,r);const n=r&&r.window;this.windowLength=Number.isFinite(n)&&n>0?n:Number.POSITIVE_INFINITY,this.sort=t,this.sorted=[]}_read(e,t){let r,{length:n}=this.sorted;for(;n!==this.windowLength&&(r=this.source.read(),null!==r);){let e,t,i=0,a=n-1;for(;i<=a;)e=Math.trunc((i+a)/2),t=this.sort(r,this.sorted[e]),t<0?i=e+1:t>0?a=e-1:(i=e,a=-1);this.sorted.splice(i,0,r),n++}n===this.windowLength&&this._push(this.sorted.pop()),t()}_flush(e){let{length:t}=this.sorted;for(;t--;)this._push(this.sorted.pop());e()}}t.SortIterator=i},80797:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(97236),t)},79675:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathAlt=void 0;const n=r(43543),i=r(19779),a=r(59510),o=r(76664),s=r(31578);class c extends n.ActorAbstractPath{constructor(e){super(e,s.Algebra.types.ALT)}async runOperation(e,t){const r=e.predicate,s=(await Promise.all(r.input.map((r=>this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.subject,r,e.object,e.graph)}))))).map(a.ActorQueryOperation.getSafeBindings);return{type:"bindings",bindingsStream:new o.UnionIterator(s.map((e=>e.bindingsStream)),{autoStart:!1}),metadata:()=>Promise.all(s.map((e=>e.metadata()))).then((e=>i.ActorQueryOperationUnion.unionMetadata(e,!0,t,this.mediatorRdfMetadataAccumulate)))}}}t.ActorQueryOperationPathAlt=c},16733:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(79675),t)},21471:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathInv=void 0;const n=r(43543),i=r(31578);class a extends n.ActorAbstractPath{constructor(e){super(e,i.Algebra.types.INV)}async runOperation(e,t){const r=e.predicate,i=n.ActorAbstractPath.FACTORY.createPath(e.object,r.path,e.subject,e.graph);return this.mediatorQueryOperation.mediate({operation:i,context:t})}}t.ActorQueryOperationPathInv=a},88317:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(21471),t)},60333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathLink=void 0;const n=r(43543),i=r(31578);class a extends n.ActorAbstractPath{constructor(e){super(e,i.Algebra.types.LINK)}async runOperation(e,t){const r=e.predicate,i=Object.assign(n.ActorAbstractPath.FACTORY.createPattern(e.subject,r.iri,e.object,e.graph),{metadata:r.metadata});return this.mediatorQueryOperation.mediate({operation:i,context:t})}}t.ActorQueryOperationPathLink=a},91430:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(60333),t)},62203:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathNps=void 0;const n=r(43543),i=r(59510),a=r(31578);class o extends n.ActorAbstractPath{constructor(e){super(e,a.Algebra.types.NPS)}async runOperation(e,t){const r=e.predicate,a=this.generateVariable(e),o=Object.assign(n.ActorAbstractPath.FACTORY.createPattern(e.subject,a,e.object,e.graph),{metadata:r.metadata}),s=i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:o,context:t}));return{type:"bindings",bindingsStream:s.bindingsStream.map((e=>r.iris.some((t=>t.equals(e.get(a))))?null:e.delete(a))),metadata:s.metadata}}}t.ActorQueryOperationPathNps=o},56993:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(62203),t)},82265:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathOneOrMore=void 0;const n=r(43543),i=r(91674),a=r(59510),o=r(76664),s=r(31578);class c extends n.ActorAbstractPath{constructor(e){super(e,s.Algebra.types.ONE_OR_MORE_PATH)}async runOperation(e,t){const r=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,t),s=await this.isPathArbitraryLengthDistinct(t,e);if(s.operation)return s.operation;t=s.context;const c=e.predicate;if("Variable"!==e.subject.termType&&"Variable"===e.object.termType){const n=e.object,i=await this.getObjectsPredicateStarEval(e.subject,c.path,n,e.graph,t,!1,r),a="Variable"===e.graph.termType?[n,e.graph]:[n];return{type:"bindings",bindingsStream:i.bindingsStream,metadata:async()=>({...await i.metadata(),variables:a})}}if("Variable"===e.subject.termType&&"Variable"===e.object.termType){const i=n.ActorAbstractPath.FACTORY.createDistinct(n.ActorAbstractPath.FACTORY.createPath(e.subject,e.predicate.path,e.object,e.graph)),s=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:i})),u=e.subject,l=e.object,d={},h=new o.MultiTransformIterator(s.bindingsStream,{multiTransform:n=>{const i=n.get(u),a=n.get(l),s="Variable"===e.graph.termType?n.get(e.graph):e.graph;return new o.TransformIterator((async()=>{const n=new o.BufferedIterator;return await this.getSubjectAndObjectBindingsPredicateStar(u,l,i,a,c.path,s,t,d,{},n,{count:0},r),n.transform({transform(t,r,n){"Variable"===e.graph.termType&&(t=t.set(e.graph,s)),n(t),r()}})}),{maxBufferSize:128})},autoStart:!1}),p="Variable"===e.graph.termType?[u,l,e.graph]:[u,l];return{type:"bindings",bindingsStream:h,metadata:async()=>({...await s.metadata(),variables:p})}}if("Variable"===e.subject.termType&&"Variable"!==e.object.termType)return this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.object,n.ActorAbstractPath.FACTORY.createOneOrMorePath(n.ActorAbstractPath.FACTORY.createInv(c.path)),e.subject,e.graph)});const u=this.generateVariable(),l=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.subject,c,u,e.graph)}));return{type:"bindings",bindingsStream:l.bindingsStream.transform({filter:t=>e.object.equals(t.get(u)),transform(t,n,i){i("Variable"===e.graph.termType?r.bindings([[e.graph,t.get(e.graph)]]):r.bindings()),n()}}),metadata:async()=>({...await l.metadata(),variables:"Variable"===e.graph.termType?[e.graph]:[]})}}}t.ActorQueryOperationPathOneOrMore=c},90658:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(82265),t)},64747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathSeq=void 0;const n=r(43543),i=r(59510),a=r(31578);class o extends n.ActorAbstractPath{constructor(e){super(e,a.Algebra.types.SEQ)}async runOperation(e,t){const r=e.predicate;let a=e.subject;const o=[],s=await Promise.all(r.input.map(((i,s)=>{const c=s===r.input.length-1?e.object:this.generateVariable(e,`b${s}`),u=n.ActorAbstractPath.FACTORY.createPath(a,i,c,e.graph),l=this.mediatorQueryOperation.mediate({context:t,operation:u});return a=c,s({output:i.ActorQueryOperation.getSafeBindings(await e),operation:t})))),c=i.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:"inner",entries:s,context:t}));return{type:"bindings",bindingsStream:c.bindingsStream.transform({transform(e,t,r){for(const t of o)e=e.delete(t);r(e),t()}}),async metadata(){const e=await c.metadata(),t=e.variables.filter((e=>!o.some((t=>t.value===e.value))));return{...e,variables:t}}}}}t.ActorQueryOperationPathSeq=o},28261:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(64747),t)},68037:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathZeroOrMore=void 0;const n=r(43543),i=r(91674),a=r(59510),o=r(76664),s=r(22112),c=r(31578);class u extends n.ActorAbstractPath{constructor(e){super(e,c.Algebra.types.ZERO_OR_MORE_PATH)}async runOperation(e,t){const r=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,t),c=await this.isPathArbitraryLengthDistinct(t,e);if(c.operation)return c.operation;t=c.context;const u=e.predicate,l=this.getPathSources(u),d="Variable"===e.subject.termType,h="Variable"===e.object.termType;if("Variable"===e.subject.termType&&"Variable"===e.object.termType){const i=this.generateVariable(e),c=this.assignPatternSources(n.ActorAbstractPath.FACTORY.createPattern(e.subject,i,e.object,e.graph),l),d=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:c})),h=e.subject,p=e.object,f=new Set,y={},g=new o.MultiTransformIterator(d.bindingsStream,{multiTransform:n=>{const i=n.get(h),a=n.get(p),c="Variable"===e.graph.termType?n.get(e.graph):e.graph,l=(0,s.termToString)(i)+(0,s.termToString)(c),d=(0,s.termToString)(a)+(0,s.termToString)(c);return new o.TransformIterator((async()=>{if(f.has(l)&&f.has(d))return new o.EmptyIterator;const n=new o.BufferedIterator,s={count:0};return f.has(l)||(f.add(l),await this.getSubjectAndObjectBindingsPredicateStar(h,p,i,i,u.path,c,t,y,{},n,s,r)),f.has(d)||(f.add(d),await this.getSubjectAndObjectBindingsPredicateStar(h,p,a,a,u.path,c,t,y,{},n,s,r)),n.transform({transform(t,r,n){"Variable"===e.graph.termType&&(t=t.set(e.graph,c)),n(t),r()}})}))}}),m="Variable"===e.graph.termType?[h,e.object,e.graph]:[h,e.object];return{type:"bindings",bindingsStream:g,metadata:async()=>({...await d.metadata(),variables:m})}}if(!d&&!h){const n=this.generateVariable(),i=await this.getObjectsPredicateStarEval(e.subject,u.path,n,e.graph,t,!0,r);return{type:"bindings",bindingsStream:i.bindingsStream.transform({filter:t=>e.object.equals(t.get(n)),transform(t,n,i){i("Variable"===e.graph.termType?r.bindings([[e.graph,t.get(e.graph)]]):r.bindings()),n()}}),metadata:async()=>({...await i.metadata(),variables:"Variable"===e.graph.termType?[e.graph]:[]})}}const p=d?e.object:e.subject,f=d?e.subject:e.object,y=d?n.ActorAbstractPath.FACTORY.createInv(u.path):u.path,g=await this.getObjectsPredicateStarEval(p,y,f,e.graph,t,!0,r),m="Variable"===e.graph.termType?[f,e.graph]:[f];return{type:"bindings",bindingsStream:g.bindingsStream,metadata:async()=>({...await g.metadata(),variables:m})}}}t.ActorQueryOperationPathZeroOrMore=u},60436:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(68037),t)},81231:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathZeroOrOne=void 0;const n=r(43543),i=r(91674),a=r(59510),o=r(72394),s=r(76664),c=r(31578);class u extends n.ActorAbstractPath{constructor(e){super(e,c.Algebra.types.ZERO_OR_ONE_PATH)}async runOperation(e,t){const r=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,t),c=e.predicate,u=this.getPathSources(c),l=[];if("Variable"!==e.subject.termType&&"Variable"!==e.object.termType&&e.subject.equals(e.object))return{type:"bindings",bindingsStream:new s.SingletonIterator(r.bindings()),metadata:()=>Promise.resolve({state:new o.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]})};const d=await this.isPathArbitraryLengthDistinct(t,e);if(d.operation)return d.operation;t=d.context;const h=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.subject,c.path,e.object,e.graph)}));let p;if("Variable"===e.subject.termType&&"Variable"===e.object.termType){const r=this.generateVariable(e),i=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createFilter(this.assignPatternSources(n.ActorAbstractPath.FACTORY.createPattern(e.subject,r,e.object,e.graph),u),n.ActorAbstractPath.FACTORY.createOperatorExpression("=",[n.ActorAbstractPath.FACTORY.createTermExpression(e.subject),n.ActorAbstractPath.FACTORY.createTermExpression(e.object)]))})).bindingsStream.map((e=>e.delete(r)));p=new s.UnionIterator([i,h.bindingsStream],{autoStart:!1})}else"Variable"===e.subject.termType&&l.push(r.bindings([[e.subject,e.object]])),"Variable"===e.object.termType&&l.push(r.bindings([[e.object,e.subject]])),p=h.bindingsStream.prepend(l);return{type:"bindings",bindingsStream:p,metadata:h.metadata}}}t.ActorQueryOperationPathZeroOrOne=u},32091:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(81231),t)},1892:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationProject=void 0;const n=r(59510),i=r(85156),a=new(r(18050).DataFactory);class o extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"project")}async testOperation(e,t){return!0}async runOperation(e,t){const r=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:t})),o=await r.metadata(),s=e.variables,c=o.variables.filter((e=>!s.some((t=>e.value===t.value)))),u=s.filter((e=>!o.variables.some((t=>e.value===t.value))));if(u.length>0)throw new Error(`Variables '${u.map((e=>`?${e.value}`))}' are used in the projection result, but are not assigned.`);let l=0===c.length?r.bindingsStream:r.bindingsStream.map((e=>{for(const t of c)e=e.delete(t);return e})),d=0;return l=l.map((e=>{d++;const t=new Map;return e.map((e=>{if(e instanceof i.BlankNodeBindingsScoped){let r=t.get(e.value);return r||(r=a.blankNode(`${e.value}${d}`),t.set(e.value,r)),r}return e}))})),{type:"bindings",bindingsStream:l,metadata:async()=>({...o,variables:s})}}}t.ActorQueryOperationProject=o},98893:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(1892),t)},17015:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationReducedHash=void 0;const n=r(59510),i=r(35069);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"reduced")}async testOperation(e,t){return!0}async runOperation(e,t){const r=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:t}));return{type:"bindings",bindingsStream:r.bindingsStream.filter(await this.newHashFilter(t)),metadata:r.metadata}}async newHashFilter(e){const{hashFunction:t}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:e}),r=new i.LRUCache({max:this.cacheSize});return e=>{const n=t(e);return!r.has(n)&&(r.set(n,!0),!0)}}}t.ActorQueryOperationReducedHash=a},16909:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(17015),t)},45152:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationService=void 0;const n=r(91674),i=r(59510),a=r(72394),o=r(76664);class s extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"service")}async testOperation(e,t){if("NamedNode"!==e.name.termType)throw new Error(`${this.name} can only query services by IRI, while a ${e.name.termType} was given.`);return!0}async runOperation(e,t){const{querySource:r}=await this.mediatorQuerySourceIdentify.mediate({querySourceUnidentified:{value:e.name.value,type:this.forceSparqlEndpoint?"sparql":void 0},context:t});let s;try{s=i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:i.ActorQueryOperation.assignOperationSource(e.input,r),context:t}))}catch(r){if(!e.silent)throw r;{const e=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);s={bindingsStream:new o.SingletonIterator(e.bindings()),type:"bindings",metadata:async()=>({state:new a.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]})},this.logWarn(t,`An error occurred when executing a SERVICE clause: ${r.message}`)}}return s}}t.ActorQueryOperationService=s},89375:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(45152),t)},28746:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationSlice=void 0;const n=r(59510),i=r(32227);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"slice")}async testOperation(e,t){return!0}async runOperation(e,t){e.length&&(t=t.set(i.KeysQueryOperation.limitIndicator,e.length));const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t});if("bindings"===r.type)return{type:"bindings",bindingsStream:this.sliceStream(r.bindingsStream,e),metadata:this.sliceMetadata(r,e)};if("quads"===r.type)return{type:"quads",quadStream:this.sliceStream(r.quadStream,e),metadata:this.sliceMetadata(r,e)};throw new Error(`Invalid query output type: Expected 'bindings' or 'quads' but got '${r.type}'`)}sliceStream(e,t){const r=Boolean(t.length)||0===t.length,{start:n}=t,i=r?t.start+t.length-1:Number.POSITIVE_INFINITY;return e.transform({offset:n,limit:Math.max(i-n+1,0),autoStart:!1})}sliceMetadata(e,t){const r=Boolean(t.length)||0===t.length;return()=>e.metadata().then((e=>{const n={...e.cardinality};return Number.isFinite(n.value)&&(n.value=Math.max(0,n.value-t.start),r&&(n.value=Math.min(n.value,t.length))),{...e,cardinality:n}}))}}t.ActorQueryOperationSlice=a},14922:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(28746),t)},23920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationSource=void 0;const n=r(59510),i=r(32227),a=r(72394),o=r(31578);class s extends n.ActorQueryOperation{constructor(e){super(e)}async test(e){if(!n.ActorQueryOperation.getOperationSource(e.operation))throw new Error(`Actor ${this.name} requires an operation with source annotation.`);return{httpRequests:1}}async run(e){const t=e.context.get(i.KeysInitQuery.physicalQueryPlanLogger);t&&(t.logOperation(e.operation.type,void 0,e.operation,e.context.get(i.KeysInitQuery.physicalQueryPlanNode),this.name,{}),e.context=e.context.set(i.KeysInitQuery.physicalQueryPlanNode,e.operation));const r=n.ActorQueryOperation.getOperationSource(e.operation),s=r.context?e.context.merge(r.context):e.context;switch(e.operation.type){case o.Algebra.types.SLICE:case o.Algebra.types.CONSTRUCT:{if(e.operation.type===o.Algebra.types.SLICE&&e.operation.input.type!==o.Algebra.types.CONSTRUCT)break;const t=r.source.queryQuads(e.operation,s);return{type:"quads",quadStream:t,metadata:(0,a.getMetadataQuads)(t)}}case o.Algebra.types.ASK:return{type:"boolean",execute:()=>r.source.queryBoolean(e.operation,s)};case o.Algebra.types.COMPOSITE_UPDATE:case o.Algebra.types.DELETE_INSERT:case o.Algebra.types.LOAD:case o.Algebra.types.CLEAR:case o.Algebra.types.CREATE:case o.Algebra.types.DROP:case o.Algebra.types.ADD:case o.Algebra.types.MOVE:case o.Algebra.types.COPY:return{type:"void",execute:()=>r.source.queryVoid(e.operation,s)}}const c=r.source.queryBindings(e.operation,s);return{type:"bindings",bindingsStream:c,metadata:(0,a.getMetadataBindings)(c)}}}t.ActorQueryOperationSource=s},26933:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(23920),t)},47312:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationUnion=void 0;const n=r(59510),i=r(72394),a=r(76664),o=r(13252);class s extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"union")}static unionVariables(e){return(0,o.uniqTerms)(e.flat())}static async unionMetadata(e,t,r,n){let a=(await n.mediate({mode:"initialize",context:r})).metadata;for(const t of e)a={...t,...(await n.mediate({mode:"append",accumulatedMetadata:a,appendingMetadata:t,context:r})).metadata};a.state=new i.MetadataValidationState;const o=()=>a.state.invalidate();for(const t of e)t.state.addInvalidateListener(o);return t&&(a.variables=s.unionVariables(e.map((e=>e.variables)))),a}async testOperation(e,t){return!0}async runOperation(e,t){const r=await Promise.all(e.input.map((e=>this.mediatorQueryOperation.mediate({operation:e,context:t}))));let i;for(const e of r)if(void 0===i)i=e.type;else if(i!==e.type)throw new Error(`Unable to union ${i} and ${e.type}`);if("bindings"===i||0===e.input.length){const e=r.map(n.ActorQueryOperation.getSafeBindings);return{type:"bindings",bindingsStream:new a.UnionIterator(e.map((e=>e.bindingsStream)),{autoStart:!1}),metadata:()=>Promise.all(e.map((e=>e.metadata()))).then((e=>s.unionMetadata(e,!0,t,this.mediatorRdfMetadataAccumulate)))}}if("quads"===i){const e=r.map(n.ActorQueryOperation.getSafeQuads);return{type:"quads",quadStream:new a.UnionIterator(e.map((e=>e.quadStream)),{autoStart:!1}),metadata:()=>Promise.all(e.map((e=>e.metadata()))).then((e=>s.unionMetadata(e,!1,t,this.mediatorRdfMetadataAccumulate)))}}throw new Error(`Unable to union ${i}`)}}t.ActorQueryOperationUnion=s},19779:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(47312),t)},20808:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationClear=void 0;const n=r(59510),i=new(r(18050).DataFactory);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"clear")}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){let r;r="DEFAULT"===e.source?i.defaultGraph():"string"==typeof e.source?e.source:[e.source];const{execute:n}=await this.mediatorUpdateQuads.mediate({deleteGraphs:{graphs:r,requireExistence:!e.silent,dropGraphs:!1},context:t});return{type:"void",execute:n}}}t.ActorQueryOperationClear=a},75233:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(20808),t)},8317:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationUpdateCompositeUpdate=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"compositeupdate")}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){return{type:"void",execute:()=>(async()=>{for(const r of e.updates){const e=n.ActorQueryOperation.getSafeVoid(await this.mediatorQueryOperation.mediate({operation:r,context:t}));await e.execute()}})()}}}t.ActorQueryOperationUpdateCompositeUpdate=i},57886:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(8317),t)},74700:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationCreate=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"create")}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){const{execute:r}=await this.mediatorUpdateQuads.mediate({createGraphs:{graphs:[e.source],requireNonExistence:!e.silent},context:t});return{type:"void",execute:r}}}t.ActorQueryOperationCreate=i},14876:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(74700),t)},4853:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationUpdateDeleteInsert=void 0;const n=r(88749),i=r(91674),a=r(59510),o=r(76664);class s extends a.ActorQueryOperationTypedMediated{constructor(e){super(e,"deleteinsert"),this.blankNodeCounter=0}async testOperation(e,t){return a.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){const r=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,t),s=e.where?a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.where,context:t})).bindingsStream:new o.ArrayIterator([r.bindings()],{autoStart:!1});let c,u;e.insert&&(c=new n.BindingsToQuadsIterator(e.insert.map(n.BindingsToQuadsIterator.localizeQuad.bind(null,this.blankNodeCounter)),s.clone()),this.blankNodeCounter++),e.delete&&(u=new n.BindingsToQuadsIterator(e.delete.map(n.BindingsToQuadsIterator.localizeQuad.bind(null,this.blankNodeCounter)),s.clone()),this.blankNodeCounter++);const{execute:l}=await this.mediatorUpdateQuads.mediate({quadStreamInsert:c,quadStreamDelete:u,context:t});return{type:"void",execute:l}}}t.ActorQueryOperationUpdateDeleteInsert=s},21638:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(4853),t)},53460:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationDrop=void 0;const n=r(59510),i=new(r(18050).DataFactory);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"drop")}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){let r;r="DEFAULT"===e.source?i.defaultGraph():"string"==typeof e.source?e.source:[e.source];const{execute:n}=await this.mediatorUpdateQuads.mediate({deleteGraphs:{graphs:r,requireExistence:!e.silent,dropGraphs:!0},context:t});return{type:"void",execute:n}}}t.ActorQueryOperationDrop=a},82465:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(53460),t)},86228:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationLoad=void 0;const n=r(59510),i=r(32227),a=r(18050),o=r(31578),s=new a.DataFactory;class c extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"load"),this.factory=new o.Factory}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){let r=t;e.silent&&(r=r.set(i.KeysInitQuery.lenient,!0));const{querySource:a}=await this.mediatorQuerySourceIdentify.mediate({querySourceUnidentified:{value:e.source.value},context:r});let o=c.getSafeQuads(await this.mediatorQueryOperation.mediate({operation:this.factory.createConstruct(n.ActorQueryOperation.assignOperationSource(this.factory.createPattern(s.variable("s"),s.variable("p"),s.variable("o")),a),[this.factory.createPattern(s.variable("s"),s.variable("p"),s.variable("o"))]),context:r})).quadStream;e.destination&&(o=o.map((t=>s.quad(t.subject,t.predicate,t.object,e.destination))));const{execute:u}=await this.mediatorUpdateQuads.mediate({quadStreamInsert:o,context:t});return{type:"void",execute:u}}}t.ActorQueryOperationLoad=c},29796:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(86228),t)},48236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationValues=void 0;const n=r(91674),i=r(59510),a=r(72394),o=r(76664),s=new(r(18050).DataFactory);class c extends i.ActorQueryOperationTyped{constructor(e){super(e,"values")}async testOperation(e,t){return!0}async runOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),i=new o.ArrayIterator(e.bindings.map((e=>r.bindings(Object.entries(e).map((([e,t])=>[s.variable(e.slice(1)),t])))))),c=e.variables;return{type:"bindings",bindingsStream:i,metadata:()=>Promise.resolve({state:new a.MetadataValidationState,cardinality:{type:"exact",value:e.bindings.length},canContainUndefs:e.bindings.some((e=>c.some((t=>!(`?${t.value}`in e))))),variables:c})}}}t.ActorQueryOperationValues=c},14702:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(48236),t)},1452:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryParseGraphql=void 0;const n=r(79744),i=r(32227),a=r(1427);class o extends n.ActorQueryParse{constructor(e){super(e),this.graphqlToSparql=new a.Converter({requireContext:!0})}async test(e){if("graphql"!==e.queryFormat?.language)throw new Error("This actor can only parse GraphQL queries");return!0}async run(e){const t=e.context.get(i.KeysInitQuery.jsonLdContext)||{},r={singularizeVariables:e.context.get(i.KeysInitQuery.graphqlSingularizeVariables)};return{operation:await this.graphqlToSparql.graphqlToSparqlAlgebra(e.query,t,r)}}}t.ActorQueryParseGraphql=o},37067:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(1452),t)},6540:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryParseSparql=void 0;const n=r(79744),i=r(31578),a=r(55403);class o extends n.ActorQueryParse{constructor(e){super(e),this.prefixes=Object.freeze(this.prefixes)}async test(e){if(e.queryFormat&&"sparql"!==e.queryFormat.language)throw new Error("This actor can only parse SPARQL queries");return!0}async run(e){const t=new a.Parser({prefixes:this.prefixes,baseIRI:e.baseIRI,sparqlStar:!0}).parse(e.query);return{baseIRI:"query"===t.type?t.base:void 0,operation:(0,i.translate)(t,{quads:!0,prefixes:this.prefixes,blankToVariable:!0,baseIRI:e.baseIRI})}}}t.ActorQueryParseSparql=o},4911:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(6540),t)},27007:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcessExplainLogical=void 0;const n=r(59946),i=r(32227),a=r(34368);class o extends n.ActorQueryProcess{constructor(e){super(e)}async test(e){if("logical"!==(e.context.get(i.KeysInitQuery.explain)||e.context.get(new a.ActionContextKey("explain"))))throw new Error(`${this.name} can only explain in 'logical' mode.`);return!0}async run(e){let{operation:t,context:r}=await this.queryProcessor.parse(e.query,e.context);return({operation:t,context:r}=await this.queryProcessor.optimize(t,r)),{result:{explain:!0,type:"logical",data:t}}}}t.ActorQueryProcessExplainLogical=o},70605:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(27007),t)},94725:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcessExplainParsed=void 0;const n=r(59946),i=r(32227),a=r(34368);class o extends n.ActorQueryProcess{constructor(e){super(e)}async test(e){if("parsed"!==(e.context.get(i.KeysInitQuery.explain)||e.context.get(new a.ActionContextKey("explain"))))throw new Error(`${this.name} can only explain in 'parsed' mode.`);return!0}async run(e){const{operation:t}=await this.queryProcessor.parse(e.query,e.context);return{result:{explain:!0,type:"parsed",data:t}}}}t.ActorQueryProcessExplainParsed=o},68383:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(94725),t)},25441:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcessExplainPhysical=void 0;const n=r(59946),i=r(32227),a=r(34368),o=r(16402);class s extends n.ActorQueryProcess{constructor(e){super(e)}async test(e){const t=e.context.get(i.KeysInitQuery.explain)||e.context.get(new a.ActionContextKey("explain"));if("physical"!==t&&"physical-json"!==t)throw new Error(`${this.name} can only explain in 'physical' or 'physical-json' mode.`);return!0}async run(e){let{operation:t,context:r}=await this.queryProcessor.parse(e.query,e.context);({operation:t,context:r}=await this.queryProcessor.optimize(t,r));const n=new o.MemoryPhysicalQueryPlanLogger;r=r.set(i.KeysInitQuery.physicalQueryPlanLogger,n);const s=await this.queryProcessor.evaluate(t,r);switch(s.type){case"bindings":await s.bindingsStream.toArray();break;case"quads":await s.quadStream.toArray();break;case"boolean":case"void":await s.execute()}const c=e.context.get(i.KeysInitQuery.explain)??e.context.getSafe(new a.ActionContextKey("explain"));return{result:{explain:!0,type:c,data:"physical"===c?n.toCompactString():n.toJson()}}}}t.ActorQueryProcessExplainPhysical=s},16402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numberToString=t.MemoryPhysicalQueryPlanLogger=void 0;const n=r(22112);function i(e){return e.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:3})}t.MemoryPhysicalQueryPlanLogger=class{constructor(){this.planNodes=new Map}logOperation(e,t,r,n,i,a){const o={actor:i,logicalOperator:e,physicalOperator:t,rawNode:r,children:[],metadata:a};if(this.planNodes.set(r,o),this.rootNode){if(!n)throw new Error("Detected more than one parent-less node");const e=this.planNodes.get(n);if(!e)throw new Error("Could not find parent node");e.children.push(o)}else{if(n)throw new Error("No root node has been set yet, while a parent is being referenced");this.rootNode=o}}stashChildren(e,t){const r=this.planNodes.get(e);if(!r)throw new Error("Could not find plan node");r.children=t?r.children.filter(t):[]}unstashChild(e,t){const r=this.planNodes.get(e);if(r){const e=this.planNodes.get(t);if(!e)throw new Error("Could not find plan parent node");e.children.push(r)}}appendMetadata(e,t){const r=this.planNodes.get(e);r&&(r.metadata={...r.metadata,...t})}toJson(){return this.rootNode?this.planNodeToJson(this.rootNode):{}}planNodeToJson(e){const t={logical:e.logicalOperator,physical:e.physicalOperator,...this.getLogicalMetadata(e.rawNode),...this.compactMetadata(e.metadata)};if(e.children.length>0&&(t.children=e.children.map((e=>this.planNodeToJson(e)))),"bind"===t.physical&&t.children){const e={};for(const r of t.children){const t=r.children?.at(-1)??r,n=this.getPlanHash(t).join(",");e[n]||(e[n]=[]),e[n].push(r)}const r=[];for(const t of Object.values(e))r.push({occurrences:t.length,firstOccurrence:t[0]});t.childrenCompact=r,delete t.children}return t}getPlanHash(e){let t=[`${e.logical}-${e.physical}`];return e.children?t=[...t,...e.children.flatMap((e=>this.getPlanHash(e)))]:e.childrenCompact&&(t=[...t,...e.childrenCompact.flatMap((e=>this.getPlanHash(e.firstOccurrence)))]),t}compactMetadata(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,this.compactMetadataValue(t)])))}compactMetadataValue(e){return e&&"object"==typeof e&&"termType"in e?this.getLogicalMetadata(e):e}getLogicalMetadata(e){const t={};if("type"in e){const r=e;switch(r.metadata?.scopedSource&&(t.source=r.metadata.scopedSource.source.toString()),r.type){case"pattern":t.pattern=this.quadToString(r);break;case"project":t.variables=r.variables.map((e=>e.value))}}return t}quadToString(e){return`${(0,n.termToString)(e.subject)} ${(0,n.termToString)(e.predicate)} ${(0,n.termToString)(e.object)}${"DefaultGraph"===e.graph.termType?"":` ${(0,n.termToString)(e.graph)}`}`}toCompactString(){const e=this.toJson(),t=[],r=new Map;if("logical"in e?this.nodeToCompactString(t,r,"",e):t.push("Empty"),r.size>0){t.push(""),t.push("sources:");for(const[e,n]of r.entries())t.push(` ${n}: ${e}`)}return t.join("\n")}nodeToCompactString(e,t,r,n,a){let o;n.source&&(o=t.get(n.source),void 0===o&&(o=t.size,t.set(n.source,o))),e.push(`${r}${n.logical}${n.physical?`(${n.physical})`:""}${n.pattern?` (${n.pattern})`:""}${n.variables?` (${n.variables.join(",")})`:""}${n.bindOperation?` bindOperation:(${n.bindOperation.pattern}) bindCardEst:${"estimate"===n.bindOperationCardinality.type?"~":""}${i(n.bindOperationCardinality.value)}`:""}${n.cardinality?` cardEst:${"estimate"===n.cardinality.type?"~":""}${i(n.cardinality.value)}`:""}${n.source?` src:${o}`:""}${n.cardinalityReal?` cardReal:${n.cardinalityReal}`:""}${n.timeSelf?` timeSelf:${i(n.timeSelf)}ms`:""}${n.timeLife?` timeLife:${i(n.timeLife)}ms`:""}${a?` ${a}`:""}`);for(const i of n.children??[])this.nodeToCompactString(e,t,`${r} `,i);for(const i of n.childrenCompact??[])this.nodeToCompactString(e,t,`${r} `,i.firstOccurrence,`compacted-occurrences:${i.occurrences}`)}},t.numberToString=i},54395:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(25441),t),i(r(16402),t)},47604:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcessSequential=void 0;const n=r(91674),i=r(59510),a=r(59946),o=r(32227),s=r(34368);class c extends a.ActorQueryProcess{constructor(e){super(e)}async test(e){if(e.context.get(o.KeysInitQuery.explain)||e.context.get(new s.ActionContextKey("explain")))throw new Error(`${this.name} is not able to explain queries.`);return!0}async run(e){let{operation:t,context:r}=await this.parse(e.query,e.context);return({operation:t,context:r}=await this.optimize(t,r)),{result:await this.evaluate(t,r)}}async parse(e,t){let r;if(t=(await this.mediatorContextPreprocess.mediate({context:t,initialize:!0})).context,"string"==typeof e){const n=(t=t.set(o.KeysInitQuery.queryString,e)).get(o.KeysInitQuery.baseIRI),i=t.get(o.KeysInitQuery.queryFormat),a=await this.mediatorQueryParse.mediate({context:t,query:e,queryFormat:i,baseIRI:n});r=a.operation,a.baseIRI&&(t=t.set(o.KeysInitQuery.baseIRI,a.baseIRI))}else r=e;if(t.has(o.KeysInitQuery.initialBindings)){const e=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);r=(0,i.materializeOperation)(r,t.get(o.KeysInitQuery.initialBindings),e),t=t.delete(o.KeysInitQuery.queryString)}return{operation:r,context:t}}async optimize(e,t){return t=t.set(o.KeysInitQuery.query,e),({operation:e,context:t}=await this.mediatorOptimizeQueryOperation.mediate({context:t,operation:e})),{operation:e,context:t=t.set(o.KeysInitQuery.query,e)}}async evaluate(e,t){const r=await this.mediatorQueryOperation.mediate({context:t,operation:e});return r.context=t,r}}t.ActorQueryProcessSequential=c},94739:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(47604),t)},45369:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeJson=void 0;const n=r(22083),i=r(76664),a=r(22112),o=r(58521);class s extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}async testHandleChecked(e,t){if(!["bindings","quads","boolean"].includes(e.type))throw new Error("This actor can only handle bindings or quad streams.");return!0}async runHandle(e,t,r){const n=new o.Readable;if(n._read=()=>{},"bindings"===e.type||"quads"===e.type){let t="bindings"===e.type?(0,i.wrap)(e.bindingsStream).map((e=>JSON.stringify(Object.fromEntries([...e].map((([e,t])=>[e.value,a.termToString(t)])))))):(0,i.wrap)(e.quadStream).map((e=>JSON.stringify(a.quadToStringQuad(e)))),r=!0;t=t.map((e=>{const t=`${r?"":","}\n${e}`;return r=!1,t})).prepend(["["]).append(["\n]\n"]),n.wrap(t)}else try{n.push(`${JSON.stringify(await e.execute())}\n`),n.push(null)}catch(e){setTimeout((()=>n.emit("error",e)))}return{data:n}}}t.ActorQueryResultSerializeJson=s},91875:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(45369),t)},2703:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeRdf=void 0;const n=r(22083);class i extends n.ActorQueryResultSerialize{constructor(e){super(e)}async testHandle(e,t,r){if("quads"!==e.type)throw new Error(`Actor ${this.name} can only handle quad streams`);const{mediaTypes:n}=await this.mediatorMediaTypeCombiner.mediate({context:r,mediaTypes:!0});if(!(t in n))throw new Error(`Actor ${this.name} can not handle media type ${t}. All available types: ${Object.keys(n)}`);return!0}async runHandle(e,t,r){return(await this.mediatorRdfSerialize.mediate({context:r,handle:{context:r,quadStream:e.quadStream},handleMediaType:t})).handle}async testMediaType(e){return!0}async getMediaTypes(e){return(await this.mediatorMediaTypeCombiner.mediate({context:e,mediaTypes:!0})).mediaTypes}async testMediaTypeFormats(e){return!0}async getMediaTypeFormats(e){return(await this.mediatorMediaTypeFormatCombiner.mediate({context:e,mediaTypeFormats:!0})).mediaTypeFormats}}t.ActorQueryResultSerializeRdf=i},63543:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(2703),t)},6301:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSimple=void 0;const n=r(22083),i=r(76664),a=r(22112),o=r(58521);class s extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}async testHandleChecked(e,t){if(!["bindings","quads","boolean","void"].includes(e.type))throw new Error("This actor can only handle bindings streams, quad streams, booleans, or updates.");return!0}static termToString(e){return"Quad"===e.termType?(0,a.termToString)(e):e.value}async runHandle(e,t,r){const n=new o.Readable;return"bindings"===e.type?n.wrap(e.bindingsStream.map((e=>`${[...e].map((([e,t])=>`?${e.value}: ${s.termToString(t)}`)).join("\n")}\n\n`))):"quads"===e.type?n.wrap(e.quadStream.map((e=>`subject: ${s.termToString(e.subject)}\npredicate: ${s.termToString(e.predicate)}\nobject: ${s.termToString(e.object)}\ngraph: ${s.termToString(e.graph)}\n\n`))):n.wrap((0,i.wrap)("boolean"===e.type?e.execute().then((e=>[`${e}\n`])):e.execute().then((()=>["ok\n"])))),{data:n}}}t.ActorQueryResultSerializeSimple=s},96791:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(6301),t)},54438:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSparqlCsv=void 0;const n=r(22083),i=r(58521);class a extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToCsvBindings(e){if(!e)return"";let t=e.value;if("Literal"===e.termType)t=`${t}`;else if("BlankNode"===e.termType)t=`_:${t}`;else if("Quad"===e.termType){let r=a.bindingToCsvBindings(e.object);"Literal"===e.object.termType&&(r=`"${r.replaceAll('"','""')}"`),t=`<< ${a.bindingToCsvBindings(e.subject)} ${a.bindingToCsvBindings(e.predicate)} ${r} >>`}else t=`<${t}>`;return/[",\n\r]/u.test(t)&&(t=`"${t.replaceAll('"','""')}"`),t}async testHandleChecked(e,t){if("bindings"!==e.type)throw new Error("This actor can only handle bindings streams.");return!0}async runHandle(e,t,r){const n=e,o=new i.Readable,s=await n.metadata();return o.push(`${s.variables.map((e=>e.value)).join(",")}\r\n`),o.wrap(n.bindingsStream.map((e=>`${s.variables.map((t=>a.bindingToCsvBindings(e.get(t)))).join(",")}\r\n`))),{data:o}}}t.ActorQueryResultSerializeSparqlCsv=a},34357:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(54438),t)},21437:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionObserverHttp=void 0;const n=r(34368);class i extends n.ActionObserver{constructor(e){super(e),this.requests=0,this.bus.subscribeObserver(this),this.httpInvalidator.addInvalidateListener((()=>{this.requests=0}))}onRun(e,t,r){this.requests++}}t.ActionObserverHttp=i},47670:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSparqlJson=void 0;const n=r(22083),i=r(76664),a=r(58521);class o extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToJsonBindings(e){if("Literal"===e.termType){const t=e,r={value:t.value,type:"literal"},{language:n,datatype:i}=t;return n?r["xml:lang"]=n:i&&"http://www.w3.org/2001/XMLSchema#string"!==i.value&&(r.datatype=i.value),r}return"BlankNode"===e.termType?{value:e.value,type:"bnode"}:"Quad"===e.termType?{value:{subject:o.bindingToJsonBindings(e.subject),predicate:o.bindingToJsonBindings(e.predicate),object:o.bindingToJsonBindings(e.object)},type:"triple"}:{value:e.value,type:"uri"}}async testHandleChecked(e,t){if(!["bindings","boolean"].includes(e.type))throw new Error("This actor can only handle bindings streams or booleans.");return!0}async runHandle(e,t,r){const n=new a.Readable,s={};if("bindings"===e.type){const c=await e.metadata();c.variables.length>0&&(s.vars=c.variables.map((e=>e.value)))}if(n.push(`{"head": ${JSON.stringify(s)},\n`),"bindings"===e.type){const u=e.bindingsStream;n.push('"results": { "bindings": [\n');let l=!0;function*d(e){yield e()}n.wrap((0,i.wrap)(u).map((e=>{const t=`${l?"":",\n"}${JSON.stringify(Object.fromEntries([...e].map((([e,t])=>[e.value,o.bindingToJsonBindings(t)]))))}`;return l=!1,t})).append((0,i.wrap)(d((()=>`\n]}${this.emitMetadata?`,\n"metadata": { "httpRequests": ${this.httpObserver.requests} }`:""}}\n`)))))}else n.wrap((0,i.wrap)(e.execute().then((e=>[`"boolean":${e}\n}\n`]))));return{data:n}}}t.ActorQueryResultSerializeSparqlJson=o},34593:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(21437),t),i(r(47670),t)},60096:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSparqlTsv=void 0;const n=r(22083),i=r(64817),a=r(58521);class o extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToTsvBindings(e){return e?(0,i.termToString)(e).replaceAll("\t","\\t").replaceAll("\n","\\n").replaceAll("\r","\\r"):""}async testHandleChecked(e,t){if("bindings"!==e.type)throw new Error("This actor can only handle bindings streams.");return!0}async runHandle(e,t,r){const n=e,i=new a.Readable,s=await n.metadata();return i.push(`${s.variables.map((e=>e.value)).join("\t")}\n`),i.wrap(n.bindingsStream.map((e=>`${s.variables.map((t=>o.bindingToTsvBindings(e.get(t)))).join("\t")}\n`))),{data:i}}}t.ActorQueryResultSerializeSparqlTsv=o},78432:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(60096),t)},83668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSparqlXml=void 0;const n=r(22083),i=r(76664),a=r(58521),o=r(72825);class s extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToXmlBindings(e,t){return{name:"binding",attributes:{name:t.value},children:[this.valueToXmlValue(e)]}}static valueToXmlValue(e){let t;switch(e.termType){case"Literal":return t=e.language?{"xml:lang":e.language}:e.datatype&&"http://www.w3.org/2001/XMLSchema#string"!==e.datatype.value?{datatype:e.datatype.value}:{},{name:"literal",attributes:t,children:e.value};case"BlankNode":return{name:"bnode",children:e.value};case"Quad":return{name:"triple",children:[{name:"subject",children:[this.valueToXmlValue(e.subject)]},{name:"predicate",children:[this.valueToXmlValue(e.predicate)]},{name:"object",children:[this.valueToXmlValue(e.object)]}]};default:return{name:"uri",children:e.value}}}async testHandleChecked(e,t){if(!["bindings","boolean"].includes(e.type))throw new Error("This actor can only handle bindings streams or booleans.");return!0}async runHandle(e,t,r){const n=new a.Readable;n._read=()=>{};const c=new o.XmlSerializer,u=await e.metadata();if(n.push(o.XmlSerializer.header),n.push(c.open("sparql",{xmlns:"http://www.w3.org/2005/sparql-results#"})),n.push(c.serializeNode({name:"head",children:u.variables.map((e=>({name:"variable",attributes:{name:e.value}})))})),"bindings"===e.type){function*l(){yield c.close(),yield c.close()}n.push(c.open("results"));const d=(0,i.wrap)(e.bindingsStream).map((e=>c.serializeNode({name:"result",children:[...e].map((([e,t])=>s.bindingToXmlBindings(t,e)))}))).append((0,i.wrap)(l()));n.wrap(d)}else try{const h=await e.execute();n.push(c.serializeNode({name:"boolean",children:h.toString()})),n.push(c.close()),setTimeout((()=>n.push(null)))}catch(p){setTimeout((()=>n.emit("error",p)))}return{data:n}}}t.ActorQueryResultSerializeSparqlXml=s},72825:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XmlSerializer=void 0;class r{constructor(){this.stack=[]}open(e,t){const r=`${this.identation()+this.formatTag(e,t,"open")}\n`;return this.stack.push(e),r}close(){const e=this.stack.pop();if(void 0===e)throw new Error("There is no tag left to close");return`${this.identation()+this.formatTag(e,{},"close")}\n`}serializeNode(e){if(void 0===e.children)return`${this.identation()+this.formatTag(e.name,e.attributes,"self-closing")}\n`;if("string"==typeof e.children)return`${this.identation()+this.formatTag(e.name,e.attributes,"open")+this.escape(e.children)+this.formatTag(e.name,{},"close")}\n`;const t=[];t.push(`${this.identation()+this.formatTag(e.name,e.attributes,"open")}\n`),this.stack.push(e.name);for(const r of e.children)t.push(this.serializeNode(r));return this.stack.pop(),t.push(`${this.identation()+this.formatTag(e.name,{},"close")}\n`),t.join("")}identation(){return this.stack.map((e=>" ")).join("")}formatTag(e,t,r){return`<${"close"===r?"/":""}${e}${Object.entries(t??{}).map((e=>` ${e[0]}="${this.escape(e[1])}"`))}${"self-closing"===r?"/":""}>`}escape(e){return e.replaceAll(/["&'<>]/gu,(e=>{switch(e){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return"""}}))}}t.XmlSerializer=r,r.header='\n'},68596:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(83668),t)},1990:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionObserverHttp=void 0;const n=r(34368);class i extends n.ActionObserver{constructor(e){super(e),this.requests=0,this.bus.subscribeObserver(this),this.httpInvalidator.addInvalidateListener((()=>{this.requests=0}))}onRun(e,t,r){this.requests++}}t.ActionObserverHttp=i},28541:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeStats=void 0;const n=r(22083),i=r(76664),a=r(58521),o=r(39907);class s extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}async testHandleChecked(e,t){if(!["bindings","quads"].includes(e.type))throw new Error("This actor can only handle bindings streams or quad streams.");return!0}pushHeader(e){const t=["Result","Delay (ms)","HTTP requests"].join(",");e.push(`${t}\n`)}createStat(e,t){return`${[t,this.delay(e),this.httpObserver.requests].join(",")}\n`}createFooter(e){return`${["TOTAL",this.delay(e),this.httpObserver.requests].join(",")}\n`}async runHandle(e,t,r){const n=new a.Readable,o="bindings"===e.type?e.bindingsStream:e.quadStream,s=this.now();let c=1;const u=(0,i.wrap)(o).map((()=>this.createStat(s,c++))).append((0,i.wrap)(function*(e){yield e()}((()=>this.createFooter(s)))));return this.pushHeader(n),n.wrap(u),{data:n}}now(){if("undefined"==typeof performance){const e=o.hrtime();return 1e3*e[0]+e[1]/1e6}return performance.now()}delay(e){return this.now()-e}}t.ActorQueryResultSerializeStats=s},13900:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(1990),t),i(r(28541),t)},42787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeTable=void 0;const n=r(22083),i=r(18050),a=r(22112),o=r(13252),s=r(58521),c=new i.DataFactory,u=o.QUAD_TERM_NAMES.map((e=>c.variable(e)));class l extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e),this.padding=l.repeat(" ",this.columnWidth)}static repeat(e,t){return e.repeat(t)}async testHandleChecked(e,t){if(!["bindings","quads"].includes(e.type))throw new Error("This actor can only handle bindings or quad streams.");return!0}termToString(e){return"Quad"===e.termType?(0,a.termToString)(e):e.value}pad(e){return e.length<=this.columnWidth?e+this.padding.slice(e.length):`${e.slice(0,this.columnWidth-1)}…`}pushHeader(e,t){const r=t.map((e=>this.pad(e.value))).join(" ");e.push(`${r}\n${l.repeat("-",r.length)}\n`)}createRow(e,t){return`${e.map((e=>t.has(e)?this.termToString(t.get(e)):"")).map((e=>this.pad(e))).join(" ")}\n`}async runHandle(e,t,r){const n=new s.Readable;let i;if("bindings"===e.type){i=e.bindingsStream.map((e=>this.createRow(t,e)));const t=(await e.metadata()).variables;this.pushHeader(n,t)}else i=e.quadStream.map((e=>`${(0,o.getTerms)(e).map((e=>this.pad(this.termToString(e)))).join(" ")}\n`)),this.pushHeader(n,u);return n.wrap(i),{data:n}}}t.ActorQueryResultSerializeTable=l},59655:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(42787),t)},71445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeTree=void 0;const n=r(22083),i=r(32227),a=r(34368),o=r(58521),s=r(43004);class c extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static async bindingsStreamToGraphQl(e,t,r){const n=a.ActionContext.ensureActionContext(t),o=new s.Converter(r),c={singularizeVariables:n.get(i.KeysInitQuery.graphqlSingularizeVariables)??{}};return o.bindingsToTree(await e.map((e=>Object.fromEntries([...e].map((([e,t])=>[e.value,t]))))).toArray(),c)}async testHandleChecked(e){if("bindings"!==e.type)throw new Error("This actor can only handle bindings streams.");return!0}async runHandle(e,t){const r=new o.Readable;return r._read=()=>{r._read=()=>{},c.bindingsStreamToGraphQl(e.bindingsStream,e.context,{materializeRdfJsTerms:!0}).then((e=>{r.push(JSON.stringify(e,null," ")),r.push(null)})).catch((e=>r.emit("error",e)))},{data:r}}}t.ActorQueryResultSerializeTree=c},70017:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.bindingsStreamToGraphQl=void 0;const a=r(71445),{bindingsStreamToGraphQl:o}=a.ActorQueryResultSerializeTree;t.bindingsStreamToGraphQl=o,i(r(71445),t)},33606:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermediaNone=void 0;const n=r(27474),i=r(91674),a=r(89168),o=r(10953);class s extends a.ActorQuerySourceIdentifyHypermedia{constructor(e){super(e,"file")}async testMetadata(e){return{filterFactor:0}}async run(e){this.logInfo(e.context,`Identified as file source: ${e.url}`);const t=new n.QuerySourceRdfJs(await(0,o.storeStream)(e.quads),await i.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context));return t.toString=()=>`QuerySourceRdfJs(${e.url})`,t.referenceValue=e.url,{source:t}}}t.ActorQuerySourceIdentifyHypermediaNone=s},44538:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(33606),t)},88760:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermediaQpf=void 0;const n=r(91674),i=r(89168),a=r(92591);class o extends i.ActorQuerySourceIdentifyHypermedia{constructor(e){super(e,"qpf")}async test(e){if(e.forceSourceType&&"qpf"!==e.forceSourceType&&"brtpf"!==e.forceSourceType)throw new Error(`Actor ${this.name} is not able to handle source type ${e.forceSourceType}.`);return this.testMetadata(e)}async testMetadata(e){const{searchForm:t}=await this.createSource(e.url,e.metadata,e.context,"brtpf"===e.forceSourceType);if(e.handledDatasets&&e.handledDatasets[t.dataset])throw new Error(`Actor ${this.name} can only be applied for the first page of a QPF dataset.`);return{filterFactor:1}}async run(e){this.logInfo(e.context,`Identified as qpf source: ${e.url}`);const t=await this.createSource(e.url,e.metadata,e.context,"brtpf"===e.forceSourceType,e.quads);return{source:t,dataset:t.searchForm.dataset}}async createSource(e,t,r,i,o){return new a.QuerySourceQpf(this.mediatorMetadata,this.mediatorMetadataExtract,this.mediatorDereferenceRdf,await n.BindingsFactory.create(this.mediatorMergeBindingsContext,r),this.subjectUri,this.predicateUri,this.objectUri,this.graphUri,e,t,i,o)}}t.ActorQuerySourceIdentifyHypermediaQpf=o},92591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceQpf=void 0;const n=r(65483),i=r(32227),a=r(76664),o=r(18050),s=r(22112),c=r(64817),u=r(13252),l=new(r(31578).Factory),d=new o.DataFactory;class h{constructor(e,t,r,n,i,o,s,c,u,l,h,p){this.referenceValue=u,this.mediatorMetadata=e,this.mediatorMetadataExtract=t,this.mediatorDereferenceRdf=r,this.bindingsFactory=n,this.subjectUri=i,this.predicateUri=o,this.objectUri=s,this.graphUri=c,this.url=u,this.bindingsRestricted=h,this.cachedQuads={};const f=this.getSearchForm(l);if(!f)throw new Error("Illegal state: found no TPF/QPF search form anymore in metadata.");if(this.searchForm=f,this.defaultGraph=l.defaultGraph?d.namedNode(l.defaultGraph):void 0,p){let e=(0,a.wrap)(p);this.defaultGraph&&(e=this.reverseMapQuadsToDefaultGraph(e)),e.setProperty("metadata",l),this.cacheQuads(e,d.variable(""),d.variable(""),d.variable(""),d.variable(""))}}async getSelectorShape(){return this.bindingsRestricted?h.SELECTOR_SHAPE_BR:h.SELECTOR_SHAPE}queryBindings(e,t,r){if("pattern"!==e.type)throw new Error(`Attempted to pass non-pattern operation '${e.type}' to QuerySourceQpf`);const a=Boolean(t.get(i.KeysQueryOperation.unionDefaultGraph));let o=this.match(e.subject,e.predicate,e.object,e.graph,a,t,r);return o=(0,n.filterMatchingQuotedQuads)(e,o),(0,n.quadsToBindings)(o,e,this.bindingsFactory,a)}getSearchForm(e){if(!e.searchForms||!e.searchForms.values)return;const{searchForms:t}=e;for(const e of t.values){if(this.graphUri&&this.subjectUri in e.mappings&&this.predicateUri in e.mappings&&this.objectUri in e.mappings&&this.graphUri in e.mappings&&4===Object.keys(e.mappings).length)return e;if(this.subjectUri in e.mappings&&this.predicateUri in e.mappings&&this.objectUri in e.mappings&&3===Object.keys(e.mappings).length)return e}}createFragmentUri(e,t,r,n,i){const a={},o=[{uri:this.subjectUri,term:t},{uri:this.predicateUri,term:r},{uri:this.objectUri,term:n},{uri:this.graphUri,term:i}];for(const e of o)e.uri&&(this.bindingsRestricted||"Variable"!==e.term.termType&&("Quad"!==e.term.termType||(0,u.everyTermsNested)(e.term,(e=>"Variable"!==e.termType))))&&(a[e.uri]=(0,s.termToString)(e.term));return e.getUri(a)}match(e,t,r,n,i,o,s){let c=!1;if("DefaultGraph"===n.termType)if(this.defaultGraph)c=!0,n=this.defaultGraph;else if(4!==Object.keys(this.searchForm.mappings).length||this.defaultGraph)3===Object.keys(this.searchForm.mappings).length&&(n=d.variable("g"));else{if(!i){const e=new a.ArrayIterator([],{autoStart:!1});return e.setProperty("metadata",{requestTime:0,cardinality:{type:"exact",value:0},first:null,next:null,last:null,canContainUndefs:!1}),e}n=d.variable("g")}if(!s?.filterBindings){const i=this.getCachedQuads(e,t,r,n);if(i)return i}const l=this;let h;const p=async function(){let i=l.createFragmentUri(l.searchForm,e,t,r,n);s?.filterBindings&&(i=await l.getBindingsRestrictedLink(e,t,r,n,i,s.filterBindings));const a=await l.mediatorDereferenceRdf.mediate({context:o,url:i});i=a.url;const c=await l.mediatorMetadata.mediate({context:o,url:i,quads:a.data,triples:a.metadata?.triples}),{metadata:u}=await l.mediatorMetadataExtract.mediate({context:o,url:i,metadata:c.metadata,requestTime:a.requestTime});return h.setProperty("metadata",{...u,canContainUndefs:!1,subsetOf:l.url}),c.data}();return h=new a.TransformIterator((async()=>{const i=await p,o=d.defaultGraph();let s=(0,a.wrap)(i).transform({filter:i=>!!(0,u.matchPattern)(i,e,t,r,n)||c&&(0,u.matchPattern)(i,e,t,r,o)});return(c||"Variable"===n.termType)&&(s=this.reverseMapQuadsToDefaultGraph(s)),s}),{autoStart:!1}),s?.filterBindings?h:(this.cacheQuads(h,e,t,r,n),this.getCachedQuads(e,t,r,n))}async getBindingsRestrictedLink(e,t,r,n,i,a){const o=[];for(const e of await a.bindings.toArray()){const t=["("];for(const r of a.metadata.variables){const n=e.get(r);t.push(n?(0,c.termToString)(n):"UNDEF"),t.push(" ")}t.push(")"),o.push(t.join(""))}return 0===o.length&&o.push("()"),`${i}&values=${encodeURIComponent(`(${a.metadata.variables.map((e=>`?${e.value}`)).join(" ")}) { ${o.join(" ")} }`)}`}reverseMapQuadsToDefaultGraph(e){const t=d.defaultGraph();return e.map((e=>(0,u.mapTerms)(e,((e,r)=>"graph"===r&&e.equals(this.defaultGraph)?t:e))))}getPatternId(e,t,r,n){return JSON.stringify({s:"Variable"===e.termType?"":p(e),p:"Variable"===t.termType?"":p(t),o:"Variable"===r.termType?"":p(r),g:"Variable"===n.termType?"":p(n)})}cacheQuads(e,t,r,n,i){const a=this.getPatternId(t,r,n,i);this.cachedQuads[a]=e.clone()}getCachedQuads(e,t,r,n){const i=this.getPatternId(e,t,r,n),a=this.cachedQuads[i];if(a)return a.clone()}queryQuads(e,t){throw new Error("queryQuads is not implemented in QuerySourceQpf")}queryBoolean(e,t){throw new Error("queryBoolean is not implemented in QuerySourceQpf")}queryVoid(e,t){throw new Error("queryVoid is not implemented in QuerySourceQpf")}}function p(e){return"DefaultGraph"===e.termType?"|":(0,s.termToString)(e)}t.QuerySourceQpf=h,h.SELECTOR_SHAPE={type:"operation",operation:{operationType:"pattern",pattern:l.createPattern(d.variable("s"),d.variable("p"),d.variable("o"),d.variable("g"))},variablesOptional:[d.variable("s"),d.variable("p"),d.variable("o"),d.variable("g")]},h.SELECTOR_SHAPE_BR={type:"operation",operation:{operationType:"pattern",pattern:l.createPattern(d.variable("s"),d.variable("p"),d.variable("o"),d.variable("g"))},variablesOptional:[d.variable("s"),d.variable("p"),d.variable("o"),d.variable("g")],filterBindings:!0}},52378:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(88760),t),i(r(92591),t)},480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermediaSparql=void 0;const n=r(91674),i=r(89168),a=r(99193);class o extends i.ActorQuerySourceIdentifyHypermedia{constructor(e){super(e,"sparql")}async testMetadata(e){if(!(e.forceSourceType||e.metadata.sparqlService||this.checkUrlSuffix&&e.url.endsWith("/sparql")))throw new Error(`Actor ${this.name} could not detect a SPARQL service description or URL ending on /sparql.`);return{filterFactor:1}}async run(e){return this.logInfo(e.context,`Identified ${e.url} as sparql source with service URL: ${e.metadata.sparqlService||e.url}`),{source:new a.QuerySourceSparql(e.forceSourceType?e.url:e.metadata.sparqlService||e.url,e.context,this.mediatorHttp,this.bindMethod,await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context),this.forceHttpGet,this.cacheSize,this.countTimeout)}}}t.ActorQuerySourceIdentifyHypermediaSparql=o},99193:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceSparql=void 0;const n=r(32227),i=r(76664),a=r(74190),o=r(35069),s=r(18050),c=r(31578),u=new c.Factory,l=new s.DataFactory,d=l.variable("count"),h={type:"estimate",value:Number.POSITIVE_INFINITY};class p{constructor(e,t,r,n,i,s,c,u){this.referenceValue=e,this.url=e,this.context=t,this.mediatorHttp=r,this.bindMethod=n,this.bindingsFactory=i,this.endpointFetcher=new a.SparqlEndpointFetcher({method:s?"GET":"POST",fetch:(e,t)=>this.mediatorHttp.mediate({input:e,init:t,context:this.lastSourceContext}),prefixVariableQuestionMark:!0}),this.cache=c>0?new o.LRUCache({max:c}):void 0,this.countTimeout=u}async getSelectorShape(){return p.SELECTOR_SHAPE}queryBindings(e,t,r){let a;a=r?.joinBindings?p.addBindingsToOperation(this.bindMethod,e,r.joinBindings):Promise.resolve(e);const o=new i.TransformIterator((async()=>{const e=await a,i=c.Util.inScopeVariables(e),o=t.get(n.KeysInitQuery.queryString),s=!r?.joinBindings&&o?o:p.operationToSelectQuery(e,i);return this.queryBindingsRemote(this.url,s,i,t)}),{autoStart:!1});return this.attachMetadata(o,t,a),o}queryQuads(e,t){this.lastSourceContext=this.context.merge(t);const r=this.endpointFetcher.fetchTriples(this.url,t.get(n.KeysInitQuery.queryString)??p.operationToQuery(e));this.lastSourceContext=void 0;const a=(0,i.wrap)(r,{autoStart:!1,maxBufferSize:Number.POSITIVE_INFINITY});return this.attachMetadata(a,t,Promise.resolve(e.input)),a}queryBoolean(e,t){this.lastSourceContext=this.context.merge(t);const r=this.endpointFetcher.fetchAsk(this.url,t.get(n.KeysInitQuery.queryString)??p.operationToQuery(e));return this.lastSourceContext=void 0,r}queryVoid(e,t){this.lastSourceContext=this.context.merge(t);const r=this.endpointFetcher.fetchUpdate(this.url,t.get(n.KeysInitQuery.queryString)??p.operationToQuery(e));return this.lastSourceContext=void 0,r}attachMetadata(e,t,r){let n=[];new Promise((async(e,i)=>{let a;try{const i=await r;n=c.Util.inScopeVariables(i),a=p.operationToCountQuery(i);const o=this.cache?.get(a);if(void 0!==o)return e(o);const s=setTimeout((()=>e(h)),this.countTimeout),u=await this.queryBindingsRemote(this.url,a,[d],t);u.on("data",(t=>{clearTimeout(s);const r=t.get(d),n={type:"estimate",value:Number.POSITIVE_INFINITY};if(r){const e=Number.parseInt(r.value,10);Number.isNaN(e)||(n.type="exact",n.value=e,this.cache?.set(a,n))}return e(n)})),u.on("error",(()=>{clearTimeout(s),e(h)})),u.on("end",(()=>{clearTimeout(s),e(h)}))}catch(e){return i(e)}})).then((t=>e.setProperty("metadata",{cardinality:t,canContainUndefs:!1,variables:n}))).catch((()=>e.setProperty("metadata",{cardinality:h,canContainUndefs:!1,variables:n})))}static async addBindingsToOperation(e,t,r){const n=await r.bindings.toArray();switch(e){case"values":return u.createJoin([u.createValues(r.metadata.variables,n.map((e=>Object.fromEntries([...e].map((([e,t])=>[`?${e.value}`,t])))))),t],!1);case"union":throw new Error('Not implemented yet: "union" case');case"filter":throw new Error('Not implemented yet: "filter" case')}}static operationToSelectQuery(e,t){return p.operationToQuery(u.createProject(e,t))}static operationToCountQuery(e){return p.operationToQuery(u.createProject(u.createExtend(u.createGroup(e,[],[u.createBoundAggregate(l.variable("var0"),"count",u.createWildcardExpression(),!1)]),l.variable("count"),u.createTermExpression(l.variable("var0"))),[l.variable("count")]))}static operationToQuery(e){return(0,c.toSparql)(e,{sparqlStar:!0})}async queryBindingsRemote(e,t,r,n){this.lastSourceContext=this.context.merge(n);const a=await this.endpointFetcher.fetchBindings(e,t);this.lastSourceContext=void 0;const o=(0,i.wrap)(a,{autoStart:!1,maxBufferSize:Number.POSITIVE_INFINITY}).map((t=>this.bindingsFactory.bindings(r.map((r=>{const n=t[`?${r.value}`];return n||o.emit("error",new Error(`The endpoint ${e} failed to provide a binding for ${r.value}.`)),[r,n]})))));return o}toString(){return`QuerySourceSparql(${this.url})`}}t.QuerySourceSparql=p,p.SELECTOR_SHAPE={type:"disjunction",children:[{type:"operation",operation:{operationType:"type",type:c.Algebra.types.PROJECT},joinBindings:!0},{type:"operation",operation:{operationType:"type",type:c.Algebra.types.CONSTRUCT}},{type:"operation",operation:{operationType:"type",type:c.Algebra.types.DESCRIBE}},{type:"operation",operation:{operationType:"type",type:c.Algebra.types.ASK}},{type:"operation",operation:{operationType:"type",type:c.Algebra.types.COMPOSITE_UPDATE}}]}},16025:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(480),t),i(r(99193),t)},93017:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermedia=void 0;const n=r(91674),i=r(65483),a=r(32227),o=r(34368),s=r(870);class c extends i.ActorQuerySourceIdentify{constructor(e){super(e)}async test(e){if("string"!=typeof e.querySourceUnidentified.value)throw new TypeError(`${this.name} requires a single query source with a URL value to be present in the context.`);return!0}async run(e){return{querySource:{source:new s.QuerySourceHypermedia(this.cacheSize,e.querySourceUnidentified.value,e.querySourceUnidentified.type,this.maxIterators,this.aggregateTraversalStore&&Boolean(e.querySourceUnidentified.context?.get(a.KeysQuerySourceIdentify.traverse)),{mediatorMetadata:this.mediatorMetadata,mediatorMetadataExtract:this.mediatorMetadataExtract,mediatorMetadataAccumulate:this.mediatorMetadataAccumulate,mediatorDereferenceRdf:this.mediatorDereferenceRdf,mediatorQuerySourceIdentifyHypermedia:this.mediatorQuerySourceIdentifyHypermedia,mediatorRdfResolveHypermediaLinks:this.mediatorRdfResolveHypermediaLinks,mediatorRdfResolveHypermediaLinksQueue:this.mediatorRdfResolveHypermediaLinksQueue},(t=>this.logWarn(e.context,t)),await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context)),context:e.querySourceUnidentified.context??new o.ActionContext}}}}t.ActorQuerySourceIdentifyHypermedia=c},87896:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedRdfSourcesAsyncRdfIterator=void 0;const n=r(72394),i=r(76664);class a extends i.BufferedIterator{constructor(e,t,r,n,i,a,o,s){if(super({autoStart:!1,...s}),this.started=!1,this.currentIterators=[],this.iteratorsPendingCreation=0,this.iteratorsPendingTermination=0,this.accumulatedMetadata=Promise.resolve(void 0),this._reading=!1,this.cacheSize=e,this.operation=t,this.queryBindingsOptions=r,this.context=n,this.firstUrl=i,this.maxIterators=a,this.sourceStateGetter=o,this.maxIterators<=0)throw new Error(`LinkedRdfSourcesAsyncRdfIterator.maxIterators must be larger than zero, but got ${this.maxIterators}`)}kickstart(){this.started||this._fillBufferAsync()}getProperty(e,t){return"metadata"!==e||this.started||(this.preflightMetadata||(this.preflightMetadata=new Promise(((e,t)=>{this.sourceStateGetter({url:this.firstUrl},{}).then((t=>{const r=t.source.queryBindings(this.operation,this.context);r.getProperty("metadata",(i=>{i.state=new n.MetadataValidationState,r.destroy(),this.accumulateMetadata(t.metadata,i).then((r=>{const n={...t.metadata,...i,...r};e(n)})).catch((()=>{e({...t.metadata,state:new n.MetadataValidationState})}))}))})).catch(t)}))),this.preflightMetadata.then((e=>this.setProperty("metadata",e))).catch((()=>{}))),super.getProperty(e,t)}_end(e){for(const e of this.currentIterators)e.destroy();super._end(e)}_read(e,t){if(this.started){for(const t of this.currentIterators){for(;e>0;){const r=t.read();if(null===r)break;e--,this._push(r)}if(e<=0)break}e>=0&&this.canStartNewIterator()?this.sourceStateGetter({url:this.firstUrl},{}).then((e=>{this.startIteratorsForNextUrls(e.handledDatasets,!1),t()})):t()}else this.started=!0,this.sourceStateGetter({url:this.firstUrl},{}).then((e=>{this.startIterator(e),t()})).catch((e=>setTimeout((()=>this.destroy(e)))))}canStartNewIterator(){return this.currentIterators.length+this.iteratorsPendingCreation+this.iteratorsPendingTermination0}startIterator(e){try{const t=e.source.queryBindings(this.operation,this.context,this.queryBindingsOptions);this.currentIterators.push(t);let r=!1,i=!1;t._destination=this,t.on("error",(e=>this.destroy(e))),t.on("readable",(()=>this._fillBuffer())),t.on("end",(()=>{this.currentIterators.splice(this.currentIterators.indexOf(t),1),r=!0,i||this.iteratorsPendingTermination++,i&&this.startIteratorsForNextUrls(e.handledDatasets,!0)})),t.getProperty("metadata",(t=>{this.accumulatedMetadata=this.accumulatedMetadata.then((a=>(async()=>(a||(a=e.metadata),this.accumulateMetadata(a,t)))().then((a=>{const o={...e.metadata,...t,...a};return o.state=new n.MetadataValidationState,this.updateMetadata(o),this.preflightMetadata&&this.preflightMetadata.then((e=>e.state.invalidate())).catch((()=>{})),this.getSourceLinks(o).then((e=>Promise.all(e))).then((async t=>{const n=await this.getLinkQueue();for(const r of t)n.push(r,e.link);i=!0,r&&this.iteratorsPendingTermination--,this.startIteratorsForNextUrls(e.handledDatasets,!0)})).catch((e=>this.destroy(e))),o})))).catch((e=>(this.destroy(e),{})))}))}catch(e){this.destroy(e)}}updateMetadata(e){const t=this.getProperty("metadata");this.setProperty("metadata",e),t?.state.invalidate()}isRunning(){return!this.done}startIteratorsForNextUrls(e,t){this.getLinkQueue().then((r=>{for(;this.canStartNewIterator()&&this.isRunning();){const t=r.pop();if(!t)break;this.iteratorsPendingCreation++,this.sourceStateGetter(t,e).then((e=>{this.iteratorsPendingCreation--,this.startIterator(e)})).catch((e=>this.emit("error",e)))}t&&this.isCloseable(r,!0)&&this.close()})).catch((e=>this.destroy(e)))}isCloseable(e,t){return e.isEmpty()&&!this.areIteratorsRunning()}}t.LinkedRdfSourcesAsyncRdfIterator=a},47833:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatedLinkedRdfSourcesAsyncRdfIterator=void 0;const n=r(32227),i=r(18050),a=r(31578),o=r(87896),s=new i.DataFactory,c=new a.Factory;class u extends o.LinkedRdfSourcesAsyncRdfIterator{constructor(e,t,r,n,i,a,o,s,c,u,l,d){super(e,t,r,n,a,o,s,c?{maxBufferSize:Number.POSITIVE_INFINITY}:void 0),this.wasForcefullyClosed=!1,this.forceSourceType=i,this.mediatorMetadataAccumulate=u,this.mediatorRdfResolveHypermediaLinks=l,this.mediatorRdfResolveHypermediaLinksQueue=d,this.handledUrls={[a]:!0},this.aggregatedStore=c}close(){this.aggregatedStore?this.getLinkQueue().then((e=>{this.isCloseable(e,!1)?(this.aggregatedStore&&setTimeout((()=>this.aggregatedStore.end())),super.close()):this.wasForcefullyClosed=!0})).catch((e=>super.destroy(e))):super.close()}destroy(e){this.aggregatedStore?this.getLinkQueue().then((t=>{e??this.isCloseable(t,!1)?(this.aggregatedStore&&setTimeout((()=>this.aggregatedStore.end())),super.destroy(e)):this.wasForcefullyClosed=!0})).catch((e=>super.destroy(e))):super.destroy(e)}isCloseable(e,t){return(t?e.isEmpty():this.wasForcefullyClosed||e.isEmpty())&&!this.areIteratorsRunning()}canStartNewIterator(){return!this.wasForcefullyClosed&&this.aggregatedStore&&this.aggregatedStore.hasRunningIterators()||super.canStartNewIterator()}canStartNewIteratorConsiderReadable(){return!this.aggregatedStore}isRunning(){return this.aggregatedStore&&this.aggregatedStore.hasRunningIterators()||!this.done}getLinkQueue(){return this.linkQueue||(this.linkQueue=this.mediatorRdfResolveHypermediaLinksQueue.mediate({firstUrl:this.firstUrl,context:this.context}).then((e=>e.linkQueue))),this.linkQueue}async getSourceLinks(e){try{const{links:t}=await this.mediatorRdfResolveHypermediaLinks.mediate({context:this.context,metadata:e});return t.filter((e=>!this.handledUrls[e.url]&&(this.handledUrls[e.url]=!0,!0)))}catch{return[]}}startIterator(e){if(this.aggregatedStore&&!this.aggregatedStore.containedSources.has(e.link.url)){this.aggregatedStore?.containedSources.add(e.link.url);const t=e.source.queryBindings(c.createPattern(s.variable("s"),s.variable("p"),s.variable("o"),s.variable("g")),this.context.set(n.KeysQueryOperation.unionDefaultGraph,!0)).map((e=>s.quad(e.get("s"),e.get("p"),e.get("o"),e.get("g"))));this.aggregatedStore.import(t).on("end",(()=>{super.startIterator(e)}))}else super.startIterator(e)}async accumulateMetadata(e,t){return(await this.mediatorMetadataAccumulate.mediate({mode:"append",accumulatedMetadata:e,appendingMetadata:t,context:this.context})).metadata}updateMetadata(e){super.updateMetadata(e),this.aggregatedStore?.setBaseMetadata(e,!0)}}t.MediatedLinkedRdfSourcesAsyncRdfIterator=u},870:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceHypermedia=void 0;const n=r(27474),i=r(32227),a=r(76664),o=r(35069),s=r(58521),c=r(47833),u=r(69321);t.QuerySourceHypermedia=class{constructor(e,t,r,n,i,a,s,c){this.referenceValue=t,this.cacheSize=e,this.firstUrl=t,this.forceSourceType=r,this.maxIterators=n,this.mediators=a,this.aggregateStore=i,this.logWarning=s,this.bindingsFactory=c,this.sourcesState=new o.LRUCache({max:this.cacheSize})}async getSelectorShape(e){return(await this.getSourceCached({url:this.firstUrl},{},e,this.getAggregateStore(e))).source.getSelectorShape(e)}queryBindings(e,t,r){const i=this.getAggregateStore(t);if(i&&"pattern"===e.type&&i.started)return new n.QuerySourceRdfJs(i,this.bindingsFactory).queryBindings(e,t);0===this.sourcesState.size&&this.getSourceCached({url:this.firstUrl},{},t,i).catch((e=>a.destroy(e)));const a=new c.MediatedLinkedRdfSourcesAsyncRdfIterator(this.cacheSize,e,r,t,this.forceSourceType,this.firstUrl,this.maxIterators,((e,r)=>this.getSourceCached(e,r,t,i)),i,this.mediators.mediatorMetadataAccumulate,this.mediators.mediatorRdfResolveHypermediaLinks,this.mediators.mediatorRdfResolveHypermediaLinksQueue);if(i){i.started=!0;const e=()=>a.kickstart();i.addIteratorCreatedListener(e),a.on("end",(()=>i.removeIteratorCreatedListener(e)))}return a}queryQuads(e,t){return new a.TransformIterator((async()=>(await this.getSourceCached({url:this.firstUrl},{},t,this.getAggregateStore(t))).source.queryQuads(e,t)))}async queryBoolean(e,t){const r=await this.getSourceCached({url:this.firstUrl},{},t,this.getAggregateStore(t));return await r.source.queryBoolean(e,t)}async queryVoid(e,t){const r=await this.getSourceCached({url:this.firstUrl},{},t,this.getAggregateStore(t));return await r.source.queryVoid(e,t)}async getSource(e,t,r,n){e.context&&(r=r.merge(e.context));let i,a,o=e.url;try{const t=await this.mediators.mediatorDereferenceRdf.mediate({context:r,url:o});o=t.url;const n=await this.mediators.mediatorMetadata.mediate({context:r,url:o,quads:t.data,triples:t.metadata?.triples});n.data.on("error",(()=>{})),a=(await this.mediators.mediatorMetadataExtract.mediate({context:r,url:o,metadata:n.metadata,headers:t.headers,requestTime:t.requestTime})).metadata,i=n.data,e.transform&&(i=await e.transform(i))}catch(e){i=new s.Readable,i.read=()=>(setTimeout((()=>i.emit("error",e))),null),({metadata:a}=await this.mediators.mediatorMetadataAccumulate.mediate({context:r,mode:"initialize"})),this.logWarning(`Metadata extraction for ${o} failed: ${e.message}`)}n?.setBaseMetadata(a,!1),n?.containedSources.add(e.url),n?.import(i);const{source:c,dataset:u}=await this.mediators.mediatorQuerySourceIdentifyHypermedia.mediate({context:r,forceSourceType:e.url===this.firstUrl?this.forceSourceType:void 0,handledDatasets:t,metadata:a,quads:i,url:o});return u&&(t[u]=!0),{link:e,source:c,metadata:a,handledDatasets:t}}getSourceCached(e,t,r,n){let i=this.sourcesState.get(e.url);return i||(i=this.getSource(e,t,r,n),e.url!==this.firstUrl&&void 0!==n||this.sourcesState.set(e.url,i),i)}getAggregateStore(e){let t;if(this.aggregateStore){const r=e.get(i.KeysQuerySourceIdentify.hypermediaSourcesAggregatedStores);if(r)return t=r.get(this.firstUrl),t||(t=new u.StreamingStoreMetadata(void 0,(async(t,r)=>(await this.mediators.mediatorMetadataAccumulate.mediate({mode:"append",accumulatedMetadata:t,appendingMetadata:r,context:e})).metadata)),r.set(this.firstUrl,t)),t}}toString(){return`QuerySourceHypermedia(${this.firstUrl})`}}},69321:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamingStoreMetadata=void 0;const n=r(59510),i=r(72394),a=r(2887);class o extends a.StreamingStore{constructor(e,t){super(e),this.started=!1,this.containedSources=new Set,this.runningIterators=new Set,this.iteratorCreatedListeners=new Set,this.baseMetadata={state:new i.MetadataValidationState,cardinality:{type:"exact",value:0},canContainUndefs:!1,variables:[]},this.metadataAccumulator=t}import(e){return this.ended||super.import(e),e}hasRunningIterators(){return this.runningIterators.size>0}match(e,t,r,a){const o=super.match(e,t,r,a),s=new n.ClosableTransformIterator(o,{autoStart:!1,onClose:()=>{this.runningIterators.delete(s)}});let c=this.getStore().countQuads(e,t,r,a);const u={state:new i.MetadataValidationState,cardinality:{type:"estimate",value:c},canContainUndefs:!1};s.setProperty("metadata",u),s.setProperty("lastCount",c),o.on("quad",(()=>{s.setProperty("lastCount",++c),this.updateMetadataState(s,c)})),this.runningIterators.add(s);for(const e of this.iteratorCreatedListeners)e();return s}setBaseMetadata(e,t){if(this.baseMetadata={...e},this.baseMetadata.cardinality={type:"exact",value:0},t)for(const e of this.runningIterators){const t=e.getProperty("lastCount");this.updateMetadataState(e,t)}}updateMetadataState(e,t){const r={state:new i.MetadataValidationState,cardinality:{type:"estimate",value:t},canContainUndefs:!1,variables:[]};this.metadataAccumulator(this.baseMetadata,r).then((t=>{t.state=new i.MetadataValidationState;const r=e.getProperty("metadata");e.setProperty("metadata",t),r?.state.invalidate()})).catch((()=>{}))}addIteratorCreatedListener(e){this.iteratorCreatedListeners.add(e)}removeIteratorCreatedListener(e){this.iteratorCreatedListeners.delete(e)}}t.StreamingStoreMetadata=o},57789:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(93017),t),i(r(870),t)},34263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyRdfJs=void 0;const n=r(91674),i=r(65483),a=r(34368),o=r(35720);class s extends i.ActorQuerySourceIdentify{constructor(e){super(e)}async test(e){const t=e.querySourceUnidentified;if(void 0!==t.type&&"rdfjs"!==t.type)throw new Error(`${this.name} requires a single query source with rdfjs type to be present in the context.`);if("string"==typeof t.value||!("match"in t.value))throw new Error(`${this.name} received an invalid rdfjs query source.`);return!0}async run(e){return{querySource:{source:new o.QuerySourceRdfJs(e.querySourceUnidentified.value,await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context)),context:e.querySourceUnidentified.context??new a.ActionContext}}}}t.ActorQuerySourceIdentifyRdfJs=s},45958:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},35720:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceRdfJs=void 0;const n=r(65483),i=r(32227),a=r(72394),o=r(76664),s=r(18050),c=r(13252),u=new(r(31578).Factory),l=new s.DataFactory;class d{constructor(e,t){this.source=e,this.referenceValue=e,this.bindingsFactory=t}static nullifyVariables(e,t){return!e||"Variable"===e.termType||!t&&"Quad"===e.termType&&(0,c.someTermsNested)(e,(e=>"Variable"===e.termType))?void 0:e}static hasDuplicateVariables(e){const t=(0,c.filterTermsNested)(e,(e=>"Variable"===e.termType));return t.length>1&&(0,c.uniqTerms)(t).lengths.destroy(e))),(0,n.quadsToBindings)(s,e,this.bindingsFactory,Boolean(t.get(i.KeysQueryOperation.unionDefaultGraph)))}async setMetadata(e,t){const r=Boolean(this.source.features?.quotedTripleFiltering);let n;if(this.source.countQuads)n=await this.source.countQuads(d.nullifyVariables(t.subject,r),d.nullifyVariables(t.predicate,r),d.nullifyVariables(t.object,r),d.nullifyVariables(t.graph,r));else{let e=0;n=await new Promise(((n,i)=>{const a=this.source.match(d.nullifyVariables(t.subject,r),d.nullifyVariables(t.predicate,r),d.nullifyVariables(t.object,r),d.nullifyVariables(t.graph,r));a.on("error",i),a.on("end",(()=>n(e))),a.on("data",(()=>e++))}))}const i=!r&&(0,c.someTerms)(t,(e=>"Quad"===e.termType))||d.hasDuplicateVariables(t);e.setProperty("metadata",{state:new a.MetadataValidationState,cardinality:{type:i?"estimate":"exact",value:n},canContainUndefs:!1})}queryQuads(e,t){throw new Error("queryQuads is not implemented in QuerySourceQpf")}queryBoolean(e,t){throw new Error("queryBoolean is not implemented in QuerySourceQpf")}queryVoid(e,t){throw new Error("queryVoid is not implemented in QuerySourceQpf")}toString(){return`QuerySourceRdfJs(${this.source.constructor.name})`}}t.QuerySourceRdfJs=d,d.SELECTOR_SHAPE={type:"operation",operation:{operationType:"pattern",pattern:u.createPattern(l.variable("s"),l.variable("p"),l.variable("o"))},variablesOptional:[l.variable("s"),l.variable("p"),l.variable("o")]}},27474:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(34263),t),i(r(45958),t),i(r(35720),t)},16661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifySerialized=void 0;const n=r(65483),i=r(10953),a=r(58521);class o extends n.ActorQuerySourceIdentify{constructor(e){super(e)}async test(e){if(!this.isStringSource(e.querySourceUnidentified))throw new Error(`${this.name} requires a single query source with serialized type to be present in the context.`);return!0}async run(e){return await this.mediatorQuerySourceIdentify.mediate({querySourceUnidentified:{type:"rdfjs",value:await this.getRdfSource(e.context,e.querySourceUnidentified),context:e.querySourceUnidentified.context},context:e.context})}async getRdfSource(e,t){const r=new a.Readable({objectMode:!0});r._read=()=>{},r.push(t.value),r.push(null);const n={context:e,handle:{metadata:{baseIRI:t.baseIRI},data:r,context:e},handleMediaType:t.mediaType},o=await this.mediatorRdfParse.mediate(n);return await(0,i.storeStream)(o.handle.data)}isStringSource(e){return"type"in e?"serialized"===e.type:"string"==typeof e.value&&"mediaType"in e}}t.ActorQuerySourceIdentifySerialized=o},84701:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(16661),t)},13494:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinEntriesSortCardinality=void 0;const n=r(84287);class i extends n.ActorRdfJoinEntriesSort{constructor(e){super(e)}async test(e){return!0}async run(e){return{entries:[...e.entries].sort(((e,t)=>e.metadata.cardinality.value-t.metadata.cardinality.value))}}}t.ActorRdfJoinEntriesSortCardinality=i},36545:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(13494),t)},87653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinHash=void 0;const n=r(32353),i=r(2922);class a extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"hash",limitEntries:2})}async getOutput(e){const t=await n.ActorRdfJoin.getMetadatas(e.entries),r=n.ActorRdfJoin.overlappingVariables(t);return{result:{type:"bindings",bindingsStream:new i.HashJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,(e=>n.ActorRdfJoin.hash(e,r)),n.ActorRdfJoin.joinBindings),metadata:async()=>await this.constructResultMetadata(e.entries,t,e.context)}}}async getJoinCoefficients(e,t){const r=n.ActorRdfJoin.getRequestInitialTimes(t),i=n.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value+t[1].cardinality.value,persistedItems:t[0].cardinality.value,blockingItems:t[0].cardinality.value,requestTime:r[0]+t[0].cardinality.value*i[0]+r[1]+t[1].cardinality.value*i[1]}}}t.ActorRdfJoinHash=a},38868:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(87653),t)},57581:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiBindSource=void 0;const n=r(59510),i=r(32353),a=r(76664),o=new(r(31578).Factory);class s extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"bind-source",canHandleUndefs:!0})}async getOutput(e){const t=await i.ActorRdfJoin.getEntriesWithMetadatas(e.entries),r=await this.sortJoinEntries(t,e.context);this.logDebug(e.context,"First entry for Bind Join Source: ",(()=>({entry:r[0].operation,metadata:r[0].metadata})));for(const[e,t]of r.entries())0!==e&&t.output.bindingsStream.close();const o=r[0].output,s=r[0].metadata,c=[...r];c.splice(0,1);const u=n.ActorQueryOperation.getOperationSource(c[0].operation),l=this.createOperationFromEntries(c),d=new i.ChunkedIterator(o.bindingsStream,this.blockSize,{autoStart:!1});return{result:{type:"bindings",bindingsStream:new a.UnionIterator(d.map((t=>u.source.queryBindings(l,u.context?e.context.merge(u.context):e.context,{joinBindings:{bindings:t,metadata:s}})))),metadata:()=>this.constructResultMetadata(r,r.map((e=>e.metadata)),e.context)},physicalPlanMetadata:{bindIndex:t.indexOf(r[0])}}}async sortJoinEntries(e,t){return(e=await i.ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort,e,t)).sort(((e,t)=>e.operationModified&&!t.operationModified?-1:0))}async getJoinCoefficients(e,t){const r=await this.sortJoinEntries(e.entries.map(((e,r)=>({...e,metadata:t[r]}))),e.context);t=r.map((e=>e.metadata));const a=i.ActorRdfJoin.getRequestInitialTimes(t),o=i.ActorRdfJoin.getRequestItemTimes(t),s=[...r],c=[...a],u=[...o];s.splice(0,1),c.splice(0,1),u.splice(0,1);const l=s.map((e=>n.ActorQueryOperation.getOperationSource(e.operation)));if(l.some((e=>!e)))throw new Error(`Actor ${this.name} can not bind on remaining operations without source annotation`);if(l.some((e=>e!==l[0])))throw new Error(`Actor ${this.name} can not bind on remaining operations with non-equal source annotation`);const d=l[0],h=this.createOperationFromEntries(s),p=await d.source.getSelectorShape(e.context);if(!n.ActorQueryOperation.doesShapeAcceptOperation(p,h,{joinBindings:!0}))throw new Error(`Actor ${this.name} detected a source that can not handle passing down join bindings`);const f=await Promise.all(s.map((async t=>(await this.mediatorJoinSelectivity.mediate({entries:[r[0],t],context:e.context})).selectivity*this.selectivityModifier))),y=s.map(((e,t)=>e.metadata.cardinality.value*f[t])).reduce(((e,t)=>e+t),0);return{iterations:1,persistedItems:t[0].cardinality.value,blockingItems:t[0].cardinality.value,requestTime:a[0]+t[0].cardinality.value*o[0]+a[1]+y*o[1]}}createOperationFromEntries(e){return 1===e.length?e[0].operation:o.createJoin(e.map((e=>e.operation)),!0)}}t.ActorRdfJoinMultiBindSource=s},6551:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(57581),t)},38752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiBind=void 0;const n=r(91674),i=r(59510),a=r(32353),o=r(32227),s=r(76664),c=r(31578);class u extends a.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"bind",canHandleUndefs:!0,isLeaf:!1})}static createBindStream(e,t,r,n,a,o){const c="depth-first"===e,u=e=>{const t=r.map((t=>(0,i.materializeOperation)(t,e,o,{bindFilter:!0}))),a=t=>t.merge(e);return new s.TransformIterator((async()=>(await n(t,e)).transform({map:a})),{maxBufferSize:128,autoStart:c})};switch(e){case"depth-first":return new s.MultiTransformIterator(t,{autoStart:!1,multiTransform:u,optional:a});case"breadth-first":return new s.UnionIterator(t.transform({map:u,optional:a}),{autoStart:!1});default:throw new Error(`Received request for unknown bind order: ${e}`)}}async getOutput(e){const t=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context),r=await a.ActorRdfJoin.getEntriesWithMetadatas(e.entries),s=await a.ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort,r,e.context);this.logDebug(e.context,"First entry for Bind Join: ",(()=>({entry:s[0].operation,metadata:s[0].metadata})));for(const[e,t]of s.entries())0!==e&&t.output.bindingsStream.close();const c=s[0].output,l=[...s];l.splice(0,1);const d=e.context.set(o.KeysQueryOperation.joinLeftMetadata,s[0].metadata).set(o.KeysQueryOperation.joinRightMetadatas,l.map((e=>e.metadata)));return{result:{type:"bindings",bindingsStream:u.createBindStream(this.bindOrder,c.bindingsStream,l.map((e=>e.operation)),(async(e,t)=>{const r=1===e.length?e[0]:u.FACTORY.createJoin(e);return i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:r,context:d?.set(o.KeysQueryOperation.joinBindings,t)})).bindingsStream}),!1,t),metadata:()=>this.constructResultMetadata(s,s.map((e=>e.metadata)),e.context)},physicalPlanMetadata:{bindIndex:r.indexOf(s[0]),bindOperation:s[0].operation,bindOperationCardinality:s[0].metadata.cardinality,bindOrder:this.bindOrder}}}canBindWithOperation(e){let t=!0;return c.Util.recurseOperation(e,{[c.Algebra.types.EXTEND]:()=>(t=!1,!1),[c.Algebra.types.GROUP]:()=>(t=!1,!1)}),t}async getJoinCoefficients(e,t){const r=await a.ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort,e.entries.map(((e,r)=>({...e,metadata:t[r]}))),e.context);t=r.map((e=>e.metadata));const n=a.ActorRdfJoin.getRequestInitialTimes(t),i=a.ActorRdfJoin.getRequestItemTimes(t),o=[...r],s=[...n],c=[...i];if(o.splice(0,1),s.splice(0,1),c.splice(0,1),o.some((e=>!this.canBindWithOperation(e.operation))))throw new Error(`Actor ${this.name} can not bind on Extend and Group operations`);if(o.some((e=>e.operationModified)))throw new Error(`Actor ${this.name} can not be used over remaining entries with modified operations`);const u=await Promise.all(o.map((async t=>(await this.mediatorJoinSelectivity.mediate({entries:[r[0],t],context:e.context})).selectivity*this.selectivityModifier))),l=o.map(((e,t)=>e.metadata.cardinality.value*u[t])).reduce(((e,t)=>e+t),0),d=s.reduce(((e,t)=>e+t),0),h=c.reduce(((e,t)=>e+t),0);return{iterations:t[0].cardinality.value*l,persistedItems:0,blockingItems:0,requestTime:n[0]+t[0].cardinality.value*(i[0]+d+l*h)}}}t.ActorRdfJoinMultiBind=u,u.FACTORY=new c.Factory},82331:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(38752),t)},42548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiEmpty=void 0;const n=r(32353),i=r(72394),a=r(76664);class o extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-empty",canHandleUndefs:!0})}async test(e){if((await n.ActorRdfJoin.getMetadatas(e.entries)).every((e=>n.ActorRdfJoin.getCardinality(e).value>0)))throw new Error(`Actor ${this.name} can only join entries where at least one is empty`);return super.test(e)}async getOutput(e){for(const t of e.entries)t.output.bindingsStream.close();return{result:{bindingsStream:new a.ArrayIterator([],{autoStart:!1}),metadata:async()=>({state:new i.MetadataValidationState,cardinality:{type:"exact",value:0},canContainUndefs:!1,variables:n.ActorRdfJoin.joinVariables(await n.ActorRdfJoin.getMetadatas(e.entries))}),type:"bindings"}}}async getJoinCoefficients(e,t){return{iterations:0,persistedItems:0,blockingItems:0,requestTime:0}}}t.ActorRdfJoinMultiEmpty=o},85345:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(42548),t)},82314:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiSmallestFilterBindings=void 0;const n=r(91674),i=r(59510),a=r(32353),o=r(32227),s=r(76664),c=r(31578);class u extends a.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-smallest-filter-bindings",limitEntries:2,limitEntriesMin:!0,isLeaf:!1})}async sortJoinEntries(e,t){let{entries:r}=await this.mediatorJoinEntriesSort.mediate({entries:e,context:t});r=r.sort(((e,t)=>e.operationModified&&!t.operationModified?-1:0));const n=r.splice(0,1)[0];let i,a=-1,o=0;for(const[e,t]of r.entries()){const r=n.metadata.variables.filter((e=>t.metadata.variables.some((t=>e.equals(t))))).length;(!i||r>o||r===o&&(t.metadata.variables.lengthc.metadata.variables.some((t=>e.equals(t))))),p={},f=d.clone().map((e=>e.filter(((e,t)=>h.some((e=>e.equals(t))))))).filter((e=>{const t=(0,n.bindingsToString)(e);return!(t in p)&&(p[t]=!0)})),y=new a.ChunkedIterator(f,this.blockSize,{autoStart:!1}),g=i.ActorQueryOperation.getOperationSource(c.operation),m={output:{type:"bindings",bindingsStream:new s.UnionIterator(y.map((t=>g.source.queryBindings(c.operation,g.context?e.context.merge(g.context):e.context,{filterBindings:{bindings:t,metadata:r.metadata}})))),metadata:c.output.metadata},operation:c.operation,operationModified:!0};c.output.bindingsStream.destroy();const b={output:i.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:e.type,entries:[r,m],context:e.context.set(o.KeysRdfJoin.lastPhysicalJoin,this.physicalName)})),operation:u.FACTORY.createJoin([r.operation,m.operation],!1),operationModified:!0},v=l;return v.unshift(b),{result:await this.mediatorJoin.mediate({type:e.type,entries:v,context:e.context}),physicalPlanMetadata:{firstIndex:t.indexOf(r),secondIndex:t.indexOf(c)}}}async getJoinCoefficients(e,t){if(e.context.get(o.KeysRdfJoin.lastPhysicalJoin)===this.physicalName)throw new Error(`Actor ${this.name} can not be called recursively`);t=[...t];const{first:r,second:n,remaining:s}=await this.sortJoinEntries(e.entries.map(((e,r)=>({...e,metadata:t[r]}))),e.context),c=i.ActorQueryOperation.getOperationSource(n.operation);if(!c)throw new Error(`Actor ${this.name} can only process if entries[1] has a source`);const u=n.operation,l=await c.source.getSelectorShape(e.context);if(!i.ActorQueryOperation.doesShapeAcceptOperation(l,u,{filterBindings:!0}))throw new Error(`Actor ${this.name} can only process if entries[1] accept filterBindings`);t=[r.metadata,n.metadata,...s.map((e=>e.metadata))];const d=a.ActorRdfJoin.getRequestInitialTimes(t),h=a.ActorRdfJoin.getRequestItemTimes(t),{selectivity:p}=await this.mediatorJoinSelectivity.mediate({entries:[r,n],context:e.context}),f=s.reduce(((e,t)=>e*t.metadata.cardinality.value*this.selectivityModifier),1);return{iterations:p*this.selectivityModifier*n.metadata.cardinality.value*f,persistedItems:r.metadata.cardinality.value,blockingItems:r.metadata.cardinality.value,requestTime:d[0]+t[0].cardinality.value*h[0]+d[1]+f*h[1]}}}t.ActorRdfJoinMultiSmallestFilterBindings=u,u.FACTORY=new c.Factory},92107:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(82314),t)},17504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiSmallest=void 0;const n=r(59510),i=r(32353),a=r(31578);class o extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-smallest",limitEntries:3,limitEntriesMin:!0,canHandleUndefs:!0,isLeaf:!1})}async sortJoinEntries(e,t){return(await this.mediatorJoinEntriesSort.mediate({entries:e,context:t})).entries}async getOutput(e){const t=await this.sortJoinEntries(await i.ActorRdfJoin.getEntriesWithMetadatas([...e.entries]),e.context),r=t[0],a=t[1];t.splice(0,2);const s={output:n.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:e.type,entries:[r,a],context:e.context})),operation:o.FACTORY.createJoin([r.operation,a.operation],!1)};return t.push(s),{result:await this.mediatorJoin.mediate({type:e.type,entries:t,context:e.context})}}async getJoinCoefficients(e,t){t=[...t];const r=await this.sortJoinEntries(e.entries.map(((e,r)=>({...e,metadata:t[r]}))),e.context);t=r.map((e=>e.metadata));const n=i.ActorRdfJoin.getRequestInitialTimes(t),a=i.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value*t[1].cardinality.value*t.slice(2).reduce(((e,t)=>e*t.cardinality.value),1),persistedItems:0,blockingItems:0,requestTime:n[0]+t[0].cardinality.value*a[0]+n[1]+t[1].cardinality.value*a[1]+t.slice(2).reduce(((e,t,r)=>e+n.slice(2)[r]+t.cardinality.value*a.slice(2)[r]),0)}}}t.ActorRdfJoinMultiSmallest=o,o.FACTORY=new a.Factory},68841:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(17504),t)},20743:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinNestedLoop=void 0;const n=r(32353),i=r(2922);class a extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"nested-loop",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){return{result:{type:"bindings",bindingsStream:new i.NestedLoopJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,n.ActorRdfJoin.joinBindings,{autoStart:!1}),metadata:async()=>await this.constructResultMetadata(e.entries,await n.ActorRdfJoin.getMetadatas(e.entries),e.context)}}}async getJoinCoefficients(e,t){const r=n.ActorRdfJoin.getRequestInitialTimes(t),i=n.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value*t[1].cardinality.value,persistedItems:0,blockingItems:0,requestTime:r[0]+t[0].cardinality.value*i[0]+r[1]+t[1].cardinality.value*i[1]}}}t.ActorRdfJoinNestedLoop=a},37081:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(20743),t)},19421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinNone=void 0;const n=r(91674),i=r(32353),a=r(72394),o=r(76664);class s extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"none",limitEntries:0})}async test(e){if(e.entries.length>0)throw new Error(`Actor ${this.name} can only join zero entries`);return await this.getJoinCoefficients()}async getOutput(e){const t=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context);return{result:{bindingsStream:new o.ArrayIterator([t.bindings()],{autoStart:!1}),metadata:()=>Promise.resolve({state:new a.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]}),type:"bindings"}}}async getJoinCoefficients(){return{iterations:0,persistedItems:0,blockingItems:0,requestTime:0}}}t.ActorRdfJoinNone=s},498:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(19421),t)},28178:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinSingle=void 0;const n=r(32353);class i extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"single",limitEntries:1}),this.includeInLogs=!1}async test(e){if(1!==e.entries.length)throw new Error(`Actor ${this.name} can only join a single entry`);return await this.getJoinCoefficients()}async getOutput(e){return{result:e.entries[0].output}}async getJoinCoefficients(){return{iterations:0,persistedItems:0,blockingItems:0,requestTime:0}}}t.ActorRdfJoinSingle=i},35848:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(28178),t)},19273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinSymmetricHash=void 0;const n=r(32353),i=r(2922);class a extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"symmetric-hash",limitEntries:2})}async getOutput(e){const t=await n.ActorRdfJoin.getMetadatas(e.entries),r=n.ActorRdfJoin.overlappingVariables(t);return{result:{type:"bindings",bindingsStream:new i.SymmetricHashJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,(e=>a.hash(e,r)),n.ActorRdfJoin.joinBindings),metadata:async()=>await this.constructResultMetadata(e.entries,t,e.context)}}}async getJoinCoefficients(e,t){const r=n.ActorRdfJoin.getRequestInitialTimes(t),i=n.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value+t[1].cardinality.value,persistedItems:t[0].cardinality.value+t[1].cardinality.value,blockingItems:0,requestTime:r[0]+t[0].cardinality.value*i[0]+r[1]+t[1].cardinality.value*i[1]}}}t.ActorRdfJoinSymmetricHash=a},77375:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(19273),t)},18014:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMinusHashUndef=void 0;const n=r(59510),i=r(32353),a=r(5985);class o extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"minus",physicalName:"hash-undef",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){const t=e.entries[1].output,r=e.entries[0].output,o=await i.ActorRdfJoin.getMetadatas(e.entries),s=i.ActorRdfJoin.overlappingVariables(o);if(s.length>0){const e=new a.BindingsIndex(s),i=new n.ClosableTransformIterator((async()=>(await new Promise((r=>{t.bindingsStream.on("data",(t=>e.add(t))),t.bindingsStream.on("end",r),t.bindingsStream.on("error",(e=>{i.emit("error",e)}))})),r.bindingsStream.filter((t=>!e.contains(t))))),{autoStart:!1,onClose(){t.bindingsStream.destroy(),r.bindingsStream.destroy()}});return{result:{type:"bindings",bindingsStream:i,async metadata(){const e=await r.metadata(),t=await r.metadata();return{...t,canContainUndefs:e.canContainUndefs||t.canContainUndefs}}}}}return t.bindingsStream.destroy(),{result:r}}async getJoinCoefficients(e,t){const r=i.ActorRdfJoin.getRequestInitialTimes(t),n=i.ActorRdfJoin.getRequestItemTimes(t);return{iterations:1.01*(t[0].cardinality.value+t[1].cardinality.value),persistedItems:t[0].cardinality.value,blockingItems:t[0].cardinality.value,requestTime:r[0]+t[0].cardinality.value*n[0]+r[1]+t[1].cardinality.value*n[1]}}}t.ActorRdfJoinMinusHashUndef=o},5985:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsIndex=void 0;const n=r(22112);class i{constructor(e){this.data={},this.keys=e}static hashTerm(e){return e&&"Variable"!==e.termType?(0,n.termToString)(e):""}add(e){if(this.isBindingsValid(e)){let t=this.data;for(const r of this.keys){const n=i.hashTerm(e.get(r));let a=t[n];a||(a=t[n]={}),t=a}}}contains(e){return!!this.isBindingsValid(e)&&this.containsRecursive(e,this.keys,[this.data])}isBindingsValid(e){let t=!1;for(const r of this.keys)if(e.get(r)){t=!0;break}return t}containsRecursive(e,t,r){if(0===t.length)return!0;let n;[n,...t]=t;for(const a of r){const r=i.hashTerm(e.get(n));if(r){const n=[a[r],a[""]].filter(Boolean);if(0===n.length)continue;if(this.containsRecursive(e,t,n))return!0}else{let r=Object.keys(a).map((e=>a[e]));if(0===r.length&&(r=[{}]),this.containsRecursive(e,t,r))return!0}}return!1}}t.BindingsIndex=i},98311:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(18014),t)},99917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMinusHash=void 0;const n=r(59510),i=r(32353);class a extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"minus",physicalName:"hash",limitEntries:2})}async getOutput(e){const t=e.entries[1].output,r=e.entries[0].output,a=await i.ActorRdfJoin.getMetadatas(e.entries),o=i.ActorRdfJoin.overlappingVariables(a);if(o.length>0){const e={},a=new n.ClosableTransformIterator((async()=>(await new Promise((r=>{t.bindingsStream.on("data",(t=>{e[i.ActorRdfJoin.hashNonClashing(t,o)]=!0})),t.bindingsStream.on("end",r),t.bindingsStream.on("error",(e=>{a.emit("error",e)}))})),r.bindingsStream.filter((t=>!e[i.ActorRdfJoin.hashNonClashing(t,o)])))),{autoStart:!1,onClose(){t.bindingsStream.destroy(),r.bindingsStream.destroy()}});return{result:{type:"bindings",bindingsStream:a,metadata:r.metadata}}}return t.bindingsStream.destroy(),{result:r}}async getJoinCoefficients(e,t){const r=i.ActorRdfJoin.getRequestInitialTimes(t),n=i.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value+t[1].cardinality.value,persistedItems:t[0].cardinality.value,blockingItems:t[0].cardinality.value,requestTime:r[0]+t[0].cardinality.value*n[0]+r[1]+t[1].cardinality.value*n[1]}}}t.ActorRdfJoinMinusHash=a},11688:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(99917),t)},46869:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinOptionalBind=void 0;const n=r(82331),i=r(91674),a=r(59510),o=r(32353),s=r(32227),c=r(31578);class u extends o.ActorRdfJoin{constructor(e){super(e,{logicalType:"optional",physicalName:"bind",limitEntries:2,canHandleUndefs:!0,isLeaf:!1})}async getOutput(e){const t=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context);e.entries[1].output.bindingsStream.close();const r=e.context.set(s.KeysQueryOperation.joinLeftMetadata,await e.entries[0].output.metadata()).set(s.KeysQueryOperation.joinRightMetadatas,[await e.entries[1].output.metadata()]);return{result:{type:"bindings",bindingsStream:n.ActorRdfJoinMultiBind.createBindStream(this.bindOrder,e.entries[0].output.bindingsStream,[e.entries[1].operation],(async(e,t)=>{const n=e[0];return a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:n,context:r?.set(s.KeysQueryOperation.joinBindings,t)})).bindingsStream}),!0,t),metadata:async()=>await this.constructResultMetadata(e.entries,await o.ActorRdfJoin.getMetadatas(e.entries),e.context,{canContainUndefs:!0})}}}async getJoinCoefficients(e,t){if(0===o.ActorRdfJoin.overlappingVariables(t).length)throw new Error(`Actor ${this.name} only join entries with at least one common variable`);const r=o.ActorRdfJoin.getRequestInitialTimes(t),n=o.ActorRdfJoin.getRequestItemTimes(t);if(e.entries[1].operation.type===c.Algebra.types.EXTEND||e.entries[1].operation.type===c.Algebra.types.GROUP)throw new Error(`Actor ${this.name} can not bind on Extend and Group operations`);const i=(await this.mediatorJoinSelectivity.mediate({entries:e.entries,context:e.context})).selectivity*this.selectivityModifier;return{iterations:t[0].cardinality.value*t[1].cardinality.value*i,persistedItems:0,blockingItems:0,requestTime:r[0]+t[0].cardinality.value*(n[0]+r[1]+i*t[1].cardinality.value*n[1])}}}t.ActorRdfJoinOptionalBind=u},64305:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(46869),t)},75015:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinOptionalHash=void 0;const n=r(59510),i=r(32353),a=r(76664),o=r(22112),s=r(66561),c=r(27900);class u extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"optional",physicalName:`hash-${e.canHandleUndefs?"undef":"def"}-${e.blocking?"blocking":"nonblocking"}`,limitEntries:2,canHandleUndefs:e.canHandleUndefs})}static constructIndex(e,t){return e?new c.BindingsIndexUndef(t,(e=>e&&"Variable"!==e.termType?(0,o.termToString)(e):"")):new s.BindingsIndexDef(t,i.ActorRdfJoin.hashNonClashing)}async getOutput(e){const t=e.entries[1].output,r=e.entries[0].output,o=await i.ActorRdfJoin.getMetadatas(e.entries),s=i.ActorRdfJoin.overlappingVariables(o);let c;return c=this.blocking?new n.ClosableTransformIterator((async()=>{const e=u.constructIndex(this.canHandleUndefs,s);return await new Promise((r=>{t.bindingsStream.on("data",(t=>{(e.getFirst(t)??e.put(t,[])).push(t)})),t.bindingsStream.on("end",r),t.bindingsStream.on("error",(e=>{c.emit("error",e)}))})),new a.MultiTransformIterator(r.bindingsStream,{multiTransform:t=>new a.ArrayIterator(e.get(t).flat().map((e=>i.ActorRdfJoin.joinBindings(t,e))).filter((e=>null!==e)),{autoStart:!1}),optional:!0,autoStart:!1})}),{autoStart:!1,onClose(){t.bindingsStream.destroy(),r.bindingsStream.destroy()}}):new n.ClosableTransformIterator((async()=>{const e=u.constructIndex(this.canHandleUndefs,s);let n=!0;return t.bindingsStream.on("data",(t=>{(e.getFirst(t)??e.put(t,new a.BufferedIterator({autoStart:!1})))._push(t)})),t.bindingsStream.on("end",(()=>{for(const t of e.values())t.close();n=!1})),t.bindingsStream.on("error",(e=>{c.emit("error",e)})),new a.MultiTransformIterator(r.bindingsStream,{multiTransform:t=>{let r=e.get(t);return 0===r.length&&(r=n?[e.put(t,new a.BufferedIterator({autoStart:!1}))]:[]),new a.UnionIterator(r.map((e=>e.clone())),{autoStart:!1}).map((e=>i.ActorRdfJoin.joinBindings(t,e)))},optional:!0,autoStart:!1})}),{autoStart:!1,onClose(){t.bindingsStream.destroy(),r.bindingsStream.destroy()}}),{result:{type:"bindings",bindingsStream:c,metadata:async()=>await this.constructResultMetadata(e.entries,await i.ActorRdfJoin.getMetadatas(e.entries),e.context,{canContainUndefs:!0})}}}async getJoinCoefficients(e,t){if(0===i.ActorRdfJoin.overlappingVariables(t).length)throw new Error(`Actor ${this.name} only join entries with at least one common variable`);const r=i.ActorRdfJoin.getRequestInitialTimes(t),n=i.ActorRdfJoin.getRequestItemTimes(t);let a=t[0].cardinality.value+t[1].cardinality.value;return this.canHandleUndefs||(a*=.8),this.blocking&&(a*=.9),{iterations:a,persistedItems:t[0].cardinality.value,blockingItems:this.blocking?t[0].cardinality.value:0,requestTime:r[0]+t[0].cardinality.value*n[0]+r[1]+t[1].cardinality.value*n[1]}}}t.ActorRdfJoinOptionalHash=u},66561:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsIndexDef=void 0,t.BindingsIndexDef=class{constructor(e,t){this.keys=e,this.hashFn=t,this.index={}}put(e,t){return this.index[this.hashFn(e,this.keys)]=t}get(e){const t=this.getFirst(e);return t?[t]:[]}getFirst(e){return this.index[this.hashFn(e,this.keys)]}values(){return Object.values(this.index)}}},27900:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsIndexUndef=void 0,t.BindingsIndexUndef=class{constructor(e,t){this.data={},this.keys=e,this.hashFn=t}put(e,t){if(this.isBindingsValid(e)){let r=this.data;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinOptionalNestedLoop=void 0;const n=r(32353),i=r(2922);class a extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"optional",physicalName:"nested-loop",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){return{result:{type:"bindings",bindingsStream:new i.NestedLoopJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,n.ActorRdfJoin.joinBindings,{optional:!0,autoStart:!1}),metadata:async()=>await this.constructResultMetadata(e.entries,await n.ActorRdfJoin.getMetadatas(e.entries),e.context,{canContainUndefs:!0})}}}async getJoinCoefficients(e,t){const r=n.ActorRdfJoin.getRequestInitialTimes(t),i=n.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value*t[1].cardinality.value,persistedItems:0,blockingItems:0,requestTime:r[0]+t[0].cardinality.value*i[0]+r[1]+t[1].cardinality.value*i[1]}}}t.ActorRdfJoinOptionalNestedLoop=a},9391:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(67757),t)},7218:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JoinTypes=t.ActorRdfJoinSelectivityVariableCounting=void 0;const n=r(75245),i=r(31578);class a extends n.ActorRdfJoinSelectivity{constructor(e){super(e)}async test(e){return{accuracy:.5}}static getPatternCost(e){let t=1;return"Variable"===e.subject.termType&&(t+=4),"Variable"!==e.predicate.termType&&e.type!==i.Algebra.types.PATH||(t+=1),"Variable"===e.object.termType&&(t+=2),"Variable"===e.graph.termType&&(t+=1),t/9}static getJoinTypes(e,t){const r=[];return"Variable"===e.subject.termType?(e.subject.equals(t.subject)&&r.push(o.unboundSS),"pattern"===t.type&&e.subject.equals(t.predicate)&&r.push(o.unboundSP),e.subject.equals(t.object)&&r.push(o.unboundSO),e.subject.equals(t.graph)&&r.push(o.unboundSG)):(e.subject.equals(t.subject)&&r.push(o.boundSS),"pattern"===t.type&&e.subject.equals(t.predicate)&&r.push(o.boundSP),e.subject.equals(t.object)&&r.push(o.boundSO),e.subject.equals(t.graph)&&r.push(o.boundSG)),"pattern"===e.type&&("Variable"===e.predicate.termType?(e.predicate.equals(t.subject)&&r.push(o.unboundPS),"pattern"===t.type&&e.predicate.equals(t.predicate)&&r.push(o.unboundPP),e.predicate.equals(t.object)&&r.push(o.unboundPO),e.predicate.equals(t.graph)&&r.push(o.unboundPG)):(e.predicate.equals(t.subject)&&r.push(o.boundPS),"pattern"===t.type&&e.predicate.equals(t.predicate)&&r.push(o.boundPP),e.predicate.equals(t.object)&&r.push(o.boundPO),e.predicate.equals(t.graph)&&r.push(o.boundPG))),"Variable"===e.object.termType?(e.object.equals(t.subject)&&r.push(o.unboundOS),"pattern"===t.type&&e.object.equals(t.predicate)&&r.push(o.unboundOP),e.object.equals(t.object)&&r.push(o.unboundOO),e.object.equals(t.graph)&&r.push(o.unboundOG)):(e.object.equals(t.subject)&&r.push(o.boundOS),"pattern"===t.type&&e.object.equals(t.predicate)&&r.push(o.boundOP),e.object.equals(t.object)&&r.push(o.boundOO),e.object.equals(t.graph)&&r.push(o.boundOG)),"Variable"===e.graph.termType?(e.graph.equals(t.subject)&&r.push(o.unboundGS),"pattern"===t.type&&e.graph.equals(t.predicate)&&r.push(o.unboundGP),e.graph.equals(t.object)&&r.push(o.unboundGO),e.graph.equals(t.graph)&&r.push(o.unboundGG)):(e.graph.equals(t.subject)&&r.push(o.boundGS),"pattern"===t.type&&e.graph.equals(t.predicate)&&r.push(o.boundGP),e.graph.equals(t.object)&&r.push(o.boundGO),e.graph.equals(t.graph)&&r.push(o.boundGG)),r}static getOperationsPairwiseJoinCost(e,t){let r=a.MAX_PAIRWISE_COST;for(const n of a.getJoinTypes(e,t))switch(n){case o.boundSS:r-=4;break;case o.boundSP:r-=6;break;case o.boundSO:r-=2;break;case o.boundSG:case o.boundPS:r-=6;break;case o.boundPP:return 1;case o.boundPO:case o.boundPG:r-=6;break;case o.boundOS:r-=2;break;case o.boundOP:r-=6;break;case o.boundOO:r-=2;break;case o.boundOG:case o.boundGS:case o.boundGP:case o.boundGO:case o.boundGG:r-=6;break;case o.unboundSS:r-=2;break;case o.unboundSP:r-=3;break;case o.unboundSO:r-=1;break;case o.unboundSG:case o.unboundPS:case o.unboundPP:case o.unboundPO:case o.unboundPG:r-=3;break;case o.unboundOS:r-=1;break;case o.unboundOP:r-=3;break;case o.unboundOO:r-=1;break;case o.unboundOG:case o.unboundGS:case o.unboundGP:case o.unboundGO:case o.unboundGG:r-=3}return r/a.MAX_PAIRWISE_COST}static getOperationsJoinCost(e){const t=[];for(const r of e)i.Util.recurseOperation(r,{[i.Algebra.types.PATTERN]:e=>(t.push(e),!1),[i.Algebra.types.PATH]:e=>(t.push(e),!1)});let r=0,n=0;for(const e of t)for(const i of t)e!==i&&(r+=a.getOperationsPairwiseJoinCost(e,i),n++);return 0===n?1:r/n*t.reduce(((e,t)=>e*a.getPatternCost(t)),1)}async run(e){return e.entries.length<=1?{selectivity:1}:{selectivity:a.getOperationsJoinCost(e.entries.map((e=>e.operation)))}}}var o;t.ActorRdfJoinSelectivityVariableCounting=a,a.MAX_PAIRWISE_COST=82,function(e){e[e.boundSS=0]="boundSS",e[e.boundSP=1]="boundSP",e[e.boundSO=2]="boundSO",e[e.boundSG=3]="boundSG",e[e.boundPS=4]="boundPS",e[e.boundPP=5]="boundPP",e[e.boundPO=6]="boundPO",e[e.boundPG=7]="boundPG",e[e.boundOS=8]="boundOS",e[e.boundOP=9]="boundOP",e[e.boundOO=10]="boundOO",e[e.boundOG=11]="boundOG",e[e.boundGS=12]="boundGS",e[e.boundGP=13]="boundGP",e[e.boundGO=14]="boundGO",e[e.boundGG=15]="boundGG",e[e.unboundSS=16]="unboundSS",e[e.unboundSP=17]="unboundSP",e[e.unboundSO=18]="unboundSO",e[e.unboundSG=19]="unboundSG",e[e.unboundPS=20]="unboundPS",e[e.unboundPP=21]="unboundPP",e[e.unboundPO=22]="unboundPO",e[e.unboundPG=23]="unboundPG",e[e.unboundOS=24]="unboundOS",e[e.unboundOP=25]="unboundOP",e[e.unboundOO=26]="unboundOO",e[e.unboundOG=27]="unboundOG",e[e.unboundGS=28]="unboundGS",e[e.unboundGP=29]="unboundGP",e[e.unboundGO=30]="unboundGO",e[e.unboundGG=31]="unboundGG"}(o||(t.JoinTypes=o={}))},16703:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(7218),t)},66479:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulateCanContainUndefs=void 0;const n=r(49877);class i extends n.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){if("initialize"===e.mode)return{metadata:{canContainUndefs:!1}};let t=e.accumulatedMetadata.canContainUndefs;return e.appendingMetadata.canContainUndefs&&(t=!0),{metadata:{canContainUndefs:t}}}}t.ActorRdfMetadataAccumulateCanContainUndefs=i},27988:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(66479),t)},80547:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulateCardinality=void 0;const n=r(49877);class i extends n.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){if("initialize"===e.mode)return{metadata:{cardinality:{type:"exact",value:0}}};const t={...e.accumulatedMetadata.cardinality};if(t.dataset){if(!e.appendingMetadata.cardinality.dataset)return{metadata:{cardinality:t}};if(t.dataset!==e.appendingMetadata.cardinality.dataset&&e.appendingMetadata.subsetOf===t.dataset)return{metadata:{cardinality:e.appendingMetadata.cardinality}};if(t.dataset===e.appendingMetadata.cardinality.dataset)return{metadata:{cardinality:t}};delete t.dataset}return e.appendingMetadata.cardinality&&Number.isFinite(e.appendingMetadata.cardinality.value)?("estimate"===e.appendingMetadata.cardinality.type&&(t.type="estimate"),t.value+=e.appendingMetadata.cardinality.value):(t.type="estimate",t.value=Number.POSITIVE_INFINITY),{metadata:{cardinality:t}}}}t.ActorRdfMetadataAccumulateCardinality=i},67243:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(80547),t)},15881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulatePageSize=void 0;const n=r(49877);class i extends n.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){return"initialize"===e.mode?{metadata:{}}:{metadata:{..."pageSize"in e.accumulatedMetadata||"pageSize"in e.appendingMetadata?{pageSize:(e.accumulatedMetadata.pageSize??0)+(e.appendingMetadata.pageSize??0)}:{}}}}}t.ActorRdfMetadataAccumulatePageSize=i},91475:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(15881),t)},68951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulateRequestTime=void 0;const n=r(49877);class i extends n.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){return"initialize"===e.mode?{metadata:{}}:{metadata:{..."requestTime"in e.accumulatedMetadata||"requestTime"in e.appendingMetadata?{requestTime:(e.accumulatedMetadata.requestTime??0)+(e.appendingMetadata.requestTime??0)}:{}}}}}t.ActorRdfMetadataAccumulateRequestTime=i},26719:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(68951),t)},85702:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAll=void 0;const n=r(52628),i=r(58521);class a extends n.ActorRdfMetadata{constructor(e){super(e)}async test(e){return!0}async run(e){const t=new i.Readable({objectMode:!0}),r=new i.Readable({objectMode:!0});e.quads.on("error",(e=>{t.emit("error",e),r.emit("error",e)})),e.quads.on("end",(()=>{t.push(null),r.push(null)}));const n=t._read=r._read=i=>{for(;i>0;){const a=e.quads.read();if(null===a)return e.quads.once("readable",(()=>n(i)));i--,t.push(a),r.push(a)}};return{data:t,metadata:r}}}t.ActorRdfMetadataAll=a},64443:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(85702),t)},94425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractAllowHttpMethods=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){const t={};return e.headers?.get("allow")&&(t.allowHttpMethods=e.headers.get("allow")?.split(/, */u)),{metadata:t}}}t.ActorRdfMetadataExtractAllowHttpMethods=i},40751:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(94425),t)},30066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractHydraControls=void 0;const n=r(10800),i=r(68492);class a extends n.ActorRdfMetadataExtract{constructor(e){super(e),this.parsedUriTemplateCache={}}async test(e){return!0}getLinks(e,t){return Object.fromEntries(a.LINK_TYPES.map((r=>{const n=t[r]||t[`${r}Page`],i=n&&n[e];return[r,i&&i.length>0?[i[0]]:[]]})))}parseUriTemplateCached(e){return this.parsedUriTemplateCache[e]||(this.parsedUriTemplateCache[e]=(0,i.parse)(e))}getSearchForms(e){const t=e.search,r=[];if(t)for(const n in t)for(const i of t[n]){const t=(e.template||{})[i]||[];if(1!==t.length)throw new Error(`Expected 1 hydra:template for ${i}`);const a=t[0],o=this.parseUriTemplateCached(a),s=Object.fromEntries(((e.mapping||{})[i]||[]).map((t=>{const r=((e.variable||{})[t]||[])[0],n=((e.property||{})[t]||[])[0];if(!r)throw new Error(`Expected a hydra:variable for ${t}`);if(!n)throw new Error(`Expected a hydra:property for ${t}`);return[n,r]}))),c=e=>o.expand(Object.fromEntries(Object.keys(e).map((t=>[s[t],e[t]]))));r.push({dataset:n,template:a,mappings:s,getUri:c})}return{values:r}}getHydraProperties(e){return new Promise(((t,r)=>{e.on("error",r);const n={};e.on("data",(e=>{if(e.predicate.value.startsWith(a.HYDRA)){const t=e.predicate.value.slice(a.HYDRA.length),r=n[t]||(n[t]={});(r[e.subject.value]||(r[e.subject.value]=[])).push(e.object.value)}})),e.on("end",(()=>t(n)))}))}async run(e){const t={},r=await this.getHydraProperties(e.metadata);return Object.assign(t,this.getLinks(e.url,r)),t.searchForms=this.getSearchForms(r),{metadata:t}}}t.ActorRdfMetadataExtractHydraControls=a,a.HYDRA="http://www.w3.org/ns/hydra/core#",a.LINK_TYPES=["first","next","previous","last"]},85405:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(30066),t)},68714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractHydraCount=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}run(e){return new Promise(((t,r)=>{e.metadata.on("error",r),e.metadata.on("data",(e=>{this.predicates.includes(e.predicate.value)&&t({metadata:{cardinality:{type:"estimate",value:Number.parseInt(e.object.value,10),dataset:e.subject.value}}})})),e.metadata.on("end",(()=>{t({metadata:{cardinality:{type:"estimate",value:0}}})}))}))}}t.ActorRdfMetadataExtractHydraCount=i},57586:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(68714),t)},77690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractHydraPagesize=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return new Promise(((t,r)=>{e.metadata.on("error",r),e.metadata.on("data",(e=>{this.predicates.includes(e.predicate.value)&&t({metadata:{pageSize:Number.parseInt(e.object.value,10)}})})),e.metadata.on("end",(()=>{t({metadata:{}})}))}))}}t.ActorRdfMetadataExtractHydraPagesize=i},54777:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(77690),t)},43875:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractPatchSparqlUpdate=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){const t={};return(e.headers?.get("accept-patch")?.includes("application/sparql-update")??e.headers?.get("ms-author-via")?.includes("SPARQL"))&&(t.patchSparqlUpdate=!0),{metadata:t}}}t.ActorRdfMetadataExtractPatchSparqlUpdate=i},55282:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(43875),t)},86312:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractPutAccepted=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){const t={};return e.headers?.get("accept-put")&&(t.putAccepted=e.headers.get("accept-put")?.split(/, */u)),{metadata:t}}}t.ActorRdfMetadataExtractPutAccepted=i},44549:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(86312),t)},66468:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractRequestTime=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return{metadata:{requestTime:e.requestTime}}}}t.ActorRdfMetadataExtractRequestTime=i},7445:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(66468),t)},42214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractSparqlService=void 0;const n=r(10800),i=r(9929);class a extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return new Promise(((t,r)=>{e.metadata.on("error",r);const n={};e.metadata.on("data",(t=>{"http://www.w3.org/ns/sparql-service-description#endpoint"!==t.predicate.value||"BlankNode"!==t.subject.termType&&t.subject.value!==e.url?"http://www.w3.org/ns/sparql-service-description#defaultGraph"===t.predicate.value&&(n.defaultGraph=t.object.value):(n.sparqlService="Literal"===t.object.termType?(0,i.resolve)(t.object.value,e.url):t.object.value,this.inferHttpsEndpoint&&e.url.startsWith("https")&&!n.sparqlService.startsWith("https")&&(n.sparqlService=n.sparqlService.replace("http:","https:")))})),e.metadata.on("end",(()=>{t({metadata:n})}))}))}}t.ActorRdfMetadataExtractSparqlService=a},3187:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(42214),t)},82889:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataPrimaryTopic=void 0;const n=r(52628),i=r(58521);class a extends n.ActorRdfMetadata{constructor(e){super(e)}async test(e){if(e.triples)throw new Error("This actor only supports non-triple quad streams.");return!0}async run(e){const t=new i.Readable({objectMode:!0}),r=new i.Readable({objectMode:!0}),n=()=>{t._read=r._read=()=>{},e.quads.on("error",(e=>{t.emit("error",e),r.emit("error",e)}));const n={};let i;const a={};e.quads.on("data",(t=>{"http://rdfs.org/ns/void#subset"===t.predicate.value&&t.object.value===e.url?i=t.subject.value:"http://xmlns.com/foaf/0.1/primaryTopic"===t.predicate.value&&(a[t.object.value]=t.subject.value);let r=n[t.graph.value];r||(r=n[t.graph.value]=[]),r.push(t)})),e.quads.on("end",(()=>{const e=i?a[i]:void 0;for(const i in n)if(i===e){for(const e of n[i])r.push(e);if(this.metadataToData)for(const e of n[i])t.push(e)}else{for(const e of n[i])t.push(e);if(!e&&this.dataToMetadataOnInvalidMetadataGraph)for(const e of n[i])r.push(e)}t.push(null),r.push(null)}))};return t._read=r._read=()=>{n()},{data:t,metadata:r}}}t.ActorRdfMetadataPrimaryTopic=a},80848:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(82889),t)},99209:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlMicrodata=void 0;const n=r(65446),i=r(5558);class a extends n.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=e.headers?e.headers.get("content-type"):null,r=t?.includes("xml"),n=new i.MicrodataRdfParser({baseIRI:e.baseIRI,xmlMode:r});n.on("error",e.error),n.on("data",e.emit);const a=n.onEnd;return n.onEnd=()=>{a.call(n),e.end()},{htmlParseListener:n}}}t.ActorRdfParseHtmlMicrodata=a},42421:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(99209),t)},39149:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlRdfa=void 0;const n=r(65446),i=r(21860);class a extends n.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=e.headers?e.headers.get("content-type"):null,r=(e.headers&&e.headers.get("content-language"))??void 0,n=t&&t.includes("xml")?"xhtml":"html",a=new i.RdfaParser({baseIRI:e.baseIRI,profile:n,language:r});a.on("error",e.error),a.on("data",e.emit);const o=a.onEnd;return a.onEnd=()=>{o.call(a),e.end()},{htmlParseListener:a}}}t.ActorRdfParseHtmlRdfa=a},26585:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(39149),t)},42601:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlScript=void 0;const n=r(65446),i=r(14107);class a extends n.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=(await this.mediatorRdfParseMediatypes.mediate({context:e.context,mediaTypes:!0})).mediaTypes;return{htmlParseListener:new i.HtmlScriptListener(this.mediatorRdfParseHandle,e.emit,e.error,e.end,t,e.context,e.baseIRI,e.headers)}}}t.ActorRdfParseHtmlScript=a},14107:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HtmlScriptListener=void 0;const n=r(32227),i=r(58521),a=r(9929);class o{constructor(e,t,r,i,a,o,s,c){this.textChunksJsonLd=[],this.endBarrier=1,this.passedScripts=0,this.isFinalJsonLdProcessing=!1,this.mediatorRdfParseHandle=e,this.cbQuad=t,this.cbError=r,this.cbEnd=i,this.supportedTypes=a,this.context=o.set(n.KeysRdfParseHtmlScript.processingHtmlScript,!0),this.baseIRI=s,this.headers=c,this.onlyFirstScript=!1===o.get(n.KeysRdfParseHtmlScript.extractAllScripts);const u=this.baseIRI.indexOf("#");this.targetScriptId=u>0?this.baseIRI.slice(u+1,this.baseIRI.length):null}static newErrorCoded(e,t){const r=new Error(e);return r.code=t,r}onEnd(){0==--this.endBarrier&&(this.textChunksJsonLd.length>0?(this.handleMediaType="application/ld+json",this.textChunks=this.textChunksJsonLd,this.textChunks.push("]"),this.textChunksJsonLd=[],this.isFinalJsonLdProcessing=!0,this.endBarrier++,this.onTagClose()):(0===this.passedScripts&&this.targetScriptId&&this.cbError(o.newErrorCoded(`Failed to find targeted script id "${this.targetScriptId}"`,"loading document failed")),this.cbEnd()),this.isFinalJsonLdProcessing=!1)}onTagClose(){if(this.handleMediaType)if(this.requiresCustomJsonLdHandling(this.handleMediaType)&&!this.isFinalJsonLdProcessing)this.handleMediaType=void 0,this.textChunks=void 0,this.onEnd();else{const e=new i.Readable({objectMode:!0});e._read=()=>{};const t=this.textChunks,r={context:this.context,handle:{metadata:{baseIRI:this.baseIRI},data:e,headers:this.headers,context:this.context},handleMediaType:this.handleMediaType};this.mediatorRdfParseHandle.mediate(r).then((({handle:r})=>{r.data.on("error",(e=>this.cbError(o.newErrorCoded(e.message,"invalid script element")))).on("data",this.cbQuad).on("end",(()=>this.onEnd()));for(const r of t)e.push(r);e.push(null)})).catch((e=>{this.targetScriptId?this.cbError(o.newErrorCoded(e.message,"loading document failed")):this.onEnd()})),this.handleMediaType=void 0,this.textChunks=void 0}}onTagOpen(e,t){"base"===e&&t.href&&(this.baseIRI=(0,a.resolve)(t.href,this.baseIRI)),"script"!==e||this.targetScriptId&&t.id!==this.targetScriptId?this.handleMediaType=void 0:this.supportedTypes[t.type]?this.onlyFirstScript&&this.passedScripts>0?this.handleMediaType=void 0:(this.passedScripts++,this.handleMediaType=t.type,this.endBarrier++,this.requiresCustomJsonLdHandling(this.handleMediaType)?(this.textChunks=this.textChunksJsonLd,this.textChunks.push(0===this.textChunks.length?"[":",")):this.textChunks=[]):this.targetScriptId&&this.cbError(o.newErrorCoded(`Targeted script "${this.targetScriptId}" does not have a supported type`,"loading document failed"))}onText(e){this.handleMediaType&&this.textChunks.push(e)}requiresCustomJsonLdHandling(e){return!this.onlyFirstScript&&!this.targetScriptId&&"application/ld+json"===e}}t.HtmlScriptListener=o},3549:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(42601),t)},70256:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtml=void 0;const n=r(54592),i=r(41173),a=r(58521);class o extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const n=new a.Readable({objectMode:!0});n._read=()=>{};let o=0,s=1;function c(e){n.emit("error",e)}function u(){0==--s&&n.push(null)}const l={baseIRI:e.metadata?.baseIRI??"",context:r,emit:e=>{o--,n.push(e)},end:u,error:c,headers:e.headers};try{const t=await Promise.all(this.busRdfParseHtml.publish(l));s+=t.length;const r=[];for(const e of t){const{htmlParseListener:t}=await e.actor.run(l);r.push(t)}const a=new i.Parser({onclosetag(){try{for(const e of r)e.onTagClose()}catch(e){c(e)}},onend(){try{for(const e of r)e.onEnd()}catch(e){c(e)}u()},onopentag(e,t){try{for(const n of r)n.onTagOpen(e,t)}catch(e){c(e)}},ontext(e){try{for(const t of r)t.onText(e)}catch(e){c(e)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:!1}),d=n._read=t=>{for(o=Math.max(t,o);o>0;){const t=e.data.read();if(null===t)return void e.data.once("readable",(()=>d(0)));a.write(t.toString())}};e.data.on("error",c).on("end",(()=>a.end()))}catch(e){setTimeout((()=>{n.emit("error",e)}))}return{data:n}}}t.ActorRdfParseHtml=o},28955:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(70256),t)},61364:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseJsonLd=void 0;const n=r(54592),i=r(32227),a=r(50631),o=r(11817);class s extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async testHandle(e,t,r){if(r.has(i.KeysRdfParseHtmlScript.processingHtmlScript)&&"application/ld+json"!==t)throw new Error("JSON-LD in script tags can only have media type 'application/ld+json'");if(!t||!(t in this.mediaTypePriorities)&&!t.endsWith("+json"))throw new Error(`Unrecognized media type: ${t}`);return await this.testHandleChecked(e)}async runHandle(e,t,r){return{data:a.JsonLdParser.fromHttpResponse(e.metadata?.baseIRI??"",t,e.headers,{documentLoader:r.get(i.KeysRdfParseJsonLd.documentLoader)??new o.DocumentLoaderMediated(this.mediatorHttp,r),strictValues:r.get(i.KeysRdfParseJsonLd.strictValues),...r.get(i.KeysRdfParseJsonLd.parserOptions)}).import(e.data)}}}t.ActorRdfParseJsonLd=s},11817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLoaderMediated=void 0;const n=r(74870),i=r(27202),a=r(76574);class o extends i.FetchDocumentLoader{constructor(e,t){super(o.createFetcher(e,t)),this.mediatorHttp=e,this.context=t}static createFetcher(e,t){return async(r,i)=>{const o=await e.mediate({input:r,init:i,context:t});return o.json=async()=>JSON.parse(await a(n.ActorHttp.toNodeReadable(o.body))),o}}}t.DocumentLoaderMediated=o},54168:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(61364),t),i(r(11817),t)},20164:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseN3=void 0;const n=r(54592),i=r(72243);class a extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){e.data.on("error",(e=>n.emit("error",e)));const n=e.data.pipe(new i.StreamParser({baseIRI:e.metadata?.baseIRI,format:t.endsWith("n3")?t:`${t}*`}));return{data:n,metadata:{triples:"text/turtle"===t||"application/n-triples"===t||"text/n3"===t}}}}t.ActorRdfParseN3=a},62917:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(20164),t)},61536:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseRdfXml=void 0;const n=r(54592),i=r(97990);class a extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e){e.data.on("error",(e=>t.emit("error",e)));const t=e.data.pipe(new i.RdfXmlParser({baseIRI:e.metadata?.baseIRI}));return{data:t,metadata:{triples:!0}}}}t.ActorRdfParseRdfXml=a},21487:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(61536),t)},62940:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseShaclc=void 0;const n=r(54592),i=r(58521),a=r(21762),o=r(76574),s=r(76268);class c extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const n=new s.PrefixWrappingIterator(o(e.data).then((r=>(0,a.parse)(r,{extendedSyntax:"text/shaclc-ext"===t,baseIRI:e.metadata?.baseIRI})))),c=new i.Readable({objectMode:!0});return n.on("prefix",((...e)=>c.emit("prefix",...e))),{data:c.wrap(n),metadata:{triples:!0}}}}t.ActorRdfParseShaclc=c},76268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrefixWrappingIterator=void 0;const n=r(76664);class i extends n.WrappingIterator{constructor(e){super(e?.then((e=>(this.prefixes=e.prefixes,e))))}read(){if(this.prefixes){for(const e of Object.entries(this.prefixes))this.emit("prefix",...e);delete this.prefixes}return super.read()}}t.PrefixWrappingIterator=i},43352:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(62940),t)},91689:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseXmlRdfa=void 0;const n=r(54592),i=r(21860);class a extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const n=(e.headers&&e.headers.get("content-language"))??void 0;e.data.on("error",(e=>a.emit("error",e)));const a=e.data.pipe(new i.RdfaParser({baseIRI:e.metadata?.baseIRI,profile:"xml",language:n}));return{data:a,metadata:{triples:!0}}}}t.ActorRdfParseXmlRdfa=a},8137:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(91689),t)},43476:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveHypermediaLinksNext=void 0;const n=r(22124);class i extends n.ActorRdfResolveHypermediaLinks{constructor(e){super(e)}async test(e){if(!e.metadata.next||0===e.metadata.next.length)throw new Error(`Actor ${this.name} requires a 'next' metadata entry.`);return!0}async run(e){return{links:e.metadata.next.map((e=>({url:e})))}}}t.ActorRdfResolveHypermediaLinksNext=i},34541:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(43476),t)},18553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveHypermediaLinksQueueFifo=void 0;const n=r(56102),i=r(7381);class a extends n.ActorRdfResolveHypermediaLinksQueue{constructor(e){super(e)}async test(e){return!0}async run(e){return{linkQueue:new i.LinkQueueFifo}}}t.ActorRdfResolveHypermediaLinksQueueFifo=a},7381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkQueueFifo=void 0,t.LinkQueueFifo=class{constructor(){this.links=[]}push(e){return this.links.push(e),!0}getSize(){return this.links.length}isEmpty(){return 0===this.links.length}pop(){return this.links.shift()}peek(){return this.links[0]}}},34120:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(18553),t),i(r(7381),t)},63986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerializeJsonLd=void 0;const n=r(84025),i=r(85832);class a extends n.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const n=new i.JsonLdSerializer({space:" ".repeat(this.jsonStringifyIndentSpaces)});let a;return"pipe"in e.quadStream?(e.quadStream.on("error",(e=>n.emit("error",e))),a=e.quadStream.pipe(n)):a=n.import(e.quadStream),{data:a}}}t.ActorRdfSerializeJsonLd=a},21935:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(63986),t)},34574:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerializeN3=void 0;const n=r(84025),i=r(72243);class a extends n.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t){const r=new i.StreamWriter({format:t});let n;return"pipe"in e.quadStream?(e.quadStream.on("error",(e=>r.emit("error",e))),n=e.quadStream.pipe(r)):n=r.import(e.quadStream),{data:n,triples:"text/turtle"===t||"application/n-triples"===t||"text/n3"===t}}}t.ActorRdfSerializeN3=a},28510:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(34574),t)},80614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerializeShaclc=void 0;const n=r(84025),i=r(37754),a=r(58521),o=r(22939);class s extends n.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t){const r=new a.Readable;r._read=()=>{};try{const n={};e.quadStream.on("prefix",((e,t)=>{n[e]=t}));const{text:a}=await(0,o.write)(await(0,i.default)(e.quadStream),{errorOnUnused:!0,extendedSyntax:"text/shaclc-ext"===t,prefixes:n});r.push(a),r.push(null)}catch(e){r._read=()=>{r.emit("error",e)}}return{data:r,triples:!0}}}t.ActorRdfSerializeShaclc=s},49343:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(80614),t)},60927:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateHypermediaPatchSparqlUpdate=void 0;const n=r(25345),i=r(92168);class a extends n.ActorRdfUpdateHypermedia{constructor(e){super(e,"patchSparqlUpdate")}async testMetadata(e){if(!e.forceDestinationType&&!e.metadata.patchSparqlUpdate)throw new Error(`Actor ${this.name} could not detect a destination with 'application/sparql-update' as 'Accept-Patch' header.`);if(!e.forceDestinationType&&!e.exists)throw new Error(`Actor ${this.name} can only patch a destination that already exists.`);return!0}async run(e){return this.logInfo(e.context,`Identified as patchSparqlUpdate destination: ${e.url}`),{destination:new i.QuadDestinationPatchSparqlUpdate(e.url,e.context,this.mediatorHttp)}}}t.ActorRdfUpdateHypermediaPatchSparqlUpdate=a},92168:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuadDestinationPatchSparqlUpdate=void 0;const n=r(74870),i=r(10288),a=r(64817),o=r(58521);t.QuadDestinationPatchSparqlUpdate=class{constructor(e,t,r){this.url=e,this.context=t,this.mediatorHttp=r}insert(e){return this.wrapSparqlUpdateRequest("INSERT",e)}async delete(e){return this.wrapSparqlUpdateRequest("DELETE",e)}async wrapSparqlUpdateRequest(e,t){const r=t.map((e=>{let t=`${(0,a.termToString)(e.subject)} ${(0,a.termToString)(e.predicate)} ${(0,a.termToString)(e.object)} .`;return t="DefaultGraph"===e.graph.termType?` ${t}\n`:` GRAPH ${(0,a.termToString)(e.graph)} { ${t} }\n`,t})).prepend([`${e} DATA {\n`]).append(["}"]),s=new o.Readable;s.wrap(r);const c=new i.Headers({"content-type":"application/sparql-update"}),u=await this.mediatorHttp.mediate({context:this.context,init:{headers:c,method:"PATCH",body:n.ActorHttp.toWebReadableStream(s)},input:this.url});await(0,n.validateAndCloseHttpResponse)(this.url,u)}async deleteGraphs(e,t,r){throw new Error("Patch-based SPARQL Update destinations don't support named graphs")}async createGraphs(e,t){throw new Error("Patch-based SPARQL Update destinations don't support named graphs")}}},87057:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(60927),t),i(r(92168),t)},26348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateHypermediaPutLdp=void 0;const n=r(25345),i=r(99713);class a extends n.ActorRdfUpdateHypermedia{constructor(e){super(e,"putLdp")}async testMetadata(e){if(!e.forceDestinationType){if(!e.metadata.allowHttpMethods||!e.metadata.allowHttpMethods.includes("PUT"))throw new Error(`Actor ${this.name} could not detect a destination with 'Allow: PUT' header.`);if(e.exists)throw new Error(`Actor ${this.name} can only put on a destination that does not already exists.`)}return!0}async run(e){return this.logInfo(e.context,`Identified as putLdp destination: ${e.url}`),{destination:new i.QuadDestinationPutLdp(e.url,e.context,e.metadata.putAccepted||[],this.mediatorHttp,this.mediatorRdfSerializeMediatypes,this.mediatorRdfSerialize)}}}t.ActorRdfUpdateHypermediaPutLdp=a},99713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuadDestinationPutLdp=void 0;const n=r(74870),i=r(10288);t.QuadDestinationPutLdp=class{constructor(e,t,r,n,i,a){this.url=e,this.context=t,this.mediaTypes=r,this.mediatorHttp=n,this.mediatorRdfSerializeMediatypes=i,this.mediatorRdfSerialize=a}insert(e){return this.wrapRdfUpdateRequest("INSERT",e)}async delete(e){throw new Error("Put-based LDP destinations don't support deletions")}async wrapRdfUpdateRequest(e,t){const{mediaTypes:r}=await this.mediatorRdfSerializeMediatypes.mediate({context:this.context,mediaTypes:!0}),a=this.mediaTypes.filter((e=>e in r)),o=a.length>0?a[0]:Object.keys(r).sort(((e,t)=>r[t]-r[e]))[0],{handle:{data:s}}=await this.mediatorRdfSerialize.mediate({context:this.context,handle:{quadStream:t,context:this.context},handleMediaType:o}),c=new i.Headers({"content-type":o}),u=await this.mediatorHttp.mediate({context:this.context,init:{headers:c,method:"PUT",body:n.ActorHttp.toWebReadableStream(s)},input:this.url});await(0,n.validateAndCloseHttpResponse)(this.url,u)}async deleteGraphs(e,t,r){throw new Error("Put-based LDP destinations don't support named graphs")}async createGraphs(e,t){throw new Error("Put-based LDP destinations don't support named graphs")}}},3047:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(26348),t),i(r(99713),t)},33179:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateHypermediaSparql=void 0;const n=r(25345),i=r(89084);class a extends n.ActorRdfUpdateHypermedia{constructor(e){super(e,"sparql")}async testMetadata(e){if(!(e.forceDestinationType||e.metadata.sparqlService||this.checkUrlSuffixSparql&&e.url.endsWith("/sparql")||this.checkUrlSuffixUpdate&&e.url.endsWith("/update")))throw new Error(`Actor ${this.name} could not detect a SPARQL service description or URL ending on /sparql or /update.`);return!0}async run(e){return this.logInfo(e.context,`Identified as sparql destination: ${e.url}`),{destination:new i.QuadDestinationSparql(e.metadata.sparqlService||e.url,e.context,this.mediatorHttp)}}}t.ActorRdfUpdateHypermediaSparql=a},89084:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuadDestinationSparql=void 0;const n=r(74190),i=r(64817),a=r(76574);t.QuadDestinationSparql=class{constructor(e,t,r){this.url=e,this.context=t,this.mediatorHttp=r,this.endpointFetcher=new n.SparqlEndpointFetcher({fetch:(e,t)=>this.mediatorHttp.mediate({input:e,init:t,context:this.context}),prefixVariableQuestionMark:!0})}insert(e){return this.wrapSparqlUpdateRequest("INSERT",e)}async delete(e){return this.wrapSparqlUpdateRequest("DELETE",e)}async wrapSparqlUpdateRequest(e,t){const r=t.map((e=>{let t=`${(0,i.termToString)(e.subject)} ${(0,i.termToString)(e.predicate)} ${(0,i.termToString)(e.object)} .`;return t="DefaultGraph"===e.graph.termType?` ${t}\n`:` GRAPH ${(0,i.termToString)(e.graph)} { ${t} }\n`,t})).prepend([`${e} DATA {\n`]).append(["}"]),n=await a(r);await this.endpointFetcher.fetchUpdate(this.url,n)}async deleteGraphs(e,t,r){const n=Array.isArray(e)?e:[e],i=[];for(const e of n){let n;n="string"==typeof e?e:"DefaultGraph"===e.termType?"DEFAULT":`GRAPH <${e.value}>`,i.push(`${r?"DROP":"CLEAR"} ${t?"":"SILENT "}${n}`)}await this.endpointFetcher.fetchUpdate(this.url,i.join("; "))}async createGraphs(e,t){const r=[];for(const n of e)r.push(`CREATE${t?"":" SILENT"} GRAPH <${n.value}>`);await this.endpointFetcher.fetchUpdate(this.url,r.join("; "))}}},58916:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(33179),t),i(r(89084),t)},24657:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuadsHypermedia=void 0;const n=r(86789),i=r(35069);class a extends n.ActorRdfUpdateQuadsDestination{constructor(e){super(e),this.cache=this.cacheSize?new i.LRUCache({max:this.cacheSize}):void 0;const t=this.cache;t&&this.httpInvalidator.addInvalidateListener((({url:e})=>e?t.delete(e):t.clear()))}async test(e){if(!(0,n.getContextDestinationUrl)((0,n.getContextDestination)(e.context)))throw new Error(`Actor ${this.name} can only update quads against a single destination URL.`);return!0}getDestination(e){const t=(0,n.getContextDestination)(e);let r=(0,n.getContextDestinationUrl)(t);if(this.cache&&this.cache.has(r))return this.cache.get(r);const i=(async()=>{let i,a;try{const t=await this.mediatorDereferenceRdf.mediate({context:e,url:r,acceptErrors:!0});a=t.exists,r=t.url;const n=await this.mediatorMetadata.mediate({context:e,url:r,quads:t.data,triples:t.metadata?.triples});i=(await this.mediatorMetadataExtract.mediate({context:e,url:r,metadata:n.metadata,headers:t.headers,requestTime:t.requestTime})).metadata}catch{i={},a=!1}const{destination:o}=await this.mediatorRdfUpdateHypermedia.mediate({context:e,url:r,metadata:i,exists:a,forceDestinationType:(0,n.getDataDestinationType)(t)});return o})();return this.cache&&this.cache.set(r,i),i}}t.ActorRdfUpdateQuadsHypermedia=a},88297:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(24657),t)},88332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuadsRdfJsStore=void 0;const n=r(86789),i=r(38268);class a extends n.ActorRdfUpdateQuadsDestination{constructor(e){super(e)}async test(e){const t=(0,n.getContextDestination)(e.context);if(!t||"string"==typeof t||!("remove"in t)&&"value"in t&&!t.value.remove)throw new Error(`${this.name} received an invalid rdfjsStore.`);return!0}async getDestination(e){const t=(0,n.getContextDestination)(e);return new i.RdfJsQuadDestination("remove"in t?t:t.value)}}t.ActorRdfUpdateQuadsRdfJsStore=a},38268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfJsQuadDestination=void 0;const n=r(35033),i=r(18050),a=r(22112),o=new i.DataFactory;t.RdfJsQuadDestination=class{constructor(e){this.store=e}delete(e){return(0,n.promisifyEventEmitter)(this.store.remove(e))}insert(e){return(0,n.promisifyEventEmitter)(this.store.import(e))}async deleteGraphs(e,t,r){switch(e){case"ALL":await(0,n.promisifyEventEmitter)(this.store.deleteGraph(o.defaultGraph()));case"NAMED":const t=this.store.match(),r={};t.on("data",(e=>{"DefaultGraph"!==e.graph.termType&&(r[(0,a.termToString)(e.graph)]=!0)})),await(0,n.promisifyEventEmitter)(t),await Promise.all(Object.keys(r).map((e=>(0,n.promisifyEventEmitter)(this.store.deleteGraph((0,a.stringToTerm)(e))))));break;default:for(const t of Array.isArray(e)?e:[e])await(0,n.promisifyEventEmitter)(this.store.deleteGraph(t))}}async createGraphs(e,t){if(t)for(const t of e){const e=this.store.match(void 0,void 0,void 0,t);await new Promise(((r,n)=>{e.once("data",(()=>{n(new Error(`Unable to create graph ${t.value} as it already exists`))})),e.on("end",r),e.on("error",n)}))}}}},76722:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(88332),t)},67526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bindings=void 0;const n=r(34368),i=r(6081),a=r(17070);class o{constructor(e,t,r){this.type="bindings",this.dataFactory=e,this.entries=t,this.contextHolder=r}has(e){return this.entries.has("string"==typeof e?e:e.value)}get(e){return this.entries.get("string"==typeof e?e:e.value)}set(e,t){return new o(this.dataFactory,this.entries.set("string"==typeof e?e:e.value,t),this.contextHolder)}delete(e){return new o(this.dataFactory,this.entries.delete("string"==typeof e?e:e.value),this.contextHolder)}keys(){return this.mapIterable(this.iteratorToIterable(this.entries.keys()),(e=>this.dataFactory.variable(e)))}values(){return this.iteratorToIterable(this.entries.values())}forEach(e){for(const[t,r]of this.entries.entries())e(r,this.dataFactory.variable(t))}get size(){return this.entries.size}[Symbol.iterator](){return this.mapIterable(this.iteratorToIterable(this.entries.entries()),(([e,t])=>[this.dataFactory.variable(e),t]))[Symbol.iterator]()}equals(e){if(!e)return!1;if(this===e)return!0;if(this.size!==e.size)return!1;for(const t of this.keys())if(!this.get(t)?.equals(e.get(t)))return!1;return!0}filter(e){return new o(this.dataFactory,(0,i.Map)(this.entries.filter(((t,r)=>e(t,this.dataFactory.variable(r))))),this.contextHolder)}map(e){return new o(this.dataFactory,(0,i.Map)(this.entries.map(((t,r)=>e(t,this.dataFactory.variable(r))))),this.contextHolder)}merge(e){const t=new Set([...this.iteratorToIterable(this.entries.keys()),...[...e.keys()].map((e=>e.value))]),r=[];for(const n of t){const t=this.entries.get(n),i=e.get(this.dataFactory.variable(n));if(t&&i&&!t.equals(i))return;const a=t||i;r.push([n,a])}return this.createBindingsWithContexts(r,e)}mergeWith(e,t){const r=new Set([...this.iteratorToIterable(this.entries.keys()),...[...t.keys()].map((e=>e.value))]),n=[];for(const i of r){const r=this.dataFactory.variable(i),a=this.entries.get(i),o=t.get(r);let s;s=a&&o&&!a.equals(o)?e(a,o,r):a||o,n.push([i,s])}return this.createBindingsWithContexts(n,t)}createBindingsWithContexts(e,t){if(this.contextHolder&&this.contextHolder.context){let r=this.contextHolder.context;return"contextHolder"in t&&t.contextHolder&&t.contextHolder.context&&(r=o.mergeContext(this.contextHolder.contextMergeHandlers,r,t.contextHolder.context)),new o(this.dataFactory,(0,i.Map)(e),{contextMergeHandlers:this.contextHolder.contextMergeHandlers,context:r})}return new o(this.dataFactory,(0,i.Map)(e),t.contextHolder)}static mergeContext(e,t,r){const i=[...t.keys(),...r.keys()],a={},o={},s=new Set(r.keys().map((e=>e.name))),c=t.keys().filter((e=>s.has(e.name)));for(const n of i){if(1===o[n.name])continue;o[n.name]=1;const i=c.some((e=>e.name===n.name));e[n.name]&&i?a[n.name]=e[n.name].run(t.get(n),r.get(n)):!e[n.name]&&i||(t.get(n)?r.get(n)||(a[n.name]=t.get(n)):a[n.name]=r.get(n))}return new n.ActionContext(a)}setContextEntry(e,t){return this.setContextEntryRaw(e,t)}setContextEntryRaw(e,t){return this.contextHolder&&this.contextHolder.context?new o(this.dataFactory,this.entries,{contextMergeHandlers:this.contextHolder.contextMergeHandlers,context:this.contextHolder.context.set(e,t)}):new o(this.dataFactory,this.entries,{contextMergeHandlers:this.contextHolder?.contextMergeHandlers??{},context:(new n.ActionContext).set(e,t)})}deleteContextEntry(e){return this.deleteContextEntryRaw(e)}deleteContextEntryRaw(e){return this.contextHolder?new o(this.dataFactory,this.entries,{contextMergeHandlers:this.contextHolder.contextMergeHandlers,context:this.contextHolder.context?.delete(e)}):new o(this.dataFactory,this.entries)}getContext(){return this.contextHolder?.context}getContextEntry(e){return this.getContext()?.get(e)}toString(){return(0,a.bindingsToString)(this)}*mapIterable(e,t){for(const r of e)yield t(r)}iteratorToIterable(e){return{[Symbol.iterator]:()=>e}}}t.Bindings=o},38846:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsFactory=void 0;const n=r(6081),i=r(18050),a=r(67526);class o{constructor(e=new i.DataFactory,t){this.dataFactory=e,this.contextMergeHandlers=t}static async create(e,t){return new o(new i.DataFactory,(await e.mediate({context:t})).mergeHandlers)}bindings(e=[]){return new a.Bindings(this.dataFactory,(0,n.Map)(e.map((([e,t])=>[e.value,t]))),this.contextMergeHandlers?{contextMergeHandlers:this.contextMergeHandlers}:void 0)}fromBindings(e){return this.bindings([...e])}fromRecord(e){return this.bindings(Object.entries(e).map((([e,t])=>[this.dataFactory.variable(e),t])))}}t.BindingsFactory=o},17070:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindingsToString=void 0;const n=r(22112);t.bindingsToString=function(e){const t={};for(const r of e.keys())t[r.value]=(0,n.termToString)(e.get(r));return JSON.stringify(t,null," ")}},91674:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(67526),t),i(r(38846),t),i(r(17070),t)},53674:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocess=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorContextPreprocess=i},32362:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(53674),t)},18326:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceRdf=void 0;const n=r(47702);class i extends n.ActorDereferenceParse{constructor(e){super(e)}}t.ActorDereferenceRdf=i},53583:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(18326),t)},96859:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereference=void 0;const n=r(5522);class i extends n.ActorDereferenceBase{constructor(e){super(e)}async handleDereferenceErrors(e,t,r,n=0){return this.dereferenceErrorHandler(e,t,{url:e.url,exists:!1,headers:r,requestTime:n})}}t.ActorDereference=i},5522:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceBase=t.isHardError=t.emptyReadable=void 0;const n=r(32227),i=r(34368),a=r(58521);function o(){const e=new a.Readable;return e.push(null),e}function s(e){return!e.get(n.KeysInitQuery.lenient)}t.emptyReadable=o,t.isHardError=s;class c extends i.Actor{constructor(e){super(e)}async dereferenceErrorHandler(e,t,r){if(s(e.context))throw t;return this.logWarn(e.context,t.message),{...r,data:o()}}}t.ActorDereferenceBase=c},75416:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceParse=t.getMediaTypeFromExtension=void 0;const n=r(58521),i=r(5522);function a(e,t){const r=e.lastIndexOf(".");return r>=0&&t?.[e.slice(r+1)]||""}t.getMediaTypeFromExtension=a;class o extends i.ActorDereferenceBase{constructor(e){super(e)}async test(e){return!0}handleDereferenceStreamErrors(e,t){return(0,i.isHardError)(e.context)||(t.on("error",(r=>{this.logWarn(e.context,r.message,(()=>({url:e.url}))),t.push(null)})),t=t.pipe(new n.PassThrough({objectMode:!0}))),t}async run(e){const{context:t}=e,r=await this.mediatorDereference.mediate({...e,mediaTypes:async()=>(await(this.mediatorParseMediatypes?.mediate({context:t,mediaTypes:!0})))?.mediaTypes});let n;try{n=(await this.mediatorParse.mediate({context:t,handle:{context:t,...r,metadata:await this.getMetadata(r)},handleMediaType:(r.mediaType??a(r.url,this.mediaMappings))||e.mediaType})).handle,n.data=this.handleDereferenceStreamErrors(e,n.data)}catch(t){await(r.data.close?.()),n=await this.dereferenceErrorHandler(e,t,{})}return{...r,...n}}}t.ActorDereferenceParse=o},47702:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(96859),t),i(r(75416),t),i(r(5522),t)},45644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHashBindings=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorHashBindings=i},38431:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(45644),t)},24608:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpInvalidate=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorHttpInvalidate=i},1187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpInvalidateListenable=void 0;const n=r(24608);class i extends n.ActorHttpInvalidate{constructor(e){super(e),this.invalidateListeners=[],this.invalidateListeners=[]}addInvalidateListener(e){this.invalidateListeners.push(e)}async test(e){return!0}async run(e){for(const t of this.invalidateListeners)t(e);return{}}}t.ActorHttpInvalidateListenable=i},56320:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(24608),t),i(r(1187),t)},54283:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttp=void 0;const n=r(34368),i=r(33523);globalThis.ReadableStream||(globalThis.ReadableStream=r(55675).ReadableStream);const a=r(76605),o=r(84077);class s extends n.Actor{constructor(e){super(e)}static toNodeReadable(e){return a(e)||null===e?e:(0,i.readableFromWeb)(e)}static toWebReadableStream(e){return o(e)}static headersToHash(e){const t={};return e.forEach(((e,r)=>{t[r]=e})),t}}t.ActorHttp=s},74870:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(54283),t),i(r(92151),t)},92151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAndCloseHttpResponse=void 0;const n=r(76574),i=r(54283);t.validateAndCloseHttpResponse=async function(e,t){if(t.status>=400){let r="empty response";if(t.body){const e=i.ActorHttp.toNodeReadable(t.body);r=await n(e)}throw new Error(`Could not update ${e} (HTTP status ${t.status}):\n${r}`)}await(t.body?.cancel())}},37983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorInit=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorInit=i},99784:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(37983),t)},70735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperation=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorOptimizeQueryOperation=i},6716:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(70735),t)},76986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperation=void 0;const n=r(32227),i=r(34368),a=r(85156),o=r(75698);let s=0;class c extends i.Actor{constructor(e){super(e)}static getSafeBindings(e){return c.validateQueryOutput(e,"bindings"),e}static getSafeQuads(e){return c.validateQueryOutput(e,"quads"),e}static getSafeBoolean(e){return c.validateQueryOutput(e,"boolean"),e}static getSafeVoid(e){return c.validateQueryOutput(e,"void"),e}static validateQueryOutput(e,t){if(e.type!==t)throw new Error(`Invalid query output type: Expected '${t}' but got '${e.type}'`)}static getBaseExpressionContext(e){const t=e.get(n.KeysInitQuery.queryTimestamp),r=e.get(n.KeysInitQuery.baseIRI),i=e.get(n.KeysInitQuery.functionArgumentsCache)??{};if(e.has(n.KeysInitQuery.extensionFunctionCreator)&&e.has(n.KeysInitQuery.extensionFunctions))throw new Error("Illegal simultaneous usage of extensionFunctionCreator and extensionFunctions in context");let a=e.get(n.KeysInitQuery.extensionFunctionCreator);const o=e.get(n.KeysInitQuery.extensionFunctions);return o&&(a=e=>o[e.value]),{now:t,baseIRI:r,extensionFunctionCreator:a,functionArgumentsCache:i}}static getExpressionContext(e,t){return{...this.getBaseExpressionContext(e),bnode:e=>new a.BlankNodeBindingsScoped(e??"BNODE_"+s++)}}static getAsyncExpressionContext(e,t,r){return{...this.getBaseExpressionContext(e),bnode:e=>Promise.resolve(new a.BlankNodeBindingsScoped(e??"BNODE_"+s++)),exists:c.createExistenceResolver(e,t,r)}}static createExistenceResolver(e,t,r){return async(n,i)=>{const a=(0,o.materializeOperation)(n.input,i,r),s=await t.mediate({operation:a,context:e}),u=c.getSafeBindings(s);return n.not!==(1===(await u.bindingsStream.take(1).toArray()).length)}}static throwOnReadOnly(e){if(e.get(n.KeysQueryOperation.readOnly))throw new Error("Attempted a write operation in read-only mode")}static getOperationSource(e){return e.metadata?.scopedSource}static assignOperationSource(e,t){return(e={...e}).metadata=e.metadata?{...e.metadata}:{},e.metadata.scopedSource=t,e}static removeOperationSource(e){delete e.metadata?.scopedSource,e.metadata&&0===Object.keys(e.metadata).length&&delete e.metadata}static doesShapeAcceptOperation(e,t,r){return"conjunction"===e.type?e.children.every((e=>c.doesShapeAcceptOperation(e,t,r))):"disjunction"===e.type?e.children.some((e=>c.doesShapeAcceptOperation(e,t,r))):"arity"===e.type?c.doesShapeAcceptOperation(e.child,t,r):!((r?.joinBindings&&!e.joinBindings)??(r?.filterBindings&&!e.filterBindings))&&("type"===e.operation.operationType?"project"===e.operation.type||e.operation.type===t.type:e.operation.pattern.type===t.type)}}t.ActorQueryOperation=c},19028:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationTyped=void 0;const n=r(32227),i=r(72394),a=r(76986);class o extends a.ActorQueryOperation{constructor(e,t){if(super({...e,operationName:t}),!this.operationName)throw new Error('A valid "operationName" argument must be provided.')}async test(e){if(!e.operation)throw new Error("Missing field 'operation' in a query operation action.");if(e.operation.type!==this.operationName)throw new Error(`Actor ${this.name} only supports ${this.operationName} operations, but got ${e.operation.type}`);const t=e.operation;return this.testOperation(t,e.context)}async run(e){const t=e.context.get(n.KeysInitQuery.physicalQueryPlanLogger);t&&(t.logOperation(e.operation.type,void 0,e.operation,e.context.get(n.KeysInitQuery.physicalQueryPlanNode),this.name,{}),e.context=e.context.set(n.KeysInitQuery.physicalQueryPlanNode,e.operation));const r=e.operation,a=e.context.set(n.KeysQueryOperation.operation,r),o=await this.runOperation(r,a);return"metadata"in o&&(o.metadata=(0,i.cachifyMetadata)(o.metadata)),o}}t.ActorQueryOperationTyped=o},90897:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationTypedMediated=void 0;const n=r(19028);class i extends n.ActorQueryOperationTyped{constructor(e,t){super(e,t)}}t.ActorQueryOperationTypedMediated=i},75698:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.materializeOperation=t.materializeTerm=void 0;const n=r(18050),i=r(22112),a=r(13252),o=r(31578),s=new n.DataFactory,c=s.literal("true",s.namedNode("http://www.w3.org/2001/XMLSchema#boolean"));function u(e,t){if("Variable"===e.termType){const r=t.get(e);if(r)return r}return"Quad"===e.termType&&(0,a.someTermsNested)(e,(e=>"Variable"===e.termType))?(0,a.mapTermsNested)(e,(e=>u(e,t))):e}t.materializeTerm=u,t.materializeOperation=function e(t,r,n,a={}){return a={strictTargetVariables:"strictTargetVariables"in a&&a.strictTargetVariables,bindFilter:!("bindFilter"in a)||a.bindFilter},o.Util.mapOperation(t,{path:(e,t)=>({recurse:!1,result:Object.assign(t.createPath(u(e.subject,r),e.predicate,u(e.object,r),u(e.graph,r)),{metadata:e.metadata})}),pattern:(e,t)=>({recurse:!1,result:Object.assign(t.createPattern(u(e.subject,r),u(e.predicate,r),u(e.object,r),u(e.graph,r)),{metadata:e.metadata})}),extend(t){if(r.has(t.variable)){if(a.strictTargetVariables)throw new Error(`Tried to bind variable ${(0,i.termToString)(t.variable)} in a BIND operator.`);return{recurse:!0,result:e(t.input,r,n,a)}}return{recurse:!0,result:t}},group(e,t){if(a.strictTargetVariables){for(const t of e.variables)if(r.has(t))throw new Error(`Tried to bind variable ${(0,i.termToString)(t)} in a GROUP BY operator.`);return{recurse:!0,result:e}}const n=e.variables.filter((e=>!r.has(e)));return{recurse:!0,result:t.createGroup(e.input,n,e.aggregates)}},project(t,o){if(a.strictTargetVariables){for(const e of t.variables)if(r.has(e))throw new Error(`Tried to bind variable ${(0,i.termToString)(e)} in a SELECT operator.`);return{recurse:!0,result:t}}const s=t.variables.filter((e=>!r.has(e))),c=n.bindings(t.variables.map((e=>{const t=r.get(e);if(t)return[e,t]})).filter(Boolean));return{recurse:!1,result:o.createProject(e(t.input,c,n,a),s)}},values(e,t){if(!a.strictTargetVariables){const n=e.variables.filter((e=>!r.has(e))),a=e.bindings.map((e=>{const t={...e};let n=!0;return r.forEach(((e,r)=>{const a=(0,i.termToString)(r);a in t&&(e.equals(t[a])||(n=!1),delete t[a])})),n?t:void 0})).filter(Boolean);return{recurse:!0,result:t.createValues(n,a)}}for(const t of e.variables)if(r.has(t))throw new Error(`Tried to bind variable ${(0,i.termToString)(t)} in a VALUES operator.`);return{recurse:!1,result:e}},expression(e,t){if(!a.bindFilter)return{recurse:!1,result:e};if("term"===e.expressionType)return{recurse:!1,result:t.createTermExpression(u(e.term,r))};if("operator"===e.expressionType)return"bound"===e.operator&&1===e.args.length&&"term"===e.args[0].expressionType&&[...r.keys()].some((t=>e.args[0].term.equals(t)))?{recurse:!1,result:t.createTermExpression(c)}:{recurse:!0,result:e};if("aggregate"===e.expressionType&&"variable"in e&&r.has(e.variable)){if(a.strictTargetVariables)throw new Error(`Tried to bind ${(0,i.termToString)(e.variable)} in a ${e.aggregator} aggregate.`);return{recurse:!0,result:e}}return{recurse:!0,result:e}}})}},32233:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BusQueryOperation=void 0;const n=r(34368);class i extends n.BusIndexed{constructor(e){super({...e,actorIdentifierFields:["operationName"],actionIdentifierFields:["operation","type"]})}}t.BusQueryOperation=i},45371:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClosableTransformIterator=void 0;const n=r(76664);class i extends n.TransformIterator{constructor(e,t){super(e,t),this.onClose=t.onClose}_end(e){this.onClose(),super._end(e)}}t.ClosableTransformIterator=i},59510:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(76986),t),i(r(19028),t),i(r(90897),t),i(r(75698),t),i(r(32233),t),i(r(45371),t)},88098:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryParse=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorQueryParse=i},79744:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(88098),t)},8906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcess=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorQueryProcess=i},59946:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(8906),t)},2659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerialize=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTyped{constructor(e){super(e)}}t.ActorQueryResultSerialize=i},51492:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeFixedMediaTypes=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(e,t){return!0}}t.ActorQueryResultSerializeFixedMediaTypes=i},22083:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(2659),t),i(r(51492),t)},44218:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermedia=void 0;const n=r(34368);class i extends n.Actor{constructor(e,t){super(e),this.sourceType=t}async test(e){if(e.forceSourceType&&this.sourceType!==e.forceSourceType)throw new Error(`Actor ${this.name} is not able to handle source type ${e.forceSourceType}.`);return this.testMetadata(e)}}t.ActorQuerySourceIdentifyHypermedia=i},89168:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(44218),t)},521:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentify=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorQuerySourceIdentify=i},12982:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filterMatchingQuotedQuads=t.quadsOrderToBindingsOrder=t.quadsMetadataToBindingsMetadata=t.setMetadata=t.getDuplicateElementLinks=t.getVariables=t.isTermVariable=t.quadsToBindings=void 0;const n=r(59510),i=r(72394),a=r(18050),o=r(22112),s=r(13252),c=r(10175),u=new a.DataFactory;function l(e){return"Variable"===e.termType}function d(e){return(0,s.uniqTerms)((0,s.getTermsNested)(e).filter(l))}function h(e){const t={};let r=!1;if((0,s.forEachTermsNested)(e,((e,n)=>{if("Variable"===e.termType){const i=(0,o.termToString)(e),a=(t[i]||(t[i]=[])).push(n);r=r||a>1}})),!r)return;const n={};for(const e in t){const r=t[e],i=r.slice(1);i.length>0&&(n[r[0].join("_")]=i)}return n}function p(e,t,r,n,a){const o=o=>{"canContainUndefs"in o||(o.canContainUndefs=!1),a&&(o.cardinality.type="estimate"),e.setProperty("metadata",f((0,i.validateMetadataQuads)(o),r,n)),o.state&&o.state.addInvalidateListener((()=>{p(e,t,r,n,a)}))},s=t.getProperty("metadata");s?o(s):t.getProperty("metadata",o)}function f(e,t,r){return{...e,canContainUndefs:!1,order:e.order?y(e.order,t):void 0,availableOrders:e.availableOrders?e.availableOrders.map((e=>({cost:e.cost,terms:y(e.terms,t)}))):void 0,variables:r}}function y(e,t){const r={};return e.map((e=>{const n=t[e.term];if(n&&!r[n])return r[n]=!0,{term:u.variable(n),direction:e.direction}})).filter(Boolean)}t.quadsToBindings=function(e,t,r,i){const a=d(t),o="Variable"===t.graph.termType&&!i,c=h(t),l=(0,s.reduceTermsNested)(t,((e,t,r)=>("Variable"===t.termType&&(e[r.join("_")]=t.value),e)),{}),f=new n.ClosableTransformIterator((async()=>{let t=e;return o&&(t=t.filter((e=>"DefaultGraph"!==e.graph.termType))),c&&(t=t.filter((e=>{for(const t in c){const r=t.split("_"),n=(0,s.getValueNestedPath)(e,r);for(const r of c[t])if(!n.equals((0,s.getValueNestedPath)(e,r)))return!1}return!0}))),t.map((e=>r.bindings(Object.keys(l).map((t=>{const r=t.split("_"),n=l[t],i=(0,s.getValueNestedPath)(e,r);return[u.variable(n),i]})))))}),{autoStart:!1,onClose:()=>e.destroy()});return p(f,e,l,a,o||Boolean(c)),f},t.isTermVariable=l,t.getVariables=d,t.getDuplicateElementLinks=h,t.setMetadata=p,t.quadsMetadataToBindingsMetadata=f,t.quadsOrderToBindingsOrder=y,t.filterMatchingQuotedQuads=function(e,t){return(0,s.someTerms)(e,(e=>"Quad"===e.termType))&&(t=t.filter((t=>(0,c.matchPatternMappings)(t,e)))),t}},65483:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(521),t),i(r(12982),t)},36170:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinEntriesSort=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfJoinEntriesSort=i},84287:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(36170),t)},88125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinSelectivity=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfJoinSelectivity=i},75245:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(88125),t)},10654:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoin=void 0;const n=r(32227),i=r(34368),a=r(72394),o=r(18050),s=r(22112),c=r(57778),u=new o.DataFactory;class l extends i.Actor{constructor(e,t){super(e),this.includeInLogs=!0,this.logicalType=t.logicalType,this.physicalName=t.physicalName,this.limitEntries=t.limitEntries??Number.POSITIVE_INFINITY,this.limitEntriesMin=t.limitEntriesMin??!1,this.canHandleUndefs=t.canHandleUndefs??!1,this.isLeaf=t.isLeaf??!0}static hash(e,t){return t.map((t=>{const r=e.get(t);return r?r.value:""})).join("")}static hashNonClashing(e,t){return t.map((t=>{const r=e.get(t);return r?(0,s.termToString)(r):""})).join("")}static overlappingVariables(e){const t=e.map((e=>e.variables));let r=t[0];for(const e of t.slice(1))r=r.filter((t=>e.some((e=>e.value===t.value))));return r}static joinVariables(e){return[...new Set(e.flatMap((e=>e.variables.map((e=>e.value)))))].map((e=>u.variable(e)))}static joinBindings(...e){if(0===e.length)return null;if(1===e.length)return e[0];let t=e[0];for(const r of e.slice(1)){const e=t.merge(r);if(!e)return null;t=e}return t}static getCardinality(e){return e.cardinality}static async getMetadatas(e){return await Promise.all(e.map((e=>e.output.metadata())))}static async getEntriesWithMetadatas(e){const t=await l.getMetadatas(e);return e.map(((e,r)=>({...e,metadata:t[r]})))}static getRequestInitialTimes(e){return e.map((e=>e.pageSize?0:e.requestTime??0))}static getRequestItemTimes(e){return e.map((e=>e.pageSize?(e.requestTime??0)/e.pageSize:0))}constructState(e){const t=new a.MetadataValidationState,r=()=>t.invalidate();for(const t of e)t.state.addInvalidateListener(r);return t}async constructResultMetadata(e,t,r,n={}){let i;return n.cardinality?i=n.cardinality:(i=t.reduce(((e,t)=>{const r=l.getCardinality(t);return{type:"estimate"===r.type?"estimate":e.type,value:e.value*r.value}}),{type:"exact",value:1}),i.value*=(await this.mediatorJoinSelectivity.mediate({entries:e,context:r})).selectivity),{state:this.constructState(t),...n,cardinality:{type:i.type,value:i.value},canContainUndefs:n.canContainUndefs??t.some((e=>e.canContainUndefs)),variables:l.joinVariables(t)}}static async sortJoinEntries(e,t,r){if(t.some((e=>e.metadata.canContainUndefs)))return t;const n={};for(const e of t)for(const t of e.metadata.variables){let e=n[t.value];e||(e=0),n[t.value]=++e}const i=[];for(const[e,t]of Object.entries(n))t>=2&&i.push(e);if(0===i.length)throw new Error("Bind join can only join entries with at least one common variable");const a=[];for(const e of t){let t=!1;for(const r of e.metadata.variables)if(i.includes(r.value)){t=!0;break}t||a.push(e)}return(await e.mediate({entries:t,context:r})).entries.sort(((e,t)=>{const r=a.includes(e);return r===a.includes(t)?0:r?1:-1}))}async test(e){if(e.type!==this.logicalType)throw new Error(`${this.name} can only handle logical joins of type '${this.logicalType}', while '${e.type}' was given.`);if(e.entries.length<=1)throw new Error(`${this.name} requires at least two join entries.`);if(this.limitEntriesMin?e.entries.lengththis.limitEntries)throw new Error(`${this.name} requires ${this.limitEntries} join entries at ${this.limitEntriesMin?"least":"most"}. The input contained ${e.entries.length}.`);for(const t of e.entries)if("bindings"!==t.output.type)throw new Error(`Invalid type of a join entry: Expected 'bindings' but got '${t.output.type}'`);const t=await l.getMetadatas(e.entries);if(!this.canHandleUndefs)for(const e of t)if(e.canContainUndefs)throw new Error(`Actor ${this.name} can not join streams containing undefs`);return await this.getJoinCoefficients(e,t)}async run(e){let t;e.context.has(n.KeysInitQuery.physicalQueryPlanLogger)&&(t=e.context.get(n.KeysInitQuery.physicalQueryPlanNode),e.context=e.context.set(n.KeysInitQuery.physicalQueryPlanNode,e));const r=e.context.get(n.KeysInitQuery.physicalQueryPlanLogger);let i;this.includeInLogs&&r&&(i={},r.stashChildren(t,(e=>e.logicalOperator.startsWith("join"))),r.logOperation(`join-${this.logicalType}`,this.physicalName,e,t,this.name,i));const{result:o,physicalPlanMetadata:s}=await this.getOutput(e),u=await l.getMetadatas(e.entries);if(i){(0,c.instrumentIterator)(o.bindingsStream).then((t=>{r.appendMetadata(e,{cardinalityReal:t.count,timeSelf:t.timeSelf,timeLife:t.timeLife})})),Object.assign(i,s);const t=u.map(l.getCardinality);if(i.cardinalities=t,i.joinCoefficients=await this.getJoinCoefficients(e,u),this.isLeaf)for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChunkedIterator=void 0;const n=r(76664);class i extends n.TransformIterator{constructor(e,t,r){super(e,r),this.chunk=[],this.blockSize=t}consumeChunkAsIterator(){const e=new n.ArrayIterator(this.chunk,{autoStart:!1});return this.chunk=[],e}_transform(e,t,r){this.chunk.push(e),this.chunk.length>=this.blockSize&&r(this.consumeChunkAsIterator()),t()}_flush(e){this.chunk.length>0&&this._push(this.consumeChunkAsIterator()),super._flush(e)}}t.ChunkedIterator=i},32353:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(10654),t),i(r(34875),t)},57778:(e,t)=>{"use strict";function r(e,t,n){if(!("_profileInstrumented"in e)){if(e._profileInstrumented=!0,"_read"in e){const r=e._read;e._read=(n,i)=>{const a=performance.now();r.call(e,n,(()=>{t.timeSelf+=performance.now()-a,i()}))}}if("read"in e){const r=e.read;e.read=()=>{const i=performance.now(),a=r.call(e);return n&&a&&t.count++,t.timeSelf+=performance.now()-i,a}}if(n){const r=performance.now();e.on("end",(()=>{t.timeLife=performance.now()-r}))}"_source"in e&&r(e._source,t,!1)}}Object.defineProperty(t,"__esModule",{value:!0}),t.instrumentIterator=void 0,t.instrumentIterator=function(e){const t={count:0,timeSelf:0,timeLife:0};return r(e,t,!0),new Promise((r=>{e.on("end",(()=>{r(t)}))}))}},97145:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulate=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfMetadataAccumulate=i},49877:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(97145),t)},77879:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtract=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfMetadataExtract=i},10800:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(77879),t)},32124:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadata=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfMetadata=i},52628:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(32124),t)},15569:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtml=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfParseHtml=i},65446:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(15569),t)},20434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParse=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTyped{constructor(e){super(e)}}t.ActorRdfParse=i},67719:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseFixedMediaTypes=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(e){return!0}}t.ActorRdfParseFixedMediaTypes=i},54592:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(20434),t),i(r(67719),t)},79773:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveHypermediaLinksQueue=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfResolveHypermediaLinksQueue=i},25710:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89798:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkQueueWrapper=void 0,t.LinkQueueWrapper=class{constructor(e){this.linkQueue=e}push(e,t){return this.linkQueue.push(e,t)}getSize(){return this.linkQueue.getSize()}isEmpty(){return this.linkQueue.isEmpty()}pop(){return this.linkQueue.pop()}peek(){return this.linkQueue.peek()}}},56102:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(79773),t),i(r(25710),t),i(r(89798),t)},11018:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveHypermediaLinks=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfResolveHypermediaLinks=i},22124:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(11018),t)},29342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerialize=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTyped{constructor(e){super(e)}}t.ActorRdfSerialize=i},34923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerializeFixedMediaTypes=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(){return!0}}t.ActorRdfSerializeFixedMediaTypes=i},84025:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(29342),t),i(r(34923),t)},9917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateHypermedia=void 0;const n=r(34368);class i extends n.Actor{constructor(e,t){super(e),this.destinationType=t}async test(e){if(e.forceDestinationType&&this.destinationType!==e.forceDestinationType)throw new Error(`Actor ${this.name} is not able to handle destination type ${e.forceDestinationType}.`);return this.testMetadata(e)}}t.ActorRdfUpdateHypermedia=i},25345:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(9917),t)},10303:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuads=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfUpdateQuads=i},96527:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuadsDestination=t.deskolemize=t.deskolemizeStream=void 0;const n=r(35106),i=r(32227),a=r(10303);function o(e,t){return e?.map((e=>(0,n.deskolemizeQuad)(e,t)))}function s(e){const t=e.context.get(i.KeysRdfUpdateQuads.destination),r=e.context.get(i.KeysQuerySourceIdentify.sourceIds)?.get(t);return r?{...e,quadStreamInsert:o(e.quadStreamInsert,r),quadStreamDelete:o(e.quadStreamDelete,r)}:e}t.deskolemizeStream=o,t.deskolemize=s;class c extends a.ActorRdfUpdateQuads{async test(e){return!0}async run(e){const t=await this.getDestination(e.context);return await this.getOutput(t,s(e))}async getOutput(e,t){return{execute:async()=>{await(t.quadStreamDelete?e.delete(t.quadStreamDelete):Promise.resolve()),await(t.deleteGraphs?e.deleteGraphs(t.deleteGraphs.graphs,t.deleteGraphs.requireExistence,t.deleteGraphs.dropGraphs):Promise.resolve()),await(t.createGraphs?e.createGraphs(t.createGraphs.graphs,t.createGraphs.requireNonExistence):Promise.resolve()),await(t.quadStreamInsert?e.insert(t.quadStreamInsert):Promise.resolve())}}}}t.ActorRdfUpdateQuadsDestination=c},54877:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},86789:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(10303),t),i(r(96527),t),i(r(54877),t),i(r(86368),t)},86368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContextDestinationUrl=t.getContextDestination=t.getDataDestinationContext=t.getDataDestinationValue=t.getDataDestinationType=t.isDataDestinationRawType=void 0;const n=r(32227);function i(e){return"string"==typeof e||"remove"in e}function a(e){return i(e)?e:e.value}t.isDataDestinationRawType=i,t.getDataDestinationType=function(e){return"string"==typeof e?"":"remove"in e?"rdfjsStore":e.type},t.getDataDestinationValue=a,t.getDataDestinationContext=function(e,t){return"string"==typeof e||"remove"in e||!e.context?t:t.merge(e.context)},t.getContextDestination=function(e){return e.get(n.KeysRdfUpdateQuads.destination)},t.getContextDestinationUrl=function(e){if(e){let t=a(e);if("string"==typeof t){const e=t.indexOf("#");return e>=0&&(t=t.slice(0,e)),t}}}},88851:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeysRdfJoin=t.KeysMergeBindingsContext=t.KeysRdfUpdateQuads=t.KeysQuerySourceIdentify=t.KeysRdfParseHtmlScript=t.KeysRdfParseJsonLd=t.KeysQueryOperation=t.KeysInitQuery=t.KeysHttpProxy=t.KeysHttpMemento=t.KeysHttpWayback=t.KeysHttp=t.KeysCore=void 0;const n=r(34368);t.KeysCore={log:n.CONTEXT_KEY_LOGGER},t.KeysHttp={includeCredentials:new n.ActionContextKey("@comunica/bus-http:include-credentials"),auth:new n.ActionContextKey("@comunica/bus-http:auth"),fetch:new n.ActionContextKey("@comunica/bus-http:fetch"),httpTimeout:new n.ActionContextKey("@comunica/bus-http:http-timeout"),httpBodyTimeout:new n.ActionContextKey("@comunica/bus-http:http-body-timeout"),httpRetryCount:new n.ActionContextKey("@comunica/bus-http:http-retry-count"),httpRetryDelay:new n.ActionContextKey("@comunica/bus-http:http-retry-delay"),httpRetryOnServerError:new n.ActionContextKey("@comunica/bus-http:http-retry-on-server-error")},t.KeysHttpWayback={recoverBrokenLinks:new n.ActionContextKey("@comunica/bus-http:recover-broken-links")},t.KeysHttpMemento={datetime:new n.ActionContextKey("@comunica/actor-http-memento:datetime")},t.KeysHttpProxy={httpProxyHandler:new n.ActionContextKey("@comunica/actor-http-proxy:httpProxyHandler")},t.KeysInitQuery={querySourcesUnidentified:new n.ActionContextKey("@comunica/actor-init-query:querySourcesUnidentified"),initialBindings:new n.ActionContextKey("@comunica/actor-init-query:initialBindings"),queryFormat:new n.ActionContextKey("@comunica/actor-init-query:queryFormat"),graphqlSingularizeVariables:new n.ActionContextKey("@comunica/actor-init-query:singularizeVariables"),lenient:new n.ActionContextKey("@comunica/actor-init-query:lenient"),queryString:new n.ActionContextKey("@comunica/actor-init-query:queryString"),query:new n.ActionContextKey("@comunica/actor-init-query:query"),baseIRI:new n.ActionContextKey("@comunica/actor-init-query:baseIRI"),functionArgumentsCache:new n.ActionContextKey("@comunica/actor-init-query:functionArgumentsCache"),queryTimestamp:new n.ActionContextKey("@comunica/actor-init-query:queryTimestamp"),extensionFunctionCreator:new n.ActionContextKey("@comunica/actor-init-query:extensionFunctionCreator"),extensionFunctions:new n.ActionContextKey("@comunica/actor-init-query:extensionFunctions"),cliArgsHandlers:new n.ActionContextKey("@comunica/actor-init-query:cliArgsHandlers"),explain:new n.ActionContextKey("@comunica/actor-init-query:explain"),physicalQueryPlanLogger:new n.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanLogger"),physicalQueryPlanNode:new n.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanNode"),jsonLdContext:new n.ActionContextKey("@context"),noCache:new n.ActionContextKey("@comunica/actor-init-query:noCache")},t.KeysQueryOperation={operation:new n.ActionContextKey("@comunica/bus-query-operation:operation"),joinLeftMetadata:new n.ActionContextKey("@comunica/bus-query-operation:joinLeftMetadata"),joinRightMetadatas:new n.ActionContextKey("@comunica/bus-query-operation:joinRightMetadatas"),joinBindings:new n.ActionContextKey("@comunica/bus-query-operation:joinBindings"),readOnly:new n.ActionContextKey("@comunica/bus-query-operation:readOnly"),isPathArbitraryLengthDistinctKey:new n.ActionContextKey("@comunica/bus-query-operation:isPathArbitraryLengthDistinct"),limitIndicator:new n.ActionContextKey("@comunica/bus-query-operation:limitIndicator"),unionDefaultGraph:new n.ActionContextKey("@comunica/bus-query-operation:unionDefaultGraph"),querySources:new n.ActionContextKey("@comunica/bus-query-operation:querySources")},t.KeysRdfParseJsonLd={documentLoader:new n.ActionContextKey("@comunica/actor-rdf-parse-jsonld:documentLoader"),strictValues:new n.ActionContextKey("@comunica/actor-rdf-parse-jsonld:strictValues"),parserOptions:new n.ActionContextKey("@comunica/actor-rdf-parse-jsonld:parserOptions")},t.KeysRdfParseHtmlScript={processingHtmlScript:new n.ActionContextKey("@comunica/actor-rdf-parse-html-script:processingHtmlScript"),extractAllScripts:new n.ActionContextKey("extractAllScripts")},t.KeysQuerySourceIdentify={sourceIds:new n.ActionContextKey("@comunica/bus-query-source-identify:sourceIds"),hypermediaSourcesAggregatedStores:new n.ActionContextKey("@comunica/bus-query-source-identify:hypermediaSourcesAggregatedStores"),traverse:new n.ActionContextKey("@comunica/bus-query-source-identify:traverse")},t.KeysRdfUpdateQuads={destination:new n.ActionContextKey("@comunica/bus-rdf-update-quads:destination")},t.KeysMergeBindingsContext={sourcesBinding:new n.ActionContextKey("@comunica/bus-merge-bindings-context:sourcesBinding")},t.KeysRdfJoin={lastPhysicalJoin:new n.ActionContextKey("@comunica/bus-rdf-join:lastPhysicalJoin")}},32227:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(88851),t)},85865:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionContextKey=t.ActionContext=void 0;const n=r(6081);class i{constructor(e={}){this.map=(0,n.Map)(e)}setDefault(e,t){return this.has(e)?this:this.set(e,t)}set(e,t){return this.setRaw(e.name,t)}setRaw(e,t){return new i(this.map.set(e,t))}delete(e){return new i(this.map.delete(e.name))}get(e){return this.getRaw(e.name)}getRaw(e){return this.map.get(e)}getSafe(e){if(!this.has(e))throw new Error(`Context entry ${e.name} is required but not available`);return this.get(e)}has(e){return this.hasRaw(e.name)}hasRaw(e){return this.map.has(e)}merge(...e){let t=this;for(const r of e)for(const e of r.keys())t=t.set(e,r.get(e));return t}keys(){return[...this.map.keys()].map((e=>new a(e)))}toJS(){return this.map.toJS()}toString(){return`ActionContext(${JSON.stringify(this.map.toJS())})`}[Symbol.for("nodejs.util.inspect.custom")](){return`ActionContext(${JSON.stringify(this.map.toJS(),null," ")})`}static ensureActionContext(e){return e instanceof i?e:new i((0,n.Map)(e??{}))}}t.ActionContext=i;class a{constructor(e){this.name=e}}t.ActionContextKey=a},71330:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionObserver=void 0,t.ActionObserver=class{constructor(e){Object.assign(this,e)}}},4165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Actor=void 0;const n=r(17395);class i{constructor(e){this.beforeActors=[],Object.assign(this,e),this.bus.subscribe(this),this.beforeActors.length>0&&this.bus.addDependencies(this,this.beforeActors)}static getContextLogger(e){return e.get(n.CONTEXT_KEY_LOGGER)}runObservable(e){const t=this.run(e);return this.bus.onRun(this,e,t),t}async initialize(){return!0}async deinitialize(){return!0}getDefaultLogData(e,t){const r=t?t():{};return r.actor=this.name,r}logTrace(e,t,r){const n=i.getContextLogger(e);n&&n.trace(t,this.getDefaultLogData(e,r))}logDebug(e,t,r){const n=i.getContextLogger(e);n&&n.debug(t,this.getDefaultLogData(e,r))}logInfo(e,t,r){const n=i.getContextLogger(e);n&&n.info(t,this.getDefaultLogData(e,r))}logWarn(e,t,r){const n=i.getContextLogger(e);n&&n.warn(t,this.getDefaultLogData(e,r))}logError(e,t,r){const n=i.getContextLogger(e);n&&n.error(t,this.getDefaultLogData(e,r))}logFatal(e,t,r){const n=i.getContextLogger(e);n&&n.fatal(t,this.getDefaultLogData(e,r))}}t.Actor=i},64802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bus=void 0,t.Bus=class{constructor(e){this.actors=[],this.observers=[],this.dependencyLinks=new Map,Object.assign(this,e)}subscribe(e){this.actors.push(e),this.reorderForDependencies()}subscribeObserver(e){this.observers.push(e)}unsubscribe(e){const t=this.actors.indexOf(e);return t>=0&&(this.actors.splice(t,1),!0)}unsubscribeObserver(e){const t=this.observers.indexOf(e);return t>=0&&(this.observers.splice(t,1),!0)}publish(e){return this.actors.map((t=>({actor:t,reply:t.test(e)})))}onRun(e,t,r){for(const n of this.observers)n.onRun(e,t,r)}addDependencies(e,t){for(const r of t){let t=this.dependencyLinks.get(r);t||(t=[],this.dependencyLinks.set(r,t)),t.push(e)}this.reorderForDependencies()}reorderForDependencies(){if(this.dependencyLinks.size>0){const e=[];for(const t of this.dependencyLinks.keys()){const r=this.actors.indexOf(t);r>=0&&(this.actors.splice(r,1),e.push(t))}for(;e.length>0;){let t=-1;for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BusIndexed=void 0;const n=r(64802);class i extends n.Bus{constructor(e){super(e),this.actorsIndex={}}subscribe(e){const t=this.getActorIdentifier(e)||"_undefined_";let r=this.actorsIndex[t];r||(r=this.actorsIndex[t]=[]),r.push(e),super.subscribe(e)}unsubscribe(e){const t=this.getActorIdentifier(e)||"_undefined_",r=this.actorsIndex[t];if(r){const n=r.indexOf(e);n>=0&&r.splice(n,1),0===r.length&&delete this.actorsIndex[t]}return super.unsubscribe(e)}publish(e){const t=this.getActionIdentifier(e);return t?[...this.actorsIndex[t]||[],...this.actorsIndex._undefined_||[]].map((t=>({actor:t,reply:t.test(e)}))):super.publish(e)}getActorIdentifier(e){return this.actorIdentifierFields.reduce(((e,t)=>e[t]),e)}getActionIdentifier(e){return this.actionIdentifierFields.reduce(((e,t)=>e[t]),e)}}t.BusIndexed=i},17395:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_KEY_LOGGER=void 0;const n=r(85865);t.CONTEXT_KEY_LOGGER=new n.ActionContextKey("@comunica/core:log")},81411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Mediator=void 0,t.Mediator=class{constructor(e){Object.assign(this,e)}publish(e){const t=this.bus.publish(e);if(0===t.length)throw new Error(`No actors are able to reply to a message in the bus ${this.bus.name}`);return t}async mediateActor(e){return await this.mediateWith(e,this.publish(e))}async mediate(e){return(await this.mediateActor(e)).runObservable(e)}}},34368:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(85865),t),i(r(64802),t),i(r(45609),t),i(r(17395),t),i(r(71330),t),i(r(4165),t),i(r(81411),t)},72204:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlankNodeBindingsScoped=void 0,t.BlankNodeBindingsScoped=class{constructor(e){this.termType="BlankNode",this.singleBindingsScope=!0,this.value=e}equals(e){return!!e&&"BlankNode"===e.termType&&e.value===this.value}}},99094:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlankNodeScoped=void 0,t.BlankNodeScoped=class{constructor(e,t){this.termType="BlankNode",this.value=e,this.skolemized=t}equals(e){return!!e&&"BlankNode"===e.termType&&e.value===this.value}}},85156:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(99094),t),i(r(72204),t)},16095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Aggregator=t.AggregatorComponent=void 0;const n=r(22112),i=r(50363),a=r(14624),o=r(46157);t.AggregatorComponent=class{static emptyValue(){}constructor(e,t){this.sharedContext=t,this.separator=e.separator||" ",this.termTransformer=new i.TermTransformer(t.superTypeProvider)}termToNumericOrError(e){if("Literal"!==e.termType)throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a numeric literal`);if(!(0,o.isSubTypeOf)(e.datatype.value,a.TypeAlias.SPARQL_NUMERIC,this.sharedContext.superTypeProvider))throw new Error(`Term datatype ${e.datatype.value} with value ${e.value} has type ${e.termType} and is not a numeric literal`);return this.termTransformer.transformLiteral(e)}},t.Aggregator=class{constructor(e,t){this.aggregatorComponent=t,this.variableValues=new Map,this.distinct=e.distinct}static emptyValue(e){return e.emptyValue()}result(){return this.aggregatorComponent.result()}put(e,t=""){this.canSkip(e,t)||(this.aggregatorComponent.put(e),this.addSeen(e,t))}canSkip(e,t){const r=this.variableValues.get(t);return this.distinct&&void 0!==r&&r.has(n.termToString(e))}addSeen(e,t){this.distinct&&(this.variableValues.has(t)||this.variableValues.set(t,new Set),this.variableValues.get(t).add(n.termToString(e)))}}},37283:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Average=void 0;const n=r(11269),i=r(42711),a=r(63606),o=r(14624),s=r(16095);class c extends s.AggregatorComponent{constructor(){super(...arguments),this.summer=i.regularFunctions[o.RegularOperator.ADDITION],this.divider=i.regularFunctions[o.RegularOperator.DIVISION],this.state=void 0}static emptyValue(){return(0,a.integer)(0).toRDF()}put(e){if(void 0===this.state){const t=this.termToNumericOrError(e);this.state={sum:t,count:1}}else{const t=this.termToNumericOrError(e);this.state.sum=this.summer.apply([this.state.sum,t],this.sharedContext),this.state.count++}}result(){if(void 0===this.state)return c.emptyValue();const e=new n.IntegerLiteral(this.state.count);return this.divider.apply([this.state.sum,e],this.sharedContext).toRDF()}}t.Average=c},47943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Count=void 0;const n=r(63606),i=r(16095);class a extends i.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}static emptyValue(){return(0,n.integer)(0).toRDF()}put(){void 0===this.state&&(this.state=0),this.state++}result(){return void 0===this.state?a.emptyValue():(0,n.integer)(this.state).toRDF()}}t.Count=a},81663:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupConcat=void 0;const n=r(63606),i=r(16095);class a extends i.AggregatorComponent{constructor(){super(...arguments),this.state=void 0,this.lastLanguageValid=!0,this.lastLanguage=void 0}static emptyValue(){return(0,n.string)("").toRDF()}put(e){void 0===this.state?(this.state=e.value,"Literal"===e.termType&&(this.lastLanguage=e.language)):(this.state+=this.separator+e.value,this.lastLanguageValid&&"Literal"===e.termType&&this.lastLanguage!==e.language&&(this.lastLanguageValid=!1,this.lastLanguage=void 0))}result(){return void 0===this.state?a.emptyValue():this.lastLanguageValid&&this.lastLanguage?(0,n.langString)(this.state,this.lastLanguage).toRDF():(0,n.string)(this.state).toRDF()}}t.GroupConcat=a},73342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Max=void 0;const n=r(20236),i=r(16095);class a extends i.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){if("Literal"!==e.termType)throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a literal`);(void 0===this.state||-1===(0,n.orderTypes)(this.state,e))&&(this.state=e)}result(){return void 0===this.state?a.emptyValue():this.state}}t.Max=a},59648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Min=void 0;const n=r(20236),i=r(16095);class a extends i.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){if("Literal"!==e.termType)throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a literal`);(void 0===this.state||1===(0,n.orderTypes)(this.state,e))&&(this.state=e)}result(){return void 0===this.state?a.emptyValue():this.state}}t.Min=a},91664:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sample=void 0;const n=r(16095);class i extends n.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){void 0===this.state&&(this.state=e)}result(){return void 0===this.state?i.emptyValue():this.state}}t.Sample=i},69091:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sum=void 0;const n=r(42711),i=r(63606),a=r(14624),o=r(16095);class s extends o.AggregatorComponent{constructor(){super(...arguments),this.state=void 0,this.summer=n.regularFunctions[a.RegularOperator.ADDITION]}static emptyValue(){return(0,i.integer)(0).toRDF()}put(e){if(void 0===this.state)this.state=this.termToNumericOrError(e);else{const t=this.termToNumericOrError(e);this.state=this.summer.apply([this.state,t],this.sharedContext)}}result(){return void 0===this.state?s.emptyValue():this.state.toRDF()}}t.Sum=s},59408:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WildcardCountAggregator=void 0;const n=r(22112),i=r(63606);t.WildcardCountAggregator=class{constructor(e){this.bindingValues=new Map,this.counter=0,this.distinct=e.distinct}putBindings(e){this.handleDistinct(e)||(this.counter+=1)}static emptyValue(){return(0,i.integer)(0).toRDF()}result(){return(0,i.integer)(this.counter).toRDF()}handleDistinct(e){if(this.distinct){const t=[...e];t.sort(((e,t)=>e[0].value.localeCompare(t[0].value)));const r=t.map((([e])=>e.value)).join(","),i=t.map((([,e])=>n.termToString(e))).join(","),a=this.bindingValues.get(r),o=void 0!==a&&a.has(i);return a||this.bindingValues.set(r,new Set),this.bindingValues.get(r).add(i),o}return!1}}},96300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aggregators=void 0;const n=r(37283),i=r(47943),a=r(81663),o=r(73342),s=r(59648),c=r(91664),u=r(69091);t.aggregators={count:i.Count,sum:u.Sum,min:s.Min,max:o.Max,avg:n.Average,group_concat:a.GroupConcat,sample:c.Sample}},19030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AggregateEvaluator=void 0;const n=r(76206),i=r(86588);class a extends n.BaseAggregateEvaluator{constructor(e,t,r){super(e,i.SyncEvaluator.completeContext(t??{}),r),this.evaluator=new i.SyncEvaluator(e.expression,t)}put(e){if(!this.errorOccurred)if(this.isWildcard)this.wildcardAggregator.putBindings(e);else try{const t=this.evaluator.evaluate(e);this.aggregator.put(t)}catch(e){this.safeThrow(e)}}safeThrow(e){if(this.throwError)throw e;this.errorOccurred=!0}}t.AggregateEvaluator=a},74448:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAggregateEvaluator=void 0;const n=r(98375),i=r(76206);class a extends i.BaseAggregateEvaluator{constructor(e,t,r){super(e,n.AsyncEvaluator.completeContext(t??{}),r),this.evaluator=new n.AsyncEvaluator(e.expression,t),this.errorOccurred=!1}async put(e){if(!this.errorOccurred)if(this.isWildcard)this.wildcardAggregator.putBindings(e);else try{const t=await this.evaluator.evaluate(e);if(!t||this.errorOccurred)return;this.aggregator.put(t)}catch(e){this.safeThrow(e)}}safeThrow(e){if(this.throwError)throw e;this.errorOccurred=!0}}t.AsyncAggregateEvaluator=a},98375:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncEvaluator=void 0;const n=r(35069),i=r(69119),a=r(76660),o=r(9062);class s{static completeContext(e){const t=e.now??new Date(Date.now());return{now:t,baseIRI:e.baseIRI??void 0,functionArgumentsCache:e.functionArgumentsCache??{},superTypeProvider:{cache:e.typeCache??new n.LRUCache({max:1e3}),discoverer:e.getSuperType??(()=>"term")},extensionFunctionCreator:e.extensionFunctionCreator,exists:e.exists,aggregate:e.aggregate,bnode:e.bnode,defaultTimeZone:e.defaultTimeZone??(0,a.extractTimeZone)(t)}}constructor(e,t={}){this.algExpr=e;const r=t.extensionFunctionCreator??(()=>{}),n=s.completeContext(t),a=new i.AlgebraTransformer({type:"async",creator:r,...n});this.expr=a.transformAlgebra(e),this.evaluator=new o.AsyncRecursiveEvaluator(n,a)}async evaluate(e){return(await this.evaluator.evaluate(this.expr,e)).toRDF()}async evaluateAsEBV(e){return(await this.evaluator.evaluate(this.expr,e)).coerceEBV()}async evaluateAsInternal(e){return await this.evaluator.evaluate(this.expr,e)}}t.AsyncEvaluator=s},86588:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncEvaluator=void 0;const n=r(35069),i=r(69119),a=r(76660),o=r(42425);class s{static completeContext(e){const t=e.now??new Date(Date.now());return{now:t,baseIRI:e.baseIRI??void 0,functionArgumentsCache:e.functionArgumentsCache??{},superTypeProvider:{cache:e.typeCache??new n.LRUCache({max:1e3}),discoverer:e.getSuperType??(()=>"term")},extensionFunctionCreator:e.extensionFunctionCreator,exists:e.exists,aggregate:e.aggregate,bnode:e.bnode,defaultTimeZone:e.defaultTimeZone??(0,a.extractTimeZone)(t)}}constructor(e,t={}){this.algExpr=e,this.context=t;const r=t.extensionFunctionCreator??(()=>{}),n=s.completeContext(t),a=new i.AlgebraTransformer({type:"sync",creator:r,...n});this.expr=a.transformAlgebra(e),this.evaluator=new o.SyncRecursiveEvaluator(n,a)}evaluate(e){return this.evaluator.evaluate(this.expr,e).toRDF()}evaluateAsEBV(e){return this.evaluator.evaluate(this.expr,e).coerceEBV()}evaluateAsInternal(e){return this.evaluator.evaluate(this.expr,e)}}t.SyncEvaluator=s},9062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncRecursiveEvaluator=void 0;const n=r(11269),i=r(50363),a=r(82867),o=r(10667);class s extends o.BaseExpressionEvaluator{constructor(e,t){super(t??new i.TermTransformer(e.superTypeProvider)),this.context=e,this.subEvaluators={[n.ExpressionType.Term]:(e,t)=>this.term(e),[n.ExpressionType.Variable]:(e,t)=>this.variable(e,t),[n.ExpressionType.Operator]:(e,t)=>this.evalOperator(e,t),[n.ExpressionType.SpecialOperator]:(e,t)=>this.evalSpecialOperator(e,t),[n.ExpressionType.Named]:(e,t)=>this.evalNamed(e,t),[n.ExpressionType.Existence]:(e,t)=>this.evalExistence(e,t),[n.ExpressionType.Aggregate]:(e,t)=>this.evalAggregate(e),[n.ExpressionType.AsyncExtension]:(e,t)=>this.evalAsyncExtension(e,t)}}async evaluate(e,t){const r=this.subEvaluators[e.expressionType];if(!r)throw new a.InvalidExpressionType(e);return r.bind(this)(e,t)}async evalOperator(e,t){const r=e.args.map((e=>this.evaluate(e,t))),n=await Promise.all(r);return e.apply(n)}async evalSpecialOperator(e,t){const r=this.evaluate.bind(this),n={args:e.args,mapping:t,superTypeProvider:this.context.superTypeProvider,now:this.context.now,baseIRI:this.context.baseIRI,functionArgumentsCache:this.context.functionArgumentsCache,evaluate:r,bnode:this.context.bnode,defaultTimeZone:this.context.defaultTimeZone};return e.applyAsync(n)}async _evalAsyncArgs(e,t){const r=e.map((e=>this.evaluate(e,t)));return await Promise.all(r)}async evalNamed(e,t){return e.apply(await this._evalAsyncArgs(e.args,t))}async evalAsyncExtension(e,t){return await e.apply(await this._evalAsyncArgs(e.args,t))}async evalExistence(e,t){if(!this.context.exists)throw new a.NoExistenceHook;return new n.BooleanLiteral(await this.context.exists(e.expression,t))}async evalAggregate(e){if(!this.context.aggregate)throw new a.NoAggregator;return this.termTransformer.transformRDFTermUnsafe(await this.context.aggregate(e.expression))}}t.AsyncRecursiveEvaluator=s},76206:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseAggregateEvaluator=void 0;const n=r(31578),i=r(96300),a=r(16095),o=r(59408),s=r(82867);t.BaseAggregateEvaluator=class{constructor(e,t,r){this.throwError=!1,this.isWildcard=!1,this.errorOccurred=!1,this.expression=e,this.aggregator=new a.Aggregator(e,new i.aggregators[e.aggregator](e,t)),this.throwError=r??!1,this.isWildcard=e.expression.expressionType===n.Algebra.expressionTypes.WILDCARD,this.isWildcard&&(this.wildcardAggregator=new o.WildcardCountAggregator(e))}static emptyValue(e,t=!1){let r;if(r=e.expression.expressionType===n.Algebra.expressionTypes.WILDCARD?o.WildcardCountAggregator.emptyValue():a.Aggregator.emptyValue(i.aggregators[e.aggregator]),void 0===r&&t)throw new s.EmptyAggregateError;return r}result(){if(!this.errorOccurred)return this.isWildcard?this.wildcardAggregator.result():this.aggregator.result()}}},10667:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseExpressionEvaluator=void 0;const n=r(63606),i=r(82867);t.BaseExpressionEvaluator=class{constructor(e){this.termTransformer=e}term(e){return e}variable(e,t){const r=t.get((0,n.expressionToVar)(e));if(!r)throw new i.UnboundVariableError(e.name,t);return this.termTransformer.transformRDFTermUnsafe(r)}}},42425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncRecursiveEvaluator=void 0;const n=r(11269),i=r(50363),a=r(82867),o=r(10667);class s extends o.BaseExpressionEvaluator{constructor(e,t){super(t??new i.TermTransformer(e.superTypeProvider)),this.context=e,this.subEvaluators={[n.ExpressionType.Term]:(e,t)=>this.term(e),[n.ExpressionType.Variable]:(e,t)=>this.variable(e,t),[n.ExpressionType.Operator]:(e,t)=>this.evalOperator(e,t),[n.ExpressionType.SpecialOperator]:(e,t)=>this.evalSpecialOperator(e,t),[n.ExpressionType.Named]:(e,t)=>this.evalNamed(e,t),[n.ExpressionType.Existence]:(e,t)=>this.evalExistence(e,t),[n.ExpressionType.Aggregate]:(e,t)=>this.evalAggregate(e),[n.ExpressionType.SyncExtension]:(e,t)=>this.evalSyncExtension(e,t)}}evaluate(e,t){const r=this.subEvaluators[e.expressionType];if(!r)throw new a.InvalidExpressionType(e);return r.bind(this)(e,t)}evalOperator(e,t){const r=e.args.map((e=>this.evaluate(e,t)));return e.apply(r)}evalSpecialOperator(e,t){const r=this.evaluate.bind(this),n={args:e.args,mapping:t,superTypeProvider:this.context.superTypeProvider,now:this.context.now,baseIRI:this.context.baseIRI,functionArgumentsCache:this.context.functionArgumentsCache,evaluate:r,bnode:this.context.bnode,defaultTimeZone:this.context.defaultTimeZone};return e.applySynchronously(n)}evalNamed(e,t){const r=e.args.map((e=>this.evaluate(e,t)));return e.apply(r)}evalSyncExtension(e,t){const r=e.args.map((e=>this.evaluate(e,t)));return e.apply(r)}evalExistence(e,t){if(!this.context.exists)throw new a.NoExistenceHook;return new n.BooleanLiteral(this.context.exists(e.expression,t))}evalAggregate(e){if(!this.context.aggregate)throw new a.NoAggregator;return this.termTransformer.transformRDFTermUnsafe(this.context.aggregate(e.expression))}}t.SyncRecursiveEvaluator=s},9950:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Aggregate=void 0;const n=r(89702);t.Aggregate=class{constructor(e,t){this.name=e,this.expression=t,this.expressionType=n.ExpressionType.Aggregate}}},29360:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncExtension=void 0;const n=r(89702);t.AsyncExtension=class{constructor(e,t,r){this.name=e,this.args=t,this.apply=r,this.expressionType=n.ExpressionType.AsyncExtension}}},75065:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Existence=void 0;const n=r(89702);t.Existence=class{constructor(e){this.expression=e,this.expressionType=n.ExpressionType.Existence}}},89702:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.asTermType=t.ExpressionType=void 0,function(e){e.Aggregate="aggregate",e.Existence="existence",e.Named="named",e.Operator="operator",e.SpecialOperator="specialOperator",e.Term="term",e.Variable="variable",e.AsyncExtension="asyncExtension",e.SyncExtension="syncExtension"}(r||(t.ExpressionType=r={})),t.asTermType=function(e){if("namedNode"===e||"literal"===e||"blankNode"===e||"quad"===e)return e}},67112:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Named=void 0;const n=r(89702);t.Named=class{constructor(e,t,r){this.name=e,this.args=t,this.apply=r,this.expressionType=n.ExpressionType.Named}}},27033:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operator=void 0;const n=r(89702);t.Operator=class{constructor(e,t){this.args=e,this.apply=t,this.expressionType=n.ExpressionType.Operator}}},3358:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpecialOperator=void 0;const n=r(89702);t.SpecialOperator=class{constructor(e,t,r){this.args=e,this.applyAsync=t,this.applySynchronously=r,this.expressionType=n.ExpressionType.SpecialOperator}}},62293:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncExtension=void 0;const n=r(89702);t.SyncExtension=class{constructor(e,t,r){this.name=e,this.args=t,this.apply=r,this.expressionType=n.ExpressionType.SyncExtension}}},79339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNonLexicalLiteral=t.NonLexicalLiteral=t.YearMonthDurationLiteral=t.DayTimeDurationLiteral=t.DurationLiteral=t.DateLiteral=t.TimeLiteral=t.DateTimeLiteral=t.StringLiteral=t.LangStringLiteral=t.BooleanLiteral=t.DoubleLiteral=t.FloatLiteral=t.DecimalLiteral=t.IntegerLiteral=t.NumericLiteral=t.Literal=t.isLiteralTermExpression=t.Quad=t.BlankNode=t.NamedNode=t.Term=void 0;const n=r(18050),i=r(50363),a=r(14624),o=r(14624),s=r(82867),c=r(19002),u=r(46157),l=r(89702),d=new n.DataFactory;class h{constructor(){this.expressionType=l.ExpressionType.Term}str(){throw new s.InvalidArgumentTypes([this],a.RegularOperator.STR)}coerceEBV(){throw new s.EBVCoercionError(this)}}t.Term=h,t.NamedNode=class extends h{constructor(e){super(),this.value=e,this.termType="namedNode"}toRDF(){return d.namedNode(this.value)}str(){return this.value}},t.BlankNode=class extends h{constructor(e){super(),this.termType="blankNode",this.value="string"==typeof e?d.blankNode(e):e}toRDF(){return this.value}},t.Quad=class extends h{constructor(e,t){super(),this.termType="quad",this.transformer=new i.TermTransformer(t),this.valueTerm=e}toRDF(){return this.valueTerm}get subject(){return this.transformer.transformRDFTermUnsafe(this.RDFsubject)}get predicate(){return this.transformer.transformRDFTermUnsafe(this.RDFpredicate)}get object(){return this.transformer.transformRDFTermUnsafe(this.RDFobject)}get RDFsubject(){return this.toRDF().subject}get RDFpredicate(){return this.toRDF().predicate}get RDFobject(){return this.toRDF().object}},t.isLiteralTermExpression=function(e){if("literal"===e.termType)return e};class p extends h{constructor(e,t,r,n){super(),this.typedValue=e,this.dataType=t,this.strValue=r,this.language=n,this.termType="literal"}toRDF(){return d.literal(this.strValue??this.str(),this.language??d.namedNode(this.dataType))}str(){return this.strValue??this.typedValue.toString()}}t.Literal=p;class f extends p{constructor(e,t,r,n){super(e,t,r,n),this.typedValue=e,this.strValue=r,this.language=n}coerceEBV(){return Boolean(this.typedValue)}toRDF(){const e=super.toRDF();return Number.isFinite(this.typedValue)||(e.value=e.value.replace("Infinity","INF")),e}str(){return this.strValue??this.specificFormatter(this.typedValue)}}t.NumericLiteral=f,t.IntegerLiteral=class extends f{constructor(e,t,r,n){super(e,t??o.TypeURL.XSD_INTEGER,r,n),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){return e.toFixed(0)}},t.DecimalLiteral=class extends f{constructor(e,t,r,n){super(e,t??o.TypeURL.XSD_DECIMAL,r,n),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){return e.toString()}},t.FloatLiteral=class extends f{constructor(e,t,r,n){super(e,t??o.TypeURL.XSD_FLOAT,r,n),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){return e.toString()}},t.DoubleLiteral=class extends f{constructor(e,t,r,n){super(e,t??o.TypeURL.XSD_DOUBLE,r,n),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){if(!Number.isFinite(e))return e>0?"INF":e<0?"-INF":"NaN";const t=e.toExponential(),[r,n]=t.split("e"),i=n.replace(/\+/u,"");return`${r.includes(".")?r:`${r}.0`}E${i}`}},t.BooleanLiteral=class extends p{constructor(e,t,r){super(e,r??o.TypeURL.XSD_BOOLEAN,t),this.typedValue=e,this.strValue=t}coerceEBV(){return this.typedValue}},t.LangStringLiteral=class extends p{constructor(e,t,r){super(e,r??o.TypeURL.RDF_LANG_STRING,e,t),this.typedValue=e,this.language=t}coerceEBV(){return this.str().length>0}},t.StringLiteral=class extends p{constructor(e,t){super(e,t??o.TypeURL.XSD_STRING,e),this.typedValue=e}coerceEBV(){return this.str().length>0}},t.DateTimeLiteral=class extends p{constructor(e,t,r){super(e,r??o.TypeURL.XSD_DATE_TIME,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeDateTime)(this.typedValue)}},t.TimeLiteral=class extends p{constructor(e,t,r){super(e,r??o.TypeURL.XSD_TIME,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeTime)(this.typedValue)}},t.DateLiteral=class extends p{constructor(e,t,r){super(e,r??o.TypeURL.XSD_DATE,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeDate)(this.typedValue)}};class y extends p{constructor(e,t,r){super(e,r??o.TypeURL.XSD_DURATION,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeDuration)(this.typedValue)}}t.DurationLiteral=y,t.DayTimeDurationLiteral=class extends y{constructor(e,t,r){super(e,t,r??o.TypeURL.XSD_DAY_TIME_DURATION),this.typedValue=e,this.strValue=t}},t.YearMonthDurationLiteral=class extends p{constructor(e,t,r){super(e,r??o.TypeURL.XSD_YEAR_MONTH_DURATION,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeDuration)(this.typedValue,"P0M")}};class g extends p{constructor(e,t,r,n,i){super({toString:()=>"undefined"},t,n,i),this.openWorldType=r}coerceEBV(){if((0,u.isSubTypeOf)(this.dataType,o.TypeURL.XSD_BOOLEAN,this.openWorldType)||(0,u.isSubTypeOf)(this.dataType,o.TypeAlias.SPARQL_NUMERIC,this.openWorldType))return!1;throw new s.EBVCoercionError(this)}toRDF(){return d.literal(this.str(),this.language??d.namedNode(this.dataType))}str(){return this.strValue??""}}t.NonLexicalLiteral=g,t.isNonLexicalLiteral=function(e){if(e instanceof g)return e}},28757:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Variable=void 0;const n=r(89702);t.Variable=class{constructor(e){this.expressionType=n.ExpressionType.Variable,this.name=e}}},11269:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(89702),t),i(r(28757),t),i(r(79339),t),i(r(27033),t),i(r(3358),t),i(r(67112),t),i(r(9950),t),i(r(75065),t),i(r(29360),t),i(r(62293),t)},57328:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpecialFunction=t.NamedFunction=t.RegularFunction=t.BaseFunction=void 0;const n=r(82867);class i{constructor(e,t){this.operator=e,this.apply=(e,t)=>(this.monomorph(e,t.superTypeProvider,t.functionArgumentsCache)??this.handleInvalidTypes(e))(t)(e),this.arity=t.arity,this.overloads=t.overloads}monomorph(e,t,r){return this.overloads.search(e,t,r)}}t.BaseFunction=i,t.RegularFunction=class extends i{constructor(e,t){super(e,t),this.functionClass="regular"}handleInvalidTypes(e){throw new n.InvalidArgumentTypes(e,this.operator)}},t.NamedFunction=class extends i{constructor(e,t){super(e,t),this.functionClass="named"}handleInvalidTypes(e){throw new n.InvalidArgumentTypes(e,this.operator)}},t.SpecialFunction=class{constructor(e,t){var r;this.operator=e,this.functionClass="special",this.arity=t.arity,this.applySynchronously=t.applySynchronously,this.applyAsync=t.applyAsync,this.checkArity=t.checkArity??(r=this.arity,e=>r===Number.POSITIVE_INFINITY||e.length===r)}}},63606:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expressionToVar=t.dateTime=t.langString=t.string=t.double=t.float=t.decimal=t.integer=t.bool=t.Builder=t.declare=void 0;const n=r(18050),i=r(11269),a=r(11269),o=r(14624),s=r(14624),c=r(82867),u=r(33357),l=new n.DataFactory;t.declare=function(e){return new d(e)};class d{constructor(e){this.overloadTree=new u.OverloadTree(e),this.collected=!1}collect(){if(this.collected)throw new Error("Builders can only be collected once!");return this.collected=!0,this.overloadTree}static wrapInvalidLexicalProtected(e){return t=>r=>{for(const[e,t]of r.entries())if(t instanceof a.NonLexicalLiteral)throw new c.InvalidLexicalForm(r[e].toRDF());return e(t)(r)}}set(e,t,r=!0){return this.overloadTree.addOverload(e,r?d.wrapInvalidLexicalProtected(t):t),this}copy({from:e,to:t}){const r=this.overloadTree.getImplementationExact(e);if(!r)throw new c.UnexpectedError("Tried to copy implementation, but types not found",{from:e,to:t});return this.set(t,r)}onUnary(e,t,r=!0){return this.set([e],(e=>([r])=>t(e)(r)),r)}onUnaryTyped(e,t,r=!0){return this.set([e],(e=>([r])=>t(e)(r.typedValue)),r)}onBinary(e,t,r=!0){return this.set(e,(e=>([r,n])=>t(e)(r,n)),r)}onBinaryTyped(e,t,r=!0){return this.set(e,(e=>([r,n])=>t(e)(r.typedValue,n.typedValue)),r)}onTernaryTyped(e,t,r=!0){return this.set(e,(e=>([r,n,i])=>t(e)(r.typedValue,n.typedValue,i.typedValue)),r)}onTernary(e,t,r=!0){return this.set(e,(e=>([r,n,i])=>t(e)(r,n,i)),r)}onQuaternaryTyped(e,t,r=!0){return this.set(e,(e=>([r,n,i,a])=>t(e)(r.typedValue,n.typedValue,i.typedValue,a.typedValue)),r)}onTerm1(e,t=!1){return this.set(["term"],(t=>([r])=>e(t)(r)),t)}onTerm3(e){return this.set(["term","term","term"],(t=>([r,n,i])=>e(t)(r,n,i)))}onQuad1(e){return this.set(["quad"],(t=>([r])=>e(t)(r)))}onLiteral1(e,t=!0){return this.set(["literal"],(t=>([r])=>e(t)(r)),t)}onBoolean1(e,t=!0){return this.set([o.TypeURL.XSD_BOOLEAN],(t=>([r])=>e(t)(r)),t)}onBoolean1Typed(e,t=!0){return this.set([o.TypeURL.XSD_BOOLEAN],(t=>([r])=>e(t)(r.typedValue)),t)}onString1(e,t=!0){return this.set([o.TypeURL.XSD_STRING],(t=>([r])=>e(t)(r)),t)}onString1Typed(e,t=!0){return this.set([o.TypeURL.XSD_STRING],(t=>([r])=>e(t)(r.typedValue)),t)}onLangString1(e,t=!0){return this.set([o.TypeURL.RDF_LANG_STRING],(t=>([r])=>e(t)(r)),t)}onStringly1(e,t=!0){return this.set([o.TypeAlias.SPARQL_STRINGLY],(t=>([r])=>e(t)(r)),t)}onStringly1Typed(e,t=!0){return this.set([o.TypeAlias.SPARQL_STRINGLY],(t=>([r])=>e(t)(r.typedValue)),t)}onNumeric1(e,t=!0){return this.set([o.TypeAlias.SPARQL_NUMERIC],(t=>([r])=>e(t)(r)),t)}onDateTime1(e,t=!0){return this.set([o.TypeURL.XSD_DATE_TIME],(t=>([r])=>e(t)(r)),t)}numericConverter(e,t=!0){const r=t=>r=>e(t)(r.typedValue);return this.onUnary(s.TypeURL.XSD_INTEGER,(e=>t=>p(r(e)(t))),t).onUnary(s.TypeURL.XSD_DECIMAL,(e=>t=>f(r(e)(t))),t).onUnary(s.TypeURL.XSD_FLOAT,(e=>t=>y(r(e)(t))),t).onUnary(s.TypeURL.XSD_DOUBLE,(e=>t=>g(r(e)(t))),t)}arithmetic(e,t=!0){const r=t=>(r,n)=>e(t)(r.typedValue,n.typedValue);return this.onBinary([s.TypeURL.XSD_INTEGER,s.TypeURL.XSD_INTEGER],(e=>(t,n)=>p(r(e)(t,n))),t).onBinary([s.TypeURL.XSD_DECIMAL,s.TypeURL.XSD_DECIMAL],(e=>(t,n)=>f(r(e)(t,n))),t).onBinary([s.TypeURL.XSD_FLOAT,s.TypeURL.XSD_FLOAT],(e=>(t,n)=>y(r(e)(t,n))),t).onBinary([s.TypeURL.XSD_DOUBLE,s.TypeURL.XSD_DOUBLE],(e=>(t,n)=>g(r(e)(t,n))),t)}numberTest(e){return this.numeric((t=>([r,n])=>h(e(t)(r.typedValue,n.typedValue))))}stringTest(e,t=!0){return this.set([o.TypeURL.XSD_STRING,o.TypeURL.XSD_STRING],(t=>([r,n])=>h(e(t)(r.typedValue,n.typedValue))),t)}booleanTest(e,t=!0){return this.set([o.TypeURL.XSD_BOOLEAN,o.TypeURL.XSD_BOOLEAN],(t=>([r,n])=>h(e(t)(r.typedValue,n.typedValue))),t)}dateTimeTest(e,t=!0){return this.set([o.TypeURL.XSD_DATE_TIME,o.TypeURL.XSD_DATE_TIME],(t=>([r,n])=>h(e(t)(r.typedValue,n.typedValue))),t)}numeric(e){return this.set([o.TypeAlias.SPARQL_NUMERIC,o.TypeAlias.SPARQL_NUMERIC],e)}}function h(e){return new i.BooleanLiteral(e)}function p(e){return new i.IntegerLiteral(e)}function f(e){return new i.DecimalLiteral(e)}function y(e){return new i.FloatLiteral(e)}function g(e){return new i.DoubleLiteral(e)}t.Builder=d,t.bool=h,t.integer=p,t.decimal=f,t.float=y,t.double=g,t.string=function(e){return new i.StringLiteral(e)},t.langString=function(e,t){return new i.LangStringLiteral(e,t)},t.dateTime=function(e,t){return new i.DateTimeLiteral(e,t)},t.expressionToVar=function(e){return l.variable(e.name.slice(1))}},58157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.namedDefinitions=void 0;const n=r(11269),i=r(11269),a=r(14624),o=r(76660),s=r(82867),c=r(17590),u=r(63606),l={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_STRING).onNumeric1((()=>e=>(0,u.string)((0,u.float)(e.typedValue).str()))).onBoolean1Typed((()=>e=>(0,u.string)((0,u.bool)(e).str()))).onTerm1((()=>e=>(0,u.string)(e.str()))).collect()},d={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_FLOAT).onNumeric1((()=>e=>(0,u.float)(e.typedValue))).onBoolean1Typed((()=>e=>(0,u.float)(e?1:0))).onUnary(a.TypeURL.XSD_STRING,(()=>e=>{const t=(0,c.parseXSDFloat)(e.str());if(void 0===t)throw new s.CastError(e,a.TypeURL.XSD_FLOAT);return(0,u.float)(t)}),!1).collect()},h={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DOUBLE).onNumeric1((()=>e=>(0,u.double)(e.typedValue))).onBoolean1Typed((()=>e=>(0,u.double)(e?1:0))).onUnary(a.TypeURL.XSD_STRING,(()=>e=>{const t=(0,c.parseXSDFloat)(e.str());if(void 0===t)throw new s.CastError(e,a.TypeURL.XSD_DOUBLE);return(0,u.double)(t)}),!1).collect()},p={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DECIMAL).onNumeric1((()=>e=>{const t=(0,c.parseXSDDecimal)(e.str());if(void 0===t)throw new s.CastError(e,a.TypeURL.XSD_DECIMAL);return(0,u.decimal)(t)})).onString1((()=>e=>{const t=e.str(),r=/^([+-])?(\d+(\.\d+)?)$/u.test(t)?(0,c.parseXSDDecimal)(t):void 0;if(void 0===r)throw new s.CastError(e,a.TypeURL.XSD_DECIMAL);return(0,u.decimal)(r)}),!1).onBoolean1Typed((()=>e=>(0,u.decimal)(e?1:0))).collect()},f={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_INTEGER).onBoolean1Typed((()=>e=>(0,u.integer)(e?1:0))).onNumeric1((()=>e=>{const t=(0,c.parseXSDInteger)(e.str());if(void 0===t)throw new s.CastError(e,a.TypeURL.XSD_INTEGER);return(0,u.integer)(t)}),!1).onString1((()=>e=>{const t=e.str(),r=/^\d+$/u.test(t)?(0,c.parseXSDInteger)(t):void 0;if(void 0===r)throw new s.CastError(e,a.TypeURL.XSD_INTEGER);return(0,u.integer)(r)})).collect()},y={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DATE_TIME).onUnary(a.TypeURL.XSD_DATE_TIME,(()=>e=>e)).onUnary(a.TypeURL.XSD_STRING,(()=>e=>(0,u.dateTime)((0,c.parseDateTime)(e.str()),e.str())),!1).onUnary(a.TypeURL.XSD_DATE,(()=>e=>new n.DateTimeLiteral({...e.typedValue,hours:0,minutes:0,seconds:0}))).collect()},g={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_BOOLEAN).onNumeric1((()=>e=>(0,u.bool)(e.coerceEBV())),!0).onUnary(a.TypeURL.XSD_BOOLEAN,(()=>e=>(0,u.bool)(e.coerceEBV())),!0).onUnary(a.TypeURL.XSD_STRING,(()=>e=>{switch(e.str()){case"true":case"1":return(0,u.bool)(!0);case"false":case"0":return(0,u.bool)(!1);default:throw new s.CastError(e,a.TypeURL.XSD_BOOLEAN)}}),!1).collect()},m={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_TIME).onUnary(a.TypeURL.XSD_TIME,(()=>e=>new n.TimeLiteral(e.typedValue,e.strValue))).onUnary(a.TypeURL.XSD_DATE_TIME,(()=>e=>new n.TimeLiteral(e.typedValue))).onStringly1((()=>e=>new n.TimeLiteral((0,c.parseTime)(e.str())))).collect()},b={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DATE).onUnary(a.TypeURL.XSD_DATE,(()=>e=>new n.DateLiteral(e.typedValue,e.strValue))).onUnary(a.TypeURL.XSD_DATE_TIME,(()=>e=>new n.DateLiteral(e.typedValue))).onStringly1((()=>e=>new n.DateLiteral((0,c.parseDate)(e.str())))).collect()},v={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DURATION).onUnary(a.TypeURL.XSD_DURATION,(()=>e=>new n.DurationLiteral(e.typedValue,e.strValue))).onStringly1((()=>e=>new i.DurationLiteral((0,c.parseDuration)(e.str())))).collect()},_={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DAY_TIME_DURATION).onUnary(a.TypeURL.XSD_DURATION,(()=>e=>new n.DayTimeDurationLiteral((0,o.trimToDayTimeDuration)(e.typedValue)))).onStringly1((()=>e=>new n.DayTimeDurationLiteral((0,c.parseDayTimeDuration)(e.str())))).collect()},w={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_YEAR_MONTH_DURATION).onUnary(a.TypeURL.XSD_DURATION,(()=>e=>new n.YearMonthDurationLiteral((0,o.trimToYearMonthDuration)(e.typedValue)))).onStringly1((()=>e=>new n.YearMonthDurationLiteral((0,c.parseYearMonthDuration)(e.str())))).collect()};t.namedDefinitions={[a.TypeURL.XSD_STRING]:l,[a.TypeURL.XSD_FLOAT]:d,[a.TypeURL.XSD_DOUBLE]:h,[a.TypeURL.XSD_DECIMAL]:p,[a.TypeURL.XSD_INTEGER]:f,[a.TypeURL.XSD_DATE_TIME]:y,[a.TypeURL.XSD_DATE]:b,[a.TypeURL.XSD_BOOLEAN]:g,[a.TypeURL.XSD_TIME]:m,[a.TypeURL.XSD_DURATION]:v,[a.TypeURL.XSD_DAY_TIME_DURATION]:_,[a.TypeURL.XSD_YEAR_MONTH_DURATION]:w}},33357:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OverloadTree=void 0;const n=r(11269),i=r(46157);class a{constructor(e,t){this.identifier=e,this.implementation=void 0,this.generalOverloads=Object.create(null),this.literalOverLoads=[],this.depth=t??0,this.promotionCount=void 0}getSubtree(e){const t=(0,i.asGeneralType)(e);if(t)return this.generalOverloads[t];for(const[t,r]of this.literalOverLoads)if(e===t)return r}getImplementationExact(e){let t=this;for(const r of e)if(t=t.getSubtree(r),!t)return;return t.implementation}search(e,t,r){let i=r[this.identifier],a=0;for(;a({node:e,index:1}))));o.length>0;){const{index:n,node:i}=o.pop();if(n===e.length&&i.implementation)return this.addToCache(r,e,i.implementation),i.implementation;o.push(...i.getSubTreeWithArg(e[n],t).map((e=>({node:e,index:n+1}))))}}addToCache(e,t,r){function i(e,t){return t in e||(e[t]={}),e[t]}let a=i(e,this.identifier);for(const e of t){const t=(0,n.isLiteralTermExpression)(e),r=t?t.dataType:e.termType;a.cache=a.cache??{},a=i(a.cache,r)}a.func=r}addOverload(e,t){this._addOverload([...e],t,0)}_addOverload(e,t,r){const[n,...o]=e;if(!n)return void((void 0===this.promotionCount||r<=this.promotionCount)&&(this.promotionCount=r,this.implementation=t));let s=this.getSubtree(n);if(!s){const e=new a(this.identifier,this.depth+1),t=(0,i.asGeneralType)(n);t&&(this.generalOverloads[t]=e);const r=(0,i.asOverrideType)(n);r&&this.literalOverLoads.push([r,e]),s=e}if(s._addOverload(o,t,r),i.typePromotion[n])for(const e of i.typePromotion[n])this.addPromotedOverload(e.typeToPromote,t,e.conversionFunction,o,r)}addPromotedOverload(e,t,r,n,i){let o=this.getSubtree(e);if(!o){const t=new a(this.identifier,this.depth+1);this.literalOverLoads.push([e,t]),o=t}o._addOverload(n,(e=>n=>t(e)([...n.slice(0,this.depth),r(n[this.depth]),...n.slice(this.depth+1,n.length)])),i+1)}getSubTreeWithArg(e,t){const r=[],a=(0,n.isLiteralTermExpression)(e);if(this.generalOverloads.term&&r.push(this.generalOverloads.term),this.generalOverloads[e.termType]&&r.push(this.generalOverloads[e.termType]),a){const e=(0,i.asKnownLiteralType)(a.dataType);let n;n=e?i.superTypeDictTable[e]:(0,i.getSuperTypes)(a.dataType,t);const o=this.literalOverLoads.filter((([e,t])=>e in n)).map((([e,t])=>[n[e],t]));o.sort((([e,t],[r,n])=>e-r)),r.push(...o.map((([e,t])=>t)))}return r}}t.OverloadTree=a},22122:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.definitions=void 0;const n=r(55553),i=r(99499),a=r(18050),o=r(9929),s=r(88110),c=r(84596),u=r(11269),l=r(50363),d=r(14624),h=r(14624),p=r(76660),f=r(82867),y=r(20236),g=r(66487),m=r(57328),b=r(63606),v=r(29791),_=r(42711),w=new a.DataFactory,T={arity:1,overloads:(0,b.declare)(d.RegularOperator.NOT).onTerm1((()=>e=>(0,b.bool)(!e.coerceEBV()))).collect()},S={arity:1,overloads:(0,b.declare)(d.RegularOperator.UPLUS).numericConverter((()=>e=>e)).collect()},O={arity:1,overloads:(0,b.declare)(d.RegularOperator.UMINUS).numericConverter((()=>e=>-e)).collect()},E={arity:2,overloads:(0,b.declare)(d.RegularOperator.MULTIPLICATION).arithmetic((()=>(e,t)=>new n.BigNumber(e).times(t).toNumber())).collect()},x={arity:2,overloads:(0,b.declare)(d.RegularOperator.DIVISION).arithmetic((()=>(e,t)=>new n.BigNumber(e).div(t).toNumber())).onBinaryTyped([h.TypeURL.XSD_INTEGER,h.TypeURL.XSD_INTEGER],(()=>(e,t)=>{if(0===t)throw new f.ExpressionError("Integer division by 0");return(0,b.decimal)(new n.BigNumber(e).div(t).toNumber())})).collect()},A={arity:2,overloads:(0,b.declare)(d.RegularOperator.ADDITION).arithmetic((()=>(e,t)=>new n.BigNumber(e).plus(t).toNumber())).set([h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.DateTimeLiteral((0,g.addDurationToDateTime)(e.typedValue,(0,p.defaultedDurationRepresentation)(t.typedValue))))).copy({from:[h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DAY_TIME_DURATION],to:[h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([h.TypeURL.XSD_DATE,h.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.DateLiteral((0,g.addDurationToDateTime)((0,p.defaultedDateTimeRepresentation)(e.typedValue),(0,p.defaultedDurationRepresentation)(t.typedValue))))).copy({from:[h.TypeURL.XSD_DATE,h.TypeURL.XSD_DAY_TIME_DURATION],to:[h.TypeURL.XSD_DATE,h.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([h.TypeURL.XSD_TIME,h.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.TimeLiteral((0,g.addDurationToDateTime)((0,p.defaultedDateTimeRepresentation)(e.typedValue),(0,p.defaultedDurationRepresentation)(t.typedValue))))).copy({from:[h.TypeURL.XSD_TIME,h.TypeURL.XSD_DAY_TIME_DURATION],to:[h.TypeURL.XSD_TIME,h.TypeURL.XSD_YEAR_MONTH_DURATION]}).collect()},R={arity:2,overloads:(0,b.declare)(d.RegularOperator.SUBTRACTION).arithmetic((()=>(e,t)=>new n.BigNumber(e).minus(t).toNumber())).set([h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DATE_TIME],(({defaultTimeZone:e})=>([t,r])=>new u.DayTimeDurationLiteral((0,g.elapsedDuration)(t.typedValue,r.typedValue,e)))).copy({from:[h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DATE_TIME],to:[h.TypeURL.XSD_DATE,h.TypeURL.XSD_DATE]}).copy({from:[h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DATE_TIME],to:[h.TypeURL.XSD_TIME,h.TypeURL.XSD_TIME]}).set([h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.DateTimeLiteral((0,g.addDurationToDateTime)(e.typedValue,(0,p.defaultedDurationRepresentation)((0,p.negateDuration)(t.typedValue)))))).copy({from:[h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DAY_TIME_DURATION],to:[h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([h.TypeURL.XSD_DATE,h.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.DateLiteral((0,g.addDurationToDateTime)((0,p.defaultedDateTimeRepresentation)(e.typedValue),(0,p.defaultedDurationRepresentation)((0,p.negateDuration)(t.typedValue)))))).copy({from:[h.TypeURL.XSD_DATE,h.TypeURL.XSD_DAY_TIME_DURATION],to:[h.TypeURL.XSD_DATE,h.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([h.TypeURL.XSD_TIME,h.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.TimeLiteral((0,g.addDurationToDateTime)((0,p.defaultedDateTimeRepresentation)(e.typedValue),(0,p.defaultedDurationRepresentation)((0,p.negateDuration)(t.typedValue)))))).collect()},I={arity:2,overloads:(0,b.declare)(d.RegularOperator.EQUAL).numberTest((()=>(e,t)=>e===t)).stringTest((()=>(e,t)=>0===e.localeCompare(t))).set([h.TypeURL.RDF_LANG_STRING,h.TypeURL.RDF_LANG_STRING],(()=>([e,t])=>(0,b.bool)(e.str()===t.str()&&e.language===t.language))).set([h.TypeAlias.SPARQL_STRINGLY,h.TypeAlias.SPARQL_STRINGLY],(()=>()=>(0,b.bool)(!1))).booleanTest((()=>(e,t)=>e===t)).dateTimeTest((({defaultTimeZone:e})=>(t,r)=>(0,p.toUTCDate)(t,e).getTime()===(0,p.toUTCDate)(r,e).getTime())).copy({from:[h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DATE_TIME],to:[h.TypeURL.XSD_DATE,h.TypeURL.XSD_DATE]}).set(["quad","quad"],(e=>([t,r])=>{const n=new m.RegularFunction(h.RegularOperator.EQUAL,I);return(0,b.bool)(n.apply([t.subject,r.subject],e).coerceEBV()&&n.apply([t.predicate,r.predicate],e).coerceEBV()&&n.apply([t.object,r.object],e).coerceEBV())}),!1).set(["term","term"],(()=>([e,t])=>(0,b.bool)(function(e,t){const r=e.toRDF(),n=t.toRDF(),i=r.equals(n);if(!i&&"Literal"===r.termType&&"Literal"===n.termType)throw new f.RDFEqualTypeError([e,t]);return i}(e,t))),!1).set([h.TypeURL.XSD_DURATION,h.TypeURL.XSD_DURATION],(()=>([e,t])=>(0,b.bool)((0,p.yearMonthDurationsToMonths)((0,p.defaultedYearMonthDurationRepresentation)(e.typedValue))===(0,p.yearMonthDurationsToMonths)((0,p.defaultedYearMonthDurationRepresentation)(t.typedValue))&&(0,p.dayTimeDurationsToSeconds)((0,p.defaultedDayTimeDurationRepresentation)(e.typedValue))===(0,p.dayTimeDurationsToSeconds)((0,p.defaultedDayTimeDurationRepresentation)(t.typedValue))))).set([h.TypeURL.XSD_TIME,h.TypeURL.XSD_TIME],(({defaultTimeZone:e})=>([t,r])=>(0,b.bool)((0,p.toUTCDate)((0,p.defaultedDateTimeRepresentation)(t.typedValue),e).getTime()===(0,p.toUTCDate)((0,p.defaultedDateTimeRepresentation)(r.typedValue),e).getTime()))).collect()},P={arity:2,overloads:(0,b.declare)(d.RegularOperator.NOT_EQUAL).set(["term","term"],(e=>([t,r])=>(0,b.bool)(!_.regularFunctions[d.RegularOperator.EQUAL].apply([t,r],e).typedValue))).collect()},N={arity:2,overloads:(0,b.declare)(d.RegularOperator.LT).numberTest((()=>(e,t)=>e(e,t)=>-1===e.localeCompare(t))).booleanTest((()=>(e,t)=>e([e,t])=>(0,b.bool)(-1===(0,y.orderTypes)(e.toRDF(),t.toRDF(),!0))),!1).dateTimeTest((({defaultTimeZone:e})=>(t,r)=>(0,p.toUTCDate)(t,e).getTime()<(0,p.toUTCDate)(r,e).getTime())).copy({from:[h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DATE_TIME],to:[h.TypeURL.XSD_DATE,h.TypeURL.XSD_DATE]}).set([h.TypeURL.XSD_YEAR_MONTH_DURATION,h.TypeURL.XSD_YEAR_MONTH_DURATION],(()=>([e,t])=>(0,b.bool)((0,p.yearMonthDurationsToMonths)((0,p.defaultedYearMonthDurationRepresentation)(e.typedValue))<(0,p.yearMonthDurationsToMonths)((0,p.defaultedYearMonthDurationRepresentation)(t.typedValue))))).set([h.TypeURL.XSD_DAY_TIME_DURATION,h.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>(0,b.bool)((0,p.dayTimeDurationsToSeconds)((0,p.defaultedDayTimeDurationRepresentation)(e.typedValue))<(0,p.dayTimeDurationsToSeconds)((0,p.defaultedDayTimeDurationRepresentation)(t.typedValue))))).set([h.TypeURL.XSD_TIME,h.TypeURL.XSD_TIME],(({defaultTimeZone:e})=>([t,r])=>(0,b.bool)((0,p.toUTCDate)((0,p.defaultedDateTimeRepresentation)(t.typedValue),e).getTime()<(0,p.toUTCDate)((0,p.defaultedDateTimeRepresentation)(r.typedValue),e).getTime()))).collect()},D={arity:2,overloads:(0,b.declare)(d.RegularOperator.GT).set(["term","term"],(e=>([t,r])=>_.regularFunctions[d.RegularOperator.LT].apply([r,t],e))).collect()},j={arity:2,overloads:(0,b.declare)(d.RegularOperator.LTE).set(["term","term"],(e=>([t,r])=>(0,b.bool)(_.regularFunctions[d.RegularOperator.LT].apply([t,r],e).typedValue||_.regularFunctions[d.RegularOperator.EQUAL].apply([t,r],e).typedValue))).collect()},C={arity:2,overloads:(0,b.declare)(d.RegularOperator.GTE).set(["term","term"],(e=>([t,r])=>_.regularFunctions[d.RegularOperator.LTE].apply([r,t],e))).collect()},M={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_IRI).onTerm1((()=>e=>(0,b.bool)("namedNode"===e.termType))).collect()},L={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_BLANK).onTerm1((()=>e=>(0,b.bool)("blankNode"===e.termType))).collect()},k={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_LITERAL).onTerm1((()=>e=>(0,b.bool)("literal"===e.termType))).collect()},F={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_NUMERIC).onNumeric1((()=>()=>(0,b.bool)(!0))).onTerm1((()=>()=>(0,b.bool)(!1))).collect()},B={arity:1,overloads:(0,b.declare)(d.RegularOperator.STR).onTerm1((()=>e=>(0,b.string)(e.str()))).collect()},U={arity:1,overloads:(0,b.declare)(d.RegularOperator.LANG).onLiteral1((()=>e=>(0,b.string)(e.language??""))).collect()},q={arity:1,overloads:(0,b.declare)(d.RegularOperator.DATATYPE).onLiteral1((()=>e=>new u.NamedNode(e.dataType))).collect()},V={arity:1,overloads:(0,b.declare)(d.RegularOperator.IRI).set(["namedNode"],(e=>t=>{const r=t[0],n=(0,o.resolve)(r.str(),e.baseIRI??"");return new u.NamedNode(n)})).onString1((e=>t=>{const r=(0,o.resolve)(t.str(),e.baseIRI??"");return new u.NamedNode(r)})).collect()},Q={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRDT).set([h.TypeURL.XSD_STRING,"namedNode"],(({superTypeProvider:e})=>([t,r])=>{const n=w.literal(t.typedValue,w.namedNode(r.value));return new l.TermTransformer(e).transformLiteral(n)})).collect()},$={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRLANG).onBinaryTyped([h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(()=>(e,t)=>new u.LangStringLiteral(e,t.toLowerCase()))).collect()},H={arity:0,overloads:(0,b.declare)(d.RegularOperator.UUID).set([],(()=>()=>new u.NamedNode(`urn:uuid:${c.v4()}`))).collect()},G={arity:0,overloads:(0,b.declare)(d.RegularOperator.STRUUID).set([],(()=>()=>(0,b.string)(c.v4()))).collect()},z={arity:1,overloads:(0,b.declare)(d.RegularOperator.STRLEN).onStringly1((()=>e=>(0,b.integer)([...e.typedValue].length))).collect()},K={arity:[2,3],overloads:(0,b.declare)(d.RegularOperator.SUBSTR).onBinaryTyped([h.TypeURL.XSD_STRING,h.TypeURL.XSD_INTEGER],(()=>(e,t)=>(0,b.string)([...e].slice(t-1).join("")))).onBinary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.XSD_INTEGER],(()=>(e,t)=>{const r=[...e.typedValue].slice(t.typedValue-1).join("");return(0,b.langString)(r,e.language)})).onTernaryTyped([h.TypeURL.XSD_STRING,h.TypeURL.XSD_INTEGER,h.TypeURL.XSD_INTEGER],(()=>(e,t,r)=>(0,b.string)([...e].slice(t-1,r+t-1).join("")))).onTernary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.XSD_INTEGER,h.TypeURL.XSD_INTEGER],(()=>(e,t,r)=>{const n=[...e.typedValue].slice(t.typedValue-1,r.typedValue+t.typedValue-1).join("");return(0,b.langString)(n,e.language)})).collect()},X={arity:1,overloads:(0,b.declare)(d.RegularOperator.UCASE).onString1Typed((()=>e=>(0,b.string)(e.toUpperCase()))).onLangString1((()=>e=>(0,b.langString)(e.typedValue.toUpperCase(),e.language))).collect()},J={arity:1,overloads:(0,b.declare)(d.RegularOperator.LCASE).onString1Typed((()=>e=>(0,b.string)(e.toLowerCase()))).onLangString1((()=>e=>(0,b.langString)(e.typedValue.toLowerCase(),e.language))).collect()},W={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRSTARTS).onBinaryTyped([h.TypeAlias.SPARQL_STRINGLY,h.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.bool)(e.startsWith(t)))).onBinary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);return(0,b.bool)(e.typedValue.startsWith(t.typedValue))})).collect()},Y={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRENDS).onBinaryTyped([h.TypeAlias.SPARQL_STRINGLY,h.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.bool)(e.endsWith(t)))).onBinary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);return(0,b.bool)(e.typedValue.endsWith(t.typedValue))})).collect()},Z={arity:2,overloads:(0,b.declare)(d.RegularOperator.CONTAINS).onBinaryTyped([h.TypeAlias.SPARQL_STRINGLY,h.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.bool)(e.includes(t)))).onBinary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);return(0,b.bool)(e.typedValue.includes(t.typedValue))})).collect()},ee={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRBEFORE).onBinaryTyped([h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.string)(e.slice(0,Math.max(0,e.indexOf(t)))))).onBinary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.XSD_STRING],(()=>(e,t)=>{const[r,n]=[e.typedValue,t.typedValue],i=e.typedValue.slice(0,Math.max(0,r.indexOf(n)));return i||!n?(0,b.langString)(i,e.language):(0,b.string)(i)})).onBinary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);const[r,n]=[e.typedValue,t.typedValue],i=e.typedValue.slice(0,Math.max(0,r.indexOf(n)));return i||!n?(0,b.langString)(i,e.language):(0,b.string)(i)})).collect()},te={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRAFTER).onBinaryTyped([h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.string)(e.slice(e.indexOf(t)).slice(t.length)))).onBinary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.XSD_STRING],(()=>(e,t)=>{const[r,n]=[e.typedValue,t.typedValue],i=r.slice(r.indexOf(n)).slice(n.length);return i||!n?(0,b.langString)(i,e.language):(0,b.string)(i)})).onBinary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);const[r,n]=[e.typedValue,t.typedValue],i=r.slice(r.indexOf(n)).slice(n.length);return i||!n?(0,b.langString)(i,e.language):(0,b.string)(i)})).collect()},re={arity:1,overloads:(0,b.declare)(d.RegularOperator.ENCODE_FOR_URI).onStringly1Typed((()=>e=>(0,b.string)(encodeURI(e)))).collect()},ne={arity:2,overloads:(0,b.declare)(d.RegularOperator.LANG_MATCHES).onBinaryTyped([h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.bool)(v.langMatches(e,t)))).collect()},ie={arity:[2,3],overloads:(0,b.declare)(d.RegularOperator.REGEX).onBinaryTyped([h.TypeAlias.SPARQL_STRINGLY,h.TypeURL.XSD_STRING],(function(){return(e,t)=>(0,b.bool)(v.matches(e,t))})).onTernaryTyped([h.TypeAlias.SPARQL_STRINGLY,h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(function(){return(e,t,r)=>(0,b.bool)(v.matches(e,t,r))})).collect()},ae={arity:[3,4],overloads:(0,b.declare)(d.RegularOperator.REPLACE).onTernaryTyped([h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(()=>(e,t,r)=>(0,b.string)(v.replace(e,t,r)))).set([h.TypeURL.RDF_LANG_STRING,h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(()=>([e,t,r])=>{const n=v.replace(e.typedValue,t.typedValue,r.typedValue);return(0,b.langString)(n,e.language)})).onQuaternaryTyped([h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(()=>(e,t,r,n)=>(0,b.string)(v.replace(e,t,r,n)))).set([h.TypeURL.RDF_LANG_STRING,h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(()=>([e,t,r,n])=>{const i=v.replace(e.typedValue,t.typedValue,r.typedValue,n.typedValue);return(0,b.langString)(i,e.language)})).collect()},oe={arity:1,overloads:(0,b.declare)(d.RegularOperator.ABS).numericConverter((()=>e=>Math.abs(e))).collect()},se={arity:1,overloads:(0,b.declare)(d.RegularOperator.ROUND).numericConverter((()=>e=>Math.round(e))).collect()},ce={arity:1,overloads:(0,b.declare)(d.RegularOperator.CEIL).numericConverter((()=>e=>Math.ceil(e))).collect()},ue={arity:1,overloads:(0,b.declare)(d.RegularOperator.FLOOR).numericConverter((()=>e=>Math.floor(e))).collect()},le={arity:0,overloads:(0,b.declare)(d.RegularOperator.RAND).set([],(()=>()=>(0,b.double)(Math.random()))).collect()},de={arity:0,overloads:(0,b.declare)(d.RegularOperator.NOW).set([],(e=>()=>new u.DateTimeLiteral((0,p.toDateTimeRepresentation)({date:e.now,timeZone:e.defaultTimeZone})))).collect()},he={arity:1,overloads:(0,b.declare)(d.RegularOperator.YEAR).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.year))).set([h.TypeURL.XSD_DATE],(()=>([e])=>(0,b.integer)(e.typedValue.year))).collect()},pe={arity:1,overloads:(0,b.declare)(d.RegularOperator.MONTH).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.month))).set([h.TypeURL.XSD_DATE],(()=>([e])=>(0,b.integer)(e.typedValue.month))).collect()},fe={arity:1,overloads:(0,b.declare)(d.RegularOperator.DAY).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.day))).set([h.TypeURL.XSD_DATE],(()=>([e])=>(0,b.integer)(e.typedValue.day))).collect()},ye={arity:1,overloads:(0,b.declare)(d.RegularOperator.HOURS).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.hours))).set([h.TypeURL.XSD_TIME],(()=>([e])=>(0,b.integer)(e.typedValue.hours))).collect()},ge={arity:1,overloads:(0,b.declare)(d.RegularOperator.MINUTES).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.minutes))).set([h.TypeURL.XSD_TIME],(()=>([e])=>(0,b.integer)(e.typedValue.minutes))).collect()},me={arity:1,overloads:(0,b.declare)(d.RegularOperator.SECONDS).onDateTime1((()=>e=>(0,b.decimal)(e.typedValue.seconds))).set([h.TypeURL.XSD_TIME],(()=>([e])=>(0,b.integer)(e.typedValue.seconds))).collect()},be={arity:1,overloads:(0,b.declare)(d.RegularOperator.TIMEZONE).onDateTime1((()=>e=>{const t={hours:e.typedValue.zoneHours,minutes:e.typedValue.zoneMinutes};if(void 0===t.hours&&void 0===t.minutes)throw new f.InvalidTimezoneCall(e.str());return new u.DayTimeDurationLiteral(t)})).copy({from:[h.TypeURL.XSD_DATE_TIME],to:[h.TypeURL.XSD_DATE]}).copy({from:[h.TypeURL.XSD_DATE_TIME],to:[h.TypeURL.XSD_TIME]}).collect()},ve={arity:1,overloads:(0,b.declare)(d.RegularOperator.TZ).onDateTime1((()=>e=>(0,b.string)((0,p.extractRawTimeZone)(e.str())))).copy({from:[h.TypeURL.XSD_DATE_TIME],to:[h.TypeURL.XSD_DATE]}).copy({from:[h.TypeURL.XSD_DATE_TIME],to:[h.TypeURL.XSD_TIME]}).collect()},_e={arity:1,overloads:(0,b.declare)(d.RegularOperator.MD5).onString1Typed((()=>e=>(0,b.string)((0,s.hash)(e)))).collect()},we={arity:1,overloads:(0,b.declare)(d.RegularOperator.SHA1).onString1Typed((()=>e=>(0,b.string)((0,i.sha1)().update(e).digest("hex")))).collect()},Te={arity:1,overloads:(0,b.declare)(d.RegularOperator.SHA256).onString1Typed((()=>e=>(0,b.string)((0,i.sha256)().update(e).digest("hex")))).collect()},Se={arity:1,overloads:(0,b.declare)(d.RegularOperator.SHA384).onString1Typed((()=>e=>(0,b.string)((0,i.sha384)().update(e).digest("hex")))).collect()},Oe={arity:1,overloads:(0,b.declare)(d.RegularOperator.SHA512).onString1Typed((()=>e=>(0,b.string)((0,i.sha512)().update(e).digest("hex")))).collect()},Ee={arity:3,overloads:(0,b.declare)(d.RegularOperator.TRIPLE).onTerm3((e=>(...t)=>new u.Quad(w.quad(t[0].toRDF(),t[1].toRDF(),t[2].toRDF()),e.superTypeProvider))).collect()},xe={arity:1,overloads:(0,b.declare)(d.RegularOperator.SUBJECT).onQuad1((()=>e=>e.subject)).collect()},Ae={arity:1,overloads:(0,b.declare)(d.RegularOperator.PREDICATE).onQuad1((()=>e=>e.predicate)).collect()},Re={arity:1,overloads:(0,b.declare)(d.RegularOperator.OBJECT).onQuad1((()=>e=>e.object)).collect()},Ie={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_TRIPLE).onTerm1((()=>e=>(0,b.bool)("quad"===e.termType))).collect()};t.definitions={"!":T,uplus:S,uminus:O,"*":E,"/":x,"+":A,"-":R,"=":I,"!=":P,"<":N,">":D,"<=":j,">=":C,isiri:M,isuri:M,isblank:L,isliteral:k,isnumeric:F,str:B,lang:U,datatype:q,iri:V,uri:V,strdt:Q,strlang:$,uuid:H,struuid:G,strlen:z,substr:K,ucase:X,lcase:J,strstarts:W,strends:Y,contains:Z,strbefore:ee,strafter:te,encode_for_uri:re,langmatches:ne,regex:ie,replace:ae,abs:oe,round:se,ceil:ce,floor:ue,rand:le,now:de,year:he,month:pe,day:fe,hours:ye,minutes:ge,seconds:me,timezone:be,tz:ve,md5:_e,sha1:we,sha256:Te,sha384:Se,sha512:Oe,triple:Ee,subject:xe,predicate:Ae,object:Re,istriple:Ie}},96443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.specialDefinitions=void 0;const n=r(84596),i=r(11269),a=r(14624),o=r(82867),s=r(63606),c=r(42711),u={arity:1,applyAsync:async({args:e,mapping:t})=>l({args:e,mapping:t}),applySynchronously:({args:e,mapping:t})=>l({args:e,mapping:t})};function l({args:e,mapping:t}){const r=e[0];if(r.expressionType!==i.ExpressionType.Variable)throw new o.InvalidArgumentTypes(e,a.SpecialOperator.BOUND);const n=t.has((0,s.expressionToVar)(r));return(0,s.bool)(n)}const d={arity:3,async applyAsync({args:e,mapping:t,evaluate:r}){const n=await r(e[0],t);return r(n.coerceEBV()?e[1]:e[2],t)},applySynchronously({args:e,mapping:t,evaluate:r}){const n=r(e[0],t);return r(n.coerceEBV()?e[1]:e[2],t)}},h={arity:Number.POSITIVE_INFINITY,async applyAsync({args:e,mapping:t,evaluate:r}){const n=[];for(const i of e)try{return await r(i,t)}catch(e){n.push(e)}throw new o.CoalesceError(n)},applySynchronously({args:e,mapping:t,evaluate:r}){const n=[];for(const i of e)try{return r(i,t)}catch(e){n.push(e)}throw new o.CoalesceError(n)}},p={arity:2,async applyAsync({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if((await r(n,t)).coerceEBV())return(0,s.bool)(!0);const e=(await r(i,t)).coerceEBV();return(0,s.bool)(e)}catch(e){if(!(await r(i,t)).coerceEBV())throw e;return(0,s.bool)(!0)}},applySynchronously({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if(r(n,t).coerceEBV())return(0,s.bool)(!0);const e=r(i,t).coerceEBV();return(0,s.bool)(e)}catch(e){if(!r(i,t).coerceEBV())throw e;return(0,s.bool)(!0)}}},f={arity:2,async applyAsync({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if(!(await r(n,t)).coerceEBV())return(0,s.bool)(!1);const e=(await r(i,t)).coerceEBV();return(0,s.bool)(e)}catch(e){if((await r(i,t)).coerceEBV())throw e;return(0,s.bool)(!1)}},applySynchronously({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if(!r(n,t).coerceEBV())return(0,s.bool)(!1);const e=r(i,t).coerceEBV();return(0,s.bool)(e)}catch(e){if(r(i,t).coerceEBV())throw e;return(0,s.bool)(!1)}}},y={arity:2,async applyAsync({args:e,mapping:t,evaluate:r}){const[n,i]=e.map((e=>r(e,t))),[a,o]=await Promise.all([n,i]);return(0,s.bool)(a.toRDF().equals(o.toRDF()))},applySynchronously({args:e,mapping:t,evaluate:r}){const[n,i]=e.map((e=>r(e,t)));return(0,s.bool)(n.toRDF().equals(i.toRDF()))}},g={arity:Number.POSITIVE_INFINITY,checkArity:e=>e.length>0,async applyAsync(e){const{args:t,mapping:r,evaluate:n}=e,[i,...a]=t;return m(await n(i,r),{...e,args:a},[])},applySynchronously(e){const{args:t,mapping:r,evaluate:n}=e,[i,...a]=t;return b(n(i,r),{...e,args:a},[])}};async function m(e,t,r){const{args:n,mapping:i,evaluate:u}=t;if(0===n.length)return r.every((e=>!e))?(0,s.bool)(!1):Promise.reject(new o.InError(r));try{const o=n.shift(),l=await u(o,i);return c.regularFunctions[a.RegularOperator.EQUAL].apply([e,l],t).typedValue?(0,s.bool)(!0):m(e,t,[...r,!1])}catch(n){return m(e,t,[...r,n])}}function b(e,t,r){const{args:n,mapping:i,evaluate:u}=t;if(0===n.length){if(r.every((e=>!e)))return(0,s.bool)(!1);throw new o.InError(r)}try{const o=u(n.shift(),i);return c.regularFunctions[a.RegularOperator.EQUAL].apply([e,o],t).typedValue?(0,s.bool)(!0):b(e,t,[...r,!1])}catch(n){return b(e,t,[...r,n])}}const v={arity:Number.POSITIVE_INFINITY,checkArity:e=>e.length>0,async applyAsync(e){const t=c.specialFunctions[a.SpecialOperator.IN],r=await t.applyAsync(e);return(0,s.bool)(!r.typedValue)},applySynchronously(e){const t=c.specialFunctions[a.SpecialOperator.IN].applySynchronously(e);return(0,s.bool)(!t.typedValue)}},_=(0,s.declare)(a.SpecialOperator.CONCAT).onStringly1((()=>e=>e)).collect(),w={arity:Number.POSITIVE_INFINITY,async applyAsync(e){const{args:t,mapping:r,evaluate:n,functionArgumentsCache:i,superTypeProvider:c}=e,u=t.map((async e=>n(e,r))).map((async r=>{const n=_.search([await r],c,i);if(!n)throw new o.InvalidArgumentTypes(t,a.SpecialOperator.CONCAT);return n(e)([await r])})),l=await Promise.all(u),d=l.map((e=>e.typedValue)).join(""),h=T(l)?l[0].language:void 0;return h?(0,s.langString)(d,h):(0,s.string)(d)},applySynchronously(e){const{args:t,mapping:r,evaluate:n,superTypeProvider:i,functionArgumentsCache:c}=e,u=t.map((e=>n(e,r))).map((r=>{const n=_.search([r],i,c);if(!n)throw new o.InvalidArgumentTypes(t,a.SpecialOperator.CONCAT);return n(e)([r])})),l=u.map((e=>e.typedValue)).join(""),d=T(u)?u[0].language:void 0;return d?(0,s.langString)(l,d):(0,s.string)(l)}};function T(e){return e.length>0&&e.every((t=>t.language===e[0].language))}const S=(0,s.declare)(a.SpecialOperator.BNODE).onString1((()=>e=>e)).collect(),O={arity:Number.POSITIVE_INFINITY,checkArity:e=>0===e.length||1===e.length,async applyAsync(e){const{args:t,mapping:r,evaluate:n,superTypeProvider:s,functionArgumentsCache:c}=e,u=1===t.length?await n(t[0],r):void 0;let l;if(u){const r=S.search([u],s,c);if(!r)throw new o.InvalidArgumentTypes(t,a.SpecialOperator.BNODE);l=r(e)([u]).str()}if(e.bnode){const t=await e.bnode(l);return new i.BlankNode(t)}return E(l)},applySynchronously(e){const{args:t,mapping:r,evaluate:n,superTypeProvider:s,functionArgumentsCache:c}=e,u=1===t.length?n(t[0],r):void 0;let l;if(u){const r=S.search([u],s,c);if(!r)throw new o.InvalidArgumentTypes(t,a.SpecialOperator.BNODE);l=r(e)([u]).str()}if(e.bnode){const t=e.bnode(l);return new i.BlankNode(t)}return E(l)}};function E(e){return new i.BlankNode(e??n.v4())}t.specialDefinitions={bound:u,if:d,coalesce:h,"&&":f,"||":p,sameterm:y,in:g,notin:v,concat:w,bnode:O}},29791:(e,t)=>{"use strict";function r(e){return"*"===e}function n(e,t){return new RegExp(`/${e}/`,"iu").test(`/${t}/`)}Object.defineProperty(t,"__esModule",{value:!0}),t.langMatches=t.replace=t.matches=void 0,t.matches=function(e,t,r){return new RegExp(t,r).test(e)},t.replace=function(e,t,r,n){let i=new RegExp(t,n);return i.global||(i=new RegExp(t,`${n??""}g`)),e.replace(i,r)},t.langMatches=function(e,t){const i=e.split("-"),a=t.split("-");if(!n(a[0],i[0])&&!r(i[0]))return!1;let o=1,s=1;for(;s[e,new a.RegularFunction(e,t)]))),t.specialFunctions=Object.fromEntries(Object.entries(c.specialDefinitions).map((([e,t])=>[e,new a.SpecialFunction(e,t)]))),t.namedFunctions=Object.fromEntries(Object.entries(o.namedDefinitions).map((([e,t])=>[e,new a.NamedFunction(e,t)])));var u=r(33357);Object.defineProperty(t,"OverloadTree",{enumerable:!0,get:function(){return u.OverloadTree}})},61621:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAggregateEvaluator=t.orderTypes=t.isExpressionError=t.ExpressionError=t.AggregateEvaluator=t.SyncEvaluator=t.AsyncEvaluator=void 0;var n=r(98375);Object.defineProperty(t,"AsyncEvaluator",{enumerable:!0,get:function(){return n.AsyncEvaluator}});var i=r(86588);Object.defineProperty(t,"SyncEvaluator",{enumerable:!0,get:function(){return i.SyncEvaluator}});var a=r(19030);Object.defineProperty(t,"AggregateEvaluator",{enumerable:!0,get:function(){return a.AggregateEvaluator}});var o=r(82867);Object.defineProperty(t,"ExpressionError",{enumerable:!0,get:function(){return o.ExpressionError}}),Object.defineProperty(t,"isExpressionError",{enumerable:!0,get:function(){return o.isExpressionError}});var s=r(20236);Object.defineProperty(t,"orderTypes",{enumerable:!0,get:function(){return s.orderTypes}});var c=r(74448);Object.defineProperty(t,"AsyncAggregateEvaluator",{enumerable:!0,get:function(){return c.AsyncAggregateEvaluator}})},69119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlgebraTransformer=void 0;const n=r(31578),i=r(11269),a=r(42711),o=r(14624),s=r(82867),c=r(82867),u=r(50363);class l extends u.TermTransformer{constructor(e){super(e.superTypeProvider),this.algebraConfig=e,this.creatorConfig={type:e.type,creator:e.creator}}transformAlgebra(e){const t=n.Algebra.expressionTypes;switch(e.expressionType){case t.TERM:return this.transformTerm(e);case t.OPERATOR:return this.transformOperator(e);case t.NAMED:return this.transformNamed(e);case t.EXISTENCE:return l.transformExistence(e);case t.AGGREGATE:return l.transformAggregate(e);case t.WILDCARD:return l.transformWildcard(e)}}static transformWildcard(e){return new i.NamedNode(e.wildcard.value)}transformOperator(e){const t=e.operator.toLowerCase();if(o.SpecialOperators.has(t)){const r=t,n=e.args.map((e=>this.transformAlgebra(e))),o=a.specialFunctions[r];if(!o.checkArity(n))throw new s.InvalidArity(n,r);return new i.SpecialOperator(n,o.applyAsync,o.applySynchronously)}if(!o.Operators.has(t))throw new s.UnknownOperator(e.operator);const r=t,n=e.args.map((e=>this.transformAlgebra(e))),c=a.regularFunctions[r];if(!l.hasCorrectArity(n,c.arity))throw new s.InvalidArity(n,r);return new i.Operator(n,(e=>c.apply(e,this.algebraConfig)))}wrapSyncFunction(e,t){return r=>{try{const t=e(r.map((e=>e.toRDF())));return this.transformRDFTermUnsafe(t)}catch(e){throw new c.ExtensionFunctionError(t,e)}}}wrapAsyncFunction(e,t){return async r=>{try{const t=await e(r.map((e=>e.toRDF())));return this.transformRDFTermUnsafe(t)}catch(e){throw new c.ExtensionFunctionError(t,e)}}}transformNamed(e){const t=e.name.value,r=e.args.map((e=>this.transformAlgebra(e)));if(o.NamedOperators.has(t)){const t=e.name.value,n=a.namedFunctions[t];return new i.Named(e.name,r,(e=>n.apply(e,this.algebraConfig)))}if("sync"===this.creatorConfig.type){const t=this.creatorConfig.creator(e.name);if(t){const n=this.wrapSyncFunction(t,e.name.value);return new i.SyncExtension(e.name,r,n)}}else{const t=this.creatorConfig.creator(e.name);if(t){const n=this.wrapAsyncFunction(t,e.name.value);return new i.AsyncExtension(e.name,r,n)}}throw new s.UnknownNamedOperator(e.name.value)}static hasCorrectArity(e,t){return Array.isArray(t)?t.includes(e.length):e.length===t}static transformAggregate(e){const t=e.aggregator;return new i.Aggregate(t,e)}static transformExistence(e){return new i.Existence(e)}}t.AlgebraTransformer=l},50363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermTransformer=void 0;const n=r(22112),i=r(31578),a=r(11269),o=r(14624),s=r(82867),c=r(82867),u=r(17590),l=r(17590),d=r(46157);t.TermTransformer=class{constructor(e){this.superTypeProvider=e}transformRDFTermUnsafe(e){return this.transformTerm({term:e,type:i.Algebra.types.EXPRESSION,expressionType:i.Algebra.expressionTypes.TERM})}transformTerm(e){if(!e.term)throw new s.InvalidExpression(e);switch(e.term.termType){case"Variable":return new a.Variable(n.termToString(e.term));case"Literal":return this.transformLiteral(e.term);case"NamedNode":return new a.NamedNode(e.term.value);case"BlankNode":return new a.BlankNode(e.term.value);case"Quad":return new a.Quad(e.term,this.superTypeProvider);default:throw new s.InvalidTermType(e)}}transformLiteral(e){if(!e.datatype||[null,void 0,""].includes(e.datatype.value))return e.language?new a.LangStringLiteral(e.value,e.language):new a.StringLiteral(e.value);const t=e.datatype.value,r=(0,d.getSuperTypeDict)(t,this.superTypeProvider);try{if(o.TypeURL.XSD_STRING in r)return new a.StringLiteral(e.value,t);if(o.TypeURL.RDF_LANG_STRING in r)return new a.LangStringLiteral(e.value,e.language);if(o.TypeURL.XSD_YEAR_MONTH_DURATION in r)return new a.YearMonthDurationLiteral((0,u.parseYearMonthDuration)(e.value),e.value,t);if(o.TypeURL.XSD_DAY_TIME_DURATION in r)return new a.DayTimeDurationLiteral((0,u.parseDayTimeDuration)(e.value),e.value,t);if(o.TypeURL.XSD_DURATION in r)return new a.DurationLiteral((0,u.parseDuration)(e.value),e.value,t);if(o.TypeURL.XSD_DATE_TIME in r){const r=new Date(e.value);return Number.isNaN(r.getTime())?new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):new a.DateTimeLiteral((0,u.parseDateTime)(e.value),e.value,t)}if(o.TypeURL.XSD_DATE in r)return new a.DateLiteral((0,u.parseDate)(e.value),e.value,t);if(o.TypeURL.XSD_TIME in r)return new a.TimeLiteral((0,u.parseTime)(e.value),e.value,t);if(o.TypeURL.XSD_BOOLEAN in r)return"true"!==e.value&&"false"!==e.value&&"1"!==e.value&&"0"!==e.value?new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):new a.BooleanLiteral("true"===e.value||"1"===e.value,e.value);if(o.TypeURL.XSD_DECIMAL in r){const n=l.parseXSDDecimal(e.value);return void 0===n?new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):o.TypeURL.XSD_INTEGER in r?new a.IntegerLiteral(n,t,e.value):new a.DecimalLiteral(n,t,e.value)}const n=o.TypeURL.XSD_FLOAT in r,i=o.TypeURL.XSD_DOUBLE in r;if(n||i){const r=l.parseXSDFloat(e.value);return void 0===r?new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):n?new a.FloatLiteral(r,t,e.value):new a.DoubleLiteral(r,t,e.value)}return new a.Literal(e.value,t,e.value)}catch(r){if(r instanceof Error&&(0,c.isExpressionError)(r))return new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value);throw r}}}},14624:(e,t)=>{"use strict";var r,n,i,a,o;Object.defineProperty(t,"__esModule",{value:!0}),t.NamedOperators=t.SetFunctions=t.SetFunction=t.Operators=t.SpecialOperators=t.RegularOperators=t.SpecialOperator=t.RegularOperator=t.TypeURL=t.TypeAlias=void 0,function(e){e.SPARQL_NUMERIC="SPARQL_NUMERIC",e.SPARQL_STRINGLY="SPARQL_STRINGLY"}(r||(t.TypeAlias=r={})),function(e){e.XSD_ANY_URI="http://www.w3.org/2001/XMLSchema#anyURI",e.XSD_STRING="http://www.w3.org/2001/XMLSchema#string",e.RDF_LANG_STRING="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",e.XSD_BOOLEAN="http://www.w3.org/2001/XMLSchema#boolean",e.XSD_DATE_TIME="http://www.w3.org/2001/XMLSchema#dateTime",e.XSD_DATE_TIME_STAMP="http://www.w3.org/2001/XMLSchema#dateTimeStamp",e.XSD_DATE="http://www.w3.org/2001/XMLSchema#date",e.XSD_G_MONTH="http://www.w3.org/2001/XMLSchema#gMonth",e.XSD_G_MONTHDAY="http://www.w3.org/2001/XMLSchema#gMonthDay",e.XSD_G_YEAR="http://www.w3.org/2001/XMLSchema#gYear",e.XSD_G_YEAR_MONTH="http://www.w3.org/2001/XMLSchema#gYearMonth",e.XSD_TIME="http://www.w3.org/2001/XMLSchema#time",e.XSD_G_DAY="http://www.w3.org/2001/XMLSchema#gDay",e.XSD_DECIMAL="http://www.w3.org/2001/XMLSchema#decimal",e.XSD_FLOAT="http://www.w3.org/2001/XMLSchema#float",e.XSD_DOUBLE="http://www.w3.org/2001/XMLSchema#double",e.XSD_INTEGER="http://www.w3.org/2001/XMLSchema#integer",e.XSD_NON_POSITIVE_INTEGER="http://www.w3.org/2001/XMLSchema#nonPositiveInteger",e.XSD_NEGATIVE_INTEGER="http://www.w3.org/2001/XMLSchema#negativeInteger",e.XSD_LONG="http://www.w3.org/2001/XMLSchema#long",e.XSD_INT="http://www.w3.org/2001/XMLSchema#int",e.XSD_SHORT="http://www.w3.org/2001/XMLSchema#short",e.XSD_BYTE="http://www.w3.org/2001/XMLSchema#byte",e.XSD_NON_NEGATIVE_INTEGER="http://www.w3.org/2001/XMLSchema#nonNegativeInteger",e.XSD_POSITIVE_INTEGER="http://www.w3.org/2001/XMLSchema#positiveInteger",e.XSD_UNSIGNED_LONG="http://www.w3.org/2001/XMLSchema#unsignedLong",e.XSD_UNSIGNED_INT="http://www.w3.org/2001/XMLSchema#unsignedInt",e.XSD_UNSIGNED_SHORT="http://www.w3.org/2001/XMLSchema#unsignedShort",e.XSD_UNSIGNED_BYTE="http://www.w3.org/2001/XMLSchema#unsignedByte",e.XSD_NORMALIZED_STRING="http://www.w3.org/2001/XMLSchema#normalizedString",e.XSD_TOKEN="http://www.w3.org/2001/XMLSchema#token",e.XSD_LANGUAGE="http://www.w3.org/2001/XMLSchema#language",e.XSD_NM_TOKEN="http://www.w3.org/2001/XMLSchema#NMTOKEN",e.XSD_NAME="http://www.w3.org/2001/XMLSchema#name",e.XSD_NC_NAME="http://www.w3.org/2001/XMLSchema#NCName",e.XSD_ENTITY="http://www.w3.org/2001/XMLSchema#ENTITY",e.XSD_ID="http://www.w3.org/2001/XMLSchema#ID",e.XSD_ID_REF="http://www.w3.org/2001/XMLSchema#IDREF",e.XSD_DURATION="http://www.w3.org/2001/XMLSchema#duration",e.XSD_YEAR_MONTH_DURATION="http://www.w3.org/2001/XMLSchema#yearMonthDuration",e.XSD_DAY_TIME_DURATION="http://www.w3.org/2001/XMLSchema#dayTimeDuration"}(n||(t.TypeURL=n={})),function(e){e.NOT="!",e.UMINUS="uminus",e.UPLUS="uplus",e.EQUAL="=",e.NOT_EQUAL="!=",e.LT="<",e.GT=">",e.LTE="<=",e.GTE=">=",e.MULTIPLICATION="*",e.DIVISION="/",e.ADDITION="+",e.SUBTRACTION="-",e.IS_IRI="isiri",e.IS_URI="isuri",e.IS_BLANK="isblank",e.IS_LITERAL="isliteral",e.IS_NUMERIC="isnumeric",e.STR="str",e.LANG="lang",e.DATATYPE="datatype",e.IRI="iri",e.URI="uri",e.STRDT="strdt",e.STRLANG="strlang",e.UUID="uuid",e.STRUUID="struuid",e.STRLEN="strlen",e.SUBSTR="substr",e.UCASE="ucase",e.LCASE="lcase",e.STRSTARTS="strstarts",e.STRENDS="strends",e.CONTAINS="contains",e.STRBEFORE="strbefore",e.STRAFTER="strafter",e.ENCODE_FOR_URI="encode_for_uri",e.LANG_MATCHES="langmatches",e.REGEX="regex",e.REPLACE="replace",e.ABS="abs",e.ROUND="round",e.CEIL="ceil",e.FLOOR="floor",e.RAND="rand",e.NOW="now",e.YEAR="year",e.MONTH="month",e.DAY="day",e.HOURS="hours",e.MINUTES="minutes",e.SECONDS="seconds",e.TIMEZONE="timezone",e.TZ="tz",e.MD5="md5",e.SHA1="sha1",e.SHA256="sha256",e.SHA384="sha384",e.SHA512="sha512",e.TRIPLE="triple",e.SUBJECT="subject",e.PREDICATE="predicate",e.OBJECT="object",e.IS_TRIPLE="istriple"}(i||(t.RegularOperator=i={})),function(e){e.BOUND="bound",e.IF="if",e.COALESCE="coalesce",e.LOGICAL_OR="||",e.LOGICAL_AND="&&",e.SAME_TERM="sameterm",e.IN="in",e.NOT_IN="notin",e.CONCAT="concat",e.BNODE="bnode"}(a||(t.SpecialOperator=a={})),t.RegularOperators=new Set(Object.values(i)),t.SpecialOperators=new Set(Object.values(a)),t.Operators=new Set([...t.RegularOperators,...t.SpecialOperators]),function(e){e.COUNT="count",e.SUM="sum",e.MIN="min",e.MAX="max",e.AVG="avg",e.GROUP_CONCAT="group_concat",e.SAMPLE="sample"}(o||(t.SetFunction=o={})),t.SetFunctions=new Set(Object.values(o)),t.NamedOperators=new Set([n.XSD_STRING,n.XSD_FLOAT,n.XSD_DOUBLE,n.XSD_DECIMAL,n.XSD_INTEGER,n.XSD_DATE_TIME,n.XSD_DATE,n.XSD_BOOLEAN,n.XSD_TIME,n.XSD_DURATION,n.XSD_DAY_TIME_DURATION,n.XSD_YEAR_MONTH_DURATION])},76660:(e,t)=>{"use strict";function r(e){return{day:e.day??0,hours:e.hours??0,minutes:e.minutes??0,seconds:e.seconds??0}}function n(e){return{year:e.year??0,month:e.month??0}}function i(e){return{...r(e),...n(e)}}function a(e){return{...e,day:e.day??1,hours:e.hours??0,month:e.month??1,year:e.year??0,seconds:e.seconds??0,minutes:e.minutes??0}}function o(e){const t=new Date(e.year,e.month-1,e.day,e.hours,e.minutes,Math.trunc(e.seconds),e.seconds%1*1e3);if(e.year>=0&&e.year<100){const e=1900;t.setFullYear(t.getFullYear()-e)}return t}Object.defineProperty(t,"__esModule",{value:!0}),t.extractTimeZone=t.extractRawTimeZone=t.dayTimeDurationsToSeconds=t.yearMonthDurationsToMonths=t.trimToDayTimeDuration=t.trimToYearMonthDuration=t.toUTCDate=t.toJSDate=t.negateDuration=t.toDateTimeRepresentation=t.defaultedDateTimeRepresentation=t.simplifyDurationRepresentation=t.defaultedDurationRepresentation=t.defaultedYearMonthDurationRepresentation=t.defaultedDayTimeDurationRepresentation=void 0,t.defaultedDayTimeDurationRepresentation=r,t.defaultedYearMonthDurationRepresentation=n,t.defaultedDurationRepresentation=i,t.simplifyDurationRepresentation=function(e){const t=i(e),r={},n=t.year+Math.trunc(t.month/12);n&&(r.year=n,t.month%=12),t.month&&(r.month=t.month);const a=t.day+Math.trunc(t.hours/24)+Math.trunc(t.minutes/1440)+Math.trunc(t.seconds/86400);a&&(r.day=a,t.hours%=24,t.minutes%=1440,t.seconds%=86400);const o=t.hours+Math.trunc(t.minutes/60)+Math.trunc(t.seconds/3600);o&&(r.hours=o,t.minutes%=60,t.seconds%=3600);const s=t.minutes+Math.trunc(t.seconds/60);return s&&(r.minutes=s,t.seconds%=60),t.seconds&&(r.seconds=t.seconds),r},t.defaultedDateTimeRepresentation=a,t.toDateTimeRepresentation=function({date:e,timeZone:t}){return{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds(),zoneHours:t.zoneHours,zoneMinutes:t.zoneMinutes}},t.negateDuration=function(e){return{year:void 0===e.year?void 0:-1*e.year,month:void 0===e.month?void 0:-1*e.month,day:void 0===e.day?void 0:-1*e.day,hours:void 0===e.hours?void 0:-1*e.hours,minutes:void 0===e.minutes?void 0:-1*e.minutes,seconds:void 0===e.seconds?void 0:-1*e.seconds}},t.toJSDate=o,t.toUTCDate=function(e,t){const r=o(a(e)),n=r.getTimezoneOffset(),i=e.zoneHours??t.zoneHours,s=e.zoneMinutes??t.zoneMinutes;return new Date(r.getTime()-60*(n+60*i+s)*1e3)},t.trimToYearMonthDuration=function(e){return{year:e.year,month:e.month}},t.trimToDayTimeDuration=function(e){return{day:e.day,hours:e.hours,minutes:e.minutes,seconds:e.seconds}},t.yearMonthDurationsToMonths=function(e){return 12*e.year+e.month},t.dayTimeDurationsToSeconds=function(e){return 60*(60*(24*e.day+e.hours)+e.minutes)+e.seconds},t.extractRawTimeZone=function(e){return/(Z|([+-]\d\d:\d\d))?$/u.exec(e)[0]},t.extractTimeZone=function(e){return{zoneHours:e.getTimezoneOffset()/60,zoneMinutes:e.getTimezoneOffset()%60}}},82867:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoExistenceHook=t.NoAggregator=t.ExtensionFunctionError=t.UnknownNamedOperator=t.UnknownOperator=t.InvalidTermType=t.InvalidExpressionType=t.InvalidExpression=t.InvalidArity=t.UnexpectedError=t.ParseError=t.EmptyAggregateError=t.IncompatibleLanguageOperation=t.InvalidTimezoneCall=t.CastError=t.InvalidCompareArgumentTypes=t.InvalidArgumentTypes=t.InError=t.CoalesceError=t.RDFEqualTypeError=t.EBVCoercionError=t.UnboundVariableError=t.InvalidLexicalForm=t.isExpressionError=t.ExpressionError=void 0;class r extends Error{}t.ExpressionError=r,t.isExpressionError=function(e){return e instanceof r},t.InvalidLexicalForm=class extends r{constructor(e){super(`Invalid lexical form '${p(e)}'`),this.arg=e}},t.UnboundVariableError=class extends r{constructor(e,t){super(`Unbound variable '${p(e)}'`),this.variable=e,this.bindings=t}},t.EBVCoercionError=class extends r{constructor(e){super(`Cannot coerce term to EBV '${p(e)}'`),this.arg=e}},t.RDFEqualTypeError=class extends r{constructor(e){super("Equality test for literals with unsupported datatypes"),this.args=e}},t.CoalesceError=class extends r{constructor(e){super("All COALESCE arguments threw errors"),this.errors=e}},t.InError=class extends r{constructor(e){super(`Some argument to IN errorred and none where equal. ${e.map((e=>`(${e.toString()}) `)).join("and ")}`),this.errors=e}},t.InvalidArgumentTypes=class extends r{constructor(e,t){super(`Argument types not valid for operator: '${p(t)}' with '${p(e)}`),this.args=e,this.op=t}},t.InvalidCompareArgumentTypes=class extends r{constructor(e,t){super(`Compared argument types are supported: '${e.termType}' and '${t.termType}'`),this.arg0=e,this.arg1=t}},t.CastError=class extends r{constructor(e,t){super(`Invalid cast: '${p(e)}' to '${p(t)}'`),this.arg=e}},t.InvalidTimezoneCall=class extends r{constructor(e){super(`TIMEZONE call on ${e} which has no timezone`),this.dateString=e}},t.IncompatibleLanguageOperation=class extends r{constructor(e,t){super(`Operation on incompatible language literals '${p(e)}' and '${p(t)}'`),this.arg1=e,this.arg2=t}},t.EmptyAggregateError=class extends r{constructor(){super("Empty aggregate expression")}},t.ParseError=class extends r{constructor(e,t){super(`Failed to parse ${e} as ${t}.`)}};class n extends Error{constructor(e,t){super(`Programmer Error '${e}'`),this.payload=t}}t.UnexpectedError=n;class i extends Error{constructor(e,t){super(`The number of args does not match the arity of the operator '${p(t)}'.`),this.args=e,this.op=t}}t.InvalidArity=i;class a extends Error{constructor(e){super(`Invalid SPARQL Expression '${p(e)}'`)}}t.InvalidExpression=a;class o extends Error{constructor(e){super(`Invalid expression type for SPARQL Expression '${p(e)}'`),this.expr=e}}t.InvalidExpressionType=o;class s extends Error{constructor(e){super(`Invalid term type for term '${p(e)}'`),this.term=e}}t.InvalidTermType=s;class c extends Error{constructor(e){super(`Unknown operator: '${p(e)}`)}}t.UnknownOperator=c;class u extends Error{constructor(e){super(`Unknown named operator: '${p(e)}'`)}}t.UnknownNamedOperator=u;class l extends Error{constructor(e,t){t instanceof Error?super(`Error thrown in ${e}: ${t.message}${t.stack?`\n${t.stack}`:""}`):super(`Error thrown in ${e}`)}}t.ExtensionFunctionError=l;class d extends Error{constructor(e){super(`Aggregate expression ${p(e)} found, but no aggregate hook provided.`)}}t.NoAggregator=d;class h extends Error{constructor(){super("EXISTS found, but no existence hook provided.")}}function p(e){return JSON.stringify(e)}t.NoExistenceHook=h},20236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.orderTypes=void 0;const n=r(35069),i=r(42711),a=r(50363),o=r(14624),s=r(82867);function c(e,t){return e===t?0:e"term"),cache:s??new n.LRUCache({max:1e3})},defaultTimeZone:{zoneHours:0,zoneMinutes:0}},h=new a.TermTransformer(d.superTypeProvider),p=h.transformLiteral(e),f=h.transformLiteral(t);try{return l.apply([p,f],d).typedValue?0:u.apply([p,f],d).typedValue?1:-1}catch{const e=c(p.dataType,f.dataType);return 0!==e?e:c(p.str(),f.str())}}(t,r,d,h);if(l)throw new s.InvalidCompareArgumentTypes(t,r);return c(t.value,r.value)};const u={Variable:0,BlankNode:1,NamedNode:2,Literal:3,Quad:4,DefaultGraph:5}},17590:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseDayTimeDuration=t.parseYearMonthDuration=t.parseDuration=t.parseTime=t.parseDate=t.parseDateTime=t.parseXSDInteger=t.parseXSDDecimal=t.parseXSDFloat=void 0;const n=r(76660),i=r(82867),a=r(66487);function o(e){if(""===e)return{zoneHours:void 0,zoneMinutes:void 0};if("Z"===e)return{zoneHours:0,zoneMinutes:0};const t=e.replaceAll(/^([+|-])(\d\d):(\d\d)$/gu,"$11!$2!$3").split("!").map(Number);return{zoneHours:t[0]*t[1],zoneMinutes:t[0]*t[2]}}function s(e){const t=e.replaceAll(/^(-)?([123456789]*\d{4})-(\d\d)-(\d\d)(Z|([+-]\d\d:\d\d))?$/gu,"$11!$2!$3!$4!$5");if(t===e)throw new i.ParseError(e,"date");const r=t.split("!"),n=r.slice(0,-1).map(Number),s={year:n[0]*n[1],month:n[2],day:n[3],...o(r[4])};if(!(s.month>=1&&s.month<=12&&s.day>=1&&s.day<=(0,a.maximumDayInMonthFor)(s.year,s.month)))throw new i.ParseError(e,"date");return s}function c(e){const t=e.replaceAll(/^(\d\d):(\d\d):(\d\d(\.\d+)?)(Z|([+-]\d\d:\d\d))?$/gu,"$1!$2!$3!$5");if(t===e)throw new i.ParseError(e,"time");const r=t.split("!"),n=r.slice(0,-1).map(Number),a={hours:n[0],minutes:n[1],seconds:n[2],...o(r[3])};if(a.seconds>=60||a.minutes>=60||a.hours>24||24===a.hours&&(0!==a.minutes||0!==a.seconds))throw new i.ParseError(e,"time");return a}function u(e){const[t,r]=e.split("T"),a=t.replaceAll(/^(-)?P(\d+Y)?(\d+M)?(\d+D)?$/gu,"$11S!$2!$3!$4");if(a===t)throw new i.ParseError(e,"duration");const o=a.split("!");if(void 0!==r){const t=r.replaceAll(/^(\d+H)?(\d+M)?(\d+(\.\d+)?S)?$/gu,"$1!$2!$3");if(""===r||r===t)throw new i.ParseError(e,"duration");o.push(...t.split("!"))}const s=o.map((e=>e.slice(0,-1)));if(!s.slice(1).some(Boolean))throw new i.ParseError(e,"duration");const c=Number(s[0]);return(0,n.simplifyDurationRepresentation)({year:s[1]?c*Number(s[1]):void 0,month:s[2]?c*Number(s[2]):void 0,day:s[3]?c*Number(s[3]):void 0,hours:s[4]?c*Number(s[4]):void 0,minutes:s[5]?c*Number(s[5]):void 0,seconds:s[6]?c*Number(s[6]):void 0})}t.parseXSDFloat=function(e){const t=Number(e);return Number.isNaN(t)?"NaN"===e?Number.NaN:"INF"===e||"+INF"===e?Number.POSITIVE_INFINITY:"-INF"===e?Number.NEGATIVE_INFINITY:void 0:t},t.parseXSDDecimal=function(e){const t=Number(e);return Number.isNaN(t)?void 0:t},t.parseXSDInteger=function(e){const t=Number.parseInt(e,10);return Number.isNaN(t)?void 0:t},t.parseDateTime=function(e){const[t,r]=e.split("T");return{...s(t),...c(r)}},t.parseDate=s,t.parseTime=function(e){const t=c(e);return t.hours%=24,t},t.parseDuration=u,t.parseYearMonthDuration=function(e){const t=u(e);if(["hours","minutes","seconds","day"].some((e=>Boolean(t[e]))))throw new i.ParseError(e,"yearMonthDuration");return t},t.parseDayTimeDuration=function(e){const t=u(e);if(["year","month"].some((e=>Boolean(t[e]))))throw new i.ParseError(e,"dayTimeDuration");return t}},19002:(e,t)=>{"use strict";function r(e,t=2){return e.toLocaleString(void 0,{minimumIntegerDigits:t,useGrouping:!1})}function n(e){return void 0===e.zoneHours||void 0===e.zoneMinutes?"":0===e.zoneHours&&0===e.zoneMinutes?"Z":`${e.zoneHours>=0?`+${r(e.zoneHours)}`:r(e.zoneHours)}:${r(Math.abs(e.zoneMinutes))}`}function i(e){return`${r(e.year,4)}-${r(e.month)}-${r(e.day)}${n(e)}`}function a(e){return`${r(e.hours)}:${r(e.minutes)}:${r(e.seconds)}${n(e)}`}Object.defineProperty(t,"__esModule",{value:!0}),t.serializeDuration=t.serializeTime=t.serializeDate=t.serializeDateTime=void 0,t.serializeDateTime=function(e){return`${i({year:e.year,month:e.month,day:e.day})}T${a(e)}`},t.serializeDate=i,t.serializeTime=a,t.serializeDuration=function(e,t="PT0S"){if(!Object.values(e).some((e=>0!==(e||0))))return t;const r=`${Object.values(e).some((e=>(e||0)<0))?"-":""}P${e.year?`${Math.abs(e.year)}Y`:""}${e.month?`${Math.abs(e.month)}M`:""}${e.day?`${Math.abs(e.day)}D`:""}`;return e.hours||e.minutes||e.seconds?`${r}T${e.hours?`${Math.abs(e.hours)}H`:""}${e.minutes?`${Math.abs(e.minutes)}M`:""}${e.seconds?`${Math.abs(e.seconds)}S`:""}`:r}},66487:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elapsedDuration=t.addDurationToDateTime=t.maximumDayInMonthFor=void 0;const n=r(76660);function i(e,t,r=0){const n=e-r,i=t-r,a=Math.floor(n/i);return{intDiv:a,remainder:e-a*i}}function a(e,t){const{intDiv:r,remainder:n}=i(t,13,1),a=e+r;return[1,3,5,7,8,10,12].includes(n)?31:[4,6,9,11].includes(n)?30:2===n&&(0===i(a,400).remainder||0!==i(a,100).remainder&&0===i(a,4).remainder)?29:28}t.maximumDayInMonthFor=a,t.addDurationToDateTime=function(e,t){const r={...e};let n=i(e.month+t.month,13,1);for(r.month=n.remainder,r.year=e.year+t.year+n.intDiv,n=i(e.seconds+t.seconds,60),r.seconds=n.remainder,n=i(e.minutes+t.minutes+n.intDiv,60),r.minutes=n.remainder,n=i(e.hours+t.hours+n.intDiv,24),r.hours=n.remainder,r.day=e.day+t.day+n.intDiv;;){let e;if(r.day<1)r.day+=a(r.year,r.month-1),e=-1;else{if(!(r.day>a(r.year,r.month)))break;r.day-=a(r.year,r.month),e=1}n=i(r.month+e,13,1),r.month=n.remainder,r.year+=n.intDiv}return r},t.elapsedDuration=function(e,t,r){const i=(0,n.toUTCDate)(e,r),a=(0,n.toUTCDate)(t,r),o=i.getTime()-a.getTime();return{day:Math.floor(o/864e5),hours:Math.floor(o%864e5/36e5),minutes:Math.floor(o%36e5/6e4),seconds:o%6e4}}},46157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.typePromotion=t.isSubTypeOf=t.getSuperTypeDict=t.isInternalSubType=t.asGeneralType=t.asOverrideType=t.asKnownLiteralType=t.asTypeAlias=t.typeAliasCheck=t.extensionTableInit=t.getSuperTypes=t.superTypeDictTable=t.extensionTableInput=void 0;const n=r(11269),i=r(63606),a=r(14624);function o(e,r){const n=r.cache.get(e);if(n)return n;const i=r.discoverer(e);if("term"===i){const t=Object.create(null);return t.__depth=0,t[e]=0,r.cache.set(e,t),t}let a;const s=u(i);return a=s?{...t.superTypeDictTable[s]}:{...o(i,r)},a.__depth++,a[e]=a.__depth,r.cache.set(e,a),a}function s(){for(const[e,r]of Object.entries(t.extensionTableInput)){const n=e;t.superTypeDictTable[n]||c(n,r,t.superTypeDictTable)}}function c(e,r,n){if("term"===r||void 0===r){const t=Object.create(null);return t.__depth=0,t[e]=0,void(n[e]=t)}n[r]||c(r,t.extensionTableInput[r],n),n[e]={...n[r],[e]:n[r].__depth+1,__depth:n[r].__depth+1}}function u(e){if(e in t.superTypeDictTable)return e}function l(e,r){const n=u(e);return n?t.superTypeDictTable[n]:o(e,r)}t.extensionTableInput={[a.TypeURL.XSD_DATE_TIME_STAMP]:a.TypeURL.XSD_DATE_TIME,[a.TypeURL.XSD_DAY_TIME_DURATION]:a.TypeURL.XSD_DURATION,[a.TypeURL.XSD_YEAR_MONTH_DURATION]:a.TypeURL.XSD_DURATION,[a.TypeURL.RDF_LANG_STRING]:a.TypeAlias.SPARQL_STRINGLY,[a.TypeURL.XSD_STRING]:a.TypeAlias.SPARQL_STRINGLY,[a.TypeURL.XSD_NORMALIZED_STRING]:a.TypeURL.XSD_STRING,[a.TypeURL.XSD_TOKEN]:a.TypeURL.XSD_NORMALIZED_STRING,[a.TypeURL.XSD_LANGUAGE]:a.TypeURL.XSD_TOKEN,[a.TypeURL.XSD_NM_TOKEN]:a.TypeURL.XSD_TOKEN,[a.TypeURL.XSD_NAME]:a.TypeURL.XSD_TOKEN,[a.TypeURL.XSD_NC_NAME]:a.TypeURL.XSD_NAME,[a.TypeURL.XSD_ENTITY]:a.TypeURL.XSD_NC_NAME,[a.TypeURL.XSD_ID]:a.TypeURL.XSD_NC_NAME,[a.TypeURL.XSD_ID_REF]:a.TypeURL.XSD_NC_NAME,[a.TypeURL.XSD_DOUBLE]:a.TypeAlias.SPARQL_NUMERIC,[a.TypeURL.XSD_FLOAT]:a.TypeAlias.SPARQL_NUMERIC,[a.TypeURL.XSD_DECIMAL]:a.TypeAlias.SPARQL_NUMERIC,[a.TypeURL.XSD_INTEGER]:a.TypeURL.XSD_DECIMAL,[a.TypeURL.XSD_NON_POSITIVE_INTEGER]:a.TypeURL.XSD_INTEGER,[a.TypeURL.XSD_NEGATIVE_INTEGER]:a.TypeURL.XSD_NON_POSITIVE_INTEGER,[a.TypeURL.XSD_LONG]:a.TypeURL.XSD_INTEGER,[a.TypeURL.XSD_INT]:a.TypeURL.XSD_LONG,[a.TypeURL.XSD_SHORT]:a.TypeURL.XSD_INT,[a.TypeURL.XSD_BYTE]:a.TypeURL.XSD_SHORT,[a.TypeURL.XSD_NON_NEGATIVE_INTEGER]:a.TypeURL.XSD_INTEGER,[a.TypeURL.XSD_POSITIVE_INTEGER]:a.TypeURL.XSD_NON_NEGATIVE_INTEGER,[a.TypeURL.XSD_UNSIGNED_LONG]:a.TypeURL.XSD_NON_NEGATIVE_INTEGER,[a.TypeURL.XSD_UNSIGNED_INT]:a.TypeURL.XSD_UNSIGNED_LONG,[a.TypeURL.XSD_UNSIGNED_SHORT]:a.TypeURL.XSD_UNSIGNED_INT,[a.TypeURL.XSD_UNSIGNED_BYTE]:a.TypeURL.XSD_UNSIGNED_SHORT,[a.TypeURL.XSD_DATE_TIME]:"term",[a.TypeURL.XSD_BOOLEAN]:"term",[a.TypeURL.XSD_DATE]:"term",[a.TypeURL.XSD_G_MONTH]:"term",[a.TypeURL.XSD_G_MONTHDAY]:"term",[a.TypeURL.XSD_G_YEAR]:"term",[a.TypeURL.XSD_G_YEAR_MONTH]:"term",[a.TypeURL.XSD_TIME]:"term",[a.TypeURL.XSD_G_DAY]:"term",[a.TypeURL.XSD_DURATION]:"term",[a.TypeAlias.SPARQL_NUMERIC]:"term",[a.TypeAlias.SPARQL_STRINGLY]:"term",[a.TypeURL.XSD_ANY_URI]:"term"},t.superTypeDictTable=Object.create(null),t.getSuperTypes=o,t.extensionTableInit=s,s(),t.typeAliasCheck=Object.create(null),function(){for(const e of Object.values(a.TypeAlias))t.typeAliasCheck[e]=!0}(),t.asTypeAlias=function(e){if(e in t.typeAliasCheck)return e},t.asKnownLiteralType=u,t.asOverrideType=function(e){if(u(e)??"term"===e)return e},t.asGeneralType=function(e){if("term"===e||(0,n.asTermType)(e))return e},t.isInternalSubType=function(e,r){return"term"!==e&&t.superTypeDictTable[e]&&void 0!==t.superTypeDictTable[e][r]},t.getSuperTypeDict=l,t.isSubTypeOf=function(e,t,r){return"term"!==e&&void 0!==l(e,r)[t]},t.typePromotion={[a.TypeURL.XSD_STRING]:[{typeToPromote:a.TypeURL.XSD_ANY_URI,conversionFunction:e=>(0,i.string)(e.str())}],[a.TypeURL.XSD_DOUBLE]:[{typeToPromote:a.TypeURL.XSD_FLOAT,conversionFunction:e=>(0,i.double)(e.typedValue)},{typeToPromote:a.TypeURL.XSD_DECIMAL,conversionFunction:e=>(0,i.double)(e.typedValue)}],[a.TypeURL.XSD_FLOAT]:[{typeToPromote:a.TypeURL.XSD_DECIMAL,conversionFunction:e=>(0,i.float)(e.typedValue)}]}},71448:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerVoid=void 0;const n=r(52640);class i extends n.Logger{debug(){}error(){}fatal(){}info(){}trace(){}warn(){}}t.LoggerVoid=i},5868:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(71448),t)},8008:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorAll=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e)}async mediate(e){const t=[];let r;try{r=this.publish(e)}catch{r=[]}for(const e of r)try{await e.reply,t.push(e.actor)}catch{}return(await Promise.all(t.map((t=>t.runObservable(e)))))[0]}async mediateWith(){throw new Error("Unsupported operation: MediatorAll#mediateWith")}}t.MediatorAll=i},48284:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(8008),t)},38123:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorCombinePipeline=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e)}async mediate(e){let t;try{t=this.publish(e)}catch{return e}if(this.filterErrors){const e=[];for(const r of t)try{await r.reply,e.push(r)}catch{}t=e}if(t=await Promise.all(t.map((async({actor:e,reply:t})=>({actor:e,reply:await t})))),this.order){const e=e=>{const t=this.field?e[this.field]:e;if("number"!=typeof t)throw new TypeError("Cannot order elements that are not numbers.");return t};t=t.sort(((t,r)=>("increasing"===this.order?1:-1)*(e(t.reply)-e(r.reply))))}let r=e;for(const{actor:e}of t)r={...r,...await e.runObservable(r)};return r}mediateWith(){throw new Error("Method not supported.")}}t.MediatorCombinePipeline=i},30827:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(38123),t)},79559:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorCombineUnion=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e),this.combiner=this.createCombiner()}async mediate(e){let t;try{t=this.publish(e)}catch{t=[]}if(this.filterErrors){const e=[];for(const r of t)try{await r.reply,e.push(r)}catch{}t=e}await Promise.all(t.map((({reply:e})=>e)));const r=await Promise.all(t.map((t=>t.actor.runObservable(e))));return this.combiner(r)}mediateWith(){throw new Error("Method not supported.")}createCombiner(){return e=>{const t={};return t[this.field]={},[{}].concat(e.map((e=>e[this.field]))).forEach((e=>{t[this.field]={...e,...t[this.field]}})),t}}}t.MediatorCombineUnion=i},75884:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(79559),t)},63850:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorJoinCoefficientsFixed=void 0;const n=r(32227),i=r(34368);class a extends i.Mediator{constructor(e){super(e)}async mediateWith(e,t){const r=[],a=t.map((({reply:e})=>e)).map((e=>e.catch((e=>{r.push(e)})))),o=await Promise.all(a);let s=o.map((e=>{if(e)return e.iterations*this.cpuWeight+e.persistedItems*this.memoryWeight+e.blockingItems*this.timeWeight+e.requestTime*this.ioWeight}));const c=Math.max(...s.filter((e=>void 0!==e))),u=e.context.get(n.KeysQueryOperation.limitIndicator);u&&(s=s.map(((e,t)=>void 0!==e&&o[t].persistedItems>0&&o[t].iterations>u?e+c:e)));let l=-1,d=Number.POSITIVE_INFINITY;for(const[e,t]of s.entries())void 0!==t&&(-1===l||te.message)).join("\n")}`);const h=t[l].actor;return h.includeInLogs&&i.Actor.getContextLogger(e.context)?.debug(`Determined physical join operator '${h.logicalType}-${h.physicalName}'`,{entries:e.entries.length,variables:await Promise.all(e.entries.map((async e=>(await e.output.metadata()).variables.map((e=>e.value))))),costs:Object.fromEntries(s.map(((e,r)=>[`${t[r].actor.logicalType}-${t[r].actor.physicalName}`,e])).filter((e=>void 0!==e[1]))),coefficients:Object.fromEntries(o.map(((e,r)=>[`${t[r].actor.logicalType}-${t[r].actor.physicalName}`,e])).filter((e=>void 0!==e[1])))}),h}}t.MediatorJoinCoefficientsFixed=a},8309:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(63850),t)},55614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorNumber=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e),this.indexPicker=this.createIndexPicker()}createIndexPicker(){switch(this.type){case"min":return e=>e.reduce(((e,t,r)=>{const n=this.getOrDefault(t[this.field],Number.POSITIVE_INFINITY);return null!==n&&(Number.isNaN(e[0])||e[0]>n)?[n,r]:e}),[Number.NaN,-1])[1];case"max":return e=>e.reduce(((e,t,r)=>{const n=this.getOrDefault(t[this.field],Number.NEGATIVE_INFINITY);return null!==n&&(Number.isNaN(e[0])||e[0]e));const n=[];if(this.ignoreErrors){const e={};e[this.field]=null,r=r.map((t=>t.catch((t=>(n.push(t),e)))))}const i=await Promise.all(r),a=this.indexPicker(i);if(a<0)throw new Error(`All actors rejected their test in ${this.name}\n${n.map((e=>e.message)).join("\n")}`);return t[a].actor}}t.MediatorNumber=i},99104:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(55614),t)},41426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorRace=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e)}mediateWith(e,t){return new Promise(((e,r)=>{const n=[];for(const i of t)i.reply.then((()=>{e(i.actor)})).catch((e=>{n.push(e),n.length===t.length&&r(new Error(`${this.name} mediated over all rejecting actors:\n${n.map((e=>e.message)).join("\n")}`))}))}))}}t.MediatorRace=i},25896:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(41426),t)},85849:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataValidationState=void 0,t.MetadataValidationState=class{constructor(){this.invalidateListeners=[],this.valid=!0}addInvalidateListener(e){this.invalidateListeners.push(e)}invalidate(){if(this.valid){this.valid=!1;for(const e of this.invalidateListeners)e()}}}},48187:(e,t)=>{"use strict";function r(e){for(const t of["cardinality"])if(!(t in e))throw new Error(`Invalid metadata: missing ${t} in ${JSON.stringify(e)}`);return e}function n(e){for(const t of["cardinality","canContainUndefs","variables"])if(!(t in e))throw new Error(`Invalid metadata: missing ${t} in ${JSON.stringify(e)}`);return e}function i(e){let t;return()=>(t||(t=e(),t.then((e=>e.state.addInvalidateListener((()=>{t=void 0})))).catch((()=>{}))),t)}Object.defineProperty(t,"__esModule",{value:!0}),t.cachifyMetadata=t.validateMetadataBindings=t.validateMetadataQuads=t.getMetadataBindings=t.getMetadataQuads=void 0,t.getMetadataQuads=function(e){return i((()=>new Promise(((t,r)=>{e.getProperty("metadata",(e=>t(e))),e.on("error",r)})).then((e=>r(e)))))},t.getMetadataBindings=function(e){return i((()=>new Promise(((t,r)=>{e.getProperty("metadata",(e=>t(e))),e.on("error",r)})).then((e=>("canContainUndefs"in e||(e.canContainUndefs=!1),n(e))))))},t.validateMetadataQuads=r,t.validateMetadataBindings=n,t.cachifyMetadata=i},72394:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(85849),t),i(r(48187),t)},66072:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},90522:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},54973:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},70650:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},92955:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},66143:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},22170:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6379:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},78615:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},60552:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},34989:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},50199:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},15278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},16382:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;class r{static getLevelOrdinal(e){return r.LEVELS[e]}}t.Logger=r,r.LEVELS={trace:0,debug:1,info:2,warn:3,error:4,fatal:5}},52640:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(66072),t),i(r(90522),t),i(r(54973),t),i(r(70650),t),i(r(92955),t),i(r(66143),t),i(r(22170),t),i(r(6379),t),i(r(78615),t),i(r(60552),t),i(r(34989),t),i(r(50199),t),i(r(15278),t),i(r(16382),t)},7991:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,a=s(e),o=a[0],c=a[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,c)),l=0,d=c>0?o-4:o;for(r=0;r>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,u=n-i;su?u:s+o));return 1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=a[o],n[a.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,a,o=[],s=t;s>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},55553:function(e,t,r){var n;!function(i){"use strict";var a,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,c=Math.floor,u="[BigNumber Error] ",l=u+"Number primitive has more than 15 significant digits: ",d=1e14,h=14,p=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],y=1e7,g=1e9;function m(e){var t=0|e;return e>0||e===t?t:t-1}function b(e){for(var t,r,n=1,i=e.length,a=e[0]+"";nu^r?1:-1;for(s=(c=i.length)<(u=a.length)?c:u,o=0;oa[o]^r?1:-1;return c==u?0:c>u^r?1:-1}function _(e,t,r,n){if(er||e!==c(e))throw Error(u+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var t=e.c.length-1;return m(e.e/h)==t&&e.c[t]%2!=0}function T(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function S(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else tk?m.c=m.e=null:e.e=10;d/=10,u++);return void(u>k?m.c=m.e=null:(m.e=u,m.c=[e]))}g=String(e)}else{if(!o.test(g=String(e)))return i(m,g,f);m.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(u=g.indexOf("."))>-1&&(g=g.replace(".","")),(d=g.search(/e/i))>0?(u<0&&(u=d),u+=+g.slice(d+1),g=g.substring(0,d)):u<0&&(u=g.length)}else{if(_(t,2,V.length,"Base"),10==t&&Q)return K(m=new $(e),D+m.e+1,j);if(g=String(e),f="number"==typeof e){if(0*e!=0)return i(m,g,f,t);if(m.s=1/e<0?(g=g.slice(1),-1):1,$.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else m.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(r=V.slice(0,t),u=d=0,y=g.length;du){u=y;continue}}else if(!s&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){s=!0,d=-1,u=0;continue}return i(m,String(e),f,t)}f=!1,(u=(g=n(g,t,10,m.s)).indexOf("."))>-1?g=g.replace(".",""):u=g.length}for(d=0;48===g.charCodeAt(d);d++);for(y=g.length;48===g.charCodeAt(--y););if(g=g.slice(d,++y)){if(y-=d,f&&$.DEBUG&&y>15&&(e>p||e!==c(e)))throw Error(l+m.s*e);if((u=u-d-1)>k)m.c=m.e=null;else if(u=M)?T(c,o):S(c,o,"0");else if(a=(e=K(new $(e),t,r)).e,s=(c=b(e.c)).length,1==n||2==n&&(t<=a||a<=C)){for(;ss){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=a-s)>0)for(a+1==s&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function G(e,t){for(var r,n,i=1,a=new $(e[0]);i=10;i/=10,n++);return(r=n+r*h-1)>k?e.c=e.e=null:r=10;u/=10,i++);if((a=t-i)<0)a+=h,o=t,l=g[p=0],y=c(l/m[i-o-1]%10);else if((p=s((a+1)/h))>=g.length){if(!n)break e;for(;g.length<=p;g.push(0));l=y=0,i=1,o=(a%=h)-h+1}else{for(l=u=g[p],i=1;u>=10;u/=10,i++);y=(o=(a%=h)-h+i)<0?0:c(l/m[i-o-1]%10)}if(n=n||t<0||null!=g[p+1]||(o<0?l:l%m[i-o-1]),n=r<4?(y||n)&&(0==r||r==(e.s<0?3:2)):y>5||5==y&&(4==r||n||6==r&&(a>0?o>0?l/m[i-o]:0:g[p-1])%10&1||r==(e.s<0?8:7)),t<1||!g[0])return g.length=0,n?(t-=e.e+1,g[0]=m[(h-t%h)%h],e.e=-t||0):g[0]=e.e=0,e;if(0==a?(g.length=p,u=1,p--):(g.length=p+1,u=m[h-a],g[p]=o>0?c(l/m[i-o]%m[o])*u:0),n)for(;;){if(0==p){for(a=1,o=g[0];o>=10;o/=10,a++);for(o=g[0]+=u,u=1;o>=10;o/=10,u++);a!=u&&(e.e++,g[0]==d&&(g[0]=1));break}if(g[p]+=u,g[p]!=d)break;g[p--]=0,u=1}for(a=g.length;0===g[--a];g.pop());}e.e>k?e.c=e.e=null:e.e=M?T(t,r):S(t,r,"0"),e.s<0?"-"+t:t)}return $.clone=e,$.ROUND_UP=0,$.ROUND_DOWN=1,$.ROUND_CEIL=2,$.ROUND_FLOOR=3,$.ROUND_HALF_UP=4,$.ROUND_HALF_DOWN=5,$.ROUND_HALF_EVEN=6,$.ROUND_HALF_CEIL=7,$.ROUND_HALF_FLOOR=8,$.EUCLID=9,$.config=$.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(u+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(_(r=e[t],0,g,t),D=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(_(r=e[t],0,8,t),j=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(_(r[0],-g,0,t),_(r[1],0,g,t),C=r[0],M=r[1]):(_(r,-g,g,t),C=-(M=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)_(r[0],-g,-1,t),_(r[1],1,g,t),L=r[0],k=r[1];else{if(_(r,-g,g,t),!r)throw Error(u+t+" cannot be zero: "+r);L=-(k=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(u+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw F=!r,Error(u+"crypto unavailable");F=r}else F=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(_(r=e[t],0,9,t),B=r),e.hasOwnProperty(t="POW_PRECISION")&&(_(r=e[t],0,g,t),U=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(u+t+" not an object: "+r);q=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(u+t+" invalid: "+r);Q="0123456789"==r.slice(0,10),V=r}}return{DECIMAL_PLACES:D,ROUNDING_MODE:j,EXPONENTIAL_AT:[C,M],RANGE:[L,k],CRYPTO:F,MODULO_MODE:B,POW_PRECISION:U,FORMAT:q,ALPHABET:V}},$.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!$.DEBUG)return!0;var t,r,n=e.c,i=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===a||-1===a)&&i>=-g&&i<=g&&i===c(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%h)<1&&(t+=h),String(n[0]).length==t){for(t=0;t=d||r!==c(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(u+"Invalid BigNumber: "+e)},$.maximum=$.max=function(){return G(arguments,-1)},$.minimum=$.min=function(){return G(arguments,1)},$.random=(a=9007199254740992,O=Math.random()*a&2097151?function(){return c(Math.random()*a)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,a,o=0,l=[],d=new $(N);if(null==e?e=D:_(e,0,g),i=s(e/h),F)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));o>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[o]=r[0],t[o+1]=r[1]):(l.push(a%1e14),o+=2);o=i/2}else{if(!crypto.randomBytes)throw F=!1,Error(u+"crypto unavailable");for(t=crypto.randomBytes(i*=7);o=9e15?crypto.randomBytes(7).copy(t,o):(l.push(a%1e14),o+=7);o=i/7}if(!F)for(;o=10;a/=10,o++);or-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/r|0,o[i]%=r)}return o.reverse()}return function(n,i,a,o,s){var c,u,l,d,h,p,f,y,g=n.indexOf("."),m=D,v=j;for(g>=0&&(d=U,U=0,n=n.replace(".",""),p=(y=new $(i)).pow(n.length-g),U=d,y.c=t(S(b(p.c),p.e,"0"),10,a,e),y.e=y.c.length),l=d=(f=t(n,i,a,s?(c=V,e):(c=e,V))).length;0==f[--d];f.pop());if(!f[0])return c.charAt(0);if(g<0?--l:(p.c=f,p.e=l,p.s=o,f=(p=r(p,y,m,v,a)).c,h=p.r,l=p.e),g=f[u=l+m+1],d=a/2,h=h||u<0||null!=f[u+1],h=v<4?(null!=g||h)&&(0==v||v==(p.s<0?3:2)):g>d||g==d&&(4==v||h||6==v&&1&f[u-1]||v==(p.s<0?8:7)),u<1||!f[0])n=h?S(c.charAt(1),-m,c.charAt(0)):c.charAt(0);else{if(f.length=u,h)for(--a;++f[--u]>a;)f[u]=0,u||(++l,f=[1].concat(f));for(d=f.length;!f[--d];);for(g=0,n="";g<=d;n+=c.charAt(f[g++]));n=S(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,a,o,s=0,c=e.length,u=t%y,l=t/y|0;for(e=e.slice();c--;)s=((i=u*(a=e[c]%y)+(n=l*a+(o=e[c]/y|0)*u)%y*y+s)/r|0)+(n/y|0)+l*o,e[c]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;it[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,a,o,s){var u,l,p,f,y,g,b,v,_,w,T,S,O,E,x,A,R,I=n.s==i.s?1:-1,P=n.c,N=i.c;if(!(P&&P[0]&&N&&N[0]))return new $(n.s&&i.s&&(P?!N||P[0]!=N[0]:N)?P&&0==P[0]||!N?0*I:I/0:NaN);for(_=(v=new $(I)).c=[],I=a+(l=n.e-i.e)+1,s||(s=d,l=m(n.e/h)-m(i.e/h),I=I/h|0),p=0;N[p]==(P[p]||0);p++);if(N[p]>(P[p]||0)&&l--,I<0)_.push(1),f=!0;else{for(E=P.length,A=N.length,p=0,I+=2,(y=c(s/(N[0]+1)))>1&&(N=e(N,y,s),P=e(P,y,s),A=N.length,E=P.length),O=A,T=(w=P.slice(0,A)).length;T=s/2&&x++;do{if(y=0,(u=t(N,w,A,T))<0){if(S=w[0],A!=T&&(S=S*s+(w[1]||0)),(y=c(S/x))>1)for(y>=s&&(y=s-1),b=(g=e(N,y,s)).length,T=w.length;1==t(g,w,b,T);)y--,r(g,A=10;I/=10,p++);K(v,a+(v.e=p+l*h-1)+1,o,f)}else v.e=l,v.r=+f;return v}}(),E=/^(-?)0([xbo])(?=\w[\w.]*$)/i,x=/^([^.]+)\.$/,A=/^\.([^.]+)$/,R=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,a=r?t:t.replace(I,"");if(R.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!r&&(a=a.replace(E,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,a=a.replace(x,"$1").replace(A,"0.$1")),t!=a))return new $(a,i);if($.DEBUG)throw Error(u+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},P.absoluteValue=P.abs=function(){var e=new $(this);return e.s<0&&(e.s=1),e},P.comparedTo=function(e,t){return v(this,new $(e,t))},P.decimalPlaces=P.dp=function(e,t){var r,n,i,a=this;if(null!=e)return _(e,0,g),null==t?t=j:_(t,0,8),K(new $(a),e+a.e+1,t);if(!(r=a.c))return null;if(n=((i=r.length-1)-m(this.e/h))*h,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},P.dividedBy=P.div=function(e,t){return r(this,new $(e,t),D,j)},P.dividedToIntegerBy=P.idiv=function(e,t){return r(this,new $(e,t),0,1)},P.exponentiatedBy=P.pow=function(e,t){var r,n,i,a,o,l,d,p,f=this;if((e=new $(e)).c&&!e.isInteger())throw Error(u+"Exponent not an integer: "+X(e));if(null!=t&&(t=new $(t)),o=e.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return p=new $(Math.pow(+X(f),o?e.s*(2-w(e)):+X(e))),t?p.mod(t):p;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new $(NaN);(n=!l&&f.isInteger()&&t.isInteger())&&(f=f.mod(t))}else{if(e.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||o&&f.c[1]>=24e7:f.c[0]<8e13||o&&f.c[0]<=9999975e7)))return a=f.s<0&&w(e)?-0:0,f.e>-1&&(a=1/a),new $(l?1/a:a);U&&(a=s(U/h+2))}for(o?(r=new $(.5),l&&(e.s=1),d=w(e)):d=(i=Math.abs(+X(e)))%2,p=new $(N);;){if(d){if(!(p=p.times(f)).c)break;a?p.c.length>a&&(p.c.length=a):n&&(p=p.mod(t))}if(i){if(0===(i=c(i/2)))break;d=i%2}else if(K(e=e.times(r),e.e+1,1),e.e>14)d=w(e);else{if(0==(i=+X(e)))break;d=i%2}f=f.times(f),a?f.c&&f.c.length>a&&(f.c.length=a):n&&(f=f.mod(t))}return n?p:(l&&(p=N.div(p)),t?p.mod(t):a?K(p,U,j,void 0):p)},P.integerValue=function(e){var t=new $(this);return null==e?e=j:_(e,0,8),K(t,t.e+1,e)},P.isEqualTo=P.eq=function(e,t){return 0===v(this,new $(e,t))},P.isFinite=function(){return!!this.c},P.isGreaterThan=P.gt=function(e,t){return v(this,new $(e,t))>0},P.isGreaterThanOrEqualTo=P.gte=function(e,t){return 1===(t=v(this,new $(e,t)))||0===t},P.isInteger=function(){return!!this.c&&m(this.e/h)>this.c.length-2},P.isLessThan=P.lt=function(e,t){return v(this,new $(e,t))<0},P.isLessThanOrEqualTo=P.lte=function(e,t){return-1===(t=v(this,new $(e,t)))||0===t},P.isNaN=function(){return!this.s},P.isNegative=function(){return this.s<0},P.isPositive=function(){return this.s>0},P.isZero=function(){return!!this.c&&0==this.c[0]},P.minus=function(e,t){var r,n,i,a,o=this,s=o.s;if(t=(e=new $(e,t)).s,!s||!t)return new $(NaN);if(s!=t)return e.s=-t,o.plus(e);var c=o.e/h,u=e.e/h,l=o.c,p=e.c;if(!c||!u){if(!l||!p)return l?(e.s=-t,e):new $(p?o:NaN);if(!l[0]||!p[0])return p[0]?(e.s=-t,e):new $(l[0]?o:3==j?-0:0)}if(c=m(c),u=m(u),l=l.slice(),s=c-u){for((a=s<0)?(s=-s,i=l):(u=c,i=p),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(a=(s=l.length)<(t=p.length))?s:t,s=t=0;t0)for(;t--;l[r++]=0);for(t=d-1;n>s;){if(l[--n]=0;){for(r=0,f=S[i]%_,g=S[i]/_|0,a=i+(o=c);a>i;)r=((u=f*(u=T[--o]%_)+(s=g*u+(l=T[o]/_|0)*f)%_*_+b[a]+r)/v|0)+(s/_|0)+g*l,b[a--]=u%v;b[a]=r}return r?++n:b.splice(0,1),z(e,b,n)},P.negated=function(){var e=new $(this);return e.s=-e.s||null,e},P.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new $(e,t)).s,!i||!t)return new $(NaN);if(i!=t)return e.s=-t,n.minus(e);var a=n.e/h,o=e.e/h,s=n.c,c=e.c;if(!a||!o){if(!s||!c)return new $(i/0);if(!s[0]||!c[0])return c[0]?e:new $(s[0]?n:0*i)}if(a=m(a),o=m(o),s=s.slice(),i=a-o){for(i>0?(o=a,r=c):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/d|0,s[t]=d===s[t]?0:s[t]%d;return i&&(s=[i].concat(s),++o),z(e,s,o)},P.precision=P.sd=function(e,t){var r,n,i,a=this;if(null!=e&&e!==!!e)return _(e,1,g),null==t?t=j:_(t,0,8),K(new $(a),e,t);if(!(r=a.c))return null;if(n=(i=r.length-1)*h+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&a.e+1>n&&(n=a.e+1),n},P.shiftedBy=function(e){return _(e,-9007199254740991,p),this.times("1e"+e)},P.squareRoot=P.sqrt=function(){var e,t,n,i,a,o=this,s=o.c,c=o.s,u=o.e,l=D+4,d=new $("0.5");if(1!==c||!s||!s[0])return new $(!c||c<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(c=Math.sqrt(+X(o)))||c==1/0?(((t=b(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=m((u+1)/2)-(u<0||u%2),n=new $(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new $(c+""),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(a=n,n=d.times(a.plus(r(o,a,l,1))),b(a.c).slice(0,c)===(t=b(n.c)).slice(0,c)){if(n.e0&&y>0){for(a=y%s||s,d=f.substr(0,a);a0&&(d+=l+f.slice(a)),p&&(d="-"+d)}n=h?d+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):d}return(r.prefix||"")+n+(r.suffix||"")},P.toFraction=function(e){var t,n,i,a,o,s,c,l,d,p,y,g,m=this,v=m.c;if(null!=e&&(!(c=new $(e)).isInteger()&&(c.c||1!==c.s)||c.lt(N)))throw Error(u+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+X(c));if(!v)return new $(m);for(t=new $(N),d=n=new $(N),i=l=new $(N),g=b(v),o=t.e=g.length-m.e-1,t.c[0]=f[(s=o%h)<0?h+s:s],e=!e||c.comparedTo(t)>0?o>0?t:d:c,s=k,k=1/0,c=new $(g),l.c[0]=0;p=r(c,t,0,1),1!=(a=n.plus(p.times(i))).comparedTo(e);)n=i,i=a,d=l.plus(p.times(a=d)),l=a,t=c.minus(p.times(a=t)),c=a;return a=r(e.minus(n),i,0,1),l=l.plus(a.times(d)),n=n.plus(a.times(i)),l.s=d.s=m.s,y=r(d,i,o*=2,j).minus(m).abs().comparedTo(r(l,n,o,j).minus(m).abs())<1?[d,i]:[l,n],k=s,y},P.toNumber=function(){return+X(this)},P.toPrecision=function(e,t){return null!=e&&_(e,1,g),H(this,e,t,2)},P.toString=function(e){var t,r=this,i=r.s,a=r.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=a<=C||a>=M?T(b(r.c),a):S(b(r.c),a,"0"):10===e&&Q?t=S(b((r=K(new $(r),D+a+1,j)).c),r.e,"0"):(_(e,2,V.length,"Base"),t=n(S(b(r.c),a,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},P.valueOf=P.toJSON=function(){return X(this)},P._isBigNumber=!0,null!=t&&$.set(t),$}(),a.default=a.BigNumber=a,void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},1048:(e,t,r)=>{"use strict";const n=r(7991),i=r(39318),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const i=function(e){if(c.isBuffer(e)){const t=0|f(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?s(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return l(e),s(e<0?0:0|f(e))}function h(e){const t=e.length<0?0:0|f(e.length),r=s(t);for(let n=0;n=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function y(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(i)return n?-1:G(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let a,o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let n=-1;for(a=r;as&&(r=s-c),a=r;a>=0;a--){let r=!0;for(let n=0;ni&&(n=i):n=i;const a=t.length;let o;for(n>a/2&&(n=a/2),o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+o<=r){let r,n,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:r=e[i+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(a=c));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,c>65535&&c<1114112&&(a=c))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return function(e){const t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},c.byteLength=y,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(X(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0);const s=Math.min(a,o),u=this.slice(n,i),l=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let a=!1;for(;;)switch(n){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return T(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function R(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,i,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function C(e,t,r,n,i){V(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function M(e,t,r,n,i){V(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function L(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function k(e,t,r,n,a){return t=+t,r>>>=0,a||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,a){return t=+t,r>>>=0,a||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e],i=1,a=0;for(;++a>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Y((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e],i=1,a=0;for(;++a=i&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=t,i=1,a=this[e+--n];for(;n>0&&(i*=256);)a+=this[e+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Y((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||D(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Y((function(e,t=0){return C(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Y((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);j(this,e,t,r,n-1,-n)}let i=0,a=1,o=0;for(this[t]=255&e;++i>>=0,!n){const n=Math.pow(2,8*r-1);j(this,e,t,r,n-1,-n)}let i=r-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Y((function(e,t=0){return C(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Y((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return k(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return k(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function V(e,t,r,n,i,a){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(a+1)}${n}`:`>= -(2${n} ** ${8*(a+1)-1}${n}) and < 2 ** ${8*(a+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){Q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||$(t,e.length-(r+1))}(n,i,a)}function Q(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function $(e,t,r){if(Math.floor(e)!==e)throw Q(e,r),new B.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let i=null;const a=[];for(let o=0;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function z(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const W=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Y(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},62168:e=>{"use strict";e.exports=function e(t){if("number"==typeof t&&isNaN(t))throw new Error("NaN is not allowed");if("number"==typeof t&&!isFinite(t))throw new Error("Infinity is not allowed");return null===t||"object"!=typeof t?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce(((t,r,n)=>`${t}${0===n?"":","}${e(void 0===r||"symbol"==typeof r?null:r)}`),"")}]`:`{${Object.keys(t).sort().reduce(((r,n)=>void 0===t[n]||"symbol"==typeof t[n]?r:`${r}${0===r.length?"":","}${e(n)}:${e(t[n])}`),"")}}`}},90482:function(){!function(e){!function(t){var r="undefined"!=typeof globalThis&&globalThis||void 0!==e&&e||void 0!==r&&r,n="URLSearchParams"in r,i="Symbol"in r&&"iterator"in Symbol,a="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in r,s="ArrayBuffer"in r;if(s)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&c.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=y(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&a&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(g)}),this.text=function(){var e,t,r,n=f(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=y(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function T(e,t){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},b.call(_.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},T.error=function(){var e=new T(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];T.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new T(null,{status:t,headers:{location:e}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function O(e,n){return new Promise((function(i,o){var c=new _(e,n);if(c.signal&&c.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function l(){u.abort()}u.onload=function(){var e,t,r={status:u.status,statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var n="response"in u?u.response:u.responseText;setTimeout((function(){i(new T(n,r))}),0)},u.onerror=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.ontimeout=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.onabort=function(){setTimeout((function(){o(new t.DOMException("Aborted","AbortError"))}),0)},u.open(c.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?u.withCredentials=!0:"omit"===c.credentials&&(u.withCredentials=!1),"responseType"in u&&(a?u.responseType="blob":s&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(u.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof p?c.headers.forEach((function(e,t){u.setRequestHeader(t,e)})):Object.getOwnPropertyNames(n.headers).forEach((function(e){u.setRequestHeader(e,d(n.headers[e]))})),c.signal&&(c.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&c.signal.removeEventListener("abort",l)}),u.send(void 0===c._bodyInit?null:c._bodyInit)}))}O.polyfill=!0,r.fetch||(r.fetch=O,r.Headers=p,r.Request=_,r.Response=T),t.Headers=p,t.Request=_,t.Response=T,t.fetch=O}({})}("undefined"!=typeof self?self:this)},10288:(e,t,r)=>{var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var r=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r&&r,n="URLSearchParams"in r,i="Symbol"in r&&"iterator"in Symbol,a="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in r,s="ArrayBuffer"in r;if(s)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&c.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=y(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&a&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(g)}),this.text=function(){var e,t,r,n=f(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=y(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function T(e,t){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},b.call(_.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},T.error=function(){var e=new T(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];T.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new T(null,{status:t,headers:{location:e}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function O(e,n){return new Promise((function(i,o){var c=new _(e,n);if(c.signal&&c.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function l(){u.abort()}u.onload=function(){var e,t,r={status:u.status,statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var n="response"in u?u.response:u.responseText;setTimeout((function(){i(new T(n,r))}),0)},u.onerror=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.ontimeout=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.onabort=function(){setTimeout((function(){o(new t.DOMException("Aborted","AbortError"))}),0)},u.open(c.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?u.withCredentials=!0:"omit"===c.credentials&&(u.withCredentials=!1),"responseType"in u&&(a?u.responseType="blob":s&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(u.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof p?c.headers.forEach((function(e,t){u.setRequestHeader(t,e)})):Object.getOwnPropertyNames(n.headers).forEach((function(e){u.setRequestHeader(e,d(n.headers[e]))})),c.signal&&(c.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&c.signal.removeEventListener("abort",l)}),u.send(void 0===c._bodyInit?null:c._bodyInit)}))}O.polyfill=!0,r.fetch||(r.fetch=O,r.Headers=p,r.Request=_,r.Response=T),t.Headers=p,t.Request=_,t.Response=T,t.fetch=O}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var a=n.fetch?n:i;(t=a.fetch).default=a.fetch,t.fetch=a.fetch,t.Headers=a.Headers,t.Request=a.Request,t.Response=a.Response,e.exports=t},36593:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeNames=t.elementNames=void 0,t.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((function(e){return[e.toLowerCase(),e]}))),t.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((function(e){return[e.toLowerCase(),e]})))},5193:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r");case s.Comment:return"\x3c!--".concat(e.data,"--\x3e");case s.CDATA:return function(e){return"")}(e);case s.Script:case s.Style:case s.Tag:return function(e,t){var r;"foreign"===t.xmlMode&&(e.name=null!==(r=u.elementNames.get(e.name))&&void 0!==r?r:e.name,e.parent&&y.has(e.parent.name)&&(t=n(n({},t),{xmlMode:!1}))),!t.xmlMode&&g.has(e.name)&&(t=n(n({},t),{xmlMode:"foreign"}));var i="<".concat(e.name),a=function(e,t){var r;if(e){var n=!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)?d:t.xmlMode||"utf8"!==t.encodeEntities?c.encodeXML:c.escapeAttribute;return Object.keys(e).map((function(r){var i,a,o=null!==(i=e[r])&&void 0!==i?i:"";return"foreign"===t.xmlMode&&(r=null!==(a=u.attributeNames.get(r))&&void 0!==a?a:r),t.emptyAttrs||t.xmlMode||""!==o?"".concat(r,'="').concat(n(o),'"'):r})).join(" ")}}(e.attribs,t);return a&&(i+=" ".concat(a)),0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&h.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=p(e.children,t)),!t.xmlMode&&h.has(e.name)||(i+=""))),i}(e,t);case s.Text:return function(e,t){var r,n=e.data||"";return!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)||!t.xmlMode&&e.parent&&l.has(e.parent.name)||(n=t.xmlMode||"utf8"!==t.encodeEntities?(0,c.encodeXML)(n):(0,c.escapeText)(n)),n}(e,t)}}t.render=p,t.default=p;var y=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),g=new Set(["svg","math"])},93338:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(r=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style},t.Root=r.Root,t.Text=r.Text,t.Directive=r.Directive,t.Comment=r.Comment,t.Script=r.Script,t.Style=r.Style,t.Tag=r.Tag,t.CDATA=r.CDATA,t.Doctype=r.Doctype},21138:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=r(93338),o=r(62888);i(r(62888),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function e(e,t,r){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(r=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=r?r:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var r=this.options.xmlMode?a.ElementType.Tag:void 0,n=new o.Element(e,t,void 0,r);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===a.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var r=new o.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new o.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new o.Text(""),t=new o.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var r=new o.ProcessingInstruction(e,t);this.addNode(r)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],r=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),r&&(e.prev=r,r.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=c,t.default=c},62888:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=h;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.CDATA,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(h);t.CDATA=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.Root,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(h);t.Document=f;var y=function(e){function t(t,r,n,i){void 0===n&&(n=[]),void 0===i&&(i="script"===t?o.ElementType.Script:"style"===t?o.ElementType.Style:o.ElementType.Tag);var a=e.call(this,n)||this;return a.name=t,a.attribs=r,a.type=i,a}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var r,n;return{name:t,value:e.attribs[t],namespace:null===(r=e["x-attribsNamespace"])||void 0===r?void 0:r[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}}))},enumerable:!1,configurable:!0}),t}(h);function g(e){return(0,o.isTag)(e)}function m(e){return e.type===o.ElementType.CDATA}function b(e){return e.type===o.ElementType.Text}function v(e){return e.type===o.ElementType.Comment}function _(e){return e.type===o.ElementType.Directive}function w(e){return e.type===o.ElementType.Root}function T(e,t){var r;if(void 0===t&&(t=!1),b(e))r=new u(e.data);else if(v(e))r=new l(e.data);else if(g(e)){var n=t?S(e.children):[],i=new y(e.name,a({},e.attribs),n);n.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),r=i}else if(m(e)){n=t?S(e.children):[];var o=new p(n);n.forEach((function(e){return e.parent=o})),r=o}else if(w(e)){n=t?S(e.children):[];var s=new f(n);n.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),r=s}else{if(!_(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new d(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),r=c}return r.startIndex=e.startIndex,r.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function S(e){for(var t=e.map((function(e){return T(e,!0)})),r=1;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeed=void 0;var n=r(68642),i=r(78052);t.getFeed=function(e){var t=c(d,e);return t?"feed"===t.name?function(e){var t,r=e.children,n={type:"atom",items:(0,i.getElementsByTagName)("entry",r).map((function(e){var t,r=e.children,n={media:s(r)};l(n,"id","id",r),l(n,"title","title",r);var i=null===(t=c("link",r))||void 0===t?void 0:t.attribs.href;i&&(n.link=i);var a=u("summary",r)||u("content",r);a&&(n.description=a);var o=u("updated",r);return o&&(n.pubDate=new Date(o)),n}))};l(n,"id","id",r),l(n,"title","title",r);var a=null===(t=c("link",r))||void 0===t?void 0:t.attribs.href;a&&(n.link=a),l(n,"description","subtitle",r);var o=u("updated",r);return o&&(n.updated=new Date(o)),l(n,"author","email",r,!0),n}(t):function(e){var t,r,n=null!==(r=null===(t=c("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==r?r:[],a={type:e.name.substr(0,3),id:"",items:(0,i.getElementsByTagName)("item",e.children).map((function(e){var t=e.children,r={media:s(t)};l(r,"id","guid",t),l(r,"title","title",t),l(r,"link","link",t),l(r,"description","description",t);var n=u("pubDate",t)||u("dc:date",t);return n&&(r.pubDate=new Date(n)),r}))};l(a,"title","title",n),l(a,"link","link",n),l(a,"description","description",n);var o=u("lastBuildDate",n);return o&&(a.updated=new Date(o)),l(a,"author","managingEditor",n,!0),a}(t):null};var a=["url","type","lang"],o=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function s(e){return(0,i.getElementsByTagName)("media:content",e).map((function(e){for(var t=e.attribs,r={medium:t.medium,isDefault:!!t.isDefault},n=0,i=a;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueSort=t.compareDocumentPosition=t.DocumentPosition=t.removeSubsets=void 0;var n,i=r(21138);function a(e,t){var r=[],a=[];if(e===t)return 0;for(var o=(0,i.hasChildren)(e)?e:e.parent;o;)r.unshift(o),o=o.parent;for(o=(0,i.hasChildren)(t)?t:t.parent;o;)a.unshift(o),o=o.parent;for(var s=Math.min(r.length,a.length),c=0;cl.indexOf(h)?u===t?n.FOLLOWING|n.CONTAINED_BY:n.FOLLOWING:u===e?n.PRECEDING|n.CONTAINS:n.PRECEDING}t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0)e.splice(t,1);else for(var n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e},function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"}(n=t.DocumentPosition||(t.DocumentPosition={})),t.compareDocumentPosition=a,t.uniqueSort=function(e){return(e=e.filter((function(e,t,r){return!r.includes(e,t+1)}))).sort((function(e,t){var r=a(e,t);return r&n.PRECEDING?-1:r&n.FOLLOWING?1:0})),e}},76403:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,i(r(68642),t),i(r(45517),t),i(r(46178),t),i(r(51467),t),i(r(78052),t),i(r(83698),t),i(r(91206),t);var a=r(21138);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return a.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return a.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return a.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return a.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return a.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return a.hasChildren}})},78052:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var n=r(21138),i=r(51467),a={tag_name:function(e){return"function"==typeof e?function(t){return(0,n.isTag)(t)&&e(t.name)}:"*"===e?n.isTag:function(t){return(0,n.isTag)(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return(0,n.isText)(t)&&e(t.data)}:function(t){return(0,n.isText)(t)&&t.data===e}}};function o(e,t){return"function"==typeof t?function(r){return(0,n.isTag)(r)&&t(r.attribs[e])}:function(r){return(0,n.isTag)(r)&&r.attribs[e]===t}}function s(e,t){return function(r){return e(r)||t(r)}}function c(e){var t=Object.keys(e).map((function(t){var r=e[t];return Object.prototype.hasOwnProperty.call(a,t)?a[t](r):o(t,r)}));return 0===t.length?null:t.reduce(s)}t.testElement=function(e,t){var r=c(e);return!r||r(t)},t.getElements=function(e,t,r,n){void 0===n&&(n=1/0);var a=c(e);return a?(0,i.filter)(a,t,r,n):[]},t.getElementById=function(e,t,r){return void 0===r&&(r=!0),Array.isArray(t)||(t=[t]),(0,i.findOne)(o("id",e),t,r)},t.getElementsByTagName=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(a.tag_name(e),t,r,n)},t.getElementsByTagType=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(a.tag_type(e),t,r,n)}},46178:(e,t)=>{"use strict";function r(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}Object.defineProperty(t,"__esModule",{value:!0}),t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0,t.removeElement=r,t.replaceElement=function(e,t){var r=t.prev=e.prev;r&&(r.next=t);var n=t.next=e.next;n&&(n.prev=t);var i=t.parent=e.parent;if(i){var a=i.children;a[a.lastIndexOf(e)]=t,e.parent=null}},t.appendChild=function(e,t){if(r(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null},t.append=function(e,t){r(t);var n=e.parent,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=n,i){if(i.prev=t,n){var a=n.children;a.splice(a.lastIndexOf(i),0,t)}}else n&&n.children.push(t)},t.prependChild=function(e,t){if(r(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var n=e.children[1];n.prev=t,t.next=n}else t.next=null},t.prepend=function(e,t){r(t);var n=e.parent;if(n){var i=n.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}},51467:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var n=r(21138);function i(e,t,r,i){for(var a=[],o=[t],s=[0];;)if(s[0]>=o[0].length){if(1===s.length)return a;o.shift(),s.shift()}else{var c=o[0][s[0]++];if(e(c)&&(a.push(c),--i<=0))return a;r&&(0,n.hasChildren)(c)&&c.children.length>0&&(s.unshift(0),o.unshift(c.children))}}t.filter=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),i(e,Array.isArray(t)?t:[t],r,n)},t.find=i,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,r,i){void 0===i&&(i=!0);for(var a=null,o=0;o0&&(a=e(t,s.children,!0)))}return a},t.existsOne=function e(t,r){return r.some((function(r){return(0,n.isTag)(r)&&(t(r)||e(t,r.children))}))},t.findAll=function(e,t){for(var r=[],i=[t],a=[0];;)if(a[0]>=i[0].length){if(1===i.length)return r;i.shift(),a.shift()}else{var o=i[0][a[0]++];(0,n.isTag)(o)&&(e(o)&&r.push(o),o.children.length>0&&(a.unshift(0),i.unshift(o.children)))}}},68642:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.innerText=t.textContent=t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var i=r(21138),a=n(r(5193)),o=r(93338);function s(e,t){return(0,a.default)(e,t)}t.getOuterHTML=s,t.getInnerHTML=function(e,t){return(0,i.hasChildren)(e)?e.children.map((function(e){return s(e,t)})).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.isTag)(t)?"br"===t.name?"\n":e(t.children):(0,i.isCDATA)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&!(0,i.isComment)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&(t.type===o.ElementType.Tag||(0,i.isCDATA)(t))?e(t.children):(0,i.isText)(t)?t.data:""}},45517:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var n=r(21138);function i(e){return(0,n.hasChildren)(e)?e.children:[]}function a(e){return e.parent||null}t.getChildren=i,t.getParent=a,t.getSiblings=function(e){var t=a(e);if(null!=t)return i(t);for(var r=[e],n=e.prev,o=e.next;null!=n;)r.unshift(n),n=n.prev;for(;null!=o;)r.push(o),o=o.next;return r},t.getAttributeValue=function(e,t){var r;return null===(r=e.attribs)||void 0===r?void 0:r[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!(0,n.isTag)(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!(0,n.isTag)(t);)t=t.prev;return t}},3379:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTMLAttribute=t.decodeHTML=t.determineBranch=t.EntityDecoder=t.DecodingMode=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var s=o(r(57346));t.htmlDecodeTree=s.default;var c=o(r(18622));t.xmlDecodeTree=c.default;var u=a(r(22809));t.decodeCodePoint=u.default;var l,d,h,p,f=r(22809);function y(e){return e>=l.ZERO&&e<=l.NINE}Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return f.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return f.fromCodePoint}}),function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(l||(l={})),function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(d=t.BinTrieFlags||(t.BinTrieFlags={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(h||(h={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(p=t.DecodingMode||(t.DecodingMode={}));var g=function(){function e(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=h.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=p.Strict}return e.prototype.startEntity=function(e){this.decodeMode=e,this.state=h.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},e.prototype.write=function(e,t){switch(this.state){case h.EntityStart:return e.charCodeAt(t)===l.NUM?(this.state=h.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=h.NamedEntity,this.stateNamedEntity(e,t));case h.NumericStart:return this.stateNumericStart(e,t);case h.NumericDecimal:return this.stateNumericDecimal(e,t);case h.NumericHex:return this.stateNumericHex(e,t);case h.NamedEntity:return this.stateNamedEntity(e,t)}},e.prototype.stateNumericStart=function(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===l.LOWER_X?(this.state=h.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=h.NumericDecimal,this.stateNumericDecimal(e,t))},e.prototype.addToNumericResult=function(e,t,r,n){if(t!==r){var i=r-t;this.result=this.result*Math.pow(n,i)+parseInt(e.substr(t,i),n),this.consumed+=i}},e.prototype.stateNumericHex=function(e,t){for(var r,n=t;t=l.UPPER_A&&r<=l.UPPER_F||r>=l.LOWER_A&&r<=l.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(i,3);t+=1}return this.addToNumericResult(e,n,t,16),-1},e.prototype.stateNumericDecimal=function(e,t){for(var r=t;t>14;t=l.UPPER_A&&e<=l.UPPER_Z||e>=l.LOWER_A&&e<=l.LOWER_Z||y(e)}(o)))?0:this.emitNotTerminatedNamedEntity();if(0!=(i=((n=r[this.treeIndex])&d.VALUE_LENGTH)>>14)){if(a===l.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==p.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}var o;return-1},e.prototype.emitNotTerminatedNamedEntity=function(){var e,t=this.result,r=(this.decodeTree[t]&d.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed},e.prototype.emitNamedEntityData=function(e,t,r){var n=this.decodeTree;return this.emitCodePoint(1===t?n[e]&~d.VALUE_LENGTH:n[e+1],r),3===t&&this.emitCodePoint(n[e+2],r),r},e.prototype.end=function(){var e;switch(this.state){case h.NamedEntity:return 0===this.result||this.decodeMode===p.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case h.NumericDecimal:return this.emitNumericEntity(0,2);case h.NumericHex:return this.emitNumericEntity(0,3);case h.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case h.EntityStart:return 0}},e}();function m(e){var t="",r=new g(e,(function(e){return t+=(0,u.fromCodePoint)(e)}));return function(e,n){for(var i=0,a=0;(a=e.indexOf("&",a))>=0;){t+=e.slice(i,a),r.startEntity(n);var o=r.write(e,a+1);if(o<0){i=a+r.end();break}i=a+o,a=0===o?i+1:i}var s=t+e.slice(i);return t="",s}}function b(e,t,r,n){var i=(t&d.BRANCH_LENGTH)>>7,a=t&d.JUMP_TABLE;if(0===i)return 0!==a&&n===a?r:-1;if(a){var o=n-a;return o<0||o>=i?-1:e[r+o]-1}for(var s=r,c=s+i-1;s<=c;){var u=s+c>>>1,l=e[u];if(ln))return e[u+i];c=u-1}}return-1}t.EntityDecoder=g,t.determineBranch=b;var v=m(s.default),_=m(c.default);t.decodeHTML=function(e,t){return void 0===t&&(t=p.Legacy),v(e,t)},t.decodeHTMLAttribute=function(e){return v(e,p.Attribute)},t.decodeHTMLStrict=function(e){return v(e,p.Strict)},t.decodeXML=function(e){return _(e,p.Strict)}},22809:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function i(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=n.get(e))&&void 0!==t?t:e}t.fromCodePoint=null!==(r=String.fromCodePoint)&&void 0!==r?r:function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+String.fromCharCode(e)},t.replaceCodePoint=i,t.default=function(e){return(0,t.fromCodePoint)(i(e))}},33231:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.encodeNonAsciiHTML=t.encodeHTML=void 0;var i=n(r(58635)),a=r(57078),o=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function s(e,t){for(var r,n="",o=0;null!==(r=e.exec(t));){var s=r.index;n+=t.substring(o,s);var c=t.charCodeAt(s),u=i.default.get(c);if("object"==typeof u){if(s+1{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.getCodePoint=t.xmlReplacer=void 0,t.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var r=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);function n(e){for(var n,i="",a=0;null!==(n=t.xmlReplacer.exec(e));){var o=n.index,s=e.charCodeAt(o),c=r.get(s);void 0!==c?(i+=e.substring(a,o)+c,a=o+1):(i+="".concat(e.substring(a,o),"&#x").concat((0,t.getCodePoint)(e,o).toString(16),";"),a=t.xmlReplacer.lastIndex+=Number(55296==(64512&s)))}return i+e.substr(a)}function i(e,t){return function(r){for(var n,i=0,a="";n=e.exec(r);)i!==n.index&&(a+=r.substring(i,n.index)),a+=t.get(n[0].charCodeAt(0)),i=n.index+1;return a+r.substring(i)}}t.getCodePoint=null!=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return 55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t)},t.encodeXML=n,t.escape=n,t.escapeUTF8=i(/[&<>'"]/g,r),t.escapeAttribute=i(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),t.escapeText=i(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))},57346:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function(e){return e.charCodeAt(0)})))},18622:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(e){return e.charCodeAt(0)})))},58635:(e,t)=>{"use strict";function r(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLAttribute=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.DecodingMode=t.EntityDecoder=t.encodeHTML5=t.encodeHTML4=t.encodeNonAsciiHTML=t.encodeHTML=t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.encode=t.decodeStrict=t.decode=t.EncodingMode=t.EntityLevel=void 0;var n,i,a=r(3379),o=r(33231),s=r(57078);function c(e,t){if(void 0===t&&(t=n.XML),("number"==typeof t?t:t.level)===n.HTML){var r="object"==typeof t?t.mode:void 0;return(0,a.decodeHTML)(e,r)}return(0,a.decodeXML)(e)}!function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"}(n=t.EntityLevel||(t.EntityLevel={})),function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"}(i=t.EncodingMode||(t.EncodingMode={})),t.decode=c,t.decodeStrict=function(e,t){var r;void 0===t&&(t=n.XML);var i="number"==typeof t?{level:t}:t;return null!==(r=i.mode)&&void 0!==r||(i.mode=a.DecodingMode.Strict),c(e,i)},t.encode=function(e,t){void 0===t&&(t=n.XML);var r="number"==typeof t?{level:t}:t;return r.mode===i.UTF8?(0,s.escapeUTF8)(e):r.mode===i.Attribute?(0,s.escapeAttribute)(e):r.mode===i.Text?(0,s.escapeText)(e):r.level===n.HTML?r.mode===i.ASCII?(0,o.encodeNonAsciiHTML)(e):(0,o.encodeHTML)(e):(0,s.encodeXML)(e)};var u=r(57078);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return u.encodeXML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return u.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return u.escapeUTF8}}),Object.defineProperty(t,"escapeAttribute",{enumerable:!0,get:function(){return u.escapeAttribute}}),Object.defineProperty(t,"escapeText",{enumerable:!0,get:function(){return u.escapeText}});var l=r(33231);Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return l.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return l.encodeNonAsciiHTML}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return l.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return l.encodeHTML}});var d=r(3379);Object.defineProperty(t,"EntityDecoder",{enumerable:!0,get:function(){return d.EntityDecoder}}),Object.defineProperty(t,"DecodingMode",{enumerable:!0,get:function(){return d.DecodingMode}}),Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return d.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return d.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return d.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTMLAttribute",{enumerable:!0,get:function(){return d.decodeHTMLAttribute}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return d.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return d.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return d.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return d.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return d.decodeXML}})},35033:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promisifyEventEmitter=void 0,t.promisifyEventEmitter=function(e,t){return new Promise(((r,n)=>{e.on("end",(()=>r(t))),e.on("error",n)}))}},50046:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,a),n(r)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}y(e,t,a,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&y(e,"error",t,{once:!0})}(e,i)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,a,o,u;if(s(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),void 0===o)o=a[t]=r,++e._eventsCount;else if("function"==typeof o?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var c=a[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var u=c.length,l=f(c,u);for(r=0;r=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},53933:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;for(i of t.entries())if(!e(i[1],r.get(i[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(t[i]!==r[i])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(a=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;0!=i--;){var o=a[i];if(!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r}},74190:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(92681),t)},92681:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SparqlEndpointFetcher=void 0,r(45766);const n=r(55403),i=r(21451),a=r(52666),o=r(76574),s=r(52267),c=r(72243),u=r(76605);class l{constructor(e){e=e||{},this.method=e.method||"POST",this.additionalUrlParams=e.additionalUrlParams||new URLSearchParams,this.defaultHeaders=e.defaultHeaders||new Headers,this.fetchCb=e.fetch,this.sparqlJsonParser=new i.SparqlJsonParser(e),this.sparqlXmlParser=new a.SparqlXmlParser(e),this.sparqlParsers={[l.CONTENTTYPE_SPARQL_JSON]:{parseBooleanStream:e=>this.sparqlJsonParser.parseJsonBooleanStream(e),parseResultsStream:e=>this.sparqlJsonParser.parseJsonResultsStream(e)},[l.CONTENTTYPE_SPARQL_XML]:{parseBooleanStream:e=>this.sparqlXmlParser.parseXmlBooleanStream(e),parseResultsStream:e=>this.sparqlXmlParser.parseXmlResultsStream(e)}},this.timeout=e.timeout}getQueryType(e){const t=new n.Parser({sparqlStar:!0}).parse(e);return"query"===t.type?"DESCRIBE"===t.queryType?"CONSTRUCT":t.queryType:"UNKNOWN"}getUpdateTypes(e){const t=new n.Parser({sparqlStar:!0}).parse(e);if("update"===t.type){const e={};for(const r of t.updates)"type"in r?e[r.type]=!0:e[r.updateType]=!0;return e}return"UNKNOWN"}async fetchBindings(e,t){const[r,n]=await this.fetchRawStream(e,t,l.CONTENTTYPE_SPARQL),i=this.sparqlParsers[r];if(!i)throw new Error("Unknown SPARQL results content type: "+r);return i.parseResultsStream(n)}async fetchAsk(e,t){const[r,n]=await this.fetchRawStream(e,t,l.CONTENTTYPE_SPARQL),i=this.sparqlParsers[r];if(!i)throw new Error("Unknown SPARQL results content type: "+r);return i.parseBooleanStream(n)}async fetchTriples(e,t){return(await this.fetchRawStream(e,t,l.CONTENTTYPE_TURTLE))[1].pipe(new c.StreamParser({format:l.CONTENTTYPE_TURTLE}))}async fetchUpdate(e,t){const n=new(globalThis.AbortController||await Promise.resolve().then((()=>r(67083)))),i={};this.defaultHeaders.forEach(((e,t)=>{i[t]=e}));const a={method:"POST",headers:Object.assign(Object.assign({},i),{"content-type":"application/sparql-update"}),body:t,signal:n.signal};await this.handleFetchCall(e,a,{ignoreBody:!0}),n.abort()}async fetchRawStream(e,t,r){let n="POST"===this.method?e:e+"?query="+encodeURIComponent(t);const i=new Headers(this.defaultHeaders);let a;return i.append("Accept",r),"POST"===this.method?(i.append("Content-Type","application/x-www-form-urlencoded"),a=new URLSearchParams,a.set("query",t),this.additionalUrlParams.forEach(((e,t)=>{a.set(t,e)})),i.append("Content-Length",a.toString().length.toString())):""!==this.additionalUrlParams.toString()&&(n+=`&${this.additionalUrlParams.toString()}`),this.handleFetchCall(n,{headers:i,method:this.method,body:a})}async handleFetchCall(e,t,r={}){let n;if(this.timeout){const e=new AbortController;t.signal=e.signal,n=setTimeout((()=>e.abort()),this.timeout)}const i=await(this.fetchCb||fetch)(e,t);let a;clearTimeout(n),r.ignoreBody||(a=u(i.body)?i.body:new s.ReadableWebToNodeStream(i.body));let c=i.headers.get("Content-Type")||"";if(c.indexOf(";")>0&&(c=c.substr(0,c.indexOf(";"))),!i.ok){const t=/^[^?]*/u.exec(e)[0];let r="empty response";throw a&&(r=await o(a)),new Error(`Invalid SPARQL endpoint response from ${t} (HTTP status ${i.status}):\n${r}`)}return[c,a]}}l.CONTENTTYPE_SPARQL_JSON="application/sparql-results+json",l.CONTENTTYPE_SPARQL_XML="application/sparql-results+xml",l.CONTENTTYPE_SPARQL=`${l.CONTENTTYPE_SPARQL_JSON};q=1.0,${l.CONTENTTYPE_SPARQL_XML};q=0.7`,l.CONTENTTYPE_TURTLE="text/turtle",t.SparqlEndpointFetcher=l},45766:function(){!function(e){!function(t){var r="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in e,o="ArrayBuffer"in e;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=f(t);return t.readAsArrayBuffer(e),r}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,r,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var T=[301,302,303,307,308];w.redirect=function(e,t){if(-1===T.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,r){return new Promise((function(n,a){var o=new v(e,r);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new w(i,r))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=h,e.Request=v,e.Response=w),t.Headers=h,t.Request=v,t.Response=w,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:this)},1427:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(51812),t),i(r(26339),t),i(r(17762),t),i(r(12856),t),i(r(45147),t)},26339:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Converter=void 0;const i=r(44330),a=r(51812),o=r(96414),s=r(17762),c=r(45147);class u{constructor(e){(e=e||{}).variableDelimiter=e.variableDelimiter||"_",e.expressionVariableCounter=e.expressionVariableCounter||0,this.util=new c.Util(e),this.initializeNodeHandlers(e)}static registerNodeHandlers(e,t){e.registerNodeHandler(new a.NodeHandlerDocument(e,t)),e.registerNodeHandler(new a.NodeHandlerDefinitionOperation(e,t)),e.registerNodeHandler(new a.NodeHandlerDefinitionFragment(e,t)),e.registerNodeHandler(new a.NodeHandlerSelectionFragmentSpread(e,t)),e.registerNodeHandler(new a.NodeHandlerSelectionInlineFragment(e,t)),e.registerNodeHandler(new a.NodeHandlerSelectionField(e,t))}static registerNodeValueHandlers(e,t){e.registerNodeValueHandler(new a.NodeValueHandlerVariable(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerInt(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerFloat(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerString(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerBoolean(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerNull(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerEnum(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerList(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerObject(e,t))}static registerDirectiveNodeHandlers(e,t){e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerInclude(e,t)),e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerOptional(e,t)),e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerPlural(e,t)),e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerSingle(e,t)),e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerSkip(e,t))}graphqlToSparqlAlgebra(e,t,r){return n(this,void 0,void 0,(function*(){return this.graphqlToSparqlAlgebraRawContext(e,yield this.util.contextParser.parse(t),r)}))}graphqlToSparqlAlgebraRawContext(e,t,r){r=r||{};const n="string"==typeof e?(0,i.parse)(e):e,a={context:t,fragmentDefinitions:this.indexFragments(n),graph:this.util.dataFactory.defaultGraph(),path:[],singularizeState:s.SingularizeState.PLURAL,singularizeVariables:r.singularizeVariables||{},subject:null,terminalVariables:[],variablesDict:r.variablesDict||{},variablesMetaDict:{}};return this.util.handleNode(n,a)}indexFragments(e){const t={},r=[];for(const n of e.definitions)"FragmentDefinition"===n.kind?t[n.name.value]=n:r.push(n);return e.definitions=r,t}initializeNodeHandlers(e){u.registerNodeHandlers(this.util,e),u.registerNodeValueHandlers(this.util,e),u.registerDirectiveNodeHandlers(this.util,e)}}t.Converter=u},17762:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SingularizeState=void 0,(r=t.SingularizeState||(t.SingularizeState={}))[r.SINGLE=0]="SINGLE",r[r.PLURAL=1]="PLURAL"},12856:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},45147:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(18050),i=r(27202),a=r(31578);t.Util=class{constructor(e){this.nodeHandlers={},this.nodeValueHandlers={},this.directiveNodeHandlers={},this.settings=e,this.dataFactory=e.dataFactory||new n.DataFactory,this.operationFactory=new a.Factory(this.dataFactory),this.contextParser=new i.ContextParser}registerNodeHandler(e){this.nodeHandlers[e.targetKind]=e}registerNodeValueHandler(e){this.nodeValueHandlers[e.targetKind]=e}registerDirectiveNodeHandler(e){this.directiveNodeHandlers[e.targetKind]=e}handleNode(e,t){const r=this.nodeHandlers[e.kind];if(!r)throw new Error(`Unsupported GraphQL node '${e.kind}'`);return r.handle(e,t)}handleNodeValue(e,t,r){const n=this.nodeValueHandlers[e.kind];if(!n)throw new Error(`Unsupported GraphQL value node '${e.kind}'`);return n.handle(e,t,r)}handleDirectiveNode(e,t){const r=this.directiveNodeHandlers[e.directive.name.value];return r?r.handle(e,t):null}joinOperations(e){if(1===e.length)return e[0];const t=[],r=[];for(const n of e)"bgp"===n.type?t.push(n):r.push(n);if(t.length===e.length)return this.joinOperationsAsBgp(t);if(t.length===e.length-1&&"leftjoin"===r[0].type&&"bgp"===r[0].input[0].type){const e=r[0];return t.push(e.input[0]),this.operationFactory.createLeftJoin(this.joinOperationsAsBgp(t),e.input[1])}return r.length===e.length?this.joinOperationsAsNestedJoin(r):this.joinOperationsAsNestedJoin([this.joinOperationsAsBgp(t),this.joinOperationsAsNestedJoin(r)])}joinOperationsAsBgp(e){return this.operationFactory.createBgp([].concat.apply([],e.map((e=>e.patterns))))}joinOperationsAsNestedJoin(e){return this.operationFactory.createJoin(e)}appendFieldToPath(e,t){return e.concat([t])}getFieldLabel(e){return(e.alias?e.alias:e.name).value}nameToVariable(e,t){return this.dataFactory.variable((t.path.length?t.path.join(this.settings.variableDelimiter)+this.settings.variableDelimiter:"")+e)}valueToNamedNode(e,t){const r=t.expandTerm(e,!0);if(this.settings.requireContext&&!r)throw new Error("No context entry was found for "+e);return this.dataFactory.namedNode(r||e)}getArgument(e,t){if(e)for(const r of e)if(r.name.value===t)return r}newTypePattern(e,t,r){return this.operationFactory.createPattern(e,this.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),this.valueToNamedNode(t.name.value,r.context),r.graph)}createQuadPattern(e,t,r,n,i){const a=this.valueToNamedNode(t.value,i);return i&&i.getContextRaw()[t.value]&&i.getContextRaw()[t.value]["@reverse"]?this.operationFactory.createPattern(r,a,e,n):this.operationFactory.createPattern(e,a,r,n)}createQuadPath(e,t,r,n,i,a){const o=this.valueToNamedNode(t.value,a);let s=this.operationFactory.createLink(o);for(const e of r.values){if("EnumValue"!==e.kind)throw new Error("Invalid value type for 'alt' argument, must be EnumValue, but got "+e.kind);s=this.operationFactory.createAlt([s,this.operationFactory.createLink(this.valueToNamedNode(e.value,a))])}return a&&a.getContextRaw()[t.value]&&a.getContextRaw()[t.value]["@reverse"]?this.operationFactory.createPath(n,s,e,i):this.operationFactory.createPath(e,s,n,i)}}},14009:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerAdapter=void 0,t.NodeHandlerAdapter=class{constructor(e,t,r){this.targetKind=e,this.util=t,this.settings=r}getNodeQuadContextSelectionSet(e,t,r){const n={};if(e)for(const t of e.selections)if("Field"===t.kind){const e=t;this.handleNodeQuadContextField(e,r,n,"id","subject"),this.handleNodeQuadContextField(e,r,n,"graph","graph")}return n}handleNodeQuadContextField(e,t,r,n,i){if(!r[i]&&e.name.value===n){if(!r[i]){const a=this.util.getArgument(e.arguments,"_");if(a){const o=this.util.handleNodeValue(a.value,e.name.value,t);if(1!==o.terms.length)throw new Error(`Only single values can be set as ${n}, but got ${o.terms.length} at ${e.name.value}`);r[i]=o.terms[0],o.auxiliaryPatterns&&(r.auxiliaryPatterns||(r.auxiliaryPatterns=[]),r.auxiliaryPatterns.concat(o.auxiliaryPatterns))}}if(!r[i]){const n=this.util.nameToVariable(this.util.getFieldLabel(e),t);t.terminalVariables.push(n),r[i]=n}}}getDirectiveOutputs(e,t,r){const n=[];if(e)for(const i of e){const e=this.util.handleDirectiveNode({directive:i,fieldLabel:t},r);if(e){if(e.ignore)return null;n.push(e)}}return n}handleDirectiveOutputs(e,t){for(const r of e){if(r.ignore)return this.util.operationFactory.createBgp([]);r.operationOverrider&&(t=r.operationOverrider(t))}return t}}},94058:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerDefinitionAdapter=void 0;const n=r(14009);class i extends n.NodeHandlerAdapter{constructor(e,t,r){super(e,t,r)}}t.NodeHandlerDefinitionAdapter=i},73045:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerDefinitionFragment=void 0;const n=r(94058);class i extends n.NodeHandlerDefinitionAdapter{constructor(e,t){super("FragmentDefinition",e,t)}handle(e,t){throw new Error("Illegal state: fragment definitions must be indexed and removed before processing")}}t.NodeHandlerDefinitionFragment=i},9540:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerDefinitionOperation=void 0;const n=r(94058);class i extends n.NodeHandlerDefinitionAdapter{constructor(e,t){super("OperationDefinition",e,t)}handle(e,t){if("query"!==e.operation)throw new Error("Unsupported definition operation: "+e.operation);if(e.variableDefinitions)for(const r of e.variableDefinitions){const e=r.variable.name.value;r.defaultValue&&(t.variablesDict[e]||(t.variablesDict[e]=r.defaultValue));let n=r.type;const i="NonNullType"===n.kind;i&&(n=n.type);const a="ListType"===n.kind;a&&(n=n.type);const o=n.name.value;t.variablesMetaDict[e]={mandatory:i,list:a,type:o}}const r=this.getDirectiveOutputs(e.directives,e.name?e.name.value:"",t);if(!r)return this.util.operationFactory.createBgp([]);const n=this.util.joinOperations(e.selectionSet.selections.map((e=>this.util.handleNode(e,t))));return this.handleDirectiveOutputs(r,n)}}t.NodeHandlerDefinitionOperation=i},9373:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerDocument=void 0;const n=r(31578),i=r(14009);class a extends i.NodeHandlerAdapter{constructor(e,t){super("Document",e,t)}handle(e,t){const r=e.definitions.map((e=>{const r=this.getNodeQuadContextDefinitionNode(e,Object.assign(Object.assign({},t),{ignoreUnknownVariables:!0})),n=Object.assign(Object.assign({},t),{graph:r.graph||t.graph,subject:r.subject||this.util.dataFactory.blankNode()});let i=this.util.handleNode(e,n);return r&&r.auxiliaryPatterns&&(i=this.util.joinOperations([i,this.util.operationFactory.createBgp(r.auxiliaryPatterns)])),i})),n=this.util.operationFactory.createProject(1===r.length?r[0]:this.util.operationFactory.createUnion(r),t.terminalVariables);return this.translateBlankNodesToVariables(n)}getNodeQuadContextDefinitionNode(e,t){if("OperationDefinition"===e.kind)return this.getNodeQuadContextSelectionSet(e.selectionSet,e.name?e.name.value:"",t);throw new Error(`Unsupported definition: ${e.kind}`)}translateBlankNodesToVariables(e){const t=this,r={},i=Array.from(e.variables).reduce(((e,t)=>(e[t.value]=!0,e)),{});return n.Util.mapOperation(e,{path:(e,t)=>({recurse:!1,result:t.createPath(a(e.subject),e.predicate,a(e.object),a(e.graph))}),pattern:(e,t)=>({recurse:!1,result:t.createPattern(a(e.subject),a(e.predicate),a(e.object),a(e.graph))})});function a(e){if("BlankNode"===e.termType){let a=r[e.value];return a||(a=n.Util.createUniqueVariable(e.value,i,t.util.dataFactory),i[a.value]=!0,r[e.value]=a),a}return e}}}t.NodeHandlerDocument=a},97285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerSelectionAdapter=void 0;const n=r(31578),i=r(17762),a=r(14009);class o extends a.NodeHandlerAdapter{constructor(e,t,r){super(e,t,r)}getNodeQuadContextFieldNode(e,t,r){return this.getNodeQuadContextSelectionSet(e.selectionSet,t,Object.assign(Object.assign({},r),{path:this.util.appendFieldToPath(r.path,t)}))}fieldToOperation(e,t,r,a){const o=r;let s,c=0;if(("id"===t.name.value||"graph"===t.name.value)&&(r=!1,t.arguments))for(const r of t.arguments)"_"===r.name.value&&this.util.handleNodeValue(r.value,t.name.value,e);const u=this.util.getFieldLabel(t);if(e.singularizeState===i.SingularizeState.SINGLE&&(e.singularizeVariables[this.util.nameToVariable(u,e).value]=!0),r){const t=this.handleMetaField(e,u,a);if(t)return t}const l=a?[this.util.operationFactory.createBgp(a)]:[],d=this.getNodeQuadContextFieldNode(t,u,e);let h=d.subject||this.util.nameToVariable(u,e),p=d.graph||e.graph;d.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(d.auxiliaryPatterns));let f=!0,y=null;if(r&&t.arguments&&t.arguments.length)for(const n of t.arguments){if("_"===n.name.value){const i=this.util.handleNodeValue(n.value,t.name.value,e);y=i.terms,l.push(this.util.operationFactory.createBgp(i.terms.map((r=>this.util.createQuadPattern(e.subject,t.name,r,e.graph,e.context))))),i.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(i.auxiliaryPatterns)),r=!1;break}if("graph"===n.name.value){const r=this.util.handleNodeValue(n.value,t.name.value,e);if(1!==r.terms.length)throw new Error(`Only single values can be set as graph, but got ${r.terms.length} at ${t.name.value}`);p=r.terms[0],e=Object.assign(Object.assign({},e),{graph:p}),r.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(r.auxiliaryPatterns));break}if("alt"===n.name.value){let r=n.value;"ListValue"!==r.kind&&(r={kind:"ListValue",values:[r]}),l.push(this.util.createQuadPath(e.subject,t.name,r,h,e.graph,e.context)),f=!1;break}}if(r&&f&&l.push(this.util.operationFactory.createBgp([this.util.createQuadPattern(e.subject,t.name,h,e.graph,e.context)])),t.arguments&&t.arguments.length)for(const r of t.arguments)if("_"===r.name.value||"graph"===r.name.value||"alt"===r.name.value);else if("first"===r.name.value){if("IntValue"!==r.value.kind)throw new Error("Invalid value type for 'first' argument: "+r.value.kind);s=parseInt(r.value.value,10)}else if("offset"===r.name.value){if("IntValue"!==r.value.kind)throw new Error("Invalid value type for 'offset' argument: "+r.value.kind);c=parseInt(r.value.value,10)}else{const t=this.util.handleNodeValue(r.value,r.name.value,e);l.push(this.util.operationFactory.createBgp(t.terms.map((t=>this.util.createQuadPattern(h,r.name,t,e.graph,e.context))))),t.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(t.auxiliaryPatterns))}const g=this.getDirectiveOutputs(t.directives,u,e);if(!g)return this.util.operationFactory.createBgp([]);let m=this.util.joinOperations(l);if(t.selectionSet&&t.selectionSet.selections.length){if(y){if(1!==y.length)throw new Error(`Only single values can be set as id, but got ${y.length} at ${t.name.value}`);h=y[0]}const r=Object.assign(Object.assign(Object.assign({},e),o?{path:this.util.appendFieldToPath(e.path,u)}:{}),{graph:p,subject:o?h:e.subject});let n=!1;const i=t.selectionSet.selections.filter((e=>"Field"!==e.kind||"totalCount"!==e.name.value||(n=!0,!1)));let a=this.util.joinOperations(l.concat(i.map((e=>this.util.handleNode(e,r)))));if(n){const t=this.util.dataFactory.variable("var"+this.settings.expressionVariableCounter++),r=this.util.dataFactory.variable(h.value+this.settings.variableDelimiter+"totalCount"),n=this.util.operationFactory.createBoundAggregate(t,"count",this.util.operationFactory.createTermExpression(h),!1),o=this.util.operationFactory.createProject(this.util.operationFactory.createExtend(this.util.operationFactory.createGroup(m,[],[n]),r,this.util.operationFactory.createTermExpression(t)),[r]);e.terminalVariables.push(r),a=i.length?this.util.operationFactory.createJoin([this.util.operationFactory.createProject(a,[]),o]):o}m=a}else r&&"Variable"===h.termType&&e.terminalVariables.push(h);return(c||s)&&(m=this.util.operationFactory.createSlice(this.util.operationFactory.createProject(m,n.Util.inScopeVariables(m)),c,s)),this.handleDirectiveOutputs(g,m)}handleMetaField(e,t,r){if("__typename"===t){const n=this.util.nameToVariable(t,e);return e.terminalVariables.push(n),this.util.operationFactory.createBgp([this.util.operationFactory.createPattern(e.subject,this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),this.util.nameToVariable(t,e),e.graph)].concat(r||[]))}}}t.NodeHandlerSelectionAdapter=o},15790:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerSelectionField=void 0;const n=r(97285);class i extends n.NodeHandlerSelectionAdapter{constructor(e,t){super("Field",e,t)}handle(e,t){return this.fieldToOperation(t,e,!0)}}t.NodeHandlerSelectionField=i},39555:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerSelectionFragmentSpread=void 0;const n=r(97285);class i extends n.NodeHandlerSelectionAdapter{constructor(e,t){super("FragmentSpread",e,t)}handle(e,t){const r=t.fragmentDefinitions[e.name.value];if(!r)throw new Error("Undefined fragment definition: "+e.name.value);const n={alias:void 0,arguments:void 0,directives:r.directives,kind:"Field",name:e.name,selectionSet:r.selectionSet},i=[this.util.newTypePattern(t.subject,r.typeCondition,t)];return this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),this.fieldToOperation(t,n,!1,i))}}t.NodeHandlerSelectionFragmentSpread=i},89509:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerSelectionInlineFragment=void 0;const n=r(97285);class i extends n.NodeHandlerSelectionAdapter{constructor(e,t){super("InlineFragment",e,t)}handle(e,t){const r={alias:void 0,arguments:void 0,directives:e.directives,kind:"Field",name:{kind:"Name",value:t.subject.value},selectionSet:e.selectionSet},n=e.typeCondition?[this.util.newTypePattern(t.subject,e.typeCondition,t)]:[];return this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),this.fieldToOperation(t,r,!1,n))}}t.NodeHandlerSelectionInlineFragment=i},62096:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerAdapter=void 0,t.DirectiveNodeHandlerAdapter=class{constructor(e,t,r){this.targetKind=e,this.util=t,this.settings=r}getDirectiveConditionalValue(e,t){const r=this.util.getArgument(e.arguments,"if");if(!r)throw new Error(`The directive ${e.name.value} is missing an if-argument.`);const n=this.util.handleNodeValue(r.value,r.name.value,t);if(1!==n.terms.length)throw new Error(`Can not apply the directive ${e.name.value} with a list.`);return n.terms[0]}isDirectiveScopeAll(e){const t=this.util.getArgument(e.arguments,"scope");return t&&"EnumValue"===t.value.kind&&"all"===t.value.value}}},5095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerInclude=void 0;const n=r(62096);class i extends n.DirectiveNodeHandlerAdapter{constructor(e,t){super("include",e,t)}handle(e,t){const r=this.getDirectiveConditionalValue(e.directive,t);return"Literal"===r.termType&&"false"===r.value?{ignore:!0}:{}}}t.DirectiveNodeHandlerInclude=i},61151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerOptional=void 0;const n=r(62096);class i extends n.DirectiveNodeHandlerAdapter{constructor(e,t){super("optional",e,t)}handle(e,t){return{operationOverrider:e=>this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),e)}}}t.DirectiveNodeHandlerOptional=i},11013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerPlural=void 0;const n=r(17762),i=r(62096);class a extends i.DirectiveNodeHandlerAdapter{constructor(e,t){super("plural",e,t)}handle(e,t){return this.isDirectiveScopeAll(e.directive)&&(t.singularizeState=n.SingularizeState.PLURAL),delete t.singularizeVariables[this.util.nameToVariable(e.fieldLabel,t).value],{}}}t.DirectiveNodeHandlerPlural=a},60479:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerSingle=void 0;const n=r(17762),i=r(62096);class a extends i.DirectiveNodeHandlerAdapter{constructor(e,t){super("single",e,t)}handle(e,t){return this.isDirectiveScopeAll(e.directive)&&(t.singularizeState=n.SingularizeState.SINGLE),t.singularizeVariables[this.util.nameToVariable(e.fieldLabel,t).value]=!0,{}}}t.DirectiveNodeHandlerSingle=a},88320:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerSkip=void 0;const n=r(62096);class i extends n.DirectiveNodeHandlerAdapter{constructor(e,t){super("skip",e,t)}handle(e,t){const r=this.getDirectiveConditionalValue(e.directive,t);return"Literal"===r.termType&&"true"===r.value?{ignore:!0}:{}}}t.DirectiveNodeHandlerSkip=i},96414:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(62096),t),i(r(5095),t),i(r(61151),t),i(r(11013),t),i(r(60479),t),i(r(88320),t)},51812:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(96414),t),i(r(31998),t),i(r(14009),t),i(r(94058),t),i(r(73045),t),i(r(9540),t),i(r(9373),t),i(r(97285),t),i(r(15790),t),i(r(39555),t),i(r(89509),t)},81652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerAdapter=void 0,t.NodeValueHandlerAdapter=class{constructor(e,t,r){this.targetKind=e,this.util=t,this.settings=r}}},95347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerBoolean=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("BooleanValue",e,t),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#boolean")}handle(e,t,r){return{terms:[this.util.dataFactory.literal(e.value?"true":"false",this.datatype)]}}}t.NodeValueHandlerBoolean=i},87822:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerEnum=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("EnumValue",e,t)}handle(e,t,r){return{terms:[this.util.valueToNamedNode(e.value,r.context)]}}}t.NodeValueHandlerEnum=i},5797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerFloat=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("FloatValue",e,t),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#float")}handle(e,t,r){return{terms:[this.util.dataFactory.literal(e.value,this.datatype)]}}}t.NodeValueHandlerFloat=i},18338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerInt=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("IntValue",e,t),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#integer")}handle(e,t,r){return{terms:[this.util.dataFactory.literal(e.value,this.datatype)]}}}t.NodeValueHandlerInt=i},70727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerList=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("ListValue",e,t),this.nodeFirst=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),this.nodeRest=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),this.nodeNil=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil")}handle(e,t,r){const n=[];let i=[];for(const a of e.values){const e=this.util.handleNodeValue(a,t,r);for(const t of e.terms)n.push(t);e.auxiliaryPatterns&&(i=i.concat(e.auxiliaryPatterns))}if(this.settings.arraysToRdfLists){const e=this.util.dataFactory.blankNode();let t=e,a=n.length;for(const e of n){i.push(this.util.operationFactory.createPattern(t,this.nodeFirst,e,r.graph));const n=0==--a?this.nodeNil:this.util.dataFactory.blankNode();i.push(this.util.operationFactory.createPattern(t,this.nodeRest,n,r.graph)),t=n}return{terms:[e],auxiliaryPatterns:i}}return{terms:n,auxiliaryPatterns:i}}}t.NodeValueHandlerList=i},13294:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerNull=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("NullValue",e,t),this.nil=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil")}handle(e,t,r){return{terms:[this.nil]}}}t.NodeValueHandlerNull=i},41756:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerObject=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("ObjectValue",e,t)}handle(e,t,r){const n=this.util.dataFactory.blankNode();let i=[];for(const a of e.fields){const e=this.util.handleNodeValue(a.value,t,r);for(const t of e.terms)i.push(this.util.createQuadPattern(n,a.name,t,r.graph,r.context));e.auxiliaryPatterns&&(i=i.concat(e.auxiliaryPatterns))}return{terms:[n],auxiliaryPatterns:i}}}t.NodeValueHandlerObject=i},26906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerString=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("StringValue",e,t)}handle(e,t,r){const n=r.context.getContextRaw()[t];let i,a;return n&&"string"!=typeof n&&(n["@language"]?i=n["@language"]:n["@type"]&&(a=this.util.dataFactory.namedNode(n["@type"]))),{terms:[this.util.dataFactory.literal(e.value,i||a)]}}}t.NodeValueHandlerString=i},47959:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerVariable=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("Variable",e,t)}handle(e,t,r){const n=e.name.value,i=r.variablesDict[n],a=r.variablesMetaDict[n];if(!i){if(r.ignoreUnknownVariables||a&&!a.mandatory){const e=this.util.dataFactory.variable(n);return r.terminalVariables.map((e=>e.value)).indexOf(n)<0&&r.terminalVariables.push(e),{terms:[e]}}throw new Error(`Undefined variable: ${n}`)}if("Variable"===i.kind)throw new Error(`Variable refers to another variable: ${n}`);if(a)if(a.list){if("ListValue"!==i.kind)throw new Error(`Expected a list, but got ${i.kind} for ${n}`);if(a.type){const e=i;for(const t of e.values)if(t.kind!==a.type)throw new Error(`Expected ${a.type}, but got ${t.kind} for ${n}`)}}else a.type;return this.util.handleNodeValue(i,t,r)}}t.NodeValueHandlerVariable=i},31998:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(81652),t),i(r(95347),t),i(r(87822),t),i(r(5797),t),i(r(18338),t),i(r(70727),t),i(r(13294),t),i(r(41756),t),i(r(26906),t),i(r(47959),t)},44897:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.printError=w,t.GraphQLError=void 0;var i,a=(i=r(78582))&&i.__esModule?i:{default:i},o=r(28189),s=r(4251),c=r(90354);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t){for(var r=0;r0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=o&&o.stack?(Object.defineProperty(p(b),"stack",{value:o.stack,writable:!0,configurable:!0}),h(b)):(Error.captureStackTrace?Error.captureStackTrace(p(b),f):Object.defineProperty(p(b),"stack",{value:Error().stack,writable:!0,configurable:!0}),b)}return n=f,(i=[{key:"toString",value:function(){return w(this)}},{key:o.SYMBOL_TO_STRING_TAG,get:function(){return"Object"}}])&&d(n.prototype,i),f}(f(Error));function _(e){return void 0===e||0===e.length?void 0:e}function w(e){var t=e.message;if(e.nodes)for(var r=0,n=e.nodes;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.syntaxError=function(e,t,r){return new n.GraphQLError("Syntax Error: ".concat(r),void 0,e,[t])};var n=r(44897)},44077:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.prototype.toJSON;"function"==typeof t||(0,n.default)(0),e.prototype.inspect=t,i.default&&(e.prototype[i.default]=t)};var n=a(r(81880)),i=a(r(37020));function a(e){return e&&e.__esModule?e:{default:e}}},65269:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(t)}},23216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return c(e,[])};var n,i=(n=r(37020))&&n.__esModule?n:{default:n};function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var o=10,s=2;function c(e,t){switch(a(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var r=[].concat(t,[e]),n=function(e){var t=e[String(i.default)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==n){var a=n.call(e);if(a!==e)return"string"==typeof a?a:c(a,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>s)return"[Array]";for(var r=Math.min(o,e.length),n=e.length-r,i=[],a=0;a1&&i.push("... ".concat(n," more items")),"["+i.join(", ")+"]"}(e,r);return function(e,t){var r=Object.keys(e);return 0===r.length?"{}":t.length>s?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var r=e.constructor.name;if("string"==typeof r&&""!==r)return r}return t}(e)+"]":"{ "+r.map((function(r){return r+": "+c(e[r],t)})).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}},83588:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,(n=r(23216))&&n.__esModule;t.default=function(e,t){return e instanceof t}},81880:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}},78582:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"object"==r(e)&&null!==e}},37020:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=r},93378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNode=function(e){return null!=e&&"string"==typeof e.kind},t.Token=t.Location=void 0;var n,i=(n=r(44077))&&n.__esModule?n:{default:n},a=function(){function e(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();t.Location=a,(0,i.default)(a);var o=function(){function e(e,t,r,n,i,a,o){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=o,this.prev=a,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();t.Token=o,(0,i.default)(o)},4758:(e,t)=>{"use strict";function r(e){for(var t=0;to&&r(t[s-1]);)--s;return t.slice(o,s).join("\n")},t.getBlockStringIndentation=n,t.printBlockString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],a='"'===e[e.length-1],o="\\"===e[e.length-1],s=!n||a||o||r,c="";return!s||n&&i||(c+="\n"+t),c+=t?e.replace(/\n/g,"\n"+t):e,s&&(c+="\n"),'"""'+c.replace(/"""/g,'\\"""')+'"""'}},23684:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveLocation=void 0;var r=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});t.DirectiveLocation=r},44330:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Source",{enumerable:!0,get:function(){return n.Source}}),Object.defineProperty(t,"getLocation",{enumerable:!0,get:function(){return i.getLocation}}),Object.defineProperty(t,"printLocation",{enumerable:!0,get:function(){return a.printLocation}}),Object.defineProperty(t,"printSourceLocation",{enumerable:!0,get:function(){return a.printSourceLocation}}),Object.defineProperty(t,"Kind",{enumerable:!0,get:function(){return o.Kind}}),Object.defineProperty(t,"TokenKind",{enumerable:!0,get:function(){return s.TokenKind}}),Object.defineProperty(t,"Lexer",{enumerable:!0,get:function(){return c.Lexer}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return u.parse}}),Object.defineProperty(t,"parseValue",{enumerable:!0,get:function(){return u.parseValue}}),Object.defineProperty(t,"parseType",{enumerable:!0,get:function(){return u.parseType}}),Object.defineProperty(t,"print",{enumerable:!0,get:function(){return l.print}}),Object.defineProperty(t,"visit",{enumerable:!0,get:function(){return d.visit}}),Object.defineProperty(t,"visitInParallel",{enumerable:!0,get:function(){return d.visitInParallel}}),Object.defineProperty(t,"getVisitFn",{enumerable:!0,get:function(){return d.getVisitFn}}),Object.defineProperty(t,"BREAK",{enumerable:!0,get:function(){return d.BREAK}}),Object.defineProperty(t,"Location",{enumerable:!0,get:function(){return h.Location}}),Object.defineProperty(t,"Token",{enumerable:!0,get:function(){return h.Token}}),Object.defineProperty(t,"isDefinitionNode",{enumerable:!0,get:function(){return p.isDefinitionNode}}),Object.defineProperty(t,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return p.isExecutableDefinitionNode}}),Object.defineProperty(t,"isSelectionNode",{enumerable:!0,get:function(){return p.isSelectionNode}}),Object.defineProperty(t,"isValueNode",{enumerable:!0,get:function(){return p.isValueNode}}),Object.defineProperty(t,"isTypeNode",{enumerable:!0,get:function(){return p.isTypeNode}}),Object.defineProperty(t,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return p.isTypeSystemDefinitionNode}}),Object.defineProperty(t,"isTypeDefinitionNode",{enumerable:!0,get:function(){return p.isTypeDefinitionNode}}),Object.defineProperty(t,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return p.isTypeSystemExtensionNode}}),Object.defineProperty(t,"isTypeExtensionNode",{enumerable:!0,get:function(){return p.isTypeExtensionNode}}),Object.defineProperty(t,"DirectiveLocation",{enumerable:!0,get:function(){return f.DirectiveLocation}});var n=r(76241),i=r(4251),a=r(90354),o=r(12057),s=r(58053),c=r(4524),u=r(42275),l=r(43230),d=r(48048),h=r(93378),p=r(49674),f=r(23684)},12057:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Kind=void 0;var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});t.Kind=r},4524:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPunctuatorTokenKind=function(e){return e===a.TokenKind.BANG||e===a.TokenKind.DOLLAR||e===a.TokenKind.AMP||e===a.TokenKind.PAREN_L||e===a.TokenKind.PAREN_R||e===a.TokenKind.SPREAD||e===a.TokenKind.COLON||e===a.TokenKind.EQUALS||e===a.TokenKind.AT||e===a.TokenKind.BRACKET_L||e===a.TokenKind.BRACKET_R||e===a.TokenKind.BRACE_L||e===a.TokenKind.PIPE||e===a.TokenKind.BRACE_R},t.Lexer=void 0;var n=r(40629),i=r(93378),a=r(58053),o=r(4758),s=function(){function e(e){var t=new i.Token(a.TokenKind.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==a.TokenKind.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=u(this,e)}while(e.kind===a.TokenKind.COMMENT);return e},e}();function c(e){return isNaN(e)?a.TokenKind.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function u(e,t){for(var r=e.source,o=r.body,s=o.length,c=t.end;c31||9===s));return new i.Token(a.TokenKind.COMMENT,t,u,r,n,o,c.slice(t+1,u))}function h(e,t,r,o,s,u){var l=e.body,d=r,h=t,f=!1;if(45===d&&(d=l.charCodeAt(++h)),48===d){if((d=l.charCodeAt(++h))>=48&&d<=57)throw(0,n.syntaxError)(e,h,"Invalid number, unexpected digit after 0: ".concat(c(d),"."))}else h=p(e,h,d),d=l.charCodeAt(h);if(46===d&&(f=!0,d=l.charCodeAt(++h),h=p(e,h,d),d=l.charCodeAt(h)),69!==d&&101!==d||(f=!0,43!==(d=l.charCodeAt(++h))&&45!==d||(d=l.charCodeAt(++h)),h=p(e,h,d),d=l.charCodeAt(h)),46===d||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(d))throw(0,n.syntaxError)(e,h,"Invalid number, expected digit but got: ".concat(c(d),"."));return new i.Token(f?a.TokenKind.FLOAT:a.TokenKind.INT,t,h,o,s,u,l.slice(t,h))}function p(e,t,r){var i=e.body,a=t,o=r;if(o>=48&&o<=57){do{o=i.charCodeAt(++a)}while(o>=48&&o<=57);return a}throw(0,n.syntaxError)(e,a,"Invalid number, expected digit but got: ".concat(c(o),"."))}function f(e,t,r,o,s){for(var u,l,d,h,p=e.body,f=t+1,y=f,m=0,b="";f=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function m(e,t,r,n,o){for(var s=e.body,c=s.length,u=t+1,l=0;u!==c&&!isNaN(l=s.charCodeAt(u))&&(95===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++u;return new i.Token(a.TokenKind.NAME,t,u,r,n,o,s.slice(t,u))}t.Lexer=s},4251:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLocation=function(e,t){for(var r,n=/\r\n|[\n\r]/g,i=1,a=t+1;(r=n.exec(e.body))&&r.index{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=function(e,t){return new l(e,t).parseDocument()},t.parseValue=function(e,t){var r=new l(e,t);r.expectToken(o.TokenKind.SOF);var n=r.parseValueLiteral(!1);return r.expectToken(o.TokenKind.EOF),n},t.parseType=function(e,t){var r=new l(e,t);r.expectToken(o.TokenKind.SOF);var n=r.parseTypeReference();return r.expectToken(o.TokenKind.EOF),n},t.Parser=void 0;var n=r(40629),i=r(12057),a=r(93378),o=r(58053),s=r(76241),c=r(23684),u=r(4524),l=function(){function e(e,t){var r=(0,s.isSource)(e)?e:new s.Source(e);this._lexer=new u.Lexer(r),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(o.TokenKind.NAME);return{kind:i.Kind.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:i.Kind.DOCUMENT,definitions:this.many(o.TokenKind.SOF,this.parseDefinition,o.TokenKind.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(o.TokenKind.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(o.TokenKind.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(o.TokenKind.BRACE_L))return{kind:i.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,r=this.parseOperationType();return this.peek(o.TokenKind.NAME)&&(t=this.parseName()),{kind:i.Kind.OPERATION_DEFINITION,operation:r,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(o.TokenKind.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(o.TokenKind.PAREN_L,this.parseVariableDefinition,o.TokenKind.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:i.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(o.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.TokenKind.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(o.TokenKind.DOLLAR),{kind:i.Kind.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:i.Kind.SELECTION_SET,selections:this.many(o.TokenKind.BRACE_L,this.parseSelection,o.TokenKind.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(o.TokenKind.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(o.TokenKind.COLON)?(e=n,t=this.parseName()):t=n,{kind:i.Kind.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.TokenKind.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.TokenKind.PAREN_L,t,o.TokenKind.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(o.TokenKind.COLON),{kind:i.Kind.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:i.Kind.ARGUMENT,name:this.parseName(),value:(this.expectToken(o.TokenKind.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(o.TokenKind.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(o.TokenKind.NAME)?{kind:i.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:i.Kind.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:i.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:i.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case o.TokenKind.BRACKET_L:return this.parseList(e);case o.TokenKind.BRACE_L:return this.parseObject(e);case o.TokenKind.INT:return this._lexer.advance(),{kind:i.Kind.INT,value:t.value,loc:this.loc(t)};case o.TokenKind.FLOAT:return this._lexer.advance(),{kind:i.Kind.FLOAT,value:t.value,loc:this.loc(t)};case o.TokenKind.STRING:case o.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case o.TokenKind.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:i.Kind.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:i.Kind.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:i.Kind.NULL,loc:this.loc(t)};default:return{kind:i.Kind.ENUM,value:t.value,loc:this.loc(t)}}case o.TokenKind.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:i.Kind.STRING,value:e.value,block:e.kind===o.TokenKind.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,r=this._lexer.token;return{kind:i.Kind.LIST,values:this.any(o.TokenKind.BRACKET_L,(function(){return t.parseValueLiteral(e)}),o.TokenKind.BRACKET_R),loc:this.loc(r)}},t.parseObject=function(e){var t=this,r=this._lexer.token;return{kind:i.Kind.OBJECT,fields:this.any(o.TokenKind.BRACE_L,(function(){return t.parseObjectField(e)}),o.TokenKind.BRACE_R),loc:this.loc(r)}},t.parseObjectField=function(e){var t=this._lexer.token,r=this.parseName();return this.expectToken(o.TokenKind.COLON),{kind:i.Kind.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(o.TokenKind.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(o.TokenKind.AT),{kind:i.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(o.TokenKind.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(o.TokenKind.BRACKET_R),e={kind:i.Kind.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(o.TokenKind.BANG)?{kind:i.Kind.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:i.Kind.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===o.TokenKind.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(o.TokenKind.STRING)||this.peek(o.TokenKind.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var r=this.parseDirectives(!0),n=this.many(o.TokenKind.BRACE_L,this.parseOperationTypeDefinition,o.TokenKind.BRACE_R);return{kind:i.Kind.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(o.TokenKind.COLON);var r=this.parseNamedType();return{kind:i.Kind.OPERATION_TYPE_DEFINITION,operation:t,type:r,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var r=this.parseName(),n=this.parseDirectives(!0);return{kind:i.Kind.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var r=this.parseName(),n=this.parseImplementsInterfaces(),a=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:i.Kind.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:a,fields:o,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(o.TokenKind.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(o.TokenKind.AMP)||this.peek(o.TokenKind.NAME));return t}return this.delimitedMany(o.TokenKind.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(o.TokenKind.BRACE_L)&&this._lexer.lookahead().kind===o.TokenKind.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(o.TokenKind.BRACE_L,this.parseFieldDefinition,o.TokenKind.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(o.TokenKind.COLON);var a=this.parseTypeReference(),s=this.parseDirectives(!0);return{kind:i.Kind.FIELD_DEFINITION,description:t,name:r,arguments:n,type:a,directives:s,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(o.TokenKind.PAREN_L,this.parseInputValueDef,o.TokenKind.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(o.TokenKind.COLON);var n,a=this.parseTypeReference();this.expectOptionalToken(o.TokenKind.EQUALS)&&(n=this.parseValueLiteral(!0));var s=this.parseDirectives(!0);return{kind:i.Kind.INPUT_VALUE_DEFINITION,description:t,name:r,type:a,defaultValue:n,directives:s,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var r=this.parseName(),n=this.parseImplementsInterfaces(),a=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:i.Kind.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:a,fields:o,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var r=this.parseName(),n=this.parseDirectives(!0),a=this.parseUnionMemberTypes();return{kind:i.Kind.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:a,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(o.TokenKind.EQUALS)?this.delimitedMany(o.TokenKind.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var r=this.parseName(),n=this.parseDirectives(!0),a=this.parseEnumValuesDefinition();return{kind:i.Kind.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:a,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(o.TokenKind.BRACE_L,this.parseEnumValueDefinition,o.TokenKind.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseDirectives(!0);return{kind:i.Kind.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var r=this.parseName(),n=this.parseDirectives(!0),a=this.parseInputFieldsDefinition();return{kind:i.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:a,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(o.TokenKind.BRACE_L,this.parseInputValueDef,o.TokenKind.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===o.TokenKind.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),r=this.optionalMany(o.TokenKind.BRACE_L,this.parseOperationTypeDefinition,o.TokenKind.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return{kind:i.Kind.SCHEMA_EXTENSION,directives:t,operationTypes:r,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),r=this.parseDirectives(!0);if(0===r.length)throw this.unexpected();return{kind:i.Kind.SCALAR_TYPE_EXTENSION,name:t,directives:r,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),a=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===a.length)throw this.unexpected();return{kind:i.Kind.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:a,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),a=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===a.length)throw this.unexpected();return{kind:i.Kind.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:a,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:i.Kind.UNION_TYPE_EXTENSION,name:t,directives:r,types:n,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:i.Kind.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:i.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.TokenKind.AT);var r=this.parseName(),n=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var s=this.parseDirectiveLocations();return{kind:i.Kind.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:a,locations:s,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(o.TokenKind.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==c.DirectiveLocation[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new a.Location(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw(0,n.syntaxError)(this._lexer.source,t.start,"Expected ".concat(h(e),", found ").concat(d(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==o.TokenKind.NAME||t.value!==e)throw(0,n.syntaxError)(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(d(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===o.TokenKind.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return(0,n.syntaxError)(this._lexer.source,t.start,"Unexpected ".concat(d(t),"."))},t.any=function(e,t,r){this.expectToken(e);for(var n=[];!this.expectOptionalToken(r);)n.push(t.call(this));return n},t.optionalMany=function(e,t,r){if(this.expectOptionalToken(e)){var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}return[]},t.many=function(e,t,r){this.expectToken(e);var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r},e}();function d(e){var t=e.value;return h(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function h(e){return(0,u.isPunctuatorTokenKind)(e)?'"'.concat(e,'"'):e}t.Parser=l},49674:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDefinitionNode=function(e){return i(e)||a(e)||s(e)},t.isExecutableDefinitionNode=i,t.isSelectionNode=function(e){return e.kind===n.Kind.FIELD||e.kind===n.Kind.FRAGMENT_SPREAD||e.kind===n.Kind.INLINE_FRAGMENT},t.isValueNode=function(e){return e.kind===n.Kind.VARIABLE||e.kind===n.Kind.INT||e.kind===n.Kind.FLOAT||e.kind===n.Kind.STRING||e.kind===n.Kind.BOOLEAN||e.kind===n.Kind.NULL||e.kind===n.Kind.ENUM||e.kind===n.Kind.LIST||e.kind===n.Kind.OBJECT},t.isTypeNode=function(e){return e.kind===n.Kind.NAMED_TYPE||e.kind===n.Kind.LIST_TYPE||e.kind===n.Kind.NON_NULL_TYPE},t.isTypeSystemDefinitionNode=a,t.isTypeDefinitionNode=o,t.isTypeSystemExtensionNode=s,t.isTypeExtensionNode=c;var n=r(12057);function i(e){return e.kind===n.Kind.OPERATION_DEFINITION||e.kind===n.Kind.FRAGMENT_DEFINITION}function a(e){return e.kind===n.Kind.SCHEMA_DEFINITION||o(e)||e.kind===n.Kind.DIRECTIVE_DEFINITION}function o(e){return e.kind===n.Kind.SCALAR_TYPE_DEFINITION||e.kind===n.Kind.OBJECT_TYPE_DEFINITION||e.kind===n.Kind.INTERFACE_TYPE_DEFINITION||e.kind===n.Kind.UNION_TYPE_DEFINITION||e.kind===n.Kind.ENUM_TYPE_DEFINITION||e.kind===n.Kind.INPUT_OBJECT_TYPE_DEFINITION}function s(e){return e.kind===n.Kind.SCHEMA_EXTENSION||c(e)}function c(e){return e.kind===n.Kind.SCALAR_TYPE_EXTENSION||e.kind===n.Kind.OBJECT_TYPE_EXTENSION||e.kind===n.Kind.INTERFACE_TYPE_EXTENSION||e.kind===n.Kind.UNION_TYPE_EXTENSION||e.kind===n.Kind.ENUM_TYPE_EXTENSION||e.kind===n.Kind.INPUT_OBJECT_TYPE_EXTENSION}},90354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.printLocation=function(e){return i(e.source,(0,n.getLocation)(e.source,e.start))},t.printSourceLocation=i;var n=r(4251);function i(e,t){var r=e.locationOffset.column-1,n=o(r)+e.body,i=t.line-1,s=e.locationOffset.line-1,c=t.line+s,u=1===t.line?r:0,l=t.column+u,d="".concat(e.name,":").concat(c,":").concat(l,"\n"),h=n.split(/\r\n|[\n\r]/g),p=h[i];if(p.length>120){for(var f=Math.floor(l/80),y=l%80,g=[],m=0;m{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.print=function(e){return(0,n.visit)(e,{leave:a})};var n=r(48048),i=r(4758),a={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return s(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,r=e.name,n=u("(",s(e.variableDefinitions,", "),")"),i=s(e.directives," "),a=e.selectionSet;return r||i||n||"query"!==t?s([t,s([r,n]),i,a]," "):a},VariableDefinition:function(e){var t=e.variable,r=e.type,n=e.defaultValue,i=e.directives;return t+": "+r+u(" = ",n)+u(" ",s(i," "))},SelectionSet:function(e){return c(e.selections)},Field:function(e){var t=e.alias,r=e.name,n=e.arguments,i=e.directives,a=e.selectionSet,o=u("",t,": ")+r,c=o+u("(",s(n,", "),")");return c.length>80&&(c=o+u("(\n",l(s(n,"\n")),"\n)")),s([c,s(i," "),a]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+u(" ",s(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,r=e.directives,n=e.selectionSet;return s(["...",u("on ",t),s(r," "),n]," ")},FragmentDefinition:function(e){var t=e.name,r=e.typeCondition,n=e.variableDefinitions,i=e.directives,a=e.selectionSet;return"fragment ".concat(t).concat(u("(",s(n,", "),")")," ")+"on ".concat(r," ").concat(u("",s(i," ")," "))+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var r=e.value;return e.block?(0,i.printBlockString)(r,"description"===t?"":" "):JSON.stringify(r)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+s(e.values,", ")+"]"},ObjectValue:function(e){return"{"+s(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+u("(",s(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:o((function(e){var t=e.directives,r=e.operationTypes;return s(["schema",s(t," "),c(r)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:o((function(e){return s(["scalar",e.name,s(e.directives," ")]," ")})),ObjectTypeDefinition:o((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["type",t,u("implements ",s(r," & ")),s(n," "),c(i)]," ")})),FieldDefinition:o((function(e){var t=e.name,r=e.arguments,n=e.type,i=e.directives;return t+(h(r)?u("(\n",l(s(r,"\n")),"\n)"):u("(",s(r,", "),")"))+": "+n+u(" ",s(i," "))})),InputValueDefinition:o((function(e){var t=e.name,r=e.type,n=e.defaultValue,i=e.directives;return s([t+": "+r,u("= ",n),s(i," ")]," ")})),InterfaceTypeDefinition:o((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["interface",t,u("implements ",s(r," & ")),s(n," "),c(i)]," ")})),UnionTypeDefinition:o((function(e){var t=e.name,r=e.directives,n=e.types;return s(["union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")})),EnumTypeDefinition:o((function(e){var t=e.name,r=e.directives,n=e.values;return s(["enum",t,s(r," "),c(n)]," ")})),EnumValueDefinition:o((function(e){return s([e.name,s(e.directives," ")]," ")})),InputObjectTypeDefinition:o((function(e){var t=e.name,r=e.directives,n=e.fields;return s(["input",t,s(r," "),c(n)]," ")})),DirectiveDefinition:o((function(e){var t=e.name,r=e.arguments,n=e.repeatable,i=e.locations;return"directive @"+t+(h(r)?u("(\n",l(s(r,"\n")),"\n)"):u("(",s(r,", "),")"))+(n?" repeatable":"")+" on "+s(i," | ")})),SchemaExtension:function(e){var t=e.directives,r=e.operationTypes;return s(["extend schema",s(t," "),c(r)]," ")},ScalarTypeExtension:function(e){return s(["extend scalar",e.name,s(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend type",t,u("implements ",s(r," & ")),s(n," "),c(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend interface",t,u("implements ",s(r," & ")),s(n," "),c(i)]," ")},UnionTypeExtension:function(e){var t=e.name,r=e.directives,n=e.types;return s(["extend union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,r=e.directives,n=e.values;return s(["extend enum",t,s(r," "),c(n)]," ")},InputObjectTypeExtension:function(e){var t=e.name,r=e.directives,n=e.fields;return s(["extend input",t,s(r," "),c(n)]," ")}};function o(e){return function(t){return s([t.description,e(t)],"\n")}}function s(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(r))&&void 0!==t?t:""}function c(e){return u("{\n",l(s(e,"\n")),"\n}")}function u(e,t){return null!=t&&""!==t?e+t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:""):""}function l(e){return u(" ",e.replace(/\n/g,"\n "))}function d(e){return-1!==e.indexOf("\n")}function h(e){return null!=e&&e.some(d)}},76241:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSource=function(e){return(0,o.default)(e,u)},t.Source=void 0;var n=r(28189),i=s(r(23216)),a=s(r(65269)),o=s(r(83588));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||(0,a.default)(0,"Body must be a string. Received: ".concat((0,i.default)(e),".")),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||(0,a.default)(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,a.default)(0,"column in locationOffset is 1-indexed and must be positive.")}var t,r;return t=e,(r=[{key:n.SYMBOL_TO_STRING_TAG,get:function(){return"Source"}}])&&c(t.prototype,r),e}();t.Source=u},58053:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenKind=void 0;var r=Object.freeze({SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});t.TokenKind=r},48048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,n=void 0,u=Array.isArray(e),l=[e],d=-1,h=[],p=void 0,f=void 0,y=void 0,g=[],m=[],b=e;do{var v=++d===l.length,_=v&&0!==h.length;if(v){if(f=0===m.length?void 0:g[g.length-1],p=y,y=m.pop(),_){if(u)p=p.slice();else{for(var w={},T=0,S=Object.keys(p);T{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SYMBOL_TO_STRING_TAG=t.SYMBOL_ASYNC_ITERATOR=t.SYMBOL_ITERATOR=void 0;var r="function"==typeof Symbol&&null!=Symbol.iterator?Symbol.iterator:"@@iterator";t.SYMBOL_ITERATOR=r;var n="function"==typeof Symbol&&null!=Symbol.asyncIterator?Symbol.asyncIterator:"@@asyncIterator";t.SYMBOL_ASYNC_ITERATOR=n;var i="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";t.SYMBOL_TO_STRING_TAG=i},99499:(e,t,r)=>{var n=t;n.utils=r(70461),n.common=r(32191),n.sha=r(75746),n.ripemd=r(74169),n.hmac=r(11825),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},32191:(e,t,r)=>{"use strict";var n=r(70461),i=r(7784);function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=a,a.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a{"use strict";var n=r(70461),i=r(7784);function a(e,t,r){if(!(this instanceof a))return new a(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=a,a.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var n=r(70461),i=r(32191),a=n.rotl32,o=n.sum32,s=n.sum32_3,c=n.sum32_4,u=i.BlockHash;function l(){if(!(this instanceof l))return new l;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function h(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function p(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(l,u),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],u=this.h[3],l=this.h[4],b=r,v=n,_=i,w=u,T=l,S=0;S<80;S++){var O=o(a(c(r,d(S,n,i,u),e[f[S]+t],h(S)),g[S]),l);r=l,l=u,u=a(i,10),i=n,n=O,O=o(a(c(b,d(79-S,v,_,w),e[y[S]+t],p(S)),m[S]),T),b=T,T=w,w=a(_,10),_=v,v=O}O=s(this.h[1],i,w),this.h[1]=s(this.h[2],u,T),this.h[2]=s(this.h[3],l,b),this.h[3]=s(this.h[4],r,v),this.h[4]=s(this.h[0],n,_),this.h[0]=O},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],y=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},75746:(e,t,r)=>{"use strict";t.sha1=r(12986),t.sha224=r(75393),t.sha256=r(50536),t.sha384=r(52348),t.sha512=r(92157)},12986:(e,t,r)=>{"use strict";var n=r(70461),i=r(32191),a=r(600),o=n.rotl32,s=n.sum32,c=n.sum32_5,u=a.ft_1,l=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(h,l),e.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(70461),i=r(50536);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(a,i),e.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},50536:(e,t,r)=>{"use strict";var n=r(70461),i=r(32191),a=r(600),o=r(7784),s=n.sum32,c=n.sum32_4,u=n.sum32_5,l=a.ch32,d=a.maj32,h=a.s0_256,p=a.s1_256,f=a.g0_256,y=a.g1_256,g=i.BlockHash,m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}n.inherits(b,g),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(70461),i=r(92157);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(a,i),e.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},92157:(e,t,r)=>{"use strict";var n=r(70461),i=r(32191),a=r(7784),o=n.rotr64_hi,s=n.rotr64_lo,c=n.shr64_hi,u=n.shr64_lo,l=n.sum64,d=n.sum64_hi,h=n.sum64_lo,p=n.sum64_4_hi,f=n.sum64_4_lo,y=n.sum64_5_hi,g=n.sum64_5_lo,m=i.BlockHash,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function _(e,t,r,n,i){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function w(e,t,r,n,i,a){var o=t&n^~t&a;return o<0&&(o+=4294967296),o}function T(e,t,r,n,i){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function S(e,t,r,n,i,a){var o=t&n^t&a^n&a;return o<0&&(o+=4294967296),o}function O(e,t){var r=o(e,t,28)^o(t,e,2)^o(t,e,7);return r<0&&(r+=4294967296),r}function E(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function A(e,t){var r=o(e,t,1)^o(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function R(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,19)^s(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,m),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(70461).rotr32;function i(e,t,r){return e&t^~e&r}function a(e,t,r){return e&t^e&r^t&r}function o(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?o(t,r,n):2===e?a(t,r,n):void 0},t.ch32=i,t.maj32=a,t.p32=o,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},70461:(e,t,r)=>{"use strict";var n=r(7784),i=r(35615);function a(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&o|128):a(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=63&o|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=63&o|128)}else for(i=0;i>>0}return o},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a>>0,e[t+1]=a},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,a,o,s){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,a,o,s,c,u){var l=0,d=t;return l+=(d=d+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,a,o,s,c,u){return t+n+a+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},14291:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var o=a(r(36439)),s=r(3379),c=new Set(["input","option","optgroup","select","button","datalist","textarea"]),u=new Set(["p"]),l=new Set(["thead","tbody"]),d=new Set(["dd","dt"]),h=new Set(["rt","rp"]),p=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",u],["h1",u],["h2",u],["h3",u],["h4",u],["h5",u],["h6",u],["select",c],["input",c],["output",c],["button",c],["datalist",c],["textarea",c],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",d],["dt",d],["address",u],["article",u],["aside",u],["blockquote",u],["details",u],["div",u],["dl",u],["fieldset",u],["figcaption",u],["figure",u],["footer",u],["form",u],["header",u],["hr",u],["main",u],["nav",u],["ol",u],["pre",u],["section",u],["table",u],["ul",u],["rt",h],["rp",h],["tbody",l],["tfoot",l]]),f=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),y=new Set(["math","svg"]),g=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),m=/\s|\//,b=function(){function e(e,t){var r,n,i,a,s;void 0===t&&(t={}),this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(r=t.lowerCaseTags)&&void 0!==r?r:!t.xmlMode,this.lowerCaseAttributeNames=null!==(n=t.lowerCaseAttributeNames)&&void 0!==n?n:!t.xmlMode,this.tokenizer=new(null!==(i=t.Tokenizer)&&void 0!==i?i:o.default)(this.options,this),null===(s=(a=this.cbs).onparserinit)||void 0===s||s.call(a,this)}return e.prototype.ontext=function(e,t){var r,n,i=this.getSlice(e,t);this.endIndex=t-1,null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,i),this.startIndex=t},e.prototype.ontextentity=function(e){var t,r,n=this.tokenizer.getSectionStart();this.endIndex=n-1,null===(r=(t=this.cbs).ontext)||void 0===r||r.call(t,(0,s.fromCodePoint)(e)),this.startIndex=n},e.prototype.isVoidElement=function(e){return!this.options.xmlMode&&f.has(e)},e.prototype.onopentagname=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)},e.prototype.emitOpenTag=function(e){var t,r,n,i;this.openTagStart=this.startIndex,this.tagname=e;var a=!this.options.xmlMode&&p.get(e);if(a)for(;this.stack.length>0&&a.has(this.stack[this.stack.length-1]);){var o=this.stack.pop();null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,o,!0)}this.isVoidElement(e)||(this.stack.push(e),y.has(e)?this.foreignContext.push(!0):g.has(e)&&this.foreignContext.push(!1)),null===(i=(n=this.cbs).onopentagname)||void 0===i||i.call(n,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(e){var t,r;this.startIndex=this.openTagStart,this.attribs&&(null===(r=(t=this.cbs).onopentag)||void 0===r||r.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},e.prototype.onclosetag=function(e,t){var r,n,i,a,o,s;this.endIndex=t;var c=this.getSlice(e,t);if(this.lowerCaseTagNames&&(c=c.toLowerCase()),(y.has(c)||g.has(c))&&this.foreignContext.pop(),this.isVoidElement(c))this.options.xmlMode||"br"!==c||(null===(n=(r=this.cbs).onopentagname)||void 0===n||n.call(r,"br"),null===(a=(i=this.cbs).onopentag)||void 0===a||a.call(i,"br",{},!0),null===(s=(o=this.cbs).onclosetag)||void 0===s||s.call(o,"br",!1));else{var u=this.stack.lastIndexOf(c);if(-1!==u)if(this.cbs.onclosetag)for(var l=this.stack.length-u;l--;)this.cbs.onclosetag(this.stack.pop(),0!==l);else this.stack.length=u;else this.options.xmlMode||"p"!==c||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1},e.prototype.onselfclosingtag=function(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},e.prototype.closeCurrentTag=function(e){var t,r,n=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===n&&(null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,n,!e),this.stack.pop())},e.prototype.onattribname=function(e,t){this.startIndex=e;var r=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(e,t){this.attribvalue+=this.getSlice(e,t)},e.prototype.onattribentity=function(e){this.attribvalue+=(0,s.fromCodePoint)(e)},e.prototype.onattribend=function(e,t){var r,n;this.endIndex=t,null===(n=(r=this.cbs).onattribute)||void 0===n||n.call(r,this.attribname,this.attribvalue,e===o.QuoteType.Double?'"':e===o.QuoteType.Single?"'":e===o.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(m),r=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(n),"!".concat(r))}this.startIndex=t+1},e.prototype.onprocessinginstruction=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(n),"?".concat(r))}this.startIndex=t+1},e.prototype.oncomment=function(e,t,r){var n,i,a,o;this.endIndex=t,null===(i=(n=this.cbs).oncomment)||void 0===i||i.call(n,this.getSlice(e,t-r)),null===(o=(a=this.cbs).oncommentend)||void 0===o||o.call(a),this.startIndex=t+1},e.prototype.oncdata=function(e,t,r){var n,i,a,o,s,c,u,l,d,h;this.endIndex=t;var p=this.getSlice(e,t-r);this.options.xmlMode||this.options.recognizeCDATA?(null===(i=(n=this.cbs).oncdatastart)||void 0===i||i.call(n),null===(o=(a=this.cbs).ontext)||void 0===o||o.call(a,p),null===(c=(s=this.cbs).oncdataend)||void 0===c||c.call(s)):(null===(l=(u=this.cbs).oncomment)||void 0===l||l.call(u,"[CDATA[".concat(p,"]]")),null===(h=(d=this.cbs).oncommentend)||void 0===h||h.call(d)),this.startIndex=t+1},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=this.stack.length;r>0;this.cbs.onclosetag(this.stack[--r],!0));}null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,r,n;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(n=(r=this.cbs).onparserinit)||void 0===n||n.call(r,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.getSlice=function(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,t-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))},e.prototype.end=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var n,i,a,o=r(3379);function s(e){return e===n.Space||e===n.NewLine||e===n.Tab||e===n.FormFeed||e===n.CarriageReturn}function c(e){return e===n.Slash||e===n.Gt||s(e)}function u(e){return e>=n.Zero&&e<=n.Nine}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(n||(n={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.SpecialStartSequence=23]="SpecialStartSequence",e[e.InSpecialTag=24]="InSpecialTag",e[e.BeforeEntity=25]="BeforeEntity",e[e.BeforeNumericEntity=26]="BeforeNumericEntity",e[e.InNamedEntity=27]="InNamedEntity",e[e.InNumericEntity=28]="InNumericEntity",e[e.InHexEntity=29]="InHexEntity"}(i||(i={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(a=t.QuoteType||(t.QuoteType={}));var l={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},d=function(){function e(e,t){var r=e.xmlMode,n=void 0!==r&&r,a=e.decodeEntities,s=void 0===a||a;this.cbs=t,this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=n,this.decodeEntities=s,this.entityTrie=n?o.xmlDecodeTree:o.htmlDecodeTree}return e.prototype.reset=function(){this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},e.prototype.write=function(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()},e.prototype.end=function(){this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=i.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===n.Amp&&(this.state=i.BeforeEntity)},e.prototype.stateSpecialStartSequence=function(e){var t=this.sequenceIndex===this.currentSequence.length;if(t?c(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=i.InTagName,this.stateInTagName(e)},e.prototype.stateInSpecialTag=function(e){if(this.sequenceIndex===this.currentSequence.length){if(e===n.Gt||s(e)){var t=this.index-this.currentSequence.length;if(this.sectionStart=n.LowerA&&e<=n.LowerZ||e>=n.UpperA&&e<=n.UpperZ}(e)},e.prototype.startSpecial=function(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=i.SpecialStartSequence},e.prototype.stateBeforeTagName=function(e){if(e===n.ExclamationMark)this.state=i.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===n.Questionmark)this.state=i.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){var t=32|e;this.sectionStart=this.index,this.xmlMode||t!==l.TitleEnd[2]?this.state=this.xmlMode||t!==l.ScriptEnd[2]?i.InTagName:i.BeforeSpecialS:this.startSpecial(l.TitleEnd,3)}else e===n.Slash?this.state=i.BeforeClosingTagName:(this.state=i.Text,this.stateText(e))},e.prototype.stateInTagName=function(e){c(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateBeforeClosingTagName=function(e){s(e)||(e===n.Gt?this.state=i.Text:(this.state=this.isTagStartChar(e)?i.InClosingTagName:i.InSpecialComment,this.sectionStart=this.index))},e.prototype.stateInClosingTagName=function(e){(e===n.Gt||s(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterClosingTagName,this.stateAfterClosingTagName(e))},e.prototype.stateAfterClosingTagName=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeAttributeName=function(e){e===n.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=i.InSpecialTag,this.sequenceIndex=0):this.state=i.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===n.Slash?this.state=i.InSelfClosingTag:s(e)||(this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateInSelfClosingTag=function(e){e===n.Gt?(this.cbs.onselfclosingtag(this.index),this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1,this.isSpecial=!1):s(e)||(this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateInAttributeName=function(e){(e===n.Eq||c(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterAttributeName,this.stateAfterAttributeName(e))},e.prototype.stateAfterAttributeName=function(e){e===n.Eq?this.state=i.BeforeAttributeValue:e===n.Slash||e===n.Gt?(this.cbs.onattribend(a.NoValue,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):s(e)||(this.cbs.onattribend(a.NoValue,this.index),this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateBeforeAttributeValue=function(e){e===n.DoubleQuote?(this.state=i.InAttributeValueDq,this.sectionStart=this.index+1):e===n.SingleQuote?(this.state=i.InAttributeValueSq,this.sectionStart=this.index+1):s(e)||(this.sectionStart=this.index,this.state=i.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))},e.prototype.handleInAttributeValue=function(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===n.DoubleQuote?a.Double:a.Single,this.index),this.state=i.BeforeAttributeName):this.decodeEntities&&e===n.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,n.DoubleQuote)},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,n.SingleQuote)},e.prototype.stateInAttributeValueNoQuotes=function(e){s(e)||e===n.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(a.Unquoted,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===n.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},e.prototype.stateBeforeDeclaration=function(e){e===n.OpeningSquareBracket?(this.state=i.CDATASequence,this.sequenceIndex=0):this.state=e===n.Dash?i.BeforeComment:i.InDeclaration},e.prototype.stateInDeclaration=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateInProcessingInstruction=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeComment=function(e){e===n.Dash?(this.state=i.InCommentLike,this.currentSequence=l.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=i.InDeclaration},e.prototype.stateInSpecialComment=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeSpecialS=function(e){var t=32|e;t===l.ScriptEnd[3]?this.startSpecial(l.ScriptEnd,4):t===l.StyleEnd[3]?this.startSpecial(l.StyleEnd,4):(this.state=i.InTagName,this.stateInTagName(e))},e.prototype.stateBeforeEntity=function(e){this.entityExcess=1,this.entityResult=0,e===n.Number?this.state=i.BeforeNumericEntity:e===n.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=i.InNamedEntity,this.stateInNamedEntity(e))},e.prototype.stateInNamedEntity=function(e){if(this.entityExcess+=1,this.trieIndex=(0,o.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0)return this.emitNamedEntity(),void this.index--;this.trieCurrent=this.entityTrie[this.trieIndex];var t=this.trieCurrent&o.BinTrieFlags.VALUE_LENGTH;if(t){var r=(t>>14)-1;if(this.allowLegacyEntity()||e===n.Semi){var i=this.index-this.entityExcess+1;i>this.sectionStart&&this.emitPartial(this.sectionStart,i),this.entityResult=this.trieIndex,this.trieIndex+=r,this.entityExcess=0,this.sectionStart=this.index+1,0===r&&this.emitNamedEntity()}else this.trieIndex+=r}},e.prototype.emitNamedEntity=function(){if(this.state=this.baseState,0!==this.entityResult)switch((this.entityTrie[this.entityResult]&o.BinTrieFlags.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~o.BinTrieFlags.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}},e.prototype.stateBeforeNumericEntity=function(e){(32|e)===n.LowerX?(this.entityExcess++,this.state=i.InHexEntity):(this.state=i.InNumericEntity,this.stateInNumericEntity(e))},e.prototype.emitNumericEntity=function(e){var t=this.index-this.entityExcess-1;t+2+Number(this.state===i.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint((0,o.replaceCodePoint)(this.entityResult))),this.state=this.baseState},e.prototype.stateInNumericEntity=function(e){e===n.Semi?this.emitNumericEntity(!0):u(e)?(this.entityResult=10*this.entityResult+(e-n.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.stateInHexEntity=function(e){e===n.Semi?this.emitNumericEntity(!0):u(e)?(this.entityResult=16*this.entityResult+(e-n.Zero),this.entityExcess++):function(e){return e>=n.UpperA&&e<=n.UpperF||e>=n.LowerA&&e<=n.LowerF}(e)?(this.entityResult=16*this.entityResult+((32|e)-n.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===i.Text||this.baseState===i.InSpecialTag)},e.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===i.Text||this.state===i.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==i.InAttributeValueDq&&this.state!==i.InAttributeValueSq&&this.state!==i.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},e.prototype.shouldContinue=function(){return this.index{"use strict";var t=/^utf-?8|ascii|utf-?16-?le|ucs-?2|base-?64|latin-?1$/i,r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,n=/\s|\uFEFF|\xA0/,i=/\r?\n[\x20\x09]+/g,a=/[;,"]/,o=/[;,"]|\s/,s=/^[!#$%&'*+\-\.^_`|~\da-zA-Z]+$/;function c(e){return e.replace(r,"")}function u(e){return n.test(e)}function l(e,t){for(;u(e[t]);)t++;return t}function d(e){return o.test(e)||!s.test(e)}class h{constructor(e){this.refs=[],e&&this.parse(e)}rel(e){for(var t=[],r=e.toLowerCase(),n=0;n{return r=t,n=e,Object.keys(r).length===Object.keys(n).length&&Object.keys(r).every((e=>e in n&&r[e]===n[e]));var r,n}))||this.refs.push(e),this}has(e,t){e=e.toLowerCase(),t=t.toLowerCase();for(var r=0;r",t)))throw new Error("Expected end of URI delimiter at offset "+t);o={uri:e.slice(t+1,p)},t=p,r=2,t++}else if(2===r){if(u(e[t])){t++;continue}if(";"===e[t])r=4,t++;else{if(","!==e[t])throw new Error('Unexpected character "'+e[t]+'" at offset '+t);r=1,t++}}else{if(4!==r)throw new Error('Unknown parser state "'+r+'"');if(";"===e[t]||u(e[t])){t++;continue}-1===(p=e.indexOf("=",t))&&(p=e.indexOf(";",t)),-1===p&&(p=e.length);var s=c(e.slice(t,p)).toLowerCase(),d="";if('"'===e[t=l(e,t=p+1)])for(t++;t"),e.push(t);return e.join(", ")}}h.isCompatibleEncoding=function(e){return t.test(e)},h.parse=function(e,t){return(new h).parse(e,t)},h.isSingleOccurenceAttr=function(e){return"rel"===e||"type"===e||"media"===e||"title"===e||"title*"===e},h.isTokenAttr=function(e){return"rel"===e||"type"===e||"anchor"===e},h.escapeQuotes=function(e){return e.replace(/"/g,'\\"')},h.expandRelations=function(e){return e.rel.split(" ").map((function(t){var r=Object.assign({},e);return r.rel=t,r}))},h.parseExtendedValue=function(e){var t=/([^']+)?(?:'([^']*)')?(.+)/.exec(e);return{language:t[2].toLowerCase(),encoding:h.isCompatibleEncoding(t[1])?null:t[1].toLowerCase(),value:h.isCompatibleEncoding(t[1])?decodeURIComponent(t[3]):t[3]}},h.formatExtendedAttribute=function(e,t){var r=(t.encoding||"utf-8").toUpperCase();return e+"="+r+"'"+(t.language||"en")+"'"+(Buffer.isBuffer(t.value)&&h.isCompatibleEncoding(r)?t.value.toString(r):Buffer.isBuffer(t.value)?t.value.toString("hex").replace(/[0-9a-f]{2}/gi,"%$1"):encodeURIComponent(t.value))},h.formatAttribute=function(e,t){return Array.isArray(t)?t.map((t=>h.formatAttribute(e,t))).join("; "):"*"===e[e.length-1]||"string"!=typeof t?h.formatExtendedAttribute(e,t):(h.isTokenAttr(e)?t=d(t)?'"'+h.escapeQuotes(t)+'"':h.escapeQuotes(t):d(t)&&(t='"'+(t=(t=encodeURIComponent(t)).replace(/%20/g," ").replace(/%2C/g,",").replace(/%3B/g,";"))+'"'),e+"="+t)},e.exports=h},39318:(e,t)=>{t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,c=(1<>1,l=-7,d=r?i-1:0,h=r?-1:1,p=e[t+d];for(d+=h,a=p&(1<<-l)-1,p>>=-l,l+=s;l>0;a=256*a+e[t+d],d+=h,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=256*o+e[t+d],d+=h,l-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=u}return(p?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,c,u=8*a-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,f=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(o++,c/=2),o+d>=l?(s=0,o=l):o+d>=1?(s=(t*c-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=f,s/=256,i-=8);for(o=o<0;e[r+p]=255&o,p+=f,o/=256,u-=8);e[r+p-f]|=128*y}},6081:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Collection:()=>E,Iterable:()=>Rn,List:()=>cr,Map:()=>Ft,OrderedMap:()=>Tr,OrderedSet:()=>ln,PairSorting:()=>yn,Range:()=>Gr,Record:()=>gn,Repeat:()=>Sn,Seq:()=>W,Set:()=>Br,Stack:()=>Rr,default:()=>In,fromJS:()=>On,get:()=>ct,getIn:()=>zr,has:()=>st,hasIn:()=>Xr,hash:()=>me,is:()=>pe,isAssociative:()=>O,isCollection:()=>v,isImmutable:()=>j,isIndexed:()=>S,isKeyed:()=>w,isList:()=>sr,isMap:()=>le,isOrdered:()=>M,isOrderedMap:()=>de,isOrderedSet:()=>Mr,isPlainObject:()=>it,isRecord:()=>D,isSeq:()=>P,isSet:()=>Cr,isStack:()=>Ar,isValueObject:()=>he,merge:()=>Ot,mergeDeep:()=>xt,mergeDeepWith:()=>At,mergeWith:()=>Et,remove:()=>lt,removeIn:()=>gt,set:()=>dt,setIn:()=>ft,update:()=>bt,updateIn:()=>ht,version:()=>An});var n="delete",i=5,a=1<>>0;if(""+r!==t||4294967295===r)return NaN;t=r}return t<0?l(e)+t:t}function h(){return!0}function p(e,t,r){return(0===e&&!m(e)||void 0!==r&&e<=-r)&&(void 0===t||void 0!==r&&t>=r)}function f(e,t){return g(e,t,0)}function y(e,t){return g(e,t,t)}function g(e,t,r){return void 0===e?r:m(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function m(e){return e<0||0===e&&1/e==-1/0}var b="@@__IMMUTABLE_ITERABLE__@@";function v(e){return Boolean(e&&e[b])}var _="@@__IMMUTABLE_KEYED__@@";function w(e){return Boolean(e&&e[_])}var T="@@__IMMUTABLE_INDEXED__@@";function S(e){return Boolean(e&&e[T])}function O(e){return w(e)||S(e)}var E=function(e){return v(e)?e:W(e)},x=function(e){function t(e){return w(e)?e:Y(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(E),A=function(e){function t(e){return S(e)?e:Z(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(E),R=function(e){function t(e){return v(e)&&!O(e)?e:ee(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(E);E.Keyed=x,E.Indexed=A,E.Set=R;var I="@@__IMMUTABLE_SEQ__@@";function P(e){return Boolean(e&&e[I])}var N="@@__IMMUTABLE_RECORD__@@";function D(e){return Boolean(e&&e[N])}function j(e){return v(e)||D(e)}var C="@@__IMMUTABLE_ORDERED__@@";function M(e){return Boolean(e&&e[C])}var L=0,k=1,F=2,B="function"==typeof Symbol&&Symbol.iterator,U="@@iterator",q=B||U,V=function(e){this.next=e};function Q(e,t,r,n){var i=0===e?t:1===e?r:[t,r];return n?n.value=i:n={value:i,done:!1},n}function $(){return{value:void 0,done:!0}}function H(e){return!!Array.isArray(e)||!!K(e)}function G(e){return e&&"function"==typeof e.next}function z(e){var t=K(e);return t&&t.call(e)}function K(e){var t=e&&(B&&e[B]||e[U]);if("function"==typeof t)return t}V.prototype.toString=function(){return"[Iterator]"},V.KEYS=L,V.VALUES=k,V.ENTRIES=F,V.prototype.inspect=V.prototype.toSource=function(){return this.toString()},V.prototype[q]=function(){return this};var X=Object.prototype.hasOwnProperty;function J(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var W=function(e){function t(e){return null==e?ae():j(e)?e.toSeq():function(e){var t,r,n=ce(e);if(n)return(r=K(t=e))&&r===t.entries?n.fromEntrySeq():function(e){var t=K(e);return t&&t===e.keys}(e)?n.toSetSeq():n;if("object"==typeof e)return new re(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var r=this._cache;if(r){for(var n=r.length,i=0;i!==n;){var a=r[t?n-++i:i++];if(!1===e(a[1],a[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var r=this._cache;if(r){var n=r.length,i=0;return new V((function(){if(i===n)return{value:void 0,done:!0};var a=r[t?n-++i:i++];return Q(e,a[0],a[1])}))}return this.__iteratorUncached(e,t)},t}(E),Y=function(e){function t(e){return null==e?ae().toKeyedSeq():v(e)?w(e)?e.toSeq():e.fromEntrySeq():D(e)?e.toSeq():oe(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(W),Z=function(e){function t(e){return null==e?ae():v(e)?w(e)?e.entrySeq():e.toIndexedSeq():D(e)?e.toSeq().entrySeq():se(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(W),ee=function(e){function t(e){return(v(e)&&!O(e)?e:Z(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(W);W.isSeq=P,W.Keyed=Y,W.Set=ee,W.Indexed=Z,W.prototype[I]=!0;var te=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[d(this,e)]:t},t.prototype.__iterate=function(e,t){for(var r=this._array,n=r.length,i=0;i!==n;){var a=t?n-++i:i++;if(!1===e(r[a],a,this))break}return i},t.prototype.__iterator=function(e,t){var r=this._array,n=r.length,i=0;return new V((function(){if(i===n)return{value:void 0,done:!0};var a=t?n-++i:i++;return Q(e,a,r[a])}))},t}(Z),re=function(e){function t(e){var t=Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return X.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var r=this._object,n=this._keys,i=n.length,a=0;a!==i;){var o=n[t?i-++a:a++];if(!1===e(r[o],o,this))break}return a},t.prototype.__iterator=function(e,t){var r=this._object,n=this._keys,i=n.length,a=0;return new V((function(){if(a===i)return{value:void 0,done:!0};var o=n[t?i-++a:a++];return Q(e,o,r[o])}))},t}(Y);re.prototype[C]=!0;var ne,ie=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var r=z(this._collection),n=0;if(G(r))for(var i;!(i=r.next()).done&&!1!==e(i.value,n++,this););return n},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=z(this._collection);if(!G(r))return new V($);var n=0;return new V((function(){var t=r.next();return t.done?t:Q(e,n++,t.value)}))},t}(Z);function ae(){return ne||(ne=new te([]))}function oe(e){var t=ce(e);if(t)return t.fromEntrySeq();if("object"==typeof e)return new re(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function se(e){var t=ce(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function ce(e){return J(e)?new te(e):H(e)?new ie(e):void 0}var ue="@@__IMMUTABLE_MAP__@@";function le(e){return Boolean(e&&e[ue])}function de(e){return le(e)&&M(e)}function he(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function pe(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(he(e)&&he(t)&&e.equals(t))}var fe="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var r=65535&(e|=0),n=65535&(t|=0);return r*n+((e>>>16)*n+r*(t>>>16)<<16>>>0)|0};function ye(e){return e>>>1&1073741824|3221225471&e}var ge=Object.prototype.valueOf;function me(e){if(null==e)return be(e);if("function"==typeof e.hashCode)return ye(e.hashCode(e));var t,r,n,i=(t=e).valueOf!==ge&&"function"==typeof t.valueOf?t.valueOf(t):t;if(null==i)return be(i);switch(typeof i){case"boolean":return i?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;for(t!==e&&(t^=4294967295*e);e>4294967295;)t^=e/=4294967295;return ye(t)}(i);case"string":return i.length>Re?(void 0===(n=Ne[r=i])&&(n=ve(r),Pe===Ie&&(Pe=0,Ne={}),Pe++,Ne[r]=n),n):ve(i);case"object":case"function":return function(e){var t;if(Oe&&void 0!==(t=Se.get(e)))return t;if(void 0!==(t=e[Ae]))return t;if(!we){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ae]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=Te(),Oe)Se.set(e,t);else{if(void 0!==_e&&!1===_e(e))throw new Error("Non-extensible objects are not allowed as keys.");if(we)Object.defineProperty(e,Ae,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Ae]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Ae]=t}}return t}(i);case"symbol":return function(e){var t=Ee[e];return void 0!==t||(t=Te(),Ee[e]=t),t}(i);default:if("function"==typeof i.toString)return ve(i.toString());throw new Error("Value type "+typeof i+" cannot be hashed.")}}function be(e){return null===e?1108378658:1108378659}function ve(e){for(var t=0,r=0;r=0&&(u.get=function(t,r){return(t=d(this,t))>=0&&ts)return{value:void 0,done:!0};var e=i.next();return n||t===k||e.done?e:Q(t,c-1,t===L?void 0:e.value[1],e)}))},u}function qe(e,t,r,n){var i=Je(e);return i.__iterateUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterate(i,a);var s=!0,c=0;return e.__iterate((function(e,a,u){if(!s||!(s=t.call(r,e,a,u)))return c++,i(e,n?a:c-1,o)})),c},i.__iteratorUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterator(i,a);var s=e.__iterator(F,a),c=!0,u=0;return new V((function(){var e,a,l;do{if((e=s.next()).done)return n||i===k?e:Q(i,u++,i===L?void 0:e.value[1],e);var d=e.value;a=d[0],l=d[1],c&&(c=t.call(r,l,a,o))}while(c);return i===F?e:Q(i,a,l,e)}))},i}function Ve(e,t,r){var n=Je(e);return n.__iterateUncached=function(i,a){if(a)return this.cacheResult().__iterate(i,a);var o=0,s=!1;return function e(c,u){c.__iterate((function(a,c){return(!t||u0}function Ge(e,t,r,n){var i=Je(e),a=new te(r).map((function(e){return e.size}));return i.size=n?a.max():a.min(),i.__iterate=function(e,t){for(var r,n=this.__iterator(k,t),i=0;!(r=n.next()).done&&!1!==e(r.value,i++,this););return i},i.__iteratorUncached=function(e,i){var a=r.map((function(e){return e=E(e),z(i?e.reverse():e)})),o=0,s=!1;return new V((function(){var r;return s||(r=a.map((function(e){return e.next()})),s=n?r.every((function(e){return e.done})):r.some((function(e){return e.done}))),s?{value:void 0,done:!0}:Q(e,o++,t.apply(null,r.map((function(e){return e.value}))))}))},i}function ze(e,t){return e===t?e:P(e)?t:e.constructor(t)}function Ke(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Xe(e){return w(e)?x:S(e)?A:R}function Je(e){return Object.create((w(e)?Y:S(e)?Z:ee).prototype)}function We(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):W.prototype.cacheResult.call(this)}function Ye(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e0;)t[r]=arguments[r+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return St(this,t,e)}function St(e,t,r){for(var n=[],i=0;i0;)t[r]=arguments[r+1];return It(e,t)}function Et(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return It(t,r,e)}function xt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Rt(e,t)}function At(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Rt(t,r,e)}function Rt(e,t,r){return It(e,t,function(e){return function t(r,n,i){return at(r)&&at(n)&&(a=n,o=W(r),s=W(a),S(o)===S(s)&&w(o)===w(s))?It(r,[n],t):e?e(r,n,i):n;var a,o,s}}(r))}function It(e,t,r){if(!at(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(j(e))return"function"==typeof r&&e.mergeWith?e.mergeWith.apply(e,[r].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var n=Array.isArray(e),i=e,a=n?A:x,o=n?function(t){i===e&&(i=ut(i)),i.push(t)}:function(t,n){var a=X.call(i,n),o=a&&r?r(i[n],t,n):t;a&&o===i[n]||(i===e&&(i=ut(i)),i[n]=o)},s=0;s0;)t[r]=arguments[r+1];return Rt(this,t,e)}function Dt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return ht(this,e,Jt(),(function(e){return It(e,t)}))}function jt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return ht(this,e,Jt(),(function(e){return Rt(e,t)}))}function Ct(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Mt(){return this.__ownerID?this:this.__ensureOwner(new u)}function Lt(){return this.__ensureOwner()}function kt(){return this.__altered}var Ft=function(e){function t(t){return null==t?Jt():le(t)&&!M(t)?t:Jt().withMutations((function(r){var n=e(t);tt(n.size),n.forEach((function(e,t){return r.set(t,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Jt().withMutations((function(t){for(var r=0;r=e.length)throw new Error("Missing value for key: "+e[r]);t.set(e[r],e[r+1])}}))},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return Wt(this,e,t)},t.prototype.remove=function(e){return Wt(this,e,s)},t.prototype.deleteAll=function(e){var t=E(e);return 0===t.size?this:this.withMutations((function(e){t.forEach((function(t){return e.remove(t)}))}))},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Jt()},t.prototype.sort=function(e){return Tr(Qe(this,e))},t.prototype.sortBy=function(e,t){return Tr(Qe(this,t,e))},t.prototype.map=function(e,t){var r=this;return this.withMutations((function(n){n.forEach((function(i,a){n.set(a,e.call(t,i,a,r))}))}))},t.prototype.__iterator=function(e,t){return new Gt(this,e,t)},t.prototype.__iterate=function(e,t){var r=this,n=0;return this._root&&this._root.iterate((function(t){return n++,e(t[1],t[0],r)}),t),n},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Xt(this.size,this._root,e,this.__hash):0===this.size?Jt():(this.__ownerID=e,this.__altered=!1,this)},t}(x);Ft.isMap=le;var Bt=Ft.prototype;Bt[ue]=!0,Bt[n]=Bt.remove,Bt.removeAll=Bt.deleteAll,Bt.setIn=yt,Bt.removeIn=Bt.deleteIn=mt,Bt.update=vt,Bt.updateIn=_t,Bt.merge=Bt.concat=wt,Bt.mergeWith=Tt,Bt.mergeDeep=Pt,Bt.mergeDeepWith=Nt,Bt.mergeIn=Dt,Bt.mergeDeepIn=jt,Bt.withMutations=Ct,Bt.wasAltered=kt,Bt.asImmutable=Lt,Bt["@@transducer/init"]=Bt.asMutable=Mt,Bt["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},Bt["@@transducer/result"]=function(e){return e.asImmutable()};var Ut=function(e,t){this.ownerID=e,this.entries=t};Ut.prototype.get=function(e,t,r,n){for(var i=this.entries,a=0,o=i.length;a=nr)return function(e,t,r,n){e||(e=new u);for(var i=new $t(e,me(r),[r,n]),a=0;a>>e)&o),s=this.bitmap;return s&a?this.nodes[tr(s&a-1)].get(e+i,t,r,n):n},qt.prototype.update=function(e,t,r,n,c,u,l){void 0===r&&(r=me(n));var d=(0===t?r:r>>>t)&o,h=1<=ir)return function(e,t,r,n,i){for(var o=0,s=new Array(a),c=0;0!==r;c++,r>>>=1)s[c]=1&r?t[o++]:void 0;return s[n]=i,new Vt(e,o+1,s)}(e,g,p,d,b);if(f&&!b&&2===g.length&&Zt(g[1^y]))return g[1^y];if(f&&b&&1===g.length&&Zt(b))return b;var v=e&&e===this.ownerID,_=f?b?p:p^h:p|h,w=f?b?rr(g,y,b,v):function(e,t,r){var n=e.length-1;if(r&&t===n)return e.pop(),e;for(var i=new Array(n),a=0,o=0;o>>e)&o,s=this.nodes[a];return s?s.get(e+i,t,r,n):n},Vt.prototype.update=function(e,t,r,n,a,c,u){void 0===r&&(r=me(n));var l=(0===t?r:r>>>t)&o,d=a===s,h=this.nodes,p=h[l];if(d&&!p)return this;var f=Yt(p,e,t+i,r,n,a,c,u);if(f===p)return this;var y=this.count;if(p){if(!f&&--y>>r)&o,u=(0===r?n:n>>>r)&o,l=c===u?[er(e,t,r+i,n,a)]:(s=new $t(t,n,a),c>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,127&(e+=e>>8)+(e>>16)}function rr(e,t,r,n){var i=n?e:Ze(e);return i[t]=r,i}var nr=a/4,ir=a/2,ar=a/4,or="@@__IMMUTABLE_LIST__@@";function sr(e){return Boolean(e&&e[or])}var cr=function(e){function t(t){var r=yr();if(null==t)return r;if(sr(t))return t;var n=e(t),o=n.size;return 0===o?r:(tt(o),o>0&&o=0&&e=e.size||t<0)return e.withMutations((function(e){t<0?vr(e,t).set(0,r):vr(e,0,t+1).set(t,r)}));t+=e._origin;var n=e._tail,i=e._root,a={value:!1};return t>=_r(e._capacity)?n=gr(n,e.__ownerID,0,t,r,a):i=gr(i,e.__ownerID,e._level,t,r,a),a.value?e.__ownerID?(e._root=i,e._tail=n,e.__hash=void 0,e.__altered=!0,e):fr(e._origin,e._capacity,e._level,i,n):e}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=i,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):yr()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(r){vr(r,0,t+e.length);for(var n=0;n>>t&o;if(n>=this.array.length)return new lr([],e);var a,s=0===n;if(t>0){var c=this.array[n];if((a=c&&c.removeBefore(e,t-i,r))===c&&s)return this}if(s&&!a)return this;var u=mr(this,e);if(!s)for(var l=0;l>>t&o;if(a>=this.array.length)return this;if(t>0){var s=this.array[a];if((n=s&&s.removeAfter(e,t-i,r))===s&&a===this.array.length-1)return this}var c=mr(this,e);return c.array.splice(a+1),n&&(c.array[a]=n),c};var dr,hr={};function pr(e,t){var r=e._origin,n=e._capacity,o=_r(n),s=e._tail;return function e(c,u,l){return 0===u?function(e,i){var c=i===o?s&&s.array:e&&e.array,u=i>r?0:r-i,l=n-i;return l>a&&(l=a),function(){if(u===l)return hr;var e=t?--l:u++;return c&&c[e]}}(c,l):function(o,s,c){var u,l=o&&o.array,d=c>r?0:r-c>>s,h=1+(n-c>>s);return h>a&&(h=a),function(){for(;;){if(u){var r=u();if(r!==hr)return r;u=null}if(d===h)return hr;var n=t?--h:d++;u=e(l&&l[n],s-i,c+(n<>>r&o,d=e&&l0){var h=e&&e.array[l],p=gr(h,t,r-i,n,a,s);return p===h?e:((u=mr(e,t)).array[l]=p,u)}return d&&e.array[l]===a?e:(s&&c(s),u=mr(e,t),void 0===a&&l===u.array.length-1?u.array.pop():u.array[l]=a,u)}function mr(e,t){return t&&e&&t===e.ownerID?e:new lr(e?e.array.slice():[],t)}function br(e,t){if(t>=_r(e._capacity))return e._tail;if(t<1<0;)r=r.array[t>>>n&o],n-=i;return r}}function vr(e,t,r){void 0!==t&&(t|=0),void 0!==r&&(r|=0);var n=e.__ownerID||new u,a=e._origin,s=e._capacity,c=a+t,l=void 0===r?s:r<0?s+r:a+r;if(c===a&&l===s)return e;if(c>=l)return e.clear();for(var d=e._level,h=e._root,p=0;c+p<0;)h=new lr(h&&h.array.length?[void 0,h]:[],n),p+=1<<(d+=i);p&&(c+=p,a+=p,l+=p,s+=p);for(var f=_r(s),y=_r(l);y>=1<f?new lr([],n):g;if(g&&y>f&&ci;v-=i){var _=f>>>v&o;b=b.array[_]=mr(b.array[_],n)}b.array[f>>>i&o]=g}if(l=y)c-=y,l-=y,d=i,h=null,m=m&&m.removeBefore(n,0,c);else if(c>a||y>>d&o;if(w!==y>>>d&o)break;w&&(p+=(1<a&&(h=h.removeBefore(n,d,c-p)),h&&y>>i<=a&&c.size>=2*o.size?(n=(i=c.filter((function(e,t){return void 0!==e&&u!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(n.__ownerID=i.__ownerID=e.__ownerID)):(n=o.remove(t),i=u===c.size-1?c.pop():c.set(u,void 0))}else if(l){if(r===c.get(u)[1])return e;n=o,i=c.set(u,[t,r])}else n=o.set(t,c.size),i=c.set(c.size,[t,r]);return e.__ownerID?(e.size=n.size,e._map=n,e._list=i,e.__hash=void 0,e.__altered=!0,e):Sr(n,i)}Tr.isOrderedMap=de,Tr.prototype[C]=!0,Tr.prototype[n]=Tr.prototype.remove;var xr="@@__IMMUTABLE_STACK__@@";function Ar(e){return Boolean(e&&e[xr])}var Rr=function(e){function t(e){return null==e?Dr():Ar(e)?e:Dr().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var r=this._head;for(e=d(this,e);r&&e--;)r=r.next;return r?r.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:e[n],next:r};return this.__ownerID?(this.size=t,this._head=r,this.__hash=void 0,this.__altered=!0,this):Nr(t,r)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&Ar(t))return t;tt(t.size);var r=this.size,n=this._head;return t.__iterate((function(e){r++,n={value:e,next:n}}),!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):Nr(r,n)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Dr()},t.prototype.slice=function(t,r){if(p(t,r,this.size))return this;var n=f(t,this.size);if(y(r,this.size)!==this.size)return e.prototype.slice.call(this,t,r);for(var i=this.size-n,a=this._head;n--;)a=a.next;return this.__ownerID?(this.size=i,this._head=a,this.__hash=void 0,this.__altered=!0,this):Nr(i,a)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Nr(this.size,this._head,e,this.__hash):0===this.size?Dr():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var r=this;if(t)return new te(this.toArray()).__iterate((function(t,n){return e(t,n,r)}),t);for(var n=0,i=this._head;i&&!1!==e(i.value,n++,this);)i=i.next;return n},t.prototype.__iterator=function(e,t){if(t)return new te(this.toArray()).__iterator(e,t);var r=0,n=this._head;return new V((function(){if(n){var t=n.value;return n=n.next,Q(e,r++,t)}return{value:void 0,done:!0}}))},t}(A);Rr.isStack=Ar;var Ir,Pr=Rr.prototype;function Nr(e,t,r,n){var i=Object.create(Pr);return i.size=e,i._head=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Dr(){return Ir||(Ir=Nr(0))}Pr[xr]=!0,Pr.shift=Pr.pop,Pr.unshift=Pr.push,Pr.unshiftAll=Pr.pushAll,Pr.withMutations=Ct,Pr.wasAltered=kt,Pr.asImmutable=Lt,Pr["@@transducer/init"]=Pr.asMutable=Mt,Pr["@@transducer/step"]=function(e,t){return e.unshift(t)},Pr["@@transducer/result"]=function(e){return e.asImmutable()};var jr="@@__IMMUTABLE_SET__@@";function Cr(e){return Boolean(e&&e[jr])}function Mr(e){return Cr(e)&&M(e)}function Lr(e,t){if(e===t)return!0;if(!v(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||w(e)!==w(t)||S(e)!==S(t)||M(e)!==M(t))return!1;if(0===e.size&&0===t.size)return!0;var r=!O(e);if(M(e)){var n=e.entries();return t.every((function(e,t){var i=n.next().value;return i&&pe(i[1],e)&&(r||pe(i[0],t))}))&&n.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var a=e;e=t,t=a}var o=!0,c=t.__iterate((function(t,n){if(r?!e.has(t):i?!pe(t,e.get(n,s)):!pe(e.get(n,s),t))return o=!1,!1}));return o&&e.size===c}function kr(e,t){var r=function(r){e.prototype[r]=t[r]};return Object.keys(t).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(r),e}function Fr(e){if(!e||"object"!=typeof e)return e;if(!v(e)){if(!at(e))return e;e=W(e)}if(w(e)){var t={};return e.__iterate((function(e,r){t[r]=Fr(e)})),t}var r=[];return e.__iterate((function(e){r.push(Fr(e))})),r}var Br=function(e){function t(t){return null==t?$r():Cr(t)&&!M(t)?t:$r().withMutations((function(r){var n=e(t);tt(n.size),n.forEach((function(e){return r.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(x(e).keySeq())},t.intersect=function(e){return(e=E(e).toArray()).length?qr.intersect.apply(t(e.pop()),e):$r()},t.union=function(e){return(e=E(e).toArray()).length?qr.union.apply(t(e.pop()),e):$r()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Vr(this,this._map.set(e,e))},t.prototype.remove=function(e){return Vr(this,this._map.remove(e))},t.prototype.clear=function(){return Vr(this,this._map.clear())},t.prototype.map=function(e,t){var r=this,n=!1,i=Vr(this,this._map.mapEntries((function(i){var a=i[1],o=e.call(t,a,a,r);return o!==a&&(n=!0),[o,o]}),t));return n?i:this},t.prototype.union=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(r){for(var n=0;n=0&&t=0&&r>>-15,461845907),t=fe(t<<13|t>>>-13,5),t=fe((t=t+3864292196^e)^t>>>16,2246822507),t=ye((t=fe(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(r?t?function(e,t){n=31*n+un(me(e),me(t))|0}:function(e,t){n=n+un(me(e),me(t))|0}:t?function(e){n=31*n+me(e)|0}:function(e){n=n+me(e)|0}),n)}(this))}});var Wr=E.prototype;Wr[b]=!0,Wr[q]=Wr.values,Wr.toJSON=Wr.toArray,Wr.__toStringMapper=ot,Wr.inspect=Wr.toSource=function(){return this.toString()},Wr.chain=Wr.flatMap,Wr.contains=Wr.includes,kr(x,{flip:function(){return ze(this,Le(this))},mapEntries:function(e,t){var r=this,n=0;return ze(this,this.toSeq().map((function(i,a){return e.call(t,[a,i],n++,r)})).fromEntrySeq())},mapKeys:function(e,t){var r=this;return ze(this,this.toSeq().flip().map((function(n,i){return e.call(t,n,i,r)})).flip())}});var Yr=x.prototype;Yr[_]=!0,Yr[q]=Wr.entries,Yr.toJSON=Jr,Yr.__toStringMapper=function(e,t){return ot(t)+": "+ot(e)},kr(A,{toKeyedSeq:function(){return new De(this,!1)},filter:function(e,t){return ze(this,Be(this,e,t,!1))},findIndex:function(e,t){var r=this.findEntry(e,t);return r?r[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return ze(this,Fe(this,!1))},slice:function(e,t){return ze(this,Ue(this,e,t,!1))},splice:function(e,t){var r=arguments.length;if(t=Math.max(t||0,0),0===r||2===r&&!t)return this;e=f(e,e<0?this.count():this.size);var n=this.slice(0,e);return ze(this,1===r?n:n.concat(Ze(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var r=this.findLastEntry(e,t);return r?r[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return ze(this,Ve(this,e,!1))},get:function(e,t){return(e=d(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,r){return r===e}),void 0,t)},has:function(e){return(e=d(this,e))>=0&&(void 0!==this.size?this.size===1/0||et?-1:0}function un(e,t){return e^t+2654435769+(e<<6)+(e>>2)}en.has=Wr.includes,en.contains=en.includes,en.keys=en.values,kr(Y,Yr),kr(Z,Zr),kr(ee,en);var ln=function(e){function t(e){return null==e?fn():Mr(e)?e:fn().withMutations((function(t){var r=R(e);tt(r.size),r.forEach((function(e){return t.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(x(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(Br);ln.isOrderedSet=Mr;var dn,hn=ln.prototype;function pn(e,t){var r=Object.create(hn);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}function fn(){return dn||(dn=pn(Or()))}hn[C]=!0,hn.zip=Zr.zip,hn.zipWith=Zr.zipWith,hn.zipAll=Zr.zipAll,hn.__empty=fn,hn.__make=pn;var yn={LeftThenRight:-1,RightThenLeft:1},gn=function(e,t){var r;!function(e){if(D(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(j(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===e||"object"!=typeof e)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(e);var n=function(a){var o=this;if(a instanceof n)return a;if(!(this instanceof n))return new n(a);if(!r){r=!0;var s=Object.keys(e),c=i._indices={};i._name=t,i._keys=s,i._defaultValues=e;for(var u=0;u2?[]:void 0,{"":e})}function En(e,t,r,n,i,a){if("string"!=typeof r&&!j(r)&&(J(r)||H(r)||it(r))){if(~e.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");e.push(r),i&&""!==n&&i.push(n);var o=t.call(a,n,W(r).map((function(n,a){return En(e,t,n,a,i,r)})),i&&i.slice());return e.pop(),i&&i.pop(),o}return r}function xn(e,t){return S(t)?t.toList():w(t)?t.toMap():t.toSet()}var An="4.3.5",Rn=E;const In={version:An,Collection:E,Iterable:E,Seq:W,Map:Ft,OrderedMap:Tr,List:cr,Stack:Rr,Set:Br,OrderedSet:ln,PairSorting:yn,Record:gn,Range:Gr,Repeat:Sn,is:pe,fromJS:On,hash:me,isImmutable:j,isCollection:v,isKeyed:w,isIndexed:S,isAssociative:O,isOrdered:M,isValueObject:he,isPlainObject:it,isSeq:P,isList:sr,isMap:le,isOrderedMap:de,isStack:Ar,isSet:Cr,isOrderedSet:Mr,isRecord:D,get:ct,getIn:zr,has:st,hasIn:Xr,merge:Ot,mergeDeep:xt,mergeWith:Et,mergeDeepWith:At,remove:lt,removeIn:gt,set:dt,setIn:ft,update:bt,updateIn:ht}},35615:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},76605:e=>{"use strict";const t=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;t.writable=e=>t(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,t.readable=e=>t(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,t.duplex=e=>t.writable(e)&&t.readable(e),t.transform=e=>t.duplex(e)&&"function"==typeof e._transform,e.exports=t},27202:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(85346),t),i(r(40905),t),i(r(76920),t),i(r(11971),t),i(r(89715),t),i(r(39426),t),i(r(45512),t)},85346:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextParser=void 0,r(17082);const n=r(9929),i=r(40905),a=r(76920),o=r(39426),s=r(45512);class c{constructor(e){e=e||{},this.documentLoader=e.documentLoader||new a.FetchDocumentLoader,this.documentCache={},this.validateContext=!e.skipValidation,this.expandContentTypeToBase=!!e.expandContentTypeToBase,this.remoteContextsDepthLimit=e.remoteContextsDepthLimit||32,this.redirectSchemaOrgHttps=!("redirectSchemaOrgHttps"in e)||!!e.redirectSchemaOrgHttps}static validateLanguage(e,t,r){if("string"!=typeof e)throw new i.ErrorCoded(`The value of an '@language' must be a string, got '${JSON.stringify(e)}'`,r);if(!s.Util.REGEX_LANGUAGE_TAG.test(e)){if(t)throw new i.ErrorCoded(`The value of an '@language' must be a valid language tag, got '${JSON.stringify(e)}'`,r);return!1}return!0}static validateDirection(e,t){if("string"!=typeof e)throw new i.ErrorCoded(`The value of an '@direction' must be a string, got '${JSON.stringify(e)}'`,i.ERROR_CODES.INVALID_BASE_DIRECTION);if(!s.Util.REGEX_DIRECTION_TAG.test(e)){if(t)throw new i.ErrorCoded(`The value of an '@direction' must be 'ltr' or 'rtl', got '${JSON.stringify(e)}'`,i.ERROR_CODES.INVALID_BASE_DIRECTION);return!1}return!0}idifyReverseTerms(e){for(const t of Object.keys(e)){let r=e[t];if(r&&"object"==typeof r&&r["@reverse"]&&!r["@id"]){if("string"!=typeof r["@reverse"]||s.Util.isValidKeyword(r["@reverse"]))throw new i.ErrorCoded(`Invalid @reverse value, must be absolute IRI or blank node: '${r["@reverse"]}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);r=e[t]=Object.assign(Object.assign({},r),{"@id":r["@reverse"]}),r["@id"]=r["@reverse"],s.Util.isPotentialKeyword(r["@reverse"])?delete r["@reverse"]:r["@reverse"]=!0}}return e}expandPrefixedTerms(e,t,r){const n=e.getContextRaw();for(const a of r||Object.keys(n))if(s.Util.EXPAND_KEYS_BLACKLIST.indexOf(a)<0&&!s.Util.isReservedInternalKeyword(a)){const r=n[a];if(s.Util.isPotentialKeyword(a)&&s.Util.ALIAS_DOMAIN_BLACKLIST.indexOf(a)>=0&&("@type"!==a||"object"==typeof n[a]&&!n[a]["@protected"]&&"@set"!==n[a]["@container"]))throw new i.ErrorCoded(`Keywords can not be aliased to something else.\nTried mapping ${a} to ${JSON.stringify(r)}`,i.ERROR_CODES.KEYWORD_REDEFINITION);if(s.Util.ALIAS_RANGE_BLACKLIST.indexOf(s.Util.getContextValueId(r))>=0)throw new i.ErrorCoded(`Aliasing to certain keywords is not allowed.\nTried mapping ${a} to ${JSON.stringify(r)}`,i.ERROR_CODES.INVALID_KEYWORD_ALIAS);if(r&&s.Util.isPotentialKeyword(s.Util.getContextValueId(r))&&!0===r["@prefix"])throw new i.ErrorCoded(`Tried to use keyword aliases as prefix: '${a}': '${JSON.stringify(r)}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);for(;s.Util.isPrefixValue(n[a]);){const r=n[a];let i=!1;if("string"==typeof r)n[a]=e.expandTerm(r,!0),i=i||r!==n[a];else{const o=r["@id"],c=r["@type"],u=!("@prefix"in r)||s.Util.isValidIri(a);if("@id"in r)null!=o&&"string"==typeof o&&(n[a]=Object.assign(Object.assign({},n[a]),{"@id":e.expandTerm(o,!0)}),i=i||o!==n[a]["@id"]);else if(!s.Util.isPotentialKeyword(a)&&u){const t=e.expandTerm(a,!0);t!==a&&(n[a]=Object.assign(Object.assign({},n[a]),{"@id":t}),i=!0)}if(c&&"string"==typeof c&&"@vocab"!==c&&(!r["@container"]||!r["@container"]["@type"])&&u){let r=e.expandTerm(c,!0);t&&c===r&&(r=e.expandTerm(c,!1)),r!==c&&(i=!0,n[a]=Object.assign(Object.assign({},n[a]),{"@type":r}))}}if(!i)break}}}normalize(e,{processingMode:t,normalizeLanguageTags:r}){if(r||1===t)for(const t of Object.keys(e))if("@language"===t&&"string"==typeof e[t])e[t]=e[t].toLowerCase();else{const r=e[t];if(r&&"object"==typeof r&&"string"==typeof r["@language"]){const n=r["@language"].toLowerCase();n!==r["@language"]&&(e[t]=Object.assign(Object.assign({},r),{"@language":n}))}}}containersToHash(e){for(const t of Object.keys(e)){const r=e[t];if(r&&"object"==typeof r)if("string"==typeof r["@container"])e[t]=Object.assign(Object.assign({},r),{"@container":{[r["@container"]]:!0}});else if(Array.isArray(r["@container"])){const n={};for(const e of r["@container"])n[e]=!0;e[t]=Object.assign(Object.assign({},r),{"@container":n})}}}applyScopedProtected(e,{processingMode:t},r){if(t&&t>=1.1&&e["@protected"]){for(const t of Object.keys(e))if(!s.Util.isReservedInternalKeyword(t)&&!s.Util.isPotentialKeyword(t)&&!s.Util.isTermProtected(e,t)){const n=e[t];n&&"object"==typeof n?"@protected"in e[t]||(e[t]=Object.assign(Object.assign({},e[t]),{"@protected":!0})):(e[t]={"@id":n,"@protected":!0},s.Util.isSimpleTermDefinitionPrefix(n,r)&&(e[t]=Object.assign(Object.assign({},e[t]),{"@prefix":!0})))}delete e["@protected"]}}validateKeywordRedefinitions(e,t,r,n){for(const r of null!=n?n:Object.keys(t))if(s.Util.isTermProtected(e,r)&&("string"==typeof t[r]?t[r]={"@id":t[r],"@protected":!0}:t[r]=Object.assign(Object.assign({},t[r]),{"@protected":!0}),!s.Util.deepEqual(e[r],t[r])))throw new i.ErrorCoded(`Attempted to override the protected keyword ${r} from ${JSON.stringify(s.Util.getContextValueId(e[r]))} to ${JSON.stringify(s.Util.getContextValueId(t[r]))}`,i.ERROR_CODES.PROTECTED_TERM_REDEFINITION)}validate(e,{processingMode:t}){for(const r of Object.keys(e)){if(s.Util.isReservedInternalKeyword(r))continue;if(""===r)throw new i.ErrorCoded(`The empty term is not allowed, got: '${r}': '${JSON.stringify(e[r])}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);const n=e[r],a=typeof n;if(s.Util.isPotentialKeyword(r)){switch(r.substr(1)){case"vocab":if(null!==n&&"string"!==a)throw new i.ErrorCoded(`Found an invalid @vocab IRI: ${n}`,i.ERROR_CODES.INVALID_VOCAB_MAPPING);break;case"base":if(null!==n&&"string"!==a)throw new i.ErrorCoded(`Found an invalid @base IRI: ${e[r]}`,i.ERROR_CODES.INVALID_BASE_IRI);break;case"language":null!==n&&c.validateLanguage(n,!0,i.ERROR_CODES.INVALID_DEFAULT_LANGUAGE);break;case"version":if(null!==n&&"number"!==a)throw new i.ErrorCoded(`Found an invalid @version number: ${n}`,i.ERROR_CODES.INVALID_VERSION_VALUE);break;case"direction":null!==n&&c.validateDirection(n,!0);break;case"propagate":if(1===t)throw new i.ErrorCoded(`Found an illegal @propagate keyword: ${n}`,i.ERROR_CODES.INVALID_CONTEXT_ENTRY);if(null!==n&&"boolean"!==a)throw new i.ErrorCoded(`Found an invalid @propagate value: ${n}`,i.ERROR_CODES.INVALID_PROPAGATE_VALUE)}if(s.Util.isValidKeyword(r)&&s.Util.isValidKeyword(s.Util.getContextValueId(n)))throw new i.ErrorCoded(`Illegal keyword alias in term value, found: '${r}': '${s.Util.getContextValueId(n)}'`,i.ERROR_CODES.KEYWORD_REDEFINITION)}else if(null!==n)switch(a){case"string":if(s.Util.getPrefix(n,e)===r)throw new i.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.CYCLIC_IRI_MAPPING);if(s.Util.isValidIriWeak(r)){if("@type"===n)throw new i.ErrorCoded(`IRIs can not be mapped to @type, found: '${r}': '${n}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.isValidIri(n)&&n!==new o.JsonLdContextNormalized(e).expandTerm(r))throw new i.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${r}': '${n}'`,i.ERROR_CODES.INVALID_IRI_MAPPING)}break;case"object":if(!(s.Util.isCompactIri(r)||"@id"in n||("@id"===n["@type"]?e["@base"]:e["@vocab"])))throw new i.ErrorCoded(`Missing @id in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);for(const u of Object.keys(n)){const l=n[u];if(l)switch(u){case"@id":if(s.Util.isValidKeyword(l)&&"@type"!==l&&"@id"!==l&&"@graph"!==l&&"@nest"!==l)throw new i.ErrorCoded(`Illegal keyword alias in term value, found: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.isValidIriWeak(r)){if("@type"===l)throw new i.ErrorCoded(`IRIs can not be mapped to @type, found: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.isValidIri(l)&&l!==new o.JsonLdContextNormalized(e).expandTerm(r))throw new i.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING)}if("string"!=typeof l)throw new i.ErrorCoded(`Detected non-string @id in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.getPrefix(l,e)===r)throw new i.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.CYCLIC_IRI_MAPPING);break;case"@type":if("@type"===n["@container"]&&"@id"!==l&&"@vocab"!==l)throw new i.ErrorCoded(`@container: @type only allows @type: @id or @vocab, but got: '${r}': '${l}'`,i.ERROR_CODES.INVALID_TYPE_MAPPING);if("string"!=typeof l)throw new i.ErrorCoded(`The value of an '@type' must be a string, got '${JSON.stringify(a)}'`,i.ERROR_CODES.INVALID_TYPE_MAPPING);if(!("@id"===l||"@vocab"===l||1!==t&&"@json"===l||1!==t&&"@none"===l||"_"!==l[0]&&s.Util.isValidIri(l)))throw new i.ErrorCoded(`A context @type must be an absolute IRI, found: '${r}': '${l}'`,i.ERROR_CODES.INVALID_TYPE_MAPPING);break;case"@reverse":if("string"==typeof l&&n["@id"]&&n["@id"]!==l)throw new i.ErrorCoded(`Found non-matching @id and @reverse term values in '${r}':'${l}' and '${n["@id"]}'`,i.ERROR_CODES.INVALID_REVERSE_PROPERTY);if("@nest"in n)throw new i.ErrorCoded(`@nest is not allowed in the reverse property '${r}'`,i.ERROR_CODES.INVALID_REVERSE_PROPERTY);break;case"@container":if(1===t&&(Object.keys(l).length>1||s.Util.CONTAINERS_1_0.indexOf(Object.keys(l)[0])<0))throw new i.ErrorCoded(`Invalid term @container for '${r}' ('${Object.keys(l)}') in 1.0, must be only one of ${s.Util.CONTAINERS_1_0.join(", ")}`,i.ERROR_CODES.INVALID_CONTAINER_MAPPING);for(const e of Object.keys(l)){if("@list"===e&&n["@reverse"])throw new i.ErrorCoded(`Term value can not be @container: @list and @reverse at the same time on '${r}'`,i.ERROR_CODES.INVALID_REVERSE_PROPERTY);if(s.Util.CONTAINERS.indexOf(e)<0)throw new i.ErrorCoded(`Invalid term @container for '${r}' ('${e}'), must be one of ${s.Util.CONTAINERS.join(", ")}`,i.ERROR_CODES.INVALID_CONTAINER_MAPPING)}break;case"@language":c.validateLanguage(l,!0,i.ERROR_CODES.INVALID_LANGUAGE_MAPPING);break;case"@direction":c.validateDirection(l,!0);break;case"@prefix":if(null!==l&&"boolean"!=typeof l)throw new i.ErrorCoded(`Found an invalid term @prefix boolean in: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_PREFIX_VALUE);if(!("@id"in n)&&!s.Util.isValidIri(r))throw new i.ErrorCoded(`Invalid @prefix definition for '${r}' ('${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);break;case"@index":if(1===t||!n["@container"]||!n["@container"]["@index"])throw new i.ErrorCoded(`Attempt to add illegal key to value object: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);break;case"@nest":if(s.Util.isPotentialKeyword(l)&&"@nest"!==l)throw new i.ErrorCoded(`Found an invalid term @nest value in: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_NEST_VALUE)}}break;default:throw new i.ErrorCoded(`Found an invalid term value: '${r}': '${n}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION)}}}applyBaseEntry(e,t,r){return"string"==typeof e||(r&&!("@base"in e)&&t.parentContext&&"object"==typeof t.parentContext&&"@base"in t.parentContext&&(e["@base"]=t.parentContext["@base"],t.parentContext["@__baseDocument"]&&(e["@__baseDocument"]=!0)),t.baseIRI&&!t.external&&("@base"in e?null===e["@base"]||"string"!=typeof e["@base"]||s.Util.isValidIri(e["@base"])||(e["@base"]=(0,n.resolve)(e["@base"],t.parentContext&&t.parentContext["@base"]||t.baseIRI)):(e["@base"]=t.baseIRI,e["@__baseDocument"]=!0))),e}normalizeContextIri(e,t){if(!s.Util.isValidIri(e))try{e=(0,n.resolve)(e,t)}catch(t){throw new Error(`Invalid context IRI: ${e}`)}return this.redirectSchemaOrgHttps&&e.startsWith("http://schema.org")&&(e="https://schema.org/"),e}async parseInnerContexts(e,t,r){for(const n of null!=r?r:Object.keys(e)){const r=e[n];if(r&&"object"==typeof r&&"@context"in r&&null!==r["@context"]&&!t.ignoreScopedContexts){if(this.validateContext)try{const i=Object.assign(Object.assign({},e),{[n]:Object.assign({},e[n])});delete i[n]["@context"],await this.parse(r["@context"],Object.assign(Object.assign({},t),{external:!1,parentContext:i,ignoreProtection:!0,ignoreRemoteScopedContexts:!0,ignoreScopedContexts:!0}))}catch(e){throw new i.ErrorCoded(e.message,i.ERROR_CODES.INVALID_SCOPED_CONTEXT)}e[n]=Object.assign(Object.assign({},r),{"@context":(await this.parse(r["@context"],Object.assign(Object.assign({},t),{external:!1,minimalProcessing:!0,ignoreRemoteScopedContexts:!0,parentContext:e}))).getContextRaw()})}}return e}async parse(e,t={},r={}){const{baseIRI:n,parentContext:a,external:u,processingMode:l=c.DEFAULT_PROCESSING_MODE,normalizeLanguageTags:d,ignoreProtection:h,minimalProcessing:p}=t,f=t.remoteContexts||{};if(Object.keys(f).length>=this.remoteContextsDepthLimit)throw new i.ErrorCoded("Detected an overflow in remote context inclusions: "+Object.keys(f),i.ERROR_CODES.CONTEXT_OVERFLOW);if(null==e){if(!h&&a&&s.Util.hasProtectedTerms(a))throw new i.ErrorCoded("Illegal context nullification when terms are protected",i.ERROR_CODES.INVALID_CONTEXT_NULLIFICATION);return new o.JsonLdContextNormalized(this.applyBaseEntry({},t,!1))}if("string"==typeof e){const r=this.normalizeContextIri(e,n),i=this.getOverriddenLoad(r,t);if(i)return new o.JsonLdContextNormalized(i);const a=await this.parse(await this.load(r),Object.assign(Object.assign({},t),{baseIRI:r,external:!0,remoteContexts:Object.assign(Object.assign({},f),{[r]:!0})}));return this.applyBaseEntry(a.getContextRaw(),t,!0),a}if(Array.isArray(e)){const r=[],i=await Promise.all(e.map(((e,i)=>{if("string"==typeof e){const a=this.normalizeContextIri(e,n);r[i]=a;return this.getOverriddenLoad(a,t)||this.load(a)}return e})));if(p)return new o.JsonLdContextNormalized(i);const s=await i.reduce(((e,n,a)=>e.then((e=>this.parse(n,Object.assign(Object.assign({},t),{baseIRI:r[a]||t.baseIRI,external:!!r[a]||t.external,parentContext:e.getContextRaw(),remoteContexts:r[a]?Object.assign(Object.assign({},f),{[r[a]]:!0}):f}),{skipValidation:a=1.1))throw new i.ErrorCoded("Context importing is not supported in JSON-LD 1.0",i.ERROR_CODES.INVALID_CONTEXT_ENTRY);if("string"!=typeof e["@import"])throw new i.ErrorCoded("An @import value must be a string, but got "+typeof e["@import"],i.ERROR_CODES.INVALID_IMPORT_VALUE);f=await this.loadImportContext(this.normalizeContextIri(e["@import"],n)),delete e["@import"]}this.applyScopedProtected(f,{processingMode:l},o.defaultExpandOptions);const y=Object.assign(f,e);this.idifyReverseTerms(y),this.normalize(y,{processingMode:l,normalizeLanguageTags:d}),this.applyScopedProtected(y,{processingMode:l},o.defaultExpandOptions);const g=Object.keys(y),m=[];if("object"==typeof a)for(const e in a)e in y?m.push(e):y[e]=a[e];await this.parseInnerContexts(y,t,g);const b=new o.JsonLdContextNormalized(y);return(y&&y["@version"]||c.DEFAULT_PROCESSING_MODE)>=1.1&&(e["@vocab"]&&"string"==typeof e["@vocab"]||""===e["@vocab"])&&(a&&"@vocab"in a&&e["@vocab"].indexOf(":")<0?y["@vocab"]=a["@vocab"]+e["@vocab"]:(s.Util.isCompactIri(e["@vocab"])||e["@vocab"]in y)&&(y["@vocab"]=b.expandTerm(e["@vocab"],!0))),this.expandPrefixedTerms(b,this.expandContentTypeToBase,g),!h&&a&&l>=1.1&&this.validateKeywordRedefinitions(a,y,o.defaultExpandOptions,m),this.validateContext&&!r.skipValidation&&this.validate(y,{processingMode:l}),b}throw new i.ErrorCoded(`Tried parsing a context that is not a string, array or object, but got ${e}`,i.ERROR_CODES.INVALID_LOCAL_CONTEXT)}async load(e){const t=this.documentCache[e];if(t)return t;let r;try{r=await this.documentLoader.load(e)}catch(t){throw new i.ErrorCoded(`Failed to load remote context ${e}: ${t.message}`,i.ERROR_CODES.LOADING_REMOTE_CONTEXT_FAILED)}if(!("@context"in r))throw new i.ErrorCoded(`Missing @context in remote context at ${e}`,i.ERROR_CODES.INVALID_REMOTE_CONTEXT);return this.documentCache[e]=r["@context"]}getOverriddenLoad(e,t){if(e in(t.remoteContexts||{})){if(t.ignoreRemoteScopedContexts)return e;throw new i.ErrorCoded("Detected a cyclic context inclusion of "+e,i.ERROR_CODES.RECURSIVE_CONTEXT_INCLUSION)}return null}async loadImportContext(e){let t=await this.load(e);if("object"!=typeof t||Array.isArray(t))throw new i.ErrorCoded("An imported context must be a single object: "+e,i.ERROR_CODES.INVALID_REMOTE_CONTEXT);if("@import"in t)throw new i.ErrorCoded("An imported context can not import another context: "+e,i.ERROR_CODES.INVALID_CONTEXT_ENTRY);return t=Object.assign({},t),this.containersToHash(t),t}}c.DEFAULT_PROCESSING_MODE=1.1,t.ContextParser=c},40905:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERROR_CODES=t.ErrorCoded=void 0;class r extends Error{constructor(e,t){super(e),this.code=t}}var n;t.ErrorCoded=r,(n=t.ERROR_CODES||(t.ERROR_CODES={})).COLLIDING_KEYWORDS="colliding keywords",n.CONFLICTING_INDEXES="conflicting indexes",n.CYCLIC_IRI_MAPPING="cyclic IRI mapping",n.INVALID_ID_VALUE="invalid @id value",n.INVALID_INDEX_VALUE="invalid @index value",n.INVALID_NEST_VALUE="invalid @nest value",n.INVALID_PREFIX_VALUE="invalid @prefix value",n.INVALID_PROPAGATE_VALUE="invalid @propagate value",n.INVALID_REVERSE_VALUE="invalid @reverse value",n.INVALID_IMPORT_VALUE="invalid @import value",n.INVALID_VERSION_VALUE="invalid @version value",n.INVALID_BASE_IRI="invalid base IRI",n.INVALID_CONTAINER_MAPPING="invalid container mapping",n.INVALID_CONTEXT_ENTRY="invalid context entry",n.INVALID_CONTEXT_NULLIFICATION="invalid context nullification",n.INVALID_DEFAULT_LANGUAGE="invalid default language",n.INVALID_INCLUDED_VALUE="invalid @included value",n.INVALID_IRI_MAPPING="invalid IRI mapping",n.INVALID_JSON_LITERAL="invalid JSON literal",n.INVALID_KEYWORD_ALIAS="invalid keyword alias",n.INVALID_LANGUAGE_MAP_VALUE="invalid language map value",n.INVALID_LANGUAGE_MAPPING="invalid language mapping",n.INVALID_LANGUAGE_TAGGED_STRING="invalid language-tagged string",n.INVALID_LANGUAGE_TAGGED_VALUE="invalid language-tagged value",n.INVALID_LOCAL_CONTEXT="invalid local context",n.INVALID_REMOTE_CONTEXT="invalid remote context",n.INVALID_REVERSE_PROPERTY="invalid reverse property",n.INVALID_REVERSE_PROPERTY_MAP="invalid reverse property map",n.INVALID_REVERSE_PROPERTY_VALUE="invalid reverse property value",n.INVALID_SCOPED_CONTEXT="invalid scoped context",n.INVALID_SCRIPT_ELEMENT="invalid script element",n.INVALID_SET_OR_LIST_OBJECT="invalid set or list object",n.INVALID_TERM_DEFINITION="invalid term definition",n.INVALID_TYPE_MAPPING="invalid type mapping",n.INVALID_TYPE_VALUE="invalid type value",n.INVALID_TYPED_VALUE="invalid typed value",n.INVALID_VALUE_OBJECT="invalid value object",n.INVALID_VALUE_OBJECT_VALUE="invalid value object value",n.INVALID_VOCAB_MAPPING="invalid vocab mapping",n.IRI_CONFUSED_WITH_PREFIX="IRI confused with prefix",n.KEYWORD_REDEFINITION="keyword redefinition",n.LOADING_DOCUMENT_FAILED="loading document failed",n.LOADING_REMOTE_CONTEXT_FAILED="loading remote context failed",n.MULTIPLE_CONTEXT_LINK_HEADERS="multiple context link headers",n.PROCESSING_MODE_CONFLICT="processing mode conflict",n.PROTECTED_TERM_REDEFINITION="protected term redefinition",n.CONTEXT_OVERFLOW="context overflow",n.INVALID_BASE_DIRECTION="invalid base direction",n.RECURSIVE_CONTEXT_INCLUSION="recursive context inclusion",n.INVALID_STREAMING_KEY_ORDER="invalid streaming key order",n.INVALID_EMBEDDED_NODE="invalid embedded node",n.INVALID_ANNOTATION="invalid annotation"},76920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchDocumentLoader=void 0,r(17082);const n=r(40905),i=r(75441),a=r(9929);t.FetchDocumentLoader=class{constructor(e){this.fetcher=e}async load(e){const t=await(this.fetcher||fetch)(e,{headers:new Headers({accept:"application/ld+json"})});if(t.ok&&t.headers){let r=t.headers.get("Content-Type");if(r){const e=r.indexOf(";");e>0&&(r=r.substr(0,e))}if("application/ld+json"===r)return await t.json();if(t.headers.has("Link")){let r;if(t.headers.forEach(((t,n)=>{if("link"===n){const n=(0,i.parse)(t);for(const t of n.get("type","application/ld+json"))if("alternate"===t.rel){if(r)throw new Error("Multiple JSON-LD alternate links were found on "+e);r=(0,a.resolve)(t.uri,e)}}})),r)return this.load(r)}throw new n.ErrorCoded(`Unsupported JSON-LD media type ${r}`,n.ERROR_CODES.LOADING_DOCUMENT_FAILED)}throw new Error(t.statusText||`Status code: ${t.status}`)}}},11971:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89715:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},39426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultExpandOptions=t.JsonLdContextNormalized=void 0;const n=r(9929),i=r(40905),a=r(45512);t.JsonLdContextNormalized=class{constructor(e){this.contextRaw=e}getContextRaw(){return this.contextRaw}expandTerm(e,r,o=t.defaultExpandOptions){const s=this.contextRaw[e];if(null===s||s&&null===s["@id"])return null;let c=!0;if(s&&r){const t=a.Util.getContextValueId(s);if(t&&t!==e){if("string"==typeof t&&(a.Util.isValidIri(t)||a.Util.isValidKeyword(t)))return t;a.Util.isPotentialKeyword(t)||(c=!1)}}const u=a.Util.getPrefix(e,this.contextRaw),l=this.contextRaw["@vocab"],d=(!!l||""===l)&&l.indexOf(":")<0,h=this.contextRaw["@base"],p=a.Util.isPotentialKeyword(e);if(u){const t=this.contextRaw[u],r=a.Util.getContextValueId(t);if(r){if("string"!=typeof t&&o.allowPrefixForcing){if("_"!==r[0]&&!p&&!t["@prefix"]&&!(e in this.contextRaw))return e}else if(!a.Util.isSimpleTermDefinitionPrefix(r,o))return e;return r+e.substr(u.length+1)}}else{if(r&&(l||""===l||o.allowVocabRelativeToBase&&h&&d)&&!p&&!a.Util.isCompactIri(e)){if(d){if(o.allowVocabRelativeToBase)return(l||h?(0,n.resolve)(l,h):"")+e;throw new i.ErrorCoded(`Relative vocab expansion for term '${e}' with vocab '${l}' is not allowed.`,i.ERROR_CODES.INVALID_VOCAB_MAPPING)}return l+e}if(!r&&h&&!p&&!a.Util.isCompactIri(e))return(0,n.resolve)(e,h)}if(c)return e;throw new i.ErrorCoded(`Invalid IRI mapping found for context entry '${e}': '${JSON.stringify(s)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING)}compactIri(e,t){if(t&&this.contextRaw["@vocab"]&&e.startsWith(this.contextRaw["@vocab"]))return e.substr(this.contextRaw["@vocab"].length);if(!t&&this.contextRaw["@base"]&&e.startsWith(this.contextRaw["@base"]))return e.substr(this.contextRaw["@base"].length);const r={prefix:"",suffix:e};for(const n in this.contextRaw){const i=this.contextRaw[n];if(i&&!a.Util.isPotentialKeyword(n)){const o=a.Util.getContextValueId(i);if(e.startsWith(o)){const i=e.substr(o.length);if(i)i.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;class r{static isCompactIri(e){return e.indexOf(":")>0&&!(e&&"#"===e[0])}static getPrefix(e,t){if(e&&"#"===e[0])return null;const r=e.indexOf(":");if(r>=0){if(e.length>r+1&&"/"===e.charAt(r+1)&&"/"===e.charAt(r+2))return null;const n=e.substr(0,r);if("_"===n)return null;if(t[n])return n}return null}static getContextValueId(e){if(null===e||"string"==typeof e)return e;return e["@id"]||null}static isSimpleTermDefinitionPrefix(e,t){return!r.isPotentialKeyword(e)&&(t.allowPrefixNonGenDelims||"string"==typeof e&&("_"===e[0]||r.isPrefixIriEndingWithGenDelim(e)))}static isPotentialKeyword(e){return"string"==typeof e&&r.KEYWORD_REGEX.test(e)}static isPrefixIriEndingWithGenDelim(e){return r.ENDS_WITH_GEN_DELIM.test(e)}static isPrefixValue(e){return e&&("string"==typeof e||e&&"object"==typeof e)}static isValidIri(e){return Boolean(e&&r.IRI_REGEX.test(e))}static isValidIriWeak(e){return!!e&&":"!==e[0]&&r.IRI_REGEX_WEAK.test(e)}static isValidKeyword(e){return r.VALID_KEYWORDS[e]}static isTermProtected(e,t){const r=e[t];return!("string"==typeof r)&&r&&r["@protected"]}static hasProtectedTerms(e){for(const t of Object.keys(e))if(r.isTermProtected(e,t))return!0;return!1}static isReservedInternalKeyword(e){return e.startsWith("@__")}static deepEqual(e,t){const r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every((r=>{const n=e[r],i=t[r];return n===i||null!==n&&null!==i&&"object"==typeof n&&"object"==typeof i&&this.deepEqual(n,i)}))}}r.IRI_REGEX=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^ "<>{}|\\\[\]`#]*(#[^#]*)?$/,r.IRI_REGEX_WEAK=/(?::[^:])|\//,r.KEYWORD_REGEX=/^@[a-z]+$/i,r.ENDS_WITH_GEN_DELIM=/[:/?#\[\]@]$/,r.REGEX_LANGUAGE_TAG=/^[a-zA-Z]+(-[a-zA-Z0-9]+)*$/,r.REGEX_DIRECTION_TAG=/^(ltr)|(rtl)$/,r.VALID_KEYWORDS={"@annotation":!0,"@base":!0,"@container":!0,"@context":!0,"@direction":!0,"@graph":!0,"@id":!0,"@import":!0,"@included":!0,"@index":!0,"@json":!0,"@language":!0,"@list":!0,"@nest":!0,"@none":!0,"@prefix":!0,"@propagate":!0,"@protected":!0,"@reverse":!0,"@set":!0,"@type":!0,"@value":!0,"@version":!0,"@vocab":!0},r.EXPAND_KEYS_BLACKLIST=["@base","@vocab","@language","@version","@direction"],r.ALIAS_DOMAIN_BLACKLIST=["@container","@graph","@id","@index","@list","@nest","@none","@prefix","@reverse","@set","@type","@value","@version"],r.ALIAS_RANGE_BLACKLIST=["@context","@preserve"],r.CONTAINERS=["@list","@set","@index","@language","@graph","@id","@type"],r.CONTAINERS_1_0=["@list","@set","@index"],t.Util=r},17082:function(){!function(e){!function(t){var r="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in e,o="ArrayBuffer"in e;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=f(t);return t.readAsArrayBuffer(e),r}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,r,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var T=[301,302,303,307,308];w.redirect=function(e,t){if(-1===T.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,r){return new Promise((function(n,a){var o=new v(e,r);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new w(i,r))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=h,e.Request=v,e.Response=w),t.Headers=h,t.Request=v,t.Response=w,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:this)},50631:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(90114),t)},46240:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextTree=void 0;class r{constructor(){this.subTrees={}}getContext(e){if(e.length>0){const[t,...r]=e,n=this.subTrees[t];if(n){const e=n.getContext(r);if(e)return e.then((({context:e,depth:t})=>({context:e,depth:t+1})))}}return this.context?this.context.then((e=>({context:e,depth:0}))):null}setContext(e,t){if(0===e.length)this.context=t;else{const[n,...i]=e;let a=this.subTrees[n];a||(a=this.subTrees[n]=new r),a.setContext(i,t)}}removeContext(e){this.setContext(e,null)}}t.ContextTree=r},90114:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonLdParser=void 0;const n=r(36885),i=r(27202),a=r(58521),o=r(11272),s=r(45947),c=r(62885),u=r(29997),l=r(66700),d=r(37071),h=r(48978),p=r(30643),f=r(58865),y=r(23787),g=r(30635),m=r(94382),b=r(24292),v=r(22135),_=r(75441),w=r(6042);class T extends a.Transform{constructor(e){super({readableObjectMode:!0}),e=e||{},this.options=e,this.parsingContext=new b.ParsingContext(Object.assign({parser:this},e)),this.util=new v.Util({dataFactory:e.dataFactory,parsingContext:this.parsingContext}),this.jsonParser=new n,this.contextJobs=[],this.typeJobs=[],this.contextAwaitingJobs=[],this.lastDepth=0,this.lastKeys=[],this.lastOnValueJob=Promise.resolve(),this.attachJsonParserListeners(),this.on("end",(()=>{void 0!==this.jsonParser.mode&&this.emit("error",new Error("Unclosed document"))}))}static fromHttpResponse(e,t,r,n){let a,o,s=["application/activity+json"];if(n&&n.wellKnownMediaTypes&&(s=n.wellKnownMediaTypes),"application/ld+json"!==t&&!s.includes(t)){if("application/json"!==t&&!t.endsWith("+json"))throw new i.ErrorCoded(`Unsupported JSON-LD media type ${t}`,i.ERROR_CODES.LOADING_DOCUMENT_FAILED);if(r&&r.has("Link")&&r.forEach(((t,r)=>{if("link"===r){const r=(0,_.parse)(t);for(const t of r.get("rel","http://www.w3.org/ns/json-ld#context")){if(a)throw new i.ErrorCoded("Multiple JSON-LD context link headers were found on "+e,i.ERROR_CODES.MULTIPLE_CONTEXT_LINK_HEADERS);a=t.uri}}})),!a&&!(null==n?void 0:n.ignoreMissingContextLinkHeader))throw new i.ErrorCoded(`Missing context link header for media type ${t} on ${e}`,i.ERROR_CODES.LOADING_DOCUMENT_FAILED)}if(r&&r.has("Content-Type")){const e=r.get("Content-Type"),t=/; *profile=([^"]*)/.exec(e);t&&"http://www.w3.org/ns/json-ld#streaming"===t[1]&&(o=!0)}return new T(Object.assign({baseIRI:e,context:a,streamingProfile:o},n||{}))}import(e){if("pipe"in e){e.on("error",(e=>t.emit("error",e)));const t=e.pipe(new T(this.options));return t}{const t=new a.PassThrough({readableObjectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new T(this.options));return r}}_transform(e,t,r){this.jsonParser.write(e),this.lastOnValueJob.then((()=>r()),(e=>r(e)))}async newOnValueJob(e,t,r,n){let a=!0;if(n&&r1&&(l=this.parsingContext.validationStack[this.parsingContext.validationStack.length-1].property);for(let t=Math.max(1,this.parsingContext.validationStack.length-1);t=0?this.parsingContext.idStack[e-r-1]:[await this.util.getGraphContainerValue(t,e)];if(a)for(const t of a){this.parsingContext.emittedStack[e]=!0;for(const r of n)this.util.emitQuadChecked(e,i,r.predicate,r.object,t,r.reverse,r.isEmbedded)}else{const r=this.parsingContext.getUnidentifiedGraphBufferSafe(e-await this.util.getDepthOffsetGraph(e,t)-1);for(const e of n)e.reverse?r.push({object:i,predicate:e.predicate,subject:e.object,isEmbedded:e.isEmbedded}):r.push({object:e.object,predicate:e.predicate,subject:i,isEmbedded:e.isEmbedded})}}this.parsingContext.unidentifiedValuesBuffer.splice(e,1),this.parsingContext.literalStack.splice(e,1),this.parsingContext.jsonLiteralStack.splice(e,1)}const a=this.parsingContext.unidentifiedGraphsBuffer[e];if(a){for(const t of r){const r=1!==e||"BlankNode"!==t.termType||this.parsingContext.topLevelProperties?t:this.util.getDefaultGraph();this.parsingContext.emittedStack[e]=!0;for(const t of a)this.parsingContext.emitQuad(e,this.util.dataFactory.quad(t.subject,t.predicate,t.object,r))}this.parsingContext.unidentifiedGraphsBuffer.splice(e,1)}const o=this.parsingContext.annotationsBuffer[e];if(o){o.length>0&&1===e&&this.parsingContext.emitError(new i.ErrorCoded("Annotations can not be made on top-level nodes",i.ERROR_CODES.INVALID_ANNOTATION));const t=this.parsingContext.getAnnotationsBufferSafe(e-1);for(const e of o)t.push(e);delete this.parsingContext.annotationsBuffer[e]}}async validateKey(e,t,r){for(const n of T.ENTRY_HANDLERS)if(await n.validate(this.parsingContext,this.util,e,t,r))return{valid:!0,property:r||n.isPropertyHandler()};return{valid:!1,property:!1}}attachJsonParserListeners(){this.jsonParser.onValue=e=>{const t=this.jsonParser.stack.length,r=new Array(t+1).fill(0).map(((e,r)=>r===t?this.jsonParser.key:this.jsonParser.stack[r].key));if(!this.isParsingContextInner(t)){const n=()=>this.newOnValueJob(r,e,t,!0);if(this.parsingContext.streamingProfile||this.parsingContext.contextTree.getContext(r.slice(0,-1)))this.lastOnValueJob=this.lastOnValueJob.then(n);else if("@context"===r[t]){let e=this.contextJobs[t];e||(e=this.contextJobs[t]=[]),e.push(n)}else this.contextAwaitingJobs.push({job:n,keys:r,depth:t});this.parsingContext.streamingProfile||0!==t||(this.lastOnValueJob=this.lastOnValueJob.then((()=>this.executeBufferedJobs())))}},this.jsonParser.onError=e=>{this.emit("error",e)}}isParsingContextInner(e){for(let t=e;t>0;t--)if("@context"===this.jsonParser.stack[t-1].key)return!0;return!1}async executeBufferedJobs(){for(const e of this.contextJobs)if(e)for(const t of e)await t();this.parsingContext.unaliasedKeywordCacheStack.splice(0);const e=[];for(const t of this.contextAwaitingJobs)"@type"===await this.util.unaliasKeyword(t.keys[t.depth],t.keys,t.depth,!0)||"number"==typeof t.keys[t.depth]&&"@type"===await this.util.unaliasKeyword(t.keys[t.depth-1],t.keys,t.depth-1,!0)?this.typeJobs.push({job:t.job,keys:t.keys.slice(0,t.keys.length-1)}):e.push(t);for(const t of e){if(this.typeJobs.length>0){const e=[],r=[];for(let n=0;ne.keys.length-t.keys.length));for(const e of n)await e.job();const i=r.sort().reverse();for(const e of i)this.typeJobs.splice(e,1)}await t.job()}}}T.DEFAULT_PROCESSING_MODE="1.1",T.ENTRY_HANDLERS=[new o.EntryHandlerArrayValue,new l.EntryHandlerKeywordContext,new h.EntryHandlerKeywordId,new p.EntryHandlerKeywordIncluded,new d.EntryHandlerKeywordGraph,new f.EntryHandlerKeywordNest,new y.EntryHandlerKeywordType,new m.EntryHandlerKeywordValue,new w.EntryHandlerKeywordAnnotation,new s.EntryHandlerContainer,new g.EntryHandlerKeywordUnknownFallback,new u.EntryHandlerPredicate,new c.EntryHandlerInvalidFallback],t.JsonLdParser=T},24292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParsingContext=void 0;const n=r(27202),i=r(40905),a=r(46240),o=r(90114);class s{constructor(e){this.contextParser=new n.ContextParser({documentLoader:e.documentLoader,skipValidation:e.skipContextValidation}),this.streamingProfile=!!e.streamingProfile,this.baseIRI=e.baseIRI,this.produceGeneralizedRdf=!!e.produceGeneralizedRdf,this.allowSubjectList=!!e.allowSubjectList,this.processingMode=e.processingMode||o.JsonLdParser.DEFAULT_PROCESSING_MODE,this.strictValues=!!e.strictValues,this.validateValueIndexes=!!e.validateValueIndexes,this.defaultGraph=e.defaultGraph,this.rdfDirection=e.rdfDirection,this.normalizeLanguageTags=e.normalizeLanguageTags,this.streamingProfileAllowOutOfOrderPlainType=e.streamingProfileAllowOutOfOrderPlainType,this.rdfstar=!1!==e.rdfstar,this.rdfstarReverseInEmbedded=e.rdfstarReverseInEmbedded,this.topLevelProperties=!1,this.activeProcessingMode=parseFloat(this.processingMode),this.processingStack=[],this.processingType=[],this.emittedStack=[],this.idStack=[],this.graphStack=[],this.graphContainerTermStack=[],this.listPointerStack=[],this.contextTree=new a.ContextTree,this.literalStack=[],this.validationStack=[],this.unaliasedKeywordCacheStack=[],this.jsonLiteralStack=[],this.unidentifiedValuesBuffer=[],this.unidentifiedGraphsBuffer=[],this.annotationsBuffer=[],this.pendingContainerFlushBuffers=[],this.parser=e.parser,e.context?(this.rootContext=this.parseContext(e.context),this.rootContext.then((e=>this.validateContext(e)))):this.rootContext=Promise.resolve(new n.JsonLdContextNormalized(this.baseIRI?{"@base":this.baseIRI,"@__baseDocument":!0}:{}))}async parseContext(e,t,r){return this.contextParser.parse(e,{baseIRI:this.baseIRI,ignoreProtection:r,normalizeLanguageTags:this.normalizeLanguageTags,parentContext:t,processingMode:this.activeProcessingMode})}validateContext(e){const t=e.getContextRaw()["@version"];if(t){if(this.activeProcessingMode&&t>this.activeProcessingMode)throw new i.ErrorCoded(`Unsupported JSON-LD version '${t}' under active processing mode ${this.activeProcessingMode}.`,i.ERROR_CODES.PROCESSING_MODE_CONFLICT);if(this.activeProcessingMode&&t0&&!1===i.context.getContextRaw()["@propagate"]&&i.depth!==t&&!r);return 0===i.depth&&!1===i.context.getContextRaw()["@propagate"]&&i.depth!==t&&(i.context=new n.JsonLdContextNormalized({})),i}async newOnValueJob(e,t,r,n){await this.parser.newOnValueJob(e,t,r,n)}async handlePendingContainerFlushBuffers(){if(this.pendingContainerFlushBuffers.length>0){for(const e of this.pendingContainerFlushBuffers)await this.parser.flushBuffer(e.depth,e.keys),this.parser.flushStacks(e.depth);return this.pendingContainerFlushBuffers.splice(0,this.pendingContainerFlushBuffers.length),!0}return!1}emitQuad(e,t){1===e&&(this.topLevelProperties=!0),this.parser.push(t)}emitError(e){this.parser.emit("error",e)}emitContext(e){this.parser.emit("context",e)}getUnidentifiedValueBufferSafe(e){let t=this.unidentifiedValuesBuffer[e];return t||(t=[],this.unidentifiedValuesBuffer[e]=t),t}getUnidentifiedGraphBufferSafe(e){let t=this.unidentifiedGraphsBuffer[e];return t||(t=[],this.unidentifiedGraphsBuffer[e]=t),t}getAnnotationsBufferSafe(e){let t=this.annotationsBuffer[e];return t||(t=[],this.annotationsBuffer[e]=t),t}getExpandOptions(){return s.EXPAND_OPTIONS[this.activeProcessingMode]}shiftStack(e,t){const r=this.idStack[e+t];if(r&&(this.idStack[e]=r,this.emittedStack[e]=!0,delete this.idStack[e+t]),this.pendingContainerFlushBuffers.length)for(const r of this.pendingContainerFlushBuffers)r.depth>=e+t&&(r.depth-=t,r.keys.splice(e,t));this.unidentifiedValuesBuffer[e+t]&&(this.unidentifiedValuesBuffer[e]=this.unidentifiedValuesBuffer[e+t],delete this.unidentifiedValuesBuffer[e+t]),this.annotationsBuffer[e+t-1]&&(this.annotationsBuffer[e-1]||(this.annotationsBuffer[e-1]=[]),this.annotationsBuffer[e-1]=[...this.annotationsBuffer[e-1],...this.annotationsBuffer[e+t-1]],delete this.annotationsBuffer[e+t-1])}}s.EXPAND_OPTIONS={1:{allowPrefixForcing:!1,allowPrefixNonGenDelims:!1,allowVocabRelativeToBase:!1},1.1:{allowPrefixForcing:!0,allowPrefixNonGenDelims:!1,allowVocabRelativeToBase:!0}},t.ParsingContext=s},22135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(27202),i=r(18050),a=r(45947),o=r(33619);class s{constructor(e){this.parsingContext=e.parsingContext,this.dataFactory=e.dataFactory||new i.DataFactory,this.rdfFirst=this.dataFactory.namedNode(s.RDF+"first"),this.rdfRest=this.dataFactory.namedNode(s.RDF+"rest"),this.rdfNil=this.dataFactory.namedNode(s.RDF+"nil"),this.rdfType=this.dataFactory.namedNode(s.RDF+"type"),this.rdfJson=this.dataFactory.namedNode(s.RDF+"JSON")}static getContextValue(e,t,r,n){const i=e.getContextRaw()[r];if(!i)return n;const a=i[t];return void 0===a?n:a}static getContextValueContainer(e,t){return s.getContextValue(e,"@container",t,{"@set":!0})}static getContextValueType(e,t){const r=s.getContextValue(e,"@type",t,null);return"@none"===r?null:r}static getContextValueLanguage(e,t){return s.getContextValue(e,"@language",t,e.getContextRaw()["@language"]||null)}static getContextValueDirection(e,t){return s.getContextValue(e,"@direction",t,e.getContextRaw()["@direction"]||null)}static isContextValueReverse(e,t){return!!s.getContextValue(e,"@reverse",t,null)}static getContextValueIndex(e,t){return s.getContextValue(e,"@index",t,e.getContextRaw()["@index"]||null)}static isPropertyReverse(e,t,r){return"@reverse"===r!==s.isContextValueReverse(e,t)}static isPropertyInEmbeddedNode(e){return"@id"===e}static isPropertyInAnnotationObject(e){return"@annotation"===e}static isValidIri(e){return null!==e&&n.Util.isValidIri(e)}static isPrefixArray(e,t){if(e.length>t.length)return!1;for(let r=0;r1)throw new n.ErrorCoded(`Found illegal neighbouring entries next to @set for key: '${t}'`,n.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);return[]}if("@list"in r){if(Object.keys(r).length>1)throw new n.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${t}'`,n.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);const e=r["@list"];return Array.isArray(e)?0===e.length?[this.rdfNil]:this.parsingContext.idStack[i+1]||[]:await this.valueToTerm(await this.parsingContext.getContext(a),t,e,i-1,a.slice(0,-1))}if("@reverse"in r&&"boolean"==typeof r["@reverse"])return[];if("@graph"in s.getContextValueContainer(await this.parsingContext.getContext(a),t)){const e=this.parsingContext.graphContainerTermStack[i+1];return e?Object.values(e):[this.dataFactory.blankNode()]}if("@id"in r){if(Object.keys(r).length>1&&(e=await this.parsingContext.getContext(a,0)),"@context"in r&&(e=await this.parsingContext.parseContext(r["@context"],e.getContextRaw())),"@vocab"===r["@type"])return this.nullableTermToArray(this.createVocabOrBaseTerm(e,r["@id"]));{const t=r["@id"];let a;if("object"==typeof t){if(!this.parsingContext.rdfstar)throw new n.ErrorCoded(`Found illegal @id '${r}'`,n.ERROR_CODES.INVALID_ID_VALUE);a=this.parsingContext.idStack[i+1][0]}else a=this.resourceToTerm(e,t);return this.nullableTermToArray(a)}}return this.parsingContext.emittedStack[i+1]||r&&"object"==typeof r&&0===Object.keys(r).length?this.parsingContext.idStack[i+1]||(this.parsingContext.idStack[i+1]=[this.dataFactory.blankNode()]):[];case"string":return this.nullableTermToArray(this.stringValueToTerm(i,await this.getContextSelfOrPropertyScoped(e,t),t,r,null));case"boolean":return this.nullableTermToArray(this.stringValueToTerm(i,await this.getContextSelfOrPropertyScoped(e,t),t,Boolean(r).toString(),this.dataFactory.namedNode(s.XSD_BOOLEAN)));case"number":return this.nullableTermToArray(this.stringValueToTerm(i,await this.getContextSelfOrPropertyScoped(e,t),t,r,this.dataFactory.namedNode(r%1==0&&r<1e21?s.XSD_INTEGER:s.XSD_DOUBLE)));default:return this.parsingContext.emitError(new Error(`Could not determine the RDF type of a ${o}`)),[]}}async getContextSelfOrPropertyScoped(e,t){const r=e.getContextRaw()[t];return r&&"object"==typeof r&&"@context"in r&&(e=await this.parsingContext.parseContext(r,e.getContextRaw(),!0)),e}nullableTermToArray(e){return e?[e]:[]}predicateToTerm(e,t){const r=e.expandTerm(t,!0,this.parsingContext.getExpandOptions());return r?"_"===r[0]&&":"===r[1]?this.parsingContext.produceGeneralizedRdf?this.dataFactory.blankNode(r.substr(2)):null:s.isValidIri(r)?this.dataFactory.namedNode(r):r&&this.parsingContext.strictValues?(this.parsingContext.emitError(new n.ErrorCoded(`Invalid predicate IRI: ${r}`,n.ERROR_CODES.INVALID_IRI_MAPPING)),null):null:null}resourceToTerm(e,t){if(t.startsWith("_:"))return this.dataFactory.blankNode(t.substr(2));const r=e.expandTerm(t,!1,this.parsingContext.getExpandOptions());if(!s.isValidIri(r)){if(!r||!this.parsingContext.strictValues)return null;this.parsingContext.emitError(new Error(`Invalid resource IRI: ${r}`))}return this.dataFactory.namedNode(r)}createVocabOrBaseTerm(e,t){if(t.startsWith("_:"))return this.dataFactory.blankNode(t.substr(2));const r=this.parsingContext.getExpandOptions();let n=e.expandTerm(t,!0,r);if(n===t&&(n=e.expandTerm(t,!1,r)),!s.isValidIri(n)){if(!n||!this.parsingContext.strictValues||n.startsWith("@"))return null;this.parsingContext.emitError(new Error(`Invalid term IRI: ${n}`))}return this.dataFactory.namedNode(n)}intToString(e,t){return"number"==typeof e?Number.isFinite(e)?e%1!=0||t&&t.value===s.XSD_DOUBLE?e.toExponential(15).replace(/(\d)0*e\+?/,"$1E"):Number(e).toString():e>0?"INF":"-INF":e}stringValueToTerm(e,t,r,n,i){const a=s.getContextValueType(t,r);if(a)if("@id"===a){if(!i)return this.resourceToTerm(t,this.intToString(n,i))}else if("@vocab"===a){if(!i)return this.createVocabOrBaseTerm(t,this.intToString(n,i))}else i=this.dataFactory.namedNode(a);if(!i){const a=s.getContextValueLanguage(t,r),o=s.getContextValueDirection(t,r);return o&&this.parsingContext.rdfDirection?this.createLanguageDirectionLiteral(e,this.intToString(n,i),a,o):this.dataFactory.literal(this.intToString(n,i),a)}return this.dataFactory.literal(this.intToString(n,i),i)}createLanguageDirectionLiteral(e,t,r,n){if("i18n-datatype"===this.parsingContext.rdfDirection)return r||(r=""),this.dataFactory.literal(t,this.dataFactory.namedNode(`https://www.w3.org/ns/i18n#${r}_${n}`));{const i=this.dataFactory.blankNode(),a=this.getDefaultGraph();return this.parsingContext.emitQuad(e,this.dataFactory.quad(i,this.dataFactory.namedNode(s.RDF+"value"),this.dataFactory.literal(t),a)),r&&this.parsingContext.emitQuad(e,this.dataFactory.quad(i,this.dataFactory.namedNode(s.RDF+"language"),this.dataFactory.literal(r),a)),this.parsingContext.emitQuad(e,this.dataFactory.quad(i,this.dataFactory.namedNode(s.RDF+"direction"),this.dataFactory.literal(n),a)),i}}valueToJsonString(e){return o(e)}async unaliasKeyword(e,t,r,i,a){if(Number.isInteger(e))return e;if(!i){const e=this.parsingContext.unaliasedKeywordCacheStack[r];if(e)return e}if(!n.Util.isPotentialKeyword(e)){let r=(a=a||await this.parsingContext.getContext(t)).getContextRaw()[e];r&&"object"==typeof r&&(r=r["@id"]),n.Util.isValidKeyword(r)&&(e=r)}return i?e:this.parsingContext.unaliasedKeywordCacheStack[r]=e}async unaliasKeywordParent(e,t){return await this.unaliasKeyword(t>0&&e[t-1],e,t-1)}async unaliasKeywords(e,t,r,n){const i={};for(const a in e)i[await this.unaliasKeyword(a,t,r+1,!0,n)]=e[a];return i}async isLiteral(e,t){for(let r=t;r>=0;r--){if("@annotation"===await this.unaliasKeyword(e[r],e,r))return!1;if(this.parsingContext.literalStack[r]||this.parsingContext.jsonLiteralStack[r])return!0}return!1}async getDepthOffsetGraph(e,t){for(let r=e-1;r>0;r--)if("@graph"===await this.unaliasKeyword(t[r],t,r)){const n=(await a.EntryHandlerContainer.getContainerHandler(this.parsingContext,t,r)).containers;return a.EntryHandlerContainer.isComplexGraphContainer(n)?-1:e-r-1}return-1}validateReverseSubject(e){if("Literal"===e.termType)throw new n.ErrorCoded(`Found illegal literal in subject position: ${e.value}`,n.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE)}getDefaultGraph(){return this.parsingContext.defaultGraph||this.dataFactory.defaultGraph()}async getGraphContainerValue(e,t){let r=this.getDefaultGraph();const{containers:n,depth:i}=await a.EntryHandlerContainer.getContainerHandler(this.parsingContext,e,t);if("@graph"in n){const t=a.EntryHandlerContainer.getContainerGraphIndex(n,i,e),o=this.parsingContext.graphContainerTermStack[i];if(r=o?o[t]:null,!r){let a=null;if("@id"in n){const t=await this.getContainerKey(e[i],e,i);null!==t&&(a=await this.resourceToTerm(await this.parsingContext.getContext(e),t))}a||(a=this.dataFactory.blankNode()),this.parsingContext.graphContainerTermStack[i]||(this.parsingContext.graphContainerTermStack[i]={}),r=this.parsingContext.graphContainerTermStack[i][t]=a}}return r}async getPropertiesDepth(e,t){let r=t;for(let n=t-1;n>0;n--)if("number"!=typeof e[n]){const t=await this.unaliasKeyword(e[n],e,n);if("@reverse"===t)return n;if("@nest"!==t)return r;r=n}return r}async getContainerKey(e,t,r){const n=await this.unaliasKeyword(e,t,r);return"@none"===n?null:n}validateReverseInEmbeddedNode(e,t,r){if(r&&t&&!this.parsingContext.rdfstarReverseInEmbedded)throw new n.ErrorCoded(`Illegal reverse property in embedded node in ${e}`,n.ERROR_CODES.INVALID_EMBEDDED_NODE)}emitQuadChecked(e,t,r,i,a,o,s){let c;if(o?(this.validateReverseSubject(i),c=this.dataFactory.quad(i,r,t,a)):c=this.dataFactory.quad(t,r,i,a),s){if("DefaultGraph"!==c.graph.termType&&(c=this.dataFactory.quad(c.subject,c.predicate,c.object)),this.parsingContext.idStack[e-1])throw new n.ErrorCoded("Illegal multiple properties in an embedded node",n.ERROR_CODES.INVALID_EMBEDDED_NODE);this.parsingContext.idStack[e-1]=[c]}else this.parsingContext.emitQuad(e,c);const u=this.parsingContext.annotationsBuffer[e];if(u){for(const t of u)this.emitAnnotation(e,c,t);delete this.parsingContext.annotationsBuffer[e]}}emitAnnotation(e,t,r){let n;r.reverse?(this.validateReverseSubject(r.object),n=this.dataFactory.quad(r.object,r.predicate,t)):n=this.dataFactory.quad(t,r.predicate,r.object),this.parsingContext.emitQuad(e,n);for(const t of r.nestedAnnotations)this.emitAnnotation(e,n,t)}}s.XSD="http://www.w3.org/2001/XMLSchema#",s.XSD_BOOLEAN=s.XSD+"boolean",s.XSD_INTEGER=s.XSD+"integer",s.XSD_DOUBLE=s.XSD+"double",s.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",t.Util=s},14079:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerHandlerIdentifier=void 0,t.ContainerHandlerIdentifier=class{canCombineWithGraph(){return!0}async handle(e,t,r,n,i,a){let o;if(t.emittedStack[a+1]&&t.idStack[a+1])o=t.idStack[a+1][0];else{const e=null!==await r.getContainerKey(n[a],n,a)?await r.resourceToTerm(await t.getContext(n),n[a]):r.dataFactory.blankNode();if(!e)return void(t.emittedStack[a]=!1);o=e,t.idStack[a+1]=[o]}let s=t.idStack[a];s||(s=t.idStack[a]=[]),s.some((e=>e.equals(o)))||s.push(o),await t.handlePendingContainerFlushBuffers()||(t.emittedStack[a]=!1)}}},43354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerHandlerIndex=void 0;const n=r(27202),i=r(29997),a=r(22135);t.ContainerHandlerIndex=class{canCombineWithGraph(){return!0}async handle(e,t,r,o,s,c){if(!Array.isArray(s)){const u="@graph"in e,l=await t.getContext(o),d=o[c-1],h=a.Util.getContextValueIndex(l,d);if(h){if(n.Util.isPotentialKeyword(h))throw new n.ErrorCoded(`Keywords can not be used as @index value, got: ${h}`,n.ERROR_CODES.INVALID_TERM_DEFINITION);if("string"!=typeof h)throw new n.ErrorCoded(`@index values must be strings, got: ${h}`,n.ERROR_CODES.INVALID_TERM_DEFINITION);if("object"!=typeof s){if("@id"!==a.Util.getContextValueType(l,d))throw new n.ErrorCoded(`Property-based index containers require nodes as values or strings with @type: @id, but got: ${s}`,n.ERROR_CODES.INVALID_VALUE_OBJECT);const e=r.resourceToTerm(l,s);e&&(t.idStack[c+1]=[e])}const e=r.createVocabOrBaseTerm(l,h);if(e){const n=await r.valueToTerm(l,h,await r.getContainerKey(o[c],o,c),c,o);if(u){const i=await r.getGraphContainerValue(o,c+1);for(const a of n)t.emitQuad(c,r.dataFactory.quad(i,e,a,r.getDefaultGraph()))}else for(const a of n)await i.EntryHandlerPredicate.handlePredicateObject(t,r,o,c+1,e,a,!1,!1,!1)}}const p=u?2:1;await t.newOnValueJob(o.slice(0,o.length-p),s,c-p,!0),await t.handlePendingContainerFlushBuffers()}t.emittedStack[c]=!1}}},68526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerHandlerLanguage=void 0;const n=r(27202);t.ContainerHandlerLanguage=class{canCombineWithGraph(){return!1}async handle(e,t,r,i,a,o){const s=await r.getContainerKey(i[o],i,o);if(Array.isArray(a))a=a.map((e=>({"@value":e,"@language":s})));else{if("string"!=typeof a)throw new n.ErrorCoded(`Got invalid language map value, got '${JSON.stringify(a)}', but expected string`,n.ERROR_CODES.INVALID_LANGUAGE_MAP_VALUE);a={"@value":a,"@language":s}}await t.newOnValueJob(i.slice(0,i.length-1),a,o-1,!0),t.emittedStack[o]=!1}}},84936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerHandlerType=void 0;const n=r(29997),i=r(22135);t.ContainerHandlerType=class{canCombineWithGraph(){return!1}async handle(e,t,r,a,o,s){if(!Array.isArray(o)){if("string"==typeof o){const e=await t.getContext(a),n="@vocab"===i.Util.getContextValueType(e,a[s-1])?await r.createVocabOrBaseTerm(e,o):await r.resourceToTerm(e,o);if(n){const e={"@id":"NamedNode"===n.termType?n.value:o};await t.newOnValueJob(a.slice(0,a.length-1),e,s-1,!0),t.idStack[s+1]=[n]}}else{const e=!!t.idStack[s+1];e||delete t.idStack[s],await t.newOnValueJob(a.slice(0,a.length-1),o,s-1,!0),e||(t.idStack[s+1]=t.idStack[s])}const e=await r.getContainerKey(a[s],a,s),c=null!==e?r.createVocabOrBaseTerm(await t.getContext(a),e):null;c&&await n.EntryHandlerPredicate.handlePredicateObject(t,r,a,s+1,r.rdfType,c,!1,!1,!1),await t.handlePendingContainerFlushBuffers()}t.emittedStack[s]=!1}}},11272:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerArrayValue=void 0;const n=r(22135),i=r(27202);t.EntryHandlerArrayValue=class{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,n,i){return this.test(e,t,null,r,n)}async test(e,t,r,n,i){return"number"==typeof n[i]}async handle(e,t,r,i,a,o){let s=await t.unaliasKeywordParent(i,o);if("@list"===s){let r=null,n=0;for(let e=o-2;e>0;e--){const t=i[e];if("string"==typeof t||"number"==typeof t){n=e,r=t;break}}if(null!==r){const s=await t.valueToTerm(await e.getContext(i),r,a,o,i);for(const r of s)await this.handleListElement(e,t,r,a,o,i.slice(0,n),n);0===s.length&&await this.handleListElement(e,t,null,a,o,i.slice(0,n),n)}}else if("@set"===s)await e.newOnValueJob(i.slice(0,-2),a,o-2,!1);else if(void 0!==s&&"@type"!==s){for(let e=o-1;e>0;e--)if("number"!=typeof i[e]){s=await t.unaliasKeyword(i[e],i,e);break}const r=await e.getContext(i.slice(0,-1));if("@list"in n.Util.getContextValueContainer(r,s)){e.emittedStack[o+1]=!0;const r=await t.valueToTerm(await e.getContext(i),s,a,o,i);for(const n of r)await this.handleListElement(e,t,n,a,o,i.slice(0,-1),o-1);0===r.length&&await this.handleListElement(e,t,null,a,o,i.slice(0,-1),o-1)}else e.shiftStack(o,1),await e.newOnValueJob(i.slice(0,-1),a,o-1,!1),e.contextTree.removeContext(i.slice(0,-1))}}async handleListElement(e,t,r,n,a,o,s){let c=e.listPointerStack[a];if(null!==n&&null!==(await t.unaliasKeywords(n,o,a))["@value"]){if(c&&c.value){const r=t.dataFactory.blankNode();e.emitQuad(a,t.dataFactory.quad(c.value,t.rdfRest,r,t.getDefaultGraph())),c.value=r}else{const e=t.dataFactory.blankNode();c={value:e,listRootDepth:s,listId:e}}r&&e.emitQuad(a,t.dataFactory.quad(c.value,t.rdfFirst,r,t.getDefaultGraph()))}else c||(c={listRootDepth:s,listId:t.rdfNil});e.listPointerStack[a]=c,e.rdfstar&&e.annotationsBuffer[a]&&e.emitError(new i.ErrorCoded("Found an illegal annotation inside a list",i.ERROR_CODES.INVALID_ANNOTATION))}}},45947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerContainer=void 0;const n=r(14079),i=r(43354),a=r(68526),o=r(84936),s=r(22135);class c{static isSimpleGraphContainer(e){return"@graph"in e&&("@set"in e&&2===Object.keys(e).length||1===Object.keys(e).length)}static isComplexGraphContainer(e){return"@graph"in e&&("@set"in e&&Object.keys(e).length>2||!("@set"in e)&&Object.keys(e).length>1)}static getContainerGraphIndex(e,t,r){let n=c.isSimpleGraphContainer(e),i="";for(let e=t;e=0;e--)if("number"!=typeof t[e]){const r=s.Util.getContextValue(a,"@container",t[e],!1);if(r&&c.isSimpleGraphContainer(r))return{containers:r,depth:e+1,fallback:!1};const o=s.Util.getContextValue(a,"@container",t[e-1],!1);if(o){const t="@graph"in o;for(const r in c.CONTAINER_HANDLERS)if(o[r])return t?c.CONTAINER_HANDLERS[r].canCombineWithGraph()?{containers:o,depth:e,fallback:!1}:n:i?n:{containers:o,depth:e,fallback:!1};return n}if(i)return n;i=!0}return n}static async isBufferableContainerHandler(e,t,r){const n=await c.getContainerHandler(e,t,r);return!n.fallback&&!("@graph"in n.containers)}isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,n,i){return!!await this.test(e,t,null,r,n)}async test(e,t,r,n,i){const a=s.Util.getContextValueContainer(await e.getContext(n,2),n[i-1]);for(const e in c.CONTAINER_HANDLERS)if(a[e])return{containers:a,handler:c.CONTAINER_HANDLERS[e]};return null}async handle(e,t,r,n,i,a,o){return o.handler.handle(o.containers,e,t,n,i,a)}}c.CONTAINER_HANDLERS={"@id":new n.ContainerHandlerIdentifier,"@index":new i.ContainerHandlerIndex,"@language":new a.ContainerHandlerLanguage,"@type":new o.ContainerHandlerType},t.EntryHandlerContainer=c},62885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerInvalidFallback=void 0,t.EntryHandlerInvalidFallback=class{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,n,i){return!1}async test(e,t,r,n,i){return!0}async handle(e,t,r,n,i,a){e.emittedStack[a]=!1}}},29997:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerPredicate=void 0;const n=r(27202),i=r(22135);class a{static async handlePredicateObject(e,t,r,i,a,o,s,c,u){const l=await t.getPropertiesDepth(r,i),d=await t.getDepthOffsetGraph(i,r),h=i-d,p=e.idStack[l];if(p&&!u)for(const n of p)if(d>=0){const r=e.idStack[h-1];if(r)for(const e of r)t.emitQuadChecked(i,n,a,o,e,s,c);else s?(t.validateReverseSubject(o),e.getUnidentifiedGraphBufferSafe(h-1).push({subject:o,predicate:a,object:n,isEmbedded:c})):e.getUnidentifiedGraphBufferSafe(h-1).push({subject:n,predicate:a,object:o,isEmbedded:c})}else{const e=await t.getGraphContainerValue(r,l);t.emitQuadChecked(i,n,a,o,e,s,c)}else if(s&&t.validateReverseSubject(o),u){if(e.rdfstar){e.idStack[i]&&e.emitError(new n.ErrorCoded(`Found an illegal @id inside an annotation: ${e.idStack[i][0].value}`,n.ERROR_CODES.INVALID_ANNOTATION));for(let a=0;a=0;e--){const t=c[e];t.depth>l&&(u.nestedAnnotations.push(t),c.splice(e,1))}}}else e.getUnidentifiedValueBufferSafe(l).push({predicate:a,object:o,reverse:s,isEmbedded:c})}isPropertyHandler(){return!0}isStackProcessor(){return!0}async validate(e,t,r,n,a){const o=r[n];if(o){const a=await e.getContext(r);if(!e.jsonLiteralStack[n]&&await t.predicateToTerm(a,r[n]))return"@json"===i.Util.getContextValueType(a,o)&&(e.jsonLiteralStack[n+1]=!0),!0}return!1}async test(e,t,r,n,i){return n[i]}async handle(e,t,r,o,s,c,u){const l=o[c],d=await e.getContext(o),h=await t.predicateToTerm(d,r);if(h){const u=await t.valueToTerm(d,r,s,c,o);if(u.length)for(let p of u){let u=await t.unaliasKeywordParent(o,c);const f=i.Util.isPropertyReverse(d,l,u);let y=0;for(;"@reverse"===u||"number"==typeof u;)"number"==typeof u?y++:c--,u=await t.unaliasKeywordParent(o,c-y);const g=i.Util.isPropertyInEmbeddedNode(u);t.validateReverseInEmbeddedNode(r,f,g);const m=i.Util.isPropertyInAnnotationObject(u);if(s){const a="@list"in i.Util.getContextValueContainer(d,r);if(a||s["@list"]){if((a&&!Array.isArray(s)&&!s["@list"]||s["@list"]&&!Array.isArray(s["@list"]))&&p!==t.rdfNil){const r=t.dataFactory.blankNode();e.emitQuad(c,t.dataFactory.quad(r,t.rdfRest,t.rdfNil,t.getDefaultGraph())),e.emitQuad(c,t.dataFactory.quad(r,t.rdfFirst,p,t.getDefaultGraph())),p=r}if(f&&!e.allowSubjectList)throw new n.ErrorCoded(`Found illegal list value in subject position at ${r}`,n.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE)}}await a.handlePredicateObject(e,t,o,c,h,p,f,g,m)}}}}t.EntryHandlerPredicate=a},49203:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeyword=void 0,t.EntryHandlerKeyword=class{constructor(e){this.keyword=e}isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,n,i){return!1}async test(e,t,r,n,i){return r===this.keyword}}},6042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordAnnotation=void 0;const n=r(49203),i=r(27202);class a extends n.EntryHandlerKeyword{constructor(){super("@annotation")}async handle(e,t,r,n,a,o){("string"==typeof a||"object"==typeof a&&a["@value"])&&e.emitError(new i.ErrorCoded(`Found illegal annotation value: ${JSON.stringify(a)}`,i.ERROR_CODES.INVALID_ANNOTATION))}}t.EntryHandlerKeywordAnnotation=a},66700:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordContext=void 0;const n=r(27202),i=r(49203);class a extends i.EntryHandlerKeyword{constructor(){super("@context")}isStackProcessor(){return!1}async handle(e,t,r,i,a,o){e.streamingProfile&&(e.processingStack[o]||e.processingType[o]||void 0!==e.idStack[o])&&e.emitError(new n.ErrorCoded("Found an out-of-order context, while streaming is enabled.(disable `streamingProfile`)",n.ERROR_CODES.INVALID_STREAMING_KEY_ORDER));const s=e.getContext(i),c=e.parseContext(a,(await s).getContextRaw());e.contextTree.setContext(i.slice(0,-1),c),e.emitContext(a),await e.validateContext(await c)}}t.EntryHandlerKeywordContext=a},37071:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordGraph=void 0;const n=r(49203);class i extends n.EntryHandlerKeyword{constructor(){super("@graph")}async handle(e,t,r,n,i,a){e.graphStack[a+1]=!0}}t.EntryHandlerKeywordGraph=i},48978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordId=void 0;const n=r(27202),i=r(49203);class a extends i.EntryHandlerKeyword{constructor(){super("@id")}isStackProcessor(){return!1}async handle(e,t,r,i,a,o){if("string"!=typeof a){if(e.rdfstar&&"object"==typeof a){const t=Object.keys(a);1===t.length&&"@id"===t[0]&&e.emitError(new n.ErrorCoded(`Invalid embedded node without property with @id ${a["@id"]}`,n.ERROR_CODES.INVALID_EMBEDDED_NODE))}else e.emitError(new n.ErrorCoded(`Found illegal @id '${a}'`,n.ERROR_CODES.INVALID_ID_VALUE));return}const s=await t.getPropertiesDepth(i,o);if(void 0!==e.idStack[s]&&(e.idStack[s][0].listHead?e.emitError(new n.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${i[o-1]}'`,n.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT)):e.emitError(new n.ErrorCoded(`Found duplicate @ids '${e.idStack[s][0].value}' and '${a}'`,n.ERROR_CODES.COLLIDING_KEYWORDS))),e.rdfstar&&e.annotationsBuffer[o])for(const t of e.annotationsBuffer[o])t.depth===o&&e.emitError(new n.ErrorCoded(`Found an illegal @id inside an annotation: ${a}`,n.ERROR_CODES.INVALID_ANNOTATION));e.idStack[s]=t.nullableTermToArray(await t.resourceToTerm(await e.getContext(i),a))}}t.EntryHandlerKeywordId=a},30643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordIncluded=void 0;const n=r(27202),i=r(49203);class a extends i.EntryHandlerKeyword{constructor(){super("@included")}async handle(e,t,r,i,a,o){"object"!=typeof a&&e.emitError(new n.ErrorCoded(`Found illegal @included '${a}'`,n.ERROR_CODES.INVALID_INCLUDED_VALUE));const s=await t.unaliasKeywords(a,i,o,await e.getContext(i));"@value"in s&&e.emitError(new n.ErrorCoded(`Found an illegal @included @value node '${JSON.stringify(a)}'`,n.ERROR_CODES.INVALID_INCLUDED_VALUE)),"@list"in s&&e.emitError(new n.ErrorCoded(`Found an illegal @included @list node '${JSON.stringify(a)}'`,n.ERROR_CODES.INVALID_INCLUDED_VALUE)),e.emittedStack[o]=!1}}t.EntryHandlerKeywordIncluded=a},58865:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordNest=void 0;const n=r(27202),i=r(49203);class a extends i.EntryHandlerKeyword{constructor(){super("@nest")}async handle(e,t,r,i,a,o){"object"!=typeof a&&e.emitError(new n.ErrorCoded(`Found invalid @nest entry for '${r}': '${a}'`,n.ERROR_CODES.INVALID_NEST_VALUE)),"@value"in await t.unaliasKeywords(a,i,o,await e.getContext(i))&&e.emitError(new n.ErrorCoded(`Found an invalid @value node for '${r}'`,n.ERROR_CODES.INVALID_NEST_VALUE)),e.emittedStack[o]=!1}}t.EntryHandlerKeywordNest=a},23787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordType=void 0;const n=r(27202),i=r(22135),a=r(29997),o=r(49203);class s extends o.EntryHandlerKeyword{constructor(){super("@type")}isStackProcessor(){return!1}async handle(e,t,r,o,s,c){const u=o[c],l=await e.getContext(o),d=t.rdfType,h=await t.unaliasKeywordParent(o,c),p=i.Util.isPropertyReverse(l,u,h),f=i.Util.isPropertyInEmbeddedNode(h);t.validateReverseInEmbeddedNode(r,p,f);const y=i.Util.isPropertyInAnnotationObject(h),g=Array.isArray(s)?s:[s];for(const r of g){"string"!=typeof r&&e.emitError(new n.ErrorCoded(`Found illegal @type '${r}'`,n.ERROR_CODES.INVALID_TYPE_VALUE));const i=t.createVocabOrBaseTerm(l,r);i&&await a.EntryHandlerPredicate.handlePredicateObject(e,t,o,c,d,i,p,f,y)}let m=Promise.resolve(l),b=!1;for(const t of g.sort()){const r=i.Util.getContextValue(l,"@context",t,null);r&&(b=!0,m=m.then((t=>e.parseContext(r,t.getContextRaw()))))}!e.streamingProfile||!b&&e.streamingProfileAllowOutOfOrderPlainType||!e.processingStack[c]&&!e.idStack[c]||e.emitError(new n.ErrorCoded("Found an out-of-order type-scoped context, while streaming is enabled.(disable `streamingProfile`)",n.ERROR_CODES.INVALID_STREAMING_KEY_ORDER)),b&&(m=m.then((e=>!0!==e.getContextRaw()["@propagate"]?new n.JsonLdContextNormalized(Object.assign(Object.assign({},e.getContextRaw()),{"@propagate":!1,"@__propagateFallback":l.getContextRaw()})):e)),e.contextTree.setContext(o.slice(0,o.length-1),m)),e.processingType[c]=!0}}t.EntryHandlerKeywordType=s},30635:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordUnknownFallback=void 0;const n=r(27202);class i{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,i,a){const o=await t.unaliasKeyword(r[i],r,i);return!(!n.Util.isPotentialKeyword(o)||!a&&"@list"===o)}async test(e,t,r,i,a){return n.Util.isPotentialKeyword(r)}async handle(e,t,r,a,o,s){const c=i.VALID_KEYWORDS_TYPES[r];void 0!==c?c&&typeof o!==c.type&&e.emitError(new n.ErrorCoded(`Invalid value type for '${r}' with value '${o}'`,c.errorCode)):e.strictValues&&e.emitError(new Error(`Unknown keyword '${r}' with value '${o}'`)),e.emittedStack[s]=!1}}i.VALID_KEYWORDS_TYPES={"@index":{type:"string",errorCode:n.ERROR_CODES.INVALID_INDEX_VALUE},"@list":null,"@reverse":{type:"object",errorCode:n.ERROR_CODES.INVALID_REVERSE_VALUE},"@set":null,"@value":null},t.EntryHandlerKeywordUnknownFallback=i},94382:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordValue=void 0;const n=r(49203);class i extends n.EntryHandlerKeyword{constructor(){super("@value")}async validate(e,t,r,n,i){const a=r[n];return a&&!e.literalStack[n]&&await this.test(e,t,a,r,n)&&(e.literalStack[n]=!0),super.validate(e,t,r,n,i)}async test(e,t,r,n,i){return"@value"===await t.unaliasKeyword(n[i],n.slice(0,n.length-1),i-1,!0)}async handle(e,t,r,n,i,a){e.literalStack[a]=!0,delete e.unidentifiedValuesBuffer[a],delete e.unidentifiedGraphsBuffer[a],e.emittedStack[a]=!1}}t.EntryHandlerKeywordValue=i},33619:e=>{"use strict";e.exports=function e(t){return null===t||"object"!=typeof t||null!=t.toJSON?JSON.stringify(t):Array.isArray(t)?"["+t.reduce(((t,r,n)=>t+(0===n?"":",")+e(void 0===r||"symbol"==typeof r?null:r)),"")+"]":"{"+Object.keys(t).sort().reduce(((r,n,i)=>void 0===t[n]||"symbol"==typeof t[n]?r:r+(0===r.length?"":",")+e(n)+":"+e(t[n])),"")+"}"}},85832:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(45920),t),i(r(7814),t)},45920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonLdSerializer=void 0;const n=r(27202),i=r(85071),a=r(7814),o=r(58521);class s extends o.Transform{constructor(e={}){super({objectMode:!0}),this.indentation=0,this.options=e,this.options.baseIRI&&!this.options.context&&(this.options.context={"@base":this.options.baseIRI}),this.options.context?(this.originalContext=this.options.context,this.context=(new n.ContextParser).parse(this.options.context,{baseIRI:this.options.baseIRI})):this.context=Promise.resolve(new n.JsonLdContextNormalized({}))}import(e){const t=new o.PassThrough({objectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new s(this.options));return r}_transform(e,t,r){this.context.then((t=>{this.transformQuad(e,t),r()})).catch(r)}async list(e){const t=await this.context;return{"@list":e.map((e=>a.Util.termToValue(e,t,this.options)))}}_flush(e){return this.opened||this.pushDocumentStart(),this.lastPredicate&&this.endPredicate(),this.lastSubject&&this.endSubject(),this.lastGraph&&"DefaultGraph"!==this.lastGraph.termType&&this.endGraph(),this.endDocument(),e(null,null)}transformQuad(e,t){this.opened||this.pushDocumentStart();const r=this.lastGraph&&"DefaultGraph"!==this.lastGraph.termType&&this.lastGraph.equals(e.subject);if(!(r||this.lastGraph&&e.graph.equals(this.lastGraph))){let r="DefaultGraph"!==e.graph.termType&&this.lastSubject&&this.lastSubject.equals(e.graph);this.lastGraph&&("DefaultGraph"!==this.lastGraph.termType?(this.endPredicate(),this.endSubject(),this.endGraph(!0),r=!1):r?(this.endPredicate(!0),this.lastSubject=null):(this.endPredicate(),this.endSubject(!0))),"DefaultGraph"!==e.graph.termType&&(r||this.pushId(e.graph,!0,t),this.pushSeparator(this.options.space?i.SeparatorType.GRAPH_FIELD_NONCOMPACT:i.SeparatorType.GRAPH_FIELD_COMPACT),this.indentation++),this.lastGraph=e.graph}this.lastSubject&&e.subject.equals(this.lastSubject)||(r?(this.endPredicate(),this.endSubject(),this.indentation--,this.pushSeparator(i.SeparatorType.ARRAY_END_COMMA),this.lastGraph=e.graph):(this.lastSubject&&(this.endPredicate(),this.endSubject(!0)),this.pushId(e.subject,!0,t)),this.lastSubject=e.subject),this.lastPredicate&&e.predicate.equals(this.lastPredicate)||(this.lastPredicate&&this.endPredicate(!0),this.pushPredicate(e.predicate,t)),this.pushObject(e.object,t)}pushDocumentStart(){this.opened=!0,this.originalContext&&!this.options.excludeContext?(this.pushSeparator(i.SeparatorType.OBJECT_START),this.indentation++,this.pushSeparator(i.SeparatorType.CONTEXT_FIELD),this.pushIndented(JSON.stringify(this.originalContext,null,this.options.space)+","),this.pushSeparator(this.options.space?i.SeparatorType.GRAPH_FIELD_NONCOMPACT:i.SeparatorType.GRAPH_FIELD_COMPACT),this.indentation++):(this.pushSeparator(i.SeparatorType.ARRAY_START),this.indentation++)}pushId(e,t,r){if("Quad"===e.termType)this.pushNestedQuad(e,!0,r);else{const n="BlankNode"===e.termType?"_:"+e.value:r.compactIri(e.value,!1);t?this.pushSeparator(i.SeparatorType.OBJECT_START):(this.push(i.SeparatorType.OBJECT_START.label),this.options.space&&this.push("\n")),this.indentation++,this.pushIndented(this.options.space?`"@id": "${n}",`:`"@id":"${n}",`)}}pushPredicate(e,t){let r=e.value;this.options.useRdfType||r!==a.Util.RDF_TYPE||(r="@type",this.objectOptions=Object.assign(Object.assign({},this.options),{compactIds:!0,vocab:!0}));const n=t.compactIri(r,!0);this.pushIndented(this.options.space?`"${n}": [`:`"${n}":[`),this.indentation++,this.lastPredicate=e}pushObject(e,t){if(this.hadObjectForPredicate?this.pushSeparator(i.SeparatorType.COMMA):this.hadObjectForPredicate=!0,"Quad"===e.termType){const r=this.lastSubject,n=this.lastPredicate;return this.hadObjectForPredicate=!1,this.pushNestedQuad(e,!1,t),this.endSubject(!1),this.hadObjectForPredicate=!0,this.lastPredicate=n,void(this.lastSubject=r)}let r;try{r=e["@list"]?e:a.Util.termToValue(e,t,this.objectOptions||this.options)}catch(e){return this.emit("error",e)}this.pushIndented(JSON.stringify(r,null,this.options.space))}pushNestedQuad(e,t,r){this.pushSeparator(i.SeparatorType.OBJECT_START),this.indentation++,this.pushIndented(this.options.space?'"@id": ':'"@id":',!1),"DefaultGraph"!==e.graph.termType&&this.emit("error",new Error(`Found a nested quad with the non-default graph: ${e.graph.value}`)),this.pushId(e.subject,!1,r),this.pushPredicate(e.predicate,r),this.pushObject(e.object,r),this.endPredicate(!1),this.endSubject(t)}endDocument(){this.opened=!1,this.originalContext&&!this.options.excludeContext?(this.indentation--,this.pushSeparator(i.SeparatorType.ARRAY_END),this.indentation--,this.pushSeparator(i.SeparatorType.OBJECT_END)):(this.indentation--,this.pushSeparator(i.SeparatorType.ARRAY_END))}endPredicate(e){this.indentation--,this.pushSeparator(e?i.SeparatorType.ARRAY_END_COMMA:i.SeparatorType.ARRAY_END),this.hadObjectForPredicate=!1,this.objectOptions=null,this.lastPredicate=null}endSubject(e){this.indentation--,this.pushSeparator(e?i.SeparatorType.OBJECT_END_COMMA:i.SeparatorType.OBJECT_END),this.lastSubject=null}endGraph(e){this.indentation--,this.pushSeparator(i.SeparatorType.ARRAY_END),this.indentation--,this.pushSeparator(e?i.SeparatorType.OBJECT_END_COMMA:i.SeparatorType.OBJECT_END),this.lastGraph=null}pushSeparator(e){this.pushIndented(e.label)}pushIndented(e,t=!0){const r=this.getIndentPrefix(),n=e.split("\n").map((e=>r+e)).join("\n");this.push(n),this.options.space&&t&&this.push("\n")}getIndentPrefix(){return this.options.space?this.options.space.repeat(this.indentation):""}}t.JsonLdSerializer=s},85071:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeparatorType=void 0;class r{constructor(e){this.label=e}}t.SeparatorType=r,r.COMMA=new r(","),r.OBJECT_START=new r("{"),r.OBJECT_END=new r("}"),r.OBJECT_END_COMMA=new r("},"),r.ARRAY_START=new r("["),r.ARRAY_END=new r("]"),r.ARRAY_END_COMMA=new r("],"),r.GRAPH_FIELD_NONCOMPACT=new r('"@graph": ['),r.GRAPH_FIELD_COMPACT=new r('"@graph":['),r.CONTEXT_FIELD=new r('"@context":')},7814:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(27202);class i{static termToValue(e,t,r={compactIds:!1,useNativeTypes:!1}){switch(e.termType){case"NamedNode":const a=t.compactIri(e.value,r.vocab);return r.compactIds?a:{"@id":a};case"DefaultGraph":return r.compactIds?e.value:{"@id":e.value};case"BlankNode":const o=`_:${e.value}`;return r.compactIds?o:{"@id":o};case"Literal":if(e.datatype.value===i.RDF_JSON){let t;try{t=JSON.parse(e.value)}catch(e){throw new n.ErrorCoded("Invalid JSON literal: "+e.message,n.ERROR_CODES.INVALID_JSON_LITERAL)}return{"@value":t,"@type":"@json"}}if("i18n-datatype"===r.rdfDirection&&e.datatype.value.startsWith(i.I18N)){const[t,r]=e.datatype.value.substr(i.I18N.length,e.datatype.value.length).split("_");return Object.assign(Object.assign({"@value":e.value},t?{"@language":t}:{}),r?{"@direction":r}:{})}const s=e.datatype.value===i.XSD_STRING,c={"@value":!s&&r.useNativeTypes?i.stringToNativeType(e.value,e.datatype.value):e.value};return e.language?Object.assign(Object.assign({},c),{"@language":e.language}):s||"string"!=typeof c["@value"]?c:Object.assign(Object.assign({},c),{"@type":e.datatype.value})}}static stringToNativeType(e,t){if(t.startsWith(i.XSD))switch(t.substr(i.XSD.length)){case"boolean":if("true"===e)return!0;if("false"===e)return!1;throw new Error(`Invalid xsd:boolean value '${e}'`);case"integer":case"number":case"int":case"byte":case"long":const t=parseInt(e,10);if(isNaN(t))throw new Error(`Invalid xsd:integer value '${e}'`);return t;case"float":case"double":const r=parseFloat(e);if(isNaN(r))throw new Error(`Invalid xsd:float value '${e}'`);return r}return e}}t.Util=i,i.XSD="http://www.w3.org/2001/XMLSchema#",i.XSD_STRING=i.XSD+"string",i.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i.RDF_TYPE=i.RDF+"type",i.RDF_JSON=i.RDF+"JSON",i.I18N="https://www.w3.org/ns/i18n#"},5558:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(64295),t),i(r(49999),t),i(r(91094),t),i(r(86625),t),i(r(38303),t),i(r(30573),t),i(r(12104),t),i(r(35573),t),i(r(60179),t),i(r(34260),t)},30573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},12104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},35573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},60179:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MicrodataRdfParser=void 0;const n=r(15482),i=r(58521),a=r(49999),o=r(91094),s=r(86625),c=r(38303),u=r(34260),l=r(94066);class d extends i.Transform{constructor(e){super({readableObjectMode:!0}),this.itemScopeStack=[],this.textBufferStack=[],this.isEmittingReferences=!1,this.pendingItemRefsDomain={},this.pendingItemRefsRangeFinalized={},this.pendingItemRefsRangeCollecting={},e=e||{},this.options=e,this.util=new u.Util(e.dataFactory,e.baseIRI),this.defaultGraph=e.defaultGraph||this.util.dataFactory.defaultGraph(),this.htmlParseListener=e.htmlParseListener,this.vocabRegistry=e.vocabRegistry||l,this.parser=this.initializeParser(!!e.xmlMode)}import(e){const t=new i.PassThrough({readableObjectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new d(this.options));return r}_transform(e,t,r){this.parser.write(e.toString()),r()}_flush(e){this.parser.end(),e()}getItemScope(e){let t=this.itemScopeStack.length-(e?2:1);for(;t>0&&!this.itemScopeStack[t];)t--;return this.itemScopeStack[t]}getDepth(){return this.itemScopeStack.length}onTagOpen(e,t){if(!this.isEmittingReferences){if("id"in t){const e=t.id;this.pendingItemRefsRangeCollecting[e]={events:[],counter:0,ids:[]}}for(const r of Object.values(this.pendingItemRefsRangeCollecting))r.counter++,r.events.push({type:"open",name:e,attributes:t})}let r;if(this.textBufferStack.push(void 0),"itemscope"in t){let e;if(this.emittingReferencesItemScopeIdGenerator)e=this.emittingReferencesItemScopeIdGenerator();else{e="itemid"in t&&this.util.createSubject(t.itemid)||this.util.dataFactory.blankNode();for(const t of Object.values(this.pendingItemRefsRangeCollecting))t.ids.push(e)}r={subject:e},this.isEmittingReferences&&(r.blockEmission=!0);const n=this.getItemScope();n&&n.vocab&&(r.vocab=n.vocab),this.itemScopeStack.push(r)}else r=this.getItemScope(),this.itemScopeStack.push(void 0);if(r){if("itemtype"in t)for(const e of this.util.createVocabIris(t.itemtype,r,!1))r.vocab||(r.vocab=this.util.deriveVocab(e.value,this.vocabRegistry)),r.blockEmission||this.emitTriple(r.subject,this.util.dataFactory.namedNode(`${u.Util.RDF}type`),e);if("lang"in t&&(r.language=t.lang),"xml:lang"in t&&(r.language=t["xml:lang"]),"itemscope"in t&&!this.isEmittingReferences&&"itemref"in t)for(const e of t.itemref.split(/\s+/u))e in this.pendingItemRefsDomain||(this.pendingItemRefsDomain[e]=[]),this.pendingItemRefsDomain[e].push(r),this.tryToEmitReferences(e,r)}"itemprop"in t&&this.handleItemProperties(t.itemprop,!1,r,e,t),"itemprop-reverse"in t&&this.handleItemProperties(t["itemprop-reverse"],!0,r,e,t)}onText(e){if(!this.isEmittingReferences)for(const t of Object.values(this.pendingItemRefsRangeCollecting))t.events.push({type:"text",data:e});for(const t of this.textBufferStack)t&&t.push(e)}onTagClose(){if(!this.isEmittingReferences)for(const[e,t]of Object.entries(this.pendingItemRefsRangeCollecting))t.counter--,t.events.push({type:"close"}),0===t.counter&&(this.pendingItemRefsRangeFinalized[e]=t,delete this.pendingItemRefsRangeCollecting[e],this.tryToEmitReferences(e));const e=this.getItemScope(!0);if(e){const t=this.getDepth();if(e.predicates&&t in e.predicates)for(const[r,n]of Object.entries(e.predicates[t])){const i=this.util.createLiteral(this.textBufferStack[t].join(""),e);this.emitPredicateTriples(e,n,i,"reverse"===r),delete e.predicates[t][r]}}this.itemScopeStack.pop(),this.textBufferStack.pop()}onEnd(){}initializeParser(e){return new n.Parser({onclosetag:()=>{try{this.onTagClose(),this.htmlParseListener&&this.htmlParseListener.onTagClose()}catch(e){this.emit("error",e)}},onend:()=>{try{this.onEnd(),this.htmlParseListener&&this.htmlParseListener.onEnd()}catch(e){this.emit("error",e)}},onopentag:(e,t)=>{try{this.onTagOpen(e,t),this.htmlParseListener&&this.htmlParseListener.onTagOpen(e,t)}catch(e){this.emit("error",e)}},ontext:e=>{try{this.onText(e),this.htmlParseListener&&this.htmlParseListener.onText(e)}catch(e){this.emit("error",e)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:e})}handleItemProperties(e,t,r,n,i){const a=this.getItemScope(!0);if(a){const o=this.getDepth(),s=this.util.createVocabIris(e,a,!0);a.predicates||(a.predicates={}),a.predicates[o]||(a.predicates[o]={});const c=t?"reverse":"forward";a.predicates[o][c]=s;for(const t of this.util.getVocabularyExpansionType(e,a,this.vocabRegistry))s.push(t);if(r&&"itemscope"in i)this.emitPredicateTriples(a,s,r.subject,t),delete a.predicates[o][c];else for(const e of d.ITEM_PROPERTY_HANDLERS)if(e.canHandle(n,i)){const r=e.getObject(i,this.util,a);this.emitPredicateTriples(a,s,r,t),delete a.predicates[o][c]}a.predicates[o][c]&&(this.textBufferStack[o]=[])}}emitPredicateTriples(e,t,r,n){if(!e.blockEmission)for(const i of t)n?"Literal"!==r.termType&&this.emitTriple(r,i,e.subject):this.emitTriple(e.subject,i,r)}emitTriple(e,t,r){this.push(this.util.dataFactory.quad(e,t,r,this.defaultGraph))}tryToEmitReferences(e,t){const r=this.pendingItemRefsRangeFinalized[e];if(r){let n;if(t){n=[t];const r=this.pendingItemRefsDomain[e].indexOf(t);this.pendingItemRefsDomain[e].splice(r,1)}else n=this.pendingItemRefsDomain[e],delete this.pendingItemRefsDomain[e];if(n){const e=this.itemScopeStack,t=this.textBufferStack;this.isEmittingReferences=!0;for(const e of n){this.itemScopeStack=[e],this.textBufferStack=[void 0];const t=[...r.ids];this.emittingReferencesItemScopeIdGenerator=()=>t.shift();for(const e of r.events)switch(e.type){case"open":this.onTagOpen(e.name,e.attributes);break;case"text":this.onText(e.data);break;case"close":this.onTagClose()}}this.emittingReferencesItemScopeIdGenerator=void 0,this.itemScopeStack=e,this.textBufferStack=t,this.isEmittingReferences=!1}}}}t.MicrodataRdfParser=d,d.ITEM_PROPERTY_HANDLERS=[new a.ItemPropertyHandlerContent,new c.ItemPropertyHandlerUrl("a","href"),new c.ItemPropertyHandlerUrl("area","href"),new c.ItemPropertyHandlerUrl("audio","src"),new c.ItemPropertyHandlerUrl("embed","src"),new c.ItemPropertyHandlerUrl("iframe","src"),new c.ItemPropertyHandlerUrl("img","src"),new c.ItemPropertyHandlerUrl("link","href"),new c.ItemPropertyHandlerUrl("object","data"),new c.ItemPropertyHandlerUrl("source","src"),new c.ItemPropertyHandlerUrl("track","src"),new c.ItemPropertyHandlerUrl("video","src"),new o.ItemPropertyHandlerNumber("data","value"),new o.ItemPropertyHandlerNumber("meter","value"),new s.ItemPropertyHandlerTime]},34260:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(18050),i=r(9929);class a{constructor(e,t){this.dataFactory=e||new n.DataFactory,this.baseIRI=t||""}static isValidIri(e){return a.IRI_REGEX.test(e)}createVocabIris(e,t,r){return e.split(/\s+/u).filter((e=>!!e)).map((e=>{if(!a.isValidIri(e)){if(!r)return;e=`${t.vocab||`${this.baseIRI}#`}${e}`}return this.dataFactory.namedNode(e)})).filter((e=>!!e))}getVocabularyExpansionType(e,t,r){const n=e.split(/\s+/u);if(n.includes("subPropertyOf")||n.includes("equivalentProperty"))return[this.dataFactory.namedNode(`${a.RDF}type`)];if(t.vocab&&t.vocab in r&&r[t.vocab].properties){let e=[];for(const[i,a]of Object.entries(r[t.vocab].properties))n.includes(i)&&(e=[...Object.values(a).map((e=>this.dataFactory.namedNode(e)))]);return e}return[]}createSubject(e){if(!a.isValidIri(e))try{e=(0,i.resolve)(e,this.baseIRI)}catch(e){return}return this.dataFactory.namedNode(e)}createLiteral(e,t){return this.dataFactory.literal(e,t.language)}deriveVocab(e,t){let r;for(const n in t)if(e.startsWith(n)){r=n,r.endsWith("/")||(r+="#");break}if(!r){const t=e.indexOf("#");r=t>0?e.slice(0,t+1):(0,i.resolve)(".",e)}return r}}t.Util=a,a.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",a.XSD="http://www.w3.org/2001/XMLSchema#",a.RDFA="http://www.w3.org/ns/rdfa#",a.IRI_REGEX=/^([A-Za-z][\d+-.A-Za-z]*|_):[^ "<>[\\\]`{|}]*$/u},64295:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},49999:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemPropertyHandlerContent=void 0,t.ItemPropertyHandlerContent=class{canHandle(e,t){return"content"in t}getObject(e,t,r){return t.createLiteral(e.content,r)}}},91094:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemPropertyHandlerNumber=void 0;const n=r(34260);t.ItemPropertyHandlerNumber=class{constructor(e,t){this.tagName=e,this.attributeName=t}canHandle(e,t){return this.tagName===e&&this.attributeName in t}getObject(e,t,r){const i=e[this.attributeName];let a;return Number.isNaN(Number.parseInt(i,10))||i.includes(".")?Number.isNaN(Number.parseFloat(i))||(a=`${n.Util.XSD}double`):a=`${n.Util.XSD}integer`,t.dataFactory.literal(i,a&&t.dataFactory.namedNode(a))}}},86625:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemPropertyHandlerTime=void 0;const n=r(34260);class i{canHandle(e,t){return"time"===e&&"datetime"in t}getObject(e,t,r){const a=e.datetime;let o;for(const e of i.TIME_REGEXES)if(e.regex.test(a)){o=t.dataFactory.namedNode(n.Util.XSD+e.type);break}return t.dataFactory.literal(a,o)}}t.ItemPropertyHandlerTime=i,i.TIME_REGEXES=[{regex:/^-?P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d)?S)?)?$/u,type:"duration"},{regex:/^\d+-\d\d-\d\dT\d\d:\d\d:\d\d((Z?)|([+-]\d\d:\d\d))$/u,type:"dateTime"},{regex:/^\d+-\d\d-\d\dZ?$/u,type:"date"},{regex:/^\d\d:\d\d:\d\d((Z?)|([+-]\d\d:\d\d))$/u,type:"time"},{regex:/^\d+-\d\d$/u,type:"gYearMonth"},{regex:/^\d+$/u,type:"gYear"}]},38303:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemPropertyHandlerUrl=void 0;const n=r(9929);t.ItemPropertyHandlerUrl=class{constructor(e,t){this.tagName=e,this.attributeName=t}canHandle(e,t){return this.tagName===e&&this.attributeName in t}getObject(e,t,r){return t.dataFactory.namedNode((0,n.resolve)(e[this.attributeName],t.baseIRI))}}},7784:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},72243:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BlankNode:()=>x,DataFactory:()=>T,DefaultGraph:()=>R,Lexer:()=>g,Literal:()=>E,NamedNode:()=>O,Parser:()=>C,Quad:()=>N,Store:()=>re,StreamParser:()=>ie,StreamWriter:()=>ae,Term:()=>S,Triple:()=>N,Util:()=>n,Variable:()=>A,Writer:()=>Y,default:()=>oe,termFromId:()=>I,termToId:()=>P});var n={};r.r(n),r.d(n,{inDefaultGraph:()=>V,isBlankNode:()=>F,isDefaultGraph:()=>q,isLiteral:()=>B,isNamedNode:()=>k,isVariable:()=>U,prefix:()=>Q,prefixes:()=>$});var i=r(59509),a=r.n(i);const o="http://www.w3.org/1999/02/22-rdf-syntax-ns#",s="http://www.w3.org/2001/XMLSchema#",c="http://www.w3.org/2000/10/swap/",u={xsd:{decimal:`${s}decimal`,boolean:`${s}boolean`,double:`${s}double`,integer:`${s}integer`,string:`${s}string`},rdf:{type:`${o}type`,nil:`${o}nil`,first:`${o}first`,rest:`${o}rest`,langString:`${o}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${c}reify#forSome`,forAll:`${c}reify#forAll`},log:{implies:`${c}log#implies`}},{xsd:l}=u,d=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,h={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},p=/[\x00-\x20<>\\"\{\}\|\^\`]/,f={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},y=/$0^/;class g{constructor(e){if(this._iri=/^<((?:[^ <>{}\\]|\\[uU])+)>[ \t]*/,this._unescapedIri=/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>[ \t]*/,this._simpleQuotedString=/^"([^"\\\r\n]*)"(?=[^"])/,this._simpleApostropheString=/^'([^'\\\r\n]*)'(?=[^'])/,this._langcode=/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\-])/i,this._prefix=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,this._prefixed=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?:[ \t]+|(?=\.?[,;!\^\s#()\[\]\{\}"'<>]))/,this._variable=/^\?(?:(?:[A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=[.,;!\^\s#()\[\]\{\}"'<>])/,this._blank=/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?:[ \t]+|(?=\.?[,;:\s#()\[\]\{\}"'<>]))/,this._number=/^[\-+]?(?:(\d+\.\d*|\.?\d+)[eE][\-+]?|\d*(\.)?)\d+(?=\.?[,;:\s#()\[\]\{\}"'<>])/,this._boolean=/^(?:true|false)(?=[.,;\s#()\[\]\{\}"'<>])/,this._keyword=/^@[a-z]+(?=[\s#<:])/i,this._sparqlKeyword=/^(?:PREFIX|BASE|GRAPH)(?=[\s#<])/i,this._shortPredicates=/^a(?=[\s#()\[\]\{\}"'<>])/,this._newline=/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,this._comment=/#([^\n\r]*)/,this._whitespace=/^[ \t]+/,this._endOfFile=/^(?:#[^\n\r]*)?$/,e=e||{},this._lineMode=!!e.lineMode){this._n3Mode=!1;for(const e in this)!(e in f)&&this[e]instanceof RegExp&&(this[e]=y)}else this._n3Mode=!1!==e.n3;this._comments=!!e.comments,this._literalClosingPos=0}_tokenizeToEnd(e,t){let r=this._input,n=r.length;for(;;){let e,o;for(;e=this._newline.exec(r);)this._comments&&(o=this._comment.exec(e[0]))&&i("comment",o[1],"",this._line,e[0].length),r=r.substr(e[0].length,r.length),n=r.length,this._line++;if(!e&&(e=this._whitespace.exec(r))&&(r=r.substr(e[0].length,r.length)),this._endOfFile.test(r))return t&&(this._comments&&(o=this._comment.exec(r))&&i("comment",o[1],"",this._line,r.length),r=null,i("eof","","",this._line,0)),this._input=r;const s=this._line,c=r[0];let u="",d="",h="",f=null,y=0,g=!1;switch(c){case"^":if(r.length<3)break;if("^"!==r[1]){this._n3Mode&&(y=1,u="^");break}if(this._previousMarker="^^",r=r.substr(2),"<"!==r[0]){g=!0;break}case"<":if(f=this._unescapedIri.exec(r))u="IRI",d=f[1];else if(f=this._iri.exec(r)){if(d=this._unescape(f[1]),null===d||p.test(d))return a(this);u="IRI"}else r.length>1&&"<"===r[1]?(u="<<",y=2):this._n3Mode&&r.length>1&&"="===r[1]&&(u="inverse",y=2,d=">");break;case">":r.length>1&&">"===r[1]&&(u=">>",y=2);break;case"_":((f=this._blank.exec(r))||t&&(f=this._blank.exec(`${r} `)))&&(u="blank",h="_",d=f[1]);break;case'"':if(f=this._simpleQuotedString.exec(r))d=f[1];else if(({value:d,matchLength:y}=this._parseLiteral(r)),null===d)return a(this);null===f&&0===y||(u="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(f=this._simpleApostropheString.exec(r))d=f[1];else if(({value:d,matchLength:y}=this._parseLiteral(r)),null===d)return a(this);null===f&&0===y||(u="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(f=this._variable.exec(r))&&(u="var",d=f[0]);break;case"@":"literal"===this._previousMarker&&(f=this._langcode.exec(r))?(u="langcode",d=f[1]):(f=this._keyword.exec(r))&&(u=f[0]);break;case".":if(1===r.length?t:r[1]<"0"||r[1]>"9"){u=".",y=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(f=this._number.exec(r)||t&&(f=this._number.exec(`${r} `)))&&(u="literal",d=f[0],h="string"==typeof f[1]?l.double:"string"==typeof f[2]?l.decimal:l.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(f=this._sparqlKeyword.exec(r))?u=f[0].toUpperCase():g=!0;break;case"f":case"t":(f=this._boolean.exec(r))?(u="literal",d=f[0],h=l.boolean):g=!0;break;case"a":(f=this._shortPredicates.exec(r))?(u="abbreviation",d="a"):g=!0;break;case"=":this._n3Mode&&r.length>1&&(u="abbreviation",">"!==r[1]?(y=1,d="="):(y=2,d=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"}":this._lineMode||(y=1,u=c);break;case"{":!this._lineMode&&r.length>=2&&("|"===r[1]?(u="{|",y=2):(u=c,y=1));break;case"|":r.length>=2&&"}"===r[1]&&(u="|}",y=2);break;default:g=!0}if(g&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(f=this._prefix.exec(r))?((f=this._prefixed.exec(r))||t&&(f=this._prefixed.exec(`${r} `)))&&(u="prefixed",h=f[1]||"",d=this._unescape(f[2])):(u="prefix",d=f[1]||"")),"^^"===this._previousMarker)switch(u){case"prefixed":u="type";break;case"IRI":u="typeIRI";break;default:u=""}if(!u)return t||!/^'''|^"""/.test(r)&&/\n|\r/.test(r)?a(this):this._input=r;const m=y||f[0].length,b=i(u,d,h,s,m);this.previousToken=b,this._previousMarker=u,r=r.substr(m,r.length)}function i(t,i,a,o,s){const c=r?n-r.length:n,u={type:t,value:i,prefix:a,line:o,start:c,end:c+s};return e(null,u),u}function a(t){e(t._syntaxError(/^\S*/.exec(r)[0]))}}_unescape(e){let t=!1;const r=e.replace(d,((e,r,n,i)=>{if("string"==typeof r)return String.fromCharCode(Number.parseInt(r,16));if("string"==typeof n){let e=Number.parseInt(n,16);return e<=65535?String.fromCharCode(Number.parseInt(n,16)):String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e))}return i in h?h[i]:(t=!0,"")}));return t?null:r}_parseLiteral(e){if(e.length>=3){const t=e.match(/^(?:"""|"|'''|'|)/)[0],r=t.length;let n=Math.max(this._literalClosingPos,r);for(;(n=e.indexOf(t,n))>0;){let t=0;for(;"\\"===e[n-t-1];)t++;if(t%2==0){const t=e.substring(r,n),i=t.split(/\r\n|\r|\n/).length-1,a=n+r;if(1===r&&0!==i||3===r&&this._lineMode)break;return this._line+=i,{value:this._unescape(t),matchLength:a}}n++}this._literalClosingPos=e.length-r+1}return{value:"",matchLength:0}}_syntaxError(e){this._input=null;const t=new Error(`Unexpected "${e}" on line ${this._line}.`);return t.context={token:void 0,line:this._line,previousToken:this.previousToken},t}_readStartingBom(e){return e.startsWith("\ufeff")?e.substr(1):e}tokenize(e,t){if(this._line=1,"string"==typeof e){if(this._input=this._readStartingBom(e),"function"!=typeof t){const e=[];let t;if(this._tokenizeToEnd(((r,n)=>r?t=r:e.push(n)),!0),t)throw t;return e}a()((()=>this._tokenizeToEnd(t,!0)))}else this._pendingBuffer=null,"function"==typeof e.setEncoding&&e.setEncoding("utf8"),e.on("data",(e=>{null!==this._input&&0!==e.length&&(this._pendingBuffer&&(e=Buffer.concat([this._pendingBuffer,e]),this._pendingBuffer=null),128&e[e.length-1]?this._pendingBuffer=e:(void 0===this._input?this._input=this._readStartingBom("string"==typeof e?e:e.toString()):this._input+=e,this._tokenizeToEnd(t,!1)))})),e.on("end",(()=>{"string"==typeof this._input&&this._tokenizeToEnd(t,!0)})),e.on("error",t)}}const{rdf:m,xsd:b}=u;let v,_=0;const w={namedNode:function(e){return new O(e)},blankNode:function(e){return new x(e||"n3-"+_++)},variable:function(e){return new A(e)},literal:function(e,t){if("string"==typeof t)return new E(`"${e}"@${t.toLowerCase()}`);let r=t?t.value:"";return""===r&&("boolean"==typeof e?r=b.boolean:"number"==typeof e&&(Number.isFinite(e)?r=Number.isInteger(e)?b.integer:b.double:(r=b.double,Number.isNaN(e)||(e=e>0?"INF":"-INF")))),""===r||r===b.string?new E(`"${e}"`):new E(`"${e}"^^${r}`)},defaultGraph:function(){return v},quad:D,triple:D},T=w;class S{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof S?this.id===e.id:!!e&&this.termType===e.termType&&this.value===e.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class O extends S{get termType(){return"NamedNode"}}class E extends S{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const e=this.id;let t=e.lastIndexOf('"')+1;return tnull),this._blankNodePrefix="string"!=typeof e.blankNodePrefix?"":e.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=e.lexer||new g({lineMode:s,n3:o}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){j=0}_setBase(e){if(e){const t=e.indexOf("#");t>=0&&(e=e.substr(0,t)),this._base=e,this._basePath=e.indexOf("/")<0?e:e.replace(/[^\/?]*(?:\?.*)?$/,""),e=e.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=e[0],this._baseScheme=e[1]}else this._base="",this._basePath=""}_saveContext(e,t,r,n,i){const a=this._n3Mode;this._contextStack.push({type:e,subject:r,predicate:n,object:i,graph:t,inverse:!!a&&this._inversePredicate,blankPrefix:a?this._prefixes._:"",quantified:a?this._quantified:null}),a&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.value}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(e,t){const r=this._contextStack.pop();if(!r||r.type!==e)return this._error(`Unexpected ${t.type}`,t);this._subject=r.subject,this._predicate=r.predicate,this._object=r.object,this._graph=r.graph,this._n3Mode&&(this._inversePredicate=r.inverse,this._prefixes._=r.blankPrefix,this._quantified=r.quantified)}_readInTopContext(e){switch(e.type){case"eof":return null!==this._graph?this._error("Unclosed graph",e):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"PREFIX":this._sparqlStyle=!0;case"@prefix":return this._readPrefix;case"BASE":this._sparqlStyle=!0;case"@base":return this._readBaseIRI;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(e)}}_readEntity(e,t){let r;switch(e.type){case"IRI":case"typeIRI":const t=this._resolveIRI(e.value);if(null===t)return this._error("Invalid IRI",e);r=this._namedNode(t);break;case"type":case"prefixed":const n=this._prefixes[e.prefix];if(void 0===n)return this._error(`Undefined prefix "${e.prefix}:"`,e);r=this._namedNode(n+e.value);break;case"blank":r=this._blankNode(this._prefixes[e.prefix]+e.value);break;case"var":r=this._variable(e.value.substr(1));break;default:return this._error(`Expected entity but got ${e.type}`,e)}return!t&&this._n3Mode&&r.id in this._quantified&&(r=this._quantified[r.id]),r}_readSubject(e){switch(this._predicate=null,e.type){case"[":return this._saveContext("blank",this._graph,this._subject=this._blankNode(),null,null),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this.RDF_NIL,null,null),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._graph=this._blankNode(),null,null),this._readSubject):this._error("Unexpected graph",e);case"}":return this._readPunctuation(e);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier=this._blankNode,this._readQuantifierList):this._error('Unexpected "@forSome"',e);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier=this._variable,this._readQuantifierList):this._error('Unexpected "@forAll"',e);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",e);if(0===e.prefix.length)return this._literalValue=e.value,this._completeSubjectLiteral;this._subject=this._literal(e.value,this._namedNode(e.prefix));break;case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",e);default:if(void 0===(this._subject=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(e){const t=e.type;switch(t){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[e.value];break;case".":case"]":case"}":return null===this._predicate?this._error(`Unexpected ${t}`,e):(this._subject=null,"]"===t?this._readBlankNodeTail(e):this._readPunctuation(e));case";":return null!==this._predicate?this._readPredicate:this._error("Expected predicate but got ;",e);case"[":if(this._n3Mode)return this._saveContext("blank",this._graph,this._subject,this._subject=this._blankNode(),null),this._readBlankNodeHead;case"blank":if(!this._n3Mode)return this._error("Disallowed blank node as predicate",e);default:if(void 0===(this._predicate=this._readEntity(e)))return}return this._readObject}_readObject(e){switch(e.type){case"literal":if(0===e.prefix.length)return this._literalValue=e.value,this._readDataTypeOrLang;this._object=this._literal(e.value,this._namedNode(e.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._blankNode()),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this._subject,this._predicate,this.RDF_NIL),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",e);default:if(void 0===(this._object=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._getContextEndReader())}return this._getContextEndReader()}_readPredicateOrNamedGraph(e){return"{"===e.type?this._readGraph(e):this._readPredicate(e)}_readGraph(e){return"{"!==e.type?this._error(`Expected graph but got ${e.type}`,e):(this._graph=this._subject,this._subject=null,this._readSubject)}_readBlankNodeHead(e){return"]"===e.type?(this._subject=null,this._readBlankNodeTail(e)):(this._predicate=null,this._readPredicate(e))}_readBlankNodeTail(e){if("]"!==e.type)return this._readBlankNodePunctuation(e);null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph);const t=null===this._predicate;return this._restoreContext("blank",e),null!==this._object?this._getContextEndReader():null!==this._predicate?this._readObject:t?this._readPredicateOrNamedGraph:this._readPredicateAfterBlank}_readPredicateAfterBlank(e){switch(e.type){case".":case"}":return this._subject=null,this._readPunctuation(e);default:return this._readPredicate(e)}}_readListItem(e){let t=null,r=null,n=this._readListItem;const i=this._subject,a=this._contextStack,o=a[a.length-1];switch(e.type){case"[":this._saveContext("blank",this._graph,r=this._blankNode(),this.RDF_FIRST,this._subject=t=this._blankNode()),n=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,r=this._blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext("list",e),0!==a.length&&"list"===a[a.length-1].type&&this._emit(this._subject,this._predicate,this._object,this._graph),null===this._predicate){if(n=this._readPredicate,this._subject===this.RDF_NIL)return n}else if(n=this._getContextEndReader(),this._object===this.RDF_NIL)return n;r=this.RDF_NIL;break;case"literal":0===e.prefix.length?(this._literalValue=e.value,n=this._readListItemDataTypeOrLang):(t=this._literal(e.value,this._namedNode(e.prefix)),n=this._getContextEndReader());break;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);default:if(void 0===(t=this._readEntity(e)))return}if(null===r&&(this._subject=r=this._blankNode()),null===i?null===o.predicate?o.subject=r:o.object=r:this._emit(i,this.RDF_REST,r,this._graph),null!==t){if(this._n3Mode&&("IRI"===e.type||"prefixed"===e.type))return this._saveContext("item",this._graph,r,this.RDF_FIRST,t),this._subject=t,this._predicate=null,this._getPathReader(this._readListItem);this._emit(r,this.RDF_FIRST,t,this._graph)}return n}_readDataTypeOrLang(e){return this._completeObjectLiteral(e,!1)}_readListItemDataTypeOrLang(e){return this._completeObjectLiteral(e,!0)}_completeLiteral(e){let t=this._literal(this._literalValue);switch(e.type){case"type":case"typeIRI":const r=this._readEntity(e);if(void 0===r)return;t=this._literal(this._literalValue,r),e=null;break;case"langcode":t=this._literal(this._literalValue,e.value),e=null}return{token:e,literal:t}}_completeSubjectLiteral(e){return this._subject=this._completeLiteral(e).literal,this._readPredicateOrNamedGraph}_completeObjectLiteral(e,t){const r=this._completeLiteral(e);if(r)return this._object=r.literal,t&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),null===r.token?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(r.token))}_readFormulaTail(e){return"}"!==e.type?this._readPunctuation(e):(null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext("formula",e),null===this._object?this._readPredicate:this._getContextEndReader())}_readPunctuation(e){let t,r=this._graph;const n=this._subject,i=this._inversePredicate;switch(e.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",e);if(this._n3Mode)return this._readFormulaTail(e);this._graph=null;case".":this._subject=null,t=this._contextStack.length?this._readSubject:this._readInTopContext,i&&(this._inversePredicate=!1);break;case";":t=this._readPredicate;break;case",":t=this._readObject;break;case"{|":if(!this._supportsRDFStar)return this._error("Unexpected RDF* syntax",e);const a=this._predicate,o=this._object;this._subject=this._quad(n,a,o,this.DEFAULTGRAPH),t=this._readPredicate;break;case"|}":if("Quad"!==this._subject.termType)return this._error("Unexpected asserted triple closing",e);this._subject=null,t=this._readPunctuation;break;default:if(this._supportsQuads&&null===this._graph&&void 0!==(r=this._readEntity(e))){t=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}if(null!==n){const e=this._predicate,t=this._object;i?this._emit(t,e,n,r):this._emit(n,e,t,r)}return t}_readBlankNodePunctuation(e){let t;switch(e.type){case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}return this._emit(this._subject,this._predicate,this._object,this._graph),t}_readQuadPunctuation(e){return"."!==e.type?this._error("Expected dot to follow quad",e):this._readInTopContext}_readPrefix(e){return"prefix"!==e.type?this._error("Expected prefix to follow @prefix",e):(this._prefix=e.value,this._readPrefixIRI)}_readPrefixIRI(e){if("IRI"!==e.type)return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,e);const t=this._readEntity(e);return this._prefixes[this._prefix]=t.value,this._prefixCallback(this._prefix,t),this._readDeclarationPunctuation}_readBaseIRI(e){const t="IRI"===e.type&&this._resolveIRI(e.value);return t?(this._setBase(t),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",e)}_readNamedGraphLabel(e){switch(e.type){case"IRI":case"blank":case"prefixed":return this._readSubject(e),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",e)}}_readNamedGraphBlankLabel(e){return"]"!==e.type?this._error("Invalid graph label",e):(this._subject=this._blankNode(),this._readGraph)}_readDeclarationPunctuation(e){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(e)):"."!==e.type?this._error("Expected declaration to end with a dot",e):this._readInTopContext}_readQuantifierList(e){let t;switch(e.type){case"IRI":case"prefixed":if(void 0!==(t=this._readEntity(e,!0)))break;default:return this._error(`Unexpected ${e.type}`,e)}return this._explicitQuantifiers?(null===this._subject?this._emit(this._graph||this.DEFAULTGRAPH,this._predicate,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH):this._emit(this._subject,this.RDF_REST,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH),this._emit(this._subject,this.RDF_FIRST,t,this.QUANTIFIERS_GRAPH)):this._quantified[t.id]=this._quantifier(this._blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(e){return","===e.type?this._readQuantifierList:(this._explicitQuantifiers&&(this._emit(this._subject,this.RDF_REST,this.RDF_NIL,this.QUANTIFIERS_GRAPH),this._subject=null),this._readCallback=this._getContextEndReader(),this._readCallback(e))}_getPathReader(e){return this._afterPath=e,this._readPath}_readPath(e){switch(e.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const t=this._contextStack,r=t.length&&t[t.length-1];if(r&&"item"===r.type){const t=this._subject;this._restoreContext("item",e),this._emit(this._subject,this.RDF_FIRST,t,this._graph)}return this._afterPath(e)}}_readForwardPath(e){let t,r;const n=this._blankNode();if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(t=this._subject,this._subject=n):(t=this._object,this._object=n),this._emit(t,r,n,this._graph),this._readPath}_readBackwardPath(e){const t=this._blankNode();let r,n;if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(n=this._subject,this._subject=t):(n=this._object,this._object=t),this._emit(t,r,n,this._graph),this._readPath}_readRDFStarTailOrGraph(e){return">>"!==e.type?this._supportsQuads&&null===this._graph&&void 0!==(this._graph=this._readEntity(e))?this._readRDFStarTail:this._error(`Expected >> to follow "${this._object.id}"`,e):this._readRDFStarTail(e)}_readRDFStarTail(e){if(">>"!==e.type)return this._error(`Expected >> but got ${e.type}`,e);const t=this._quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext("<<",e),null===this._subject?(this._subject=t,this._readPredicate):(this._object=t,this._getContextEndReader())}_getContextEndReader(){const e=this._contextStack;if(!e.length)return this._readPunctuation;switch(e[e.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem;case"formula":return this._readFormulaTail;case"<<":return this._readRDFStarTailOrGraph}}_emit(e,t,r,n){this._callback(null,this._quad(e,t,r,n||this.DEFAULTGRAPH))}_error(e,t){const r=new Error(`${e} on line ${t.line}.`);r.context={token:t,line:t.line,previousToken:this._lexer.previousToken},this._callback(r),this._callback=M}_resolveIRI(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)?e:this._resolveRelativeIRI(e)}_resolveRelativeIRI(e){if(!e.length)return this._base;switch(e[0]){case"#":return this._base+e;case"?":return this._base.replace(/(?:\?.*)?$/,e);case"/":return("/"===e[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(e);default:return/^[^/:]*:/.test(e)?null:this._removeDotSegments(this._basePath+e)}}_removeDotSegments(e){if(!/(^|\/)\.\.?($|[/#?])/.test(e))return e;const t=e.length;let r="",n=-1,i=-1,a=0,o="/";for(;n=i&&(r=r.substr(0,a)),"/"!==o)return`${r}/${e.substr(n+1)}`;a=n+1}}}o=e[++n]}return r+e.substring(a)}parse(e,t,r){if(this._readCallback=this._readInTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${j++}_`,this._prefixCallback=r||M,this._inversePredicate=!1,this._quantified=Object.create(null),!t){const t=[];let r;if(this._callback=(e,n)=>{e?r=e:n&&t.push(n)},this._lexer.tokenize(e).every((e=>this._readCallback=this._readCallback(e))),r)throw r;return t}this._callback=t,this._lexer.tokenize(e,((e,t)=>{null!==e?(this._callback(e),this._callback=M):this._readCallback&&(this._readCallback=this._readCallback(t))}))}}function M(){}function L(e,t){const r=t.namedNode;e._namedNode=r,e._blankNode=t.blankNode,e._literal=t.literal,e._variable=t.variable,e._quad=t.quad,e.DEFAULTGRAPH=t.defaultGraph(),e.RDF_FIRST=r(u.rdf.first),e.RDF_REST=r(u.rdf.rest),e.RDF_NIL=r(u.rdf.nil),e.N3_FORALL=r(u.r.forAll),e.N3_FORSOME=r(u.r.forSome),e.ABBREVIATIONS={a:r(u.rdf.type),"=":r(u.owl.sameAs),">":r(u.log.implies)},e.QUANTIFIERS_GRAPH=r("urn:n3:quantifiers")}function k(e){return!!e&&"NamedNode"===e.termType}function F(e){return!!e&&"BlankNode"===e.termType}function B(e){return!!e&&"Literal"===e.termType}function U(e){return!!e&&"Variable"===e.termType}function q(e){return!!e&&"DefaultGraph"===e.termType}function V(e){return q(e.graph)}function Q(e,t){return $({"":e.value||e},t)("")}function $(e,t){const r=Object.create(null);for(const t in e)n(t,e[t]);function n(e,n){if("string"==typeof n){const i=Object.create(null);r[e]=e=>i[e]||(i[e]=t.namedNode(n+e))}else if(!(e in r))throw new Error(`Unknown prefix: ${e}`);return r[e]}return t=t||T,n}L(C.prototype,T);const H=T.defaultGraph(),{rdf:G,xsd:z}=u,K=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,X=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,J={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class W extends S{equals(e){return e===this}}class Y{constructor(e,t){if(this._prefixRegex=/$0^/,e&&"function"!=typeof e.write&&(t=e,e=null),t=t||{},this._lists=t.lists,e)this._outputStream=e,this._endStream=void 0===t.end||!!t.end;else{let e="";this._outputStream={write(t,r,n){e+=t,n&&n()},end:t=>{t&&t(null,e)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(t.format)?(this._lineMode=!0,this._writeQuad=this._writeQuadLine):(this._lineMode=!1,this._graph=H,this._prefixIRIs=Object.create(null),t.prefixes&&this.addPrefixes(t.prefixes),t.baseIRI&&(this._baseMatcher=new RegExp(`^${ee(t.baseIRI)}${t.baseIRI.endsWith("/")?"":"[#?]"}`),this._baseLength=t.baseIRI.length))}get _inDefaultGraph(){return H.equals(this._graph)}_write(e,t){this._outputStream.write(e,"utf8",t)}_writeQuad(e,t,r,n,i){try{n.equals(this._graph)||(this._write((null===this._subject?"":this._inDefaultGraph?".\n":"\n}\n")+(H.equals(n)?"":`${this._encodeIriOrBlank(n)} {\n`)),this._graph=n,this._subject=null),e.equals(this._subject)?t.equals(this._predicate)?this._write(`, ${this._encodeObject(r)}`,i):this._write(`;\n ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i):this._write(`${(null===this._subject?"":".\n")+this._encodeSubject(this._subject=e)} ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i)}catch(e){i&&i(e)}}_writeQuadLine(e,t,r,n,i){delete this._prefixMatch,this._write(this.quadToString(e,t,r,n),i)}quadToString(e,t,r,n){return`${this._encodeSubject(e)} ${this._encodeIriOrBlank(t)} ${this._encodeObject(r)}${n&&n.value?` ${this._encodeIriOrBlank(n)} .\n`:" .\n"}`}quadsToString(e){return e.map((e=>this.quadToString(e.subject,e.predicate,e.object,e.graph))).join("")}_encodeSubject(e){return"Quad"===e.termType?this._encodeQuad(e):this._encodeIriOrBlank(e)}_encodeIriOrBlank(e){if("NamedNode"!==e.termType)return this._lists&&e.value in this._lists&&(e=this.list(this._lists[e.value])),"id"in e?e.id:`_:${e.value}`;let t=e.value;this._baseMatcher&&this._baseMatcher.test(t)&&(t=t.substr(this._baseLength)),K.test(t)&&(t=t.replace(X,Z));const r=this._prefixRegex.exec(t);return r?r[1]?this._prefixIRIs[r[1]]+r[2]:t:`<${t}>`}_encodeLiteral(e){let t=e.value;if(K.test(t)&&(t=t.replace(X,Z)),e.language)return`"${t}"@${e.language}`;if(this._lineMode){if(e.datatype.value===z.string)return`"${t}"`}else switch(e.datatype.value){case z.string:return`"${t}"`;case z.boolean:if("true"===t||"false"===t)return t;break;case z.integer:if(/^[+-]?\d+$/.test(t))return t;break;case z.decimal:if(/^[+-]?\d*\.\d+$/.test(t))return t;break;case z.double:if(/^[+-]?(?:\d+\.\d*|\.?\d+)[eE][+-]?\d+$/.test(t))return t}return`"${t}"^^${this._encodeIriOrBlank(e.datatype)}`}_encodePredicate(e){return e.value===G.type?"a":this._encodeIriOrBlank(e)}_encodeObject(e){switch(e.termType){case"Quad":return this._encodeQuad(e);case"Literal":return this._encodeLiteral(e);default:return this._encodeIriOrBlank(e)}}_encodeQuad({subject:e,predicate:t,object:r,graph:n}){return`<<${this._encodeSubject(e)} ${this._encodePredicate(t)} ${this._encodeObject(r)}${q(n)?"":` ${this._encodeIriOrBlank(n)}`}>>`}_blockedWrite(){throw new Error("Cannot write because the writer has been closed.")}addQuad(e,t,r,n,i){void 0===r?this._writeQuad(e.subject,e.predicate,e.object,e.graph,t):"function"==typeof n?this._writeQuad(e,t,r,H,n):this._writeQuad(e,t,r,n||H,i)}addQuads(e){for(let t=0;t.\n`)}if(r){let e="",t="";for(const r in this._prefixIRIs)e+=e?`|${r}`:r,t+=(t?"|":"")+this._prefixIRIs[r];e=ee(e),this._prefixRegex=new RegExp(`^(?:${t})[^/]*$|^(${e})([_a-zA-Z][\\-_a-zA-Z0-9]*)$`)}this._write(r?"\n":"",t)}blank(e,t){let r,n,i=e;switch(void 0===e?i=[]:e.termType?i=[{predicate:e,object:t}]:"length"in e||(i=[e]),n=i.length){case 0:return new W("[]");case 1:if(r=i[0],!(r.object instanceof W))return new W(`[ ${this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)} ]`);default:let t="[";for(let a=0;a{t=null,e(r,n)});if(this._endStream)try{return this._outputStream.end(t)}catch(e){}t&&t()}}function Z(e){let t=J[e];return void 0===t&&(1===e.length?(t=e.charCodeAt(0).toString(16),t="\\u0000".substr(0,6-t.length)+t):(t=(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)+9216).toString(16),t="\\U00000000".substr(0,10-t.length)+t)),t}function ee(e){return e.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&")}var te=r(58521);class re{constructor(e,t){this._size=0,this._graphs=Object.create(null),this._id=0,this._ids=Object.create(null),this._entities=Object.create(null),this._blankNodeIndex=0,t||!e||e[0]||(t=e,e=null),t=t||{},this._factory=t.factory||T,e&&this.addQuads(e)}_termFromId(e,t){if("."===e[0]){const t=this._entities,r=e.split(".");return this._factory.quad(this._termFromId(t[r[1]]),this._termFromId(t[r[2]]),this._termFromId(t[r[3]]),r[4]&&this._termFromId(t[r[4]]))}return I(e,t)}_termToNumericId(e){if("Quad"===e.termType){const t=this._termToNumericId(e.subject),r=this._termToNumericId(e.predicate),n=this._termToNumericId(e.object);let i;return t&&r&&n&&(q(e.graph)||(i=this._termToNumericId(e.graph)))&&this._ids[i?`.${t}.${r}.${n}.${i}`:`.${t}.${r}.${n}`]}return this._ids[P(e)]}_termToNewNumericId(e){const t=e&&"Quad"===e.termType?`.${this._termToNewNumericId(e.subject)}.${this._termToNewNumericId(e.predicate)}.${this._termToNewNumericId(e.object)}${q(e.graph)?"":`.${this._termToNewNumericId(e.graph)}`}`:P(e);return this._ids[t]||(this._ids[this._entities[++this._id]=t]=this._id)}get size(){let e=this._size;if(null!==e)return e;e=0;const t=this._graphs;let r,n;for(const i in t)for(const a in r=t[i].subjects)for(const t in n=r[a])e+=Object.keys(n[t]).length;return this._size=e}_addToIndex(e,t,r,n){const i=e[t]||(e[t]={}),a=i[r]||(i[r]={}),o=n in a;return o||(a[n]=null),!o}_removeFromIndex(e,t,r,n){const i=e[t],a=i[r];delete a[n];for(const e in a)return;delete i[r];for(const e in i)return;delete e[t]}*_findInIndex(e,t,r,n,i,a,o,s){let c,u,l;const d=this._entities,h=this._termFromId(s,this._factory),p={subject:null,predicate:null,object:null};t&&((c=e,e={})[t]=c[t]);for(const t in e)if(u=e[t]){p[i]=this._termFromId(d[t],this._factory),r&&((c=u,u={})[r]=c[r]);for(const e in u)if(l=u[e]){p[a]=this._termFromId(d[e],this._factory);const t=n?n in l?[n]:[]:Object.keys(l);for(let e=0;e{r in t||(t[r]=!0,e(this._termFromId(this._entities[r],this._factory)))}}add(e){return this.addQuad(e),this}addQuad(e,t,r,n){t||(n=e.graph,r=e.object,t=e.predicate,e=e.subject),n=P(n);let i=this._graphs[n];i||(i=this._graphs[n]={subjects:{},predicates:{},objects:{}},Object.freeze(i)),e=this._termToNewNumericId(e),t=this._termToNewNumericId(t),r=this._termToNewNumericId(r);const a=this._addToIndex(i.subjects,e,t,r);return this._addToIndex(i.predicates,t,r,e),this._addToIndex(i.objects,r,e,t),this._size=null,a}addQuads(e){for(let t=0;t{this.addQuad(e)})),e}removeQuad(e,t,r,n){t||(n=e.graph,r=e.object,t=e.predicate,e=e.subject),n=P(n);const i=this._graphs;let a,o,s;if(!((e=e&&this._termToNumericId(e))&&(t=t&&this._termToNumericId(t))&&(r=r&&this._termToNumericId(r))&&(a=i[n])&&(o=a.subjects[e])&&(s=o[t])&&r in s))return!1;for(e in this._removeFromIndex(a.subjects,e,t,r),this._removeFromIndex(a.predicates,t,r,e),this._removeFromIndex(a.objects,r,e,t),null!==this._size&&this._size--,a.subjects)return!0;return delete i[n],!0}removeQuads(e){for(let t=0;t{this.removeQuad(e)})),e}removeMatches(e,t,r,n){const i=new te.Readable({objectMode:!0});return i._read=()=>{for(const a of this.readQuads(e,t,r,n))i.push(a);i.push(null)},this.remove(i)}deleteGraph(e){return this.removeMatches(null,null,null,e)}getQuads(e,t,r,n){return[...this.readQuads(e,t,r,n)]}*readQuads(e,t,r,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s,c;if(!(e&&!(o=this._termToNumericId(e))||t&&!(s=this._termToNumericId(t))||r&&!(c=this._termToNumericId(r))))for(const e in i)(a=i[e])&&(o?c?yield*this._findInIndex(a.objects,c,o,s,"object","subject","predicate",e):yield*this._findInIndex(a.subjects,o,s,null,"subject","predicate","object",e):s?yield*this._findInIndex(a.predicates,s,c,null,"predicate","object","subject",e):c?yield*this._findInIndex(a.objects,c,null,null,"object","subject","predicate",e):yield*this._findInIndex(a.subjects,null,null,null,"subject","predicate","object",e))}match(e,t,r,n){return new ne(this,e,t,r,n)}countQuads(e,t,r,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s,c,u=0;if(e&&!(o=this._termToNumericId(e))||t&&!(s=this._termToNumericId(t))||r&&!(c=this._termToNumericId(r)))return 0;for(const n in i)(a=i[n])&&(u+=e?r?this._countInIndex(a.objects,c,o,s):this._countInIndex(a.subjects,o,s,c):t?this._countInIndex(a.predicates,s,c,o):this._countInIndex(a.objects,c,o,s));return u}forEach(e,t,r,n,i){this.some((t=>(e(t),!1)),t,r,n,i)}every(e,t,r,n,i){let a=!1;const o=!this.some((t=>(a=!0,!e(t))),t,r,n,i);return a&&o}some(e,t,r,n,i){for(const a of this.readQuads(t,r,n,i))if(e(a))return!0;return!1}getSubjects(e,t,r){const n=[];return this.forSubjects((e=>{n.push(e)}),e,t,r),n}forSubjects(e,t,r,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s;if(e=this._uniqueEntities(e),!(t&&!(o=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(a=i[n])&&(o?s?this._loopBy2Keys(a.predicates,o,s,e):this._loopByKey1(a.subjects,o,e):s?this._loopByKey0(a.objects,s,e):this._loop(a.subjects,e))}getPredicates(e,t,r){const n=[];return this.forPredicates((e=>{n.push(e)}),e,t,r),n}forPredicates(e,t,r,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s;if(e=this._uniqueEntities(e),!(t&&!(o=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(a=i[n])&&(o?s?this._loopBy2Keys(a.objects,s,o,e):this._loopByKey0(a.subjects,o,e):s?this._loopByKey1(a.predicates,s,e):this._loop(a.predicates,e))}getObjects(e,t,r){const n=[];return this.forObjects((e=>{n.push(e)}),e,t,r),n}forObjects(e,t,r,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s;if(e=this._uniqueEntities(e),!(t&&!(o=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(a=i[n])&&(o?s?this._loopBy2Keys(a.subjects,o,s,e):this._loopByKey1(a.objects,o,e):s?this._loopByKey0(a.predicates,s,e):this._loop(a.objects,e))}getGraphs(e,t,r){const n=[];return this.forGraphs((e=>{n.push(e)}),e,t,r),n}forGraphs(e,t,r,n){for(const i in this._graphs)this.some((t=>(e(t.graph),!0)),t,r,n,i)}createBlankNode(e){let t,r;if(e)for(t=e=`_:${e}`,r=1;this._ids[t];)t=e+r++;else do{t="_:b"+this._blankNodeIndex++}while(this._ids[t]);return this._ids[t]=++this._id,this._entities[this._id]=t,this._factory.blankNode(t.substr(2))}extractLists({remove:e=!1,ignoreErrors:t=!1}={}){const r={},n=t?()=>!0:(e,t)=>{throw new Error(`${e.value} ${t}`)},i=this.getQuads(null,u.rdf.rest,u.rdf.nil,null),a=e?[...i]:[];return i.forEach((t=>{const i=[];let o,s,c=!1;const l=t.graph;let d=t.subject;for(;d&&!c;){const e=this.getQuads(null,null,d,null),t=this.getQuads(d,null,null,null);let r,h=null,p=null,f=null;for(let i=0;i{switch(e){case"data":t=n;break;case"end":r=n}}},((e,t)=>{e&&this.emit("error",e)||t&&this.push(t)}),((e,t)=>{this.emit("prefix",e,t)})),this._transform=(e,r,n)=>{t(e),n()},this._flush=e=>{r(),e()}}import(e){return e.on("data",(e=>{this.write(e)})),e.on("end",(()=>{this.end()})),e.on("error",(e=>{this.emit("error",e)})),this}}class ae extends te.Transform{constructor(e){super({encoding:"utf8",writableObjectMode:!0});const t=this._writer=new Y({write:(e,t,r)=>{this.push(e),r&&r()},end:e=>{this.push(null),e&&e()}},e);this._transform=(e,r,n)=>{t.addQuad(e,n)},this._flush=e=>{t.end(e)}}import(e){return e.on("data",(e=>{this.write(e)})),e.on("end",(()=>{this.end()})),e.on("error",(e=>{this.emit("error",e)})),e.on("prefix",((e,t)=>{this._writer.addPrefix(e,t)})),this}}const oe={Lexer:g,Parser:C,Writer:Y,Store:re,StreamParser:ie,StreamWriter:ae,Util:n,DataFactory:T,Term:S,NamedNode:O,Literal:E,BlankNode:x,Variable:A,DefaultGraph:R,Quad:N,Triple:N,termFromId:I,termToId:P}},39907:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],u=!1,l=-1;function d(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&h())}function h(){if(!u){var e=o(d);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l1)for(var r=1;r{!function(){var t;t="object"==typeof window&&window?window:r.g,e.exports?e.exports=t.Promise?t.Promise:o:t.Promise||(t.Promise=o);var n=t.setImmediate||function(e){setTimeout(e,1)};function i(e,t){return function(){e.apply(t,arguments)}}var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],h(e,i(c,this),i(u,this))}function s(e){var t=this;null!==this._state?n((function(){var r=t._state?e.onFulfilled:e.onRejected;if(null!==r){var n;try{n=r(t._value)}catch(t){return void e.reject(t)}e.resolve(n)}else(t._state?e.resolve:e.reject)(t._value)})):this._deferreds.push(e)}function c(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void h(i(t,e),i(c,this),i(u,this))}this._state=!0,this._value=e,l.call(this)}catch(e){u.call(this,e)}}function u(e){this._state=!1,this._value=e,l.call(this)}function l(){for(var e=0,t=this._deferreds.length;e{let n;e.exports="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:r.g):e=>(n||(n=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)))},18050:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(73968),t),i(r(31352),t),i(r(81947),t),i(r(91417),t),i(r(88963),t),i(r(89135),t),i(r(22e3),t)},73968:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlankNode=void 0,t.BlankNode=class{constructor(e){this.termType="BlankNode",this.value=e}equals(e){return!!e&&"BlankNode"===e.termType&&e.value===this.value}}},31352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataFactory=void 0;const n=r(73968),i=r(81947),a=r(91417),o=r(88963),s=r(89135),c=r(22e3);let u=0;t.DataFactory=class{constructor(e){this.blankNodeCounter=0,e=e||{},this.blankNodePrefix=e.blankNodePrefix||`df_${u++}_`}namedNode(e){return new o.NamedNode(e)}blankNode(e){return new n.BlankNode(e||`${this.blankNodePrefix}${this.blankNodeCounter++}`)}literal(e,t){return new a.Literal(e,t)}variable(e){return new c.Variable(e)}defaultGraph(){return i.DefaultGraph.INSTANCE}quad(e,t,r,n){return new s.Quad(e,t,r,n||this.defaultGraph())}fromTerm(e){switch(e.termType){case"NamedNode":return this.namedNode(e.value);case"BlankNode":return this.blankNode(e.value);case"Literal":return e.language?this.literal(e.value,e.language):e.datatype.equals(a.Literal.XSD_STRING)?this.literal(e.value):this.literal(e.value,this.fromTerm(e.datatype));case"Variable":return this.variable(e.value);case"DefaultGraph":return this.defaultGraph();case"Quad":return this.quad(this.fromTerm(e.subject),this.fromTerm(e.predicate),this.fromTerm(e.object),this.fromTerm(e.graph))}}fromQuad(e){return this.fromTerm(e)}resetBlankNodeCounter(){this.blankNodeCounter=0}}},81947:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultGraph=void 0;class r{constructor(){this.termType="DefaultGraph",this.value=""}equals(e){return!!e&&"DefaultGraph"===e.termType}}t.DefaultGraph=r,r.INSTANCE=new r},91417:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Literal=void 0;const n=r(88963);class i{constructor(e,t){this.termType="Literal",this.value=e,"string"==typeof t?(this.language=t,this.datatype=i.RDF_LANGUAGE_STRING):t?(this.language="",this.datatype=t):(this.language="",this.datatype=i.XSD_STRING)}equals(e){return!!e&&"Literal"===e.termType&&e.value===this.value&&e.language===this.language&&this.datatype.equals(e.datatype)}}t.Literal=i,i.RDF_LANGUAGE_STRING=new n.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),i.XSD_STRING=new n.NamedNode("http://www.w3.org/2001/XMLSchema#string")},88963:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedNode=void 0,t.NamedNode=class{constructor(e){this.termType="NamedNode",this.value=e}equals(e){return!!e&&"NamedNode"===e.termType&&e.value===this.value}}},89135:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Quad=void 0,t.Quad=class{constructor(e,t,r,n){this.termType="Quad",this.value="",this.subject=e,this.predicate=t,this.object=r,this.graph=n}equals(e){return!!e&&("Quad"===e.termType||!e.termType)&&this.subject.equals(e.subject)&&this.predicate.equals(e.predicate)&&this.object.equals(e.object)&&this.graph.equals(e.graph)}}},22e3:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Variable=void 0,t.Variable=class{constructor(e){this.termType="Variable",this.value=e}equals(e){return!!e&&"Variable"===e.termType&&e.value===this.value}}},91032:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(9157),t)},9157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTermGrounded=t.termToSignature=t.quadToSignature=t.sha1hex=t.hashTerm=t.hashTerms=t.getGraphBlankNodes=t.uniqGraph=t.deindexGraph=t.indexGraph=t.getQuadsWithoutBlankNodes=t.getQuadsWithBlankNodes=t.hasValue=t.hashValues=t.getBijectionInner=t.getBijection=t.isomorphic=void 0;const n=r(99499),i=r(22112),a=r(13252);function o(e,t){const r=p(h(e)),n=p(h(t));if(Object.keys(r).length!==Object.keys(n).length)return null;for(const e in r)if(r[e]!==n[e])return null;return s(y(d(e)),y(d(t)),g(e),g(t))}function s(e,t,r,n,a,o){a||(a={}),o||(o={});const[d,h]=m(e,r,a),[p,f]=m(t,n,o);if(Object.keys(d).length!==Object.keys(p).length)return null;for(const e in d)if(!l(p,d[e]))return null;let y={};for(const e of r){const t=i.termToString(e),r=h[t];for(const e in f)if(f[e]===r){y[t]=e,delete f[e];break}}if(!c(Object.keys(y).sort(),r.map(i.termToString).sort())||!c(u(y).sort(),n.map(i.termToString).sort())){y=null;for(const a of r){const o=i.termToString(a);if(!d[o])for(const a of n){const c=i.termToString(a);if(!p[c]&&h[o]===f[c]){const i=v(o);y=s(e,t,r,n,Object.assign(Object.assign({},d),{[o]:i}),Object.assign(Object.assign({},p),{[c]:i}))}}}}return y}function c(e,t){if(e.length!==t.length)return!1;for(let r=e.length;r--;)if(e[r]!==t[r])return!1;return!0}function u(e){const t=[];for(const r in e)t.push(e[r]);return t}function l(e,t){for(const r in e)if(e[r]===t)return!0;return!1}function d(e){return e.filter((e=>a.someTerms(e,(e=>"BlankNode"===e.termType||"Quad"===e.termType&&a.getTermsNested(e).some((e=>"BlankNode"===e.termType))))))}function h(e){return e.filter((e=>a.everyTerms(e,(e=>"BlankNode"!==e.termType&&!("Quad"===e.termType&&a.getTermsNested(e).some((e=>"BlankNode"===e.termType)))))))}function p(e){const t={};for(const r of e)t[JSON.stringify(i.quadToStringQuad(r))]=!0;return t}function f(e){return Object.keys(e).map((e=>i.stringQuadToQuad(JSON.parse(e))))}function y(e){return f(p(e))}function g(e){return a.uniqTerms(e.map((e=>a.getBlankNodes(a.getTermsNested(e)))).reduce(((e,t)=>e.concat(t)),[]))}function m(e,t,r){const n=Object.assign({},r),a={};let o=!0;for(;o;){const r=Object.keys(n).length;for(const r of t){const t=i.termToString(r);if(!n[t]){const[i,o]=b(r,e,n);i&&(n[t]=o),a[t]=o}}const s={};for(const e in a){const t=a[e];void 0===s[t]?s[t]=e:s[t]=!1}for(const e in s){const t=s[e];t&&(n[t]=e)}o=r!==Object.keys(n).length}return[n,a]}function b(e,t,r){const n=[];let i=!0;for(const o of t){const t=a.getTermsNested(o);if(t.some((t=>t.equals(e)))){n.push(_(o,r,e));for(const n of t)T(n,r)||n.equals(e)||(i=!1)}}return[i,v(n.sort().join(""))]}function v(e){return n.sha1().update(e).digest("hex")}function _(e,t,r){return a.getTerms(e).map((e=>w(e,t,r))).join("|")}function w(e,t,r){return e.equals(r)?"@self":"BlankNode"===e.termType?t[i.termToString(e)]||"@blank":"Quad"===e.termType?`<${_(e,t,r)}>`:i.termToString(e)}function T(e,t){return"BlankNode"!==e.termType&&!("Quad"===e.termType&&a.getTermsNested(e).some((e=>!T(e,t))))||!!t[i.termToString(e)]}t.isomorphic=function(e,t){return!!o(e,t)},t.getBijection=o,t.getBijectionInner=s,t.hashValues=u,t.hasValue=l,t.getQuadsWithBlankNodes=d,t.getQuadsWithoutBlankNodes=h,t.indexGraph=p,t.deindexGraph=f,t.uniqGraph=y,t.getGraphBlankNodes=g,t.hashTerms=m,t.hashTerm=b,t.sha1hex=v,t.quadToSignature=_,t.termToSignature=w,t.isTermGrounded=T},80740:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.getSupportedJavaScriptPrimitives=t.getSupportedRdfDatatypes=t.getTermRaw=t.toRdf=t.fromRdf=void 0;const a=r(18050),o=r(23303),s=r(76516);i(r(23303),t),i(r(48959),t),i(r(76516),t);const c=new a.DataFactory,u=new s.Translator;function l(e,t){return u.fromRdf(e,t)}u.registerHandler(new o.TypeHandlerString,o.TypeHandlerString.TYPES.map((e=>c.namedNode(e))),["string"]),u.registerHandler(new o.TypeHandlerBoolean,[o.TypeHandlerBoolean.TYPE].map((e=>c.namedNode(e))),["boolean"]),u.registerHandler(new o.TypeHandlerNumberDouble,o.TypeHandlerNumberDouble.TYPES.map((e=>c.namedNode(e))),["number"]),u.registerHandler(new o.TypeHandlerNumberInteger,o.TypeHandlerNumberInteger.TYPES.map((e=>c.namedNode(e))),["number"]),u.registerHandler(new o.TypeHandlerDate,o.TypeHandlerDate.TYPES.map((e=>c.namedNode(e))),["object"]),t.fromRdf=l,t.toRdf=function(e,t){return t&&"namedNode"in t&&(t={dataFactory:t}),(t=t||{})&&!t.dataFactory&&(t.dataFactory=c),u.toRdf(e,t)},t.getTermRaw=function(e,t){return"Literal"===e.termType?l(e,t):e.value},t.getSupportedRdfDatatypes=function(){return u.getSupportedRdfDatatypes()},t.getSupportedJavaScriptPrimitives=function(){return u.getSupportedJavaScriptPrimitives()}},48959:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},76516:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Translator=void 0,t.Translator=class{constructor(){this.supportedRdfDatatypes=[],this.fromRdfHandlers={},this.toRdfHandlers={}}static incorrectRdfDataType(e){throw new Error(`Invalid RDF ${e.datatype.value} value: '${e.value}'`)}registerHandler(e,t,r){for(const r of t)this.supportedRdfDatatypes.push(r),this.fromRdfHandlers[r.value]=e;for(const t of r){let r=this.toRdfHandlers[t];r||(this.toRdfHandlers[t]=r=[]),r.push(e)}}fromRdf(e,t){const r=this.fromRdfHandlers[e.datatype.value];return r?r.fromRdf(e,t):e.value}toRdf(e,t){const r=this.toRdfHandlers[typeof e];if(r)for(const n of r){const r=n.toRdf(e,t);if(r)return r}throw new Error(`Invalid JavaScript value: '${e}'`)}getSupportedRdfDatatypes(){return this.supportedRdfDatatypes}getSupportedJavaScriptPrimitives(){return Object.keys(this.toRdfHandlers)}}},48403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerBoolean=void 0;const n=r(76516);class i{fromRdf(e,t){switch(e.value){case"true":case"1":return!0;case"false":case"0":return!1}return t&&n.Translator.incorrectRdfDataType(e),!1}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(e?"true":"false",t||r.namedNode(i.TYPE))}}i.TYPE="http://www.w3.org/2001/XMLSchema#boolean",t.TypeHandlerBoolean=i},5603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerDate=void 0;const n=r(76516);class i{fromRdf(e,t){switch(t&&!e.value.match(i.VALIDATORS[e.datatype.value.substr(33,e.datatype.value.length)])&&n.Translator.incorrectRdfDataType(e),e.datatype.value){case"http://www.w3.org/2001/XMLSchema#gDay":return new Date(0,0,parseInt(e.value,10));case"http://www.w3.org/2001/XMLSchema#gMonthDay":const t=e.value.split("-");return new Date(0,parseInt(t[0],10)-1,parseInt(t[1],10));case"http://www.w3.org/2001/XMLSchema#gYear":return new Date(e.value+"-01-01");case"http://www.w3.org/2001/XMLSchema#gYearMonth":return new Date(e.value+"-01");default:return new Date(e.value)}}toRdf(e,{datatype:t,dataFactory:r}){if(t=t||r.namedNode(i.TYPES[0]),!(e instanceof Date))return null;const n=e;let a;switch(t.value){case"http://www.w3.org/2001/XMLSchema#gDay":a=String(n.getUTCDate());break;case"http://www.w3.org/2001/XMLSchema#gMonthDay":a=n.getUTCMonth()+1+"-"+n.getUTCDate();break;case"http://www.w3.org/2001/XMLSchema#gYear":a=String(n.getUTCFullYear());break;case"http://www.w3.org/2001/XMLSchema#gYearMonth":a=n.getUTCFullYear()+"-"+(n.getUTCMonth()+1);break;case"http://www.w3.org/2001/XMLSchema#date":a=n.toISOString().replace(/T.*$/,"");break;default:a=n.toISOString()}return r.literal(a,t)}}i.TYPES=["http://www.w3.org/2001/XMLSchema#dateTime","http://www.w3.org/2001/XMLSchema#date","http://www.w3.org/2001/XMLSchema#gDay","http://www.w3.org/2001/XMLSchema#gMonthDay","http://www.w3.org/2001/XMLSchema#gYear","http://www.w3.org/2001/XMLSchema#gYearMonth"],i.VALIDATORS={date:/^[0-9]+-[0-9][0-9]-[0-9][0-9]Z?$/,dateTime:/^[0-9]+-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9](\.[0-9][0-9][0-9])?((Z?)|([\+-][0-9][0-9]:[0-9][0-9]))$/,gDay:/^[0-9]+$/,gMonthDay:/^[0-9]+-[0-9][0-9]$/,gYear:/^[0-9]+$/,gYearMonth:/^[0-9]+-[0-9][0-9]$/},t.TypeHandlerDate=i},25947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerNumberDouble=void 0;const n=r(76516);class i{fromRdf(e,t){const r=parseFloat(e.value);return t&&isNaN(r)&&n.Translator.incorrectRdfDataType(e),r}toRdf(e,{datatype:t,dataFactory:r}){return t=t||r.namedNode(i.TYPES[0]),isNaN(e)?r.literal("NaN",t):isFinite(e)?e%1==0?null:r.literal(e.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),t):r.literal(e>0?"INF":"-INF",t)}}i.TYPES=["http://www.w3.org/2001/XMLSchema#double","http://www.w3.org/2001/XMLSchema#decimal","http://www.w3.org/2001/XMLSchema#float"],t.TypeHandlerNumberDouble=i},83002:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerNumberInteger=void 0;const n=r(76516);class i{fromRdf(e,t){const r=parseInt(e.value,10);return t&&(isNaN(r)||e.value.indexOf(".")>=0)&&n.Translator.incorrectRdfDataType(e),r}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(String(e),t||(e<=i.MAX_INT&&e>=i.MIN_INT?r.namedNode(i.TYPES[0]):r.namedNode(i.TYPES[1])))}}i.TYPES=["http://www.w3.org/2001/XMLSchema#integer","http://www.w3.org/2001/XMLSchema#long","http://www.w3.org/2001/XMLSchema#int","http://www.w3.org/2001/XMLSchema#byte","http://www.w3.org/2001/XMLSchema#short","http://www.w3.org/2001/XMLSchema#negativeInteger","http://www.w3.org/2001/XMLSchema#nonNegativeInteger","http://www.w3.org/2001/XMLSchema#nonPositiveInteger","http://www.w3.org/2001/XMLSchema#positiveInteger","http://www.w3.org/2001/XMLSchema#unsignedByte","http://www.w3.org/2001/XMLSchema#unsignedInt","http://www.w3.org/2001/XMLSchema#unsignedLong","http://www.w3.org/2001/XMLSchema#unsignedShort"],i.MAX_INT=2147483647,i.MIN_INT=-2147483648,t.TypeHandlerNumberInteger=i},2074:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerString=void 0;class r{fromRdf(e){return e.value}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(e,t)}}r.TYPES=["http://www.w3.org/2001/XMLSchema#string","http://www.w3.org/2001/XMLSchema#normalizedString","http://www.w3.org/2001/XMLSchema#anyURI","http://www.w3.org/2001/XMLSchema#base64Binary","http://www.w3.org/2001/XMLSchema#language","http://www.w3.org/2001/XMLSchema#Name","http://www.w3.org/2001/XMLSchema#NCName","http://www.w3.org/2001/XMLSchema#NMTOKEN","http://www.w3.org/2001/XMLSchema#token","http://www.w3.org/2001/XMLSchema#hexBinary","http://www.w3.org/1999/02/22-rdf-syntax-ns#langString","http://www.w3.org/2001/XMLSchema#time","http://www.w3.org/2001/XMLSchema#duration"],t.TypeHandlerString=r},23303:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(48403),t),i(r(5603),t),i(r(25947),t),i(r(83002),t),i(r(2074),t)},10953:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.storeStream=void 0;const n=r(92427);t.storeStream=function(e){const t=n.RdfStore.createDefault();return new Promise(((r,n)=>t.import(e).on("error",n).once("end",(()=>r(t)))))}},92427:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(51368),t),i(r(2369),t),i(r(62947),t),i(r(12924),t),i(r(76386),t),i(r(94992),t),i(r(26503),t),i(r(86721),t),i(r(93616),t),i(r(55100),t),i(r(95832),t),i(r(68752),t),i(r(38654),t),i(r(15698),t),i(r(53277),t),i(r(86937),t),i(r(15291),t),i(r(29390),t),i(r(25383),t),i(r(39034),t)},15291:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},29390:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arePatternsQuoted=t.quadHasVariables=t.quadToPattern=t.encodeOptionalTerms=t.orderQuadComponents=t.getComponentOrderScore=t.getBestIndex=t.QUAD_TERM_NAMES_INVERSE=void 0;const n=r(13252);function i(e,t){return e.map(((r,n)=>t.includes(r)?e.length-n:0)).reduce(((e,t)=>e+t),0)}function a(e){for(const t of n.QUAD_TERM_NAMES){const r=e[t];if("Variable"===r.termType||"Quad"===r.termType&&a(r))return!0}return!1}t.QUAD_TERM_NAMES_INVERSE=Object.fromEntries(n.QUAD_TERM_NAMES.map(((e,t)=>[e,t]))),t.getBestIndex=function(e,t){if(1===e.length||t.every((e=>void 0!==e)))return 0;const r=[];for(let e=0;e({score:i(e,r),index:t}))).sort(((e,t)=>t.score-e.score))[0].index},t.getComponentOrderScore=i,t.orderQuadComponents=function(e,r){return e.map((e=>{const n=t.QUAD_TERM_NAMES_INVERSE[e];return r[n]}))},t.encodeOptionalTerms=function(e,t){const r=e.map((e=>{if(e){if("Quad"===e.termType&&a(e))return;const r=t.encodeOptional(e);return void 0===r?"none":r}return e}));if(!r.includes("none"))return r},t.quadToPattern=function(e,t,r,n,i){let a=!1;return[[e||void 0,t||void 0,r||void 0,n||void 0].map((e=>{if(e){if("Variable"===e.termType)return;if("Quad"===e.termType)return i?e:void(a=!0)}return e})),a]},t.quadHasVariables=a,t.arePatternsQuoted=function(e){return e.map((e=>"Quad"===(null==e?void 0:e.termType)&&a(e)))}},25383:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},39034:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStore=void 0;const n=r(76664),i=r(18050),a=r(13252),o=r(51368),s=r(76386),c=r(26503),u=r(68752),l=r(29390);class d{constructor(e){this.features={quotedTripleFiltering:!0},this._size=0,this.options=e,this.dataFactory=e.dataFactory,this.dictionary=e.dictionary,this.indexesWrapped=d.constructIndexesWrapped(e),this.indexesWrappedComponentOrders=this.indexesWrapped.map((e=>e.componentOrder))}static createDefault(){return new d({indexCombinations:d.DEFAULT_INDEX_COMBINATIONS,indexConstructor:e=>new u.RdfStoreIndexNestedMapQuoted(e),dictionary:new c.TermDictionaryQuotedIndexed(new s.TermDictionaryNumberRecordFullTerms),dataFactory:new i.DataFactory})}static constructIndexesWrapped(e){const t=[];if(0===e.indexCombinations.length)throw new Error("At least one index combination is required");for(const r of e.indexCombinations){if(!d.isCombinationValid(r))throw new Error(`Invalid index combination: ${r}`);t.push({index:e.indexConstructor(e),componentOrder:r,componentOrderInverse:Object.fromEntries(r.map(((e,t)=>[e,t])))})}return t}static isCombinationValid(e){for(const t of a.QUAD_TERM_NAMES)if(!e.includes(t))return!1;return 4===e.length}get size(){return this._size}addQuad(e){const t=[this.dictionary.encode(e.subject),this.dictionary.encode(e.predicate),this.dictionary.encode(e.object),this.dictionary.encode(e.graph)];let r=!1;for(const e of this.indexesWrapped)r=e.index.set((0,l.orderQuadComponents)(e.componentOrder,t),!0);return!!r&&(this._size++,!0)}removeQuad(e){const t=[this.dictionary.encodeOptional(e.subject),this.dictionary.encodeOptional(e.predicate),this.dictionary.encodeOptional(e.object),this.dictionary.encodeOptional(e.graph)];if(t.includes(void 0))return!1;let r=!1;for(const e of this.indexesWrapped)if(r=e.index.remove((0,l.orderQuadComponents)(e.componentOrder,t)),!r)break;return!!r&&(this._size--,!0)}remove(e){return e.on("data",(e=>this.removeQuad(e))),e}removeMatches(e,t,r,n){return this.remove(this.match(e,t,r,n))}deleteGraph(e){return"string"==typeof e&&(e=this.dataFactory.namedNode(e)),this.removeMatches(void 0,void 0,void 0,e)}import(e){return e.on("data",(e=>this.addQuad(e))),e}*readQuads(e,t,r,n){const i=Boolean(this.dictionary.features.quotedTriples)&&Object.values(this.indexesWrapped).every((e=>e.index.features.quotedTripleFiltering)),[o,s]=(0,l.quadToPattern)(e,t,r,n,i),c=this.indexesWrapped[(0,l.getBestIndex)(this.indexesWrappedComponentOrders,o)],u=(0,l.orderQuadComponents)(c.componentOrder,o);for(const i of c.index.find(u)){const o=this.dataFactory.quad(i[c.componentOrderInverse.subject],i[c.componentOrderInverse.predicate],i[c.componentOrderInverse.object],i[c.componentOrderInverse.graph]);s?(0,a.matchPattern)(o,e,t,r,n)&&(yield o):yield o}}getQuads(e,t,r,n){return[...this.readQuads(e,t,r,n)]}match(e,t,r,i){return(0,n.wrap)(this.readQuads(e,t,r,i))}countQuads(e,t,r,n){const i=Boolean(this.dictionary.features.quotedTriples)&&Object.values(this.indexesWrapped).every((e=>e.index.features.quotedTripleFiltering)),[a]=(0,l.quadToPattern)(e,t,r,n,i);if(a.every((e=>void 0===e)))return this.size;const o=this.indexesWrapped[(0,l.getBestIndex)(this.indexesWrappedComponentOrders,a)],s=(0,l.orderQuadComponents)(o.componentOrder,a);return o.index.count(s)}asDataset(){return new o.DatasetCoreWrapper(this)}}d.DEFAULT_INDEX_COMBINATIONS=[["graph","subject","predicate","object"],["graph","predicate","object","subject"],["graph","object","subject","predicate"]],t.RdfStore=d},51368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DatasetCoreWrapper=void 0;const n=r(39034);class i{constructor(e){this.store=e}get size(){return this.store.size}add(e){return this.store.addQuad(e),this}delete(e){return this.store.removeQuad(e),this}has(e){for(const t of this.store.readQuads(e.subject,e.predicate,e.object,e.graph))return!0;return!1}match(e,t,r,a){const o=new n.RdfStore(this.store.options);for(const n of this.store.readQuads(e,t,r,a))o.addQuad(n);return new i(o)}[Symbol.iterator](){return this.store.readQuads()}}t.DatasetCoreWrapper=i},2369:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},62947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryNumberMap=void 0;const n=r(18050),i=r(22112);t.TermDictionaryNumberMap=class{constructor(e=new n.DataFactory){this.lastId=0,this.dictionary=new Map,this.reverseDictionary=new Map,this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const t=(0,i.termToString)(e);let r=this.dictionary.get(t);return void 0===r&&(r=this.lastId++,this.dictionary.set(t,r),this.reverseDictionary.set(r,t)),r}encodeOptional(e){const t=(0,i.termToString)(e);return this.dictionary.get(t)}decode(e){const t=this.reverseDictionary.get(e);if(void 0===t)throw new Error(`The value ${e} is not present in this dictionary`);return(0,i.stringToTerm)(t,this.dataFactory)}encodings(){return this.reverseDictionary.keys()}findQuotedTriples(e){throw new Error("findQuotedTriples is not supported")}findQuotedTriplesEncoded(e){throw new Error("findQuotedTriplesEncoded is not supported")}}},12924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryNumberRecord=void 0;const n=r(18050),i=r(22112);t.TermDictionaryNumberRecord=class{constructor(e=new n.DataFactory){this.lastId=0,this.dictionary={},this.reverseDictionary={},this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const t=(0,i.termToString)(e);let r=this.dictionary[t];return void 0===r&&(r=this.lastId++,this.dictionary[t]=r,this.reverseDictionary[r]=t),r}encodeOptional(e){const t=(0,i.termToString)(e);return this.dictionary[t]}decode(e){const t=this.reverseDictionary[e];if(void 0===t)throw new Error(`The value ${e} is not present in this dictionary`);return(0,i.stringToTerm)(t,this.dataFactory)}*encodings(){for(const e of Object.keys(this.reverseDictionary))yield Number.parseInt(e,10)}findQuotedTriples(e){throw new Error("findQuotedTriples is not supported")}findQuotedTriplesEncoded(e){throw new Error("findQuotedTriplesEncoded is not supported")}}},76386:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryNumberRecordFullTerms=void 0;const n=r(18050),i=r(22112);t.TermDictionaryNumberRecordFullTerms=class{constructor(e=new n.DataFactory){this.lastId=0,this.dictionary={},this.reverseDictionary={},this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const t=(0,i.termToString)(e);let r=this.dictionary[t];return void 0===r&&(r=this.lastId++,this.dictionary[t]=r,this.reverseDictionary[r]=e),r}encodeOptional(e){const t=(0,i.termToString)(e);return this.dictionary[t]}decode(e){const t=this.reverseDictionary[e];if(void 0===t)throw new Error(`The value ${e} is not present in this dictionary`);return t}*encodings(){for(const e of Object.keys(this.reverseDictionary))yield Number.parseInt(e,10)}findQuotedTriples(e){throw new Error("findQuotedTriples is not supported")}findQuotedTriplesEncoded(e){throw new Error("findQuotedTriplesEncoded is not supported")}}},94992:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryQuoted=void 0;const n=r(18050),i=r(13252);class a{constructor(e,t,r=new n.DataFactory){this.features={quotedTriples:!0},this.plainTermDictionary=e,this.quotedTriplesDictionary=t,this.dataFactory=r}encode(e){return"Quad"===e.termType?a.BITMASK|1+this.quotedTriplesDictionary.encode(e):this.plainTermDictionary.encode(e)}encodeOptional(e){if("Quad"===e.termType){const t=this.quotedTriplesDictionary.encodeOptional(e);return void 0===t?t:a.BITMASK|1+t}return this.plainTermDictionary.encodeOptional(e)}decode(e){if(a.BITMASK&e){const t=(~a.BITMASK&e)-1;return this.quotedTriplesDictionary.decode(t)}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.encodings())yield a.BITMASK|1+e}*findQuotedTriples(e){for(const t of this.findQuotedTriplesEncoded(e))yield this.decode(t)}*findQuotedTriplesEncoded(e){for(let t of this.quotedTriplesDictionary.encodings()){t=a.BITMASK|1+t;const r=this.decode(t);(0,i.matchPattern)(r,e.subject,e.predicate,e.object,e.graph)&&(yield t)}}}a.BITMASK=1<<31,t.TermDictionaryQuoted=a},26503:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryQuotedIndexed=void 0;const n=r(18050),i=r(95832),a=r(29390);class o{constructor(e,t=new n.DataFactory){this.quotedTriplesDictionary=[],this.features={quotedTriples:!0},this.plainTermDictionary=e;const r={indexCombinations:[],indexConstructor:void 0,dictionary:this,dataFactory:t};this.quotedTriplesReverseDictionaries=[new i.RdfStoreIndexNestedMap(r),new i.RdfStoreIndexNestedMap(r),new i.RdfStoreIndexNestedMap(r)],this.dataFactory=t}encode(e){return"Quad"===e.termType?this.encodeQuotedTriple(e,!1):this.plainTermDictionary.encode(e)}encodeQuotedTriple(e,t){if("DefaultGraph"!==e.graph.termType)throw new Error("Encoding of quoted quads outside of the default graph is not allowed");const r=(0,a.encodeOptionalTerms)([e.subject,e.predicate,e.object,e.graph],this),n=r&&r.every((e=>void 0!==e))?this.quotedTriplesReverseDictionaries[0].getEncoded(r):void 0;if(void 0!==n||t)return void 0===n?void 0:o.BITMASK|n;const i=[this.encode(e.subject),this.encode(e.predicate),this.encode(e.object)],s=this.quotedTriplesDictionary.length+1;this.quotedTriplesDictionary.push(i);const c=this.encode(this.dataFactory.defaultGraph());return this.quotedTriplesReverseDictionaries[0].set([i[0],i[1],i[2],c],s),this.quotedTriplesReverseDictionaries[1].set([i[1],i[2],i[0],c],s),this.quotedTriplesReverseDictionaries[2].set([i[2],i[0],i[1],c],s),o.BITMASK|s}encodeOptional(e){return"Quad"===e.termType?this.encodeQuotedTriple(e,!0):this.plainTermDictionary.encodeOptional(e)}decode(e){if(o.BITMASK&e){const t=(~o.BITMASK&e)-1;if(t>=this.quotedTriplesDictionary.length)throw new Error(`The value ${e} is not present in the quoted triples range of the dictionary`);const r=this.quotedTriplesDictionary[t];return this.dataFactory.quad(this.decode(r[0]),this.decode(r[1]),this.decode(r[2]))}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.keys())yield o.BITMASK|1+e}*findQuotedTriples(e){for(const t of this.findQuotedTriplesEncoded(e))yield this.decode(t)}*findQuotedTriplesEncoded(e){const[t,r]=(0,a.quadToPattern)(e.subject,e.predicate,e.object,e.graph,!0);for(const e of this.patternToIterable(t[0]))for(const r of this.patternToIterable(t[1]))for(const n of this.patternToIterable(t[2]))for(const i of this.patternToIterable(t[3]))if(e&&r||!r&&!n){const a=[e,r,n,i];for(const e of this.quotedTriplesReverseDictionaries[0].findEncoded(a,t))yield o.BITMASK|this.quotedTriplesReverseDictionaries[0].getEncoded(e)}else if(!e&&r){const a=[r,n,e,i];for(const e of this.quotedTriplesReverseDictionaries[1].findEncoded(a,t))yield o.BITMASK|this.quotedTriplesReverseDictionaries[1].getEncoded(e)}else{const a=[n,e,r,i];for(const e of this.quotedTriplesReverseDictionaries[2].findEncoded(a,t))yield o.BITMASK|this.quotedTriplesReverseDictionaries[2].getEncoded(e)}}*patternToIterable(e){if("Quad"===(null==e?void 0:e.termType))return void(yield*this.findQuotedTriplesEncoded(e));if(void 0===e)return void(yield);const t=this.encodeOptional(e);void 0!==t&&(yield t)}}o.BITMASK=1<<31,t.TermDictionaryQuotedIndexed=o},86721:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryQuotedReferential=void 0;const n=r(18050),i=r(13252),a=r(29390);class o{constructor(e,t=new n.DataFactory){this.quotedTriplesDictionary=[],this.quotedTriplesReverseDictionary={},this.features={quotedTriples:!0},this.plainTermDictionary=e,this.dataFactory=t}encode(e){return"Quad"===e.termType?this.encodeQuotedTriple(e,!1):this.plainTermDictionary.encode(e)}encodeQuotedTriple(e,t){var r;if("DefaultGraph"!==e.graph.termType)throw new Error("Encoding of quoted quads outside of the default graph is not allowed");const n=null===(r=(0,a.encodeOptionalTerms)([e.subject,e.predicate,e.object,void 0],this))||void 0===r?void 0:r.slice(0,3),i=n&&n.every((e=>void 0!==e))?this.quotedTriplesReverseDictionary[n.join(o.SEPARATOR)]:void 0;if(void 0!==i||t)return void 0===i?void 0:o.BITMASK|i;const s=[this.encode(e.subject),this.encode(e.predicate),this.encode(e.object)],c=this.quotedTriplesDictionary.length+1;return this.quotedTriplesDictionary.push(s),this.quotedTriplesReverseDictionary[s.join(o.SEPARATOR)]=c,o.BITMASK|c}encodeOptional(e){return"Quad"===e.termType?this.encodeQuotedTriple(e,!0):this.plainTermDictionary.encodeOptional(e)}decode(e){if(o.BITMASK&e){const t=(~o.BITMASK&e)-1;if(t>=this.quotedTriplesDictionary.length)throw new Error(`The value ${e} is not present in the quoted triples range of the dictionary`);const r=this.quotedTriplesDictionary[t];return this.dataFactory.quad(this.decode(r[0]),this.decode(r[1]),this.decode(r[2]))}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.keys())yield o.BITMASK|1+e}*findQuotedTriples(e){for(const t of this.findQuotedTriplesEncoded(e))yield this.decode(t)}*findQuotedTriplesEncoded(e){for(let t of this.quotedTriplesDictionary.keys()){t=o.BITMASK|1+t;const r=this.decode(t);(0,i.matchPattern)(r,e.subject,e.predicate,e.object,e.graph)&&(yield t)}}}o.BITMASK=1<<31,o.SEPARATOR="_",t.TermDictionaryQuotedReferential=o},93616:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionarySymbol=void 0;const n=r(18050),i=r(22112);t.TermDictionarySymbol=class{constructor(e=new n.DataFactory){this.features={quotedTriples:!1},this.dataFactory=e}encode(e){return Symbol.for(`rdf::${(0,i.termToString)(e)}`)}encodeOptional(e){return this.encode(e)}decode(e){const t=Symbol.keyFor(e);if(void 0===t)throw new Error(`The value ${String(e)} is not present in this dictionary`);return(0,i.stringToTerm)(t.slice(5),this.dataFactory)}encodings(){throw new Error("encodings is not supported")}findQuotedTriples(e){throw new Error("findQuotedTriples is not supported")}findQuotedTriplesEncoded(e){throw new Error("findQuotedTriplesEncoded is not supported")}}},55100:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},95832:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedMap=void 0;const n=r(29390);t.RdfStoreIndexNestedMap=class{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedMap=new Map}set(e,t){const r=this.nestedMap;let n=r.get(e[0]);n||(n=new Map,r.set(e[0],n));let i=n.get(e[1]);i||(i=new Map,n.set(e[1],i));let a=i.get(e[2]);a||(a=new Map,i.set(e[2],a));const o=a.has(e[3]);return o||a.set(e[3],t),!o}remove(e){const t=this.nestedMap,r=t.get(e[0]);if(!r)return!1;const n=r.get(e[1]);if(!n)return!1;const i=n.get(e[2]);if(!i)return!1;const a=i.delete(e[3]);return a&&0===i.size&&(n.delete(e[2]),0===n.size&&(r.delete(e[1]),0===r.size&&t.delete(e[0]))),a}get(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(t&&!t.includes(void 0))return this.getEncoded(t)}getEncoded(e){const t=this.nestedMap.get(e[0]);if(!t)return;const r=t.get(e[1]);if(!r)return;const n=r.get(e[2]);return n?n.get(e[3]):void 0}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!t)return;const[r,i,a,o]=t,[s,c,u,l]=e;let d,h,p,f,y,g,m;const b=this.nestedMap,v=void 0!==r?b.has(r)?[r]:[]:b.keys();for(const e of v){y=b.get(e),d=s||this.dictionary.decode(e);const t=void 0!==i?y.has(i)?[i]:[]:y.keys();for(const e of t){g=y.get(e),h=c||this.dictionary.decode(e);const t=void 0!==a?g.has(a)?[a]:[]:g.keys();for(const e of t){m=g.get(e),p=u||this.dictionary.decode(e);const t=void 0!==o?m.has(o)?[o]:[]:m.keys();for(const e of t)f=l||this.dictionary.decode(e),yield[d,h,p,f]}}}}*findEncoded(e,t){const[r,n,i,a]=e;let o,s,c;const u=this.nestedMap,l=void 0!==r?u.has(r)?[r]:[]:u.keys();for(const e of l){o=u.get(e);const t=void 0!==n?o.has(n)?[n]:[]:o.keys();for(const r of t){s=o.get(r);const t=void 0!==i?s.has(i)?[i]:[]:s.keys();for(const n of t){c=s.get(n);const t=void 0!==a?c.has(a)?[a]:[]:c.keys();for(const i of t)yield[e,r,n,i]}}}}count(e){let t=0;const r=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!r)return 0;const i=r[0],a=r[1],o=r[2],s=r[3];let c,u,l;const d=this.nestedMap,h=void 0!==i?d.has(i)?[i]:[]:d.keys();for(const e of h){c=d.get(e);const r=void 0!==a?c.has(a)?[a]:[]:c.keys();for(const e of r){u=c.get(e);const r=void 0!==o?u.has(o)?[o]:[]:u.keys();for(const e of r)l=u.get(e),void 0!==s?l.has(s)&&t++:t+=l.size}}return t}}},68752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedMapQuoted=void 0;const n=r(29390),i=r(95832);class a extends i.RdfStoreIndexNestedMap{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*getQuotedPatternKeys(e,t){for(const r of this.dictionary.findQuotedTriplesEncoded(t))e.has(r)&&(yield r)}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!t)return;const[r,i,a,o]=t,[s,c,u,l]=e,[d,h,p,f]=(0,n.arePatternsQuoted)(e);let y,g,m,b,v,_,w;const T=this.nestedMap,S=void 0!==s?d?this.getQuotedPatternKeys(T,s):T.has(r)?[r]:[]:T.keys();for(const e of S){v=T.get(e),y=!d&&s?s:this.dictionary.decode(e);const t=void 0!==c?h?this.getQuotedPatternKeys(v,c):v.has(i)?[i]:[]:v.keys();for(const e of t){_=v.get(e),g=!h&&c?c:this.dictionary.decode(e);const t=void 0!==u?p?this.getQuotedPatternKeys(_,u):_.has(a)?[a]:[]:_.keys();for(const e of t){w=_.get(e),m=!p&&u?u:this.dictionary.decode(e);const t=void 0!==l?f?this.getQuotedPatternKeys(w,l):w.has(o)?[o]:[]:w.keys();for(const e of t)b=!f&&l?l:this.dictionary.decode(e),yield[y,g,m,b]}}}}*findEncoded(e,t){const[r,i,a,o]=e,[s,c,u,l]=t,[d,h,p,f]=(0,n.arePatternsQuoted)(t);let y,g,m;const b=this.nestedMap,v=void 0!==s?d?this.getQuotedPatternKeys(b,s):b.has(r)?[r]:[]:b.keys();for(const e of v){y=b.get(e);const t=void 0!==c?h?this.getQuotedPatternKeys(y,c):y.has(i)?[i]:[]:y.keys();for(const r of t){g=y.get(r);const t=void 0!==u?p?this.getQuotedPatternKeys(g,u):g.has(a)?[a]:[]:g.keys();for(const n of t){m=g.get(n);const t=void 0!==l?f?this.getQuotedPatternKeys(m,l):m.has(o)?[o]:[]:m.keys();for(const i of t)yield[Number.parseInt(e,10),Number.parseInt(r,10),Number.parseInt(n,10),Number.parseInt(i,10)]}}}}count(e){let t=0;const r=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!r)return 0;const[i,a,o,s]=r,[c,u,l,d]=e,[h,p,f,y]=(0,n.arePatternsQuoted)(e);let g,m,b;const v=this.nestedMap,_=void 0!==c?h?this.getQuotedPatternKeys(v,c):v.has(i)?[i]:[]:v.keys();for(const e of _){g=v.get(e);const r=void 0!==u?p?this.getQuotedPatternKeys(g,u):g.has(a)?[a]:[]:g.keys();for(const e of r){m=g.get(e);const r=void 0!==l?f?this.getQuotedPatternKeys(m,l):m.has(o)?[o]:[]:m.keys();for(const e of r)b=m.get(e),void 0!==d?y?t+=[...this.getQuotedPatternKeys(b,d)].length:b.has(s)&&t++:t+=b.size}}return t}}t.RdfStoreIndexNestedMapQuoted=a},38654:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedMapRecursive=void 0;const n=r(29390);t.RdfStoreIndexNestedMapRecursive=class{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedMap=new Map}set(e,t){let r=this.nestedMap,n=!1;for(const[i,a]of e.entries()){const o=r;let s=o.get(a);s?i===e.length-1&&(n=!0):(s=i===e.length-1?t:new Map,o.set(a,s)),r=s}return!n}remove(e){const t=this.nestedMap,r=t.get(e[0]);if(!r)return!1;const n=r.get(e[1]);if(!n)return!1;const i=n.get(e[2]);if(!i)return!1;const a=i.delete(e[3]);return a&&0===i.size&&(n.delete(e[2]),0===n.size&&(r.delete(e[1]),0===r.size&&t.delete(e[0]))),a}get(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(t&&!t.includes(void 0))return this.getEncoded(t)}getEncoded(e){const t=this.nestedMap.get(e[0]);if(!t)return;const r=t.get(e[1]);if(!r)return;const n=r.get(e[2]);return n?n.get(e[3]):void 0}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(t)for(const r of this.findEncoded(t,e))yield[void 0!==t[0]?e[0]:this.dictionary.decode(r[0]),void 0!==t[1]?e[1]:this.dictionary.decode(r[1]),void 0!==t[2]?e[2]:this.dictionary.decode(r[2]),void 0!==t[3]?e[3]:this.dictionary.decode(r[3])]}*findEncoded(e,t){return yield*this.findEncodedInner(0,e,t,this.nestedMap,[])}*findEncodedInner(e,t,r,n,i){if(e===t.length)yield[...i];else{const a=t[e];if(r[e]){const o=a;if(void 0!==o){const s=n.get(o);s&&(i[e]=a,yield*this.findEncodedInner(e+1,t,r,s,i))}}else for(const[a,o]of n.entries())i[e]=a,yield*this.findEncodedInner(e+1,t,r,o,i)}}count(e){return this.countInner(0,e,this.nestedMap)}countInner(e,t,r){const n=t[e];let i=0;if(n){const a=this.dictionary.encodeOptional(n);if(void 0!==a){if(e===t.length-1)return r.has(a)?1:0;const n=r.get(a);n&&(i+=this.countInner(e+1,t,n))}}else{if(e===t.length-1)return r.size;for(const n of r.values())i+=this.countInner(e+1,t,n)}return i}}},15698:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedMapRecursiveQuoted=void 0;const n=r(29390),i=r(38654);class a extends i.RdfStoreIndexNestedMapRecursive{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*findEncoded(e,t){return yield*this.findEncodedInnerQuoted(0,e,t,(0,n.arePatternsQuoted)(t),this.nestedMap,[])}*findEncodedInnerQuoted(e,t,r,n,i,a){if(e===t.length)yield[...a];else{const o=t[e],s=r[e];if(s)if(n[e]){const o=this.dictionary.findQuotedTriplesEncoded(s);for(const s of o){const o=i.get(s);o&&(a[e]=s,yield*this.findEncodedInnerQuoted(e+1,t,r,n,o,a))}}else{const s=o;if(void 0!==s){const c=i.get(s);c&&(a[e]=o,yield*this.findEncodedInnerQuoted(e+1,t,r,n,c,a))}}else for(const[o,s]of i.entries())a[e]=o,yield*this.findEncodedInnerQuoted(e+1,t,r,n,s,a)}}countInner(e,t,r){const i=t[e];let a=0;if(i)if("Quad"===i.termType&&(0,n.quadHasVariables)(i)){const n=this.dictionary.findQuotedTriplesEncoded(i);for(const i of n)if(e===t.length-1)r.has(i)&&a++;else{const n=r.get(i);n&&(a+=this.countInner(e+1,t,n))}}else{const n=this.dictionary.encodeOptional(i);if(void 0!==n){if(e===t.length-1)return r.has(n)?1:0;const i=r.get(n);i&&(a+=this.countInner(e+1,t,i))}}else{if(e===t.length-1)return r.size;for(const n of r.values())a+=this.countInner(e+1,t,n)}return a}}t.RdfStoreIndexNestedMapRecursiveQuoted=a},53277:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedRecord=void 0;const n=r(29390);t.RdfStoreIndexNestedRecord=class{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedRecords={}}set(e,t){const r=this.nestedRecords,n=r[e[0]]||(r[e[0]]={}),i=n[e[1]]||(n[e[1]]={}),a=i[e[2]]||(i[e[2]]={});return!a[e[3]]&&(a[e[3]]=t,!0)}remove(e){const t=this.nestedRecords,r=t[e[0]];if(!r)return!1;const n=r[e[1]];if(!n)return!1;const i=n[e[2]];return!!i&&!!i[e[3]]&&(delete i[e[3]],0===Object.keys(i).length&&(delete n[e[2]],0===Object.keys(n).length&&(delete r[e[1]],0===Object.keys(r).length&&delete t[e[0]])),!0)}get(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(t&&!t.includes(void 0))return this.getEncoded(t)}getEncoded(e){var t,r,n;return null===(n=null===(r=null===(t=this.nestedRecords[e[0]])||void 0===t?void 0:t[e[1]])||void 0===r?void 0:r[e[2]])||void 0===n?void 0:n[e[3]]}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!t)return;const[r,i,a,o]=t,[s,c,u,l]=e;let d,h,p,f,y,g,m;const b=this.nestedRecords,v=void 0!==r?r in b?[r]:[]:Object.keys(b);for(const e of v){y=b[e],d=s||this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==i?i in y?[i]:[]:Object.keys(y);for(const e of t){g=y[e],h=c||this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==a?a in g?[a]:[]:Object.keys(g);for(const e of t){m=g[e],p=u||this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==o?o in m?[o]:[]:Object.keys(m);for(const e of t)f=l||this.dictionary.decode(Number.parseInt(e,10)),yield[d,h,p,f]}}}}*findEncoded(e,t){const[r,n,i,a]=e;let o,s,c;const u=this.nestedRecords,l=void 0!==r?r in u?[r]:[]:Object.keys(u);for(const e of l){o=u[e];const t=void 0!==n?n in o?[n]:[]:Object.keys(o);for(const r of t){s=o[r];const t=void 0!==i?i in s?[i]:[]:Object.keys(s);for(const n of t){c=s[n];const t=void 0!==a?a in c?[a]:[]:Object.keys(c);for(const i of t)yield[Number.parseInt(e,10),Number.parseInt(r,10),Number.parseInt(n,10),Number.parseInt(i,10)]}}}}count(e){let t=0;const r=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!r)return 0;const i=r[0],a=r[1],o=r[2],s=r[3];let c,u,l;const d=this.nestedRecords,h=void 0!==i?i in d?[i]:[]:Object.keys(d);for(const e of h){c=d[e];const r=void 0!==a?a in c?[a]:[]:Object.keys(c);for(const e of r){u=c[e];const r=void 0!==o?o in u?[o]:[]:Object.keys(u);for(const e of r)l=u[e],void 0!==s?s in l&&t++:t+=Object.keys(l).length}}return t}}},86937:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedRecordQuoted=void 0;const n=r(29390),i=r(53277);class a extends i.RdfStoreIndexNestedRecord{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*getQuotedPatternKeys(e,t){for(const r of this.dictionary.findQuotedTriplesEncoded(t))r in e&&(yield r)}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!t)return;const[r,i,a,o]=t,[s,c,u,l]=e,[d,h,p,f]=(0,n.arePatternsQuoted)(e);let y,g,m,b,v,_,w;const T=this.nestedRecords,S=void 0!==s?d?this.getQuotedPatternKeys(T,s):r in T?[r]:[]:Object.keys(T);for(const e of S){v=T[e],y=!d&&s?s:this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==c?h?this.getQuotedPatternKeys(v,c):i in v?[i]:[]:Object.keys(v);for(const e of t){_=v[e],g=!h&&c?c:this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==u?p?this.getQuotedPatternKeys(_,u):a in _?[a]:[]:Object.keys(_);for(const e of t){w=_[e],m=!p&&u?u:this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==l?f?this.getQuotedPatternKeys(w,l):o in w?[o]:[]:Object.keys(w);for(const e of t)b=!f&&l?l:this.dictionary.decode(Number.parseInt(e,10)),yield[y,g,m,b]}}}}*findEncoded(e,t){const[r,i,a,o]=e,[s,c,u,l]=t,[d,h,p,f]=(0,n.arePatternsQuoted)(t);let y,g,m;const b=this.nestedRecords,v=void 0!==s?d?this.getQuotedPatternKeys(b,s):r in b?[r]:[]:Object.keys(b);for(const e of v){y=b[e];const t=void 0!==c?h?this.getQuotedPatternKeys(y,c):i in y?[i]:[]:Object.keys(y);for(const r of t){g=y[r];const t=void 0!==u?p?this.getQuotedPatternKeys(g,u):a in g?[a]:[]:Object.keys(g);for(const n of t){m=g[n];const t=void 0!==l?f?this.getQuotedPatternKeys(m,l):o in m?[o]:[]:Object.keys(m);for(const i of t)yield[Number.parseInt(e,10),Number.parseInt(r,10),Number.parseInt(n,10),Number.parseInt(i,10)]}}}}count(e){let t=0;const r=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!r)return 0;const[i,a,o,s]=r,[c,u,l,d]=e,[h,p,f,y]=(0,n.arePatternsQuoted)(e);let g,m,b;const v=this.nestedRecords,_=void 0!==c?h?this.getQuotedPatternKeys(v,c):i in v?[i]:[]:Object.keys(v);for(const e of _){g=v[e];const r=void 0!==u?p?this.getQuotedPatternKeys(g,u):a in g?[a]:[]:Object.keys(g);for(const e of r){m=g[e];const r=void 0!==l?f?this.getQuotedPatternKeys(m,l):o in m?[o]:[]:Object.keys(m);for(const e of r)b=m[e],void 0!==d?y?t+=[...this.getQuotedPatternKeys(b,d)].length:s in b&&t++:t+=Object.keys(b).length}}return t}}t.RdfStoreIndexNestedRecordQuoted=a},2887:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(32935),t),i(r(73974),t)},32935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PendingStreamsIndex=void 0;const n=r(22112),i=r(13252);class a{constructor(){this.indexedStreams=new Map,this.allStreams=[]}termToString(e){return e&&"Variable"!==e.termType?(0,n.termToString)(e):a.ID_VARIABLE}addPatternListener(e,t,r,n,i){this.allStreams.push(e);const o=`${this.termToString(t)}${a.ID_SEPARATOR}${this.termToString(r)}${a.ID_SEPARATOR}${this.termToString(n)}${a.ID_SEPARATOR}${this.termToString(i)}`;let s=this.indexedStreams.get(o);s||(s=[],this.indexedStreams.set(o,s)),s.push(e)}getPendingStreamsForQuad(e){let t=[(0,i.getTerms)(e).map((e=>(0,n.termToString)(e)))];for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamingStore=void 0;const n=r(72243),i=r(58521),a=r(32935);t.StreamingStore=class{constructor(e=new n.Store){this.pendingStreams=new a.PendingStreamsIndex,this.ended=!1,this.store=e}end(){this.ended=!0;for(const e of this.pendingStreams.allStreams)e.push(null),e._pipeSource.unpipe()}importToListeners(e){e.on("data",(e=>{if(!this.ended&&!this.store.countQuads(e.subject,e.predicate,e.object,e.graph))for(const t of this.pendingStreams.getPendingStreamsForQuad(e))t.isInitialized&&(t.push(e),t.emit("quad",e))}))}import(e){if(this.ended)throw new Error("Attempted to import into an ended StreamingStore");return this.importToListeners(e),this.store.import(e)}match(e,t,r,n){const a=this.store.match(e,t,r,n);let o=a;if(!this.ended){const s=new i.PassThrough({objectMode:!0});this.pendingStreams.addPatternListener(s,e,t,r,n),o=a.pipe(s,{end:!1}),o._pipeSource=a;const c=a._read;a._read=e=>{s.isInitialized=!0,c.call(a,e)}}return o}getStore(){return this.store}}},64817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.termToString=t.stringToTerm=t.stringQuadToQuad=t.quadToStringQuad=t.getLiteralValue=t.getLiteralType=t.getLiteralLanguage=void 0;const n=r(91379);Object.defineProperty(t,"getLiteralLanguage",{enumerable:!0,get:function(){return n.getLiteralLanguage}}),Object.defineProperty(t,"getLiteralType",{enumerable:!0,get:function(){return n.getLiteralType}}),Object.defineProperty(t,"getLiteralValue",{enumerable:!0,get:function(){return n.getLiteralValue}}),Object.defineProperty(t,"quadToStringQuad",{enumerable:!0,get:function(){return n.quadToStringQuad}}),Object.defineProperty(t,"stringQuadToQuad",{enumerable:!0,get:function(){return n.stringQuadToQuad}}),Object.defineProperty(t,"stringToTerm",{enumerable:!0,get:function(){return n.stringToTerm}}),Object.defineProperty(t,"termToString",{enumerable:!0,get:function(){return n.termToString}})},91379:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringQuadToQuad=t.quadToStringQuad=t.stringToTerm=t.getLiteralLanguage=t.getLiteralType=t.getLiteralValue=t.termToString=void 0;const n=new(r(18050).DataFactory);function i(e){var t,r;if(e)switch(e.termType){case"NamedNode":return`<${t=e.value,t.replace(u,d)}>`;case"BlankNode":return`_:${e.value}`;case"Literal":{const t=e;return`"${r=t.value,u.test(r)&&(r=r.replace(u,d)),r}"${t.datatype&&"http://www.w3.org/2001/XMLSchema#string"!==t.datatype.value&&"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"!==t.datatype.value?`^^<${t.datatype.value}>`:""}${t.language?`@${t.language}`:""}`}case"Quad":return`<<${i(e.subject)} ${i(e.predicate)} ${i(e.object)}${"DefaultGraph"===e.graph.termType?"":` ${i(e.graph)}`}>>`;case"Variable":return`?${e.value}`;case"DefaultGraph":return e.value}}function a(e){const t=/^"([^]*)"((\^\^.*)|(@.*))?$/u.exec(e);if(!t)throw new Error(`${e} is not a literal`);return t[1].replace(/\\"/gu,'"')}function o(e){const t=/^"[^]*"(?:\^\^<([^"]+)>|(@)[^@"]+)?$/u.exec(e);if(!t)throw new Error(`${e} is not a literal`);return t[1]||(t[2]?"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString":"http://www.w3.org/2001/XMLSchema#string")}function s(e){const t=/^"[^]*"(?:@([^@"]+)|\^\^[^"]+)?$/u.exec(e);if(!t)throw new Error(`${e} is not a literal`);return t[1]?t[1].toLowerCase():""}function c(e,t){if(t=t||n,!e||0===e.length)return t.defaultGraph();switch(e[0]){case"_":return t.blankNode(e.slice(2));case"?":if(!t.variable)throw new Error("Missing 'variable()' method on the given DataFactory");return t.variable(e.slice(1));case'"':{const r=s(e),n=t.namedNode(o(e));return t.literal(a(e),r||n)}default:if(e.startsWith("<<")&&e.endsWith(">>")){const r=e.slice(2,-2),n=[];let i=0,a=0;for(let t=0;t"===o){if(0===i)throw new Error(`Found closing tag without opening tag in ${e}`);i--}" "===o&&0===i&&(n.push(r.slice(a,t)),a=t+1)}if(0!==i)throw new Error(`Found opening tag without closing tag in ${e}`);if(n.push(r.slice(a,r.length)),3!==n.length&&4!==n.length)throw new Error(`Nested quad syntax error ${e}`);return t.quad(c(n[0]),c(n[1]),c(n[2]),n[3]?c(n[3]):void 0)}if(!e.startsWith("<")||!e.endsWith(">"))throw new Error(`Detected invalid iri for named node (must be wrapped in <>): ${e}`);return t.namedNode(e.slice(1,-1))}}t.termToString=i,t.getLiteralValue=a,t.getLiteralType=o,t.getLiteralLanguage=s,t.stringToTerm=c,t.quadToStringQuad=function(e){return{subject:i(e.subject),predicate:i(e.predicate),object:i(e.object),graph:i(e.graph)}},t.stringQuadToQuad=function(e,t){return(t=t||n).quad(c(e.subject,t),c(e.predicate,t),c(e.object,t),c(e.graph,t))};const u=/["\\\t\n\r\b\f\u0000-\u0019]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=new Map([["\\","\\\\"],['"','\\"'],["\t","\\t"],["\n","\\n"],["\r","\\r"],["\b","\\b"],["\f","\\f"]]);function d(e){const t=l.get(e);if(!t){if(1===e.length){const t=e.charCodeAt(0).toString(16);return`${"\\u0000".slice(0,-t.length)}${t}`}const t=(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)+9216).toString(16);return`${"\\U00000000".slice(0,-t.length)}${t}`}return t}},22112:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.termToString=t.stringToTerm=t.stringQuadToQuad=t.quadToStringQuad=t.getLiteralValue=t.getLiteralType=t.getLiteralLanguage=void 0;const n=r(48244);Object.defineProperty(t,"getLiteralLanguage",{enumerable:!0,get:function(){return n.getLiteralLanguage}}),Object.defineProperty(t,"getLiteralType",{enumerable:!0,get:function(){return n.getLiteralType}}),Object.defineProperty(t,"getLiteralValue",{enumerable:!0,get:function(){return n.getLiteralValue}}),Object.defineProperty(t,"quadToStringQuad",{enumerable:!0,get:function(){return n.quadToStringQuad}}),Object.defineProperty(t,"stringQuadToQuad",{enumerable:!0,get:function(){return n.stringQuadToQuad}}),Object.defineProperty(t,"stringToTerm",{enumerable:!0,get:function(){return n.stringToTerm}}),Object.defineProperty(t,"termToString",{enumerable:!0,get:function(){return n.termToString}})},48244:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringQuadToQuad=t.quadToStringQuad=t.stringToTerm=t.getLiteralLanguage=t.getLiteralType=t.getLiteralValue=t.termToString=void 0;const n=new(r(18050).DataFactory);function i(e){if(e)switch(e.termType){case"NamedNode":case"DefaultGraph":return e.value;case"BlankNode":return"_:"+e.value;case"Literal":const t=e;return'"'+t.value+'"'+(t.datatype&&"http://www.w3.org/2001/XMLSchema#string"!==t.datatype.value&&"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"!==t.datatype.value?"^^"+t.datatype.value:"")+(t.language?"@"+t.language:"");case"Quad":return`<<${i(e.subject)} ${i(e.predicate)} ${i(e.object)}${"DefaultGraph"===e.graph.termType?"":" "+i(e.graph)}>>`;case"Variable":return"?"+e.value}}function a(e){const t=/^"([^]*)"/.exec(e);if(!t)throw new Error(e+" is not a literal");return t[1]}function o(e){const t=/^"[^]*"(?:\^\^([^"]+)|(@)[^@"]+)?$/.exec(e);if(!t)throw new Error(e+" is not a literal");return t[1]||(t[2]?"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString":"http://www.w3.org/2001/XMLSchema#string")}function s(e){const t=/^"[^]*"(?:@([^@"]+)|\^\^[^"]+)?$/.exec(e);if(!t)throw new Error(e+" is not a literal");return t[1]?t[1].toLowerCase():""}function c(e,t){if(t=t||n,!e||!e.length)return t.defaultGraph();switch(e[0]){case"_":return t.blankNode(e.substr(2));case"?":if(!t.variable)throw new Error("Missing 'variable()' method on the given DataFactory");return t.variable(e.substr(1));case'"':const r=s(e),n=t.namedNode(o(e));return t.literal(a(e),r||n);default:if("<"===e[0]&&e.length>4&&"<"===e[1]&&">"===e[e.length-1]&&">"===e[e.length-2]){const r=e.slice(2,-2).trim();let n=[],i=0,a=0,o=!1;for(let t=0;t"===s){if(0===i)throw new Error("Found closing tag without opening tag in "+e);i--}if('"'===s){let e=!1,n=t;for(;n-- >0&&"\\"===r[n];)e=!e;e||(o=!o)}if(" "===s&&!o&&0===i){for(n.push(r.slice(a,t));" "===r[t+1];)t+=1;a=t+1}}if(0!==i)throw new Error("Found opening tag without closing tag in "+e);if(n.push(r.slice(a,r.length)),3!==n.length&&4!==n.length)throw new Error("Nested quad syntax error "+e);return n=n.map((e=>e.startsWith("<")&&!e.includes(" ")?e.slice(1,-1):e)),t.quad(c(n[0]),c(n[1]),c(n[2]),n[3]?c(n[3]):void 0)}return t.namedNode(e)}}t.termToString=i,t.getLiteralValue=a,t.getLiteralType=o,t.getLiteralLanguage=s,t.stringToTerm=c,t.quadToStringQuad=function(e){return{subject:i(e.subject),predicate:i(e.predicate),object:i(e.object),graph:i(e.graph)}},t.stringQuadToQuad=function(e,t){return(t=t||n).quad(c(e.subject,t),c(e.predicate,t),c(e.object,t),c(e.graph,t))}},13252:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(10175),t),i(r(86552),t)},10175:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchPatternMappings=t.matchPatternComplete=t.matchPattern=t.matchTerm=t.getValueNestedPath=t.someTermsNested=t.someTerms=t.everyTermsNested=t.everyTerms=t.reduceTermsNested=t.reduceTerms=t.mapTermsNested=t.mapTerms=t.filterQuadTermNamesNested=t.filterQuadTermNames=t.filterTermsNested=t.filterTerms=t.forEachTermsNested=t.forEachTerms=t.collectNamedTerms=t.getNamedTerms=t.getTermsNested=t.getTerms=t.TRIPLE_TERM_NAMES=t.QUAD_TERM_NAMES=void 0;const n=new(r(18050).DataFactory);function i(e,t){return t&&"DefaultGraph"===e.graph.termType?[e.subject,e.predicate,e.object]:[e.subject,e.predicate,e.object,e.graph]}function a(e,t){return t(e.subject,"subject")&&t(e.predicate,"predicate")&&t(e.object,"object")&&t(e.graph,"graph")}function o(e,t){return!t||"Variable"===t.termType||"Quad"===t.termType&&"Quad"===e.termType&&c(e,t)||t.equals(e)}function s(e,t,r,n,i){return o(e.subject,t)&&o(e.predicate,r)&&o(e.object,n)&&o(e.graph,i)}function c(e,t){return s(e,t.subject,t.predicate,t.object,t.graph)}t.QUAD_TERM_NAMES=["subject","predicate","object","graph"],t.TRIPLE_TERM_NAMES=["subject","predicate","object"],t.getTerms=i,t.getTermsNested=function e(t,r){const n=[];for(const a of i(t,r))"Quad"===a.termType?e(a,r).forEach((e=>n.push(e))):n.push(a);return n},t.getNamedTerms=function(e){return[{key:"subject",value:e.subject},{key:"predicate",value:e.predicate},{key:"object",value:e.object},{key:"graph",value:e.graph}]},t.collectNamedTerms=function(e,t,r){const i={};return e.forEach((e=>i[e.key]=e.value)),t&&(i.subject=i.subject||t("subject"),i.predicate=i.predicate||t("predicate"),i.object=i.object||t("object"),i.graph=i.graph||t("graph")),(r||n).quad(i.subject,i.predicate,i.object,i.graph)},t.forEachTerms=function(e,t){t(e.subject,"subject"),t(e.predicate,"predicate"),t(e.object,"object"),t(e.graph,"graph")},t.forEachTermsNested=function e(t,r,n=[]){"Quad"===t.subject.termType?e(t.subject,r,[...n,"subject"]):r(t.subject,[...n,"subject"]),"Quad"===t.predicate.termType?e(t.predicate,r,[...n,"predicate"]):r(t.predicate,[...n,"predicate"]),"Quad"===t.object.termType?e(t.object,r,[...n,"object"]):r(t.object,[...n,"object"]),"Quad"===t.graph.termType?e(t.graph,r,[...n,"graph"]):r(t.graph,[...n,"graph"])},t.filterTerms=function(e,t){const r=[];return t(e.subject,"subject")&&r.push(e.subject),t(e.predicate,"predicate")&&r.push(e.predicate),t(e.object,"object")&&r.push(e.object),t(e.graph,"graph")&&r.push(e.graph),r},t.filterTermsNested=function e(t,r,n=[]){let i=[];return"Quad"===t.subject.termType?i=[...i,...e(t.subject,r,[...n,"subject"])]:r(t.subject,[...n,"subject"])&&i.push(t.subject),"Quad"===t.predicate.termType?i=[...i,...e(t.predicate,r,[...n,"predicate"])]:r(t.predicate,[...n,"predicate"])&&i.push(t.predicate),"Quad"===t.object.termType?i=[...i,...e(t.object,r,[...n,"object"])]:r(t.object,[...n,"object"])&&i.push(t.object),"Quad"===t.graph.termType?i=[...i,...e(t.graph,r,[...n,"graph"])]:r(t.graph,[...n,"graph"])&&i.push(t.graph),i},t.filterQuadTermNames=function(e,t){const r=[];return t(e.subject,"subject")&&r.push("subject"),t(e.predicate,"predicate")&&r.push("predicate"),t(e.object,"object")&&r.push("object"),t(e.graph,"graph")&&r.push("graph"),r},t.filterQuadTermNamesNested=function e(t,r,n=[]){let i=[];const a=[...n,"subject"];"Quad"===t.subject.termType?i=[...i,...e(t.subject,r,a)]:r(t.subject,a)&&i.push(a);const o=[...n,"predicate"];"Quad"===t.predicate.termType?i=[...i,...e(t.predicate,r,o)]:r(t.predicate,o)&&i.push(o);const s=[...n,"object"];"Quad"===t.object.termType?i=[...i,...e(t.object,r,s)]:r(t.object,s)&&i.push(s);const c=[...n,"graph"];return"Quad"===t.graph.termType?i=[...i,...e(t.graph,r,c)]:r(t.graph,c)&&i.push(c),i},t.mapTerms=function(e,t,r){return(r||n).quad(t(e.subject,"subject"),t(e.predicate,"predicate"),t(e.object,"object"),t(e.graph,"graph"))},t.mapTermsNested=function e(t,r,i,a=[]){return(i||n).quad("Quad"===t.subject.termType?e(t.subject,r,i,[...a,"subject"]):r(t.subject,[...a,"subject"]),"Quad"===t.predicate.termType?e(t.predicate,r,i,[...a,"predicate"]):r(t.predicate,[...a,"predicate"]),"Quad"===t.object.termType?e(t.object,r,i,[...a,"object"]):r(t.object,[...a,"object"]),"Quad"===t.graph.termType?e(t.graph,r,i,[...a,"graph"]):r(t.graph,[...a,"graph"]))},t.reduceTerms=function(e,t,r){let n=r;return n=t(n,e.subject,"subject"),n=t(n,e.predicate,"predicate"),n=t(n,e.object,"object"),t(n,e.graph,"graph")},t.reduceTermsNested=function e(t,r,n,i=[]){let a=n;return a="Quad"===t.subject.termType?e(t.subject,r,a,[...i,"subject"]):r(a,t.subject,[...i,"subject"]),a="Quad"===t.predicate.termType?e(t.predicate,r,a,[...i,"predicate"]):r(a,t.predicate,[...i,"predicate"]),a="Quad"===t.object.termType?e(t.object,r,a,[...i,"object"]):r(a,t.object,[...i,"object"]),a="Quad"===t.graph.termType?e(t.graph,r,a,[...i,"graph"]):r(a,t.graph,[...i,"graph"]),a},t.everyTerms=a,t.everyTermsNested=function e(t,r,n=[]){return("Quad"===t.subject.termType?e(t.subject,r,[...n,"subject"]):r(t.subject,[...n,"subject"]))&&("Quad"===t.predicate.termType?e(t.predicate,r,[...n,"predicate"]):r(t.predicate,[...n,"predicate"]))&&("Quad"===t.object.termType?e(t.object,r,[...n,"object"]):r(t.object,[...n,"object"]))&&("Quad"===t.graph.termType?e(t.graph,r,[...n,"graph"]):r(t.graph,[...n,"graph"]))},t.someTerms=function(e,t){return t(e.subject,"subject")||t(e.predicate,"predicate")||t(e.object,"object")||t(e.graph,"graph")},t.someTermsNested=function e(t,r,n=[]){return("Quad"===t.subject.termType?e(t.subject,r,[...n,"subject"]):r(t.subject,[...n,"subject"]))||("Quad"===t.predicate.termType?e(t.predicate,r,[...n,"predicate"]):r(t.predicate,[...n,"predicate"]))||("Quad"===t.object.termType?e(t.object,r,[...n,"object"]):r(t.object,[...n,"object"]))||("Quad"===t.graph.termType?e(t.graph,r,[...n,"graph"]):r(t.graph,[...n,"graph"]))},t.getValueNestedPath=function e(t,r){if(0===r.length)return t;if("Quad"===t.termType)return e(t[r[0]],r.slice(1));throw new Error(`Tried to get ${r[0]} from term of type ${t.termType}`)},t.matchTerm=o,t.matchPattern=s,t.matchPatternComplete=c,t.matchPatternMappings=function(e,t,r={}){const n={};return function e(t,i){return a(t,((t,a)=>{var o,s;const c=i[a];switch(t.termType){case"Variable":return r.skipVarMapping&&"Variable"===c.termType||(null!==(s=null===(o=n[t.value])||void 0===o?void 0:o.equals(c))&&void 0!==s?s:(n[t.value]=c,!0));case"Quad":return"Quad"===c.termType&&e(t,c);default:return t.equals(c)}}))}(t,e)&&(!r.returnMappings||n)}},86552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getQuads=t.getDefaultGraphs=t.getVariables=t.getLiterals=t.getBlankNodes=t.getNamedNodes=t.getTermsOfType=t.uniqTerms=t.TERM_TYPES=void 0;const n=r(22112);function i(e,t){return e.filter((e=>e.termType===t))}t.TERM_TYPES=["NamedNode","BlankNode","Literal","Variable","DefaultGraph","Quad"],t.uniqTerms=function(e){const t={};return e.filter((e=>{const r=(0,n.termToString)(e);return!(r in t)&&(t[r]=!0)}))},t.getTermsOfType=i,t.getNamedNodes=function(e){return i(e,"NamedNode")},t.getBlankNodes=function(e){return i(e,"BlankNode")},t.getLiterals=function(e){return i(e,"Literal")},t.getVariables=function(e){return i(e,"Variable")},t.getDefaultGraphs=function(e){return i(e,"DefaultGraph")},t.getQuads=function(e){return i(e,"Quad")}},21860:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(29145),t),i(r(55623),t),i(r(98532),t),i(r(59638),t),i(r(24012),t),i(r(69994),t)},29145:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},55623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},98532:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},59638:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfaParser=void 0;const n=r(15482),i=r(58521),a=r(45497),o=r(68713),s=r(24012),c=r(69994);class u extends i.Transform{constructor(e){super({readableObjectMode:!0}),this.activeTagStack=[],e=e||{},this.options=e,this.util=new c.Util(e.dataFactory,e.baseIRI),this.defaultGraph=e.defaultGraph||this.util.dataFactory.defaultGraph();const t=e.contentType?c.Util.contentTypeToProfile(e.contentType):e.profile||"";this.features=e.features||s.RDFA_FEATURES[t],this.htmlParseListener=e.htmlParseListener,this.rdfaPatterns=this.features.copyRdfaPatterns?{}:null,this.pendingRdfaPatternCopies=this.features.copyRdfaPatterns?{}:null,this.parser=this.initializeParser("xml"===t),this.activeTagStack.push({incompleteTriples:[],inlist:!1,language:e.language,listMapping:{},listMappingLocal:{},name:"",prefixesAll:Object.assign(Object.assign({},o["@context"]),this.features.xhtmlInitialContext?a["@context"]:{}),prefixesCustom:{},skipElement:!1,vocab:e.vocab})}import(e){const t=new i.PassThrough({readableObjectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new u(this.options));return r}_transform(e,t,r){this.parser.write(e.toString()),r()}_flush(e){this.parser.end(),e()}onTagOpen(e,t){let r=this.activeTagStack.length-1;for(;r>0&&this.activeTagStack[r].skipElement;)r--;let n=this.activeTagStack[r];r!==this.activeTagStack.length-1&&(n=Object.assign(Object.assign({},n),{language:this.activeTagStack[this.activeTagStack.length-1].language,prefixesAll:this.activeTagStack[this.activeTagStack.length-1].prefixesAll,prefixesCustom:this.activeTagStack[this.activeTagStack.length-1].prefixesCustom,vocab:this.activeTagStack[this.activeTagStack.length-1].vocab}));const i={collectChildTags:n.collectChildTags,incompleteTriples:[],inlist:"inlist"in t,listMapping:[],listMappingLocal:n.listMapping,localBaseIRI:n.localBaseIRI,name:e,prefixesAll:null,prefixesCustom:null,skipElement:!1};if(this.activeTagStack.push(i),i.collectChildTags){for(const e of Object.keys(n.prefixesCustom).sort()){const r=n.prefixesCustom[e],i=""===e?"xmlns":"xmlns:"+e;i in t||(t[i]=r)}const r=Object.keys(t).map((e=>`${e}="${t[e]}"`)).join(" ");if(i.text=[`<${e}${r?" "+r:""}>`],this.features.skipHandlingXmlLiteralChildren)return}let a,o,s,u=!0,l=!0;if(this.features.onlyAllowUriRelRevIfProperty&&("property"in t&&"rel"in t&&(u=!1,t.rel.indexOf(":")<0&&delete t.rel),"property"in t&&"rev"in t&&(l=!1,t.rev.indexOf(":")<0&&delete t.rev)),this.features.copyRdfaPatterns){if(n.collectedPatternTag){const r={attributes:t,children:[],name:e,referenced:!1,rootPattern:!1,text:[]};return n.collectedPatternTag.children.push(r),void(i.collectedPatternTag=r)}if("rdfa:Pattern"===t.typeof)return void(i.collectedPatternTag={attributes:t,children:[],name:e,parentTag:n,referenced:!1,rootPattern:!0,text:[]});if("rdfa:copy"===t.property){const e=t.resource||t.href||t.src;return void(this.rdfaPatterns[e]?this.emitPatternCopy(n,this.rdfaPatterns[e],e):(this.pendingRdfaPatternCopies[e]||(this.pendingRdfaPatternCopies[e]=[]),this.pendingRdfaPatternCopies[e].push(n)))}}if(this.features.baseTag&&"base"===e&&t.href&&(this.util.baseIRI=this.util.getBaseIRI(t.href)),this.features.xmlBase&&t["xml:base"]&&(i.localBaseIRI=this.util.getBaseIRI(t["xml:base"])),this.features.timeTag&&"time"===e&&!t.datatype&&(i.interpretObjectAsTime=!0),"vocab"in t?t.vocab?(i.vocab=t.vocab,this.emitTriple(this.util.getBaseIriTerm(i),this.util.dataFactory.namedNode(c.Util.RDFA+"usesVocabulary"),this.util.dataFactory.namedNode(i.vocab))):i.vocab=this.activeTagStack[0].vocab:i.vocab=n.vocab,i.prefixesCustom=c.Util.parsePrefixes(t,n.prefixesCustom,this.features.xmlnsPrefixMappings),i.prefixesAll=Object.keys(i.prefixesCustom).length>0?Object.assign(Object.assign({},n.prefixesAll),i.prefixesCustom):n.prefixesAll,this.features.roleAttribute&&t.role){const e=t.id?this.util.createIri("#"+t.id,i,!1,!1,!1):this.util.createBlankNode(),r=i.vocab;i.vocab="http://www.w3.org/1999/xhtml/vocab#";for(const r of this.util.createVocabIris(t.role,i,!0,!1))this.emitTriple(e,this.util.dataFactory.namedNode("http://www.w3.org/1999/xhtml/vocab#role"),r);i.vocab=r}"xml:lang"in t||this.features.langAttribute&&"lang"in t?i.language=t["xml:lang"]||t.lang:i.language=n.language;const d=2===this.activeTagStack.length;if("rel"in t||"rev"in t?("about"in t?(a=this.util.createIri(t.about,i,!1,!0,!0),i.explicitNewSubject=!!a,"typeof"in t&&(s=a)):d?a=!0:n.object&&(a=n.object),"resource"in t&&(o=this.util.createIri(t.resource,i,!1,!0,!0)),o||("href"in t||"src"in t?o=this.util.createIri(t.href||t.src,i,!1,!1,!0):!("typeof"in t)||"about"in t||this.isInheritSubjectInHeadBody(e)||(o=this.util.createBlankNode())),"typeof"in t&&!("about"in t)&&(s=this.isInheritSubjectInHeadBody(e)?a:o)):!("property"in t)||"content"in t||"datatype"in t?(("about"in t||"resource"in t)&&(a=this.util.createIri(t.about||t.resource,i,!1,!0,!0),i.explicitNewSubject=!!a),a||!("href"in t)&&!("src"in t)||(a=this.util.createIri(t.href||t.src,i,!1,!1,!0),i.explicitNewSubject=!!a),a||(d?a=!0:this.isInheritSubjectInHeadBody(e)?a=n.object:"typeof"in t?(a=this.util.createBlankNode(),i.explicitNewSubject=!0):n.object&&(a=n.object,"property"in t||(i.skipElement=!0))),"typeof"in t&&(s=a)):("about"in t?(a=this.util.createIri(t.about,i,!1,!0,!0),i.explicitNewSubject=!!a):d?a=!0:n.object&&(a=n.object),"typeof"in t&&("about"in t&&(s=this.util.createIri(t.about,i,!1,!0,!0)),!s&&d&&(s=!0),!s&&"resource"in t&&(s=this.util.createIri(t.resource,i,!1,!0,!0)),s||!("href"in t)&&!("src"in t)||(s=this.util.createIri(t.href||t.src,i,!1,!1,!0)),!s&&this.isInheritSubjectInHeadBody(e)&&(s=a),s||(s=this.util.createBlankNode()),o=s)),s)for(const e of this.util.createVocabIris(t.typeof,i,!0,!0))this.emitTriple(this.util.getResourceOrBaseIri(s,i),this.util.dataFactory.namedNode(c.Util.RDF+"type"),e);if(a&&(i.listMapping={}),o){if("rel"in t&&"inlist"in t)for(const e of this.util.createVocabIris(t.rel,i,u,!1))this.addListMapping(i,a,e,o);if(!("rel"in t)||!("inlist"in t)){if("rel"in t)for(const e of this.util.createVocabIris(t.rel,i,u,!1))this.emitTriple(this.util.getResourceOrBaseIri(a,i),e,this.util.getResourceOrBaseIri(o,i));if("rev"in t)for(const e of this.util.createVocabIris(t.rev,i,l,!1))this.emitTriple(this.util.getResourceOrBaseIri(o,i),e,this.util.getResourceOrBaseIri(a,i))}}if(!o){if("rel"in t)if("inlist"in t)for(const e of this.util.createVocabIris(t.rel,i,u,!1))this.addListMapping(i,a,e,null),i.incompleteTriples.push({predicate:e,reverse:!1,list:!0});else for(const e of this.util.createVocabIris(t.rel,i,u,!1))i.incompleteTriples.push({predicate:e,reverse:!1});if("rev"in t)for(const e of this.util.createVocabIris(t.rev,i,l,!1))i.incompleteTriples.push({predicate:e,reverse:!0});i.incompleteTriples.length>0&&(o=this.util.createBlankNode())}if("property"in t){let e;if(i.predicates=this.util.createVocabIris(t.property,i,!0,!1),"datatype"in t?(i.datatype=this.util.createIri(t.datatype,i,!0,!0,!1),i.datatype&&(i.datatype.value===c.Util.RDF+"XMLLiteral"||this.features.htmlDatatype&&i.datatype.value===c.Util.RDF+"HTML")&&(i.collectChildTags=!0)):("rev"in t||"rel"in t||"content"in t||("resource"in t&&(e=this.util.createIri(t.resource,i,!1,!0,!0)),!e&&"href"in t&&(e=this.util.createIri(t.href,i,!1,!1,!0)),!e&&"src"in t&&(e=this.util.createIri(t.src,i,!1,!1,!0))),"typeof"in t&&!("about"in t)&&(e=s)),"content"in t){const e=this.util.createLiteral(t.content,i);if("inlist"in t)for(const t of i.predicates)this.addListMapping(i,a,t,e);else{const t=this.util.getResourceOrBaseIri(a,i);for(const r of i.predicates)this.emitTriple(t,r,e)}i.predicates=null}else if(this.features.datetimeAttribute&&"datetime"in t){i.interpretObjectAsTime=!0;const e=this.util.createLiteral(t.datetime,i);if("inlist"in t)for(const t of i.predicates)this.addListMapping(i,a,t,e);else{const t=this.util.getResourceOrBaseIri(a,i);for(const r of i.predicates)this.emitTriple(t,r,e)}i.predicates=null}else if(e){const r=this.util.getResourceOrBaseIri(e,i);if("inlist"in t)for(const e of i.predicates)this.addListMapping(i,a,e,r);else{const e=this.util.getResourceOrBaseIri(a,i);for(const t of i.predicates)this.emitTriple(e,t,r)}i.predicates=null}}let h=!1;if(!i.skipElement&&a&&n.incompleteTriples.length>0){h=!0;const e=this.util.getResourceOrBaseIri(n.subject,i),t=this.util.getResourceOrBaseIri(a,i);for(const r of n.incompleteTriples)if(r.reverse)this.emitTriple(t,r.predicate,e);else if(r.list){let e=null;for(let t=this.activeTagStack.length-1;t>=0;t--)if(this.activeTagStack[t].inlist){e=this.activeTagStack[t];break}this.addListMapping(e,a,r.predicate,t)}else this.emitTriple(e,r.predicate,t)}!h&&n.incompleteTriples.length>0&&(i.incompleteTriples=i.incompleteTriples.concat(n.incompleteTriples)),i.subject=a||n.subject,i.object=o||a}onText(e){const t=this.activeTagStack[this.activeTagStack.length-1];this.features.copyRdfaPatterns&&t.collectedPatternTag?t.collectedPatternTag.text.push(e):(t.text||(t.text=[]),t.text.push(e))}onTagClose(){const e=this.activeTagStack[this.activeTagStack.length-1],t=this.activeTagStack[this.activeTagStack.length-2];if(!(e.collectChildTags&&t.collectChildTags&&this.features.skipHandlingXmlLiteralChildren)){if(this.features.copyRdfaPatterns&&e.collectedPatternTag&&e.collectedPatternTag.rootPattern){const t=e.collectedPatternTag.attributes.resource;if(delete e.collectedPatternTag.attributes.resource,delete e.collectedPatternTag.attributes.typeof,this.rdfaPatterns[t]=e.collectedPatternTag,this.pendingRdfaPatternCopies[t]){for(const r of this.pendingRdfaPatternCopies[t])this.emitPatternCopy(r,e.collectedPatternTag,t);delete this.pendingRdfaPatternCopies[t]}return void this.activeTagStack.pop()}if(e.predicates){const r=this.util.getResourceOrBaseIri(e.subject,e);let n=e.text||[];e.collectChildTags&&t.collectChildTags&&(n=n.slice(1));const i=this.util.createLiteral(n.join(""),e);if(e.inlist)for(const t of e.predicates)this.addListMapping(e,r,t,i);else for(const t of e.predicates)this.emitTriple(r,t,i);t.predicates||(e.text=null)}if(e.object&&Object.keys(e.listMapping).length>0){const t=this.util.getResourceOrBaseIri(e.object,e);for(const r in e.listMapping){const n=this.util.dataFactory.namedNode(r),i=e.listMapping[r];if(i.length>0){const r=i.map((()=>this.util.createBlankNode()));for(let t=0;t`),e.text&&t&&(t.text?t.text=t.text.concat(e.text):t.text=e.text)}onEnd(){if(this.features.copyRdfaPatterns){this.features.copyRdfaPatterns=!1;for(const e in this.rdfaPatterns){const t=this.rdfaPatterns[e];t.referenced||(t.attributes.typeof="rdfa:Pattern",t.attributes.resource=e,this.emitPatternCopy(t.parentTag,t,e),t.referenced=!1,delete t.attributes.typeof,delete t.attributes.resource)}for(const e in this.pendingRdfaPatternCopies)for(const t of this.pendingRdfaPatternCopies[e])this.activeTagStack.push(t),this.onTagOpen("link",{property:"rdfa:copy",href:e}),this.onTagClose(),this.activeTagStack.pop();this.features.copyRdfaPatterns=!0}}isInheritSubjectInHeadBody(e){return this.features.inheritSubjectInHeadBody&&("head"===e||"body"===e)}addListMapping(e,t,r,n){if(e.explicitNewSubject){const i=this.util.createBlankNode();this.emitTriple(this.util.getResourceOrBaseIri(t,e),r,i),this.emitTriple(i,this.util.dataFactory.namedNode(c.Util.RDF+"first"),this.util.getResourceOrBaseIri(n,e)),this.emitTriple(i,this.util.dataFactory.namedNode(c.Util.RDF+"rest"),this.util.dataFactory.namedNode(c.Util.RDF+"nil"))}else{let t=e.listMappingLocal[r.value];t||(e.listMappingLocal[r.value]=t=[]),n&&t.push(n)}}emitTriple(e,t,r){"NamedNode"===e.termType&&e.value.indexOf(":")<0||"NamedNode"===t.termType&&t.value.indexOf(":")<0||"NamedNode"===r.termType&&r.value.indexOf(":")<0||this.push(this.util.dataFactory.quad(e,t,r,this.defaultGraph))}emitPatternCopy(e,t,r){if(this.activeTagStack.push(e),t.referenced=!0,t.constructedBlankNodes){let e=0;this.util.blankNodeFactory=()=>t.constructedBlankNodes[e++]}else t.constructedBlankNodes=[],this.util.blankNodeFactory=()=>{const e=this.util.dataFactory.blankNode();return t.constructedBlankNodes.push(e),e};this.emitPatternCopyAbsolute(t,!0,r),this.util.blankNodeFactory=null,this.activeTagStack.pop()}emitPatternCopyAbsolute(e,t,r){if(t||"rdfa:copy"!==e.attributes.property||e.attributes.href!==r){this.onTagOpen(e.name,e.attributes);for(const t of e.text)this.onText(t);for(const t of e.children)this.emitPatternCopyAbsolute(t,!1,r);this.onTagClose()}}initializeParser(e){return new n.Parser({onclosetag:()=>{try{this.onTagClose(),this.htmlParseListener&&this.htmlParseListener.onTagClose()}catch(e){this.emit("error",e)}},onend:()=>{try{this.onEnd(),this.htmlParseListener&&this.htmlParseListener.onEnd()}catch(e){this.emit("error",e)}},onopentag:(e,t)=>{try{this.onTagOpen(e,t),this.htmlParseListener&&this.htmlParseListener.onTagOpen(e,t)}catch(e){this.emit("error",e)}},ontext:e=>{try{this.onText(e),this.htmlParseListener&&this.htmlParseListener.onText(e)}catch(e){this.emit("error",e)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:e})}}t.RdfaParser=u},24012:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RDFA_CONTENTTYPES=t.RDFA_FEATURES=void 0,t.RDFA_FEATURES={"":{baseTag:!0,xmlBase:!0,langAttribute:!0,onlyAllowUriRelRevIfProperty:!0,inheritSubjectInHeadBody:!0,datetimeAttribute:!0,timeTag:!0,htmlDatatype:!0,copyRdfaPatterns:!0,xmlnsPrefixMappings:!0,xhtmlInitialContext:!0,roleAttribute:!0},core:{baseTag:!1,xmlBase:!1,langAttribute:!0,onlyAllowUriRelRevIfProperty:!0,inheritSubjectInHeadBody:!1,datetimeAttribute:!1,timeTag:!1,htmlDatatype:!1,copyRdfaPatterns:!0,xmlnsPrefixMappings:!0,xhtmlInitialContext:!1,roleAttribute:!1},html:{baseTag:!0,xmlBase:!1,langAttribute:!0,onlyAllowUriRelRevIfProperty:!0,inheritSubjectInHeadBody:!0,datetimeAttribute:!0,timeTag:!0,htmlDatatype:!0,copyRdfaPatterns:!0,xmlnsPrefixMappings:!0,xhtmlInitialContext:!1,roleAttribute:!0},xhtml:{baseTag:!0,xmlBase:!1,langAttribute:!0,onlyAllowUriRelRevIfProperty:!0,inheritSubjectInHeadBody:!0,datetimeAttribute:!0,timeTag:!0,htmlDatatype:!0,copyRdfaPatterns:!0,xmlnsPrefixMappings:!0,xhtmlInitialContext:!0,roleAttribute:!0},xml:{baseTag:!1,xmlBase:!0,langAttribute:!0,onlyAllowUriRelRevIfProperty:!1,inheritSubjectInHeadBody:!1,datetimeAttribute:!0,timeTag:!0,htmlDatatype:!1,copyRdfaPatterns:!1,xmlnsPrefixMappings:!0,xhtmlInitialContext:!1,roleAttribute:!0}},t.RDFA_CONTENTTYPES={"text/html":"html","application/xhtml+xml":"xhtml","application/xml":"xml","text/xml":"xml","image/svg+xml":"xml"}},69994:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(9929),i=r(24012),a=r(18050);class o{constructor(e,t){this.dataFactory=e||new a.DataFactory,this.baseIRI=this.dataFactory.namedNode(t||""),this.baseIRIDocument=this.baseIRI}static parsePrefixes(e,t,r){const n={};if(r)for(const t in e)t.startsWith("xmlns")&&(n[t.substr(6)]=e[t]);if(e.prefix||Object.keys(n).length>0){const r=Object.assign(Object.assign({},t),n);if(e.prefix){let t;for(;t=o.PREFIX_REGEX.exec(e.prefix);)r[t[1]]=t[2]}return r}return t}static expandPrefixedTerm(e,t){const r=e.indexOf(":");let n,i;if(r>=0&&(n=e.substr(0,r),i=e.substr(r+1)),""===n)return"http://www.w3.org/1999/xhtml/vocab#"+i;if(n){const e=t.prefixesAll[n];if(e)return e+i}if(e){const r=t.prefixesAll[e.toLocaleLowerCase()];if(r)return r}return e}static isValidIri(e){return o.IRI_REGEX.test(e)}static contentTypeToProfile(e){return i.RDFA_CONTENTTYPES[e]||""}getBaseIRI(e){let t=e;const r=t.indexOf("#");return r>=0&&(t=t.substr(0,r)),this.dataFactory.namedNode((0,n.resolve)(t,this.baseIRI.value))}getResourceOrBaseIri(e,t){return!0===e?this.getBaseIriTerm(t):e}getBaseIriTerm(e){return e.localBaseIRI||this.baseIRI}createVocabIris(e,t,r,n){return e.split(/\s+/).filter((e=>e&&(r||e.indexOf(":")>=0))).map((e=>this.createIri(e,t,!0,!0,n))).filter((e=>null!=e))}createLiteral(e,t){if(t.interpretObjectAsTime&&!t.datatype)for(const r of o.TIME_REGEXES)if(e.match(r.regex)){t.datatype=this.dataFactory.namedNode(o.XSD+r.type);break}return this.dataFactory.literal(e,t.datatype||t.language)}createBlankNode(){return this.blankNodeFactory?this.blankNodeFactory():this.dataFactory.blankNode()}createIri(e,t,r,i,a){if(e=e||"",!i)return r||(e=(0,n.resolve)(e,this.getBaseIriTerm(t).value)),o.isValidIri(e)?this.dataFactory.namedNode(e):null;if(e.length>0&&"["===e[0]&&"]"===e[e.length-1]&&(e=e.substr(1,e.length-2)).indexOf(":")<0)return null;if(e.startsWith("_:"))return a?this.dataFactory.blankNode(e.substr(2)||"b_identity"):null;if(r&&t.vocab&&e.indexOf(":")<0)return this.dataFactory.namedNode(t.vocab+e);let s=o.expandPrefixedTerm(e,t);return r?e!==s&&(s=(0,n.resolve)(s,this.baseIRIDocument.value)):s=(0,n.resolve)(s,this.getBaseIriTerm(t).value),o.isValidIri(s)?this.dataFactory.namedNode(s):null}}t.Util=o,o.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",o.XSD="http://www.w3.org/2001/XMLSchema#",o.RDFA="http://www.w3.org/ns/rdfa#",o.PREFIX_REGEX=/\s*([^:\s]*)*:\s*([^\s]*)*\s*/g,o.TIME_REGEXES=[{regex:/^-?P([0-9]+Y)?([0-9]+M)?([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+(\.[0-9])?S)?)?$/,type:"duration"},{regex:/^[0-9]+-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9]((Z?)|([\+-][0-9][0-9]:[0-9][0-9]))$/,type:"dateTime"},{regex:/^[0-9]+-[0-9][0-9]-[0-9][0-9]Z?$/,type:"date"},{regex:/^[0-9][0-9]:[0-9][0-9]:[0-9][0-9]((Z?)|([\+-][0-9][0-9]:[0-9][0-9]))$/,type:"time"},{regex:/^[0-9]+-[0-9][0-9]$/,type:"gYearMonth"},{regex:/^[0-9]+$/,type:"gYear"}],o.IRI_REGEX=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^ "<>{}|\\\[\]`]*$/},97990:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(70326),t)},35695:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParseError=void 0;class r extends Error{constructor(e,t){const r=e.saxParser;super(e.trackPosition?`Line ${r.line} column ${r.column+1}: ${t}`:t)}}t.ParseError=r},70326:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParseType=t.RdfXmlParser=void 0;const n=r(9929),i=r(49126),a=r(58521),o=r(35695),s=r(18050),c=r(29815);class u extends a.Transform{constructor(e){super({readableObjectMode:!0}),this.activeTagStack=[],this.nodeIds={},e&&(Object.assign(this,e),this.options=e),this.dataFactory||(this.dataFactory=new s.DataFactory),this.baseIRI||(this.baseIRI=""),this.defaultGraph||(this.defaultGraph=this.dataFactory.defaultGraph()),!1!==this.validateUri&&(this.validateUri=!0),this.iriValidationStrategy||(this.iriValidationStrategy=this.validateUri?c.IriValidationStrategy.Pragmatic:c.IriValidationStrategy.None),this.saxParser=new i.SaxesParser({xmlns:!0,position:this.trackPosition}),this.attachSaxListeners()}import(e){const t=new a.PassThrough({readableObjectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new u(this.options));return r}_transform(e,t,r){try{this.saxParser.write(e)}catch(e){return r(e)}r()}newParseError(e){return new o.ParseError(this,e)}valueToUri(e,t){return this.uriToNamedNode((0,n.resolve)(e,t.baseIRI))}uriToNamedNode(e){const t=(0,c.validateIri)(e,this.iriValidationStrategy);if(t instanceof Error)throw this.newParseError(t.message);return this.dataFactory.namedNode(e)}validateNcname(e){if(!u.NCNAME_MATCHER.test(e))throw this.newParseError(`Not a valid NCName: ${e}`)}attachSaxListeners(){this.saxParser.on("error",(e=>this.emit("error",e))),this.saxParser.on("opentag",this.onTag.bind(this)),this.saxParser.on("text",this.onText.bind(this)),this.saxParser.on("cdata",this.onText.bind(this)),this.saxParser.on("closetag",this.onCloseTag.bind(this)),this.saxParser.on("doctype",this.onDoctype.bind(this))}onTag(e){const t=this.activeTagStack.length?this.activeTagStack[this.activeTagStack.length-1]:null;let r=l.RESOURCE;if(t&&(t.hadChildren=!0,r=t.childrenParseType),t&&t.childrenStringTags){const r=e.name;let n="";for(const t in e.attributes)n+=` ${t}="${e.attributes[t].value}"`;const i=`<${r}${n}>`;t.childrenStringTags.push(i);const a={childrenStringTags:t.childrenStringTags};return a.childrenStringEmitClosingTag=``,void this.activeTagStack.push(a)}const n={};t?(n.language=t.language,n.baseIRI=t.baseIRI):n.baseIRI=this.baseIRI,this.activeTagStack.push(n),r===l.RESOURCE?this.onTagResource(e,n,t,!t):this.onTagProperty(e,n,t)}onTagResource(e,t,r,i){t.childrenParseType=l.PROPERTY;let a=!0;if(e.uri===u.RDF){if(!i&&u.FORBIDDEN_NODE_ELEMENTS.indexOf(e.local)>=0)throw this.newParseError(`Illegal node element name: ${e.local}`);switch(e.local){case"RDF":t.childrenParseType=l.RESOURCE;case"Description":a=!1}}const o=[],s=[];let c=null,d=!1,h=!1,p=null;for(const i in e.attributes){const a=e.attributes[i];if(r&&a.uri===u.RDF)switch(a.local){case"about":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${a.value} and ${c} where found.`);c=a.value;continue;case"ID":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${a.value} and ${c} where found.`);this.validateNcname(a.value),c="#"+a.value,d=!0;continue;case"nodeID":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${a.value} and ${c} where found.`);this.validateNcname(a.value),c=a.value,h=!0;continue;case"bagID":throw this.newParseError("rdf:bagID is not supported.");case"type":p=a.value;continue;case"aboutEach":throw this.newParseError("rdf:aboutEach is not supported.");case"aboutEachPrefix":throw this.newParseError("rdf:aboutEachPrefix is not supported.");case"li":throw this.newParseError("rdf:li on node elements are not supported.")}else if(a.uri===u.XML){if("lang"===a.local){t.language=""===a.value?null:a.value.toLowerCase();continue}if("base"===a.local){t.baseIRI=(0,n.resolve)(a.value,t.baseIRI);continue}}"xml"===a.prefix||"xmlns"===a.prefix||""===a.prefix&&"xmlns"===a.local||!a.uri||(o.push(this.uriToNamedNode(a.uri+a.local)),s.push(a.value))}if(null!==c&&(t.subject=h?this.dataFactory.blankNode(c):this.valueToUri(c,t),d&&this.claimNodeId(t.subject)),t.subject||(t.subject=this.dataFactory.blankNode()),a){const n=this.uriToNamedNode(e.uri+e.local);this.emitTriple(t.subject,this.dataFactory.namedNode(u.RDF+"type"),n,r?r.reifiedStatementId:null)}if(r){if(r.predicate)if(r.childrenCollectionSubject){const e=this.dataFactory.blankNode();this.emitTriple(r.childrenCollectionSubject,r.childrenCollectionPredicate,e,r.reifiedStatementId),this.emitTriple(e,this.dataFactory.namedNode(u.RDF+"first"),t.subject,t.reifiedStatementId),r.childrenCollectionSubject=e,r.childrenCollectionPredicate=this.dataFactory.namedNode(u.RDF+"rest")}else{this.emitTriple(r.subject,r.predicate,t.subject,r.reifiedStatementId);for(let e=0;e=0)throw this.newParseError(`Illegal property element name: ${e.local}`);t.predicateSubPredicates=[],t.predicateSubObjects=[];let n=!1,i=!1,a=null,o=!0;const s=[],c=[];for(const r in e.attributes){const d=e.attributes[r];if(d.uri===u.RDF)switch(d.local){case"resource":if(a)throw this.newParseError(`Found both rdf:resource (${d.value}) and rdf:nodeID (${a}).`);if(n)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:resource (${d.value})`);t.hadChildren=!0,a=d.value,o=!1;continue;case"datatype":if(i)throw this.newParseError(`Found both non-rdf:* property attributes and rdf:datatype (${d.value}).`);if(n)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:datatype (${d.value})`);t.datatype=this.valueToUri(d.value,t);continue;case"nodeID":if(i)throw this.newParseError(`Found both non-rdf:* property attributes and rdf:nodeID (${d.value}).`);if(t.hadChildren)throw this.newParseError(`Found both rdf:resource and rdf:nodeID (${d.value}).`);if(n)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:nodeID (${d.value})`);this.validateNcname(d.value),t.hadChildren=!0,a=d.value,o=!0;continue;case"bagID":throw this.newParseError("rdf:bagID is not supported.");case"parseType":if(i)throw this.newParseError("rdf:parseType is not allowed when non-rdf:* property attributes are present");if(t.datatype)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:datatype (${t.datatype.value})`);if(a)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:nodeID or rdf:resource (${a})`);if("Resource"===d.value){n=!0,t.childrenParseType=l.PROPERTY;const e=this.dataFactory.blankNode();this.emitTriple(t.subject,t.predicate,e,t.reifiedStatementId),t.subject=e,t.predicate=null}else"Collection"===d.value?(n=!0,t.hadChildren=!0,t.childrenCollectionSubject=t.subject,t.childrenCollectionPredicate=t.predicate,o=!1):"Literal"===d.value&&(n=!0,t.childrenTagsToString=!0,t.childrenStringTags=[]);continue;case"ID":this.validateNcname(d.value),t.reifiedStatementId=this.valueToUri("#"+d.value,t),this.claimNodeId(t.reifiedStatementId);continue}else if(d.uri===u.XML&&"lang"===d.local){t.language=""===d.value?null:d.value.toLowerCase();continue}if("xml"!==d.prefix&&"xmlns"!==d.prefix&&(""!==d.prefix||"xmlns"!==d.local)&&d.uri){if(n||t.datatype)throw this.newParseError(`Found illegal rdf:* properties on property element with attribute: ${d.value}`);t.hadChildren=!0,i=!0,s.push(this.uriToNamedNode(d.uri+d.local)),c.push(this.dataFactory.literal(d.value,t.datatype||t.language))}}if(null!==a){const e=t.subject;t.subject=o?this.dataFactory.blankNode(a):this.valueToUri(a,t),this.emitTriple(e,t.predicate,t.subject,t.reifiedStatementId);for(let e=0;e/g,((e,t,r)=>(this.saxParser.ENTITIES[t]=r,"")))}}var l;t.RdfXmlParser=u,u.MIME_TYPE="application/rdf+xml",u.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",u.XML="http://www.w3.org/XML/1998/namespace",u.FORBIDDEN_NODE_ELEMENTS=["RDF","ID","about","bagID","parseType","resource","nodeID","li","aboutEach","aboutEachPrefix"],u.FORBIDDEN_PROPERTY_ELEMENTS=["Description","RDF","ID","about","bagID","parseType","resource","nodeID","aboutEach","aboutEachPrefix"],u.NCNAME_MATCHER=/^([A-Za-z\xC0-\xD6\xD8-\xF6\u{F8}-\u{2FF}\u{370}-\u{37D}\u{37F}-\u{1FFF}\u{200C}-\u{200D}\u{2070}-\u{218F}\u{2C00}-\u{2FEF}\u{3001}-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFFD}\u{10000}-\u{EFFFF}_])([A-Za-z\xC0-\xD6\xD8-\xF6\u{F8}-\u{2FF}\u{370}-\u{37D}\u{37F}-\u{1FFF}\u{200C}-\u{200D}\u{2070}-\u{218F}\u{2C00}-\u{2FEF}\u{3001}-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFFD}\u{10000}-\u{EFFFF}_\-.0-9#xB7\u{0300}-\u{036F}\u{203F}-\u{2040}])*$/u,function(e){e[e.RESOURCE=0]="RESOURCE",e[e.PROPERTY=1]="PROPERTY"}(l||(t.ParseType=l={}))},84077:e=>{e.exports=function(t){if(!e.exports.WEBSTREAM_SUPPORT)throw new Error("No web ReadableStream support");var r=!1,n={};return new ReadableStream({start:function(e){for(var i in n.data=a,n.end=a,n.end=o,n.close=o,n.error=o,n)t.on(i,n[i]);function a(n){r||(e.enqueue(n),t.pause())}function o(i){if(!r){for(var a in r=!0,n)t.removeListener(a,n[a]);i?e.error(i):e.close()}}t.pause()},pull:function(){r||t.resume()},cancel:function(){for(var e in r=!0,n)t.removeListener(e,n[e]);t.push(null),t.pause(),t.destroy?t.destroy():t.close&&t.close()}})},e.exports.WEBSTREAM_SUPPORT="undefined"!=typeof ReadableStream},21434:(e,t,r)=>{"use strict";const{SymbolDispose:n}=r(51473),{AbortError:i,codes:a}=r(52590),{isNodeStream:o,isWebStream:s,kControllerErrorFunction:c}=r(92520),u=r(94869),{ERR_INVALID_ARG_TYPE:l}=a;let d;e.exports.addAbortSignal=function(t,r){if(((e,t)=>{if("object"!=typeof e||!("aborted"in e))throw new l("signal","AbortSignal",e)})(t),!o(r)&&!s(r))throw new l("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const a=o(t)?()=>{t.destroy(new i(void 0,{cause:e.reason}))}:()=>{t[c](new i(void 0,{cause:e.reason}))};if(e.aborted)a();else{d=d||r(46609).addAbortListener;const i=d(e,a);u(t,i[n])}return t}},82:(e,t,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:a,Uint8Array:o}=r(51473),{Buffer:s}=r(1048),{inspect:c}=r(46609);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return s.alloc(0);const t=s.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)a(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(ea.length)){e===a.length?(t+=a,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(a,0,e),this.head=r,r.data=n(a,e));break}t+=a,e-=a.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=s.allocUnsafe(e),r=e;let n=this.head,i=0;do{const s=n.data;if(!(e>s.length)){e===s.length?(a(t,s,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(a(t,new o(s.buffer,s.byteOffset,e),r-e),this.head=n,n.data=s.slice(e));break}a(t,s,r-e),e-=s.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return c(this,{...t,depth:0,customInspect:!1})}}},67369:(e,t,r)=>{"use strict";const{pipeline:n}=r(16815),i=r(86279),{destroyer:a}=r(16527),{isNodeStream:o,isReadable:s,isWritable:c,isWebStream:u,isTransformStream:l,isWritableStream:d,isReadableStream:h}=r(92520),{AbortError:p,codes:{ERR_INVALID_ARG_VALUE:f,ERR_MISSING_ARGS:y}}=r(52590),g=r(94869);e.exports=function(...e){if(0===e.length)throw new y("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let r=0;r0&&!(c(e[r])||d(e[r])||l(e[r])))throw new f(`streams[${r}]`,t[r],"must be writable")}let r,m,b,v,_;const w=e[0],T=n(e,(function(e){const t=v;v=null,t?t(e):e?_.destroy(e):O||S||_.destroy()})),S=!!(c(w)||d(w)||l(w)),O=!!(s(T)||h(T)||l(T));if(_=new i({writableObjectMode:!(null==w||!w.writableObjectMode),readableObjectMode:!(null==T||!T.readableObjectMode),writable:S,readable:O}),S){if(o(w))_._write=function(e,t,n){w.write(e,t)?n():r=n},_._final=function(e){w.end(),m=e},w.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(u(w)){const e=(l(w)?w.writable:w).getWriter();_._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},_._final=async function(t){try{await e.ready,e.close().catch((()=>{})),m=t}catch(e){t(e)}}}const e=l(T)?T.readable:T;g(e,(()=>{if(m){const e=m;m=null,e()}}))}if(O)if(o(T))T.on("readable",(function(){if(b){const e=b;b=null,e()}})),T.on("end",(function(){_.push(null)})),_._read=function(){for(;;){const e=T.read();if(null===e)return void(b=_._read);if(!_.push(e))return}};else if(u(T)){const e=(l(T)?T.readable:T).getReader();_._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!_.push(t))return;if(r)return void _.push(null)}catch{return}}}return _._destroy=function(e,t){e||null===v||(e=new p),b=null,r=null,m=null,null===v?t(e):(v=t,o(T)&&a(T,e))},_}},16527:(e,t,r)=>{"use strict";const n=r(39907),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:a},AbortError:o}=r(52590),{Symbol:s}=r(51473),{kIsDestroyed:c,isDestroyed:u,isFinished:l,isServerRequest:d}=r(92520),h=s("kDestroy"),p=s("kConstruct");function f(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function y(e,t,r){let i=!1;function a(t){if(i)return;i=!0;const a=e._readableState,o=e._writableState;f(t,o,a),o&&(o.closed=!0),a&&(a.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(g,e,t):n.nextTick(m,e)}try{e._destroy(t||null,a)}catch(t){a(t)}}function g(e,t){b(e,t),m(e)}function m(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function b(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function v(e,t,r){const i=e._readableState,a=e._writableState;if(null!=a&&a.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=a&&a.autoDestroy?e.destroy(t):t&&(t.stack,a&&!a.errored&&(a.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(b,e,t):b(e,t))}function _(e){let t=!1;function r(r){if(t)return void v(e,null!=r?r:new a);t=!0;const i=e._readableState,o=e._writableState,s=o||i;i&&(i.constructed=!0),o&&(o.constructed=!0),s.destroyed?e.emit(h,r):r?v(e,r,!0):n.nextTick(w,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function w(e){e.emit(p)}function T(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function S(e){e.emit("close")}function O(e,t){e.emit("error",t),n.nextTick(S,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(p,t),e.listenerCount(p)>1||n.nextTick(_,e)},destroyer:function(e,t){e&&!u(e)&&(t||l(e)||(t=new o),d(e)?(e.socket=null,e.destroy(t)):T(e)?e.abort():T(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(O,e,t):n.nextTick(S,e),e.destroyed||(e[c]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,a=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(f(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),a.constructed?y(this,e,t):this.once(h,(function(r){y(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:v}},86279:(e,t,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:a,ObjectSetPrototypeOf:o}=r(51473);e.exports=u;const s=r(11509),c=r(65605);o(u.prototype,s.prototype),o(u,s);{const e=a(c.prototype);for(let t=0;t{const n=r(39907),i=r(1048),{isReadable:a,isWritable:o,isIterable:s,isNodeStream:c,isReadableNodeStream:u,isWritableNodeStream:l,isDuplexNodeStream:d,isReadableStream:h,isWritableStream:p}=r(92520),f=r(94869),{AbortError:y,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:m}}=r(52590),{destroyer:b}=r(16527),v=r(86279),_=r(11509),w=r(65605),{createDeferredPromise:T}=r(46609),S=r(81613),O=globalThis.Blob||i.Blob,E=void 0!==O?function(e){return e instanceof O}:function(e){return!1},x=globalThis.AbortController||r(67083).AbortController,{FunctionPrototypeCall:A}=r(51473);class R extends v{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function I(e){const t=e.readable&&"function"!=typeof e.readable.read?_.wrap(e.readable):e.readable,r=e.writable;let n,i,s,c,u,l=!!a(t),d=!!o(r);function h(e){const t=c;c=null,t?t(e):e&&u.destroy(e)}return u=new R({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:l,writable:d}),d&&(f(r,(e=>{d=!1,e&&b(t,e),h(e)})),u._write=function(e,t,i){r.write(e,t)?i():n=i},u._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),l&&(f(t,(e=>{l=!1,e&&b(t,e),h(e)})),t.on("readable",(function(){if(s){const e=s;s=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(s=u._read);if(!u.push(e))return}}),u._destroy=function(e,a){e||null===c||(e=new y),s=null,n=null,i=null,null===c?a(e):(c=a,b(r,e),b(t,e))},u}e.exports=function e(t,r){if(d(t))return t;if(u(t))return I({readable:t});if(l(t))return I({writable:t});if(c(t))return I({writable:!1,readable:!1});if(h(t))return I({readable:_.fromWeb(t)});if(p(t))return I({writable:w.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:a,destroy:o}=function(e){let{promise:t,resolve:r}=T();const i=new x,a=i.signal;return{value:e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:o,cb:s}=await e;if(n.nextTick(s),o)return;if(a.aborted)throw new y(void 0,{cause:a.reason});({promise:t,resolve:r}=T()),yield i}}(),{signal:a}),write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(s(e))return S(R,e,{objectMode:!0,write:i,final:a,destroy:o});const c=null==e?void 0:e.then;if("function"==typeof c){let t;const r=A(c,e,(e=>{if(null!=e)throw new m("nully","body",e)}),(e=>{b(t,e)}));return t=new R({objectMode:!0,readable:!1,write:i,final(e){a((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:o})}throw new m("Iterable, AsyncIterable or AsyncFunction",r,e)}if(E(t))return e(t.arrayBuffer());if(s(t))return S(R,t,{objectMode:!0,writable:!1});if(h(null==t?void 0:t.readable)&&p(null==t?void 0:t.writable))return R.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return I({readable:null!=t&&t.readable?u(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?l(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});const i=null==t?void 0:t.then;if("function"==typeof i){let e;return A(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{b(e,t)})),e=new R({objectMode:!0,writable:!1,read(){}})}throw new g(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},94869:(e,t,r)=>{const n=r(39907),{AbortError:i,codes:a}=r(52590),{ERR_INVALID_ARG_TYPE:o,ERR_STREAM_PREMATURE_CLOSE:s}=a,{kEmptyObject:c,once:u}=r(46609),{validateAbortSignal:l,validateFunction:d,validateObject:h,validateBoolean:p}=r(77840),{Promise:f,PromisePrototypeThen:y,SymbolDispose:g}=r(51473),{isClosed:m,isReadable:b,isReadableNodeStream:v,isReadableStream:_,isReadableFinished:w,isReadableErrored:T,isWritable:S,isWritableNodeStream:O,isWritableStream:E,isWritableFinished:x,isWritableErrored:A,isNodeStream:R,willEmitClose:I,kIsClosedPromise:P}=r(92520);let N;const D=()=>{};function j(e,t,a){var p,f;if(2===arguments.length?(a=t,t=c):null==t?t=c:h(t,"options"),d(a,"callback"),l(t.signal,"options.signal"),a=u(a),_(e)||E(e))return function(e,t,a){let o=!1,s=D;if(t.signal)if(s=()=>{o=!0,a.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(s);else{N=N||r(46609).addAbortListener;const n=N(t.signal,s),i=a;a=u(((...t)=>{n[g](),i.apply(e,t)}))}const c=(...t)=>{o||n.nextTick((()=>a.apply(e,t)))};return y(e[P].promise,c,c),D}(e,t,a);if(!R(e))throw new o("stream",["ReadableStream","WritableStream","Stream"],e);const j=null!==(p=t.readable)&&void 0!==p?p:v(e),C=null!==(f=t.writable)&&void 0!==f?f:O(e),M=e._writableState,L=e._readableState,k=()=>{e.writable||U()};let F=I(e)&&v(e)===j&&O(e)===C,B=x(e,!1);const U=()=>{B=!0,e.destroyed&&(F=!1),(!F||e.readable&&!j)&&(j&&!q||a.call(e))};let q=w(e,!1);const V=()=>{q=!0,e.destroyed&&(F=!1),(!F||e.writable&&!C)&&(C&&!B||a.call(e))},Q=t=>{a.call(e,t)};let $=m(e);const H=()=>{$=!0;const t=A(e)||T(e);return t&&"boolean"!=typeof t?a.call(e,t):j&&!q&&v(e,!0)&&!w(e,!1)?a.call(e,new s):!C||B||x(e,!1)?void a.call(e):a.call(e,new s)},G=()=>{$=!0;const t=A(e)||T(e);if(t&&"boolean"!=typeof t)return a.call(e,t);a.call(e)},z=()=>{e.req.on("finish",U)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?C&&!M&&(e.on("end",k),e.on("close",k)):(e.on("complete",U),F||e.on("abort",H),e.req?z():e.on("request",z)),F||"boolean"!=typeof e.aborted||e.on("aborted",H),e.on("end",V),e.on("finish",U),!1!==t.error&&e.on("error",Q),e.on("close",H),$?n.nextTick(H):null!=M&&M.errorEmitted||null!=L&&L.errorEmitted?F||n.nextTick(G):(j||F&&!b(e)||!B&&!1!==S(e))&&(C||F&&!S(e)||!q&&!1!==b(e))?L&&e.req&&e.aborted&&n.nextTick(G):n.nextTick(G);const K=()=>{a=D,e.removeListener("aborted",H),e.removeListener("complete",U),e.removeListener("abort",H),e.removeListener("request",z),e.req&&e.req.removeListener("finish",U),e.removeListener("end",k),e.removeListener("close",k),e.removeListener("finish",U),e.removeListener("end",V),e.removeListener("error",Q),e.removeListener("close",H)};if(t.signal&&!$){const o=()=>{const r=a;K(),r.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(o);else{N=N||r(46609).addAbortListener;const n=N(t.signal,o),i=a;a=u(((...t)=>{n[g](),i.apply(e,t)}))}}return K}e.exports=j,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=c),null!==(r=t)&&void 0!==r&&r.cleanup&&(p(t.cleanup,"cleanup"),n=t.cleanup),new f(((r,i)=>{const a=j(e,t,(e=>{n&&a(),e?i(e):r()}))}))}},81613:(e,t,r)=>{"use strict";const n=r(39907),{PromisePrototypeThen:i,SymbolAsyncIterator:a,SymbolIterator:o}=r(51473),{Buffer:s}=r(1048),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:u}=r(52590).codes;e.exports=function(e,t,r){let l,d;if("string"==typeof t||t instanceof s)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[a])d=!0,l=t[a]();else{if(!t||!t[o])throw new c("iterable",["Iterable"],t);d=!1,l=t[o]()}const h=new e({objectMode:!0,highWaterMark:1,...r});let p=!1;return h._read=function(){p||(p=!0,async function(){for(;;){try{const{value:e,done:t}=d?await l.next():l.next();if(t)h.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw p=!1,new u;if(h.push(t))continue;p=!1}}catch(e){h.destroy(e)}break}}())},h._destroy=function(e,t){i(async function(e){const t=null!=e,r="function"==typeof l.throw;if(t&&r){const{value:t,done:r}=await l.throw(e);if(await t,r)return}if("function"==typeof l.return){const{value:e}=await l.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},h}},23054:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(51473),{EventEmitter:a}=r(50046);function o(e){a.call(this,e)}function s(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(o.prototype,a.prototype),i(o,a),o.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",c),r.on("close",u));let o=!1;function c(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){d(),0===a.listenerCount(this,"error")&&this.emit("error",e)}function d(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",c),r.removeListener("close",u),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",d),r.removeListener("close",d),e.removeListener("close",d)}return s(r,"error",l),s(e,"error",l),r.on("end",d),r.on("close",d),e.on("close",d),e.emit("pipe",r),e},e.exports={Stream:o,prependListener:s}},64708:(e,t,r)=>{"use strict";const n=globalThis.AbortController||r(67083).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:a,ERR_MISSING_ARGS:o,ERR_OUT_OF_RANGE:s},AbortError:c}=r(52590),{validateAbortSignal:u,validateInteger:l,validateObject:d}=r(77840),h=r(51473).Symbol("kWeak"),p=r(51473).Symbol("kResistStopPropagation"),{finished:f}=r(94869),y=r(67369),{addAbortSignalNoValidate:g}=r(21434),{isWritable:m,isNodeStream:b}=r(92520),{deprecate:v}=r(46609),{ArrayPrototypePush:_,Boolean:w,MathFloor:T,Number:S,NumberIsNaN:O,Promise:E,PromiseReject:x,PromiseResolve:A,PromisePrototypeThen:R,Symbol:I}=r(51473),P=I("kEmpty"),N=I("kEof");function D(e,t){if("function"!=typeof e)throw new a("fn",["Function","AsyncFunction"],e);null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=T(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=T(t.highWaterMark)),l(n,"options.concurrency",1),l(i,"options.highWaterMark",0),i+=n,async function*(){const a=r(46609).AbortSignalAny([null==t?void 0:t.signal].filter(w)),o=this,s=[],u={signal:a};let l,d,h=!1,p=0;function f(){h=!0,y()}function y(){p-=1,g()}function g(){d&&!h&&p=i||p>=n)&&await new E((e=>{d=e}))}s.push(N)}catch(e){const t=x(e);R(t,y,f),s.push(t)}finally{h=!0,l&&(l(),l=null)}}();try{for(;;){for(;s.length>0;){const e=await s[0];if(e===N)return;if(a.aborted)throw new c;e!==P&&(yield e),s.shift(),g()}await new E((e=>{l=e}))}}finally{h=!0,d&&(d(),d=null)}}.call(this)}async function j(e,t=void 0){for await(const r of C.call(this,e,t))return!0;return!1}function C(e,t){if("function"!=typeof e)throw new a("fn",["Function","AsyncFunction"],e);return D.call(this,(async function(t,r){return await e(t,r)?t:P}),t)}class M extends o{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function L(e){if(e=S(e),O(e))return 0;if(e<0)throw new s("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:v((function(e=void 0){return null!=e&&d(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=L(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new c;e--<=0&&(yield r)}}.call(this)},filter:C,flatMap:function(e,t){const r=D.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:D,take:function(e,t=void 0){return null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=L(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new c;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),b(e)&&!m(e))throw new i("stream",e,"must be writable");const r=y(this,e);return null!=t&&t.signal&&g(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new a("fn",["Function","AsyncFunction"],e);return!await j.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new a("fn",["Function","AsyncFunction"],e);for await(const r of D.call(this,(async function(t,r){return await e(t,r),P}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new a("reducer",["Function","AsyncFunction"],e);null!=r&&d(r,"options"),null!=(null==r?void 0:r.signal)&&u(r.signal,"options.signal");let o=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new c(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await f(this.destroy(e)),e}const s=new n,l=s.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this,[p]:!0};r.signal.addEventListener("abort",(()=>s.abort()),e)}let y=!1;try{for await(const n of this){var g;if(y=!0,null!=r&&null!==(g=r.signal)&&void 0!==g&&g.aborted)throw new c;o?t=await e(t,n,{signal:l}):(t=n,o=!0)}if(!y&&!o)throw new M}finally{s.abort()}return t},toArray:async function(e){null!=e&&d(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c(void 0,{cause:e.signal.reason});_(t,n)}return t},some:j,find:async function(e,t){for await(const r of C.call(this,e,t))return r}}},76587:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(51473);e.exports=a;const i=r(32073);function a(e){if(!(this instanceof a))return new a(e);i.call(this,e)}n(a.prototype,i.prototype),n(a,i),a.prototype._transform=function(e,t,r){r(null,e)}},16815:(e,t,r)=>{const n=r(39907),{ArrayIsArray:i,Promise:a,SymbolAsyncIterator:o,SymbolDispose:s}=r(51473),c=r(94869),{once:u}=r(46609),l=r(16527),d=r(86279),{aggregateTwoErrors:h,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:f,ERR_MISSING_ARGS:y,ERR_STREAM_DESTROYED:g,ERR_STREAM_PREMATURE_CLOSE:m},AbortError:b}=r(52590),{validateFunction:v,validateAbortSignal:_}=r(77840),{isIterable:w,isReadable:T,isReadableNodeStream:S,isNodeStream:O,isTransformStream:E,isWebStream:x,isReadableStream:A,isReadableFinished:R}=r(92520),I=globalThis.AbortController||r(67083).AbortController;let P,N,D;function j(e,t,r){let n=!1;return e.on("close",(()=>{n=!0})),{destroy:t=>{n||(n=!0,l.destroyer(e,t||new g("pipe")))},cleanup:c(e,{readable:t,writable:r},(e=>{n=!e}))}}function C(e){if(w(e))return e;if(S(e))return async function*(e){N||(N=r(11509)),yield*N.prototype[o].call(e)}(e);throw new p("val",["Readable","Iterable","AsyncIterable"],e)}async function M(e,t,r,{end:n}){let i,o=null;const s=e=>{if(e&&(i=e),o){const e=o;o=null,e()}},u=()=>new a(((e,t)=>{i?t(i):o=()=>{i?t(i):e()}}));t.on("drain",s);const l=c(t,{readable:!1},s);try{t.writableNeedDrain&&await u();for await(const r of e)t.write(r)||await u();n&&(t.end(),await u()),r()}catch(e){r(i!==e?h(i,e):e)}finally{l(),t.off("drain",s)}}async function L(e,t,r,{end:n}){E(t)&&(t=t.writable);const i=t.getWriter();try{for await(const t of e)await i.ready,i.write(t).catch((()=>{}));await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function k(e,t,a){if(1===e.length&&i(e[0])&&(e=e[0]),e.length<2)throw new y("streams");const o=new I,c=o.signal,u=null==a?void 0:a.signal,l=[];function h(){U(new b)}let g,m,v;_(u,"options.signal"),D=D||r(46609).addAbortListener,u&&(g=D(u,h));const R=[];let N,k=0;function B(e){U(e,0==--k)}function U(e,r){var i;if(!e||m&&"ERR_STREAM_PREMATURE_CLOSE"!==m.code||(m=e),m||r){for(;R.length;)R.shift()(m);null===(i=g)||void 0===i||i[s](),o.abort(),r&&(m||l.forEach((e=>e())),n.nextTick(t,m,v))}}for(let $=0;$0,K=G||!1!==(null==a?void 0:a.end),X=$===e.length-1;if(O(H)){if(K){const{destroy:J,cleanup:W}=j(H,G,z);R.push(J),T(H)&&X&&l.push(W)}function q(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&B(e)}H.on("error",q),T(H)&&X&&l.push((()=>{H.removeListener("error",q)}))}if(0===$)if("function"==typeof H){if(N=H({signal:c}),!w(N))throw new f("Iterable, AsyncIterable or Stream","source",N)}else N=w(H)||S(H)||E(H)?H:d.from(H);else if("function"==typeof H){var V;if(N=E(N)?C(null===(V=N)||void 0===V?void 0:V.readable):C(N),N=H(N,{signal:c}),G){if(!w(N,!0))throw new f("AsyncIterable",`transform[${$-1}]`,N)}else{var Q;P||(P=r(76587));const Y=new P({objectMode:!0}),Z=null===(Q=N)||void 0===Q?void 0:Q.then;if("function"==typeof Z)k++,Z.call(N,(e=>{v=e,null!=e&&Y.write(e),K&&Y.end(),n.nextTick(B)}),(e=>{Y.destroy(e),n.nextTick(B,e)}));else if(w(N,!0))k++,M(N,Y,B,{end:K});else{if(!A(N)&&!E(N))throw new f("AsyncIterable or Promise","destination",N);{const re=N.readable||N;k++,M(re,Y,B,{end:K})}}N=Y;const{destroy:ee,cleanup:te}=j(N,!1,!0);R.push(ee),X&&l.push(te)}}else if(O(H)){if(S(N)){k+=2;const ne=F(N,H,B,{end:K});T(H)&&X&&l.push(ne)}else if(E(N)||A(N)){const ie=N.readable||N;k++,M(ie,H,B,{end:K})}else{if(!w(N))throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],N);k++,M(N,H,B,{end:K})}N=H}else if(x(H)){if(S(N))k++,L(C(N),H,B,{end:K});else if(A(N)||w(N))k++,L(N,H,B,{end:K});else{if(!E(N))throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],N);k++,L(N.readable,H,B,{end:K})}N=H}else N=d.from(H)}return(null!=c&&c.aborted||null!=u&&u.aborted)&&n.nextTick(h),N}function F(e,t,r,{end:i}){let a=!1;if(t.on("close",(()=>{a||r(new m)})),e.pipe(t,{end:!1}),i){function o(){a=!0,t.end()}R(e)?n.nextTick(o):e.once("end",o)}else r();return c(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),c(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:k,pipeline:function(...e){return k(e,u(function(e){return v(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},11509:(e,t,r)=>{const n=r(39907),{ArrayPrototypeIndexOf:i,NumberIsInteger:a,NumberIsNaN:o,NumberParseInt:s,ObjectDefineProperties:c,ObjectKeys:u,ObjectSetPrototypeOf:l,Promise:d,SafeSet:h,SymbolAsyncDispose:p,SymbolAsyncIterator:f,Symbol:y}=r(51473);e.exports=X,X.ReadableState=K;const{EventEmitter:g}=r(50046),{Stream:m,prependListener:b}=r(23054),{Buffer:v}=r(1048),{addAbortSignal:_}=r(21434),w=r(94869);let T=r(46609).debuglog("stream",(e=>{T=e}));const S=r(82),O=r(16527),{getHighWaterMark:E,getDefaultHighWaterMark:x}=r(89952),{aggregateTwoErrors:A,codes:{ERR_INVALID_ARG_TYPE:R,ERR_METHOD_NOT_IMPLEMENTED:I,ERR_OUT_OF_RANGE:P,ERR_STREAM_PUSH_AFTER_EOF:N,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:D},AbortError:j}=r(52590),{validateObject:C}=r(77840),M=y("kPaused"),{StringDecoder:L}=r(18888),k=r(81613);l(X.prototype,m.prototype),l(X,m);const F=()=>{},{errorOrDestroy:B}=O,U=1,q=16,V=32,Q=64,$=2048,H=4096,G=65536;function z(e){return{enumerable:!1,get(){return!!(this.state&e)},set(t){t?this.state|=e:this.state&=~e}}}function K(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(86279)),this.state=$|H|q|V,e&&e.objectMode&&(this.state|=U),n&&e&&e.readableObjectMode&&(this.state|=U),this.highWaterMark=e?E(this,e,"readableHighWaterMark",n):x(!1),this.buffer=new S,this.length=0,this.pipes=[],this.flowing=null,this[M]=null,e&&!1===e.emitClose&&(this.state&=~$),e&&!1===e.autoDestroy&&(this.state&=~H),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new L(e.encoding),this.encoding=e.encoding)}function X(e){if(!(this instanceof X))return new X(e);const t=this instanceof r(86279);this._readableState=new K(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&_(e.signal,this)),m.call(this,e),O.construct(this,(()=>{this._readableState.needReadable&&te(this,this._readableState)}))}function J(e,t,r,n){T("readableAddChunk",t);const i=e._readableState;let a;if(i.state&U||("string"==typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=v.from(t,r).toString(i.encoding):(t=v.from(t,r),r=""))):t instanceof v?r="":m._isUint8Array(t)?(t=m._uint8ArrayToBuffer(t),r=""):null!=t&&(a=new R("chunk",["string","Buffer","Uint8Array"],t))),a)B(e,a);else if(null===t)i.state&=-9,function(e,t){if(T("onEofChunk"),!t.ended){if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?Z(e):(t.needReadable=!1,t.emittedReadable=!0,ee(e))}}(e,i);else if(i.state&U||t&&t.length>0)if(n)if(4&i.state)B(e,new D);else{if(i.destroyed||i.errored)return!1;W(e,i,t,!0)}else if(i.ended)B(e,new N);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?W(e,i,t,!1):te(e,i)):W(e,i,t,!1)}else n||(i.state&=-9,te(e,i));return!i.ended&&(i.length0?(t.state&G?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.state&Q&&Z(e)),te(e,t)}function Y(e,t){return e<=0||0===t.length&&t.ended?0:t.state&U?1:o(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function Z(e){const t=e._readableState;T("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(T("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(ee,e))}function ee(e){const t=e._readableState;T("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,oe(e)}function te(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(re,e,t))}function re(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!1===t[M]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function ie(e){T("readable nexttick read 0"),e.read(0)}function ae(e,t){T("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),oe(e),t.flowing&&!t.reading&&e.read(0)}function oe(e){const t=e._readableState;for(T("flow",t.flowing);t.flowing&&null!==e.read(););}function se(e,t){"function"!=typeof e.read&&(e=X.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=F;function i(t){this===e?(n(),n=F):n=t}e.on("readable",i);const a=w(e,{writable:!1},(e=>{r=e?A(r,e):null,n(),n=F}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new d(i)}}}catch(e){throw r=A(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),a()):O.destroyer(e,null)}}(e,t);return r.stream=e,r}function ce(e,t){if(0===t.length)return null;let r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function ue(e){const t=e._readableState;T("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(le,t,e))}function le(e,t){if(T("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(de,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function de(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let he;function pe(){return void 0===he&&(he={}),he}c(K.prototype,{objectMode:z(U),ended:z(2),endEmitted:z(4),reading:z(8),constructed:z(q),sync:z(V),needReadable:z(Q),emittedReadable:z(128),readableListening:z(256),resumeScheduled:z(512),errorEmitted:z(1024),emitClose:z($),autoDestroy:z(H),destroyed:z(8192),closed:z(16384),closeEmitted:z(32768),multiAwaitDrain:z(G),readingMore:z(1<<17),dataEmitted:z(1<<18)}),X.prototype.destroy=O.destroy,X.prototype._undestroy=O.undestroy,X.prototype._destroy=function(e,t){t(e)},X.prototype[g.captureRejectionSymbol]=function(e){this.destroy(e)},X.prototype[p]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new j,this.destroy(e)),new d(((t,r)=>w(this,(n=>n&&n!==e?r(n):t(null)))))},X.prototype.push=function(e,t){return J(this,e,t,!1)},X.prototype.unshift=function(e,t){return J(this,e,t,!0)},X.prototype.isPaused=function(){const e=this._readableState;return!0===e[M]||!1===e.flowing},X.prototype.setEncoding=function(e){const t=new L(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},X.prototype.read=function(e){T("read",e),void 0===e?e=NaN:a(e)||(e=s(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new P("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return T("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?ue(this):Z(this),null;if(0===(e=Y(e,t))&&t.ended)return 0===t.length&&ue(this),null;let n,i=!!(t.state&Q);if(T("need readable",i),(0===t.length||t.length-e0?ce(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ue(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},X.prototype._read=function(e){throw new I("_read()")},X.prototype.pipe=function(e,t){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new h(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),T("pipe count=%d opts=%j",i.pipes.length,t);const a=t&&!1===t.end||e===n.stdout||e===n.stderr?y:o;function o(){T("onend"),e.end()}let s;i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",(function t(n,a){T("onunpipe"),n===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,T("cleanup"),e.removeListener("close",p),e.removeListener("finish",f),s&&e.removeListener("drain",s),e.removeListener("error",d),e.removeListener("unpipe",t),r.removeListener("end",o),r.removeListener("end",y),r.removeListener("data",l),c=!0,s&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&s())}));let c=!1;function u(){c||(1===i.pipes.length&&i.pipes[0]===e?(T("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(T("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),r.pause()),s||(s=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(T("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(T("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",s))}function l(t){T("ondata");const r=e.write(t);T("dest.write",r),!1===r&&u()}function d(t){if(T("onerror",t),y(),e.removeListener("error",d),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?B(e,t):e.emit("error",t)}}function p(){e.removeListener("finish",f),y()}function f(){T("onfinish"),e.removeListener("close",p),y()}function y(){T("unpipe"),r.unpipe(e)}return r.on("data",l),b(e,"error",d),e.once("close",p),e.once("finish",f),e.emit("pipe",r),!0===e.writableNeedDrain?u():i.flowing||(T("pipe resume"),r.resume()),e},X.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,T("on readable",i.length,i.reading),i.length?Z(this):i.reading||n.nextTick(ie,this))),r},X.prototype.addListener=X.prototype.on,X.prototype.removeListener=function(e,t){const r=m.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(ne,this),r},X.prototype.off=X.prototype.removeListener,X.prototype.removeAllListeners=function(e){const t=m.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(ne,this),t},X.prototype.resume=function(){const e=this._readableState;return e.flowing||(T("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(ae,e,t))}(this,e)),e[M]=!1,this},X.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[M]=!0,this},X.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{B(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=u(e);for(let t=1;t{"use strict";const{MathFloor:n,NumberIsInteger:i}=r(51473),{validateInteger:a}=r(77840),{ERR_INVALID_ARG_VALUE:o}=r(52590).codes;let s=16384,c=16;function u(e){return e?c:s}e.exports={getHighWaterMark:function(e,t,r,a){const s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,a,r);if(null!=s){if(!i(s)||s<0)throw new o(a?`options.${r}`:"options.highWaterMark",s);return n(s)}return u(e.objectMode)},getDefaultHighWaterMark:u,setDefaultHighWaterMark:function(e,t){a(t,"value",0),e?c=t:s=t}}},32073:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:i}=r(51473);e.exports=u;const{ERR_METHOD_NOT_IMPLEMENTED:a}=r(52590).codes,o=r(86279),{getHighWaterMark:s}=r(89952);n(u.prototype,o.prototype),n(u,o);const c=i("kCallback");function u(e){if(!(this instanceof u))return new u(e);const t=e?s(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),o.call(this,e),this._readableState.sync=!1,this[c]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function l(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function d(){this._final!==l&&l.call(this)}u.prototype._final=l,u.prototype._transform=function(e,t,r){throw new a("_transform()")},u.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,a=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||a===n.length||n.length{"use strict";const{SymbolAsyncIterator:n,SymbolIterator:i,SymbolFor:a}=r(51473),o=a("nodejs.stream.destroyed"),s=a("nodejs.stream.errored"),c=a("nodejs.stream.readable"),u=a("nodejs.stream.writable"),l=a("nodejs.stream.disturbed"),d=a("nodejs.webstream.isClosedPromise"),h=a("nodejs.webstream.controllerErrorFunction");function p(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function f(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function y(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function g(e){return!(!e||y(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function m(e){return!(!e||y(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function b(e){return!(!e||y(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function v(e){if(!y(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[o]||null!=n&&n.destroyed)}function _(e){if(!f(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function w(e,t){if(!p(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function T(e){return e&&null!=e[c]?e[c]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!v(e)&&p(e)&&e.readable&&!w(e)}function S(e){return e&&null!=e[u]?e[u]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!v(e)&&f(e)&&e.writable&&!_(e)}function O(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function E(e){return"boolean"==typeof e._sent100&&O(e)}e.exports={isDestroyed:v,kIsDestroyed:o,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[l])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:l,isErrored:function(e){var t,r,n,i,a,o,c,u,l,d;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(a=null!==(o=e[s])&&void 0!==o?o:e.readableErrored)&&void 0!==a?a:e.writableErrored)&&void 0!==i?i:null===(c=e._readableState)||void 0===c?void 0:c.errorEmitted)&&void 0!==n?n:null===(u=e._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(l=e._readableState)||void 0===l?void 0:l.errored)&&void 0!==t?t:null===(d=e._writableState)||void 0===d?void 0:d.errored))},kIsErrored:s,isReadable:T,kIsReadable:c,kIsClosedPromise:d,kControllerErrorFunction:h,kIsWritable:u,isClosed:function(e){if(!y(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&O(e)?e._closed:null},isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return y(e)?!(!v(e)&&(!1!==(null==t?void 0:t.readable)&&T(e)||!1!==(null==t?void 0:t.writable)&&S(e))):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[n]:!1===t?"function"==typeof e[i]:"function"==typeof e[n]||"function"==typeof e[i])},isReadableNodeStream:p,isReadableStream:g,isReadableEnded:function(e){if(!p(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:w,isReadableErrored:function(e){var t,r;return y(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:y,isWebStream:function(e){return g(e)||m(e)||b(e)},isWritable:S,isWritableNodeStream:f,isWritableStream:m,isWritableEnded:_,isWritableFinished:function(e,t){if(!f(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return y(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:E,willEmitClose:function(e){if(!y(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&E(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:b}},65605:(e,t,r)=>{const n=r(39907),{ArrayPrototypeSlice:i,Error:a,FunctionPrototypeSymbolHasInstance:o,ObjectDefineProperty:s,ObjectDefineProperties:c,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:l,Symbol:d,SymbolHasInstance:h}=r(51473);e.exports=C,C.WritableState=D;const{EventEmitter:p}=r(50046),f=r(23054).Stream,{Buffer:y}=r(1048),g=r(16527),{addAbortSignal:m}=r(21434),{getHighWaterMark:b,getDefaultHighWaterMark:v}=r(89952),{ERR_INVALID_ARG_TYPE:_,ERR_METHOD_NOT_IMPLEMENTED:w,ERR_MULTIPLE_CALLBACK:T,ERR_STREAM_CANNOT_PIPE:S,ERR_STREAM_DESTROYED:O,ERR_STREAM_ALREADY_FINISHED:E,ERR_STREAM_NULL_VALUES:x,ERR_STREAM_WRITE_AFTER_END:A,ERR_UNKNOWN_ENCODING:R}=r(52590).codes,{errorOrDestroy:I}=g;function P(){}u(C.prototype,f.prototype),u(C,f);const N=d("kOnFinished");function D(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(86279)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?b(this,e,"writableHighWaterMark",n):v(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=F.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,j(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[N]=[]}function j(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function C(e){const t=this instanceof r(86279);if(!t&&!o(C,this))return new C(e);this._writableState=new D(e,this,t),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&m(e.signal,this)),f.call(this,e),g.construct(this,(()=>{const e=this._writableState;e.writing||V(this,e),$(this,e)}))}function M(e,t,r,i){const a=e._writableState;if("function"==typeof r)i=r,r=a.defaultEncoding;else{if(r){if("buffer"!==r&&!y.isEncoding(r))throw new R(r)}else r=a.defaultEncoding;"function"!=typeof i&&(i=P)}if(null===t)throw new x;if(!a.objectMode)if("string"==typeof t)!1!==a.decodeStrings&&(t=y.from(t,r),r="buffer");else if(t instanceof y)r="buffer";else{if(!f._isUint8Array(t))throw new _("chunk",["string","Buffer","Uint8Array"],t);t=f._uint8ArrayToBuffer(t),r="buffer"}let o;return a.ending?o=new A:a.destroyed&&(o=new O("write")),o?(n.nextTick(i,o),I(e,o,!0),o):(a.pendingcb++,function(e,t,r,n,i){const a=t.objectMode?1:r.length;t.length+=a;const o=t.lengthr.bufferedIndex&&V(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===a?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:a,stream:e,state:r},n.nextTick(B,r.afterWriteTickInfo)):U(e,r,1,a))):I(e,new T)}function B({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,U(e,t,r,n)}function U(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&q(t),$(e,t)}function q(e){if(e.writing)return;for(let r=e.bufferedIndex;r1&&e._writev){t.pendingcb-=o-1;const n=t.allNoop?P:e=>{for(let t=s;t256?(r.splice(0,s),t.bufferedIndex=0):t.bufferedIndex=s}t.bufferProcessing=!1}function Q(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function $(e,t,r){Q(t)&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)I(e,null!=i?i:T());else if(r=!0,t.pendingcb--,i){const r=t[N].splice(0);for(let e=0;e{Q(t)?H(e,t):t.pendingcb--}),e,t)):Q(t)&&(t.pendingcb++,H(e,t))))}function H(e,t){t.pendingcb--,t.finished=!0;const r=t[N].splice(0);for(let e=0;e{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:a,ArrayPrototypeMap:o,NumberIsInteger:s,NumberIsNaN:c,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:l,NumberParseInt:d,ObjectPrototypeHasOwnProperty:h,RegExpPrototypeExec:p,String:f,StringPrototypeToUpperCase:y,StringPrototypeTrim:g}=r(51473),{hideStackFrames:m,codes:{ERR_SOCKET_BAD_PORT:b,ERR_INVALID_ARG_TYPE:v,ERR_INVALID_ARG_VALUE:_,ERR_OUT_OF_RANGE:w,ERR_UNKNOWN_SIGNAL:T}}=r(52590),{normalizeEncoding:S}=r(46609),{isAsyncFunction:O,isArrayBufferView:E}=r(46609).types,x={},A=/^[0-7]+$/,R=m(((e,t,r=l,n=u)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!s(e))throw new w(t,"an integer",e);if(en)throw new w(t,`>= ${r} && <= ${n}`,e)})),I=m(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!s(e))throw new w(t,"an integer",e);if(en)throw new w(t,`>= ${r} && <= ${n}`,e)})),P=m(((e,t,r=!1)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!s(e))throw new w(t,"an integer",e);const n=r?1:0,i=4294967295;if(ei)throw new w(t,`>= ${n} && <= ${i}`,e)}));function N(e,t){if("string"!=typeof e)throw new v(t,"string",e)}const D=m(((e,t,r)=>{if(!i(r,e)){const n=a(o(r,(e=>"string"==typeof e?`'${e}'`:f(e))),", ");throw new _(t,e,"must be one of: "+n)}}));function j(e,t){if("boolean"!=typeof e)throw new v(t,"boolean",e)}function C(e,t,r){return null!=e&&h(e,t)?e[t]:r}const M=m(((e,t,r=null)=>{const i=C(r,"allowArray",!1),a=C(r,"allowFunction",!1);if(!C(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!a||"function"!=typeof e))throw new v(t,"Object",e)})),L=m(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new v(t,"a dictionary",e)})),k=m(((e,t,r=0)=>{if(!n(e))throw new v(t,"Array",e);if(e.length{if(!E(e))throw new v(t,["Buffer","TypedArray","DataView"],e)})),B=m(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new v(t,"AbortSignal",e)})),U=m(((e,t)=>{if("function"!=typeof e)throw new v(t,"Function",e)})),q=m(((e,t)=>{if("function"!=typeof e||O(e))throw new v(t,"Function",e)})),V=m(((e,t)=>{if(void 0!==e)throw new v(t,"undefined",e)})),Q=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function $(e,t){if(void 0===e||!p(Q,e))throw new _(t,e,'must be an array or string of format "; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===p(A,e))throw new _(t,e,"must be a 32-bit unsigned integer or an octal string");e=d(e,8)}return P(e,t),e},validateArray:k,validateStringArray:function(e,t){k(e,t);for(let r=0;rn||(null!=r||null!=n)&&c(e))throw new w(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:M,validateOneOf:D,validatePlainFunction:q,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===g(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new b(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(N(e,t),void 0===x[e]){if(void 0!==x[y(e)])throw new T(e+" (signals must use all capital letters)");throw new T(e)}},validateString:N,validateUint32:P,validateUndefined:V,validateUnion:function(e,t,r){if(!i(r,e))throw new v(t,`('${a(r,"|")}')`,e)},validateAbortSignal:B,validateLinkHeaderValue:function(e){if("string"==typeof e)return $(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n; rel=preload; as=style"')}}},58521:(e,t,r)=>{"use strict";const n=r(50601),i=r(2010),a=n.Readable.destroy;e.exports=n.Readable,e.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,e.exports._isUint8Array=n._isUint8Array,e.exports.isDisturbed=n.isDisturbed,e.exports.isErrored=n.isErrored,e.exports.isReadable=n.isReadable,e.exports.Readable=n.Readable,e.exports.Writable=n.Writable,e.exports.Duplex=n.Duplex,e.exports.Transform=n.Transform,e.exports.PassThrough=n.PassThrough,e.exports.addAbortSignal=n.addAbortSignal,e.exports.finished=n.finished,e.exports.destroy=n.destroy,e.exports.destroy=a,e.exports.pipeline=n.pipeline,e.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),e.exports.Stream=n.Stream,e.exports.default=e.exports},52590:(e,t,r)=>{"use strict";const{format:n,inspect:i,AggregateError:a}=r(46609),o=globalThis.AggregateError||a,s=Symbol("kIsNodeError"),c=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,l={};function d(e,t){if(!e)throw new l.ERR_INTERNAL_ASSERTION(t)}function h(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function p(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return d(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const i=(t.match(/%[dfijoOs]/g)||[]).length;return d(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[s]=!0,l[e]=i}function f(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class y extends Error{constructor(e="The operation was aborted",t=void 0){if(void 0!==t&&"object"!=typeof t)throw new l.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}p("ERR_ASSERTION","%s",Error),p("ERR_INVALID_ARG_TYPE",((e,t,r)=>{d("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const a=[],o=[],s=[];for(const e of t)d("string"==typeof e,"All expected entries have to be of type string"),c.includes(e)?a.push(e.toLowerCase()):u.test(e)?o.push(e):(d("object"!==e,'The value "object" should be written as "Object"'),s.push(e));if(o.length>0){const e=a.indexOf("object");-1!==e&&(a.splice(a,e,1),o.push("Object"))}if(a.length>0){switch(a.length){case 1:n+=`of type ${a[0]}`;break;case 2:n+=`one of type ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of type ${a.join(", ")}, or ${e}`}}(o.length>0||s.length>0)&&(n+=" or ")}if(o.length>0){switch(o.length){case 1:n+=`an instance of ${o[0]}`;break;case 2:n+=`an instance of ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`an instance of ${o.join(", ")}, or ${e}`}}s.length>0&&(n+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(n+="an "),n+=`${s[0]}`;break;case 2:n+=`one of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`one of ${s.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var l;null!==(l=r.constructor)&&void 0!==l&&l.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${i(r,{depth:-1})}`}else{let e=i(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),p("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=i(t);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),p("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),p("ERR_MISSING_ARGS",((...e)=>{let t;d(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),p("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return d(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=h(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=h(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),p("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),p("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),p("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),p("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),p("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),p("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),p("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),p("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),p("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),p("ERR_STREAM_WRITE_AFTER_END","write after end",Error),p("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:y,aggregateTwoErrors:f((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new o([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:f,codes:l}},51473:e=>{"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),PromiseResolve:e=>Promise.resolve(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Boolean,Uint8Array}},46609:(e,t,r)=>{"use strict";const n=r(1048),{kResistStopPropagation:i,SymbolDispose:a}=r(51473),o=globalThis.AbortSignal||r(67083).AbortSignal,s=globalThis.AbortController||r(67083).AbortController,c=Object.getPrototypeOf((async function(){})).constructor,u=globalThis.Blob||n.Blob,l=void 0!==u?function(e){return e instanceof u}:function(e){return!1},d=(e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new ERR_INVALID_ARG_TYPE(t,"AbortSignal",e)};class h extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof c,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:l,deprecate:(e,t)=>e,addAbortListener:r(50046).addAbortListener||function(e,t){if(void 0===e)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);let r;return d(e,"signal"),((e,t)=>{if("function"!=typeof e)throw new ERR_INVALID_ARG_TYPE("listener","Function",e)})(t),e.aborted?queueMicrotask((()=>t())):(e.addEventListener("abort",t,{__proto__:null,once:!0,[i]:!0}),r=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[a](){var e;null===(e=r)||void 0===e||e()}}},AbortSignalAny:o.any||function(e){if(1===e.length)return e[0];const t=new s,r=()=>t.abort();return e.forEach((e=>{d(e,"signals"),e.addEventListener("abort",r,{once:!0})})),t.signal.addEventListener("abort",(()=>{e.forEach((e=>e.removeEventListener("abort",r)))}),{once:!0}),t.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},50601:(e,t,r)=>{const{Buffer:n}=r(1048),{ObjectDefineProperty:i,ObjectKeys:a,ReflectApply:o}=r(51473),{promisify:{custom:s}}=r(46609),{streamReturningOperators:c,promiseReturningOperators:u}=r(64708),{codes:{ERR_ILLEGAL_CONSTRUCTOR:l}}=r(52590),d=r(67369),{setDefaultHighWaterMark:h,getDefaultHighWaterMark:p}=r(89952),{pipeline:f}=r(16815),{destroyer:y}=r(16527),g=r(94869),m=r(2010),b=r(92520),v=e.exports=r(23054).Stream;v.isDestroyed=b.isDestroyed,v.isDisturbed=b.isDisturbed,v.isErrored=b.isErrored,v.isReadable=b.isReadable,v.isWritable=b.isWritable,v.Readable=r(11509);for(const T of a(c)){const S=c[T];function _(...e){if(new.target)throw l();return v.Readable.from(o(S,this,e))}i(_,"name",{__proto__:null,value:S.name}),i(_,"length",{__proto__:null,value:S.length}),i(v.Readable.prototype,T,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}for(const O of a(u)){const E=u[O];function _(...e){if(new.target)throw l();return o(E,this,e)}i(_,"name",{__proto__:null,value:E.name}),i(_,"length",{__proto__:null,value:E.length}),i(v.Readable.prototype,O,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}v.Writable=r(65605),v.Duplex=r(86279),v.Transform=r(32073),v.PassThrough=r(76587),v.pipeline=f;const{addAbortSignal:w}=r(21434);v.addAbortSignal=w,v.finished=g,v.destroy=y,v.compose=d,v.setDefaultHighWaterMark=h,v.getDefaultHighWaterMark=p,i(v,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>m}),i(f,s,{__proto__:null,enumerable:!0,get:()=>m.pipeline}),i(g,s,{__proto__:null,enumerable:!0,get:()=>m.finished}),v.Stream=v,v._isUint8Array=function(e){return e instanceof Uint8Array},v._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},2010:(e,t,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:i}=r(51473),{isIterable:a,isNodeStream:o,isWebStream:s}=r(92520),{pipelineImpl:c}=r(16815),{finished:u}=r(94869);r(50601),e.exports={finished:u,pipeline:function(...e){return new i(((t,r)=>{let i,u;const l=e[e.length-1];if(l&&"object"==typeof l&&!o(l)&&!a(l)&&!s(l)){const t=n(e);i=t.signal,u=t.end}c(e,((e,n)=>{e?r(e):t(n)}),{signal:i,end:u})}))}}},9929:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(29365),t)},29365:(e,t)=>{"use strict";function r(e){const t=[];let r=0;for(;re.join(""))).join("/")}function n(e,t){let n=t+1;t>=0?"/"===e[t+1]&&"/"===e[t+2]&&(n=t+3):"/"===e[0]&&"/"===e[1]&&(n=2);const i=e.indexOf("/",n);return i<0?e:e.substr(0,i)+r(e.substr(i))}function i(e){return!e||"#"===e||"?"===e||"/"===e}Object.defineProperty(t,"__esModule",{value:!0}),t.removeDotSegmentsOfPath=t.removeDotSegments=t.resolve=void 0,t.resolve=function(e,t){const i=(t=t||"").indexOf("#");if(i>0&&(t=t.substr(0,i)),!e.length){if(t.indexOf(":")<0)throw new Error(`Found invalid baseIRI '${t}' for value '${e}'`);return t}if(e.startsWith("?")){const r=t.indexOf("?");return r>0&&(t=t.substr(0,r)),t+e}if(e.startsWith("#"))return t+e;if(!t.length){const t=e.indexOf(":");if(t<0)throw new Error(`Found invalid relative IRI '${e}' for a missing baseIRI`);return n(e,t)}const a=e.indexOf(":");if(a>=0)return n(e,a);const o=t.indexOf(":");if(o<0)throw new Error(`Found invalid baseIRI '${t}' for value '${e}'`);const s=t.substr(0,o+1);if(0===e.indexOf("//"))return s+n(e,a);let c;if(t.indexOf("//",o)===o+1){if(c=t.indexOf("/",o+3),c<0)return t.length>o+3?t+"/"+n(e,a):s+n(e,a)}else if(c=t.indexOf("/",o+1),c<0)return s+n(e,a);if(0===e.indexOf("/"))return t.substr(0,c)+r(e);let u=t.substr(c);const l=u.lastIndexOf("/");return l>=0&&l{var n=r(1048),i=n.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},21925:e=>{var t=function(){var e=function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},t=[7,12,13,14,15,16,20,25,115,130],r=[7,13,16,20,25,115,130],n=[7,13,16,115,130],i=[1,25],a=[1,29],o=[1,27],s=[1,28],c=[13,16,115,130],u=[13,16,28,38,40,42,44,46,48,53,56,61,67,85,87,92,93,95,96,102,110,111,115,119,120,126,128,129,130,131,132,133,134,135,136],l=[28,56],d=[1,42],h=[46,48,53,56],p=[1,54],f=[1,60],y=[1,56],g=[1,57],m=[1,58],b=[1,63],v=[1,64],_=[1,65],w=[1,66],T=[1,67],S=[1,68],O=[1,75],E=[28,46,48,53,56],x=[28,42,46,48,53,56],A=[13,16,28,38,40,42,44,46,48,53,56,92,115,119,120,130,131,132,133,134,135,136],R=[13,16,28,38,40,42,44,46,48,53,56,67,85,87,92,95,96,115,119,120,126,128,129,130,131,132,133,134,135,136],I=[13,16,38,40,44,92,115,119,120,130,131,132,133,134,135,136],P=[13,16,28,38,40,42,44,46,48,53,56,67,85,87,92,95,96,115,117,118,119,120,126,128,129,130,131,132,133,134,135,136],N=[13,16,28,56,115,130],D=[13,16,38,58,87,96,109,115,126,130],j=[1,116],C=[1,112],M=[1,108],L=[1,114],k=[1,111],F=[7,13,16,20,25,44,48,53,56,67,85,87,95,96,115,128,129,130],B=[48,53],U=[48,53,87,96,126],q=[13,16,44,48,53,56,85,87,95,96,115,128,129,130],V=[1,126],Q=[13,16,40,44,48,53,56,85,87,95,96,115,128,129,130],$=[1,129],H=[48,53,67,87,96,126],G=[13,16,40,44,48,53,56,67,85,87,95,96,115,128,129,130],z=[1,133],K=[13,16,40,44,48,53,56,67,85,87,95,96,102,115,128,129,130],X=[13,16,40,44,48,53,56,67,85,87,93,95,96,102,110,111,115,128,129,130],J=[1,151],W=[1,153],Y=[1,156],Z=[1,157],ee=[1,158],te=[1,167],re=[1,175],ne=[13,16,44,48,53,56,67,85,87,95,96,115,128,129,130],ie=[13,16,44,48,53,56,67,85,87,95,96,115,126,128,129,130],ae=[13,16,46,92,115,119,120,130,131,132,133,134,135,136],oe={trace:function(){},yy:{},symbols_:{error:2,shaclDoc:3,shaclDoc_repetition0:4,shaclDoc_repetition1:5,ttlSection:6,EOF:7,directive:8,baseDecl:9,importsDecl:10,prefixDecl:11,KW_BASE:12,IRIREF:13,KW_IMPORTS:14,KW_PREFIX:15,PNAME_NS:16,nodeShapeIri:17,iri:18,nodeShape:19,KW_SHAPE:20,nodeShape_option0:21,nodeShape_option1:22,nodeShapeBody:23,shapeClass:24,KW_SHAPE_CLASS:25,shapeClass_option0:26,turtleAnnotation:27,";":28,turtleAnnotation2:29,predicate:30,turtleAnnotation2_option0:31,objectList:32,object:33,objectList_repetition0:34,iriOrLiteral:35,blankNodeSection:36,list:37,"(":38,list_repetition0:39,")":40,objectTail:41,",":42,LB:43,"[":44,RB:45,"]":46,LP:47,"%":48,RP:49,pcSection:50,iriHead:51,ttlStatement:52,".":53,ttlSection_repetition0:54,startNodeShape:55,"{":56,endNodeShape:57,"}":58,nodeShapeBody_repetition0:59,targetClass:60,"->":61,targetClass_repetition_plus0:62,constraint:63,constraint_group0:64,constraint_option0:65,orNotComponent:66,"|":67,nodeNot:68,nodeOrEmit:69,nodeOr:70,nodeOr_repetition_plus0:71,nodeValue:72,negation:73,nodeValue_group0:74,"=":75,iriOrLiteralOrArray:76,propertyShape:77,path:78,propertyShape_repetition0:79,propertyOrComponent:80,propertyNot:81,propertyOr:82,propertyOr_repetition_plus0:83,propertyAtom:84,NODEKIND:85,shapeRef:86,PARAM:87,propertyCount:88,propertyMinCount:89,"..":90,propertyMaxCount:91,INTEGER:92,"*":93,shapeRef_group0:94,"@":95,"!":96,pathAlternative:97,additionalAlternative:98,pathSequence:99,pathAlternative_repetition_plus0:100,additionalSequence:101,"/":102,pathEltOrInverse:103,pathSequence_repetition_plus0:104,pathElt:105,pathPrimary:106,pathMod:107,pathInverse:108,"^":109,"?":110,"+":111,iriOrLiteralOrArray_repetition0:112,literal:113,iri_group0:114,a:115,string:116,LANGTAG:117,"^^":118,DECIMAL:119,DOUBLE:120,literal_group0:121,string_group0:122,string_group1:123,shaclDoc_repetition1_group0:124,constraint_group0_repetition_plus0:125,TARGET:126,propertyShape_repetition0_group0:127,ATPNAME_LN:128,ATPNAME_NS:129,PNAME_LN:130,KW_TRUE:131,KW_FALSE:132,STRING_LITERAL1:133,STRING_LITERAL2:134,STRING_LITERAL_LONG1:135,STRING_LITERAL_LONG2:136,$accept:0,$end:1},terminals_:{2:"error",7:"EOF",12:"KW_BASE",13:"IRIREF",14:"KW_IMPORTS",15:"KW_PREFIX",16:"PNAME_NS",20:"KW_SHAPE",25:"KW_SHAPE_CLASS",28:";",38:"(",40:")",42:",",44:"[",46:"]",48:"%",53:".",56:"{",58:"}",61:"->",67:"|",75:"=",85:"NODEKIND",87:"PARAM",90:"..",92:"INTEGER",93:"*",95:"@",96:"!",102:"/",109:"^",110:"?",111:"+",115:"a",117:"LANGTAG",118:"^^",119:"DECIMAL",120:"DOUBLE",126:"TARGET",128:"ATPNAME_LN",129:"ATPNAME_NS",130:"PNAME_LN",131:"KW_TRUE",132:"KW_FALSE",133:"STRING_LITERAL1",134:"STRING_LITERAL2",135:"STRING_LITERAL_LONG1",136:"STRING_LITERAL_LONG2"},productions_:[0,[3,4],[8,1],[8,1],[8,1],[9,2],[10,2],[11,3],[17,1],[19,5],[24,4],[27,2],[29,2],[30,2],[32,2],[33,1],[33,1],[33,1],[37,3],[41,2],[43,1],[45,1],[36,3],[47,1],[49,1],[50,3],[51,1],[52,3],[6,1],[55,1],[57,1],[23,3],[60,2],[63,3],[66,2],[69,1],[70,1],[70,2],[68,1],[68,2],[72,3],[77,2],[80,2],[82,1],[82,2],[81,1],[81,2],[84,1],[84,1],[84,1],[84,3],[84,1],[88,5],[89,1],[91,1],[91,1],[86,1],[86,2],[73,1],[78,1],[98,2],[97,1],[97,2],[101,2],[99,1],[99,2],[105,1],[105,2],[103,1],[103,2],[108,1],[107,1],[107,1],[107,1],[106,1],[106,3],[76,1],[76,3],[35,1],[35,1],[18,1],[18,1],[18,1],[113,1],[113,2],[113,3],[113,1],[113,1],[113,1],[113,1],[116,1],[116,1],[4,0],[4,2],[124,1],[124,1],[5,0],[5,2],[21,0],[21,1],[22,0],[22,1],[26,0],[26,1],[31,0],[31,1],[34,0],[34,2],[39,0],[39,2],[54,0],[54,2],[59,0],[59,2],[62,1],[62,2],[125,1],[125,2],[64,1],[64,1],[65,0],[65,1],[71,1],[71,2],[74,1],[74,1],[127,1],[127,1],[79,0],[79,2],[83,1],[83,2],[94,1],[94,1],[100,1],[100,2],[104,1],[104,2],[112,0],[112,2],[114,1],[114,1],[121,1],[121,1],[122,1],[122,1],[123,1],[123,1]],performAction:function(e,t,r,n,i,a,o){var s,c,u=a.length-1;switch(i){case 1:this.$=Re(De.factory.namedNode(Te("")),De.factory.namedNode(ce),De.factory.namedNode(be+"Ontology"));break;case 5:De.base=De.factory.namedNode(a[u].slice(1,-1)),De.n3Parser._setBase(De.base.value);break;case 6:this.$=Re(De.base,De.factory.namedNode(be+"imports"),De.factory.namedNode(a[u].slice(1,-1)));break;case 7:this.$=De.prefixes[a[u-1].substr(0,a[u-1].length-1)]=Te(a[u]);break;case 8:De.nodeShapeStack=!1,Re(De.currentNodeShape=a[u],De.factory.namedNode(ce),De.factory.namedNode(me+"NodeShape"));break;case 10:this.$=Re(De.currentNodeShape,De.factory.namedNode(ce),De.factory.namedNode(ve+"Class"));break;case 11:this.$=Pe();break;case 13:this.$=a[u].forEach((e=>Re(De.currentNodeShape,a[u-1],e)));break;case 14:this.$=[a[u-1],...a[u]];break;case 18:this.$=we(a[u-1],!0);break;case 19:case 34:case 42:case 60:case 63:this.$=a[u];break;case 20:De.tempCurrentNodeShape=De.currentNodeShape,this.$=De.currentNodeShape=Ee();break;case 21:case 24:De.currentNodeShape=De.tempCurrentNodeShape;break;case 22:case 31:this.$=a[u-2];break;case 23:De.tempCurrentNodeShape=De.currentNodeShape,De.currentNodeShape=De.currentPropertyNode;break;case 26:De.currentNodeShape=a[u];break;case 29:De.nodeShapeStack?(De.nodeShapeStack.push(De.currentNodeShape),Re(De.currentPropertyNode,De.factory.namedNode(me+"node"),De.currentNodeShape=Ee())):De.nodeShapeStack=[],this.$=De.currentNodeShape;break;case 30:De.nodeShapeStack.length>0&&(De.currentNodeShape=De.nodeShapeStack.pop());break;case 32:this.$=a[u].forEach((e=>{Re(De.currentNodeShape,De.factory.namedNode(me+"targetClass"),e)}));break;case 35:this.$=Re(De.currentNodeShape,De.factory.namedNode(me+a[u][0]),a[u][1]);break;case 36:break;case 37:const e=we([a[u-1],...a[u]].map((e=>{const t=Ee();return Re(t,De.factory.namedNode(me+e[0]),e[1]),t})));this.$=["or",e];break;case 39:case 46:this.$=function(e,t,r){const n=Ee();return Re(n,De.factory.namedNode(me+t),r),[e,n]}("not",...a[u]);break;case 40:case 50:this.$=[a[u-2],a[u]];break;case 43:this.$=a[u]&&Ie(...a[u]);break;case 44:this.$=Ie("or",we([a[u-1],...a[u]].map((e=>{const t=Ee();return Re(t,De.factory.namedNode(me+e[0]),e[1]),t}))));break;case 47:this.$=[_e[a[u].value]?"datatype":"class",a[u]];break;case 48:this.$=["nodeKind",De.factory.namedNode(me+a[u])];break;case 49:this.$=["node",De.factory.namedNode(a[u])];break;case 51:this.$=void 0;break;case 53:this.$=a[u]>0&&Ie("minCount",Oe(a[u],pe));break;case 54:this.$=Ie("maxCount",Oe(a[u],pe));break;case 56:this.$=Se(a[u].slice(1));break;case 57:this.$=Te(a[u]);break;case 59:Re(De.currentNodeShape,De.factory.namedNode(me+"property"),De.currentPropertyNode=Ee()),Ie("path",a[u]);break;case 62:const t=Ee();Re(t,De.factory.namedNode(me+"alternativePath"),we([a[u-1],...a[u]])),this.$=t;break;case 65:this.$=we([a[u-1],...a[u]]);break;case 67:Re(this.$=Ee(),De.factory.namedNode(me+a[u]),a[u-1]);break;case 69:Re(this.$=Ee(),De.factory.namedNode(me+"inversePath"),a[u]);break;case 71:this.$="zeroOrOnePath";break;case 72:this.$="zeroOrMorePath";break;case 73:this.$="oneOrMorePath";break;case 75:this.$=a[u-1];break;case 77:this.$=we(a[u-1]);break;case 80:this.$=De.factory.namedNode(Te(a[u]));break;case 81:this.$=De.factory.namedNode(Se(a[u]));break;case 82:this.$=Pe(De.factory.namedNode(ce));break;case 83:this.$=Oe(a[u]);break;case 84:this.$=(s=a[u-1],c=lowercase(a[u].substr(1)),De.factory.literal(s,c));break;case 85:this.$=Oe(a[u-2],a[u]);break;case 86:this.$=Oe(a[u],pe);break;case 87:this.$=Oe(a[u],fe);break;case 88:this.$=Oe(a[u].toLowerCase(),ye);break;case 89:this.$=Oe(a[u].toLowerCase(),ge);break;case 90:this.$=Ae(a[u],1);break;case 91:this.$=Ae(a[u],3);break;case 92:case 96:case 106:case 108:case 110:case 112:case 128:case 138:this.$=[];break;case 93:case 97:case 107:case 109:case 111:case 113:case 115:case 117:case 123:case 129:case 131:case 135:case 137:case 139:a[u-1].push(a[u]);break;case 114:case 116:case 122:case 130:case 134:case 136:this.$=[a[u]]}},table:[e(t,[2,92],{3:1,4:2}),{1:[3]},e(r,[2,96],{5:3,8:4,9:5,10:6,11:7,12:[1,8],14:[1,9],15:[1,10]}),e(n,[2,110],{6:11,124:12,54:13,19:14,24:15,20:[1,16],25:[1,17]}),e(t,[2,93]),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{13:[1,18]},{13:[1,19]},{16:[1,20]},{7:[1,21]},e(r,[2,97]),{7:[2,28],13:i,16:a,18:24,51:23,52:22,114:26,115:o,130:s},e(r,[2,94]),e(r,[2,95]),{13:i,16:a,17:30,18:31,114:26,115:o,130:s},{13:i,16:a,17:32,18:31,114:26,115:o,130:s},e(t,[2,5]),e(t,[2,6]),{13:[1,33]},{1:[2,1]},e(n,[2,111]),{13:i,16:a,18:36,29:34,30:35,114:26,115:o,130:s},e(c,[2,26]),e(u,[2,80]),e(u,[2,81]),e(u,[2,82]),e(u,[2,140]),e(u,[2,141]),e(l,[2,98],{21:37,60:38,61:[1,39]}),e([28,56,61],[2,8]),{26:40,27:41,28:d,56:[2,102]},e(t,[2,7]),{53:[1,43]},e(h,[2,104],{31:44,27:45,28:d}),{13:i,16:a,18:51,32:46,33:47,35:48,36:49,37:50,38:p,43:53,44:f,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},{22:69,27:70,28:d,56:[2,100]},e(l,[2,99]),{13:i,16:a,18:72,62:71,114:26,115:o,130:s},{23:73,55:74,56:O},{56:[2,103]},{13:i,16:a,18:36,29:76,30:35,114:26,115:o,130:s},e(n,[2,27]),e(h,[2,12]),e(h,[2,105]),e(E,[2,13]),e(x,[2,106],{34:77}),e(A,[2,15]),e(A,[2,16]),e(A,[2,17]),e(R,[2,78]),e(R,[2,79]),{13:i,16:a,18:36,29:78,30:35,114:26,115:o,130:s},e(I,[2,108],{39:79}),e(R,[2,83],{117:[1,80],118:[1,81]}),e(R,[2,86]),e(R,[2,87]),e(R,[2,88]),e(R,[2,89]),e(c,[2,20]),e(P,[2,90]),e(P,[2,91]),e(R,[2,142]),e(R,[2,143]),e(P,[2,144]),e(P,[2,145]),e(P,[2,146]),e(P,[2,147]),{23:82,55:74,56:O},{56:[2,101]},e(l,[2,32],{114:26,18:83,13:i,16:a,115:o,130:s}),e(N,[2,114]),e(r,[2,10]),e(D,[2,112],{59:84}),e(D,[2,29]),e(h,[2,11]),e(E,[2,14],{41:85,42:[1,86]}),{45:87,46:[1,88]},{13:i,16:a,18:51,33:90,35:48,36:49,37:50,38:p,40:[1,89],43:53,44:f,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},e(R,[2,84]),{13:i,16:a,18:91,114:26,115:o,130:s},e(r,[2,9]),e(N,[2,115]),{13:i,16:a,18:115,38:j,57:92,58:[1,94],63:93,64:95,68:102,69:98,70:100,72:104,73:105,74:107,77:97,78:99,87:C,96:M,97:101,99:103,103:106,105:109,106:113,108:110,109:L,114:26,115:o,125:96,126:k,130:s},e(x,[2,107]),{13:i,16:a,18:51,33:117,35:48,36:49,37:50,38:p,43:53,44:f,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},e(A,[2,22]),e(A,[2,21]),e(A,[2,18]),e(I,[2,109]),e(R,[2,85]),e(F,[2,31]),e(D,[2,113]),e(F,[2,30]),{47:120,48:[1,121],50:119,53:[2,120],65:118},e(B,[2,118],{70:100,68:102,72:104,73:105,74:107,69:122,87:C,96:M,126:k}),e(B,[2,119]),e(U,[2,116]),e(q,[2,128],{79:123}),e(U,[2,35]),e(q,[2,59]),e(U,[2,36],{71:124,66:125,67:V}),e(Q,[2,61],{100:127,98:128,67:$}),e(H,[2,38]),{72:130,74:107,87:C,126:k},e(G,[2,64],{104:131,101:132,102:z}),{75:[1,134]},e([13,16,56,85,87,95,115,126,128,129,130],[2,58]),e(K,[2,68]),{13:i,16:a,18:115,38:j,105:135,106:113,114:26,115:o,130:s},{75:[2,124]},{75:[2,125]},e(K,[2,66],{107:136,93:[1,138],110:[1,137],111:[1,139]}),e([13,16,38,115,130],[2,70]),e(X,[2,74]),{13:i,16:a,18:115,38:j,97:140,99:103,103:106,105:109,106:113,108:110,109:L,114:26,115:o,130:s},e(x,[2,19]),{53:[1,141]},{53:[2,121]},{13:i,16:a,18:36,29:142,30:35,114:26,115:o,130:s},e(c,[2,23]),e(U,[2,117]),e(B,[2,41],{114:26,55:74,127:143,88:144,82:145,81:147,84:148,73:149,18:150,86:152,23:154,94:155,13:i,16:a,44:[1,146],56:O,85:J,87:W,95:Y,96:M,115:o,128:Z,129:ee,130:s}),e(U,[2,37],{66:159,67:V}),e(H,[2,122]),{68:160,72:104,73:105,74:107,87:C,96:M,126:k},e(Q,[2,62],{98:161,67:$}),e(G,[2,134]),{13:i,16:a,18:115,38:j,99:162,103:106,105:109,106:113,108:110,109:L,114:26,115:o,130:s},e(H,[2,39]),e(G,[2,65],{101:163,102:z}),e(K,[2,136]),{13:i,16:a,18:115,38:j,103:164,105:109,106:113,108:110,109:L,114:26,115:o,130:s},{13:i,16:a,18:51,35:166,44:te,76:165,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},e(K,[2,69]),e(K,[2,67]),e(K,[2,71]),e(K,[2,72]),e(K,[2,73]),{40:[1,168]},e(D,[2,33]),{48:[1,170],49:169},e(q,[2,129]),e(q,[2,126]),e(q,[2,127]),{89:171,92:[1,172]},e(q,[2,43],{83:173,80:174,67:re}),e(ne,[2,45]),{13:i,16:a,18:150,23:154,55:74,56:O,84:176,85:J,86:152,87:W,94:155,95:Y,114:26,115:o,128:Z,129:ee,130:s},e(ne,[2,47]),e(ne,[2,48]),e(ne,[2,49]),{75:[1,177]},e(ne,[2,51]),e(ne,[2,56]),{13:[1,178]},e(ne,[2,132]),e(ne,[2,133]),e(H,[2,123]),e(H,[2,34]),e(G,[2,135]),e(G,[2,60]),e(K,[2,137]),e(K,[2,63]),e(H,[2,40]),e(ie,[2,76]),e(ae,[2,138],{112:179}),e(X,[2,75]),{53:[2,25]},{53:[2,24]},{90:[1,180]},{90:[2,53]},e(q,[2,44],{80:181,67:re}),e(ne,[2,130]),{13:i,16:a,18:150,23:154,55:74,56:O,73:149,81:182,84:148,85:J,86:152,87:W,94:155,95:Y,96:M,114:26,115:o,128:Z,129:ee,130:s},e(ne,[2,46]),{13:i,16:a,18:51,35:166,44:te,76:183,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},e(ne,[2,57]),{13:i,16:a,18:51,35:185,46:[1,184],92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},{91:186,92:[1,187],93:[1,188]},e(ne,[2,131]),e(ne,[2,42]),e(ne,[2,50]),e(ie,[2,77]),e(ae,[2,139]),{46:[1,189]},{46:[2,54]},{46:[2,55]},e(q,[2,52])],defaultActions:{21:[2,1],41:[2,103],70:[2,101],111:[2,124],112:[2,125],119:[2,121],169:[2,25],170:[2,24],172:[2,53],187:[2,54],188:[2,55]},parseError:function(e,t){if(!t.recoverable){var r=new Error(e);throw r.hash=t,r}this.trace(e)},parse:function(e){var t=this,r=[0],n=[null],i=[],a=this.table,o="",s=0,c=0,u=0,l=i.slice.call(arguments,1),d=Object.create(this.lexer),h={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(h.yy[p]=this.yy[p]);d.setInput(e,h.yy),h.yy.lexer=d,h.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;i.push(f);var y,g=d.options&&d.options.ranges;"function"==typeof h.yy.parseError?this.parseError=h.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,b,v,_,w,T,S,O,E,x={};;){if(v=r[r.length-1],this.defaultActions[v]?_=this.defaultActions[v]:(null==m&&(y=void 0,"number"!=typeof(y=d.lex()||1)&&(y=t.symbols_[y]||y),m=y),_=a[v]&&a[v][m]),void 0===_||!_.length||!_[0]){var A;for(T in E=[],a[v])this.terminals_[T]&&T>2&&E.push("'"+this.terminals_[T]+"'");A=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:f,expected:E})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+m);switch(_[0]){case 1:r.push(m),n.push(d.yytext),i.push(d.yylloc),r.push(_[1]),m=null,b?(m=b,b=null):(c=d.yyleng,o=d.yytext,s=d.yylineno,f=d.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[_[1]][1],x.$=n[n.length-S],x._$={first_line:i[i.length-(S||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(S||1)].first_column,last_column:i[i.length-1].last_column},g&&(x._$.range=[i[i.length-(S||1)].range[0],i[i.length-1].range[1]]),void 0!==(w=this.performAction.apply(x,[o,c,s,h.yy,_[1],n,i].concat(l))))return w;S&&(r=r.slice(0,-1*S*2),n=n.slice(0,-1*S),i=i.slice(0,-1*S)),r.push(this.productions_[_[1]][0]),n.push(x.$),i.push(x._$),O=a[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}};const se="http://www.w3.org/1999/02/22-rdf-syntax-ns#",ce=se+"type",ue=se+"first",le=se+"rest",de=se+"nil",he="http://www.w3.org/2001/XMLSchema#",pe=he+"integer",fe=he+"decimal",ye=he+"double",ge=he+"boolean",me="http://www.w3.org/ns/shacl#",be="http://www.w3.org/2002/07/owl#",ve="http://www.w3.org/2000/01/rdf-schema#",_e={[pe]:!0,[fe]:!0,[he+"float"]:!0,[ye]:!0,[he+"string"]:!0,[ge]:!0,[he+"dateTime"]:!0,[he+"nonPositiveInteger"]:!0,[he+"negativeInteger"]:!0,[he+"long"]:!0,[he+"int"]:!0,[he+"short"]:!0,[he+"byte"]:!0,[he+"nonNegativeInteger"]:!0,[he+"unsignedLong"]:!0,[he+"unsignedShort"]:!0,[he+"unsignedByte"]:!0,[he+"positiveInteger"]:!0,[se+"langString"]:!0};function we(e,t=!1){let r=0,n=e.length;if(t&&0===n)return De.factory.namedNode(de);const i=head=Ee();return 0===n&&Re(head,De.factory.namedNode(le),De.factory.namedNode(de)),e.forEach((e=>{if(void 0===e)throw new Error("b");Re(head,De.factory.namedNode(ue),e),Re(head,De.factory.namedNode(le),head=++r20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var r,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;at[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{flex:!0,"case-insensitive":!0},performAction:function(e,t,r,n){switch(r){case 0:break;case 1:return 12;case 2:return 14;case 3:return 15;case 4:return 25;case 5:return 20;case 6:return 131;case 7:return 132;case 8:return 85;case 9:return 126;case 10:return 87;case 11:return"PASS";case 12:return"COMMENT";case 13:return 13;case 14:return 16;case 15:return 130;case 16:return 129;case 17:return 128;case 18:return 117;case 19:return 92;case 20:return 119;case 21:return 120;case 22:return"EXPONENT";case 23:return 133;case 24:return 134;case 25:return 135;case 26:return 136;case 27:return 61;case 28:return 90;case 29:return 58;case 30:return 56;case 31:return 38;case 32:return 40;case 33:return 44;case 34:return 46;case 35:return 110;case 36:return 93;case 37:return 111;case 38:return 67;case 39:return 118;case 40:return 53;case 41:return 96;case 42:return 102;case 43:return 75;case 44:return 95;case 45:return 109;case 46:return 28;case 47:return 42;case 48:return 48;case 49:return 115;case 50:return 7;case 51:console.log(t.yytext)}},rules:[/^(?:\s+|#[^\n\r]*)/i,/^(?:BASE)/i,/^(?:IMPORTS)/i,/^(?:PREFIX)/i,/^(?:shapeClass)/i,/^(?:shape)/i,/^(?:true)/i,/^(?:false)/i,/^(?:(BlankNode|IRI|Literal|BlankNodeOrIRI|BlankNodeOrLiteral|IRIOrLiteral\b))/i,/^(?:(targetNode|targetObjectsOf|targetSubjectsOf\b))/i,/^(?:(deactivated|severity|message|class|datatype|nodeKind|minExclusive|minInclusive|maxExclusive|maxInclusive|minLength|maxLength|pattern|flags|languageIn|uniqueLang|equals|disjoint|lessThan|lessThanOrEquals|qualifiedValueShape|qualifiedMinCount|qualifiedMaxCount|qualifiedValueShapesDisjoint|closed|ignoredProperties|hasValue|in))/i,/^(?:([ \t\r\n]+))/i,/^(?:(#[\r\n]*))/i,/^(?:(<([^=<>\"\{\}\|\^`\\\u0000-\u0020]|(\\u([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])|\\U([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])))*>))/i,/^(?:((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.)*((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040]))?)?:))/i,/^(?:(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.)*((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040]))?)?:)(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|:|[0-9]|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))*(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%)))))?)))/i,/^(?:(@(([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.)*((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040]))?)?:))/i,/^(?:(@((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.)*((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040]))?)?:)(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|:|[0-9]|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))*(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%)))))?)))/i,/^(?:(@[a-zA-Z]+(-[a-zA-Z0-9]+)*))/i,/^(?:([+-]?[0-9]+))/i,/^(?:([+-]?[0-9]*\.[0-9]+))/i,/^(?:([+-]?([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.?[0-9]+([eE][+-]?[0-9]+))))/i,/^(?:([eE][+-]?[0-9]+))/i,/^(?:('(?:(?:[^\u0027\u005C\u000A\u000D])|(\\[tbnrf\\\"\']))*'))/i,/^(?:("(?:(?:[^\u0022\u005C\u000A\u000D])|(\\[tbnrf\\\"\']))*"))/i,/^(?:('''(?:(?:'|'')?(?:[^'\\]|(\\[tbnrf\\\"\'])))*'''))/i,/^(?:("""(?:(?:"|"")?(?:[^\"\\]|(\\[tbnrf\\\"\'])))*"""))/i,/^(?:->)/i,/^(?:\.\.)/i,/^(?:\})/i,/^(?:\{)/i,/^(?:\()/i,/^(?:\))/i,/^(?:\[)/i,/^(?:\])/i,/^(?:\?)/i,/^(?:\*)/i,/^(?:\+)/i,/^(?:\|)/i,/^(?:\^\^)/i,/^(?:\.)/i,/^(?:!)/i,/^(?:\/)/i,/^(?:=)/i,/^(?:@)/i,/^(?:\^)/i,/^(?:;)/i,/^(?:,)/i,/^(?:%)/i,/^(?:a)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};function De(){this.yy={}}return oe.lexer=Ne,De.prototype=oe,oe.Parser=De,new De}();e.exports=t},21762:(e,t,r)=>{const n=r(21925).Parser,i=r(72243);class a{constructor(){}parse(e,{extendedSyntax:t,baseIRI:r}={}){this._parser=new n,this._parser.Parser.factory=i.DataFactory,this._parser.Parser.base=i.DataFactory.namedNode(r||"urn:x-base:default"),this._parser.Parser.extended=!0===t,this._parser.Parser.prefixes={rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",sh:"http://www.w3.org/ns/shacl#",xsd:"http://www.w3.org/2001/XMLSchema#"},this._parser.Parser.currentNodeShape=void 0,this._parser.Parser.currentPropertyNode=void 0,this._parser.Parser.nodeShapeStack=[],this._parser.Parser.tempCurrentNodeShape=void 0,this._parser.Parser.n3Parser=new i.Parser({baseIRI:r||"urn:x-base:default"});const a=[];return this._parser.Parser.onQuad=e=>{a.push(e)},this._parser.parse(e),a.prefixes=this._parser.Parser.prefixes,a}}e.exports.Parser=a,e.exports.parse=function(e,t){return(new a).parse(e,t)}},23344:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=r(72243),o=r(37669),s=r(64817),c=r(98118),u=i(r(57756)),l=i(r(14791)),d=i(r(58007));function h(e){var t;return null===(t=/^[^]*[#/]/.exec(e))||void 0===t?void 0:t[0]}const p={"http://www.w3.org/1999/02/22-rdf-syntax-ns#":"rdf","http://www.w3.org/2000/01/rdf-schema#":"rdfs","http://www.w3.org/ns/shacl#":"sh","http://www.w3.org/2001/XMLSchema#":"xsd"},f={rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",sh:"http://www.w3.org/ns/shacl#",xsd:"http://www.w3.org/2001/XMLSchema#"};t.default=class{constructor(e,t,r={},n=void 0,i=!0,a=!1,o,s=!1){this.store=e,this.base=n,this.errorOnExtraQuads=i,this.mintUnspecifiedPrefixes=a,this.fetch=o,this.extendedSyntax=s,this.prefixes={},this.prefixRev={};for(const e of Object.keys(r)){const t=r[e],n="string"==typeof t?t:t.value;n in p||e in f||(this.prefixRev[n]=e,this.prefixes[e]=n)}this.writer=t}write(){return n(this,void 0,void 0,(function*(){const e=this.store.getQuads(null,"http://www.w3.org/1999/02/22-rdf-syntax-ns#type","http://www.w3.org/2002/07/owl#Ontology",null);if(1!==e.length||"NamedNode"!==e[0].subject.termType)throw new Error("Base expected");{const t=e[0].subject;this.store.removeQuads(e),t.equals(new a.NamedNode("urn:x-base:default"))||this.writer.add(`BASE ${(0,s.termToString)(t)}`),yield this.writeImports(t)}if(this.mintUnspecifiedPrefixes){const e=new Set;for(const t of[...this.store.getSubjects(null,null,null),...this.store.getPredicates(null,null,null),...this.store.getObjects(null,null,null)])if("NamedNode"===t.termType){const r=h(t.value);!r||r in this.prefixRev||r in p||e.add(r)}const t=Object.assign(Object.assign({},this.prefixes),f);yield Promise.all([...e].map((e=>(0,o.uriToPrefix)(e,{fetch:this.fetch,mintOnUnknown:!0,existingPrefixes:t}).then((r=>{this.prefixes[r]=e,t[r]=e,this.prefixRev[e]=r})))))}const t=new Set([...this.store.getSubjects(null,null,null),...this.store.getPredicates(null,null,null),...this.store.getObjects(null,null,null)].filter((e=>"NamedNode"===e.termType)).map((e=>h(e.value))).filter((e=>"string"==typeof e)));for(const e in this.prefixRev)t.has(e)||(delete this.prefixes[this.prefixRev[e]],delete this.prefixRev[e]);if(yield this.writePrefixes(),this.prefixes=Object.assign(Object.assign({},this.prefixes),f),this.prefixRev=Object.assign(Object.assign({},this.prefixRev),p),this.writer.newLine(),yield this.writeShapes(),this.extendedSyntax){const e=this.store.getSubjects(null,null,null);e.length>0&&this.writer.newLine(1);for(const t of e)this.writer.add(yield this.termToString(t,!0,!0)),this.writer.add(" "),this.writer.indent(),yield this.writeTurtlePredicates(t),this.writer.deindent();e.length>0&&(this.writer.add(" ."),this.writer.newLine())}if(this.errorOnExtraQuads&&this.store.size>0)throw new Error("Dataset contains quads that cannot be written in SHACLC");this.writer.end()}))}writeImports(e){return n(this,void 0,void 0,(function*(){const t=this.store.getObjectsOnce(e,new a.NamedNode("http://www.w3.org/2002/07/owl#imports"),null);if(t.length>0)for(const e of t)this.writer.add(`IMPORTS <${e.value}>`,!0)}))}writePrefixes(){return n(this,void 0,void 0,(function*(){const e=Object.keys(this.prefixes).filter((e=>!(e in l.default))).sort();if(e.length>0)for(const t of e)this.writer.add(`PREFIX ${t}: <${this.prefixes[t]}>`,!0)}))}termToString(e,t=!1,r=!1){return n(this,void 0,void 0,(function*(){try{if(t)throw new Error("Shacl name disabled");return(0,c.getShaclName)(e)}catch(e){}if("NamedNode"===e.termType){const t=h(e.value);return t&&t in this.prefixRev&&t in this.prefixRev?`${this.prefixRev[t]}:${e.value.slice(t.length)}`:(0,s.termToString)(e)}if("Literal"===e.termType)return"http://www.w3.org/2001/XMLSchema#integer"===e.datatypeString||"http://www.w3.org/2001/XMLSchema#boolean"===e.datatypeString?e.value:(0,s.termToString)(e);throw"BlankNode"===e.termType&&r&&(0,s.termToString)(e),new Error(`Invalid term type for extra statement ${e.value} (${e.termType})`)}))}writeShapes(){return n(this,void 0,void 0,(function*(){for(const e of this.store.getSubjectsOnce(new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new a.NamedNode("http://www.w3.org/ns/shacl#NodeShape"),null)){this.store.getQuadsOnce(e,new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new a.NamedNode("http://www.w3.org/2000/01/rdf-schema#Class"),null).length>0?this.writer.add("shapeClass "):this.writer.add("shape "),this.writer.add(yield this.termToString(e)),this.writer.add(" ");const t=this.store.getObjectsOnce(e,new a.NamedNode("http://www.w3.org/ns/shacl#targetClass"),null);if(t.length>0){this.writer.add("-> ");for(const e of t)"NamedNode"===e.termType?this.writer.add(yield this.termToString(e)):(this.writer.add("!"),this.writer.add(yield this.termToString(this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#not"),!0)))),this.writer.add(" ")}const r=this.store.getPredicates(e,null,null).filter((e=>[new a.NamedNode("http://www.w3.org/ns/shacl#targetClass"),new a.NamedNode("http://www.w3.org/ns/shacl#property"),new a.NamedNode("http://www.w3.org/ns/shacl#or"),...Object.keys(d.default).map((e=>new a.NamedNode("http://www.w3.org/ns/shacl#"+e)))].every((t=>!e.equals(t)))));r.length>0&&(this.writer.add(";"),this.writer.indent(),this.writer.newLine(1)),this.extendedSyntax&&(yield this.writeGivenTurtlePredicates(e,r)),r.length>0&&(this.writer.add(" "),this.writer.deindent()),yield this.writeShapeBody(e,!1)}}))}getSingleProperty(e,t){let r=[e];try{let n=(0,c.getShaclName)(e.predicate),i="pred";if("not"===n){const t=this.store.getQuadsOnce(e.object,null,null,null);if(r=r.concat(t),1!==t.length)throw new Error("Can only handle having one predicate of 'not'");[e]=t,n=(0,c.getShaclName)(e.predicate),i="not"}if(!(n in t))throw new Error(`${n} is not allowed`);return{name:n,type:i,object:e.object}}catch(e){this.store.addQuads(r)}}singleLayerPropertiesList(e,t){const r=[];for(const n of this.store.getQuadsOnce(e,null,null,null)){const e=this.getSingleProperty(n,t);e&&r.push(e)}return r}expectOneProperty(e,t){const r=this.store.getQuadsOnce(e,null,null,null);if(1===r.length){const e=this.getSingleProperty(r[0],t);if(e)return e}this.store.addQuads(r)}orProperties(e,t){const r=[];for(const n of this.store.getQuadsOnce(e,new a.NamedNode("http://www.w3.org/ns/shacl#or"),null,null)){const e=[];for(const r of this.getList(n.object)){const i=this.expectOneProperty(r,t);if(!i)throw this.store.addQuad(n),new Error("Each entry of the 'or' statement must declare exactly one property");e.push(i)}r.push(e)}return r}getList(e){let t=e;const r=[];for(;!t.equals(new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"));)r.push(this.singleObject(t,new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),!0)),t=this.singleObject(t,new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),!0);return r}writeIriLiteralOrArray(e){return n(this,void 0,void 0,(function*(){if("BlankNode"===e.termType){this.writer.add("[");let t=!0;for(const r of this.getList(e))t?t=!1:this.writer.add(" "),this.writer.add(yield this.termToString(r));this.writer.add("]")}else this.writer.add(yield this.termToString(e))}))}singleObject(e,t,r){var n;return null===(n=this.singleQuad(e,t,r))||void 0===n?void 0:n.object}singleQuad(e,t,r=!1){const n=this.store.getQuadsOnce(e,t,null,null);if(r&&1!==n.length)throw this.store.addQuads(n),new Error(`The subject and predicate ${null==e?void 0:e.value} ${null==t?void 0:t.value} must have exactly one object. Instead has ${n.length}`);if(n.length>1)throw this.store.addQuads(n),new Error(`The subject and predicate ${null==e?void 0:e.value} ${null==t?void 0:t.value} can have at most one object. Instead has ${n.length}`);return 1===n.length?n[0]:void 0}writeAssigment({name:e,type:t,object:r}){return n(this,void 0,void 0,(function*(){"not"===t&&this.writer.add("!"),this.writer.add(e),this.writer.add("="),yield this.writeIriLiteralOrArray(r)}))}writeAtom({name:e,type:t,object:r}){return n(this,void 0,void 0,(function*(){switch("not"===t&&this.writer.add("!"),e){case"node":if("NamedNode"===r.termType)this.writer.add(`@${yield this.termToString(r)}`);else{if("BlankNode"!==r.termType)throw new Error("Invalid nested shape, must be blank node or IRI");yield this.writeShapeBody(r)}return;case"nodeKind":return void this.writer.add((0,c.getShaclName)(r));case"class":case"datatype":return void this.writer.add(yield this.termToString(r));default:this.writer.add(e),this.writer.add("="),yield this.writeIriLiteralOrArray(r)}}))}writeAssigments(e,t=" ",r=!0,i){return n(this,void 0,void 0,(function*(){for(const n of e)r?r=!1:this.writer.add(t),i?yield this.writeAtom(n):yield this.writeAssigment(n)}))}writeParams(e,t=!0,r,i=!1,a=!1){return n(this,void 0,void 0,(function*(){const n=this.orProperties(e,r),o=this.singleLayerPropertiesList(e,r);a&&(n.length>0||o.length>0)&&this.writer.newLine(1);for(const e of n)t?t=!1:this.writer.add(" "),yield this.writeAssigments(e,"|",!0,i);yield this.writeAssigments(o," ",t,i),a&&(n.length>0||o.length>0)&&this.writer.add(" .")}))}writeShapeBody(e,t=!0){return n(this,void 0,void 0,(function*(){this.writer.add("{").indent();const r=this.store.getObjectsOnce(e,new a.NamedNode("http://www.w3.org/ns/shacl#property"),null);yield this.writeParams(e,!0,d.default,!1,!0);for(const e of r)this.writer.newLine(1),yield this.writeProperty(e);this.writer.deindent().newLine(1),t?this.writer.add("} ."):this.writer.add("}").newLine(1)}))}writeProperty(e){return n(this,void 0,void 0,(function*(){yield this.writePath(this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#path"),!0));const t=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#minCount")),r=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#maxCount")),n=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#nodeKind")),i=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#class")),o=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#datatype")),s=this.store.getObjectsOnce(e,new a.NamedNode("http://www.w3.org/ns/shacl#node"),null);if(n&&(this.writer.add(" "),this.writer.add((0,c.getShaclName)(n))),i&&(this.writer.add(" "),this.writer.add(yield this.termToString(i))),o&&(this.writer.add(" "),this.writer.add(yield this.termToString(o))),void 0!==t||void 0!==r){if(this.writer.add(" ["),t){if("Literal"!==t.termType||"http://www.w3.org/2001/XMLSchema#integer"!==t.datatypeString)throw new Error("Invalid min value, must me an integer literal");this.writer.add(t.value)}else this.writer.add("0");if(this.writer.add(".."),r){if("Literal"!==r.termType||"http://www.w3.org/2001/XMLSchema#integer"!==r.datatypeString)throw new Error("Invalid max value, must me an integer literal");this.store.removeMatches(e,new a.NamedNode("http://www.w3.org/ns/shacl#maxCount"),void 0,void 0),this.writer.add(r.value)}else this.writer.add("*");this.writer.add("]")}yield this.writeParams(e,!1,u.default,!0);const l=[];for(const e of s)if("NamedNode"===e.termType)this.writer.add(" "),this.writer.add(`@${yield this.termToString(e)}`);else{if("BlankNode"!==e.termType)throw new Error("Invalid nested shape, must be blank node or IRI");l.push(e)}for(const e of l)this.writer.add(" "),yield this.writeShapeBody(e);this.extendedSyntax&&this.store.getQuads(e,null,null,null).length>0&&(this.writer.add(" %"),this.writer.indent(),this.writer.newLine(1),yield this.writeTurtlePredicates(e),this.writer.deindent(),this.writer.newLine(1),this.writer.add("%")),0===l.length&&this.writer.add(" .")}))}writeTurtlePredicates(e){return n(this,void 0,void 0,(function*(){return this.writeGivenTurtlePredicates(e,this.store.getPredicates(e,null,null))}))}writeGivenTurtlePredicates(e,t){return n(this,void 0,void 0,(function*(){let r=!1;if(t.some((e=>e.equals(a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))))){const t=this.store.getObjectsOnce(e,a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),null);t.length>0&&(r=!0,this.writer.add("a "),yield this.writeTurtleObjects(t))}for(const n of t)n.equals(a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))||(r?(this.writer.add(" ;"),this.writer.newLine(1)):r=!0,this.writer.add(yield this.termToString(n,!0)),this.writer.add(" "),yield this.writeTurtleObjects(this.store.getObjectsOnce(e,n,null)))}))}writeTurtleObjects(e){return n(this,void 0,void 0,(function*(){const t=[],r=[];for(const n of e)"BlankNode"===n.termType&&0===[...this.store.match(null,null,n),...this.store.match(null,n,null)].length?t.push(n):r.push(n);this.writer.add((yield Promise.all(r.map((e=>this.termToString(e,!0,!0))))).join(", "));let n=r.length>0;if(t.length>0)for(const e of t)n?this.writer.add(", "):n=!0,(yield this.writeList(e))||(this.writer.add("["),this.writer.indent(),this.writer.newLine(1),yield this.writeTurtlePredicates(e),this.writer.deindent(),this.writer.newLine(1),this.writer.add("]"))}))}writeList(e){return n(this,void 0,void 0,(function*(){let t=e;const r=[],n=[];for(;!t.equals(a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"));){const e=this.store.getQuadsOnce(t,a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),null,null),i=this.store.getQuadsOnce(t,a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),null,null);if(n.push(...e,...i),1!==e.length||1!==i.length||0!==this.store.getQuads(t,null,null,null).length)return this.store.addQuads(n),!1;r.push(e[0].object),t=i[0].object}let i=!1;this.writer.add("(");for(const e of r)i?this.writer.add(" "):i=!0,yield this.writeTurtleObjects([e]);return this.writer.add(")"),!0}))}writePath(e,t=!1){return n(this,void 0,void 0,(function*(){if("NamedNode"===e.termType)this.writer.add(yield this.termToString(e));else{if("BlankNode"!==e.termType)throw new Error("Path should be named node or blank node");{const r=this.store.getQuadsOnce(e,null,null,null);if(1===r.length){const{predicate:n,object:i}=r[0];switch(n.value){case"http://www.w3.org/ns/shacl#inversePath":return this.writer.add("^"),void(yield this.writePath(i,!0));case"http://www.w3.org/ns/shacl#alternativePath":{const e=this.getList(i);if(0===e.length)throw new Error("Invalid Alternative Path - no options");if(1===e.length)yield this.writePath(e[0]);else{t&&this.writer.add("(");let r=!0;for(const t of e)r?r=!1:this.writer.add("|"),yield this.writePath(t,!0);t&&this.writer.add(")")}return}case"http://www.w3.org/ns/shacl#zeroOrMorePath":return yield this.writePath(i,!0),void this.writer.add("*");case"http://www.w3.org/ns/shacl#oneOrMorePath":return yield this.writePath(i,!0),void this.writer.add("+");case"http://www.w3.org/ns/shacl#zeroOrOnePath":return yield this.writePath(i,!0),void this.writer.add("?");default:throw new Error(`Invalid path type ${e.value}`)}}else{this.store.addQuads(r);const n=this.getList(e);if(0===n.length)throw new Error("Invalid Path");{t&&this.writer.add("(");let e=!0;for(const t of n)e?e=!1:this.writer.add("/"),yield this.writePath(t,!0);t&&this.writer.add(")")}}}}}))}}},14791:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={owl:"http://www.w3.org/2002/07/owl#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",sh:"http://www.w3.org/ns/shacl#",xsd:"http://www.w3.org/2001/XMLSchema#"}},22939:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.write=void 0;const a=r(72243),o=i(r(23344)),s=i(r(29908)),c=i(r(23187));t.write=function(e,t){return n(this,void 0,void 0,(function*(){return new Promise(((r,i)=>n(this,void 0,void 0,(function*(){try{let n="";const i=new c.default(e),u=i.getGraphs(null,null,null);if(u.length>1)throw new Error("More than one graph found - can serialize in the default graph");if(1===u.length&&!u[0].equals(a.DataFactory.defaultGraph()))throw new Error(`Expected all triples to be in the default graph, instead triples were in ${u[0].value}`);const l=new s.default({write:e=>{n+=e},end:()=>{let e=i.getQuads(null,null,null,null);0===e.length&&(e=void 0),r({text:n,extraQuads:e})}}),d=new o.default(i,l,null==t?void 0:t.prefixes,void 0,!1!==(null==t?void 0:t.errorOnUnused),null==t?void 0:t.mintPrefixes,null==t?void 0:t.fetch,null==t?void 0:t.extendedSyntax);yield d.write()}catch(e){i(e)}}))))}))}},58007:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={targetNode:!0,targetObjectsOf:!0,targetSubjectsOf:!0,deactivated:!0,severity:!0,message:!0,class:!0,datatype:!0,nodeKind:!0,minExclusive:!0,minInclusive:!0,maxExclusive:!0,maxInclusive:!0,minLength:!0,maxLength:!0,pattern:!0,flags:!0,languageIn:!0,equals:!0,disjoint:!0,closed:!0,ignoredProperties:!0,hasValue:!0,in:!0}},57756:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={deactivated:!0,severity:!0,message:!0,class:!0,datatype:!0,nodeKind:!0,minExclusive:!0,minInclusive:!0,maxExclusive:!0,maxInclusive:!0,minLength:!0,maxLength:!0,pattern:!0,flags:!0,languageIn:!0,uniqueLang:!0,equals:!0,disjoint:!0,lessThan:!0,lessThanOrEquals:!0,qualifiedValueShape:!0,qualifiedMinCount:!0,qualifiedMaxCount:!0,qualifiedValueShapesDisjoint:!0,closed:!0,ignoredProperties:!0,hasValue:!0,in:!0,node:!0}},98118:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShaclName=void 0,t.getShaclName=function(e){if("NamedNode"!==e.termType||!e.value.startsWith("http://www.w3.org/ns/shacl#"))throw new Error(`Term ${e.value} is not part of the SHACL namespace`);return e.value.slice(27)}},23187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(72243);class i extends n.Store{getQuadsOnce(e,t,r,n){const i=this.getQuads(e,t,r,n);return this.removeQuads(i),i}getSubjectsOnce(e,t,r){return this.getQuadsOnce(null,e,t,r).map((e=>e.subject))}getObjectsOnce(e,t,r){return this.getQuadsOnce(e,t,null,r).map((e=>e.object))}}t.default=i},29908:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e){this.indents=0,this.write=e.write,this.end=e.end}indent(){return this.indents+=1,this}deindent(){if(this.indents<1)throw new Error(`Trying to deindent when indent is only ${this.indents}`);return this.indents-=1,this}add(e,t=!1){return this.write(t?`\n${"\t".repeat(this.indents)}${e}`:e,"utf-8"),this}newLine(e=2){return this.write("\n".repeat(e)+"\t".repeat(this.indents),"utf-8"),this}}},88110:e=>{e.exports=function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function r(e,t){var r=e[0],n=e[1],i=e[2],a=e[3];n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&i|~n&a)+t[0]-680876936|0)<<7|r>>>25)+n|0)&n|~r&i)+t[1]-389564586|0)<<12|a>>>20)+r|0)&r|~a&n)+t[2]+606105819|0)<<17|i>>>15)+a|0)&a|~i&r)+t[3]-1044525330|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&i|~n&a)+t[4]-176418897|0)<<7|r>>>25)+n|0)&n|~r&i)+t[5]+1200080426|0)<<12|a>>>20)+r|0)&r|~a&n)+t[6]-1473231341|0)<<17|i>>>15)+a|0)&a|~i&r)+t[7]-45705983|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&i|~n&a)+t[8]+1770035416|0)<<7|r>>>25)+n|0)&n|~r&i)+t[9]-1958414417|0)<<12|a>>>20)+r|0)&r|~a&n)+t[10]-42063|0)<<17|i>>>15)+a|0)&a|~i&r)+t[11]-1990404162|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&i|~n&a)+t[12]+1804603682|0)<<7|r>>>25)+n|0)&n|~r&i)+t[13]-40341101|0)<<12|a>>>20)+r|0)&r|~a&n)+t[14]-1502002290|0)<<17|i>>>15)+a|0)&a|~i&r)+t[15]+1236535329|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&a|i&~a)+t[1]-165796510|0)<<5|r>>>27)+n|0)&i|n&~i)+t[6]-1069501632|0)<<9|a>>>23)+r|0)&n|r&~n)+t[11]+643717713|0)<<14|i>>>18)+a|0)&r|a&~r)+t[0]-373897302|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&a|i&~a)+t[5]-701558691|0)<<5|r>>>27)+n|0)&i|n&~i)+t[10]+38016083|0)<<9|a>>>23)+r|0)&n|r&~n)+t[15]-660478335|0)<<14|i>>>18)+a|0)&r|a&~r)+t[4]-405537848|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&a|i&~a)+t[9]+568446438|0)<<5|r>>>27)+n|0)&i|n&~i)+t[14]-1019803690|0)<<9|a>>>23)+r|0)&n|r&~n)+t[3]-187363961|0)<<14|i>>>18)+a|0)&r|a&~r)+t[8]+1163531501|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&a|i&~a)+t[13]-1444681467|0)<<5|r>>>27)+n|0)&i|n&~i)+t[2]-51403784|0)<<9|a>>>23)+r|0)&n|r&~n)+t[7]+1735328473|0)<<14|i>>>18)+a|0)&r|a&~r)+t[12]-1926607734|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n^i^a)+t[5]-378558|0)<<4|r>>>28)+n|0)^n^i)+t[8]-2022574463|0)<<11|a>>>21)+r|0)^r^n)+t[11]+1839030562|0)<<16|i>>>16)+a|0)^a^r)+t[14]-35309556|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n^i^a)+t[1]-1530992060|0)<<4|r>>>28)+n|0)^n^i)+t[4]+1272893353|0)<<11|a>>>21)+r|0)^r^n)+t[7]-155497632|0)<<16|i>>>16)+a|0)^a^r)+t[10]-1094730640|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n^i^a)+t[13]+681279174|0)<<4|r>>>28)+n|0)^n^i)+t[0]-358537222|0)<<11|a>>>21)+r|0)^r^n)+t[3]-722521979|0)<<16|i>>>16)+a|0)^a^r)+t[6]+76029189|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n^i^a)+t[9]-640364487|0)<<4|r>>>28)+n|0)^n^i)+t[12]-421815835|0)<<11|a>>>21)+r|0)^r^n)+t[15]+530742520|0)<<16|i>>>16)+a|0)^a^r)+t[2]-995338651|0)<<23|n>>>9)+i|0,n=((n+=((a=((a+=(n^((r=((r+=(i^(n|~a))+t[0]-198630844|0)<<6|r>>>26)+n|0)|~i))+t[7]+1126891415|0)<<10|a>>>22)+r|0)^((i=((i+=(r^(a|~n))+t[14]-1416354905|0)<<15|i>>>17)+a|0)|~r))+t[5]-57434055|0)<<21|n>>>11)+i|0,n=((n+=((a=((a+=(n^((r=((r+=(i^(n|~a))+t[12]+1700485571|0)<<6|r>>>26)+n|0)|~i))+t[3]-1894986606|0)<<10|a>>>22)+r|0)^((i=((i+=(r^(a|~n))+t[10]-1051523|0)<<15|i>>>17)+a|0)|~r))+t[1]-2054922799|0)<<21|n>>>11)+i|0,n=((n+=((a=((a+=(n^((r=((r+=(i^(n|~a))+t[8]+1873313359|0)<<6|r>>>26)+n|0)|~i))+t[15]-30611744|0)<<10|a>>>22)+r|0)^((i=((i+=(r^(a|~n))+t[6]-1560198380|0)<<15|i>>>17)+a|0)|~r))+t[13]+1309151649|0)<<21|n>>>11)+i|0,n=((n+=((a=((a+=(n^((r=((r+=(i^(n|~a))+t[4]-145523070|0)<<6|r>>>26)+n|0)|~i))+t[11]-1120210379|0)<<10|a>>>22)+r|0)^((i=((i+=(r^(a|~n))+t[2]+718787259|0)<<15|i>>>17)+a|0)|~r))+t[9]-343485551|0)<<21|n>>>11)+i|0,e[0]=r+e[0]|0,e[1]=n+e[1]|0,e[2]=i+e[2]|0,e[3]=a+e[3]|0}function n(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}function i(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return r}function a(e){var t,i,a,o,s,c,u=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)r(l,n(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t>2]|=e.charCodeAt(t)<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(r(l,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,r(l,a),l}function o(e){var r,n="";for(r=0;r<4;r+=1)n+=t[e>>8*r+4&15]+t[e>>8*r&15];return n}function s(e){var t;for(t=0;tu?new ArrayBuffer(0):(n=u-c,i=new ArrayBuffer(n),a=new Uint8Array(i),o=new Uint8Array(this,c,n),a.set(o),i)}}(),l.prototype.append=function(e){return this.appendBinary(c(e)),this},l.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)r(this._hash,n(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},l.prototype.end=function(e){var t,r,n=this._buff,i=n.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t>2]|=n.charCodeAt(t)<<(t%4<<3);return this._finish(a,i),r=s(this._hash),e&&(r=u(r)),this.reset(),r},l.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},l.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},l.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},l.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},l.prototype._finish=function(e,t){var n,i,a,o=t;if(e[o>>2]|=128<<(o%4<<3),o>55)for(r(this._hash,e),o=0;o<16;o+=1)e[o]=0;n=(n=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(n[2],16),a=parseInt(n[1],16)||0,e[14]=i,e[15]=a,r(this._hash,e)},l.hash=function(e,t){return l.hashBinary(c(e),t)},l.hashBinary=function(e,t){var r=s(a(e));return t?u(r):r},l.ArrayBuffer=function(){this.reset()},l.ArrayBuffer.prototype.append=function(e){var t,n,a,o,s,c=(n=this._buff.buffer,a=e,o=!0,(s=new Uint8Array(n.byteLength+a.byteLength)).set(new Uint8Array(n)),s.set(new Uint8Array(a),n.byteLength),o?s:s.buffer),u=c.length;for(this._length+=e.byteLength,t=64;t<=u;t+=64)r(this._hash,i(c.subarray(t-64,t)));return this._buff=t-64>2]|=n[t]<<(t%4<<3);return this._finish(a,i),r=s(this._hash),e&&(r=u(r)),this.reset(),r},l.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},l.ArrayBuffer.prototype.getState=function(){var e,t=l.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},l.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var r,n=e.length,i=new ArrayBuffer(n),a=new Uint8Array(i);for(r=0;r>2]|=e[t]<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(r(l,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,r(l,a),l}(new Uint8Array(e)));return t?u(n):n},l}()},31578:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.toSparqlJs=t.toSparql=t.Factory=t.Algebra=t.translate=void 0;const s=o(r(71029));t.translate=s.default;const c=a(r(47914));t.Algebra=c;const u=o(r(376));t.Factory=u.default;const l=r(24693);Object.defineProperty(t,"toSparql",{enumerable:!0,get:function(){return l.toSparql}}),Object.defineProperty(t,"toSparqlJs",{enumerable:!0,get:function(){return l.toSparqlJs}});const d=o(r(83152));t.Util=d.default},47914:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.expressionTypes=t.types=void 0,(n=t.types||(t.types={})).ALT="alt",n.ASK="ask",n.BGP="bgp",n.CONSTRUCT="construct",n.DESCRIBE="describe",n.DISTINCT="distinct",n.EXPRESSION="expression",n.EXTEND="extend",n.FILTER="filter",n.FROM="from",n.GRAPH="graph",n.GROUP="group",n.INV="inv",n.JOIN="join",n.LEFT_JOIN="leftjoin",n.LINK="link",n.MINUS="minus",n.NOP="nop",n.NPS="nps",n.ONE_OR_MORE_PATH="OneOrMorePath",n.ORDER_BY="orderby",n.PATH="path",n.PATTERN="pattern",n.PROJECT="project",n.REDUCED="reduced",n.SEQ="seq",n.SERVICE="service",n.SLICE="slice",n.UNION="union",n.VALUES="values",n.ZERO_OR_MORE_PATH="ZeroOrMorePath",n.ZERO_OR_ONE_PATH="ZeroOrOnePath",n.COMPOSITE_UPDATE="compositeupdate",n.DELETE_INSERT="deleteinsert",n.LOAD="load",n.CLEAR="clear",n.CREATE="create",n.DROP="drop",n.ADD="add",n.MOVE="move",n.COPY="copy",(r=t.expressionTypes||(t.expressionTypes={})).AGGREGATE="aggregate",r.EXISTENCE="existence",r.NAMED="named",r.OPERATOR="operator",r.TERM="term",r.WILDCARD="wildcard"},376:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const o=a(r(47914)),s=r(18050),c=r(22112),u=r(55403);t.default=class{constructor(e){this.dataFactory=e||new s.DataFactory,this.stringType=this.createTerm("http://www.w3.org/2001/XMLSchema#string")}createAlt(e,t=!0){return this.flattenMulti({type:o.types.ALT,input:e},t)}createAsk(e){return{type:o.types.ASK,input:e}}createBoundAggregate(e,t,r,n,i){const a=this.createAggregateExpression(t,r,n,i);return a.variable=e,a}createBgp(e){return{type:o.types.BGP,patterns:e}}createConstruct(e,t){return{type:o.types.CONSTRUCT,input:e,template:t}}createDescribe(e,t){return{type:o.types.DESCRIBE,input:e,terms:t}}createDistinct(e){return{type:o.types.DISTINCT,input:e}}createExtend(e,t,r){return{type:o.types.EXTEND,input:e,variable:t,expression:r}}createFrom(e,t,r){return{type:o.types.FROM,input:e,default:t,named:r}}createFilter(e,t){return{type:o.types.FILTER,input:e,expression:t}}createGraph(e,t){return{type:o.types.GRAPH,input:e,name:t}}createGroup(e,t,r){return{type:o.types.GROUP,input:e,variables:t,aggregates:r}}createInv(e){return{type:o.types.INV,path:e}}createJoin(e,t=!0){return this.flattenMulti({type:o.types.JOIN,input:e},t)}createLeftJoin(e,t,r){return r?{type:o.types.LEFT_JOIN,input:[e,t],expression:r}:{type:o.types.LEFT_JOIN,input:[e,t]}}createLink(e){return{type:o.types.LINK,iri:e}}createMinus(e,t){return{type:o.types.MINUS,input:[e,t]}}createNop(){return{type:o.types.NOP}}createNps(e){return{type:o.types.NPS,iris:e}}createOneOrMorePath(e){return{type:o.types.ONE_OR_MORE_PATH,path:e}}createOrderBy(e,t){return{type:o.types.ORDER_BY,input:e,expressions:t}}createPath(e,t,r,n){return n?{type:o.types.PATH,subject:e,predicate:t,object:r,graph:n}:{type:o.types.PATH,subject:e,predicate:t,object:r,graph:this.dataFactory.defaultGraph()}}createPattern(e,t,r,n){const i=this.dataFactory.quad(e,t,r,n);return i.type=o.types.PATTERN,i}createProject(e,t){return{type:o.types.PROJECT,input:e,variables:t}}createReduced(e){return{type:o.types.REDUCED,input:e}}createSeq(e,t=!0){return this.flattenMulti({type:o.types.SEQ,input:e},t)}createService(e,t,r){return{type:o.types.SERVICE,input:e,name:t,silent:Boolean(r)}}createSlice(e,t,r){return t=t||0,void 0!==r?{type:o.types.SLICE,input:e,start:t,length:r}:{type:o.types.SLICE,input:e,start:t}}createUnion(e,t=!0){return this.flattenMulti({type:o.types.UNION,input:e},t)}createValues(e,t){return{type:o.types.VALUES,variables:e,bindings:t}}createZeroOrMorePath(e){return{type:o.types.ZERO_OR_MORE_PATH,path:e}}createZeroOrOnePath(e){return{type:o.types.ZERO_OR_ONE_PATH,path:e}}createAggregateExpression(e,t,r,n){return n?{type:o.types.EXPRESSION,expressionType:o.expressionTypes.AGGREGATE,aggregator:e,expression:t,separator:n,distinct:r}:{type:o.types.EXPRESSION,expressionType:o.expressionTypes.AGGREGATE,aggregator:e,expression:t,distinct:r}}createExistenceExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.EXISTENCE,not:e,input:t}}createNamedExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.NAMED,name:e,args:t}}createOperatorExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.OPERATOR,operator:e,args:t}}createTermExpression(e){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.TERM,term:e}}createWildcardExpression(){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.WILDCARD,wildcard:new u.Wildcard}}createTerm(e){return(0,c.stringToTerm)(e,this.dataFactory)}createCompositeUpdate(e){return{type:o.types.COMPOSITE_UPDATE,updates:e}}createDeleteInsert(e,t,r){const n={type:o.types.DELETE_INSERT};return e&&(n.delete=e),t&&(n.insert=t),r&&(n.where=r),n}createLoad(e,t,r){const n={type:o.types.LOAD,source:e};return t&&(n.destination=t),this.addSilent(n,Boolean(r))}createClear(e,t){return this.addSilent({type:o.types.CLEAR,source:e},Boolean(t))}createCreate(e,t){return this.addSilent({type:o.types.CREATE,source:e},Boolean(t))}createDrop(e,t){return this.addSilent({type:o.types.DROP,source:e},Boolean(t))}createAdd(e,t,r){return this.addSilent({type:o.types.ADD,source:e,destination:t},Boolean(r))}createMove(e,t,r){return this.addSilent({type:o.types.MOVE,source:e,destination:t},Boolean(r))}createCopy(e,t,r){return this.addSilent({type:o.types.COPY,source:e,destination:t},Boolean(r))}addSilent(e,t){return t&&(e.silent=t),e}flattenMulti(e,t){if(!t)return e;const r=e.type,n=e.input;let i=[];for(const e of n)e.type===r?i.push(...e.input):i.push(e);return e.input=i,e}}},24693:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.toSparqlJs=t.toSparql=void 0;const s=r(91032),c=r(22112),u=r(55403),l=a(r(47914)),d=o(r(376)),h=o(r(83152)),p=l.types,f=l.expressionTypes;let y;const g=new d.default;function m(e){b();let t=v(e=function(e){return D(e,[])}(e));return"group"===t.type?t.patterns[0]:t}function b(){y={project:!1,extend:[],group:[],aggregates:[],order:[]}}function v(e){switch(e.type!==p.EXTEND&&e.type!==p.ORDER_BY&&e.type!==p.GRAPH&&(y.project=!1),e.type){case p.EXPRESSION:return _(e);case p.ASK:return A(e,p.ASK);case p.BGP:return function(e){let t=e.patterns.map(E);return 0===t.length?null:{type:"bgp",triples:t}}(e);case p.CONSTRUCT:return function(e){return{type:"query",prefixes:{},queryType:"CONSTRUCT",template:e.template.map(E),where:h.default.flatten([v(e.input)])}}(e);case p.DESCRIBE:return A(e,p.DESCRIBE);case p.DISTINCT:return function(e){let t=v(e.input);return t.patterns[0].distinct=!0,t}(e);case p.EXTEND:return function(e){return y.project?(y.extend.push(e),v(e.input)):h.default.flatten([v(e.input),{type:"bind",variable:e.variable,expression:_(e.expression)}])}(e);case p.FROM:return function(e){const t=v(e.input);let r=t;return"group"===t.type&&(r=t.patterns[0]),r.from={default:e.default,named:e.named},t}(e);case p.FILTER:return function(e){return{type:"group",patterns:h.default.flatten([v(e.input),{type:"filter",expression:_(e.expression)}])}}(e);case p.GRAPH:return function(e){return{type:"graph",patterns:h.default.flatten([v(e.input)]),name:e.name}}(e);case p.GROUP:return function(e){const t=v(e.input),r=e.aggregates.map(O);return y.aggregates.push(...r),y.group.push(...e.variables),t}(e);case p.JOIN:return function(e){return h.default.flatten(e.input.map(v)).reduce(((e,t)=>("bgp"!==t.type||0==e.length||"bgp"!==e[e.length-1].type?e.push(t):e[e.length-1].triples.push(...t.triples),e)),[])}(e);case p.LEFT_JOIN:return function(e){const t={type:"optional",patterns:[v(e.input[1])]};return e.expression&&t.patterns.push({type:"filter",expression:_(e.expression)}),t.patterns=h.default.flatten(t.patterns),h.default.flatten([v(e.input[0]),t])}(e);case p.MINUS:return function(e){let t=v(e.input[1]);return"group"===t.type&&(t=t.patterns),Array.isArray(t)||(t=[t]),h.default.flatten([v(e.input[0]),{type:"minus",patterns:t}])}(e);case p.NOP:return{};case p.ORDER_BY:return function(e){return y.order.push(...e.expressions),v(e.input)}(e);case p.PATH:return function(e){return{type:"bgp",triples:[{subject:e.subject,predicate:w(e.predicate),object:e.object}]}}(e);case p.PATTERN:return E(e);case p.PROJECT:return A(e,p.PROJECT);case p.REDUCED:return function(e){let t=v(e.input);return t.patterns[0].reduced=!0,t}(e);case p.SERVICE:return function(e){let t=v(e.input);return"group"===t.type&&(t=t.patterns),Array.isArray(t)||(t=[t]),{type:"service",name:e.name,silent:e.silent,patterns:t}}(e);case p.SLICE:return function(e){let t=v(e.input),r=t;return t.type&&"group"===t.type&&(r=t.patterns[0]),0!==e.start&&(r.offset=e.start),void 0!==e.length&&(r.limit=e.length),t}(e);case p.UNION:return function(e){return{type:"union",patterns:e.input.map(v).map(S)}}(e);case p.VALUES:return function(e){return{type:"values",values:e.bindings.map((t=>{let r={};for(let n of e.variables){let e=`?${n.value}`;t[e]?r[e]=t[e]:r[e]=void 0}return r}))}}(e);case p.COMPOSITE_UPDATE:return function(e){return{prefixes:{},type:"update",updates:e.updates.map((e=>v(e).updates[0]))}}(e);case p.DELETE_INSERT:return function(e){var t;let r,n=e.where;if(n&&n.type===p.FROM){let e=n;n=e.input,r={default:e.default,named:e.named}}const i=[{updateType:"insertdelete",delete:N(e.delete||[]),insert:N(e.insert||[])}];if(r&&(i[0].using=r),!n||n.type===p.BGP&&0===n.patterns.length)i[0].where=[];else{const e=[];let r=v(D(n,e));if("group"===r.type?i[0].where=r.patterns:i[0].where=[r],e.length>0){if(1!==e.length)throw new Error("This is unexpected and might indicate an error in graph handling for updates.");""!==(null===(t=e[0])||void 0===t?void 0:t.value)&&(i[0].where=[{type:"graph",patterns:i[0].where,name:e[0]}])}}return e.delete||e.where?e.insert||e.where?!e.insert&&e.where&&"bgp"===e.where.type&&(0,s.isomorphic)(e.delete,e.where.patterns)&&(delete i[0].where,i[0].updateType="deletewhere"):(delete i[0].insert,delete i[0].where,e.delete.some((e=>"Variable"===e.subject.termType||"Variable"===e.predicate.termType||"Variable"===e.object.termType))?i[0].updateType="deletewhere":i[0].updateType="delete"):(i[0].updateType="insert",delete i[0].delete,delete i[0].where),{prefixes:{},type:"update",updates:i}}(e);case p.LOAD:return function(e){const t=[{type:"load",silent:Boolean(e.silent),source:e.source}];return e.destination&&(t[0].destination=e.destination),{prefixes:{},type:"update",updates:t}}(e);case p.CLEAR:return function(e){return I(e,"clear")}(e);case p.CREATE:return function(e){return I(e,"create")}(e);case p.DROP:return function(e){return I(e,"drop")}(e);case p.ADD:return function(e){return P(e,"add")}(e);case p.MOVE:return function(e){return P(e,"move")}(e);case p.COPY:return function(e){return P(e,"copy")}(e)}throw new Error(`Unknown Operation type ${e.type}`)}function _(e){switch(e.expressionType){case f.AGGREGATE:return function(e){const t={expression:_(e.expression),type:"aggregate",aggregation:e.aggregator,distinct:e.distinct};return e.separator&&(t.separator=e.separator),t}(e);case f.EXISTENCE:return function(e){return{type:"operation",operator:e.not?"notexists":"exists",args:h.default.flatten([v(e.input)])}}(e);case f.NAMED:return function(e){return{type:"functionCall",function:e.name,args:e.args.map(_)}}(e);case f.OPERATOR:return function(e){if("desc"===e.operator){return{expression:_(e.args[0]),descending:!0}}const t={type:"operation",operator:e.operator,args:e.args.map(_)};return"in"!==t.operator&&"notin"!==t.operator||(t.args=[t.args[0]].concat([t.args.slice(1)])),t}(e);case f.TERM:return function(e){return e.term}(e);case f.WILDCARD:return function(e){return e.wildcard}(e)}throw new Error(`Unknown Expression Operation type ${e.expressionType}`)}function w(e){switch(e.type){case p.ALT:return function(e){const t=e.input.map(w);return t.every((e=>"pathType"in e&&"!"===e.pathType))?{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:h.default.flatten(t.map((e=>e.items)))}]}:{type:"path",pathType:"|",items:t}}(e);case p.INV:return function(e){if(e.path.type===p.NPS){const t=e.path.iris.map((e=>({type:"path",pathType:"^",items:[e]})));return t.length<=1?{type:"path",pathType:"!",items:t}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:t}]}}return{type:"path",pathType:"^",items:[w(e.path)]}}(e);case p.LINK:return function(e){return e.iri}(e);case p.NPS:return function(e){return e.iris.length<=1?{type:"path",pathType:"!",items:e.iris}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:e.iris}]}}(e);case p.ONE_OR_MORE_PATH:return function(e){return{type:"path",pathType:"+",items:[w(e.path)]}}(e);case p.SEQ:return function(e){return{type:"path",pathType:"/",items:e.input.map(w)}}(e);case p.ZERO_OR_MORE_PATH:return function(e){return{type:"path",pathType:"*",items:[w(e.path)]}}(e);case p.ZERO_OR_ONE_PATH:return function(e){return{type:"path",pathType:"?",items:[w(e.path)]}}(e)}throw new Error(`Unknown Path type ${e.type}`)}function T(e){return(0,c.termToString)(e)}function S(e){return Array.isArray(e)?1===e.length?e[0]:{type:"group",patterns:e}:e}function O(e){return e}function E(e){return{subject:e.subject,predicate:e.predicate,object:e.object}}function x(e,t){let r=h.default.isSimpleTerm(e)?T(e):e;if("string"==typeof r){if(t[r])return t[r]}else if(Array.isArray(e))e=e.map((e=>x(e,t)));else for(let r of Object.keys(e))e[r]=x(e[r],t);return e}function A(e,t){const r={type:"query",prefixes:{}},n=r;let i;t===p.PROJECT?(r.queryType="SELECT",i=e.variables):t===p.ASK?r.queryType="ASK":t===p.DESCRIBE&&(r.queryType="DESCRIBE",i=e.terms);const a=y.extend,o=y.group,s=y.aggregates,c=y.order;b(),y.project=!0;let l=h.default.flatten([v(e.input)]);1===l.length&&"group"===l[0].type&&(l=l[0].patterns),r.where=l;let d={};for(let e of y.aggregates)d[T(e.variable)]=_(e);let f={};for(let e=y.extend.length-1;e>=0;--e){let t=y.extend[e];f[T(t.variable)]=x(_(t.expression),d)}if(y.group.length>0&&(n.group=y.group.map((e=>{let t=T(e);if(f[t]){let r=f[t];return delete f[t],{variable:e,expression:r}}return{expression:e}}))),y.order.length>0&&(n.order=y.order.map(v).map((e=>e.descending?e:{expression:e}))),i&&(n.variables=i.map((e=>{let t=T(e);return f[t]?{variable:e,expression:f[t]}:e})),0===n.variables.length&&(n.variables=[new u.Wildcard])),r.where.length>0&&"filter"===r.where[r.where.length-1].type){const e=r.where[r.where.length-1];R(e,Object.keys(d))&&(n.having=h.default.flatten([x(e.expression,d)]),r.where.splice(-1))}return y.extend=a,y.group=o,y.aggregates=s,y.order=c,{type:"group",patterns:[n]}}function R(e,t){return h.default.isSimpleTerm(e)?t.indexOf(T(e))>=0:Array.isArray(e)?e.some((e=>R(e,t))):e===Object(e)?Object.keys(e).some((r=>R(e[r],t))):t.indexOf(e)>=0}function I(e,t){const r=[{type:t,silent:Boolean(e.silent)}];return"DEFAULT"===e.source?r[0].graph={default:!0}:"NAMED"===e.source?r[0].graph={named:!0}:"ALL"===e.source?r[0].graph={all:!0}:r[0].graph={type:"graph",name:e.source},{prefixes:{},type:"update",updates:r}}function P(e,t){const r=[{type:t,silent:Boolean(e.silent)}];return r[0].source="DEFAULT"===e.source?{type:"graph",default:!0}:{type:"graph",name:e.source},r[0].destination="DEFAULT"===e.destination?{type:"graph",default:!0}:{type:"graph",name:e.destination},{prefixes:{},type:"update",updates:r}}function N(e){if(!e)return[];const t={};return e.forEach((e=>{const r=e.graph.value;t[r]||(t[r]=[]),t[r].push(e)})),Object.keys(t).map((e=>""===e?{type:"bgp",triples:t[e].map(E)}:{type:"graph",triples:t[e].map(E),name:t[e][0].graph}))}function D(e,t){if(Array.isArray(e))return e.map((e=>D(e,t)));if(!e.type)return e;if(e.type===p.DELETE_INSERT)return e;if((e.type===p.PATTERN||e.type===p.PATH)&&e.graph)return t.push(e.graph),""!==e.graph.name?e.type===p.PATTERN?g.createPattern(e.subject,e.predicate,e.object):g.createPath(e.subject,e.predicate,e.object):e;const r={},n={},i={};for(let t of Object.keys(e)){const a=[];if(r[t]=D(e[t],a),a.length>0){n[t]=a;for(const e of a)i[e.value]=e}}const a=Object.keys(i);if(a.length>0)if(1!==a.length||[p.PROJECT,p.SERVICE].includes(e.type)){if(e.type===p.BGP)return function(e,t){var r;const n={};for(let i=0;i""===n[e][0].value?t:g.createGraph(t,n[e][r]))):""!==n[e][0].value&&(r[e]=g.createGraph(t,n[e][0]))}}else t.push(i[a[0]]);return r}t.toSparql=function(e,t={}){return new u.Generator(t).stringify(m(e))},t.toSparqlJs=m},71029:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(53933),c=r(22112),u=a(r(47914)),l=o(r(376)),d=o(r(83152)),h=r(55403).Parser,p=u.types;let f,y=new Set,g=0,m=!1;function b(e,t,r){if(y=new Set,g=0,m=Boolean(t),!e.type)return f.createNop();if("query"!==e.type&&"update"!==e.type)throw new Error("Translate only works on complete query or update objects.");let n;var i;return w(e),"query"===e.type?(n=S({type:"group",patterns:e.where||[]}),n=function(e,t){const r=e,n=[],i={};if(r.variables=r.variables&&r.variables.map((e=>C(e,i))),r.having=r.having&&r.having.map((e=>C(e,i))),r.order=r.order&&r.order.map((e=>C(e,i))),r.group||Object.keys(i).length>0){const e=Object.keys(i).map((e=>function(e,t){if("aggregate"!==e.type||!e.aggregation)throw new Error(`Unexpected input: ${JSON.stringify(e)}`);const r=O(e);return r.variable=t,r}(i[e],f.createTerm(e)))),n=[];if(r.group)for(const e of r.group)if(d.default.isSimpleTerm(e.expression))n.push(e.expression);else{const r="variable"in e?e.variable:A();t=f.createExtend(t,r,O(e.expression)),n.push(r)}t=f.createGroup(t,n,e)}if(r.having)for(let e of r.having)t=f.createFilter(t,O(e));e.values&&(t=f.createJoin([t,j(e)]));let a=[];if("SELECT"===e.queryType||"DESCRIBE"===e.queryType)if(e.variables.some((e=>e&&d.default.isWildcard(e))))a=Object.values(T(e)).sort(((e,t)=>e.value.localeCompare(t.value)));else for(let t of e.variables)_(t)||!("variable"in t)?a.push(t):t.variable&&(a.push(t.variable),n.push(t));for(let e of n)t=f.createExtend(t,e.variable,O(e.expression));return r.order&&(t=f.createOrderBy(t,r.order.map((e=>{let t=O(e.expression);return e.descending&&(t=f.createOperatorExpression("desc",[t])),t})))),"SELECT"===e.queryType&&(t=f.createProject(t,a)),r.distinct&&(t=f.createDistinct(t)),r.reduced&&(t=f.createReduced(t)),"CONSTRUCT"===e.queryType?t=f.createConstruct(t,(e.template||[]).map(R)):"ASK"===e.queryType?t=f.createAsk(t):"DESCRIBE"===e.queryType&&(t=f.createDescribe(t,a)),(r.offset||r.limit)&&(t=f.createSlice(t,r.offset||0,r.limit)),r.from&&(t=f.createFrom(t,r.from.default,r.from.named)),t}(e,n)):"update"===e.type&&(n=1===(i=e).updates.length?M(i.updates[0]):f.createCompositeUpdate(i.updates.map(M))),r&&(n=k(n)),n}function v(e){return Boolean(null==e?void 0:e.termType)}function _(e){return"Variable"===(null==e?void 0:e.termType)}function w(e){if(v(e))_(e)&&y.add(`?${e.value}`);else if(Array.isArray(e))for(const t of e)w(t);else if(e&&"object"==typeof e)for(let t of Object.keys(e))t.startsWith("?")&&y.add(t),w(e[t])}function T(e){let t={};if((r=e).subject&&r.predicate&&r.object){const r=[T(e.subject),T(e.predicate),T(e.object),e.graph?T(e.graph):{}];Object.assign(t,...r)}else if(v(e))_(e)&&(t[e.value]=e);else if("bgp"===e.type){const r=e.triples;Object.assign(t,...r.map(T))}else if("path"===e.type)Object.assign(t,...e.items.map(T));else if("group"===e.type||"union"===e.type||"optional"===e.type)Object.assign(t,...e.patterns.map(T));else if("service"===e.type||"graph"===e.type)Object.assign(t,T(e.name)),Object.assign(t,...e.patterns.map(T));else if("bind"===e.type)Object.assign(t,T(e.variable));else if("values"===e.type){if(e.values.length>0){const r=Object.keys(e.values[0]).map((e=>f.createTerm(e)));Object.assign(t,...r.map(T))}}else if("query"===e.type&&("SELECT"===e.queryType||"DESCRIBE"===e.queryType)){e.where&&e.variables.some(d.default.isWildcard)&&Object.assign(t,...e.where.map(T));for(const r of e.variables)_(r)?Object.assign(t,T(r)):r.variable&&Object.assign(t,T(r.variable));if("SELECT"===e.queryType){if(e.group)for(const r of e.group)r.variable&&Object.assign(t,T(r.variable));if(e.values){const r={type:"values",values:e.values};Object.assign(t,T(r))}}}var r;return t}function S(e){if("bgp"===e.type)return function(e){let t=[],r=[];for(let i of e.triples)if("pathType"in i.predicate){let e=x((n=i).subject,E(n.predicate),n.object);for(let n of e)n.type===p.PATH?(t.length>0&&r.push(f.createBgp(t)),t=[],r.push(n)):t.push(n)}else t.push(R(i));var n;return t.length>0&&r.push(f.createBgp(t)),1===r.length?r[0]:f.createJoin(r)}(e);if("union"===e.type)return f.createUnion(e.patterns.map((e=>("group"!==e.type&&(e={type:"group",patterns:[e]}),S(e)))));if("graph"===e.type){let t=S({type:"group",patterns:e.patterns});return t=m?P(t,e.name):f.createGraph(t,e.name),t}if("values"===e.type)return j(e);if("query"===e.type)return b(e,m,!1);if("group"===e.type){let t=[],r=[];for(let n of e.patterns)("filter"===n.type?t:r).push(n);let n=r.reduce(N,f.createBgp([])),i=t.map((e=>O(e.expression)));return i.length>0&&(n=f.createFilter(n,i.reduce(((e,t)=>f.createOperatorExpression("&&",[e,t]))))),n}throw new Error(`Unexpected type: ${e.type}`)}function O(e){if(d.default.isSimpleTerm(e))return f.createTermExpression(e);if(d.default.isQuad(e))return d.default.hasQuadVariables(e)?f.createOperatorExpression("triple",[O(e.subject),O(e.predicate),O(e.object)]):f.createTermExpression(e);if(d.default.isWildcard(e))return f.createWildcardExpression();if("aggregation"in e)return f.createAggregateExpression(e.aggregation,O(e.expression),Boolean(e.distinct),e.separator);if("function"in e)return f.createNamedExpression(e.function,e.args.map(O));if("operator"in e)return"exists"===e.operator||"notexists"===e.operator?f.createExistenceExpression("notexists"===e.operator,S(e.args[0])):("in"!==e.operator&&"notin"!==e.operator||(e.args=[e.args[0]].concat(e.args[1])),f.createOperatorExpression(e.operator,e.args.map(O)));throw new Error(`Unknown expression: ${JSON.stringify(e)}`)}function E(e){if(d.default.isSimpleTerm(e)){if("NamedNode"===e.termType)return f.createLink(e);throw new Error(`Path predicate should be a NamedNode, got ${JSON.stringify(e)}`)}if("^"===e.pathType)return f.createInv(E(e.items[0]));if("!"===e.pathType){let t,r=[],n=[];t="pathType"in e.items[0]&&"|"===e.items[0].pathType?e.items[0].items:e.items;for(let e of t)if(d.default.isSimpleTerm(e))r.push(e);else{if("^"!==e.pathType)throw new Error(`Unexpected item: ${JSON.stringify(e)}`);n.push(e.items[0])}let i=f.createNps(r),a=f.createInv(f.createNps(n));return 0===n.length?i:0===r.length?a:f.createAlt([i,a])}if("/"===e.pathType)return f.createSeq(e.items.map(E));if("|"===e.pathType)return f.createAlt(e.items.map(E));if("*"===e.pathType)return f.createZeroOrMorePath(E(e.items[0]));if("+"===e.pathType)return f.createOneOrMorePath(E(e.items[0]));if("?"===e.pathType)return f.createZeroOrOnePath(E(e.items[0]));throw new Error(`Unable to translate path expression ${JSON.stringify(e)}`)}function x(e,t,r){if(t.type===p.LINK)return[f.createPattern(e,t.iri,r)];if(t.type===p.INV)return x(r,t.path,e);if(t.type===p.SEQ){let n=e;return d.default.flatten(t.input.map(((e,i)=>{const a=i===t.input.length-1?r:A(),o=x(n,e,a);return"Variable"===a.termType&&(n=a),o})))}return[f.createPath(e,t,r)]}function A(){let e="?var"+g++;return y.has(e)?A():(y.add(e),f.createTerm(e))}function R(e){if("pathType"in e.predicate)throw new Error("Trying to translate property path to quad.");return f.createPattern(e.subject,e.predicate,e.object,e.graph)}t.default=function(e,t){let r;if(t=t||{},f=new l.default(t.dataFactory),"string"==typeof e){let n=new h(t);n._resetBlanks(),r=n.parse(e)}else r=e;return b(r,t.quads,t.blankToVariable)};let I=Object.values(p);function P(e,t,r){if(e.type===p.GRAPH){if(r)throw new Error("Recursing through nested GRAPH statements with a replacement is impossible.");e=P(e.input,e.name)}else if(e.type===p.SERVICE);else if(e.type===p.BGP)e.patterns=e.patterns.map((e=>(r&&(e.subject.equals(t)&&(e.subject=r),e.predicate.equals(t)&&(e.predicate=r),e.object.equals(t)&&(e.object=r)),"DefaultGraph"===e.graph.termType&&(e.graph=t),e)));else if(e.type===p.PATH)r&&(e.subject.equals(t)&&(e.subject=r),e.object.equals(t)&&(e.object=r)),"DefaultGraph"===e.graph.termType&&(e.graph=t);else if(e.type!==p.PROJECT||r)if(e.type!==p.EXTEND||r)for(let n of Object.keys(e))Array.isArray(e[n])?e[n]=e[n].map((e=>P(e,t,r))):I.indexOf(e[n].type)>=0?e[n]=P(e[n],t,r):r&&_(e[n])&&e[n].equals(t)&&(e[n]=r);else e.variable.equals(t)&&(r=A()),e.input=P(e.input,t,r);else e.variables.some((e=>e.equals(t)))||(r=A()),e.input=P(e.input,t,r);return e}function N(e,t){if("optional"===t.type){const r=S({type:"group",patterns:t.patterns});e=r.type===p.FILTER?f.createLeftJoin(e,r.input,r.expression):f.createLeftJoin(e,r)}else if("minus"===t.type){const r=S({type:"group",patterns:t.patterns});e=f.createMinus(e,r)}else if("bind"===t.type)e=f.createExtend(e,t.variable,O(t.expression));else if("service"===t.type){const r={type:"group",patterns:t.patterns};e=D(e,f.createService(S(r),t.name,t.silent))}else e=D(e,S(t));return e}function D(e,t){return e.type===p.BGP&&t.type===p.BGP?e=f.createBgp([...e.patterns,...t.patterns]):e.type===p.BGP&&0===e.patterns.length?e=t:t.type===p.BGP&&0===t.patterns.length||(e=f.createJoin([e,t])),e}function j(e){let t=(0===e.values.length?[]:Object.keys(e.values[0])).map(f.createTerm.bind(f)),r=e.values.map((e=>{let t=Object.keys(e);t=t.filter((t=>void 0!==e[t]));let r={};for(let n of t)r[n]=e[n];return r}));return f.createValues(t,r)}function C(e,t){if("type"in e&&"aggregate"===e.type){let r,n=!1;for(let i of Object.keys(t))if(s(t[i],e)){r=f.createTerm(i),n=!0;break}return n||(r=A(),t[(0,c.termToString)(r)]=e),r}return"expression"in e&&e.expression?{...e,expression:C(e.expression,t)}:"args"in e&&e.args?{...e,args:e.args.map((e=>C(e,t)))}:e}function M(e){if("type"in e){if("load"===e.type)return function(e){return f.createLoad(e.source,e.destination,e.silent)}(e);if("clear"===e.type||"create"===e.type||"drop"===e.type)return function(e){let t;switch(t=d.default.isSimpleTerm(e.graph)?e.graph:e.graph.all?"ALL":e.graph.default?"DEFAULT":e.graph.named?"NAMED":e.graph.name,e.type){case"clear":return f.createClear(t,e.silent);case"create":return f.createCreate(t,e.silent);case"drop":return f.createDrop(t,e.silent)}}(e);if("add"===e.type||"copy"===e.type||"move"===e.type)return function(e){const t=e.source.default?"DEFAULT":e.source.name,r=e.destination.default?"DEFAULT":e.destination.name;switch(e.type){case"copy":return f.createCopy(t,r,e.silent);case"move":return f.createMove(t,r,e.silent);case"add":return f.createAdd(t,r,e.silent)}}(e)}else if("insertdelete"===e.updateType||"deletewhere"===e.updateType||"delete"===e.updateType||"insert"===e.updateType)return function(e){if(!m)throw new Error("INSERT/DELETE operations are only supported with quads option enabled");let t,r=[],n=[];if(e.delete&&(r=d.default.flatten(e.delete.map((t=>L(t,e.graph))))),e.insert&&(n=d.default.flatten(e.insert.map((t=>L(t,e.graph))))),e.where&&e.where.length>0){t=S({type:"group",patterns:e.where});const r=e.using;r?t=f.createFrom(t,r.default,r.named):e.graph&&(t=P(t,e.graph))}else"deletewhere"===e.updateType&&r.length>0&&(t=f.createBgp(r));return f.createDeleteInsert(r.length>0?r:void 0,n.length>0?n:void 0,t)}(e);throw new Error(`Unknown update type ${JSON.stringify(e)}`)}function L(e,t){let r=t;"graph"===e.type&&(r=e.name);let n=e.triples;return r&&(n=n.map((e=>Object.assign(e,{graph:r})))),n.map(R)}function k(e){const t={},r=Array.from(y).reduce(((e,t)=>(e[t]=!0,e)),{});return d.default.mapOperation(e,{[u.types.DELETE_INSERT]:e=>({result:e,recurse:!1}),[u.types.PATH]:(e,t)=>({result:t.createPath(n(e.subject),e.predicate,n(e.object),n(e.graph)),recurse:!1}),[u.types.PATTERN]:(e,t)=>({result:t.createPattern(n(e.subject),n(e.predicate),n(e.object),n(e.graph)),recurse:!1}),[u.types.CONSTRUCT]:e=>({result:f.createConstruct(k(e.input),e.template),recurse:!1})});function n(e){if("BlankNode"===e.termType){let n=t[e.value];return n||(n=d.default.createUniqueVariable(e.value,r,f.dataFactory),r[n.value]=!0,t[e.value]=n),n}return e}}},83152:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(47914),a=n(r(376)),o=r(13252);class s{static flatten(e){return Array.prototype.concat(...e).filter((e=>e))}static objectify(e){if(e.termType){if("Quad"===e.termType)return{type:"pattern",termType:"Quad",subject:s.objectify(e.subject),predicate:s.objectify(e.predicate),object:s.objectify(e.object),graph:s.objectify(e.graph)};{let t={termType:e.termType,value:e.value};return e.language&&(t.language=e.language),e.datatype&&(t.datatype=s.objectify(e.datatype)),t}}if(Array.isArray(e))return e.map((e=>s.objectify(e)));if(e===Object(e)){let t={};for(let r of Object.keys(e))t[r]=s.objectify(e[r]);return t}return e}static inScopeVariables(e){const t=[];function r(e){t.find((t=>e.value===t.value))||t.push(e)}function n(e){"Variable"===e.subject.termType&&r(e.subject),"Variable"===e.predicate.termType&&r(e.predicate),"Variable"===e.object.termType&&r(e.object),"Variable"===e.graph.termType&&r(e.graph),"Quad"===e.subject.termType&&n(e.subject),"Quad"===e.predicate.termType&&n(e.predicate),"Quad"===e.object.termType&&n(e.object),"Quad"===e.graph.termType&&n(e.graph)}return s.recurseOperation(e,{[i.types.EXPRESSION]:e=>(e.expressionType===i.expressionTypes.AGGREGATE&&e.variable&&r(e.variable),!0),[i.types.EXTEND]:e=>(r(e.variable),!0),[i.types.GRAPH]:e=>("Variable"===e.name.termType&&r(e.name),!0),[i.types.GROUP]:e=>(e.variables.forEach(r),!0),[i.types.PATH]:e=>("Variable"===e.subject.termType&&r(e.subject),"Variable"===e.object.termType&&r(e.object),"Variable"===e.graph.termType&&r(e.graph),"Quad"===e.subject.termType&&n(e.subject),"Quad"===e.object.termType&&n(e.object),"Quad"===e.graph.termType&&n(e.graph),!0),[i.types.PATTERN]:e=>(n(e),!0),[i.types.PROJECT]:e=>(e.variables.forEach(r),!1),[i.types.SERVICE]:e=>("Variable"===e.name.termType&&r(e.name),!0),[i.types.VALUES]:e=>(e.variables.forEach(r),!0)}),t}static recurseOperation(e,t){let r=e,n=!0;const a=t[e.type];if(a&&(n=a(e)),!n)return;let o=e=>s.recurseOperation(e,t);switch(r.type){case i.types.ALT:r.input.map(o);break;case i.types.ASK:o(r.input);break;case i.types.BGP:r.patterns.forEach(o);break;case i.types.CONSTRUCT:o(r.input),r.template.map(o);break;case i.types.DESCRIBE:case i.types.DISTINCT:o(r.input);break;case i.types.EXPRESSION:r.expressionType===i.expressionTypes.EXISTENCE&&o(r.input);break;case i.types.EXTEND:case i.types.FILTER:o(r.input),o(r.expression);break;case i.types.FROM:case i.types.GRAPH:o(r.input);break;case i.types.GROUP:o(r.input),r.aggregates.forEach(o);break;case i.types.INV:o(r.path);break;case i.types.JOIN:r.input.map(o);break;case i.types.LEFT_JOIN:r.input.map(o),r.expression&&o(r.expression);break;case i.types.LINK:break;case i.types.MINUS:r.input.map(o);break;case i.types.NOP:case i.types.NPS:break;case i.types.ONE_OR_MORE_PATH:o(r.path);break;case i.types.ORDER_BY:o(r.input),r.expressions.forEach(o);break;case i.types.PATH:o(r.predicate);break;case i.types.PATTERN:break;case i.types.PROJECT:case i.types.REDUCED:o(r.input);break;case i.types.SEQ:r.input.map(o);break;case i.types.SERVICE:case i.types.SLICE:o(r.input);break;case i.types.UNION:r.input.map(o);break;case i.types.VALUES:break;case i.types.ZERO_OR_MORE_PATH:case i.types.ZERO_OR_ONE_PATH:o(r.path);break;case i.types.COMPOSITE_UPDATE:r.updates.forEach((e=>o(e)));break;case i.types.DELETE_INSERT:r.delete&&r.delete.forEach((e=>o(e))),r.insert&&r.insert.forEach((e=>o(e))),r.where&&o(r.where);break;case i.types.LOAD:case i.types.CLEAR:case i.types.CREATE:case i.types.DROP:case i.types.ADD:case i.types.MOVE:case i.types.COPY:break;default:throw new Error(`Unknown Operation type ${r.type}`)}}static mapOperation(e,t,r){let n=e,o=!0,c=!0;r=r||new a.default;const u=t[e.type];if(u){const t=u(e,r);n=t.result,o=t.recurse,c=!1!==t.copyMetadata}let l;if(c&&(n.metadata||e.metadata)&&(l={...n.metadata,...e.metadata}),!o)return l&&(n.metadata=l),n;let d=e=>s.mapOperation(e,t,r);switch(n.type){case i.types.ALT:n=r.createAlt(n.input.map(d));break;case i.types.ASK:n=r.createAsk(d(n.input));break;case i.types.BGP:n=r.createBgp(n.patterns.map(d));break;case i.types.CONSTRUCT:n=r.createConstruct(d(n.input),n.template.map(d));break;case i.types.DESCRIBE:n=r.createDescribe(d(n.input),n.terms);break;case i.types.DISTINCT:n=r.createDistinct(d(n.input));break;case i.types.EXPRESSION:n=s.mapExpression(n,t,r);break;case i.types.EXTEND:n=r.createExtend(d(n.input),n.variable,d(n.expression));break;case i.types.FILTER:n=r.createFilter(d(n.input),d(n.expression));break;case i.types.FROM:n=r.createFrom(d(n.input),[...n.default],[...n.named]);break;case i.types.GRAPH:n=r.createGraph(d(n.input),n.name);break;case i.types.GROUP:n=r.createGroup(d(n.input),[].concat(n.variables),n.aggregates.map(d));break;case i.types.INV:n=r.createInv(d(n.path));break;case i.types.JOIN:n=r.createJoin(n.input.map(d));break;case i.types.LEFT_JOIN:n=r.createLeftJoin(d(n.input[0]),d(n.input[1]),n.expression?d(n.expression):void 0);break;case i.types.LINK:n=r.createLink(n.iri);break;case i.types.MINUS:n=r.createMinus(d(n.input[0]),d(n.input[1]));break;case i.types.NOP:n=r.createNop();break;case i.types.NPS:n=r.createNps([].concat(n.iris));break;case i.types.ONE_OR_MORE_PATH:n=r.createOneOrMorePath(d(n.path));break;case i.types.ORDER_BY:n=r.createOrderBy(d(n.input),n.expressions.map(d));break;case i.types.PATH:n=r.createPath(n.subject,d(n.predicate),n.object,n.graph);break;case i.types.PATTERN:n=r.createPattern(n.subject,n.predicate,n.object,n.graph);break;case i.types.PROJECT:n=r.createProject(d(n.input),[...n.variables]);break;case i.types.REDUCED:n=r.createReduced(d(n.input));break;case i.types.SEQ:n=r.createSeq(n.input.map(d));break;case i.types.SERVICE:n=r.createService(d(n.input),n.name,n.silent);break;case i.types.SLICE:n=r.createSlice(d(n.input),n.start,n.length);break;case i.types.UNION:n=r.createUnion(n.input.map(d));break;case i.types.VALUES:n=r.createValues([].concat(n.variables),n.bindings.map((e=>Object.assign({},e))));break;case i.types.ZERO_OR_MORE_PATH:n=r.createZeroOrMorePath(d(n.path));break;case i.types.ZERO_OR_ONE_PATH:n=r.createZeroOrOnePath(d(n.path));break;case i.types.COMPOSITE_UPDATE:n=r.createCompositeUpdate(n.updates.map(d));break;case i.types.DELETE_INSERT:n=r.createDeleteInsert(n.delete?n.delete.map(d):void 0,n.insert?n.insert.map(d):void 0,n.where?d(n.where):void 0);break;case i.types.LOAD:n=r.createLoad(n.source,n.destination,n.silent);break;case i.types.CLEAR:n=r.createClear(n.source,n.silent);break;case i.types.CREATE:n=r.createCreate(n.source,n.silent);break;case i.types.DROP:n=r.createDrop(n.source,n.silent);break;case i.types.ADD:n=r.createAdd(n.source,n.destination);break;case i.types.MOVE:n=r.createMove(n.source,n.destination);break;case i.types.COPY:n=r.createCopy(n.source,n.destination);break;default:throw new Error(`Unknown Operation type ${n.type}`)}return l&&(n.metadata=l),n}static mapExpression(e,t,r){let n=e,o=!0;r=r||new a.default;const c=t[e.expressionType];if(c&&({result:n,recurse:o}=c(e,r)),!o)return n;let u=e=>s.mapOperation(e,t,r);switch(e.expressionType){case i.expressionTypes.AGGREGATE:return e.variable?r.createBoundAggregate(e.variable,e.aggregator,u(e.expression),e.distinct,e.separator):r.createAggregateExpression(e.aggregator,u(e.expression),e.distinct,e.separator);case i.expressionTypes.EXISTENCE:return r.createExistenceExpression(e.not,u(e.input));case i.expressionTypes.NAMED:return r.createNamedExpression(e.name,e.args.map(u));case i.expressionTypes.OPERATOR:return r.createOperatorExpression(e.operator,e.args.map(u));case i.expressionTypes.TERM:return r.createTermExpression(e.term);case i.expressionTypes.WILDCARD:return r.createWildcardExpression();default:throw new Error(`Unknown Expression type ${e.expressionType}`)}}static cloneOperation(e){return s.mapOperation(e,{})}static cloneExpression(e){return s.mapExpression(e,{})}static createUniqueVariable(e,t,r){let n=0,i=e;for(;t[i];)i=`${e}${n++}`;return r.variable(i)}static isSimpleTerm(e){return void 0!==e.termType&&"Quad"!==e.termType&&"Wildcard"!==e.termType}static isQuad(e){return"Quad"===e.termType}static hasQuadVariables(e){return(0,o.someTermsNested)(e,(e=>"Variable"===e.termType))}static isWildcard(e){return"Wildcard"===e.termType}}t.default=s},33206:e=>{function t(e){this._options=e=e||{};var t=e.prefixes||{};this._prefixByIri={};var r=[];for(var n in t){var i=t[n];o(i)&&(this._prefixByIri[i]=n,r.push(i))}var a=r.join("|").replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&");this._prefixRegex=new RegExp("^("+a+")([a-zA-Z][\\-_a-zA-Z0-9]*)$"),this._usedPrefixes={},this._sparqlStar=e.sparqlStar,this._indent=o(e.indent)?e.indent:" ",this._newline=o(e.newline)?e.newline:"\n",this._explicitDatatype=Boolean(e.explicitDatatype)}t.prototype.toQuery=function(e){var t="";return e.queryType&&(t+=e.queryType.toUpperCase()+" "),e.reduced&&(t+="REDUCED "),e.distinct&&(t+="DISTINCT "),e.variables?t+=u(e.variables,void 0,(function(e){return s(e)?this.toEntity(e):"("+this.toExpression(e.expression)+" AS "+a(e.variable)+")"}),this)+" ":e.template&&(t+=this.group(e.template,!0)+this._newline),e.from&&(t+=this.graphs("FROM ",e.from.default)+this.graphs("FROM NAMED ",e.from.named)),e.where&&(t+="WHERE "+this.group(e.where,!0)+this._newline),e.updates&&(t+=u(e.updates,";"+this._newline,this.toUpdate,this)),e.group&&(t+="GROUP BY "+u(e.group,void 0,(function(e){var t=s(e.expression)?this.toEntity(e.expression):"("+this.toExpression(e.expression)+")";return e.variable?"("+t+" AS "+a(e.variable)+")":t}),this)+this._newline),e.having&&(t+="HAVING ("+u(e.having,void 0,this.toExpression,this)+")"+this._newline),e.order&&(t+="ORDER BY "+u(e.order,void 0,(function(e){var t="("+this.toExpression(e.expression)+")";return e.descending?"DESC "+t:t}),this)+this._newline),e.offset&&(t+="OFFSET "+e.offset+this._newline),e.limit&&(t+="LIMIT "+e.limit+this._newline),e.values&&(t+=this.values(e)),(t=this.baseAndPrefixes(e)+t).trim()},t.prototype.baseAndPrefixes=function(e){var t=e.base?"BASE <"+e.base+">"+this._newline:"",r="";for(var n in e.prefixes)(this._options.allPrefixes||this._usedPrefixes[n])&&(r+="PREFIX "+n+": <"+e.prefixes[n]+">"+this._newline);return t+r},t.prototype.toPattern=function(e){var t=e.type||e instanceof Array&&"array"||(e.subject&&e.predicate&&e.object?"triple":"");if(!(t in this))throw new Error("Unknown entry type: "+t);return this[t](e)},t.prototype.triple=function(e){return this.toEntity(e.subject)+" "+this.toEntity(e.predicate)+" "+this.toEntity(e.object)+"."},t.prototype.array=function(e){return u(e,this._newline,this.toPattern,this)},t.prototype.bgp=function(e){return this.encodeTriples(e.triples)},t.prototype.encodeTriples=function(e){if(!e.length)return"";for(var t=[],r=void 0,n=void 0,i=0;i":case">=":case"<=":case"&&":case"||":case"=":case"!=":case"+":case"-":case"*":case"/":return(s(i[0])?this.toEntity(i[0]):"("+this.toExpression(i[0])+")")+" "+t+" "+(s(i[1])?this.toEntity(i[1]):"("+this.toExpression(i[1])+")");case"!":return"!("+this.toExpression(i[0])+")";case"uplus":return"+("+this.toExpression(i[0])+")";case"uminus":return"-("+this.toExpression(i[0])+")";case"notin":t="NOT IN";case"in":return this.toExpression(i[0])+" "+t+"("+(o(i[1])?i[1]:u(i[1],", ",this.toExpression,this))+")";case"notexists":t="NOT EXISTS";case"exists":return t+" "+this.group(i[0],!0);default:return t+"("+u(i,", ",this.toExpression,this)+")"}default:throw new Error("Unknown expression type: "+e.type)}},t.prototype.toEntity=function(e){if(s(e))switch(e.termType){case"Wildcard":return"*";case"Variable":return a(e);case"BlankNode":return"_:"+e.value;case"Literal":var t=e.value||"",i=e.language||"",o=e.datatype;if(e='"'+t.replace(r,n)+'"',i)e+="@"+i;else if(o){if(!this._explicitDatatype)switch(o.value){case"http://www.w3.org/2001/XMLSchema#string":return e;case"http://www.w3.org/2001/XMLSchema#integer":if(/^\d+$/.test(t))return t+" "}e+="^^"+this.encodeIRI(o.value)}return e;case"Quad":if(!this._sparqlStar)throw new Error("SPARQL* support is not enabled");return e.graph&&"DefaultGraph"!==e.graph.termType?"<< GRAPH "+this.toEntity(e.graph)+" { "+this.toEntity(e.subject)+" "+this.toEntity(e.predicate)+" "+this.toEntity(e.object)+" } >>":"<< "+this.toEntity(e.subject)+" "+this.toEntity(e.predicate)+" "+this.toEntity(e.object)+" >>";default:return this.encodeIRI(e.value)}else{var c=e.items.map(this.toEntity,this),u=e.pathType;switch(u){case"^":case"!":return u+c[0];case"*":case"+":case"?":return"("+c[0]+u+")";default:return"("+c.join(u)+")"}}};var r=/["\\\t\n\r\b\f]/g,n=function(e){return i[e]},i={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};function a(e){return"?"+e.value}function o(e){return"string"==typeof e}function s(e){return"string"==typeof e.termType}function c(e,t){if(!e||!s(e))return!1;if(!t||!s(t))return!1;if(e.termType!==t.termType)return!1;switch(e.termType){case"Literal":return e.value===t.value&&e.language===t.language&&c(e.datatype,t.datatype);case"Quad":return c(e.subject,t.subject)&&c(e.predicate,t.predicate)&&c(e.object,t.object)&&c(e.graph,t.graph);default:return e.value===t.value}}function u(e,t,r,n){return e.map(r,n).join(o(t)?t:" ")}t.prototype.encodeIRI=function(e){var t=this._prefixRegex.exec(e);if(t){var r=this._prefixByIri[t[1]];return this._usedPrefixes[r]=!0,r+":"+t[2]}return"<"+e+">"},t.prototype.toUpdate=function(e){switch(e.type||e.updateType){case"load":return"LOAD"+(e.source?" "+this.toEntity(e.source):"")+(e.destination?" INTO GRAPH "+this.toEntity(e.destination):"");case"insert":return"INSERT DATA "+this.group(e.insert,!0);case"delete":return"DELETE DATA "+this.group(e.delete,!0);case"deletewhere":return"DELETE WHERE "+this.group(e.delete,!0);case"insertdelete":return(e.graph?"WITH "+this.toEntity(e.graph)+this._newline:"")+(e.delete.length?"DELETE "+this.group(e.delete,!0)+this._newline:"")+(e.insert.length?"INSERT "+this.group(e.insert,!0)+this._newline:"")+(e.using?this.graphs("USING ",e.using.default):"")+(e.using?this.graphs("USING NAMED ",e.using.named):"")+"WHERE "+this.group(e.where,!0);case"add":case"copy":case"move":return e.type.toUpperCase()+" "+(e.silent?"SILENT ":"")+(e.source.default?"DEFAULT":this.toEntity(e.source.name))+" TO "+this.toEntity(e.destination.name);case"create":case"clear":case"drop":return e.type.toUpperCase()+(e.silent?" SILENT ":" ")+(e.graph.default?"DEFAULT":e.graph.named?"NAMED":e.graph.all?"ALL":"GRAPH "+this.toEntity(e.graph.name));default:throw new Error("Unknown update query type: "+e.type)}},t.prototype.indent=function(e){return e.replace(/^/gm,this._indent)},e.exports=function(e={}){return{stringify:function(r){var n=Object.create(e);return n.prefixes=r.prefixes,new t(n).toQuery(r)},createGenerator:function(){return new t(e)}}}},17308:(e,t,r)=>{var n=function(){var e=function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},t=[6,12,13,15,16,24,32,36,41,45,100,110,113,115,116,123,126,131,197,224,229,308,329,330,331,332,333],n=[2,247],i=[100,110,113,115,116,123,126,131,329,330,331,332,333],a=[2,409],o=[1,18],s=[1,27],c=[13,16,45,197,224,229,308],u=[28,29,53],l=[28,53],d=[1,42],h=[1,45],p=[1,41],f=[1,44],y=[123,126],g=[1,67],m=[39,45,87],b=[13,16,45,197,224,308],v=[1,87],_=[2,281],w=[1,86],T=[13,16,45,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],S=[6,28,29,53,63,70,73,81,83,85],O=[6,13,16,28,29,53,63,70,73,81,83,85,87,308],E=[6,13,16,28,29,45,53,63,70,73,81,82,83,85,87,89,197,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314],x=[6,13,16,28,29,31,39,45,47,48,53,63,70,73,81,82,83,85,87,89,109,112,121,123,126,128,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,337,338,340,341,342,343,344,345,346],A=[13,16,308],R=[112,132,327,334],I=[13,16,112,132,308],P=[1,111],N=[1,117],D=[112,132,327,328,334],j=[13,16,112,132,308,328],C=[28,29,45,53,87],M=[1,138],L=[1,151],k=[1,128],F=[1,127],B=[1,129],U=[1,140],q=[1,141],V=[1,142],Q=[1,143],$=[1,144],H=[1,145],G=[1,147],z=[1,148],K=[2,457],X=[1,158],J=[1,159],W=[1,160],Y=[1,152],Z=[1,153],ee=[1,156],te=[1,171],re=[1,172],ne=[1,173],ie=[1,174],ae=[1,175],oe=[1,176],se=[1,167],ce=[1,168],ue=[1,169],le=[1,170],de=[1,157],he=[1,166],pe=[1,161],fe=[1,162],ye=[1,163],ge=[1,164],me=[1,165],be=[6,13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335],ve=[1,195],_e=[6,31,73,81,83,85],we=[2,285],Te=[1,199],Se=[1,201],Oe=[6,31,70,73,81,83,85],Ee=[2,283],xe=[1,207],Ae=[1,218],Re=[1,223],Ie=[1,219],Pe=[1,225],Ne=[1,226],De=[1,224],je=[6,63,70,73,81,83,85],Ce=[1,236],Me=[2,334],Le=[1,243],ke=[1,241],Fe=[6,193],Be=[2,349],Ue=[2,339],qe=[28,128],Ve=[47,48,193,272],Qe=[47,48,193,242,272],$e=[47,48,193,242,246,272],He=[47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,341,342,343,344,345,346],Ge=[39,47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,338,341,342,343,344,345,346],ze=[1,271],Ke=[1,270],Xe=[6,13,16,29,31,39,45,47,48,70,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,231,242,246,250,263,265,268,269,270,271,272,273,274,276,277,279,280,283,285,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,338,341,342,343,344,345,346,347,348,349,350,351],Je=[1,281],We=[1,280],Ye=[13,16,29,31,39,45,47,48,82,85,87,89,112,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,338,341,342,343,344,345,346],Ze=[45,89],et=[13,16,29,31,39,45,47,48,82,85,87,89,112,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,338,341,342,343,344,345,346],tt=[13,16,31,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],rt=[31,89],nt=[48,87],it=[6,13,16,45,48,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,337,338],at=[6,13,16,39,45,48,82,87,89,231,263,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,337,338,340],ot=[1,313],st=[6,85],ct=[6,31,81,83,85],ut=[2,361],lt=[2,353],dt=[1,343],ht=[31,112,335],pt=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,197,224,229,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],ft=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,197,224,229,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335],yt=[6,109,193],gt=[31,112],mt=[13,16,45,82,87,224,263,265,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312,346,347,348,349,350,351],bt=[1,390],vt=[1,391],_t=[13,16,87,197,308,314],wt=[13,16,39,45,82,87,224,263,265,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312,346,347,348,349,350,351],Tt=[1,417],St=[1,418],Ot=[13,16,48,197,229,308],Et=[6,31,85],xt=[6,13,16,31,45,73,81,83,85,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],At=[6,13,16,29,31,45,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,231,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,346,347,348,349,350,351],Rt=[29,31,85,112,159,160,161,163,164],It=[1,443],Pt=[1,444],Nt=[1,449],Dt=[31,112,193,232,318,335],jt=[13,16,45,48,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],Ct=[13,16,31,45,48,82,87,89,112,193,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],Mt=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],Lt=[13,16,31,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],kt=[31,45],Ft=[1,507],Bt=[1,508],Ut=[6,13,16,29,31,39,45,47,48,63,70,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,231,242,246,250,263,265,268,269,270,271,272,273,274,276,277,279,280,283,285,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,336,338,341,342,343,344,345,346,347,348,349,350,351],qt=[29,31,85,112,159,160,161,163,164,335],Vt=[6,13,16,31,45,70,73,81,83,85,87,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],Qt=[13,16,31,45,48,82,87,89,112,193,197,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],$t=[2,352],Ht=[13,16,197,308,314],Gt=[1,565],zt=[6,13,16,31,45,76,78,81,83,85,87,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],Kt=[13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],Xt=[13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335],Jt=[13,16,87,308],Wt=[2,364],Yt=[29,31,85,112,159,160,161,163,164,193,232,318,335],Zt=[31,112,193,232,272,318,335],er=[2,359],tr=[13,16,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],rr=[29,31,85,112,159,160,161,163,164,193,232,272,318,335],nr=[13,16,31,45,82,87,89,112,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],ir=[2,347],ar={trace:function(){},yy:{},symbols_:{error:2,QueryOrUpdate:3,Prologue:4,QueryOrUpdate_group0:5,EOF:6,Query:7,Qry:8,Query_option0:9,Prologue_repetition0:10,BaseDecl:11,BASE:12,IRIREF:13,PrefixDecl:14,PREFIX:15,PNAME_NS:16,SelectClauseWildcard:17,Qry_repetition0:18,WhereClause:19,SolutionModifierNoGroup:20,SelectClauseVars:21,Qry_repetition1:22,SolutionModifier:23,CONSTRUCT:24,ConstructTemplate:25,Qry_repetition2:26,Qry_repetition3:27,WHERE:28,"{":29,Qry_option0:30,"}":31,DESCRIBE:32,Qry_group0:33,Qry_repetition4:34,Qry_option1:35,ASK:36,Qry_repetition5:37,SelectClauseBase:38,"*":39,SelectClauseVars_repetition_plus0:40,SELECT:41,SelectClauseBase_option0:42,SelectClauseItem:43,Var:44,"(":45,Expression:46,AS:47,")":48,SubSelect:49,SubSelect_option0:50,SubSelect_option1:51,DatasetClause:52,FROM:53,DatasetClause_option0:54,iri:55,WhereClause_option0:56,GroupGraphPattern:57,SolutionModifier_option0:58,SolutionModifierNoGroup_option0:59,SolutionModifierNoGroup_option1:60,SolutionModifierNoGroup_option2:61,GroupClause:62,GROUP:63,BY:64,GroupClause_repetition_plus0:65,GroupCondition:66,BuiltInCall:67,FunctionCall:68,HavingClause:69,HAVING:70,HavingClause_repetition_plus0:71,OrderClause:72,ORDER:73,OrderClause_repetition_plus0:74,OrderCondition:75,ASC:76,BrackettedExpression:77,DESC:78,Constraint:79,LimitOffsetClauses:80,LIMIT:81,INTEGER:82,OFFSET:83,ValuesClause:84,VALUES:85,InlineData:86,VAR:87,InlineData_repetition0:88,NIL:89,InlineData_repetition1:90,InlineData_repetition_plus2:91,InlineData_repetition3:92,DataBlock:93,DataBlockValueList:94,DataBlockValueList_repetition_plus0:95,Update:96,Update_repetition0:97,Update1:98,Update_option0:99,LOAD:100,Update1_option0:101,Update1_option1:102,Update1_group0:103,Update1_option2:104,GraphRefAll:105,Update1_group1:106,Update1_option3:107,GraphOrDefault:108,TO:109,CREATE:110,Update1_option4:111,GRAPH:112,INSERTDATA:113,QuadPattern:114,DELETEDATA:115,DELETEWHERE:116,Update1_option5:117,InsertDeleteClause:118,Update1_repetition0:119,IntoGraphClause:120,INTO:121,GraphRef:122,DELETE:123,InsertDeleteClause_option0:124,InsertClause:125,INSERT:126,UsingClause:127,USING:128,UsingClause_option0:129,WithClause:130,WITH:131,DEFAULT:132,GraphOrDefault_option0:133,GraphRefAll_group0:134,Quads:135,Quads_option0:136,Quads_repetition0:137,QuadsNotTriples:138,VarOrIri:139,QuadsNotTriples_option0:140,QuadsNotTriples_option1:141,QuadsNotTriples_option2:142,TriplesTemplate:143,TriplesTemplate_repetition0:144,TriplesSameSubject:145,TriplesTemplate_option0:146,GroupGraphPatternSub:147,GroupGraphPatternSub_option0:148,GroupGraphPatternSub_repetition0:149,GroupGraphPatternSubTail:150,GraphPatternNotTriples:151,GroupGraphPatternSubTail_option0:152,GroupGraphPatternSubTail_option1:153,TriplesBlock:154,TriplesBlock_repetition0:155,TriplesSameSubjectPath:156,TriplesBlock_option0:157,GroupOrUnionGraphPattern:158,OPTIONAL:159,MINUS:160,SERVICE:161,GraphPatternNotTriples_option0:162,FILTER:163,BIND:164,InlineDataOneVar:165,InlineDataFull:166,InlineDataOneVar_repetition0:167,InlineDataFull_repetition0:168,InlineDataFull_repetition_plus1:169,InlineDataFull_repetition2:170,DataBlockValue:171,Literal:172,QuotedTriple:173,UNDEF:174,GroupOrUnionGraphPattern_repetition0:175,ArgList:176,ArgList_option0:177,ArgList_repetition0:178,ExpressionList:179,ExpressionList_repetition0:180,ConstructTemplate_option0:181,ConstructTriples:182,ConstructTriples_repetition0:183,ConstructTriples_option0:184,VarOrTermOrQuotedTP:185,PropertyListNotEmpty:186,TriplesNode:187,PropertyList:188,PropertyList_option0:189,VerbObjectList:190,PropertyListNotEmpty_repetition0:191,SemiOptionalVerbObjectList:192,";":193,SemiOptionalVerbObjectList_option0:194,Verb:195,ObjectList:196,a:197,ObjectList_repetition0:198,Object:199,GraphNode:200,Object_option0:201,PropertyListPathNotEmpty:202,TriplesNodePath:203,TriplesSameSubjectPath_option0:204,O:205,PropertyListPathNotEmpty_repetition0:206,PropertyListPathNotEmptyTail:207,O_group0:208,ObjectListPath:209,ObjectListPath_repetition0:210,ObjectPath:211,GraphNodePath:212,ObjectPath_option0:213,Path:214,Path_repetition0:215,PathSequence:216,PathSequence_repetition0:217,PathEltOrInverse:218,PathElt:219,PathPrimary:220,PathElt_option0:221,PathEltOrInverse_option0:222,IriOrA:223,"!":224,PathNegatedPropertySet:225,PathOneInPropertySet:226,PathNegatedPropertySet_repetition0:227,PathNegatedPropertySet_option0:228,"^":229,TriplesNode_repetition_plus0:230,"[":231,"]":232,TriplesNodePath_repetition_plus0:233,VarOrTermOrQuotedTPExpr:234,VarOrTerm:235,GraphTerm:236,BlankNode:237,ConditionalOrExpression:238,ConditionalAndExpression:239,ConditionalOrExpression_repetition0:240,ConditionalOrExpressionTail:241,"||":242,RelationalExpression:243,ConditionalAndExpression_repetition0:244,ConditionalAndExpressionTail:245,"&&":246,NumericExpression:247,RelationalExpression_group0:248,RelationalExpression_option0:249,IN:250,MultiplicativeExpression:251,NumericExpression_repetition0:252,AdditiveExpressionTail:253,AdditiveExpressionTail_group0:254,NumericLiteralPositive:255,AdditiveExpressionTail_repetition0:256,NumericLiteralNegative:257,AdditiveExpressionTail_repetition1:258,UnaryExpression:259,MultiplicativeExpression_repetition0:260,MultiplicativeExpressionTail:261,MultiplicativeExpressionTail_group0:262,"+":263,PrimaryExpression:264,"-":265,ExprQuotedTP:266,Aggregate:267,FUNC_ARITY0:268,FUNC_ARITY1:269,FUNC_ARITY1_SPARQL_STAR:270,FUNC_ARITY2:271,",":272,FUNC_ARITY3:273,FUNC_ARITY3_SPARQL_STAR:274,BuiltInCall_group0:275,BOUND:276,BNODE:277,BuiltInCall_option0:278,EXISTS:279,COUNT:280,Aggregate_option0:281,Aggregate_group0:282,FUNC_AGGREGATE:283,Aggregate_option1:284,GROUP_CONCAT:285,Aggregate_option2:286,Aggregate_option3:287,GroupConcatSeparator:288,SEPARATOR:289,"=":290,String:291,LANGTAG:292,"^^":293,DECIMAL:294,DOUBLE:295,BOOLEAN:296,INTEGER_POSITIVE:297,DECIMAL_POSITIVE:298,DOUBLE_POSITIVE:299,INTEGER_NEGATIVE:300,DECIMAL_NEGATIVE:301,DOUBLE_NEGATIVE:302,STRING_LITERAL1:303,STRING_LITERAL2:304,STRING_LITERAL_LONG1:305,STRING_LITERAL_LONG2:306,PrefixedName:307,PNAME_LN:308,BLANK_NODE_LABEL:309,ANON:310,QuotedTP:311,"<<":312,qtSubjectOrObject:313,">>":314,DataValueTerm:315,AnnotationPattern:316,"{|":317,"|}":318,AnnotationPatternPath:319,ExprVarOrTerm:320,QueryOrUpdate_group0_option0:321,Prologue_repetition0_group0:322,Qry_group0_repetition_plus0:323,SelectClauseBase_option0_group0:324,DISTINCT:325,REDUCED:326,NAMED:327,SILENT:328,CLEAR:329,DROP:330,ADD:331,MOVE:332,COPY:333,ALL:334,".":335,UNION:336,"|":337,"/":338,PathElt_option0_group0:339,"?":340,"!=":341,"<":342,">":343,"<=":344,">=":345,NOT:346,CONCAT:347,COALESCE:348,SUBSTR:349,REGEX:350,REPLACE:351,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",12:"BASE",13:"IRIREF",15:"PREFIX",16:"PNAME_NS",24:"CONSTRUCT",28:"WHERE",29:"{",31:"}",32:"DESCRIBE",36:"ASK",39:"*",41:"SELECT",45:"(",47:"AS",48:")",53:"FROM",63:"GROUP",64:"BY",70:"HAVING",73:"ORDER",76:"ASC",78:"DESC",81:"LIMIT",82:"INTEGER",83:"OFFSET",85:"VALUES",87:"VAR",89:"NIL",100:"LOAD",109:"TO",110:"CREATE",112:"GRAPH",113:"INSERTDATA",115:"DELETEDATA",116:"DELETEWHERE",121:"INTO",123:"DELETE",126:"INSERT",128:"USING",131:"WITH",132:"DEFAULT",159:"OPTIONAL",160:"MINUS",161:"SERVICE",163:"FILTER",164:"BIND",174:"UNDEF",193:";",197:"a",224:"!",229:"^",231:"[",232:"]",242:"||",246:"&&",250:"IN",263:"+",265:"-",268:"FUNC_ARITY0",269:"FUNC_ARITY1",270:"FUNC_ARITY1_SPARQL_STAR",271:"FUNC_ARITY2",272:",",273:"FUNC_ARITY3",274:"FUNC_ARITY3_SPARQL_STAR",276:"BOUND",277:"BNODE",279:"EXISTS",280:"COUNT",283:"FUNC_AGGREGATE",285:"GROUP_CONCAT",289:"SEPARATOR",290:"=",292:"LANGTAG",293:"^^",294:"DECIMAL",295:"DOUBLE",296:"BOOLEAN",297:"INTEGER_POSITIVE",298:"DECIMAL_POSITIVE",299:"DOUBLE_POSITIVE",300:"INTEGER_NEGATIVE",301:"DECIMAL_NEGATIVE",302:"DOUBLE_NEGATIVE",303:"STRING_LITERAL1",304:"STRING_LITERAL2",305:"STRING_LITERAL_LONG1",306:"STRING_LITERAL_LONG2",308:"PNAME_LN",309:"BLANK_NODE_LABEL",310:"ANON",312:"<<",314:">>",317:"{|",318:"|}",325:"DISTINCT",326:"REDUCED",327:"NAMED",328:"SILENT",329:"CLEAR",330:"DROP",331:"ADD",332:"MOVE",333:"COPY",334:"ALL",335:".",336:"UNION",337:"|",338:"/",340:"?",341:"!=",342:"<",343:">",344:"<=",345:">=",346:"NOT",347:"CONCAT",348:"COALESCE",349:"SUBSTR",350:"REGEX",351:"REPLACE"},productions_:[0,[3,3],[7,2],[4,1],[11,2],[14,3],[8,4],[8,4],[8,5],[8,7],[8,5],[8,4],[17,2],[21,2],[38,2],[43,1],[43,5],[49,4],[49,4],[52,3],[19,2],[23,2],[20,3],[62,3],[66,1],[66,1],[66,3],[66,5],[66,1],[69,2],[72,3],[75,2],[75,2],[75,1],[75,1],[80,2],[80,2],[80,4],[80,4],[84,2],[86,4],[86,4],[86,6],[86,2],[94,3],[96,3],[98,4],[98,3],[98,5],[98,4],[98,2],[98,2],[98,2],[98,5],[120,2],[118,3],[118,1],[125,2],[127,3],[130,2],[108,1],[108,2],[122,2],[105,1],[105,1],[114,3],[135,2],[138,7],[143,3],[57,3],[57,3],[147,2],[150,3],[154,3],[151,1],[151,2],[151,2],[151,3],[151,4],[151,2],[151,6],[151,1],[93,1],[93,1],[165,4],[166,4],[166,6],[171,1],[171,1],[171,1],[171,1],[158,2],[79,1],[79,1],[79,1],[68,2],[176,1],[176,5],[179,1],[179,4],[25,3],[182,3],[145,2],[145,2],[188,1],[186,2],[192,2],[190,2],[195,1],[195,1],[196,2],[199,2],[156,2],[156,2],[202,2],[207,1],[207,2],[205,2],[209,2],[211,2],[214,2],[216,2],[219,2],[218,2],[220,1],[220,2],[220,3],[225,1],[225,1],[225,4],[226,1],[226,2],[187,3],[187,3],[203,3],[203,3],[200,1],[200,1],[212,1],[212,1],[234,1],[235,1],[235,1],[139,1],[139,1],[44,1],[236,1],[236,1],[236,1],[236,1],[46,1],[238,2],[241,2],[239,2],[245,2],[243,1],[243,3],[243,4],[247,2],[253,2],[253,2],[253,2],[251,2],[261,2],[259,2],[259,2],[259,2],[259,1],[264,1],[264,1],[264,1],[264,1],[264,1],[264,1],[264,1],[77,3],[67,1],[67,2],[67,4],[67,4],[67,6],[67,8],[67,8],[67,2],[67,4],[67,2],[67,4],[67,3],[267,5],[267,5],[267,6],[288,4],[172,1],[172,2],[172,3],[172,1],[172,1],[172,1],[172,1],[172,1],[172,1],[255,1],[255,1],[255,1],[257,1],[257,1],[257,1],[291,1],[291,1],[291,1],[291,1],[55,1],[55,1],[307,1],[307,1],[237,1],[237,1],[311,5],[173,5],[313,1],[313,1],[313,1],[313,1],[313,1],[315,1],[315,1],[315,1],[185,1],[185,1],[185,1],[316,3],[319,3],[266,5],[320,1],[320,1],[320,1],[223,1],[223,1],[321,0],[321,1],[5,1],[5,1],[5,1],[9,0],[9,1],[322,1],[322,1],[10,0],[10,2],[18,0],[18,2],[22,0],[22,2],[26,0],[26,2],[27,0],[27,2],[30,0],[30,1],[323,1],[323,2],[33,1],[33,1],[34,0],[34,2],[35,0],[35,1],[37,0],[37,2],[40,1],[40,2],[324,1],[324,1],[42,0],[42,1],[50,0],[50,1],[51,0],[51,1],[54,0],[54,1],[56,0],[56,1],[58,0],[58,1],[59,0],[59,1],[60,0],[60,1],[61,0],[61,1],[65,1],[65,2],[71,1],[71,2],[74,1],[74,2],[88,0],[88,2],[90,0],[90,2],[91,1],[91,2],[92,0],[92,2],[95,1],[95,2],[97,0],[97,4],[99,0],[99,2],[101,0],[101,1],[102,0],[102,1],[103,1],[103,1],[104,0],[104,1],[106,1],[106,1],[106,1],[107,0],[107,1],[111,0],[111,1],[117,0],[117,1],[119,0],[119,2],[124,0],[124,1],[129,0],[129,1],[133,0],[133,1],[134,1],[134,1],[134,1],[136,0],[136,1],[137,0],[137,2],[140,0],[140,1],[141,0],[141,1],[142,0],[142,1],[144,0],[144,3],[146,0],[146,1],[148,0],[148,1],[149,0],[149,2],[152,0],[152,1],[153,0],[153,1],[155,0],[155,3],[157,0],[157,1],[162,0],[162,1],[167,0],[167,2],[168,0],[168,2],[169,1],[169,2],[170,0],[170,2],[175,0],[175,3],[177,0],[177,1],[178,0],[178,3],[180,0],[180,3],[181,0],[181,1],[183,0],[183,3],[184,0],[184,1],[189,0],[189,1],[191,0],[191,2],[194,0],[194,1],[198,0],[198,3],[201,0],[201,1],[204,0],[204,1],[206,0],[206,2],[208,1],[208,1],[210,0],[210,3],[213,0],[213,1],[215,0],[215,3],[217,0],[217,3],[339,1],[339,1],[339,1],[221,0],[221,1],[222,0],[222,1],[227,0],[227,3],[228,0],[228,1],[230,1],[230,2],[233,1],[233,2],[240,0],[240,2],[244,0],[244,2],[248,1],[248,1],[248,1],[248,1],[248,1],[248,1],[249,0],[249,1],[252,0],[252,2],[254,1],[254,1],[256,0],[256,2],[258,0],[258,2],[260,0],[260,2],[262,1],[262,1],[275,1],[275,1],[275,1],[275,1],[275,1],[278,0],[278,1],[281,0],[281,1],[282,1],[282,1],[284,0],[284,1],[286,0],[286,1],[287,0],[287,1]],performAction:function(e,t,r,n,i,a,o){var s,c,u,l,d=a.length-1;switch(i){case 1:if(a[d-1]=a[d-1]||{},nn.base&&(a[d-1].base=nn.base),nn.base="",a[d-1].prefixes=nn.prefixes,nn.prefixes=null,nn.pathOnly){if("path"===a[d-1].type||"termType"in a[d-1])return a[d-1];throw new Error("Received full SPARQL query in path only mode")}if("path"===a[d-1].type||"termType"in a[d-1])throw new Error("Received only path in full SPARQL mode");if("update"===a[d-1].type){const e={};for(const t of a[d-1].updates)if("insert"===t.updateType){const r={};for(const e of t.insert)if("bgp"===e.type||"graph"===e.type)for(const t of e.triples)"BlankNode"===t.subject.termType&&(r[t.subject.value]=!0),"BlankNode"===t.predicate.termType&&(r[t.predicate.value]=!0),"BlankNode"===t.object.termType&&(r[t.object.value]=!0);for(const t of Object.keys(r)){if(e[t])throw new Error("Detected reuse blank node across different INSERT DATA clauses");e[t]=!0}}}return a[d-1];case 2:this.$={...a[d-1],...a[d],type:"query"};break;case 4:nn.base=Er(a[d]);break;case 5:nn.prefixes||(nn.prefixes={}),a[d-1]=a[d-1].substr(0,a[d-1].length-1),a[d]=Er(a[d]),nn.prefixes[a[d-1]]=a[d];break;case 6:this.$={...a[d-3],...Nr(a[d-2]),...a[d-1],...a[d]};break;case 7:if(!nn.skipValidation&&(Kr(a[d-3].variables.map((e=>Gr(e.expression)))).some((e=>"count"===e.aggregation&&!(e.expression instanceof or)))||a[d].group))for(const e of a[d-3].variables)if("Variable"===e.termType){if(!a[d].group||!a[d].group.map((e=>Hr(e))).includes(Hr(e)))throw Error("Projection of ungrouped variable (?"+Hr(e)+")")}else if(0===Gr(e.expression).length){const t=zr(e.expression);for(const e of t)if(!a[d].group||!a[d].group.map||!a[d].group.map((e=>Hr(e))).includes(Hr(e)))throw Error("Use of ungrouped variable in projection of operation (?"+Hr(e)+")")}const e=a[d-1].where.filter((e=>"query"===e.type));if(e.length>0){const t=a[d-3].variables.filter((e=>e.variable&&e.variable.value)).map((e=>e.variable.value)),r=Kr(e.map((e=>e.variables))).map((e=>e.value||e.variable.value));for(const e of t)if(r.indexOf(e)>=0)throw Error("Target id of 'AS' (?"+e+") already used in subquery")}this.$=Sr(a[d-3],Nr(a[d-2]),a[d-1],a[d]);break;case 8:this.$=Sr({queryType:"CONSTRUCT",template:a[d-3]},Nr(a[d-2]),a[d-1],a[d]);break;case 9:this.$=Sr({queryType:"CONSTRUCT",template:a[d-2]=a[d-2]?a[d-2].triples:[]},Nr(a[d-5]),{where:[{type:"bgp",triples:Tr([],a[d-2])}]},a[d]);break;case 10:this.$=Sr({queryType:"DESCRIBE",variables:"*"===a[d-3]?[new or]:a[d-3]},Nr(a[d-2]),a[d-1],a[d]);break;case 11:this.$=Sr({queryType:"ASK"},Nr(a[d-2]),a[d-1],a[d]);break;case 12:this.$=Sr(a[d-1],{variables:[new or]});break;case 13:const t=function(e){const t=e.slice().sort(),r=[];for(let e=0;ee.value||e.variable.value)));if(t.length>0)throw Error("Two or more of the resulting columns have the same name (?"+t[0]+")");this.$=Sr(a[d-1],{variables:a[d]});break;case 14:this.$=Sr({queryType:"SELECT"},a[d]&&(a[d-1]=_r(a[d]),a[d]={},a[d][a[d-1]]=!0,a[d]));break;case 16:case 27:this.$=Rr(a[d-3],{variable:a[d-1]});break;case 17:case 18:this.$=Sr(a[d-3],a[d-2],a[d-1],a[d],{type:"query"});break;case 19:case 58:this.$={iri:a[d],named:!!a[d-1]};break;case 20:this.$={where:a[d].patterns};break;case 21:this.$=Sr(a[d-1],a[d]);break;case 22:this.$=Sr(a[d-2],a[d-1],a[d]);break;case 23:this.$={group:a[d]};break;case 24:case 25:case 28:case 31:case 33:case 34:this.$=Rr(a[d]);break;case 26:this.$=Rr(a[d-1]);break;case 29:this.$={having:a[d]};break;case 30:this.$={order:a[d]};break;case 32:this.$=Rr(a[d],{descending:!0});break;case 35:this.$={limit:Dr(a[d])};break;case 36:this.$={offset:Dr(a[d])};break;case 37:this.$={limit:Dr(a[d-2]),offset:Dr(a[d])};break;case 38:this.$={limit:Dr(a[d]),offset:Dr(a[d-2])};break;case 39:case 43:this.$={type:"values",values:a[d]};break;case 40:case 84:this.$=a[d-1].map((e=>({[a[d-3]]:e})));break;case 41:case 85:this.$=a[d-1].map((()=>({})));break;case 42:case 86:var h=a[d-4].length;a[d-4]=a[d-4].map(xr),this.$=a[d-1].map((function(e){if(e.length!==h)throw Error("Inconsistent VALUES length");for(var t={},r=0;r"bind"===e.type))){const t=a[d-1].indexOf(e),r=new Set;for(const e of a[d-1].slice(0,t))"group"!==e.type&&"bgp"!==e.type||Jr(e).forEach((e=>r.add(e)));if(r.has(e.variable.value))throw Error("Variable used to bind is already bound (?"+e.variable.value+")")}this.$={type:"group",patterns:a[d-1]};break;case 71:this.$=a[d-1]?Or([a[d-1]],a[d]):Or(a[d]);break;case 72:this.$=a[d]?[a[d-2],a[d]]:a[d-2];break;case 75:this.$=Sr(a[d],{type:"optional"});break;case 76:this.$=Sr(a[d],{type:"minus"});break;case 77:this.$=Sr(a[d],{type:"graph",name:a[d-1]});break;case 78:this.$=Sr(a[d],{type:"service",name:a[d-1],silent:!!a[d-2]});break;case 79:this.$={type:"filter",expression:a[d]};break;case 80:this.$={type:"bind",variable:a[d-1],expression:a[d-3]};break;case 89:this.$=Wr(a[d]);break;case 90:this.$=void 0;break;case 91:this.$=a[d-1].length?{type:"union",patterns:Or(a[d-1].map(jr),[jr(a[d])])}:a[d];break;case 95:this.$={...a[d],function:a[d-1]};break;case 96:this.$={type:"functionCall",args:[]};break;case 97:this.$={type:"functionCall",args:wr(a[d-2],a[d-1]),distinct:!!a[d-3]};break;case 98:case 115:case 128:case 247:case 249:case 251:case 253:case 255:case 263:case 267:case 297:case 299:case 303:case 307:case 328:case 341:case 349:case 355:case 361:case 367:case 369:case 373:case 375:case 379:case 381:case 385:case 391:case 395:case 401:case 405:case 409:case 411:case 420:case 428:case 430:case 440:case 444:case 446:case 448:this.$=[];break;case 99:this.$=wr(a[d-2],a[d-1]);break;case 101:this.$=Or(a[d-2],[a[d-1]]);break;case 102:case 112:this.$=Zr(a[d].map((e=>Sr(Lr(a[d-1]),e))));break;case 103:this.$=Zr(Tr(a[d].map((e=>Sr(Lr(a[d-1].entity),e))),a[d-1].triples));break;case 105:this.$=Or([a[d-1]],a[d]);break;case 106:this.$=Or(a[d]);break;case 107:this.$=$r(a[d-1],a[d]);break;case 109:case 237:this.$=nn.factory.namedNode(cr);break;case 110:case 118:this.$=wr(a[d-1],a[d]);break;case 111:this.$=a[d]?{annotation:a[d],object:a[d-1]}:a[d-1];break;case 113:this.$=a[d]?Zr(Tr(a[d].map((e=>Sr(Lr(a[d-1].entity),e))),a[d-1].triples)):a[d-1].triples;break;case 114:this.$=$r(...a[d-1],a[d]);break;case 116:this.$=$r(...a[d]);break;case 117:case 159:case 163:this.$=[a[d-1],a[d]];break;case 119:this.$=a[d]?{object:a[d-1],annotation:a[d]}:a[d-1];break;case 120:this.$=a[d-1].length?Ir("|",wr(a[d-1],a[d])):a[d];break;case 121:this.$=a[d-1].length?Ir("/",wr(a[d-1],a[d])):a[d];break;case 122:this.$=a[d]?Ir(a[d],[a[d-1]]):a[d-1];break;case 123:this.$=a[d-1]?Ir(a[d-1],[a[d]]):a[d];break;case 125:case 131:this.$=Ir(a[d-1],[a[d]]);break;case 129:this.$=Ir("|",wr(a[d-2],a[d-1]));break;case 132:case 134:this.$=function(e){var t=kr(),r=t,n=[],i=[];e.forEach((function(e){n.push(e.entity),Tr(i,e.triples)}));for(var a=0,o=0,s=n.length,c=Array(2*s);a2&&E.push("'"+this.terminals_[T]+"'");A=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:f,expected:E})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+m);switch(_[0]){case 1:r.push(m),n.push(d.yytext),i.push(d.yylloc),r.push(_[1]),m=null,b?(m=b,b=null):(c=d.yyleng,o=d.yytext,s=d.yylineno,f=d.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[_[1]][1],x.$=n[n.length-S],x._$={first_line:i[i.length-(S||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(S||1)].first_column,last_column:i[i.length-1].last_column},g&&(x._$.range=[i[i.length-(S||1)].range[0],i[i.length-1].range[1]]),void 0!==(w=this.performAction.apply(x,[o,c,s,h.yy,_[1],n,i].concat(l))))return w;S&&(r=r.slice(0,-1*S*2),n=n.slice(0,-1*S),i=i.slice(0,-1*S)),r.push(this.productions_[_[1]][0]),n.push(x.$),i.push(x._$),O=a[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}},or=r(54516).t,sr="http://www.w3.org/1999/02/22-rdf-syntax-ns#",cr=sr+"type",ur=sr+"first",lr=sr+"rest",dr=sr+"nil",hr="http://www.w3.org/2001/XMLSchema#",pr=hr+"integer",fr=hr+"decimal",yr=hr+"double",gr=hr+"boolean",mr="",br="",vr="";function _r(e){return e.toLowerCase()}function wr(e,t){return e.push(t),e}function Tr(e,t){return e.push.apply(e,t),e}function Sr(e){e||(e={});for(var t,r=1,n=arguments.length;r>10),56320+(1023&i))}var a=Ur[n];if(!a)throw new Error;return a}))}catch(e){return""}if(qr.exec(e))throw new Error("Invalid unicode codepoint of surrogate pair without corresponding codepoint in "+e);return e}function $r(e,t,r){var n=[],i=[];return t.forEach((function(t){let r=null;t.annotation&&(r=t.annotation,t=t.object),n.push(Lr(null,e,t.entity,r)),Tr(i,t.triples)})),Or(n,r||[],i)}function Hr(e){return e.variable?e.variable.value:e.value||e.expression.value}function Gr(e){if(!e)return[];if("aggregate"===e.type)return[e];if("operation"===e.type){const t=[];for(const r of e.args)t.push(...Gr(r));return t}return[]}function zr(e){const t=new Set,r=function(e){e&&("Variable"===e.termType?t.add(e):"operation"===e.type&&e.args.forEach(r))};return r(e),t}function Kr(e,t=1,r=[]){for(const n of e)t>0&&n instanceof Array?Kr(n,t-1,r):r.push(n);return r}function Xr(e){return"Variable"===e.termType}function Jr(e){if(e.triples){const t=[];for(const r of e.triples)Xr(r.subject)&&t.push(r.subject.value),Xr(r.predicate)&&t.push(r.predicate.value),Xr(r.object)&&t.push(r.object.value);return t}if(e.patterns){const t=[];for(const r of e.patterns)t.push(...Jr(r));return t}return[]}function Wr(e){if(!nn.sparqlStar)throw new Error("SPARQL-star support is not enabled");return e}function Yr(e,t,r){for(const n of t){const t=Lr("subject"in n?n.subject:e,n.predicate,n.object);r.push(t),n.annotations&&Yr(Mr(e,n.predicate,n.object),n.annotations,r)}}function Zr(e){if(nn.sparqlStar){const t=[];return e.forEach((e=>{const r=Lr(e.subject,e.predicate,e.object);t.push(r),e.annotations&&Yr(Mr(e.subject,e.predicate,e.object),e.annotations,t)})),t}return e}function en(e){for(const t of e){if("graph"===t.type&&"Variable"===t.name.termType)throw new Error("Detected illegal variable in GRAPH");if("bgp"===t.type||"graph"===t.type)for(const e of t.triples)if("Variable"===e.subject.termType||"Variable"===e.predicate.termType||"Variable"===e.object.termType)throw new Error("Detected illegal variable in BGP")}return e}function tn(e){for(const t of e)if("bgp"===t.type)for(const e of t.triples)if("BlankNode"===e.subject.termType||"BlankNode"===e.predicate.termType||"BlankNode"===e.object.termType)throw new Error("Detected illegal blank node in BGP");return e}var rn={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var r,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;at[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{flex:!0,"case-insensitive":!0},performAction:function(e,t,r,n){switch(r){case 0:break;case 1:return 12;case 2:return 15;case 3:return 41;case 4:return 325;case 5:return 326;case 6:return 45;case 7:return 47;case 8:return 48;case 9:return 39;case 10:return 24;case 11:return 28;case 12:return 29;case 13:return 31;case 14:return 32;case 15:return 36;case 16:return 53;case 17:return 327;case 18:return 63;case 19:return 64;case 20:return 70;case 21:return 73;case 22:return 76;case 23:return 78;case 24:return 81;case 25:return 83;case 26:return 85;case 27:return 193;case 28:return 100;case 29:return 328;case 30:return 121;case 31:return 329;case 32:return 330;case 33:return 110;case 34:return 331;case 35:return 109;case 36:return 332;case 37:return 333;case 38:return 113;case 39:return 115;case 40:return 116;case 41:return 131;case 42:return 123;case 43:return 126;case 44:return 128;case 45:return 132;case 46:return 112;case 47:return 334;case 48:return 335;case 49:return 159;case 50:return 161;case 51:return 164;case 52:return 174;case 53:return 160;case 54:return 336;case 55:return 163;case 56:return 312;case 57:return 314;case 58:return 317;case 59:return 318;case 60:return 272;case 61:return 197;case 62:return 337;case 63:return 338;case 64:return 229;case 65:return 340;case 66:return 263;case 67:return 224;case 68:return 231;case 69:return 232;case 70:return 242;case 71:return 246;case 72:return 290;case 73:return 341;case 74:return 342;case 75:return 343;case 76:return 344;case 77:return 345;case 78:return 250;case 79:return 346;case 80:return 265;case 81:return 276;case 82:return 277;case 83:return 268;case 84:return 269;case 85:return 270;case 86:return 271;case 87:return 347;case 88:return 348;case 89:return 273;case 90:return 274;case 91:return 350;case 92:return 349;case 93:return 351;case 94:return 279;case 95:return 280;case 96:return 283;case 97:return 285;case 98:return 289;case 99:return 293;case 100:return 296;case 101:return 13;case 102:return 16;case 103:return 308;case 104:return 309;case 105:return 87;case 106:return 292;case 107:return 82;case 108:return 294;case 109:return 295;case 110:return 297;case 111:return 298;case 112:return 299;case 113:return 300;case 114:return 301;case 115:return 302;case 116:return"EXPONENT";case 117:return 303;case 118:return 304;case 119:return 305;case 120:return 306;case 121:return 89;case 122:return 310;case 123:return 6;case 124:return"INVALID";case 125:console.log(t.yytext)}},rules:[/^(?:\s+|(#[^\n\r]*))/i,/^(?:BASE)/i,/^(?:PREFIX)/i,/^(?:SELECT)/i,/^(?:DISTINCT)/i,/^(?:REDUCED)/i,/^(?:\()/i,/^(?:AS)/i,/^(?:\))/i,/^(?:\*)/i,/^(?:CONSTRUCT)/i,/^(?:WHERE)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:DESCRIBE)/i,/^(?:ASK)/i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|TIMEZONE|TZ|MD5|SHA1|SHA256|SHA384|SHA512|isIRI|isURI|isBLANK|isLITERAL|isNUMERIC))/i,/^(?:(SUBJECT|PREDICATE|OBJECT|isTRIPLE))/i,/^(?:(LANGMATCHES|CONTAINS|STRSTARTS|STRENDS|STRBEFORE|STRAFTER|STRLANG|STRDT|sameTerm))/i,/^(?:CONCAT)/i,/^(?:COALESCE)/i,/^(?:IF)/i,/^(?:TRIPLE)/i,/^(?:REGEX)/i,/^(?:SUBSTR)/i,/^(?:REPLACE)/i,/^(?:EXISTS)/i,/^(?:COUNT)/i,/^(?:SUM|MIN|MAX|AVG|SAMPLE)/i,/^(?:GROUP_CONCAT)/i,/^(?:SEPARATOR)/i,/^(?:\^\^)/i,/^(?:true|false)/i,/^(?:(<(?:[^<>\"\{\}\|\^`\\\u0000-\u0020])*>))/i,/^(?:((([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?)?:))/i,/^(?:(((([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?)?:)((?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|:|[0-9]|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.|:|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))*(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|:|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%)))))?)))/i,/^(?:(_:(?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?))/i,/^(?:([\?\$]((?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9])(?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])*)))/i,/^(?:(@[a-zA-Z]+(?:-[a-zA-Z0-9]+)*))/i,/^(?:([0-9]+))/i,/^(?:([0-9]*\.[0-9]+))/i,/^(?:([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+)))/i,/^(?:(\+([0-9]+)))/i,/^(?:(\+([0-9]*\.[0-9]+)))/i,/^(?:(\+([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+))))/i,/^(?:(-([0-9]+)))/i,/^(?:(-([0-9]*\.[0-9]+)))/i,/^(?:(-([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+))))/i,/^(?:([eE][+-]?[0-9]+))/i,/^(?:('(?:(?:[^\u0027\u005C\u000A\u000D])|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])))*'))/i,/^(?:("(?:(?:[^\u0022\u005C\u000A\u000D])|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])))*"))/i,/^(?:('''(?:(?:'|'')?(?:[^'\\]|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f]))))*'''))/i,/^(?:("""(?:(?:"|"")?(?:[^\"\\]|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f]))))*"""))/i,/^(?:(\((\u0020|\u0009|\u000D|\u000A)*\)))/i,/^(?:(\[(\u0020|\u0009|\u000D|\u000A)*\]))/i,/^(?:$)/i,/^(?:.)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125],inclusive:!0}}};function nn(){this.yy={}}return ar.lexer=rn,nn.prototype=ar,ar.Parser=nn,new nn}();e.exports=n},54516:e=>{class t{constructor(){return r||this}equals(e){return e&&this.termType===e.termType}}Object.defineProperty(t.prototype,"value",{enumerable:!0,value:"*"}),Object.defineProperty(t.prototype,"termType",{enumerable:!0,value:"Wildcard"});var r=new t;e.exports.t=t},55403:(e,t,r)=>{var n=r(17308).Parser,i=r(33206),a=r(54516).t,{DataFactory:o}=r(18050);e.exports={Parser:function({prefixes:e,baseIRI:t,factory:r,sparqlStar:i,skipValidation:a,skipUngroupedVariableCheck:s,pathOnly:c}={}){var u={};for(var l in e||{})u[l]=e[l];var d=new n;return d.parse=function(){return n.base=t||"",n.prefixes=Object.create(u),n.factory=r||new o,n.sparqlStar=Boolean(i),n.pathOnly=Boolean(c),n.skipValidation=Boolean(a)||Boolean(s),n.prototype.parse.apply(d,arguments)},d._resetBlanks=n._resetBlanks,d},Generator:i,Wildcard:a}},21451:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(71839),t)},71839:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SparqlJsonParser=void 0;const n=r(18050),i=r(58521),a=r(36885);t.SparqlJsonParser=class{constructor(e){var t;e=e||{},this.dataFactory=e.dataFactory||new n.DataFactory,this.prefixVariableQuestionMark=!!e.prefixVariableQuestionMark,this.suppressMissingStreamResultsError=null===(t=e.suppressMissingStreamResultsError)||void 0===t||t}parseJsonResults(e){return e.results.bindings.map((e=>this.parseJsonBindings(e)))}parseJsonResultsStream(e){const t=e=>s.emit("error",e);e.on("error",t);const r=new a;r.onError=t;let n=!1,o=!1;r.onValue=e=>{if("vars"===r.key&&2===r.stack.length&&"head"===r.stack[1].key)s.emit("variables",e.map((e=>this.dataFactory.variable(e)))),n=!0;else if("results"===r.key&&1===r.stack.length)o=!0;else if("number"==typeof r.key&&3===r.stack.length&&"results"===r.stack[1].key&&"bindings"===r.stack[2].key)try{s.push(this.parseJsonBindings(e))}catch(e){s.emit("error",e)}else"metadata"===r.key&&1===r.stack.length&&s.emit("metadata",e)};const s=e.on("end",(e=>{o||this.suppressMissingStreamResultsError?n||s.emit("variables",[]):s.emit("error",new Error("No valid SPARQL query results were found."))})).pipe(new i.Transform({objectMode:!0,transform(e,t,n){r.write(e),n()}}));return s}parseJsonBindings(e){const t={};for(const r in e){const n=e[r];t[this.prefixVariableQuestionMark?"?"+r:r]=this.parseJsonValue(n)}return t}parseJsonValue(e){let t;switch(e.type){case"bnode":t=this.dataFactory.blankNode(e.value);break;case"literal":t=e["xml:lang"]?this.dataFactory.literal(e.value,e["xml:lang"]):e.datatype?this.dataFactory.literal(e.value,this.dataFactory.namedNode(e.datatype)):this.dataFactory.literal(e.value);break;case"typed-literal":t=this.dataFactory.literal(e.value,this.dataFactory.namedNode(e.datatype));break;case"triple":const r=e.value;if(!(r&&r.subject&&r.predicate&&r.object))throw new Error("Invalid quoted triple: "+JSON.stringify(e));t=this.dataFactory.quad(this.parseJsonValue(r.subject),this.parseJsonValue(r.predicate),this.parseJsonValue(r.object));break;default:t=this.dataFactory.namedNode(e.value)}return t}parseJsonBoolean(e){if("boolean"in e)return e.boolean;throw new Error("No valid ASK response was found.")}parseJsonBooleanStream(e){return new Promise(((t,r)=>{const n=new a;n.onError=r,n.onValue=e=>{"boolean"===n.key&&"boolean"==typeof e&&1===n.stack.length&&t(e)},e.on("error",r).on("data",(e=>n.write(e))).on("end",(()=>r(new Error("No valid ASK response was found."))))}))}}},43004:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(78780),t)},78780:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Converter=void 0;const n=r(80740),i=r(21451);class a{constructor(e){(e=e||{delimiter:"_"}).prefixVariableQuestionMark=!1,this.delimiter=e.delimiter||"_",this.parser=new i.SparqlJsonParser(e),this.materializeRdfJsTerms=e.materializeRdfJsTerms}static addValueToTree(e,t,r,n,i,o){const s=t[0],c=n?n+o+s:s,u=i.singularizeVariables[c];if(1===t.length)u?e[s]||(e[s]=r):(e[s]||(e[s]=[]),e[s].push(r));else{let n;u?(e[s]||(e[s]={}),n=e[s]):(e[s]||(e[s]=[{}]),n=e[s][0]),a.addValueToTree(n,t.slice(1),r,c,i,o)}}static mergeTrees(e,t){if(typeof e!=typeof t)throw new Error(`Two incompatible tree nodes were found: ${typeof e} and ${typeof t}`);if(Array.isArray(e)!==Array.isArray(t))throw new Error(`Two incompatible tree nodes were found: Array?${Array.isArray(e)} and Array?${Array.isArray(t)}`);if("object"==typeof e&&"object"==typeof t){if(e.termType&&t.termType)return e.equals(t)?{valid:!0,result:e}:{valid:!1,result:e};if(Array.isArray(e)&&Array.isArray(t)){if(e.length>0){const r=[];let n=!1;for(const i of e){const e=a.mergeTrees(i,t[0]);e.valid?(n=!0,r.push(e.result)):r.push(i)}if(n)return{valid:!0,result:r}}return{valid:!0,result:e.concat(t)}}{const r={};for(const e in t)r[e]=t[e];for(const t in e)if(r[t]){const n=a.mergeTrees(e[t],r[t]);if(!n.valid)return{valid:!1,result:e};r[t]=n.result}else r[t]=e[t];return{valid:!0,result:r}}}throw new Error(`Unmergable tree types: ${typeof e} and ${typeof t}`)}static materializeTree(e){if(e.termType)return(0,n.getTermRaw)(e);if(Array.isArray(e))return e.map(a.materializeTree);{const t={};for(const r in e)t[r]=a.materializeTree(e[r]);return t}}sparqlJsonResultsToTree(e,t){return this.bindingsToTree(this.parser.parseJsonResults(e),t||{singularizeVariables:{}})}bindingsToTree(e,t){const r=t&&t.singularizeVariables[""];let n=r?{}:[];for(const i of e){const e=r?{}:[{}];for(const n in i){const o=n.split(this.delimiter),s=i[n];a.addValueToTree(r?e:e[0],o,s,"",t,this.delimiter)}n=a.mergeTrees(n,e).result}return this.materializeRdfJsTerms&&(n=a.materializeTree(n)),n}}t.Converter=a},52666:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(49679),t)},49679:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SparqlXmlParser=void 0;const n=r(18050),i=r(49126),a=r(58521);t.SparqlXmlParser=class{constructor(e){e=e||{},this.dataFactory=e.dataFactory||new n.DataFactory,this.prefixVariableQuestionMark=!!e.prefixVariableQuestionMark}parseXmlResultsStream(e){const t=e=>y.emit("error",e);e.on("error",t);const r=new i.SaxesParser,n=[];let o=!1,s=!1;const c=[];let u,l={},d="",h="",p="",f=[];r.on("error",t),r.on("opentag",(e=>{"variable"===e.name&&this.stackEquals(n,["sparql","head"])?c.push(this.dataFactory.variable(e.attributes.name)):"results"===e.name&&this.stackEquals(n,["sparql"])?s=!0:"result"===e.name&&this.stackEquals(n,["sparql","results"])?l={}:"binding"===e.name&&this.stackEquals(n,["sparql","results","result"])?(d=e.attributes.name||"",h="",u="",p="",f=[]):"triple"===e.name&&this.stackBeginsWith(n,["sparql","results","result"])?f.push({components:{}}):"triple"===n[n.length-1]&&this.stackBeginsWith(n,["sparql","results","result","binding"])?(h="",u="",p="",["subject","predicate","object"].includes(e.name)?f[f.length-1].currentComponent=e.name:t(new Error(`Illegal quoted triple component '${e.name}' found on line ${r.line+1}`))):this.stackBeginsWith(n,["sparql","results","result","binding"])&&(h=e.name,u="xml:lang"in e.attributes?e.attributes["xml:lang"]:"datatype"in e.attributes?this.dataFactory.namedNode(e.attributes.datatype):void 0),n.push(e.name)})),r.on("closetag",(e=>{if(this.stackEquals(n,["sparql","head"])&&(y.emit("variables",c),o=!0),this.stackEquals(n,["sparql","results","result"])&&y.push(l),this.stackBeginsWith(n,["sparql","results","result","binding"])){let e;if(!d&&h)t(new Error(`Terms should have a name on line ${r.line+1}`));else if("uri"===h)e=this.dataFactory.namedNode(p);else if("bnode"===h)e=this.dataFactory.blankNode(p);else if("literal"===h)e=this.dataFactory.literal(p,u);else if("triple"===n[n.length-1]){const n=f.pop();n&&n.components.subject&&n.components.predicate&&n.components.object?e=this.dataFactory.quad(n.components.subject,n.components.predicate,n.components.object):t(new Error(`Incomplete quoted triple on line ${r.line+1}`))}else h&&t(new Error(`Invalid term type '${h}' on line ${r.line+1}`));if(e)if(f.length>0){const n=f[f.length-1];n.components[n.currentComponent]&&t(new Error(`The ${n.currentComponent} in a quoted triple on line ${r.line+1} was already defined before`)),n.components[n.currentComponent]=e}else{const t=this.prefixVariableQuestionMark?"?"+d:d;l[t]=e}h=void 0}n.pop()})),r.on("text",(e=>{this.stackBeginsWith(n,["sparql","results","result","binding"])&&n[n.length-1]===h&&(p=e)}));const y=e.on("end",(e=>{s?o||y.emit("variables",[]):y.emit("error",new Error("No valid SPARQL query results were found."))})).pipe(new a.Transform({objectMode:!0,transform(e,t,n){r.write(e),n()}}));return y}parseXmlBooleanStream(e){return new Promise(((t,r)=>{const n=new i.SaxesParser,a=[];n.on("error",r),n.on("opentag",(e=>{a.push(e.name)})),n.on("closetag",(e=>{a.pop()})),n.on("text",(e=>{this.stackEquals(a,["sparql","boolean"])&&t("true"===e)})),e.on("error",r).on("data",(e=>n.write(e))).on("end",(()=>r(new Error("No valid ASK response was found."))))}))}stackEquals(e,t){return e.length===t.length&&e.every(((e,r)=>t[r]===e))}stackBeginsWith(e,t){return e.length>=t.length&&t.every(((t,r)=>e[r]===t))}}},76574:(e,t,r)=>{var n=r(21848);e.exports=function(e,t,r){"function"==typeof t&&(r=t,t=null);var i="",a=new n((function(r,n){e.on("data",(function(e){i+="string"==typeof t?e.toString(t):e.toString()})),e.on("end",(function(){r(i)})),e.on("error",n)}));return r&&a.then((function(e){r(null,e)}),r),a}},18888:(e,t,r)=>{"use strict";var n=r(25636).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},68492:e=>{!function(t){"use strict";var r=function(){function e(e){this.options=e}return e.prototype.toString=function(){return JSON&&JSON.stringify?JSON.stringify(this.options):this.options},e}(),n={isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},isString:function(e){return"[object String]"===Object.prototype.toString.apply(e)},isNumber:function(e){return"[object Number]"===Object.prototype.toString.apply(e)},isBoolean:function(e){return"[object Boolean]"===Object.prototype.toString.apply(e)},join:function(e,t){var r,n="",i=!0;for(r=0;r="0"&&e<="9"}return{isAlpha:function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"},isDigit:e,isHexDigit:function(t){return e(t)||t>="a"&&t<="f"||t>="A"&&t<="F"}}}(),a=function(){var e=function(e){return e<=127?1:194<=e&&e<=223?2:224<=e&&e<=239?3:240<=e&&e<=244?4:0},t=function(e){return 128<=e&&e<=191};function r(e,t){return"%"===e.charAt(t)&&i.isHexDigit(e.charAt(t+1))&&i.isHexDigit(e.charAt(t+2))}function n(e,t){return parseInt(e.substr(t,2),16)}return{encodeCharacter:function(e){var t,r,n="",i=function(e){return unescape(encodeURIComponent(e))}(e);for(r=0;r1?r+=n:r+=c(n)||s(n)?n:a.encodeCharacter(n);return r},encodeLiteralCharacter:function(e,t){var r=a.pctCharAt(e,t);return r.length>1||c(r)||s(r)?r:a.encodeCharacter(r)}}}(),l=function(){var e={};function t(t){e[t]={symbol:t,separator:"?"===t?"&":""===t||"+"===t||"#"===t?",":t,named:";"===t||"&"===t||"?"===t,ifEmpty:"&"===t||"?"===t?"=":"",first:"+"===t?"":t,encode:"+"===t||"#"===t?u.encodePassReserved:u.encode,toString:function(){return this.symbol}}}return t(""),t("+"),t("#"),t("."),t("/"),t(";"),t("?"),t("&"),{valueOf:function(t){return e[t]?e[t]:"=,!@|".indexOf(t)>=0?null:e[""]}}}();function d(e){var t;if(null==e)return!1;if(n.isArray(e))return e.length>0;if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return!0;for(t in e)if(e.hasOwnProperty(t)&&d(e[t]))return!0;return!1}var h=function(){function e(e){this.literal=u.encodeLiteral(e)}return e.prototype.expand=function(){return this.literal},e.prototype.toString=e.prototype.expand,e}(),p=function(){function e(e){var t,n,s=[],c=null,u=null,d=null,h="";function p(){var t=e.substring(u,n);if(0===t.length)throw new r({expressionText:e,message:"a varname must be specified",position:n});c={varname:t,exploded:!1,maxLength:null},u=null}function y(){if(d===n)throw new r({expressionText:e,message:"after a ':' you have to specify the length",position:n});c.maxLength=parseInt(e.substring(d,n),10),d=null}for(t=function(t){var i=l.valueOf(t);if(null===i)throw new r({expressionText:e,message:"illegal use of reserved operator",position:n,operator:t});return i}(e.charAt(0)),n=t.symbol.length,u=n;n=4)throw new r({expressionText:e,message:"A :prefix must have max 4 digits",position:n});continue}y()}if(":"!==h)if("*"!==h){if(","!==h)throw new r({expressionText:e,message:"illegal character",character:h,position:n});s.push(c),c=null,u=n+1}else{if(null===c)throw new r({expressionText:e,message:"exploded without varspec",position:n});if(c.exploded)throw new r({expressionText:e,message:"exploded twice",position:n});if(c.maxLength)throw new r({expressionText:e,message:"an explode (*) MUST NOT follow to a prefix",position:n});c.exploded=!0}else{if(null!==c.maxLength)throw new r({expressionText:e,message:"only one :maxLength is allowed per varspec",position:n});if(c.exploded)throw new r({expressionText:e,message:"an exploeded varspec MUST NOT be varspeced",position:n});d=n+1}}return null!==u&&p(),null!==d&&y(),s.push(c),new f(e,t,s)}return function(t){var n,i,a=[],o=null,s=0;for(n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return c.default}});var n=h(r(74603)),i=h(r(22298)),a=h(r(42712)),o=h(r(93423)),s=h(r(35911)),c=h(r(24072)),u=h(r(4564)),l=h(r(46585)),d=h(r(29975));function h(e){return e&&e.__esModule?e:{default:e}}},72668:(e,t)=>{"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function n(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function i(e,t,r,i,a,o){return n((s=n(n(t,e),n(i,o)))<<(c=a)|s>>>32-c,r);var s,c}function a(e,t,r,n,a,o,s){return i(t&r|~t&n,e,t,a,o,s)}function o(e,t,r,n,a,o,s){return i(t&n|r&~n,e,t,a,o,s)}function s(e,t,r,n,a,o,s){return i(t^r^n,e,t,a,o,s)}function c(e,t,r,n,a,o,s){return i(r^(t|~n),e,t,a,o,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let r=0;r>5]>>>i%32&255,a=parseInt(n.charAt(r>>>4&15)+n.charAt(15&r),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[r/8])<{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};t.default=r},35911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default="00000000-0000-0000-0000-000000000000"},29975:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(4564))&&n.__esModule?n:{default:n};t.default=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}},16635:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},74089:(e,t)=>{"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)};const n=new Uint8Array(16)},34271:(e,t)=>{"use strict";function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let r=0;r>>0;d=l,l=u,u=n(c,30)>>>0,c=o,o=s}i[0]=i[0]+o>>>0,i[1]=i[1]+c>>>0,i[2]=i[2]+u>>>0,i[3]=i[3]+l>>>0,i[4]=i[4]+d>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]}},46585:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=o;var n,i=(n=r(4564))&&n.__esModule?n:{default:n};const a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));function o(e,t=0){return a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]}t.default=function(e,t=0){const r=o(e,t);if(!(0,i.default)(r))throw TypeError("Stringified UUID is invalid");return r}},74603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(74089))&&n.__esModule?n:{default:n},a=r(46585);let o,s,c=0,u=0;t.default=function(e,t,r){let n=t&&r||0;const l=t||new Array(16);let d=(e=e||{}).node||o,h=void 0!==e.clockseq?e.clockseq:s;if(null==d||null==h){const t=e.random||(e.rng||i.default)();null==d&&(d=o=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==h&&(h=s=16383&(t[6]<<8|t[7]))}let p=void 0!==e.msecs?e.msecs:Date.now(),f=void 0!==e.nsecs?e.nsecs:u+1;const y=p-c+(f-u)/1e4;if(y<0&&void 0===e.clockseq&&(h=h+1&16383),(y<0||p>c)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=p,u=f,s=h,p+=122192928e5;const g=(1e4*(268435455&p)+f)%4294967296;l[n++]=g>>>24&255,l[n++]=g>>>16&255,l[n++]=g>>>8&255,l[n++]=255&g;const m=p/4294967296*1e4&268435455;l[n++]=m>>>8&255,l[n++]=255&m,l[n++]=m>>>24&15|16,l[n++]=m>>>16&255,l[n++]=h>>>8|128,l[n++]=255&h;for(let e=0;e<6;++e)l[n+e]=d[e];return t||(0,a.unsafeStringify)(l)}},22298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(14782)),i=a(r(72668));function a(e){return e&&e.__esModule?e:{default:e}}var o=(0,n.default)("v3",48,i.default);t.default=o},14782:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,r){function n(e,n,o,s){var c;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(40193)),i=o(r(74089)),a=r(46585);function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t,r){if(n.default.randomUUID&&!t&&!e)return n.default.randomUUID();const o=(e=e||{}).random||(e.rng||i.default)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=o[e];return t}return(0,a.unsafeStringify)(o)}},93423:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(14782)),i=a(r(34271));function a(e){return e&&e.__esModule?e:{default:e}}var o=(0,n.default)("v5",80,i.default);t.default=o},4564:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(16635))&&n.__esModule?n:{default:n};t.default=function(e){return"string"==typeof e&&i.default.test(e)}},24072:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(4564))&&n.__esModule?n:{default:n};t.default=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},29815:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(33285),t)},33285:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateIri=t.IriValidationStrategy=void 0;const r=function(){const e="[!$&'()*+,;=]",t="%[a-fA-F0-9]{2}",r="([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",n=`${r}\\.${r}\\.${r}\\.${r}`,i="[a-fA-F0-9]{1,4}",a=`(${i}:${i}|${n})`,o="[a-zA-Z0-9\\-._~ -퟿豈-﷏ﷰ-￯𐀀-🿽𠀀-𯿽𰀀-𿿽񀀀-񏿽񐀀-񟿽񠀀-񯿽񰀀-񿿽򀀀-򏿽򐀀-򟿽򠀀-򯿽򰀀-򿿽󀀀-󏿽󐀀-󟿽󡀀-󯿽]",s=`(${o}|${t}|${e}|[:@])*`,c=`(${s})+`,u=`(${s})*`;return new RegExp(`^[a-zA-Z][a-zA-Z0-9+\\-.]*:(\\/\\/((${o}|${t}|${e}|:)*@)?(\\[(((${i}:){6}${a}|::(${i}:){5}${a}|(${i})?::(${i}:){4}${a}|((${i}:){0,1}${i})?::(${i}:){3}${a}|((${i}:){0,2}${i})?::(${i}:){2}${a}|((${i}:){0,3}${i})?::${i}:${a}|((${i}:){0,4}${i})?::${a}|((${i}:){0,5}${i})?::${i}|((${i}:){0,6}${i})?::)|v[a-fA-F0-9]+\\.(${e}|${e}|":)+)\\]|${n}|(${o}|${t}|${e})*)(:[0-9]*)?(\\/${u})*|\\/(${c}(\\/${u})*)?|${c}(\\/${u})*|)(\\?(${s}|[-󰀀-󿿽􀀀-􏿽]|[\\/?])*)?(#(${s}|[\\/?])*)?$`,"u")}(),n=/^[A-Za-z][\d+-.A-Za-z]*:[^\u0000-\u0020"<>\\^`{|}]*$/u;var i;!function(e){e.Strict="strict",e.Pragmatic="pragmatic",e.None="none"}(i=t.IriValidationStrategy||(t.IriValidationStrategy={})),t.validateIri=function(e,t=i.Strict){switch(t){case i.Strict:return r.test(e)?void 0:new Error(`Invalid IRI according to RFC 3987: '${e}'`);case i.Pragmatic:return n.test(e)?void 0:new Error(`Invalid IRI according to RDF Turtle: '${e}'`);case i.None:return;default:return new Error(`Not supported validation strategy "${t}"`)}}},55675:(e,t,r)=>{e.exports=function e(t,r,n){function i(o,s){if(!r[o]){if(!t[o]){if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[o]={exports:{}};t[o][0].call(u.exports,(function(e){return i(t[o][1][e]||e)}),u,u.exports,e,t,r,n)}return r[o].exports}for(var a=void 0,o=0;o=0;s--)if(c[s]!==u[s])return!1;for(s=c.length-1;s>=0;s--)if(!h(e[o=c[s]],t[o],r,n))return!1;return!0}(e,t,r,s))}return r?e===t:e==t}function p(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function f(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function y(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&l(i,r,"Missing expected exception"+n);var a="string"==typeof n,o=!e&&i&&!r;if((!e&&g.isError(i)&&a&&f(i,r)||o)&&l(i,r,"Got unwanted exception"+n),e&&i&&r&&!f(i,r)||!e&&i)throw i}var g=e("util/"),m=Object.prototype.hasOwnProperty,b=Array.prototype.slice,v="foo"===function(){}.name,_=t.exports=d,w=/\s*function\s+([^\(\s]*)\s*/;_.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return c(u(e.actual),128)+" "+e.operator+" "+c(u(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||l;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=s(t),a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},g.inherits(_.AssertionError,Error),_.fail=l,_.ok=d,_.equal=function(e,t,r){e!=t&&l(e,t,r,"==",_.equal)},_.notEqual=function(e,t,r){e==t&&l(e,t,r,"!=",_.notEqual)},_.deepEqual=function(e,t,r){h(e,t,!1)||l(e,t,r,"deepEqual",_.deepEqual)},_.deepStrictEqual=function(e,t,r){h(e,t,!0)||l(e,t,r,"deepStrictEqual",_.deepStrictEqual)},_.notDeepEqual=function(e,t,r){h(e,t,!1)&&l(e,t,r,"notDeepEqual",_.notDeepEqual)},_.notDeepStrictEqual=function e(t,r,n){h(t,r,!0)&&l(t,r,n,"notDeepStrictEqual",e)},_.strictEqual=function(e,t,r){e!==t&&l(e,t,r,"===",_.strictEqual)},_.notStrictEqual=function(e,t,r){e===t&&l(e,t,r,"!==",_.notStrictEqual)},_.throws=function(e,t,r){y(!0,e,t,r)},_.doesNotThrow=function(e,t,r){y(!1,e,t,r)},_.ifError=function(e){if(e)throw e};var T=Object.keys||function(e){var t=[];for(var r in e)m.call(e,r)&&t.push(r);return t}}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":7}],3:[function(e,t,r){},{}],4:[function(e,t,r){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(){y&&p&&(y=!1,p.length?f=p.concat(f):g=-1,f.length&&s())}function s(){if(!y){var e=a(o);y=!0;for(var t=f.length;t;){for(p=f,f=[];++g1)for(var r=1;r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(t)?r.showHidden=t:t&&n._extend(r,t),y(r.showHidden)&&(r.showHidden=!1),y(r.depth)&&(r.depth=2),y(r.colors)&&(r.colors=!1),y(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=a),s(r,e,r.depth)}function a(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function o(e,t){return e}function s(e,t,r){if(e.customInspect&&t&&_(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return f(i)||(i=s(e,i,r)),i}var a=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(f(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return p(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):h(t)?e.stylize("null","null"):void 0}(e,t);if(a)return a;var o=Object.keys(t),m=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),v(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return c(t);if(0===o.length){if(_(t)){var w=t.name?": "+t.name:"";return e.stylize("[Function"+w+"]","special")}if(g(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(b(t))return e.stylize(Date.prototype.toString.call(t),"date");if(v(t))return c(t)}var T,O="",E=!1,x=["{","}"];return l(t)&&(E=!0,x=["[","]"]),_(t)&&(O=" [Function"+(t.name?": "+t.name:"")+"]"),g(t)&&(O=" "+RegExp.prototype.toString.call(t)),b(t)&&(O=" "+Date.prototype.toUTCString.call(t)),v(t)&&(O=" "+c(t)),0!==o.length||E&&0!=t.length?r<0?g(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),T=E?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(T,O,x)):x[0]+O+x[1]}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,t,r,n,i,a){var o,c,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?c=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(c=e.stylize("[Setter]","special")),S(n,i)||(o="["+i+"]"),c||(e.seen.indexOf(u.value)<0?(c=h(r)?s(e,u.value,null):s(e,u.value,r-1)).indexOf("\n")>-1&&(c=a?c.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+c.split("\n").map((function(e){return" "+e})).join("\n")):c=e.stylize("[Circular]","special")),y(o)){if(a&&i.match(/^\d+$/))return c;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+c}function l(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function h(e){return null===e}function p(e){return"number"==typeof e}function f(e){return"string"==typeof e}function y(e){return void 0===e}function g(e){return m(e)&&"[object RegExp]"===w(e)}function m(e){return"object"==typeof e&&null!==e}function b(e){return m(e)&&"[object Date]"===w(e)}function v(e){return m(e)&&("[object Error]"===w(e)||e instanceof Error)}function _(e){return"function"==typeof e}function w(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var O=/%[sdj%]/g;n.format=function(e){if(!f(e)){for(var t=[],r=0;r=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return 1},a=Object.create(Le.prototype);return o(a),M(a,Object.create(Be.prototype),e,t,r,n,i),a}function o(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function s(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function c(e){return void 0!==e._reader}function u(e){return new Promise((function(t,r){var n={_resolve:t,_reject:r};e._reader._readIntoRequests.push(n)}))}function l(e){return new Promise((function(t,r){var n={_resolve:t,_reject:r};e._reader._readRequests.push(n)}))}function d(e,t){return e._disturbed=!0,"closed"===e._state?Promise.resolve(void 0):"errored"===e._state?Promise.reject(e._storedError):(h(e),e._readableStreamController[Ce](t).then((function(){})))}function h(e){e._state="closed";var t=e._reader;if(void 0!==t){if(!0===_(t)){var r=!0,n=!1,i=void 0;try{for(var a,o=t._readRequests[Symbol.iterator]();!(r=(a=o.next()).done);r=!0)(0,a.value._resolve)(de(void 0,!0))}catch(e){n=!0,i=e}finally{try{!r&&o.return&&o.return()}finally{if(n)throw i}}t._readRequests=[]}!function(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(t)}}function p(e,t){e._state="errored",e._storedError=t;var r=e._reader;if(void 0!==r){if(!0===_(r)){var n=!0,i=!1,a=void 0;try{for(var o,s=r._readRequests[Symbol.iterator]();!(n=(o=s.next()).done);n=!0)o.value._reject(t)}catch(e){i=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}r._readRequests=[]}else{var c=!0,u=!1,l=void 0;try{for(var d,h=r._readIntoRequests[Symbol.iterator]();!(c=(d=h.next()).done);c=!0)d.value._reject(t)}catch(e){u=!0,l=e}finally{try{!c&&h.return&&h.return()}finally{if(u)throw l}}r._readIntoRequests=[]}re(r,t),r._closedPromise.catch((function(){}))}}function f(e,t,r){e._reader._readRequests.shift()._resolve(de(t,r))}function y(e){return e._reader._readIntoRequests.length}function g(e){return e._reader._readRequests.length}function m(e){var t=e._reader;return void 0!==t&&!1!==v(t)}function b(e){var t=e._reader;return void 0!==t&&!1!==_(t)}function v(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function _(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function w(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?function(e){e._closedPromise=new Promise((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}(e):"closed"===t._state?function(e){e._closedPromise=Promise.resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(e):(function(e,t){e._closedPromise=Promise.reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(e,t._storedError),e._closedPromise.catch((function(){})))}function T(e,t){return d(e._ownerReadableStream,t)}function S(e){"readable"===e._ownerReadableStream._state?re(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){e._closedPromise=Promise.reject(t)}(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._closedPromise.catch((function(){})),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function O(e,t){var r=e._ownerReadableStream;return r._disturbed=!0,"errored"===r._state?Promise.reject(r._storedError):function(e,t){var r=e._controlledReadableByteStream,n=1;t.constructor!==DataView&&(n=t.constructor.BYTES_PER_ELEMENT);var i=t.constructor,a={buffer:ye(t.buffer),byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:n,ctor:i,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(a),u(r);if("closed"===r._state){var o=new t.constructor(a.buffer,a.byteOffset,0);return Promise.resolve(de(o,!0))}if(e._queueTotalSize>0){if(!0===Q(e,a)){var s=q(a);return H(e),Promise.resolve(de(s,!1))}if(!0===e._closeRequested){var c=new TypeError("Insufficient bytes to fill elements in the given buffer");return J(e,c),Promise.reject(c)}}e._pendingPullIntos.push(a);var l=u(r);return F(e),l}(r._readableStreamController,t)}function E(e){var t=e._ownerReadableStream;return t._disturbed=!0,"closed"===t._state?Promise.resolve(de(void 0,!0)):"errored"===t._state?Promise.reject(t._storedError):t._readableStreamController[Me]()}function x(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function A(e){!1!==R(e)&&(!0!==e._pulling?(e._pulling=!0,e._pullAlgorithm().then((function(){if(e._pulling=!1,!0===e._pullAgain)return e._pullAgain=!1,A(e)}),(function(t){D(e,t)})).catch(_e)):e._pullAgain=!0)}function R(e){var t=e._controlledReadableStream;return!1!==C(e)&&!1!==e._started&&(!0===c(t)&&g(t)>0||j(e)>0)}function I(e){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&h(t)}function P(e,t){var r=e._controlledReadableStream;if(!0===c(r)&&g(r)>0)f(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(t){throw D(e,t),t}try{Se(e,t,n)}catch(t){throw D(e,t),t}}A(e)}function N(e,t){var r=e._controlledReadableStream;Oe(e),p(r,t)}function D(e,t){"readable"===e._controlledReadableStream._state&&N(e,t)}function j(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function C(e){var t=e._controlledReadableStream._state;return!1===e._closeRequested&&"readable"===t}function M(e,t,r,n,i,a,o){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Oe(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=o,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t;var s=r();Promise.resolve(s).then((function(){t._started=!0,A(t)}),(function(e){D(t,e)})).catch(_e)}function L(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function k(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function F(e){!1!==function(e){var t=e._controlledReadableByteStream;return"readable"===t._state&&!0!==e._closeRequested&&!1!==e._started&&(!0===b(t)&&g(t)>0||!0===m(t)&&y(t)>0||W(e)>0)}(e)&&(!0!==e._pulling?(e._pulling=!0,e._pullAlgorithm().then((function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,F(e))}),(function(t){"readable"===e._controlledReadableByteStream._state&&J(e,t)})).catch(_e)):e._pullAgain=!0)}function B(e){G(e),e._pendingPullIntos=[]}function U(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=q(t);"default"===t.readerType?f(e,n,r):function(e,t,r){e._reader._readIntoRequests.shift()._resolve(de(t,r))}(e,n,r)}function q(e){var t=e.bytesFilled,r=e.elementSize;return new e.ctor(e.buffer,e.byteOffset,t/r)}function V(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function Q(e,t){var r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i,o=a-a%r,s=i,c=!1;o>n&&(s=o-t.bytesFilled,c=!0);for(var u=e._queue;s>0;){var l=u[0],d=Math.min(s,l.byteLength),h=t.byteOffset+t.bytesFilled;ue(t.buffer,h,l.buffer,l.byteOffset,d),l.byteLength===d?u.shift():(l.byteOffset+=d,l.byteLength-=d),e._queueTotalSize-=d,$(e,d,t),s-=d}return c}function $(e,t,r){G(e),r.bytesFilled+=t}function H(e){0===e._queueTotalSize&&!0===e._closeRequested?h(e._controlledReadableByteStream):F(e)}function G(e){void 0!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=void 0,e._byobRequest=void 0)}function z(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos[0];!0===Q(e,t)&&(X(e),U(e._controlledReadableByteStream,t))}}function K(e,t){var r=e._pendingPullIntos[0];if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");!function(e,t){t.buffer=ye(t.buffer);var r=e._controlledReadableByteStream;if(!0===m(r))for(;y(r)>0;)U(r,X(e))}(e,r)}else!function(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if($(e,t,r),!(r.bytesFilled0){var i=r.byteOffset+r.bytesFilled,a=r.buffer.slice(i-n,i);V(e,a,0,a.byteLength)}r.buffer=ye(r.buffer),r.bytesFilled-=n,U(e._controlledReadableByteStream,r),z(e)}}(e,t,r)}function X(e){var t=e._pendingPullIntos.shift();return G(e),t}function J(e,t){var r=e._controlledReadableByteStream;B(e),Oe(e),p(r,t)}function W(e){var t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Y(e,t,r,n,i,a,o){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,B(t),t._queue=t._queueTotalSize=void 0,Oe(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=ge(a),t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=o,t._pendingPullIntos=[],e._readableStreamController=t;var s=r();Promise.resolve(s).then((function(){t._started=!0,F(t)}),(function(r){"readable"===e._state&&J(t,r)})).catch(_e)}function Z(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}function ee(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function te(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}function re(e,t){e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function ne(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}function ie(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function ae(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function oe(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}var se=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,a=r.highWaterMark;n(this,e),o(this);var s=t.type;if("bytes"===String(s)){if(void 0===a&&(a=0),a=ge(a),void 0!==i)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(e,t,r){var n=Object.create(qe.prototype),i=le(t,"pull",0,[n]),a=le(t,"cancel",1,[]),o=t.autoAllocateChunkSize;if(void 0!==o&&(!1===Number.isInteger(o)||o<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");Y(e,n,(function(){return pe(t,"start",[n])}),i,a,r,o)}(this,t,a)}else{if(void 0!==s)throw new RangeError("Invalid type is specified");void 0===a&&(a=1),function(e,t,r,n){var i=Object.create(Be.prototype),a=le(t,"pull",0,[i]),o=le(t,"cancel",1,[]);M(e,i,(function(){return pe(t,"start",[i])}),a,o,r,n)}(this,t,a=ge(a),me(i))}}return se(e,[{key:"cancel",value:function(e){return!1===s(this)?Promise.reject(Z("cancel")):!0===c(this)?Promise.reject(new TypeError("Cannot cancel a stream that already has a reader")):d(this,e)}},{key:"getReader",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mode;if(!1===s(this))throw Z("getReader");if(void 0===e)return i(this);if("byob"===(e=String(e)))return function(e){return new Fe(e)}(this);throw new RangeError("Invalid mode is specified")}},{key:"pipeThrough",value:function(e,t){var r=e.writable,n=e.readable;if(void 0===r||void 0===n)throw new TypeError("readable and writable arguments must be defined");return function(e){try{Promise.prototype.then.call(e,void 0,(function(){}))}catch(e){}}(this.pipeTo(r,t)),n}},{key:"pipeTo",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.preventClose,a=r.preventAbort,o=r.preventCancel;if(!1===s(this))return Promise.reject(Z("pipeTo"));if(!1===Ae(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));if(n=Boolean(n),a=Boolean(a),o=Boolean(o),!0===c(this))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"));if(!0===Re(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"));var u=i(this),l=xe(e),h=!1,p=Promise.resolve();return new Promise((function(r,i){function s(){var e=p;return p.then((function(){return e!==p?s():void 0}))}function c(e,t,r){"errored"===e._state?r(e._storedError):t.catch(r).catch(_e)}function f(t,r,n){function i(){t().then((function(){return g(r,n)}),(function(e){return g(!0,e)})).catch(_e)}!0!==h&&(h=!0,"writable"===e._state&&!1===je(e)?s().then(i):i())}function y(t,r){!0!==h&&(h=!0,"writable"===e._state&&!1===je(e)?s().then((function(){return g(t,r)})).catch(_e):g(t,r))}function g(e,t){Ne(l),S(u),e?i(t):r(void 0)}if(c(t,u._closedPromise,(function(t){!1===a?f((function(){return Ie(e,t)}),!0,t):y(!0,t)})),c(e,l._closedPromise,(function(e){!1===o?f((function(){return d(t,e)}),!0,e):y(!0,e)})),function(e,t,r){"closed"===e._state?r():t.then(r).catch(_e)}(t,u._closedPromise,(function(){!1===n?f((function(){return Pe(l)})):y()})),!0===je(e)||"closed"===e._state){var m=new TypeError("the destination writable stream closed before all data could be piped to it");!1===o?f((function(){return d(t,m)}),!0,m):y(!0,m)}(function e(){return!0===h?Promise.resolve():l._readyPromise.then((function(){return E(u).then((function(e){var t=e.value;!0!==e.done&&(p=De(l,t).catch((function(){})))}))})).then(e)})().catch((function(e){p=Promise.resolve(),_e(e)}))}))}},{key:"tee",value:function(){if(!1===s(this))throw Z("tee");var e=function(e,t){function r(){return E(o).then((function(e){var t=e.value;if(!0===e.done&&!1===s&&(!1===c&&I(p._readableStreamController),!1===u&&I(f._readableStreamController),s=!0),!0!==s){var r=t,n=t;!1===c&&P(p._readableStreamController,r),!1===u&&P(f._readableStreamController,n)}}))}function n(){}var o=i(e),s=!1,c=!1,u=!1,l=void 0,h=void 0,p=void 0,f=void 0,y=void 0,g=new Promise((function(e){y=e}));return p=a(n,r,(function(t){if(c=!0,l=t,!0===u){var r=be([l,h]),n=d(e,r);y(n)}return g})),f=a(n,r,(function(t){if(u=!0,h=t,!0===c){var r=be([l,h]),n=d(e,r);y(n)}return g})),o._closedPromise.catch((function(e){!0!==s&&(D(p._readableStreamController,e),D(f._readableStreamController,e),s=!0)})),[p,f]}(this);return be(e)}},{key:"locked",get:function(){if(!1===s(this))throw Z("locked");return c(this)}}]),e}();t.exports={CreateReadableByteStream:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,a=Object.create(Le.prototype);return o(a),Y(a,Object.create(qe.prototype),e,t,r,n,i),a},CreateReadableStream:a,ReadableStream:Le,IsReadableStreamDisturbed:function(e){return e._disturbed},ReadableStreamDefaultControllerClose:I,ReadableStreamDefaultControllerEnqueue:P,ReadableStreamDefaultControllerError:N,ReadableStreamDefaultControllerGetDesiredSize:j,ReadableStreamDefaultControllerHasBackpressure:function(e){return!0!==R(e)},ReadableStreamDefaultControllerCanCloseOrEnqueue:C};var ke=function(){function e(t){if(n(this,e),!1===s(t))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===c(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");w(this,t),this._readRequests=[]}return se(e,[{key:"cancel",value:function(e){return!1===_(this)?Promise.reject(te("cancel")):void 0===this._ownerReadableStream?Promise.reject(ee("cancel")):T(this,e)}},{key:"read",value:function(){return!1===_(this)?Promise.reject(te("read")):void 0===this._ownerReadableStream?Promise.reject(ee("read from")):E(this)}},{key:"releaseLock",value:function(){if(!1===_(this))throw te("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");S(this)}}},{key:"closed",get:function(){return!1===_(this)?Promise.reject(te("closed")):this._closedPromise}}]),e}(),Fe=function(){function e(t){if(n(this,e),!s(t))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===L(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(c(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");w(this,t),this._readIntoRequests=[]}return se(e,[{key:"cancel",value:function(e){return v(this)?void 0===this._ownerReadableStream?Promise.reject(ee("cancel")):T(this,e):Promise.reject(ne("cancel"))}},{key:"read",value:function(e){return v(this)?void 0===this._ownerReadableStream?Promise.reject(ee("read from")):ArrayBuffer.isView(e)?!0===fe(e.buffer)?Promise.reject(new TypeError("Cannot read into a view onto a detached ArrayBuffer")):0===e.byteLength?Promise.reject(new TypeError("view must have non-zero byteLength")):O(this,e):Promise.reject(new TypeError("view must be an array buffer view")):Promise.reject(ne("read"))}},{key:"releaseLock",value:function(){if(!v(this))throw ne("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");S(this)}}},{key:"closed",get:function(){return v(this)?this._closedPromise:Promise.reject(ne("closed"))}}]),e}(),Be=function(){function e(){throw n(this,e),new TypeError}return se(e,[{key:"close",value:function(){if(!1===x(this))throw ie("close");if(!1===C(this))throw new TypeError("The stream is not in a state that permits close");I(this)}},{key:"enqueue",value:function(e){if(!1===x(this))throw ie("enqueue");if(!1===C(this))throw new TypeError("The stream is not in a state that permits enqueue");return P(this,e)}},{key:"error",value:function(e){if(!1===x(this))throw ie("error");var t=this._controlledReadableStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");N(this,e)}},{key:Ce,value:function(e){return Oe(this),this._cancelAlgorithm(e)}},{key:Me,value:function(){var e=this._controlledReadableStream;if(this._queue.length>0){var t=Te(this);return!0===this._closeRequested&&0===this._queue.length?h(e):A(this),Promise.resolve(de(t,!1))}var r=l(e);return A(this),r}},{key:"desiredSize",get:function(){if(!1===x(this))throw ie("desiredSize");return j(this)}}]),e}(),Ue=function(){function e(){throw n(this,e),new TypeError("ReadableStreamBYOBRequest cannot be used directly")}return se(e,[{key:"respond",value:function(e){if(!1===k(this))throw ae("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!0===fe(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");!function(e,t){if(t=Number(t),!1===he(t))throw new RangeError("bytesWritten must be a finite");K(e,t)}(this._associatedReadableByteStreamController,e)}},{key:"respondWithNewView",value:function(e){if(!1===k(this))throw ae("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(!0===fe(e.buffer))throw new TypeError("The supplied view's buffer has been detached and so cannot be used as a response");!function(e,t){var r=e._pendingPullIntos[0];if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,K(e,t.byteLength)}(this._associatedReadableByteStreamController,e)}},{key:"view",get:function(){if(!1===k(this))throw ae("view");return this._view}}]),e}(),qe=function(){function e(){throw n(this,e),new TypeError("ReadableByteStreamController constructor cannot be used directly")}return se(e,[{key:"close",value:function(){if(!1===L(this))throw oe("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");!function(e){var t=e._controlledReadableByteStream;if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0&&e._pendingPullIntos[0].bytesFilled>0){var r=new TypeError("Insufficient bytes to fill elements in the given buffer");throw J(e,r),r}h(t)}}(this)}},{key:"enqueue",value:function(e){if(!1===L(this))throw oe("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(e))throw new TypeError("You can only enqueue array buffer views when using a ReadableByteStreamController");if(!0===fe(e.buffer))throw new TypeError("Cannot enqueue a view onto a detached ArrayBuffer");!function(e,t){var r=e._controlledReadableByteStream,n=t.buffer,i=t.byteOffset,a=t.byteLength,o=ye(n);!0===b(r)?0===g(r)?V(e,o,i,a):f(r,new Uint8Array(o,i,a),!1):!0===m(r)?(V(e,o,i,a),z(e)):V(e,o,i,a)}(this,e)}},{key:"error",value:function(e){if(!1===L(this))throw oe("error");var t=this._controlledReadableByteStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");J(this,e)}},{key:Ce,value:function(e){return this._pendingPullIntos.length>0&&(this._pendingPullIntos[0].bytesFilled=0),Oe(this),this._cancelAlgorithm(e)}},{key:Me,value:function(){var e=this._controlledReadableByteStream;if(this._queueTotalSize>0){var t=this._queue.shift();this._queueTotalSize-=t.byteLength,H(this);var r=void 0;try{r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}catch(e){return Promise.reject(e)}return Promise.resolve(de(r,!1))}var n=this._autoAllocateChunkSize;if(void 0!==n){var i=void 0;try{i=new ArrayBuffer(n)}catch(e){return Promise.reject(e)}var a={buffer:i,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(a)}var o=l(e);return F(this),o}},{key:"byobRequest",get:function(){if(!1===L(this))throw oe("byobRequest");if(void 0===this._byobRequest&&this._pendingPullIntos.length>0){var e=this._pendingPullIntos[0],t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled),r=Object.create(Ue.prototype);(function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r})(r,this,t),this._byobRequest=r}return this._byobRequest}},{key:"desiredSize",get:function(){if(!1===L(this))throw oe("desiredSize");return W(this)}}]),e}()},{"./helpers.js":10,"./queue-with-sizes.js":11,"./utils.js":14,"./writable-stream.js":15,"better-assert":16}],13:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,r,n,i,a){function u(){return t}e._writable=D(u,(function(t){return function(e,t){y("TransformStreamDefaultSinkWriteAlgorithm()");var r=e._transformStreamController;return!0===e._backpressure?e._backpressureChangePromise.then((function(){var n=e._writable;if("erroring"===n._state)throw n._storedError;return r._transformAlgorithm(t)})):r._transformAlgorithm(t)}(e,t)}),(function(){return function(e){y("TransformStreamDefaultSinkCloseAlgorithm()");var t=e._readable;return e._transformStreamController._flushAlgorithm().then((function(){if("errored"===t._state)throw t._storedError;var e=t._readableStreamController;!0===P(e)&&E(e)})).catch((function(r){throw o(e,r),t._storedError}))}(e)}),(function(){return function(e){return o(e,new TypeError("Writable side aborted")),Promise.resolve()}(e)}),r,n),e._readable=O(u,(function(){return function(e){return y("TransformStreamDefaultSourcePullAlgorithm()"),c(e,!1),e._backpressureChangePromise}(e)}),(function(t){return s(e,t),Promise.resolve()}),i,a),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,c(e,!0),e._transformStreamController=void 0}function a(e){return!!_(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function o(e,t){y("TransformStreamError()"),"readable"===e._readable._state&&A(e._readable._readableStreamController,t),s(e,t)}function s(e,t){j(e._writable._writableStreamController,t),!0===e._backpressure&&c(e,!1)}function c(e,t){y("TransformStreamSetBackpressure() [backpressure = "+t+"]"),void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=new Promise((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}function u(e){return!!_(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function l(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}function d(e,t){y("TransformStreamDefaultControllerEnqueue()");var r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!1===P(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{x(n,t)}catch(e){throw s(r,e),r._readable._storedError}I(n)!==r._backpressure&&c(r,!0)}function h(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function p(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}var f=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(n(this,e),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var s=r.size,c=T(s),u=r.highWaterMark;void 0===u&&(u=1),u=w(u);var h=a.size,p=T(h),f=a.highWaterMark;void 0===f&&(f=0),f=w(f);var y=void 0;i(this,new Promise((function(e){y=e})),u,c,f,p),function(e,t){var r=Object.create(M.prototype),n=function(e){try{return d(r,e),Promise.resolve()}catch(e){return Promise.reject(e)}},i=t.transform;if(void 0!==i){if("function"!=typeof i)throw new TypeError("transform is not a method");n=function(n){return v(i,t,[n,r]).catch((function(t){throw o(e,t),t}))}}var a=b(t,"flush",0,[r]);l(e,r,n,a)}(this,t);var g=m(t,"start",[this._transformStreamController]);y(g)}return f(e,[{key:"readable",get:function(){if(!1===a(this))throw p("readable");return this._readable}},{key:"writable",get:function(){if(!1===a(this))throw p("writable");return this._writable}}]),e}(),M=function(){function e(){throw n(this,e),new TypeError("TransformStreamDefaultController instances cannot be created directly")}return f(e,[{key:"enqueue",value:function(e){if(!1===u(this))throw h("enqueue");d(this,e)}},{key:"error",value:function(e){if(!1===u(this))throw h("error");!function(e,t){o(e._controlledTransformStream,t)}(this,e)}},{key:"terminate",value:function(){if(!1===u(this))throw h("terminate");!function(e){y("TransformStreamDefaultControllerTerminate()");var t=e._controlledTransformStream,r=t._readable._readableStreamController;!0===P(r)&&E(r),s(t,new TypeError("TransformStream terminated"))}(this)}},{key:"desiredSize",get:function(){if(!1===u(this))throw h("desiredSize");var e=this._controlledTransformStream._readable._readableStreamController;return R(e)}}]),e}();t.exports={CreateTransformStream:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return 1},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){return 1},c=Object.create(C.prototype),u=void 0;i(c,new Promise((function(e){u=e})),n,a,o,s),l(c,Object.create(M.prototype),t,r);var d=e();return u(d),c},TransformStream:C}},{"./helpers.js":10,"./readable-stream.js":12,"./writable-stream.js":15,"better-assert":16,debug:18}],14:[function(e,t,r){"use strict";var n=e("better-assert");r.rethrowAssertionErrorRejection=function(e){e&&e.constructor===n.AssertionError&&setTimeout((function(){throw e}),0)}},{"better-assert":16}],15:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return new Y(e)}function a(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=[],e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function o(e){return!!V(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function s(e){return void 0!==e._writer}function c(e,t){var r=e._state;if("closed"===r)return Promise.resolve(void 0);if("errored"===r)return Promise.reject(e._storedError);var n=new TypeError("Requested to abort");if(void 0!==e._pendingAbortRequest)return Promise.reject(n);var i=!1;"erroring"===r&&(i=!0,t=void 0);var a=new Promise((function(r,n){e._pendingAbortRequest={_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:i}}));return!1===i&&l(e,n),a}function u(e,t){L("WritableStreamDealWithRejection(stream, %o)",t),"writable"!==e._state?d(e):l(e,t)}function l(e,t){L("WritableStreamStartErroring(stream, %o)",t);var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&b(n,t),!1===function(e){return void 0===e._inFlightWriteRequest&&void 0===e._inFlightCloseRequest?(L("WritableStreamHasOperationMarkedInFlight() is false"),!1):(L("WritableStreamHasOperationMarkedInFlight() is true"),!0)}(e)&&!0===r._started&&d(e)}function d(e){L("WritableStreamFinishErroring()"),e._state="errored",e._writableStreamController[J]();var t=e._storedError,r=!0,n=!1,i=void 0;try{for(var a,o=e._writeRequests[Symbol.iterator]();!(r=(a=o.next()).done);r=!0)a.value._reject(t)}catch(e){n=!0,i=e}finally{try{!r&&o.return&&o.return()}finally{if(n)throw i}}if(e._writeRequests=[],void 0!==e._pendingAbortRequest){var s=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,!0===s._wasAlreadyErroring)return s._reject(t),void p(e);e._writableStreamController[X](s._reason).then((function(){s._resolve(),p(e)}),(function(t){s._reject(t),p(e)}))}else p(e)}function h(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function p(e){L("WritableStreamRejectCloseAndClosedPromiseIfNeeded()"),void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&(N(t,e._storedError),t._closedPromise.catch((function(){})))}function f(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(!0===t?function(e){L("defaultWriterReadyPromiseReset()"),e._readyPromise=new Promise((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}(r):C(r)),e._backpressure=t}function y(e){return!!V(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function g(e){var t=e._ownerWritableStream,r=t._state;if("closed"===r||"errored"===r)return Promise.reject(new TypeError("The stream (in "+r+" state) is not in the writable state and cannot be closed"));var n=new Promise((function(e,r){var n={_resolve:e,_reject:r};t._closeRequest=n}));return!0===t._backpressure&&"writable"===r&&C(e),function(e){G(e,"close",0),S(e)}(t._writableStreamController),n}function m(e,t){"pending"===e._closedPromiseState?N(e,t):function(e,t){e._closedPromise=Promise.reject(t),e._closedPromiseState="rejected"}(e,t),e._closedPromise.catch((function(){}))}function b(e,t){L("WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, %o)",t),"pending"===e._readyPromiseState?function(e,t){L("defaultWriterReadyPromiseReject(writer, %o)",t),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}(e,t):function(e,t){L("defaultWriterReadyPromiseResetToRejected(writer, %o)",t),e._readyPromise=Promise.reject(t),e._readyPromiseState="rejected"}(e,t),e._readyPromise.catch((function(){}))}function v(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");b(e,r),m(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function _(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,i=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return O(e,t),1}}(n,t);if(r!==e._ownerWritableStream)return Promise.reject(I("write to"));var a=r._state;if("errored"===a)return Promise.reject(r._storedError);if(!0===h(r)||"closed"===a)return Promise.reject(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===a)return Promise.reject(r._storedError);var o=function(e){return new Promise((function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}(r);return function(e,t,r){var n={chunk:t};try{G(e,n,r)}catch(t){return void O(e,t)}var i=e._controlledWritableStream;!1===h(i)&&"writable"===i._state&&f(i,E(e)),S(e)}(n,t,i),o}function w(e,t,r,n,i,a,o,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,K(t),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=o,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=a;var c=E(t);f(e,c);var l=r();Promise.resolve(l).then((function(){t._started=!0,S(t)}),(function(r){t._started=!0,u(e,r)})).catch(Q)}function T(e){return e._strategyHWM-e._queueTotalSize}function S(e){L("WritableStreamDefaultControllerAdvanceQueueIfNeeded()");var t=e._controlledWritableStream;if(!1!==e._started&&void 0===t._inFlightWriteRequest){var r=t._state;if("closed"!==r&&"errored"!==r)if("erroring"!==r){if(0!==e._queue.length){var n=z(e);"close"===n?function(e){var t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),H(e),e._closeAlgorithm().then((function(){!function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var t=e._writer;void 0!==t&&function(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}(t)}(t)}),(function(e){!function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),u(e,t)}(t,e)})).catch(Q)}(e):function(e,t){var r=e._controlledWritableStream;(function(e){e._inFlightWriteRequest=e._writeRequests.shift()})(r),e._writeAlgorithm(t).then((function(){!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);var t=r._state;if(H(e),!1===h(r)&&"writable"===t){var n=E(e);f(r,n)}S(e)}),(function(e){!function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,u(e,t)}(r,e)})).catch(Q)}(e,n.chunk)}}else d(t)}}function O(e,t){"writable"===e._controlledWritableStream._state&&x(e,t)}function E(e){return T(e)<=0}function x(e,t){l(e._controlledWritableStream,t)}function A(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function R(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function I(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function P(e){e._closedPromise=new Promise((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function N(e,t){e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}function D(e,t){L("defaultWriterReadyPromiseInitializeAsRejected(writer, %o)",t),e._readyPromise=Promise.reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}function j(e){L("defaultWriterReadyPromiseInitializeAsResolved()"),e._readyPromise=Promise.resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}function C(e){L("defaultWriterReadyPromiseResolve()"),e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}var M=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,o=r.highWaterMark,s=void 0===o?1:o;if(n(this,e),a(this),void 0!==t.type)throw new RangeError("Invalid type is specified");var c=q(i);!function(e,t,r,n){var i=Object.create(Z.prototype),a=F(t,"write",1,[i]),o=F(t,"close",0,[]),s=F(t,"abort",1,[]);w(e,i,(function(){return B(t,"start",[i])}),a,o,s,r,n)}(this,t,s=U(s),c)}return M(e,[{key:"abort",value:function(e){return!1===o(this)?Promise.reject(A("abort")):!0===s(this)?Promise.reject(new TypeError("Cannot abort a stream that already has a writer")):c(this,e)}},{key:"getWriter",value:function(){if(!1===o(this))throw A("getWriter");return i(this)}},{key:"locked",get:function(){if(!1===o(this))throw A("locked");return s(this)}}]),e}();t.exports={AcquireWritableStreamDefaultWriter:i,CreateWritableStream:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){return 1},s=Object.create(W.prototype);return a(s),w(s,Object.create(Z.prototype),e,t,r,n,i,o),s},IsWritableStream:o,IsWritableStreamLocked:s,WritableStream:W,WritableStreamAbort:c,WritableStreamDefaultControllerErrorIfNeeded:O,WritableStreamDefaultWriterCloseWithErrorPropagation:function(e){var t=e._ownerWritableStream,r=t._state;return!0===h(t)||"closed"===r?Promise.resolve():"errored"===r?Promise.reject(t._storedError):g(e)},WritableStreamDefaultWriterRelease:v,WritableStreamDefaultWriterWrite:_,WritableStreamCloseQueuedOrInFlight:h};var Y=function(){function e(t){if(n(this,e),!1===o(t))throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===s(t))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=t,t._writer=this;var r=t._state;if("writable"===r)!1===h(t)&&!0===t._backpressure?function(e){L("defaultWriterReadyPromiseInitialize()"),e._readyPromise=new Promise((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}(this):j(this),P(this);else if("erroring"===r)D(this,t._storedError),this._readyPromise.catch((function(){})),P(this);else if("closed"===r)j(this),function(e){e._closedPromise=Promise.resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}(this);else{var i=t._storedError;D(this,i),this._readyPromise.catch((function(){})),function(e,t){e._closedPromise=Promise.reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}(this,i),this._closedPromise.catch((function(){}))}}return M(e,[{key:"abort",value:function(e){return!1===y(this)?Promise.reject(R("abort")):void 0===this._ownerWritableStream?Promise.reject(I("abort")):function(e,t){return c(e._ownerWritableStream,t)}(this,e)}},{key:"close",value:function(){if(!1===y(this))return Promise.reject(R("close"));var e=this._ownerWritableStream;return void 0===e?Promise.reject(I("close")):!0===h(e)?Promise.reject(new TypeError("cannot close an already-closing stream")):g(this)}},{key:"releaseLock",value:function(){if(!1===y(this))throw R("releaseLock");void 0!==this._ownerWritableStream&&v(this)}},{key:"write",value:function(e){return!1===y(this)?Promise.reject(R("write")):void 0===this._ownerWritableStream?Promise.reject(I("write to")):_(this,e)}},{key:"closed",get:function(){return!1===y(this)?Promise.reject(R("closed")):this._closedPromise}},{key:"desiredSize",get:function(){if(!1===y(this))throw R("desiredSize");if(void 0===this._ownerWritableStream)throw I("desiredSize");return e=this._ownerWritableStream,"errored"===(t=e._state)||"erroring"===t?null:"closed"===t?0:T(e._writableStreamController);var e,t}},{key:"ready",get:function(){return!1===y(this)?Promise.reject(R("ready")):this._readyPromise}}]),e}(),Z=function(){function e(){throw n(this,e),new TypeError("WritableStreamDefaultController cannot be constructed explicitly")}return M(e,[{key:"error",value:function(e){if(!1===function(e){return!!V(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&x(this,e)}},{key:X,value:function(e){return this._abortAlgorithm(e)}},{key:J,value:function(){K(this)}}]),e}()},{"./helpers.js":10,"./queue-with-sizes.js":11,"./utils.js":14,"better-assert":16,debug:18}],16:[function(e,t,r){(function(r){var n=e("assert").AssertionError,i=e("callsite"),a=e("fs");t.exports=r.env.NO_ASSERT?function(){}:function(e){if(!e){var t=i(),r=t[1],o=r.getFileName(),s=r.getLineNumber(),c=(c=a.readFileSync(o,"utf8")).split("\n")[s-1].match(/assert\((.*)\)/)[1];throw new n({message:c,stackStartFunction:t[0].getFunction()})}}}).call(this,e("_process"))},{_process:4,assert:2,callsite:17,fs:3}],17:[function(e,t,r){t.exports=function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};var t=new Error;Error.captureStackTrace(t,arguments.callee);var r=t.stack;return Error.prepareStackTrace=e,r}},{}],18:[function(e,t,r){(function(n){function i(){var e;try{e=r.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}(r=t.exports=e("./debug")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,a=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(a=i))})),e.splice(a,0,n)}},r.save=function(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(e){}},r.load=i,r.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},r.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(i())}).call(this,e("_process"))},{"./debug":19,_process:4}],19:[function(e,t,r){function n(e){function t(){if(t.enabled){var e=t,i=+new Date,a=i-(n||i);e.diff=a,e.prev=n,e.curr=i,n=i;for(var o=new Array(arguments.length),s=0;s100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*d;case"days":case"day":case"d":return r*l;case"hours":case"hour":case"hrs":case"hr":case"h":return r*u;case"minutes":case"minute":case"mins":case"min":case"m":return r*c;case"seconds":case"second":case"secs":case"sec":case"s":return r*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function i(e){return e>=l?Math.round(e/l)+"d":e>=u?Math.round(e/u)+"h":e>=c?Math.round(e/c)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function a(e){return o(e,l,"day")||o(e,u,"hour")||o(e,c,"minute")||o(e,s,"second")||e+" ms"}function o(e,t,r){if(!(e0)return n(e);if("number"===r&&!1===isNaN(e))return t.long?a(e):i(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}]},{},[1])(1)},94824:(e,t)=>{"use strict";function r(e){return e>=65&&e<=90||e>=97&&e<=122||58===e||95===e||8204===e||8205===e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}Object.defineProperty(t,"__esModule",{value:!0}),t.CHAR="\t\n\r -퟿-�𐀀-􏿿",t.S=" \t\r\n",t.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",t.NAME_CHAR="-"+t.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",t.CHAR_RE=new RegExp("^["+t.CHAR+"]$","u"),t.S_RE=new RegExp("^["+t.S+"]+$","u"),t.NAME_START_CHAR_RE=new RegExp("^["+t.NAME_START_CHAR+"]$","u"),t.NAME_CHAR_RE=new RegExp("^["+t.NAME_CHAR+"]$","u"),t.NAME_RE=new RegExp("^["+t.NAME_START_CHAR+"]["+t.NAME_CHAR+"]*$","u"),t.NMTOKEN_RE=new RegExp("^["+t.NAME_CHAR+"]+$","u"),t.S_LIST=[32,10,13,9],t.isChar=function(e){return e>=32&&e<=55295||10===e||13===e||9===e||e>=57344&&e<=65533||e>=65536&&e<=1114111},t.isS=function(e){return 32===e||10===e||13===e||9===e},t.isNameStartChar=r,t.isNameChar=function(e){return r(e)||e>=48&&e<=57||45===e||46===e||183===e||e>=768&&e<=879||e>=8255&&e<=8256}},30718:(e,t)=>{"use strict";function r(e){return e>=65&&e<=90||e>=97&&e<=122||58===e||95===e||8204===e||8205===e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}Object.defineProperty(t,"__esModule",{value:!0}),t.CHAR="-퟿-�𐀀-􏿿",t.RESTRICTED_CHAR="-\b\v\f--„†-Ÿ",t.S=" \t\r\n",t.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",t.NAME_CHAR="-"+t.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",t.CHAR_RE=new RegExp("^["+t.CHAR+"]$","u"),t.RESTRICTED_CHAR_RE=new RegExp("^["+t.RESTRICTED_CHAR+"]$","u"),t.S_RE=new RegExp("^["+t.S+"]+$","u"),t.NAME_START_CHAR_RE=new RegExp("^["+t.NAME_START_CHAR+"]$","u"),t.NAME_CHAR_RE=new RegExp("^["+t.NAME_CHAR+"]$","u"),t.NAME_RE=new RegExp("^["+t.NAME_START_CHAR+"]["+t.NAME_CHAR+"]*$","u"),t.NMTOKEN_RE=new RegExp("^["+t.NAME_CHAR+"]+$","u"),t.S_LIST=[32,10,13,9],t.isChar=function(e){return e>=1&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111},t.isRestrictedChar=function(e){return e>=1&&e<=8||11===e||12===e||e>=14&&e<=31||e>=127&&e<=132||e>=134&&e<=159},t.isCharAndNotRestricted=function(e){return 9===e||10===e||13===e||e>31&&e<127||133===e||e>159&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111},t.isS=function(e){return 32===e||10===e||13===e||9===e},t.isNameStartChar=r,t.isNameChar=function(e){return r(e)||e>=48&&e<=57||45===e||46===e||183===e||e>=768&&e<=879||e>=8255&&e<=8256}},26457:(e,t)=>{"use strict";function r(e){return e>=65&&e<=90||95===e||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}Object.defineProperty(t,"__esModule",{value:!0}),t.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",t.NC_NAME_CHAR="-"+t.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",t.NC_NAME_START_CHAR_RE=new RegExp("^["+t.NC_NAME_START_CHAR+"]$","u"),t.NC_NAME_CHAR_RE=new RegExp("^["+t.NC_NAME_CHAR+"]$","u"),t.NC_NAME_RE=new RegExp("^["+t.NC_NAME_START_CHAR+"]["+t.NC_NAME_CHAR+"]*$","u"),t.isNCNameStartChar=r,t.isNCNameChar=function(e){return r(e)||45===e||46===e||e>=48&&e<=57||183===e||e>=768&&e<=879||e>=8255&&e<=8256}},98634:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var o=a(r(33096)),s=r(3379),c=new Set(["input","option","optgroup","select","button","datalist","textarea"]),u=new Set(["p"]),l=new Set(["thead","tbody"]),d=new Set(["dd","dt"]),h=new Set(["rt","rp"]),p=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",u],["h1",u],["h2",u],["h3",u],["h4",u],["h5",u],["h6",u],["select",c],["input",c],["output",c],["button",c],["datalist",c],["textarea",c],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",d],["dt",d],["address",u],["article",u],["aside",u],["blockquote",u],["details",u],["div",u],["dl",u],["fieldset",u],["figcaption",u],["figure",u],["footer",u],["form",u],["header",u],["hr",u],["main",u],["nav",u],["ol",u],["pre",u],["section",u],["table",u],["ul",u],["rt",h],["rp",h],["tbody",l],["tfoot",l]]),f=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),y=new Set(["math","svg"]),g=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),m=/\s|\//,b=function(){function e(e,t){var r,n,i,a,s,c;void 0===t&&(t={}),this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=e?e:{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=null!==(r=t.lowerCaseTags)&&void 0!==r?r:this.htmlMode,this.lowerCaseAttributeNames=null!==(n=t.lowerCaseAttributeNames)&&void 0!==n?n:this.htmlMode,this.recognizeSelfClosing=null!==(i=t.recognizeSelfClosing)&&void 0!==i?i:!this.htmlMode,this.tokenizer=new(null!==(a=t.Tokenizer)&&void 0!==a?a:o.default)(this.options,this),this.foreignContext=[!this.htmlMode],null===(c=(s=this.cbs).onparserinit)||void 0===c||c.call(s,this)}return e.prototype.ontext=function(e,t){var r,n,i=this.getSlice(e,t);this.endIndex=t-1,null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,i),this.startIndex=t},e.prototype.ontextentity=function(e,t){var r,n;this.endIndex=t-1,null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,(0,s.fromCodePoint)(e)),this.startIndex=t},e.prototype.isVoidElement=function(e){return this.htmlMode&&f.has(e)},e.prototype.onopentagname=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)},e.prototype.emitOpenTag=function(e){var t,r,n,i;this.openTagStart=this.startIndex,this.tagname=e;var a=this.htmlMode&&p.get(e);if(a)for(;this.stack.length>0&&a.has(this.stack[0]);){var o=this.stack.shift();null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,o,!0)}this.isVoidElement(e)||(this.stack.unshift(e),this.htmlMode&&(y.has(e)?this.foreignContext.unshift(!0):g.has(e)&&this.foreignContext.unshift(!1))),null===(i=(n=this.cbs).onopentagname)||void 0===i||i.call(n,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(e){var t,r;this.startIndex=this.openTagStart,this.attribs&&(null===(r=(t=this.cbs).onopentag)||void 0===r||r.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},e.prototype.onclosetag=function(e,t){var r,n,i,a,o,s,c,u;this.endIndex=t;var l=this.getSlice(e,t);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),this.htmlMode&&(y.has(l)||g.has(l))&&this.foreignContext.shift(),this.isVoidElement(l))this.htmlMode&&"br"===l&&(null===(a=(i=this.cbs).onopentagname)||void 0===a||a.call(i,"br"),null===(s=(o=this.cbs).onopentag)||void 0===s||s.call(o,"br",{},!0),null===(u=(c=this.cbs).onclosetag)||void 0===u||u.call(c,"br",!1));else{var d=this.stack.indexOf(l);if(-1!==d)for(var h=0;h<=d;h++){var p=this.stack.shift();null===(n=(r=this.cbs).onclosetag)||void 0===n||n.call(r,p,h!==d)}else this.htmlMode&&"p"===l&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1},e.prototype.onselfclosingtag=function(e){this.endIndex=e,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},e.prototype.closeCurrentTag=function(e){var t,r,n=this.tagname;this.endOpenTag(e),this.stack[0]===n&&(null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,n,!e),this.stack.shift())},e.prototype.onattribname=function(e,t){this.startIndex=e;var r=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(e,t){this.attribvalue+=this.getSlice(e,t)},e.prototype.onattribentity=function(e){this.attribvalue+=(0,s.fromCodePoint)(e)},e.prototype.onattribend=function(e,t){var r,n;this.endIndex=t,null===(n=(r=this.cbs).onattribute)||void 0===n||n.call(r,this.attribname,this.attribvalue,e===o.QuoteType.Double?'"':e===o.QuoteType.Single?"'":e===o.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(m),r=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(n),"!".concat(r))}this.startIndex=t+1},e.prototype.onprocessinginstruction=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(n),"?".concat(r))}this.startIndex=t+1},e.prototype.oncomment=function(e,t,r){var n,i,a,o;this.endIndex=t,null===(i=(n=this.cbs).oncomment)||void 0===i||i.call(n,this.getSlice(e,t-r)),null===(o=(a=this.cbs).oncommentend)||void 0===o||o.call(a),this.startIndex=t+1},e.prototype.oncdata=function(e,t,r){var n,i,a,o,s,c,u,l,d,h;this.endIndex=t;var p=this.getSlice(e,t-r);!this.htmlMode||this.options.recognizeCDATA?(null===(i=(n=this.cbs).oncdatastart)||void 0===i||i.call(n),null===(o=(a=this.cbs).ontext)||void 0===o||o.call(a,p),null===(c=(s=this.cbs).oncdataend)||void 0===c||c.call(s)):(null===(l=(u=this.cbs).oncomment)||void 0===l||l.call(u,"[CDATA[".concat(p,"]]")),null===(h=(d=this.cbs).oncommentend)||void 0===h||h.call(d)),this.startIndex=t+1},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=0;r=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,t-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))},e.prototype.end=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var n,i,a,o=r(3379);function s(e){return e===n.Space||e===n.NewLine||e===n.Tab||e===n.FormFeed||e===n.CarriageReturn}function c(e){return e===n.Slash||e===n.Gt||s(e)}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(n||(n={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"}(i||(i={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(a||(t.QuoteType=a={}));var u={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])},l=function(){function e(e,t){var r=e.xmlMode,n=void 0!==r&&r,a=e.decodeEntities,s=void 0===a||a,c=this;this.cbs=t,this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=i.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=n,this.decodeEntities=s,this.entityDecoder=new o.EntityDecoder(n?o.xmlDecodeTree:o.htmlDecodeTree,(function(e,t){return c.emitCodePoint(e,t)}))}return e.prototype.reset=function(){this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},e.prototype.write=function(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()},e.prototype.end=function(){this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=i.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===n.Amp&&this.startEntity()},e.prototype.stateSpecialStartSequence=function(e){var t=this.sequenceIndex===this.currentSequence.length;if(t?c(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=i.InTagName,this.stateInTagName(e)},e.prototype.stateInSpecialTag=function(e){if(this.sequenceIndex===this.currentSequence.length){if(e===n.Gt||s(e)){var t=this.index-this.currentSequence.length;if(this.sectionStart=n.LowerA&&e<=n.LowerZ||e>=n.UpperA&&e<=n.UpperZ}(e)},e.prototype.startSpecial=function(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=i.SpecialStartSequence},e.prototype.stateBeforeTagName=function(e){if(e===n.ExclamationMark)this.state=i.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===n.Questionmark)this.state=i.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){var t=32|e;this.sectionStart=this.index,this.xmlMode?this.state=i.InTagName:t===u.ScriptEnd[2]?this.state=i.BeforeSpecialS:t===u.TitleEnd[2]?this.state=i.BeforeSpecialT:this.state=i.InTagName}else e===n.Slash?this.state=i.BeforeClosingTagName:(this.state=i.Text,this.stateText(e))},e.prototype.stateInTagName=function(e){c(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateBeforeClosingTagName=function(e){s(e)||(e===n.Gt?this.state=i.Text:(this.state=this.isTagStartChar(e)?i.InClosingTagName:i.InSpecialComment,this.sectionStart=this.index))},e.prototype.stateInClosingTagName=function(e){(e===n.Gt||s(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterClosingTagName,this.stateAfterClosingTagName(e))},e.prototype.stateAfterClosingTagName=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeAttributeName=function(e){e===n.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=i.InSpecialTag,this.sequenceIndex=0):this.state=i.Text,this.sectionStart=this.index+1):e===n.Slash?this.state=i.InSelfClosingTag:s(e)||(this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateInSelfClosingTag=function(e){e===n.Gt?(this.cbs.onselfclosingtag(this.index),this.state=i.Text,this.sectionStart=this.index+1,this.isSpecial=!1):s(e)||(this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateInAttributeName=function(e){(e===n.Eq||c(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=i.AfterAttributeName,this.stateAfterAttributeName(e))},e.prototype.stateAfterAttributeName=function(e){e===n.Eq?this.state=i.BeforeAttributeValue:e===n.Slash||e===n.Gt?(this.cbs.onattribend(a.NoValue,this.sectionStart),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):s(e)||(this.cbs.onattribend(a.NoValue,this.sectionStart),this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateBeforeAttributeValue=function(e){e===n.DoubleQuote?(this.state=i.InAttributeValueDq,this.sectionStart=this.index+1):e===n.SingleQuote?(this.state=i.InAttributeValueSq,this.sectionStart=this.index+1):s(e)||(this.sectionStart=this.index,this.state=i.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))},e.prototype.handleInAttributeValue=function(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===n.DoubleQuote?a.Double:a.Single,this.index+1),this.state=i.BeforeAttributeName):this.decodeEntities&&e===n.Amp&&this.startEntity()},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,n.DoubleQuote)},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,n.SingleQuote)},e.prototype.stateInAttributeValueNoQuotes=function(e){s(e)||e===n.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(a.Unquoted,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===n.Amp&&this.startEntity()},e.prototype.stateBeforeDeclaration=function(e){e===n.OpeningSquareBracket?(this.state=i.CDATASequence,this.sequenceIndex=0):this.state=e===n.Dash?i.BeforeComment:i.InDeclaration},e.prototype.stateInDeclaration=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateInProcessingInstruction=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeComment=function(e){e===n.Dash?(this.state=i.InCommentLike,this.currentSequence=u.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=i.InDeclaration},e.prototype.stateInSpecialComment=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeSpecialS=function(e){var t=32|e;t===u.ScriptEnd[3]?this.startSpecial(u.ScriptEnd,4):t===u.StyleEnd[3]?this.startSpecial(u.StyleEnd,4):(this.state=i.InTagName,this.stateInTagName(e))},e.prototype.stateBeforeSpecialT=function(e){var t=32|e;t===u.TitleEnd[3]?this.startSpecial(u.TitleEnd,4):t===u.TextareaEnd[3]?this.startSpecial(u.TextareaEnd,4):(this.state=i.InTagName,this.stateInTagName(e))},e.prototype.startEntity=function(){this.baseState=this.state,this.state=i.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?o.DecodingMode.Strict:this.baseState===i.Text||this.baseState===i.InSpecialTag?o.DecodingMode.Legacy:o.DecodingMode.Attribute)},e.prototype.stateInEntity=function(){var e=this.entityDecoder.write(this.buffer,this.index-this.offset);e>=0?(this.state=this.baseState,0===e&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1},e.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===i.Text||this.state===i.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==i.InAttributeValueDq&&this.state!==i.InAttributeValueSq&&this.state!==i.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},e.prototype.shouldContinue=function(){return this.index=e||(this.state===i.InCommentLike?this.currentSequence===u.CdataEnd?this.cbs.oncdata(this.sectionStart,e,0):this.cbs.oncomment(this.sectionStart,e,0):this.state===i.InTagName||this.state===i.BeforeAttributeName||this.state===i.BeforeAttributeValue||this.state===i.AfterAttributeName||this.state===i.InAttributeName||this.state===i.InAttributeValueSq||this.state===i.InAttributeValueDq||this.state===i.InAttributeValueNq||this.state===i.InClosingTagName||this.cbs.ontext(this.sectionStart,e))},e.prototype.emitCodePoint=function(e,t){this.baseState!==i.Text&&this.baseState!==i.InSpecialTag?(this.sectionStart{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterator=t.isIterable=t.isSourceExpression=t.isPromise=t.isEventEmitter=t.isFunction=t.range=t.union=t.fromIterable=t.fromIterator=t.fromArray=t.single=t.empty=t.wrap=t.WrappingIterator=t.ClonedIterator=t.UnionIterator=t.MultiTransformIterator=t.SimpleTransformIterator=t.TransformIterator=t.BufferedIterator=t.MappingIterator=t.DESTINATION=t.identity=t.IntegerIterator=t.ArrayIterator=t.SingletonIterator=t.EmptyIterator=t.AsyncIterator=t.DESTROYED=t.ENDED=t.CLOSED=t.CLOSING=t.OPEN=t.INIT=t.setTaskScheduler=t.getTaskScheduler=t.scheduleTask=t.LinkedList=void 0;const n=r(50046),i=r(14241);Object.defineProperty(t,"LinkedList",{enumerable:!0,get:function(){return i.LinkedList}});let a=r(93240).createTaskScheduler();t.scheduleTask=function(e){a(e)},t.getTaskScheduler=function(){return a},t.setTaskScheduler=function(e){a=e},t.INIT=1,t.OPEN=2,t.CLOSING=4,t.CLOSED=8,t.ENDED=16,t.DESTROYED=32;class o extends n.EventEmitter{constructor(e=t.OPEN){super(),this._readable=!1,this._state=e,this.on("newListener",s)}_changeState(e,r=!1){const n=e>this._state&&this._statethis.emit("end"))):this.emit("end"))),n}read(){return null}forEach(e,t){this.on("data",j(e,t))}close(){this._changeState(t.CLOSED)&&this._endAsync()}destroy(e){this.done||this._destroy(e,(t=>{(e=e||t)&&this.emit("error",e),this._end(!0)}))}_destroy(e,t){t()}_end(e=!1){this._changeState(e?t.DESTROYED:t.ENDED)&&(this._readable=!1,this.removeAllListeners("readable"),this.removeAllListeners("data"),this.removeAllListeners("end"))}_endAsync(){a((()=>this._end()))}get readable(){return this._readable}set readable(e){e=Boolean(e)&&!this.done,this._readable!==e&&(this._readable=e,e&&a((()=>this.emit("readable"))))}get closed(){return this._state>=t.CLOSING}get ended(){return this._state===t.ENDED}get destroyed(){return this._state===t.DESTROYED}get done(){return this._state>=t.ENDED}toString(){const e=this._toStringDetails();return`[${this.constructor.name}${e?` ${e}`:""}]`}_toStringDetails(){return""}toArray(e){const t=[],r="number"==typeof(null==e?void 0:e.limit)?e.limit:1/0;return this.ended||r<=0?Promise.resolve(t):new Promise(((e,n)=>{const i=()=>e(t),a=o=>{t.push(o),t.length>=r&&(this.removeListener("error",n),this.removeListener("data",a),this.removeListener("end",i),e(t))};this.on("error",n),this.on("data",a),this.on("end",i)}))}getProperty(e,t){const r=this._properties;if(!t)return r&&r[e];if(r&&e in r)a((()=>t(r[e])));else{let r;(r=this._propertyCallbacks)||(this._propertyCallbacks=r=Object.create(null)),e in r?r[e].push(t):r[e]=[t]}}setProperty(e,t){(this._properties||(this._properties=Object.create(null)))[e]=t;const r=this._propertyCallbacks||{},n=r[e];if(n){for(e in delete r[e],a((()=>{for(const e of n)e(t)})),r)return;delete this._propertyCallbacks}}getProperties(){const e=this._properties,t={};for(const r in e)t[r]=e[r];return t}setProperties(e){for(const t in e)this.setProperty(t,e[t])}copyProperties(e,t){for(const r of t)e.getProperty(r,(e=>this.setProperty(r,e)))}transform(e){return new O(this,e)}map(e,t){return new y(this,j(e,t))}filter(e,t){return this.map((function(r){return e.call(t||this,r)?r:null}))}uniq(e=f){const t=new Set;return this.filter((function(r){const n=e.call(this,r);return!t.has(n)&&(t.add(n),!0)}))}prepend(e){return this.transform({prepend:e})}append(e){return this.transform({append:e})}surround(e,t){return this.transform({prepend:e,append:t})}skip(e){return this.map((t=>e-- >0?null:t))}take(e){return this.transform({limit:e})}range(e,t){return this.transform({offset:e,limit:Math.max(t-e+1,0)})}clone(){return new A(this)}[Symbol.asyncIterator](){const e=this;let t=null,r=null,n=null;function i(){if(null!==t)if(null!==n)a(n);else if(e.done)t({done:!0,value:void 0}),t=r=null,o();else{const n=e.read();null!==n&&(t({done:!1,value:n}),t=r=null)}}function a(e){null!==r?(r(e),t=r=n=null,o()):null===n&&(n=e)}function o(){e.removeListener("readable",i),e.removeListener("end",i),e.removeListener("error",a)}return e.addListener("readable",i),e.addListener("end",i),e.addListener("error",a),{next:()=>new Promise(((e,n)=>{t=e,r=n,i()}))}}}function s(e){"data"===e&&(this.removeListener("newListener",s),u(this,"readable",c),this.readable&&a((()=>c.call(this))))}function c(){let e;for(;0!==this.listenerCount("data")&&null!==(e=this.read());)this.emit("data",e);0!==this.listenerCount("data")||this.done||(this.removeListener("readable",c),u(this,"newListener",s))}function u(e,t,r){e.listeners(t).includes(r)||e.on(t,r)}t.AsyncIterator=o;class l extends o{constructor(){super(),this._changeState(t.ENDED,!0)}}t.EmptyIterator=l;class d extends o{constructor(e){super(),this._item=e,null===e?this.close():this.readable=!0}read(){const e=this._item;return this._item=null,this.close(),e}_toStringDetails(){return null===this._item?"":`(${this._item})`}}t.SingletonIterator=d;class h extends o{constructor(e=[],{autoStart:t=!0,preserve:r=!0}={}){super();const n=r||!Array.isArray(e)?[...e]:e;this._index=0,this._sourceStarted=!1!==t,this._truncateThreshold=r?-1:64,this._sourceStarted&&0===n.length?this.close():this._buffer=n,this.readable=!0}read(){this._sourceStarted||(this._sourceStarted=!0);let e=null;return this._buffer&&(this._index=t&&this.close(),Promise.resolve(i)}}t.ArrayIterator=h;class p extends o{constructor({start:e=0,step:t=1,end:r}={}){super(),Number.isFinite(e)&&(e=Math.trunc(e)),this._next=e,Number.isFinite(t)&&(t=Math.trunc(t)),this._step=t;const n=t>=0,i=n?1/0:-1/0;Number.isFinite(r)?r=Math.trunc(r):r!==-i&&(r=i),this._last=r,!Number.isFinite(e)||(n?e>r:e=0?n>r:nthis._init(r))),this._sourceStarted=!1!==r}get maxBufferSize(){return this._maxBufferSize}set maxBufferSize(e){e!==1/0&&(e=Number.isFinite(e)?Math.max(Math.trunc(e),1):4),this._maxBufferSize!==e&&(this._maxBufferSize=e,this._state===t.OPEN&&this._fillBuffer())}_init(e){let r=!1;this._reading=!0,this._begin((()=>{if(r)throw new Error("done callback called multiple times");r=!0,this._reading=!1,this._changeState(t.OPEN),e?this._fillBufferAsync():this.readable=!0}))}_begin(e){e()}read(){if(this.done)return null;this._sourceStarted||(this._sourceStarted=!0);const e=this._buffer;let t;return e.empty?(t=null,this.readable=!1):t=e.shift(),!this._reading&&e.length0&&(this._pushedCount=0,this._reading=!0,this._read(e,(()=>{if(!e)throw new Error("done callback called multiple times");e=0,this._reading=!1,this.closed?this._completeClose():this._pushedCount&&(this.readable=!0,this._buffer.length{this._reading=!1,this._fillBuffer()})))}close(){this._reading?this._changeState(t.CLOSING):this._completeClose()}_completeClose(){this._changeState(t.CLOSED)&&(this._reading=!0,this._flush((()=>{if(!this._reading)throw new Error("done callback called multiple times");this._reading=!1,this._buffer.empty&&this._endAsync()})))}_destroy(e,t){this._buffer.clear(),t()}_flush(e){e()}_toStringDetails(){const e=this._buffer;return`{${e.empty?"":`next: ${e.first}, `}buffer: ${e.length}}`}}t.BufferedIterator=m;class b extends m{constructor(e,t=e||{}){super(t),this._boundPush=e=>this._push(e),k(e)||(e=t.source),M(e)?this.source=e:e&&(this._createSource=L(e)?()=>e:e,this._sourceStarted&&this._loadSourceAsync()),this._optional=Boolean(t.optional),this._destroySource=!1!==t.destroySource}get source(){return C(this._createSource)&&this._loadSourceAsync(),this._source}set source(e){const r=this._source=this._validateSource(e);r[t.DESTINATION]=this,this.done?this._destroySource&&r.destroy():r.done?this.close():(r.on("end",T),r.on("readable",S),r.on("error",_))}_loadSourceAsync(){C(this._createSource)&&(Promise.resolve(this._createSource()).then((e=>{delete this._createSource,this.source=e,this._fillBuffer()}),(e=>this.emit("error",e))),this._createSource=null)}_validateSource(e,t=!1){if(this._source||void 0!==this._createSource)throw new Error("The source cannot be changed after it has been set");return g(e,t)}_read(e,t){const r=()=>{this._pushedCountthis._readAndTransform(r,t))):t()};this._readAndTransform(r,t)}_readAndTransform(e,t){let r;const n=this.source;!n||n.done||null===(r=n.read())?t():this._optional?this._optionalTransform(r,e):this._transform(r,e,this._boundPush)}_optionalTransform(e,t){const r=this._pushedCount;this._transform(e,(()=>{r===this._pushedCount&&this._push(e),t()}),this._boundPush)}_transform(e,t,r){r(e),t()}_closeWhenDone(){this.close()}_end(e){const r=this._source;r&&(r.removeListener("end",T),r.removeListener("error",_),r.removeListener("readable",S),delete r[t.DESTINATION],this._destroySource&&r.destroy()),super._end(e)}}function v(){this[t.DESTINATION].readable=!0}function _(e){this[t.DESTINATION].emit("error",e)}function w(){this[t.DESTINATION].close()}function T(){this[t.DESTINATION]._closeWhenDone()}function S(){!1!==this[t.DESTINATION]._sourceStarted&&this[t.DESTINATION]._fillBuffer()}t.TransformIterator=b;class O extends b{constructor(e,t){if(super(e,t),this._offset=0,this._limit=1/0,this._filter=e=>!0,t=t||(k(e)?null:e)){const e=C(t)?t:t.transform,{limit:r,offset:n,filter:i,map:a,prepend:o,append:s}=t;n===1/0||r===-1/0?this._limit=0:(Number.isFinite(n)&&(this._offset=Math.max(Math.trunc(n),0)),Number.isFinite(r)&&(this._limit=Math.max(Math.trunc(r),0)),C(i)&&(this._filter=i),C(a)&&(this._map=a),this._transform=C(e)?e:null),o&&(this._prepender=M(o)?o:D(o)),s&&(this._appender=M(s)?s:D(s))}}_read(e,t){const r=()=>this._readAndTransformSimple(e,n,t);function n(){a(r)}this._readAndTransformSimple(e,n,t)}_readAndTransformSimple(e,t,r){let n;const{source:i}=this;if(i&&!i.done){for(0===this._limit&&this.close();!this.closed&&this._pushedCountthis._push(e);!e||e.done?t():(e.on("data",r),e.on("end",(function n(){e.removeListener("data",r),e.removeListener("end",n),t()})))}}t.SimpleTransformIterator=O,t.MultiTransformIterator=class extends b{constructor(e,t){if(super(e,t),this._transformerQueue=[],t){const e=C(t)?t:t.multiTransform;e&&(this._createTransformer=e)}}_read(e,r){const n=this._transformerQueue,i=this._optional;let a,o;for(;(a=n[0])&&a.transformer.done;){i&&null!==a.item&&(e--,this._push(a.item)),n.shift();const{transformer:t}=a;t.removeListener("end",S),t.removeListener("readable",S),t.removeListener("error",_)}const{source:s}=this;for(;s&&!s.done&&n.length0&&null!==(o=t.read());)this._push(o),i&&(a.item=null)}else s&&s.done&&this.close();r()}_createTransformer(e){return new d(e)}_closeWhenDone(){this._transformerQueue.length||this.close()}_end(e){if(super._end(e),this._destroySource)for(const e of this._transformerQueue)e.transformer.destroy()}};class E extends m{constructor(e,t={}){super(t),this._sources=[],this._currentSource=-1;const r=!1!==t.autoStart;if(M(e))e.on("error",(e=>this.emit("error",e))),this._pending={loading:!1,sources:e},r&&this._loadSources();else if(Array.isArray(e)&&e.length>0)for(const t of e)this._addSource(t);else r&&this.close();this._destroySources=!1!==t.destroySources}_loadSources(){const e=this._pending.sources;this._pending.loading=!0,e.done?(delete this._pending,this.close()):(e.on("data",(e=>{this._addSource(e),this._fillBufferAsync()})),e.on("end",(()=>{delete this._pending,this._fillBuffer()})))}_addSource(e){L(e)&&(e=P(e)),e.done||(this._sources.push(e),e[t.DESTINATION]=this,e.on("error",_),e.on("readable",S),e.on("end",x))}_removeEmptySources(){this._sources=this._sources.filter(((e,t)=>(e.done&&t<=this._currentSource&&this._currentSource--,!e.done))),this._fillBuffer()}_read(e,t){var r;!1===(null===(r=this._pending)||void 0===r?void 0:r.loading)&&this._loadSources();let n,i=0;for(;i!==(i=e);)for(let t=0;t0;t++)this._currentSource=(this._currentSource+1)%this._sources.length,null!==(n=this._sources[this._currentSource].read())&&(e--,this._push(n));this._pending||0!==this._sources.length||this.close(),t()}_end(e=!1){if(super._end(e),this._destroySources){for(const e of this._sources)e.destroy();this._pending&&(this._pending.sources.destroy(),delete this._pending)}}}function x(){this[t.DESTINATION]._removeEmptySources()}t.UnionIterator=E;class A extends b{constructor(e){super(e,{autoStart:!1}),this._readPosition=0,this._reading=!1,e&&(this.readable=!0)}_init(){}close(){o.prototype.close.call(this)}get source(){return super.source}set source(e){const r=this._source=this._validateSource(e),n=r&&r[t.DESTINATION]||(r[t.DESTINATION]=new R(r));this.done?this._destroySource&&r.destroy():n.endsAt(0)?this.close():(n.register(this),!1!==r._sourceStarted&&null===n.readAt(0)||(this.readable=!0));const i=this._propertyCallbacks;for(const e in i){const t=i[e];for(const r of t)this._getSourceProperty(e,r)}}_validateSource(e,r=!1){const n=e&&e[t.DESTINATION];return super._validateSource(e,!n||n instanceof R)}getProperty(e,t){const{source:r}=this,n=this._properties,i=n&&e in n;if(!t)return i?n&&n[e]:r&&r.getProperty(e);super.getProperty(e,t),r&&!i&&this._getSourceProperty(e,t)}_getSourceProperty(e,t){this.source.getProperty(e,(r=>{this._properties&&e in this._properties||t(r)}))}getProperties(){const e=this.source?this.source.getProperties():{},t=this._properties;for(const r in t)e[r]=t[r];return e}_toStringDetails(){return`{source: ${this.source?this.source.toString():"none"}}`}read(){this._sourceStarted||(this._sourceStarted=!0);const e=this.source;let r=null;if(!this.done&&e){const n=e[t.DESTINATION];null!==(r=n.readAt(this._readPosition))?this._readPosition++:this.readable=!1,n.endsAt(this._readPosition)&&this.close()}return r}_end(e){const r=this.source,n=null==r?void 0:r[t.DESTINATION];n&&n.unregister(this),m.prototype._end.call(this,e)}}t.ClonedIterator=A;class R{constructor(e){if(this._history=[],this._trackers=new Set,this._source=e,!e.done){const t=()=>{for(const e of this._trackers)e.readable=!0},r=e=>{for(const t of this._trackers)t.emit("error",e)},n=()=>{for(const e of this._trackers)!1!==e._sourceStarted&&e._readPosition===this._history.length&&e.close();this._trackers.clear(),e.removeListener("end",n),e.removeListener("error",r),e.removeListener("readable",t)};e.on("end",n),e.on("error",r),e.on("readable",t)}}register(e){this._source.done||this._trackers.add(e)}unregister(e){this._trackers.delete(e)}readAt(e){let t=null;return e{this._source=null,this.source=e})).catch((e=>this.emit("error",e)))):e&&(this.source=e)}set source(e){let r=e;if(null!==this._source)throw new Error("The source cannot be changed after it has been set");if(F(r)&&(r=r[Symbol.iterator]()),B(r)){let e=r;r=new n.EventEmitter,r.read=()=>{if(null!==e){let t;for(;!(t=e.next()).done;)if(null!==t.value)return t.value;e=null,this.close()}return null}}else r=g(r);this.done?this._destroySource&&C(r.destroy)&&r.destroy():(r[t.DESTINATION]=this,r.on("end",w),r.on("error",_),r.on("readable",v),this._source=r,this.readable=!1!==r.readable)}read(){if(null!==this._source&&!1!==this._source.readable){const e=this._source.read();if(null!==e)return e;this.readable=!1}return null}_end(e=!1){null!==this._source&&(this._source.removeListener("end",w),this._source.removeListener("error",_),this._source.removeListener("readable",v),delete this._source[t.DESTINATION],this._destroySource&&C(this._source.destroy)&&this._source.destroy(),this._source=null),super._end(e)}}function P(e,t){if(t&&("autoStart"in t||"optional"in t||"source"in t||"maxBufferSize"in t))return e&&!M(e)&&(e=new I(e)),new b(e,t);if(!e)return N();if(L(e))return new I(e,t);if(e instanceof o)return e;if(Array.isArray(e))return D(e);if(F(e)||B(e)||M(e))return new I(e,t);throw new TypeError(`Invalid source: ${e}`)}function N(){return new l}function D(e){return new h(e)}function j(e,t){return t?e.bind(t):e}function C(e){return"function"==typeof e}function M(e){return C(null==e?void 0:e.on)}function L(e){return C(null==e?void 0:e.then)}function k(e){return e&&(M(e)||L(e)||C(e))}function F(e){return e&&Symbol.iterator in e}function B(e){return C(null==e?void 0:e.next)}t.WrappingIterator=I,t.wrap=P,t.empty=N,t.single=function(e){return new d(e)},t.fromArray=D,t.fromIterator=function(e){return new I(e)},t.fromIterable=function(e){return new I(e)},t.union=function(e){return new E(e)},t.range=function(e,t,r){return new p({start:e,end:t,step:r})},t.isFunction=C,t.isEventEmitter=M,t.isPromise=L,t.isSourceExpression=k,t.isIterable=F,t.isIterator=B},14241:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedList=void 0,t.LinkedList=class{constructor(){this._length=0,this._head=null,this._tail=null}get length(){return this._length}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}get empty(){return null===this._head}push(e){const t={value:e,next:null};null===this._tail?this._head=this._tail=t:this._tail.next=this._tail=t,this._length++}shift(){if(null===this._head)return;const{value:e,next:t}=this._head;return this._head=t,null===t&&(this._tail=null),this._length--,e}clear(){this._length=0,this._head=this._tail=null}}},93240:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTaskScheduler=void 0;const r=Promise.resolve(void 0);t.createTaskScheduler=function(){const e="function"==typeof queueMicrotask?queueMicrotask:e=>r.then(e),t="function"==typeof setImmediate?setImmediate:e=>setTimeout(e,0);let n=0,i=null;return r=>{null!==i?i.push(r):++n<100?e(r):(i=[r],t((()=>{for(const t of i)e(t);i=null,n=0})))}}},35069:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=void 0;const r="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,n=new Set,i="object"==typeof process&&process?process:{},a=(e,t,r,n)=>{"function"==typeof i.emitWarning?i.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)};let o=globalThis.AbortController,s=globalThis.AbortSignal;if(void 0===o){s=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},o=class{constructor(){t()}signal=new s;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(const t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e="1"!==i.env?.LRU_CACHE_IGNORE_AC_WARNING;const t=()=>{e&&(e=!1,a("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}Symbol("type");const c=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),u=e=>c(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?l:null:null;class l extends Array{constructor(e){super(e),this.fill(0)}}class d{heap;length;static#e=!1;static create(e){const t=u(e);if(!t)return[];d.#e=!0;const r=new d(e,t);return d.#e=!1,r}constructor(e,t){if(!d.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class h{#t;#r;#n;#i;#a;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#s;#c;#u;#l;#d;#h;#p;#f;#y;#g;#m;#b;#v;#_;#w;#T;static unsafeExposeInternals(e){return{starts:e.#b,ttls:e.#v,sizes:e.#m,keyMap:e.#c,keyList:e.#u,valList:e.#l,next:e.#d,prev:e.#h,get head(){return e.#p},get tail(){return e.#f},free:e.#y,isBackgroundFetch:t=>e.#S(t),backgroundFetch:(t,r,n,i)=>e.#O(t,r,n,i),moveToTail:t=>e.#E(t),indexes:t=>e.#x(t),rindexes:t=>e.#A(t),isStale:t=>e.#R(t)}}get max(){return this.#t}get maxSize(){return this.#r}get calculatedSize(){return this.#s}get size(){return this.#o}get fetchMethod(){return this.#a}get dispose(){return this.#n}get disposeAfter(){return this.#i}constructor(e){const{max:t=0,ttl:r,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:s,updateAgeOnHas:l,allowStale:p,dispose:f,disposeAfter:y,noDisposeOnSet:g,noUpdateTTL:m,maxSize:b=0,maxEntrySize:v=0,sizeCalculation:_,fetchMethod:w,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:O,allowStaleOnFetchAbort:E,ignoreFetchAbort:x}=e;if(0!==t&&!c(t))throw new TypeError("max option must be a nonnegative integer");const A=t?u(t):Array;if(!A)throw new Error("invalid max value: "+t);if(this.#t=t,this.#r=b,this.maxEntrySize=v||this.#r,this.sizeCalculation=_,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==w&&"function"!=typeof w)throw new TypeError("fetchMethod must be a function if specified");if(this.#a=w,this.#w=!!w,this.#c=new Map,this.#u=new Array(t).fill(void 0),this.#l=new Array(t).fill(void 0),this.#d=new A(t),this.#h=new A(t),this.#p=0,this.#f=0,this.#y=d.create(t),this.#o=0,this.#s=0,"function"==typeof f&&(this.#n=f),"function"==typeof y?(this.#i=y,this.#g=[]):(this.#i=void 0,this.#g=void 0),this.#_=!!this.#n,this.#T=!!this.#i,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!O,this.allowStaleOnFetchAbort=!!E,this.ignoreFetchAbort=!!x,0!==this.maxEntrySize){if(0!==this.#r&&!c(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!c(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#I()}if(this.allowStale=!!p,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!l,this.ttlResolution=c(i)||0===i?i:1,this.ttlAutopurge=!!o,this.ttl=r||0,this.ttl){if(!c(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(0===this.#t&&0===this.ttl&&0===this.#r)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#r){const e="LRU_CACHE_UNBOUNDED";(e=>!n.has(e))(e)&&(n.add(e),a("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",e,h))}}getRemainingTTL(e){return this.#c.has(e)?1/0:0}#P(){const e=new l(this.#t),t=new l(this.#t);this.#v=e,this.#b=t,this.#N=(n,i,a=r.now())=>{if(t[n]=0!==i?a:0,e[n]=i,0!==i&&this.ttlAutopurge){const e=setTimeout((()=>{this.#R(n)&&this.delete(this.#u[n])}),i+1);e.unref&&e.unref()}},this.#D=n=>{t[n]=0!==e[n]?r.now():0},this.#j=(r,a)=>{if(e[a]){const o=e[a],s=t[a];if(!o||!s)return;r.ttl=o,r.start=s,r.now=n||i();const c=r.now-s;r.remainingTTL=o-c}};let n=0;const i=()=>{const e=r.now();if(this.ttlResolution>0){n=e;const t=setTimeout((()=>n=0),this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=r=>{const a=this.#c.get(r);if(void 0===a)return 0;const o=e[a],s=t[a];return o&&s?o-((n||i())-s):1/0},this.#R=r=>{const a=t[r],o=e[r];return!!o&&!!a&&(n||i())-a>o}}#D=()=>{};#j=()=>{};#N=()=>{};#R=()=>!1;#I(){const e=new l(this.#t);this.#s=0,this.#m=e,this.#C=t=>{this.#s-=e[t],e[t]=0},this.#M=(e,t,r,n)=>{if(this.#S(t))return 0;if(!c(r)){if(!n)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof n)throw new TypeError("sizeCalculation must be a function");if(r=n(t,e),!c(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return r},this.#L=(t,r,n)=>{if(e[t]=r,this.#r){const r=this.#r-e[t];for(;this.#s>r;)this.#k(!0)}this.#s+=e[t],n&&(n.entrySize=r,n.totalCalculatedSize=this.#s)}}#C=e=>{};#L=(e,t,r)=>{};#M=(e,t,r,n)=>{if(r||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#x({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#f;this.#F(t)&&(!e&&this.#R(t)||(yield t),t!==this.#p);)t=this.#h[t]}*#A({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#p;this.#F(t)&&(!e&&this.#R(t)||(yield t),t!==this.#f);)t=this.#d[t]}#F(e){return void 0!==e&&this.#c.get(this.#u[e])===e}*entries(){for(const e of this.#x())void 0===this.#l[e]||void 0===this.#u[e]||this.#S(this.#l[e])||(yield[this.#u[e],this.#l[e]])}*rentries(){for(const e of this.#A())void 0===this.#l[e]||void 0===this.#u[e]||this.#S(this.#l[e])||(yield[this.#u[e],this.#l[e]])}*keys(){for(const e of this.#x()){const t=this.#u[e];void 0===t||this.#S(this.#l[e])||(yield t)}}*rkeys(){for(const e of this.#A()){const t=this.#u[e];void 0===t||this.#S(this.#l[e])||(yield t)}}*values(){for(const e of this.#x())void 0===this.#l[e]||this.#S(this.#l[e])||(yield this.#l[e])}*rvalues(){for(const e of this.#A())void 0===this.#l[e]||this.#S(this.#l[e])||(yield this.#l[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(const r of this.#x()){const n=this.#l[r],i=this.#S(n)?n.__staleWhileFetching:n;if(void 0!==i&&e(i,this.#u[r],this))return this.get(this.#u[r],t)}}forEach(e,t=this){for(const r of this.#x()){const n=this.#l[r],i=this.#S(n)?n.__staleWhileFetching:n;void 0!==i&&e.call(t,i,this.#u[r],this)}}rforEach(e,t=this){for(const r of this.#A()){const n=this.#l[r],i=this.#S(n)?n.__staleWhileFetching:n;void 0!==i&&e.call(t,i,this.#u[r],this)}}purgeStale(){let e=!1;for(const t of this.#A({allowStale:!0}))this.#R(t)&&(this.delete(this.#u[t]),e=!0);return e}info(e){const t=this.#c.get(e);if(void 0===t)return;const n=this.#l[t],i=this.#S(n)?n.__staleWhileFetching:n;if(void 0===i)return;const a={value:i};if(this.#v&&this.#b){const e=this.#v[t],n=this.#b[t];if(e&&n){const t=e-(r.now()-n);a.ttl=t,a.start=Date.now()}}return this.#m&&(a.size=this.#m[t]),a}dump(){const e=[];for(const t of this.#x({allowStale:!0})){const n=this.#u[t],i=this.#l[t],a=this.#S(i)?i.__staleWhileFetching:i;if(void 0===a||void 0===n)continue;const o={value:a};if(this.#v&&this.#b){o.ttl=this.#v[t];const e=r.now()-this.#b[t];o.start=Math.floor(Date.now()-e)}this.#m&&(o.size=this.#m[t]),e.unshift([n,o])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}set(e,t,r={}){if(void 0===t)return this.delete(e),this;const{ttl:n=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:s}=r;let{noUpdateTTL:c=this.noUpdateTTL}=r;const u=this.#M(e,t,r.size||0,o);if(this.maxEntrySize&&u>this.maxEntrySize)return s&&(s.set="miss",s.maxEntrySizeExceeded=!0),this.delete(e),this;let l=0===this.#o?void 0:this.#c.get(e);if(void 0===l)l=0===this.#o?this.#f:0!==this.#y.length?this.#y.pop():this.#o===this.#t?this.#k(!1):this.#o,this.#u[l]=e,this.#l[l]=t,this.#c.set(e,l),this.#d[this.#f]=l,this.#h[l]=this.#f,this.#f=l,this.#o++,this.#L(l,u,s),s&&(s.set="add"),c=!1;else{this.#E(l);const r=this.#l[l];if(t!==r){if(this.#w&&this.#S(r)){r.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:t}=r;void 0===t||a||(this.#_&&this.#n?.(t,e,"set"),this.#T&&this.#g?.push([t,e,"set"]))}else a||(this.#_&&this.#n?.(r,e,"set"),this.#T&&this.#g?.push([r,e,"set"]));if(this.#C(l),this.#L(l,u,s),this.#l[l]=t,s){s.set="replace";const e=r&&this.#S(r)?r.__staleWhileFetching:r;void 0!==e&&(s.oldValue=e)}}else s&&(s.set="update")}if(0===n||this.#v||this.#P(),this.#v&&(c||this.#N(l,n,i),s&&this.#j(s,l)),!a&&this.#T&&this.#g){const e=this.#g;let t;for(;t=e?.shift();)this.#i?.(...t)}return this}pop(){try{for(;this.#o;){const e=this.#l[this.#p];if(this.#k(!0),this.#S(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#T&&this.#g){const e=this.#g;let t;for(;t=e?.shift();)this.#i?.(...t)}}}#k(e){const t=this.#p,r=this.#u[t],n=this.#l[t];return this.#w&&this.#S(n)?n.__abortController.abort(new Error("evicted")):(this.#_||this.#T)&&(this.#_&&this.#n?.(n,r,"evict"),this.#T&&this.#g?.push([n,r,"evict"])),this.#C(t),e&&(this.#u[t]=void 0,this.#l[t]=void 0,this.#y.push(t)),1===this.#o?(this.#p=this.#f=0,this.#y.length=0):this.#p=this.#d[t],this.#c.delete(r),this.#o--,t}has(e,t={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:n}=t,i=this.#c.get(e);if(void 0!==i){const e=this.#l[i];if(this.#S(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#R(i))return r&&this.#D(i),n&&(n.has="hit",this.#j(n,i)),!0;n&&(n.has="stale",this.#j(n,i))}else n&&(n.has="miss");return!1}peek(e,t={}){const{allowStale:r=this.allowStale}=t,n=this.#c.get(e);if(void 0===n||!r&&this.#R(n))return;const i=this.#l[n];return this.#S(i)?i.__staleWhileFetching:i}#O(e,t,r,n){const i=void 0===t?void 0:this.#l[t];if(this.#S(i))return i;const a=new o,{signal:s}=r;s?.addEventListener("abort",(()=>a.abort(s.reason)),{signal:a.signal});const c={signal:a.signal,options:r,context:n},u=(n,i=!1)=>{const{aborted:o}=a.signal,s=r.ignoreFetchAbort&&void 0!==n;if(r.status&&(o&&!i?(r.status.fetchAborted=!0,r.status.fetchError=a.signal.reason,s&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),o&&!s&&!i)return l(a.signal.reason);const u=d;return this.#l[t]===d&&(void 0===n?u.__staleWhileFetching?this.#l[t]=u.__staleWhileFetching:this.delete(e):(r.status&&(r.status.fetchUpdated=!0),this.set(e,n,c.options))),n},l=n=>{const{aborted:i}=a.signal,o=i&&r.allowStaleOnFetchAbort,s=o||r.allowStaleOnFetchRejection,c=s||r.noDeleteOnFetchRejection,u=d;if(this.#l[t]===d&&(c&&void 0!==u.__staleWhileFetching?o||(this.#l[t]=u.__staleWhileFetching):this.delete(e)),s)return r.status&&void 0!==u.__staleWhileFetching&&(r.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw n};r.status&&(r.status.fetchDispatched=!0);const d=new Promise(((t,n)=>{const o=this.#a?.(e,i,c);o&&o instanceof Promise&&o.then((e=>t(void 0===e?void 0:e)),n),a.signal.addEventListener("abort",(()=>{r.ignoreFetchAbort&&!r.allowStaleOnFetchAbort||(t(void 0),r.allowStaleOnFetchAbort&&(t=e=>u(e,!0)))}))})).then(u,(e=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=e),l(e)))),h=Object.assign(d,{__abortController:a,__staleWhileFetching:i,__returned:void 0});return void 0===t?(this.set(e,h,{...c.options,status:void 0}),t=this.#c.get(e)):this.#l[t]=h,h}#S(e){if(!this.#w)return!1;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof o}async fetch(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:f,forceRefresh:y=!1,status:g,signal:m}=t;if(!this.#w)return g&&(g.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,status:g});const b={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:o,size:s,sizeCalculation:c,noUpdateTTL:u,noDeleteOnFetchRejection:l,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:h,status:g,signal:m};let v=this.#c.get(e);if(void 0===v){g&&(g.fetch="miss");const t=this.#O(e,v,b,f);return t.__returned=t}{const t=this.#l[v];if(this.#S(t)){const e=r&&void 0!==t.__staleWhileFetching;return g&&(g.fetch="inflight",e&&(g.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}const i=this.#R(v);if(!y&&!i)return g&&(g.fetch="hit"),this.#E(v),n&&this.#D(v),g&&this.#j(g,v),t;const a=this.#O(e,v,b,f),o=void 0!==a.__staleWhileFetching&&r;return g&&(g.fetch=i?"stale":"refresh",o&&i&&(g.returnedStale=!0)),o?a.__staleWhileFetching:a.__returned=a}}get(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}=t,o=this.#c.get(e);if(void 0!==o){const t=this.#l[o],s=this.#S(t);return a&&this.#j(a,o),this.#R(o)?(a&&(a.get="stale"),s?(a&&r&&void 0!==t.__staleWhileFetching&&(a.returnedStale=!0),r?t.__staleWhileFetching:void 0):(i||this.delete(e),a&&r&&(a.returnedStale=!0),r?t:void 0)):(a&&(a.get="hit"),s?t.__staleWhileFetching:(this.#E(o),n&&this.#D(o),t))}a&&(a.get="miss")}#B(e,t){this.#h[t]=e,this.#d[e]=t}#E(e){e!==this.#f&&(e===this.#p?this.#p=this.#d[e]:this.#B(this.#h[e],this.#d[e]),this.#B(this.#f,e),this.#f=e)}delete(e){let t=!1;if(0!==this.#o){const r=this.#c.get(e);if(void 0!==r)if(t=!0,1===this.#o)this.clear();else{this.#C(r);const t=this.#l[r];if(this.#S(t)?t.__abortController.abort(new Error("deleted")):(this.#_||this.#T)&&(this.#_&&this.#n?.(t,e,"delete"),this.#T&&this.#g?.push([t,e,"delete"])),this.#c.delete(e),this.#u[r]=void 0,this.#l[r]=void 0,r===this.#f)this.#f=this.#h[r];else if(r===this.#p)this.#p=this.#d[r];else{const e=this.#h[r];this.#d[e]=this.#d[r];const t=this.#d[r];this.#h[t]=this.#h[r]}this.#o--,this.#y.push(r)}}if(this.#T&&this.#g?.length){const e=this.#g;let t;for(;t=e?.shift();)this.#i?.(...t)}return t}clear(){for(const e of this.#A({allowStale:!0})){const t=this.#l[e];if(this.#S(t))t.__abortController.abort(new Error("deleted"));else{const r=this.#u[e];this.#_&&this.#n?.(t,r,"delete"),this.#T&&this.#g?.push([t,r,"delete"])}}if(this.#c.clear(),this.#l.fill(void 0),this.#u.fill(void 0),this.#v&&this.#b&&(this.#v.fill(0),this.#b.fill(0)),this.#m&&this.#m.fill(0),this.#p=0,this.#f=0,this.#y.length=0,this.#s=0,this.#o=0,this.#T&&this.#g){const e=this.#g;let t;for(;t=e?.shift();)this.#i?.(...t)}}}t.LRUCache=h},12037:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readableFromWeb=t.ReadableFromWeb=void 0;const n=r(58521);class i extends n.Readable{constructor(e,t){super(t),this.reader=e.getReader(),this.readerClosed=!1,this.reader.closed.then((()=>{this.readerClosed=!0})).catch((e=>{this.readerClosed=!0,this.destroy(e)}))}_read(){this.reader.read().then((e=>this.push(e.done?null:e.value))).catch((e=>this.destroy(e)))}destroy(e){return this.readerClosed||this.reader.cancel(e).then().catch((()=>{})),super.destroy(e)}}t.ReadableFromWeb=i,t.readableFromWeb=function(e,t){return new i(e,t)}},33523:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readableFromWeb=void 0;var n=r(12037);Object.defineProperty(t,"readableFromWeb",{enumerable:!0,get:function(){return n.readableFromWeb}})},94066:e=>{"use strict";e.exports=JSON.parse('{"http://schema.org/":{"properties":{"additionalType":{"subPropertyOf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}}},"http://microformats.org/profile/hcard":{}}')},45497:e=>{"use strict";e.exports=JSON.parse('{"@context":{"alternate":"http://www.w3.org/1999/xhtml/vocab#alternate","appendix":"http://www.w3.org/1999/xhtml/vocab#appendix","cite":"http://www.w3.org/1999/xhtml/vocab#cite","bookmark":"http://www.w3.org/1999/xhtml/vocab#bookmark","contents":"http://www.w3.org/1999/xhtml/vocab#contents","chapter":"http://www.w3.org/1999/xhtml/vocab#chapter","copyright":"http://www.w3.org/1999/xhtml/vocab#copyright","first":"http://www.w3.org/1999/xhtml/vocab#first","glossary":"http://www.w3.org/1999/xhtml/vocab#glossary","help":"http://www.w3.org/1999/xhtml/vocab#help","icon":"http://www.w3.org/1999/xhtml/vocab#icon","index":"http://www.w3.org/1999/xhtml/vocab#index","last":"http://www.w3.org/1999/xhtml/vocab#last","license":"http://www.w3.org/1999/xhtml/vocab#license","meta":"http://www.w3.org/1999/xhtml/vocab#meta","next":"http://www.w3.org/1999/xhtml/vocab#next","prev":"http://www.w3.org/1999/xhtml/vocab#prev","previous":"http://www.w3.org/1999/xhtml/vocab#previous","section":"http://www.w3.org/1999/xhtml/vocab#section","start":"http://www.w3.org/1999/xhtml/vocab#start","stylesheet":"http://www.w3.org/1999/xhtml/vocab#stylesheet","subsection":"http://www.w3.org/1999/xhtml/vocab#subsection","top":"http://www.w3.org/1999/xhtml/vocab#top","up":"http://www.w3.org/1999/xhtml/vocab#up","p3pv1":"http://www.w3.org/1999/xhtml/vocab#p3pv1"}}')},68713:e=>{"use strict";e.exports=JSON.parse('{"@context":{"as":"https://www.w3.org/ns/activitystreams#","cat":"http://www.w3.org/ns/dcat#","cc":"http://creativecommons.org/ns#","cnt":"http://www.w3.org/2008/content#","csvw":"http://www.w3.org/ns/csvw#","ctag":"http://commontag.org/ns#","dc":"http://purl.org/dc/terms/","dc11":"http://purl.org/dc/elements/1.1/","dcat":"http://www.w3.org/ns/dcat#","dcterms":"http://purl.org/dc/terms/","dqv":"http://www.w3.org/ns/dqv#","duv":"https://www.w3.org/TR/vocab-duv#","earl":"http://www.w3.org/ns/earl#","foaf":"http://xmlns.com/foaf/0.1/","gldp":"http://www.w3.org/ns/people#","gr":"http://purl.org/goodrelations/v1#","grddl":"http://www.w3.org/2003/g/data-view#","ht":"http://www.w3.org/2006/http#","ical":"http://www.w3.org/2002/12/cal/icaltzd#","ldp":"http://www.w3.org/ns/ldp#","ma":"http://www.w3.org/ns/ma-ont#","oa":"http://www.w3.org/ns/oa#","odrl":"http://www.w3.org/ns/odrl/2/","og":"http://ogp.me/ns#","org":"http://www.w3.org/ns/org#","owl":"http://www.w3.org/2002/07/owl#","prov":"http://www.w3.org/ns/prov#","ptr":"http://www.w3.org/2009/pointers#","qb":"http://purl.org/linked-data/cube#","rev":"http://purl.org/stuff/rev#","rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","rdfa":"http://www.w3.org/ns/rdfa#","rdfs":"http://www.w3.org/2000/01/rdf-schema#","rif":"http://www.w3.org/2007/rif#","rr":"http://www.w3.org/ns/r2rml#","schema":"http://schema.org/","sd":"http://www.w3.org/ns/sparql-service-description#","sioc":"http://rdfs.org/sioc/ns#","skos":"http://www.w3.org/2004/02/skos/core#","skosxl":"http://www.w3.org/2008/05/skos-xl#","ssn":"http://www.w3.org/ns/ssn/","sosa":"http://www.w3.org/ns/sosa/","time":"http://www.w3.org/2006/time#","v":"http://rdf.data-vocabulary.org/#","vcard":"http://www.w3.org/2006/vcard/ns#","void":"http://rdfs.org/ns/void#","wdr":"http://www.w3.org/2007/05/powder#","wdrs":"http://www.w3.org/2007/05/powder-s#","xhv":"http://www.w3.org/1999/xhtml/vocab#","xml":"http://www.w3.org/XML/1998/namespace","xsd":"http://www.w3.org/2001/XMLSchema#","describedby":"http://www.w3.org/2007/05/powder-s#describedby","license":"http://www.w3.org/1999/xhtml/vocab#license","role":"http://www.w3.org/1999/xhtml/vocab#role"}}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(90128);Comunica=n})(); +var Comunica;(()=>{var e={36885:(e,t,r)=>{var{Buffer:n}=r(1048),a={},o=a.LEFT_BRACE=1,s=a.RIGHT_BRACE=2,c=a.LEFT_BRACKET=3,u=a.RIGHT_BRACKET=4,l=a.COLON=5,d=a.COMMA=6,h=a.TRUE=7,p=a.FALSE=8,f=a.NULL=9,y=a.STRING=10,g=a.NUMBER=11,m=a.START=17,b=a.STOP=18,v=a.TRUE1=33,_=a.TRUE2=34,w=a.TRUE3=35,T=a.FALSE1=49,S=a.FALSE2=50,O=a.FALSE3=51,E=a.FALSE4=52,x=a.NULL1=65,A=a.NULL2=66,R=a.NULL3=67,I=a.NUMBER1=81,P=a.NUMBER3=83,N=a.STRING1=97,D=a.STRING2=98,j=a.STRING3=99,C=a.STRING4=100,M=a.STRING5=101,L=a.STRING6=102,k=a.VALUE=113,F=a.KEY=114,B=a.OBJECT=129,U=a.ARRAY=130,q="\\".charCodeAt(0),V="/".charCodeAt(0),Q="\b".charCodeAt(0),$="\f".charCodeAt(0),H="\n".charCodeAt(0),G="\r".charCodeAt(0),z="\t".charCodeAt(0),K=65536;function X(e){return n.alloc?n.alloc(e):new n(e)}function J(){this.tState=m,this.value=void 0,this.string=void 0,this.stringBuffer=X(K),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=k,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:X(2),3:X(3),4:X(4)},this.offset=-1}J.toknam=function(e){for(var t=Object.keys(a),r=0,n=t.length;r=K&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=e},W.appendStringBuf=function(e,t,r){var n=e.length;"number"==typeof t&&(n="number"==typeof r?r<0?e.length-t+r:r-t:e.length-t),n<0&&(n=0),this.stringBufferOffset+n>K&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),e.copy(this.stringBuffer,this.stringBufferOffset,t,r),this.stringBufferOffset+=n},W.write=function(e){var t;"string"==typeof e&&(e=new n(e));for(var r=0,i=e.length;r=48&&t<64)this.string=String.fromCharCode(t),this.tState=P;else if(32!==t&&9!==t&&10!==t&&13!==t)return this.charError(e,r)}else if(this.tState===N)if(t=e[r],this.bytes_remaining>0){for(var a=0;a=128){if(t<=193||t>244)return this.onError(new Error("Invalid UTF-8 character at position "+r+" in state "+J.toknam(this.tState)));if(t>=194&&t<=223&&(this.bytes_in_sequence=2),t>=224&&t<=239&&(this.bytes_in_sequence=3),t>=240&&t<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+r>e.length){for(var g=0;g<=e.length-1-r;g++)this.temp_buffs[this.bytes_in_sequence][g]=e[r+g];this.bytes_remaining=r+this.bytes_in_sequence-e.length,r=e.length-1}else this.appendStringBuf(e,r,r+this.bytes_in_sequence),r=r+this.bytes_in_sequence-1}else if(34===t)this.tState=m,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(y,this.string),this.offset+=n.byteLength(this.string,"utf8")+1,this.string=void 0;else if(92===t)this.tState=D;else{if(!(t>=32))return this.charError(e,r);this.appendStringChar(t)}else if(this.tState===D)if(34===(t=e[r]))this.appendStringChar(t),this.tState=N;else if(92===t)this.appendStringChar(q),this.tState=N;else if(47===t)this.appendStringChar(V),this.tState=N;else if(98===t)this.appendStringChar(Q),this.tState=N;else if(102===t)this.appendStringChar($),this.tState=N;else if(110===t)this.appendStringChar(H),this.tState=N;else if(114===t)this.appendStringChar(G),this.tState=N;else if(116===t)this.appendStringChar(z),this.tState=N;else{if(117!==t)return this.charError(e,r);this.unicode="",this.tState=j}else if(this.tState===j||this.tState===C||this.tState===M||this.tState===L){if(!((t=e[r])>=48&&t<64||t>64&&t<=70||t>96&&t<=102))return this.charError(e,r);if(this.unicode+=String.fromCharCode(t),this.tState++===L){var b=parseInt(this.unicode,16);this.unicode=void 0,void 0!==this.highSurrogate&&b>=56320&&b<57344?(this.appendStringBuf(new n(String.fromCharCode(this.highSurrogate,b))),this.highSurrogate=void 0):void 0===this.highSurrogate&&b>=55296&&b<56320?this.highSurrogate=b:(void 0!==this.highSurrogate&&(this.appendStringBuf(new n(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new n(String.fromCharCode(b)))),this.tState=N}}else if(this.tState===I||this.tState===P)switch(t=e[r]){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 46:case 101:case 69:case 43:case 45:this.string+=String.fromCharCode(t),this.tState=P;break;default:this.tState=m;var k=this.numberReviver(this.string);if(k)return k;this.offset+=this.string.length-1,this.string=void 0,r--}else if(this.tState===v){if(114!==e[r])return this.charError(e,r);this.tState=_}else if(this.tState===_){if(117!==e[r])return this.charError(e,r);this.tState=w}else if(this.tState===w){if(101!==e[r])return this.charError(e,r);this.tState=m,this.onToken(h,!0),this.offset+=3}else if(this.tState===T){if(97!==e[r])return this.charError(e,r);this.tState=S}else if(this.tState===S){if(108!==e[r])return this.charError(e,r);this.tState=O}else if(this.tState===O){if(115!==e[r])return this.charError(e,r);this.tState=E}else if(this.tState===E){if(101!==e[r])return this.charError(e,r);this.tState=m,this.onToken(p,!1),this.offset+=4}else if(this.tState===x){if(117!==e[r])return this.charError(e,r);this.tState=A}else if(this.tState===A){if(108!==e[r])return this.charError(e,r);this.tState=R}else if(this.tState===R){if(108!==e[r])return this.charError(e,r);this.tState=m,this.onToken(f,null),this.offset+=3}},W.onToken=function(e,t){},W.parseError=function(e,t){this.tState=b,this.onError(new Error("Unexpected "+J.toknam(e)+(t?"("+JSON.stringify(t)+")":"")+" in state "+J.toknam(this.state)))},W.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},W.pop=function(){var e=this.value,t=this.stack.pop();this.value=t.value,this.key=t.key,this.mode=t.mode,this.emit(e),this.mode||(this.state=k)},W.emit=function(e){this.mode&&(this.state=d),this.onValue(e)},W.onValue=function(e){},W.onToken=function(e,t){if(this.state===k)if(e===y||e===g||e===h||e===p||e===f)this.value&&(this.value[this.key]=t),this.emit(t);else if(e===o)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=F,this.mode=B;else if(e===c)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=U,this.state=k;else if(e===s){if(this.mode!==B)return this.parseError(e,t);this.pop()}else{if(e!==u)return this.parseError(e,t);if(this.mode!==U)return this.parseError(e,t);this.pop()}else if(this.state===F)if(e===y)this.key=t,this.state=l;else{if(e!==s)return this.parseError(e,t);this.pop()}else if(this.state===l){if(e!==l)return this.parseError(e,t);this.state=k}else{if(this.state!==d)return this.parseError(e,t);if(e===d)this.mode===U?(this.key++,this.state=k):this.mode===B&&(this.state=F);else{if(!(e===u&&this.mode===U||e===s&&this.mode===B))return this.parseError(e,t);this.pop()}}},W.numberReviver=function(e){var t=Number(e);if(isNaN(t))return this.charError(buffer,i);e.match(/[0-9]+/)==e&&t.toString()!=e?this.onToken(y,e):this.onToken(g,t)},J.C=a,e.exports=J},64265:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fragment=void 0,t.fragment=function(e){let t=function(e){let t=e;(t.endsWith("/")||t.endsWith("#"))&&(t=t.slice(0,t.length-1));const r=[];t.lastIndexOf("/")>0&&r.push(t.lastIndexOf("/")),t.lastIndexOf("#")>0&&r.push(t.lastIndexOf("#"));const n=Math.max(...r);return t.slice(n+1)}(e);return t=t?function(e){var t;const r=null===(t=e.split(/[^a-z0-9]+/gi).filter((e=>""!==e)).map((e=>e[0].toUpperCase()+e.slice(1))).join("").match(/[a-z][a-z0-9]+/gi))||void 0===t?void 0:t[0];return void 0===r?void 0:r[0].toLowerCase()+r.slice(1)}(t):void 0,t||"v"}},37669:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupAllPrefixes=t.prefixToUri=t.uriToPrefix=void 0;const i=r(64265),a=r(30376);t.uriToPrefix=function(e,t){return n(this,void 0,void 0,(function*(){let r;try{r=yield(0,a.lookupPrefix)(e,t)}catch(n){(null==t?void 0:t.mintOnUnknown)&&(r=(0,i.fragment)(e).slice(0,4))}if(void 0!==r&&"object"==typeof(null==t?void 0:t.existingPrefixes)&&r in t.existingPrefixes){let e=0;for(;`${r}${e}`in t.existingPrefixes;)e+=1;r=`${r}${e}`}return r}))},t.prefixToUri=function(e,t){return n(this,void 0,void 0,(function*(){try{return yield(0,a.lookupUri)(e,t)}catch(e){return}}))};var o=r(30376);Object.defineProperty(t,"lookupAllPrefixes",{enumerable:!0,get:function(){return o.lookupAllPrefixes}})},87173:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchContext=t.fetchJson=void 0;const i=r(99766);function a(e,t){var r;return n(this,void 0,void 0,(function*(){const n=null!==(r=null==t?void 0:t.fetch)&&void 0!==r?r:i.fetch;return(yield n(e)).json()}))}t.fetchJson=a,t.fetchContext=function(e,t){return n(this,void 0,void 0,(function*(){return(yield a(e,t))["@context"]}))}},30376:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(12257),t),i(r(39268),t),i(r(91661),t)},91661:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupAllPrefixes=void 0;const i=r(87173);t.lookupAllPrefixes=function(e){return n(this,void 0,void 0,(function*(){return(0,i.fetchContext)("https://prefix.cc/context",e)}))}},12257:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupUri=void 0;const i=r(87173);t.lookupUri=function(e,t){return n(this,void 0,void 0,(function*(){const r=(yield(0,i.fetchContext)(`https://prefix.cc/${e}.file.jsonld`,t))[e];if("string"!=typeof r)throw new Error(`Expected uri to be a string, received: ${r} of type ${typeof r}`);return r}))}},39268:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupPrefix=void 0;const i=r(87173);t.lookupPrefix=function(e,t){return n(this,void 0,void 0,(function*(){const r=new URL("https://prefix.cc/reverse");r.searchParams.append("uri",e),r.searchParams.append("format","jsonld");const n=Object.keys(yield(0,i.fetchContext)(r,t));if(0===n.length)throw new Error("No prefixes returned");return n[0]}))}},99766:function(e,t){var r="undefined"!=typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var r="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in e,o="ArrayBuffer"in e;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=f(t);return t.readAsArrayBuffer(e),r}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,r,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var T=[301,302,303,307,308];w.redirect=function(e,t){if(-1===T.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,r){return new Promise((function(n,a){var o=new v(e,r);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new w(i,r))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=h,e.Request=v,e.Response=w),t.Headers=h,t.Request=v,t.Response=w,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},49126:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SaxesParser=t.EVENTS=void 0;const n=r(94824),i=r(30718),a=r(26457);var o=n.isS,s=n.isChar,c=n.isNameStartChar,u=n.isNameChar,l=n.S_LIST,d=n.NAME_RE,h=i.isChar,p=a.isNCNameStartChar,f=a.isNCNameChar,y=a.NC_NAME_RE;const g="http://www.w3.org/XML/1998/namespace",m="http://www.w3.org/2000/xmlns/",b={__proto__:null,xml:g,xmlns:m},v={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},_=-1,w=-2,T=13,S=33,O=10,E=60,x=61,A=62,R=63,I=93,P=e=>34===e||39===e,N=[34,39],D=[...N,91,A],j=[...N,E,I],C=[x,R,...l],M=[...l,A,38,E];function L(e,t,r){switch(t){case"xml":r!==g&&e.fail(`xml prefix must be bound to ${g}.`);break;case"xmlns":r!==m&&e.fail(`xmlns prefix must be bound to ${m}.`)}switch(r){case m:e.fail(""===t?`the default namespace may not be set to ${r}.`:`may not assign a prefix (even "xmlns") to the URI ${m}.`);break;case g:switch(t){case"xml":break;case"":e.fail(`the default namespace may not be set to ${r}.`);break;default:e.fail("may not assign the xml namespace to another prefix.")}}}const k=e=>y.test(e),F=e=>d.test(e);t.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const B={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};t.SaxesParser=class{get closed(){return this._closed}constructor(e){this.opt=null!=e?e:{},this.fragmentOpt=!!this.opt.fragment;const t=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,t){this.nameStartCheck=p,this.nameCheck=f,this.isName=k,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},b);const e=this.opt.additionalNamespaces;null!=e&&(function(e,t){for(const r of Object.keys(t))L(e,r,t[r])}(this,e),Object.assign(this.ns,e))}else this.nameStartCheck=c,this.nameCheck=u,this.isName=F,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}_init(){var e;this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:t}=this;this.state=t?T:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:r}=this.opt;if(void 0===r){if(!0===this.opt.forceXMLVersion)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");r="1.0"}this.setXMLVersion(r),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(v),null===(e=this.readyHandler)||void 0===e||e.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(e,t){this[B[e]]=t}off(e){this[B[e]]=void 0}makeError(e){var t;let r=null!==(t=this.fileName)&&void 0!==t?t:"";return this.trackPosition&&(r.length>0&&(r+=":"),r+=`${this.line}:${this.column}`),r.length>0&&(r+=": "),new Error(r+e)}fail(e){const t=this.makeError(e),r=this.errorHandler;if(void 0===r)throw t;return r(t),this}write(e){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let t=!1;null===e?(t=!0,e=""):"object"==typeof e&&(e=e.toString()),void 0!==this.carriedFromPrevious&&(e=`${this.carriedFromPrevious}${e}`,this.carriedFromPrevious=void 0);let r=e.length;const n=e.charCodeAt(r-1);!t&&(13===n||n>=55296&&n<=56319)&&(this.carriedFromPrevious=e[r-1],r--,e=e.slice(0,r));const{stateTable:i}=this;for(this.chunk=e,this.i=0;this.i=e.length)return _;const r=e.charCodeAt(t);if(this.column++,r<55296){if(r>=32||9===r)return r;switch(r){case O:return this.line++,this.column=0,this.positionAtNewLine=this.position,O;case 13:return e.charCodeAt(t+1)===O&&(this.i=t+2),this.line++,this.column=0,this.positionAtNewLine=this.position,w;default:return this.fail("disallowed character."),r}}if(r>56319)return r>=57344&&r<=65533||this.fail("disallowed character."),r;const n=65536+1024*(r-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,n>1114111&&this.fail("disallowed character."),n}getCode11(){const{chunk:e,i:t}=this;if(this.prevI=t,this.i=t+1,t>=e.length)return _;const r=e.charCodeAt(t);if(this.column++,r<55296){if(r>31&&r<127||r>159&&8232!==r||9===r)return r;switch(r){case O:return this.line++,this.column=0,this.positionAtNewLine=this.position,O;case 13:{const r=e.charCodeAt(t+1);r!==O&&133!==r||(this.i=t+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,w;default:return this.fail("disallowed character."),r}}if(r>56319)return r>=57344&&r<=65533||this.fail("disallowed character."),r;const n=65536+1024*(r-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,n>1114111&&this.fail("disallowed character."),n}getCodeNorm(){const e=this.getCode();return e===w?O:e}unget(){this.i=this.prevI,this.column--}captureTo(e){let{i:t}=this;const{chunk:r}=this;for(;;){const n=this.getCode(),i=n===w,a=i?O:n;if(a===_||e.includes(a))return this.text+=r.slice(t,this.prevI),a;i&&(this.text+=`${r.slice(t,this.prevI)}\n`,t=this.i)}}captureToChar(e){let{i:t}=this;const{chunk:r}=this;for(;;){let n=this.getCode();switch(n){case w:this.text+=`${r.slice(t,this.prevI)}\n`,t=this.i,n=O;break;case _:return this.text+=r.slice(t),!1}if(n===e)return this.text+=r.slice(t,this.prevI),!0}}captureNameChars(){const{chunk:e,i:t}=this;for(;;){const r=this.getCode();if(r===_)return this.name+=e.slice(t),_;if(!u(r))return this.name+=e.slice(t,this.prevI),r===w?O:r}}skipSpaces(){for(;;){const e=this.getCodeNorm();if(e===_||!o(e))return e}}setXMLVersion(e){this.currentXMLVersion=e,"1.0"===e?(this.isChar=s,this.getCode=this.getCode10):(this.isChar=h,this.getCode=this.getCode11)}sBegin(){65279===this.chunk.charCodeAt(0)&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const e=this.i,t=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),t){case E:if(this.state=15,0!==this.text.length)throw new Error("no-empty text at start");break;case _:break;default:this.unget(),this.state=T,this.xmlDeclPossible=!1}}sDoctype(){var e;const t=this.captureTo(D);switch(t){case A:null===(e=this.doctypeHandler)||void 0===e||e.call(this,this.text),this.text="",this.state=T,this.doctype=!0;break;case _:break;default:this.text+=String.fromCodePoint(t),91===t?this.state=4:P(t)&&(this.state=3,this.q=t)}}sDoctypeQuote(){const e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=2)}sDTD(){const e=this.captureTo(j);e!==_&&(this.text+=String.fromCodePoint(e),e===I?this.state=2:e===E?this.state=6:P(e)&&(this.state=5,this.q=e))}sDTDQuoted(){const e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=4,this.q=null)}sDTDOpenWaka(){const e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case 33:this.state=7,this.openWakaBang="";break;case R:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const e=String.fromCodePoint(this.getCodeNorm()),t=this.openWakaBang+=e;this.text+=e,"-"!==t&&(this.state="--"===t?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=45===e?10:8}sDTDCommentEnded(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===A?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(R)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===A&&(this.state=4)}sText(){0!==this.tags.length?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:e}=this;const{chunk:t}=this;e:for(;;)switch(this.getCode()){case w:this.entity+=`${t.slice(e,this.prevI)}\n`,e=this.i;break;case 59:{const{entityReturnState:r}=this,n=this.entity+t.slice(e,this.prevI);let i;this.state=r,""===n?(this.fail("empty entity name."),i="&;"):(i=this.parseEntity(n),this.entity=""),r===T&&void 0===this.textHandler||(this.text+=i);break e}case _:this.entity+=t.slice(e);break e}}sOpenWaka(){const e=this.getCode();if(c(e))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(e){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case R:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=T,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){var e;const t=this.getCodeNorm();45===t?(this.state=19,null===(e=this.commentHandler)||void 0===e||e.call(this,this.text),this.text=""):(this.text+=`-${String.fromCodePoint(t)}`,this.state=17)}sCommentEnded(){const e=this.getCodeNorm();e!==A?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(e)}`,this.state=17):this.state=T}sCData(){this.captureToChar(I)&&(this.state=21)}sCDataEnding(){const e=this.getCodeNorm();e===I?this.state=22:(this.text+=`]${String.fromCodePoint(e)}`,this.state=20)}sCDataEnding2(){var e;const t=this.getCodeNorm();switch(t){case A:null===(e=this.cdataHandler)||void 0===e||e.call(this,this.text),this.text="",this.state=T;break;case I:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(t)}`,this.state=20}}sPIFirstChar(){const e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=24):e===R||o(e)?(this.fail("processing instruction without a target."),this.state=e===R?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(e),this.state=24)}sPIRest(){const{chunk:e,i:t}=this;for(;;){const r=this.getCodeNorm();if(r===_)return void(this.piTarget+=e.slice(t));if(!this.nameCheck(r)){this.piTarget+=e.slice(t,this.prevI);const n=r===R;n||o(r)?"xml"===this.piTarget?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=n?S:27):this.state=n?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(r));break}}}sPIBody(){if(0===this.text.length){const e=this.getCodeNorm();e===R?this.state=26:o(e)||(this.text=String.fromCodePoint(e))}else this.captureToChar(R)&&(this.state=26)}sPIEnding(){var e;const t=this.getCodeNorm();if(t===A){const{piTarget:t}=this;"xml"===t.toLowerCase()&&this.fail("the XML declaration must appear at the start of the document."),null===(e=this.piHandler)||void 0===e||e.call(this,{target:t,body:this.text}),this.piTarget=this.text="",this.state=T}else t===R?this.text+="?":(this.text+=`?${String.fromCodePoint(t)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const e=this.skipSpaces();e!==R?e!==_&&(this.state=28,this.name=String.fromCodePoint(e)):this.state=S}sXMLDeclName(){const e=this.captureTo(C);if(e===R)return this.state=S,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(o(e)||e===x){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=e===x?30:29}}sXMLDeclEq(){const e=this.getCodeNorm();if(e===R)return this.state=S,void this.fail("XML declaration is incomplete.");o(e)||(e!==x&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const e=this.getCodeNorm();if(e===R)return this.state=S,void this.fail("XML declaration is incomplete.");o(e)||(P(e)?this.q=e:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const e=this.captureTo([this.q,R]);if(e===R)return this.state=S,this.text="",void this.fail("XML declaration is incomplete.");if(e===_)return;const t=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const e=t;this.xmlDecl.version=e,/^1\.[0-9]+$/.test(e)?this.opt.forceXMLVersion||this.setXMLVersion(e):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(t)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=t;break;case"standalone":"yes"!==t&&"no"!==t&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=t}this.name="",this.state=32}sXMLDeclSeparator(){const e=this.getCodeNorm();e!==R?(o(e)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=S}sXMLDeclEnding(){var e;this.getCodeNorm()===A?("xml"!==this.piTarget?this.fail("processing instructions are not allowed before root."):"version"!==this.name&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),null===(e=this.xmldeclHandler)||void 0===e||e.call(this,this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=T):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){var e;const t=this.captureNameChars();if(t===_)return;const r=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=r.ns=Object.create(null)),null===(e=this.openTagStartHandler)||void 0===e||e.call(this,r),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case A:this.openTag();break;case 47:this.state=35;break;default:o(t)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===A?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const e=this.skipSpaces();e!==_&&(c(e)?(this.unget(),this.state=37):e===A?this.openTag():47===e?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const e=this.captureNameChars();e===x?this.state=39:o(e)?this.state=38:e===A?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):e!==_&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const e=this.skipSpaces();switch(e){case _:return;case x:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",e===A?this.openTag():c(e)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const e=this.getCodeNorm();P(e)?(this.q=e,this.state=40):o(e)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:e,chunk:t}=this;let{i:r}=this;for(;;)switch(this.getCode()){case e:return this.pushAttrib(this.name,this.text+t.slice(r,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=t.slice(r,this.prevI),this.state=14,void(this.entityReturnState=40);case O:case w:case 9:this.text+=`${t.slice(r,this.prevI)} `,r=this.i;break;case E:return this.text+=t.slice(r,this.prevI),void this.fail("disallowed character.");case _:return void(this.text+=t.slice(r))}}sAttribValueClosed(){const e=this.getCodeNorm();o(e)?this.state=36:e===A?this.openTag():47===e?this.state=35:c(e)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const e=this.captureTo(M);switch(e){case 38:this.state=14,this.entityReturnState=42;break;case E:this.fail("disallowed character.");break;case _:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",e===A?this.openTag():this.state=36}}sCloseTag(){const e=this.captureNameChars();e===A?this.closeTag():o(e)?this.state=44:e!==_&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case A:this.closeTag();break;case _:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:e,forbiddenState:t}=this;const{chunk:r,textHandler:n}=this;e:for(;;)switch(this.getCode()){case E:if(this.state=15,void 0!==n){const{text:t}=this,i=r.slice(e,this.prevI);0!==t.length?(n(t+i),this.text=""):0!==i.length&&n(i)}t=0;break e;case 38:this.state=14,this.entityReturnState=T,void 0!==n&&(this.text+=r.slice(e,this.prevI)),t=0;break e;case I:switch(t){case 0:t=1;break;case 1:t=2;break;case 2:break;default:throw new Error("impossible state")}break;case A:2===t&&this.fail('the string "]]>" is disallowed in char data.'),t=0;break;case w:void 0!==n&&(this.text+=`${r.slice(e,this.prevI)}\n`),e=this.i,t=0;break;case _:void 0!==n&&(this.text+=r.slice(e));break e;default:t=0}this.forbiddenState=t}handleTextOutsideRoot(){let{i:e}=this;const{chunk:t,textHandler:r}=this;let n=!1;e:for(;;){const i=this.getCode();switch(i){case E:if(this.state=15,void 0!==r){const{text:n}=this,i=t.slice(e,this.prevI);0!==n.length?(r(n+i),this.text=""):0!==i.length&&r(i)}break e;case 38:this.state=14,this.entityReturnState=T,void 0!==r&&(this.text+=t.slice(e,this.prevI)),n=!0;break e;case w:void 0!==r&&(this.text+=`${t.slice(e,this.prevI)}\n`),e=this.i;break;case _:void 0!==r&&(this.text+=t.slice(e));break e;default:o(i)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(e,t){var r;const{prefix:n,local:i}=this.qname(e),a={name:e,prefix:n,local:i,value:t};if(this.attribList.push(a),null===(r=this.attributeHandler)||void 0===r||r.call(this,a),"xmlns"===n){const e=t.trim();"1.0"===this.currentXMLVersion&&""===e&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[i]=e,L(this,i,e)}else if("xmlns"===e){const e=t.trim();this.topNS[""]=e,L(this,"",e)}}pushAttribPlain(e,t){var r;const n={name:e,value:t};this.attribList.push(n),null===(r=this.attributeHandler)||void 0===r||r.call(this,n)}end(){var e,t;this.sawRoot||this.fail("document must contain a root element.");const{tags:r}=this;for(;r.length>0;){const e=r.pop();this.fail(`unclosed tag: ${e.name}`)}0!==this.state&&this.state!==T&&this.fail("unexpected end.");const{text:n}=this;return 0!==n.length&&(null===(e=this.textHandler)||void 0===e||e.call(this,n),this.text=""),this._closed=!0,null===(t=this.endHandler)||void 0===t||t.call(this),this._init(),this}resolve(e){var t,r;let n=this.topNS[e];if(void 0!==n)return n;const{tags:i}=this;for(let t=i.length-1;t>=0;t--)if(n=i[t].ns[e],void 0!==n)return n;return n=this.ns[e],void 0!==n?n:null===(r=(t=this.opt).resolvePrefix)||void 0===r?void 0:r.call(t,e)}qname(e){const t=e.indexOf(":");if(-1===t)return{prefix:"",local:e};const r=e.slice(t+1),n=e.slice(0,t);return(""===n||""===r||r.includes(":"))&&this.fail(`malformed name: ${e}.`),{prefix:n,local:r}}processAttribsNS(){var e;const{attribList:t}=this,r=this.tag;{const{prefix:t,local:n}=this.qname(r.name);r.prefix=t,r.local=n;const i=r.uri=null!==(e=this.resolve(t))&&void 0!==e?e:"";""!==t&&("xmlns"===t&&this.fail('tags may not have "xmlns" as prefix.'),""===i&&(this.fail(`unbound namespace prefix: ${JSON.stringify(t)}.`),r.uri=t))}if(0===t.length)return;const{attributes:n}=r,i=new Set;for(const e of t){const{name:t,prefix:r,local:a}=e;let o,s;""===r?(o="xmlns"===t?m:"",s=t):(o=this.resolve(r),void 0===o&&(this.fail(`unbound namespace prefix: ${JSON.stringify(r)}.`),o=r),s=`{${o}}${a}`),i.has(s)&&this.fail(`duplicate attribute: ${s}.`),i.add(s),e.uri=o,n[t]=e}this.attribList=[]}processAttribsPlain(){const{attribList:e}=this,t=this.tag.attributes;for(const{name:r,value:n}of e)void 0!==t[r]&&this.fail(`duplicate attribute: ${r}.`),t[r]=n;this.attribList=[]}openTag(){var e;this.processAttribs();const{tags:t}=this,r=this.tag;r.isSelfClosing=!1,null===(e=this.openTagHandler)||void 0===e||e.call(this,r),t.push(r),this.state=T,this.name=""}openSelfClosingTag(){var e,t,r;this.processAttribs();const{tags:n}=this,i=this.tag;i.isSelfClosing=!0,null===(e=this.openTagHandler)||void 0===e||e.call(this,i),null===(t=this.closeTagHandler)||void 0===t||t.call(this,i),null===(this.tag=null!==(r=n[n.length-1])&&void 0!==r?r:null)&&(this.closedRoot=!0),this.state=T,this.name=""}closeTag(){const{tags:e,name:t}=this;if(this.state=T,this.name="",""===t)return this.fail("weird empty close tag."),void(this.text+="");const r=this.closeTagHandler;let n=e.length;for(;n-- >0;){const n=this.tag=e.pop();if(this.topNS=n.ns,null==r||r(n),n.name===t)break;this.fail("unexpected close tag.")}0===n?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${t}.`),this.text+=``)}parseEntity(e){if("#"!==e[0]){const t=this.ENTITIES[e];return void 0!==t?t:(this.fail(this.isName(e)?"undefined entity.":"disallowed character in entity name."),`&${e};`)}let t=NaN;return"x"===e[1]&&/^#x[0-9a-f]+$/i.test(e)?t=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(t=parseInt(e.slice(1),10)),this.isChar(t)?String.fromCodePoint(t):(this.fail("malformed character entity."),`&${e};`)}}},52267:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableWebToNodeStream=void 0;const n=r(58521);class i extends n.Readable{constructor(e){super(),this.bytesRead=0,this.released=!1,this.reader=e.getReader()}async _read(){if(this.released)return void this.push(null);this.pendingRead=this.reader.read();const e=await this.pendingRead;delete this.pendingRead,e.done||this.released?this.push(null):(this.bytesRead+=e.value.length,this.push(e.value))}async waitForReadToComplete(){this.pendingRead&&await this.pendingRead}async close(){await this.syncAndRelease()}async syncAndRelease(){this.released=!0,await this.waitForReadToComplete(),await this.reader.releaseLock()}}t.ReadableWebToNodeStream=i},67083:e=>{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},37754:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[];return r=e.on("data",(e=>t.push(e))),n=t,new Promise(((e,t)=>{r.on("end",(()=>e(n))),r.on("error",t)}));var r,n}},2922:(e,t,r)=>{const n=r(82815),i=r(30979),a=r(67458),o=r(21156),s=r(37841);e.exports={DynamicNestedLoopJoin:n,HashJoin:i,NestedLoopJoin:a,SymmetricHashJoin:o,MergeStream:s}},82815:(e,t,r)=>{let n=r(76664),i=n.MultiTransformIterator,a=n.SimpleTransformIterator;e.exports=class extends i{constructor(e,t,r,n){super(e,n),this.funRight=t,this.funJoin=r}_createTransformer(e){return new a(this.funRight(e),{transform:(t,r,n)=>{let i=this.funJoin(e,t);null!==i&&n(i),r()}})}}},30979:(e,t,r)=>{let n=r(76664).AsyncIterator;e.exports=class extends n{constructor(e,t,r,n){super(),this.addedDataListener=!1,this.left=e,this.right=t,this.funHash=r,this.funJoin=n,this.leftMap=new Map,this.match=null,this.matches=[],this.matchIdx=0,this.left.on("error",(e=>this.destroy(e))),this.right.on("error",(e=>this.destroy(e))),this.readable=!1,this.left.on("end",function(){this.readable=!0,this.right.on("readable",(()=>this.readable=!0)),this.right.on("end",(()=>{this.hasResults()||this._end()}))}.bind(this)),this.on("newListener",(e=>{"data"===e&&this._addDataListenerIfNeeded()})),this.left.readable&&this._addDataListenerIfNeeded(),this.left.on("readable",(()=>this._addDataListenerIfNeeded()))}hasResults(){return!this.right.ended||this.matchIdx{const{MultiTransformIterator:n,SimpleTransformIterator:i,scheduleTask:a}=r(76664);e.exports=class extends n{constructor(e,t,r,n){super(e,n),this.right=t,this.funJoin=r,this.on("end",(()=>this.right.close()))}_end(){super._end(),a((()=>this.right.destroy()))}_createTransformer(e){return new i(this.right.clone(),{transform:(t,r,n)=>{let i=this.funJoin(e,t);null!==i&&n(i),r()}})}}},21156:(e,t,r)=>{let n=r(76664).AsyncIterator;e.exports=class extends n{constructor(e,t,r,n){super(),this.left=e,this.right=t,this.funHash=r,this.funJoin=n,this.usedLeft=!1,this.leftMap=new Map,this.rightMap=new Map,this.on("end",(()=>this._cleanup())),this.match=null,this.matches=[],this.matchIdx=0,(this.left.readable||this.right.readable)&&(this.readable=!0),this.left.on("error",(e=>this.destroy(e))),this.right.on("error",(e=>this.destroy(e))),this.left.on("readable",(()=>this.readable=!0)),this.right.on("readable",(()=>this.readable=!0)),this.left.on("end",(()=>{this.hasResults()||this._end()})),this.right.on("end",(()=>{this.hasResults()||this._end()}))}hasResults(){return!this.left.ended||!this.right.ended||!!this.matches&&this.matchIdx{let n=r(76664).AsyncIterator;e.exports=class extends n{constructor(e){super(),Array.isArray(e)||(e=Array.prototype.slice.call(arguments)),this.streams=e;for(let t of e)t.on("readable",(()=>this.emit("readable"))),t.on("end",(()=>this._removeStream(t)));0===this.streams.length&&this.close(),this.idx=this.streams.length-1}_removeStream(e){let t=this.streams.indexOf(e);t<0||(this.streams.splice(t,1),this.idx>=this.streams.length&&--this.idx,0===this.streams.length&&this._end())}close(){super.close();for(let e of this.streams)e.close()}read(){for(let e=0;e{e.exports=function(e){const t=new(r(5868).LoggerVoid),n=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-init/^3.0.0/components/ActorInit.jsonld#ActorInit_default_bus"}),i=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-context-preprocess/^3.0.0/components/ActorContextPreprocess.jsonld#ActorContextPreprocess_default_bus"}),a=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-hash-bindings/^3.0.0/components/ActorHashBindings.jsonld#ActorHashBindings_default_bus"}),o=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-optimize-query-operation/^3.0.0/components/ActorOptimizeQueryOperation.jsonld#ActorOptimizeQueryOperation_default_bus"}),s=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-parse/^3.0.0/components/ActorQueryParse.jsonld#ActorQueryParse_default_bus"}),c=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-result-serialize/^3.0.0/components/ActorQueryResultSerialize.jsonld#ActorQueryResultSerialize_default_bus"}),u=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-source-identify-hypermedia/^3.0.0/components/ActorQuerySourceIdentifyHypermedia.jsonld#ActorQuerySourceIdentifyHypermedia_default_bus"}),l=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^3.0.0/components/ActorDereference.jsonld#ActorDereference_default_bus"}),d=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference-rdf/^3.0.0/components/ActorDereferenceRdf.jsonld#ActorDereferenceRdf_default_bus"}),h=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-entries-sort/^3.0.0/components/ActorRdfJoinEntriesSort.jsonld#ActorRdfJoinEntriesSort_default_bus"}),p=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-selectivity/^3.0.0/components/ActorRdfJoinSelectivity.jsonld#ActorRdfJoinSelectivity_default_bus"}),f=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata/^3.0.0/components/ActorRdfMetadata.jsonld#ActorRdfMetadata_default_bus"}),y=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata-accumulate/^3.0.0/components/ActorRdfMetadataAccumulate.jsonld#ActorRdfMetadataAccumulate_default_bus"}),g=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata-extract/^3.0.0/components/ActorRdfMetadataExtract.jsonld#ActorRdfMetadataExtract_default_bus"}),m=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-parse/^3.0.0/components/ActorRdfParse.jsonld#ActorRdfParse_default_bus"}),b=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-parse-html/^3.0.0/components/ActorRdfParseHtml.jsonld#ActorRdfParseHtml_default_bus"}),v=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia-links/^3.0.0/components/ActorRdfResolveHypermediaLinks.jsonld#ActorRdfResolveHypermediaLinks_default_bus"}),_=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia-links-queue/^3.0.0/components/ActorRdfResolveHypermediaLinksQueue.jsonld#ActorRdfResolveHypermediaLinksQueue_default_bus"}),w=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-serialize/^3.0.0/components/ActorRdfSerialize.jsonld#ActorRdfSerialize_default_bus"}),T=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-hypermedia/^3.0.0/components/ActorRdfUpdateHypermedia.jsonld#ActorRdfUpdateHypermedia_default_bus"}),S=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-quads/^3.0.0/components/ActorRdfUpdateQuads.jsonld#ActorRdfUpdateQuads_default_bus"}),O=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^3.0.0/components/ActorHttp.jsonld#ActorHttp_default_bus"}),E=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^3.0.0/components/ActorHttp.jsonld#ActorHttp_fallback_bus"}),x=new(r(59510).BusQueryOperation)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^3.0.0/components/ActorQueryOperation.jsonld#ActorQueryOperation_default_bus"}),A=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-process/^3.0.0/components/ActorQueryProcess.jsonld#ActorQueryProcess_default_bus"}),R=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-source-identify/^3.0.0/components/ActorQuerySourceIdentify.jsonld#ActorQuerySourceIdentify_default_bus"}),I=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^3.0.0/components/ActorRdfJoin.jsonld#ActorRdfJoin_default_bus"}),P=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http-invalidate/^3.0.0/components/ActorHttpInvalidate.jsonld#ActorHttpInvalidate_default_bus"}),N=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-merge-bindings-context/^3.0.0/components/ActorMergeBindingsContext.jsonld#ActorMergeBindingsContext_default_bus"}),D=(new(r(36251).ActorContextPreprocessConvertShortcuts)({contextKeyShortcuts:{baseIRI:"@comunica/actor-init-query:baseIRI",datetime:"@comunica/actor-http-memento:datetime",destination:"@comunica/bus-rdf-update-quads:destination",explain:"@comunica/actor-init-query:explain",extensionFunctionCreator:"@comunica/actor-init-query:extensionFunctionCreator",extensionFunctions:"@comunica/actor-init-query:extensionFunctions",fetch:"@comunica/bus-http:fetch",functionArgumentsCache:"@comunica/actor-init-query:functionArgumentsCache",httpAuth:"@comunica/bus-http:auth",httpBodyTimeout:"@comunica/bus-http:http-body-timeout",httpIncludeCredentials:"@comunica/bus-http:include-credentials",httpProxyHandler:"@comunica/actor-http-proxy:httpProxyHandler",httpRetryCount:"@comunica/bus-http:http-retry-count",httpRetryDelay:"@comunica/bus-http:http-retry-delay",httpRetryOnServerError:"@comunica/bus-http:http-retry-on-server-error",httpTimeout:"@comunica/bus-http:http-timeout",initialBindings:"@comunica/actor-init-query:initialBindings",lenient:"@comunica/actor-init-query:lenient",log:"@comunica/core:log",noCache:"@comunica/actor-init-query:noCache",queryFormat:"@comunica/actor-init-query:queryFormat",queryTimestamp:"@comunica/actor-init-query:queryTimestamp",readOnly:"@comunica/bus-query-operation:readOnly",recoverBrokenLinks:"@comunica/bus-http-wayback:recover-broken-links",sources:"@comunica/actor-init-query:querySourcesUnidentified",traverse:"@comunica/bus-query-source-identify:traverse",unionDefaultGraph:"@comunica/bus-query-operation:unionDefaultGraph"},name:"urn:comunica:default:context-preprocess/actors#convert-shortcuts",bus:i}),new(r(35451).ActorContextPreprocessSetDefaults)({logger:t,name:"urn:comunica:default:context-preprocess/actors#set-defaults",bus:i}),new(r(41670).ActorContextPreprocessSourceToDestination)({name:"urn:comunica:default:context-preprocess/actors#source-to-destination",bus:i}),new(r(35106).ActorContextPreprocessQuerySourceSkolemize)({name:"urn:comunica:default:context-preprocess/actors#query-source-skolemize",bus:i})),j=new(r(30827).MediatorCombinePipeline)({name:"urn:comunica:default:context-preprocess/mediators#main",bus:i}),C=(new(r(11150).ActorHashBindingsSha1)({name:"urn:comunica:default:hash-bindings/actors#sha1",bus:a}),new(r(25896).MediatorRace)({name:"urn:comunica:default:hash-bindings/mediators#main",bus:a})),M=(new(r(15718).ActorOptimizeQueryOperationRewriteCopy)({name:"urn:comunica:default:optimize-query-operation/actors#rewrite-copy",bus:o}),new(r(83910).ActorOptimizeQueryOperationRewriteMove)({name:"urn:comunica:default:optimize-query-operation/actors#rewrite-move",bus:o}),new(r(63514).ActorOptimizeQueryOperationRewriteAdd)({name:"urn:comunica:default:optimize-query-operation/actors#rewrite-add",bus:o}),new(r(78992).ActorOptimizeQueryOperationGroupSources)({name:"urn:comunica:default:optimize-query-operation/actors#group-sources",bus:o})),L=new(r(30827).MediatorCombinePipeline)({filterErrors:!0,name:"urn:comunica:default:optimize-query-operation/mediators#main",bus:o}),k=(new(r(4911).ActorQueryParseSparql)({prefixes:{dbpedia:"http://dbpedia.org/resource/","dbpedia-owl":"http://dbpedia.org/ontology/",dbpprop:"http://dbpedia.org/property/",dc:"http://purl.org/dc/terms/",dc11:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",foaf:"http://xmlns.com/foaf/0.1/",geo:"http://www.w3.org/2003/01/geo/wgs84_pos#",owl:"http://www.w3.org/2002/07/owl#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",schema:"http://schema.org/",skos:"http://www.w3.org/2008/05/skos#",xsd:"http://www.w3.org/2001/XMLSchema#"},name:"urn:comunica:default:query-parse/actors#sparql",bus:s}),new(r(37067).ActorQueryParseGraphql)({name:"urn:comunica:default:query-parse/actors#graphql",bus:s}),new(r(25896).MediatorRace)({name:"urn:comunica:default:query-parse/mediators#main",bus:s})),F=(new(r(91875).ActorQueryResultSerializeJson)({mediaTypePriorities:{"application/json":1},mediaTypeFormats:{"application/json":"https://comunica.linkeddatafragments.org/#results_JSON"},name:"urn:comunica:default:query-result-serialize/actors#json",bus:c}),new(r(96791).ActorQueryResultSerializeSimple)({mediaTypePriorities:{simple:.9},mediaTypeFormats:{simple:"https://comunica.linkeddatafragments.org/#results_simple"},name:"urn:comunica:default:query-result-serialize/actors#simple",bus:c}),new(r(34357).ActorQueryResultSerializeSparqlCsv)({mediaTypePriorities:{"text/csv":.75},mediaTypeFormats:{"text/csv":"http://www.w3.org/ns/formats/SPARQL_Results_CSV"},name:"urn:comunica:default:query-result-serialize/actors#csv",bus:c}),new(r(78432).ActorQueryResultSerializeSparqlTsv)({mediaTypePriorities:{"text/tab-separated-values":.75},mediaTypeFormats:{"text/tab-separated-values":"http://www.w3.org/ns/formats/SPARQL_Results_TSV"},name:"urn:comunica:default:query-result-serialize/actors#sparql-tsv",bus:c}),new(r(68596).ActorQueryResultSerializeSparqlXml)({mediaTypePriorities:{"application/sparql-results+xml":.8},mediaTypeFormats:{"application/sparql-results+xml":"http://www.w3.org/ns/formats/SPARQL_Results_XML"},name:"urn:comunica:default:query-result-serialize/actors#sparql-xml",bus:c}),new(r(59655).ActorQueryResultSerializeTable)({columnWidth:50,mediaTypePriorities:{table:.6},mediaTypeFormats:{table:"https://comunica.linkeddatafragments.org/#results_table"},name:"urn:comunica:default:query-result-serialize/actors#table",bus:c}),new(r(70017).ActorQueryResultSerializeTree)({mediaTypePriorities:{tree:.5},mediaTypeFormats:{tree:"https://comunica.linkeddatafragments.org/#results_tree"},name:"urn:comunica:default:query-result-serialize/actors#tree",bus:c}),new(r(25896).MediatorRace)({name:"urn:comunica:default:query-result-serialize/mediators#serialize",bus:c})),B=new(r(75884).MediatorCombineUnion)({field:"mediaTypes",name:"urn:comunica:default:query-result-serialize/mediators#mediaType",bus:c}),U=new(r(75884).MediatorCombineUnion)({field:"mediaTypeFormats",name:"urn:comunica:default:query-result-serialize/mediators#mediaTypeFormat",bus:c}),q=new(r(99104).MediatorNumber)({field:"filterFactor",type:"max",ignoreErrors:!0,name:"urn:comunica:default:query-source-identify-hypermedia/mediators#main",bus:u}),V=new(r(35878).ActorDereferenceFallback)({name:"urn:comunica:default:dereference/actors#fallback",bus:l}),Q=new(r(25896).MediatorRace)({name:"urn:comunica:default:dereference/mediators#main",bus:l}),$=new(r(25896).MediatorRace)({name:"urn:comunica:default:dereference-rdf/mediators#main",bus:d}),H=(new(r(36545).ActorRdfJoinEntriesSortCardinality)({name:"urn:comunica:default:rdf-join-entries-sort/actors#cardinality",bus:h}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-join-entries-sort/mediators#main",bus:h})),G=(new(r(16703).ActorRdfJoinSelectivityVariableCounting)({name:"urn:comunica:default:rdf-join-selectivity/actors#variable-counting",bus:p}),new(r(99104).MediatorNumber)({field:"accuracy",type:"max",ignoreErrors:!0,name:"urn:comunica:default:rdf-join-selectivity/mediators#main",bus:p})),z=(new(r(80848).ActorRdfMetadataPrimaryTopic)({metadataToData:!1,dataToMetadataOnInvalidMetadataGraph:!0,name:"urn:comunica:default:rdf-metadata/actors#primary-topic",bus:f}),new(r(64443).ActorRdfMetadataAll)({name:"urn:comunica:default:rdf-metadata/actors#all",bus:f}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-metadata/mediators#main",bus:f})),K=(new(r(27988).ActorRdfMetadataAccumulateCanContainUndefs)({name:"urn:comunica:default:rdf-metadata-accumulate/actors#cancontainundefs",bus:y}),new(r(67243).ActorRdfMetadataAccumulateCardinality)({name:"urn:comunica:default:rdf-metadata-accumulate/actors#cardinality",bus:y}),new(r(91475).ActorRdfMetadataAccumulatePageSize)({name:"urn:comunica:default:rdf-metadata-accumulate/actors#pagesize",bus:y}),new(r(26719).ActorRdfMetadataAccumulateRequestTime)({name:"urn:comunica:default:rdf-metadata-accumulate/actors#requesttime",bus:y}),new(r(75884).MediatorCombineUnion)({field:"metadata",name:"urn:comunica:default:rdf-metadata-accumulate/mediators#main",bus:y})),X=(new(r(85405).ActorRdfMetadataExtractHydraControls)({name:"urn:comunica:default:rdf-metadata-extract/actors#hydra-controls",bus:g}),new(r(57586).ActorRdfMetadataExtractHydraCount)({predicates:["http://www.w3.org/ns/hydra/core#totalItems","http://rdfs.org/ns/void#triples"],name:"urn:comunica:default:rdf-metadata-extract/actors#hydra-count",bus:g}),new(r(54777).ActorRdfMetadataExtractHydraPagesize)({predicates:["http://www.w3.org/ns/hydra/core#itemsPerPage"],name:"urn:comunica:default:rdf-metadata-extract/actors#hydra-pagesize",bus:g}),new(r(7445).ActorRdfMetadataExtractRequestTime)({name:"urn:comunica:default:rdf-metadata-extract/actors#request-time",bus:g}),new(r(40751).ActorRdfMetadataExtractAllowHttpMethods)({name:"urn:comunica:default:rdf-metadata-extract/actors#allow-http-methods",bus:g}),new(r(44549).ActorRdfMetadataExtractPutAccepted)({name:"urn:comunica:default:rdf-metadata-extract/actors#put-accepted",bus:g}),new(r(55282).ActorRdfMetadataExtractPatchSparqlUpdate)({name:"urn:comunica:default:rdf-metadata-extract/actors#patch-sparql-update",bus:g}),new(r(3187).ActorRdfMetadataExtractSparqlService)({inferHttpsEndpoint:!0,name:"urn:comunica:default:rdf-metadata-extract/actors#sparql-service",bus:g}),new(r(75884).MediatorCombineUnion)({filterErrors:!0,field:"metadata",name:"urn:comunica:default:rdf-metadata-extract/mediators#main",bus:g})),J=(new(r(62917).ActorRdfParseN3)({mediaTypePriorities:{"application/n-quads":1,"application/n-triples":.8,"application/trig":.95,"text/n3":.35,"text/turtle":.6},mediaTypeFormats:{"application/n-quads":"http://www.w3.org/ns/formats/N-Quads","application/n-triples":"http://www.w3.org/ns/formats/N-Triples","application/trig":"http://www.w3.org/ns/formats/TriG","text/n3":"http://www.w3.org/ns/formats/N3","text/turtle":"http://www.w3.org/ns/formats/Turtle"},priorityScale:1,name:"urn:comunica:default:rdf-parse/actors#n3",bus:m}),new(r(21487).ActorRdfParseRdfXml)({mediaTypePriorities:{"application/rdf+xml":1},mediaTypeFormats:{"application/rdf+xml":"http://www.w3.org/ns/formats/RDF_XML"},priorityScale:.5,name:"urn:comunica:default:rdf-parse/actors#rdfxml",bus:m}),new(r(8137).ActorRdfParseXmlRdfa)({mediaTypePriorities:{"application/xml":1,"image/svg+xml":1,"text/xml":1},mediaTypeFormats:{"application/xml":"http://www.w3.org/ns/formats/RDFa","image/svg+xml":"http://www.w3.org/ns/formats/RDFa","text/xml":"http://www.w3.org/ns/formats/RDFa"},priorityScale:.3,name:"urn:comunica:default:rdf-parse/actors#xmlrdfa",bus:m}),new(r(43352).ActorRdfParseShaclc)({mediaTypePriorities:{"text/shaclc":1,"text/shaclc-ext":.5},mediaTypeFormats:{"text/shaclc":"http://www.w3.org/ns/formats/Shaclc","text/shaclc-ext":"http://www.w3.org/ns/formats/ShaclcExtended"},priorityScale:.1,name:"urn:comunica:default:rdf-parse/actors#shaclc",bus:m}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-parse/mediators#parse",bus:m})),W=new(r(75884).MediatorCombineUnion)({field:"mediaTypes",name:"urn:comunica:default:rdf-parse/mediators#mediaType",bus:m}),Y=(new(r(28955).ActorRdfParseHtml)({busRdfParseHtml:b,mediaTypePriorities:{"application/xhtml+xml":.9,"text/html":1},mediaTypeFormats:{"application/xhtml+xml":"http://www.w3.org/ns/formats/HTML","text/html":"http://www.w3.org/ns/formats/HTML"},priorityScale:.2,name:"urn:comunica:default:rdf-parse/actors#html",bus:m}),new(r(42421).ActorRdfParseHtmlMicrodata)({name:"urn:comunica:default:rdf-parse-html/actors#microdata",bus:b}),new(r(26585).ActorRdfParseHtmlRdfa)({name:"urn:comunica:default:rdf-parse-html/actors#rdfa",bus:b}),new(r(34541).ActorRdfResolveHypermediaLinksNext)({name:"urn:comunica:default:rdf-resolve-hypermedia-links/actors#next",bus:v}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-resolve-hypermedia-links/mediators#main",bus:v})),Z=(new(r(34120).ActorRdfResolveHypermediaLinksQueueFifo)({name:"urn:comunica:default:rdf-resolve-hypermedia-links-queue/actors#fifo",bus:_}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-resolve-hypermedia-links-queue/mediators#main",bus:_})),ee=(new(r(28510).ActorRdfSerializeN3)({mediaTypePriorities:{"application/n-quads":1,"application/n-triples":.8,"application/trig":.95,"text/n3":.35,"text/turtle":.6},mediaTypeFormats:{"application/n-quads":"http://www.w3.org/ns/formats/N-Quads","application/n-triples":"http://www.w3.org/ns/formats/N-Triples","application/trig":"http://www.w3.org/ns/formats/TriG","text/n3":"http://www.w3.org/ns/formats/N3","text/turtle":"http://www.w3.org/ns/formats/Turtle"},name:"urn:comunica:default:rdf-serialize/actors#n3",bus:w}),new(r(21935).ActorRdfSerializeJsonLd)({jsonStringifyIndentSpaces:2,mediaTypePriorities:{"application/ld+json":1},mediaTypeFormats:{"application/ld+json":"http://www.w3.org/ns/formats/JSON-LD"},priorityScale:.9,name:"urn:comunica:default:rdf-serialize/actors#jsonld",bus:w}),new(r(49343).ActorRdfSerializeShaclc)({mediaTypePriorities:{"text/shaclc":1,"text/shaclc-ext":.5},mediaTypeFormats:{"text/shaclc":"http://www.w3.org/ns/formats/Shaclc","text/shaclc-ext":"http://www.w3.org/ns/formats/ShaclcExtended"},priorityScale:.1,name:"urn:comunica:default:rdf-serialize/actors#shaclc",bus:w}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-serialize/mediators#serialize",bus:w})),te=new(r(75884).MediatorCombineUnion)({field:"mediaTypes",name:"urn:comunica:default:rdf-serialize/mediators#mediaType",bus:w}),re=new(r(75884).MediatorCombineUnion)({field:"mediaTypeFormats",name:"urn:comunica:default:rdf-serialize/mediators#mediaTypeFormat",bus:w}),ne=new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-update-hypermedia/mediators#main",bus:T}),ie=(new(r(76722).ActorRdfUpdateQuadsRdfJsStore)({name:"urn:comunica:default:rdf-update-quads/actors#rdfjs-store",bus:S}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-update-quads/mediators#main",bus:S})),ae=new(r(28590).ActorHttpFetch)({agentOptions:{keepAlive:!0,maxSockets:5},name:"urn:comunica:default:http/actors#fetch",bus:O}),oe=new(r(99104).MediatorNumber)({field:"time",type:"min",ignoreErrors:!0,name:"urn:comunica:default:http/mediators#no-fallback",bus:O}),se=new(r(99104).MediatorNumber)({field:"time",type:"min",ignoreErrors:!0,name:"urn:comunica:default:http/mediators#main",bus:E}),ce=(new(r(26933).ActorQueryOperationSource)({name:"urn:comunica:default:query-operation/actors#source",bus:x}),new(r(99104).MediatorNumber)({field:"httpRequests",type:"min",ignoreErrors:!0,name:"urn:comunica:default:query-operation/mediators#main",bus:x})),ue=new(r(25896).MediatorRace)({name:"urn:comunica:default:query-process/mediators#main",bus:A}),le=new(r(25896).MediatorRace)({name:"urn:comunica:default:query-source-identify/mediators#main",bus:R}),de=new(r(8309).MediatorJoinCoefficientsFixed)({cpuWeight:10,memoryWeight:1,timeWeight:2,ioWeight:100,name:"urn:comunica:default:rdf-join/mediators#main",bus:I}),he=new(r(56320).ActorHttpInvalidateListenable)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-context-preprocess-query-source-identify/^3.0.0/components/ActorContextPreprocessQuerySourceIdentify.jsonld#IActorContextPreprocessQuerySourceIdentifyArgs_default_invalidator",bus:P}),pe=new(r(48284).MediatorAll)({name:"urn:comunica:default:http-invalidate/mediators#main",bus:P}),fe=new(r(56320).ActorHttpInvalidateListenable)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-update-quads-hypermedia/^3.0.0/components/ActorRdfUpdateQuadsHypermedia.jsonld#IActorRdfUpdateQuadsHypermediaArgs_default_invalidator",bus:P}),ye=new(r(56320).ActorHttpInvalidateListenable)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-sparql-json/^3.0.0/components/ActionObserverHttp.jsonld#IActionObserverHttpArgs_default_invalidator",bus:P}),ge=new(r(56320).ActorHttpInvalidateListenable)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-stats/^3.0.0/components/ActionObserverHttp.jsonld#IActionObserverHttpArgs_default_invalidator",bus:P}),me=new(r(75884).MediatorCombineUnion)({field:"mergeHandlers",name:"urn:comunica:default:merge-bindings-context/mediators#main",bus:N}),be=(new(r(35848).ActorRdfJoinSingle)({mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-single",bus:I}),new(r(85345).ActorRdfJoinMultiEmpty)({mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-multi-empty",bus:I}),new(r(6551).ActorRdfJoinMultiBindSource)({selectivityModifier:1e-4,blockSize:16,mediatorJoinEntriesSort:H,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-multi-bind-source",bus:I}),new(r(38868).ActorRdfJoinHash)({mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-hash",bus:I}),new(r(77375).ActorRdfJoinSymmetricHash)({mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-symmetric-hash",bus:I}),new(r(37081).ActorRdfJoinNestedLoop)({mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-nested-loop",bus:I}),new(r(11688).ActorRdfJoinMinusHash)({mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#minus-hash",bus:I}),new(r(98311).ActorRdfJoinMinusHashUndef)({mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#minus-hash-undef",bus:I}),new(r(19726).ActorRdfJoinOptionalHash)({canHandleUndefs:!1,blocking:!1,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#optional-hash-def-nonblocking",bus:I}),new(r(19726).ActorRdfJoinOptionalHash)({canHandleUndefs:!1,blocking:!0,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#optional-hash-def-blocking",bus:I}),new(r(19726).ActorRdfJoinOptionalHash)({canHandleUndefs:!0,blocking:!1,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#optional-hash-undef-nonblocking",bus:I}),new(r(19726).ActorRdfJoinOptionalHash)({canHandleUndefs:!0,blocking:!0,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#optional-hash-undef-blocking",bus:I}),new(r(9391).ActorRdfJoinOptionalNestedLoop)({mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#optional-nested-loop",bus:I}),new(r(54341).ActorDereferenceRdfParse)({mediatorDereference:Q,mediatorParse:J,mediatorParseMediatypes:W,mediaMappings:{htm:"text/html",html:"text/html",json:"application/json",jsonld:"application/ld+json",n3:"text/n3",nq:"application/n-quads",nquads:"application/n-quads",nt:"application/n-triples",ntriples:"application/n-triples",owl:"application/rdf+xml",rdf:"application/rdf+xml",rdfxml:"application/rdf+xml",shaclc:"text/shaclc",shaclce:"text/shaclc-ext",shc:"text/shaclc",shce:"text/shaclc-ext",svg:"image/svg+xml",svgz:"image/svg+xml",trig:"application/trig",ttl:"text/turtle",turtle:"text/turtle",xht:"application/xhtml+xml",xhtml:"application/xhtml+xml",xml:"application/xml"},name:"urn:comunica:default:dereference-rdf/actors#parse",bus:d}),new(r(3549).ActorRdfParseHtmlScript)({mediatorRdfParseMediatypes:W,mediatorRdfParseHandle:J,name:"urn:comunica:default:rdf-parse-html/actors#script",bus:b}),new(r(63543).ActorQueryResultSerializeRdf)({mediatorRdfSerialize:ee,mediatorMediaTypeCombiner:te,mediatorMediaTypeFormatCombiner:re,name:"urn:comunica:default:query-result-serialize/actors#rdf",bus:c}),new(r(55390).ActorHttpWayback)({mediatorHttp:oe,name:"urn:comunica:default:http/actors#wayback",bus:E}),new(r(54168).ActorRdfParseJsonLd)({mediatorHttp:se,mediaTypePriorities:{"application/json":.15,"application/ld+json":1},mediaTypeFormats:{"application/json":"http://www.w3.org/ns/formats/JSON-LD","application/ld+json":"http://www.w3.org/ns/formats/JSON-LD"},priorityScale:.9,name:"urn:comunica:default:rdf-parse/actors#jsonld",bus:m}),new(r(87057).ActorRdfUpdateHypermediaPatchSparqlUpdate)({mediatorHttp:se,name:"urn:comunica:default:rdf-update-hypermedia/actors#patch-sparql-update",bus:T}),new(r(3047).ActorRdfUpdateHypermediaPutLdp)({mediatorHttp:se,mediatorRdfSerializeMediatypes:te,mediatorRdfSerialize:ee,name:"urn:comunica:default:rdf-update-hypermedia/actors#put-ldp",bus:T}),new(r(58916).ActorRdfUpdateHypermediaSparql)({mediatorHttp:se,checkUrlSuffixSparql:!0,checkUrlSuffixUpdate:!0,name:"urn:comunica:default:rdf-update-hypermedia/actors#sparql",bus:T}),new(r(57321).ActorQueryOperationAsk)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#ask",bus:x}),new(r(20888).ActorQueryOperationBgpJoin)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#bgp",bus:x}),new(r(88749).ActorQueryOperationConstruct)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#construct",bus:x}),new(r(13867).ActorQueryOperationDistinctHash)({mediatorHashBindings:C,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#distinct",bus:x}),new(r(37572).ActorQueryOperationFromQuad)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#from",bus:x}),new(r(98893).ActorQueryOperationProject)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#project",bus:x}),new(r(16909).ActorQueryOperationReducedHash)({mediatorHashBindings:C,cacheSize:100,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#reduced",bus:x}),new(r(14922).ActorQueryOperationSlice)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#slice",bus:x}),new(r(19779).ActorQueryOperationUnion)({mediatorRdfMetadataAccumulate:K,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#union",bus:x}),new(r(16733).ActorQueryOperationPathAlt)({mediatorRdfMetadataAccumulate:K,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#path-alt",bus:x}),new(r(88317).ActorQueryOperationPathInv)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#path-inv",bus:x}),new(r(91430).ActorQueryOperationPathLink)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#path-link",bus:x}),new(r(56993).ActorQueryOperationPathNps)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#path-nps",bus:x}),new(r(75233).ActorQueryOperationClear)({mediatorUpdateQuads:ie,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#update-clear",bus:x}),new(r(57886).ActorQueryOperationUpdateCompositeUpdate)({mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#update-composite",bus:x}),new(r(14876).ActorQueryOperationCreate)({mediatorUpdateQuads:ie,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#update-create",bus:x}),new(r(82465).ActorQueryOperationDrop)({mediatorUpdateQuads:ie,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#update-drop",bus:x}),new(r(29796).ActorQueryOperationLoad)({mediatorUpdateQuads:ie,mediatorQuerySourceIdentify:le,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#update-load",bus:x}),new(r(40980).ActorQueryOperationJoin)({mediatorJoin:de,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#join",bus:x}),new(r(19948).ActorQueryOperationMinus)({mediatorJoin:de,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#minus",bus:x}),new(r(28261).ActorQueryOperationPathSeq)({mediatorJoin:de,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#path-seq",bus:x}),new(r(68841).ActorRdfJoinMultiSmallest)({mediatorJoinEntriesSort:H,mediatorJoin:de,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-multi-smallest",bus:I}),new(r(92107).ActorRdfJoinMultiSmallestFilterBindings)({selectivityModifier:1e-4,blockSize:64,mediatorJoinEntriesSort:H,mediatorJoin:de,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-multi-smallest-filter-bindings",bus:I}),new(r(48989).ActorOptimizeQueryOperationFilterPushdown)({name:"urn:comunica:default:optimize-query-operation/actors#filter-pushdown",bus:o,beforeActors:[M]})),ve=(new(r(68132).ActorDereferenceHttp)({mediatorHttp:se,maxAcceptHeaderLength:1024,maxAcceptHeaderLengthBrowser:128,name:"urn:comunica:default:dereference/actors#http",bus:l,beforeActors:[V]}),new(r(48230).ActorHttpProxy)({mediatorHttp:se,name:"urn:comunica:default:http/actors#proxy",bus:O,beforeActors:[ae]}),new(r(90807).ActorContextPreprocessQuerySourceIdentify)({cacheSize:100,httpInvalidator:he,mediatorQuerySourceIdentify:le,mediatorContextPreprocess:j,name:"urn:comunica:default:context-preprocess/actors#query-source-identify",bus:i,beforeActors:[D]}),new(r(15729).ActorInitQuery)({mediatorQueryProcess:ue,mediatorQueryResultSerialize:F,mediatorQueryResultSerializeMediaTypeCombiner:B,mediatorQueryResultSerializeMediaTypeFormatCombiner:U,mediatorHttpInvalidate:pe,defaultQueryInputFormat:"sparql",allowNoSources:!1,name:"urn:comunica:default:init/actors#query",bus:n})),_e=(new(r(88297).ActorRdfUpdateQuadsHypermedia)({cacheSize:100,httpInvalidator:fe,mediatorDereferenceRdf:$,mediatorMetadata:z,mediatorMetadataExtract:X,mediatorRdfUpdateHypermedia:ne,name:"urn:comunica:default:rdf-update-quads/actors#hypermedia",bus:S}),new(r(34593).ActionObserverHttp)({httpInvalidator:ye,name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-sparql-json/^3.0.0/components/ActorQueryResultSerializeSparqlJson.jsonld#ActorQueryResultSerializeSparqlJson_default_observer",bus:O})),we=new(r(13900).ActionObserverHttp)({httpInvalidator:ge,name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-stats/^3.0.0/components/ActorQueryResultSerializeStats.jsonld#ActorQueryResultSerializeStats_default_observer",bus:O}),Te=(new(r(52378).ActorQuerySourceIdentifyHypermediaQpf)({mediatorMetadata:z,mediatorMetadataExtract:X,mediatorDereferenceRdf:$,mediatorMergeBindingsContext:me,subjectUri:"http://www.w3.org/1999/02/22-rdf-syntax-ns#subject",predicateUri:"http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate",objectUri:"http://www.w3.org/1999/02/22-rdf-syntax-ns#object",graphUri:"http://www.w3.org/ns/sparql-service-description#graph",name:"urn:comunica:default:query-source-identify-hypermedia/actors#qpf",bus:u}),new(r(16025).ActorQuerySourceIdentifyHypermediaSparql)({mediatorHttp:se,mediatorMergeBindingsContext:me,checkUrlSuffix:!0,forceHttpGet:!1,cacheSize:1024,bindMethod:"values",countTimeout:3e3,name:"urn:comunica:default:rdf-resolve-quad-pattern/actors#sparql",bus:u}),new(r(44538).ActorQuerySourceIdentifyHypermediaNone)({mediatorMergeBindingsContext:me,name:"urn:comunica:default:query-source-identify-hypermedia/actors#none",bus:u}),new(r(19724).ActorQueryOperationExtend)({mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#extend",bus:x}),new(r(74578).ActorQueryOperationFilter)({mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#filter",bus:x}),new(r(47007).ActorQueryOperationGroup)({mediatorHashBindings:C,mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#group",bus:x}),new(r(33149).ActorQueryOperationLeftJoin)({mediatorJoin:de,mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#leftjoin",bus:x}),new(r(35021).ActorQueryOperationNop)({mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#nop",bus:x}),new(r(80797).ActorQueryOperationOrderBy)({mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#orderby",bus:x}),new(r(89375).ActorQueryOperationService)({forceSparqlEndpoint:!1,mediatorMergeBindingsContext:me,mediatorQuerySourceIdentify:le,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#service",bus:x}),new(r(14702).ActorQueryOperationValues)({mediatorMergeBindingsContext:me,name:"urn:comunica:default:query-operation/actors#values",bus:x}),new(r(90658).ActorQueryOperationPathOneOrMore)({mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#path-one-or-more",bus:x}),new(r(60436).ActorQueryOperationPathZeroOrMore)({mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#path-zero-or-more",bus:x}),new(r(32091).ActorQueryOperationPathZeroOrOne)({mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#path-zero-or-one",bus:x}),new(r(21638).ActorQueryOperationUpdateDeleteInsert)({mediatorUpdateQuads:ie,mediatorMergeBindingsContext:me,mediatorQueryOperation:ce,name:"urn:comunica:default:query-operation/actors#update-delete-insert",bus:x}),new(r(94739).ActorQueryProcessSequential)({mediatorContextPreprocess:j,mediatorQueryParse:k,mediatorOptimizeQueryOperation:L,mediatorQueryOperation:ce,mediatorMergeBindingsContext:me,name:"urn:comunica:default:query-process/actors#sequential",bus:A})),Se=new(r(57789).ActorQuerySourceIdentifyHypermedia)({cacheSize:100,maxIterators:64,aggregateTraversalStore:!0,mediatorDereferenceRdf:$,mediatorMetadata:z,mediatorMetadataExtract:X,mediatorMetadataAccumulate:K,mediatorQuerySourceIdentifyHypermedia:q,mediatorRdfResolveHypermediaLinks:Y,mediatorRdfResolveHypermediaLinksQueue:Z,mediatorMergeBindingsContext:me,name:"urn:comunica:default:query-source-identify/actors#hypermedia",bus:R}),Oe=(new(r(498).ActorRdfJoinNone)({mediatorMergeBindingsContext:me,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-none",bus:I}),new(r(82331).ActorRdfJoinMultiBind)({bindOrder:"depth-first",selectivityModifier:1e-4,mediatorJoinEntriesSort:H,mediatorQueryOperation:ce,mediatorMergeBindingsContext:me,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#inner-multi-bind",bus:I}),new(r(64305).ActorRdfJoinOptionalBind)({bindOrder:"depth-first",selectivityModifier:1e-6,mediatorQueryOperation:ce,mediatorMergeBindingsContext:me,mediatorJoinSelectivity:G,name:"urn:comunica:default:rdf-join/actors#optional-bind",bus:I}),new(r(34593).ActorQueryResultSerializeSparqlJson)({emitMetadata:!0,httpObserver:_e,mediaTypePriorities:{"application/sparql-results+json":.8},mediaTypeFormats:{"application/sparql-results+json":"http://www.w3.org/ns/formats/SPARQL_Results_JSON"},name:"urn:comunica:default:query-result-serialize/actors#sparql-json",bus:c}),new(r(13900).ActorQueryResultSerializeStats)({httpObserver:we,mediaTypePriorities:{stats:.5},mediaTypeFormats:{stats:"https://comunica.linkeddatafragments.org/#results_stats"},name:"urn:comunica:default:query-result-serialize/actors#stats",bus:c}),new(r(68383).ActorQueryProcessExplainParsed)({queryProcessor:Te,name:"urn:comunica:default:query-process/actors#explain-parsed",bus:A}),new(r(70605).ActorQueryProcessExplainLogical)({queryProcessor:Te,name:"urn:comunica:default:query-process/actors#explain-logical",bus:A}),new(r(54395).ActorQueryProcessExplainPhysical)({queryProcessor:Te,name:"urn:comunica:default:query-process/actors#explain-physical",bus:A}),new(r(94607).ActorOptimizeQueryOperationPruneEmptySourceOperations)({useAskIfSupported:!1,name:"urn:comunica:default:optimize-query-operation/actors#prune-empty-source-operations",bus:o,beforeActors:[be]})),Ee=(new(r(27474).ActorQuerySourceIdentifyRdfJs)({mediatorMergeBindingsContext:me,name:"urn:comunica:default:query-source-identify/actors#rdfjs",bus:R,beforeActors:[Se]}),new(r(84701).ActorQuerySourceIdentifySerialized)({mediatorRdfParse:J,mediatorQuerySourceIdentify:le,name:"urn:comunica:default:query-source-identify/actors#serialized",bus:R,beforeActors:[Se]}),new(r(98498).ActorOptimizeQueryOperationJoinConnected)({name:"urn:comunica:default:optimize-query-operation/actors#join-connected",bus:o,beforeActors:[Oe]})),xe=new(r(28084).ActorOptimizeQueryOperationBgpToJoin)({name:"urn:comunica:default:optimize-query-operation/actors#bgp-to-join",bus:o,beforeActors:[Ee]}),Ae=new(r(46980).ActorOptimizeQueryOperationJoinBgp)({name:"urn:comunica:default:optimize-query-operation/actors#join-bgp",bus:o,beforeActors:[xe]}),Re=new(r(94741).ActorOptimizeQueryOperationAssignSourcesExhaustive)({name:"urn:comunica:default:optimize-query-operation/actors#assign-sources-exhaustive",bus:o,beforeActors:[Ae]});return new(r(78571).ActorOptimizeQueryOperationDescribeToConstructsSubject)({name:"urn:comunica:default:optimize-query-operation/actors#describe-to-constructs-subject",bus:o,beforeActors:[Re]}),ve}},45747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryEngine=void 0;const n=r(15729),i=r(99894);class a extends n.QueryEngineBase{constructor(e=i()){super(e)}}t.QueryEngine=a},90128:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(45747),t)},18423:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorAbstractMediaTyped=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}async run(e){if("handle"in e){const t=e;return{handle:await this.runHandle(t.handle,t.handleMediaType,e.context)}}if("mediaTypes"in e)return{mediaTypes:await this.getMediaTypes(e.context)};if("mediaTypeFormats"in e)return{mediaTypeFormats:await this.getMediaTypeFormats(e.context)};throw new Error("Either a handle, mediaTypes or mediaTypeFormats action needs to be provided")}async test(e){if("handle"in e){const t=e;return{handle:await this.testHandle(t.handle,t.handleMediaType,e.context)}}if("mediaTypes"in e)return{mediaTypes:await this.testMediaType(e.context)};if("mediaTypeFormats"in e)return{mediaTypeFormats:await this.testMediaTypeFormats(e.context)};throw new Error("Either a handle, mediaTypes or mediaTypeFormats action needs to be provided")}}t.ActorAbstractMediaTyped=i},44405:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorAbstractMediaTypedFixed=void 0;const n=r(18423);class i extends n.ActorAbstractMediaTyped{constructor(e){super(e);const t=this.priorityScale||0===this.priorityScale?this.priorityScale:1;if(this.mediaTypePriorities)for(const[e,[r,n]]of Object.entries(this.mediaTypePriorities).entries())this.mediaTypePriorities[r]=t*n;this.mediaTypePriorities=Object.freeze(this.mediaTypePriorities),this.mediaTypeFormats=Object.freeze(this.mediaTypeFormats)}async testHandle(e,t,r){if(!t||!(t in this.mediaTypePriorities))throw new Error(`Unrecognized media type: ${t}`);return await this.testHandleChecked(e,r)}async testMediaType(e){return!0}async getMediaTypes(e){return this.mediaTypePriorities}async testMediaTypeFormats(e){return!0}async getMediaTypeFormats(e){return this.mediaTypeFormats}}t.ActorAbstractMediaTypedFixed=i},75560:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(18423),t),i(r(44405),t)},96331:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorAbstractPath=void 0;const n=r(59510),i=r(32227),a=r(76664),o=r(18050),s=r(22112),c=r(31578),u=r(29345),l=new o.DataFactory;class d extends n.ActorQueryOperationTypedMediated{constructor(e,t){super(e,"path"),this.predicateType=t}async testOperation(e,t){if(e.predicate.type!==this.predicateType)throw new Error(`This Actor only supports ${this.predicateType} Path operations.`);return!0}generateVariable(e,t){return t?!e||e.subject.value!==t&&e.object.value!==t?l.variable(t):this.generateVariable(e,`${t}b`):this.generateVariable(e,"b")}async isPathArbitraryLengthDistinct(e,t){return e.get(i.KeysQueryOperation.isPathArbitraryLengthDistinctKey)?{context:e=e.set(i.KeysQueryOperation.isPathArbitraryLengthDistinctKey,!1),operation:void 0}:{context:e=e.set(i.KeysQueryOperation.isPathArbitraryLengthDistinctKey,!0),operation:n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:d.FACTORY.createDistinct(t),context:e}))}}async predicateStarGraphVariable(e,t,r,i,o,s){const c=this.getPathSources(r),u=this.generateVariable(d.FACTORY.createPath(e,r,t,i)),l=d.FACTORY.createUnion([this.assignPatternSources(d.FACTORY.createPattern(e,u,t,i),c),this.assignPatternSources(d.FACTORY.createPattern(t,u,e,i),c)]),h=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:o,operation:l})),p=new Set;return{bindingsStream:new a.MultiTransformIterator(h.bindingsStream,{multiTransform:n=>{const c=n.get(i);return p.has(c.value)?new a.EmptyIterator:(p.add(c.value),new a.TransformIterator((async()=>{const n=new a.BufferedIterator;return await this.getObjectsPredicateStar(e,r,c,o,{},n,{count:0}),n.transform({transform(e,r,n){n(s.bindings([[t,e],[i,c]])),r()}})}),{maxBufferSize:128}))},autoStart:!1}),metadata:h.metadata}}async getObjectsPredicateStarEval(e,t,r,n,i,a,o){if("Variable"===n.termType)return this.predicateStarGraphVariable(e,r,t,n,i,o);const s=new u.PathVariableObjectIterator(e,t,n,i,this.mediatorQueryOperation,a);return{bindingsStream:s.transform({autoStart:!1,transform(e,t,n){n(o.bindings([[r,e]])),t()}}),async metadata(){const e=await new Promise((e=>{s.getProperty("metadata",(t=>e(t())))}));return e.cardinality.value++,e}}}async getObjectsPredicateStar(e,t,r,i,a,o,c){const u=(0,s.termToString)(e);if(a[u])return;o._push(e),a[u]=e,c.count++;const l=this.generateVariable(),h=d.FACTORY.createPath(e,t,l,r),p=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:h,context:i}));return p.bindingsStream.on("data",(async e=>{const n=e.get(l);await this.getObjectsPredicateStar(n,t,r,i,a,o,c)})),p.bindingsStream.on("end",(()=>{0==--c.count&&o.close()})),p.metadata}async getSubjectAndObjectBindingsPredicateStar(e,t,r,i,a,o,c,u,l,h,p,f){const y=(0,s.termToString)(i)+(0,s.termToString)(o);if(l[y])return;if(p.count++,l[y]=!0,h._push(f.bindings([[e,r],[t,i]])),y in u){const n=await u[y];for(const i of n)await this.getSubjectAndObjectBindingsPredicateStar(e,t,r,i,a,o,c,u,l,h,p,f);return void(0==--p.count&&h.close())}const g=new Promise((async(s,y)=>{const g=[],m=this.generateVariable(),b=d.FACTORY.createPath(i,a,m,o),v=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:b,context:c}));v.bindingsStream.on("data",(async n=>{const i=n.get(m);g.push(i),await this.getSubjectAndObjectBindingsPredicateStar(e,t,r,i,a,o,c,u,l,h,p,f)})),v.bindingsStream.on("error",y),v.bindingsStream.on("end",(()=>{0==--p.count&&h.close(),s(g)}))}));u[y]=g}getPathSources(e){switch(e.type){case c.Algebra.types.ALT:case c.Algebra.types.SEQ:return e.input.flatMap((e=>this.getPathSources(e)));case c.Algebra.types.INV:case c.Algebra.types.ONE_OR_MORE_PATH:case c.Algebra.types.ZERO_OR_MORE_PATH:case c.Algebra.types.ZERO_OR_ONE_PATH:return this.getPathSources(e.path);case c.Algebra.types.LINK:case c.Algebra.types.NPS:{const t=n.ActorQueryOperation.getOperationSource(e);if(!t)throw new Error("Could not find a required source on a link path operation");return[t]}}}assignPatternSources(e,t){if(0===t.length)throw new Error("Attempted to assign zero sources to a pattern during property path handling");return 1===t.length?n.ActorQueryOperation.assignOperationSource(e,t[0]):d.FACTORY.createUnion(t.map((t=>n.ActorQueryOperation.assignOperationSource(e,t))),!0)}}t.ActorAbstractPath=d,d.FACTORY=new c.Factory},29345:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathVariableObjectIterator=void 0;const n=r(59510),i=r(76664),a=r(18050),o=r(22112),s=r(31578),c=new a.DataFactory,u=new s.Factory;class l extends i.BufferedIterator{constructor(e,t,r,n,i,a,o=16){super({autoStart:!0}),this.subject=e,this.predicate=t,this.graph=r,this.context=n,this.mediatorQueryOperation=i,this.maxRunningOperations=o,this.termHashes=new Map,this.runningOperations=[],this.pendingOperations=[],this._push(this.subject,a)}_end(e){for(const e of this.runningOperations)e.destroy();super._end(e)}_push(e,t=!0){let r;if(t&&(r=(0,o.termToString)(e),this.termHashes.has(r)))return;const n=c.variable("b");this.pendingOperations.push({variable:n,operation:u.createPath(e,this.predicate,n,this.graph)}),r&&(this.termHashes.set(r,e),super._push(e))}_read(e,t){const r=this;(async function(){for(;r.runningOperations.lengthr.destroy(e))),i.on("readable",(()=>{r.readable=!0,r._fillBufferAsync()})),i.on("end",(()=>{r.runningOperations.splice(r.runningOperations.indexOf(i),1),r.readable=!0,r._fillBufferAsync()}))),r.setProperty("metadata",t.metadata)}let t,i=0;for(;i!==(i=e);)for(let n=0;n0;n++)null!==(t=r.runningOperations[n].read())&&(e--,r._push(t));0===r.runningOperations.length&&0===r.pendingOperations.length&&r.close()})().then((()=>{t()}),(e=>this.destroy(e)))}}t.PathVariableObjectIterator=l},43543:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(96331),t),i(r(29345),t)},53927:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessConvertShortcuts=void 0;const n=r(32362),i=r(34368);class a extends n.ActorContextPreprocess{constructor(e){super(e)}async test(e){return!0}async run(e){return{context:a.expandShortcuts(e.context,this.contextKeyShortcuts)}}static expandShortcuts(e,t){for(const r of e.keys())t[r.name]&&(e=e.set(new i.ActionContextKey(t[r.name]),e.get(r)).delete(r));return e}}t.ActorContextPreprocessConvertShortcuts=a},36251:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(53927),t)},80352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessQuerySourceIdentify=void 0;const n=r(32362),i=r(32227),a=r(34368),o=r(35069);class s extends n.ActorContextPreprocess{constructor(e){super(e),this.cache=this.cacheSize?new o.LRUCache({max:this.cacheSize}):void 0;const t=this.cache;t&&this.httpInvalidator.addInvalidateListener((({url:e})=>e?t.delete(e):t.clear()))}async test(e){return!0}async run(e){let t=e.context;if(t.has(i.KeysInitQuery.querySourcesUnidentified)){const r=e.context.get(i.KeysInitQuery.querySourcesUnidentified),n=await Promise.all(r.map((e=>this.expandSource(e)))),a=await Promise.all(n.map((async t=>this.identifySource(t,e.context))));t=e.context.delete(i.KeysInitQuery.querySourcesUnidentified).set(i.KeysQueryOperation.querySources,a)}return{context:t}}async expandSource(e){return"string"==typeof e||"match"in e?{value:e}:{...e,context:(await this.mediatorContextPreprocess.mediate({context:a.ActionContext.ensureActionContext(e.context??{})})).context}}identifySource(e,t){let r;return"string"==typeof e.value&&this.cache&&(r=this.cache.get(e.value)),r||(r=this.mediatorQuerySourceIdentify.mediate({querySourceUnidentified:e,context:t}).then((({querySource:e})=>e)),"string"==typeof e.value&&this.cache&&this.cache.set(e.value,r)),r}}t.ActorContextPreprocessQuerySourceIdentify=s},90807:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(80352),t)},16646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessQuerySourceSkolemize=void 0;const n=r(32362),i=r(32227),a=r(84078),o=r(50339);class s extends n.ActorContextPreprocess{constructor(e){super(e)}async test(e){return!0}async run(e){let t=e.context;if(t.has(i.KeysQueryOperation.querySources)){t.has(i.KeysQuerySourceIdentify.sourceIds)||(t=t.set(i.KeysQuerySourceIdentify.sourceIds,new Map));const e=t.getSafe(i.KeysQuerySourceIdentify.sourceIds);let r=t.getSafe(i.KeysQueryOperation.querySources);r=r.map((t=>({source:new a.QuerySourceSkolemized(t.source,(0,o.getSourceId)(e,t.source)),context:t.context}))),t=t.set(i.KeysQueryOperation.querySources,r)}return{context:t}}}t.ActorContextPreprocessQuerySourceSkolemize=s},84078:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceSkolemized=void 0;const n=r(72394),i=r(76664),a=r(50339);t.QuerySourceSkolemized=class{constructor(e,t){this.innerSource=e,this.sourceId=t}async getSelectorShape(e){return this.innerSource.getSelectorShape(e)}queryBindings(e,t,r){const o=(0,a.deskolemizeOperation)(e,this.sourceId);if(!o){const e=new i.ArrayIterator([],{autoStart:!1});return e.setProperty("metadata",{state:new n.MetadataValidationState,cardinality:{type:"exact",value:0},canContainUndefs:!1,variables:[]}),e}return(0,a.skolemizeBindingsStream)(this.innerSource.queryBindings(o,t,r),this.sourceId)}queryBoolean(e,t){return this.innerSource.queryBoolean(e,t)}queryQuads(e,t){const r=(0,a.deskolemizeOperation)(e,this.sourceId);if(!r){const e=new i.ArrayIterator([],{autoStart:!1});return e.setProperty("metadata",{state:new n.MetadataValidationState,cardinality:{type:"exact",value:0}}),e}return(0,a.skolemizeQuadStream)(this.innerSource.queryQuads(r,t),this.sourceId)}queryVoid(e,t){return this.innerSource.queryVoid(e,t)}get referenceValue(){return this.innerSource.referenceValue}toString(){return`${this.innerSource.toString()}(SkolemID:${this.sourceId})`}}},35106:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(16646),t),i(r(84078),t),i(r(50339),t)},50339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deskolemizeOperation=t.deskolemizeQuad=t.deskolemizeTermNestedThrowing=t.deskolemizeTerm=t.skolemizeBindingsStream=t.skolemizeQuadStream=t.skolemizeBindings=t.skolemizeQuad=t.skolemizeTerm=t.getSourceId=t.SKOLEM_PREFIX=void 0;const n=r(85156),i=r(18050),a=r(13252),o=r(31578),s=new i.DataFactory;function c(e,r){return"BlankNode"===e.termType?new n.BlankNodeScoped(`bc_${r}_${e.value}`,s.namedNode(`${t.SKOLEM_PREFIX}${r}:${e.value}`)):e}function u(e,t){return(0,a.mapTermsNested)(e,(e=>c(e,t)))}function l(e,t){return e.map((e=>"Quad"===e.termType?u(e,t):c(e,t)))}function d(e,r){if("BlankNode"===e.termType&&"skolemized"in e&&(e=e.skolemized),"NamedNode"===e.termType&&e.value.startsWith(t.SKOLEM_PREFIX)){const n=e.value.indexOf(":",t.SKOLEM_PREFIX.length);if(e.value.slice(t.SKOLEM_PREFIX.length,n)===r){const t=e.value.slice(n+1,e.value.length);return s.blankNode(t)}return null}return e}function h(e,t){if("Quad"===e.termType)return(0,a.mapTermsNested)(e,(e=>{const r=d(e,t);if(!r)throw new Error("Skolemized term is not in scope for this source");return r}));const r=d(e,t);if(null===r)throw new Error("Skolemized term is not in scope for this source");return r}t.SKOLEM_PREFIX="urn:comunica_skolem:source_",t.getSourceId=function(e,t){let r=e.get(t.referenceValue);return void 0===r&&(r=`${e.size}`,e.set(t.referenceValue,r)),r},t.skolemizeTerm=c,t.skolemizeQuad=u,t.skolemizeBindings=l,t.skolemizeQuadStream=function(e,t){const r=e.map((e=>u(e,t)));return function t(){e.getProperty("metadata",(e=>{r.setProperty("metadata",e),e.state.addInvalidateListener(t)}))}(),r},t.skolemizeBindingsStream=function(e,t){const r=e.map((e=>l(e,t)));return function t(){e.getProperty("metadata",(e=>{r.setProperty("metadata",e),e.state.addInvalidateListener(t)}))}(),r},t.deskolemizeTerm=d,t.deskolemizeTermNestedThrowing=h,t.deskolemizeQuad=function(e,t){return(0,a.mapTermsNested)(e,(e=>d(e,t)??e))},t.deskolemizeOperation=function(e,t){try{return o.Util.mapOperation(e,{[o.Algebra.types.PATTERN]:(e,r)=>({result:Object.assign(r.createPattern(h(e.subject,t),h(e.predicate,t),h(e.object,t),h(e.graph,t)),{metadata:e.metadata}),recurse:!1}),[o.Algebra.types.PATH]:(e,r)=>({result:Object.assign(r.createPath(h(e.subject,t),e.predicate,h(e.object,t),h(e.graph,t)),{metadata:e.metadata}),recurse:!1})})}catch{}}},65239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessSetDefaults=void 0;const n=r(32362),i=r(32227);class a extends n.ActorContextPreprocess{constructor(e){super(e),this.defaultFunctionArgumentsCache={}}async test(e){return!0}async run(e){let t=e.context;if(e.initialize){t=t.setDefault(i.KeysInitQuery.queryTimestamp,new Date).setDefault(i.KeysQuerySourceIdentify.sourceIds,new Map).setDefault(i.KeysCore.log,this.logger).setDefault(i.KeysInitQuery.functionArgumentsCache,this.defaultFunctionArgumentsCache).setDefault(i.KeysQuerySourceIdentify.hypermediaSourcesAggregatedStores,new Map);let e={language:"sparql",version:"1.1"};t.has(i.KeysInitQuery.queryFormat)?(e=t.get(i.KeysInitQuery.queryFormat),"graphql"===e.language&&(t=t.setDefault(i.KeysInitQuery.graphqlSingularizeVariables,{}))):t=t.set(i.KeysInitQuery.queryFormat,e)}return{context:t}}}t.ActorContextPreprocessSetDefaults=a},35451:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(65239),t)},58952:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessSourceToDestination=void 0;const n=r(32362),i=r(32227);class a extends n.ActorContextPreprocess{constructor(e){super(e)}async test(e){return!0}async run(e){if(e.context.get(i.KeysInitQuery.querySourcesUnidentified)&&!e.context.get(i.KeysRdfUpdateQuads.destination)){const t=e.context.get(i.KeysInitQuery.querySourcesUnidentified);if(1===t.length)return{context:e.context.set(i.KeysRdfUpdateQuads.destination,t[0])}}return e}}t.ActorContextPreprocessSourceToDestination=a},41670:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(58952),t)},1741:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceFallback=void 0;const n=r(47702);class i extends n.ActorDereference{constructor(e){super(e)}async test(e){return!0}async run(e){return this.handleDereferenceErrors(e,new Error(`Could not dereference '${e.url}'`))}}t.ActorDereferenceFallback=i},35878:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(1741),t)},3968:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceHttp=void 0;const n=r(60376);class i extends n.ActorDereferenceHttpBase{getMaxAcceptHeaderLength(){return this.maxAcceptHeaderLengthBrowser}}t.ActorDereferenceHttp=i},60376:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceHttpBase=t.mediaTypesToAcceptString=void 0;const n=r(47702),i=r(74870),a=r(10288),o=r(9929),s=r(76574),c=/^[^ ;]*/u;function u(e,t){const r=[],n=Object.entries(e).map((([e,t])=>({mediaType:e,priority:t}))).sort(((e,t)=>t.priority===e.priority?e.mediaType.localeCompare(t.mediaType):t.priority-e.priority));let i=n.length-1;for(const{mediaType:e,priority:a}of n){const n=e+(1===a?"":`;q=${a.toFixed(3).replace(/0*$/u,"")}`);if(i+n.length>t){for(;i+9>t;)i-=(r.pop()??"").length+1;r.push("*/*;q=0.1");break}r.push(n),i+=n.length}return 0===r.length?"*/*":r.join(",")}t.mediaTypesToAcceptString=u;class l extends n.ActorDereference{constructor(e){super(e)}async test({url:e}){if(!/^https?:/u.test(e))throw new Error(`Cannot retrieve ${e} because it is not an HTTP(S) URL.`);return!0}async run(e){let t=!0;const r=new a.Headers(e.headers);let l;r.append("Accept",u(await(e.mediaTypes?.())??{},this.getMaxAcceptHeaderLength()));const d=Date.now();try{l=await this.mediatorHttp.mediate({context:e.context,init:{headers:r,method:e.method},input:e.url})}catch(t){return this.handleDereferenceErrors(e,t)}const h=(0,o.resolve)(l.url,e.url),p=Date.now()-d;if(200!==l.status){t=!1;const r=l.body?await s(i.ActorHttp.toNodeReadable(l.body)):"empty response";if(!e.acceptErrors){const t=new Error(`Could not retrieve ${e.url} (HTTP status ${l.status}):\n${r}`);return this.handleDereferenceErrors(e,t,l.headers,p)}}const f=c.exec(l.headers.get("content-type")??"")?.[0];return{url:h,data:t?i.ActorHttp.toNodeReadable(l.body):(0,n.emptyReadable)(),exists:t,requestTime:p,headers:l.headers,mediaType:"text/plain"===f?void 0:f}}}t.ActorDereferenceHttpBase=l},68132:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(3968),t),i(r(60376),t)},96636:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceRdfParse=void 0;const n=r(53583);class i extends n.ActorDereferenceRdf{constructor(e){super(e)}async getMetadata(e){return{baseIRI:e.url}}}t.ActorDereferenceRdfParse=i},54341:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(96636),t)},48040:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHashBindingsSha1=void 0;const n=r(38431),i=r(99499),a=r(22112),o=r(62168);class s extends n.ActorHashBindings{async test(e){if(!e.allowHashCollisions)throw new Error(`Actor ${this.name} can not provide hash functions without hash collisions`);return!0}async run(e){return{hashFunction:e=>(0,i.sha1)().update(o(Object.fromEntries([...e].map((([e,t])=>[(0,a.termToString)(e),(0,a.termToString)(t)]))))).digest("hex"),hashCollisions:!0}}}t.ActorHashBindingsSha1=s},11150:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(48040),t)},51803:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpFetch=void 0;const n=r(74870),i=r(32227);r(90482);const a=r(63562);class o extends n.ActorHttp{constructor(e){super(e),this.userAgent=o.createUserAgent(),this.fetchInitPreprocessor=new a.FetchInitPreprocessor(e.agentOptions)}static createUserAgent(){return`Comunica/actor-http-fetch (${void 0===globalThis.navigator?`Node.js ${process.version}; ${process.platform}`:`Browser-${globalThis.navigator.userAgent}`})`}async test(e){return{time:Number.POSITIVE_INFINITY}}static async getResponse(e,t,r,n,i,a){let o,s=n+1;for(;s-- >0;)try{const n=await e(t,r);if(a&&n.status>=500&&n.status<600)throw new Error(`Server replied with response code ${n.status}: ${n.statusText}`);return n}catch(e){if(o=e,r.signal?.aborted)throw e;s>0&&await new Promise(((e,t)=>{setTimeout(e,i),r.signal?.addEventListener("abort",(()=>{t(new Error("Fetch aborted by timeout."))}))}))}throw n>0?new Error(`Number of fetch retries (${n}) exceeded. Last error: ${String(o)}`):o}async run(e){const t=e.init?.headers??{};e.init=e.init??{},e.init.headers=new Headers(t),e.init.headers.has("user-agent")||e.init.headers.append("user-agent",this.userAgent);const r=e.context.get(i.KeysHttp.auth);r&&e.init.headers.append("Authorization",`Basic ${Buffer.from(r).toString("base64")}`),this.logInfo(e.context,`Requesting ${"string"==typeof e.input?e.input:e.input.url}`,(()=>({headers:n.ActorHttp.headersToHash(new Headers(e.init.headers)),method:e.init.method??"GET"}))),e.init?.headers&&"append"in e.init.headers&&e.context.has(i.KeysHttp.fetch)&&(e.init.headers=n.ActorHttp.headersToHash(e.init.headers));let a={...e.init};e.context.get(i.KeysHttp.includeCredentials)&&(a.credentials="include");const s=e.context?.get(i.KeysHttp.httpTimeout);let c,u;if(void 0!==s){const e=await this.fetchInitPreprocessor.createAbortController();a.signal=e.signal,u=()=>e.abort(),c=setTimeout((()=>u()),s)}try{a=await this.fetchInitPreprocessor.handle(a);const t=e.context?.get(i.KeysHttp.httpRetryCount)??0,r=e.context?.get(i.KeysHttp.httpRetryDelay)??0,n=e.context?.get(i.KeysHttp.httpRetryOnServerError)??!1,s=e.context?.get(i.KeysHttp.fetch),l=await o.getResponse(s??fetch,e.input,a,t,r,n);return void 0!==c&&(e.context?.get(i.KeysHttp.httpBodyTimeout)&&l.body?(u=()=>l.body?.cancel(new Error(`HTTP timeout when reading the body of ${l.url}.\nThis error can be disabled by modifying the 'httpBodyTimeout' and/or 'httpTimeout' options.`)),l.body.on("close",(()=>{clearTimeout(c)}))):clearTimeout(c)),l.body&&!l.body.cancel&&(l.body.cancel=async e=>{l.body.destroy(e),void 0!==c&&clearTimeout(c)}),l}catch(e){throw void 0!==c&&clearTimeout(c),e}}}t.ActorHttpFetch=o},63562:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchInitPreprocessor=void 0;const n=r(74870);t.FetchInitPreprocessor=class{async handle(e){if(e.headers){const t=new Headers(e.headers);t.has("user-agent")&&t.delete("user-agent"),e.headers=t}if(e?.headers&&"append"in e.headers&&(e.headers=n.ActorHttp.headersToHash(e.headers)),e.body&&"string"!=typeof e.body&&"getReader"in e.body){const t=e.body.getReader(),r=[];for(;;){const{done:e,value:n}=await t.read();if(e)break;r.push(n)}e.body=r.join("")}return{keepalive:!e.body,...e}}async createAbortController(){return new AbortController}}},28590:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(51803),t)},57643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpProxy=void 0;const n=r(74870),i=r(32227);class a extends n.ActorHttp{constructor(e){super(e)}async test(e){const t=e.context.get(i.KeysHttpProxy.httpProxyHandler);if(!t)throw new Error(`Actor ${this.name} could not find a proxy handler in the context.`);if(!await t.getProxy(e))throw new Error(`Actor ${this.name} could not determine a proxy for the given request.`);return{time:Number.POSITIVE_INFINITY}}async run(e){const t="string"==typeof e.input?e.input:e.input.url,r=e.context.get(i.KeysHttpProxy.httpProxyHandler),n=await this.mediatorHttp.mediate({...await r.getProxy(e),context:e.context.delete(i.KeysHttpProxy.httpProxyHandler)});return Object.defineProperty(n,"url",{configurable:!0,enumerable:!0,get:()=>n.headers.get("x-final-url")??t}),n}}t.ActorHttpProxy=a},76862:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyHandlerStatic=void 0,t.ProxyHandlerStatic=class{constructor(e){this.prefixUrl=e}async getProxy(e){return{init:e.init,input:this.modifyInput(e.input)}}modifyInput(e){return"string"==typeof e?this.prefixUrl+e:new Request(this.prefixUrl+e.url,e)}}},48230:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(57643),t),i(r(76862),t)},363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpWayback=void 0;const n=r(74870),i=r(32227),a=r(76574);r(90482);const o="http://wayback.archive-it.org/";function s(e){const t=new Request(e.input,e.init);return{input:new Request(new URL(`/${t.url}`,o),t)}}function c(e){const t=e.get(i.KeysHttpProxy.httpProxyHandler);return t?e=>t.getProxy(s(e)):e=>Promise.resolve(s(e))}class u extends n.ActorHttp{constructor(e){super(e)}async test(e){return!0}async run(e){let t=await this.mediatorHttp.mediate(e);if(404===t.status&&e.context.get(i.KeysHttpWayback.recoverBrokenLinks)){let r=await this.mediatorHttp.mediate({...e,context:e.context.set(i.KeysHttpWayback.recoverBrokenLinks,!1).set(i.KeysHttpProxy.httpProxyHandler,{getProxy:c(e.context)})});200===r.status&&([t,r]=[r,t]);const{body:o}=r;o&&("cancel"in o&&"function"==typeof o.cancel?await o.cancel():"destroy"in o&&"function"==typeof o.destroy?o.destroy():await a(n.ActorHttp.toNodeReadable(o)))}return t}}t.ActorHttpWayback=u},55390:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(363),t)},94394:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorInitQuery=void 0;const n=r(59266);"undefined"==typeof process&&(globalThis.process=r(39907));class i extends n.ActorInitQueryBase{}t.ActorInitQuery=i},59266:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorInitQueryBase=void 0;const n=r(99784);class i extends n.ActorInit{async test(e){return!0}async run(e){throw new Error("ActorInitSparql#run is not supported in the browser.")}}t.ActorInitQueryBase=i},52295:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryEngineBase=void 0;const n=r(32227),i=r(34368);class a{constructor(e){this.actorInitQuery=e}async queryBindings(e,t){return this.queryOfType(e,t,"bindings")}async queryQuads(e,t){return this.queryOfType(e,t,"quads")}async queryBoolean(e,t){return this.queryOfType(e,t,"boolean")}async queryVoid(e,t){return this.queryOfType(e,t,"void")}async queryOfType(e,t,r){const n=await this.query(e,t);if(n.resultType===r)return await n.execute();throw new Error(`Query result type '${r}' was expected, while '${n.resultType}' was found.`)}async query(e,t){const r=await this.queryOrExplain(e,t);if("explain"in r)throw new Error("Tried to explain a query when in query-only mode");return r}async explain(e,t,r){return t.explain=r,await this.queryOrExplain(e,t)}async queryOrExplain(e,t){const r=i.ActionContext.ensureActionContext(t);r.get(n.KeysInitQuery.noCache)&&await this.invalidateHttpCache();const{result:o}=await this.actorInitQuery.mediatorQueryProcess.mediate({query:e,context:r});return"explain"in o?o:a.internalToFinalResult(o)}async getResultMediaTypes(e){return e=i.ActionContext.ensureActionContext(e),(await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeCombiner.mediate({context:e,mediaTypes:!0})).mediaTypes}async getResultMediaTypeFormats(e){return e=i.ActionContext.ensureActionContext(e),(await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeFormatCombiner.mediate({context:e,mediaTypeFormats:!0})).mediaTypeFormats}async resultToString(e,t,r){if(r=i.ActionContext.ensureActionContext(r),!t)switch(e.resultType){case"bindings":t="application/json";break;case"quads":t="application/trig";break;default:t="simple"}const n={...await a.finalToInternalResult(e),context:r};return(await this.actorInitQuery.mediatorQueryResultSerialize.mediate({context:r,handle:n,handleMediaType:t})).handle}invalidateHttpCache(e,t){return t=i.ActionContext.ensureActionContext(t),this.actorInitQuery.mediatorHttpInvalidate.mediate({url:e,context:t})}static internalToFinalResult(e){switch(e.type){case"bindings":return{resultType:"bindings",execute:async()=>e.bindingsStream,metadata:async()=>await e.metadata(),context:e.context};case"quads":return{resultType:"quads",execute:async()=>e.quadStream,metadata:async()=>await e.metadata(),context:e.context};case"boolean":return{resultType:"boolean",execute:async()=>e.execute(),context:e.context};case"void":return{resultType:"void",execute:async()=>e.execute(),context:e.context}}}static async finalToInternalResult(e){switch(e.resultType){case"bindings":return{type:"bindings",bindingsStream:await e.execute(),metadata:async()=>await e.metadata()};case"quads":return{type:"quads",quadStream:await e.execute(),metadata:async()=>await e.metadata()};case"boolean":return{type:"boolean",execute:()=>e.execute()};case"void":return{type:"void",execute:()=>e.execute()}}}}t.QueryEngineBase=a},15729:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryEngineBase=void 0,i(r(59266),t),i(r(94394),t);var a=r(52295);Object.defineProperty(t,"QueryEngineBase",{enumerable:!0,get:function(){return a.QueryEngineBase}})},35153:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationAssignSourcesExhaustive=void 0;const n=r(6716),i=r(59510),a=r(86789),o=r(32227),s=r(31578);class c extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){const t=e.context.get(o.KeysQueryOperation.querySources)??[];if(0===t.length)return{operation:e.operation,context:e.context};if(1===t.length){const r=t[0],n=e.context.get(o.KeysRdfUpdateQuads.destination);if(!n||r.source.referenceValue===(0,a.getDataDestinationValue)(n))try{const t=await r.source.getSelectorShape(e.context);if(i.ActorQueryOperation.doesShapeAcceptOperation(t,e.operation))return{operation:i.ActorQueryOperation.assignOperationSource(e.operation,r),context:e.context}}catch{}}return{operation:this.assignExhaustive(e.operation,t),context:e.context.delete(o.KeysInitQuery.queryString)}}assignExhaustive(e,t){const r=this;return s.Util.mapOperation(e,{[s.Algebra.types.PATTERN]:(e,r)=>1===t.length?{result:i.ActorQueryOperation.assignOperationSource(e,t[0]),recurse:!1}:{result:r.createUnion(t.map((t=>i.ActorQueryOperation.assignOperationSource(e,t)))),recurse:!1},[s.Algebra.types.LINK]:(e,r)=>1===t.length?{result:i.ActorQueryOperation.assignOperationSource(e,t[0]),recurse:!1}:{result:r.createAlt(t.map((t=>i.ActorQueryOperation.assignOperationSource(e,t)))),recurse:!1},[s.Algebra.types.NPS]:(e,r)=>1===t.length?{result:i.ActorQueryOperation.assignOperationSource(e,t[0]),recurse:!1}:{result:r.createAlt(t.map((t=>i.ActorQueryOperation.assignOperationSource(e,t)))),recurse:!1},[s.Algebra.types.SERVICE]:e=>({result:e,recurse:!1}),[s.Algebra.types.CONSTRUCT]:(e,n)=>({result:n.createConstruct(r.assignExhaustive(e.input,t),e.template),recurse:!1}),[s.Algebra.types.DELETE_INSERT]:(e,n)=>({result:n.createDeleteInsert(e.delete,e.insert,e.where?r.assignExhaustive(e.where,t):void 0),recurse:!1})})}}t.ActorOptimizeQueryOperationAssignSourcesExhaustive=c},94741:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(35153),t)},37919:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationBgpToJoin=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{bgp:(e,t)=>({recurse:!1,result:t.createJoin(e.patterns)})}),context:e.context}}}t.ActorOptimizeQueryOperationBgpToJoin=a},28084:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(37919),t)},64372:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationDescribeToConstructsSubject=void 0;const n=r(6716),i=r(18050),a=r(31578),o=new i.DataFactory,s=new a.Factory;class c extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){if(e.operation.type!==a.Algebra.types.DESCRIBE)throw new Error(`Actor ${this.name} only supports describe operations, but got ${e.operation.type}`);return!0}async run(e){const t=e.operation,r=t.terms.filter((e=>"Variable"!==e.termType)).map((e=>{const t=[o.quad(e,o.variable("__predicate"),o.variable("__object"))];return t.forEach((e=>e.type="pattern")),{input:{type:a.Algebra.types.BGP,patterns:t},template:t,type:"construct"}}));if(r.length!==t.terms.length){let e=[];t.terms.filter((e=>"Variable"===e.termType)).forEach(((t,r)=>{const n=[o.quad(t,o.variable(`__predicate${r}`),o.variable(`__object${r}`))];n.forEach((e=>e.type="pattern")),e=[...e,...n]})),r.push({input:{type:a.Algebra.types.JOIN,input:[t.input,{type:a.Algebra.types.BGP,patterns:e}]},template:e,type:a.Algebra.types.CONSTRUCT})}return{operation:s.createUnion(r,!1),context:e.context}}}t.ActorOptimizeQueryOperationDescribeToConstructsSubject=c},78571:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(64372),t)},18348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationFilterPushdown=void 0;const n=r(6716),i=r(13252),a=r(31578);class o extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){const t=this;return{operation:a.Util.mapOperation(e.operation,{filter(r,n){const i=t.getExpressionVariables(r.expression);return{recurse:!0,result:t.filterPushdown(r.expression,i,r.input,n,e.context)}}}),context:e.context}}getExpressionVariables(e){switch(e.expressionType){case a.Algebra.expressionTypes.AGGREGATE:case a.Algebra.expressionTypes.WILDCARD:throw new Error(`Getting expression variables is not supported for ${e.expressionType}`);case a.Algebra.expressionTypes.EXISTENCE:return a.Util.inScopeVariables(e.input);case a.Algebra.expressionTypes.NAMED:return[];case a.Algebra.expressionTypes.OPERATOR:return(0,i.uniqTerms)(e.args.flatMap((e=>this.getExpressionVariables(e))));case a.Algebra.expressionTypes.TERM:return"Variable"===e.term.termType?[e.term]:[]}}getOverlappingOperations(e,t){const r=[],n=[],i=[];for(const o of e.input){const e=a.Util.inScopeVariables(o);this.variablesSubSetOf(t,e)?r.push(o):this.variablesIntersect(t,e)?n.push(o):i.push(o)}return{fullyOverlapping:r,partiallyOverlapping:n,notOverlapping:i}}filterPushdown(e,t,r,n,i){switch(r.type){case a.Algebra.types.EXTEND:return this.variablesIntersect([r.variable],t)?n.createFilter(r,e):n.createExtend(this.filterPushdown(e,t,r.input,n,i),r.variable,r.expression);case a.Algebra.types.FILTER:return n.createFilter(this.filterPushdown(e,t,r.input,n,i),r.expression);case a.Algebra.types.JOIN:{if(0===r.input.length)return n.createFilter(r,e);const{fullyOverlapping:a,partiallyOverlapping:o,notOverlapping:s}=this.getOverlappingOperations(r,t),c=[];return this.logDebug(i,`Push down filter across join entries with ${a.length} fully overlapping, ${o.length} partially overlapping, and ${s.length} not overlapping`),a.length>0&&c.push(n.createJoin(a.map((r=>this.filterPushdown(e,t,r,n,i))))),o.length>0&&c.push(n.createFilter(n.createJoin(o,!1),e)),s.length>0&&c.push(...s),1===c.length?c[0]:n.createJoin(c)}case a.Algebra.types.NOP:return r;case a.Algebra.types.PROJECT:return this.variablesIntersect(r.variables,t)?n.createProject(this.filterPushdown(e,t,r.input,n,i),r.variables):r;case a.Algebra.types.UNION:{const{fullyOverlapping:a,partiallyOverlapping:o,notOverlapping:s}=this.getOverlappingOperations(r,t),c=[];return this.logDebug(i,`Push down filter across union entries with ${a.length} fully overlapping, ${o.length} partially overlapping, and ${s.length} not overlapping`),a.length>0&&c.push(n.createUnion(a.map((r=>this.filterPushdown(e,t,r,n,i))))),o.length>0&&c.push(n.createFilter(n.createUnion(o,!1),e)),s.length>0&&c.push(...s),1===c.length?c[0]:n.createUnion(c)}case a.Algebra.types.VALUES:return this.variablesIntersect(r.variables,t)?n.createFilter(r,e):r;case a.Algebra.types.LEFT_JOIN:case a.Algebra.types.MINUS:case a.Algebra.types.ALT:case a.Algebra.types.ASK:case a.Algebra.types.BGP:case a.Algebra.types.CONSTRUCT:case a.Algebra.types.DESCRIBE:case a.Algebra.types.DISTINCT:case a.Algebra.types.EXPRESSION:case a.Algebra.types.FROM:case a.Algebra.types.GRAPH:case a.Algebra.types.GROUP:case a.Algebra.types.INV:case a.Algebra.types.LINK:case a.Algebra.types.NPS:case a.Algebra.types.ONE_OR_MORE_PATH:case a.Algebra.types.ORDER_BY:case a.Algebra.types.PATTERN:case a.Algebra.types.REDUCED:case a.Algebra.types.SEQ:case a.Algebra.types.SERVICE:case a.Algebra.types.SLICE:case a.Algebra.types.PATH:case a.Algebra.types.ZERO_OR_MORE_PATH:case a.Algebra.types.ZERO_OR_ONE_PATH:case a.Algebra.types.COMPOSITE_UPDATE:case a.Algebra.types.DELETE_INSERT:case a.Algebra.types.LOAD:case a.Algebra.types.CLEAR:case a.Algebra.types.CREATE:case a.Algebra.types.DROP:case a.Algebra.types.ADD:case a.Algebra.types.MOVE:case a.Algebra.types.COPY:return n.createFilter(r,e)}}variablesIntersect(e,t){return e.some((e=>t.some((t=>e.equals(t)))))}variablesSubSetOf(e,t){return e.length<=t.length&&e.every((e=>t.some((t=>e.equals(t)))))}}t.ActorOptimizeQueryOperationFilterPushdown=o},48989:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(18348),t)},14400:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationGroupSources=void 0;const n=r(6716),i=r(59510),a=r(31578),o=new a.Factory;class s extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){if(i.ActorQueryOperation.getOperationSource(e.operation))throw new Error(`Actor ${this.name} does not work with top-level operation sources.`);return!0}async run(e){return{operation:await this.groupOperation(e.operation,e.context),context:e.context}}async groupOperation(e,t){if(i.ActorQueryOperation.getOperationSource(e)??!("input"in e))return e;if(!Array.isArray(e.input)){const r=await this.groupOperation(e.input,t);if(r.metadata?.scopedSource){const n=i.ActorQueryOperation.getOperationSource(r);i.ActorQueryOperation.doesShapeAcceptOperation(await n.source.getSelectorShape(t),e)&&(this.logDebug(t,`Hoist 1 source-specific operation into a single ${e.type} operation for ${n.source.toString()}`),i.ActorQueryOperation.removeOperationSource(r),e=i.ActorQueryOperation.assignOperationSource(e,n))}return{...e,input:r}}const r=await Promise.all(e.input.map((e=>this.groupOperation(e,t)))),n=this.clusterOperationsWithEqualSources(r);if(1===n.length){const r=n[0],a=i.ActorQueryOperation.getOperationSource(n[0][0]);return{...await this.moveSourceAnnotationUpwardsIfPossible(e,r,a,t),input:r}}if(n.length===r.length)return{...e,input:r};let s;switch(e.type){case a.Algebra.types.JOIN:s=o.createJoin.bind(o);break;case a.Algebra.types.UNION:s=o.createUnion.bind(o);break;case a.Algebra.types.ALT:s=o.createAlt.bind(o);break;case a.Algebra.types.SEQ:s=o.createSeq.bind(o);break;default:throw new Error(`Unsupported operation '${e.type}' detected while grouping sources`)}return await this.groupOperationMulti(n,s,t)}async groupOperationMulti(e,t,r){let n=!0;const a=await Promise.all(e.map((async e=>{const a=i.ActorQueryOperation.getOperationSource(e[0]),o=await this.moveSourceAnnotationUpwardsIfPossible(t(e,!0),e,a,r);return i.ActorQueryOperation.getOperationSource(o)&&(n=!1),o})));return t(a,n)}clusterOperationsWithEqualSources(e){const t=new Map,r=[];for(const n of e){const e=i.ActorQueryOperation.getOperationSource(n);e?(t.has(e)||t.set(e,[]),t.get(e).push(n)):r.push(n)}const n=[];r.length>0&&n.push(r);for(const[e,r]of t.entries())n.push(r.map((t=>i.ActorQueryOperation.assignOperationSource(t,e))));return n}async moveSourceAnnotationUpwardsIfPossible(e,t,r,n){if(r&&i.ActorQueryOperation.doesShapeAcceptOperation(await r.source.getSelectorShape(n),e)){this.logDebug(n,`Hoist ${t.length} source-specific operations into a single ${e.type} operation for ${r.source.toString()}`),e=i.ActorQueryOperation.assignOperationSource(e,r);for(const e of t)i.ActorQueryOperation.removeOperationSource(e)}return e}}t.ActorOptimizeQueryOperationGroupSources=s},78992:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(14400),t)},90042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationJoinBgp=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{join:(e,t)=>e.input.every((e=>"bgp"===e.type))?{recurse:!1,result:t.createBgp(e.input.flatMap((e=>e.patterns)))}:{recurse:!1,result:e}}),context:e.context}}}t.ActorOptimizeQueryOperationJoinBgp=a},46980:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(90042),t)},33186:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationJoinConnected=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{join:(e,t)=>({recurse:!1,result:a.cluster(e,t)})}),context:e.context}}static cluster(e,t){let r,n=e.input.map((e=>({inScopeVariables:Object.fromEntries(i.Util.inScopeVariables(e).map((e=>[e.value,!0]))),entries:[e]})));do{r=n,n=a.clusterIteration(r)}while(r.length!==n.length);const o=n.map((e=>t.createJoin(e.entries)));return 1===o.length?o[0]:t.createJoin(o,!1)}static clusterIteration(e){const t=[];for(const r of e){let e=!1;for(const n of t)if(a.haveOverlappingVariables(r.inScopeVariables,n.inScopeVariables)){n.entries=[...n.entries,...r.entries],n.inScopeVariables={...n.inScopeVariables,...r.inScopeVariables},e=!0;break}e||t.push({inScopeVariables:r.inScopeVariables,entries:r.entries})}return t}static haveOverlappingVariables(e,t){for(const r of Object.keys(e))if(t[r])return!0;return!1}}t.ActorOptimizeQueryOperationJoinConnected=a},98498:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(33186),t)},92834:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationPruneEmptySourceOperations=void 0;const n=r(6716),i=r(59510),a=r(32227),o=r(18050),s=r(31578),c=new s.Factory,u=new o.DataFactory;class l extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){if(i.ActorQueryOperation.getOperationSource(e.operation))throw new Error(`Actor ${this.name} does not work with top-level operation sources.`);return!0}async run(e){let t=e.operation;const r=[],n=this;s.Util.recurseOperation(t,{[s.Algebra.types.UNION]:e=>(n.collectMultiOperationInputs(e.input,r,s.Algebra.types.PATTERN),!0),[s.Algebra.types.ALT]:e=>(n.collectMultiOperationInputs(e.input,r,s.Algebra.types.LINK),!1),[s.Algebra.types.SERVICE]:()=>!1});const a=new Set;return await Promise.all(r.map((async t=>{const r="link"===t.type?c.createPattern(u.variable("?s"),t.iri,u.variable("?o")):t;await this.hasSourceResults(i.ActorQueryOperation.getOperationSource(t),r,e.context)||a.add(t)}))),a.size>0&&(this.logDebug(e.context,`Pruning ${a.size} source-specific operations`),t=s.Util.mapOperation(t,{[s.Algebra.types.UNION]:(e,t)=>n.mapMultiOperation(e,a,(e=>t.createUnion(e))),[s.Algebra.types.ALT]:(e,t)=>n.mapMultiOperation(e,a,(e=>t.createAlt(e)))}),t=s.Util.mapOperation(t,{[s.Algebra.types.PROJECT](e,t){let r=!1;return s.Util.recurseOperation(e,{[s.Algebra.types.UNION]:e=>(0===e.input.length&&(r=!0),!0),[s.Algebra.types.ALT]:e=>(0===e.input.length&&(r=!0),!0)}),r?{recurse:!1,result:t.createUnion([])}:{recurse:!0,result:e}}})),{operation:t,context:e.context}}collectMultiOperationInputs(e,t,r){for(const n of e)i.ActorQueryOperation.getOperationSource(n)&&n.type===r&&t.push(n)}mapMultiOperation(e,t,r){const n=e.input.filter((e=>!t.has(e)));return n.length===e.input.length?{result:e,recurse:!0}:0===n.length?{result:r([]),recurse:!1}:1===n.length?{result:n[0],recurse:!0}:{result:r(n),recurse:!0}}async hasSourceResults(e,t,r){if(e.context?.get(a.KeysQuerySourceIdentify.traverse))return!0;if(this.useAskIfSupported){const n=c.createAsk(t);if(i.ActorQueryOperation.doesShapeAcceptOperation(await e.source.getSelectorShape(r),n))return e.source.queryBoolean(n,r)}const n=e.source.queryBindings(t,r);return new Promise(((e,t)=>{n.on("error",t),n.getProperty("metadata",(t=>{n.destroy(),e(t.cardinality.value>0)}))}))}}t.ActorOptimizeQueryOperationPruneEmptySourceOperations=l},94607:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(92834),t)},13614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationRewriteAdd=void 0;const n=r(6716),i=r(18050),a=r(31578),o=new i.DataFactory;class s extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){return{operation:a.Util.mapOperation(e.operation,{[a.Algebra.types.ADD](e,t){const r="DEFAULT"===e.destination?o.defaultGraph():e.destination,n="DEFAULT"===e.source?o.defaultGraph():e.source;return{result:t.createDeleteInsert(void 0,[t.createPattern(o.variable("s"),o.variable("p"),o.variable("o"),r)],t.createPattern(o.variable("s"),o.variable("p"),o.variable("o"),n)),recurse:!1}}}),context:e.context}}}t.ActorOptimizeQueryOperationRewriteAdd=s},63514:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(13614),t)},25812:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationRewriteCopy=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{[i.Algebra.types.COPY](e,t){let r;return r="string"==typeof e.destination&&"string"==typeof e.source&&e.destination===e.source||"string"!=typeof e.destination&&"string"!=typeof e.source&&e.destination.equals(e.source)?t.createCompositeUpdate([]):t.createCompositeUpdate([t.createDrop(e.destination,!0),t.createAdd(e.source,e.destination,e.silent)]),{result:r,recurse:!1}}}),context:e.context}}}t.ActorOptimizeQueryOperationRewriteCopy=a},15718:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(25812),t)},90348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationRewriteMove=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{[i.Algebra.types.MOVE](e,t){let r;if("string"==typeof e.destination&&"string"==typeof e.source&&e.destination===e.source||"string"!=typeof e.destination&&"string"!=typeof e.source&&e.destination.equals(e.source))r=t.createCompositeUpdate([]);else{const n=[t.createDrop(e.destination,!0),t.createAdd(e.source,e.destination,e.silent),t.createDrop(e.source)];r=t.createCompositeUpdate(n)}return{result:r,recurse:!1}}}),context:e.context}}}t.ActorOptimizeQueryOperationRewriteMove=a},83910:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(90348),t)},82476:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationAsk=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"ask")}async testOperation(e,t){return!0}async runOperation(e,t){const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t}),{bindingsStream:i}=n.ActorQueryOperation.getSafeBindings(r);return{type:"boolean",execute:async()=>1===(await i.take(1).toArray()).length}}}t.ActorQueryOperationAsk=i},57321:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(82476),t)},9147:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationBgpJoin=void 0;const n=r(59510),i=r(31578);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"bgp")}async testOperation(e,t){return!0}async runOperation(e,t){return this.mediatorQueryOperation.mediate({operation:a.FACTORY.createJoin(e.patterns),context:t})}}t.ActorQueryOperationBgpJoin=a,a.FACTORY=new i.Factory},20888:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(9147),t)},59516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationConstruct=void 0;const n=r(59510),i=r(13252),a=r(31578),o=r(59218);class s extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"construct")}static getVariables(e){return(0,i.uniqTerms)([].concat.apply([],e.map((e=>(0,i.getVariables)((0,i.getTermsNested)(e))))))}async testOperation(e,t){return!0}async runOperation(e,t){const r=s.getVariables(e.template),i={type:a.Algebra.types.PROJECT,input:e.input,variables:r},c=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:i,context:t}));return{metadata:()=>c.metadata().then((t=>({...t,order:void 0,cardinality:{type:t.cardinality.type,value:t.cardinality.value*e.template.length},canContainUndefs:!1,availableOrders:void 0}))),quadStream:new o.BindingsToQuadsIterator(e.template,c.bindingsStream),type:"quads"}}}t.ActorQueryOperationConstruct=s},59218:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsToQuadsIterator=void 0;const n=r(76664),i=r(18050),a=r(13252),o=new i.DataFactory;class s extends n.MultiTransformIterator{constructor(e,t){super(t,{autoStart:!1}),this.template=e,this.blankNodeCounter=0}static bindTerm(e,t){return"Variable"===t.termType?e.get(t):t}static bindQuad(e,t){try{return(0,a.mapTermsNested)(t,(t=>{const r=s.bindTerm(e,t);if(!r)throw new Error("Unbound term");return r}))}catch{}}static localizeBlankNode(e,t){return"BlankNode"===t.termType?o.blankNode(`${t.value}${e}`):t}static localizeQuad(e,t){return(0,a.mapTermsNested)(t,(t=>s.localizeBlankNode(e,t)))}bindTemplate(e,t,r){return t.map(s.localizeQuad.bind(null,r)).map((t=>s.bindQuad.bind(null,e)(t))).filter(Boolean)}_createTransformer(e){return new n.ArrayIterator(this.bindTemplate(e,this.template,this.blankNodeCounter++),{autoStart:!1})}}t.BindingsToQuadsIterator=s},88749:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(59516),t),i(r(59218),t)},50403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationDistinctHash=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"distinct")}async testOperation(e,t){return!0}async runOperation(e,t){const r=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:t}));return{type:"bindings",bindingsStream:r.bindingsStream.filter(await this.newHashFilter(t)),metadata:r.metadata}}async newHashFilter(e){const{hashFunction:t}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:e}),r={};return e=>{const n=t(e);return!(n in r)&&(r[n]=!0)}}}t.ActorQueryOperationDistinctHash=i},13867:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(50403),t)},50372:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationExtend=void 0;const n=r(91674),i=r(59510),a=r(61621);class o extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"extend")}async testOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);return Boolean(new a.AsyncEvaluator(e.expression,i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r))),!0}async runOperation(e,t){const{expression:r,input:o,variable:s}=e,c=i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:o,context:t}));if((await c.metadata()).variables.some((e=>e.equals(s))))throw new Error(`Illegal binding to variable '${s.value}' that has already been bound`);const u=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),l={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,u)},d=new a.AsyncEvaluator(r,l),h=c.bindingsStream.transform({autoStart:!1,transform:async(e,r,i)=>{try{const t=await d.evaluate(e);i(e.set(s,t))}catch(r){(0,a.isExpressionError)(r)?(i(e),this.logWarn(t,`Expression error for extend operation (${r.message})with bindings '${(0,n.bindingsToString)(e)}'`)):h.emit("error",r)}r()}});return{type:"bindings",bindingsStream:h,async metadata(){const e=await c.metadata();return{...e,variables:[...e.variables,s]}}}}}t.ActorQueryOperationExtend=o},19724:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(50372),t)},64452:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationFilter=void 0;const n=r(91674),i=r(59510),a=r(61621);class o extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"filter")}async testOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),o={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r)};return new a.AsyncEvaluator(e.expression,o),!0}async runOperation(e,t){const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t}),o=i.ActorQueryOperation.getSafeBindings(r);i.ActorQueryOperation.validateQueryOutput(o,"bindings");const s=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),c={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,s)},u=new a.AsyncEvaluator(e.expression,c),l=o.bindingsStream.transform({transform:async(e,r,i)=>{try{await u.evaluateAsEBV(e)&&i(e)}catch(r){(0,a.isExpressionError)(r)?this.logWarn(t,"Error occurred while filtering.",(()=>({error:r,bindings:(0,n.bindingsToString)(e)}))):l.emit("error",r)}r()},autoStart:!1});return{type:"bindings",bindingsStream:l,metadata:o.metadata}}}t.ActorQueryOperationFilter=o},74578:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(64452),t)},71819:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationFromQuad=void 0;const n=r(59510),i=r(31578);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"from")}static copyOperation(e,t){const r={};for(const n of Object.keys(e))Array.isArray(e[n])&&"template"!==n?r[n]="variables"===n?e[n]:e[n].map(t):a.ALGEBRA_TYPES.includes(e[n].type)?r[n]=t(e[n]):r[n]=e[n];return r}static applyOperationDefaultGraph(e,t){if("bgp"===e.type&&e.patterns.length>0||"path"===e.type||"pattern"===e.type){if("bgp"===e.type)return a.joinOperations(e.patterns.map((e=>{if("DefaultGraph"!==e.graph.termType)return a.FACTORY.createBgp([e]);const r=t.map((t=>a.FACTORY.createBgp([Object.assign(a.FACTORY.createPattern(e.subject,e.predicate,e.object,t),{metadata:e.metadata})])));return a.unionOperations(r)})));if("DefaultGraph"!==e.graph.termType)return e;const r=t.map((t=>"path"===e.type?a.FACTORY.createPath(e.subject,e.predicate,e.object,t):Object.assign(a.FACTORY.createPattern(e.subject,e.predicate,e.object,t),{metadata:e.metadata})));return a.unionOperations(r)}return a.copyOperation(e,(e=>this.applyOperationDefaultGraph(e,t)))}static applyOperationNamedGraph(e,t,r){if("bgp"===e.type&&e.patterns.length>0||"path"===e.type||"pattern"===e.type){const n="bgp"===e.type?e.patterns[0].graph:e.graph;if("DefaultGraph"===n.termType)return{type:i.Algebra.types.BGP,patterns:[]};if("Variable"===n.termType){if(1===t.length){const r=t[0],i={};i[`?${n.value}`]=r;const o=a.FACTORY.createValues([n],[i]);let s;return s="bgp"===e.type?a.FACTORY.createBgp(e.patterns.map((e=>a.FACTORY.createPattern(e.subject,e.predicate,e.object,r)))):"path"===e.type?a.FACTORY.createPath(e.subject,e.predicate,e.object,r):a.FACTORY.createPattern(e.subject,e.predicate,e.object,r),a.FACTORY.createJoin([o,s])}return a.unionOperations(t.map((t=>a.applyOperationNamedGraph(e,[t],r))))}return[...t,...r].some((e=>e.equals(n)))?e:{type:i.Algebra.types.BGP,patterns:[]}}return a.copyOperation(e,(e=>this.applyOperationNamedGraph(e,t,r)))}static joinOperations(e){if(1===e.length)return e[0];if(e.length>1)return a.FACTORY.createJoin(e);throw new Error("A join can only be applied on at least one operation")}static unionOperations(e){if(1===e.length)return e[0];if(e.length>1)return a.FACTORY.createUnion(e);throw new Error("A union can only be applied on at least one operation")}static createOperation(e){let t=e.input;return e.default.length>0&&(t=a.applyOperationDefaultGraph(t,e.default)),(e.named.length>0||e.default.length>0)&&(t=a.applyOperationNamedGraph(t,e.named,e.default)),t}async testOperation(e,t){return!0}async runOperation(e,t){const r=a.createOperation(e);return this.mediatorQueryOperation.mediate({operation:r,context:t})}}t.ActorQueryOperationFromQuad=a,a.FACTORY=new i.Factory,a.ALGEBRA_TYPES=Object.keys(i.Algebra.types).map((e=>i.Algebra.types[e]))},37572:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(71819),t)},39712:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationGroup=void 0;const n=r(91674),i=r(59510),a=r(61621),o=r(76664),s=r(50626);class c extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"group")}async testOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);for(const n of e.aggregates)new a.AsyncEvaluator(n.expression,i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r));return!0}async runOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),{hashFunction:a}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:t}),{input:c,aggregates:u}=e,l=await this.mediatorQueryOperation.mediate({operation:c,context:t}),d=i.ActorQueryOperation.getSafeBindings(l),h=[...e.variables,...u.map((e=>e.variable))],p=i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r);return{type:"bindings",bindingsStream:new o.TransformIterator((()=>new Promise(((t,n)=>{const i=new s.GroupsState(a,e,p,r);d.bindingsStream.on("end",(async()=>{try{const e=new o.ArrayIterator(await i.collectResults(),{autoStart:!1});t(e)}catch(e){n(e)}})),d.bindingsStream.on("error",n),d.bindingsStream.on("data",(e=>{i.consumeBindings(e).catch(n)}))}))),{autoStart:!1}),metadata:async()=>({...await d.metadata(),variables:h})}}}t.ActorQueryOperationGroup=c},50626:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupsState=void 0;const n=r(61621),i=new(r(18050).DataFactory);t.GroupsState=class{constructor(e,t,r,n){this.hashFunction=e,this.pattern=t,this.sparqleeConfig=r,this.bindingsFactory=n,this.groups=new Map,this.groupsInitializer=new Map,this.groupVariables=new Set(this.pattern.variables.map((e=>e.value))),this.distinctHashes=t.aggregates.some((({distinct:e})=>e))?new Map:null,this.waitCounter=1,this.resultHasBeenCalled=!1}consumeBindings(e){const t=this.resultCheck();if(t)return t;this.waitCounter++;const r=e.filter(((e,t)=>this.groupVariables.has(t.value))),i=this.hashBindings(r);let a,o=this.groupsInitializer.get(i);if(o){const t=o;a=(async()=>{const r=await t;await Promise.all(this.pattern.aggregates.map((async t=>{if(t.distinct){const t=this.hashBindings(e);if(this.distinctHashes.get(i).has(t))return;this.distinctHashes.get(i).add(t)}const n=t.variable.value;await r.aggregators[n].put(e)})))})().then((async()=>{this.subtractWaitCounterAndCollect()}))}else o=(async()=>{const t={};if(await Promise.all(this.pattern.aggregates.map((async r=>{const i=r.variable.value;t[i]=new n.AsyncAggregateEvaluator(r,this.sparqleeConfig),await t[i].put(e)}))),this.distinctHashes){const t=this.hashBindings(e);this.distinctHashes.set(i,new Set([t]))}const a={aggregators:t,bindings:r};return this.groups.set(i,a),this.subtractWaitCounterAndCollect(),a})(),this.groupsInitializer.set(i,o),a=o;return a}subtractWaitCounterAndCollect(){0==--this.waitCounter&&this.handleResultCollection()}handleResultCollection(){let e=[...this.groups].map((([e,t])=>{const{bindings:r,aggregators:n}=t;let a=r;for(const e in n){const t=n[e].result();t&&(a=a.set(i.variable(e),t))}return a}));if(0===e.length&&0===this.groupVariables.size){const t=[];for(const e of this.pattern.aggregates){const r=e.variable,i=n.AsyncAggregateEvaluator.emptyValue(e);void 0!==i&&t.push([r,i])}e=[this.bindingsFactory.bindings(t)]}this.waitResolver(e)}resultCheck(){if(this.resultHasBeenCalled)return Promise.reject(new Error("Calling any function after calling collectResult is invalid."))}collectResults(){const e=this.resultCheck();if(e)return e;this.resultHasBeenCalled=!0;const t=new Promise((e=>{this.waitResolver=e}));return this.subtractWaitCounterAndCollect(),t}hashBindings(e){return this.hashFunction(e)}}},47007:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(39712),t)},54052:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationJoin=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"join")}async testOperation(e,t){return!0}async runOperation(e,t){const r=(await Promise.all(e.input.map((async e=>({output:await this.mediatorQueryOperation.mediate({operation:e,context:t}),operation:e}))))).map((({output:e,operation:t})=>({output:n.ActorQueryOperation.getSafeBindings(e),operation:t})));return this.mediatorJoin.mediate({type:"inner",entries:r,context:t})}}t.ActorQueryOperationJoin=i},40980:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(54052),t)},18152:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationLeftJoin=void 0;const n=r(91674),i=r(59510),a=r(61621);class o extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"leftjoin")}async testOperation(e,t){return!0}async runOperation(e,t){const r=(await Promise.all(e.input.map((async e=>({output:await this.mediatorQueryOperation.mediate({operation:e,context:t}),operation:e}))))).map((({output:e,operation:t})=>({output:i.ActorQueryOperation.getSafeBindings(e),operation:t}))),o=await this.mediatorJoin.mediate({type:"optional",entries:r,context:t});if(e.expression){const s=(await r[1].output.metadata()).variables,c=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),u={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,c)},l=new a.AsyncEvaluator(e.expression,u),d=o.bindingsStream.transform({autoStart:!1,transform:async(e,r,n)=>{if(!s.every((t=>e.has(t.value))))return n(e),r();try{await l.evaluateAsEBV(e)&&n(e)}catch(r){(0,a.isExpressionError)(r)?this.logWarn(t,"Error occurred while filtering.",(()=>({error:r,bindings:e}))):d.emit("error",r)}r()}});o.bindingsStream=d}return o}}t.ActorQueryOperationLeftJoin=o},33149:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(18152),t)},34358:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationMinus=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"minus")}async testOperation(e,t){return!0}async runOperation(e,t){const r=(await Promise.all(e.input.map((async e=>({output:await this.mediatorQueryOperation.mediate({operation:e,context:t}),operation:e}))))).map((({output:e,operation:t})=>({output:n.ActorQueryOperation.getSafeBindings(e),operation:t})));return this.mediatorJoin.mediate({type:"minus",entries:r,context:t})}}t.ActorQueryOperationMinus=i},19948:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(34358),t)},92052:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationNop=void 0;const n=r(91674),i=r(59510),a=r(72394),o=r(76664);class s extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"nop")}async testOperation(e,t){return!0}async runOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);return{bindingsStream:new o.SingletonIterator(r.bindings()),metadata:()=>Promise.resolve({state:new a.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]}),type:"bindings"}}}t.ActorQueryOperationNop=s},35021:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(92052),t)},97236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationOrderBy=void 0;const n=r(91674),i=r(59510),a=r(61621),o=r(31578),s=r(36211);class c extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"orderby"),this.window=e.window??Number.POSITIVE_INFINITY}async testOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);for(let n of e.expressions)n=this.extractSortExpression(n),new a.AsyncEvaluator(n,i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r));return!0}async runOperation(e,t){const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t}),o=i.ActorQueryOperation.getSafeBindings(r),c={window:this.window},u=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),l={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,u)};let{bindingsStream:d}=o;for(let t=e.expressions.length-1;t>=0;t--){let r=e.expressions[t];const n=this.isAscending(r);r=this.extractSortExpression(r);const i=new a.AsyncEvaluator(r,l),o=async(e,t,r)=>{try{r({bindings:e,result:await i.evaluate(e)})}catch(t){(0,a.isExpressionError)(t)||d.emit("error",t),r({bindings:e,result:void 0})}t()},u=d.transform({transform:o}),h=new s.SortIterator(u,((e,t)=>{let r=(0,a.orderTypes)(e.result,t.result);return n||(r*=-1),r}),c);d=h.map((({bindings:e})=>e))}return{type:"bindings",bindingsStream:d,metadata:o.metadata}}extractSortExpression(e){const{expressionType:t,operator:r}=e;return t!==o.Algebra.expressionTypes.OPERATOR?e:"desc"===r?e.args[0]:e}isAscending(e){const{expressionType:t,operator:r}=e;return t!==o.Algebra.expressionTypes.OPERATOR||"desc"!==r}}t.ActorQueryOperationOrderBy=c},36211:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SortIterator=void 0;const n=r(76664);class i extends n.TransformIterator{constructor(e,t,r){super(e,r);const n=r&&r.window;this.windowLength=Number.isFinite(n)&&n>0?n:Number.POSITIVE_INFINITY,this.sort=t,this.sorted=[]}_read(e,t){let r,{length:n}=this.sorted;for(;n!==this.windowLength&&(r=this.source.read(),null!==r);){let e,t,i=0,a=n-1;for(;i<=a;)e=Math.trunc((i+a)/2),t=this.sort(r,this.sorted[e]),t<0?i=e+1:t>0?a=e-1:(i=e,a=-1);this.sorted.splice(i,0,r),n++}n===this.windowLength&&this._push(this.sorted.pop()),t()}_flush(e){let{length:t}=this.sorted;for(;t--;)this._push(this.sorted.pop());e()}}t.SortIterator=i},80797:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(97236),t)},79675:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathAlt=void 0;const n=r(43543),i=r(19779),a=r(59510),o=r(76664),s=r(31578);class c extends n.ActorAbstractPath{constructor(e){super(e,s.Algebra.types.ALT)}async runOperation(e,t){const r=e.predicate,s=(await Promise.all(r.input.map((r=>this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.subject,r,e.object,e.graph)}))))).map(a.ActorQueryOperation.getSafeBindings);return{type:"bindings",bindingsStream:new o.UnionIterator(s.map((e=>e.bindingsStream)),{autoStart:!1}),metadata:()=>Promise.all(s.map((e=>e.metadata()))).then((e=>i.ActorQueryOperationUnion.unionMetadata(e,!0,t,this.mediatorRdfMetadataAccumulate)))}}}t.ActorQueryOperationPathAlt=c},16733:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(79675),t)},21471:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathInv=void 0;const n=r(43543),i=r(31578);class a extends n.ActorAbstractPath{constructor(e){super(e,i.Algebra.types.INV)}async runOperation(e,t){const r=e.predicate,i=n.ActorAbstractPath.FACTORY.createPath(e.object,r.path,e.subject,e.graph);return this.mediatorQueryOperation.mediate({operation:i,context:t})}}t.ActorQueryOperationPathInv=a},88317:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(21471),t)},60333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathLink=void 0;const n=r(43543),i=r(31578);class a extends n.ActorAbstractPath{constructor(e){super(e,i.Algebra.types.LINK)}async runOperation(e,t){const r=e.predicate,i=Object.assign(n.ActorAbstractPath.FACTORY.createPattern(e.subject,r.iri,e.object,e.graph),{metadata:r.metadata});return this.mediatorQueryOperation.mediate({operation:i,context:t})}}t.ActorQueryOperationPathLink=a},91430:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(60333),t)},62203:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathNps=void 0;const n=r(43543),i=r(59510),a=r(31578);class o extends n.ActorAbstractPath{constructor(e){super(e,a.Algebra.types.NPS)}async runOperation(e,t){const r=e.predicate,a=this.generateVariable(e),o=Object.assign(n.ActorAbstractPath.FACTORY.createPattern(e.subject,a,e.object,e.graph),{metadata:r.metadata}),s=i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:o,context:t}));return{type:"bindings",bindingsStream:s.bindingsStream.map((e=>r.iris.some((t=>t.equals(e.get(a))))?null:e.delete(a))),metadata:s.metadata}}}t.ActorQueryOperationPathNps=o},56993:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(62203),t)},82265:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathOneOrMore=void 0;const n=r(43543),i=r(91674),a=r(59510),o=r(76664),s=r(31578);class c extends n.ActorAbstractPath{constructor(e){super(e,s.Algebra.types.ONE_OR_MORE_PATH)}async runOperation(e,t){const r=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,t),s=await this.isPathArbitraryLengthDistinct(t,e);if(s.operation)return s.operation;t=s.context;const c=e.predicate;if("Variable"!==e.subject.termType&&"Variable"===e.object.termType){const n=e.object,i=await this.getObjectsPredicateStarEval(e.subject,c.path,n,e.graph,t,!1,r),a="Variable"===e.graph.termType?[n,e.graph]:[n];return{type:"bindings",bindingsStream:i.bindingsStream,metadata:async()=>({...await i.metadata(),variables:a})}}if("Variable"===e.subject.termType&&"Variable"===e.object.termType){const i=n.ActorAbstractPath.FACTORY.createDistinct(n.ActorAbstractPath.FACTORY.createPath(e.subject,e.predicate.path,e.object,e.graph)),s=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:i})),u=e.subject,l=e.object,d={},h=new o.MultiTransformIterator(s.bindingsStream,{multiTransform:n=>{const i=n.get(u),a=n.get(l),s="Variable"===e.graph.termType?n.get(e.graph):e.graph;return new o.TransformIterator((async()=>{const n=new o.BufferedIterator;return await this.getSubjectAndObjectBindingsPredicateStar(u,l,i,a,c.path,s,t,d,{},n,{count:0},r),n.transform({transform(t,r,n){"Variable"===e.graph.termType&&(t=t.set(e.graph,s)),n(t),r()}})}),{maxBufferSize:128})},autoStart:!1}),p="Variable"===e.graph.termType?[u,l,e.graph]:[u,l];return{type:"bindings",bindingsStream:h,metadata:async()=>({...await s.metadata(),variables:p})}}if("Variable"===e.subject.termType&&"Variable"!==e.object.termType)return this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.object,n.ActorAbstractPath.FACTORY.createOneOrMorePath(n.ActorAbstractPath.FACTORY.createInv(c.path)),e.subject,e.graph)});const u=this.generateVariable(),l=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.subject,c,u,e.graph)}));return{type:"bindings",bindingsStream:l.bindingsStream.transform({filter:t=>e.object.equals(t.get(u)),transform(t,n,i){i("Variable"===e.graph.termType?r.bindings([[e.graph,t.get(e.graph)]]):r.bindings()),n()}}),metadata:async()=>({...await l.metadata(),variables:"Variable"===e.graph.termType?[e.graph]:[]})}}}t.ActorQueryOperationPathOneOrMore=c},90658:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(82265),t)},64747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathSeq=void 0;const n=r(43543),i=r(59510),a=r(31578);class o extends n.ActorAbstractPath{constructor(e){super(e,a.Algebra.types.SEQ)}async runOperation(e,t){const r=e.predicate;let a=e.subject;const o=[],s=await Promise.all(r.input.map(((i,s)=>{const c=s===r.input.length-1?e.object:this.generateVariable(e,`b${s}`),u=n.ActorAbstractPath.FACTORY.createPath(a,i,c,e.graph),l=this.mediatorQueryOperation.mediate({context:t,operation:u});return a=c,s({output:i.ActorQueryOperation.getSafeBindings(await e),operation:t})))),c=i.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:"inner",entries:s,context:t}));return{type:"bindings",bindingsStream:c.bindingsStream.transform({transform(e,t,r){for(const t of o)e=e.delete(t);r(e),t()}}),async metadata(){const e=await c.metadata(),t=e.variables.filter((e=>!o.some((t=>t.value===e.value))));return{...e,variables:t}}}}}t.ActorQueryOperationPathSeq=o},28261:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(64747),t)},68037:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathZeroOrMore=void 0;const n=r(43543),i=r(91674),a=r(59510),o=r(76664),s=r(22112),c=r(31578);class u extends n.ActorAbstractPath{constructor(e){super(e,c.Algebra.types.ZERO_OR_MORE_PATH)}async runOperation(e,t){const r=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,t),c=await this.isPathArbitraryLengthDistinct(t,e);if(c.operation)return c.operation;t=c.context;const u=e.predicate,l=this.getPathSources(u),d="Variable"===e.subject.termType,h="Variable"===e.object.termType;if("Variable"===e.subject.termType&&"Variable"===e.object.termType){const i=this.generateVariable(e),c=this.assignPatternSources(n.ActorAbstractPath.FACTORY.createPattern(e.subject,i,e.object,e.graph),l),d=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:c})),h=e.subject,p=e.object,f=new Set,y={},g=new o.MultiTransformIterator(d.bindingsStream,{multiTransform:n=>{const i=n.get(h),a=n.get(p),c="Variable"===e.graph.termType?n.get(e.graph):e.graph,l=(0,s.termToString)(i)+(0,s.termToString)(c),d=(0,s.termToString)(a)+(0,s.termToString)(c);return new o.TransformIterator((async()=>{if(f.has(l)&&f.has(d))return new o.EmptyIterator;const n=new o.BufferedIterator,s={count:0};return f.has(l)||(f.add(l),await this.getSubjectAndObjectBindingsPredicateStar(h,p,i,i,u.path,c,t,y,{},n,s,r)),f.has(d)||(f.add(d),await this.getSubjectAndObjectBindingsPredicateStar(h,p,a,a,u.path,c,t,y,{},n,s,r)),n.transform({transform(t,r,n){"Variable"===e.graph.termType&&(t=t.set(e.graph,c)),n(t),r()}})}))}}),m="Variable"===e.graph.termType?[h,e.object,e.graph]:[h,e.object];return{type:"bindings",bindingsStream:g,metadata:async()=>({...await d.metadata(),variables:m})}}if(!d&&!h){const n=this.generateVariable(),i=await this.getObjectsPredicateStarEval(e.subject,u.path,n,e.graph,t,!0,r);return{type:"bindings",bindingsStream:i.bindingsStream.transform({filter:t=>e.object.equals(t.get(n)),transform(t,n,i){i("Variable"===e.graph.termType?r.bindings([[e.graph,t.get(e.graph)]]):r.bindings()),n()}}),metadata:async()=>({...await i.metadata(),variables:"Variable"===e.graph.termType?[e.graph]:[]})}}const p=d?e.object:e.subject,f=d?e.subject:e.object,y=d?n.ActorAbstractPath.FACTORY.createInv(u.path):u.path,g=await this.getObjectsPredicateStarEval(p,y,f,e.graph,t,!0,r),m="Variable"===e.graph.termType?[f,e.graph]:[f];return{type:"bindings",bindingsStream:g.bindingsStream,metadata:async()=>({...await g.metadata(),variables:m})}}}t.ActorQueryOperationPathZeroOrMore=u},60436:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(68037),t)},81231:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathZeroOrOne=void 0;const n=r(43543),i=r(91674),a=r(59510),o=r(72394),s=r(76664),c=r(31578);class u extends n.ActorAbstractPath{constructor(e){super(e,c.Algebra.types.ZERO_OR_ONE_PATH)}async runOperation(e,t){const r=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,t),c=e.predicate,u=this.getPathSources(c),l=[];if("Variable"!==e.subject.termType&&"Variable"!==e.object.termType&&e.subject.equals(e.object))return{type:"bindings",bindingsStream:new s.SingletonIterator(r.bindings()),metadata:()=>Promise.resolve({state:new o.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]})};const d=await this.isPathArbitraryLengthDistinct(t,e);if(d.operation)return d.operation;t=d.context;const h=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.subject,c.path,e.object,e.graph)}));let p;if("Variable"===e.subject.termType&&"Variable"===e.object.termType){const r=this.generateVariable(e),i=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createFilter(this.assignPatternSources(n.ActorAbstractPath.FACTORY.createPattern(e.subject,r,e.object,e.graph),u),n.ActorAbstractPath.FACTORY.createOperatorExpression("=",[n.ActorAbstractPath.FACTORY.createTermExpression(e.subject),n.ActorAbstractPath.FACTORY.createTermExpression(e.object)]))})).bindingsStream.map((e=>e.delete(r)));p=new s.UnionIterator([i,h.bindingsStream],{autoStart:!1})}else"Variable"===e.subject.termType&&l.push(r.bindings([[e.subject,e.object]])),"Variable"===e.object.termType&&l.push(r.bindings([[e.object,e.subject]])),p=h.bindingsStream.prepend(l);return{type:"bindings",bindingsStream:p,metadata:h.metadata}}}t.ActorQueryOperationPathZeroOrOne=u},32091:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(81231),t)},1892:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationProject=void 0;const n=r(59510),i=r(85156),a=new(r(18050).DataFactory);class o extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"project")}async testOperation(e,t){return!0}async runOperation(e,t){const r=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:t})),o=await r.metadata(),s=e.variables,c=o.variables.filter((e=>!s.some((t=>e.value===t.value)))),u=s.filter((e=>!o.variables.some((t=>e.value===t.value))));if(u.length>0)throw new Error(`Variables '${u.map((e=>`?${e.value}`))}' are used in the projection result, but are not assigned.`);let l=0===c.length?r.bindingsStream:r.bindingsStream.map((e=>{for(const t of c)e=e.delete(t);return e})),d=0;return l=l.map((e=>{d++;const t=new Map;return e.map((e=>{if(e instanceof i.BlankNodeBindingsScoped){let r=t.get(e.value);return r||(r=a.blankNode(`${e.value}${d}`),t.set(e.value,r)),r}return e}))})),{type:"bindings",bindingsStream:l,metadata:async()=>({...o,variables:s})}}}t.ActorQueryOperationProject=o},98893:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(1892),t)},17015:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationReducedHash=void 0;const n=r(59510),i=r(35069);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"reduced")}async testOperation(e,t){return!0}async runOperation(e,t){const r=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:t}));return{type:"bindings",bindingsStream:r.bindingsStream.filter(await this.newHashFilter(t)),metadata:r.metadata}}async newHashFilter(e){const{hashFunction:t}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:e}),r=new i.LRUCache({max:this.cacheSize});return e=>{const n=t(e);return!r.has(n)&&(r.set(n,!0),!0)}}}t.ActorQueryOperationReducedHash=a},16909:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(17015),t)},45152:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationService=void 0;const n=r(91674),i=r(59510),a=r(72394),o=r(76664);class s extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"service")}async testOperation(e,t){if("NamedNode"!==e.name.termType)throw new Error(`${this.name} can only query services by IRI, while a ${e.name.termType} was given.`);return!0}async runOperation(e,t){const{querySource:r}=await this.mediatorQuerySourceIdentify.mediate({querySourceUnidentified:{value:e.name.value,type:this.forceSparqlEndpoint?"sparql":void 0},context:t});let s;try{s=i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:i.ActorQueryOperation.assignOperationSource(e.input,r),context:t}))}catch(r){if(!e.silent)throw r;{const e=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);s={bindingsStream:new o.SingletonIterator(e.bindings()),type:"bindings",metadata:async()=>({state:new a.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]})},this.logWarn(t,`An error occurred when executing a SERVICE clause: ${r.message}`)}}return s}}t.ActorQueryOperationService=s},89375:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(45152),t)},28746:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationSlice=void 0;const n=r(59510),i=r(32227);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"slice")}async testOperation(e,t){return!0}async runOperation(e,t){e.length&&(t=t.set(i.KeysQueryOperation.limitIndicator,e.length));const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t});if("bindings"===r.type)return{type:"bindings",bindingsStream:this.sliceStream(r.bindingsStream,e),metadata:this.sliceMetadata(r,e)};if("quads"===r.type)return{type:"quads",quadStream:this.sliceStream(r.quadStream,e),metadata:this.sliceMetadata(r,e)};throw new Error(`Invalid query output type: Expected 'bindings' or 'quads' but got '${r.type}'`)}sliceStream(e,t){const r=Boolean(t.length)||0===t.length,{start:n}=t,i=r?t.start+t.length-1:Number.POSITIVE_INFINITY;return e.transform({offset:n,limit:Math.max(i-n+1,0),autoStart:!1})}sliceMetadata(e,t){const r=Boolean(t.length)||0===t.length;return()=>e.metadata().then((e=>{const n={...e.cardinality};return Number.isFinite(n.value)&&(n.value=Math.max(0,n.value-t.start),r&&(n.value=Math.min(n.value,t.length))),{...e,cardinality:n}}))}}t.ActorQueryOperationSlice=a},14922:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(28746),t)},23920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationSource=void 0;const n=r(59510),i=r(32227),a=r(72394),o=r(31578);class s extends n.ActorQueryOperation{constructor(e){super(e)}async test(e){if(!n.ActorQueryOperation.getOperationSource(e.operation))throw new Error(`Actor ${this.name} requires an operation with source annotation.`);return{httpRequests:1}}async run(e){const t=e.context.get(i.KeysInitQuery.physicalQueryPlanLogger);t&&(t.logOperation(e.operation.type,void 0,e.operation,e.context.get(i.KeysInitQuery.physicalQueryPlanNode),this.name,{}),e.context=e.context.set(i.KeysInitQuery.physicalQueryPlanNode,e.operation));const r=n.ActorQueryOperation.getOperationSource(e.operation),s=r.context?e.context.merge(r.context):e.context;switch(e.operation.type){case o.Algebra.types.SLICE:case o.Algebra.types.CONSTRUCT:{if(e.operation.type===o.Algebra.types.SLICE&&e.operation.input.type!==o.Algebra.types.CONSTRUCT)break;const t=r.source.queryQuads(e.operation,s);return{type:"quads",quadStream:t,metadata:(0,a.getMetadataQuads)(t)}}case o.Algebra.types.ASK:return{type:"boolean",execute:()=>r.source.queryBoolean(e.operation,s)};case o.Algebra.types.COMPOSITE_UPDATE:case o.Algebra.types.DELETE_INSERT:case o.Algebra.types.LOAD:case o.Algebra.types.CLEAR:case o.Algebra.types.CREATE:case o.Algebra.types.DROP:case o.Algebra.types.ADD:case o.Algebra.types.MOVE:case o.Algebra.types.COPY:return{type:"void",execute:()=>r.source.queryVoid(e.operation,s)}}const c=r.source.queryBindings(e.operation,s);return{type:"bindings",bindingsStream:c,metadata:(0,a.getMetadataBindings)(c)}}}t.ActorQueryOperationSource=s},26933:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(23920),t)},47312:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationUnion=void 0;const n=r(59510),i=r(72394),a=r(76664),o=r(13252);class s extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"union")}static unionVariables(e){return(0,o.uniqTerms)(e.flat())}static async unionMetadata(e,t,r,n){let a=(await n.mediate({mode:"initialize",context:r})).metadata;for(const t of e)a={...t,...(await n.mediate({mode:"append",accumulatedMetadata:a,appendingMetadata:t,context:r})).metadata};a.state=new i.MetadataValidationState;const o=()=>a.state.invalidate();for(const t of e)t.state.addInvalidateListener(o);return t&&(a.variables=s.unionVariables(e.map((e=>e.variables)))),a}async testOperation(e,t){return!0}async runOperation(e,t){const r=await Promise.all(e.input.map((e=>this.mediatorQueryOperation.mediate({operation:e,context:t}))));let i;for(const e of r)if(void 0===i)i=e.type;else if(i!==e.type)throw new Error(`Unable to union ${i} and ${e.type}`);if("bindings"===i||0===e.input.length){const e=r.map(n.ActorQueryOperation.getSafeBindings);return{type:"bindings",bindingsStream:new a.UnionIterator(e.map((e=>e.bindingsStream)),{autoStart:!1}),metadata:()=>Promise.all(e.map((e=>e.metadata()))).then((e=>s.unionMetadata(e,!0,t,this.mediatorRdfMetadataAccumulate)))}}if("quads"===i){const e=r.map(n.ActorQueryOperation.getSafeQuads);return{type:"quads",quadStream:new a.UnionIterator(e.map((e=>e.quadStream)),{autoStart:!1}),metadata:()=>Promise.all(e.map((e=>e.metadata()))).then((e=>s.unionMetadata(e,!1,t,this.mediatorRdfMetadataAccumulate)))}}throw new Error(`Unable to union ${i}`)}}t.ActorQueryOperationUnion=s},19779:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(47312),t)},20808:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationClear=void 0;const n=r(59510),i=new(r(18050).DataFactory);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"clear")}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){let r;r="DEFAULT"===e.source?i.defaultGraph():"string"==typeof e.source?e.source:[e.source];const{execute:n}=await this.mediatorUpdateQuads.mediate({deleteGraphs:{graphs:r,requireExistence:!e.silent,dropGraphs:!1},context:t});return{type:"void",execute:n}}}t.ActorQueryOperationClear=a},75233:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(20808),t)},8317:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationUpdateCompositeUpdate=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"compositeupdate")}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){return{type:"void",execute:()=>(async()=>{for(const r of e.updates){const e=n.ActorQueryOperation.getSafeVoid(await this.mediatorQueryOperation.mediate({operation:r,context:t}));await e.execute()}})()}}}t.ActorQueryOperationUpdateCompositeUpdate=i},57886:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(8317),t)},74700:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationCreate=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"create")}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){const{execute:r}=await this.mediatorUpdateQuads.mediate({createGraphs:{graphs:[e.source],requireNonExistence:!e.silent},context:t});return{type:"void",execute:r}}}t.ActorQueryOperationCreate=i},14876:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(74700),t)},4853:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationUpdateDeleteInsert=void 0;const n=r(88749),i=r(91674),a=r(59510),o=r(76664);class s extends a.ActorQueryOperationTypedMediated{constructor(e){super(e,"deleteinsert"),this.blankNodeCounter=0}async testOperation(e,t){return a.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){const r=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,t),s=e.where?a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.where,context:t})).bindingsStream:new o.ArrayIterator([r.bindings()],{autoStart:!1});let c,u;e.insert&&(c=new n.BindingsToQuadsIterator(e.insert.map(n.BindingsToQuadsIterator.localizeQuad.bind(null,this.blankNodeCounter)),s.clone()),this.blankNodeCounter++),e.delete&&(u=new n.BindingsToQuadsIterator(e.delete.map(n.BindingsToQuadsIterator.localizeQuad.bind(null,this.blankNodeCounter)),s.clone()),this.blankNodeCounter++);const{execute:l}=await this.mediatorUpdateQuads.mediate({quadStreamInsert:c,quadStreamDelete:u,context:t});return{type:"void",execute:l}}}t.ActorQueryOperationUpdateDeleteInsert=s},21638:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(4853),t)},53460:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationDrop=void 0;const n=r(59510),i=new(r(18050).DataFactory);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"drop")}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){let r;r="DEFAULT"===e.source?i.defaultGraph():"string"==typeof e.source?e.source:[e.source];const{execute:n}=await this.mediatorUpdateQuads.mediate({deleteGraphs:{graphs:r,requireExistence:!e.silent,dropGraphs:!0},context:t});return{type:"void",execute:n}}}t.ActorQueryOperationDrop=a},82465:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(53460),t)},86228:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationLoad=void 0;const n=r(59510),i=r(32227),a=r(18050),o=r(31578),s=new a.DataFactory;class c extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"load"),this.factory=new o.Factory}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){let r=t;e.silent&&(r=r.set(i.KeysInitQuery.lenient,!0));const{querySource:a}=await this.mediatorQuerySourceIdentify.mediate({querySourceUnidentified:{value:e.source.value},context:r});let o=c.getSafeQuads(await this.mediatorQueryOperation.mediate({operation:this.factory.createConstruct(n.ActorQueryOperation.assignOperationSource(this.factory.createPattern(s.variable("s"),s.variable("p"),s.variable("o")),a),[this.factory.createPattern(s.variable("s"),s.variable("p"),s.variable("o"))]),context:r})).quadStream;e.destination&&(o=o.map((t=>s.quad(t.subject,t.predicate,t.object,e.destination))));const{execute:u}=await this.mediatorUpdateQuads.mediate({quadStreamInsert:o,context:t});return{type:"void",execute:u}}}t.ActorQueryOperationLoad=c},29796:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(86228),t)},48236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationValues=void 0;const n=r(91674),i=r(59510),a=r(72394),o=r(76664),s=new(r(18050).DataFactory);class c extends i.ActorQueryOperationTyped{constructor(e){super(e,"values")}async testOperation(e,t){return!0}async runOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),i=new o.ArrayIterator(e.bindings.map((e=>r.bindings(Object.entries(e).map((([e,t])=>[s.variable(e.slice(1)),t])))))),c=e.variables;return{type:"bindings",bindingsStream:i,metadata:()=>Promise.resolve({state:new a.MetadataValidationState,cardinality:{type:"exact",value:e.bindings.length},canContainUndefs:e.bindings.some((e=>c.some((t=>!(`?${t.value}`in e))))),variables:c})}}}t.ActorQueryOperationValues=c},14702:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(48236),t)},1452:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryParseGraphql=void 0;const n=r(79744),i=r(32227),a=r(1427);class o extends n.ActorQueryParse{constructor(e){super(e),this.graphqlToSparql=new a.Converter({requireContext:!0})}async test(e){if("graphql"!==e.queryFormat?.language)throw new Error("This actor can only parse GraphQL queries");return!0}async run(e){const t=e.context.get(i.KeysInitQuery.jsonLdContext)||{},r={singularizeVariables:e.context.get(i.KeysInitQuery.graphqlSingularizeVariables)};return{operation:await this.graphqlToSparql.graphqlToSparqlAlgebra(e.query,t,r)}}}t.ActorQueryParseGraphql=o},37067:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(1452),t)},6540:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryParseSparql=void 0;const n=r(79744),i=r(31578),a=r(55403);class o extends n.ActorQueryParse{constructor(e){super(e),this.prefixes=Object.freeze(this.prefixes)}async test(e){if(e.queryFormat&&"sparql"!==e.queryFormat.language)throw new Error("This actor can only parse SPARQL queries");return!0}async run(e){const t=new a.Parser({prefixes:this.prefixes,baseIRI:e.baseIRI,sparqlStar:!0}).parse(e.query);return{baseIRI:"query"===t.type?t.base:void 0,operation:(0,i.translate)(t,{quads:!0,prefixes:this.prefixes,blankToVariable:!0,baseIRI:e.baseIRI})}}}t.ActorQueryParseSparql=o},4911:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(6540),t)},27007:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcessExplainLogical=void 0;const n=r(59946),i=r(32227),a=r(34368);class o extends n.ActorQueryProcess{constructor(e){super(e)}async test(e){if("logical"!==(e.context.get(i.KeysInitQuery.explain)||e.context.get(new a.ActionContextKey("explain"))))throw new Error(`${this.name} can only explain in 'logical' mode.`);return!0}async run(e){let{operation:t,context:r}=await this.queryProcessor.parse(e.query,e.context);return({operation:t,context:r}=await this.queryProcessor.optimize(t,r)),{result:{explain:!0,type:"logical",data:t}}}}t.ActorQueryProcessExplainLogical=o},70605:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(27007),t)},94725:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcessExplainParsed=void 0;const n=r(59946),i=r(32227),a=r(34368);class o extends n.ActorQueryProcess{constructor(e){super(e)}async test(e){if("parsed"!==(e.context.get(i.KeysInitQuery.explain)||e.context.get(new a.ActionContextKey("explain"))))throw new Error(`${this.name} can only explain in 'parsed' mode.`);return!0}async run(e){const{operation:t}=await this.queryProcessor.parse(e.query,e.context);return{result:{explain:!0,type:"parsed",data:t}}}}t.ActorQueryProcessExplainParsed=o},68383:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(94725),t)},25441:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcessExplainPhysical=void 0;const n=r(59946),i=r(32227),a=r(34368),o=r(16402);class s extends n.ActorQueryProcess{constructor(e){super(e)}async test(e){const t=e.context.get(i.KeysInitQuery.explain)||e.context.get(new a.ActionContextKey("explain"));if("physical"!==t&&"physical-json"!==t)throw new Error(`${this.name} can only explain in 'physical' or 'physical-json' mode.`);return!0}async run(e){let{operation:t,context:r}=await this.queryProcessor.parse(e.query,e.context);({operation:t,context:r}=await this.queryProcessor.optimize(t,r));const n=new o.MemoryPhysicalQueryPlanLogger;r=r.set(i.KeysInitQuery.physicalQueryPlanLogger,n);const s=await this.queryProcessor.evaluate(t,r);switch(s.type){case"bindings":await s.bindingsStream.toArray();break;case"quads":await s.quadStream.toArray();break;case"boolean":case"void":await s.execute()}const c=e.context.get(i.KeysInitQuery.explain)??e.context.getSafe(new a.ActionContextKey("explain"));return{result:{explain:!0,type:c,data:"physical"===c?n.toCompactString():n.toJson()}}}}t.ActorQueryProcessExplainPhysical=s},16402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numberToString=t.MemoryPhysicalQueryPlanLogger=void 0;const n=r(22112);function i(e){return e.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:3})}t.MemoryPhysicalQueryPlanLogger=class{constructor(){this.planNodes=new Map}logOperation(e,t,r,n,i,a){const o={actor:i,logicalOperator:e,physicalOperator:t,rawNode:r,children:[],metadata:a};if(this.planNodes.set(r,o),this.rootNode){if(!n)throw new Error("Detected more than one parent-less node");const e=this.planNodes.get(n);if(!e)throw new Error("Could not find parent node");e.children.push(o)}else{if(n)throw new Error("No root node has been set yet, while a parent is being referenced");this.rootNode=o}}stashChildren(e,t){const r=this.planNodes.get(e);if(!r)throw new Error("Could not find plan node");r.children=t?r.children.filter(t):[]}unstashChild(e,t){const r=this.planNodes.get(e);if(r){const e=this.planNodes.get(t);if(!e)throw new Error("Could not find plan parent node");e.children.push(r)}}appendMetadata(e,t){const r=this.planNodes.get(e);r&&(r.metadata={...r.metadata,...t})}toJson(){return this.rootNode?this.planNodeToJson(this.rootNode):{}}planNodeToJson(e){const t={logical:e.logicalOperator,physical:e.physicalOperator,...this.getLogicalMetadata(e.rawNode),...this.compactMetadata(e.metadata)};if(e.children.length>0&&(t.children=e.children.map((e=>this.planNodeToJson(e)))),"bind"===t.physical&&t.children){const e={};for(const r of t.children){const t=r.children?.at(-1)??r,n=this.getPlanHash(t).join(",");e[n]||(e[n]=[]),e[n].push(r)}const r=[];for(const t of Object.values(e))r.push({occurrences:t.length,firstOccurrence:t[0]});t.childrenCompact=r,delete t.children}return t}getPlanHash(e){let t=[`${e.logical}-${e.physical}`];return e.children?t=[...t,...e.children.flatMap((e=>this.getPlanHash(e)))]:e.childrenCompact&&(t=[...t,...e.childrenCompact.flatMap((e=>this.getPlanHash(e.firstOccurrence)))]),t}compactMetadata(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,this.compactMetadataValue(t)])))}compactMetadataValue(e){return e&&"object"==typeof e&&"termType"in e?this.getLogicalMetadata(e):e}getLogicalMetadata(e){const t={};if("type"in e){const r=e;switch(r.metadata?.scopedSource&&(t.source=r.metadata.scopedSource.source.toString()),r.type){case"pattern":t.pattern=this.quadToString(r);break;case"project":t.variables=r.variables.map((e=>e.value))}}return t}quadToString(e){return`${(0,n.termToString)(e.subject)} ${(0,n.termToString)(e.predicate)} ${(0,n.termToString)(e.object)}${"DefaultGraph"===e.graph.termType?"":` ${(0,n.termToString)(e.graph)}`}`}toCompactString(){const e=this.toJson(),t=[],r=new Map;if("logical"in e?this.nodeToCompactString(t,r,"",e):t.push("Empty"),r.size>0){t.push(""),t.push("sources:");for(const[e,n]of r.entries())t.push(` ${n}: ${e}`)}return t.join("\n")}nodeToCompactString(e,t,r,n,a){let o;n.source&&(o=t.get(n.source),void 0===o&&(o=t.size,t.set(n.source,o))),e.push(`${r}${n.logical}${n.physical?`(${n.physical})`:""}${n.pattern?` (${n.pattern})`:""}${n.variables?` (${n.variables.join(",")})`:""}${n.bindOperation?` bindOperation:(${n.bindOperation.pattern}) bindCardEst:${"estimate"===n.bindOperationCardinality.type?"~":""}${i(n.bindOperationCardinality.value)}`:""}${n.cardinality?` cardEst:${"estimate"===n.cardinality.type?"~":""}${i(n.cardinality.value)}`:""}${n.source?` src:${o}`:""}${n.cardinalityReal?` cardReal:${n.cardinalityReal}`:""}${n.timeSelf?` timeSelf:${i(n.timeSelf)}ms`:""}${n.timeLife?` timeLife:${i(n.timeLife)}ms`:""}${a?` ${a}`:""}`);for(const i of n.children??[])this.nodeToCompactString(e,t,`${r} `,i);for(const i of n.childrenCompact??[])this.nodeToCompactString(e,t,`${r} `,i.firstOccurrence,`compacted-occurrences:${i.occurrences}`)}},t.numberToString=i},54395:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(25441),t),i(r(16402),t)},47604:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcessSequential=void 0;const n=r(91674),i=r(59510),a=r(59946),o=r(32227),s=r(34368);class c extends a.ActorQueryProcess{constructor(e){super(e)}async test(e){if(e.context.get(o.KeysInitQuery.explain)||e.context.get(new s.ActionContextKey("explain")))throw new Error(`${this.name} is not able to explain queries.`);return!0}async run(e){let{operation:t,context:r}=await this.parse(e.query,e.context);return({operation:t,context:r}=await this.optimize(t,r)),{result:await this.evaluate(t,r)}}async parse(e,t){let r;if(t=(await this.mediatorContextPreprocess.mediate({context:t,initialize:!0})).context,"string"==typeof e){const n=(t=t.set(o.KeysInitQuery.queryString,e)).get(o.KeysInitQuery.baseIRI),i=t.get(o.KeysInitQuery.queryFormat),a=await this.mediatorQueryParse.mediate({context:t,query:e,queryFormat:i,baseIRI:n});r=a.operation,a.baseIRI&&(t=t.set(o.KeysInitQuery.baseIRI,a.baseIRI))}else r=e;if(t.has(o.KeysInitQuery.initialBindings)){const e=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);r=(0,i.materializeOperation)(r,t.get(o.KeysInitQuery.initialBindings),e),t=t.delete(o.KeysInitQuery.queryString)}return{operation:r,context:t}}async optimize(e,t){return t=t.set(o.KeysInitQuery.query,e),({operation:e,context:t}=await this.mediatorOptimizeQueryOperation.mediate({context:t,operation:e})),{operation:e,context:t=t.set(o.KeysInitQuery.query,e)}}async evaluate(e,t){const r=await this.mediatorQueryOperation.mediate({context:t,operation:e});return r.context=t,r}}t.ActorQueryProcessSequential=c},94739:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(47604),t)},45369:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeJson=void 0;const n=r(22083),i=r(76664),a=r(22112),o=r(58521);class s extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}async testHandleChecked(e,t){if(!["bindings","quads","boolean"].includes(e.type))throw new Error("This actor can only handle bindings or quad streams.");return!0}async runHandle(e,t,r){const n=new o.Readable;if(n._read=()=>{},"bindings"===e.type||"quads"===e.type){let t="bindings"===e.type?(0,i.wrap)(e.bindingsStream).map((e=>JSON.stringify(Object.fromEntries([...e].map((([e,t])=>[e.value,a.termToString(t)])))))):(0,i.wrap)(e.quadStream).map((e=>JSON.stringify(a.quadToStringQuad(e)))),r=!0;t=t.map((e=>{const t=`${r?"":","}\n${e}`;return r=!1,t})).prepend(["["]).append(["\n]\n"]),n.wrap(t)}else try{n.push(`${JSON.stringify(await e.execute())}\n`),n.push(null)}catch(e){setTimeout((()=>n.emit("error",e)))}return{data:n}}}t.ActorQueryResultSerializeJson=s},91875:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(45369),t)},2703:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeRdf=void 0;const n=r(22083);class i extends n.ActorQueryResultSerialize{constructor(e){super(e)}async testHandle(e,t,r){if("quads"!==e.type)throw new Error(`Actor ${this.name} can only handle quad streams`);const{mediaTypes:n}=await this.mediatorMediaTypeCombiner.mediate({context:r,mediaTypes:!0});if(!(t in n))throw new Error(`Actor ${this.name} can not handle media type ${t}. All available types: ${Object.keys(n)}`);return!0}async runHandle(e,t,r){return(await this.mediatorRdfSerialize.mediate({context:r,handle:{context:r,quadStream:e.quadStream},handleMediaType:t})).handle}async testMediaType(e){return!0}async getMediaTypes(e){return(await this.mediatorMediaTypeCombiner.mediate({context:e,mediaTypes:!0})).mediaTypes}async testMediaTypeFormats(e){return!0}async getMediaTypeFormats(e){return(await this.mediatorMediaTypeFormatCombiner.mediate({context:e,mediaTypeFormats:!0})).mediaTypeFormats}}t.ActorQueryResultSerializeRdf=i},63543:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(2703),t)},6301:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSimple=void 0;const n=r(22083),i=r(76664),a=r(22112),o=r(58521);class s extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}async testHandleChecked(e,t){if(!["bindings","quads","boolean","void"].includes(e.type))throw new Error("This actor can only handle bindings streams, quad streams, booleans, or updates.");return!0}static termToString(e){return"Quad"===e.termType?(0,a.termToString)(e):e.value}async runHandle(e,t,r){const n=new o.Readable;return"bindings"===e.type?n.wrap(e.bindingsStream.map((e=>`${[...e].map((([e,t])=>`?${e.value}: ${s.termToString(t)}`)).join("\n")}\n\n`))):"quads"===e.type?n.wrap(e.quadStream.map((e=>`subject: ${s.termToString(e.subject)}\npredicate: ${s.termToString(e.predicate)}\nobject: ${s.termToString(e.object)}\ngraph: ${s.termToString(e.graph)}\n\n`))):n.wrap((0,i.wrap)("boolean"===e.type?e.execute().then((e=>[`${e}\n`])):e.execute().then((()=>["ok\n"])))),{data:n}}}t.ActorQueryResultSerializeSimple=s},96791:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(6301),t)},54438:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSparqlCsv=void 0;const n=r(22083),i=r(58521);class a extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToCsvBindings(e){if(!e)return"";let t=e.value;if("Literal"===e.termType)t=`${t}`;else if("BlankNode"===e.termType)t=`_:${t}`;else if("Quad"===e.termType){let r=a.bindingToCsvBindings(e.object);"Literal"===e.object.termType&&(r=`"${r.replaceAll('"','""')}"`),t=`<< ${a.bindingToCsvBindings(e.subject)} ${a.bindingToCsvBindings(e.predicate)} ${r} >>`}else t=`<${t}>`;return/[",\n\r]/u.test(t)&&(t=`"${t.replaceAll('"','""')}"`),t}async testHandleChecked(e,t){if("bindings"!==e.type)throw new Error("This actor can only handle bindings streams.");return!0}async runHandle(e,t,r){const n=e,o=new i.Readable,s=await n.metadata();return o.push(`${s.variables.map((e=>e.value)).join(",")}\r\n`),o.wrap(n.bindingsStream.map((e=>`${s.variables.map((t=>a.bindingToCsvBindings(e.get(t)))).join(",")}\r\n`))),{data:o}}}t.ActorQueryResultSerializeSparqlCsv=a},34357:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(54438),t)},21437:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionObserverHttp=void 0;const n=r(34368);class i extends n.ActionObserver{constructor(e){super(e),this.requests=0,this.bus.subscribeObserver(this),this.httpInvalidator.addInvalidateListener((()=>{this.requests=0}))}onRun(e,t,r){this.requests++}}t.ActionObserverHttp=i},47670:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSparqlJson=void 0;const n=r(22083),i=r(76664),a=r(58521);class o extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToJsonBindings(e){if("Literal"===e.termType){const t=e,r={value:t.value,type:"literal"},{language:n,datatype:i}=t;return n?r["xml:lang"]=n:i&&"http://www.w3.org/2001/XMLSchema#string"!==i.value&&(r.datatype=i.value),r}return"BlankNode"===e.termType?{value:e.value,type:"bnode"}:"Quad"===e.termType?{value:{subject:o.bindingToJsonBindings(e.subject),predicate:o.bindingToJsonBindings(e.predicate),object:o.bindingToJsonBindings(e.object)},type:"triple"}:{value:e.value,type:"uri"}}async testHandleChecked(e,t){if(!["bindings","boolean"].includes(e.type))throw new Error("This actor can only handle bindings streams or booleans.");return!0}async runHandle(e,t,r){const n=new a.Readable,s={};if("bindings"===e.type){const c=await e.metadata();c.variables.length>0&&(s.vars=c.variables.map((e=>e.value)))}if(n.push(`{"head": ${JSON.stringify(s)},\n`),"bindings"===e.type){const u=e.bindingsStream;n.push('"results": { "bindings": [\n');let l=!0;function*d(e){yield e()}n.wrap((0,i.wrap)(u).map((e=>{const t=`${l?"":",\n"}${JSON.stringify(Object.fromEntries([...e].map((([e,t])=>[e.value,o.bindingToJsonBindings(t)]))))}`;return l=!1,t})).append((0,i.wrap)(d((()=>`\n]}${this.emitMetadata?`,\n"metadata": { "httpRequests": ${this.httpObserver.requests} }`:""}}\n`)))))}else n.wrap((0,i.wrap)(e.execute().then((e=>[`"boolean":${e}\n}\n`]))));return{data:n}}}t.ActorQueryResultSerializeSparqlJson=o},34593:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(21437),t),i(r(47670),t)},60096:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSparqlTsv=void 0;const n=r(22083),i=r(64817),a=r(58521);class o extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToTsvBindings(e){return e?(0,i.termToString)(e).replaceAll("\t","\\t").replaceAll("\n","\\n").replaceAll("\r","\\r"):""}async testHandleChecked(e,t){if("bindings"!==e.type)throw new Error("This actor can only handle bindings streams.");return!0}async runHandle(e,t,r){const n=e,i=new a.Readable,s=await n.metadata();return i.push(`${s.variables.map((e=>e.value)).join("\t")}\n`),i.wrap(n.bindingsStream.map((e=>`${s.variables.map((t=>o.bindingToTsvBindings(e.get(t)))).join("\t")}\n`))),{data:i}}}t.ActorQueryResultSerializeSparqlTsv=o},78432:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(60096),t)},83668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSparqlXml=void 0;const n=r(22083),i=r(76664),a=r(58521),o=r(72825);class s extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToXmlBindings(e,t){return{name:"binding",attributes:{name:t.value},children:[this.valueToXmlValue(e)]}}static valueToXmlValue(e){let t;switch(e.termType){case"Literal":return t=e.language?{"xml:lang":e.language}:e.datatype&&"http://www.w3.org/2001/XMLSchema#string"!==e.datatype.value?{datatype:e.datatype.value}:{},{name:"literal",attributes:t,children:e.value};case"BlankNode":return{name:"bnode",children:e.value};case"Quad":return{name:"triple",children:[{name:"subject",children:[this.valueToXmlValue(e.subject)]},{name:"predicate",children:[this.valueToXmlValue(e.predicate)]},{name:"object",children:[this.valueToXmlValue(e.object)]}]};default:return{name:"uri",children:e.value}}}async testHandleChecked(e,t){if(!["bindings","boolean"].includes(e.type))throw new Error("This actor can only handle bindings streams or booleans.");return!0}async runHandle(e,t,r){const n=new a.Readable;n._read=()=>{};const c=new o.XmlSerializer,u=await e.metadata();if(n.push(o.XmlSerializer.header),n.push(c.open("sparql",{xmlns:"http://www.w3.org/2005/sparql-results#"})),n.push(c.serializeNode({name:"head",children:u.variables.map((e=>({name:"variable",attributes:{name:e.value}})))})),"bindings"===e.type){function*l(){yield c.close(),yield c.close()}n.push(c.open("results"));const d=(0,i.wrap)(e.bindingsStream).map((e=>c.serializeNode({name:"result",children:[...e].map((([e,t])=>s.bindingToXmlBindings(t,e)))}))).append((0,i.wrap)(l()));n.wrap(d)}else try{const h=await e.execute();n.push(c.serializeNode({name:"boolean",children:h.toString()})),n.push(c.close()),setTimeout((()=>n.push(null)))}catch(p){setTimeout((()=>n.emit("error",p)))}return{data:n}}}t.ActorQueryResultSerializeSparqlXml=s},72825:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XmlSerializer=void 0;class r{constructor(){this.stack=[]}open(e,t){const r=`${this.identation()+this.formatTag(e,t,"open")}\n`;return this.stack.push(e),r}close(){const e=this.stack.pop();if(void 0===e)throw new Error("There is no tag left to close");return`${this.identation()+this.formatTag(e,{},"close")}\n`}serializeNode(e){if(void 0===e.children)return`${this.identation()+this.formatTag(e.name,e.attributes,"self-closing")}\n`;if("string"==typeof e.children)return`${this.identation()+this.formatTag(e.name,e.attributes,"open")+this.escape(e.children)+this.formatTag(e.name,{},"close")}\n`;const t=[];t.push(`${this.identation()+this.formatTag(e.name,e.attributes,"open")}\n`),this.stack.push(e.name);for(const r of e.children)t.push(this.serializeNode(r));return this.stack.pop(),t.push(`${this.identation()+this.formatTag(e.name,{},"close")}\n`),t.join("")}identation(){return this.stack.map((e=>" ")).join("")}formatTag(e,t,r){return`<${"close"===r?"/":""}${e}${Object.entries(t??{}).map((e=>` ${e[0]}="${this.escape(e[1])}"`))}${"self-closing"===r?"/":""}>`}escape(e){return e.replaceAll(/["&'<>]/gu,(e=>{switch(e){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return"""}}))}}t.XmlSerializer=r,r.header='\n'},68596:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(83668),t)},1990:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionObserverHttp=void 0;const n=r(34368);class i extends n.ActionObserver{constructor(e){super(e),this.requests=0,this.bus.subscribeObserver(this),this.httpInvalidator.addInvalidateListener((()=>{this.requests=0}))}onRun(e,t,r){this.requests++}}t.ActionObserverHttp=i},28541:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeStats=void 0;const n=r(22083),i=r(76664),a=r(58521),o=r(39907);class s extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}async testHandleChecked(e,t){if(!["bindings","quads"].includes(e.type))throw new Error("This actor can only handle bindings streams or quad streams.");return!0}pushHeader(e){const t=["Result","Delay (ms)","HTTP requests"].join(",");e.push(`${t}\n`)}createStat(e,t){return`${[t,this.delay(e),this.httpObserver.requests].join(",")}\n`}createFooter(e){return`${["TOTAL",this.delay(e),this.httpObserver.requests].join(",")}\n`}async runHandle(e,t,r){const n=new a.Readable,o="bindings"===e.type?e.bindingsStream:e.quadStream,s=this.now();let c=1;const u=(0,i.wrap)(o).map((()=>this.createStat(s,c++))).append((0,i.wrap)(function*(e){yield e()}((()=>this.createFooter(s)))));return this.pushHeader(n),n.wrap(u),{data:n}}now(){if("undefined"==typeof performance){const e=o.hrtime();return 1e3*e[0]+e[1]/1e6}return performance.now()}delay(e){return this.now()-e}}t.ActorQueryResultSerializeStats=s},13900:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(1990),t),i(r(28541),t)},42787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeTable=void 0;const n=r(22083),i=r(18050),a=r(22112),o=r(13252),s=r(58521),c=new i.DataFactory,u=o.QUAD_TERM_NAMES.map((e=>c.variable(e)));class l extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e),this.padding=l.repeat(" ",this.columnWidth)}static repeat(e,t){return e.repeat(t)}async testHandleChecked(e,t){if(!["bindings","quads"].includes(e.type))throw new Error("This actor can only handle bindings or quad streams.");return!0}termToString(e){return"Quad"===e.termType?(0,a.termToString)(e):e.value}pad(e){return e.length<=this.columnWidth?e+this.padding.slice(e.length):`${e.slice(0,this.columnWidth-1)}…`}pushHeader(e,t){const r=t.map((e=>this.pad(e.value))).join(" ");e.push(`${r}\n${l.repeat("-",r.length)}\n`)}createRow(e,t){return`${e.map((e=>t.has(e)?this.termToString(t.get(e)):"")).map((e=>this.pad(e))).join(" ")}\n`}async runHandle(e,t,r){const n=new s.Readable;let i;if("bindings"===e.type){i=e.bindingsStream.map((e=>this.createRow(t,e)));const t=(await e.metadata()).variables;this.pushHeader(n,t)}else i=e.quadStream.map((e=>`${(0,o.getTerms)(e).map((e=>this.pad(this.termToString(e)))).join(" ")}\n`)),this.pushHeader(n,u);return n.wrap(i),{data:n}}}t.ActorQueryResultSerializeTable=l},59655:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(42787),t)},71445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeTree=void 0;const n=r(22083),i=r(32227),a=r(34368),o=r(58521),s=r(43004);class c extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static async bindingsStreamToGraphQl(e,t,r){const n=a.ActionContext.ensureActionContext(t),o=new s.Converter(r),c={singularizeVariables:n.get(i.KeysInitQuery.graphqlSingularizeVariables)??{}};return o.bindingsToTree(await e.map((e=>Object.fromEntries([...e].map((([e,t])=>[e.value,t]))))).toArray(),c)}async testHandleChecked(e){if("bindings"!==e.type)throw new Error("This actor can only handle bindings streams.");return!0}async runHandle(e,t){const r=new o.Readable;return r._read=()=>{r._read=()=>{},c.bindingsStreamToGraphQl(e.bindingsStream,e.context,{materializeRdfJsTerms:!0}).then((e=>{r.push(JSON.stringify(e,null," ")),r.push(null)})).catch((e=>r.emit("error",e)))},{data:r}}}t.ActorQueryResultSerializeTree=c},70017:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.bindingsStreamToGraphQl=void 0;const a=r(71445),{bindingsStreamToGraphQl:o}=a.ActorQueryResultSerializeTree;t.bindingsStreamToGraphQl=o,i(r(71445),t)},33606:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermediaNone=void 0;const n=r(27474),i=r(91674),a=r(89168),o=r(10953);class s extends a.ActorQuerySourceIdentifyHypermedia{constructor(e){super(e,"file")}async testMetadata(e){return{filterFactor:0}}async run(e){this.logInfo(e.context,`Identified as file source: ${e.url}`);const t=new n.QuerySourceRdfJs(await(0,o.storeStream)(e.quads),await i.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context));return t.toString=()=>`QuerySourceRdfJs(${e.url})`,t.referenceValue=e.url,{source:t}}}t.ActorQuerySourceIdentifyHypermediaNone=s},44538:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(33606),t)},88760:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermediaQpf=void 0;const n=r(91674),i=r(89168),a=r(92591);class o extends i.ActorQuerySourceIdentifyHypermedia{constructor(e){super(e,"qpf")}async test(e){if(e.forceSourceType&&"qpf"!==e.forceSourceType&&"brtpf"!==e.forceSourceType)throw new Error(`Actor ${this.name} is not able to handle source type ${e.forceSourceType}.`);return this.testMetadata(e)}async testMetadata(e){const{searchForm:t}=await this.createSource(e.url,e.metadata,e.context,"brtpf"===e.forceSourceType);if(e.handledDatasets&&e.handledDatasets[t.dataset])throw new Error(`Actor ${this.name} can only be applied for the first page of a QPF dataset.`);return{filterFactor:1}}async run(e){this.logInfo(e.context,`Identified as qpf source: ${e.url}`);const t=await this.createSource(e.url,e.metadata,e.context,"brtpf"===e.forceSourceType,e.quads);return{source:t,dataset:t.searchForm.dataset}}async createSource(e,t,r,i,o){return new a.QuerySourceQpf(this.mediatorMetadata,this.mediatorMetadataExtract,this.mediatorDereferenceRdf,await n.BindingsFactory.create(this.mediatorMergeBindingsContext,r),this.subjectUri,this.predicateUri,this.objectUri,this.graphUri,e,t,i,o)}}t.ActorQuerySourceIdentifyHypermediaQpf=o},92591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceQpf=void 0;const n=r(65483),i=r(32227),a=r(76664),o=r(18050),s=r(22112),c=r(64817),u=r(13252),l=new(r(31578).Factory),d=new o.DataFactory;class h{constructor(e,t,r,n,i,o,s,c,u,l,h,p){this.referenceValue=u,this.mediatorMetadata=e,this.mediatorMetadataExtract=t,this.mediatorDereferenceRdf=r,this.bindingsFactory=n,this.subjectUri=i,this.predicateUri=o,this.objectUri=s,this.graphUri=c,this.url=u,this.bindingsRestricted=h,this.cachedQuads={};const f=this.getSearchForm(l);if(!f)throw new Error("Illegal state: found no TPF/QPF search form anymore in metadata.");if(this.searchForm=f,this.defaultGraph=l.defaultGraph?d.namedNode(l.defaultGraph):void 0,p){let e=(0,a.wrap)(p);this.defaultGraph&&(e=this.reverseMapQuadsToDefaultGraph(e)),e.setProperty("metadata",l),this.cacheQuads(e,d.variable(""),d.variable(""),d.variable(""),d.variable(""))}}async getSelectorShape(){return this.bindingsRestricted?h.SELECTOR_SHAPE_BR:h.SELECTOR_SHAPE}queryBindings(e,t,r){if("pattern"!==e.type)throw new Error(`Attempted to pass non-pattern operation '${e.type}' to QuerySourceQpf`);const a=Boolean(t.get(i.KeysQueryOperation.unionDefaultGraph));let o=this.match(e.subject,e.predicate,e.object,e.graph,a,t,r);return o=(0,n.filterMatchingQuotedQuads)(e,o),(0,n.quadsToBindings)(o,e,this.bindingsFactory,a)}getSearchForm(e){if(!e.searchForms||!e.searchForms.values)return;const{searchForms:t}=e;for(const e of t.values){if(this.graphUri&&this.subjectUri in e.mappings&&this.predicateUri in e.mappings&&this.objectUri in e.mappings&&this.graphUri in e.mappings&&4===Object.keys(e.mappings).length)return e;if(this.subjectUri in e.mappings&&this.predicateUri in e.mappings&&this.objectUri in e.mappings&&3===Object.keys(e.mappings).length)return e}}createFragmentUri(e,t,r,n,i){const a={},o=[{uri:this.subjectUri,term:t},{uri:this.predicateUri,term:r},{uri:this.objectUri,term:n},{uri:this.graphUri,term:i}];for(const e of o)e.uri&&(this.bindingsRestricted||"Variable"!==e.term.termType&&("Quad"!==e.term.termType||(0,u.everyTermsNested)(e.term,(e=>"Variable"!==e.termType))))&&(a[e.uri]=(0,s.termToString)(e.term));return e.getUri(a)}match(e,t,r,n,i,o,s){let c=!1;if("DefaultGraph"===n.termType)if(this.defaultGraph)c=!0,n=this.defaultGraph;else if(4!==Object.keys(this.searchForm.mappings).length||this.defaultGraph)3===Object.keys(this.searchForm.mappings).length&&(n=d.variable("g"));else{if(!i){const e=new a.ArrayIterator([],{autoStart:!1});return e.setProperty("metadata",{requestTime:0,cardinality:{type:"exact",value:0},first:null,next:null,last:null,canContainUndefs:!1}),e}n=d.variable("g")}if(!s?.filterBindings){const i=this.getCachedQuads(e,t,r,n);if(i)return i}const l=this;let h;const p=async function(){let i=l.createFragmentUri(l.searchForm,e,t,r,n);s?.filterBindings&&(i=await l.getBindingsRestrictedLink(e,t,r,n,i,s.filterBindings));const a=await l.mediatorDereferenceRdf.mediate({context:o,url:i});i=a.url;const c=await l.mediatorMetadata.mediate({context:o,url:i,quads:a.data,triples:a.metadata?.triples}),{metadata:u}=await l.mediatorMetadataExtract.mediate({context:o,url:i,metadata:c.metadata,requestTime:a.requestTime});return h.setProperty("metadata",{...u,canContainUndefs:!1,subsetOf:l.url}),c.data}();return h=new a.TransformIterator((async()=>{const i=await p,o=d.defaultGraph();let s=(0,a.wrap)(i).transform({filter:i=>!!(0,u.matchPattern)(i,e,t,r,n)||c&&(0,u.matchPattern)(i,e,t,r,o)});return(c||"Variable"===n.termType)&&(s=this.reverseMapQuadsToDefaultGraph(s)),s}),{autoStart:!1}),s?.filterBindings?h:(this.cacheQuads(h,e,t,r,n),this.getCachedQuads(e,t,r,n))}async getBindingsRestrictedLink(e,t,r,n,i,a){const o=[];for(const e of await a.bindings.toArray()){const t=["("];for(const r of a.metadata.variables){const n=e.get(r);t.push(n?(0,c.termToString)(n):"UNDEF"),t.push(" ")}t.push(")"),o.push(t.join(""))}return 0===o.length&&o.push("()"),`${i}&values=${encodeURIComponent(`(${a.metadata.variables.map((e=>`?${e.value}`)).join(" ")}) { ${o.join(" ")} }`)}`}reverseMapQuadsToDefaultGraph(e){const t=d.defaultGraph();return e.map((e=>(0,u.mapTerms)(e,((e,r)=>"graph"===r&&e.equals(this.defaultGraph)?t:e))))}getPatternId(e,t,r,n){return JSON.stringify({s:"Variable"===e.termType?"":p(e),p:"Variable"===t.termType?"":p(t),o:"Variable"===r.termType?"":p(r),g:"Variable"===n.termType?"":p(n)})}cacheQuads(e,t,r,n,i){const a=this.getPatternId(t,r,n,i);this.cachedQuads[a]=e.clone()}getCachedQuads(e,t,r,n){const i=this.getPatternId(e,t,r,n),a=this.cachedQuads[i];if(a)return a.clone()}queryQuads(e,t){throw new Error("queryQuads is not implemented in QuerySourceQpf")}queryBoolean(e,t){throw new Error("queryBoolean is not implemented in QuerySourceQpf")}queryVoid(e,t){throw new Error("queryVoid is not implemented in QuerySourceQpf")}}function p(e){return"DefaultGraph"===e.termType?"|":(0,s.termToString)(e)}t.QuerySourceQpf=h,h.SELECTOR_SHAPE={type:"operation",operation:{operationType:"pattern",pattern:l.createPattern(d.variable("s"),d.variable("p"),d.variable("o"),d.variable("g"))},variablesOptional:[d.variable("s"),d.variable("p"),d.variable("o"),d.variable("g")]},h.SELECTOR_SHAPE_BR={type:"operation",operation:{operationType:"pattern",pattern:l.createPattern(d.variable("s"),d.variable("p"),d.variable("o"),d.variable("g"))},variablesOptional:[d.variable("s"),d.variable("p"),d.variable("o"),d.variable("g")],filterBindings:!0}},52378:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(88760),t),i(r(92591),t)},480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermediaSparql=void 0;const n=r(91674),i=r(89168),a=r(99193);class o extends i.ActorQuerySourceIdentifyHypermedia{constructor(e){super(e,"sparql")}async testMetadata(e){if(!(e.forceSourceType||e.metadata.sparqlService||this.checkUrlSuffix&&e.url.endsWith("/sparql")))throw new Error(`Actor ${this.name} could not detect a SPARQL service description or URL ending on /sparql.`);return{filterFactor:1}}async run(e){return this.logInfo(e.context,`Identified ${e.url} as sparql source with service URL: ${e.metadata.sparqlService||e.url}`),{source:new a.QuerySourceSparql(e.forceSourceType?e.url:e.metadata.sparqlService||e.url,e.context,this.mediatorHttp,this.bindMethod,await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context),this.forceHttpGet,this.cacheSize,this.countTimeout)}}}t.ActorQuerySourceIdentifyHypermediaSparql=o},99193:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceSparql=void 0;const n=r(32227),i=r(76664),a=r(74190),o=r(35069),s=r(18050),c=r(31578),u=new c.Factory,l=new s.DataFactory,d=l.variable("count"),h={type:"estimate",value:Number.POSITIVE_INFINITY};class p{constructor(e,t,r,n,i,s,c,u){this.referenceValue=e,this.url=e,this.context=t,this.mediatorHttp=r,this.bindMethod=n,this.bindingsFactory=i,this.endpointFetcher=new a.SparqlEndpointFetcher({method:s?"GET":"POST",fetch:(e,t)=>this.mediatorHttp.mediate({input:e,init:t,context:this.lastSourceContext}),prefixVariableQuestionMark:!0}),this.cache=c>0?new o.LRUCache({max:c}):void 0,this.countTimeout=u}async getSelectorShape(){return p.SELECTOR_SHAPE}queryBindings(e,t,r){let a;a=r?.joinBindings?p.addBindingsToOperation(this.bindMethod,e,r.joinBindings):Promise.resolve(e);const o=new i.TransformIterator((async()=>{const e=await a,i=c.Util.inScopeVariables(e),o=t.get(n.KeysInitQuery.queryString),s=!r?.joinBindings&&o?o:p.operationToSelectQuery(e,i);return this.queryBindingsRemote(this.url,s,i,t)}),{autoStart:!1});return this.attachMetadata(o,t,a),o}queryQuads(e,t){this.lastSourceContext=this.context.merge(t);const r=this.endpointFetcher.fetchTriples(this.url,t.get(n.KeysInitQuery.queryString)??p.operationToQuery(e));this.lastSourceContext=void 0;const a=(0,i.wrap)(r,{autoStart:!1,maxBufferSize:Number.POSITIVE_INFINITY});return this.attachMetadata(a,t,Promise.resolve(e.input)),a}queryBoolean(e,t){this.lastSourceContext=this.context.merge(t);const r=this.endpointFetcher.fetchAsk(this.url,t.get(n.KeysInitQuery.queryString)??p.operationToQuery(e));return this.lastSourceContext=void 0,r}queryVoid(e,t){this.lastSourceContext=this.context.merge(t);const r=this.endpointFetcher.fetchUpdate(this.url,t.get(n.KeysInitQuery.queryString)??p.operationToQuery(e));return this.lastSourceContext=void 0,r}attachMetadata(e,t,r){let n=[];new Promise((async(e,i)=>{let a;try{const i=await r;n=c.Util.inScopeVariables(i),a=p.operationToCountQuery(i);const o=this.cache?.get(a);if(void 0!==o)return e(o);const s=setTimeout((()=>e(h)),this.countTimeout),u=await this.queryBindingsRemote(this.url,a,[d],t);u.on("data",(t=>{clearTimeout(s);const r=t.get(d),n={type:"estimate",value:Number.POSITIVE_INFINITY};if(r){const e=Number.parseInt(r.value,10);Number.isNaN(e)||(n.type="exact",n.value=e,this.cache?.set(a,n))}return e(n)})),u.on("error",(()=>{clearTimeout(s),e(h)})),u.on("end",(()=>{clearTimeout(s),e(h)}))}catch(e){return i(e)}})).then((t=>e.setProperty("metadata",{cardinality:t,canContainUndefs:!1,variables:n}))).catch((()=>e.setProperty("metadata",{cardinality:h,canContainUndefs:!1,variables:n})))}static async addBindingsToOperation(e,t,r){const n=await r.bindings.toArray();switch(e){case"values":return u.createJoin([u.createValues(r.metadata.variables,n.map((e=>Object.fromEntries([...e].map((([e,t])=>[`?${e.value}`,t])))))),t],!1);case"union":throw new Error('Not implemented yet: "union" case');case"filter":throw new Error('Not implemented yet: "filter" case')}}static operationToSelectQuery(e,t){return p.operationToQuery(u.createProject(e,t))}static operationToCountQuery(e){return p.operationToQuery(u.createProject(u.createExtend(u.createGroup(e,[],[u.createBoundAggregate(l.variable("var0"),"count",u.createWildcardExpression(),!1)]),l.variable("count"),u.createTermExpression(l.variable("var0"))),[l.variable("count")]))}static operationToQuery(e){return(0,c.toSparql)(e,{sparqlStar:!0})}async queryBindingsRemote(e,t,r,n){this.lastSourceContext=this.context.merge(n);const a=await this.endpointFetcher.fetchBindings(e,t);this.lastSourceContext=void 0;const o=(0,i.wrap)(a,{autoStart:!1,maxBufferSize:Number.POSITIVE_INFINITY}).map((t=>this.bindingsFactory.bindings(r.map((r=>{const n=t[`?${r.value}`];return n||o.emit("error",new Error(`The endpoint ${e} failed to provide a binding for ${r.value}.`)),[r,n]})))));return o}toString(){return`QuerySourceSparql(${this.url})`}}t.QuerySourceSparql=p,p.SELECTOR_SHAPE={type:"disjunction",children:[{type:"operation",operation:{operationType:"type",type:c.Algebra.types.PROJECT},joinBindings:!0},{type:"operation",operation:{operationType:"type",type:c.Algebra.types.CONSTRUCT}},{type:"operation",operation:{operationType:"type",type:c.Algebra.types.DESCRIBE}},{type:"operation",operation:{operationType:"type",type:c.Algebra.types.ASK}},{type:"operation",operation:{operationType:"type",type:c.Algebra.types.COMPOSITE_UPDATE}}]}},16025:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(480),t),i(r(99193),t)},93017:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermedia=void 0;const n=r(91674),i=r(65483),a=r(32227),o=r(34368),s=r(870);class c extends i.ActorQuerySourceIdentify{constructor(e){super(e)}async test(e){if("string"!=typeof e.querySourceUnidentified.value)throw new TypeError(`${this.name} requires a single query source with a URL value to be present in the context.`);return!0}async run(e){return{querySource:{source:new s.QuerySourceHypermedia(this.cacheSize,e.querySourceUnidentified.value,e.querySourceUnidentified.type,this.maxIterators,this.aggregateTraversalStore&&Boolean(e.querySourceUnidentified.context?.get(a.KeysQuerySourceIdentify.traverse)),{mediatorMetadata:this.mediatorMetadata,mediatorMetadataExtract:this.mediatorMetadataExtract,mediatorMetadataAccumulate:this.mediatorMetadataAccumulate,mediatorDereferenceRdf:this.mediatorDereferenceRdf,mediatorQuerySourceIdentifyHypermedia:this.mediatorQuerySourceIdentifyHypermedia,mediatorRdfResolveHypermediaLinks:this.mediatorRdfResolveHypermediaLinks,mediatorRdfResolveHypermediaLinksQueue:this.mediatorRdfResolveHypermediaLinksQueue},(t=>this.logWarn(e.context,t)),await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context)),context:e.querySourceUnidentified.context??new o.ActionContext}}}}t.ActorQuerySourceIdentifyHypermedia=c},87896:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedRdfSourcesAsyncRdfIterator=void 0;const n=r(72394),i=r(76664);class a extends i.BufferedIterator{constructor(e,t,r,n,i,a,o,s){if(super({autoStart:!1,...s}),this.started=!1,this.currentIterators=[],this.iteratorsPendingCreation=0,this.iteratorsPendingTermination=0,this.accumulatedMetadata=Promise.resolve(void 0),this._reading=!1,this.cacheSize=e,this.operation=t,this.queryBindingsOptions=r,this.context=n,this.firstUrl=i,this.maxIterators=a,this.sourceStateGetter=o,this.maxIterators<=0)throw new Error(`LinkedRdfSourcesAsyncRdfIterator.maxIterators must be larger than zero, but got ${this.maxIterators}`)}kickstart(){this.started||this._fillBufferAsync()}getProperty(e,t){return"metadata"!==e||this.started||(this.preflightMetadata||(this.preflightMetadata=new Promise(((e,t)=>{this.sourceStateGetter({url:this.firstUrl},{}).then((t=>{const r=t.source.queryBindings(this.operation,this.context);r.getProperty("metadata",(i=>{i.state=new n.MetadataValidationState,r.destroy(),this.accumulateMetadata(t.metadata,i).then((r=>{const n={...t.metadata,...i,...r};e(n)})).catch((()=>{e({...t.metadata,state:new n.MetadataValidationState})}))}))})).catch(t)}))),this.preflightMetadata.then((e=>this.setProperty("metadata",e))).catch((()=>{}))),super.getProperty(e,t)}_end(e){for(const e of this.currentIterators)e.destroy();super._end(e)}_read(e,t){if(this.started){for(const t of this.currentIterators){for(;e>0;){const r=t.read();if(null===r)break;e--,this._push(r)}if(e<=0)break}e>=0&&this.canStartNewIterator()?this.sourceStateGetter({url:this.firstUrl},{}).then((e=>{this.startIteratorsForNextUrls(e.handledDatasets,!1),t()})):t()}else this.started=!0,this.sourceStateGetter({url:this.firstUrl},{}).then((e=>{this.startIterator(e),t()})).catch((e=>setTimeout((()=>this.destroy(e)))))}canStartNewIterator(){return this.currentIterators.length+this.iteratorsPendingCreation+this.iteratorsPendingTermination0}startIterator(e){try{const t=e.source.queryBindings(this.operation,this.context,this.queryBindingsOptions);this.currentIterators.push(t);let r=!1,i=!1;t._destination=this,t.on("error",(e=>this.destroy(e))),t.on("readable",(()=>this._fillBuffer())),t.on("end",(()=>{this.currentIterators.splice(this.currentIterators.indexOf(t),1),r=!0,i||this.iteratorsPendingTermination++,i&&this.startIteratorsForNextUrls(e.handledDatasets,!0)})),t.getProperty("metadata",(t=>{this.accumulatedMetadata=this.accumulatedMetadata.then((a=>(async()=>(a||(a=e.metadata),this.accumulateMetadata(a,t)))().then((a=>{const o={...e.metadata,...t,...a};return o.state=new n.MetadataValidationState,this.updateMetadata(o),this.preflightMetadata&&this.preflightMetadata.then((e=>e.state.invalidate())).catch((()=>{})),this.getSourceLinks(o).then((e=>Promise.all(e))).then((async t=>{const n=await this.getLinkQueue();for(const r of t)n.push(r,e.link);i=!0,r&&this.iteratorsPendingTermination--,this.startIteratorsForNextUrls(e.handledDatasets,!0)})).catch((e=>this.destroy(e))),o})))).catch((e=>(this.destroy(e),{})))}))}catch(e){this.destroy(e)}}updateMetadata(e){const t=this.getProperty("metadata");this.setProperty("metadata",e),t?.state.invalidate()}isRunning(){return!this.done}startIteratorsForNextUrls(e,t){this.getLinkQueue().then((r=>{for(;this.canStartNewIterator()&&this.isRunning();){const t=r.pop();if(!t)break;this.iteratorsPendingCreation++,this.sourceStateGetter(t,e).then((e=>{this.iteratorsPendingCreation--,this.startIterator(e)})).catch((e=>this.emit("error",e)))}t&&this.isCloseable(r,!0)&&this.close()})).catch((e=>this.destroy(e)))}isCloseable(e,t){return e.isEmpty()&&!this.areIteratorsRunning()}}t.LinkedRdfSourcesAsyncRdfIterator=a},47833:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatedLinkedRdfSourcesAsyncRdfIterator=void 0;const n=r(32227),i=r(18050),a=r(31578),o=r(87896),s=new i.DataFactory,c=new a.Factory;class u extends o.LinkedRdfSourcesAsyncRdfIterator{constructor(e,t,r,n,i,a,o,s,c,u,l,d){super(e,t,r,n,a,o,s,c?{maxBufferSize:Number.POSITIVE_INFINITY}:void 0),this.wasForcefullyClosed=!1,this.forceSourceType=i,this.mediatorMetadataAccumulate=u,this.mediatorRdfResolveHypermediaLinks=l,this.mediatorRdfResolveHypermediaLinksQueue=d,this.handledUrls={[a]:!0},this.aggregatedStore=c}close(){this.aggregatedStore?this.getLinkQueue().then((e=>{this.isCloseable(e,!1)?(this.aggregatedStore&&setTimeout((()=>this.aggregatedStore.end())),super.close()):this.wasForcefullyClosed=!0})).catch((e=>super.destroy(e))):super.close()}destroy(e){this.aggregatedStore?this.getLinkQueue().then((t=>{e??this.isCloseable(t,!1)?(this.aggregatedStore&&setTimeout((()=>this.aggregatedStore.end())),super.destroy(e)):this.wasForcefullyClosed=!0})).catch((e=>super.destroy(e))):super.destroy(e)}isCloseable(e,t){return(t?e.isEmpty():this.wasForcefullyClosed||e.isEmpty())&&!this.areIteratorsRunning()}canStartNewIterator(){return!this.wasForcefullyClosed&&this.aggregatedStore&&this.aggregatedStore.hasRunningIterators()||super.canStartNewIterator()}canStartNewIteratorConsiderReadable(){return!this.aggregatedStore}isRunning(){return this.aggregatedStore&&this.aggregatedStore.hasRunningIterators()||!this.done}getLinkQueue(){return this.linkQueue||(this.linkQueue=this.mediatorRdfResolveHypermediaLinksQueue.mediate({firstUrl:this.firstUrl,context:this.context}).then((e=>e.linkQueue))),this.linkQueue}async getSourceLinks(e){try{const{links:t}=await this.mediatorRdfResolveHypermediaLinks.mediate({context:this.context,metadata:e});return t.filter((e=>!this.handledUrls[e.url]&&(this.handledUrls[e.url]=!0,!0)))}catch{return[]}}startIterator(e){if(this.aggregatedStore&&!this.aggregatedStore.containedSources.has(e.link.url)){this.aggregatedStore?.containedSources.add(e.link.url);const t=e.source.queryBindings(c.createPattern(s.variable("s"),s.variable("p"),s.variable("o"),s.variable("g")),this.context.set(n.KeysQueryOperation.unionDefaultGraph,!0)).map((e=>s.quad(e.get("s"),e.get("p"),e.get("o"),e.get("g"))));this.aggregatedStore.import(t).on("end",(()=>{super.startIterator(e)}))}else super.startIterator(e)}async accumulateMetadata(e,t){return(await this.mediatorMetadataAccumulate.mediate({mode:"append",accumulatedMetadata:e,appendingMetadata:t,context:this.context})).metadata}updateMetadata(e){super.updateMetadata(e),this.aggregatedStore?.setBaseMetadata(e,!0)}}t.MediatedLinkedRdfSourcesAsyncRdfIterator=u},870:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceHypermedia=void 0;const n=r(27474),i=r(32227),a=r(76664),o=r(35069),s=r(58521),c=r(47833),u=r(69321);t.QuerySourceHypermedia=class{constructor(e,t,r,n,i,a,s,c){this.referenceValue=t,this.cacheSize=e,this.firstUrl=t,this.forceSourceType=r,this.maxIterators=n,this.mediators=a,this.aggregateStore=i,this.logWarning=s,this.bindingsFactory=c,this.sourcesState=new o.LRUCache({max:this.cacheSize})}async getSelectorShape(e){return(await this.getSourceCached({url:this.firstUrl},{},e,this.getAggregateStore(e))).source.getSelectorShape(e)}queryBindings(e,t,r){const i=this.getAggregateStore(t);if(i&&"pattern"===e.type&&i.started)return new n.QuerySourceRdfJs(i,this.bindingsFactory).queryBindings(e,t);0===this.sourcesState.size&&this.getSourceCached({url:this.firstUrl},{},t,i).catch((e=>a.destroy(e)));const a=new c.MediatedLinkedRdfSourcesAsyncRdfIterator(this.cacheSize,e,r,t,this.forceSourceType,this.firstUrl,this.maxIterators,((e,r)=>this.getSourceCached(e,r,t,i)),i,this.mediators.mediatorMetadataAccumulate,this.mediators.mediatorRdfResolveHypermediaLinks,this.mediators.mediatorRdfResolveHypermediaLinksQueue);if(i){i.started=!0;const e=()=>a.kickstart();i.addIteratorCreatedListener(e),a.on("end",(()=>i.removeIteratorCreatedListener(e)))}return a}queryQuads(e,t){return new a.TransformIterator((async()=>(await this.getSourceCached({url:this.firstUrl},{},t,this.getAggregateStore(t))).source.queryQuads(e,t)))}async queryBoolean(e,t){const r=await this.getSourceCached({url:this.firstUrl},{},t,this.getAggregateStore(t));return await r.source.queryBoolean(e,t)}async queryVoid(e,t){const r=await this.getSourceCached({url:this.firstUrl},{},t,this.getAggregateStore(t));return await r.source.queryVoid(e,t)}async getSource(e,t,r,n){e.context&&(r=r.merge(e.context));let i,a,o=e.url;try{const t=await this.mediators.mediatorDereferenceRdf.mediate({context:r,url:o});o=t.url;const n=await this.mediators.mediatorMetadata.mediate({context:r,url:o,quads:t.data,triples:t.metadata?.triples});n.data.on("error",(()=>{})),a=(await this.mediators.mediatorMetadataExtract.mediate({context:r,url:o,metadata:n.metadata,headers:t.headers,requestTime:t.requestTime})).metadata,i=n.data,e.transform&&(i=await e.transform(i))}catch(e){i=new s.Readable,i.read=()=>(setTimeout((()=>i.emit("error",e))),null),({metadata:a}=await this.mediators.mediatorMetadataAccumulate.mediate({context:r,mode:"initialize"})),this.logWarning(`Metadata extraction for ${o} failed: ${e.message}`)}n?.setBaseMetadata(a,!1),n?.containedSources.add(e.url),n?.import(i);const{source:c,dataset:u}=await this.mediators.mediatorQuerySourceIdentifyHypermedia.mediate({context:r,forceSourceType:e.url===this.firstUrl?this.forceSourceType:void 0,handledDatasets:t,metadata:a,quads:i,url:o});return u&&(t[u]=!0),{link:e,source:c,metadata:a,handledDatasets:t}}getSourceCached(e,t,r,n){let i=this.sourcesState.get(e.url);return i||(i=this.getSource(e,t,r,n),e.url!==this.firstUrl&&void 0!==n||this.sourcesState.set(e.url,i),i)}getAggregateStore(e){let t;if(this.aggregateStore){const r=e.get(i.KeysQuerySourceIdentify.hypermediaSourcesAggregatedStores);if(r)return t=r.get(this.firstUrl),t||(t=new u.StreamingStoreMetadata(void 0,(async(t,r)=>(await this.mediators.mediatorMetadataAccumulate.mediate({mode:"append",accumulatedMetadata:t,appendingMetadata:r,context:e})).metadata)),r.set(this.firstUrl,t)),t}}toString(){return`QuerySourceHypermedia(${this.firstUrl})`}}},69321:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamingStoreMetadata=void 0;const n=r(59510),i=r(72394),a=r(2887);class o extends a.StreamingStore{constructor(e,t){super(e),this.started=!1,this.containedSources=new Set,this.runningIterators=new Set,this.iteratorCreatedListeners=new Set,this.baseMetadata={state:new i.MetadataValidationState,cardinality:{type:"exact",value:0},canContainUndefs:!1,variables:[]},this.metadataAccumulator=t}import(e){return this.ended||super.import(e),e}hasRunningIterators(){return this.runningIterators.size>0}match(e,t,r,a){const o=super.match(e,t,r,a),s=new n.ClosableTransformIterator(o,{autoStart:!1,onClose:()=>{this.runningIterators.delete(s)}});let c=this.getStore().countQuads(e,t,r,a);const u={state:new i.MetadataValidationState,cardinality:{type:"estimate",value:c},canContainUndefs:!1};s.setProperty("metadata",u),s.setProperty("lastCount",c),o.on("quad",(()=>{s.setProperty("lastCount",++c),this.updateMetadataState(s,c)})),this.runningIterators.add(s);for(const e of this.iteratorCreatedListeners)e();return s}setBaseMetadata(e,t){if(this.baseMetadata={...e},this.baseMetadata.cardinality={type:"exact",value:0},t)for(const e of this.runningIterators){const t=e.getProperty("lastCount");this.updateMetadataState(e,t)}}updateMetadataState(e,t){const r={state:new i.MetadataValidationState,cardinality:{type:"estimate",value:t},canContainUndefs:!1,variables:[]};this.metadataAccumulator(this.baseMetadata,r).then((t=>{t.state=new i.MetadataValidationState;const r=e.getProperty("metadata");e.setProperty("metadata",t),r?.state.invalidate()})).catch((()=>{}))}addIteratorCreatedListener(e){this.iteratorCreatedListeners.add(e)}removeIteratorCreatedListener(e){this.iteratorCreatedListeners.delete(e)}}t.StreamingStoreMetadata=o},57789:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(93017),t),i(r(870),t)},34263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyRdfJs=void 0;const n=r(91674),i=r(65483),a=r(34368),o=r(35720);class s extends i.ActorQuerySourceIdentify{constructor(e){super(e)}async test(e){const t=e.querySourceUnidentified;if(void 0!==t.type&&"rdfjs"!==t.type)throw new Error(`${this.name} requires a single query source with rdfjs type to be present in the context.`);if("string"==typeof t.value||!("match"in t.value))throw new Error(`${this.name} received an invalid rdfjs query source.`);return!0}async run(e){return{querySource:{source:new o.QuerySourceRdfJs(e.querySourceUnidentified.value,await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context)),context:e.querySourceUnidentified.context??new a.ActionContext}}}}t.ActorQuerySourceIdentifyRdfJs=s},45958:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},35720:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceRdfJs=void 0;const n=r(65483),i=r(32227),a=r(72394),o=r(76664),s=r(18050),c=r(13252),u=new(r(31578).Factory),l=new s.DataFactory;class d{constructor(e,t){this.source=e,this.referenceValue=e,this.bindingsFactory=t}static nullifyVariables(e,t){return!e||"Variable"===e.termType||!t&&"Quad"===e.termType&&(0,c.someTermsNested)(e,(e=>"Variable"===e.termType))?void 0:e}static hasDuplicateVariables(e){const t=(0,c.filterTermsNested)(e,(e=>"Variable"===e.termType));return t.length>1&&(0,c.uniqTerms)(t).lengths.destroy(e))),(0,n.quadsToBindings)(s,e,this.bindingsFactory,Boolean(t.get(i.KeysQueryOperation.unionDefaultGraph)))}async setMetadata(e,t){const r=Boolean(this.source.features?.quotedTripleFiltering);let n;if(this.source.countQuads)n=await this.source.countQuads(d.nullifyVariables(t.subject,r),d.nullifyVariables(t.predicate,r),d.nullifyVariables(t.object,r),d.nullifyVariables(t.graph,r));else{let e=0;n=await new Promise(((n,i)=>{const a=this.source.match(d.nullifyVariables(t.subject,r),d.nullifyVariables(t.predicate,r),d.nullifyVariables(t.object,r),d.nullifyVariables(t.graph,r));a.on("error",i),a.on("end",(()=>n(e))),a.on("data",(()=>e++))}))}const i=!r&&(0,c.someTerms)(t,(e=>"Quad"===e.termType))||d.hasDuplicateVariables(t);e.setProperty("metadata",{state:new a.MetadataValidationState,cardinality:{type:i?"estimate":"exact",value:n},canContainUndefs:!1})}queryQuads(e,t){throw new Error("queryQuads is not implemented in QuerySourceQpf")}queryBoolean(e,t){throw new Error("queryBoolean is not implemented in QuerySourceQpf")}queryVoid(e,t){throw new Error("queryVoid is not implemented in QuerySourceQpf")}toString(){return`QuerySourceRdfJs(${this.source.constructor.name})`}}t.QuerySourceRdfJs=d,d.SELECTOR_SHAPE={type:"operation",operation:{operationType:"pattern",pattern:u.createPattern(l.variable("s"),l.variable("p"),l.variable("o"))},variablesOptional:[l.variable("s"),l.variable("p"),l.variable("o")]}},27474:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(34263),t),i(r(45958),t),i(r(35720),t)},16661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifySerialized=void 0;const n=r(65483),i=r(10953),a=r(58521);class o extends n.ActorQuerySourceIdentify{constructor(e){super(e)}async test(e){if(!this.isStringSource(e.querySourceUnidentified))throw new Error(`${this.name} requires a single query source with serialized type to be present in the context.`);return!0}async run(e){return await this.mediatorQuerySourceIdentify.mediate({querySourceUnidentified:{type:"rdfjs",value:await this.getRdfSource(e.context,e.querySourceUnidentified),context:e.querySourceUnidentified.context},context:e.context})}async getRdfSource(e,t){const r=new a.Readable({objectMode:!0});r._read=()=>{},r.push(t.value),r.push(null);const n={context:e,handle:{metadata:{baseIRI:t.baseIRI},data:r,context:e},handleMediaType:t.mediaType},o=await this.mediatorRdfParse.mediate(n);return await(0,i.storeStream)(o.handle.data)}isStringSource(e){return"type"in e?"serialized"===e.type:"string"==typeof e.value&&"mediaType"in e}}t.ActorQuerySourceIdentifySerialized=o},84701:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(16661),t)},13494:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinEntriesSortCardinality=void 0;const n=r(84287);class i extends n.ActorRdfJoinEntriesSort{constructor(e){super(e)}async test(e){return!0}async run(e){return{entries:[...e.entries].sort(((e,t)=>e.metadata.cardinality.value-t.metadata.cardinality.value))}}}t.ActorRdfJoinEntriesSortCardinality=i},36545:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(13494),t)},87653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinHash=void 0;const n=r(32353),i=r(2922);class a extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"hash",limitEntries:2})}async getOutput(e){const t=await n.ActorRdfJoin.getMetadatas(e.entries),r=n.ActorRdfJoin.overlappingVariables(t);return{result:{type:"bindings",bindingsStream:new i.HashJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,(e=>n.ActorRdfJoin.hash(e,r)),n.ActorRdfJoin.joinBindings),metadata:async()=>await this.constructResultMetadata(e.entries,t,e.context)}}}async getJoinCoefficients(e,t){const r=n.ActorRdfJoin.getRequestInitialTimes(t),i=n.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value+t[1].cardinality.value,persistedItems:t[0].cardinality.value,blockingItems:t[0].cardinality.value,requestTime:r[0]+t[0].cardinality.value*i[0]+r[1]+t[1].cardinality.value*i[1]}}}t.ActorRdfJoinHash=a},38868:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(87653),t)},57581:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiBindSource=void 0;const n=r(59510),i=r(32353),a=r(76664),o=new(r(31578).Factory);class s extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"bind-source",canHandleUndefs:!0})}async getOutput(e){const t=await i.ActorRdfJoin.getEntriesWithMetadatas(e.entries),r=await this.sortJoinEntries(t,e.context);this.logDebug(e.context,"First entry for Bind Join Source: ",(()=>({entry:r[0].operation,metadata:r[0].metadata})));for(const[e,t]of r.entries())0!==e&&t.output.bindingsStream.close();const o=r[0].output,s=r[0].metadata,c=[...r];c.splice(0,1);const u=n.ActorQueryOperation.getOperationSource(c[0].operation),l=this.createOperationFromEntries(c),d=new i.ChunkedIterator(o.bindingsStream,this.blockSize,{autoStart:!1});return{result:{type:"bindings",bindingsStream:new a.UnionIterator(d.map((t=>u.source.queryBindings(l,u.context?e.context.merge(u.context):e.context,{joinBindings:{bindings:t,metadata:s}})))),metadata:()=>this.constructResultMetadata(r,r.map((e=>e.metadata)),e.context)},physicalPlanMetadata:{bindIndex:t.indexOf(r[0])}}}async sortJoinEntries(e,t){return(e=await i.ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort,e,t)).sort(((e,t)=>e.operationModified&&!t.operationModified?-1:0))}async getJoinCoefficients(e,t){const r=await this.sortJoinEntries(e.entries.map(((e,r)=>({...e,metadata:t[r]}))),e.context);t=r.map((e=>e.metadata));const a=i.ActorRdfJoin.getRequestInitialTimes(t),o=i.ActorRdfJoin.getRequestItemTimes(t),s=[...r],c=[...a],u=[...o];s.splice(0,1),c.splice(0,1),u.splice(0,1);const l=s.map((e=>n.ActorQueryOperation.getOperationSource(e.operation)));if(l.some((e=>!e)))throw new Error(`Actor ${this.name} can not bind on remaining operations without source annotation`);if(l.some((e=>e!==l[0])))throw new Error(`Actor ${this.name} can not bind on remaining operations with non-equal source annotation`);const d=l[0],h=this.createOperationFromEntries(s),p=await d.source.getSelectorShape(e.context);if(!n.ActorQueryOperation.doesShapeAcceptOperation(p,h,{joinBindings:!0}))throw new Error(`Actor ${this.name} detected a source that can not handle passing down join bindings`);const f=await Promise.all(s.map((async t=>(await this.mediatorJoinSelectivity.mediate({entries:[r[0],t],context:e.context})).selectivity*this.selectivityModifier))),y=s.map(((e,t)=>e.metadata.cardinality.value*f[t])).reduce(((e,t)=>e+t),0);return{iterations:1,persistedItems:t[0].cardinality.value,blockingItems:t[0].cardinality.value,requestTime:a[0]+t[0].cardinality.value*o[0]+a[1]+y*o[1]}}createOperationFromEntries(e){return 1===e.length?e[0].operation:o.createJoin(e.map((e=>e.operation)),!0)}}t.ActorRdfJoinMultiBindSource=s},6551:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(57581),t)},38752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiBind=void 0;const n=r(91674),i=r(59510),a=r(32353),o=r(32227),s=r(76664),c=r(31578);class u extends a.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"bind",canHandleUndefs:!0,isLeaf:!1})}static createBindStream(e,t,r,n,a,o){const c="depth-first"===e,u=e=>{const t=r.map((t=>(0,i.materializeOperation)(t,e,o,{bindFilter:!0}))),a=t=>t.merge(e);return new s.TransformIterator((async()=>(await n(t,e)).transform({map:a})),{maxBufferSize:128,autoStart:c})};switch(e){case"depth-first":return new s.MultiTransformIterator(t,{autoStart:!1,multiTransform:u,optional:a});case"breadth-first":return new s.UnionIterator(t.transform({map:u,optional:a}),{autoStart:!1});default:throw new Error(`Received request for unknown bind order: ${e}`)}}async getOutput(e){const t=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context),r=await a.ActorRdfJoin.getEntriesWithMetadatas(e.entries),s=await a.ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort,r,e.context);this.logDebug(e.context,"First entry for Bind Join: ",(()=>({entry:s[0].operation,metadata:s[0].metadata})));for(const[e,t]of s.entries())0!==e&&t.output.bindingsStream.close();const c=s[0].output,l=[...s];l.splice(0,1);const d=e.context.set(o.KeysQueryOperation.joinLeftMetadata,s[0].metadata).set(o.KeysQueryOperation.joinRightMetadatas,l.map((e=>e.metadata)));return{result:{type:"bindings",bindingsStream:u.createBindStream(this.bindOrder,c.bindingsStream,l.map((e=>e.operation)),(async(e,t)=>{const r=1===e.length?e[0]:u.FACTORY.createJoin(e);return i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:r,context:d?.set(o.KeysQueryOperation.joinBindings,t)})).bindingsStream}),!1,t),metadata:()=>this.constructResultMetadata(s,s.map((e=>e.metadata)),e.context)},physicalPlanMetadata:{bindIndex:r.indexOf(s[0]),bindOperation:s[0].operation,bindOperationCardinality:s[0].metadata.cardinality,bindOrder:this.bindOrder}}}canBindWithOperation(e){let t=!0;return c.Util.recurseOperation(e,{[c.Algebra.types.EXTEND]:()=>(t=!1,!1),[c.Algebra.types.GROUP]:()=>(t=!1,!1)}),t}async getJoinCoefficients(e,t){const r=await a.ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort,e.entries.map(((e,r)=>({...e,metadata:t[r]}))),e.context);t=r.map((e=>e.metadata));const n=a.ActorRdfJoin.getRequestInitialTimes(t),i=a.ActorRdfJoin.getRequestItemTimes(t),o=[...r],s=[...n],c=[...i];if(o.splice(0,1),s.splice(0,1),c.splice(0,1),o.some((e=>!this.canBindWithOperation(e.operation))))throw new Error(`Actor ${this.name} can not bind on Extend and Group operations`);if(o.some((e=>e.operationModified)))throw new Error(`Actor ${this.name} can not be used over remaining entries with modified operations`);const u=await Promise.all(o.map((async t=>(await this.mediatorJoinSelectivity.mediate({entries:[r[0],t],context:e.context})).selectivity*this.selectivityModifier))),l=o.map(((e,t)=>e.metadata.cardinality.value*u[t])).reduce(((e,t)=>e+t),0),d=s.reduce(((e,t)=>e+t),0),h=c.reduce(((e,t)=>e+t),0);return{iterations:t[0].cardinality.value*l,persistedItems:0,blockingItems:0,requestTime:n[0]+t[0].cardinality.value*(i[0]+d+l*h)}}}t.ActorRdfJoinMultiBind=u,u.FACTORY=new c.Factory},82331:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(38752),t)},42548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiEmpty=void 0;const n=r(32353),i=r(72394),a=r(76664);class o extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-empty",canHandleUndefs:!0})}async test(e){if((await n.ActorRdfJoin.getMetadatas(e.entries)).every((e=>n.ActorRdfJoin.getCardinality(e).value>0)))throw new Error(`Actor ${this.name} can only join entries where at least one is empty`);return super.test(e)}async getOutput(e){for(const t of e.entries)t.output.bindingsStream.close();return{result:{bindingsStream:new a.ArrayIterator([],{autoStart:!1}),metadata:async()=>({state:new i.MetadataValidationState,cardinality:{type:"exact",value:0},canContainUndefs:!1,variables:n.ActorRdfJoin.joinVariables(await n.ActorRdfJoin.getMetadatas(e.entries))}),type:"bindings"}}}async getJoinCoefficients(e,t){return{iterations:0,persistedItems:0,blockingItems:0,requestTime:0}}}t.ActorRdfJoinMultiEmpty=o},85345:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(42548),t)},82314:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiSmallestFilterBindings=void 0;const n=r(91674),i=r(59510),a=r(32353),o=r(32227),s=r(76664),c=r(31578);class u extends a.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-smallest-filter-bindings",limitEntries:2,limitEntriesMin:!0,isLeaf:!1})}async sortJoinEntries(e,t){let{entries:r}=await this.mediatorJoinEntriesSort.mediate({entries:e,context:t});r=r.sort(((e,t)=>e.operationModified&&!t.operationModified?-1:0));const n=r.splice(0,1)[0];let i,a=-1,o=0;for(const[e,t]of r.entries()){const r=n.metadata.variables.filter((e=>t.metadata.variables.some((t=>e.equals(t))))).length;(!i||r>o||r===o&&(t.metadata.variables.lengthc.metadata.variables.some((t=>e.equals(t))))),p={},f=d.clone().map((e=>e.filter(((e,t)=>h.some((e=>e.equals(t))))))).filter((e=>{const t=(0,n.bindingsToString)(e);return!(t in p)&&(p[t]=!0)})),y=new a.ChunkedIterator(f,this.blockSize,{autoStart:!1}),g=i.ActorQueryOperation.getOperationSource(c.operation),m={output:{type:"bindings",bindingsStream:new s.UnionIterator(y.map((t=>g.source.queryBindings(c.operation,g.context?e.context.merge(g.context):e.context,{filterBindings:{bindings:t,metadata:r.metadata}})))),metadata:c.output.metadata},operation:c.operation,operationModified:!0};c.output.bindingsStream.destroy();const b={output:i.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:e.type,entries:[r,m],context:e.context.set(o.KeysRdfJoin.lastPhysicalJoin,this.physicalName)})),operation:u.FACTORY.createJoin([r.operation,m.operation],!1),operationModified:!0},v=l;return v.unshift(b),{result:await this.mediatorJoin.mediate({type:e.type,entries:v,context:e.context}),physicalPlanMetadata:{firstIndex:t.indexOf(r),secondIndex:t.indexOf(c)}}}async getJoinCoefficients(e,t){if(e.context.get(o.KeysRdfJoin.lastPhysicalJoin)===this.physicalName)throw new Error(`Actor ${this.name} can not be called recursively`);t=[...t];const{first:r,second:n,remaining:s}=await this.sortJoinEntries(e.entries.map(((e,r)=>({...e,metadata:t[r]}))),e.context),c=i.ActorQueryOperation.getOperationSource(n.operation);if(!c)throw new Error(`Actor ${this.name} can only process if entries[1] has a source`);const u=n.operation,l=await c.source.getSelectorShape(e.context);if(!i.ActorQueryOperation.doesShapeAcceptOperation(l,u,{filterBindings:!0}))throw new Error(`Actor ${this.name} can only process if entries[1] accept filterBindings`);t=[r.metadata,n.metadata,...s.map((e=>e.metadata))];const d=a.ActorRdfJoin.getRequestInitialTimes(t),h=a.ActorRdfJoin.getRequestItemTimes(t),{selectivity:p}=await this.mediatorJoinSelectivity.mediate({entries:[r,n],context:e.context}),f=s.reduce(((e,t)=>e*t.metadata.cardinality.value*this.selectivityModifier),1);return{iterations:p*this.selectivityModifier*n.metadata.cardinality.value*f,persistedItems:r.metadata.cardinality.value,blockingItems:r.metadata.cardinality.value,requestTime:d[0]+t[0].cardinality.value*h[0]+d[1]+f*h[1]}}}t.ActorRdfJoinMultiSmallestFilterBindings=u,u.FACTORY=new c.Factory},92107:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(82314),t)},17504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiSmallest=void 0;const n=r(59510),i=r(32353),a=r(31578);class o extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-smallest",limitEntries:3,limitEntriesMin:!0,canHandleUndefs:!0,isLeaf:!1})}async sortJoinEntries(e,t){return(await this.mediatorJoinEntriesSort.mediate({entries:e,context:t})).entries}async getOutput(e){const t=await this.sortJoinEntries(await i.ActorRdfJoin.getEntriesWithMetadatas([...e.entries]),e.context),r=t[0],a=t[1];t.splice(0,2);const s={output:n.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:e.type,entries:[r,a],context:e.context})),operation:o.FACTORY.createJoin([r.operation,a.operation],!1)};return t.push(s),{result:await this.mediatorJoin.mediate({type:e.type,entries:t,context:e.context})}}async getJoinCoefficients(e,t){t=[...t];const r=await this.sortJoinEntries(e.entries.map(((e,r)=>({...e,metadata:t[r]}))),e.context);t=r.map((e=>e.metadata));const n=i.ActorRdfJoin.getRequestInitialTimes(t),a=i.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value*t[1].cardinality.value*t.slice(2).reduce(((e,t)=>e*t.cardinality.value),1),persistedItems:0,blockingItems:0,requestTime:n[0]+t[0].cardinality.value*a[0]+n[1]+t[1].cardinality.value*a[1]+t.slice(2).reduce(((e,t,r)=>e+n.slice(2)[r]+t.cardinality.value*a.slice(2)[r]),0)}}}t.ActorRdfJoinMultiSmallest=o,o.FACTORY=new a.Factory},68841:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(17504),t)},20743:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinNestedLoop=void 0;const n=r(32353),i=r(2922);class a extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"nested-loop",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){return{result:{type:"bindings",bindingsStream:new i.NestedLoopJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,n.ActorRdfJoin.joinBindings,{autoStart:!1}),metadata:async()=>await this.constructResultMetadata(e.entries,await n.ActorRdfJoin.getMetadatas(e.entries),e.context)}}}async getJoinCoefficients(e,t){const r=n.ActorRdfJoin.getRequestInitialTimes(t),i=n.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value*t[1].cardinality.value,persistedItems:0,blockingItems:0,requestTime:r[0]+t[0].cardinality.value*i[0]+r[1]+t[1].cardinality.value*i[1]}}}t.ActorRdfJoinNestedLoop=a},37081:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(20743),t)},19421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinNone=void 0;const n=r(91674),i=r(32353),a=r(72394),o=r(76664);class s extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"none",limitEntries:0})}async test(e){if(e.entries.length>0)throw new Error(`Actor ${this.name} can only join zero entries`);return await this.getJoinCoefficients()}async getOutput(e){const t=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context);return{result:{bindingsStream:new o.ArrayIterator([t.bindings()],{autoStart:!1}),metadata:()=>Promise.resolve({state:new a.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]}),type:"bindings"}}}async getJoinCoefficients(){return{iterations:0,persistedItems:0,blockingItems:0,requestTime:0}}}t.ActorRdfJoinNone=s},498:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(19421),t)},28178:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinSingle=void 0;const n=r(32353);class i extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"single",limitEntries:1}),this.includeInLogs=!1}async test(e){if(1!==e.entries.length)throw new Error(`Actor ${this.name} can only join a single entry`);return await this.getJoinCoefficients()}async getOutput(e){return{result:e.entries[0].output}}async getJoinCoefficients(){return{iterations:0,persistedItems:0,blockingItems:0,requestTime:0}}}t.ActorRdfJoinSingle=i},35848:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(28178),t)},19273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinSymmetricHash=void 0;const n=r(32353),i=r(2922);class a extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"symmetric-hash",limitEntries:2})}async getOutput(e){const t=await n.ActorRdfJoin.getMetadatas(e.entries),r=n.ActorRdfJoin.overlappingVariables(t);return{result:{type:"bindings",bindingsStream:new i.SymmetricHashJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,(e=>a.hash(e,r)),n.ActorRdfJoin.joinBindings),metadata:async()=>await this.constructResultMetadata(e.entries,t,e.context)}}}async getJoinCoefficients(e,t){const r=n.ActorRdfJoin.getRequestInitialTimes(t),i=n.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value+t[1].cardinality.value,persistedItems:t[0].cardinality.value+t[1].cardinality.value,blockingItems:0,requestTime:r[0]+t[0].cardinality.value*i[0]+r[1]+t[1].cardinality.value*i[1]}}}t.ActorRdfJoinSymmetricHash=a},77375:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(19273),t)},18014:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMinusHashUndef=void 0;const n=r(59510),i=r(32353),a=r(5985);class o extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"minus",physicalName:"hash-undef",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){const t=e.entries[1].output,r=e.entries[0].output,o=await i.ActorRdfJoin.getMetadatas(e.entries),s=i.ActorRdfJoin.overlappingVariables(o);if(s.length>0){const e=new a.BindingsIndex(s),i=new n.ClosableTransformIterator((async()=>(await new Promise((r=>{t.bindingsStream.on("data",(t=>e.add(t))),t.bindingsStream.on("end",r),t.bindingsStream.on("error",(e=>{i.emit("error",e)}))})),r.bindingsStream.filter((t=>!e.contains(t))))),{autoStart:!1,onClose(){t.bindingsStream.destroy(),r.bindingsStream.destroy()}});return{result:{type:"bindings",bindingsStream:i,async metadata(){const e=await r.metadata(),t=await r.metadata();return{...t,canContainUndefs:e.canContainUndefs||t.canContainUndefs}}}}}return t.bindingsStream.destroy(),{result:r}}async getJoinCoefficients(e,t){const r=i.ActorRdfJoin.getRequestInitialTimes(t),n=i.ActorRdfJoin.getRequestItemTimes(t);return{iterations:1.01*(t[0].cardinality.value+t[1].cardinality.value),persistedItems:t[0].cardinality.value,blockingItems:t[0].cardinality.value,requestTime:r[0]+t[0].cardinality.value*n[0]+r[1]+t[1].cardinality.value*n[1]}}}t.ActorRdfJoinMinusHashUndef=o},5985:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsIndex=void 0;const n=r(22112);class i{constructor(e){this.data={},this.keys=e}static hashTerm(e){return e&&"Variable"!==e.termType?(0,n.termToString)(e):""}add(e){if(this.isBindingsValid(e)){let t=this.data;for(const r of this.keys){const n=i.hashTerm(e.get(r));let a=t[n];a||(a=t[n]={}),t=a}}}contains(e){return!!this.isBindingsValid(e)&&this.containsRecursive(e,this.keys,[this.data])}isBindingsValid(e){let t=!1;for(const r of this.keys)if(e.get(r)){t=!0;break}return t}containsRecursive(e,t,r){if(0===t.length)return!0;let n;[n,...t]=t;for(const a of r){const r=i.hashTerm(e.get(n));if(r){const n=[a[r],a[""]].filter(Boolean);if(0===n.length)continue;if(this.containsRecursive(e,t,n))return!0}else{let r=Object.keys(a).map((e=>a[e]));if(0===r.length&&(r=[{}]),this.containsRecursive(e,t,r))return!0}}return!1}}t.BindingsIndex=i},98311:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(18014),t)},99917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMinusHash=void 0;const n=r(59510),i=r(32353);class a extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"minus",physicalName:"hash",limitEntries:2})}async getOutput(e){const t=e.entries[1].output,r=e.entries[0].output,a=await i.ActorRdfJoin.getMetadatas(e.entries),o=i.ActorRdfJoin.overlappingVariables(a);if(o.length>0){const e={},a=new n.ClosableTransformIterator((async()=>(await new Promise((r=>{t.bindingsStream.on("data",(t=>{e[i.ActorRdfJoin.hashNonClashing(t,o)]=!0})),t.bindingsStream.on("end",r),t.bindingsStream.on("error",(e=>{a.emit("error",e)}))})),r.bindingsStream.filter((t=>!e[i.ActorRdfJoin.hashNonClashing(t,o)])))),{autoStart:!1,onClose(){t.bindingsStream.destroy(),r.bindingsStream.destroy()}});return{result:{type:"bindings",bindingsStream:a,metadata:r.metadata}}}return t.bindingsStream.destroy(),{result:r}}async getJoinCoefficients(e,t){const r=i.ActorRdfJoin.getRequestInitialTimes(t),n=i.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value+t[1].cardinality.value,persistedItems:t[0].cardinality.value,blockingItems:t[0].cardinality.value,requestTime:r[0]+t[0].cardinality.value*n[0]+r[1]+t[1].cardinality.value*n[1]}}}t.ActorRdfJoinMinusHash=a},11688:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(99917),t)},46869:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinOptionalBind=void 0;const n=r(82331),i=r(91674),a=r(59510),o=r(32353),s=r(32227),c=r(31578);class u extends o.ActorRdfJoin{constructor(e){super(e,{logicalType:"optional",physicalName:"bind",limitEntries:2,canHandleUndefs:!0,isLeaf:!1})}async getOutput(e){const t=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context);e.entries[1].output.bindingsStream.close();const r=e.context.set(s.KeysQueryOperation.joinLeftMetadata,await e.entries[0].output.metadata()).set(s.KeysQueryOperation.joinRightMetadatas,[await e.entries[1].output.metadata()]);return{result:{type:"bindings",bindingsStream:n.ActorRdfJoinMultiBind.createBindStream(this.bindOrder,e.entries[0].output.bindingsStream,[e.entries[1].operation],(async(e,t)=>{const n=e[0];return a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:n,context:r?.set(s.KeysQueryOperation.joinBindings,t)})).bindingsStream}),!0,t),metadata:async()=>await this.constructResultMetadata(e.entries,await o.ActorRdfJoin.getMetadatas(e.entries),e.context,{canContainUndefs:!0})}}}async getJoinCoefficients(e,t){if(0===o.ActorRdfJoin.overlappingVariables(t).length)throw new Error(`Actor ${this.name} only join entries with at least one common variable`);const r=o.ActorRdfJoin.getRequestInitialTimes(t),n=o.ActorRdfJoin.getRequestItemTimes(t);if(e.entries[1].operation.type===c.Algebra.types.EXTEND||e.entries[1].operation.type===c.Algebra.types.GROUP)throw new Error(`Actor ${this.name} can not bind on Extend and Group operations`);const i=(await this.mediatorJoinSelectivity.mediate({entries:e.entries,context:e.context})).selectivity*this.selectivityModifier;return{iterations:t[0].cardinality.value*t[1].cardinality.value*i,persistedItems:0,blockingItems:0,requestTime:r[0]+t[0].cardinality.value*(n[0]+r[1]+i*t[1].cardinality.value*n[1])}}}t.ActorRdfJoinOptionalBind=u},64305:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(46869),t)},75015:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinOptionalHash=void 0;const n=r(59510),i=r(32353),a=r(76664),o=r(22112),s=r(66561),c=r(27900);class u extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"optional",physicalName:`hash-${e.canHandleUndefs?"undef":"def"}-${e.blocking?"blocking":"nonblocking"}`,limitEntries:2,canHandleUndefs:e.canHandleUndefs})}static constructIndex(e,t){return e?new c.BindingsIndexUndef(t,(e=>e&&"Variable"!==e.termType?(0,o.termToString)(e):"")):new s.BindingsIndexDef(t,i.ActorRdfJoin.hashNonClashing)}async getOutput(e){const t=e.entries[1].output,r=e.entries[0].output,o=await i.ActorRdfJoin.getMetadatas(e.entries),s=i.ActorRdfJoin.overlappingVariables(o);let c;return c=this.blocking?new n.ClosableTransformIterator((async()=>{const e=u.constructIndex(this.canHandleUndefs,s);return await new Promise((r=>{t.bindingsStream.on("data",(t=>{(e.getFirst(t)??e.put(t,[])).push(t)})),t.bindingsStream.on("end",r),t.bindingsStream.on("error",(e=>{c.emit("error",e)}))})),new a.MultiTransformIterator(r.bindingsStream,{multiTransform:t=>new a.ArrayIterator(e.get(t).flat().map((e=>i.ActorRdfJoin.joinBindings(t,e))).filter((e=>null!==e)),{autoStart:!1}),optional:!0,autoStart:!1})}),{autoStart:!1,onClose(){t.bindingsStream.destroy(),r.bindingsStream.destroy()}}):new n.ClosableTransformIterator((async()=>{const e=u.constructIndex(this.canHandleUndefs,s);let n=!0;return t.bindingsStream.on("data",(t=>{(e.getFirst(t)??e.put(t,new a.BufferedIterator({autoStart:!1})))._push(t)})),t.bindingsStream.on("end",(()=>{for(const t of e.values())t.close();n=!1})),t.bindingsStream.on("error",(e=>{c.emit("error",e)})),new a.MultiTransformIterator(r.bindingsStream,{multiTransform:t=>{let r=e.get(t);return 0===r.length&&(r=n?[e.put(t,new a.BufferedIterator({autoStart:!1}))]:[]),new a.UnionIterator(r.map((e=>e.clone())),{autoStart:!1}).map((e=>i.ActorRdfJoin.joinBindings(t,e)))},optional:!0,autoStart:!1})}),{autoStart:!1,onClose(){t.bindingsStream.destroy(),r.bindingsStream.destroy()}}),{result:{type:"bindings",bindingsStream:c,metadata:async()=>await this.constructResultMetadata(e.entries,await i.ActorRdfJoin.getMetadatas(e.entries),e.context,{canContainUndefs:!0})}}}async getJoinCoefficients(e,t){if(0===i.ActorRdfJoin.overlappingVariables(t).length)throw new Error(`Actor ${this.name} only join entries with at least one common variable`);const r=i.ActorRdfJoin.getRequestInitialTimes(t),n=i.ActorRdfJoin.getRequestItemTimes(t);let a=t[0].cardinality.value+t[1].cardinality.value;return this.canHandleUndefs||(a*=.8),this.blocking&&(a*=.9),{iterations:a,persistedItems:t[0].cardinality.value,blockingItems:this.blocking?t[0].cardinality.value:0,requestTime:r[0]+t[0].cardinality.value*n[0]+r[1]+t[1].cardinality.value*n[1]}}}t.ActorRdfJoinOptionalHash=u},66561:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsIndexDef=void 0,t.BindingsIndexDef=class{constructor(e,t){this.keys=e,this.hashFn=t,this.index={}}put(e,t){return this.index[this.hashFn(e,this.keys)]=t}get(e){const t=this.getFirst(e);return t?[t]:[]}getFirst(e){return this.index[this.hashFn(e,this.keys)]}values(){return Object.values(this.index)}}},27900:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsIndexUndef=void 0,t.BindingsIndexUndef=class{constructor(e,t){this.data={},this.keys=e,this.hashFn=t}put(e,t){if(this.isBindingsValid(e)){let r=this.data;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinOptionalNestedLoop=void 0;const n=r(32353),i=r(2922);class a extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"optional",physicalName:"nested-loop",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){return{result:{type:"bindings",bindingsStream:new i.NestedLoopJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,n.ActorRdfJoin.joinBindings,{optional:!0,autoStart:!1}),metadata:async()=>await this.constructResultMetadata(e.entries,await n.ActorRdfJoin.getMetadatas(e.entries),e.context,{canContainUndefs:!0})}}}async getJoinCoefficients(e,t){const r=n.ActorRdfJoin.getRequestInitialTimes(t),i=n.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value*t[1].cardinality.value,persistedItems:0,blockingItems:0,requestTime:r[0]+t[0].cardinality.value*i[0]+r[1]+t[1].cardinality.value*i[1]}}}t.ActorRdfJoinOptionalNestedLoop=a},9391:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(67757),t)},7218:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JoinTypes=t.ActorRdfJoinSelectivityVariableCounting=void 0;const n=r(75245),i=r(31578);class a extends n.ActorRdfJoinSelectivity{constructor(e){super(e)}async test(e){return{accuracy:.5}}static getPatternCost(e){let t=1;return"Variable"===e.subject.termType&&(t+=4),"Variable"!==e.predicate.termType&&e.type!==i.Algebra.types.PATH||(t+=1),"Variable"===e.object.termType&&(t+=2),"Variable"===e.graph.termType&&(t+=1),t/9}static getJoinTypes(e,t){const r=[];return"Variable"===e.subject.termType?(e.subject.equals(t.subject)&&r.push(o.unboundSS),"pattern"===t.type&&e.subject.equals(t.predicate)&&r.push(o.unboundSP),e.subject.equals(t.object)&&r.push(o.unboundSO),e.subject.equals(t.graph)&&r.push(o.unboundSG)):(e.subject.equals(t.subject)&&r.push(o.boundSS),"pattern"===t.type&&e.subject.equals(t.predicate)&&r.push(o.boundSP),e.subject.equals(t.object)&&r.push(o.boundSO),e.subject.equals(t.graph)&&r.push(o.boundSG)),"pattern"===e.type&&("Variable"===e.predicate.termType?(e.predicate.equals(t.subject)&&r.push(o.unboundPS),"pattern"===t.type&&e.predicate.equals(t.predicate)&&r.push(o.unboundPP),e.predicate.equals(t.object)&&r.push(o.unboundPO),e.predicate.equals(t.graph)&&r.push(o.unboundPG)):(e.predicate.equals(t.subject)&&r.push(o.boundPS),"pattern"===t.type&&e.predicate.equals(t.predicate)&&r.push(o.boundPP),e.predicate.equals(t.object)&&r.push(o.boundPO),e.predicate.equals(t.graph)&&r.push(o.boundPG))),"Variable"===e.object.termType?(e.object.equals(t.subject)&&r.push(o.unboundOS),"pattern"===t.type&&e.object.equals(t.predicate)&&r.push(o.unboundOP),e.object.equals(t.object)&&r.push(o.unboundOO),e.object.equals(t.graph)&&r.push(o.unboundOG)):(e.object.equals(t.subject)&&r.push(o.boundOS),"pattern"===t.type&&e.object.equals(t.predicate)&&r.push(o.boundOP),e.object.equals(t.object)&&r.push(o.boundOO),e.object.equals(t.graph)&&r.push(o.boundOG)),"Variable"===e.graph.termType?(e.graph.equals(t.subject)&&r.push(o.unboundGS),"pattern"===t.type&&e.graph.equals(t.predicate)&&r.push(o.unboundGP),e.graph.equals(t.object)&&r.push(o.unboundGO),e.graph.equals(t.graph)&&r.push(o.unboundGG)):(e.graph.equals(t.subject)&&r.push(o.boundGS),"pattern"===t.type&&e.graph.equals(t.predicate)&&r.push(o.boundGP),e.graph.equals(t.object)&&r.push(o.boundGO),e.graph.equals(t.graph)&&r.push(o.boundGG)),r}static getOperationsPairwiseJoinCost(e,t){let r=a.MAX_PAIRWISE_COST;for(const n of a.getJoinTypes(e,t))switch(n){case o.boundSS:r-=4;break;case o.boundSP:r-=6;break;case o.boundSO:r-=2;break;case o.boundSG:case o.boundPS:r-=6;break;case o.boundPP:return 1;case o.boundPO:case o.boundPG:r-=6;break;case o.boundOS:r-=2;break;case o.boundOP:r-=6;break;case o.boundOO:r-=2;break;case o.boundOG:case o.boundGS:case o.boundGP:case o.boundGO:case o.boundGG:r-=6;break;case o.unboundSS:r-=2;break;case o.unboundSP:r-=3;break;case o.unboundSO:r-=1;break;case o.unboundSG:case o.unboundPS:case o.unboundPP:case o.unboundPO:case o.unboundPG:r-=3;break;case o.unboundOS:r-=1;break;case o.unboundOP:r-=3;break;case o.unboundOO:r-=1;break;case o.unboundOG:case o.unboundGS:case o.unboundGP:case o.unboundGO:case o.unboundGG:r-=3}return r/a.MAX_PAIRWISE_COST}static getOperationsJoinCost(e){const t=[];for(const r of e)i.Util.recurseOperation(r,{[i.Algebra.types.PATTERN]:e=>(t.push(e),!1),[i.Algebra.types.PATH]:e=>(t.push(e),!1)});let r=0,n=0;for(const e of t)for(const i of t)e!==i&&(r+=a.getOperationsPairwiseJoinCost(e,i),n++);return 0===n?1:r/n*t.reduce(((e,t)=>e*a.getPatternCost(t)),1)}async run(e){return e.entries.length<=1?{selectivity:1}:{selectivity:a.getOperationsJoinCost(e.entries.map((e=>e.operation)))}}}var o;t.ActorRdfJoinSelectivityVariableCounting=a,a.MAX_PAIRWISE_COST=82,function(e){e[e.boundSS=0]="boundSS",e[e.boundSP=1]="boundSP",e[e.boundSO=2]="boundSO",e[e.boundSG=3]="boundSG",e[e.boundPS=4]="boundPS",e[e.boundPP=5]="boundPP",e[e.boundPO=6]="boundPO",e[e.boundPG=7]="boundPG",e[e.boundOS=8]="boundOS",e[e.boundOP=9]="boundOP",e[e.boundOO=10]="boundOO",e[e.boundOG=11]="boundOG",e[e.boundGS=12]="boundGS",e[e.boundGP=13]="boundGP",e[e.boundGO=14]="boundGO",e[e.boundGG=15]="boundGG",e[e.unboundSS=16]="unboundSS",e[e.unboundSP=17]="unboundSP",e[e.unboundSO=18]="unboundSO",e[e.unboundSG=19]="unboundSG",e[e.unboundPS=20]="unboundPS",e[e.unboundPP=21]="unboundPP",e[e.unboundPO=22]="unboundPO",e[e.unboundPG=23]="unboundPG",e[e.unboundOS=24]="unboundOS",e[e.unboundOP=25]="unboundOP",e[e.unboundOO=26]="unboundOO",e[e.unboundOG=27]="unboundOG",e[e.unboundGS=28]="unboundGS",e[e.unboundGP=29]="unboundGP",e[e.unboundGO=30]="unboundGO",e[e.unboundGG=31]="unboundGG"}(o||(t.JoinTypes=o={}))},16703:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(7218),t)},66479:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulateCanContainUndefs=void 0;const n=r(49877);class i extends n.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){if("initialize"===e.mode)return{metadata:{canContainUndefs:!1}};let t=e.accumulatedMetadata.canContainUndefs;return e.appendingMetadata.canContainUndefs&&(t=!0),{metadata:{canContainUndefs:t}}}}t.ActorRdfMetadataAccumulateCanContainUndefs=i},27988:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(66479),t)},80547:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulateCardinality=void 0;const n=r(49877);class i extends n.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){if("initialize"===e.mode)return{metadata:{cardinality:{type:"exact",value:0}}};const t={...e.accumulatedMetadata.cardinality};if(t.dataset){if(!e.appendingMetadata.cardinality.dataset)return{metadata:{cardinality:t}};if(t.dataset!==e.appendingMetadata.cardinality.dataset&&e.appendingMetadata.subsetOf===t.dataset)return{metadata:{cardinality:e.appendingMetadata.cardinality}};if(t.dataset===e.appendingMetadata.cardinality.dataset)return{metadata:{cardinality:t}};delete t.dataset}return e.appendingMetadata.cardinality&&Number.isFinite(e.appendingMetadata.cardinality.value)?("estimate"===e.appendingMetadata.cardinality.type&&(t.type="estimate"),t.value+=e.appendingMetadata.cardinality.value):(t.type="estimate",t.value=Number.POSITIVE_INFINITY),{metadata:{cardinality:t}}}}t.ActorRdfMetadataAccumulateCardinality=i},67243:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(80547),t)},15881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulatePageSize=void 0;const n=r(49877);class i extends n.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){return"initialize"===e.mode?{metadata:{}}:{metadata:{..."pageSize"in e.accumulatedMetadata||"pageSize"in e.appendingMetadata?{pageSize:(e.accumulatedMetadata.pageSize??0)+(e.appendingMetadata.pageSize??0)}:{}}}}}t.ActorRdfMetadataAccumulatePageSize=i},91475:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(15881),t)},68951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulateRequestTime=void 0;const n=r(49877);class i extends n.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){return"initialize"===e.mode?{metadata:{}}:{metadata:{..."requestTime"in e.accumulatedMetadata||"requestTime"in e.appendingMetadata?{requestTime:(e.accumulatedMetadata.requestTime??0)+(e.appendingMetadata.requestTime??0)}:{}}}}}t.ActorRdfMetadataAccumulateRequestTime=i},26719:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(68951),t)},85702:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAll=void 0;const n=r(52628),i=r(58521);class a extends n.ActorRdfMetadata{constructor(e){super(e)}async test(e){return!0}async run(e){const t=new i.Readable({objectMode:!0}),r=new i.Readable({objectMode:!0});e.quads.on("error",(e=>{t.emit("error",e),r.emit("error",e)})),e.quads.on("end",(()=>{t.push(null),r.push(null)}));const n=t._read=r._read=i=>{for(;i>0;){const a=e.quads.read();if(null===a)return e.quads.once("readable",(()=>n(i)));i--,t.push(a),r.push(a)}};return{data:t,metadata:r}}}t.ActorRdfMetadataAll=a},64443:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(85702),t)},94425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractAllowHttpMethods=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){const t={};return e.headers?.get("allow")&&(t.allowHttpMethods=e.headers.get("allow")?.split(/, */u)),{metadata:t}}}t.ActorRdfMetadataExtractAllowHttpMethods=i},40751:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(94425),t)},30066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractHydraControls=void 0;const n=r(10800),i=r(68492);class a extends n.ActorRdfMetadataExtract{constructor(e){super(e),this.parsedUriTemplateCache={}}async test(e){return!0}getLinks(e,t){return Object.fromEntries(a.LINK_TYPES.map((r=>{const n=t[r]||t[`${r}Page`],i=n&&n[e];return[r,i&&i.length>0?[i[0]]:[]]})))}parseUriTemplateCached(e){return this.parsedUriTemplateCache[e]||(this.parsedUriTemplateCache[e]=(0,i.parse)(e))}getSearchForms(e){const t=e.search,r=[];if(t)for(const n in t)for(const i of t[n]){const t=(e.template||{})[i]||[];if(1!==t.length)throw new Error(`Expected 1 hydra:template for ${i}`);const a=t[0],o=this.parseUriTemplateCached(a),s=Object.fromEntries(((e.mapping||{})[i]||[]).map((t=>{const r=((e.variable||{})[t]||[])[0],n=((e.property||{})[t]||[])[0];if(!r)throw new Error(`Expected a hydra:variable for ${t}`);if(!n)throw new Error(`Expected a hydra:property for ${t}`);return[n,r]}))),c=e=>o.expand(Object.fromEntries(Object.keys(e).map((t=>[s[t],e[t]]))));r.push({dataset:n,template:a,mappings:s,getUri:c})}return{values:r}}getHydraProperties(e){return new Promise(((t,r)=>{e.on("error",r);const n={};e.on("data",(e=>{if(e.predicate.value.startsWith(a.HYDRA)){const t=e.predicate.value.slice(a.HYDRA.length),r=n[t]||(n[t]={});(r[e.subject.value]||(r[e.subject.value]=[])).push(e.object.value)}})),e.on("end",(()=>t(n)))}))}async run(e){const t={},r=await this.getHydraProperties(e.metadata);return Object.assign(t,this.getLinks(e.url,r)),t.searchForms=this.getSearchForms(r),{metadata:t}}}t.ActorRdfMetadataExtractHydraControls=a,a.HYDRA="http://www.w3.org/ns/hydra/core#",a.LINK_TYPES=["first","next","previous","last"]},85405:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(30066),t)},68714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractHydraCount=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}run(e){return new Promise(((t,r)=>{e.metadata.on("error",r),e.metadata.on("data",(e=>{this.predicates.includes(e.predicate.value)&&t({metadata:{cardinality:{type:"estimate",value:Number.parseInt(e.object.value,10),dataset:e.subject.value}}})})),e.metadata.on("end",(()=>{t({metadata:{cardinality:{type:"estimate",value:0}}})}))}))}}t.ActorRdfMetadataExtractHydraCount=i},57586:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(68714),t)},77690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractHydraPagesize=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return new Promise(((t,r)=>{e.metadata.on("error",r),e.metadata.on("data",(e=>{this.predicates.includes(e.predicate.value)&&t({metadata:{pageSize:Number.parseInt(e.object.value,10)}})})),e.metadata.on("end",(()=>{t({metadata:{}})}))}))}}t.ActorRdfMetadataExtractHydraPagesize=i},54777:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(77690),t)},43875:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractPatchSparqlUpdate=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){const t={};return(e.headers?.get("accept-patch")?.includes("application/sparql-update")??e.headers?.get("ms-author-via")?.includes("SPARQL"))&&(t.patchSparqlUpdate=!0),{metadata:t}}}t.ActorRdfMetadataExtractPatchSparqlUpdate=i},55282:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(43875),t)},86312:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractPutAccepted=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){const t={};return e.headers?.get("accept-put")&&(t.putAccepted=e.headers.get("accept-put")?.split(/, */u)),{metadata:t}}}t.ActorRdfMetadataExtractPutAccepted=i},44549:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(86312),t)},66468:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractRequestTime=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return{metadata:{requestTime:e.requestTime}}}}t.ActorRdfMetadataExtractRequestTime=i},7445:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(66468),t)},42214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractSparqlService=void 0;const n=r(10800),i=r(9929);class a extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return new Promise(((t,r)=>{e.metadata.on("error",r);const n={};e.metadata.on("data",(t=>{"http://www.w3.org/ns/sparql-service-description#endpoint"!==t.predicate.value||"BlankNode"!==t.subject.termType&&t.subject.value!==e.url?"http://www.w3.org/ns/sparql-service-description#defaultGraph"===t.predicate.value&&(n.defaultGraph=t.object.value):(n.sparqlService="Literal"===t.object.termType?(0,i.resolve)(t.object.value,e.url):t.object.value,this.inferHttpsEndpoint&&e.url.startsWith("https")&&!n.sparqlService.startsWith("https")&&(n.sparqlService=n.sparqlService.replace("http:","https:")))})),e.metadata.on("end",(()=>{t({metadata:n})}))}))}}t.ActorRdfMetadataExtractSparqlService=a},3187:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(42214),t)},82889:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataPrimaryTopic=void 0;const n=r(52628),i=r(58521);class a extends n.ActorRdfMetadata{constructor(e){super(e)}async test(e){if(e.triples)throw new Error("This actor only supports non-triple quad streams.");return!0}async run(e){const t=new i.Readable({objectMode:!0}),r=new i.Readable({objectMode:!0}),n=()=>{t._read=r._read=()=>{},e.quads.on("error",(e=>{t.emit("error",e),r.emit("error",e)}));const n={};let i;const a={};e.quads.on("data",(t=>{"http://rdfs.org/ns/void#subset"===t.predicate.value&&t.object.value===e.url?i=t.subject.value:"http://xmlns.com/foaf/0.1/primaryTopic"===t.predicate.value&&(a[t.object.value]=t.subject.value);let r=n[t.graph.value];r||(r=n[t.graph.value]=[]),r.push(t)})),e.quads.on("end",(()=>{const e=i?a[i]:void 0;for(const i in n)if(i===e){for(const e of n[i])r.push(e);if(this.metadataToData)for(const e of n[i])t.push(e)}else{for(const e of n[i])t.push(e);if(!e&&this.dataToMetadataOnInvalidMetadataGraph)for(const e of n[i])r.push(e)}t.push(null),r.push(null)}))};return t._read=r._read=()=>{n()},{data:t,metadata:r}}}t.ActorRdfMetadataPrimaryTopic=a},80848:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(82889),t)},99209:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlMicrodata=void 0;const n=r(65446),i=r(5558);class a extends n.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=e.headers?e.headers.get("content-type"):null,r=t?.includes("xml"),n=new i.MicrodataRdfParser({baseIRI:e.baseIRI,xmlMode:r});n.on("error",e.error),n.on("data",e.emit);const a=n.onEnd;return n.onEnd=()=>{a.call(n),e.end()},{htmlParseListener:n}}}t.ActorRdfParseHtmlMicrodata=a},42421:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(99209),t)},39149:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlRdfa=void 0;const n=r(65446),i=r(21860);class a extends n.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=e.headers?e.headers.get("content-type"):null,r=(e.headers&&e.headers.get("content-language"))??void 0,n=t&&t.includes("xml")?"xhtml":"html",a=new i.RdfaParser({baseIRI:e.baseIRI,profile:n,language:r});a.on("error",e.error),a.on("data",e.emit);const o=a.onEnd;return a.onEnd=()=>{o.call(a),e.end()},{htmlParseListener:a}}}t.ActorRdfParseHtmlRdfa=a},26585:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(39149),t)},42601:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlScript=void 0;const n=r(65446),i=r(14107);class a extends n.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=(await this.mediatorRdfParseMediatypes.mediate({context:e.context,mediaTypes:!0})).mediaTypes;return{htmlParseListener:new i.HtmlScriptListener(this.mediatorRdfParseHandle,e.emit,e.error,e.end,t,e.context,e.baseIRI,e.headers)}}}t.ActorRdfParseHtmlScript=a},14107:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HtmlScriptListener=void 0;const n=r(32227),i=r(58521),a=r(9929);class o{constructor(e,t,r,i,a,o,s,c){this.textChunksJsonLd=[],this.endBarrier=1,this.passedScripts=0,this.isFinalJsonLdProcessing=!1,this.mediatorRdfParseHandle=e,this.cbQuad=t,this.cbError=r,this.cbEnd=i,this.supportedTypes=a,this.context=o.set(n.KeysRdfParseHtmlScript.processingHtmlScript,!0),this.baseIRI=s,this.headers=c,this.onlyFirstScript=!1===o.get(n.KeysRdfParseHtmlScript.extractAllScripts);const u=this.baseIRI.indexOf("#");this.targetScriptId=u>0?this.baseIRI.slice(u+1,this.baseIRI.length):null}static newErrorCoded(e,t){const r=new Error(e);return r.code=t,r}onEnd(){0==--this.endBarrier&&(this.textChunksJsonLd.length>0?(this.handleMediaType="application/ld+json",this.textChunks=this.textChunksJsonLd,this.textChunks.push("]"),this.textChunksJsonLd=[],this.isFinalJsonLdProcessing=!0,this.endBarrier++,this.onTagClose()):(0===this.passedScripts&&this.targetScriptId&&this.cbError(o.newErrorCoded(`Failed to find targeted script id "${this.targetScriptId}"`,"loading document failed")),this.cbEnd()),this.isFinalJsonLdProcessing=!1)}onTagClose(){if(this.handleMediaType)if(this.requiresCustomJsonLdHandling(this.handleMediaType)&&!this.isFinalJsonLdProcessing)this.handleMediaType=void 0,this.textChunks=void 0,this.onEnd();else{const e=new i.Readable({objectMode:!0});e._read=()=>{};const t=this.textChunks,r={context:this.context,handle:{metadata:{baseIRI:this.baseIRI},data:e,headers:this.headers,context:this.context},handleMediaType:this.handleMediaType};this.mediatorRdfParseHandle.mediate(r).then((({handle:r})=>{r.data.on("error",(e=>this.cbError(o.newErrorCoded(e.message,"invalid script element")))).on("data",this.cbQuad).on("end",(()=>this.onEnd()));for(const r of t)e.push(r);e.push(null)})).catch((e=>{this.targetScriptId?this.cbError(o.newErrorCoded(e.message,"loading document failed")):this.onEnd()})),this.handleMediaType=void 0,this.textChunks=void 0}}onTagOpen(e,t){"base"===e&&t.href&&(this.baseIRI=(0,a.resolve)(t.href,this.baseIRI)),"script"!==e||this.targetScriptId&&t.id!==this.targetScriptId?this.handleMediaType=void 0:this.supportedTypes[t.type]?this.onlyFirstScript&&this.passedScripts>0?this.handleMediaType=void 0:(this.passedScripts++,this.handleMediaType=t.type,this.endBarrier++,this.requiresCustomJsonLdHandling(this.handleMediaType)?(this.textChunks=this.textChunksJsonLd,this.textChunks.push(0===this.textChunks.length?"[":",")):this.textChunks=[]):this.targetScriptId&&this.cbError(o.newErrorCoded(`Targeted script "${this.targetScriptId}" does not have a supported type`,"loading document failed"))}onText(e){this.handleMediaType&&this.textChunks.push(e)}requiresCustomJsonLdHandling(e){return!this.onlyFirstScript&&!this.targetScriptId&&"application/ld+json"===e}}t.HtmlScriptListener=o},3549:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(42601),t)},70256:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtml=void 0;const n=r(54592),i=r(41173),a=r(58521);class o extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const n=new a.Readable({objectMode:!0});n._read=()=>{};let o=0,s=1;function c(e){n.emit("error",e)}function u(){0==--s&&n.push(null)}const l={baseIRI:e.metadata?.baseIRI??"",context:r,emit:e=>{o--,n.push(e)},end:u,error:c,headers:e.headers};try{const t=await Promise.all(this.busRdfParseHtml.publish(l));s+=t.length;const r=[];for(const e of t){const{htmlParseListener:t}=await e.actor.run(l);r.push(t)}const a=new i.Parser({onclosetag(){try{for(const e of r)e.onTagClose()}catch(e){c(e)}},onend(){try{for(const e of r)e.onEnd()}catch(e){c(e)}u()},onopentag(e,t){try{for(const n of r)n.onTagOpen(e,t)}catch(e){c(e)}},ontext(e){try{for(const t of r)t.onText(e)}catch(e){c(e)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:!1}),d=n._read=t=>{for(o=Math.max(t,o);o>0;){const t=e.data.read();if(null===t)return void e.data.once("readable",(()=>d(0)));a.write(t.toString())}};e.data.on("error",c).on("end",(()=>a.end()))}catch(e){setTimeout((()=>{n.emit("error",e)}))}return{data:n}}}t.ActorRdfParseHtml=o},28955:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(70256),t)},61364:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseJsonLd=void 0;const n=r(54592),i=r(32227),a=r(50631),o=r(11817);class s extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async testHandle(e,t,r){if(r.has(i.KeysRdfParseHtmlScript.processingHtmlScript)&&"application/ld+json"!==t)throw new Error("JSON-LD in script tags can only have media type 'application/ld+json'");if(!t||!(t in this.mediaTypePriorities)&&!t.endsWith("+json"))throw new Error(`Unrecognized media type: ${t}`);return await this.testHandleChecked(e)}async runHandle(e,t,r){return{data:a.JsonLdParser.fromHttpResponse(e.metadata?.baseIRI??"",t,e.headers,{documentLoader:r.get(i.KeysRdfParseJsonLd.documentLoader)??new o.DocumentLoaderMediated(this.mediatorHttp,r),strictValues:r.get(i.KeysRdfParseJsonLd.strictValues),...r.get(i.KeysRdfParseJsonLd.parserOptions)}).import(e.data)}}}t.ActorRdfParseJsonLd=s},11817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLoaderMediated=void 0;const n=r(74870),i=r(27202),a=r(76574);class o extends i.FetchDocumentLoader{constructor(e,t){super(o.createFetcher(e,t)),this.mediatorHttp=e,this.context=t}static createFetcher(e,t){return async(r,i)=>{const o=await e.mediate({input:r,init:i,context:t});return o.json=async()=>JSON.parse(await a(n.ActorHttp.toNodeReadable(o.body))),o}}}t.DocumentLoaderMediated=o},54168:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(61364),t),i(r(11817),t)},20164:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseN3=void 0;const n=r(54592),i=r(72243);class a extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){e.data.on("error",(e=>n.emit("error",e)));const n=e.data.pipe(new i.StreamParser({baseIRI:e.metadata?.baseIRI,format:t.endsWith("n3")?t:`${t}*`}));return{data:n,metadata:{triples:"text/turtle"===t||"application/n-triples"===t||"text/n3"===t}}}}t.ActorRdfParseN3=a},62917:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(20164),t)},61536:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseRdfXml=void 0;const n=r(54592),i=r(97990);class a extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e){e.data.on("error",(e=>t.emit("error",e)));const t=e.data.pipe(new i.RdfXmlParser({baseIRI:e.metadata?.baseIRI}));return{data:t,metadata:{triples:!0}}}}t.ActorRdfParseRdfXml=a},21487:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(61536),t)},62940:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseShaclc=void 0;const n=r(54592),i=r(58521),a=r(21762),o=r(76574),s=r(76268);class c extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const n=new s.PrefixWrappingIterator(o(e.data).then((r=>(0,a.parse)(r,{extendedSyntax:"text/shaclc-ext"===t,baseIRI:e.metadata?.baseIRI})))),c=new i.Readable({objectMode:!0});return n.on("prefix",((...e)=>c.emit("prefix",...e))),{data:c.wrap(n),metadata:{triples:!0}}}}t.ActorRdfParseShaclc=c},76268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrefixWrappingIterator=void 0;const n=r(76664);class i extends n.WrappingIterator{constructor(e){super(e?.then((e=>(this.prefixes=e.prefixes,e))))}read(){if(this.prefixes){for(const e of Object.entries(this.prefixes))this.emit("prefix",...e);delete this.prefixes}return super.read()}}t.PrefixWrappingIterator=i},43352:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(62940),t)},91689:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseXmlRdfa=void 0;const n=r(54592),i=r(21860);class a extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const n=(e.headers&&e.headers.get("content-language"))??void 0;e.data.on("error",(e=>a.emit("error",e)));const a=e.data.pipe(new i.RdfaParser({baseIRI:e.metadata?.baseIRI,profile:"xml",language:n}));return{data:a,metadata:{triples:!0}}}}t.ActorRdfParseXmlRdfa=a},8137:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(91689),t)},43476:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveHypermediaLinksNext=void 0;const n=r(22124);class i extends n.ActorRdfResolveHypermediaLinks{constructor(e){super(e)}async test(e){if(!e.metadata.next||0===e.metadata.next.length)throw new Error(`Actor ${this.name} requires a 'next' metadata entry.`);return!0}async run(e){return{links:e.metadata.next.map((e=>({url:e})))}}}t.ActorRdfResolveHypermediaLinksNext=i},34541:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(43476),t)},18553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveHypermediaLinksQueueFifo=void 0;const n=r(56102),i=r(7381);class a extends n.ActorRdfResolveHypermediaLinksQueue{constructor(e){super(e)}async test(e){return!0}async run(e){return{linkQueue:new i.LinkQueueFifo}}}t.ActorRdfResolveHypermediaLinksQueueFifo=a},7381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkQueueFifo=void 0,t.LinkQueueFifo=class{constructor(){this.links=[]}push(e){return this.links.push(e),!0}getSize(){return this.links.length}isEmpty(){return 0===this.links.length}pop(){return this.links.shift()}peek(){return this.links[0]}}},34120:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(18553),t),i(r(7381),t)},63986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerializeJsonLd=void 0;const n=r(84025),i=r(85832);class a extends n.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const n=new i.JsonLdSerializer({space:" ".repeat(this.jsonStringifyIndentSpaces)});let a;return"pipe"in e.quadStream?(e.quadStream.on("error",(e=>n.emit("error",e))),a=e.quadStream.pipe(n)):a=n.import(e.quadStream),{data:a}}}t.ActorRdfSerializeJsonLd=a},21935:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(63986),t)},34574:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerializeN3=void 0;const n=r(84025),i=r(72243);class a extends n.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t){const r=new i.StreamWriter({format:t});let n;return"pipe"in e.quadStream?(e.quadStream.on("error",(e=>r.emit("error",e))),n=e.quadStream.pipe(r)):n=r.import(e.quadStream),{data:n,triples:"text/turtle"===t||"application/n-triples"===t||"text/n3"===t}}}t.ActorRdfSerializeN3=a},28510:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(34574),t)},80614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerializeShaclc=void 0;const n=r(84025),i=r(37754),a=r(58521),o=r(22939);class s extends n.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t){const r=new a.Readable;r._read=()=>{};try{const n={};e.quadStream.on("prefix",((e,t)=>{n[e]=t}));const{text:a}=await(0,o.write)(await(0,i.default)(e.quadStream),{errorOnUnused:!0,extendedSyntax:"text/shaclc-ext"===t,prefixes:n});r.push(a),r.push(null)}catch(e){r._read=()=>{r.emit("error",e)}}return{data:r,triples:!0}}}t.ActorRdfSerializeShaclc=s},49343:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(80614),t)},60927:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateHypermediaPatchSparqlUpdate=void 0;const n=r(25345),i=r(92168);class a extends n.ActorRdfUpdateHypermedia{constructor(e){super(e,"patchSparqlUpdate")}async testMetadata(e){if(!e.forceDestinationType&&!e.metadata.patchSparqlUpdate)throw new Error(`Actor ${this.name} could not detect a destination with 'application/sparql-update' as 'Accept-Patch' header.`);if(!e.forceDestinationType&&!e.exists)throw new Error(`Actor ${this.name} can only patch a destination that already exists.`);return!0}async run(e){return this.logInfo(e.context,`Identified as patchSparqlUpdate destination: ${e.url}`),{destination:new i.QuadDestinationPatchSparqlUpdate(e.url,e.context,this.mediatorHttp)}}}t.ActorRdfUpdateHypermediaPatchSparqlUpdate=a},92168:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuadDestinationPatchSparqlUpdate=void 0;const n=r(74870),i=r(10288),a=r(64817),o=r(58521);t.QuadDestinationPatchSparqlUpdate=class{constructor(e,t,r){this.url=e,this.context=t,this.mediatorHttp=r}insert(e){return this.wrapSparqlUpdateRequest("INSERT",e)}async delete(e){return this.wrapSparqlUpdateRequest("DELETE",e)}async wrapSparqlUpdateRequest(e,t){const r=t.map((e=>{let t=`${(0,a.termToString)(e.subject)} ${(0,a.termToString)(e.predicate)} ${(0,a.termToString)(e.object)} .`;return t="DefaultGraph"===e.graph.termType?` ${t}\n`:` GRAPH ${(0,a.termToString)(e.graph)} { ${t} }\n`,t})).prepend([`${e} DATA {\n`]).append(["}"]),s=new o.Readable;s.wrap(r);const c=new i.Headers({"content-type":"application/sparql-update"}),u=await this.mediatorHttp.mediate({context:this.context,init:{headers:c,method:"PATCH",body:n.ActorHttp.toWebReadableStream(s)},input:this.url});await(0,n.validateAndCloseHttpResponse)(this.url,u)}async deleteGraphs(e,t,r){throw new Error("Patch-based SPARQL Update destinations don't support named graphs")}async createGraphs(e,t){throw new Error("Patch-based SPARQL Update destinations don't support named graphs")}}},87057:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(60927),t),i(r(92168),t)},26348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateHypermediaPutLdp=void 0;const n=r(25345),i=r(99713);class a extends n.ActorRdfUpdateHypermedia{constructor(e){super(e,"putLdp")}async testMetadata(e){if(!e.forceDestinationType){if(!e.metadata.allowHttpMethods||!e.metadata.allowHttpMethods.includes("PUT"))throw new Error(`Actor ${this.name} could not detect a destination with 'Allow: PUT' header.`);if(e.exists)throw new Error(`Actor ${this.name} can only put on a destination that does not already exists.`)}return!0}async run(e){return this.logInfo(e.context,`Identified as putLdp destination: ${e.url}`),{destination:new i.QuadDestinationPutLdp(e.url,e.context,e.metadata.putAccepted||[],this.mediatorHttp,this.mediatorRdfSerializeMediatypes,this.mediatorRdfSerialize)}}}t.ActorRdfUpdateHypermediaPutLdp=a},99713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuadDestinationPutLdp=void 0;const n=r(74870),i=r(10288);t.QuadDestinationPutLdp=class{constructor(e,t,r,n,i,a){this.url=e,this.context=t,this.mediaTypes=r,this.mediatorHttp=n,this.mediatorRdfSerializeMediatypes=i,this.mediatorRdfSerialize=a}insert(e){return this.wrapRdfUpdateRequest("INSERT",e)}async delete(e){throw new Error("Put-based LDP destinations don't support deletions")}async wrapRdfUpdateRequest(e,t){const{mediaTypes:r}=await this.mediatorRdfSerializeMediatypes.mediate({context:this.context,mediaTypes:!0}),a=this.mediaTypes.filter((e=>e in r)),o=a.length>0?a[0]:Object.keys(r).sort(((e,t)=>r[t]-r[e]))[0],{handle:{data:s}}=await this.mediatorRdfSerialize.mediate({context:this.context,handle:{quadStream:t,context:this.context},handleMediaType:o}),c=new i.Headers({"content-type":o}),u=await this.mediatorHttp.mediate({context:this.context,init:{headers:c,method:"PUT",body:n.ActorHttp.toWebReadableStream(s)},input:this.url});await(0,n.validateAndCloseHttpResponse)(this.url,u)}async deleteGraphs(e,t,r){throw new Error("Put-based LDP destinations don't support named graphs")}async createGraphs(e,t){throw new Error("Put-based LDP destinations don't support named graphs")}}},3047:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(26348),t),i(r(99713),t)},33179:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateHypermediaSparql=void 0;const n=r(25345),i=r(89084);class a extends n.ActorRdfUpdateHypermedia{constructor(e){super(e,"sparql")}async testMetadata(e){if(!(e.forceDestinationType||e.metadata.sparqlService||this.checkUrlSuffixSparql&&e.url.endsWith("/sparql")||this.checkUrlSuffixUpdate&&e.url.endsWith("/update")))throw new Error(`Actor ${this.name} could not detect a SPARQL service description or URL ending on /sparql or /update.`);return!0}async run(e){return this.logInfo(e.context,`Identified as sparql destination: ${e.url}`),{destination:new i.QuadDestinationSparql(e.metadata.sparqlService||e.url,e.context,this.mediatorHttp)}}}t.ActorRdfUpdateHypermediaSparql=a},89084:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuadDestinationSparql=void 0;const n=r(74190),i=r(64817),a=r(76574);t.QuadDestinationSparql=class{constructor(e,t,r){this.url=e,this.context=t,this.mediatorHttp=r,this.endpointFetcher=new n.SparqlEndpointFetcher({fetch:(e,t)=>this.mediatorHttp.mediate({input:e,init:t,context:this.context}),prefixVariableQuestionMark:!0})}insert(e){return this.wrapSparqlUpdateRequest("INSERT",e)}async delete(e){return this.wrapSparqlUpdateRequest("DELETE",e)}async wrapSparqlUpdateRequest(e,t){const r=t.map((e=>{let t=`${(0,i.termToString)(e.subject)} ${(0,i.termToString)(e.predicate)} ${(0,i.termToString)(e.object)} .`;return t="DefaultGraph"===e.graph.termType?` ${t}\n`:` GRAPH ${(0,i.termToString)(e.graph)} { ${t} }\n`,t})).prepend([`${e} DATA {\n`]).append(["}"]),n=await a(r);await this.endpointFetcher.fetchUpdate(this.url,n)}async deleteGraphs(e,t,r){const n=Array.isArray(e)?e:[e],i=[];for(const e of n){let n;n="string"==typeof e?e:"DefaultGraph"===e.termType?"DEFAULT":`GRAPH <${e.value}>`,i.push(`${r?"DROP":"CLEAR"} ${t?"":"SILENT "}${n}`)}await this.endpointFetcher.fetchUpdate(this.url,i.join("; "))}async createGraphs(e,t){const r=[];for(const n of e)r.push(`CREATE${t?"":" SILENT"} GRAPH <${n.value}>`);await this.endpointFetcher.fetchUpdate(this.url,r.join("; "))}}},58916:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(33179),t),i(r(89084),t)},24657:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuadsHypermedia=void 0;const n=r(86789),i=r(35069);class a extends n.ActorRdfUpdateQuadsDestination{constructor(e){super(e),this.cache=this.cacheSize?new i.LRUCache({max:this.cacheSize}):void 0;const t=this.cache;t&&this.httpInvalidator.addInvalidateListener((({url:e})=>e?t.delete(e):t.clear()))}async test(e){if(!(0,n.getContextDestinationUrl)((0,n.getContextDestination)(e.context)))throw new Error(`Actor ${this.name} can only update quads against a single destination URL.`);return!0}getDestination(e){const t=(0,n.getContextDestination)(e);let r=(0,n.getContextDestinationUrl)(t);if(this.cache&&this.cache.has(r))return this.cache.get(r);const i=(async()=>{let i,a;try{const t=await this.mediatorDereferenceRdf.mediate({context:e,url:r,acceptErrors:!0});a=t.exists,r=t.url;const n=await this.mediatorMetadata.mediate({context:e,url:r,quads:t.data,triples:t.metadata?.triples});i=(await this.mediatorMetadataExtract.mediate({context:e,url:r,metadata:n.metadata,headers:t.headers,requestTime:t.requestTime})).metadata}catch{i={},a=!1}const{destination:o}=await this.mediatorRdfUpdateHypermedia.mediate({context:e,url:r,metadata:i,exists:a,forceDestinationType:(0,n.getDataDestinationType)(t)});return o})();return this.cache&&this.cache.set(r,i),i}}t.ActorRdfUpdateQuadsHypermedia=a},88297:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(24657),t)},88332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuadsRdfJsStore=void 0;const n=r(86789),i=r(38268);class a extends n.ActorRdfUpdateQuadsDestination{constructor(e){super(e)}async test(e){const t=(0,n.getContextDestination)(e.context);if(!t||"string"==typeof t||!("remove"in t)&&"value"in t&&!t.value.remove)throw new Error(`${this.name} received an invalid rdfjsStore.`);return!0}async getDestination(e){const t=(0,n.getContextDestination)(e);return new i.RdfJsQuadDestination("remove"in t?t:t.value)}}t.ActorRdfUpdateQuadsRdfJsStore=a},38268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfJsQuadDestination=void 0;const n=r(35033),i=r(18050),a=r(22112),o=new i.DataFactory;t.RdfJsQuadDestination=class{constructor(e){this.store=e}delete(e){return(0,n.promisifyEventEmitter)(this.store.remove(e))}insert(e){return(0,n.promisifyEventEmitter)(this.store.import(e))}async deleteGraphs(e,t,r){switch(e){case"ALL":await(0,n.promisifyEventEmitter)(this.store.deleteGraph(o.defaultGraph()));case"NAMED":const t=this.store.match(),r={};t.on("data",(e=>{"DefaultGraph"!==e.graph.termType&&(r[(0,a.termToString)(e.graph)]=!0)})),await(0,n.promisifyEventEmitter)(t),await Promise.all(Object.keys(r).map((e=>(0,n.promisifyEventEmitter)(this.store.deleteGraph((0,a.stringToTerm)(e))))));break;default:for(const t of Array.isArray(e)?e:[e])await(0,n.promisifyEventEmitter)(this.store.deleteGraph(t))}}async createGraphs(e,t){if(t)for(const t of e){const e=this.store.match(void 0,void 0,void 0,t);await new Promise(((r,n)=>{e.once("data",(()=>{n(new Error(`Unable to create graph ${t.value} as it already exists`))})),e.on("end",r),e.on("error",n)}))}}}},76722:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(88332),t)},67526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bindings=void 0;const n=r(34368),i=r(6081),a=r(17070);class o{constructor(e,t,r){this.type="bindings",this.dataFactory=e,this.entries=t,this.contextHolder=r}has(e){return this.entries.has("string"==typeof e?e:e.value)}get(e){return this.entries.get("string"==typeof e?e:e.value)}set(e,t){return new o(this.dataFactory,this.entries.set("string"==typeof e?e:e.value,t),this.contextHolder)}delete(e){return new o(this.dataFactory,this.entries.delete("string"==typeof e?e:e.value),this.contextHolder)}keys(){return this.mapIterable(this.iteratorToIterable(this.entries.keys()),(e=>this.dataFactory.variable(e)))}values(){return this.iteratorToIterable(this.entries.values())}forEach(e){for(const[t,r]of this.entries.entries())e(r,this.dataFactory.variable(t))}get size(){return this.entries.size}[Symbol.iterator](){return this.mapIterable(this.iteratorToIterable(this.entries.entries()),(([e,t])=>[this.dataFactory.variable(e),t]))[Symbol.iterator]()}equals(e){if(!e)return!1;if(this===e)return!0;if(this.size!==e.size)return!1;for(const t of this.keys())if(!this.get(t)?.equals(e.get(t)))return!1;return!0}filter(e){return new o(this.dataFactory,(0,i.Map)(this.entries.filter(((t,r)=>e(t,this.dataFactory.variable(r))))),this.contextHolder)}map(e){return new o(this.dataFactory,(0,i.Map)(this.entries.map(((t,r)=>e(t,this.dataFactory.variable(r))))),this.contextHolder)}merge(e){const t=new Set([...this.iteratorToIterable(this.entries.keys()),...[...e.keys()].map((e=>e.value))]),r=[];for(const n of t){const t=this.entries.get(n),i=e.get(this.dataFactory.variable(n));if(t&&i&&!t.equals(i))return;const a=t||i;r.push([n,a])}return this.createBindingsWithContexts(r,e)}mergeWith(e,t){const r=new Set([...this.iteratorToIterable(this.entries.keys()),...[...t.keys()].map((e=>e.value))]),n=[];for(const i of r){const r=this.dataFactory.variable(i),a=this.entries.get(i),o=t.get(r);let s;s=a&&o&&!a.equals(o)?e(a,o,r):a||o,n.push([i,s])}return this.createBindingsWithContexts(n,t)}createBindingsWithContexts(e,t){if(this.contextHolder&&this.contextHolder.context){let r=this.contextHolder.context;return"contextHolder"in t&&t.contextHolder&&t.contextHolder.context&&(r=o.mergeContext(this.contextHolder.contextMergeHandlers,r,t.contextHolder.context)),new o(this.dataFactory,(0,i.Map)(e),{contextMergeHandlers:this.contextHolder.contextMergeHandlers,context:r})}return new o(this.dataFactory,(0,i.Map)(e),t.contextHolder)}static mergeContext(e,t,r){const i=[...t.keys(),...r.keys()],a={},o={},s=new Set(r.keys().map((e=>e.name))),c=t.keys().filter((e=>s.has(e.name)));for(const n of i){if(1===o[n.name])continue;o[n.name]=1;const i=c.some((e=>e.name===n.name));e[n.name]&&i?a[n.name]=e[n.name].run(t.get(n),r.get(n)):!e[n.name]&&i||(t.get(n)?r.get(n)||(a[n.name]=t.get(n)):a[n.name]=r.get(n))}return new n.ActionContext(a)}setContextEntry(e,t){return this.setContextEntryRaw(e,t)}setContextEntryRaw(e,t){return this.contextHolder&&this.contextHolder.context?new o(this.dataFactory,this.entries,{contextMergeHandlers:this.contextHolder.contextMergeHandlers,context:this.contextHolder.context.set(e,t)}):new o(this.dataFactory,this.entries,{contextMergeHandlers:this.contextHolder?.contextMergeHandlers??{},context:(new n.ActionContext).set(e,t)})}deleteContextEntry(e){return this.deleteContextEntryRaw(e)}deleteContextEntryRaw(e){return this.contextHolder?new o(this.dataFactory,this.entries,{contextMergeHandlers:this.contextHolder.contextMergeHandlers,context:this.contextHolder.context?.delete(e)}):new o(this.dataFactory,this.entries)}getContext(){return this.contextHolder?.context}getContextEntry(e){return this.getContext()?.get(e)}toString(){return(0,a.bindingsToString)(this)}*mapIterable(e,t){for(const r of e)yield t(r)}iteratorToIterable(e){return{[Symbol.iterator]:()=>e}}}t.Bindings=o},38846:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsFactory=void 0;const n=r(6081),i=r(18050),a=r(67526);class o{constructor(e=new i.DataFactory,t){this.dataFactory=e,this.contextMergeHandlers=t}static async create(e,t){return new o(new i.DataFactory,(await e.mediate({context:t})).mergeHandlers)}bindings(e=[]){return new a.Bindings(this.dataFactory,(0,n.Map)(e.map((([e,t])=>[e.value,t]))),this.contextMergeHandlers?{contextMergeHandlers:this.contextMergeHandlers}:void 0)}fromBindings(e){return this.bindings([...e])}fromRecord(e){return this.bindings(Object.entries(e).map((([e,t])=>[this.dataFactory.variable(e),t])))}}t.BindingsFactory=o},17070:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindingsToString=void 0;const n=r(22112);t.bindingsToString=function(e){const t={};for(const r of e.keys())t[r.value]=(0,n.termToString)(e.get(r));return JSON.stringify(t,null," ")}},91674:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(67526),t),i(r(38846),t),i(r(17070),t)},53674:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocess=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorContextPreprocess=i},32362:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(53674),t)},18326:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceRdf=void 0;const n=r(47702);class i extends n.ActorDereferenceParse{constructor(e){super(e)}}t.ActorDereferenceRdf=i},53583:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(18326),t)},96859:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereference=void 0;const n=r(5522);class i extends n.ActorDereferenceBase{constructor(e){super(e)}async handleDereferenceErrors(e,t,r,n=0){return this.dereferenceErrorHandler(e,t,{url:e.url,exists:!1,headers:r,requestTime:n})}}t.ActorDereference=i},5522:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceBase=t.isHardError=t.emptyReadable=void 0;const n=r(32227),i=r(34368),a=r(58521);function o(){const e=new a.Readable;return e.push(null),e}function s(e){return!e.get(n.KeysInitQuery.lenient)}t.emptyReadable=o,t.isHardError=s;class c extends i.Actor{constructor(e){super(e)}async dereferenceErrorHandler(e,t,r){if(s(e.context))throw t;return this.logWarn(e.context,t.message),{...r,data:o()}}}t.ActorDereferenceBase=c},75416:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceParse=t.getMediaTypeFromExtension=void 0;const n=r(58521),i=r(5522);function a(e,t){const r=e.lastIndexOf(".");return r>=0&&t?.[e.slice(r+1)]||""}t.getMediaTypeFromExtension=a;class o extends i.ActorDereferenceBase{constructor(e){super(e)}async test(e){return!0}handleDereferenceStreamErrors(e,t){return(0,i.isHardError)(e.context)||(t.on("error",(r=>{this.logWarn(e.context,r.message,(()=>({url:e.url}))),t.push(null)})),t=t.pipe(new n.PassThrough({objectMode:!0}))),t}async run(e){const{context:t}=e,r=await this.mediatorDereference.mediate({...e,mediaTypes:async()=>(await(this.mediatorParseMediatypes?.mediate({context:t,mediaTypes:!0})))?.mediaTypes});let n;try{n=(await this.mediatorParse.mediate({context:t,handle:{context:t,...r,metadata:await this.getMetadata(r)},handleMediaType:(r.mediaType??a(r.url,this.mediaMappings))||e.mediaType})).handle,n.data=this.handleDereferenceStreamErrors(e,n.data)}catch(t){await(r.data.close?.()),n=await this.dereferenceErrorHandler(e,t,{})}return{...r,...n}}}t.ActorDereferenceParse=o},47702:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(96859),t),i(r(75416),t),i(r(5522),t)},45644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHashBindings=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorHashBindings=i},38431:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(45644),t)},24608:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpInvalidate=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorHttpInvalidate=i},1187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpInvalidateListenable=void 0;const n=r(24608);class i extends n.ActorHttpInvalidate{constructor(e){super(e),this.invalidateListeners=[],this.invalidateListeners=[]}addInvalidateListener(e){this.invalidateListeners.push(e)}async test(e){return!0}async run(e){for(const t of this.invalidateListeners)t(e);return{}}}t.ActorHttpInvalidateListenable=i},56320:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(24608),t),i(r(1187),t)},54283:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttp=void 0;const n=r(34368),i=r(33523);globalThis.ReadableStream||(globalThis.ReadableStream=r(55675).ReadableStream);const a=r(76605),o=r(84077);class s extends n.Actor{constructor(e){super(e)}static toNodeReadable(e){return a(e)||null===e?e:(0,i.readableFromWeb)(e)}static toWebReadableStream(e){return o(e)}static headersToHash(e){const t={};return e.forEach(((e,r)=>{t[r]=e})),t}}t.ActorHttp=s},74870:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(54283),t),i(r(92151),t)},92151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAndCloseHttpResponse=void 0;const n=r(76574),i=r(54283);t.validateAndCloseHttpResponse=async function(e,t){if(t.status>=400){let r="empty response";if(t.body){const e=i.ActorHttp.toNodeReadable(t.body);r=await n(e)}throw new Error(`Could not update ${e} (HTTP status ${t.status}):\n${r}`)}await(t.body?.cancel())}},37983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorInit=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorInit=i},99784:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(37983),t)},70735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperation=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorOptimizeQueryOperation=i},6716:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(70735),t)},76986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperation=void 0;const n=r(32227),i=r(34368),a=r(85156),o=r(75698);let s=0;class c extends i.Actor{constructor(e){super(e)}static getSafeBindings(e){return c.validateQueryOutput(e,"bindings"),e}static getSafeQuads(e){return c.validateQueryOutput(e,"quads"),e}static getSafeBoolean(e){return c.validateQueryOutput(e,"boolean"),e}static getSafeVoid(e){return c.validateQueryOutput(e,"void"),e}static validateQueryOutput(e,t){if(e.type!==t)throw new Error(`Invalid query output type: Expected '${t}' but got '${e.type}'`)}static getBaseExpressionContext(e){const t=e.get(n.KeysInitQuery.queryTimestamp),r=e.get(n.KeysInitQuery.baseIRI),i=e.get(n.KeysInitQuery.functionArgumentsCache)??{};if(e.has(n.KeysInitQuery.extensionFunctionCreator)&&e.has(n.KeysInitQuery.extensionFunctions))throw new Error("Illegal simultaneous usage of extensionFunctionCreator and extensionFunctions in context");let a=e.get(n.KeysInitQuery.extensionFunctionCreator);const o=e.get(n.KeysInitQuery.extensionFunctions);return o&&(a=e=>o[e.value]),{now:t,baseIRI:r,extensionFunctionCreator:a,functionArgumentsCache:i}}static getExpressionContext(e,t){return{...this.getBaseExpressionContext(e),bnode:e=>new a.BlankNodeBindingsScoped(e??"BNODE_"+s++)}}static getAsyncExpressionContext(e,t,r){return{...this.getBaseExpressionContext(e),bnode:e=>Promise.resolve(new a.BlankNodeBindingsScoped(e??"BNODE_"+s++)),exists:c.createExistenceResolver(e,t,r)}}static createExistenceResolver(e,t,r){return async(n,i)=>{const a=(0,o.materializeOperation)(n.input,i,r),s=await t.mediate({operation:a,context:e}),u=c.getSafeBindings(s);return n.not!==(1===(await u.bindingsStream.take(1).toArray()).length)}}static throwOnReadOnly(e){if(e.get(n.KeysQueryOperation.readOnly))throw new Error("Attempted a write operation in read-only mode")}static getOperationSource(e){return e.metadata?.scopedSource}static assignOperationSource(e,t){return(e={...e}).metadata=e.metadata?{...e.metadata}:{},e.metadata.scopedSource=t,e}static removeOperationSource(e){delete e.metadata?.scopedSource,e.metadata&&0===Object.keys(e.metadata).length&&delete e.metadata}static doesShapeAcceptOperation(e,t,r){return"conjunction"===e.type?e.children.every((e=>c.doesShapeAcceptOperation(e,t,r))):"disjunction"===e.type?e.children.some((e=>c.doesShapeAcceptOperation(e,t,r))):"arity"===e.type?c.doesShapeAcceptOperation(e.child,t,r):!((r?.joinBindings&&!e.joinBindings)??(r?.filterBindings&&!e.filterBindings))&&("type"===e.operation.operationType?"project"===e.operation.type||e.operation.type===t.type:e.operation.pattern.type===t.type)}}t.ActorQueryOperation=c},19028:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationTyped=void 0;const n=r(32227),i=r(72394),a=r(76986);class o extends a.ActorQueryOperation{constructor(e,t){if(super({...e,operationName:t}),!this.operationName)throw new Error('A valid "operationName" argument must be provided.')}async test(e){if(!e.operation)throw new Error("Missing field 'operation' in a query operation action.");if(e.operation.type!==this.operationName)throw new Error(`Actor ${this.name} only supports ${this.operationName} operations, but got ${e.operation.type}`);const t=e.operation;return this.testOperation(t,e.context)}async run(e){const t=e.context.get(n.KeysInitQuery.physicalQueryPlanLogger);t&&(t.logOperation(e.operation.type,void 0,e.operation,e.context.get(n.KeysInitQuery.physicalQueryPlanNode),this.name,{}),e.context=e.context.set(n.KeysInitQuery.physicalQueryPlanNode,e.operation));const r=e.operation,a=e.context.set(n.KeysQueryOperation.operation,r),o=await this.runOperation(r,a);return"metadata"in o&&(o.metadata=(0,i.cachifyMetadata)(o.metadata)),o}}t.ActorQueryOperationTyped=o},90897:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationTypedMediated=void 0;const n=r(19028);class i extends n.ActorQueryOperationTyped{constructor(e,t){super(e,t)}}t.ActorQueryOperationTypedMediated=i},75698:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.materializeOperation=t.materializeTerm=void 0;const n=r(18050),i=r(22112),a=r(13252),o=r(31578),s=new n.DataFactory,c=s.literal("true",s.namedNode("http://www.w3.org/2001/XMLSchema#boolean"));function u(e,t){if("Variable"===e.termType){const r=t.get(e);if(r)return r}return"Quad"===e.termType&&(0,a.someTermsNested)(e,(e=>"Variable"===e.termType))?(0,a.mapTermsNested)(e,(e=>u(e,t))):e}t.materializeTerm=u,t.materializeOperation=function e(t,r,n,a={}){return a={strictTargetVariables:"strictTargetVariables"in a&&a.strictTargetVariables,bindFilter:!("bindFilter"in a)||a.bindFilter},o.Util.mapOperation(t,{path:(e,t)=>({recurse:!1,result:Object.assign(t.createPath(u(e.subject,r),e.predicate,u(e.object,r),u(e.graph,r)),{metadata:e.metadata})}),pattern:(e,t)=>({recurse:!1,result:Object.assign(t.createPattern(u(e.subject,r),u(e.predicate,r),u(e.object,r),u(e.graph,r)),{metadata:e.metadata})}),extend(t){if(r.has(t.variable)){if(a.strictTargetVariables)throw new Error(`Tried to bind variable ${(0,i.termToString)(t.variable)} in a BIND operator.`);return{recurse:!0,result:e(t.input,r,n,a)}}return{recurse:!0,result:t}},group(e,t){if(a.strictTargetVariables){for(const t of e.variables)if(r.has(t))throw new Error(`Tried to bind variable ${(0,i.termToString)(t)} in a GROUP BY operator.`);return{recurse:!0,result:e}}const n=e.variables.filter((e=>!r.has(e)));return{recurse:!0,result:t.createGroup(e.input,n,e.aggregates)}},project(t,o){if(a.strictTargetVariables){for(const e of t.variables)if(r.has(e))throw new Error(`Tried to bind variable ${(0,i.termToString)(e)} in a SELECT operator.`);return{recurse:!0,result:t}}const s=t.variables.filter((e=>!r.has(e))),c=n.bindings(t.variables.map((e=>{const t=r.get(e);if(t)return[e,t]})).filter(Boolean));return{recurse:!1,result:o.createProject(e(t.input,c,n,a),s)}},values(e,t){if(!a.strictTargetVariables){const n=e.variables.filter((e=>!r.has(e))),a=e.bindings.map((e=>{const t={...e};let n=!0;return r.forEach(((e,r)=>{const a=(0,i.termToString)(r);a in t&&(e.equals(t[a])||(n=!1),delete t[a])})),n?t:void 0})).filter(Boolean);return{recurse:!0,result:t.createValues(n,a)}}for(const t of e.variables)if(r.has(t))throw new Error(`Tried to bind variable ${(0,i.termToString)(t)} in a VALUES operator.`);return{recurse:!1,result:e}},expression(e,t){if(!a.bindFilter)return{recurse:!1,result:e};if("term"===e.expressionType)return{recurse:!1,result:t.createTermExpression(u(e.term,r))};if("operator"===e.expressionType)return"bound"===e.operator&&1===e.args.length&&"term"===e.args[0].expressionType&&[...r.keys()].some((t=>e.args[0].term.equals(t)))?{recurse:!1,result:t.createTermExpression(c)}:{recurse:!0,result:e};if("aggregate"===e.expressionType&&"variable"in e&&r.has(e.variable)){if(a.strictTargetVariables)throw new Error(`Tried to bind ${(0,i.termToString)(e.variable)} in a ${e.aggregator} aggregate.`);return{recurse:!0,result:e}}return{recurse:!0,result:e}}})}},32233:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BusQueryOperation=void 0;const n=r(34368);class i extends n.BusIndexed{constructor(e){super({...e,actorIdentifierFields:["operationName"],actionIdentifierFields:["operation","type"]})}}t.BusQueryOperation=i},45371:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClosableTransformIterator=void 0;const n=r(76664);class i extends n.TransformIterator{constructor(e,t){super(e,t),this.onClose=t.onClose}_end(e){this.onClose(),super._end(e)}}t.ClosableTransformIterator=i},59510:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(76986),t),i(r(19028),t),i(r(90897),t),i(r(75698),t),i(r(32233),t),i(r(45371),t)},88098:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryParse=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorQueryParse=i},79744:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(88098),t)},8906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcess=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorQueryProcess=i},59946:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(8906),t)},2659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerialize=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTyped{constructor(e){super(e)}}t.ActorQueryResultSerialize=i},51492:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeFixedMediaTypes=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(e,t){return!0}}t.ActorQueryResultSerializeFixedMediaTypes=i},22083:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(2659),t),i(r(51492),t)},44218:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermedia=void 0;const n=r(34368);class i extends n.Actor{constructor(e,t){super(e),this.sourceType=t}async test(e){if(e.forceSourceType&&this.sourceType!==e.forceSourceType)throw new Error(`Actor ${this.name} is not able to handle source type ${e.forceSourceType}.`);return this.testMetadata(e)}}t.ActorQuerySourceIdentifyHypermedia=i},89168:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(44218),t)},521:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentify=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorQuerySourceIdentify=i},12982:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filterMatchingQuotedQuads=t.quadsOrderToBindingsOrder=t.quadsMetadataToBindingsMetadata=t.setMetadata=t.getDuplicateElementLinks=t.getVariables=t.isTermVariable=t.quadsToBindings=void 0;const n=r(59510),i=r(72394),a=r(18050),o=r(22112),s=r(13252),c=r(10175),u=new a.DataFactory;function l(e){return"Variable"===e.termType}function d(e){return(0,s.uniqTerms)((0,s.getTermsNested)(e).filter(l))}function h(e){const t={};let r=!1;if((0,s.forEachTermsNested)(e,((e,n)=>{if("Variable"===e.termType){const i=(0,o.termToString)(e),a=(t[i]||(t[i]=[])).push(n);r=r||a>1}})),!r)return;const n={};for(const e in t){const r=t[e],i=r.slice(1);i.length>0&&(n[r[0].join("_")]=i)}return n}function p(e,t,r,n,a){const o=o=>{"canContainUndefs"in o||(o.canContainUndefs=!1),a&&(o.cardinality.type="estimate"),e.setProperty("metadata",f((0,i.validateMetadataQuads)(o),r,n)),o.state&&o.state.addInvalidateListener((()=>{p(e,t,r,n,a)}))},s=t.getProperty("metadata");s?o(s):t.getProperty("metadata",o)}function f(e,t,r){return{...e,canContainUndefs:!1,order:e.order?y(e.order,t):void 0,availableOrders:e.availableOrders?e.availableOrders.map((e=>({cost:e.cost,terms:y(e.terms,t)}))):void 0,variables:r}}function y(e,t){const r={};return e.map((e=>{const n=t[e.term];if(n&&!r[n])return r[n]=!0,{term:u.variable(n),direction:e.direction}})).filter(Boolean)}t.quadsToBindings=function(e,t,r,i){const a=d(t),o="Variable"===t.graph.termType&&!i,c=h(t),l=(0,s.reduceTermsNested)(t,((e,t,r)=>("Variable"===t.termType&&(e[r.join("_")]=t.value),e)),{}),f=new n.ClosableTransformIterator((async()=>{let t=e;return o&&(t=t.filter((e=>"DefaultGraph"!==e.graph.termType))),c&&(t=t.filter((e=>{for(const t in c){const r=t.split("_"),n=(0,s.getValueNestedPath)(e,r);for(const r of c[t])if(!n.equals((0,s.getValueNestedPath)(e,r)))return!1}return!0}))),t.map((e=>r.bindings(Object.keys(l).map((t=>{const r=t.split("_"),n=l[t],i=(0,s.getValueNestedPath)(e,r);return[u.variable(n),i]})))))}),{autoStart:!1,onClose:()=>e.destroy()});return p(f,e,l,a,o||Boolean(c)),f},t.isTermVariable=l,t.getVariables=d,t.getDuplicateElementLinks=h,t.setMetadata=p,t.quadsMetadataToBindingsMetadata=f,t.quadsOrderToBindingsOrder=y,t.filterMatchingQuotedQuads=function(e,t){return(0,s.someTerms)(e,(e=>"Quad"===e.termType))&&(t=t.filter((t=>(0,c.matchPatternMappings)(t,e)))),t}},65483:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(521),t),i(r(12982),t)},36170:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinEntriesSort=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfJoinEntriesSort=i},84287:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(36170),t)},88125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinSelectivity=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfJoinSelectivity=i},75245:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(88125),t)},10654:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoin=void 0;const n=r(32227),i=r(34368),a=r(72394),o=r(18050),s=r(22112),c=r(57778),u=new o.DataFactory;class l extends i.Actor{constructor(e,t){super(e),this.includeInLogs=!0,this.logicalType=t.logicalType,this.physicalName=t.physicalName,this.limitEntries=t.limitEntries??Number.POSITIVE_INFINITY,this.limitEntriesMin=t.limitEntriesMin??!1,this.canHandleUndefs=t.canHandleUndefs??!1,this.isLeaf=t.isLeaf??!0}static hash(e,t){return t.map((t=>{const r=e.get(t);return r?r.value:""})).join("")}static hashNonClashing(e,t){return t.map((t=>{const r=e.get(t);return r?(0,s.termToString)(r):""})).join("")}static overlappingVariables(e){const t=e.map((e=>e.variables));let r=t[0];for(const e of t.slice(1))r=r.filter((t=>e.some((e=>e.value===t.value))));return r}static joinVariables(e){return[...new Set(e.flatMap((e=>e.variables.map((e=>e.value)))))].map((e=>u.variable(e)))}static joinBindings(...e){if(0===e.length)return null;if(1===e.length)return e[0];let t=e[0];for(const r of e.slice(1)){const e=t.merge(r);if(!e)return null;t=e}return t}static getCardinality(e){return e.cardinality}static async getMetadatas(e){return await Promise.all(e.map((e=>e.output.metadata())))}static async getEntriesWithMetadatas(e){const t=await l.getMetadatas(e);return e.map(((e,r)=>({...e,metadata:t[r]})))}static getRequestInitialTimes(e){return e.map((e=>e.pageSize?0:e.requestTime??0))}static getRequestItemTimes(e){return e.map((e=>e.pageSize?(e.requestTime??0)/e.pageSize:0))}constructState(e){const t=new a.MetadataValidationState,r=()=>t.invalidate();for(const t of e)t.state.addInvalidateListener(r);return t}async constructResultMetadata(e,t,r,n={}){let i;return n.cardinality?i=n.cardinality:(i=t.reduce(((e,t)=>{const r=l.getCardinality(t);return{type:"estimate"===r.type?"estimate":e.type,value:e.value*r.value}}),{type:"exact",value:1}),i.value*=(await this.mediatorJoinSelectivity.mediate({entries:e,context:r})).selectivity),{state:this.constructState(t),...n,cardinality:{type:i.type,value:i.value},canContainUndefs:n.canContainUndefs??t.some((e=>e.canContainUndefs)),variables:l.joinVariables(t)}}static async sortJoinEntries(e,t,r){if(t.some((e=>e.metadata.canContainUndefs)))return t;const n={};for(const e of t)for(const t of e.metadata.variables){let e=n[t.value];e||(e=0),n[t.value]=++e}const i=[];for(const[e,t]of Object.entries(n))t>=2&&i.push(e);if(0===i.length)throw new Error("Bind join can only join entries with at least one common variable");const a=[];for(const e of t){let t=!1;for(const r of e.metadata.variables)if(i.includes(r.value)){t=!0;break}t||a.push(e)}return(await e.mediate({entries:t,context:r})).entries.sort(((e,t)=>{const r=a.includes(e);return r===a.includes(t)?0:r?1:-1}))}async test(e){if(e.type!==this.logicalType)throw new Error(`${this.name} can only handle logical joins of type '${this.logicalType}', while '${e.type}' was given.`);if(e.entries.length<=1)throw new Error(`${this.name} requires at least two join entries.`);if(this.limitEntriesMin?e.entries.lengththis.limitEntries)throw new Error(`${this.name} requires ${this.limitEntries} join entries at ${this.limitEntriesMin?"least":"most"}. The input contained ${e.entries.length}.`);for(const t of e.entries)if("bindings"!==t.output.type)throw new Error(`Invalid type of a join entry: Expected 'bindings' but got '${t.output.type}'`);const t=await l.getMetadatas(e.entries);if(!this.canHandleUndefs)for(const e of t)if(e.canContainUndefs)throw new Error(`Actor ${this.name} can not join streams containing undefs`);return await this.getJoinCoefficients(e,t)}async run(e){let t;e.context.has(n.KeysInitQuery.physicalQueryPlanLogger)&&(t=e.context.get(n.KeysInitQuery.physicalQueryPlanNode),e.context=e.context.set(n.KeysInitQuery.physicalQueryPlanNode,e));const r=e.context.get(n.KeysInitQuery.physicalQueryPlanLogger);let i;this.includeInLogs&&r&&(i={},r.stashChildren(t,(e=>e.logicalOperator.startsWith("join"))),r.logOperation(`join-${this.logicalType}`,this.physicalName,e,t,this.name,i));const{result:o,physicalPlanMetadata:s}=await this.getOutput(e),u=await l.getMetadatas(e.entries);if(i){(0,c.instrumentIterator)(o.bindingsStream).then((t=>{r.appendMetadata(e,{cardinalityReal:t.count,timeSelf:t.timeSelf,timeLife:t.timeLife})})),Object.assign(i,s);const t=u.map(l.getCardinality);if(i.cardinalities=t,i.joinCoefficients=await this.getJoinCoefficients(e,u),this.isLeaf)for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChunkedIterator=void 0;const n=r(76664);class i extends n.TransformIterator{constructor(e,t,r){super(e,r),this.chunk=[],this.blockSize=t}consumeChunkAsIterator(){const e=new n.ArrayIterator(this.chunk,{autoStart:!1});return this.chunk=[],e}_transform(e,t,r){this.chunk.push(e),this.chunk.length>=this.blockSize&&r(this.consumeChunkAsIterator()),t()}_flush(e){this.chunk.length>0&&this._push(this.consumeChunkAsIterator()),super._flush(e)}}t.ChunkedIterator=i},32353:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(10654),t),i(r(34875),t)},57778:(e,t)=>{"use strict";function r(e,t,n){if(!("_profileInstrumented"in e)){if(e._profileInstrumented=!0,"_read"in e){const r=e._read;e._read=(n,i)=>{const a=performance.now();r.call(e,n,(()=>{t.timeSelf+=performance.now()-a,i()}))}}if("read"in e){const r=e.read;e.read=()=>{const i=performance.now(),a=r.call(e);return n&&a&&t.count++,t.timeSelf+=performance.now()-i,a}}if(n){const r=performance.now();e.on("end",(()=>{t.timeLife=performance.now()-r}))}"_source"in e&&r(e._source,t,!1)}}Object.defineProperty(t,"__esModule",{value:!0}),t.instrumentIterator=void 0,t.instrumentIterator=function(e){const t={count:0,timeSelf:0,timeLife:0};return r(e,t,!0),new Promise((r=>{e.on("end",(()=>{r(t)}))}))}},97145:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulate=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfMetadataAccumulate=i},49877:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(97145),t)},77879:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtract=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfMetadataExtract=i},10800:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(77879),t)},32124:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadata=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfMetadata=i},52628:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(32124),t)},15569:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtml=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfParseHtml=i},65446:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(15569),t)},20434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParse=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTyped{constructor(e){super(e)}}t.ActorRdfParse=i},67719:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseFixedMediaTypes=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(e){return!0}}t.ActorRdfParseFixedMediaTypes=i},54592:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(20434),t),i(r(67719),t)},79773:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveHypermediaLinksQueue=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfResolveHypermediaLinksQueue=i},25710:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89798:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkQueueWrapper=void 0,t.LinkQueueWrapper=class{constructor(e){this.linkQueue=e}push(e,t){return this.linkQueue.push(e,t)}getSize(){return this.linkQueue.getSize()}isEmpty(){return this.linkQueue.isEmpty()}pop(){return this.linkQueue.pop()}peek(){return this.linkQueue.peek()}}},56102:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(79773),t),i(r(25710),t),i(r(89798),t)},11018:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveHypermediaLinks=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfResolveHypermediaLinks=i},22124:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(11018),t)},29342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerialize=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTyped{constructor(e){super(e)}}t.ActorRdfSerialize=i},34923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerializeFixedMediaTypes=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(){return!0}}t.ActorRdfSerializeFixedMediaTypes=i},84025:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(29342),t),i(r(34923),t)},9917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateHypermedia=void 0;const n=r(34368);class i extends n.Actor{constructor(e,t){super(e),this.destinationType=t}async test(e){if(e.forceDestinationType&&this.destinationType!==e.forceDestinationType)throw new Error(`Actor ${this.name} is not able to handle destination type ${e.forceDestinationType}.`);return this.testMetadata(e)}}t.ActorRdfUpdateHypermedia=i},25345:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(9917),t)},10303:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuads=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfUpdateQuads=i},96527:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuadsDestination=t.deskolemize=t.deskolemizeStream=void 0;const n=r(35106),i=r(32227),a=r(10303);function o(e,t){return e?.map((e=>(0,n.deskolemizeQuad)(e,t)))}function s(e){const t=e.context.get(i.KeysRdfUpdateQuads.destination),r=e.context.get(i.KeysQuerySourceIdentify.sourceIds)?.get(t);return r?{...e,quadStreamInsert:o(e.quadStreamInsert,r),quadStreamDelete:o(e.quadStreamDelete,r)}:e}t.deskolemizeStream=o,t.deskolemize=s;class c extends a.ActorRdfUpdateQuads{async test(e){return!0}async run(e){const t=await this.getDestination(e.context);return await this.getOutput(t,s(e))}async getOutput(e,t){return{execute:async()=>{await(t.quadStreamDelete?e.delete(t.quadStreamDelete):Promise.resolve()),await(t.deleteGraphs?e.deleteGraphs(t.deleteGraphs.graphs,t.deleteGraphs.requireExistence,t.deleteGraphs.dropGraphs):Promise.resolve()),await(t.createGraphs?e.createGraphs(t.createGraphs.graphs,t.createGraphs.requireNonExistence):Promise.resolve()),await(t.quadStreamInsert?e.insert(t.quadStreamInsert):Promise.resolve())}}}}t.ActorRdfUpdateQuadsDestination=c},54877:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},86789:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(10303),t),i(r(96527),t),i(r(54877),t),i(r(86368),t)},86368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContextDestinationUrl=t.getContextDestination=t.getDataDestinationContext=t.getDataDestinationValue=t.getDataDestinationType=t.isDataDestinationRawType=void 0;const n=r(32227);function i(e){return"string"==typeof e||"remove"in e}function a(e){return i(e)?e:e.value}t.isDataDestinationRawType=i,t.getDataDestinationType=function(e){return"string"==typeof e?"":"remove"in e?"rdfjsStore":e.type},t.getDataDestinationValue=a,t.getDataDestinationContext=function(e,t){return"string"==typeof e||"remove"in e||!e.context?t:t.merge(e.context)},t.getContextDestination=function(e){return e.get(n.KeysRdfUpdateQuads.destination)},t.getContextDestinationUrl=function(e){if(e){let t=a(e);if("string"==typeof t){const e=t.indexOf("#");return e>=0&&(t=t.slice(0,e)),t}}}},88851:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeysRdfJoin=t.KeysMergeBindingsContext=t.KeysRdfUpdateQuads=t.KeysQuerySourceIdentify=t.KeysRdfParseHtmlScript=t.KeysRdfParseJsonLd=t.KeysQueryOperation=t.KeysInitQuery=t.KeysHttpProxy=t.KeysHttpMemento=t.KeysHttpWayback=t.KeysHttp=t.KeysCore=void 0;const n=r(34368);t.KeysCore={log:n.CONTEXT_KEY_LOGGER},t.KeysHttp={includeCredentials:new n.ActionContextKey("@comunica/bus-http:include-credentials"),auth:new n.ActionContextKey("@comunica/bus-http:auth"),fetch:new n.ActionContextKey("@comunica/bus-http:fetch"),httpTimeout:new n.ActionContextKey("@comunica/bus-http:http-timeout"),httpBodyTimeout:new n.ActionContextKey("@comunica/bus-http:http-body-timeout"),httpRetryCount:new n.ActionContextKey("@comunica/bus-http:http-retry-count"),httpRetryDelay:new n.ActionContextKey("@comunica/bus-http:http-retry-delay"),httpRetryOnServerError:new n.ActionContextKey("@comunica/bus-http:http-retry-on-server-error")},t.KeysHttpWayback={recoverBrokenLinks:new n.ActionContextKey("@comunica/bus-http:recover-broken-links")},t.KeysHttpMemento={datetime:new n.ActionContextKey("@comunica/actor-http-memento:datetime")},t.KeysHttpProxy={httpProxyHandler:new n.ActionContextKey("@comunica/actor-http-proxy:httpProxyHandler")},t.KeysInitQuery={querySourcesUnidentified:new n.ActionContextKey("@comunica/actor-init-query:querySourcesUnidentified"),initialBindings:new n.ActionContextKey("@comunica/actor-init-query:initialBindings"),queryFormat:new n.ActionContextKey("@comunica/actor-init-query:queryFormat"),graphqlSingularizeVariables:new n.ActionContextKey("@comunica/actor-init-query:singularizeVariables"),lenient:new n.ActionContextKey("@comunica/actor-init-query:lenient"),queryString:new n.ActionContextKey("@comunica/actor-init-query:queryString"),query:new n.ActionContextKey("@comunica/actor-init-query:query"),baseIRI:new n.ActionContextKey("@comunica/actor-init-query:baseIRI"),functionArgumentsCache:new n.ActionContextKey("@comunica/actor-init-query:functionArgumentsCache"),queryTimestamp:new n.ActionContextKey("@comunica/actor-init-query:queryTimestamp"),extensionFunctionCreator:new n.ActionContextKey("@comunica/actor-init-query:extensionFunctionCreator"),extensionFunctions:new n.ActionContextKey("@comunica/actor-init-query:extensionFunctions"),cliArgsHandlers:new n.ActionContextKey("@comunica/actor-init-query:cliArgsHandlers"),explain:new n.ActionContextKey("@comunica/actor-init-query:explain"),physicalQueryPlanLogger:new n.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanLogger"),physicalQueryPlanNode:new n.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanNode"),jsonLdContext:new n.ActionContextKey("@context"),noCache:new n.ActionContextKey("@comunica/actor-init-query:noCache")},t.KeysQueryOperation={operation:new n.ActionContextKey("@comunica/bus-query-operation:operation"),joinLeftMetadata:new n.ActionContextKey("@comunica/bus-query-operation:joinLeftMetadata"),joinRightMetadatas:new n.ActionContextKey("@comunica/bus-query-operation:joinRightMetadatas"),joinBindings:new n.ActionContextKey("@comunica/bus-query-operation:joinBindings"),readOnly:new n.ActionContextKey("@comunica/bus-query-operation:readOnly"),isPathArbitraryLengthDistinctKey:new n.ActionContextKey("@comunica/bus-query-operation:isPathArbitraryLengthDistinct"),limitIndicator:new n.ActionContextKey("@comunica/bus-query-operation:limitIndicator"),unionDefaultGraph:new n.ActionContextKey("@comunica/bus-query-operation:unionDefaultGraph"),querySources:new n.ActionContextKey("@comunica/bus-query-operation:querySources")},t.KeysRdfParseJsonLd={documentLoader:new n.ActionContextKey("@comunica/actor-rdf-parse-jsonld:documentLoader"),strictValues:new n.ActionContextKey("@comunica/actor-rdf-parse-jsonld:strictValues"),parserOptions:new n.ActionContextKey("@comunica/actor-rdf-parse-jsonld:parserOptions")},t.KeysRdfParseHtmlScript={processingHtmlScript:new n.ActionContextKey("@comunica/actor-rdf-parse-html-script:processingHtmlScript"),extractAllScripts:new n.ActionContextKey("extractAllScripts")},t.KeysQuerySourceIdentify={sourceIds:new n.ActionContextKey("@comunica/bus-query-source-identify:sourceIds"),hypermediaSourcesAggregatedStores:new n.ActionContextKey("@comunica/bus-query-source-identify:hypermediaSourcesAggregatedStores"),traverse:new n.ActionContextKey("@comunica/bus-query-source-identify:traverse")},t.KeysRdfUpdateQuads={destination:new n.ActionContextKey("@comunica/bus-rdf-update-quads:destination")},t.KeysMergeBindingsContext={sourcesBinding:new n.ActionContextKey("@comunica/bus-merge-bindings-context:sourcesBinding")},t.KeysRdfJoin={lastPhysicalJoin:new n.ActionContextKey("@comunica/bus-rdf-join:lastPhysicalJoin")}},32227:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(88851),t)},85865:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionContextKey=t.ActionContext=void 0;const n=r(6081);class i{constructor(e={}){this.map=(0,n.Map)(e)}setDefault(e,t){return this.has(e)?this:this.set(e,t)}set(e,t){return this.setRaw(e.name,t)}setRaw(e,t){return new i(this.map.set(e,t))}delete(e){return new i(this.map.delete(e.name))}get(e){return this.getRaw(e.name)}getRaw(e){return this.map.get(e)}getSafe(e){if(!this.has(e))throw new Error(`Context entry ${e.name} is required but not available`);return this.get(e)}has(e){return this.hasRaw(e.name)}hasRaw(e){return this.map.has(e)}merge(...e){let t=this;for(const r of e)for(const e of r.keys())t=t.set(e,r.get(e));return t}keys(){return[...this.map.keys()].map((e=>new a(e)))}toJS(){return this.map.toJS()}toString(){return`ActionContext(${JSON.stringify(this.map.toJS())})`}[Symbol.for("nodejs.util.inspect.custom")](){return`ActionContext(${JSON.stringify(this.map.toJS(),null," ")})`}static ensureActionContext(e){return e instanceof i?e:new i((0,n.Map)(e??{}))}}t.ActionContext=i;class a{constructor(e){this.name=e}}t.ActionContextKey=a},71330:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionObserver=void 0,t.ActionObserver=class{constructor(e){Object.assign(this,e)}}},4165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Actor=void 0;const n=r(17395);class i{constructor(e){this.beforeActors=[],Object.assign(this,e),this.bus.subscribe(this),this.beforeActors.length>0&&this.bus.addDependencies(this,this.beforeActors)}static getContextLogger(e){return e.get(n.CONTEXT_KEY_LOGGER)}runObservable(e){const t=this.run(e);return this.bus.onRun(this,e,t),t}async initialize(){return!0}async deinitialize(){return!0}getDefaultLogData(e,t){const r=t?t():{};return r.actor=this.name,r}logTrace(e,t,r){const n=i.getContextLogger(e);n&&n.trace(t,this.getDefaultLogData(e,r))}logDebug(e,t,r){const n=i.getContextLogger(e);n&&n.debug(t,this.getDefaultLogData(e,r))}logInfo(e,t,r){const n=i.getContextLogger(e);n&&n.info(t,this.getDefaultLogData(e,r))}logWarn(e,t,r){const n=i.getContextLogger(e);n&&n.warn(t,this.getDefaultLogData(e,r))}logError(e,t,r){const n=i.getContextLogger(e);n&&n.error(t,this.getDefaultLogData(e,r))}logFatal(e,t,r){const n=i.getContextLogger(e);n&&n.fatal(t,this.getDefaultLogData(e,r))}}t.Actor=i},64802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bus=void 0,t.Bus=class{constructor(e){this.actors=[],this.observers=[],this.dependencyLinks=new Map,Object.assign(this,e)}subscribe(e){this.actors.push(e),this.reorderForDependencies()}subscribeObserver(e){this.observers.push(e)}unsubscribe(e){const t=this.actors.indexOf(e);return t>=0&&(this.actors.splice(t,1),!0)}unsubscribeObserver(e){const t=this.observers.indexOf(e);return t>=0&&(this.observers.splice(t,1),!0)}publish(e){return this.actors.map((t=>({actor:t,reply:t.test(e)})))}onRun(e,t,r){for(const n of this.observers)n.onRun(e,t,r)}addDependencies(e,t){for(const r of t){let t=this.dependencyLinks.get(r);t||(t=[],this.dependencyLinks.set(r,t)),t.push(e)}this.reorderForDependencies()}reorderForDependencies(){if(this.dependencyLinks.size>0){const e=[];for(const t of this.dependencyLinks.keys()){const r=this.actors.indexOf(t);r>=0&&(this.actors.splice(r,1),e.push(t))}for(;e.length>0;){let t=-1;for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BusIndexed=void 0;const n=r(64802);class i extends n.Bus{constructor(e){super(e),this.actorsIndex={}}subscribe(e){const t=this.getActorIdentifier(e)||"_undefined_";let r=this.actorsIndex[t];r||(r=this.actorsIndex[t]=[]),r.push(e),super.subscribe(e)}unsubscribe(e){const t=this.getActorIdentifier(e)||"_undefined_",r=this.actorsIndex[t];if(r){const n=r.indexOf(e);n>=0&&r.splice(n,1),0===r.length&&delete this.actorsIndex[t]}return super.unsubscribe(e)}publish(e){const t=this.getActionIdentifier(e);return t?[...this.actorsIndex[t]||[],...this.actorsIndex._undefined_||[]].map((t=>({actor:t,reply:t.test(e)}))):super.publish(e)}getActorIdentifier(e){return this.actorIdentifierFields.reduce(((e,t)=>e[t]),e)}getActionIdentifier(e){return this.actionIdentifierFields.reduce(((e,t)=>e[t]),e)}}t.BusIndexed=i},17395:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_KEY_LOGGER=void 0;const n=r(85865);t.CONTEXT_KEY_LOGGER=new n.ActionContextKey("@comunica/core:log")},81411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Mediator=void 0,t.Mediator=class{constructor(e){Object.assign(this,e)}publish(e){const t=this.bus.publish(e);if(0===t.length)throw new Error(`No actors are able to reply to a message in the bus ${this.bus.name}`);return t}async mediateActor(e){return await this.mediateWith(e,this.publish(e))}async mediate(e){return(await this.mediateActor(e)).runObservable(e)}}},34368:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(85865),t),i(r(64802),t),i(r(45609),t),i(r(17395),t),i(r(71330),t),i(r(4165),t),i(r(81411),t)},72204:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlankNodeBindingsScoped=void 0,t.BlankNodeBindingsScoped=class{constructor(e){this.termType="BlankNode",this.singleBindingsScope=!0,this.value=e}equals(e){return!!e&&"BlankNode"===e.termType&&e.value===this.value}}},99094:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlankNodeScoped=void 0,t.BlankNodeScoped=class{constructor(e,t){this.termType="BlankNode",this.value=e,this.skolemized=t}equals(e){return!!e&&"BlankNode"===e.termType&&e.value===this.value}}},85156:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(99094),t),i(r(72204),t)},16095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Aggregator=t.AggregatorComponent=void 0;const n=r(22112),i=r(50363),a=r(14624),o=r(46157);t.AggregatorComponent=class{static emptyValue(){}constructor(e,t){this.sharedContext=t,this.separator=e.separator||" ",this.termTransformer=new i.TermTransformer(t.superTypeProvider)}termToNumericOrError(e){if("Literal"!==e.termType)throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a numeric literal`);if(!(0,o.isSubTypeOf)(e.datatype.value,a.TypeAlias.SPARQL_NUMERIC,this.sharedContext.superTypeProvider))throw new Error(`Term datatype ${e.datatype.value} with value ${e.value} has type ${e.termType} and is not a numeric literal`);return this.termTransformer.transformLiteral(e)}},t.Aggregator=class{constructor(e,t){this.aggregatorComponent=t,this.variableValues=new Map,this.distinct=e.distinct}static emptyValue(e){return e.emptyValue()}result(){return this.aggregatorComponent.result()}put(e,t=""){this.canSkip(e,t)||(this.aggregatorComponent.put(e),this.addSeen(e,t))}canSkip(e,t){const r=this.variableValues.get(t);return this.distinct&&void 0!==r&&r.has(n.termToString(e))}addSeen(e,t){this.distinct&&(this.variableValues.has(t)||this.variableValues.set(t,new Set),this.variableValues.get(t).add(n.termToString(e)))}}},37283:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Average=void 0;const n=r(11269),i=r(42711),a=r(63606),o=r(14624),s=r(16095);class c extends s.AggregatorComponent{constructor(){super(...arguments),this.summer=i.regularFunctions[o.RegularOperator.ADDITION],this.divider=i.regularFunctions[o.RegularOperator.DIVISION],this.state=void 0}static emptyValue(){return(0,a.integer)(0).toRDF()}put(e){if(void 0===this.state){const t=this.termToNumericOrError(e);this.state={sum:t,count:1}}else{const t=this.termToNumericOrError(e);this.state.sum=this.summer.apply([this.state.sum,t],this.sharedContext),this.state.count++}}result(){if(void 0===this.state)return c.emptyValue();const e=new n.IntegerLiteral(this.state.count);return this.divider.apply([this.state.sum,e],this.sharedContext).toRDF()}}t.Average=c},47943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Count=void 0;const n=r(63606),i=r(16095);class a extends i.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}static emptyValue(){return(0,n.integer)(0).toRDF()}put(){void 0===this.state&&(this.state=0),this.state++}result(){return void 0===this.state?a.emptyValue():(0,n.integer)(this.state).toRDF()}}t.Count=a},81663:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupConcat=void 0;const n=r(63606),i=r(16095);class a extends i.AggregatorComponent{constructor(){super(...arguments),this.state=void 0,this.lastLanguageValid=!0,this.lastLanguage=void 0}static emptyValue(){return(0,n.string)("").toRDF()}put(e){void 0===this.state?(this.state=e.value,"Literal"===e.termType&&(this.lastLanguage=e.language)):(this.state+=this.separator+e.value,this.lastLanguageValid&&"Literal"===e.termType&&this.lastLanguage!==e.language&&(this.lastLanguageValid=!1,this.lastLanguage=void 0))}result(){return void 0===this.state?a.emptyValue():this.lastLanguageValid&&this.lastLanguage?(0,n.langString)(this.state,this.lastLanguage).toRDF():(0,n.string)(this.state).toRDF()}}t.GroupConcat=a},73342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Max=void 0;const n=r(20236),i=r(16095);class a extends i.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){if("Literal"!==e.termType)throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a literal`);(void 0===this.state||-1===(0,n.orderTypes)(this.state,e))&&(this.state=e)}result(){return void 0===this.state?a.emptyValue():this.state}}t.Max=a},59648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Min=void 0;const n=r(20236),i=r(16095);class a extends i.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){if("Literal"!==e.termType)throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a literal`);(void 0===this.state||1===(0,n.orderTypes)(this.state,e))&&(this.state=e)}result(){return void 0===this.state?a.emptyValue():this.state}}t.Min=a},91664:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sample=void 0;const n=r(16095);class i extends n.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){void 0===this.state&&(this.state=e)}result(){return void 0===this.state?i.emptyValue():this.state}}t.Sample=i},69091:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sum=void 0;const n=r(42711),i=r(63606),a=r(14624),o=r(16095);class s extends o.AggregatorComponent{constructor(){super(...arguments),this.state=void 0,this.summer=n.regularFunctions[a.RegularOperator.ADDITION]}static emptyValue(){return(0,i.integer)(0).toRDF()}put(e){if(void 0===this.state)this.state=this.termToNumericOrError(e);else{const t=this.termToNumericOrError(e);this.state=this.summer.apply([this.state,t],this.sharedContext)}}result(){return void 0===this.state?s.emptyValue():this.state.toRDF()}}t.Sum=s},59408:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WildcardCountAggregator=void 0;const n=r(22112),i=r(63606);t.WildcardCountAggregator=class{constructor(e){this.bindingValues=new Map,this.counter=0,this.distinct=e.distinct}putBindings(e){this.handleDistinct(e)||(this.counter+=1)}static emptyValue(){return(0,i.integer)(0).toRDF()}result(){return(0,i.integer)(this.counter).toRDF()}handleDistinct(e){if(this.distinct){const t=[...e];t.sort(((e,t)=>e[0].value.localeCompare(t[0].value)));const r=t.map((([e])=>e.value)).join(","),i=t.map((([,e])=>n.termToString(e))).join(","),a=this.bindingValues.get(r),o=void 0!==a&&a.has(i);return a||this.bindingValues.set(r,new Set),this.bindingValues.get(r).add(i),o}return!1}}},96300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aggregators=void 0;const n=r(37283),i=r(47943),a=r(81663),o=r(73342),s=r(59648),c=r(91664),u=r(69091);t.aggregators={count:i.Count,sum:u.Sum,min:s.Min,max:o.Max,avg:n.Average,group_concat:a.GroupConcat,sample:c.Sample}},19030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AggregateEvaluator=void 0;const n=r(76206),i=r(86588);class a extends n.BaseAggregateEvaluator{constructor(e,t,r){super(e,i.SyncEvaluator.completeContext(t??{}),r),this.evaluator=new i.SyncEvaluator(e.expression,t)}put(e){if(!this.errorOccurred)if(this.isWildcard)this.wildcardAggregator.putBindings(e);else try{const t=this.evaluator.evaluate(e);this.aggregator.put(t)}catch(e){this.safeThrow(e)}}safeThrow(e){if(this.throwError)throw e;this.errorOccurred=!0}}t.AggregateEvaluator=a},74448:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAggregateEvaluator=void 0;const n=r(98375),i=r(76206);class a extends i.BaseAggregateEvaluator{constructor(e,t,r){super(e,n.AsyncEvaluator.completeContext(t??{}),r),this.evaluator=new n.AsyncEvaluator(e.expression,t),this.errorOccurred=!1}async put(e){if(!this.errorOccurred)if(this.isWildcard)this.wildcardAggregator.putBindings(e);else try{const t=await this.evaluator.evaluate(e);if(!t||this.errorOccurred)return;this.aggregator.put(t)}catch(e){this.safeThrow(e)}}safeThrow(e){if(this.throwError)throw e;this.errorOccurred=!0}}t.AsyncAggregateEvaluator=a},98375:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncEvaluator=void 0;const n=r(35069),i=r(69119),a=r(76660),o=r(9062);class s{static completeContext(e){const t=e.now??new Date(Date.now());return{now:t,baseIRI:e.baseIRI??void 0,functionArgumentsCache:e.functionArgumentsCache??{},superTypeProvider:{cache:e.typeCache??new n.LRUCache({max:1e3}),discoverer:e.getSuperType??(()=>"term")},extensionFunctionCreator:e.extensionFunctionCreator,exists:e.exists,aggregate:e.aggregate,bnode:e.bnode,defaultTimeZone:e.defaultTimeZone??(0,a.extractTimeZone)(t)}}constructor(e,t={}){this.algExpr=e;const r=t.extensionFunctionCreator??(()=>{}),n=s.completeContext(t),a=new i.AlgebraTransformer({type:"async",creator:r,...n});this.expr=a.transformAlgebra(e),this.evaluator=new o.AsyncRecursiveEvaluator(n,a)}async evaluate(e){return(await this.evaluator.evaluate(this.expr,e)).toRDF()}async evaluateAsEBV(e){return(await this.evaluator.evaluate(this.expr,e)).coerceEBV()}async evaluateAsInternal(e){return await this.evaluator.evaluate(this.expr,e)}}t.AsyncEvaluator=s},86588:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncEvaluator=void 0;const n=r(35069),i=r(69119),a=r(76660),o=r(42425);class s{static completeContext(e){const t=e.now??new Date(Date.now());return{now:t,baseIRI:e.baseIRI??void 0,functionArgumentsCache:e.functionArgumentsCache??{},superTypeProvider:{cache:e.typeCache??new n.LRUCache({max:1e3}),discoverer:e.getSuperType??(()=>"term")},extensionFunctionCreator:e.extensionFunctionCreator,exists:e.exists,aggregate:e.aggregate,bnode:e.bnode,defaultTimeZone:e.defaultTimeZone??(0,a.extractTimeZone)(t)}}constructor(e,t={}){this.algExpr=e,this.context=t;const r=t.extensionFunctionCreator??(()=>{}),n=s.completeContext(t),a=new i.AlgebraTransformer({type:"sync",creator:r,...n});this.expr=a.transformAlgebra(e),this.evaluator=new o.SyncRecursiveEvaluator(n,a)}evaluate(e){return this.evaluator.evaluate(this.expr,e).toRDF()}evaluateAsEBV(e){return this.evaluator.evaluate(this.expr,e).coerceEBV()}evaluateAsInternal(e){return this.evaluator.evaluate(this.expr,e)}}t.SyncEvaluator=s},9062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncRecursiveEvaluator=void 0;const n=r(11269),i=r(50363),a=r(82867),o=r(10667);class s extends o.BaseExpressionEvaluator{constructor(e,t){super(t??new i.TermTransformer(e.superTypeProvider)),this.context=e,this.subEvaluators={[n.ExpressionType.Term]:(e,t)=>this.term(e),[n.ExpressionType.Variable]:(e,t)=>this.variable(e,t),[n.ExpressionType.Operator]:(e,t)=>this.evalOperator(e,t),[n.ExpressionType.SpecialOperator]:(e,t)=>this.evalSpecialOperator(e,t),[n.ExpressionType.Named]:(e,t)=>this.evalNamed(e,t),[n.ExpressionType.Existence]:(e,t)=>this.evalExistence(e,t),[n.ExpressionType.Aggregate]:(e,t)=>this.evalAggregate(e),[n.ExpressionType.AsyncExtension]:(e,t)=>this.evalAsyncExtension(e,t)}}async evaluate(e,t){const r=this.subEvaluators[e.expressionType];if(!r)throw new a.InvalidExpressionType(e);return r.bind(this)(e,t)}async evalOperator(e,t){const r=e.args.map((e=>this.evaluate(e,t))),n=await Promise.all(r);return e.apply(n)}async evalSpecialOperator(e,t){const r=this.evaluate.bind(this),n={args:e.args,mapping:t,superTypeProvider:this.context.superTypeProvider,now:this.context.now,baseIRI:this.context.baseIRI,functionArgumentsCache:this.context.functionArgumentsCache,evaluate:r,bnode:this.context.bnode,defaultTimeZone:this.context.defaultTimeZone};return e.applyAsync(n)}async _evalAsyncArgs(e,t){const r=e.map((e=>this.evaluate(e,t)));return await Promise.all(r)}async evalNamed(e,t){return e.apply(await this._evalAsyncArgs(e.args,t))}async evalAsyncExtension(e,t){return await e.apply(await this._evalAsyncArgs(e.args,t))}async evalExistence(e,t){if(!this.context.exists)throw new a.NoExistenceHook;return new n.BooleanLiteral(await this.context.exists(e.expression,t))}async evalAggregate(e){if(!this.context.aggregate)throw new a.NoAggregator;return this.termTransformer.transformRDFTermUnsafe(await this.context.aggregate(e.expression))}}t.AsyncRecursiveEvaluator=s},76206:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseAggregateEvaluator=void 0;const n=r(31578),i=r(96300),a=r(16095),o=r(59408),s=r(82867);t.BaseAggregateEvaluator=class{constructor(e,t,r){this.throwError=!1,this.isWildcard=!1,this.errorOccurred=!1,this.expression=e,this.aggregator=new a.Aggregator(e,new i.aggregators[e.aggregator](e,t)),this.throwError=r??!1,this.isWildcard=e.expression.expressionType===n.Algebra.expressionTypes.WILDCARD,this.isWildcard&&(this.wildcardAggregator=new o.WildcardCountAggregator(e))}static emptyValue(e,t=!1){let r;if(r=e.expression.expressionType===n.Algebra.expressionTypes.WILDCARD?o.WildcardCountAggregator.emptyValue():a.Aggregator.emptyValue(i.aggregators[e.aggregator]),void 0===r&&t)throw new s.EmptyAggregateError;return r}result(){if(!this.errorOccurred)return this.isWildcard?this.wildcardAggregator.result():this.aggregator.result()}}},10667:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseExpressionEvaluator=void 0;const n=r(63606),i=r(82867);t.BaseExpressionEvaluator=class{constructor(e){this.termTransformer=e}term(e){return e}variable(e,t){const r=t.get((0,n.expressionToVar)(e));if(!r)throw new i.UnboundVariableError(e.name,t);return this.termTransformer.transformRDFTermUnsafe(r)}}},42425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncRecursiveEvaluator=void 0;const n=r(11269),i=r(50363),a=r(82867),o=r(10667);class s extends o.BaseExpressionEvaluator{constructor(e,t){super(t??new i.TermTransformer(e.superTypeProvider)),this.context=e,this.subEvaluators={[n.ExpressionType.Term]:(e,t)=>this.term(e),[n.ExpressionType.Variable]:(e,t)=>this.variable(e,t),[n.ExpressionType.Operator]:(e,t)=>this.evalOperator(e,t),[n.ExpressionType.SpecialOperator]:(e,t)=>this.evalSpecialOperator(e,t),[n.ExpressionType.Named]:(e,t)=>this.evalNamed(e,t),[n.ExpressionType.Existence]:(e,t)=>this.evalExistence(e,t),[n.ExpressionType.Aggregate]:(e,t)=>this.evalAggregate(e),[n.ExpressionType.SyncExtension]:(e,t)=>this.evalSyncExtension(e,t)}}evaluate(e,t){const r=this.subEvaluators[e.expressionType];if(!r)throw new a.InvalidExpressionType(e);return r.bind(this)(e,t)}evalOperator(e,t){const r=e.args.map((e=>this.evaluate(e,t)));return e.apply(r)}evalSpecialOperator(e,t){const r=this.evaluate.bind(this),n={args:e.args,mapping:t,superTypeProvider:this.context.superTypeProvider,now:this.context.now,baseIRI:this.context.baseIRI,functionArgumentsCache:this.context.functionArgumentsCache,evaluate:r,bnode:this.context.bnode,defaultTimeZone:this.context.defaultTimeZone};return e.applySynchronously(n)}evalNamed(e,t){const r=e.args.map((e=>this.evaluate(e,t)));return e.apply(r)}evalSyncExtension(e,t){const r=e.args.map((e=>this.evaluate(e,t)));return e.apply(r)}evalExistence(e,t){if(!this.context.exists)throw new a.NoExistenceHook;return new n.BooleanLiteral(this.context.exists(e.expression,t))}evalAggregate(e){if(!this.context.aggregate)throw new a.NoAggregator;return this.termTransformer.transformRDFTermUnsafe(this.context.aggregate(e.expression))}}t.SyncRecursiveEvaluator=s},9950:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Aggregate=void 0;const n=r(89702);t.Aggregate=class{constructor(e,t){this.name=e,this.expression=t,this.expressionType=n.ExpressionType.Aggregate}}},29360:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncExtension=void 0;const n=r(89702);t.AsyncExtension=class{constructor(e,t,r){this.name=e,this.args=t,this.apply=r,this.expressionType=n.ExpressionType.AsyncExtension}}},75065:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Existence=void 0;const n=r(89702);t.Existence=class{constructor(e){this.expression=e,this.expressionType=n.ExpressionType.Existence}}},89702:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.asTermType=t.ExpressionType=void 0,function(e){e.Aggregate="aggregate",e.Existence="existence",e.Named="named",e.Operator="operator",e.SpecialOperator="specialOperator",e.Term="term",e.Variable="variable",e.AsyncExtension="asyncExtension",e.SyncExtension="syncExtension"}(r||(t.ExpressionType=r={})),t.asTermType=function(e){if("namedNode"===e||"literal"===e||"blankNode"===e||"quad"===e)return e}},67112:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Named=void 0;const n=r(89702);t.Named=class{constructor(e,t,r){this.name=e,this.args=t,this.apply=r,this.expressionType=n.ExpressionType.Named}}},27033:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operator=void 0;const n=r(89702);t.Operator=class{constructor(e,t){this.args=e,this.apply=t,this.expressionType=n.ExpressionType.Operator}}},3358:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpecialOperator=void 0;const n=r(89702);t.SpecialOperator=class{constructor(e,t,r){this.args=e,this.applyAsync=t,this.applySynchronously=r,this.expressionType=n.ExpressionType.SpecialOperator}}},62293:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncExtension=void 0;const n=r(89702);t.SyncExtension=class{constructor(e,t,r){this.name=e,this.args=t,this.apply=r,this.expressionType=n.ExpressionType.SyncExtension}}},79339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNonLexicalLiteral=t.NonLexicalLiteral=t.YearMonthDurationLiteral=t.DayTimeDurationLiteral=t.DurationLiteral=t.DateLiteral=t.TimeLiteral=t.DateTimeLiteral=t.StringLiteral=t.LangStringLiteral=t.BooleanLiteral=t.DoubleLiteral=t.FloatLiteral=t.DecimalLiteral=t.IntegerLiteral=t.NumericLiteral=t.Literal=t.isLiteralTermExpression=t.Quad=t.BlankNode=t.NamedNode=t.Term=void 0;const n=r(18050),i=r(50363),a=r(14624),o=r(14624),s=r(82867),c=r(19002),u=r(46157),l=r(89702),d=new n.DataFactory;class h{constructor(){this.expressionType=l.ExpressionType.Term}str(){throw new s.InvalidArgumentTypes([this],a.RegularOperator.STR)}coerceEBV(){throw new s.EBVCoercionError(this)}}t.Term=h,t.NamedNode=class extends h{constructor(e){super(),this.value=e,this.termType="namedNode"}toRDF(){return d.namedNode(this.value)}str(){return this.value}},t.BlankNode=class extends h{constructor(e){super(),this.termType="blankNode",this.value="string"==typeof e?d.blankNode(e):e}toRDF(){return this.value}},t.Quad=class extends h{constructor(e,t){super(),this.termType="quad",this.transformer=new i.TermTransformer(t),this.valueTerm=e}toRDF(){return this.valueTerm}get subject(){return this.transformer.transformRDFTermUnsafe(this.RDFsubject)}get predicate(){return this.transformer.transformRDFTermUnsafe(this.RDFpredicate)}get object(){return this.transformer.transformRDFTermUnsafe(this.RDFobject)}get RDFsubject(){return this.toRDF().subject}get RDFpredicate(){return this.toRDF().predicate}get RDFobject(){return this.toRDF().object}},t.isLiteralTermExpression=function(e){if("literal"===e.termType)return e};class p extends h{constructor(e,t,r,n){super(),this.typedValue=e,this.dataType=t,this.strValue=r,this.language=n,this.termType="literal"}toRDF(){return d.literal(this.strValue??this.str(),this.language??d.namedNode(this.dataType))}str(){return this.strValue??this.typedValue.toString()}}t.Literal=p;class f extends p{constructor(e,t,r,n){super(e,t,r,n),this.typedValue=e,this.strValue=r,this.language=n}coerceEBV(){return Boolean(this.typedValue)}toRDF(){const e=super.toRDF();return Number.isFinite(this.typedValue)||(e.value=e.value.replace("Infinity","INF")),e}str(){return this.strValue??this.specificFormatter(this.typedValue)}}t.NumericLiteral=f,t.IntegerLiteral=class extends f{constructor(e,t,r,n){super(e,t??o.TypeURL.XSD_INTEGER,r,n),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){return e.toFixed(0)}},t.DecimalLiteral=class extends f{constructor(e,t,r,n){super(e,t??o.TypeURL.XSD_DECIMAL,r,n),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){return e.toString()}},t.FloatLiteral=class extends f{constructor(e,t,r,n){super(e,t??o.TypeURL.XSD_FLOAT,r,n),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){return e.toString()}},t.DoubleLiteral=class extends f{constructor(e,t,r,n){super(e,t??o.TypeURL.XSD_DOUBLE,r,n),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){if(!Number.isFinite(e))return e>0?"INF":e<0?"-INF":"NaN";const t=e.toExponential(),[r,n]=t.split("e"),i=n.replace(/\+/u,"");return`${r.includes(".")?r:`${r}.0`}E${i}`}},t.BooleanLiteral=class extends p{constructor(e,t,r){super(e,r??o.TypeURL.XSD_BOOLEAN,t),this.typedValue=e,this.strValue=t}coerceEBV(){return this.typedValue}},t.LangStringLiteral=class extends p{constructor(e,t,r){super(e,r??o.TypeURL.RDF_LANG_STRING,e,t),this.typedValue=e,this.language=t}coerceEBV(){return this.str().length>0}},t.StringLiteral=class extends p{constructor(e,t){super(e,t??o.TypeURL.XSD_STRING,e),this.typedValue=e}coerceEBV(){return this.str().length>0}},t.DateTimeLiteral=class extends p{constructor(e,t,r){super(e,r??o.TypeURL.XSD_DATE_TIME,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeDateTime)(this.typedValue)}},t.TimeLiteral=class extends p{constructor(e,t,r){super(e,r??o.TypeURL.XSD_TIME,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeTime)(this.typedValue)}},t.DateLiteral=class extends p{constructor(e,t,r){super(e,r??o.TypeURL.XSD_DATE,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeDate)(this.typedValue)}};class y extends p{constructor(e,t,r){super(e,r??o.TypeURL.XSD_DURATION,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeDuration)(this.typedValue)}}t.DurationLiteral=y,t.DayTimeDurationLiteral=class extends y{constructor(e,t,r){super(e,t,r??o.TypeURL.XSD_DAY_TIME_DURATION),this.typedValue=e,this.strValue=t}},t.YearMonthDurationLiteral=class extends p{constructor(e,t,r){super(e,r??o.TypeURL.XSD_YEAR_MONTH_DURATION,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeDuration)(this.typedValue,"P0M")}};class g extends p{constructor(e,t,r,n,i){super({toString:()=>"undefined"},t,n,i),this.openWorldType=r}coerceEBV(){if((0,u.isSubTypeOf)(this.dataType,o.TypeURL.XSD_BOOLEAN,this.openWorldType)||(0,u.isSubTypeOf)(this.dataType,o.TypeAlias.SPARQL_NUMERIC,this.openWorldType))return!1;throw new s.EBVCoercionError(this)}toRDF(){return d.literal(this.str(),this.language??d.namedNode(this.dataType))}str(){return this.strValue??""}}t.NonLexicalLiteral=g,t.isNonLexicalLiteral=function(e){if(e instanceof g)return e}},28757:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Variable=void 0;const n=r(89702);t.Variable=class{constructor(e){this.expressionType=n.ExpressionType.Variable,this.name=e}}},11269:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(89702),t),i(r(28757),t),i(r(79339),t),i(r(27033),t),i(r(3358),t),i(r(67112),t),i(r(9950),t),i(r(75065),t),i(r(29360),t),i(r(62293),t)},57328:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpecialFunction=t.NamedFunction=t.RegularFunction=t.BaseFunction=void 0;const n=r(82867);class i{constructor(e,t){this.operator=e,this.apply=(e,t)=>(this.monomorph(e,t.superTypeProvider,t.functionArgumentsCache)??this.handleInvalidTypes(e))(t)(e),this.arity=t.arity,this.overloads=t.overloads}monomorph(e,t,r){return this.overloads.search(e,t,r)}}t.BaseFunction=i,t.RegularFunction=class extends i{constructor(e,t){super(e,t),this.functionClass="regular"}handleInvalidTypes(e){throw new n.InvalidArgumentTypes(e,this.operator)}},t.NamedFunction=class extends i{constructor(e,t){super(e,t),this.functionClass="named"}handleInvalidTypes(e){throw new n.InvalidArgumentTypes(e,this.operator)}},t.SpecialFunction=class{constructor(e,t){var r;this.operator=e,this.functionClass="special",this.arity=t.arity,this.applySynchronously=t.applySynchronously,this.applyAsync=t.applyAsync,this.checkArity=t.checkArity??(r=this.arity,e=>r===Number.POSITIVE_INFINITY||e.length===r)}}},63606:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expressionToVar=t.dateTime=t.langString=t.string=t.double=t.float=t.decimal=t.integer=t.bool=t.Builder=t.declare=void 0;const n=r(18050),i=r(11269),a=r(11269),o=r(14624),s=r(14624),c=r(82867),u=r(33357),l=new n.DataFactory;t.declare=function(e){return new d(e)};class d{constructor(e){this.overloadTree=new u.OverloadTree(e),this.collected=!1}collect(){if(this.collected)throw new Error("Builders can only be collected once!");return this.collected=!0,this.overloadTree}static wrapInvalidLexicalProtected(e){return t=>r=>{for(const[e,t]of r.entries())if(t instanceof a.NonLexicalLiteral)throw new c.InvalidLexicalForm(r[e].toRDF());return e(t)(r)}}set(e,t,r=!0){return this.overloadTree.addOverload(e,r?d.wrapInvalidLexicalProtected(t):t),this}copy({from:e,to:t}){const r=this.overloadTree.getImplementationExact(e);if(!r)throw new c.UnexpectedError("Tried to copy implementation, but types not found",{from:e,to:t});return this.set(t,r)}onUnary(e,t,r=!0){return this.set([e],(e=>([r])=>t(e)(r)),r)}onUnaryTyped(e,t,r=!0){return this.set([e],(e=>([r])=>t(e)(r.typedValue)),r)}onBinary(e,t,r=!0){return this.set(e,(e=>([r,n])=>t(e)(r,n)),r)}onBinaryTyped(e,t,r=!0){return this.set(e,(e=>([r,n])=>t(e)(r.typedValue,n.typedValue)),r)}onTernaryTyped(e,t,r=!0){return this.set(e,(e=>([r,n,i])=>t(e)(r.typedValue,n.typedValue,i.typedValue)),r)}onTernary(e,t,r=!0){return this.set(e,(e=>([r,n,i])=>t(e)(r,n,i)),r)}onQuaternaryTyped(e,t,r=!0){return this.set(e,(e=>([r,n,i,a])=>t(e)(r.typedValue,n.typedValue,i.typedValue,a.typedValue)),r)}onTerm1(e,t=!1){return this.set(["term"],(t=>([r])=>e(t)(r)),t)}onTerm3(e){return this.set(["term","term","term"],(t=>([r,n,i])=>e(t)(r,n,i)))}onQuad1(e){return this.set(["quad"],(t=>([r])=>e(t)(r)))}onLiteral1(e,t=!0){return this.set(["literal"],(t=>([r])=>e(t)(r)),t)}onBoolean1(e,t=!0){return this.set([o.TypeURL.XSD_BOOLEAN],(t=>([r])=>e(t)(r)),t)}onBoolean1Typed(e,t=!0){return this.set([o.TypeURL.XSD_BOOLEAN],(t=>([r])=>e(t)(r.typedValue)),t)}onString1(e,t=!0){return this.set([o.TypeURL.XSD_STRING],(t=>([r])=>e(t)(r)),t)}onString1Typed(e,t=!0){return this.set([o.TypeURL.XSD_STRING],(t=>([r])=>e(t)(r.typedValue)),t)}onLangString1(e,t=!0){return this.set([o.TypeURL.RDF_LANG_STRING],(t=>([r])=>e(t)(r)),t)}onStringly1(e,t=!0){return this.set([o.TypeAlias.SPARQL_STRINGLY],(t=>([r])=>e(t)(r)),t)}onStringly1Typed(e,t=!0){return this.set([o.TypeAlias.SPARQL_STRINGLY],(t=>([r])=>e(t)(r.typedValue)),t)}onNumeric1(e,t=!0){return this.set([o.TypeAlias.SPARQL_NUMERIC],(t=>([r])=>e(t)(r)),t)}onDateTime1(e,t=!0){return this.set([o.TypeURL.XSD_DATE_TIME],(t=>([r])=>e(t)(r)),t)}numericConverter(e,t=!0){const r=t=>r=>e(t)(r.typedValue);return this.onUnary(s.TypeURL.XSD_INTEGER,(e=>t=>p(r(e)(t))),t).onUnary(s.TypeURL.XSD_DECIMAL,(e=>t=>f(r(e)(t))),t).onUnary(s.TypeURL.XSD_FLOAT,(e=>t=>y(r(e)(t))),t).onUnary(s.TypeURL.XSD_DOUBLE,(e=>t=>g(r(e)(t))),t)}arithmetic(e,t=!0){const r=t=>(r,n)=>e(t)(r.typedValue,n.typedValue);return this.onBinary([s.TypeURL.XSD_INTEGER,s.TypeURL.XSD_INTEGER],(e=>(t,n)=>p(r(e)(t,n))),t).onBinary([s.TypeURL.XSD_DECIMAL,s.TypeURL.XSD_DECIMAL],(e=>(t,n)=>f(r(e)(t,n))),t).onBinary([s.TypeURL.XSD_FLOAT,s.TypeURL.XSD_FLOAT],(e=>(t,n)=>y(r(e)(t,n))),t).onBinary([s.TypeURL.XSD_DOUBLE,s.TypeURL.XSD_DOUBLE],(e=>(t,n)=>g(r(e)(t,n))),t)}numberTest(e){return this.numeric((t=>([r,n])=>h(e(t)(r.typedValue,n.typedValue))))}stringTest(e,t=!0){return this.set([o.TypeURL.XSD_STRING,o.TypeURL.XSD_STRING],(t=>([r,n])=>h(e(t)(r.typedValue,n.typedValue))),t)}booleanTest(e,t=!0){return this.set([o.TypeURL.XSD_BOOLEAN,o.TypeURL.XSD_BOOLEAN],(t=>([r,n])=>h(e(t)(r.typedValue,n.typedValue))),t)}dateTimeTest(e,t=!0){return this.set([o.TypeURL.XSD_DATE_TIME,o.TypeURL.XSD_DATE_TIME],(t=>([r,n])=>h(e(t)(r.typedValue,n.typedValue))),t)}numeric(e){return this.set([o.TypeAlias.SPARQL_NUMERIC,o.TypeAlias.SPARQL_NUMERIC],e)}}function h(e){return new i.BooleanLiteral(e)}function p(e){return new i.IntegerLiteral(e)}function f(e){return new i.DecimalLiteral(e)}function y(e){return new i.FloatLiteral(e)}function g(e){return new i.DoubleLiteral(e)}t.Builder=d,t.bool=h,t.integer=p,t.decimal=f,t.float=y,t.double=g,t.string=function(e){return new i.StringLiteral(e)},t.langString=function(e,t){return new i.LangStringLiteral(e,t)},t.dateTime=function(e,t){return new i.DateTimeLiteral(e,t)},t.expressionToVar=function(e){return l.variable(e.name.slice(1))}},58157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.namedDefinitions=void 0;const n=r(11269),i=r(11269),a=r(14624),o=r(76660),s=r(82867),c=r(17590),u=r(63606),l={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_STRING).onNumeric1((()=>e=>(0,u.string)((0,u.float)(e.typedValue).str()))).onBoolean1Typed((()=>e=>(0,u.string)((0,u.bool)(e).str()))).onTerm1((()=>e=>(0,u.string)(e.str()))).collect()},d={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_FLOAT).onNumeric1((()=>e=>(0,u.float)(e.typedValue))).onBoolean1Typed((()=>e=>(0,u.float)(e?1:0))).onUnary(a.TypeURL.XSD_STRING,(()=>e=>{const t=(0,c.parseXSDFloat)(e.str());if(void 0===t)throw new s.CastError(e,a.TypeURL.XSD_FLOAT);return(0,u.float)(t)}),!1).collect()},h={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DOUBLE).onNumeric1((()=>e=>(0,u.double)(e.typedValue))).onBoolean1Typed((()=>e=>(0,u.double)(e?1:0))).onUnary(a.TypeURL.XSD_STRING,(()=>e=>{const t=(0,c.parseXSDFloat)(e.str());if(void 0===t)throw new s.CastError(e,a.TypeURL.XSD_DOUBLE);return(0,u.double)(t)}),!1).collect()},p={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DECIMAL).onNumeric1((()=>e=>{const t=(0,c.parseXSDDecimal)(e.str());if(void 0===t)throw new s.CastError(e,a.TypeURL.XSD_DECIMAL);return(0,u.decimal)(t)})).onString1((()=>e=>{const t=e.str(),r=/^([+-])?(\d+(\.\d+)?)$/u.test(t)?(0,c.parseXSDDecimal)(t):void 0;if(void 0===r)throw new s.CastError(e,a.TypeURL.XSD_DECIMAL);return(0,u.decimal)(r)}),!1).onBoolean1Typed((()=>e=>(0,u.decimal)(e?1:0))).collect()},f={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_INTEGER).onBoolean1Typed((()=>e=>(0,u.integer)(e?1:0))).onNumeric1((()=>e=>{const t=(0,c.parseXSDInteger)(e.str());if(void 0===t)throw new s.CastError(e,a.TypeURL.XSD_INTEGER);return(0,u.integer)(t)}),!1).onString1((()=>e=>{const t=e.str(),r=/^\d+$/u.test(t)?(0,c.parseXSDInteger)(t):void 0;if(void 0===r)throw new s.CastError(e,a.TypeURL.XSD_INTEGER);return(0,u.integer)(r)})).collect()},y={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DATE_TIME).onUnary(a.TypeURL.XSD_DATE_TIME,(()=>e=>e)).onUnary(a.TypeURL.XSD_STRING,(()=>e=>(0,u.dateTime)((0,c.parseDateTime)(e.str()),e.str())),!1).onUnary(a.TypeURL.XSD_DATE,(()=>e=>new n.DateTimeLiteral({...e.typedValue,hours:0,minutes:0,seconds:0}))).collect()},g={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_BOOLEAN).onNumeric1((()=>e=>(0,u.bool)(e.coerceEBV())),!0).onUnary(a.TypeURL.XSD_BOOLEAN,(()=>e=>(0,u.bool)(e.coerceEBV())),!0).onUnary(a.TypeURL.XSD_STRING,(()=>e=>{switch(e.str()){case"true":case"1":return(0,u.bool)(!0);case"false":case"0":return(0,u.bool)(!1);default:throw new s.CastError(e,a.TypeURL.XSD_BOOLEAN)}}),!1).collect()},m={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_TIME).onUnary(a.TypeURL.XSD_TIME,(()=>e=>new n.TimeLiteral(e.typedValue,e.strValue))).onUnary(a.TypeURL.XSD_DATE_TIME,(()=>e=>new n.TimeLiteral(e.typedValue))).onStringly1((()=>e=>new n.TimeLiteral((0,c.parseTime)(e.str())))).collect()},b={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DATE).onUnary(a.TypeURL.XSD_DATE,(()=>e=>new n.DateLiteral(e.typedValue,e.strValue))).onUnary(a.TypeURL.XSD_DATE_TIME,(()=>e=>new n.DateLiteral(e.typedValue))).onStringly1((()=>e=>new n.DateLiteral((0,c.parseDate)(e.str())))).collect()},v={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DURATION).onUnary(a.TypeURL.XSD_DURATION,(()=>e=>new n.DurationLiteral(e.typedValue,e.strValue))).onStringly1((()=>e=>new i.DurationLiteral((0,c.parseDuration)(e.str())))).collect()},_={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DAY_TIME_DURATION).onUnary(a.TypeURL.XSD_DURATION,(()=>e=>new n.DayTimeDurationLiteral((0,o.trimToDayTimeDuration)(e.typedValue)))).onStringly1((()=>e=>new n.DayTimeDurationLiteral((0,c.parseDayTimeDuration)(e.str())))).collect()},w={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_YEAR_MONTH_DURATION).onUnary(a.TypeURL.XSD_DURATION,(()=>e=>new n.YearMonthDurationLiteral((0,o.trimToYearMonthDuration)(e.typedValue)))).onStringly1((()=>e=>new n.YearMonthDurationLiteral((0,c.parseYearMonthDuration)(e.str())))).collect()};t.namedDefinitions={[a.TypeURL.XSD_STRING]:l,[a.TypeURL.XSD_FLOAT]:d,[a.TypeURL.XSD_DOUBLE]:h,[a.TypeURL.XSD_DECIMAL]:p,[a.TypeURL.XSD_INTEGER]:f,[a.TypeURL.XSD_DATE_TIME]:y,[a.TypeURL.XSD_DATE]:b,[a.TypeURL.XSD_BOOLEAN]:g,[a.TypeURL.XSD_TIME]:m,[a.TypeURL.XSD_DURATION]:v,[a.TypeURL.XSD_DAY_TIME_DURATION]:_,[a.TypeURL.XSD_YEAR_MONTH_DURATION]:w}},33357:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OverloadTree=void 0;const n=r(11269),i=r(46157);class a{constructor(e,t){this.identifier=e,this.implementation=void 0,this.generalOverloads=Object.create(null),this.literalOverLoads=[],this.depth=t??0,this.promotionCount=void 0}getSubtree(e){const t=(0,i.asGeneralType)(e);if(t)return this.generalOverloads[t];for(const[t,r]of this.literalOverLoads)if(e===t)return r}getImplementationExact(e){let t=this;for(const r of e)if(t=t.getSubtree(r),!t)return;return t.implementation}search(e,t,r){let i=r[this.identifier],a=0;for(;a({node:e,index:1}))));o.length>0;){const{index:n,node:i}=o.pop();if(n===e.length&&i.implementation)return this.addToCache(r,e,i.implementation),i.implementation;o.push(...i.getSubTreeWithArg(e[n],t).map((e=>({node:e,index:n+1}))))}}addToCache(e,t,r){function i(e,t){return t in e||(e[t]={}),e[t]}let a=i(e,this.identifier);for(const e of t){const t=(0,n.isLiteralTermExpression)(e),r=t?t.dataType:e.termType;a.cache=a.cache??{},a=i(a.cache,r)}a.func=r}addOverload(e,t){this._addOverload([...e],t,0)}_addOverload(e,t,r){const[n,...o]=e;if(!n)return void((void 0===this.promotionCount||r<=this.promotionCount)&&(this.promotionCount=r,this.implementation=t));let s=this.getSubtree(n);if(!s){const e=new a(this.identifier,this.depth+1),t=(0,i.asGeneralType)(n);t&&(this.generalOverloads[t]=e);const r=(0,i.asOverrideType)(n);r&&this.literalOverLoads.push([r,e]),s=e}if(s._addOverload(o,t,r),i.typePromotion[n])for(const e of i.typePromotion[n])this.addPromotedOverload(e.typeToPromote,t,e.conversionFunction,o,r)}addPromotedOverload(e,t,r,n,i){let o=this.getSubtree(e);if(!o){const t=new a(this.identifier,this.depth+1);this.literalOverLoads.push([e,t]),o=t}o._addOverload(n,(e=>n=>t(e)([...n.slice(0,this.depth),r(n[this.depth]),...n.slice(this.depth+1,n.length)])),i+1)}getSubTreeWithArg(e,t){const r=[],a=(0,n.isLiteralTermExpression)(e);if(this.generalOverloads.term&&r.push(this.generalOverloads.term),this.generalOverloads[e.termType]&&r.push(this.generalOverloads[e.termType]),a){const e=(0,i.asKnownLiteralType)(a.dataType);let n;n=e?i.superTypeDictTable[e]:(0,i.getSuperTypes)(a.dataType,t);const o=this.literalOverLoads.filter((([e,t])=>e in n)).map((([e,t])=>[n[e],t]));o.sort((([e,t],[r,n])=>e-r)),r.push(...o.map((([e,t])=>t)))}return r}}t.OverloadTree=a},22122:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.definitions=void 0;const n=r(55553),i=r(99499),a=r(18050),o=r(9929),s=r(88110),c=r(84596),u=r(11269),l=r(50363),d=r(14624),h=r(14624),p=r(76660),f=r(82867),y=r(20236),g=r(66487),m=r(57328),b=r(63606),v=r(29791),_=r(42711),w=new a.DataFactory,T={arity:1,overloads:(0,b.declare)(d.RegularOperator.NOT).onTerm1((()=>e=>(0,b.bool)(!e.coerceEBV()))).collect()},S={arity:1,overloads:(0,b.declare)(d.RegularOperator.UPLUS).numericConverter((()=>e=>e)).collect()},O={arity:1,overloads:(0,b.declare)(d.RegularOperator.UMINUS).numericConverter((()=>e=>-e)).collect()},E={arity:2,overloads:(0,b.declare)(d.RegularOperator.MULTIPLICATION).arithmetic((()=>(e,t)=>new n.BigNumber(e).times(t).toNumber())).collect()},x={arity:2,overloads:(0,b.declare)(d.RegularOperator.DIVISION).arithmetic((()=>(e,t)=>new n.BigNumber(e).div(t).toNumber())).onBinaryTyped([h.TypeURL.XSD_INTEGER,h.TypeURL.XSD_INTEGER],(()=>(e,t)=>{if(0===t)throw new f.ExpressionError("Integer division by 0");return(0,b.decimal)(new n.BigNumber(e).div(t).toNumber())})).collect()},A={arity:2,overloads:(0,b.declare)(d.RegularOperator.ADDITION).arithmetic((()=>(e,t)=>new n.BigNumber(e).plus(t).toNumber())).set([h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.DateTimeLiteral((0,g.addDurationToDateTime)(e.typedValue,(0,p.defaultedDurationRepresentation)(t.typedValue))))).copy({from:[h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DAY_TIME_DURATION],to:[h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([h.TypeURL.XSD_DATE,h.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.DateLiteral((0,g.addDurationToDateTime)((0,p.defaultedDateTimeRepresentation)(e.typedValue),(0,p.defaultedDurationRepresentation)(t.typedValue))))).copy({from:[h.TypeURL.XSD_DATE,h.TypeURL.XSD_DAY_TIME_DURATION],to:[h.TypeURL.XSD_DATE,h.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([h.TypeURL.XSD_TIME,h.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.TimeLiteral((0,g.addDurationToDateTime)((0,p.defaultedDateTimeRepresentation)(e.typedValue),(0,p.defaultedDurationRepresentation)(t.typedValue))))).copy({from:[h.TypeURL.XSD_TIME,h.TypeURL.XSD_DAY_TIME_DURATION],to:[h.TypeURL.XSD_TIME,h.TypeURL.XSD_YEAR_MONTH_DURATION]}).collect()},R={arity:2,overloads:(0,b.declare)(d.RegularOperator.SUBTRACTION).arithmetic((()=>(e,t)=>new n.BigNumber(e).minus(t).toNumber())).set([h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DATE_TIME],(({defaultTimeZone:e})=>([t,r])=>new u.DayTimeDurationLiteral((0,g.elapsedDuration)(t.typedValue,r.typedValue,e)))).copy({from:[h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DATE_TIME],to:[h.TypeURL.XSD_DATE,h.TypeURL.XSD_DATE]}).copy({from:[h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DATE_TIME],to:[h.TypeURL.XSD_TIME,h.TypeURL.XSD_TIME]}).set([h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.DateTimeLiteral((0,g.addDurationToDateTime)(e.typedValue,(0,p.defaultedDurationRepresentation)((0,p.negateDuration)(t.typedValue)))))).copy({from:[h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DAY_TIME_DURATION],to:[h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([h.TypeURL.XSD_DATE,h.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.DateLiteral((0,g.addDurationToDateTime)((0,p.defaultedDateTimeRepresentation)(e.typedValue),(0,p.defaultedDurationRepresentation)((0,p.negateDuration)(t.typedValue)))))).copy({from:[h.TypeURL.XSD_DATE,h.TypeURL.XSD_DAY_TIME_DURATION],to:[h.TypeURL.XSD_DATE,h.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([h.TypeURL.XSD_TIME,h.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.TimeLiteral((0,g.addDurationToDateTime)((0,p.defaultedDateTimeRepresentation)(e.typedValue),(0,p.defaultedDurationRepresentation)((0,p.negateDuration)(t.typedValue)))))).collect()},I={arity:2,overloads:(0,b.declare)(d.RegularOperator.EQUAL).numberTest((()=>(e,t)=>e===t)).stringTest((()=>(e,t)=>0===e.localeCompare(t))).set([h.TypeURL.RDF_LANG_STRING,h.TypeURL.RDF_LANG_STRING],(()=>([e,t])=>(0,b.bool)(e.str()===t.str()&&e.language===t.language))).set([h.TypeAlias.SPARQL_STRINGLY,h.TypeAlias.SPARQL_STRINGLY],(()=>()=>(0,b.bool)(!1))).booleanTest((()=>(e,t)=>e===t)).dateTimeTest((({defaultTimeZone:e})=>(t,r)=>(0,p.toUTCDate)(t,e).getTime()===(0,p.toUTCDate)(r,e).getTime())).copy({from:[h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DATE_TIME],to:[h.TypeURL.XSD_DATE,h.TypeURL.XSD_DATE]}).set(["quad","quad"],(e=>([t,r])=>{const n=new m.RegularFunction(h.RegularOperator.EQUAL,I);return(0,b.bool)(n.apply([t.subject,r.subject],e).coerceEBV()&&n.apply([t.predicate,r.predicate],e).coerceEBV()&&n.apply([t.object,r.object],e).coerceEBV())}),!1).set(["term","term"],(()=>([e,t])=>(0,b.bool)(function(e,t){const r=e.toRDF(),n=t.toRDF(),i=r.equals(n);if(!i&&"Literal"===r.termType&&"Literal"===n.termType)throw new f.RDFEqualTypeError([e,t]);return i}(e,t))),!1).set([h.TypeURL.XSD_DURATION,h.TypeURL.XSD_DURATION],(()=>([e,t])=>(0,b.bool)((0,p.yearMonthDurationsToMonths)((0,p.defaultedYearMonthDurationRepresentation)(e.typedValue))===(0,p.yearMonthDurationsToMonths)((0,p.defaultedYearMonthDurationRepresentation)(t.typedValue))&&(0,p.dayTimeDurationsToSeconds)((0,p.defaultedDayTimeDurationRepresentation)(e.typedValue))===(0,p.dayTimeDurationsToSeconds)((0,p.defaultedDayTimeDurationRepresentation)(t.typedValue))))).set([h.TypeURL.XSD_TIME,h.TypeURL.XSD_TIME],(({defaultTimeZone:e})=>([t,r])=>(0,b.bool)((0,p.toUTCDate)((0,p.defaultedDateTimeRepresentation)(t.typedValue),e).getTime()===(0,p.toUTCDate)((0,p.defaultedDateTimeRepresentation)(r.typedValue),e).getTime()))).collect()},P={arity:2,overloads:(0,b.declare)(d.RegularOperator.NOT_EQUAL).set(["term","term"],(e=>([t,r])=>(0,b.bool)(!_.regularFunctions[d.RegularOperator.EQUAL].apply([t,r],e).typedValue))).collect()},N={arity:2,overloads:(0,b.declare)(d.RegularOperator.LT).numberTest((()=>(e,t)=>e(e,t)=>-1===e.localeCompare(t))).booleanTest((()=>(e,t)=>e([e,t])=>(0,b.bool)(-1===(0,y.orderTypes)(e.toRDF(),t.toRDF(),!0))),!1).dateTimeTest((({defaultTimeZone:e})=>(t,r)=>(0,p.toUTCDate)(t,e).getTime()<(0,p.toUTCDate)(r,e).getTime())).copy({from:[h.TypeURL.XSD_DATE_TIME,h.TypeURL.XSD_DATE_TIME],to:[h.TypeURL.XSD_DATE,h.TypeURL.XSD_DATE]}).set([h.TypeURL.XSD_YEAR_MONTH_DURATION,h.TypeURL.XSD_YEAR_MONTH_DURATION],(()=>([e,t])=>(0,b.bool)((0,p.yearMonthDurationsToMonths)((0,p.defaultedYearMonthDurationRepresentation)(e.typedValue))<(0,p.yearMonthDurationsToMonths)((0,p.defaultedYearMonthDurationRepresentation)(t.typedValue))))).set([h.TypeURL.XSD_DAY_TIME_DURATION,h.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>(0,b.bool)((0,p.dayTimeDurationsToSeconds)((0,p.defaultedDayTimeDurationRepresentation)(e.typedValue))<(0,p.dayTimeDurationsToSeconds)((0,p.defaultedDayTimeDurationRepresentation)(t.typedValue))))).set([h.TypeURL.XSD_TIME,h.TypeURL.XSD_TIME],(({defaultTimeZone:e})=>([t,r])=>(0,b.bool)((0,p.toUTCDate)((0,p.defaultedDateTimeRepresentation)(t.typedValue),e).getTime()<(0,p.toUTCDate)((0,p.defaultedDateTimeRepresentation)(r.typedValue),e).getTime()))).collect()},D={arity:2,overloads:(0,b.declare)(d.RegularOperator.GT).set(["term","term"],(e=>([t,r])=>_.regularFunctions[d.RegularOperator.LT].apply([r,t],e))).collect()},j={arity:2,overloads:(0,b.declare)(d.RegularOperator.LTE).set(["term","term"],(e=>([t,r])=>(0,b.bool)(_.regularFunctions[d.RegularOperator.LT].apply([t,r],e).typedValue||_.regularFunctions[d.RegularOperator.EQUAL].apply([t,r],e).typedValue))).collect()},C={arity:2,overloads:(0,b.declare)(d.RegularOperator.GTE).set(["term","term"],(e=>([t,r])=>_.regularFunctions[d.RegularOperator.LTE].apply([r,t],e))).collect()},M={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_IRI).onTerm1((()=>e=>(0,b.bool)("namedNode"===e.termType))).collect()},L={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_BLANK).onTerm1((()=>e=>(0,b.bool)("blankNode"===e.termType))).collect()},k={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_LITERAL).onTerm1((()=>e=>(0,b.bool)("literal"===e.termType))).collect()},F={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_NUMERIC).onNumeric1((()=>()=>(0,b.bool)(!0))).onTerm1((()=>()=>(0,b.bool)(!1))).collect()},B={arity:1,overloads:(0,b.declare)(d.RegularOperator.STR).onTerm1((()=>e=>(0,b.string)(e.str()))).collect()},U={arity:1,overloads:(0,b.declare)(d.RegularOperator.LANG).onLiteral1((()=>e=>(0,b.string)(e.language??""))).collect()},q={arity:1,overloads:(0,b.declare)(d.RegularOperator.DATATYPE).onLiteral1((()=>e=>new u.NamedNode(e.dataType))).collect()},V={arity:1,overloads:(0,b.declare)(d.RegularOperator.IRI).set(["namedNode"],(e=>t=>{const r=t[0],n=(0,o.resolve)(r.str(),e.baseIRI??"");return new u.NamedNode(n)})).onString1((e=>t=>{const r=(0,o.resolve)(t.str(),e.baseIRI??"");return new u.NamedNode(r)})).collect()},Q={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRDT).set([h.TypeURL.XSD_STRING,"namedNode"],(({superTypeProvider:e})=>([t,r])=>{const n=w.literal(t.typedValue,w.namedNode(r.value));return new l.TermTransformer(e).transformLiteral(n)})).collect()},$={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRLANG).onBinaryTyped([h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(()=>(e,t)=>new u.LangStringLiteral(e,t.toLowerCase()))).collect()},H={arity:0,overloads:(0,b.declare)(d.RegularOperator.UUID).set([],(()=>()=>new u.NamedNode(`urn:uuid:${c.v4()}`))).collect()},G={arity:0,overloads:(0,b.declare)(d.RegularOperator.STRUUID).set([],(()=>()=>(0,b.string)(c.v4()))).collect()},z={arity:1,overloads:(0,b.declare)(d.RegularOperator.STRLEN).onStringly1((()=>e=>(0,b.integer)([...e.typedValue].length))).collect()},K={arity:[2,3],overloads:(0,b.declare)(d.RegularOperator.SUBSTR).onBinaryTyped([h.TypeURL.XSD_STRING,h.TypeURL.XSD_INTEGER],(()=>(e,t)=>(0,b.string)([...e].slice(t-1).join("")))).onBinary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.XSD_INTEGER],(()=>(e,t)=>{const r=[...e.typedValue].slice(t.typedValue-1).join("");return(0,b.langString)(r,e.language)})).onTernaryTyped([h.TypeURL.XSD_STRING,h.TypeURL.XSD_INTEGER,h.TypeURL.XSD_INTEGER],(()=>(e,t,r)=>(0,b.string)([...e].slice(t-1,r+t-1).join("")))).onTernary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.XSD_INTEGER,h.TypeURL.XSD_INTEGER],(()=>(e,t,r)=>{const n=[...e.typedValue].slice(t.typedValue-1,r.typedValue+t.typedValue-1).join("");return(0,b.langString)(n,e.language)})).collect()},X={arity:1,overloads:(0,b.declare)(d.RegularOperator.UCASE).onString1Typed((()=>e=>(0,b.string)(e.toUpperCase()))).onLangString1((()=>e=>(0,b.langString)(e.typedValue.toUpperCase(),e.language))).collect()},J={arity:1,overloads:(0,b.declare)(d.RegularOperator.LCASE).onString1Typed((()=>e=>(0,b.string)(e.toLowerCase()))).onLangString1((()=>e=>(0,b.langString)(e.typedValue.toLowerCase(),e.language))).collect()},W={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRSTARTS).onBinaryTyped([h.TypeAlias.SPARQL_STRINGLY,h.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.bool)(e.startsWith(t)))).onBinary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);return(0,b.bool)(e.typedValue.startsWith(t.typedValue))})).collect()},Y={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRENDS).onBinaryTyped([h.TypeAlias.SPARQL_STRINGLY,h.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.bool)(e.endsWith(t)))).onBinary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);return(0,b.bool)(e.typedValue.endsWith(t.typedValue))})).collect()},Z={arity:2,overloads:(0,b.declare)(d.RegularOperator.CONTAINS).onBinaryTyped([h.TypeAlias.SPARQL_STRINGLY,h.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.bool)(e.includes(t)))).onBinary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);return(0,b.bool)(e.typedValue.includes(t.typedValue))})).collect()},ee={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRBEFORE).onBinaryTyped([h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.string)(e.slice(0,Math.max(0,e.indexOf(t)))))).onBinary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.XSD_STRING],(()=>(e,t)=>{const[r,n]=[e.typedValue,t.typedValue],i=e.typedValue.slice(0,Math.max(0,r.indexOf(n)));return i||!n?(0,b.langString)(i,e.language):(0,b.string)(i)})).onBinary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);const[r,n]=[e.typedValue,t.typedValue],i=e.typedValue.slice(0,Math.max(0,r.indexOf(n)));return i||!n?(0,b.langString)(i,e.language):(0,b.string)(i)})).collect()},te={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRAFTER).onBinaryTyped([h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.string)(e.slice(e.indexOf(t)).slice(t.length)))).onBinary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.XSD_STRING],(()=>(e,t)=>{const[r,n]=[e.typedValue,t.typedValue],i=r.slice(r.indexOf(n)).slice(n.length);return i||!n?(0,b.langString)(i,e.language):(0,b.string)(i)})).onBinary([h.TypeURL.RDF_LANG_STRING,h.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);const[r,n]=[e.typedValue,t.typedValue],i=r.slice(r.indexOf(n)).slice(n.length);return i||!n?(0,b.langString)(i,e.language):(0,b.string)(i)})).collect()},re={arity:1,overloads:(0,b.declare)(d.RegularOperator.ENCODE_FOR_URI).onStringly1Typed((()=>e=>(0,b.string)(encodeURI(e)))).collect()},ne={arity:2,overloads:(0,b.declare)(d.RegularOperator.LANG_MATCHES).onBinaryTyped([h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.bool)(v.langMatches(e,t)))).collect()},ie={arity:[2,3],overloads:(0,b.declare)(d.RegularOperator.REGEX).onBinaryTyped([h.TypeAlias.SPARQL_STRINGLY,h.TypeURL.XSD_STRING],(function(){return(e,t)=>(0,b.bool)(v.matches(e,t))})).onTernaryTyped([h.TypeAlias.SPARQL_STRINGLY,h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(function(){return(e,t,r)=>(0,b.bool)(v.matches(e,t,r))})).collect()},ae={arity:[3,4],overloads:(0,b.declare)(d.RegularOperator.REPLACE).onTernaryTyped([h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(()=>(e,t,r)=>(0,b.string)(v.replace(e,t,r)))).set([h.TypeURL.RDF_LANG_STRING,h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(()=>([e,t,r])=>{const n=v.replace(e.typedValue,t.typedValue,r.typedValue);return(0,b.langString)(n,e.language)})).onQuaternaryTyped([h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(()=>(e,t,r,n)=>(0,b.string)(v.replace(e,t,r,n)))).set([h.TypeURL.RDF_LANG_STRING,h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING,h.TypeURL.XSD_STRING],(()=>([e,t,r,n])=>{const i=v.replace(e.typedValue,t.typedValue,r.typedValue,n.typedValue);return(0,b.langString)(i,e.language)})).collect()},oe={arity:1,overloads:(0,b.declare)(d.RegularOperator.ABS).numericConverter((()=>e=>Math.abs(e))).collect()},se={arity:1,overloads:(0,b.declare)(d.RegularOperator.ROUND).numericConverter((()=>e=>Math.round(e))).collect()},ce={arity:1,overloads:(0,b.declare)(d.RegularOperator.CEIL).numericConverter((()=>e=>Math.ceil(e))).collect()},ue={arity:1,overloads:(0,b.declare)(d.RegularOperator.FLOOR).numericConverter((()=>e=>Math.floor(e))).collect()},le={arity:0,overloads:(0,b.declare)(d.RegularOperator.RAND).set([],(()=>()=>(0,b.double)(Math.random()))).collect()},de={arity:0,overloads:(0,b.declare)(d.RegularOperator.NOW).set([],(e=>()=>new u.DateTimeLiteral((0,p.toDateTimeRepresentation)({date:e.now,timeZone:e.defaultTimeZone})))).collect()},he={arity:1,overloads:(0,b.declare)(d.RegularOperator.YEAR).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.year))).set([h.TypeURL.XSD_DATE],(()=>([e])=>(0,b.integer)(e.typedValue.year))).collect()},pe={arity:1,overloads:(0,b.declare)(d.RegularOperator.MONTH).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.month))).set([h.TypeURL.XSD_DATE],(()=>([e])=>(0,b.integer)(e.typedValue.month))).collect()},fe={arity:1,overloads:(0,b.declare)(d.RegularOperator.DAY).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.day))).set([h.TypeURL.XSD_DATE],(()=>([e])=>(0,b.integer)(e.typedValue.day))).collect()},ye={arity:1,overloads:(0,b.declare)(d.RegularOperator.HOURS).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.hours))).set([h.TypeURL.XSD_TIME],(()=>([e])=>(0,b.integer)(e.typedValue.hours))).collect()},ge={arity:1,overloads:(0,b.declare)(d.RegularOperator.MINUTES).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.minutes))).set([h.TypeURL.XSD_TIME],(()=>([e])=>(0,b.integer)(e.typedValue.minutes))).collect()},me={arity:1,overloads:(0,b.declare)(d.RegularOperator.SECONDS).onDateTime1((()=>e=>(0,b.decimal)(e.typedValue.seconds))).set([h.TypeURL.XSD_TIME],(()=>([e])=>(0,b.integer)(e.typedValue.seconds))).collect()},be={arity:1,overloads:(0,b.declare)(d.RegularOperator.TIMEZONE).onDateTime1((()=>e=>{const t={hours:e.typedValue.zoneHours,minutes:e.typedValue.zoneMinutes};if(void 0===t.hours&&void 0===t.minutes)throw new f.InvalidTimezoneCall(e.str());return new u.DayTimeDurationLiteral(t)})).copy({from:[h.TypeURL.XSD_DATE_TIME],to:[h.TypeURL.XSD_DATE]}).copy({from:[h.TypeURL.XSD_DATE_TIME],to:[h.TypeURL.XSD_TIME]}).collect()},ve={arity:1,overloads:(0,b.declare)(d.RegularOperator.TZ).onDateTime1((()=>e=>(0,b.string)((0,p.extractRawTimeZone)(e.str())))).copy({from:[h.TypeURL.XSD_DATE_TIME],to:[h.TypeURL.XSD_DATE]}).copy({from:[h.TypeURL.XSD_DATE_TIME],to:[h.TypeURL.XSD_TIME]}).collect()},_e={arity:1,overloads:(0,b.declare)(d.RegularOperator.MD5).onString1Typed((()=>e=>(0,b.string)((0,s.hash)(e)))).collect()},we={arity:1,overloads:(0,b.declare)(d.RegularOperator.SHA1).onString1Typed((()=>e=>(0,b.string)((0,i.sha1)().update(e).digest("hex")))).collect()},Te={arity:1,overloads:(0,b.declare)(d.RegularOperator.SHA256).onString1Typed((()=>e=>(0,b.string)((0,i.sha256)().update(e).digest("hex")))).collect()},Se={arity:1,overloads:(0,b.declare)(d.RegularOperator.SHA384).onString1Typed((()=>e=>(0,b.string)((0,i.sha384)().update(e).digest("hex")))).collect()},Oe={arity:1,overloads:(0,b.declare)(d.RegularOperator.SHA512).onString1Typed((()=>e=>(0,b.string)((0,i.sha512)().update(e).digest("hex")))).collect()},Ee={arity:3,overloads:(0,b.declare)(d.RegularOperator.TRIPLE).onTerm3((e=>(...t)=>new u.Quad(w.quad(t[0].toRDF(),t[1].toRDF(),t[2].toRDF()),e.superTypeProvider))).collect()},xe={arity:1,overloads:(0,b.declare)(d.RegularOperator.SUBJECT).onQuad1((()=>e=>e.subject)).collect()},Ae={arity:1,overloads:(0,b.declare)(d.RegularOperator.PREDICATE).onQuad1((()=>e=>e.predicate)).collect()},Re={arity:1,overloads:(0,b.declare)(d.RegularOperator.OBJECT).onQuad1((()=>e=>e.object)).collect()},Ie={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_TRIPLE).onTerm1((()=>e=>(0,b.bool)("quad"===e.termType))).collect()};t.definitions={"!":T,uplus:S,uminus:O,"*":E,"/":x,"+":A,"-":R,"=":I,"!=":P,"<":N,">":D,"<=":j,">=":C,isiri:M,isuri:M,isblank:L,isliteral:k,isnumeric:F,str:B,lang:U,datatype:q,iri:V,uri:V,strdt:Q,strlang:$,uuid:H,struuid:G,strlen:z,substr:K,ucase:X,lcase:J,strstarts:W,strends:Y,contains:Z,strbefore:ee,strafter:te,encode_for_uri:re,langmatches:ne,regex:ie,replace:ae,abs:oe,round:se,ceil:ce,floor:ue,rand:le,now:de,year:he,month:pe,day:fe,hours:ye,minutes:ge,seconds:me,timezone:be,tz:ve,md5:_e,sha1:we,sha256:Te,sha384:Se,sha512:Oe,triple:Ee,subject:xe,predicate:Ae,object:Re,istriple:Ie}},96443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.specialDefinitions=void 0;const n=r(84596),i=r(11269),a=r(14624),o=r(82867),s=r(63606),c=r(42711),u={arity:1,applyAsync:async({args:e,mapping:t})=>l({args:e,mapping:t}),applySynchronously:({args:e,mapping:t})=>l({args:e,mapping:t})};function l({args:e,mapping:t}){const r=e[0];if(r.expressionType!==i.ExpressionType.Variable)throw new o.InvalidArgumentTypes(e,a.SpecialOperator.BOUND);const n=t.has((0,s.expressionToVar)(r));return(0,s.bool)(n)}const d={arity:3,async applyAsync({args:e,mapping:t,evaluate:r}){const n=await r(e[0],t);return r(n.coerceEBV()?e[1]:e[2],t)},applySynchronously({args:e,mapping:t,evaluate:r}){const n=r(e[0],t);return r(n.coerceEBV()?e[1]:e[2],t)}},h={arity:Number.POSITIVE_INFINITY,async applyAsync({args:e,mapping:t,evaluate:r}){const n=[];for(const i of e)try{return await r(i,t)}catch(e){n.push(e)}throw new o.CoalesceError(n)},applySynchronously({args:e,mapping:t,evaluate:r}){const n=[];for(const i of e)try{return r(i,t)}catch(e){n.push(e)}throw new o.CoalesceError(n)}},p={arity:2,async applyAsync({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if((await r(n,t)).coerceEBV())return(0,s.bool)(!0);const e=(await r(i,t)).coerceEBV();return(0,s.bool)(e)}catch(e){if(!(await r(i,t)).coerceEBV())throw e;return(0,s.bool)(!0)}},applySynchronously({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if(r(n,t).coerceEBV())return(0,s.bool)(!0);const e=r(i,t).coerceEBV();return(0,s.bool)(e)}catch(e){if(!r(i,t).coerceEBV())throw e;return(0,s.bool)(!0)}}},f={arity:2,async applyAsync({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if(!(await r(n,t)).coerceEBV())return(0,s.bool)(!1);const e=(await r(i,t)).coerceEBV();return(0,s.bool)(e)}catch(e){if((await r(i,t)).coerceEBV())throw e;return(0,s.bool)(!1)}},applySynchronously({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if(!r(n,t).coerceEBV())return(0,s.bool)(!1);const e=r(i,t).coerceEBV();return(0,s.bool)(e)}catch(e){if(r(i,t).coerceEBV())throw e;return(0,s.bool)(!1)}}},y={arity:2,async applyAsync({args:e,mapping:t,evaluate:r}){const[n,i]=e.map((e=>r(e,t))),[a,o]=await Promise.all([n,i]);return(0,s.bool)(a.toRDF().equals(o.toRDF()))},applySynchronously({args:e,mapping:t,evaluate:r}){const[n,i]=e.map((e=>r(e,t)));return(0,s.bool)(n.toRDF().equals(i.toRDF()))}},g={arity:Number.POSITIVE_INFINITY,checkArity:e=>e.length>0,async applyAsync(e){const{args:t,mapping:r,evaluate:n}=e,[i,...a]=t;return m(await n(i,r),{...e,args:a},[])},applySynchronously(e){const{args:t,mapping:r,evaluate:n}=e,[i,...a]=t;return b(n(i,r),{...e,args:a},[])}};async function m(e,t,r){const{args:n,mapping:i,evaluate:u}=t;if(0===n.length)return r.every((e=>!e))?(0,s.bool)(!1):Promise.reject(new o.InError(r));try{const o=n.shift(),l=await u(o,i);return c.regularFunctions[a.RegularOperator.EQUAL].apply([e,l],t).typedValue?(0,s.bool)(!0):m(e,t,[...r,!1])}catch(n){return m(e,t,[...r,n])}}function b(e,t,r){const{args:n,mapping:i,evaluate:u}=t;if(0===n.length){if(r.every((e=>!e)))return(0,s.bool)(!1);throw new o.InError(r)}try{const o=u(n.shift(),i);return c.regularFunctions[a.RegularOperator.EQUAL].apply([e,o],t).typedValue?(0,s.bool)(!0):b(e,t,[...r,!1])}catch(n){return b(e,t,[...r,n])}}const v={arity:Number.POSITIVE_INFINITY,checkArity:e=>e.length>0,async applyAsync(e){const t=c.specialFunctions[a.SpecialOperator.IN],r=await t.applyAsync(e);return(0,s.bool)(!r.typedValue)},applySynchronously(e){const t=c.specialFunctions[a.SpecialOperator.IN].applySynchronously(e);return(0,s.bool)(!t.typedValue)}},_=(0,s.declare)(a.SpecialOperator.CONCAT).onStringly1((()=>e=>e)).collect(),w={arity:Number.POSITIVE_INFINITY,async applyAsync(e){const{args:t,mapping:r,evaluate:n,functionArgumentsCache:i,superTypeProvider:c}=e,u=t.map((async e=>n(e,r))).map((async r=>{const n=_.search([await r],c,i);if(!n)throw new o.InvalidArgumentTypes(t,a.SpecialOperator.CONCAT);return n(e)([await r])})),l=await Promise.all(u),d=l.map((e=>e.typedValue)).join(""),h=T(l)?l[0].language:void 0;return h?(0,s.langString)(d,h):(0,s.string)(d)},applySynchronously(e){const{args:t,mapping:r,evaluate:n,superTypeProvider:i,functionArgumentsCache:c}=e,u=t.map((e=>n(e,r))).map((r=>{const n=_.search([r],i,c);if(!n)throw new o.InvalidArgumentTypes(t,a.SpecialOperator.CONCAT);return n(e)([r])})),l=u.map((e=>e.typedValue)).join(""),d=T(u)?u[0].language:void 0;return d?(0,s.langString)(l,d):(0,s.string)(l)}};function T(e){return e.length>0&&e.every((t=>t.language===e[0].language))}const S=(0,s.declare)(a.SpecialOperator.BNODE).onString1((()=>e=>e)).collect(),O={arity:Number.POSITIVE_INFINITY,checkArity:e=>0===e.length||1===e.length,async applyAsync(e){const{args:t,mapping:r,evaluate:n,superTypeProvider:s,functionArgumentsCache:c}=e,u=1===t.length?await n(t[0],r):void 0;let l;if(u){const r=S.search([u],s,c);if(!r)throw new o.InvalidArgumentTypes(t,a.SpecialOperator.BNODE);l=r(e)([u]).str()}if(e.bnode){const t=await e.bnode(l);return new i.BlankNode(t)}return E(l)},applySynchronously(e){const{args:t,mapping:r,evaluate:n,superTypeProvider:s,functionArgumentsCache:c}=e,u=1===t.length?n(t[0],r):void 0;let l;if(u){const r=S.search([u],s,c);if(!r)throw new o.InvalidArgumentTypes(t,a.SpecialOperator.BNODE);l=r(e)([u]).str()}if(e.bnode){const t=e.bnode(l);return new i.BlankNode(t)}return E(l)}};function E(e){return new i.BlankNode(e??n.v4())}t.specialDefinitions={bound:u,if:d,coalesce:h,"&&":f,"||":p,sameterm:y,in:g,notin:v,concat:w,bnode:O}},29791:(e,t)=>{"use strict";function r(e){return"*"===e}function n(e,t){return new RegExp(`/${e}/`,"iu").test(`/${t}/`)}Object.defineProperty(t,"__esModule",{value:!0}),t.langMatches=t.replace=t.matches=void 0,t.matches=function(e,t,r){return new RegExp(t,r).test(e)},t.replace=function(e,t,r,n){let i=new RegExp(t,n);return i.global||(i=new RegExp(t,`${n??""}g`)),e.replace(i,r)},t.langMatches=function(e,t){const i=e.split("-"),a=t.split("-");if(!n(a[0],i[0])&&!r(i[0]))return!1;let o=1,s=1;for(;s[e,new a.RegularFunction(e,t)]))),t.specialFunctions=Object.fromEntries(Object.entries(c.specialDefinitions).map((([e,t])=>[e,new a.SpecialFunction(e,t)]))),t.namedFunctions=Object.fromEntries(Object.entries(o.namedDefinitions).map((([e,t])=>[e,new a.NamedFunction(e,t)])));var u=r(33357);Object.defineProperty(t,"OverloadTree",{enumerable:!0,get:function(){return u.OverloadTree}})},61621:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAggregateEvaluator=t.orderTypes=t.isExpressionError=t.ExpressionError=t.AggregateEvaluator=t.SyncEvaluator=t.AsyncEvaluator=void 0;var n=r(98375);Object.defineProperty(t,"AsyncEvaluator",{enumerable:!0,get:function(){return n.AsyncEvaluator}});var i=r(86588);Object.defineProperty(t,"SyncEvaluator",{enumerable:!0,get:function(){return i.SyncEvaluator}});var a=r(19030);Object.defineProperty(t,"AggregateEvaluator",{enumerable:!0,get:function(){return a.AggregateEvaluator}});var o=r(82867);Object.defineProperty(t,"ExpressionError",{enumerable:!0,get:function(){return o.ExpressionError}}),Object.defineProperty(t,"isExpressionError",{enumerable:!0,get:function(){return o.isExpressionError}});var s=r(20236);Object.defineProperty(t,"orderTypes",{enumerable:!0,get:function(){return s.orderTypes}});var c=r(74448);Object.defineProperty(t,"AsyncAggregateEvaluator",{enumerable:!0,get:function(){return c.AsyncAggregateEvaluator}})},69119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlgebraTransformer=void 0;const n=r(31578),i=r(11269),a=r(42711),o=r(14624),s=r(82867),c=r(82867),u=r(50363);class l extends u.TermTransformer{constructor(e){super(e.superTypeProvider),this.algebraConfig=e,this.creatorConfig={type:e.type,creator:e.creator}}transformAlgebra(e){const t=n.Algebra.expressionTypes;switch(e.expressionType){case t.TERM:return this.transformTerm(e);case t.OPERATOR:return this.transformOperator(e);case t.NAMED:return this.transformNamed(e);case t.EXISTENCE:return l.transformExistence(e);case t.AGGREGATE:return l.transformAggregate(e);case t.WILDCARD:return l.transformWildcard(e)}}static transformWildcard(e){return new i.NamedNode(e.wildcard.value)}transformOperator(e){const t=e.operator.toLowerCase();if(o.SpecialOperators.has(t)){const r=t,n=e.args.map((e=>this.transformAlgebra(e))),o=a.specialFunctions[r];if(!o.checkArity(n))throw new s.InvalidArity(n,r);return new i.SpecialOperator(n,o.applyAsync,o.applySynchronously)}if(!o.Operators.has(t))throw new s.UnknownOperator(e.operator);const r=t,n=e.args.map((e=>this.transformAlgebra(e))),c=a.regularFunctions[r];if(!l.hasCorrectArity(n,c.arity))throw new s.InvalidArity(n,r);return new i.Operator(n,(e=>c.apply(e,this.algebraConfig)))}wrapSyncFunction(e,t){return r=>{try{const t=e(r.map((e=>e.toRDF())));return this.transformRDFTermUnsafe(t)}catch(e){throw new c.ExtensionFunctionError(t,e)}}}wrapAsyncFunction(e,t){return async r=>{try{const t=await e(r.map((e=>e.toRDF())));return this.transformRDFTermUnsafe(t)}catch(e){throw new c.ExtensionFunctionError(t,e)}}}transformNamed(e){const t=e.name.value,r=e.args.map((e=>this.transformAlgebra(e)));if(o.NamedOperators.has(t)){const t=e.name.value,n=a.namedFunctions[t];return new i.Named(e.name,r,(e=>n.apply(e,this.algebraConfig)))}if("sync"===this.creatorConfig.type){const t=this.creatorConfig.creator(e.name);if(t){const n=this.wrapSyncFunction(t,e.name.value);return new i.SyncExtension(e.name,r,n)}}else{const t=this.creatorConfig.creator(e.name);if(t){const n=this.wrapAsyncFunction(t,e.name.value);return new i.AsyncExtension(e.name,r,n)}}throw new s.UnknownNamedOperator(e.name.value)}static hasCorrectArity(e,t){return Array.isArray(t)?t.includes(e.length):e.length===t}static transformAggregate(e){const t=e.aggregator;return new i.Aggregate(t,e)}static transformExistence(e){return new i.Existence(e)}}t.AlgebraTransformer=l},50363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermTransformer=void 0;const n=r(22112),i=r(31578),a=r(11269),o=r(14624),s=r(82867),c=r(82867),u=r(17590),l=r(17590),d=r(46157);t.TermTransformer=class{constructor(e){this.superTypeProvider=e}transformRDFTermUnsafe(e){return this.transformTerm({term:e,type:i.Algebra.types.EXPRESSION,expressionType:i.Algebra.expressionTypes.TERM})}transformTerm(e){if(!e.term)throw new s.InvalidExpression(e);switch(e.term.termType){case"Variable":return new a.Variable(n.termToString(e.term));case"Literal":return this.transformLiteral(e.term);case"NamedNode":return new a.NamedNode(e.term.value);case"BlankNode":return new a.BlankNode(e.term.value);case"Quad":return new a.Quad(e.term,this.superTypeProvider);default:throw new s.InvalidTermType(e)}}transformLiteral(e){if(!e.datatype||[null,void 0,""].includes(e.datatype.value))return e.language?new a.LangStringLiteral(e.value,e.language):new a.StringLiteral(e.value);const t=e.datatype.value,r=(0,d.getSuperTypeDict)(t,this.superTypeProvider);try{if(o.TypeURL.XSD_STRING in r)return new a.StringLiteral(e.value,t);if(o.TypeURL.RDF_LANG_STRING in r)return new a.LangStringLiteral(e.value,e.language);if(o.TypeURL.XSD_YEAR_MONTH_DURATION in r)return new a.YearMonthDurationLiteral((0,u.parseYearMonthDuration)(e.value),e.value,t);if(o.TypeURL.XSD_DAY_TIME_DURATION in r)return new a.DayTimeDurationLiteral((0,u.parseDayTimeDuration)(e.value),e.value,t);if(o.TypeURL.XSD_DURATION in r)return new a.DurationLiteral((0,u.parseDuration)(e.value),e.value,t);if(o.TypeURL.XSD_DATE_TIME in r){const r=new Date(e.value);return Number.isNaN(r.getTime())?new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):new a.DateTimeLiteral((0,u.parseDateTime)(e.value),e.value,t)}if(o.TypeURL.XSD_DATE in r)return new a.DateLiteral((0,u.parseDate)(e.value),e.value,t);if(o.TypeURL.XSD_TIME in r)return new a.TimeLiteral((0,u.parseTime)(e.value),e.value,t);if(o.TypeURL.XSD_BOOLEAN in r)return"true"!==e.value&&"false"!==e.value&&"1"!==e.value&&"0"!==e.value?new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):new a.BooleanLiteral("true"===e.value||"1"===e.value,e.value);if(o.TypeURL.XSD_DECIMAL in r){const n=l.parseXSDDecimal(e.value);return void 0===n?new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):o.TypeURL.XSD_INTEGER in r?new a.IntegerLiteral(n,t,e.value):new a.DecimalLiteral(n,t,e.value)}const n=o.TypeURL.XSD_FLOAT in r,i=o.TypeURL.XSD_DOUBLE in r;if(n||i){const r=l.parseXSDFloat(e.value);return void 0===r?new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):n?new a.FloatLiteral(r,t,e.value):new a.DoubleLiteral(r,t,e.value)}return new a.Literal(e.value,t,e.value)}catch(r){if(r instanceof Error&&(0,c.isExpressionError)(r))return new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value);throw r}}}},14624:(e,t)=>{"use strict";var r,n,i,a,o;Object.defineProperty(t,"__esModule",{value:!0}),t.NamedOperators=t.SetFunctions=t.SetFunction=t.Operators=t.SpecialOperators=t.RegularOperators=t.SpecialOperator=t.RegularOperator=t.TypeURL=t.TypeAlias=void 0,function(e){e.SPARQL_NUMERIC="SPARQL_NUMERIC",e.SPARQL_STRINGLY="SPARQL_STRINGLY"}(r||(t.TypeAlias=r={})),function(e){e.XSD_ANY_URI="http://www.w3.org/2001/XMLSchema#anyURI",e.XSD_STRING="http://www.w3.org/2001/XMLSchema#string",e.RDF_LANG_STRING="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",e.XSD_BOOLEAN="http://www.w3.org/2001/XMLSchema#boolean",e.XSD_DATE_TIME="http://www.w3.org/2001/XMLSchema#dateTime",e.XSD_DATE_TIME_STAMP="http://www.w3.org/2001/XMLSchema#dateTimeStamp",e.XSD_DATE="http://www.w3.org/2001/XMLSchema#date",e.XSD_G_MONTH="http://www.w3.org/2001/XMLSchema#gMonth",e.XSD_G_MONTHDAY="http://www.w3.org/2001/XMLSchema#gMonthDay",e.XSD_G_YEAR="http://www.w3.org/2001/XMLSchema#gYear",e.XSD_G_YEAR_MONTH="http://www.w3.org/2001/XMLSchema#gYearMonth",e.XSD_TIME="http://www.w3.org/2001/XMLSchema#time",e.XSD_G_DAY="http://www.w3.org/2001/XMLSchema#gDay",e.XSD_DECIMAL="http://www.w3.org/2001/XMLSchema#decimal",e.XSD_FLOAT="http://www.w3.org/2001/XMLSchema#float",e.XSD_DOUBLE="http://www.w3.org/2001/XMLSchema#double",e.XSD_INTEGER="http://www.w3.org/2001/XMLSchema#integer",e.XSD_NON_POSITIVE_INTEGER="http://www.w3.org/2001/XMLSchema#nonPositiveInteger",e.XSD_NEGATIVE_INTEGER="http://www.w3.org/2001/XMLSchema#negativeInteger",e.XSD_LONG="http://www.w3.org/2001/XMLSchema#long",e.XSD_INT="http://www.w3.org/2001/XMLSchema#int",e.XSD_SHORT="http://www.w3.org/2001/XMLSchema#short",e.XSD_BYTE="http://www.w3.org/2001/XMLSchema#byte",e.XSD_NON_NEGATIVE_INTEGER="http://www.w3.org/2001/XMLSchema#nonNegativeInteger",e.XSD_POSITIVE_INTEGER="http://www.w3.org/2001/XMLSchema#positiveInteger",e.XSD_UNSIGNED_LONG="http://www.w3.org/2001/XMLSchema#unsignedLong",e.XSD_UNSIGNED_INT="http://www.w3.org/2001/XMLSchema#unsignedInt",e.XSD_UNSIGNED_SHORT="http://www.w3.org/2001/XMLSchema#unsignedShort",e.XSD_UNSIGNED_BYTE="http://www.w3.org/2001/XMLSchema#unsignedByte",e.XSD_NORMALIZED_STRING="http://www.w3.org/2001/XMLSchema#normalizedString",e.XSD_TOKEN="http://www.w3.org/2001/XMLSchema#token",e.XSD_LANGUAGE="http://www.w3.org/2001/XMLSchema#language",e.XSD_NM_TOKEN="http://www.w3.org/2001/XMLSchema#NMTOKEN",e.XSD_NAME="http://www.w3.org/2001/XMLSchema#name",e.XSD_NC_NAME="http://www.w3.org/2001/XMLSchema#NCName",e.XSD_ENTITY="http://www.w3.org/2001/XMLSchema#ENTITY",e.XSD_ID="http://www.w3.org/2001/XMLSchema#ID",e.XSD_ID_REF="http://www.w3.org/2001/XMLSchema#IDREF",e.XSD_DURATION="http://www.w3.org/2001/XMLSchema#duration",e.XSD_YEAR_MONTH_DURATION="http://www.w3.org/2001/XMLSchema#yearMonthDuration",e.XSD_DAY_TIME_DURATION="http://www.w3.org/2001/XMLSchema#dayTimeDuration"}(n||(t.TypeURL=n={})),function(e){e.NOT="!",e.UMINUS="uminus",e.UPLUS="uplus",e.EQUAL="=",e.NOT_EQUAL="!=",e.LT="<",e.GT=">",e.LTE="<=",e.GTE=">=",e.MULTIPLICATION="*",e.DIVISION="/",e.ADDITION="+",e.SUBTRACTION="-",e.IS_IRI="isiri",e.IS_URI="isuri",e.IS_BLANK="isblank",e.IS_LITERAL="isliteral",e.IS_NUMERIC="isnumeric",e.STR="str",e.LANG="lang",e.DATATYPE="datatype",e.IRI="iri",e.URI="uri",e.STRDT="strdt",e.STRLANG="strlang",e.UUID="uuid",e.STRUUID="struuid",e.STRLEN="strlen",e.SUBSTR="substr",e.UCASE="ucase",e.LCASE="lcase",e.STRSTARTS="strstarts",e.STRENDS="strends",e.CONTAINS="contains",e.STRBEFORE="strbefore",e.STRAFTER="strafter",e.ENCODE_FOR_URI="encode_for_uri",e.LANG_MATCHES="langmatches",e.REGEX="regex",e.REPLACE="replace",e.ABS="abs",e.ROUND="round",e.CEIL="ceil",e.FLOOR="floor",e.RAND="rand",e.NOW="now",e.YEAR="year",e.MONTH="month",e.DAY="day",e.HOURS="hours",e.MINUTES="minutes",e.SECONDS="seconds",e.TIMEZONE="timezone",e.TZ="tz",e.MD5="md5",e.SHA1="sha1",e.SHA256="sha256",e.SHA384="sha384",e.SHA512="sha512",e.TRIPLE="triple",e.SUBJECT="subject",e.PREDICATE="predicate",e.OBJECT="object",e.IS_TRIPLE="istriple"}(i||(t.RegularOperator=i={})),function(e){e.BOUND="bound",e.IF="if",e.COALESCE="coalesce",e.LOGICAL_OR="||",e.LOGICAL_AND="&&",e.SAME_TERM="sameterm",e.IN="in",e.NOT_IN="notin",e.CONCAT="concat",e.BNODE="bnode"}(a||(t.SpecialOperator=a={})),t.RegularOperators=new Set(Object.values(i)),t.SpecialOperators=new Set(Object.values(a)),t.Operators=new Set([...t.RegularOperators,...t.SpecialOperators]),function(e){e.COUNT="count",e.SUM="sum",e.MIN="min",e.MAX="max",e.AVG="avg",e.GROUP_CONCAT="group_concat",e.SAMPLE="sample"}(o||(t.SetFunction=o={})),t.SetFunctions=new Set(Object.values(o)),t.NamedOperators=new Set([n.XSD_STRING,n.XSD_FLOAT,n.XSD_DOUBLE,n.XSD_DECIMAL,n.XSD_INTEGER,n.XSD_DATE_TIME,n.XSD_DATE,n.XSD_BOOLEAN,n.XSD_TIME,n.XSD_DURATION,n.XSD_DAY_TIME_DURATION,n.XSD_YEAR_MONTH_DURATION])},76660:(e,t)=>{"use strict";function r(e){return{day:e.day??0,hours:e.hours??0,minutes:e.minutes??0,seconds:e.seconds??0}}function n(e){return{year:e.year??0,month:e.month??0}}function i(e){return{...r(e),...n(e)}}function a(e){return{...e,day:e.day??1,hours:e.hours??0,month:e.month??1,year:e.year??0,seconds:e.seconds??0,minutes:e.minutes??0}}function o(e){const t=new Date(e.year,e.month-1,e.day,e.hours,e.minutes,Math.trunc(e.seconds),e.seconds%1*1e3);if(e.year>=0&&e.year<100){const e=1900;t.setFullYear(t.getFullYear()-e)}return t}Object.defineProperty(t,"__esModule",{value:!0}),t.extractTimeZone=t.extractRawTimeZone=t.dayTimeDurationsToSeconds=t.yearMonthDurationsToMonths=t.trimToDayTimeDuration=t.trimToYearMonthDuration=t.toUTCDate=t.toJSDate=t.negateDuration=t.toDateTimeRepresentation=t.defaultedDateTimeRepresentation=t.simplifyDurationRepresentation=t.defaultedDurationRepresentation=t.defaultedYearMonthDurationRepresentation=t.defaultedDayTimeDurationRepresentation=void 0,t.defaultedDayTimeDurationRepresentation=r,t.defaultedYearMonthDurationRepresentation=n,t.defaultedDurationRepresentation=i,t.simplifyDurationRepresentation=function(e){const t=i(e),r={},n=t.year+Math.trunc(t.month/12);n&&(r.year=n,t.month%=12),t.month&&(r.month=t.month);const a=t.day+Math.trunc(t.hours/24)+Math.trunc(t.minutes/1440)+Math.trunc(t.seconds/86400);a&&(r.day=a,t.hours%=24,t.minutes%=1440,t.seconds%=86400);const o=t.hours+Math.trunc(t.minutes/60)+Math.trunc(t.seconds/3600);o&&(r.hours=o,t.minutes%=60,t.seconds%=3600);const s=t.minutes+Math.trunc(t.seconds/60);return s&&(r.minutes=s,t.seconds%=60),t.seconds&&(r.seconds=t.seconds),r},t.defaultedDateTimeRepresentation=a,t.toDateTimeRepresentation=function({date:e,timeZone:t}){return{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds(),zoneHours:t.zoneHours,zoneMinutes:t.zoneMinutes}},t.negateDuration=function(e){return{year:void 0===e.year?void 0:-1*e.year,month:void 0===e.month?void 0:-1*e.month,day:void 0===e.day?void 0:-1*e.day,hours:void 0===e.hours?void 0:-1*e.hours,minutes:void 0===e.minutes?void 0:-1*e.minutes,seconds:void 0===e.seconds?void 0:-1*e.seconds}},t.toJSDate=o,t.toUTCDate=function(e,t){const r=o(a(e)),n=r.getTimezoneOffset(),i=e.zoneHours??t.zoneHours,s=e.zoneMinutes??t.zoneMinutes;return new Date(r.getTime()-60*(n+60*i+s)*1e3)},t.trimToYearMonthDuration=function(e){return{year:e.year,month:e.month}},t.trimToDayTimeDuration=function(e){return{day:e.day,hours:e.hours,minutes:e.minutes,seconds:e.seconds}},t.yearMonthDurationsToMonths=function(e){return 12*e.year+e.month},t.dayTimeDurationsToSeconds=function(e){return 60*(60*(24*e.day+e.hours)+e.minutes)+e.seconds},t.extractRawTimeZone=function(e){return/(Z|([+-]\d\d:\d\d))?$/u.exec(e)[0]},t.extractTimeZone=function(e){return{zoneHours:e.getTimezoneOffset()/60,zoneMinutes:e.getTimezoneOffset()%60}}},82867:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoExistenceHook=t.NoAggregator=t.ExtensionFunctionError=t.UnknownNamedOperator=t.UnknownOperator=t.InvalidTermType=t.InvalidExpressionType=t.InvalidExpression=t.InvalidArity=t.UnexpectedError=t.ParseError=t.EmptyAggregateError=t.IncompatibleLanguageOperation=t.InvalidTimezoneCall=t.CastError=t.InvalidCompareArgumentTypes=t.InvalidArgumentTypes=t.InError=t.CoalesceError=t.RDFEqualTypeError=t.EBVCoercionError=t.UnboundVariableError=t.InvalidLexicalForm=t.isExpressionError=t.ExpressionError=void 0;class r extends Error{}t.ExpressionError=r,t.isExpressionError=function(e){return e instanceof r},t.InvalidLexicalForm=class extends r{constructor(e){super(`Invalid lexical form '${p(e)}'`),this.arg=e}},t.UnboundVariableError=class extends r{constructor(e,t){super(`Unbound variable '${p(e)}'`),this.variable=e,this.bindings=t}},t.EBVCoercionError=class extends r{constructor(e){super(`Cannot coerce term to EBV '${p(e)}'`),this.arg=e}},t.RDFEqualTypeError=class extends r{constructor(e){super("Equality test for literals with unsupported datatypes"),this.args=e}},t.CoalesceError=class extends r{constructor(e){super("All COALESCE arguments threw errors"),this.errors=e}},t.InError=class extends r{constructor(e){super(`Some argument to IN errorred and none where equal. ${e.map((e=>`(${e.toString()}) `)).join("and ")}`),this.errors=e}},t.InvalidArgumentTypes=class extends r{constructor(e,t){super(`Argument types not valid for operator: '${p(t)}' with '${p(e)}`),this.args=e,this.op=t}},t.InvalidCompareArgumentTypes=class extends r{constructor(e,t){super(`Compared argument types are supported: '${e.termType}' and '${t.termType}'`),this.arg0=e,this.arg1=t}},t.CastError=class extends r{constructor(e,t){super(`Invalid cast: '${p(e)}' to '${p(t)}'`),this.arg=e}},t.InvalidTimezoneCall=class extends r{constructor(e){super(`TIMEZONE call on ${e} which has no timezone`),this.dateString=e}},t.IncompatibleLanguageOperation=class extends r{constructor(e,t){super(`Operation on incompatible language literals '${p(e)}' and '${p(t)}'`),this.arg1=e,this.arg2=t}},t.EmptyAggregateError=class extends r{constructor(){super("Empty aggregate expression")}},t.ParseError=class extends r{constructor(e,t){super(`Failed to parse ${e} as ${t}.`)}};class n extends Error{constructor(e,t){super(`Programmer Error '${e}'`),this.payload=t}}t.UnexpectedError=n;class i extends Error{constructor(e,t){super(`The number of args does not match the arity of the operator '${p(t)}'.`),this.args=e,this.op=t}}t.InvalidArity=i;class a extends Error{constructor(e){super(`Invalid SPARQL Expression '${p(e)}'`)}}t.InvalidExpression=a;class o extends Error{constructor(e){super(`Invalid expression type for SPARQL Expression '${p(e)}'`),this.expr=e}}t.InvalidExpressionType=o;class s extends Error{constructor(e){super(`Invalid term type for term '${p(e)}'`),this.term=e}}t.InvalidTermType=s;class c extends Error{constructor(e){super(`Unknown operator: '${p(e)}`)}}t.UnknownOperator=c;class u extends Error{constructor(e){super(`Unknown named operator: '${p(e)}'`)}}t.UnknownNamedOperator=u;class l extends Error{constructor(e,t){t instanceof Error?super(`Error thrown in ${e}: ${t.message}${t.stack?`\n${t.stack}`:""}`):super(`Error thrown in ${e}`)}}t.ExtensionFunctionError=l;class d extends Error{constructor(e){super(`Aggregate expression ${p(e)} found, but no aggregate hook provided.`)}}t.NoAggregator=d;class h extends Error{constructor(){super("EXISTS found, but no existence hook provided.")}}function p(e){return JSON.stringify(e)}t.NoExistenceHook=h},20236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.orderTypes=void 0;const n=r(35069),i=r(42711),a=r(50363),o=r(14624),s=r(82867);function c(e,t){return e===t?0:e"term"),cache:s??new n.LRUCache({max:1e3})},defaultTimeZone:{zoneHours:0,zoneMinutes:0}},h=new a.TermTransformer(d.superTypeProvider),p=h.transformLiteral(e),f=h.transformLiteral(t);try{return l.apply([p,f],d).typedValue?0:u.apply([p,f],d).typedValue?1:-1}catch{const e=c(p.dataType,f.dataType);return 0!==e?e:c(p.str(),f.str())}}(t,r,d,h);if(l)throw new s.InvalidCompareArgumentTypes(t,r);return c(t.value,r.value)};const u={Variable:0,BlankNode:1,NamedNode:2,Literal:3,Quad:4,DefaultGraph:5}},17590:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseDayTimeDuration=t.parseYearMonthDuration=t.parseDuration=t.parseTime=t.parseDate=t.parseDateTime=t.parseXSDInteger=t.parseXSDDecimal=t.parseXSDFloat=void 0;const n=r(76660),i=r(82867),a=r(66487);function o(e){if(""===e)return{zoneHours:void 0,zoneMinutes:void 0};if("Z"===e)return{zoneHours:0,zoneMinutes:0};const t=e.replaceAll(/^([+|-])(\d\d):(\d\d)$/gu,"$11!$2!$3").split("!").map(Number);return{zoneHours:t[0]*t[1],zoneMinutes:t[0]*t[2]}}function s(e){const t=e.replaceAll(/^(-)?([123456789]*\d{4})-(\d\d)-(\d\d)(Z|([+-]\d\d:\d\d))?$/gu,"$11!$2!$3!$4!$5");if(t===e)throw new i.ParseError(e,"date");const r=t.split("!"),n=r.slice(0,-1).map(Number),s={year:n[0]*n[1],month:n[2],day:n[3],...o(r[4])};if(!(s.month>=1&&s.month<=12&&s.day>=1&&s.day<=(0,a.maximumDayInMonthFor)(s.year,s.month)))throw new i.ParseError(e,"date");return s}function c(e){const t=e.replaceAll(/^(\d\d):(\d\d):(\d\d(\.\d+)?)(Z|([+-]\d\d:\d\d))?$/gu,"$1!$2!$3!$5");if(t===e)throw new i.ParseError(e,"time");const r=t.split("!"),n=r.slice(0,-1).map(Number),a={hours:n[0],minutes:n[1],seconds:n[2],...o(r[3])};if(a.seconds>=60||a.minutes>=60||a.hours>24||24===a.hours&&(0!==a.minutes||0!==a.seconds))throw new i.ParseError(e,"time");return a}function u(e){const[t,r]=e.split("T"),a=t.replaceAll(/^(-)?P(\d+Y)?(\d+M)?(\d+D)?$/gu,"$11S!$2!$3!$4");if(a===t)throw new i.ParseError(e,"duration");const o=a.split("!");if(void 0!==r){const t=r.replaceAll(/^(\d+H)?(\d+M)?(\d+(\.\d+)?S)?$/gu,"$1!$2!$3");if(""===r||r===t)throw new i.ParseError(e,"duration");o.push(...t.split("!"))}const s=o.map((e=>e.slice(0,-1)));if(!s.slice(1).some(Boolean))throw new i.ParseError(e,"duration");const c=Number(s[0]);return(0,n.simplifyDurationRepresentation)({year:s[1]?c*Number(s[1]):void 0,month:s[2]?c*Number(s[2]):void 0,day:s[3]?c*Number(s[3]):void 0,hours:s[4]?c*Number(s[4]):void 0,minutes:s[5]?c*Number(s[5]):void 0,seconds:s[6]?c*Number(s[6]):void 0})}t.parseXSDFloat=function(e){const t=Number(e);return Number.isNaN(t)?"NaN"===e?Number.NaN:"INF"===e||"+INF"===e?Number.POSITIVE_INFINITY:"-INF"===e?Number.NEGATIVE_INFINITY:void 0:t},t.parseXSDDecimal=function(e){const t=Number(e);return Number.isNaN(t)?void 0:t},t.parseXSDInteger=function(e){const t=Number.parseInt(e,10);return Number.isNaN(t)?void 0:t},t.parseDateTime=function(e){const[t,r]=e.split("T");return{...s(t),...c(r)}},t.parseDate=s,t.parseTime=function(e){const t=c(e);return t.hours%=24,t},t.parseDuration=u,t.parseYearMonthDuration=function(e){const t=u(e);if(["hours","minutes","seconds","day"].some((e=>Boolean(t[e]))))throw new i.ParseError(e,"yearMonthDuration");return t},t.parseDayTimeDuration=function(e){const t=u(e);if(["year","month"].some((e=>Boolean(t[e]))))throw new i.ParseError(e,"dayTimeDuration");return t}},19002:(e,t)=>{"use strict";function r(e,t=2){return e.toLocaleString(void 0,{minimumIntegerDigits:t,useGrouping:!1})}function n(e){return void 0===e.zoneHours||void 0===e.zoneMinutes?"":0===e.zoneHours&&0===e.zoneMinutes?"Z":`${e.zoneHours>=0?`+${r(e.zoneHours)}`:r(e.zoneHours)}:${r(Math.abs(e.zoneMinutes))}`}function i(e){return`${r(e.year,4)}-${r(e.month)}-${r(e.day)}${n(e)}`}function a(e){return`${r(e.hours)}:${r(e.minutes)}:${r(e.seconds)}${n(e)}`}Object.defineProperty(t,"__esModule",{value:!0}),t.serializeDuration=t.serializeTime=t.serializeDate=t.serializeDateTime=void 0,t.serializeDateTime=function(e){return`${i({year:e.year,month:e.month,day:e.day})}T${a(e)}`},t.serializeDate=i,t.serializeTime=a,t.serializeDuration=function(e,t="PT0S"){if(!Object.values(e).some((e=>0!==(e||0))))return t;const r=`${Object.values(e).some((e=>(e||0)<0))?"-":""}P${e.year?`${Math.abs(e.year)}Y`:""}${e.month?`${Math.abs(e.month)}M`:""}${e.day?`${Math.abs(e.day)}D`:""}`;return e.hours||e.minutes||e.seconds?`${r}T${e.hours?`${Math.abs(e.hours)}H`:""}${e.minutes?`${Math.abs(e.minutes)}M`:""}${e.seconds?`${Math.abs(e.seconds)}S`:""}`:r}},66487:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elapsedDuration=t.addDurationToDateTime=t.maximumDayInMonthFor=void 0;const n=r(76660);function i(e,t,r=0){const n=e-r,i=t-r,a=Math.floor(n/i);return{intDiv:a,remainder:e-a*i}}function a(e,t){const{intDiv:r,remainder:n}=i(t,13,1),a=e+r;return[1,3,5,7,8,10,12].includes(n)?31:[4,6,9,11].includes(n)?30:2===n&&(0===i(a,400).remainder||0!==i(a,100).remainder&&0===i(a,4).remainder)?29:28}t.maximumDayInMonthFor=a,t.addDurationToDateTime=function(e,t){const r={...e};let n=i(e.month+t.month,13,1);for(r.month=n.remainder,r.year=e.year+t.year+n.intDiv,n=i(e.seconds+t.seconds,60),r.seconds=n.remainder,n=i(e.minutes+t.minutes+n.intDiv,60),r.minutes=n.remainder,n=i(e.hours+t.hours+n.intDiv,24),r.hours=n.remainder,r.day=e.day+t.day+n.intDiv;;){let e;if(r.day<1)r.day+=a(r.year,r.month-1),e=-1;else{if(!(r.day>a(r.year,r.month)))break;r.day-=a(r.year,r.month),e=1}n=i(r.month+e,13,1),r.month=n.remainder,r.year+=n.intDiv}return r},t.elapsedDuration=function(e,t,r){const i=(0,n.toUTCDate)(e,r),a=(0,n.toUTCDate)(t,r),o=i.getTime()-a.getTime();return{day:Math.floor(o/864e5),hours:Math.floor(o%864e5/36e5),minutes:Math.floor(o%36e5/6e4),seconds:o%6e4}}},46157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.typePromotion=t.isSubTypeOf=t.getSuperTypeDict=t.isInternalSubType=t.asGeneralType=t.asOverrideType=t.asKnownLiteralType=t.asTypeAlias=t.typeAliasCheck=t.extensionTableInit=t.getSuperTypes=t.superTypeDictTable=t.extensionTableInput=void 0;const n=r(11269),i=r(63606),a=r(14624);function o(e,r){const n=r.cache.get(e);if(n)return n;const i=r.discoverer(e);if("term"===i){const t=Object.create(null);return t.__depth=0,t[e]=0,r.cache.set(e,t),t}let a;const s=u(i);return a=s?{...t.superTypeDictTable[s]}:{...o(i,r)},a.__depth++,a[e]=a.__depth,r.cache.set(e,a),a}function s(){for(const[e,r]of Object.entries(t.extensionTableInput)){const n=e;t.superTypeDictTable[n]||c(n,r,t.superTypeDictTable)}}function c(e,r,n){if("term"===r||void 0===r){const t=Object.create(null);return t.__depth=0,t[e]=0,void(n[e]=t)}n[r]||c(r,t.extensionTableInput[r],n),n[e]={...n[r],[e]:n[r].__depth+1,__depth:n[r].__depth+1}}function u(e){if(e in t.superTypeDictTable)return e}function l(e,r){const n=u(e);return n?t.superTypeDictTable[n]:o(e,r)}t.extensionTableInput={[a.TypeURL.XSD_DATE_TIME_STAMP]:a.TypeURL.XSD_DATE_TIME,[a.TypeURL.XSD_DAY_TIME_DURATION]:a.TypeURL.XSD_DURATION,[a.TypeURL.XSD_YEAR_MONTH_DURATION]:a.TypeURL.XSD_DURATION,[a.TypeURL.RDF_LANG_STRING]:a.TypeAlias.SPARQL_STRINGLY,[a.TypeURL.XSD_STRING]:a.TypeAlias.SPARQL_STRINGLY,[a.TypeURL.XSD_NORMALIZED_STRING]:a.TypeURL.XSD_STRING,[a.TypeURL.XSD_TOKEN]:a.TypeURL.XSD_NORMALIZED_STRING,[a.TypeURL.XSD_LANGUAGE]:a.TypeURL.XSD_TOKEN,[a.TypeURL.XSD_NM_TOKEN]:a.TypeURL.XSD_TOKEN,[a.TypeURL.XSD_NAME]:a.TypeURL.XSD_TOKEN,[a.TypeURL.XSD_NC_NAME]:a.TypeURL.XSD_NAME,[a.TypeURL.XSD_ENTITY]:a.TypeURL.XSD_NC_NAME,[a.TypeURL.XSD_ID]:a.TypeURL.XSD_NC_NAME,[a.TypeURL.XSD_ID_REF]:a.TypeURL.XSD_NC_NAME,[a.TypeURL.XSD_DOUBLE]:a.TypeAlias.SPARQL_NUMERIC,[a.TypeURL.XSD_FLOAT]:a.TypeAlias.SPARQL_NUMERIC,[a.TypeURL.XSD_DECIMAL]:a.TypeAlias.SPARQL_NUMERIC,[a.TypeURL.XSD_INTEGER]:a.TypeURL.XSD_DECIMAL,[a.TypeURL.XSD_NON_POSITIVE_INTEGER]:a.TypeURL.XSD_INTEGER,[a.TypeURL.XSD_NEGATIVE_INTEGER]:a.TypeURL.XSD_NON_POSITIVE_INTEGER,[a.TypeURL.XSD_LONG]:a.TypeURL.XSD_INTEGER,[a.TypeURL.XSD_INT]:a.TypeURL.XSD_LONG,[a.TypeURL.XSD_SHORT]:a.TypeURL.XSD_INT,[a.TypeURL.XSD_BYTE]:a.TypeURL.XSD_SHORT,[a.TypeURL.XSD_NON_NEGATIVE_INTEGER]:a.TypeURL.XSD_INTEGER,[a.TypeURL.XSD_POSITIVE_INTEGER]:a.TypeURL.XSD_NON_NEGATIVE_INTEGER,[a.TypeURL.XSD_UNSIGNED_LONG]:a.TypeURL.XSD_NON_NEGATIVE_INTEGER,[a.TypeURL.XSD_UNSIGNED_INT]:a.TypeURL.XSD_UNSIGNED_LONG,[a.TypeURL.XSD_UNSIGNED_SHORT]:a.TypeURL.XSD_UNSIGNED_INT,[a.TypeURL.XSD_UNSIGNED_BYTE]:a.TypeURL.XSD_UNSIGNED_SHORT,[a.TypeURL.XSD_DATE_TIME]:"term",[a.TypeURL.XSD_BOOLEAN]:"term",[a.TypeURL.XSD_DATE]:"term",[a.TypeURL.XSD_G_MONTH]:"term",[a.TypeURL.XSD_G_MONTHDAY]:"term",[a.TypeURL.XSD_G_YEAR]:"term",[a.TypeURL.XSD_G_YEAR_MONTH]:"term",[a.TypeURL.XSD_TIME]:"term",[a.TypeURL.XSD_G_DAY]:"term",[a.TypeURL.XSD_DURATION]:"term",[a.TypeAlias.SPARQL_NUMERIC]:"term",[a.TypeAlias.SPARQL_STRINGLY]:"term",[a.TypeURL.XSD_ANY_URI]:"term"},t.superTypeDictTable=Object.create(null),t.getSuperTypes=o,t.extensionTableInit=s,s(),t.typeAliasCheck=Object.create(null),function(){for(const e of Object.values(a.TypeAlias))t.typeAliasCheck[e]=!0}(),t.asTypeAlias=function(e){if(e in t.typeAliasCheck)return e},t.asKnownLiteralType=u,t.asOverrideType=function(e){if(u(e)??"term"===e)return e},t.asGeneralType=function(e){if("term"===e||(0,n.asTermType)(e))return e},t.isInternalSubType=function(e,r){return"term"!==e&&t.superTypeDictTable[e]&&void 0!==t.superTypeDictTable[e][r]},t.getSuperTypeDict=l,t.isSubTypeOf=function(e,t,r){return"term"!==e&&void 0!==l(e,r)[t]},t.typePromotion={[a.TypeURL.XSD_STRING]:[{typeToPromote:a.TypeURL.XSD_ANY_URI,conversionFunction:e=>(0,i.string)(e.str())}],[a.TypeURL.XSD_DOUBLE]:[{typeToPromote:a.TypeURL.XSD_FLOAT,conversionFunction:e=>(0,i.double)(e.typedValue)},{typeToPromote:a.TypeURL.XSD_DECIMAL,conversionFunction:e=>(0,i.double)(e.typedValue)}],[a.TypeURL.XSD_FLOAT]:[{typeToPromote:a.TypeURL.XSD_DECIMAL,conversionFunction:e=>(0,i.float)(e.typedValue)}]}},71448:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerVoid=void 0;const n=r(52640);class i extends n.Logger{debug(){}error(){}fatal(){}info(){}trace(){}warn(){}}t.LoggerVoid=i},5868:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(71448),t)},8008:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorAll=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e)}async mediate(e){const t=[];let r;try{r=this.publish(e)}catch{r=[]}for(const e of r)try{await e.reply,t.push(e.actor)}catch{}return(await Promise.all(t.map((t=>t.runObservable(e)))))[0]}async mediateWith(){throw new Error("Unsupported operation: MediatorAll#mediateWith")}}t.MediatorAll=i},48284:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(8008),t)},38123:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorCombinePipeline=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e)}async mediate(e){let t;try{t=this.publish(e)}catch{return e}if(this.filterErrors){const e=[];for(const r of t)try{await r.reply,e.push(r)}catch{}t=e}if(t=await Promise.all(t.map((async({actor:e,reply:t})=>({actor:e,reply:await t})))),this.order){const e=e=>{const t=this.field?e[this.field]:e;if("number"!=typeof t)throw new TypeError("Cannot order elements that are not numbers.");return t};t=t.sort(((t,r)=>("increasing"===this.order?1:-1)*(e(t.reply)-e(r.reply))))}let r=e;for(const{actor:e}of t)r={...r,...await e.runObservable(r)};return r}mediateWith(){throw new Error("Method not supported.")}}t.MediatorCombinePipeline=i},30827:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(38123),t)},79559:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorCombineUnion=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e),this.combiner=this.createCombiner()}async mediate(e){let t;try{t=this.publish(e)}catch{t=[]}if(this.filterErrors){const e=[];for(const r of t)try{await r.reply,e.push(r)}catch{}t=e}await Promise.all(t.map((({reply:e})=>e)));const r=await Promise.all(t.map((t=>t.actor.runObservable(e))));return this.combiner(r)}mediateWith(){throw new Error("Method not supported.")}createCombiner(){return e=>{const t={};return t[this.field]={},[{}].concat(e.map((e=>e[this.field]))).forEach((e=>{t[this.field]={...e,...t[this.field]}})),t}}}t.MediatorCombineUnion=i},75884:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(79559),t)},63850:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorJoinCoefficientsFixed=void 0;const n=r(32227),i=r(34368);class a extends i.Mediator{constructor(e){super(e)}async mediateWith(e,t){const r=[],a=t.map((({reply:e})=>e)).map((e=>e.catch((e=>{r.push(e)})))),o=await Promise.all(a);let s=o.map((e=>{if(e)return e.iterations*this.cpuWeight+e.persistedItems*this.memoryWeight+e.blockingItems*this.timeWeight+e.requestTime*this.ioWeight}));const c=Math.max(...s.filter((e=>void 0!==e))),u=e.context.get(n.KeysQueryOperation.limitIndicator);u&&(s=s.map(((e,t)=>void 0!==e&&o[t].persistedItems>0&&o[t].iterations>u?e+c:e)));let l=-1,d=Number.POSITIVE_INFINITY;for(const[e,t]of s.entries())void 0!==t&&(-1===l||te.message)).join("\n")}`);const h=t[l].actor;return h.includeInLogs&&i.Actor.getContextLogger(e.context)?.debug(`Determined physical join operator '${h.logicalType}-${h.physicalName}'`,{entries:e.entries.length,variables:await Promise.all(e.entries.map((async e=>(await e.output.metadata()).variables.map((e=>e.value))))),costs:Object.fromEntries(s.map(((e,r)=>[`${t[r].actor.logicalType}-${t[r].actor.physicalName}`,e])).filter((e=>void 0!==e[1]))),coefficients:Object.fromEntries(o.map(((e,r)=>[`${t[r].actor.logicalType}-${t[r].actor.physicalName}`,e])).filter((e=>void 0!==e[1])))}),h}}t.MediatorJoinCoefficientsFixed=a},8309:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(63850),t)},55614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorNumber=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e),this.indexPicker=this.createIndexPicker()}createIndexPicker(){switch(this.type){case"min":return e=>e.reduce(((e,t,r)=>{const n=this.getOrDefault(t[this.field],Number.POSITIVE_INFINITY);return null!==n&&(Number.isNaN(e[0])||e[0]>n)?[n,r]:e}),[Number.NaN,-1])[1];case"max":return e=>e.reduce(((e,t,r)=>{const n=this.getOrDefault(t[this.field],Number.NEGATIVE_INFINITY);return null!==n&&(Number.isNaN(e[0])||e[0]e));const n=[];if(this.ignoreErrors){const e={};e[this.field]=null,r=r.map((t=>t.catch((t=>(n.push(t),e)))))}const i=await Promise.all(r),a=this.indexPicker(i);if(a<0)throw new Error(`All actors rejected their test in ${this.name}\n${n.map((e=>e.message)).join("\n")}`);return t[a].actor}}t.MediatorNumber=i},99104:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(55614),t)},41426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorRace=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e)}mediateWith(e,t){return new Promise(((e,r)=>{const n=[];for(const i of t)i.reply.then((()=>{e(i.actor)})).catch((e=>{n.push(e),n.length===t.length&&r(new Error(`${this.name} mediated over all rejecting actors:\n${n.map((e=>e.message)).join("\n")}`))}))}))}}t.MediatorRace=i},25896:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(41426),t)},85849:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataValidationState=void 0,t.MetadataValidationState=class{constructor(){this.invalidateListeners=[],this.valid=!0}addInvalidateListener(e){this.invalidateListeners.push(e)}invalidate(){if(this.valid){this.valid=!1;for(const e of this.invalidateListeners)e()}}}},48187:(e,t)=>{"use strict";function r(e){for(const t of["cardinality"])if(!(t in e))throw new Error(`Invalid metadata: missing ${t} in ${JSON.stringify(e)}`);return e}function n(e){for(const t of["cardinality","canContainUndefs","variables"])if(!(t in e))throw new Error(`Invalid metadata: missing ${t} in ${JSON.stringify(e)}`);return e}function i(e){let t;return()=>(t||(t=e(),t.then((e=>e.state.addInvalidateListener((()=>{t=void 0})))).catch((()=>{}))),t)}Object.defineProperty(t,"__esModule",{value:!0}),t.cachifyMetadata=t.validateMetadataBindings=t.validateMetadataQuads=t.getMetadataBindings=t.getMetadataQuads=void 0,t.getMetadataQuads=function(e){return i((()=>new Promise(((t,r)=>{e.getProperty("metadata",(e=>t(e))),e.on("error",r)})).then((e=>r(e)))))},t.getMetadataBindings=function(e){return i((()=>new Promise(((t,r)=>{e.getProperty("metadata",(e=>t(e))),e.on("error",r)})).then((e=>("canContainUndefs"in e||(e.canContainUndefs=!1),n(e))))))},t.validateMetadataQuads=r,t.validateMetadataBindings=n,t.cachifyMetadata=i},72394:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(85849),t),i(r(48187),t)},66072:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},90522:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},54973:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},70650:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},92955:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},66143:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},22170:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6379:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},78615:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},60552:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},34989:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},50199:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},15278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},16382:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;class r{static getLevelOrdinal(e){return r.LEVELS[e]}}t.Logger=r,r.LEVELS={trace:0,debug:1,info:2,warn:3,error:4,fatal:5}},52640:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(66072),t),i(r(90522),t),i(r(54973),t),i(r(70650),t),i(r(92955),t),i(r(66143),t),i(r(22170),t),i(r(6379),t),i(r(78615),t),i(r(60552),t),i(r(34989),t),i(r(50199),t),i(r(15278),t),i(r(16382),t)},7991:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,a=s(e),o=a[0],c=a[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,c)),l=0,d=c>0?o-4:o;for(r=0;r>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,u=n-i;su?u:s+o));return 1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=a[o],n[a.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,a,o=[],s=t;s>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},55553:function(e,t,r){var n;!function(i){"use strict";var a,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,c=Math.floor,u="[BigNumber Error] ",l=u+"Number primitive has more than 15 significant digits: ",d=1e14,h=14,p=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],y=1e7,g=1e9;function m(e){var t=0|e;return e>0||e===t?t:t-1}function b(e){for(var t,r,n=1,i=e.length,a=e[0]+"";nu^r?1:-1;for(s=(c=i.length)<(u=a.length)?c:u,o=0;oa[o]^r?1:-1;return c==u?0:c>u^r?1:-1}function _(e,t,r,n){if(er||e!==c(e))throw Error(u+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var t=e.c.length-1;return m(e.e/h)==t&&e.c[t]%2!=0}function T(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function S(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else tk?m.c=m.e=null:e.e=10;d/=10,u++);return void(u>k?m.c=m.e=null:(m.e=u,m.c=[e]))}g=String(e)}else{if(!o.test(g=String(e)))return i(m,g,f);m.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(u=g.indexOf("."))>-1&&(g=g.replace(".","")),(d=g.search(/e/i))>0?(u<0&&(u=d),u+=+g.slice(d+1),g=g.substring(0,d)):u<0&&(u=g.length)}else{if(_(t,2,V.length,"Base"),10==t&&Q)return K(m=new $(e),D+m.e+1,j);if(g=String(e),f="number"==typeof e){if(0*e!=0)return i(m,g,f,t);if(m.s=1/e<0?(g=g.slice(1),-1):1,$.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else m.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(r=V.slice(0,t),u=d=0,y=g.length;du){u=y;continue}}else if(!s&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){s=!0,d=-1,u=0;continue}return i(m,String(e),f,t)}f=!1,(u=(g=n(g,t,10,m.s)).indexOf("."))>-1?g=g.replace(".",""):u=g.length}for(d=0;48===g.charCodeAt(d);d++);for(y=g.length;48===g.charCodeAt(--y););if(g=g.slice(d,++y)){if(y-=d,f&&$.DEBUG&&y>15&&(e>p||e!==c(e)))throw Error(l+m.s*e);if((u=u-d-1)>k)m.c=m.e=null;else if(u=M)?T(c,o):S(c,o,"0");else if(a=(e=K(new $(e),t,r)).e,s=(c=b(e.c)).length,1==n||2==n&&(t<=a||a<=C)){for(;ss){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=a-s)>0)for(a+1==s&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function G(e,t){for(var r,n,i=1,a=new $(e[0]);i=10;i/=10,n++);return(r=n+r*h-1)>k?e.c=e.e=null:r=10;u/=10,i++);if((a=t-i)<0)a+=h,o=t,l=g[p=0],y=c(l/m[i-o-1]%10);else if((p=s((a+1)/h))>=g.length){if(!n)break e;for(;g.length<=p;g.push(0));l=y=0,i=1,o=(a%=h)-h+1}else{for(l=u=g[p],i=1;u>=10;u/=10,i++);y=(o=(a%=h)-h+i)<0?0:c(l/m[i-o-1]%10)}if(n=n||t<0||null!=g[p+1]||(o<0?l:l%m[i-o-1]),n=r<4?(y||n)&&(0==r||r==(e.s<0?3:2)):y>5||5==y&&(4==r||n||6==r&&(a>0?o>0?l/m[i-o]:0:g[p-1])%10&1||r==(e.s<0?8:7)),t<1||!g[0])return g.length=0,n?(t-=e.e+1,g[0]=m[(h-t%h)%h],e.e=-t||0):g[0]=e.e=0,e;if(0==a?(g.length=p,u=1,p--):(g.length=p+1,u=m[h-a],g[p]=o>0?c(l/m[i-o]%m[o])*u:0),n)for(;;){if(0==p){for(a=1,o=g[0];o>=10;o/=10,a++);for(o=g[0]+=u,u=1;o>=10;o/=10,u++);a!=u&&(e.e++,g[0]==d&&(g[0]=1));break}if(g[p]+=u,g[p]!=d)break;g[p--]=0,u=1}for(a=g.length;0===g[--a];g.pop());}e.e>k?e.c=e.e=null:e.e=M?T(t,r):S(t,r,"0"),e.s<0?"-"+t:t)}return $.clone=e,$.ROUND_UP=0,$.ROUND_DOWN=1,$.ROUND_CEIL=2,$.ROUND_FLOOR=3,$.ROUND_HALF_UP=4,$.ROUND_HALF_DOWN=5,$.ROUND_HALF_EVEN=6,$.ROUND_HALF_CEIL=7,$.ROUND_HALF_FLOOR=8,$.EUCLID=9,$.config=$.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(u+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(_(r=e[t],0,g,t),D=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(_(r=e[t],0,8,t),j=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(_(r[0],-g,0,t),_(r[1],0,g,t),C=r[0],M=r[1]):(_(r,-g,g,t),C=-(M=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)_(r[0],-g,-1,t),_(r[1],1,g,t),L=r[0],k=r[1];else{if(_(r,-g,g,t),!r)throw Error(u+t+" cannot be zero: "+r);L=-(k=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(u+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw F=!r,Error(u+"crypto unavailable");F=r}else F=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(_(r=e[t],0,9,t),B=r),e.hasOwnProperty(t="POW_PRECISION")&&(_(r=e[t],0,g,t),U=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(u+t+" not an object: "+r);q=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(u+t+" invalid: "+r);Q="0123456789"==r.slice(0,10),V=r}}return{DECIMAL_PLACES:D,ROUNDING_MODE:j,EXPONENTIAL_AT:[C,M],RANGE:[L,k],CRYPTO:F,MODULO_MODE:B,POW_PRECISION:U,FORMAT:q,ALPHABET:V}},$.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!$.DEBUG)return!0;var t,r,n=e.c,i=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===a||-1===a)&&i>=-g&&i<=g&&i===c(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%h)<1&&(t+=h),String(n[0]).length==t){for(t=0;t=d||r!==c(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(u+"Invalid BigNumber: "+e)},$.maximum=$.max=function(){return G(arguments,-1)},$.minimum=$.min=function(){return G(arguments,1)},$.random=(a=9007199254740992,O=Math.random()*a&2097151?function(){return c(Math.random()*a)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,a,o=0,l=[],d=new $(N);if(null==e?e=D:_(e,0,g),i=s(e/h),F)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));o>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[o]=r[0],t[o+1]=r[1]):(l.push(a%1e14),o+=2);o=i/2}else{if(!crypto.randomBytes)throw F=!1,Error(u+"crypto unavailable");for(t=crypto.randomBytes(i*=7);o=9e15?crypto.randomBytes(7).copy(t,o):(l.push(a%1e14),o+=7);o=i/7}if(!F)for(;o=10;a/=10,o++);or-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/r|0,o[i]%=r)}return o.reverse()}return function(n,i,a,o,s){var c,u,l,d,h,p,f,y,g=n.indexOf("."),m=D,v=j;for(g>=0&&(d=U,U=0,n=n.replace(".",""),p=(y=new $(i)).pow(n.length-g),U=d,y.c=t(S(b(p.c),p.e,"0"),10,a,e),y.e=y.c.length),l=d=(f=t(n,i,a,s?(c=V,e):(c=e,V))).length;0==f[--d];f.pop());if(!f[0])return c.charAt(0);if(g<0?--l:(p.c=f,p.e=l,p.s=o,f=(p=r(p,y,m,v,a)).c,h=p.r,l=p.e),g=f[u=l+m+1],d=a/2,h=h||u<0||null!=f[u+1],h=v<4?(null!=g||h)&&(0==v||v==(p.s<0?3:2)):g>d||g==d&&(4==v||h||6==v&&1&f[u-1]||v==(p.s<0?8:7)),u<1||!f[0])n=h?S(c.charAt(1),-m,c.charAt(0)):c.charAt(0);else{if(f.length=u,h)for(--a;++f[--u]>a;)f[u]=0,u||(++l,f=[1].concat(f));for(d=f.length;!f[--d];);for(g=0,n="";g<=d;n+=c.charAt(f[g++]));n=S(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,a,o,s=0,c=e.length,u=t%y,l=t/y|0;for(e=e.slice();c--;)s=((i=u*(a=e[c]%y)+(n=l*a+(o=e[c]/y|0)*u)%y*y+s)/r|0)+(n/y|0)+l*o,e[c]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;it[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,a,o,s){var u,l,p,f,y,g,b,v,_,w,T,S,O,E,x,A,R,I=n.s==i.s?1:-1,P=n.c,N=i.c;if(!(P&&P[0]&&N&&N[0]))return new $(n.s&&i.s&&(P?!N||P[0]!=N[0]:N)?P&&0==P[0]||!N?0*I:I/0:NaN);for(_=(v=new $(I)).c=[],I=a+(l=n.e-i.e)+1,s||(s=d,l=m(n.e/h)-m(i.e/h),I=I/h|0),p=0;N[p]==(P[p]||0);p++);if(N[p]>(P[p]||0)&&l--,I<0)_.push(1),f=!0;else{for(E=P.length,A=N.length,p=0,I+=2,(y=c(s/(N[0]+1)))>1&&(N=e(N,y,s),P=e(P,y,s),A=N.length,E=P.length),O=A,T=(w=P.slice(0,A)).length;T=s/2&&x++;do{if(y=0,(u=t(N,w,A,T))<0){if(S=w[0],A!=T&&(S=S*s+(w[1]||0)),(y=c(S/x))>1)for(y>=s&&(y=s-1),b=(g=e(N,y,s)).length,T=w.length;1==t(g,w,b,T);)y--,r(g,A=10;I/=10,p++);K(v,a+(v.e=p+l*h-1)+1,o,f)}else v.e=l,v.r=+f;return v}}(),E=/^(-?)0([xbo])(?=\w[\w.]*$)/i,x=/^([^.]+)\.$/,A=/^\.([^.]+)$/,R=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,a=r?t:t.replace(I,"");if(R.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!r&&(a=a.replace(E,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,a=a.replace(x,"$1").replace(A,"0.$1")),t!=a))return new $(a,i);if($.DEBUG)throw Error(u+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},P.absoluteValue=P.abs=function(){var e=new $(this);return e.s<0&&(e.s=1),e},P.comparedTo=function(e,t){return v(this,new $(e,t))},P.decimalPlaces=P.dp=function(e,t){var r,n,i,a=this;if(null!=e)return _(e,0,g),null==t?t=j:_(t,0,8),K(new $(a),e+a.e+1,t);if(!(r=a.c))return null;if(n=((i=r.length-1)-m(this.e/h))*h,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},P.dividedBy=P.div=function(e,t){return r(this,new $(e,t),D,j)},P.dividedToIntegerBy=P.idiv=function(e,t){return r(this,new $(e,t),0,1)},P.exponentiatedBy=P.pow=function(e,t){var r,n,i,a,o,l,d,p,f=this;if((e=new $(e)).c&&!e.isInteger())throw Error(u+"Exponent not an integer: "+X(e));if(null!=t&&(t=new $(t)),o=e.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return p=new $(Math.pow(+X(f),o?e.s*(2-w(e)):+X(e))),t?p.mod(t):p;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new $(NaN);(n=!l&&f.isInteger()&&t.isInteger())&&(f=f.mod(t))}else{if(e.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||o&&f.c[1]>=24e7:f.c[0]<8e13||o&&f.c[0]<=9999975e7)))return a=f.s<0&&w(e)?-0:0,f.e>-1&&(a=1/a),new $(l?1/a:a);U&&(a=s(U/h+2))}for(o?(r=new $(.5),l&&(e.s=1),d=w(e)):d=(i=Math.abs(+X(e)))%2,p=new $(N);;){if(d){if(!(p=p.times(f)).c)break;a?p.c.length>a&&(p.c.length=a):n&&(p=p.mod(t))}if(i){if(0===(i=c(i/2)))break;d=i%2}else if(K(e=e.times(r),e.e+1,1),e.e>14)d=w(e);else{if(0==(i=+X(e)))break;d=i%2}f=f.times(f),a?f.c&&f.c.length>a&&(f.c.length=a):n&&(f=f.mod(t))}return n?p:(l&&(p=N.div(p)),t?p.mod(t):a?K(p,U,j,void 0):p)},P.integerValue=function(e){var t=new $(this);return null==e?e=j:_(e,0,8),K(t,t.e+1,e)},P.isEqualTo=P.eq=function(e,t){return 0===v(this,new $(e,t))},P.isFinite=function(){return!!this.c},P.isGreaterThan=P.gt=function(e,t){return v(this,new $(e,t))>0},P.isGreaterThanOrEqualTo=P.gte=function(e,t){return 1===(t=v(this,new $(e,t)))||0===t},P.isInteger=function(){return!!this.c&&m(this.e/h)>this.c.length-2},P.isLessThan=P.lt=function(e,t){return v(this,new $(e,t))<0},P.isLessThanOrEqualTo=P.lte=function(e,t){return-1===(t=v(this,new $(e,t)))||0===t},P.isNaN=function(){return!this.s},P.isNegative=function(){return this.s<0},P.isPositive=function(){return this.s>0},P.isZero=function(){return!!this.c&&0==this.c[0]},P.minus=function(e,t){var r,n,i,a,o=this,s=o.s;if(t=(e=new $(e,t)).s,!s||!t)return new $(NaN);if(s!=t)return e.s=-t,o.plus(e);var c=o.e/h,u=e.e/h,l=o.c,p=e.c;if(!c||!u){if(!l||!p)return l?(e.s=-t,e):new $(p?o:NaN);if(!l[0]||!p[0])return p[0]?(e.s=-t,e):new $(l[0]?o:3==j?-0:0)}if(c=m(c),u=m(u),l=l.slice(),s=c-u){for((a=s<0)?(s=-s,i=l):(u=c,i=p),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(a=(s=l.length)<(t=p.length))?s:t,s=t=0;t0)for(;t--;l[r++]=0);for(t=d-1;n>s;){if(l[--n]=0;){for(r=0,f=S[i]%_,g=S[i]/_|0,a=i+(o=c);a>i;)r=((u=f*(u=T[--o]%_)+(s=g*u+(l=T[o]/_|0)*f)%_*_+b[a]+r)/v|0)+(s/_|0)+g*l,b[a--]=u%v;b[a]=r}return r?++n:b.splice(0,1),z(e,b,n)},P.negated=function(){var e=new $(this);return e.s=-e.s||null,e},P.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new $(e,t)).s,!i||!t)return new $(NaN);if(i!=t)return e.s=-t,n.minus(e);var a=n.e/h,o=e.e/h,s=n.c,c=e.c;if(!a||!o){if(!s||!c)return new $(i/0);if(!s[0]||!c[0])return c[0]?e:new $(s[0]?n:0*i)}if(a=m(a),o=m(o),s=s.slice(),i=a-o){for(i>0?(o=a,r=c):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/d|0,s[t]=d===s[t]?0:s[t]%d;return i&&(s=[i].concat(s),++o),z(e,s,o)},P.precision=P.sd=function(e,t){var r,n,i,a=this;if(null!=e&&e!==!!e)return _(e,1,g),null==t?t=j:_(t,0,8),K(new $(a),e,t);if(!(r=a.c))return null;if(n=(i=r.length-1)*h+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&a.e+1>n&&(n=a.e+1),n},P.shiftedBy=function(e){return _(e,-9007199254740991,p),this.times("1e"+e)},P.squareRoot=P.sqrt=function(){var e,t,n,i,a,o=this,s=o.c,c=o.s,u=o.e,l=D+4,d=new $("0.5");if(1!==c||!s||!s[0])return new $(!c||c<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(c=Math.sqrt(+X(o)))||c==1/0?(((t=b(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=m((u+1)/2)-(u<0||u%2),n=new $(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new $(c+""),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(a=n,n=d.times(a.plus(r(o,a,l,1))),b(a.c).slice(0,c)===(t=b(n.c)).slice(0,c)){if(n.e0&&y>0){for(a=y%s||s,d=f.substr(0,a);a0&&(d+=l+f.slice(a)),p&&(d="-"+d)}n=h?d+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):d}return(r.prefix||"")+n+(r.suffix||"")},P.toFraction=function(e){var t,n,i,a,o,s,c,l,d,p,y,g,m=this,v=m.c;if(null!=e&&(!(c=new $(e)).isInteger()&&(c.c||1!==c.s)||c.lt(N)))throw Error(u+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+X(c));if(!v)return new $(m);for(t=new $(N),d=n=new $(N),i=l=new $(N),g=b(v),o=t.e=g.length-m.e-1,t.c[0]=f[(s=o%h)<0?h+s:s],e=!e||c.comparedTo(t)>0?o>0?t:d:c,s=k,k=1/0,c=new $(g),l.c[0]=0;p=r(c,t,0,1),1!=(a=n.plus(p.times(i))).comparedTo(e);)n=i,i=a,d=l.plus(p.times(a=d)),l=a,t=c.minus(p.times(a=t)),c=a;return a=r(e.minus(n),i,0,1),l=l.plus(a.times(d)),n=n.plus(a.times(i)),l.s=d.s=m.s,y=r(d,i,o*=2,j).minus(m).abs().comparedTo(r(l,n,o,j).minus(m).abs())<1?[d,i]:[l,n],k=s,y},P.toNumber=function(){return+X(this)},P.toPrecision=function(e,t){return null!=e&&_(e,1,g),H(this,e,t,2)},P.toString=function(e){var t,r=this,i=r.s,a=r.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=a<=C||a>=M?T(b(r.c),a):S(b(r.c),a,"0"):10===e&&Q?t=S(b((r=K(new $(r),D+a+1,j)).c),r.e,"0"):(_(e,2,V.length,"Base"),t=n(S(b(r.c),a,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},P.valueOf=P.toJSON=function(){return X(this)},P._isBigNumber=!0,null!=t&&$.set(t),$}(),a.default=a.BigNumber=a,void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},1048:(e,t,r)=>{"use strict";const n=r(7991),i=r(39318),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const i=function(e){if(c.isBuffer(e)){const t=0|f(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?s(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return l(e),s(e<0?0:0|f(e))}function h(e){const t=e.length<0?0:0|f(e.length),r=s(t);for(let n=0;n=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function y(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(i)return n?-1:G(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let a,o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let n=-1;for(a=r;as&&(r=s-c),a=r;a>=0;a--){let r=!0;for(let n=0;ni&&(n=i):n=i;const a=t.length;let o;for(n>a/2&&(n=a/2),o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+o<=r){let r,n,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:r=e[i+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(a=c));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,c>65535&&c<1114112&&(a=c))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return function(e){const t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},c.byteLength=y,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(X(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0);const s=Math.min(a,o),u=this.slice(n,i),l=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let a=!1;for(;;)switch(n){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return T(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function R(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,i,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function C(e,t,r,n,i){V(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function M(e,t,r,n,i){V(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function L(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function k(e,t,r,n,a){return t=+t,r>>>=0,a||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,a){return t=+t,r>>>=0,a||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e],i=1,a=0;for(;++a>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Y((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e],i=1,a=0;for(;++a=i&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=t,i=1,a=this[e+--n];for(;n>0&&(i*=256);)a+=this[e+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Y((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||D(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Y((function(e,t=0){return C(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Y((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);j(this,e,t,r,n-1,-n)}let i=0,a=1,o=0;for(this[t]=255&e;++i>>=0,!n){const n=Math.pow(2,8*r-1);j(this,e,t,r,n-1,-n)}let i=r-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Y((function(e,t=0){return C(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Y((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return k(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return k(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function V(e,t,r,n,i,a){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(a+1)}${n}`:`>= -(2${n} ** ${8*(a+1)-1}${n}) and < 2 ** ${8*(a+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){Q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||$(t,e.length-(r+1))}(n,i,a)}function Q(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function $(e,t,r){if(Math.floor(e)!==e)throw Q(e,r),new B.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let i=null;const a=[];for(let o=0;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function z(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const W=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Y(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},62168:e=>{"use strict";e.exports=function e(t){if("number"==typeof t&&isNaN(t))throw new Error("NaN is not allowed");if("number"==typeof t&&!isFinite(t))throw new Error("Infinity is not allowed");return null===t||"object"!=typeof t?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce(((t,r,n)=>`${t}${0===n?"":","}${e(void 0===r||"symbol"==typeof r?null:r)}`),"")}]`:`{${Object.keys(t).sort().reduce(((r,n)=>void 0===t[n]||"symbol"==typeof t[n]?r:`${r}${0===r.length?"":","}${e(n)}:${e(t[n])}`),"")}}`}},90482:function(){!function(e){!function(t){var r="undefined"!=typeof globalThis&&globalThis||void 0!==e&&e||void 0!==r&&r,n="URLSearchParams"in r,i="Symbol"in r&&"iterator"in Symbol,a="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in r,s="ArrayBuffer"in r;if(s)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&c.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=y(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&a&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(g)}),this.text=function(){var e,t,r,n=f(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=y(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function T(e,t){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},b.call(_.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},T.error=function(){var e=new T(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];T.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new T(null,{status:t,headers:{location:e}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function O(e,n){return new Promise((function(i,o){var c=new _(e,n);if(c.signal&&c.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function l(){u.abort()}u.onload=function(){var e,t,r={status:u.status,statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var n="response"in u?u.response:u.responseText;setTimeout((function(){i(new T(n,r))}),0)},u.onerror=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.ontimeout=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.onabort=function(){setTimeout((function(){o(new t.DOMException("Aborted","AbortError"))}),0)},u.open(c.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?u.withCredentials=!0:"omit"===c.credentials&&(u.withCredentials=!1),"responseType"in u&&(a?u.responseType="blob":s&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(u.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof p?c.headers.forEach((function(e,t){u.setRequestHeader(t,e)})):Object.getOwnPropertyNames(n.headers).forEach((function(e){u.setRequestHeader(e,d(n.headers[e]))})),c.signal&&(c.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&c.signal.removeEventListener("abort",l)}),u.send(void 0===c._bodyInit?null:c._bodyInit)}))}O.polyfill=!0,r.fetch||(r.fetch=O,r.Headers=p,r.Request=_,r.Response=T),t.Headers=p,t.Request=_,t.Response=T,t.fetch=O}({})}("undefined"!=typeof self?self:this)},10288:(e,t,r)=>{var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var r=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r&&r,n="URLSearchParams"in r,i="Symbol"in r&&"iterator"in Symbol,a="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in r,s="ArrayBuffer"in r;if(s)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&c.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=y(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&a&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(g)}),this.text=function(){var e,t,r,n=f(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=y(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function T(e,t){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},b.call(_.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},T.error=function(){var e=new T(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];T.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new T(null,{status:t,headers:{location:e}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function O(e,n){return new Promise((function(i,o){var c=new _(e,n);if(c.signal&&c.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function l(){u.abort()}u.onload=function(){var e,t,r={status:u.status,statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var n="response"in u?u.response:u.responseText;setTimeout((function(){i(new T(n,r))}),0)},u.onerror=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.ontimeout=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.onabort=function(){setTimeout((function(){o(new t.DOMException("Aborted","AbortError"))}),0)},u.open(c.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?u.withCredentials=!0:"omit"===c.credentials&&(u.withCredentials=!1),"responseType"in u&&(a?u.responseType="blob":s&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(u.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof p?c.headers.forEach((function(e,t){u.setRequestHeader(t,e)})):Object.getOwnPropertyNames(n.headers).forEach((function(e){u.setRequestHeader(e,d(n.headers[e]))})),c.signal&&(c.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&c.signal.removeEventListener("abort",l)}),u.send(void 0===c._bodyInit?null:c._bodyInit)}))}O.polyfill=!0,r.fetch||(r.fetch=O,r.Headers=p,r.Request=_,r.Response=T),t.Headers=p,t.Request=_,t.Response=T,t.fetch=O}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var a=n.fetch?n:i;(t=a.fetch).default=a.fetch,t.fetch=a.fetch,t.Headers=a.Headers,t.Request=a.Request,t.Response=a.Response,e.exports=t},36593:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeNames=t.elementNames=void 0,t.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((function(e){return[e.toLowerCase(),e]}))),t.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((function(e){return[e.toLowerCase(),e]})))},5193:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r");case s.Comment:return"\x3c!--".concat(e.data,"--\x3e");case s.CDATA:return function(e){return"")}(e);case s.Script:case s.Style:case s.Tag:return function(e,t){var r;"foreign"===t.xmlMode&&(e.name=null!==(r=u.elementNames.get(e.name))&&void 0!==r?r:e.name,e.parent&&y.has(e.parent.name)&&(t=n(n({},t),{xmlMode:!1}))),!t.xmlMode&&g.has(e.name)&&(t=n(n({},t),{xmlMode:"foreign"}));var i="<".concat(e.name),a=function(e,t){var r;if(e){var n=!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)?d:t.xmlMode||"utf8"!==t.encodeEntities?c.encodeXML:c.escapeAttribute;return Object.keys(e).map((function(r){var i,a,o=null!==(i=e[r])&&void 0!==i?i:"";return"foreign"===t.xmlMode&&(r=null!==(a=u.attributeNames.get(r))&&void 0!==a?a:r),t.emptyAttrs||t.xmlMode||""!==o?"".concat(r,'="').concat(n(o),'"'):r})).join(" ")}}(e.attribs,t);return a&&(i+=" ".concat(a)),0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&h.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=p(e.children,t)),!t.xmlMode&&h.has(e.name)||(i+=""))),i}(e,t);case s.Text:return function(e,t){var r,n=e.data||"";return!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)||!t.xmlMode&&e.parent&&l.has(e.parent.name)||(n=t.xmlMode||"utf8"!==t.encodeEntities?(0,c.encodeXML)(n):(0,c.escapeText)(n)),n}(e,t)}}t.render=p,t.default=p;var y=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),g=new Set(["svg","math"])},93338:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(r=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style},t.Root=r.Root,t.Text=r.Text,t.Directive=r.Directive,t.Comment=r.Comment,t.Script=r.Script,t.Style=r.Style,t.Tag=r.Tag,t.CDATA=r.CDATA,t.Doctype=r.Doctype},21138:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=r(93338),o=r(62888);i(r(62888),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function e(e,t,r){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(r=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=r?r:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var r=this.options.xmlMode?a.ElementType.Tag:void 0,n=new o.Element(e,t,void 0,r);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===a.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var r=new o.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new o.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new o.Text(""),t=new o.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var r=new o.ProcessingInstruction(e,t);this.addNode(r)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],r=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),r&&(e.prev=r,r.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=c,t.default=c},62888:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=h;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.CDATA,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(h);t.CDATA=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.Root,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(h);t.Document=f;var y=function(e){function t(t,r,n,i){void 0===n&&(n=[]),void 0===i&&(i="script"===t?o.ElementType.Script:"style"===t?o.ElementType.Style:o.ElementType.Tag);var a=e.call(this,n)||this;return a.name=t,a.attribs=r,a.type=i,a}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var r,n;return{name:t,value:e.attribs[t],namespace:null===(r=e["x-attribsNamespace"])||void 0===r?void 0:r[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}}))},enumerable:!1,configurable:!0}),t}(h);function g(e){return(0,o.isTag)(e)}function m(e){return e.type===o.ElementType.CDATA}function b(e){return e.type===o.ElementType.Text}function v(e){return e.type===o.ElementType.Comment}function _(e){return e.type===o.ElementType.Directive}function w(e){return e.type===o.ElementType.Root}function T(e,t){var r;if(void 0===t&&(t=!1),b(e))r=new u(e.data);else if(v(e))r=new l(e.data);else if(g(e)){var n=t?S(e.children):[],i=new y(e.name,a({},e.attribs),n);n.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),r=i}else if(m(e)){n=t?S(e.children):[];var o=new p(n);n.forEach((function(e){return e.parent=o})),r=o}else if(w(e)){n=t?S(e.children):[];var s=new f(n);n.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),r=s}else{if(!_(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new d(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),r=c}return r.startIndex=e.startIndex,r.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function S(e){for(var t=e.map((function(e){return T(e,!0)})),r=1;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeed=void 0;var n=r(68642),i=r(78052);t.getFeed=function(e){var t=c(d,e);return t?"feed"===t.name?function(e){var t,r=e.children,n={type:"atom",items:(0,i.getElementsByTagName)("entry",r).map((function(e){var t,r=e.children,n={media:s(r)};l(n,"id","id",r),l(n,"title","title",r);var i=null===(t=c("link",r))||void 0===t?void 0:t.attribs.href;i&&(n.link=i);var a=u("summary",r)||u("content",r);a&&(n.description=a);var o=u("updated",r);return o&&(n.pubDate=new Date(o)),n}))};l(n,"id","id",r),l(n,"title","title",r);var a=null===(t=c("link",r))||void 0===t?void 0:t.attribs.href;a&&(n.link=a),l(n,"description","subtitle",r);var o=u("updated",r);return o&&(n.updated=new Date(o)),l(n,"author","email",r,!0),n}(t):function(e){var t,r,n=null!==(r=null===(t=c("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==r?r:[],a={type:e.name.substr(0,3),id:"",items:(0,i.getElementsByTagName)("item",e.children).map((function(e){var t=e.children,r={media:s(t)};l(r,"id","guid",t),l(r,"title","title",t),l(r,"link","link",t),l(r,"description","description",t);var n=u("pubDate",t)||u("dc:date",t);return n&&(r.pubDate=new Date(n)),r}))};l(a,"title","title",n),l(a,"link","link",n),l(a,"description","description",n);var o=u("lastBuildDate",n);return o&&(a.updated=new Date(o)),l(a,"author","managingEditor",n,!0),a}(t):null};var a=["url","type","lang"],o=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function s(e){return(0,i.getElementsByTagName)("media:content",e).map((function(e){for(var t=e.attribs,r={medium:t.medium,isDefault:!!t.isDefault},n=0,i=a;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueSort=t.compareDocumentPosition=t.DocumentPosition=t.removeSubsets=void 0;var n,i=r(21138);function a(e,t){var r=[],a=[];if(e===t)return 0;for(var o=(0,i.hasChildren)(e)?e:e.parent;o;)r.unshift(o),o=o.parent;for(o=(0,i.hasChildren)(t)?t:t.parent;o;)a.unshift(o),o=o.parent;for(var s=Math.min(r.length,a.length),c=0;cl.indexOf(h)?u===t?n.FOLLOWING|n.CONTAINED_BY:n.FOLLOWING:u===e?n.PRECEDING|n.CONTAINS:n.PRECEDING}t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0)e.splice(t,1);else for(var n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e},function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"}(n=t.DocumentPosition||(t.DocumentPosition={})),t.compareDocumentPosition=a,t.uniqueSort=function(e){return(e=e.filter((function(e,t,r){return!r.includes(e,t+1)}))).sort((function(e,t){var r=a(e,t);return r&n.PRECEDING?-1:r&n.FOLLOWING?1:0})),e}},76403:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,i(r(68642),t),i(r(45517),t),i(r(46178),t),i(r(51467),t),i(r(78052),t),i(r(83698),t),i(r(91206),t);var a=r(21138);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return a.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return a.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return a.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return a.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return a.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return a.hasChildren}})},78052:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var n=r(21138),i=r(51467),a={tag_name:function(e){return"function"==typeof e?function(t){return(0,n.isTag)(t)&&e(t.name)}:"*"===e?n.isTag:function(t){return(0,n.isTag)(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return(0,n.isText)(t)&&e(t.data)}:function(t){return(0,n.isText)(t)&&t.data===e}}};function o(e,t){return"function"==typeof t?function(r){return(0,n.isTag)(r)&&t(r.attribs[e])}:function(r){return(0,n.isTag)(r)&&r.attribs[e]===t}}function s(e,t){return function(r){return e(r)||t(r)}}function c(e){var t=Object.keys(e).map((function(t){var r=e[t];return Object.prototype.hasOwnProperty.call(a,t)?a[t](r):o(t,r)}));return 0===t.length?null:t.reduce(s)}t.testElement=function(e,t){var r=c(e);return!r||r(t)},t.getElements=function(e,t,r,n){void 0===n&&(n=1/0);var a=c(e);return a?(0,i.filter)(a,t,r,n):[]},t.getElementById=function(e,t,r){return void 0===r&&(r=!0),Array.isArray(t)||(t=[t]),(0,i.findOne)(o("id",e),t,r)},t.getElementsByTagName=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(a.tag_name(e),t,r,n)},t.getElementsByTagType=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(a.tag_type(e),t,r,n)}},46178:(e,t)=>{"use strict";function r(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}Object.defineProperty(t,"__esModule",{value:!0}),t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0,t.removeElement=r,t.replaceElement=function(e,t){var r=t.prev=e.prev;r&&(r.next=t);var n=t.next=e.next;n&&(n.prev=t);var i=t.parent=e.parent;if(i){var a=i.children;a[a.lastIndexOf(e)]=t,e.parent=null}},t.appendChild=function(e,t){if(r(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null},t.append=function(e,t){r(t);var n=e.parent,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=n,i){if(i.prev=t,n){var a=n.children;a.splice(a.lastIndexOf(i),0,t)}}else n&&n.children.push(t)},t.prependChild=function(e,t){if(r(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var n=e.children[1];n.prev=t,t.next=n}else t.next=null},t.prepend=function(e,t){r(t);var n=e.parent;if(n){var i=n.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}},51467:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var n=r(21138);function i(e,t,r,i){for(var a=[],o=[t],s=[0];;)if(s[0]>=o[0].length){if(1===s.length)return a;o.shift(),s.shift()}else{var c=o[0][s[0]++];if(e(c)&&(a.push(c),--i<=0))return a;r&&(0,n.hasChildren)(c)&&c.children.length>0&&(s.unshift(0),o.unshift(c.children))}}t.filter=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),i(e,Array.isArray(t)?t:[t],r,n)},t.find=i,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,r,i){void 0===i&&(i=!0);for(var a=null,o=0;o0&&(a=e(t,s.children,!0)))}return a},t.existsOne=function e(t,r){return r.some((function(r){return(0,n.isTag)(r)&&(t(r)||e(t,r.children))}))},t.findAll=function(e,t){for(var r=[],i=[t],a=[0];;)if(a[0]>=i[0].length){if(1===i.length)return r;i.shift(),a.shift()}else{var o=i[0][a[0]++];(0,n.isTag)(o)&&(e(o)&&r.push(o),o.children.length>0&&(a.unshift(0),i.unshift(o.children)))}}},68642:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.innerText=t.textContent=t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var i=r(21138),a=n(r(5193)),o=r(93338);function s(e,t){return(0,a.default)(e,t)}t.getOuterHTML=s,t.getInnerHTML=function(e,t){return(0,i.hasChildren)(e)?e.children.map((function(e){return s(e,t)})).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.isTag)(t)?"br"===t.name?"\n":e(t.children):(0,i.isCDATA)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&!(0,i.isComment)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&(t.type===o.ElementType.Tag||(0,i.isCDATA)(t))?e(t.children):(0,i.isText)(t)?t.data:""}},45517:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var n=r(21138);function i(e){return(0,n.hasChildren)(e)?e.children:[]}function a(e){return e.parent||null}t.getChildren=i,t.getParent=a,t.getSiblings=function(e){var t=a(e);if(null!=t)return i(t);for(var r=[e],n=e.prev,o=e.next;null!=n;)r.unshift(n),n=n.prev;for(;null!=o;)r.push(o),o=o.next;return r},t.getAttributeValue=function(e,t){var r;return null===(r=e.attribs)||void 0===r?void 0:r[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!(0,n.isTag)(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!(0,n.isTag)(t);)t=t.prev;return t}},3379:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTMLAttribute=t.decodeHTML=t.determineBranch=t.EntityDecoder=t.DecodingMode=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var s=o(r(57346));t.htmlDecodeTree=s.default;var c=o(r(18622));t.xmlDecodeTree=c.default;var u=a(r(22809));t.decodeCodePoint=u.default;var l,d,h,p,f=r(22809);function y(e){return e>=l.ZERO&&e<=l.NINE}Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return f.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return f.fromCodePoint}}),function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(l||(l={})),function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(d=t.BinTrieFlags||(t.BinTrieFlags={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(h||(h={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(p=t.DecodingMode||(t.DecodingMode={}));var g=function(){function e(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=h.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=p.Strict}return e.prototype.startEntity=function(e){this.decodeMode=e,this.state=h.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},e.prototype.write=function(e,t){switch(this.state){case h.EntityStart:return e.charCodeAt(t)===l.NUM?(this.state=h.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=h.NamedEntity,this.stateNamedEntity(e,t));case h.NumericStart:return this.stateNumericStart(e,t);case h.NumericDecimal:return this.stateNumericDecimal(e,t);case h.NumericHex:return this.stateNumericHex(e,t);case h.NamedEntity:return this.stateNamedEntity(e,t)}},e.prototype.stateNumericStart=function(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===l.LOWER_X?(this.state=h.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=h.NumericDecimal,this.stateNumericDecimal(e,t))},e.prototype.addToNumericResult=function(e,t,r,n){if(t!==r){var i=r-t;this.result=this.result*Math.pow(n,i)+parseInt(e.substr(t,i),n),this.consumed+=i}},e.prototype.stateNumericHex=function(e,t){for(var r,n=t;t=l.UPPER_A&&r<=l.UPPER_F||r>=l.LOWER_A&&r<=l.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(i,3);t+=1}return this.addToNumericResult(e,n,t,16),-1},e.prototype.stateNumericDecimal=function(e,t){for(var r=t;t>14;t=l.UPPER_A&&e<=l.UPPER_Z||e>=l.LOWER_A&&e<=l.LOWER_Z||y(e)}(o)))?0:this.emitNotTerminatedNamedEntity();if(0!=(i=((n=r[this.treeIndex])&d.VALUE_LENGTH)>>14)){if(a===l.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==p.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}var o;return-1},e.prototype.emitNotTerminatedNamedEntity=function(){var e,t=this.result,r=(this.decodeTree[t]&d.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed},e.prototype.emitNamedEntityData=function(e,t,r){var n=this.decodeTree;return this.emitCodePoint(1===t?n[e]&~d.VALUE_LENGTH:n[e+1],r),3===t&&this.emitCodePoint(n[e+2],r),r},e.prototype.end=function(){var e;switch(this.state){case h.NamedEntity:return 0===this.result||this.decodeMode===p.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case h.NumericDecimal:return this.emitNumericEntity(0,2);case h.NumericHex:return this.emitNumericEntity(0,3);case h.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case h.EntityStart:return 0}},e}();function m(e){var t="",r=new g(e,(function(e){return t+=(0,u.fromCodePoint)(e)}));return function(e,n){for(var i=0,a=0;(a=e.indexOf("&",a))>=0;){t+=e.slice(i,a),r.startEntity(n);var o=r.write(e,a+1);if(o<0){i=a+r.end();break}i=a+o,a=0===o?i+1:i}var s=t+e.slice(i);return t="",s}}function b(e,t,r,n){var i=(t&d.BRANCH_LENGTH)>>7,a=t&d.JUMP_TABLE;if(0===i)return 0!==a&&n===a?r:-1;if(a){var o=n-a;return o<0||o>=i?-1:e[r+o]-1}for(var s=r,c=s+i-1;s<=c;){var u=s+c>>>1,l=e[u];if(ln))return e[u+i];c=u-1}}return-1}t.EntityDecoder=g,t.determineBranch=b;var v=m(s.default),_=m(c.default);t.decodeHTML=function(e,t){return void 0===t&&(t=p.Legacy),v(e,t)},t.decodeHTMLAttribute=function(e){return v(e,p.Attribute)},t.decodeHTMLStrict=function(e){return v(e,p.Strict)},t.decodeXML=function(e){return _(e,p.Strict)}},22809:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function i(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=n.get(e))&&void 0!==t?t:e}t.fromCodePoint=null!==(r=String.fromCodePoint)&&void 0!==r?r:function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+String.fromCharCode(e)},t.replaceCodePoint=i,t.default=function(e){return(0,t.fromCodePoint)(i(e))}},33231:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.encodeNonAsciiHTML=t.encodeHTML=void 0;var i=n(r(58635)),a=r(57078),o=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function s(e,t){for(var r,n="",o=0;null!==(r=e.exec(t));){var s=r.index;n+=t.substring(o,s);var c=t.charCodeAt(s),u=i.default.get(c);if("object"==typeof u){if(s+1{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.getCodePoint=t.xmlReplacer=void 0,t.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var r=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);function n(e){for(var n,i="",a=0;null!==(n=t.xmlReplacer.exec(e));){var o=n.index,s=e.charCodeAt(o),c=r.get(s);void 0!==c?(i+=e.substring(a,o)+c,a=o+1):(i+="".concat(e.substring(a,o),"&#x").concat((0,t.getCodePoint)(e,o).toString(16),";"),a=t.xmlReplacer.lastIndex+=Number(55296==(64512&s)))}return i+e.substr(a)}function i(e,t){return function(r){for(var n,i=0,a="";n=e.exec(r);)i!==n.index&&(a+=r.substring(i,n.index)),a+=t.get(n[0].charCodeAt(0)),i=n.index+1;return a+r.substring(i)}}t.getCodePoint=null!=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return 55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t)},t.encodeXML=n,t.escape=n,t.escapeUTF8=i(/[&<>'"]/g,r),t.escapeAttribute=i(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),t.escapeText=i(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))},57346:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function(e){return e.charCodeAt(0)})))},18622:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(e){return e.charCodeAt(0)})))},58635:(e,t)=>{"use strict";function r(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLAttribute=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.DecodingMode=t.EntityDecoder=t.encodeHTML5=t.encodeHTML4=t.encodeNonAsciiHTML=t.encodeHTML=t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.encode=t.decodeStrict=t.decode=t.EncodingMode=t.EntityLevel=void 0;var n,i,a=r(3379),o=r(33231),s=r(57078);function c(e,t){if(void 0===t&&(t=n.XML),("number"==typeof t?t:t.level)===n.HTML){var r="object"==typeof t?t.mode:void 0;return(0,a.decodeHTML)(e,r)}return(0,a.decodeXML)(e)}!function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"}(n=t.EntityLevel||(t.EntityLevel={})),function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"}(i=t.EncodingMode||(t.EncodingMode={})),t.decode=c,t.decodeStrict=function(e,t){var r;void 0===t&&(t=n.XML);var i="number"==typeof t?{level:t}:t;return null!==(r=i.mode)&&void 0!==r||(i.mode=a.DecodingMode.Strict),c(e,i)},t.encode=function(e,t){void 0===t&&(t=n.XML);var r="number"==typeof t?{level:t}:t;return r.mode===i.UTF8?(0,s.escapeUTF8)(e):r.mode===i.Attribute?(0,s.escapeAttribute)(e):r.mode===i.Text?(0,s.escapeText)(e):r.level===n.HTML?r.mode===i.ASCII?(0,o.encodeNonAsciiHTML)(e):(0,o.encodeHTML)(e):(0,s.encodeXML)(e)};var u=r(57078);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return u.encodeXML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return u.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return u.escapeUTF8}}),Object.defineProperty(t,"escapeAttribute",{enumerable:!0,get:function(){return u.escapeAttribute}}),Object.defineProperty(t,"escapeText",{enumerable:!0,get:function(){return u.escapeText}});var l=r(33231);Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return l.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return l.encodeNonAsciiHTML}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return l.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return l.encodeHTML}});var d=r(3379);Object.defineProperty(t,"EntityDecoder",{enumerable:!0,get:function(){return d.EntityDecoder}}),Object.defineProperty(t,"DecodingMode",{enumerable:!0,get:function(){return d.DecodingMode}}),Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return d.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return d.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return d.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTMLAttribute",{enumerable:!0,get:function(){return d.decodeHTMLAttribute}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return d.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return d.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return d.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return d.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return d.decodeXML}})},35033:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promisifyEventEmitter=void 0,t.promisifyEventEmitter=function(e,t){return new Promise(((r,n)=>{e.on("end",(()=>r(t))),e.on("error",n)}))}},50046:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,a),n(r)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}y(e,t,a,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&y(e,"error",t,{once:!0})}(e,i)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,a,o,u;if(s(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),void 0===o)o=a[t]=r,++e._eventsCount;else if("function"==typeof o?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var c=a[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var u=c.length,l=f(c,u);for(r=0;r=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},53933:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;for(i of t.entries())if(!e(i[1],r.get(i[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(t[i]!==r[i])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(a=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;0!=i--;){var o=a[i];if(!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r}},74190:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(92681),t)},92681:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SparqlEndpointFetcher=void 0,r(45766);const n=r(55403),i=r(21451),a=r(52666),o=r(76574),s=r(52267),c=r(72243),u=r(76605);class l{constructor(e){e=e||{},this.method=e.method||"POST",this.additionalUrlParams=e.additionalUrlParams||new URLSearchParams,this.defaultHeaders=e.defaultHeaders||new Headers,this.fetchCb=e.fetch,this.sparqlJsonParser=new i.SparqlJsonParser(e),this.sparqlXmlParser=new a.SparqlXmlParser(e),this.sparqlParsers={[l.CONTENTTYPE_SPARQL_JSON]:{parseBooleanStream:e=>this.sparqlJsonParser.parseJsonBooleanStream(e),parseResultsStream:e=>this.sparqlJsonParser.parseJsonResultsStream(e)},[l.CONTENTTYPE_SPARQL_XML]:{parseBooleanStream:e=>this.sparqlXmlParser.parseXmlBooleanStream(e),parseResultsStream:e=>this.sparqlXmlParser.parseXmlResultsStream(e)}},this.timeout=e.timeout}getQueryType(e){const t=new n.Parser({sparqlStar:!0}).parse(e);return"query"===t.type?"DESCRIBE"===t.queryType?"CONSTRUCT":t.queryType:"UNKNOWN"}getUpdateTypes(e){const t=new n.Parser({sparqlStar:!0}).parse(e);if("update"===t.type){const e={};for(const r of t.updates)"type"in r?e[r.type]=!0:e[r.updateType]=!0;return e}return"UNKNOWN"}async fetchBindings(e,t){const[r,n]=await this.fetchRawStream(e,t,l.CONTENTTYPE_SPARQL),i=this.sparqlParsers[r];if(!i)throw new Error("Unknown SPARQL results content type: "+r);return i.parseResultsStream(n)}async fetchAsk(e,t){const[r,n]=await this.fetchRawStream(e,t,l.CONTENTTYPE_SPARQL),i=this.sparqlParsers[r];if(!i)throw new Error("Unknown SPARQL results content type: "+r);return i.parseBooleanStream(n)}async fetchTriples(e,t){return(await this.fetchRawStream(e,t,l.CONTENTTYPE_TURTLE))[1].pipe(new c.StreamParser({format:l.CONTENTTYPE_TURTLE}))}async fetchUpdate(e,t){const n=new(globalThis.AbortController||await Promise.resolve().then((()=>r(67083)))),i={};this.defaultHeaders.forEach(((e,t)=>{i[t]=e}));const a={method:"POST",headers:Object.assign(Object.assign({},i),{"content-type":"application/sparql-update"}),body:t,signal:n.signal};await this.handleFetchCall(e,a,{ignoreBody:!0}),n.abort()}async fetchRawStream(e,t,r){let n="POST"===this.method?e:e+"?query="+encodeURIComponent(t);const i=new Headers(this.defaultHeaders);let a;return i.append("Accept",r),"POST"===this.method?(i.append("Content-Type","application/x-www-form-urlencoded"),a=new URLSearchParams,a.set("query",t),this.additionalUrlParams.forEach(((e,t)=>{a.set(t,e)})),i.append("Content-Length",a.toString().length.toString())):""!==this.additionalUrlParams.toString()&&(n+=`&${this.additionalUrlParams.toString()}`),this.handleFetchCall(n,{headers:i,method:this.method,body:a})}async handleFetchCall(e,t,r={}){let n;if(this.timeout){const e=new AbortController;t.signal=e.signal,n=setTimeout((()=>e.abort()),this.timeout)}const i=await(this.fetchCb||fetch)(e,t);let a;clearTimeout(n),r.ignoreBody||(a=u(i.body)?i.body:new s.ReadableWebToNodeStream(i.body));let c=i.headers.get("Content-Type")||"";if(c.indexOf(";")>0&&(c=c.substr(0,c.indexOf(";"))),!i.ok){const t=/^[^?]*/u.exec(e)[0];let r="empty response";throw a&&(r=await o(a)),new Error(`Invalid SPARQL endpoint response from ${t} (HTTP status ${i.status}):\n${r}`)}return[c,a]}}l.CONTENTTYPE_SPARQL_JSON="application/sparql-results+json",l.CONTENTTYPE_SPARQL_XML="application/sparql-results+xml",l.CONTENTTYPE_SPARQL=`${l.CONTENTTYPE_SPARQL_JSON};q=1.0,${l.CONTENTTYPE_SPARQL_XML};q=0.7`,l.CONTENTTYPE_TURTLE="text/turtle",t.SparqlEndpointFetcher=l},45766:function(){!function(e){!function(t){var r="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in e,o="ArrayBuffer"in e;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=f(t);return t.readAsArrayBuffer(e),r}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,r,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var T=[301,302,303,307,308];w.redirect=function(e,t){if(-1===T.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,r){return new Promise((function(n,a){var o=new v(e,r);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new w(i,r))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=h,e.Request=v,e.Response=w),t.Headers=h,t.Request=v,t.Response=w,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:this)},1427:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(51812),t),i(r(26339),t),i(r(17762),t),i(r(12856),t),i(r(45147),t)},26339:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Converter=void 0;const i=r(44330),a=r(51812),o=r(96414),s=r(17762),c=r(45147);class u{constructor(e){(e=e||{}).variableDelimiter=e.variableDelimiter||"_",e.expressionVariableCounter=e.expressionVariableCounter||0,this.util=new c.Util(e),this.initializeNodeHandlers(e)}static registerNodeHandlers(e,t){e.registerNodeHandler(new a.NodeHandlerDocument(e,t)),e.registerNodeHandler(new a.NodeHandlerDefinitionOperation(e,t)),e.registerNodeHandler(new a.NodeHandlerDefinitionFragment(e,t)),e.registerNodeHandler(new a.NodeHandlerSelectionFragmentSpread(e,t)),e.registerNodeHandler(new a.NodeHandlerSelectionInlineFragment(e,t)),e.registerNodeHandler(new a.NodeHandlerSelectionField(e,t))}static registerNodeValueHandlers(e,t){e.registerNodeValueHandler(new a.NodeValueHandlerVariable(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerInt(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerFloat(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerString(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerBoolean(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerNull(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerEnum(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerList(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerObject(e,t))}static registerDirectiveNodeHandlers(e,t){e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerInclude(e,t)),e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerOptional(e,t)),e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerPlural(e,t)),e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerSingle(e,t)),e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerSkip(e,t))}graphqlToSparqlAlgebra(e,t,r){return n(this,void 0,void 0,(function*(){return this.graphqlToSparqlAlgebraRawContext(e,yield this.util.contextParser.parse(t),r)}))}graphqlToSparqlAlgebraRawContext(e,t,r){r=r||{};const n="string"==typeof e?(0,i.parse)(e):e,a={context:t,fragmentDefinitions:this.indexFragments(n),graph:this.util.dataFactory.defaultGraph(),path:[],singularizeState:s.SingularizeState.PLURAL,singularizeVariables:r.singularizeVariables||{},subject:null,terminalVariables:[],variablesDict:r.variablesDict||{},variablesMetaDict:{}};return this.util.handleNode(n,a)}indexFragments(e){const t={},r=[];for(const n of e.definitions)"FragmentDefinition"===n.kind?t[n.name.value]=n:r.push(n);return e.definitions=r,t}initializeNodeHandlers(e){u.registerNodeHandlers(this.util,e),u.registerNodeValueHandlers(this.util,e),u.registerDirectiveNodeHandlers(this.util,e)}}t.Converter=u},17762:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SingularizeState=void 0,(r=t.SingularizeState||(t.SingularizeState={}))[r.SINGLE=0]="SINGLE",r[r.PLURAL=1]="PLURAL"},12856:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},45147:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(18050),i=r(27202),a=r(31578);t.Util=class{constructor(e){this.nodeHandlers={},this.nodeValueHandlers={},this.directiveNodeHandlers={},this.settings=e,this.dataFactory=e.dataFactory||new n.DataFactory,this.operationFactory=new a.Factory(this.dataFactory),this.contextParser=new i.ContextParser}registerNodeHandler(e){this.nodeHandlers[e.targetKind]=e}registerNodeValueHandler(e){this.nodeValueHandlers[e.targetKind]=e}registerDirectiveNodeHandler(e){this.directiveNodeHandlers[e.targetKind]=e}handleNode(e,t){const r=this.nodeHandlers[e.kind];if(!r)throw new Error(`Unsupported GraphQL node '${e.kind}'`);return r.handle(e,t)}handleNodeValue(e,t,r){const n=this.nodeValueHandlers[e.kind];if(!n)throw new Error(`Unsupported GraphQL value node '${e.kind}'`);return n.handle(e,t,r)}handleDirectiveNode(e,t){const r=this.directiveNodeHandlers[e.directive.name.value];return r?r.handle(e,t):null}joinOperations(e){if(1===e.length)return e[0];const t=[],r=[];for(const n of e)"bgp"===n.type?t.push(n):r.push(n);if(t.length===e.length)return this.joinOperationsAsBgp(t);if(t.length===e.length-1&&"leftjoin"===r[0].type&&"bgp"===r[0].input[0].type){const e=r[0];return t.push(e.input[0]),this.operationFactory.createLeftJoin(this.joinOperationsAsBgp(t),e.input[1])}return r.length===e.length?this.joinOperationsAsNestedJoin(r):this.joinOperationsAsNestedJoin([this.joinOperationsAsBgp(t),this.joinOperationsAsNestedJoin(r)])}joinOperationsAsBgp(e){return this.operationFactory.createBgp([].concat.apply([],e.map((e=>e.patterns))))}joinOperationsAsNestedJoin(e){return this.operationFactory.createJoin(e)}appendFieldToPath(e,t){return e.concat([t])}getFieldLabel(e){return(e.alias?e.alias:e.name).value}nameToVariable(e,t){return this.dataFactory.variable((t.path.length?t.path.join(this.settings.variableDelimiter)+this.settings.variableDelimiter:"")+e)}valueToNamedNode(e,t){const r=t.expandTerm(e,!0);if(this.settings.requireContext&&!r)throw new Error("No context entry was found for "+e);return this.dataFactory.namedNode(r||e)}getArgument(e,t){if(e)for(const r of e)if(r.name.value===t)return r}newTypePattern(e,t,r){return this.operationFactory.createPattern(e,this.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),this.valueToNamedNode(t.name.value,r.context),r.graph)}createQuadPattern(e,t,r,n,i){const a=this.valueToNamedNode(t.value,i);return i&&i.getContextRaw()[t.value]&&i.getContextRaw()[t.value]["@reverse"]?this.operationFactory.createPattern(r,a,e,n):this.operationFactory.createPattern(e,a,r,n)}createQuadPath(e,t,r,n,i,a){const o=this.valueToNamedNode(t.value,a);let s=this.operationFactory.createLink(o);for(const e of r.values){if("EnumValue"!==e.kind)throw new Error("Invalid value type for 'alt' argument, must be EnumValue, but got "+e.kind);s=this.operationFactory.createAlt([s,this.operationFactory.createLink(this.valueToNamedNode(e.value,a))])}return a&&a.getContextRaw()[t.value]&&a.getContextRaw()[t.value]["@reverse"]?this.operationFactory.createPath(n,s,e,i):this.operationFactory.createPath(e,s,n,i)}}},14009:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerAdapter=void 0,t.NodeHandlerAdapter=class{constructor(e,t,r){this.targetKind=e,this.util=t,this.settings=r}getNodeQuadContextSelectionSet(e,t,r){const n={};if(e)for(const t of e.selections)if("Field"===t.kind){const e=t;this.handleNodeQuadContextField(e,r,n,"id","subject"),this.handleNodeQuadContextField(e,r,n,"graph","graph")}return n}handleNodeQuadContextField(e,t,r,n,i){if(!r[i]&&e.name.value===n){if(!r[i]){const a=this.util.getArgument(e.arguments,"_");if(a){const o=this.util.handleNodeValue(a.value,e.name.value,t);if(1!==o.terms.length)throw new Error(`Only single values can be set as ${n}, but got ${o.terms.length} at ${e.name.value}`);r[i]=o.terms[0],o.auxiliaryPatterns&&(r.auxiliaryPatterns||(r.auxiliaryPatterns=[]),r.auxiliaryPatterns.concat(o.auxiliaryPatterns))}}if(!r[i]){const n=this.util.nameToVariable(this.util.getFieldLabel(e),t);t.terminalVariables.push(n),r[i]=n}}}getDirectiveOutputs(e,t,r){const n=[];if(e)for(const i of e){const e=this.util.handleDirectiveNode({directive:i,fieldLabel:t},r);if(e){if(e.ignore)return null;n.push(e)}}return n}handleDirectiveOutputs(e,t){for(const r of e){if(r.ignore)return this.util.operationFactory.createBgp([]);r.operationOverrider&&(t=r.operationOverrider(t))}return t}}},94058:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerDefinitionAdapter=void 0;const n=r(14009);class i extends n.NodeHandlerAdapter{constructor(e,t,r){super(e,t,r)}}t.NodeHandlerDefinitionAdapter=i},73045:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerDefinitionFragment=void 0;const n=r(94058);class i extends n.NodeHandlerDefinitionAdapter{constructor(e,t){super("FragmentDefinition",e,t)}handle(e,t){throw new Error("Illegal state: fragment definitions must be indexed and removed before processing")}}t.NodeHandlerDefinitionFragment=i},9540:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerDefinitionOperation=void 0;const n=r(94058);class i extends n.NodeHandlerDefinitionAdapter{constructor(e,t){super("OperationDefinition",e,t)}handle(e,t){if("query"!==e.operation)throw new Error("Unsupported definition operation: "+e.operation);if(e.variableDefinitions)for(const r of e.variableDefinitions){const e=r.variable.name.value;r.defaultValue&&(t.variablesDict[e]||(t.variablesDict[e]=r.defaultValue));let n=r.type;const i="NonNullType"===n.kind;i&&(n=n.type);const a="ListType"===n.kind;a&&(n=n.type);const o=n.name.value;t.variablesMetaDict[e]={mandatory:i,list:a,type:o}}const r=this.getDirectiveOutputs(e.directives,e.name?e.name.value:"",t);if(!r)return this.util.operationFactory.createBgp([]);const n=this.util.joinOperations(e.selectionSet.selections.map((e=>this.util.handleNode(e,t))));return this.handleDirectiveOutputs(r,n)}}t.NodeHandlerDefinitionOperation=i},9373:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerDocument=void 0;const n=r(31578),i=r(14009);class a extends i.NodeHandlerAdapter{constructor(e,t){super("Document",e,t)}handle(e,t){const r=e.definitions.map((e=>{const r=this.getNodeQuadContextDefinitionNode(e,Object.assign(Object.assign({},t),{ignoreUnknownVariables:!0})),n=Object.assign(Object.assign({},t),{graph:r.graph||t.graph,subject:r.subject||this.util.dataFactory.blankNode()});let i=this.util.handleNode(e,n);return r&&r.auxiliaryPatterns&&(i=this.util.joinOperations([i,this.util.operationFactory.createBgp(r.auxiliaryPatterns)])),i})),n=this.util.operationFactory.createProject(1===r.length?r[0]:this.util.operationFactory.createUnion(r),t.terminalVariables);return this.translateBlankNodesToVariables(n)}getNodeQuadContextDefinitionNode(e,t){if("OperationDefinition"===e.kind)return this.getNodeQuadContextSelectionSet(e.selectionSet,e.name?e.name.value:"",t);throw new Error(`Unsupported definition: ${e.kind}`)}translateBlankNodesToVariables(e){const t=this,r={},i=Array.from(e.variables).reduce(((e,t)=>(e[t.value]=!0,e)),{});return n.Util.mapOperation(e,{path:(e,t)=>({recurse:!1,result:t.createPath(a(e.subject),e.predicate,a(e.object),a(e.graph))}),pattern:(e,t)=>({recurse:!1,result:t.createPattern(a(e.subject),a(e.predicate),a(e.object),a(e.graph))})});function a(e){if("BlankNode"===e.termType){let a=r[e.value];return a||(a=n.Util.createUniqueVariable(e.value,i,t.util.dataFactory),i[a.value]=!0,r[e.value]=a),a}return e}}}t.NodeHandlerDocument=a},97285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerSelectionAdapter=void 0;const n=r(31578),i=r(17762),a=r(14009);class o extends a.NodeHandlerAdapter{constructor(e,t,r){super(e,t,r)}getNodeQuadContextFieldNode(e,t,r){return this.getNodeQuadContextSelectionSet(e.selectionSet,t,Object.assign(Object.assign({},r),{path:this.util.appendFieldToPath(r.path,t)}))}fieldToOperation(e,t,r,a){const o=r;let s,c=0;if(("id"===t.name.value||"graph"===t.name.value)&&(r=!1,t.arguments))for(const r of t.arguments)"_"===r.name.value&&this.util.handleNodeValue(r.value,t.name.value,e);const u=this.util.getFieldLabel(t);if(e.singularizeState===i.SingularizeState.SINGLE&&(e.singularizeVariables[this.util.nameToVariable(u,e).value]=!0),r){const t=this.handleMetaField(e,u,a);if(t)return t}const l=a?[this.util.operationFactory.createBgp(a)]:[],d=this.getNodeQuadContextFieldNode(t,u,e);let h=d.subject||this.util.nameToVariable(u,e),p=d.graph||e.graph;d.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(d.auxiliaryPatterns));let f=!0,y=null;if(r&&t.arguments&&t.arguments.length)for(const n of t.arguments){if("_"===n.name.value){const i=this.util.handleNodeValue(n.value,t.name.value,e);y=i.terms,l.push(this.util.operationFactory.createBgp(i.terms.map((r=>this.util.createQuadPattern(e.subject,t.name,r,e.graph,e.context))))),i.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(i.auxiliaryPatterns)),r=!1;break}if("graph"===n.name.value){const r=this.util.handleNodeValue(n.value,t.name.value,e);if(1!==r.terms.length)throw new Error(`Only single values can be set as graph, but got ${r.terms.length} at ${t.name.value}`);p=r.terms[0],e=Object.assign(Object.assign({},e),{graph:p}),r.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(r.auxiliaryPatterns));break}if("alt"===n.name.value){let r=n.value;"ListValue"!==r.kind&&(r={kind:"ListValue",values:[r]}),l.push(this.util.createQuadPath(e.subject,t.name,r,h,e.graph,e.context)),f=!1;break}}if(r&&f&&l.push(this.util.operationFactory.createBgp([this.util.createQuadPattern(e.subject,t.name,h,e.graph,e.context)])),t.arguments&&t.arguments.length)for(const r of t.arguments)if("_"===r.name.value||"graph"===r.name.value||"alt"===r.name.value);else if("first"===r.name.value){if("IntValue"!==r.value.kind)throw new Error("Invalid value type for 'first' argument: "+r.value.kind);s=parseInt(r.value.value,10)}else if("offset"===r.name.value){if("IntValue"!==r.value.kind)throw new Error("Invalid value type for 'offset' argument: "+r.value.kind);c=parseInt(r.value.value,10)}else{const t=this.util.handleNodeValue(r.value,r.name.value,e);l.push(this.util.operationFactory.createBgp(t.terms.map((t=>this.util.createQuadPattern(h,r.name,t,e.graph,e.context))))),t.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(t.auxiliaryPatterns))}const g=this.getDirectiveOutputs(t.directives,u,e);if(!g)return this.util.operationFactory.createBgp([]);let m=this.util.joinOperations(l);if(t.selectionSet&&t.selectionSet.selections.length){if(y){if(1!==y.length)throw new Error(`Only single values can be set as id, but got ${y.length} at ${t.name.value}`);h=y[0]}const r=Object.assign(Object.assign(Object.assign({},e),o?{path:this.util.appendFieldToPath(e.path,u)}:{}),{graph:p,subject:o?h:e.subject});let n=!1;const i=t.selectionSet.selections.filter((e=>"Field"!==e.kind||"totalCount"!==e.name.value||(n=!0,!1)));let a=this.util.joinOperations(l.concat(i.map((e=>this.util.handleNode(e,r)))));if(n){const t=this.util.dataFactory.variable("var"+this.settings.expressionVariableCounter++),r=this.util.dataFactory.variable(h.value+this.settings.variableDelimiter+"totalCount"),n=this.util.operationFactory.createBoundAggregate(t,"count",this.util.operationFactory.createTermExpression(h),!1),o=this.util.operationFactory.createProject(this.util.operationFactory.createExtend(this.util.operationFactory.createGroup(m,[],[n]),r,this.util.operationFactory.createTermExpression(t)),[r]);e.terminalVariables.push(r),a=i.length?this.util.operationFactory.createJoin([this.util.operationFactory.createProject(a,[]),o]):o}m=a}else r&&"Variable"===h.termType&&e.terminalVariables.push(h);return(c||s)&&(m=this.util.operationFactory.createSlice(this.util.operationFactory.createProject(m,n.Util.inScopeVariables(m)),c,s)),this.handleDirectiveOutputs(g,m)}handleMetaField(e,t,r){if("__typename"===t){const n=this.util.nameToVariable(t,e);return e.terminalVariables.push(n),this.util.operationFactory.createBgp([this.util.operationFactory.createPattern(e.subject,this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),this.util.nameToVariable(t,e),e.graph)].concat(r||[]))}}}t.NodeHandlerSelectionAdapter=o},15790:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerSelectionField=void 0;const n=r(97285);class i extends n.NodeHandlerSelectionAdapter{constructor(e,t){super("Field",e,t)}handle(e,t){return this.fieldToOperation(t,e,!0)}}t.NodeHandlerSelectionField=i},39555:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerSelectionFragmentSpread=void 0;const n=r(97285);class i extends n.NodeHandlerSelectionAdapter{constructor(e,t){super("FragmentSpread",e,t)}handle(e,t){const r=t.fragmentDefinitions[e.name.value];if(!r)throw new Error("Undefined fragment definition: "+e.name.value);const n={alias:void 0,arguments:void 0,directives:r.directives,kind:"Field",name:e.name,selectionSet:r.selectionSet},i=[this.util.newTypePattern(t.subject,r.typeCondition,t)];return this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),this.fieldToOperation(t,n,!1,i))}}t.NodeHandlerSelectionFragmentSpread=i},89509:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerSelectionInlineFragment=void 0;const n=r(97285);class i extends n.NodeHandlerSelectionAdapter{constructor(e,t){super("InlineFragment",e,t)}handle(e,t){const r={alias:void 0,arguments:void 0,directives:e.directives,kind:"Field",name:{kind:"Name",value:t.subject.value},selectionSet:e.selectionSet},n=e.typeCondition?[this.util.newTypePattern(t.subject,e.typeCondition,t)]:[];return this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),this.fieldToOperation(t,r,!1,n))}}t.NodeHandlerSelectionInlineFragment=i},62096:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerAdapter=void 0,t.DirectiveNodeHandlerAdapter=class{constructor(e,t,r){this.targetKind=e,this.util=t,this.settings=r}getDirectiveConditionalValue(e,t){const r=this.util.getArgument(e.arguments,"if");if(!r)throw new Error(`The directive ${e.name.value} is missing an if-argument.`);const n=this.util.handleNodeValue(r.value,r.name.value,t);if(1!==n.terms.length)throw new Error(`Can not apply the directive ${e.name.value} with a list.`);return n.terms[0]}isDirectiveScopeAll(e){const t=this.util.getArgument(e.arguments,"scope");return t&&"EnumValue"===t.value.kind&&"all"===t.value.value}}},5095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerInclude=void 0;const n=r(62096);class i extends n.DirectiveNodeHandlerAdapter{constructor(e,t){super("include",e,t)}handle(e,t){const r=this.getDirectiveConditionalValue(e.directive,t);return"Literal"===r.termType&&"false"===r.value?{ignore:!0}:{}}}t.DirectiveNodeHandlerInclude=i},61151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerOptional=void 0;const n=r(62096);class i extends n.DirectiveNodeHandlerAdapter{constructor(e,t){super("optional",e,t)}handle(e,t){return{operationOverrider:e=>this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),e)}}}t.DirectiveNodeHandlerOptional=i},11013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerPlural=void 0;const n=r(17762),i=r(62096);class a extends i.DirectiveNodeHandlerAdapter{constructor(e,t){super("plural",e,t)}handle(e,t){return this.isDirectiveScopeAll(e.directive)&&(t.singularizeState=n.SingularizeState.PLURAL),delete t.singularizeVariables[this.util.nameToVariable(e.fieldLabel,t).value],{}}}t.DirectiveNodeHandlerPlural=a},60479:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerSingle=void 0;const n=r(17762),i=r(62096);class a extends i.DirectiveNodeHandlerAdapter{constructor(e,t){super("single",e,t)}handle(e,t){return this.isDirectiveScopeAll(e.directive)&&(t.singularizeState=n.SingularizeState.SINGLE),t.singularizeVariables[this.util.nameToVariable(e.fieldLabel,t).value]=!0,{}}}t.DirectiveNodeHandlerSingle=a},88320:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerSkip=void 0;const n=r(62096);class i extends n.DirectiveNodeHandlerAdapter{constructor(e,t){super("skip",e,t)}handle(e,t){const r=this.getDirectiveConditionalValue(e.directive,t);return"Literal"===r.termType&&"true"===r.value?{ignore:!0}:{}}}t.DirectiveNodeHandlerSkip=i},96414:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(62096),t),i(r(5095),t),i(r(61151),t),i(r(11013),t),i(r(60479),t),i(r(88320),t)},51812:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(96414),t),i(r(31998),t),i(r(14009),t),i(r(94058),t),i(r(73045),t),i(r(9540),t),i(r(9373),t),i(r(97285),t),i(r(15790),t),i(r(39555),t),i(r(89509),t)},81652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerAdapter=void 0,t.NodeValueHandlerAdapter=class{constructor(e,t,r){this.targetKind=e,this.util=t,this.settings=r}}},95347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerBoolean=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("BooleanValue",e,t),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#boolean")}handle(e,t,r){return{terms:[this.util.dataFactory.literal(e.value?"true":"false",this.datatype)]}}}t.NodeValueHandlerBoolean=i},87822:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerEnum=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("EnumValue",e,t)}handle(e,t,r){return{terms:[this.util.valueToNamedNode(e.value,r.context)]}}}t.NodeValueHandlerEnum=i},5797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerFloat=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("FloatValue",e,t),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#float")}handle(e,t,r){return{terms:[this.util.dataFactory.literal(e.value,this.datatype)]}}}t.NodeValueHandlerFloat=i},18338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerInt=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("IntValue",e,t),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#integer")}handle(e,t,r){return{terms:[this.util.dataFactory.literal(e.value,this.datatype)]}}}t.NodeValueHandlerInt=i},70727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerList=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("ListValue",e,t),this.nodeFirst=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),this.nodeRest=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),this.nodeNil=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil")}handle(e,t,r){const n=[];let i=[];for(const a of e.values){const e=this.util.handleNodeValue(a,t,r);for(const t of e.terms)n.push(t);e.auxiliaryPatterns&&(i=i.concat(e.auxiliaryPatterns))}if(this.settings.arraysToRdfLists){const e=this.util.dataFactory.blankNode();let t=e,a=n.length;for(const e of n){i.push(this.util.operationFactory.createPattern(t,this.nodeFirst,e,r.graph));const n=0==--a?this.nodeNil:this.util.dataFactory.blankNode();i.push(this.util.operationFactory.createPattern(t,this.nodeRest,n,r.graph)),t=n}return{terms:[e],auxiliaryPatterns:i}}return{terms:n,auxiliaryPatterns:i}}}t.NodeValueHandlerList=i},13294:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerNull=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("NullValue",e,t),this.nil=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil")}handle(e,t,r){return{terms:[this.nil]}}}t.NodeValueHandlerNull=i},41756:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerObject=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("ObjectValue",e,t)}handle(e,t,r){const n=this.util.dataFactory.blankNode();let i=[];for(const a of e.fields){const e=this.util.handleNodeValue(a.value,t,r);for(const t of e.terms)i.push(this.util.createQuadPattern(n,a.name,t,r.graph,r.context));e.auxiliaryPatterns&&(i=i.concat(e.auxiliaryPatterns))}return{terms:[n],auxiliaryPatterns:i}}}t.NodeValueHandlerObject=i},26906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerString=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("StringValue",e,t)}handle(e,t,r){const n=r.context.getContextRaw()[t];let i,a;return n&&"string"!=typeof n&&(n["@language"]?i=n["@language"]:n["@type"]&&(a=this.util.dataFactory.namedNode(n["@type"]))),{terms:[this.util.dataFactory.literal(e.value,i||a)]}}}t.NodeValueHandlerString=i},47959:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerVariable=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("Variable",e,t)}handle(e,t,r){const n=e.name.value,i=r.variablesDict[n],a=r.variablesMetaDict[n];if(!i){if(r.ignoreUnknownVariables||a&&!a.mandatory){const e=this.util.dataFactory.variable(n);return r.terminalVariables.map((e=>e.value)).indexOf(n)<0&&r.terminalVariables.push(e),{terms:[e]}}throw new Error(`Undefined variable: ${n}`)}if("Variable"===i.kind)throw new Error(`Variable refers to another variable: ${n}`);if(a)if(a.list){if("ListValue"!==i.kind)throw new Error(`Expected a list, but got ${i.kind} for ${n}`);if(a.type){const e=i;for(const t of e.values)if(t.kind!==a.type)throw new Error(`Expected ${a.type}, but got ${t.kind} for ${n}`)}}else a.type;return this.util.handleNodeValue(i,t,r)}}t.NodeValueHandlerVariable=i},31998:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(81652),t),i(r(95347),t),i(r(87822),t),i(r(5797),t),i(r(18338),t),i(r(70727),t),i(r(13294),t),i(r(41756),t),i(r(26906),t),i(r(47959),t)},44897:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.printError=w,t.GraphQLError=void 0;var i,a=(i=r(78582))&&i.__esModule?i:{default:i},o=r(28189),s=r(4251),c=r(90354);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t){for(var r=0;r0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=o&&o.stack?(Object.defineProperty(p(b),"stack",{value:o.stack,writable:!0,configurable:!0}),h(b)):(Error.captureStackTrace?Error.captureStackTrace(p(b),f):Object.defineProperty(p(b),"stack",{value:Error().stack,writable:!0,configurable:!0}),b)}return n=f,(i=[{key:"toString",value:function(){return w(this)}},{key:o.SYMBOL_TO_STRING_TAG,get:function(){return"Object"}}])&&d(n.prototype,i),f}(f(Error));function _(e){return void 0===e||0===e.length?void 0:e}function w(e){var t=e.message;if(e.nodes)for(var r=0,n=e.nodes;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.syntaxError=function(e,t,r){return new n.GraphQLError("Syntax Error: ".concat(r),void 0,e,[t])};var n=r(44897)},44077:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.prototype.toJSON;"function"==typeof t||(0,n.default)(0),e.prototype.inspect=t,i.default&&(e.prototype[i.default]=t)};var n=a(r(81880)),i=a(r(37020));function a(e){return e&&e.__esModule?e:{default:e}}},65269:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(t)}},23216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return c(e,[])};var n,i=(n=r(37020))&&n.__esModule?n:{default:n};function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var o=10,s=2;function c(e,t){switch(a(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var r=[].concat(t,[e]),n=function(e){var t=e[String(i.default)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==n){var a=n.call(e);if(a!==e)return"string"==typeof a?a:c(a,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>s)return"[Array]";for(var r=Math.min(o,e.length),n=e.length-r,i=[],a=0;a1&&i.push("... ".concat(n," more items")),"["+i.join(", ")+"]"}(e,r);return function(e,t){var r=Object.keys(e);return 0===r.length?"{}":t.length>s?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var r=e.constructor.name;if("string"==typeof r&&""!==r)return r}return t}(e)+"]":"{ "+r.map((function(r){return r+": "+c(e[r],t)})).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}},83588:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,(n=r(23216))&&n.__esModule;t.default=function(e,t){return e instanceof t}},81880:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}},78582:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"object"==r(e)&&null!==e}},37020:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=r},93378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNode=function(e){return null!=e&&"string"==typeof e.kind},t.Token=t.Location=void 0;var n,i=(n=r(44077))&&n.__esModule?n:{default:n},a=function(){function e(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();t.Location=a,(0,i.default)(a);var o=function(){function e(e,t,r,n,i,a,o){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=o,this.prev=a,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();t.Token=o,(0,i.default)(o)},4758:(e,t)=>{"use strict";function r(e){for(var t=0;to&&r(t[s-1]);)--s;return t.slice(o,s).join("\n")},t.getBlockStringIndentation=n,t.printBlockString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],a='"'===e[e.length-1],o="\\"===e[e.length-1],s=!n||a||o||r,c="";return!s||n&&i||(c+="\n"+t),c+=t?e.replace(/\n/g,"\n"+t):e,s&&(c+="\n"),'"""'+c.replace(/"""/g,'\\"""')+'"""'}},23684:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveLocation=void 0;var r=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});t.DirectiveLocation=r},44330:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Source",{enumerable:!0,get:function(){return n.Source}}),Object.defineProperty(t,"getLocation",{enumerable:!0,get:function(){return i.getLocation}}),Object.defineProperty(t,"printLocation",{enumerable:!0,get:function(){return a.printLocation}}),Object.defineProperty(t,"printSourceLocation",{enumerable:!0,get:function(){return a.printSourceLocation}}),Object.defineProperty(t,"Kind",{enumerable:!0,get:function(){return o.Kind}}),Object.defineProperty(t,"TokenKind",{enumerable:!0,get:function(){return s.TokenKind}}),Object.defineProperty(t,"Lexer",{enumerable:!0,get:function(){return c.Lexer}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return u.parse}}),Object.defineProperty(t,"parseValue",{enumerable:!0,get:function(){return u.parseValue}}),Object.defineProperty(t,"parseType",{enumerable:!0,get:function(){return u.parseType}}),Object.defineProperty(t,"print",{enumerable:!0,get:function(){return l.print}}),Object.defineProperty(t,"visit",{enumerable:!0,get:function(){return d.visit}}),Object.defineProperty(t,"visitInParallel",{enumerable:!0,get:function(){return d.visitInParallel}}),Object.defineProperty(t,"getVisitFn",{enumerable:!0,get:function(){return d.getVisitFn}}),Object.defineProperty(t,"BREAK",{enumerable:!0,get:function(){return d.BREAK}}),Object.defineProperty(t,"Location",{enumerable:!0,get:function(){return h.Location}}),Object.defineProperty(t,"Token",{enumerable:!0,get:function(){return h.Token}}),Object.defineProperty(t,"isDefinitionNode",{enumerable:!0,get:function(){return p.isDefinitionNode}}),Object.defineProperty(t,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return p.isExecutableDefinitionNode}}),Object.defineProperty(t,"isSelectionNode",{enumerable:!0,get:function(){return p.isSelectionNode}}),Object.defineProperty(t,"isValueNode",{enumerable:!0,get:function(){return p.isValueNode}}),Object.defineProperty(t,"isTypeNode",{enumerable:!0,get:function(){return p.isTypeNode}}),Object.defineProperty(t,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return p.isTypeSystemDefinitionNode}}),Object.defineProperty(t,"isTypeDefinitionNode",{enumerable:!0,get:function(){return p.isTypeDefinitionNode}}),Object.defineProperty(t,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return p.isTypeSystemExtensionNode}}),Object.defineProperty(t,"isTypeExtensionNode",{enumerable:!0,get:function(){return p.isTypeExtensionNode}}),Object.defineProperty(t,"DirectiveLocation",{enumerable:!0,get:function(){return f.DirectiveLocation}});var n=r(76241),i=r(4251),a=r(90354),o=r(12057),s=r(58053),c=r(4524),u=r(42275),l=r(43230),d=r(48048),h=r(93378),p=r(49674),f=r(23684)},12057:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Kind=void 0;var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});t.Kind=r},4524:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPunctuatorTokenKind=function(e){return e===a.TokenKind.BANG||e===a.TokenKind.DOLLAR||e===a.TokenKind.AMP||e===a.TokenKind.PAREN_L||e===a.TokenKind.PAREN_R||e===a.TokenKind.SPREAD||e===a.TokenKind.COLON||e===a.TokenKind.EQUALS||e===a.TokenKind.AT||e===a.TokenKind.BRACKET_L||e===a.TokenKind.BRACKET_R||e===a.TokenKind.BRACE_L||e===a.TokenKind.PIPE||e===a.TokenKind.BRACE_R},t.Lexer=void 0;var n=r(40629),i=r(93378),a=r(58053),o=r(4758),s=function(){function e(e){var t=new i.Token(a.TokenKind.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==a.TokenKind.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=u(this,e)}while(e.kind===a.TokenKind.COMMENT);return e},e}();function c(e){return isNaN(e)?a.TokenKind.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function u(e,t){for(var r=e.source,o=r.body,s=o.length,c=t.end;c31||9===s));return new i.Token(a.TokenKind.COMMENT,t,u,r,n,o,c.slice(t+1,u))}function h(e,t,r,o,s,u){var l=e.body,d=r,h=t,f=!1;if(45===d&&(d=l.charCodeAt(++h)),48===d){if((d=l.charCodeAt(++h))>=48&&d<=57)throw(0,n.syntaxError)(e,h,"Invalid number, unexpected digit after 0: ".concat(c(d),"."))}else h=p(e,h,d),d=l.charCodeAt(h);if(46===d&&(f=!0,d=l.charCodeAt(++h),h=p(e,h,d),d=l.charCodeAt(h)),69!==d&&101!==d||(f=!0,43!==(d=l.charCodeAt(++h))&&45!==d||(d=l.charCodeAt(++h)),h=p(e,h,d),d=l.charCodeAt(h)),46===d||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(d))throw(0,n.syntaxError)(e,h,"Invalid number, expected digit but got: ".concat(c(d),"."));return new i.Token(f?a.TokenKind.FLOAT:a.TokenKind.INT,t,h,o,s,u,l.slice(t,h))}function p(e,t,r){var i=e.body,a=t,o=r;if(o>=48&&o<=57){do{o=i.charCodeAt(++a)}while(o>=48&&o<=57);return a}throw(0,n.syntaxError)(e,a,"Invalid number, expected digit but got: ".concat(c(o),"."))}function f(e,t,r,o,s){for(var u,l,d,h,p=e.body,f=t+1,y=f,m=0,b="";f=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function m(e,t,r,n,o){for(var s=e.body,c=s.length,u=t+1,l=0;u!==c&&!isNaN(l=s.charCodeAt(u))&&(95===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++u;return new i.Token(a.TokenKind.NAME,t,u,r,n,o,s.slice(t,u))}t.Lexer=s},4251:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLocation=function(e,t){for(var r,n=/\r\n|[\n\r]/g,i=1,a=t+1;(r=n.exec(e.body))&&r.index{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=function(e,t){return new l(e,t).parseDocument()},t.parseValue=function(e,t){var r=new l(e,t);r.expectToken(o.TokenKind.SOF);var n=r.parseValueLiteral(!1);return r.expectToken(o.TokenKind.EOF),n},t.parseType=function(e,t){var r=new l(e,t);r.expectToken(o.TokenKind.SOF);var n=r.parseTypeReference();return r.expectToken(o.TokenKind.EOF),n},t.Parser=void 0;var n=r(40629),i=r(12057),a=r(93378),o=r(58053),s=r(76241),c=r(23684),u=r(4524),l=function(){function e(e,t){var r=(0,s.isSource)(e)?e:new s.Source(e);this._lexer=new u.Lexer(r),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(o.TokenKind.NAME);return{kind:i.Kind.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:i.Kind.DOCUMENT,definitions:this.many(o.TokenKind.SOF,this.parseDefinition,o.TokenKind.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(o.TokenKind.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(o.TokenKind.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(o.TokenKind.BRACE_L))return{kind:i.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,r=this.parseOperationType();return this.peek(o.TokenKind.NAME)&&(t=this.parseName()),{kind:i.Kind.OPERATION_DEFINITION,operation:r,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(o.TokenKind.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(o.TokenKind.PAREN_L,this.parseVariableDefinition,o.TokenKind.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:i.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(o.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.TokenKind.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(o.TokenKind.DOLLAR),{kind:i.Kind.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:i.Kind.SELECTION_SET,selections:this.many(o.TokenKind.BRACE_L,this.parseSelection,o.TokenKind.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(o.TokenKind.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(o.TokenKind.COLON)?(e=n,t=this.parseName()):t=n,{kind:i.Kind.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.TokenKind.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.TokenKind.PAREN_L,t,o.TokenKind.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(o.TokenKind.COLON),{kind:i.Kind.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:i.Kind.ARGUMENT,name:this.parseName(),value:(this.expectToken(o.TokenKind.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(o.TokenKind.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(o.TokenKind.NAME)?{kind:i.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:i.Kind.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:i.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:i.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case o.TokenKind.BRACKET_L:return this.parseList(e);case o.TokenKind.BRACE_L:return this.parseObject(e);case o.TokenKind.INT:return this._lexer.advance(),{kind:i.Kind.INT,value:t.value,loc:this.loc(t)};case o.TokenKind.FLOAT:return this._lexer.advance(),{kind:i.Kind.FLOAT,value:t.value,loc:this.loc(t)};case o.TokenKind.STRING:case o.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case o.TokenKind.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:i.Kind.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:i.Kind.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:i.Kind.NULL,loc:this.loc(t)};default:return{kind:i.Kind.ENUM,value:t.value,loc:this.loc(t)}}case o.TokenKind.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:i.Kind.STRING,value:e.value,block:e.kind===o.TokenKind.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,r=this._lexer.token;return{kind:i.Kind.LIST,values:this.any(o.TokenKind.BRACKET_L,(function(){return t.parseValueLiteral(e)}),o.TokenKind.BRACKET_R),loc:this.loc(r)}},t.parseObject=function(e){var t=this,r=this._lexer.token;return{kind:i.Kind.OBJECT,fields:this.any(o.TokenKind.BRACE_L,(function(){return t.parseObjectField(e)}),o.TokenKind.BRACE_R),loc:this.loc(r)}},t.parseObjectField=function(e){var t=this._lexer.token,r=this.parseName();return this.expectToken(o.TokenKind.COLON),{kind:i.Kind.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(o.TokenKind.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(o.TokenKind.AT),{kind:i.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(o.TokenKind.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(o.TokenKind.BRACKET_R),e={kind:i.Kind.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(o.TokenKind.BANG)?{kind:i.Kind.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:i.Kind.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===o.TokenKind.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(o.TokenKind.STRING)||this.peek(o.TokenKind.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var r=this.parseDirectives(!0),n=this.many(o.TokenKind.BRACE_L,this.parseOperationTypeDefinition,o.TokenKind.BRACE_R);return{kind:i.Kind.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(o.TokenKind.COLON);var r=this.parseNamedType();return{kind:i.Kind.OPERATION_TYPE_DEFINITION,operation:t,type:r,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var r=this.parseName(),n=this.parseDirectives(!0);return{kind:i.Kind.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var r=this.parseName(),n=this.parseImplementsInterfaces(),a=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:i.Kind.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:a,fields:o,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(o.TokenKind.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(o.TokenKind.AMP)||this.peek(o.TokenKind.NAME));return t}return this.delimitedMany(o.TokenKind.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(o.TokenKind.BRACE_L)&&this._lexer.lookahead().kind===o.TokenKind.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(o.TokenKind.BRACE_L,this.parseFieldDefinition,o.TokenKind.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(o.TokenKind.COLON);var a=this.parseTypeReference(),s=this.parseDirectives(!0);return{kind:i.Kind.FIELD_DEFINITION,description:t,name:r,arguments:n,type:a,directives:s,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(o.TokenKind.PAREN_L,this.parseInputValueDef,o.TokenKind.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(o.TokenKind.COLON);var n,a=this.parseTypeReference();this.expectOptionalToken(o.TokenKind.EQUALS)&&(n=this.parseValueLiteral(!0));var s=this.parseDirectives(!0);return{kind:i.Kind.INPUT_VALUE_DEFINITION,description:t,name:r,type:a,defaultValue:n,directives:s,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var r=this.parseName(),n=this.parseImplementsInterfaces(),a=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:i.Kind.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:a,fields:o,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var r=this.parseName(),n=this.parseDirectives(!0),a=this.parseUnionMemberTypes();return{kind:i.Kind.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:a,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(o.TokenKind.EQUALS)?this.delimitedMany(o.TokenKind.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var r=this.parseName(),n=this.parseDirectives(!0),a=this.parseEnumValuesDefinition();return{kind:i.Kind.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:a,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(o.TokenKind.BRACE_L,this.parseEnumValueDefinition,o.TokenKind.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseDirectives(!0);return{kind:i.Kind.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var r=this.parseName(),n=this.parseDirectives(!0),a=this.parseInputFieldsDefinition();return{kind:i.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:a,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(o.TokenKind.BRACE_L,this.parseInputValueDef,o.TokenKind.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===o.TokenKind.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),r=this.optionalMany(o.TokenKind.BRACE_L,this.parseOperationTypeDefinition,o.TokenKind.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return{kind:i.Kind.SCHEMA_EXTENSION,directives:t,operationTypes:r,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),r=this.parseDirectives(!0);if(0===r.length)throw this.unexpected();return{kind:i.Kind.SCALAR_TYPE_EXTENSION,name:t,directives:r,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),a=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===a.length)throw this.unexpected();return{kind:i.Kind.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:a,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),a=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===a.length)throw this.unexpected();return{kind:i.Kind.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:a,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:i.Kind.UNION_TYPE_EXTENSION,name:t,directives:r,types:n,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:i.Kind.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:i.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.TokenKind.AT);var r=this.parseName(),n=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var s=this.parseDirectiveLocations();return{kind:i.Kind.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:a,locations:s,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(o.TokenKind.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==c.DirectiveLocation[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new a.Location(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw(0,n.syntaxError)(this._lexer.source,t.start,"Expected ".concat(h(e),", found ").concat(d(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==o.TokenKind.NAME||t.value!==e)throw(0,n.syntaxError)(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(d(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===o.TokenKind.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return(0,n.syntaxError)(this._lexer.source,t.start,"Unexpected ".concat(d(t),"."))},t.any=function(e,t,r){this.expectToken(e);for(var n=[];!this.expectOptionalToken(r);)n.push(t.call(this));return n},t.optionalMany=function(e,t,r){if(this.expectOptionalToken(e)){var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}return[]},t.many=function(e,t,r){this.expectToken(e);var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r},e}();function d(e){var t=e.value;return h(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function h(e){return(0,u.isPunctuatorTokenKind)(e)?'"'.concat(e,'"'):e}t.Parser=l},49674:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDefinitionNode=function(e){return i(e)||a(e)||s(e)},t.isExecutableDefinitionNode=i,t.isSelectionNode=function(e){return e.kind===n.Kind.FIELD||e.kind===n.Kind.FRAGMENT_SPREAD||e.kind===n.Kind.INLINE_FRAGMENT},t.isValueNode=function(e){return e.kind===n.Kind.VARIABLE||e.kind===n.Kind.INT||e.kind===n.Kind.FLOAT||e.kind===n.Kind.STRING||e.kind===n.Kind.BOOLEAN||e.kind===n.Kind.NULL||e.kind===n.Kind.ENUM||e.kind===n.Kind.LIST||e.kind===n.Kind.OBJECT},t.isTypeNode=function(e){return e.kind===n.Kind.NAMED_TYPE||e.kind===n.Kind.LIST_TYPE||e.kind===n.Kind.NON_NULL_TYPE},t.isTypeSystemDefinitionNode=a,t.isTypeDefinitionNode=o,t.isTypeSystemExtensionNode=s,t.isTypeExtensionNode=c;var n=r(12057);function i(e){return e.kind===n.Kind.OPERATION_DEFINITION||e.kind===n.Kind.FRAGMENT_DEFINITION}function a(e){return e.kind===n.Kind.SCHEMA_DEFINITION||o(e)||e.kind===n.Kind.DIRECTIVE_DEFINITION}function o(e){return e.kind===n.Kind.SCALAR_TYPE_DEFINITION||e.kind===n.Kind.OBJECT_TYPE_DEFINITION||e.kind===n.Kind.INTERFACE_TYPE_DEFINITION||e.kind===n.Kind.UNION_TYPE_DEFINITION||e.kind===n.Kind.ENUM_TYPE_DEFINITION||e.kind===n.Kind.INPUT_OBJECT_TYPE_DEFINITION}function s(e){return e.kind===n.Kind.SCHEMA_EXTENSION||c(e)}function c(e){return e.kind===n.Kind.SCALAR_TYPE_EXTENSION||e.kind===n.Kind.OBJECT_TYPE_EXTENSION||e.kind===n.Kind.INTERFACE_TYPE_EXTENSION||e.kind===n.Kind.UNION_TYPE_EXTENSION||e.kind===n.Kind.ENUM_TYPE_EXTENSION||e.kind===n.Kind.INPUT_OBJECT_TYPE_EXTENSION}},90354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.printLocation=function(e){return i(e.source,(0,n.getLocation)(e.source,e.start))},t.printSourceLocation=i;var n=r(4251);function i(e,t){var r=e.locationOffset.column-1,n=o(r)+e.body,i=t.line-1,s=e.locationOffset.line-1,c=t.line+s,u=1===t.line?r:0,l=t.column+u,d="".concat(e.name,":").concat(c,":").concat(l,"\n"),h=n.split(/\r\n|[\n\r]/g),p=h[i];if(p.length>120){for(var f=Math.floor(l/80),y=l%80,g=[],m=0;m{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.print=function(e){return(0,n.visit)(e,{leave:a})};var n=r(48048),i=r(4758),a={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return s(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,r=e.name,n=u("(",s(e.variableDefinitions,", "),")"),i=s(e.directives," "),a=e.selectionSet;return r||i||n||"query"!==t?s([t,s([r,n]),i,a]," "):a},VariableDefinition:function(e){var t=e.variable,r=e.type,n=e.defaultValue,i=e.directives;return t+": "+r+u(" = ",n)+u(" ",s(i," "))},SelectionSet:function(e){return c(e.selections)},Field:function(e){var t=e.alias,r=e.name,n=e.arguments,i=e.directives,a=e.selectionSet,o=u("",t,": ")+r,c=o+u("(",s(n,", "),")");return c.length>80&&(c=o+u("(\n",l(s(n,"\n")),"\n)")),s([c,s(i," "),a]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+u(" ",s(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,r=e.directives,n=e.selectionSet;return s(["...",u("on ",t),s(r," "),n]," ")},FragmentDefinition:function(e){var t=e.name,r=e.typeCondition,n=e.variableDefinitions,i=e.directives,a=e.selectionSet;return"fragment ".concat(t).concat(u("(",s(n,", "),")")," ")+"on ".concat(r," ").concat(u("",s(i," ")," "))+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var r=e.value;return e.block?(0,i.printBlockString)(r,"description"===t?"":" "):JSON.stringify(r)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+s(e.values,", ")+"]"},ObjectValue:function(e){return"{"+s(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+u("(",s(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:o((function(e){var t=e.directives,r=e.operationTypes;return s(["schema",s(t," "),c(r)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:o((function(e){return s(["scalar",e.name,s(e.directives," ")]," ")})),ObjectTypeDefinition:o((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["type",t,u("implements ",s(r," & ")),s(n," "),c(i)]," ")})),FieldDefinition:o((function(e){var t=e.name,r=e.arguments,n=e.type,i=e.directives;return t+(h(r)?u("(\n",l(s(r,"\n")),"\n)"):u("(",s(r,", "),")"))+": "+n+u(" ",s(i," "))})),InputValueDefinition:o((function(e){var t=e.name,r=e.type,n=e.defaultValue,i=e.directives;return s([t+": "+r,u("= ",n),s(i," ")]," ")})),InterfaceTypeDefinition:o((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["interface",t,u("implements ",s(r," & ")),s(n," "),c(i)]," ")})),UnionTypeDefinition:o((function(e){var t=e.name,r=e.directives,n=e.types;return s(["union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")})),EnumTypeDefinition:o((function(e){var t=e.name,r=e.directives,n=e.values;return s(["enum",t,s(r," "),c(n)]," ")})),EnumValueDefinition:o((function(e){return s([e.name,s(e.directives," ")]," ")})),InputObjectTypeDefinition:o((function(e){var t=e.name,r=e.directives,n=e.fields;return s(["input",t,s(r," "),c(n)]," ")})),DirectiveDefinition:o((function(e){var t=e.name,r=e.arguments,n=e.repeatable,i=e.locations;return"directive @"+t+(h(r)?u("(\n",l(s(r,"\n")),"\n)"):u("(",s(r,", "),")"))+(n?" repeatable":"")+" on "+s(i," | ")})),SchemaExtension:function(e){var t=e.directives,r=e.operationTypes;return s(["extend schema",s(t," "),c(r)]," ")},ScalarTypeExtension:function(e){return s(["extend scalar",e.name,s(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend type",t,u("implements ",s(r," & ")),s(n," "),c(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend interface",t,u("implements ",s(r," & ")),s(n," "),c(i)]," ")},UnionTypeExtension:function(e){var t=e.name,r=e.directives,n=e.types;return s(["extend union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,r=e.directives,n=e.values;return s(["extend enum",t,s(r," "),c(n)]," ")},InputObjectTypeExtension:function(e){var t=e.name,r=e.directives,n=e.fields;return s(["extend input",t,s(r," "),c(n)]," ")}};function o(e){return function(t){return s([t.description,e(t)],"\n")}}function s(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(r))&&void 0!==t?t:""}function c(e){return u("{\n",l(s(e,"\n")),"\n}")}function u(e,t){return null!=t&&""!==t?e+t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:""):""}function l(e){return u(" ",e.replace(/\n/g,"\n "))}function d(e){return-1!==e.indexOf("\n")}function h(e){return null!=e&&e.some(d)}},76241:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSource=function(e){return(0,o.default)(e,u)},t.Source=void 0;var n=r(28189),i=s(r(23216)),a=s(r(65269)),o=s(r(83588));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||(0,a.default)(0,"Body must be a string. Received: ".concat((0,i.default)(e),".")),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||(0,a.default)(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,a.default)(0,"column in locationOffset is 1-indexed and must be positive.")}var t,r;return t=e,(r=[{key:n.SYMBOL_TO_STRING_TAG,get:function(){return"Source"}}])&&c(t.prototype,r),e}();t.Source=u},58053:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenKind=void 0;var r=Object.freeze({SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});t.TokenKind=r},48048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,n=void 0,u=Array.isArray(e),l=[e],d=-1,h=[],p=void 0,f=void 0,y=void 0,g=[],m=[],b=e;do{var v=++d===l.length,_=v&&0!==h.length;if(v){if(f=0===m.length?void 0:g[g.length-1],p=y,y=m.pop(),_){if(u)p=p.slice();else{for(var w={},T=0,S=Object.keys(p);T{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SYMBOL_TO_STRING_TAG=t.SYMBOL_ASYNC_ITERATOR=t.SYMBOL_ITERATOR=void 0;var r="function"==typeof Symbol&&null!=Symbol.iterator?Symbol.iterator:"@@iterator";t.SYMBOL_ITERATOR=r;var n="function"==typeof Symbol&&null!=Symbol.asyncIterator?Symbol.asyncIterator:"@@asyncIterator";t.SYMBOL_ASYNC_ITERATOR=n;var i="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";t.SYMBOL_TO_STRING_TAG=i},99499:(e,t,r)=>{var n=t;n.utils=r(70461),n.common=r(32191),n.sha=r(75746),n.ripemd=r(74169),n.hmac=r(11825),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},32191:(e,t,r)=>{"use strict";var n=r(70461),i=r(7784);function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=a,a.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a{"use strict";var n=r(70461),i=r(7784);function a(e,t,r){if(!(this instanceof a))return new a(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=a,a.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var n=r(70461),i=r(32191),a=n.rotl32,o=n.sum32,s=n.sum32_3,c=n.sum32_4,u=i.BlockHash;function l(){if(!(this instanceof l))return new l;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function h(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function p(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(l,u),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],u=this.h[3],l=this.h[4],b=r,v=n,_=i,w=u,T=l,S=0;S<80;S++){var O=o(a(c(r,d(S,n,i,u),e[f[S]+t],h(S)),g[S]),l);r=l,l=u,u=a(i,10),i=n,n=O,O=o(a(c(b,d(79-S,v,_,w),e[y[S]+t],p(S)),m[S]),T),b=T,T=w,w=a(_,10),_=v,v=O}O=s(this.h[1],i,w),this.h[1]=s(this.h[2],u,T),this.h[2]=s(this.h[3],l,b),this.h[3]=s(this.h[4],r,v),this.h[4]=s(this.h[0],n,_),this.h[0]=O},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],y=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},75746:(e,t,r)=>{"use strict";t.sha1=r(12986),t.sha224=r(75393),t.sha256=r(50536),t.sha384=r(52348),t.sha512=r(92157)},12986:(e,t,r)=>{"use strict";var n=r(70461),i=r(32191),a=r(600),o=n.rotl32,s=n.sum32,c=n.sum32_5,u=a.ft_1,l=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(h,l),e.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(70461),i=r(50536);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(a,i),e.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},50536:(e,t,r)=>{"use strict";var n=r(70461),i=r(32191),a=r(600),o=r(7784),s=n.sum32,c=n.sum32_4,u=n.sum32_5,l=a.ch32,d=a.maj32,h=a.s0_256,p=a.s1_256,f=a.g0_256,y=a.g1_256,g=i.BlockHash,m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}n.inherits(b,g),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(70461),i=r(92157);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(a,i),e.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},92157:(e,t,r)=>{"use strict";var n=r(70461),i=r(32191),a=r(7784),o=n.rotr64_hi,s=n.rotr64_lo,c=n.shr64_hi,u=n.shr64_lo,l=n.sum64,d=n.sum64_hi,h=n.sum64_lo,p=n.sum64_4_hi,f=n.sum64_4_lo,y=n.sum64_5_hi,g=n.sum64_5_lo,m=i.BlockHash,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function _(e,t,r,n,i){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function w(e,t,r,n,i,a){var o=t&n^~t&a;return o<0&&(o+=4294967296),o}function T(e,t,r,n,i){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function S(e,t,r,n,i,a){var o=t&n^t&a^n&a;return o<0&&(o+=4294967296),o}function O(e,t){var r=o(e,t,28)^o(t,e,2)^o(t,e,7);return r<0&&(r+=4294967296),r}function E(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function A(e,t){var r=o(e,t,1)^o(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function R(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,19)^s(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,m),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(70461).rotr32;function i(e,t,r){return e&t^~e&r}function a(e,t,r){return e&t^e&r^t&r}function o(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?o(t,r,n):2===e?a(t,r,n):void 0},t.ch32=i,t.maj32=a,t.p32=o,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},70461:(e,t,r)=>{"use strict";var n=r(7784),i=r(35615);function a(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&o|128):a(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=63&o|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=63&o|128)}else for(i=0;i>>0}return o},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a>>0,e[t+1]=a},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,a,o,s){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,a,o,s,c,u){var l=0,d=t;return l+=(d=d+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,a,o,s,c,u){return t+n+a+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},14291:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var o=a(r(36439)),s=r(3379),c=new Set(["input","option","optgroup","select","button","datalist","textarea"]),u=new Set(["p"]),l=new Set(["thead","tbody"]),d=new Set(["dd","dt"]),h=new Set(["rt","rp"]),p=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",u],["h1",u],["h2",u],["h3",u],["h4",u],["h5",u],["h6",u],["select",c],["input",c],["output",c],["button",c],["datalist",c],["textarea",c],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",d],["dt",d],["address",u],["article",u],["aside",u],["blockquote",u],["details",u],["div",u],["dl",u],["fieldset",u],["figcaption",u],["figure",u],["footer",u],["form",u],["header",u],["hr",u],["main",u],["nav",u],["ol",u],["pre",u],["section",u],["table",u],["ul",u],["rt",h],["rp",h],["tbody",l],["tfoot",l]]),f=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),y=new Set(["math","svg"]),g=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),m=/\s|\//,b=function(){function e(e,t){var r,n,i,a,s;void 0===t&&(t={}),this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(r=t.lowerCaseTags)&&void 0!==r?r:!t.xmlMode,this.lowerCaseAttributeNames=null!==(n=t.lowerCaseAttributeNames)&&void 0!==n?n:!t.xmlMode,this.tokenizer=new(null!==(i=t.Tokenizer)&&void 0!==i?i:o.default)(this.options,this),null===(s=(a=this.cbs).onparserinit)||void 0===s||s.call(a,this)}return e.prototype.ontext=function(e,t){var r,n,i=this.getSlice(e,t);this.endIndex=t-1,null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,i),this.startIndex=t},e.prototype.ontextentity=function(e){var t,r,n=this.tokenizer.getSectionStart();this.endIndex=n-1,null===(r=(t=this.cbs).ontext)||void 0===r||r.call(t,(0,s.fromCodePoint)(e)),this.startIndex=n},e.prototype.isVoidElement=function(e){return!this.options.xmlMode&&f.has(e)},e.prototype.onopentagname=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)},e.prototype.emitOpenTag=function(e){var t,r,n,i;this.openTagStart=this.startIndex,this.tagname=e;var a=!this.options.xmlMode&&p.get(e);if(a)for(;this.stack.length>0&&a.has(this.stack[this.stack.length-1]);){var o=this.stack.pop();null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,o,!0)}this.isVoidElement(e)||(this.stack.push(e),y.has(e)?this.foreignContext.push(!0):g.has(e)&&this.foreignContext.push(!1)),null===(i=(n=this.cbs).onopentagname)||void 0===i||i.call(n,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(e){var t,r;this.startIndex=this.openTagStart,this.attribs&&(null===(r=(t=this.cbs).onopentag)||void 0===r||r.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},e.prototype.onclosetag=function(e,t){var r,n,i,a,o,s;this.endIndex=t;var c=this.getSlice(e,t);if(this.lowerCaseTagNames&&(c=c.toLowerCase()),(y.has(c)||g.has(c))&&this.foreignContext.pop(),this.isVoidElement(c))this.options.xmlMode||"br"!==c||(null===(n=(r=this.cbs).onopentagname)||void 0===n||n.call(r,"br"),null===(a=(i=this.cbs).onopentag)||void 0===a||a.call(i,"br",{},!0),null===(s=(o=this.cbs).onclosetag)||void 0===s||s.call(o,"br",!1));else{var u=this.stack.lastIndexOf(c);if(-1!==u)if(this.cbs.onclosetag)for(var l=this.stack.length-u;l--;)this.cbs.onclosetag(this.stack.pop(),0!==l);else this.stack.length=u;else this.options.xmlMode||"p"!==c||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1},e.prototype.onselfclosingtag=function(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},e.prototype.closeCurrentTag=function(e){var t,r,n=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===n&&(null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,n,!e),this.stack.pop())},e.prototype.onattribname=function(e,t){this.startIndex=e;var r=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(e,t){this.attribvalue+=this.getSlice(e,t)},e.prototype.onattribentity=function(e){this.attribvalue+=(0,s.fromCodePoint)(e)},e.prototype.onattribend=function(e,t){var r,n;this.endIndex=t,null===(n=(r=this.cbs).onattribute)||void 0===n||n.call(r,this.attribname,this.attribvalue,e===o.QuoteType.Double?'"':e===o.QuoteType.Single?"'":e===o.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(m),r=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(n),"!".concat(r))}this.startIndex=t+1},e.prototype.onprocessinginstruction=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(n),"?".concat(r))}this.startIndex=t+1},e.prototype.oncomment=function(e,t,r){var n,i,a,o;this.endIndex=t,null===(i=(n=this.cbs).oncomment)||void 0===i||i.call(n,this.getSlice(e,t-r)),null===(o=(a=this.cbs).oncommentend)||void 0===o||o.call(a),this.startIndex=t+1},e.prototype.oncdata=function(e,t,r){var n,i,a,o,s,c,u,l,d,h;this.endIndex=t;var p=this.getSlice(e,t-r);this.options.xmlMode||this.options.recognizeCDATA?(null===(i=(n=this.cbs).oncdatastart)||void 0===i||i.call(n),null===(o=(a=this.cbs).ontext)||void 0===o||o.call(a,p),null===(c=(s=this.cbs).oncdataend)||void 0===c||c.call(s)):(null===(l=(u=this.cbs).oncomment)||void 0===l||l.call(u,"[CDATA[".concat(p,"]]")),null===(h=(d=this.cbs).oncommentend)||void 0===h||h.call(d)),this.startIndex=t+1},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=this.stack.length;r>0;this.cbs.onclosetag(this.stack[--r],!0));}null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,r,n;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(n=(r=this.cbs).onparserinit)||void 0===n||n.call(r,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.getSlice=function(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,t-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))},e.prototype.end=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var n,i,a,o=r(3379);function s(e){return e===n.Space||e===n.NewLine||e===n.Tab||e===n.FormFeed||e===n.CarriageReturn}function c(e){return e===n.Slash||e===n.Gt||s(e)}function u(e){return e>=n.Zero&&e<=n.Nine}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(n||(n={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.SpecialStartSequence=23]="SpecialStartSequence",e[e.InSpecialTag=24]="InSpecialTag",e[e.BeforeEntity=25]="BeforeEntity",e[e.BeforeNumericEntity=26]="BeforeNumericEntity",e[e.InNamedEntity=27]="InNamedEntity",e[e.InNumericEntity=28]="InNumericEntity",e[e.InHexEntity=29]="InHexEntity"}(i||(i={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(a=t.QuoteType||(t.QuoteType={}));var l={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},d=function(){function e(e,t){var r=e.xmlMode,n=void 0!==r&&r,a=e.decodeEntities,s=void 0===a||a;this.cbs=t,this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=n,this.decodeEntities=s,this.entityTrie=n?o.xmlDecodeTree:o.htmlDecodeTree}return e.prototype.reset=function(){this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},e.prototype.write=function(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()},e.prototype.end=function(){this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=i.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===n.Amp&&(this.state=i.BeforeEntity)},e.prototype.stateSpecialStartSequence=function(e){var t=this.sequenceIndex===this.currentSequence.length;if(t?c(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=i.InTagName,this.stateInTagName(e)},e.prototype.stateInSpecialTag=function(e){if(this.sequenceIndex===this.currentSequence.length){if(e===n.Gt||s(e)){var t=this.index-this.currentSequence.length;if(this.sectionStart=n.LowerA&&e<=n.LowerZ||e>=n.UpperA&&e<=n.UpperZ}(e)},e.prototype.startSpecial=function(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=i.SpecialStartSequence},e.prototype.stateBeforeTagName=function(e){if(e===n.ExclamationMark)this.state=i.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===n.Questionmark)this.state=i.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){var t=32|e;this.sectionStart=this.index,this.xmlMode||t!==l.TitleEnd[2]?this.state=this.xmlMode||t!==l.ScriptEnd[2]?i.InTagName:i.BeforeSpecialS:this.startSpecial(l.TitleEnd,3)}else e===n.Slash?this.state=i.BeforeClosingTagName:(this.state=i.Text,this.stateText(e))},e.prototype.stateInTagName=function(e){c(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateBeforeClosingTagName=function(e){s(e)||(e===n.Gt?this.state=i.Text:(this.state=this.isTagStartChar(e)?i.InClosingTagName:i.InSpecialComment,this.sectionStart=this.index))},e.prototype.stateInClosingTagName=function(e){(e===n.Gt||s(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterClosingTagName,this.stateAfterClosingTagName(e))},e.prototype.stateAfterClosingTagName=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeAttributeName=function(e){e===n.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=i.InSpecialTag,this.sequenceIndex=0):this.state=i.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===n.Slash?this.state=i.InSelfClosingTag:s(e)||(this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateInSelfClosingTag=function(e){e===n.Gt?(this.cbs.onselfclosingtag(this.index),this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1,this.isSpecial=!1):s(e)||(this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateInAttributeName=function(e){(e===n.Eq||c(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterAttributeName,this.stateAfterAttributeName(e))},e.prototype.stateAfterAttributeName=function(e){e===n.Eq?this.state=i.BeforeAttributeValue:e===n.Slash||e===n.Gt?(this.cbs.onattribend(a.NoValue,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):s(e)||(this.cbs.onattribend(a.NoValue,this.index),this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateBeforeAttributeValue=function(e){e===n.DoubleQuote?(this.state=i.InAttributeValueDq,this.sectionStart=this.index+1):e===n.SingleQuote?(this.state=i.InAttributeValueSq,this.sectionStart=this.index+1):s(e)||(this.sectionStart=this.index,this.state=i.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))},e.prototype.handleInAttributeValue=function(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===n.DoubleQuote?a.Double:a.Single,this.index),this.state=i.BeforeAttributeName):this.decodeEntities&&e===n.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,n.DoubleQuote)},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,n.SingleQuote)},e.prototype.stateInAttributeValueNoQuotes=function(e){s(e)||e===n.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(a.Unquoted,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===n.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},e.prototype.stateBeforeDeclaration=function(e){e===n.OpeningSquareBracket?(this.state=i.CDATASequence,this.sequenceIndex=0):this.state=e===n.Dash?i.BeforeComment:i.InDeclaration},e.prototype.stateInDeclaration=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateInProcessingInstruction=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeComment=function(e){e===n.Dash?(this.state=i.InCommentLike,this.currentSequence=l.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=i.InDeclaration},e.prototype.stateInSpecialComment=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeSpecialS=function(e){var t=32|e;t===l.ScriptEnd[3]?this.startSpecial(l.ScriptEnd,4):t===l.StyleEnd[3]?this.startSpecial(l.StyleEnd,4):(this.state=i.InTagName,this.stateInTagName(e))},e.prototype.stateBeforeEntity=function(e){this.entityExcess=1,this.entityResult=0,e===n.Number?this.state=i.BeforeNumericEntity:e===n.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=i.InNamedEntity,this.stateInNamedEntity(e))},e.prototype.stateInNamedEntity=function(e){if(this.entityExcess+=1,this.trieIndex=(0,o.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0)return this.emitNamedEntity(),void this.index--;this.trieCurrent=this.entityTrie[this.trieIndex];var t=this.trieCurrent&o.BinTrieFlags.VALUE_LENGTH;if(t){var r=(t>>14)-1;if(this.allowLegacyEntity()||e===n.Semi){var i=this.index-this.entityExcess+1;i>this.sectionStart&&this.emitPartial(this.sectionStart,i),this.entityResult=this.trieIndex,this.trieIndex+=r,this.entityExcess=0,this.sectionStart=this.index+1,0===r&&this.emitNamedEntity()}else this.trieIndex+=r}},e.prototype.emitNamedEntity=function(){if(this.state=this.baseState,0!==this.entityResult)switch((this.entityTrie[this.entityResult]&o.BinTrieFlags.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~o.BinTrieFlags.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}},e.prototype.stateBeforeNumericEntity=function(e){(32|e)===n.LowerX?(this.entityExcess++,this.state=i.InHexEntity):(this.state=i.InNumericEntity,this.stateInNumericEntity(e))},e.prototype.emitNumericEntity=function(e){var t=this.index-this.entityExcess-1;t+2+Number(this.state===i.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint((0,o.replaceCodePoint)(this.entityResult))),this.state=this.baseState},e.prototype.stateInNumericEntity=function(e){e===n.Semi?this.emitNumericEntity(!0):u(e)?(this.entityResult=10*this.entityResult+(e-n.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.stateInHexEntity=function(e){e===n.Semi?this.emitNumericEntity(!0):u(e)?(this.entityResult=16*this.entityResult+(e-n.Zero),this.entityExcess++):function(e){return e>=n.UpperA&&e<=n.UpperF||e>=n.LowerA&&e<=n.LowerF}(e)?(this.entityResult=16*this.entityResult+((32|e)-n.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===i.Text||this.baseState===i.InSpecialTag)},e.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===i.Text||this.state===i.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==i.InAttributeValueDq&&this.state!==i.InAttributeValueSq&&this.state!==i.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},e.prototype.shouldContinue=function(){return this.index{"use strict";var t=/^utf-?8|ascii|utf-?16-?le|ucs-?2|base-?64|latin-?1$/i,r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,n=/\s|\uFEFF|\xA0/,i=/\r?\n[\x20\x09]+/g,a=/[;,"]/,o=/[;,"]|\s/,s=/^[!#$%&'*+\-\.^_`|~\da-zA-Z]+$/;function c(e){return e.replace(r,"")}function u(e){return n.test(e)}function l(e,t){for(;u(e[t]);)t++;return t}function d(e){return o.test(e)||!s.test(e)}class h{constructor(e){this.refs=[],e&&this.parse(e)}rel(e){for(var t=[],r=e.toLowerCase(),n=0;n{return r=t,n=e,Object.keys(r).length===Object.keys(n).length&&Object.keys(r).every((e=>e in n&&r[e]===n[e]));var r,n}))||this.refs.push(e),this}has(e,t){e=e.toLowerCase(),t=t.toLowerCase();for(var r=0;r",t)))throw new Error("Expected end of URI delimiter at offset "+t);o={uri:e.slice(t+1,p)},t=p,r=2,t++}else if(2===r){if(u(e[t])){t++;continue}if(";"===e[t])r=4,t++;else{if(","!==e[t])throw new Error('Unexpected character "'+e[t]+'" at offset '+t);r=1,t++}}else{if(4!==r)throw new Error('Unknown parser state "'+r+'"');if(";"===e[t]||u(e[t])){t++;continue}-1===(p=e.indexOf("=",t))&&(p=e.indexOf(";",t)),-1===p&&(p=e.length);var s=c(e.slice(t,p)).toLowerCase(),d="";if('"'===e[t=l(e,t=p+1)])for(t++;t"),e.push(t);return e.join(", ")}}h.isCompatibleEncoding=function(e){return t.test(e)},h.parse=function(e,t){return(new h).parse(e,t)},h.isSingleOccurenceAttr=function(e){return"rel"===e||"type"===e||"media"===e||"title"===e||"title*"===e},h.isTokenAttr=function(e){return"rel"===e||"type"===e||"anchor"===e},h.escapeQuotes=function(e){return e.replace(/"/g,'\\"')},h.expandRelations=function(e){return e.rel.split(" ").map((function(t){var r=Object.assign({},e);return r.rel=t,r}))},h.parseExtendedValue=function(e){var t=/([^']+)?(?:'([^']*)')?(.+)/.exec(e);return{language:t[2].toLowerCase(),encoding:h.isCompatibleEncoding(t[1])?null:t[1].toLowerCase(),value:h.isCompatibleEncoding(t[1])?decodeURIComponent(t[3]):t[3]}},h.formatExtendedAttribute=function(e,t){var r=(t.encoding||"utf-8").toUpperCase();return e+"="+r+"'"+(t.language||"en")+"'"+(Buffer.isBuffer(t.value)&&h.isCompatibleEncoding(r)?t.value.toString(r):Buffer.isBuffer(t.value)?t.value.toString("hex").replace(/[0-9a-f]{2}/gi,"%$1"):encodeURIComponent(t.value))},h.formatAttribute=function(e,t){return Array.isArray(t)?t.map((t=>h.formatAttribute(e,t))).join("; "):"*"===e[e.length-1]||"string"!=typeof t?h.formatExtendedAttribute(e,t):(h.isTokenAttr(e)?t=d(t)?'"'+h.escapeQuotes(t)+'"':h.escapeQuotes(t):d(t)&&(t='"'+(t=(t=encodeURIComponent(t)).replace(/%20/g," ").replace(/%2C/g,",").replace(/%3B/g,";"))+'"'),e+"="+t)},e.exports=h},39318:(e,t)=>{t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,c=(1<>1,l=-7,d=r?i-1:0,h=r?-1:1,p=e[t+d];for(d+=h,a=p&(1<<-l)-1,p>>=-l,l+=s;l>0;a=256*a+e[t+d],d+=h,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=256*o+e[t+d],d+=h,l-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=u}return(p?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,c,u=8*a-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,f=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(o++,c/=2),o+d>=l?(s=0,o=l):o+d>=1?(s=(t*c-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=f,s/=256,i-=8);for(o=o<0;e[r+p]=255&o,p+=f,o/=256,u-=8);e[r+p-f]|=128*y}},6081:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Collection:()=>E,Iterable:()=>Rn,List:()=>cr,Map:()=>Ft,OrderedMap:()=>Tr,OrderedSet:()=>ln,PairSorting:()=>yn,Range:()=>Gr,Record:()=>gn,Repeat:()=>Sn,Seq:()=>W,Set:()=>Br,Stack:()=>Rr,default:()=>In,fromJS:()=>On,get:()=>ct,getIn:()=>zr,has:()=>st,hasIn:()=>Xr,hash:()=>me,is:()=>pe,isAssociative:()=>O,isCollection:()=>v,isImmutable:()=>j,isIndexed:()=>S,isKeyed:()=>w,isList:()=>sr,isMap:()=>le,isOrdered:()=>M,isOrderedMap:()=>de,isOrderedSet:()=>Mr,isPlainObject:()=>it,isRecord:()=>D,isSeq:()=>P,isSet:()=>Cr,isStack:()=>Ar,isValueObject:()=>he,merge:()=>Ot,mergeDeep:()=>xt,mergeDeepWith:()=>At,mergeWith:()=>Et,remove:()=>lt,removeIn:()=>gt,set:()=>dt,setIn:()=>ft,update:()=>bt,updateIn:()=>ht,version:()=>An});var n="delete",i=5,a=1<>>0;if(""+r!==t||4294967295===r)return NaN;t=r}return t<0?l(e)+t:t}function h(){return!0}function p(e,t,r){return(0===e&&!m(e)||void 0!==r&&e<=-r)&&(void 0===t||void 0!==r&&t>=r)}function f(e,t){return g(e,t,0)}function y(e,t){return g(e,t,t)}function g(e,t,r){return void 0===e?r:m(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function m(e){return e<0||0===e&&1/e==-1/0}var b="@@__IMMUTABLE_ITERABLE__@@";function v(e){return Boolean(e&&e[b])}var _="@@__IMMUTABLE_KEYED__@@";function w(e){return Boolean(e&&e[_])}var T="@@__IMMUTABLE_INDEXED__@@";function S(e){return Boolean(e&&e[T])}function O(e){return w(e)||S(e)}var E=function(e){return v(e)?e:W(e)},x=function(e){function t(e){return w(e)?e:Y(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(E),A=function(e){function t(e){return S(e)?e:Z(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(E),R=function(e){function t(e){return v(e)&&!O(e)?e:ee(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(E);E.Keyed=x,E.Indexed=A,E.Set=R;var I="@@__IMMUTABLE_SEQ__@@";function P(e){return Boolean(e&&e[I])}var N="@@__IMMUTABLE_RECORD__@@";function D(e){return Boolean(e&&e[N])}function j(e){return v(e)||D(e)}var C="@@__IMMUTABLE_ORDERED__@@";function M(e){return Boolean(e&&e[C])}var L=0,k=1,F=2,B="function"==typeof Symbol&&Symbol.iterator,U="@@iterator",q=B||U,V=function(e){this.next=e};function Q(e,t,r,n){var i=0===e?t:1===e?r:[t,r];return n?n.value=i:n={value:i,done:!1},n}function $(){return{value:void 0,done:!0}}function H(e){return!!Array.isArray(e)||!!K(e)}function G(e){return e&&"function"==typeof e.next}function z(e){var t=K(e);return t&&t.call(e)}function K(e){var t=e&&(B&&e[B]||e[U]);if("function"==typeof t)return t}V.prototype.toString=function(){return"[Iterator]"},V.KEYS=L,V.VALUES=k,V.ENTRIES=F,V.prototype.inspect=V.prototype.toSource=function(){return this.toString()},V.prototype[q]=function(){return this};var X=Object.prototype.hasOwnProperty;function J(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var W=function(e){function t(e){return null==e?ae():j(e)?e.toSeq():function(e){var t,r,n=ce(e);if(n)return(r=K(t=e))&&r===t.entries?n.fromEntrySeq():function(e){var t=K(e);return t&&t===e.keys}(e)?n.toSetSeq():n;if("object"==typeof e)return new re(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var r=this._cache;if(r){for(var n=r.length,i=0;i!==n;){var a=r[t?n-++i:i++];if(!1===e(a[1],a[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var r=this._cache;if(r){var n=r.length,i=0;return new V((function(){if(i===n)return{value:void 0,done:!0};var a=r[t?n-++i:i++];return Q(e,a[0],a[1])}))}return this.__iteratorUncached(e,t)},t}(E),Y=function(e){function t(e){return null==e?ae().toKeyedSeq():v(e)?w(e)?e.toSeq():e.fromEntrySeq():D(e)?e.toSeq():oe(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(W),Z=function(e){function t(e){return null==e?ae():v(e)?w(e)?e.entrySeq():e.toIndexedSeq():D(e)?e.toSeq().entrySeq():se(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(W),ee=function(e){function t(e){return(v(e)&&!O(e)?e:Z(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(W);W.isSeq=P,W.Keyed=Y,W.Set=ee,W.Indexed=Z,W.prototype[I]=!0;var te=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[d(this,e)]:t},t.prototype.__iterate=function(e,t){for(var r=this._array,n=r.length,i=0;i!==n;){var a=t?n-++i:i++;if(!1===e(r[a],a,this))break}return i},t.prototype.__iterator=function(e,t){var r=this._array,n=r.length,i=0;return new V((function(){if(i===n)return{value:void 0,done:!0};var a=t?n-++i:i++;return Q(e,a,r[a])}))},t}(Z),re=function(e){function t(e){var t=Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return X.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var r=this._object,n=this._keys,i=n.length,a=0;a!==i;){var o=n[t?i-++a:a++];if(!1===e(r[o],o,this))break}return a},t.prototype.__iterator=function(e,t){var r=this._object,n=this._keys,i=n.length,a=0;return new V((function(){if(a===i)return{value:void 0,done:!0};var o=n[t?i-++a:a++];return Q(e,o,r[o])}))},t}(Y);re.prototype[C]=!0;var ne,ie=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var r=z(this._collection),n=0;if(G(r))for(var i;!(i=r.next()).done&&!1!==e(i.value,n++,this););return n},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=z(this._collection);if(!G(r))return new V($);var n=0;return new V((function(){var t=r.next();return t.done?t:Q(e,n++,t.value)}))},t}(Z);function ae(){return ne||(ne=new te([]))}function oe(e){var t=ce(e);if(t)return t.fromEntrySeq();if("object"==typeof e)return new re(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function se(e){var t=ce(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function ce(e){return J(e)?new te(e):H(e)?new ie(e):void 0}var ue="@@__IMMUTABLE_MAP__@@";function le(e){return Boolean(e&&e[ue])}function de(e){return le(e)&&M(e)}function he(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function pe(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(he(e)&&he(t)&&e.equals(t))}var fe="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var r=65535&(e|=0),n=65535&(t|=0);return r*n+((e>>>16)*n+r*(t>>>16)<<16>>>0)|0};function ye(e){return e>>>1&1073741824|3221225471&e}var ge=Object.prototype.valueOf;function me(e){if(null==e)return be(e);if("function"==typeof e.hashCode)return ye(e.hashCode(e));var t,r,n,i=(t=e).valueOf!==ge&&"function"==typeof t.valueOf?t.valueOf(t):t;if(null==i)return be(i);switch(typeof i){case"boolean":return i?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;for(t!==e&&(t^=4294967295*e);e>4294967295;)t^=e/=4294967295;return ye(t)}(i);case"string":return i.length>Re?(void 0===(n=Ne[r=i])&&(n=ve(r),Pe===Ie&&(Pe=0,Ne={}),Pe++,Ne[r]=n),n):ve(i);case"object":case"function":return function(e){var t;if(Oe&&void 0!==(t=Se.get(e)))return t;if(void 0!==(t=e[Ae]))return t;if(!we){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ae]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=Te(),Oe)Se.set(e,t);else{if(void 0!==_e&&!1===_e(e))throw new Error("Non-extensible objects are not allowed as keys.");if(we)Object.defineProperty(e,Ae,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Ae]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Ae]=t}}return t}(i);case"symbol":return function(e){var t=Ee[e];return void 0!==t||(t=Te(),Ee[e]=t),t}(i);default:if("function"==typeof i.toString)return ve(i.toString());throw new Error("Value type "+typeof i+" cannot be hashed.")}}function be(e){return null===e?1108378658:1108378659}function ve(e){for(var t=0,r=0;r=0&&(u.get=function(t,r){return(t=d(this,t))>=0&&ts)return{value:void 0,done:!0};var e=i.next();return n||t===k||e.done?e:Q(t,c-1,t===L?void 0:e.value[1],e)}))},u}function qe(e,t,r,n){var i=Je(e);return i.__iterateUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterate(i,a);var s=!0,c=0;return e.__iterate((function(e,a,u){if(!s||!(s=t.call(r,e,a,u)))return c++,i(e,n?a:c-1,o)})),c},i.__iteratorUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterator(i,a);var s=e.__iterator(F,a),c=!0,u=0;return new V((function(){var e,a,l;do{if((e=s.next()).done)return n||i===k?e:Q(i,u++,i===L?void 0:e.value[1],e);var d=e.value;a=d[0],l=d[1],c&&(c=t.call(r,l,a,o))}while(c);return i===F?e:Q(i,a,l,e)}))},i}function Ve(e,t,r){var n=Je(e);return n.__iterateUncached=function(i,a){if(a)return this.cacheResult().__iterate(i,a);var o=0,s=!1;return function e(c,u){c.__iterate((function(a,c){return(!t||u0}function Ge(e,t,r,n){var i=Je(e),a=new te(r).map((function(e){return e.size}));return i.size=n?a.max():a.min(),i.__iterate=function(e,t){for(var r,n=this.__iterator(k,t),i=0;!(r=n.next()).done&&!1!==e(r.value,i++,this););return i},i.__iteratorUncached=function(e,i){var a=r.map((function(e){return e=E(e),z(i?e.reverse():e)})),o=0,s=!1;return new V((function(){var r;return s||(r=a.map((function(e){return e.next()})),s=n?r.every((function(e){return e.done})):r.some((function(e){return e.done}))),s?{value:void 0,done:!0}:Q(e,o++,t.apply(null,r.map((function(e){return e.value}))))}))},i}function ze(e,t){return e===t?e:P(e)?t:e.constructor(t)}function Ke(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Xe(e){return w(e)?x:S(e)?A:R}function Je(e){return Object.create((w(e)?Y:S(e)?Z:ee).prototype)}function We(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):W.prototype.cacheResult.call(this)}function Ye(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e0;)t[r]=arguments[r+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return St(this,t,e)}function St(e,t,r){for(var n=[],i=0;i0;)t[r]=arguments[r+1];return It(e,t)}function Et(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return It(t,r,e)}function xt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Rt(e,t)}function At(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Rt(t,r,e)}function Rt(e,t,r){return It(e,t,function(e){return function t(r,n,i){return at(r)&&at(n)&&(a=n,o=W(r),s=W(a),S(o)===S(s)&&w(o)===w(s))?It(r,[n],t):e?e(r,n,i):n;var a,o,s}}(r))}function It(e,t,r){if(!at(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(j(e))return"function"==typeof r&&e.mergeWith?e.mergeWith.apply(e,[r].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var n=Array.isArray(e),i=e,a=n?A:x,o=n?function(t){i===e&&(i=ut(i)),i.push(t)}:function(t,n){var a=X.call(i,n),o=a&&r?r(i[n],t,n):t;a&&o===i[n]||(i===e&&(i=ut(i)),i[n]=o)},s=0;s0;)t[r]=arguments[r+1];return Rt(this,t,e)}function Dt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return ht(this,e,Jt(),(function(e){return It(e,t)}))}function jt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return ht(this,e,Jt(),(function(e){return Rt(e,t)}))}function Ct(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Mt(){return this.__ownerID?this:this.__ensureOwner(new u)}function Lt(){return this.__ensureOwner()}function kt(){return this.__altered}var Ft=function(e){function t(t){return null==t?Jt():le(t)&&!M(t)?t:Jt().withMutations((function(r){var n=e(t);tt(n.size),n.forEach((function(e,t){return r.set(t,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Jt().withMutations((function(t){for(var r=0;r=e.length)throw new Error("Missing value for key: "+e[r]);t.set(e[r],e[r+1])}}))},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return Wt(this,e,t)},t.prototype.remove=function(e){return Wt(this,e,s)},t.prototype.deleteAll=function(e){var t=E(e);return 0===t.size?this:this.withMutations((function(e){t.forEach((function(t){return e.remove(t)}))}))},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Jt()},t.prototype.sort=function(e){return Tr(Qe(this,e))},t.prototype.sortBy=function(e,t){return Tr(Qe(this,t,e))},t.prototype.map=function(e,t){var r=this;return this.withMutations((function(n){n.forEach((function(i,a){n.set(a,e.call(t,i,a,r))}))}))},t.prototype.__iterator=function(e,t){return new Gt(this,e,t)},t.prototype.__iterate=function(e,t){var r=this,n=0;return this._root&&this._root.iterate((function(t){return n++,e(t[1],t[0],r)}),t),n},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Xt(this.size,this._root,e,this.__hash):0===this.size?Jt():(this.__ownerID=e,this.__altered=!1,this)},t}(x);Ft.isMap=le;var Bt=Ft.prototype;Bt[ue]=!0,Bt[n]=Bt.remove,Bt.removeAll=Bt.deleteAll,Bt.setIn=yt,Bt.removeIn=Bt.deleteIn=mt,Bt.update=vt,Bt.updateIn=_t,Bt.merge=Bt.concat=wt,Bt.mergeWith=Tt,Bt.mergeDeep=Pt,Bt.mergeDeepWith=Nt,Bt.mergeIn=Dt,Bt.mergeDeepIn=jt,Bt.withMutations=Ct,Bt.wasAltered=kt,Bt.asImmutable=Lt,Bt["@@transducer/init"]=Bt.asMutable=Mt,Bt["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},Bt["@@transducer/result"]=function(e){return e.asImmutable()};var Ut=function(e,t){this.ownerID=e,this.entries=t};Ut.prototype.get=function(e,t,r,n){for(var i=this.entries,a=0,o=i.length;a=nr)return function(e,t,r,n){e||(e=new u);for(var i=new $t(e,me(r),[r,n]),a=0;a>>e)&o),s=this.bitmap;return s&a?this.nodes[tr(s&a-1)].get(e+i,t,r,n):n},qt.prototype.update=function(e,t,r,n,c,u,l){void 0===r&&(r=me(n));var d=(0===t?r:r>>>t)&o,h=1<=ir)return function(e,t,r,n,i){for(var o=0,s=new Array(a),c=0;0!==r;c++,r>>>=1)s[c]=1&r?t[o++]:void 0;return s[n]=i,new Vt(e,o+1,s)}(e,g,p,d,b);if(f&&!b&&2===g.length&&Zt(g[1^y]))return g[1^y];if(f&&b&&1===g.length&&Zt(b))return b;var v=e&&e===this.ownerID,_=f?b?p:p^h:p|h,w=f?b?rr(g,y,b,v):function(e,t,r){var n=e.length-1;if(r&&t===n)return e.pop(),e;for(var i=new Array(n),a=0,o=0;o>>e)&o,s=this.nodes[a];return s?s.get(e+i,t,r,n):n},Vt.prototype.update=function(e,t,r,n,a,c,u){void 0===r&&(r=me(n));var l=(0===t?r:r>>>t)&o,d=a===s,h=this.nodes,p=h[l];if(d&&!p)return this;var f=Yt(p,e,t+i,r,n,a,c,u);if(f===p)return this;var y=this.count;if(p){if(!f&&--y>>r)&o,u=(0===r?n:n>>>r)&o,l=c===u?[er(e,t,r+i,n,a)]:(s=new $t(t,n,a),c>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,127&(e+=e>>8)+(e>>16)}function rr(e,t,r,n){var i=n?e:Ze(e);return i[t]=r,i}var nr=a/4,ir=a/2,ar=a/4,or="@@__IMMUTABLE_LIST__@@";function sr(e){return Boolean(e&&e[or])}var cr=function(e){function t(t){var r=yr();if(null==t)return r;if(sr(t))return t;var n=e(t),o=n.size;return 0===o?r:(tt(o),o>0&&o=0&&e=e.size||t<0)return e.withMutations((function(e){t<0?vr(e,t).set(0,r):vr(e,0,t+1).set(t,r)}));t+=e._origin;var n=e._tail,i=e._root,a={value:!1};return t>=_r(e._capacity)?n=gr(n,e.__ownerID,0,t,r,a):i=gr(i,e.__ownerID,e._level,t,r,a),a.value?e.__ownerID?(e._root=i,e._tail=n,e.__hash=void 0,e.__altered=!0,e):fr(e._origin,e._capacity,e._level,i,n):e}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=i,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):yr()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(r){vr(r,0,t+e.length);for(var n=0;n>>t&o;if(n>=this.array.length)return new lr([],e);var a,s=0===n;if(t>0){var c=this.array[n];if((a=c&&c.removeBefore(e,t-i,r))===c&&s)return this}if(s&&!a)return this;var u=mr(this,e);if(!s)for(var l=0;l>>t&o;if(a>=this.array.length)return this;if(t>0){var s=this.array[a];if((n=s&&s.removeAfter(e,t-i,r))===s&&a===this.array.length-1)return this}var c=mr(this,e);return c.array.splice(a+1),n&&(c.array[a]=n),c};var dr,hr={};function pr(e,t){var r=e._origin,n=e._capacity,o=_r(n),s=e._tail;return function e(c,u,l){return 0===u?function(e,i){var c=i===o?s&&s.array:e&&e.array,u=i>r?0:r-i,l=n-i;return l>a&&(l=a),function(){if(u===l)return hr;var e=t?--l:u++;return c&&c[e]}}(c,l):function(o,s,c){var u,l=o&&o.array,d=c>r?0:r-c>>s,h=1+(n-c>>s);return h>a&&(h=a),function(){for(;;){if(u){var r=u();if(r!==hr)return r;u=null}if(d===h)return hr;var n=t?--h:d++;u=e(l&&l[n],s-i,c+(n<>>r&o,d=e&&l0){var h=e&&e.array[l],p=gr(h,t,r-i,n,a,s);return p===h?e:((u=mr(e,t)).array[l]=p,u)}return d&&e.array[l]===a?e:(s&&c(s),u=mr(e,t),void 0===a&&l===u.array.length-1?u.array.pop():u.array[l]=a,u)}function mr(e,t){return t&&e&&t===e.ownerID?e:new lr(e?e.array.slice():[],t)}function br(e,t){if(t>=_r(e._capacity))return e._tail;if(t<1<0;)r=r.array[t>>>n&o],n-=i;return r}}function vr(e,t,r){void 0!==t&&(t|=0),void 0!==r&&(r|=0);var n=e.__ownerID||new u,a=e._origin,s=e._capacity,c=a+t,l=void 0===r?s:r<0?s+r:a+r;if(c===a&&l===s)return e;if(c>=l)return e.clear();for(var d=e._level,h=e._root,p=0;c+p<0;)h=new lr(h&&h.array.length?[void 0,h]:[],n),p+=1<<(d+=i);p&&(c+=p,a+=p,l+=p,s+=p);for(var f=_r(s),y=_r(l);y>=1<f?new lr([],n):g;if(g&&y>f&&ci;v-=i){var _=f>>>v&o;b=b.array[_]=mr(b.array[_],n)}b.array[f>>>i&o]=g}if(l=y)c-=y,l-=y,d=i,h=null,m=m&&m.removeBefore(n,0,c);else if(c>a||y>>d&o;if(w!==y>>>d&o)break;w&&(p+=(1<a&&(h=h.removeBefore(n,d,c-p)),h&&y>>i<=a&&c.size>=2*o.size?(n=(i=c.filter((function(e,t){return void 0!==e&&u!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(n.__ownerID=i.__ownerID=e.__ownerID)):(n=o.remove(t),i=u===c.size-1?c.pop():c.set(u,void 0))}else if(l){if(r===c.get(u)[1])return e;n=o,i=c.set(u,[t,r])}else n=o.set(t,c.size),i=c.set(c.size,[t,r]);return e.__ownerID?(e.size=n.size,e._map=n,e._list=i,e.__hash=void 0,e.__altered=!0,e):Sr(n,i)}Tr.isOrderedMap=de,Tr.prototype[C]=!0,Tr.prototype[n]=Tr.prototype.remove;var xr="@@__IMMUTABLE_STACK__@@";function Ar(e){return Boolean(e&&e[xr])}var Rr=function(e){function t(e){return null==e?Dr():Ar(e)?e:Dr().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var r=this._head;for(e=d(this,e);r&&e--;)r=r.next;return r?r.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:e[n],next:r};return this.__ownerID?(this.size=t,this._head=r,this.__hash=void 0,this.__altered=!0,this):Nr(t,r)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&Ar(t))return t;tt(t.size);var r=this.size,n=this._head;return t.__iterate((function(e){r++,n={value:e,next:n}}),!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):Nr(r,n)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Dr()},t.prototype.slice=function(t,r){if(p(t,r,this.size))return this;var n=f(t,this.size);if(y(r,this.size)!==this.size)return e.prototype.slice.call(this,t,r);for(var i=this.size-n,a=this._head;n--;)a=a.next;return this.__ownerID?(this.size=i,this._head=a,this.__hash=void 0,this.__altered=!0,this):Nr(i,a)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Nr(this.size,this._head,e,this.__hash):0===this.size?Dr():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var r=this;if(t)return new te(this.toArray()).__iterate((function(t,n){return e(t,n,r)}),t);for(var n=0,i=this._head;i&&!1!==e(i.value,n++,this);)i=i.next;return n},t.prototype.__iterator=function(e,t){if(t)return new te(this.toArray()).__iterator(e,t);var r=0,n=this._head;return new V((function(){if(n){var t=n.value;return n=n.next,Q(e,r++,t)}return{value:void 0,done:!0}}))},t}(A);Rr.isStack=Ar;var Ir,Pr=Rr.prototype;function Nr(e,t,r,n){var i=Object.create(Pr);return i.size=e,i._head=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Dr(){return Ir||(Ir=Nr(0))}Pr[xr]=!0,Pr.shift=Pr.pop,Pr.unshift=Pr.push,Pr.unshiftAll=Pr.pushAll,Pr.withMutations=Ct,Pr.wasAltered=kt,Pr.asImmutable=Lt,Pr["@@transducer/init"]=Pr.asMutable=Mt,Pr["@@transducer/step"]=function(e,t){return e.unshift(t)},Pr["@@transducer/result"]=function(e){return e.asImmutable()};var jr="@@__IMMUTABLE_SET__@@";function Cr(e){return Boolean(e&&e[jr])}function Mr(e){return Cr(e)&&M(e)}function Lr(e,t){if(e===t)return!0;if(!v(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||w(e)!==w(t)||S(e)!==S(t)||M(e)!==M(t))return!1;if(0===e.size&&0===t.size)return!0;var r=!O(e);if(M(e)){var n=e.entries();return t.every((function(e,t){var i=n.next().value;return i&&pe(i[1],e)&&(r||pe(i[0],t))}))&&n.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var a=e;e=t,t=a}var o=!0,c=t.__iterate((function(t,n){if(r?!e.has(t):i?!pe(t,e.get(n,s)):!pe(e.get(n,s),t))return o=!1,!1}));return o&&e.size===c}function kr(e,t){var r=function(r){e.prototype[r]=t[r]};return Object.keys(t).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(r),e}function Fr(e){if(!e||"object"!=typeof e)return e;if(!v(e)){if(!at(e))return e;e=W(e)}if(w(e)){var t={};return e.__iterate((function(e,r){t[r]=Fr(e)})),t}var r=[];return e.__iterate((function(e){r.push(Fr(e))})),r}var Br=function(e){function t(t){return null==t?$r():Cr(t)&&!M(t)?t:$r().withMutations((function(r){var n=e(t);tt(n.size),n.forEach((function(e){return r.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(x(e).keySeq())},t.intersect=function(e){return(e=E(e).toArray()).length?qr.intersect.apply(t(e.pop()),e):$r()},t.union=function(e){return(e=E(e).toArray()).length?qr.union.apply(t(e.pop()),e):$r()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Vr(this,this._map.set(e,e))},t.prototype.remove=function(e){return Vr(this,this._map.remove(e))},t.prototype.clear=function(){return Vr(this,this._map.clear())},t.prototype.map=function(e,t){var r=this,n=!1,i=Vr(this,this._map.mapEntries((function(i){var a=i[1],o=e.call(t,a,a,r);return o!==a&&(n=!0),[o,o]}),t));return n?i:this},t.prototype.union=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(r){for(var n=0;n=0&&t=0&&r>>-15,461845907),t=fe(t<<13|t>>>-13,5),t=fe((t=t+3864292196^e)^t>>>16,2246822507),t=ye((t=fe(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(r?t?function(e,t){n=31*n+un(me(e),me(t))|0}:function(e,t){n=n+un(me(e),me(t))|0}:t?function(e){n=31*n+me(e)|0}:function(e){n=n+me(e)|0}),n)}(this))}});var Wr=E.prototype;Wr[b]=!0,Wr[q]=Wr.values,Wr.toJSON=Wr.toArray,Wr.__toStringMapper=ot,Wr.inspect=Wr.toSource=function(){return this.toString()},Wr.chain=Wr.flatMap,Wr.contains=Wr.includes,kr(x,{flip:function(){return ze(this,Le(this))},mapEntries:function(e,t){var r=this,n=0;return ze(this,this.toSeq().map((function(i,a){return e.call(t,[a,i],n++,r)})).fromEntrySeq())},mapKeys:function(e,t){var r=this;return ze(this,this.toSeq().flip().map((function(n,i){return e.call(t,n,i,r)})).flip())}});var Yr=x.prototype;Yr[_]=!0,Yr[q]=Wr.entries,Yr.toJSON=Jr,Yr.__toStringMapper=function(e,t){return ot(t)+": "+ot(e)},kr(A,{toKeyedSeq:function(){return new De(this,!1)},filter:function(e,t){return ze(this,Be(this,e,t,!1))},findIndex:function(e,t){var r=this.findEntry(e,t);return r?r[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return ze(this,Fe(this,!1))},slice:function(e,t){return ze(this,Ue(this,e,t,!1))},splice:function(e,t){var r=arguments.length;if(t=Math.max(t||0,0),0===r||2===r&&!t)return this;e=f(e,e<0?this.count():this.size);var n=this.slice(0,e);return ze(this,1===r?n:n.concat(Ze(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var r=this.findLastEntry(e,t);return r?r[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return ze(this,Ve(this,e,!1))},get:function(e,t){return(e=d(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,r){return r===e}),void 0,t)},has:function(e){return(e=d(this,e))>=0&&(void 0!==this.size?this.size===1/0||et?-1:0}function un(e,t){return e^t+2654435769+(e<<6)+(e>>2)}en.has=Wr.includes,en.contains=en.includes,en.keys=en.values,kr(Y,Yr),kr(Z,Zr),kr(ee,en);var ln=function(e){function t(e){return null==e?fn():Mr(e)?e:fn().withMutations((function(t){var r=R(e);tt(r.size),r.forEach((function(e){return t.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(x(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(Br);ln.isOrderedSet=Mr;var dn,hn=ln.prototype;function pn(e,t){var r=Object.create(hn);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}function fn(){return dn||(dn=pn(Or()))}hn[C]=!0,hn.zip=Zr.zip,hn.zipWith=Zr.zipWith,hn.zipAll=Zr.zipAll,hn.__empty=fn,hn.__make=pn;var yn={LeftThenRight:-1,RightThenLeft:1},gn=function(e,t){var r;!function(e){if(D(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(j(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===e||"object"!=typeof e)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(e);var n=function(a){var o=this;if(a instanceof n)return a;if(!(this instanceof n))return new n(a);if(!r){r=!0;var s=Object.keys(e),c=i._indices={};i._name=t,i._keys=s,i._defaultValues=e;for(var u=0;u2?[]:void 0,{"":e})}function En(e,t,r,n,i,a){if("string"!=typeof r&&!j(r)&&(J(r)||H(r)||it(r))){if(~e.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");e.push(r),i&&""!==n&&i.push(n);var o=t.call(a,n,W(r).map((function(n,a){return En(e,t,n,a,i,r)})),i&&i.slice());return e.pop(),i&&i.pop(),o}return r}function xn(e,t){return S(t)?t.toList():w(t)?t.toMap():t.toSet()}var An="4.3.5",Rn=E;const In={version:An,Collection:E,Iterable:E,Seq:W,Map:Ft,OrderedMap:Tr,List:cr,Stack:Rr,Set:Br,OrderedSet:ln,PairSorting:yn,Record:gn,Range:Gr,Repeat:Sn,is:pe,fromJS:On,hash:me,isImmutable:j,isCollection:v,isKeyed:w,isIndexed:S,isAssociative:O,isOrdered:M,isValueObject:he,isPlainObject:it,isSeq:P,isList:sr,isMap:le,isOrderedMap:de,isStack:Ar,isSet:Cr,isOrderedSet:Mr,isRecord:D,get:ct,getIn:zr,has:st,hasIn:Xr,merge:Ot,mergeDeep:xt,mergeWith:Et,mergeDeepWith:At,remove:lt,removeIn:gt,set:dt,setIn:ft,update:bt,updateIn:ht}},35615:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},76605:e=>{"use strict";const t=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;t.writable=e=>t(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,t.readable=e=>t(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,t.duplex=e=>t.writable(e)&&t.readable(e),t.transform=e=>t.duplex(e)&&"function"==typeof e._transform,e.exports=t},27202:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(85346),t),i(r(40905),t),i(r(76920),t),i(r(11971),t),i(r(89715),t),i(r(39426),t),i(r(45512),t)},85346:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextParser=void 0,r(17082);const n=r(9929),i=r(40905),a=r(76920),o=r(39426),s=r(45512);class c{constructor(e){e=e||{},this.documentLoader=e.documentLoader||new a.FetchDocumentLoader,this.documentCache={},this.validateContext=!e.skipValidation,this.expandContentTypeToBase=!!e.expandContentTypeToBase,this.remoteContextsDepthLimit=e.remoteContextsDepthLimit||32,this.redirectSchemaOrgHttps=!("redirectSchemaOrgHttps"in e)||!!e.redirectSchemaOrgHttps}static validateLanguage(e,t,r){if("string"!=typeof e)throw new i.ErrorCoded(`The value of an '@language' must be a string, got '${JSON.stringify(e)}'`,r);if(!s.Util.REGEX_LANGUAGE_TAG.test(e)){if(t)throw new i.ErrorCoded(`The value of an '@language' must be a valid language tag, got '${JSON.stringify(e)}'`,r);return!1}return!0}static validateDirection(e,t){if("string"!=typeof e)throw new i.ErrorCoded(`The value of an '@direction' must be a string, got '${JSON.stringify(e)}'`,i.ERROR_CODES.INVALID_BASE_DIRECTION);if(!s.Util.REGEX_DIRECTION_TAG.test(e)){if(t)throw new i.ErrorCoded(`The value of an '@direction' must be 'ltr' or 'rtl', got '${JSON.stringify(e)}'`,i.ERROR_CODES.INVALID_BASE_DIRECTION);return!1}return!0}idifyReverseTerms(e){for(const t of Object.keys(e)){let r=e[t];if(r&&"object"==typeof r&&r["@reverse"]&&!r["@id"]){if("string"!=typeof r["@reverse"]||s.Util.isValidKeyword(r["@reverse"]))throw new i.ErrorCoded(`Invalid @reverse value, must be absolute IRI or blank node: '${r["@reverse"]}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);r=e[t]=Object.assign(Object.assign({},r),{"@id":r["@reverse"]}),r["@id"]=r["@reverse"],s.Util.isPotentialKeyword(r["@reverse"])?delete r["@reverse"]:r["@reverse"]=!0}}return e}expandPrefixedTerms(e,t,r){const n=e.getContextRaw();for(const a of r||Object.keys(n))if(s.Util.EXPAND_KEYS_BLACKLIST.indexOf(a)<0&&!s.Util.isReservedInternalKeyword(a)){const r=n[a];if(s.Util.isPotentialKeyword(a)&&s.Util.ALIAS_DOMAIN_BLACKLIST.indexOf(a)>=0&&("@type"!==a||"object"==typeof n[a]&&!n[a]["@protected"]&&"@set"!==n[a]["@container"]))throw new i.ErrorCoded(`Keywords can not be aliased to something else.\nTried mapping ${a} to ${JSON.stringify(r)}`,i.ERROR_CODES.KEYWORD_REDEFINITION);if(s.Util.ALIAS_RANGE_BLACKLIST.indexOf(s.Util.getContextValueId(r))>=0)throw new i.ErrorCoded(`Aliasing to certain keywords is not allowed.\nTried mapping ${a} to ${JSON.stringify(r)}`,i.ERROR_CODES.INVALID_KEYWORD_ALIAS);if(r&&s.Util.isPotentialKeyword(s.Util.getContextValueId(r))&&!0===r["@prefix"])throw new i.ErrorCoded(`Tried to use keyword aliases as prefix: '${a}': '${JSON.stringify(r)}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);for(;s.Util.isPrefixValue(n[a]);){const r=n[a];let i=!1;if("string"==typeof r)n[a]=e.expandTerm(r,!0),i=i||r!==n[a];else{const o=r["@id"],c=r["@type"],u=!("@prefix"in r)||s.Util.isValidIri(a);if("@id"in r)null!=o&&"string"==typeof o&&(n[a]=Object.assign(Object.assign({},n[a]),{"@id":e.expandTerm(o,!0)}),i=i||o!==n[a]["@id"]);else if(!s.Util.isPotentialKeyword(a)&&u){const t=e.expandTerm(a,!0);t!==a&&(n[a]=Object.assign(Object.assign({},n[a]),{"@id":t}),i=!0)}if(c&&"string"==typeof c&&"@vocab"!==c&&(!r["@container"]||!r["@container"]["@type"])&&u){let r=e.expandTerm(c,!0);t&&c===r&&(r=e.expandTerm(c,!1)),r!==c&&(i=!0,n[a]=Object.assign(Object.assign({},n[a]),{"@type":r}))}}if(!i)break}}}normalize(e,{processingMode:t,normalizeLanguageTags:r}){if(r||1===t)for(const t of Object.keys(e))if("@language"===t&&"string"==typeof e[t])e[t]=e[t].toLowerCase();else{const r=e[t];if(r&&"object"==typeof r&&"string"==typeof r["@language"]){const n=r["@language"].toLowerCase();n!==r["@language"]&&(e[t]=Object.assign(Object.assign({},r),{"@language":n}))}}}containersToHash(e){for(const t of Object.keys(e)){const r=e[t];if(r&&"object"==typeof r)if("string"==typeof r["@container"])e[t]=Object.assign(Object.assign({},r),{"@container":{[r["@container"]]:!0}});else if(Array.isArray(r["@container"])){const n={};for(const e of r["@container"])n[e]=!0;e[t]=Object.assign(Object.assign({},r),{"@container":n})}}}applyScopedProtected(e,{processingMode:t},r){if(t&&t>=1.1&&e["@protected"]){for(const t of Object.keys(e))if(!s.Util.isReservedInternalKeyword(t)&&!s.Util.isPotentialKeyword(t)&&!s.Util.isTermProtected(e,t)){const n=e[t];n&&"object"==typeof n?"@protected"in e[t]||(e[t]=Object.assign(Object.assign({},e[t]),{"@protected":!0})):(e[t]={"@id":n,"@protected":!0},s.Util.isSimpleTermDefinitionPrefix(n,r)&&(e[t]=Object.assign(Object.assign({},e[t]),{"@prefix":!0})))}delete e["@protected"]}}validateKeywordRedefinitions(e,t,r,n){for(const r of null!=n?n:Object.keys(t))if(s.Util.isTermProtected(e,r)&&("string"==typeof t[r]?t[r]={"@id":t[r],"@protected":!0}:t[r]=Object.assign(Object.assign({},t[r]),{"@protected":!0}),!s.Util.deepEqual(e[r],t[r])))throw new i.ErrorCoded(`Attempted to override the protected keyword ${r} from ${JSON.stringify(s.Util.getContextValueId(e[r]))} to ${JSON.stringify(s.Util.getContextValueId(t[r]))}`,i.ERROR_CODES.PROTECTED_TERM_REDEFINITION)}validate(e,{processingMode:t}){for(const r of Object.keys(e)){if(s.Util.isReservedInternalKeyword(r))continue;if(""===r)throw new i.ErrorCoded(`The empty term is not allowed, got: '${r}': '${JSON.stringify(e[r])}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);const n=e[r],a=typeof n;if(s.Util.isPotentialKeyword(r)){switch(r.substr(1)){case"vocab":if(null!==n&&"string"!==a)throw new i.ErrorCoded(`Found an invalid @vocab IRI: ${n}`,i.ERROR_CODES.INVALID_VOCAB_MAPPING);break;case"base":if(null!==n&&"string"!==a)throw new i.ErrorCoded(`Found an invalid @base IRI: ${e[r]}`,i.ERROR_CODES.INVALID_BASE_IRI);break;case"language":null!==n&&c.validateLanguage(n,!0,i.ERROR_CODES.INVALID_DEFAULT_LANGUAGE);break;case"version":if(null!==n&&"number"!==a)throw new i.ErrorCoded(`Found an invalid @version number: ${n}`,i.ERROR_CODES.INVALID_VERSION_VALUE);break;case"direction":null!==n&&c.validateDirection(n,!0);break;case"propagate":if(1===t)throw new i.ErrorCoded(`Found an illegal @propagate keyword: ${n}`,i.ERROR_CODES.INVALID_CONTEXT_ENTRY);if(null!==n&&"boolean"!==a)throw new i.ErrorCoded(`Found an invalid @propagate value: ${n}`,i.ERROR_CODES.INVALID_PROPAGATE_VALUE)}if(s.Util.isValidKeyword(r)&&s.Util.isValidKeyword(s.Util.getContextValueId(n)))throw new i.ErrorCoded(`Illegal keyword alias in term value, found: '${r}': '${s.Util.getContextValueId(n)}'`,i.ERROR_CODES.KEYWORD_REDEFINITION)}else if(null!==n)switch(a){case"string":if(s.Util.getPrefix(n,e)===r)throw new i.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.CYCLIC_IRI_MAPPING);if(s.Util.isValidIriWeak(r)){if("@type"===n)throw new i.ErrorCoded(`IRIs can not be mapped to @type, found: '${r}': '${n}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.isValidIri(n)&&n!==new o.JsonLdContextNormalized(e).expandTerm(r))throw new i.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${r}': '${n}'`,i.ERROR_CODES.INVALID_IRI_MAPPING)}break;case"object":if(!(s.Util.isCompactIri(r)||"@id"in n||("@id"===n["@type"]?e["@base"]:e["@vocab"])))throw new i.ErrorCoded(`Missing @id in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);for(const u of Object.keys(n)){const l=n[u];if(l)switch(u){case"@id":if(s.Util.isValidKeyword(l)&&"@type"!==l&&"@id"!==l&&"@graph"!==l&&"@nest"!==l)throw new i.ErrorCoded(`Illegal keyword alias in term value, found: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.isValidIriWeak(r)){if("@type"===l)throw new i.ErrorCoded(`IRIs can not be mapped to @type, found: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.isValidIri(l)&&l!==new o.JsonLdContextNormalized(e).expandTerm(r))throw new i.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING)}if("string"!=typeof l)throw new i.ErrorCoded(`Detected non-string @id in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.getPrefix(l,e)===r)throw new i.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.CYCLIC_IRI_MAPPING);break;case"@type":if("@type"===n["@container"]&&"@id"!==l&&"@vocab"!==l)throw new i.ErrorCoded(`@container: @type only allows @type: @id or @vocab, but got: '${r}': '${l}'`,i.ERROR_CODES.INVALID_TYPE_MAPPING);if("string"!=typeof l)throw new i.ErrorCoded(`The value of an '@type' must be a string, got '${JSON.stringify(a)}'`,i.ERROR_CODES.INVALID_TYPE_MAPPING);if(!("@id"===l||"@vocab"===l||1!==t&&"@json"===l||1!==t&&"@none"===l||"_"!==l[0]&&s.Util.isValidIri(l)))throw new i.ErrorCoded(`A context @type must be an absolute IRI, found: '${r}': '${l}'`,i.ERROR_CODES.INVALID_TYPE_MAPPING);break;case"@reverse":if("string"==typeof l&&n["@id"]&&n["@id"]!==l)throw new i.ErrorCoded(`Found non-matching @id and @reverse term values in '${r}':'${l}' and '${n["@id"]}'`,i.ERROR_CODES.INVALID_REVERSE_PROPERTY);if("@nest"in n)throw new i.ErrorCoded(`@nest is not allowed in the reverse property '${r}'`,i.ERROR_CODES.INVALID_REVERSE_PROPERTY);break;case"@container":if(1===t&&(Object.keys(l).length>1||s.Util.CONTAINERS_1_0.indexOf(Object.keys(l)[0])<0))throw new i.ErrorCoded(`Invalid term @container for '${r}' ('${Object.keys(l)}') in 1.0, must be only one of ${s.Util.CONTAINERS_1_0.join(", ")}`,i.ERROR_CODES.INVALID_CONTAINER_MAPPING);for(const e of Object.keys(l)){if("@list"===e&&n["@reverse"])throw new i.ErrorCoded(`Term value can not be @container: @list and @reverse at the same time on '${r}'`,i.ERROR_CODES.INVALID_REVERSE_PROPERTY);if(s.Util.CONTAINERS.indexOf(e)<0)throw new i.ErrorCoded(`Invalid term @container for '${r}' ('${e}'), must be one of ${s.Util.CONTAINERS.join(", ")}`,i.ERROR_CODES.INVALID_CONTAINER_MAPPING)}break;case"@language":c.validateLanguage(l,!0,i.ERROR_CODES.INVALID_LANGUAGE_MAPPING);break;case"@direction":c.validateDirection(l,!0);break;case"@prefix":if(null!==l&&"boolean"!=typeof l)throw new i.ErrorCoded(`Found an invalid term @prefix boolean in: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_PREFIX_VALUE);if(!("@id"in n)&&!s.Util.isValidIri(r))throw new i.ErrorCoded(`Invalid @prefix definition for '${r}' ('${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);break;case"@index":if(1===t||!n["@container"]||!n["@container"]["@index"])throw new i.ErrorCoded(`Attempt to add illegal key to value object: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);break;case"@nest":if(s.Util.isPotentialKeyword(l)&&"@nest"!==l)throw new i.ErrorCoded(`Found an invalid term @nest value in: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_NEST_VALUE)}}break;default:throw new i.ErrorCoded(`Found an invalid term value: '${r}': '${n}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION)}}}applyBaseEntry(e,t,r){return"string"==typeof e||(r&&!("@base"in e)&&t.parentContext&&"object"==typeof t.parentContext&&"@base"in t.parentContext&&(e["@base"]=t.parentContext["@base"],t.parentContext["@__baseDocument"]&&(e["@__baseDocument"]=!0)),t.baseIRI&&!t.external&&("@base"in e?null===e["@base"]||"string"!=typeof e["@base"]||s.Util.isValidIri(e["@base"])||(e["@base"]=(0,n.resolve)(e["@base"],t.parentContext&&t.parentContext["@base"]||t.baseIRI)):(e["@base"]=t.baseIRI,e["@__baseDocument"]=!0))),e}normalizeContextIri(e,t){if(!s.Util.isValidIri(e))try{e=(0,n.resolve)(e,t)}catch(t){throw new Error(`Invalid context IRI: ${e}`)}return this.redirectSchemaOrgHttps&&e.startsWith("http://schema.org")&&(e="https://schema.org/"),e}async parseInnerContexts(e,t,r){for(const n of null!=r?r:Object.keys(e)){const r=e[n];if(r&&"object"==typeof r&&"@context"in r&&null!==r["@context"]&&!t.ignoreScopedContexts){if(this.validateContext)try{const i=Object.assign(Object.assign({},e),{[n]:Object.assign({},e[n])});delete i[n]["@context"],await this.parse(r["@context"],Object.assign(Object.assign({},t),{external:!1,parentContext:i,ignoreProtection:!0,ignoreRemoteScopedContexts:!0,ignoreScopedContexts:!0}))}catch(e){throw new i.ErrorCoded(e.message,i.ERROR_CODES.INVALID_SCOPED_CONTEXT)}e[n]=Object.assign(Object.assign({},r),{"@context":(await this.parse(r["@context"],Object.assign(Object.assign({},t),{external:!1,minimalProcessing:!0,ignoreRemoteScopedContexts:!0,parentContext:e}))).getContextRaw()})}}return e}async parse(e,t={},r={}){const{baseIRI:n,parentContext:a,external:u,processingMode:l=c.DEFAULT_PROCESSING_MODE,normalizeLanguageTags:d,ignoreProtection:h,minimalProcessing:p}=t,f=t.remoteContexts||{};if(Object.keys(f).length>=this.remoteContextsDepthLimit)throw new i.ErrorCoded("Detected an overflow in remote context inclusions: "+Object.keys(f),i.ERROR_CODES.CONTEXT_OVERFLOW);if(null==e){if(!h&&a&&s.Util.hasProtectedTerms(a))throw new i.ErrorCoded("Illegal context nullification when terms are protected",i.ERROR_CODES.INVALID_CONTEXT_NULLIFICATION);return new o.JsonLdContextNormalized(this.applyBaseEntry({},t,!1))}if("string"==typeof e){const r=this.normalizeContextIri(e,n),i=this.getOverriddenLoad(r,t);if(i)return new o.JsonLdContextNormalized(i);const a=await this.parse(await this.load(r),Object.assign(Object.assign({},t),{baseIRI:r,external:!0,remoteContexts:Object.assign(Object.assign({},f),{[r]:!0})}));return this.applyBaseEntry(a.getContextRaw(),t,!0),a}if(Array.isArray(e)){const r=[],i=await Promise.all(e.map(((e,i)=>{if("string"==typeof e){const a=this.normalizeContextIri(e,n);r[i]=a;return this.getOverriddenLoad(a,t)||this.load(a)}return e})));if(p)return new o.JsonLdContextNormalized(i);const s=await i.reduce(((e,n,a)=>e.then((e=>this.parse(n,Object.assign(Object.assign({},t),{baseIRI:r[a]||t.baseIRI,external:!!r[a]||t.external,parentContext:e.getContextRaw(),remoteContexts:r[a]?Object.assign(Object.assign({},f),{[r[a]]:!0}):f}),{skipValidation:a=1.1))throw new i.ErrorCoded("Context importing is not supported in JSON-LD 1.0",i.ERROR_CODES.INVALID_CONTEXT_ENTRY);if("string"!=typeof e["@import"])throw new i.ErrorCoded("An @import value must be a string, but got "+typeof e["@import"],i.ERROR_CODES.INVALID_IMPORT_VALUE);f=await this.loadImportContext(this.normalizeContextIri(e["@import"],n)),delete e["@import"]}this.applyScopedProtected(f,{processingMode:l},o.defaultExpandOptions);const y=Object.assign(f,e);this.idifyReverseTerms(y),this.normalize(y,{processingMode:l,normalizeLanguageTags:d}),this.applyScopedProtected(y,{processingMode:l},o.defaultExpandOptions);const g=Object.keys(y),m=[];if("object"==typeof a)for(const e in a)e in y?m.push(e):y[e]=a[e];await this.parseInnerContexts(y,t,g);const b=new o.JsonLdContextNormalized(y);return(y&&y["@version"]||c.DEFAULT_PROCESSING_MODE)>=1.1&&(e["@vocab"]&&"string"==typeof e["@vocab"]||""===e["@vocab"])&&(a&&"@vocab"in a&&e["@vocab"].indexOf(":")<0?y["@vocab"]=a["@vocab"]+e["@vocab"]:(s.Util.isCompactIri(e["@vocab"])||e["@vocab"]in y)&&(y["@vocab"]=b.expandTerm(e["@vocab"],!0))),this.expandPrefixedTerms(b,this.expandContentTypeToBase,g),!h&&a&&l>=1.1&&this.validateKeywordRedefinitions(a,y,o.defaultExpandOptions,m),this.validateContext&&!r.skipValidation&&this.validate(y,{processingMode:l}),b}throw new i.ErrorCoded(`Tried parsing a context that is not a string, array or object, but got ${e}`,i.ERROR_CODES.INVALID_LOCAL_CONTEXT)}async load(e){const t=this.documentCache[e];if(t)return t;let r;try{r=await this.documentLoader.load(e)}catch(t){throw new i.ErrorCoded(`Failed to load remote context ${e}: ${t.message}`,i.ERROR_CODES.LOADING_REMOTE_CONTEXT_FAILED)}if(!("@context"in r))throw new i.ErrorCoded(`Missing @context in remote context at ${e}`,i.ERROR_CODES.INVALID_REMOTE_CONTEXT);return this.documentCache[e]=r["@context"]}getOverriddenLoad(e,t){if(e in(t.remoteContexts||{})){if(t.ignoreRemoteScopedContexts)return e;throw new i.ErrorCoded("Detected a cyclic context inclusion of "+e,i.ERROR_CODES.RECURSIVE_CONTEXT_INCLUSION)}return null}async loadImportContext(e){let t=await this.load(e);if("object"!=typeof t||Array.isArray(t))throw new i.ErrorCoded("An imported context must be a single object: "+e,i.ERROR_CODES.INVALID_REMOTE_CONTEXT);if("@import"in t)throw new i.ErrorCoded("An imported context can not import another context: "+e,i.ERROR_CODES.INVALID_CONTEXT_ENTRY);return t=Object.assign({},t),this.containersToHash(t),t}}c.DEFAULT_PROCESSING_MODE=1.1,t.ContextParser=c},40905:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERROR_CODES=t.ErrorCoded=void 0;class r extends Error{constructor(e,t){super(e),this.code=t}}var n;t.ErrorCoded=r,(n=t.ERROR_CODES||(t.ERROR_CODES={})).COLLIDING_KEYWORDS="colliding keywords",n.CONFLICTING_INDEXES="conflicting indexes",n.CYCLIC_IRI_MAPPING="cyclic IRI mapping",n.INVALID_ID_VALUE="invalid @id value",n.INVALID_INDEX_VALUE="invalid @index value",n.INVALID_NEST_VALUE="invalid @nest value",n.INVALID_PREFIX_VALUE="invalid @prefix value",n.INVALID_PROPAGATE_VALUE="invalid @propagate value",n.INVALID_REVERSE_VALUE="invalid @reverse value",n.INVALID_IMPORT_VALUE="invalid @import value",n.INVALID_VERSION_VALUE="invalid @version value",n.INVALID_BASE_IRI="invalid base IRI",n.INVALID_CONTAINER_MAPPING="invalid container mapping",n.INVALID_CONTEXT_ENTRY="invalid context entry",n.INVALID_CONTEXT_NULLIFICATION="invalid context nullification",n.INVALID_DEFAULT_LANGUAGE="invalid default language",n.INVALID_INCLUDED_VALUE="invalid @included value",n.INVALID_IRI_MAPPING="invalid IRI mapping",n.INVALID_JSON_LITERAL="invalid JSON literal",n.INVALID_KEYWORD_ALIAS="invalid keyword alias",n.INVALID_LANGUAGE_MAP_VALUE="invalid language map value",n.INVALID_LANGUAGE_MAPPING="invalid language mapping",n.INVALID_LANGUAGE_TAGGED_STRING="invalid language-tagged string",n.INVALID_LANGUAGE_TAGGED_VALUE="invalid language-tagged value",n.INVALID_LOCAL_CONTEXT="invalid local context",n.INVALID_REMOTE_CONTEXT="invalid remote context",n.INVALID_REVERSE_PROPERTY="invalid reverse property",n.INVALID_REVERSE_PROPERTY_MAP="invalid reverse property map",n.INVALID_REVERSE_PROPERTY_VALUE="invalid reverse property value",n.INVALID_SCOPED_CONTEXT="invalid scoped context",n.INVALID_SCRIPT_ELEMENT="invalid script element",n.INVALID_SET_OR_LIST_OBJECT="invalid set or list object",n.INVALID_TERM_DEFINITION="invalid term definition",n.INVALID_TYPE_MAPPING="invalid type mapping",n.INVALID_TYPE_VALUE="invalid type value",n.INVALID_TYPED_VALUE="invalid typed value",n.INVALID_VALUE_OBJECT="invalid value object",n.INVALID_VALUE_OBJECT_VALUE="invalid value object value",n.INVALID_VOCAB_MAPPING="invalid vocab mapping",n.IRI_CONFUSED_WITH_PREFIX="IRI confused with prefix",n.KEYWORD_REDEFINITION="keyword redefinition",n.LOADING_DOCUMENT_FAILED="loading document failed",n.LOADING_REMOTE_CONTEXT_FAILED="loading remote context failed",n.MULTIPLE_CONTEXT_LINK_HEADERS="multiple context link headers",n.PROCESSING_MODE_CONFLICT="processing mode conflict",n.PROTECTED_TERM_REDEFINITION="protected term redefinition",n.CONTEXT_OVERFLOW="context overflow",n.INVALID_BASE_DIRECTION="invalid base direction",n.RECURSIVE_CONTEXT_INCLUSION="recursive context inclusion",n.INVALID_STREAMING_KEY_ORDER="invalid streaming key order",n.INVALID_EMBEDDED_NODE="invalid embedded node",n.INVALID_ANNOTATION="invalid annotation"},76920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchDocumentLoader=void 0,r(17082);const n=r(40905),i=r(75441),a=r(9929);t.FetchDocumentLoader=class{constructor(e){this.fetcher=e}async load(e){const t=await(this.fetcher||fetch)(e,{headers:new Headers({accept:"application/ld+json"})});if(t.ok&&t.headers){let r=t.headers.get("Content-Type");if(r){const e=r.indexOf(";");e>0&&(r=r.substr(0,e))}if("application/ld+json"===r)return await t.json();if(t.headers.has("Link")){let r;if(t.headers.forEach(((t,n)=>{if("link"===n){const n=(0,i.parse)(t);for(const t of n.get("type","application/ld+json"))if("alternate"===t.rel){if(r)throw new Error("Multiple JSON-LD alternate links were found on "+e);r=(0,a.resolve)(t.uri,e)}}})),r)return this.load(r)}throw new n.ErrorCoded(`Unsupported JSON-LD media type ${r}`,n.ERROR_CODES.LOADING_DOCUMENT_FAILED)}throw new Error(t.statusText||`Status code: ${t.status}`)}}},11971:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89715:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},39426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultExpandOptions=t.JsonLdContextNormalized=void 0;const n=r(9929),i=r(40905),a=r(45512);t.JsonLdContextNormalized=class{constructor(e){this.contextRaw=e}getContextRaw(){return this.contextRaw}expandTerm(e,r,o=t.defaultExpandOptions){const s=this.contextRaw[e];if(null===s||s&&null===s["@id"])return null;let c=!0;if(s&&r){const t=a.Util.getContextValueId(s);if(t&&t!==e){if("string"==typeof t&&(a.Util.isValidIri(t)||a.Util.isValidKeyword(t)))return t;a.Util.isPotentialKeyword(t)||(c=!1)}}const u=a.Util.getPrefix(e,this.contextRaw),l=this.contextRaw["@vocab"],d=(!!l||""===l)&&l.indexOf(":")<0,h=this.contextRaw["@base"],p=a.Util.isPotentialKeyword(e);if(u){const t=this.contextRaw[u],r=a.Util.getContextValueId(t);if(r){if("string"!=typeof t&&o.allowPrefixForcing){if("_"!==r[0]&&!p&&!t["@prefix"]&&!(e in this.contextRaw))return e}else if(!a.Util.isSimpleTermDefinitionPrefix(r,o))return e;return r+e.substr(u.length+1)}}else{if(r&&(l||""===l||o.allowVocabRelativeToBase&&h&&d)&&!p&&!a.Util.isCompactIri(e)){if(d){if(o.allowVocabRelativeToBase)return(l||h?(0,n.resolve)(l,h):"")+e;throw new i.ErrorCoded(`Relative vocab expansion for term '${e}' with vocab '${l}' is not allowed.`,i.ERROR_CODES.INVALID_VOCAB_MAPPING)}return l+e}if(!r&&h&&!p&&!a.Util.isCompactIri(e))return(0,n.resolve)(e,h)}if(c)return e;throw new i.ErrorCoded(`Invalid IRI mapping found for context entry '${e}': '${JSON.stringify(s)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING)}compactIri(e,t){if(t&&this.contextRaw["@vocab"]&&e.startsWith(this.contextRaw["@vocab"]))return e.substr(this.contextRaw["@vocab"].length);if(!t&&this.contextRaw["@base"]&&e.startsWith(this.contextRaw["@base"]))return e.substr(this.contextRaw["@base"].length);const r={prefix:"",suffix:e};for(const n in this.contextRaw){const i=this.contextRaw[n];if(i&&!a.Util.isPotentialKeyword(n)){const o=a.Util.getContextValueId(i);if(e.startsWith(o)){const i=e.substr(o.length);if(i)i.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;class r{static isCompactIri(e){return e.indexOf(":")>0&&!(e&&"#"===e[0])}static getPrefix(e,t){if(e&&"#"===e[0])return null;const r=e.indexOf(":");if(r>=0){if(e.length>r+1&&"/"===e.charAt(r+1)&&"/"===e.charAt(r+2))return null;const n=e.substr(0,r);if("_"===n)return null;if(t[n])return n}return null}static getContextValueId(e){if(null===e||"string"==typeof e)return e;return e["@id"]||null}static isSimpleTermDefinitionPrefix(e,t){return!r.isPotentialKeyword(e)&&(t.allowPrefixNonGenDelims||"string"==typeof e&&("_"===e[0]||r.isPrefixIriEndingWithGenDelim(e)))}static isPotentialKeyword(e){return"string"==typeof e&&r.KEYWORD_REGEX.test(e)}static isPrefixIriEndingWithGenDelim(e){return r.ENDS_WITH_GEN_DELIM.test(e)}static isPrefixValue(e){return e&&("string"==typeof e||e&&"object"==typeof e)}static isValidIri(e){return Boolean(e&&r.IRI_REGEX.test(e))}static isValidIriWeak(e){return!!e&&":"!==e[0]&&r.IRI_REGEX_WEAK.test(e)}static isValidKeyword(e){return r.VALID_KEYWORDS[e]}static isTermProtected(e,t){const r=e[t];return!("string"==typeof r)&&r&&r["@protected"]}static hasProtectedTerms(e){for(const t of Object.keys(e))if(r.isTermProtected(e,t))return!0;return!1}static isReservedInternalKeyword(e){return e.startsWith("@__")}static deepEqual(e,t){const r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every((r=>{const n=e[r],i=t[r];return n===i||null!==n&&null!==i&&"object"==typeof n&&"object"==typeof i&&this.deepEqual(n,i)}))}}r.IRI_REGEX=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^ "<>{}|\\\[\]`#]*(#[^#]*)?$/,r.IRI_REGEX_WEAK=/(?::[^:])|\//,r.KEYWORD_REGEX=/^@[a-z]+$/i,r.ENDS_WITH_GEN_DELIM=/[:/?#\[\]@]$/,r.REGEX_LANGUAGE_TAG=/^[a-zA-Z]+(-[a-zA-Z0-9]+)*$/,r.REGEX_DIRECTION_TAG=/^(ltr)|(rtl)$/,r.VALID_KEYWORDS={"@annotation":!0,"@base":!0,"@container":!0,"@context":!0,"@direction":!0,"@graph":!0,"@id":!0,"@import":!0,"@included":!0,"@index":!0,"@json":!0,"@language":!0,"@list":!0,"@nest":!0,"@none":!0,"@prefix":!0,"@propagate":!0,"@protected":!0,"@reverse":!0,"@set":!0,"@type":!0,"@value":!0,"@version":!0,"@vocab":!0},r.EXPAND_KEYS_BLACKLIST=["@base","@vocab","@language","@version","@direction"],r.ALIAS_DOMAIN_BLACKLIST=["@container","@graph","@id","@index","@list","@nest","@none","@prefix","@reverse","@set","@type","@value","@version"],r.ALIAS_RANGE_BLACKLIST=["@context","@preserve"],r.CONTAINERS=["@list","@set","@index","@language","@graph","@id","@type"],r.CONTAINERS_1_0=["@list","@set","@index"],t.Util=r},17082:function(){!function(e){!function(t){var r="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in e,o="ArrayBuffer"in e;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=f(t);return t.readAsArrayBuffer(e),r}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,r,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var T=[301,302,303,307,308];w.redirect=function(e,t){if(-1===T.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,r){return new Promise((function(n,a){var o=new v(e,r);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new w(i,r))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=h,e.Request=v,e.Response=w),t.Headers=h,t.Request=v,t.Response=w,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:this)},50631:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(90114),t)},46240:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextTree=void 0;class r{constructor(){this.subTrees={}}getContext(e){if(e.length>0){const[t,...r]=e,n=this.subTrees[t];if(n){const e=n.getContext(r);if(e)return e.then((({context:e,depth:t})=>({context:e,depth:t+1})))}}return this.context?this.context.then((e=>({context:e,depth:0}))):null}setContext(e,t){if(0===e.length)this.context=t;else{const[n,...i]=e;let a=this.subTrees[n];a||(a=this.subTrees[n]=new r),a.setContext(i,t)}}removeContext(e){this.setContext(e,null)}}t.ContextTree=r},90114:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonLdParser=void 0;const n=r(36885),i=r(27202),a=r(58521),o=r(11272),s=r(45947),c=r(62885),u=r(29997),l=r(66700),d=r(37071),h=r(48978),p=r(30643),f=r(58865),y=r(23787),g=r(30635),m=r(94382),b=r(24292),v=r(22135),_=r(75441),w=r(6042);class T extends a.Transform{constructor(e){super({readableObjectMode:!0}),e=e||{},this.options=e,this.parsingContext=new b.ParsingContext(Object.assign({parser:this},e)),this.util=new v.Util({dataFactory:e.dataFactory,parsingContext:this.parsingContext}),this.jsonParser=new n,this.contextJobs=[],this.typeJobs=[],this.contextAwaitingJobs=[],this.lastDepth=0,this.lastKeys=[],this.lastOnValueJob=Promise.resolve(),this.attachJsonParserListeners(),this.on("end",(()=>{void 0!==this.jsonParser.mode&&this.emit("error",new Error("Unclosed document"))}))}static fromHttpResponse(e,t,r,n){let a,o,s=["application/activity+json"];if(n&&n.wellKnownMediaTypes&&(s=n.wellKnownMediaTypes),"application/ld+json"!==t&&!s.includes(t)){if("application/json"!==t&&!t.endsWith("+json"))throw new i.ErrorCoded(`Unsupported JSON-LD media type ${t}`,i.ERROR_CODES.LOADING_DOCUMENT_FAILED);if(r&&r.has("Link")&&r.forEach(((t,r)=>{if("link"===r){const r=(0,_.parse)(t);for(const t of r.get("rel","http://www.w3.org/ns/json-ld#context")){if(a)throw new i.ErrorCoded("Multiple JSON-LD context link headers were found on "+e,i.ERROR_CODES.MULTIPLE_CONTEXT_LINK_HEADERS);a=t.uri}}})),!a&&!(null==n?void 0:n.ignoreMissingContextLinkHeader))throw new i.ErrorCoded(`Missing context link header for media type ${t} on ${e}`,i.ERROR_CODES.LOADING_DOCUMENT_FAILED)}if(r&&r.has("Content-Type")){const e=r.get("Content-Type"),t=/; *profile=([^"]*)/.exec(e);t&&"http://www.w3.org/ns/json-ld#streaming"===t[1]&&(o=!0)}return new T(Object.assign({baseIRI:e,context:a,streamingProfile:o},n||{}))}import(e){if("pipe"in e){e.on("error",(e=>t.emit("error",e)));const t=e.pipe(new T(this.options));return t}{const t=new a.PassThrough({readableObjectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new T(this.options));return r}}_transform(e,t,r){this.jsonParser.write(e),this.lastOnValueJob.then((()=>r()),(e=>r(e)))}async newOnValueJob(e,t,r,n){let a=!0;if(n&&r1&&(l=this.parsingContext.validationStack[this.parsingContext.validationStack.length-1].property);for(let t=Math.max(1,this.parsingContext.validationStack.length-1);t=0?this.parsingContext.idStack[e-r-1]:[await this.util.getGraphContainerValue(t,e)];if(a)for(const t of a){this.parsingContext.emittedStack[e]=!0;for(const r of n)this.util.emitQuadChecked(e,i,r.predicate,r.object,t,r.reverse,r.isEmbedded)}else{const r=this.parsingContext.getUnidentifiedGraphBufferSafe(e-await this.util.getDepthOffsetGraph(e,t)-1);for(const e of n)e.reverse?r.push({object:i,predicate:e.predicate,subject:e.object,isEmbedded:e.isEmbedded}):r.push({object:e.object,predicate:e.predicate,subject:i,isEmbedded:e.isEmbedded})}}this.parsingContext.unidentifiedValuesBuffer.splice(e,1),this.parsingContext.literalStack.splice(e,1),this.parsingContext.jsonLiteralStack.splice(e,1)}const a=this.parsingContext.unidentifiedGraphsBuffer[e];if(a){for(const t of r){const r=1!==e||"BlankNode"!==t.termType||this.parsingContext.topLevelProperties?t:this.util.getDefaultGraph();this.parsingContext.emittedStack[e]=!0;for(const t of a)this.parsingContext.emitQuad(e,this.util.dataFactory.quad(t.subject,t.predicate,t.object,r))}this.parsingContext.unidentifiedGraphsBuffer.splice(e,1)}const o=this.parsingContext.annotationsBuffer[e];if(o){o.length>0&&1===e&&this.parsingContext.emitError(new i.ErrorCoded("Annotations can not be made on top-level nodes",i.ERROR_CODES.INVALID_ANNOTATION));const t=this.parsingContext.getAnnotationsBufferSafe(e-1);for(const e of o)t.push(e);delete this.parsingContext.annotationsBuffer[e]}}async validateKey(e,t,r){for(const n of T.ENTRY_HANDLERS)if(await n.validate(this.parsingContext,this.util,e,t,r))return{valid:!0,property:r||n.isPropertyHandler()};return{valid:!1,property:!1}}attachJsonParserListeners(){this.jsonParser.onValue=e=>{const t=this.jsonParser.stack.length,r=new Array(t+1).fill(0).map(((e,r)=>r===t?this.jsonParser.key:this.jsonParser.stack[r].key));if(!this.isParsingContextInner(t)){const n=()=>this.newOnValueJob(r,e,t,!0);if(this.parsingContext.streamingProfile||this.parsingContext.contextTree.getContext(r.slice(0,-1)))this.lastOnValueJob=this.lastOnValueJob.then(n);else if("@context"===r[t]){let e=this.contextJobs[t];e||(e=this.contextJobs[t]=[]),e.push(n)}else this.contextAwaitingJobs.push({job:n,keys:r,depth:t});this.parsingContext.streamingProfile||0!==t||(this.lastOnValueJob=this.lastOnValueJob.then((()=>this.executeBufferedJobs())))}},this.jsonParser.onError=e=>{this.emit("error",e)}}isParsingContextInner(e){for(let t=e;t>0;t--)if("@context"===this.jsonParser.stack[t-1].key)return!0;return!1}async executeBufferedJobs(){for(const e of this.contextJobs)if(e)for(const t of e)await t();this.parsingContext.unaliasedKeywordCacheStack.splice(0);const e=[];for(const t of this.contextAwaitingJobs)"@type"===await this.util.unaliasKeyword(t.keys[t.depth],t.keys,t.depth,!0)||"number"==typeof t.keys[t.depth]&&"@type"===await this.util.unaliasKeyword(t.keys[t.depth-1],t.keys,t.depth-1,!0)?this.typeJobs.push({job:t.job,keys:t.keys.slice(0,t.keys.length-1)}):e.push(t);for(const t of e){if(this.typeJobs.length>0){const e=[],r=[];for(let n=0;ne.keys.length-t.keys.length));for(const e of n)await e.job();const i=r.sort().reverse();for(const e of i)this.typeJobs.splice(e,1)}await t.job()}}}T.DEFAULT_PROCESSING_MODE="1.1",T.ENTRY_HANDLERS=[new o.EntryHandlerArrayValue,new l.EntryHandlerKeywordContext,new h.EntryHandlerKeywordId,new p.EntryHandlerKeywordIncluded,new d.EntryHandlerKeywordGraph,new f.EntryHandlerKeywordNest,new y.EntryHandlerKeywordType,new m.EntryHandlerKeywordValue,new w.EntryHandlerKeywordAnnotation,new s.EntryHandlerContainer,new g.EntryHandlerKeywordUnknownFallback,new u.EntryHandlerPredicate,new c.EntryHandlerInvalidFallback],t.JsonLdParser=T},24292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParsingContext=void 0;const n=r(27202),i=r(40905),a=r(46240),o=r(90114);class s{constructor(e){this.contextParser=new n.ContextParser({documentLoader:e.documentLoader,skipValidation:e.skipContextValidation}),this.streamingProfile=!!e.streamingProfile,this.baseIRI=e.baseIRI,this.produceGeneralizedRdf=!!e.produceGeneralizedRdf,this.allowSubjectList=!!e.allowSubjectList,this.processingMode=e.processingMode||o.JsonLdParser.DEFAULT_PROCESSING_MODE,this.strictValues=!!e.strictValues,this.validateValueIndexes=!!e.validateValueIndexes,this.defaultGraph=e.defaultGraph,this.rdfDirection=e.rdfDirection,this.normalizeLanguageTags=e.normalizeLanguageTags,this.streamingProfileAllowOutOfOrderPlainType=e.streamingProfileAllowOutOfOrderPlainType,this.rdfstar=!1!==e.rdfstar,this.rdfstarReverseInEmbedded=e.rdfstarReverseInEmbedded,this.topLevelProperties=!1,this.activeProcessingMode=parseFloat(this.processingMode),this.processingStack=[],this.processingType=[],this.emittedStack=[],this.idStack=[],this.graphStack=[],this.graphContainerTermStack=[],this.listPointerStack=[],this.contextTree=new a.ContextTree,this.literalStack=[],this.validationStack=[],this.unaliasedKeywordCacheStack=[],this.jsonLiteralStack=[],this.unidentifiedValuesBuffer=[],this.unidentifiedGraphsBuffer=[],this.annotationsBuffer=[],this.pendingContainerFlushBuffers=[],this.parser=e.parser,e.context?(this.rootContext=this.parseContext(e.context),this.rootContext.then((e=>this.validateContext(e)))):this.rootContext=Promise.resolve(new n.JsonLdContextNormalized(this.baseIRI?{"@base":this.baseIRI,"@__baseDocument":!0}:{}))}async parseContext(e,t,r){return this.contextParser.parse(e,{baseIRI:this.baseIRI,ignoreProtection:r,normalizeLanguageTags:this.normalizeLanguageTags,parentContext:t,processingMode:this.activeProcessingMode})}validateContext(e){const t=e.getContextRaw()["@version"];if(t){if(this.activeProcessingMode&&t>this.activeProcessingMode)throw new i.ErrorCoded(`Unsupported JSON-LD version '${t}' under active processing mode ${this.activeProcessingMode}.`,i.ERROR_CODES.PROCESSING_MODE_CONFLICT);if(this.activeProcessingMode&&t0&&!1===i.context.getContextRaw()["@propagate"]&&i.depth!==t&&!r);return 0===i.depth&&!1===i.context.getContextRaw()["@propagate"]&&i.depth!==t&&(i.context=new n.JsonLdContextNormalized({})),i}async newOnValueJob(e,t,r,n){await this.parser.newOnValueJob(e,t,r,n)}async handlePendingContainerFlushBuffers(){if(this.pendingContainerFlushBuffers.length>0){for(const e of this.pendingContainerFlushBuffers)await this.parser.flushBuffer(e.depth,e.keys),this.parser.flushStacks(e.depth);return this.pendingContainerFlushBuffers.splice(0,this.pendingContainerFlushBuffers.length),!0}return!1}emitQuad(e,t){1===e&&(this.topLevelProperties=!0),this.parser.push(t)}emitError(e){this.parser.emit("error",e)}emitContext(e){this.parser.emit("context",e)}getUnidentifiedValueBufferSafe(e){let t=this.unidentifiedValuesBuffer[e];return t||(t=[],this.unidentifiedValuesBuffer[e]=t),t}getUnidentifiedGraphBufferSafe(e){let t=this.unidentifiedGraphsBuffer[e];return t||(t=[],this.unidentifiedGraphsBuffer[e]=t),t}getAnnotationsBufferSafe(e){let t=this.annotationsBuffer[e];return t||(t=[],this.annotationsBuffer[e]=t),t}getExpandOptions(){return s.EXPAND_OPTIONS[this.activeProcessingMode]}shiftStack(e,t){const r=this.idStack[e+t];if(r&&(this.idStack[e]=r,this.emittedStack[e]=!0,delete this.idStack[e+t]),this.pendingContainerFlushBuffers.length)for(const r of this.pendingContainerFlushBuffers)r.depth>=e+t&&(r.depth-=t,r.keys.splice(e,t));this.unidentifiedValuesBuffer[e+t]&&(this.unidentifiedValuesBuffer[e]=this.unidentifiedValuesBuffer[e+t],delete this.unidentifiedValuesBuffer[e+t]),this.annotationsBuffer[e+t-1]&&(this.annotationsBuffer[e-1]||(this.annotationsBuffer[e-1]=[]),this.annotationsBuffer[e-1]=[...this.annotationsBuffer[e-1],...this.annotationsBuffer[e+t-1]],delete this.annotationsBuffer[e+t-1])}}s.EXPAND_OPTIONS={1:{allowPrefixForcing:!1,allowPrefixNonGenDelims:!1,allowVocabRelativeToBase:!1},1.1:{allowPrefixForcing:!0,allowPrefixNonGenDelims:!1,allowVocabRelativeToBase:!0}},t.ParsingContext=s},22135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(27202),i=r(18050),a=r(45947),o=r(33619);class s{constructor(e){this.parsingContext=e.parsingContext,this.dataFactory=e.dataFactory||new i.DataFactory,this.rdfFirst=this.dataFactory.namedNode(s.RDF+"first"),this.rdfRest=this.dataFactory.namedNode(s.RDF+"rest"),this.rdfNil=this.dataFactory.namedNode(s.RDF+"nil"),this.rdfType=this.dataFactory.namedNode(s.RDF+"type"),this.rdfJson=this.dataFactory.namedNode(s.RDF+"JSON")}static getContextValue(e,t,r,n){const i=e.getContextRaw()[r];if(!i)return n;const a=i[t];return void 0===a?n:a}static getContextValueContainer(e,t){return s.getContextValue(e,"@container",t,{"@set":!0})}static getContextValueType(e,t){const r=s.getContextValue(e,"@type",t,null);return"@none"===r?null:r}static getContextValueLanguage(e,t){return s.getContextValue(e,"@language",t,e.getContextRaw()["@language"]||null)}static getContextValueDirection(e,t){return s.getContextValue(e,"@direction",t,e.getContextRaw()["@direction"]||null)}static isContextValueReverse(e,t){return!!s.getContextValue(e,"@reverse",t,null)}static getContextValueIndex(e,t){return s.getContextValue(e,"@index",t,e.getContextRaw()["@index"]||null)}static isPropertyReverse(e,t,r){return"@reverse"===r!==s.isContextValueReverse(e,t)}static isPropertyInEmbeddedNode(e){return"@id"===e}static isPropertyInAnnotationObject(e){return"@annotation"===e}static isValidIri(e){return null!==e&&n.Util.isValidIri(e)}static isPrefixArray(e,t){if(e.length>t.length)return!1;for(let r=0;r1)throw new n.ErrorCoded(`Found illegal neighbouring entries next to @set for key: '${t}'`,n.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);return[]}if("@list"in r){if(Object.keys(r).length>1)throw new n.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${t}'`,n.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);const e=r["@list"];return Array.isArray(e)?0===e.length?[this.rdfNil]:this.parsingContext.idStack[i+1]||[]:await this.valueToTerm(await this.parsingContext.getContext(a),t,e,i-1,a.slice(0,-1))}if("@reverse"in r&&"boolean"==typeof r["@reverse"])return[];if("@graph"in s.getContextValueContainer(await this.parsingContext.getContext(a),t)){const e=this.parsingContext.graphContainerTermStack[i+1];return e?Object.values(e):[this.dataFactory.blankNode()]}if("@id"in r){if(Object.keys(r).length>1&&(e=await this.parsingContext.getContext(a,0)),"@context"in r&&(e=await this.parsingContext.parseContext(r["@context"],e.getContextRaw())),"@vocab"===r["@type"])return this.nullableTermToArray(this.createVocabOrBaseTerm(e,r["@id"]));{const t=r["@id"];let a;if("object"==typeof t){if(!this.parsingContext.rdfstar)throw new n.ErrorCoded(`Found illegal @id '${r}'`,n.ERROR_CODES.INVALID_ID_VALUE);a=this.parsingContext.idStack[i+1][0]}else a=this.resourceToTerm(e,t);return this.nullableTermToArray(a)}}return this.parsingContext.emittedStack[i+1]||r&&"object"==typeof r&&0===Object.keys(r).length?this.parsingContext.idStack[i+1]||(this.parsingContext.idStack[i+1]=[this.dataFactory.blankNode()]):[];case"string":return this.nullableTermToArray(this.stringValueToTerm(i,await this.getContextSelfOrPropertyScoped(e,t),t,r,null));case"boolean":return this.nullableTermToArray(this.stringValueToTerm(i,await this.getContextSelfOrPropertyScoped(e,t),t,Boolean(r).toString(),this.dataFactory.namedNode(s.XSD_BOOLEAN)));case"number":return this.nullableTermToArray(this.stringValueToTerm(i,await this.getContextSelfOrPropertyScoped(e,t),t,r,this.dataFactory.namedNode(r%1==0&&r<1e21?s.XSD_INTEGER:s.XSD_DOUBLE)));default:return this.parsingContext.emitError(new Error(`Could not determine the RDF type of a ${o}`)),[]}}async getContextSelfOrPropertyScoped(e,t){const r=e.getContextRaw()[t];return r&&"object"==typeof r&&"@context"in r&&(e=await this.parsingContext.parseContext(r,e.getContextRaw(),!0)),e}nullableTermToArray(e){return e?[e]:[]}predicateToTerm(e,t){const r=e.expandTerm(t,!0,this.parsingContext.getExpandOptions());return r?"_"===r[0]&&":"===r[1]?this.parsingContext.produceGeneralizedRdf?this.dataFactory.blankNode(r.substr(2)):null:s.isValidIri(r)?this.dataFactory.namedNode(r):r&&this.parsingContext.strictValues?(this.parsingContext.emitError(new n.ErrorCoded(`Invalid predicate IRI: ${r}`,n.ERROR_CODES.INVALID_IRI_MAPPING)),null):null:null}resourceToTerm(e,t){if(t.startsWith("_:"))return this.dataFactory.blankNode(t.substr(2));const r=e.expandTerm(t,!1,this.parsingContext.getExpandOptions());if(!s.isValidIri(r)){if(!r||!this.parsingContext.strictValues)return null;this.parsingContext.emitError(new Error(`Invalid resource IRI: ${r}`))}return this.dataFactory.namedNode(r)}createVocabOrBaseTerm(e,t){if(t.startsWith("_:"))return this.dataFactory.blankNode(t.substr(2));const r=this.parsingContext.getExpandOptions();let n=e.expandTerm(t,!0,r);if(n===t&&(n=e.expandTerm(t,!1,r)),!s.isValidIri(n)){if(!n||!this.parsingContext.strictValues||n.startsWith("@"))return null;this.parsingContext.emitError(new Error(`Invalid term IRI: ${n}`))}return this.dataFactory.namedNode(n)}intToString(e,t){return"number"==typeof e?Number.isFinite(e)?e%1!=0||t&&t.value===s.XSD_DOUBLE?e.toExponential(15).replace(/(\d)0*e\+?/,"$1E"):Number(e).toString():e>0?"INF":"-INF":e}stringValueToTerm(e,t,r,n,i){const a=s.getContextValueType(t,r);if(a)if("@id"===a){if(!i)return this.resourceToTerm(t,this.intToString(n,i))}else if("@vocab"===a){if(!i)return this.createVocabOrBaseTerm(t,this.intToString(n,i))}else i=this.dataFactory.namedNode(a);if(!i){const a=s.getContextValueLanguage(t,r),o=s.getContextValueDirection(t,r);return o&&this.parsingContext.rdfDirection?this.createLanguageDirectionLiteral(e,this.intToString(n,i),a,o):this.dataFactory.literal(this.intToString(n,i),a)}return this.dataFactory.literal(this.intToString(n,i),i)}createLanguageDirectionLiteral(e,t,r,n){if("i18n-datatype"===this.parsingContext.rdfDirection)return r||(r=""),this.dataFactory.literal(t,this.dataFactory.namedNode(`https://www.w3.org/ns/i18n#${r}_${n}`));{const i=this.dataFactory.blankNode(),a=this.getDefaultGraph();return this.parsingContext.emitQuad(e,this.dataFactory.quad(i,this.dataFactory.namedNode(s.RDF+"value"),this.dataFactory.literal(t),a)),r&&this.parsingContext.emitQuad(e,this.dataFactory.quad(i,this.dataFactory.namedNode(s.RDF+"language"),this.dataFactory.literal(r),a)),this.parsingContext.emitQuad(e,this.dataFactory.quad(i,this.dataFactory.namedNode(s.RDF+"direction"),this.dataFactory.literal(n),a)),i}}valueToJsonString(e){return o(e)}async unaliasKeyword(e,t,r,i,a){if(Number.isInteger(e))return e;if(!i){const e=this.parsingContext.unaliasedKeywordCacheStack[r];if(e)return e}if(!n.Util.isPotentialKeyword(e)){let r=(a=a||await this.parsingContext.getContext(t)).getContextRaw()[e];r&&"object"==typeof r&&(r=r["@id"]),n.Util.isValidKeyword(r)&&(e=r)}return i?e:this.parsingContext.unaliasedKeywordCacheStack[r]=e}async unaliasKeywordParent(e,t){return await this.unaliasKeyword(t>0&&e[t-1],e,t-1)}async unaliasKeywords(e,t,r,n){const i={};for(const a in e)i[await this.unaliasKeyword(a,t,r+1,!0,n)]=e[a];return i}async isLiteral(e,t){for(let r=t;r>=0;r--){if("@annotation"===await this.unaliasKeyword(e[r],e,r))return!1;if(this.parsingContext.literalStack[r]||this.parsingContext.jsonLiteralStack[r])return!0}return!1}async getDepthOffsetGraph(e,t){for(let r=e-1;r>0;r--)if("@graph"===await this.unaliasKeyword(t[r],t,r)){const n=(await a.EntryHandlerContainer.getContainerHandler(this.parsingContext,t,r)).containers;return a.EntryHandlerContainer.isComplexGraphContainer(n)?-1:e-r-1}return-1}validateReverseSubject(e){if("Literal"===e.termType)throw new n.ErrorCoded(`Found illegal literal in subject position: ${e.value}`,n.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE)}getDefaultGraph(){return this.parsingContext.defaultGraph||this.dataFactory.defaultGraph()}async getGraphContainerValue(e,t){let r=this.getDefaultGraph();const{containers:n,depth:i}=await a.EntryHandlerContainer.getContainerHandler(this.parsingContext,e,t);if("@graph"in n){const t=a.EntryHandlerContainer.getContainerGraphIndex(n,i,e),o=this.parsingContext.graphContainerTermStack[i];if(r=o?o[t]:null,!r){let a=null;if("@id"in n){const t=await this.getContainerKey(e[i],e,i);null!==t&&(a=await this.resourceToTerm(await this.parsingContext.getContext(e),t))}a||(a=this.dataFactory.blankNode()),this.parsingContext.graphContainerTermStack[i]||(this.parsingContext.graphContainerTermStack[i]={}),r=this.parsingContext.graphContainerTermStack[i][t]=a}}return r}async getPropertiesDepth(e,t){let r=t;for(let n=t-1;n>0;n--)if("number"!=typeof e[n]){const t=await this.unaliasKeyword(e[n],e,n);if("@reverse"===t)return n;if("@nest"!==t)return r;r=n}return r}async getContainerKey(e,t,r){const n=await this.unaliasKeyword(e,t,r);return"@none"===n?null:n}validateReverseInEmbeddedNode(e,t,r){if(r&&t&&!this.parsingContext.rdfstarReverseInEmbedded)throw new n.ErrorCoded(`Illegal reverse property in embedded node in ${e}`,n.ERROR_CODES.INVALID_EMBEDDED_NODE)}emitQuadChecked(e,t,r,i,a,o,s){let c;if(o?(this.validateReverseSubject(i),c=this.dataFactory.quad(i,r,t,a)):c=this.dataFactory.quad(t,r,i,a),s){if("DefaultGraph"!==c.graph.termType&&(c=this.dataFactory.quad(c.subject,c.predicate,c.object)),this.parsingContext.idStack[e-1])throw new n.ErrorCoded("Illegal multiple properties in an embedded node",n.ERROR_CODES.INVALID_EMBEDDED_NODE);this.parsingContext.idStack[e-1]=[c]}else this.parsingContext.emitQuad(e,c);const u=this.parsingContext.annotationsBuffer[e];if(u){for(const t of u)this.emitAnnotation(e,c,t);delete this.parsingContext.annotationsBuffer[e]}}emitAnnotation(e,t,r){let n;r.reverse?(this.validateReverseSubject(r.object),n=this.dataFactory.quad(r.object,r.predicate,t)):n=this.dataFactory.quad(t,r.predicate,r.object),this.parsingContext.emitQuad(e,n);for(const t of r.nestedAnnotations)this.emitAnnotation(e,n,t)}}s.XSD="http://www.w3.org/2001/XMLSchema#",s.XSD_BOOLEAN=s.XSD+"boolean",s.XSD_INTEGER=s.XSD+"integer",s.XSD_DOUBLE=s.XSD+"double",s.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",t.Util=s},14079:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerHandlerIdentifier=void 0,t.ContainerHandlerIdentifier=class{canCombineWithGraph(){return!0}async handle(e,t,r,n,i,a){let o;if(t.emittedStack[a+1]&&t.idStack[a+1])o=t.idStack[a+1][0];else{const e=null!==await r.getContainerKey(n[a],n,a)?await r.resourceToTerm(await t.getContext(n),n[a]):r.dataFactory.blankNode();if(!e)return void(t.emittedStack[a]=!1);o=e,t.idStack[a+1]=[o]}let s=t.idStack[a];s||(s=t.idStack[a]=[]),s.some((e=>e.equals(o)))||s.push(o),await t.handlePendingContainerFlushBuffers()||(t.emittedStack[a]=!1)}}},43354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerHandlerIndex=void 0;const n=r(27202),i=r(29997),a=r(22135);t.ContainerHandlerIndex=class{canCombineWithGraph(){return!0}async handle(e,t,r,o,s,c){if(!Array.isArray(s)){const u="@graph"in e,l=await t.getContext(o),d=o[c-1],h=a.Util.getContextValueIndex(l,d);if(h){if(n.Util.isPotentialKeyword(h))throw new n.ErrorCoded(`Keywords can not be used as @index value, got: ${h}`,n.ERROR_CODES.INVALID_TERM_DEFINITION);if("string"!=typeof h)throw new n.ErrorCoded(`@index values must be strings, got: ${h}`,n.ERROR_CODES.INVALID_TERM_DEFINITION);if("object"!=typeof s){if("@id"!==a.Util.getContextValueType(l,d))throw new n.ErrorCoded(`Property-based index containers require nodes as values or strings with @type: @id, but got: ${s}`,n.ERROR_CODES.INVALID_VALUE_OBJECT);const e=r.resourceToTerm(l,s);e&&(t.idStack[c+1]=[e])}const e=r.createVocabOrBaseTerm(l,h);if(e){const n=await r.valueToTerm(l,h,await r.getContainerKey(o[c],o,c),c,o);if(u){const i=await r.getGraphContainerValue(o,c+1);for(const a of n)t.emitQuad(c,r.dataFactory.quad(i,e,a,r.getDefaultGraph()))}else for(const a of n)await i.EntryHandlerPredicate.handlePredicateObject(t,r,o,c+1,e,a,!1,!1,!1)}}const p=u?2:1;await t.newOnValueJob(o.slice(0,o.length-p),s,c-p,!0),await t.handlePendingContainerFlushBuffers()}t.emittedStack[c]=!1}}},68526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerHandlerLanguage=void 0;const n=r(27202);t.ContainerHandlerLanguage=class{canCombineWithGraph(){return!1}async handle(e,t,r,i,a,o){const s=await r.getContainerKey(i[o],i,o);if(Array.isArray(a))a=a.map((e=>({"@value":e,"@language":s})));else{if("string"!=typeof a)throw new n.ErrorCoded(`Got invalid language map value, got '${JSON.stringify(a)}', but expected string`,n.ERROR_CODES.INVALID_LANGUAGE_MAP_VALUE);a={"@value":a,"@language":s}}await t.newOnValueJob(i.slice(0,i.length-1),a,o-1,!0),t.emittedStack[o]=!1}}},84936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerHandlerType=void 0;const n=r(29997),i=r(22135);t.ContainerHandlerType=class{canCombineWithGraph(){return!1}async handle(e,t,r,a,o,s){if(!Array.isArray(o)){if("string"==typeof o){const e=await t.getContext(a),n="@vocab"===i.Util.getContextValueType(e,a[s-1])?await r.createVocabOrBaseTerm(e,o):await r.resourceToTerm(e,o);if(n){const e={"@id":"NamedNode"===n.termType?n.value:o};await t.newOnValueJob(a.slice(0,a.length-1),e,s-1,!0),t.idStack[s+1]=[n]}}else{const e=!!t.idStack[s+1];e||delete t.idStack[s],await t.newOnValueJob(a.slice(0,a.length-1),o,s-1,!0),e||(t.idStack[s+1]=t.idStack[s])}const e=await r.getContainerKey(a[s],a,s),c=null!==e?r.createVocabOrBaseTerm(await t.getContext(a),e):null;c&&await n.EntryHandlerPredicate.handlePredicateObject(t,r,a,s+1,r.rdfType,c,!1,!1,!1),await t.handlePendingContainerFlushBuffers()}t.emittedStack[s]=!1}}},11272:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerArrayValue=void 0;const n=r(22135),i=r(27202);t.EntryHandlerArrayValue=class{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,n,i){return this.test(e,t,null,r,n)}async test(e,t,r,n,i){return"number"==typeof n[i]}async handle(e,t,r,i,a,o){let s=await t.unaliasKeywordParent(i,o);if("@list"===s){let r=null,n=0;for(let e=o-2;e>0;e--){const t=i[e];if("string"==typeof t||"number"==typeof t){n=e,r=t;break}}if(null!==r){const s=await t.valueToTerm(await e.getContext(i),r,a,o,i);for(const r of s)await this.handleListElement(e,t,r,a,o,i.slice(0,n),n);0===s.length&&await this.handleListElement(e,t,null,a,o,i.slice(0,n),n)}}else if("@set"===s)await e.newOnValueJob(i.slice(0,-2),a,o-2,!1);else if(void 0!==s&&"@type"!==s){for(let e=o-1;e>0;e--)if("number"!=typeof i[e]){s=await t.unaliasKeyword(i[e],i,e);break}const r=await e.getContext(i.slice(0,-1));if("@list"in n.Util.getContextValueContainer(r,s)){e.emittedStack[o+1]=!0;const r=await t.valueToTerm(await e.getContext(i),s,a,o,i);for(const n of r)await this.handleListElement(e,t,n,a,o,i.slice(0,-1),o-1);0===r.length&&await this.handleListElement(e,t,null,a,o,i.slice(0,-1),o-1)}else e.shiftStack(o,1),await e.newOnValueJob(i.slice(0,-1),a,o-1,!1),e.contextTree.removeContext(i.slice(0,-1))}}async handleListElement(e,t,r,n,a,o,s){let c=e.listPointerStack[a];if(null!==n&&null!==(await t.unaliasKeywords(n,o,a))["@value"]){if(c&&c.value){const r=t.dataFactory.blankNode();e.emitQuad(a,t.dataFactory.quad(c.value,t.rdfRest,r,t.getDefaultGraph())),c.value=r}else{const e=t.dataFactory.blankNode();c={value:e,listRootDepth:s,listId:e}}r&&e.emitQuad(a,t.dataFactory.quad(c.value,t.rdfFirst,r,t.getDefaultGraph()))}else c||(c={listRootDepth:s,listId:t.rdfNil});e.listPointerStack[a]=c,e.rdfstar&&e.annotationsBuffer[a]&&e.emitError(new i.ErrorCoded("Found an illegal annotation inside a list",i.ERROR_CODES.INVALID_ANNOTATION))}}},45947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerContainer=void 0;const n=r(14079),i=r(43354),a=r(68526),o=r(84936),s=r(22135);class c{static isSimpleGraphContainer(e){return"@graph"in e&&("@set"in e&&2===Object.keys(e).length||1===Object.keys(e).length)}static isComplexGraphContainer(e){return"@graph"in e&&("@set"in e&&Object.keys(e).length>2||!("@set"in e)&&Object.keys(e).length>1)}static getContainerGraphIndex(e,t,r){let n=c.isSimpleGraphContainer(e),i="";for(let e=t;e=0;e--)if("number"!=typeof t[e]){const r=s.Util.getContextValue(a,"@container",t[e],!1);if(r&&c.isSimpleGraphContainer(r))return{containers:r,depth:e+1,fallback:!1};const o=s.Util.getContextValue(a,"@container",t[e-1],!1);if(o){const t="@graph"in o;for(const r in c.CONTAINER_HANDLERS)if(o[r])return t?c.CONTAINER_HANDLERS[r].canCombineWithGraph()?{containers:o,depth:e,fallback:!1}:n:i?n:{containers:o,depth:e,fallback:!1};return n}if(i)return n;i=!0}return n}static async isBufferableContainerHandler(e,t,r){const n=await c.getContainerHandler(e,t,r);return!n.fallback&&!("@graph"in n.containers)}isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,n,i){return!!await this.test(e,t,null,r,n)}async test(e,t,r,n,i){const a=s.Util.getContextValueContainer(await e.getContext(n,2),n[i-1]);for(const e in c.CONTAINER_HANDLERS)if(a[e])return{containers:a,handler:c.CONTAINER_HANDLERS[e]};return null}async handle(e,t,r,n,i,a,o){return o.handler.handle(o.containers,e,t,n,i,a)}}c.CONTAINER_HANDLERS={"@id":new n.ContainerHandlerIdentifier,"@index":new i.ContainerHandlerIndex,"@language":new a.ContainerHandlerLanguage,"@type":new o.ContainerHandlerType},t.EntryHandlerContainer=c},62885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerInvalidFallback=void 0,t.EntryHandlerInvalidFallback=class{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,n,i){return!1}async test(e,t,r,n,i){return!0}async handle(e,t,r,n,i,a){e.emittedStack[a]=!1}}},29997:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerPredicate=void 0;const n=r(27202),i=r(22135);class a{static async handlePredicateObject(e,t,r,i,a,o,s,c,u){const l=await t.getPropertiesDepth(r,i),d=await t.getDepthOffsetGraph(i,r),h=i-d,p=e.idStack[l];if(p&&!u)for(const n of p)if(d>=0){const r=e.idStack[h-1];if(r)for(const e of r)t.emitQuadChecked(i,n,a,o,e,s,c);else s?(t.validateReverseSubject(o),e.getUnidentifiedGraphBufferSafe(h-1).push({subject:o,predicate:a,object:n,isEmbedded:c})):e.getUnidentifiedGraphBufferSafe(h-1).push({subject:n,predicate:a,object:o,isEmbedded:c})}else{const e=await t.getGraphContainerValue(r,l);t.emitQuadChecked(i,n,a,o,e,s,c)}else if(s&&t.validateReverseSubject(o),u){if(e.rdfstar){e.idStack[i]&&e.emitError(new n.ErrorCoded(`Found an illegal @id inside an annotation: ${e.idStack[i][0].value}`,n.ERROR_CODES.INVALID_ANNOTATION));for(let a=0;a=0;e--){const t=c[e];t.depth>l&&(u.nestedAnnotations.push(t),c.splice(e,1))}}}else e.getUnidentifiedValueBufferSafe(l).push({predicate:a,object:o,reverse:s,isEmbedded:c})}isPropertyHandler(){return!0}isStackProcessor(){return!0}async validate(e,t,r,n,a){const o=r[n];if(o){const a=await e.getContext(r);if(!e.jsonLiteralStack[n]&&await t.predicateToTerm(a,r[n]))return"@json"===i.Util.getContextValueType(a,o)&&(e.jsonLiteralStack[n+1]=!0),!0}return!1}async test(e,t,r,n,i){return n[i]}async handle(e,t,r,o,s,c,u){const l=o[c],d=await e.getContext(o),h=await t.predicateToTerm(d,r);if(h){const u=await t.valueToTerm(d,r,s,c,o);if(u.length)for(let p of u){let u=await t.unaliasKeywordParent(o,c);const f=i.Util.isPropertyReverse(d,l,u);let y=0;for(;"@reverse"===u||"number"==typeof u;)"number"==typeof u?y++:c--,u=await t.unaliasKeywordParent(o,c-y);const g=i.Util.isPropertyInEmbeddedNode(u);t.validateReverseInEmbeddedNode(r,f,g);const m=i.Util.isPropertyInAnnotationObject(u);if(s){const a="@list"in i.Util.getContextValueContainer(d,r);if(a||s["@list"]){if((a&&!Array.isArray(s)&&!s["@list"]||s["@list"]&&!Array.isArray(s["@list"]))&&p!==t.rdfNil){const r=t.dataFactory.blankNode();e.emitQuad(c,t.dataFactory.quad(r,t.rdfRest,t.rdfNil,t.getDefaultGraph())),e.emitQuad(c,t.dataFactory.quad(r,t.rdfFirst,p,t.getDefaultGraph())),p=r}if(f&&!e.allowSubjectList)throw new n.ErrorCoded(`Found illegal list value in subject position at ${r}`,n.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE)}}await a.handlePredicateObject(e,t,o,c,h,p,f,g,m)}}}}t.EntryHandlerPredicate=a},49203:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeyword=void 0,t.EntryHandlerKeyword=class{constructor(e){this.keyword=e}isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,n,i){return!1}async test(e,t,r,n,i){return r===this.keyword}}},6042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordAnnotation=void 0;const n=r(49203),i=r(27202);class a extends n.EntryHandlerKeyword{constructor(){super("@annotation")}async handle(e,t,r,n,a,o){("string"==typeof a||"object"==typeof a&&a["@value"])&&e.emitError(new i.ErrorCoded(`Found illegal annotation value: ${JSON.stringify(a)}`,i.ERROR_CODES.INVALID_ANNOTATION))}}t.EntryHandlerKeywordAnnotation=a},66700:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordContext=void 0;const n=r(27202),i=r(49203);class a extends i.EntryHandlerKeyword{constructor(){super("@context")}isStackProcessor(){return!1}async handle(e,t,r,i,a,o){e.streamingProfile&&(e.processingStack[o]||e.processingType[o]||void 0!==e.idStack[o])&&e.emitError(new n.ErrorCoded("Found an out-of-order context, while streaming is enabled.(disable `streamingProfile`)",n.ERROR_CODES.INVALID_STREAMING_KEY_ORDER));const s=e.getContext(i),c=e.parseContext(a,(await s).getContextRaw());e.contextTree.setContext(i.slice(0,-1),c),e.emitContext(a),await e.validateContext(await c)}}t.EntryHandlerKeywordContext=a},37071:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordGraph=void 0;const n=r(49203);class i extends n.EntryHandlerKeyword{constructor(){super("@graph")}async handle(e,t,r,n,i,a){e.graphStack[a+1]=!0}}t.EntryHandlerKeywordGraph=i},48978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordId=void 0;const n=r(27202),i=r(49203);class a extends i.EntryHandlerKeyword{constructor(){super("@id")}isStackProcessor(){return!1}async handle(e,t,r,i,a,o){if("string"!=typeof a){if(e.rdfstar&&"object"==typeof a){const t=Object.keys(a);1===t.length&&"@id"===t[0]&&e.emitError(new n.ErrorCoded(`Invalid embedded node without property with @id ${a["@id"]}`,n.ERROR_CODES.INVALID_EMBEDDED_NODE))}else e.emitError(new n.ErrorCoded(`Found illegal @id '${a}'`,n.ERROR_CODES.INVALID_ID_VALUE));return}const s=await t.getPropertiesDepth(i,o);if(void 0!==e.idStack[s]&&(e.idStack[s][0].listHead?e.emitError(new n.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${i[o-1]}'`,n.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT)):e.emitError(new n.ErrorCoded(`Found duplicate @ids '${e.idStack[s][0].value}' and '${a}'`,n.ERROR_CODES.COLLIDING_KEYWORDS))),e.rdfstar&&e.annotationsBuffer[o])for(const t of e.annotationsBuffer[o])t.depth===o&&e.emitError(new n.ErrorCoded(`Found an illegal @id inside an annotation: ${a}`,n.ERROR_CODES.INVALID_ANNOTATION));e.idStack[s]=t.nullableTermToArray(await t.resourceToTerm(await e.getContext(i),a))}}t.EntryHandlerKeywordId=a},30643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordIncluded=void 0;const n=r(27202),i=r(49203);class a extends i.EntryHandlerKeyword{constructor(){super("@included")}async handle(e,t,r,i,a,o){"object"!=typeof a&&e.emitError(new n.ErrorCoded(`Found illegal @included '${a}'`,n.ERROR_CODES.INVALID_INCLUDED_VALUE));const s=await t.unaliasKeywords(a,i,o,await e.getContext(i));"@value"in s&&e.emitError(new n.ErrorCoded(`Found an illegal @included @value node '${JSON.stringify(a)}'`,n.ERROR_CODES.INVALID_INCLUDED_VALUE)),"@list"in s&&e.emitError(new n.ErrorCoded(`Found an illegal @included @list node '${JSON.stringify(a)}'`,n.ERROR_CODES.INVALID_INCLUDED_VALUE)),e.emittedStack[o]=!1}}t.EntryHandlerKeywordIncluded=a},58865:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordNest=void 0;const n=r(27202),i=r(49203);class a extends i.EntryHandlerKeyword{constructor(){super("@nest")}async handle(e,t,r,i,a,o){"object"!=typeof a&&e.emitError(new n.ErrorCoded(`Found invalid @nest entry for '${r}': '${a}'`,n.ERROR_CODES.INVALID_NEST_VALUE)),"@value"in await t.unaliasKeywords(a,i,o,await e.getContext(i))&&e.emitError(new n.ErrorCoded(`Found an invalid @value node for '${r}'`,n.ERROR_CODES.INVALID_NEST_VALUE)),e.emittedStack[o]=!1}}t.EntryHandlerKeywordNest=a},23787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordType=void 0;const n=r(27202),i=r(22135),a=r(29997),o=r(49203);class s extends o.EntryHandlerKeyword{constructor(){super("@type")}isStackProcessor(){return!1}async handle(e,t,r,o,s,c){const u=o[c],l=await e.getContext(o),d=t.rdfType,h=await t.unaliasKeywordParent(o,c),p=i.Util.isPropertyReverse(l,u,h),f=i.Util.isPropertyInEmbeddedNode(h);t.validateReverseInEmbeddedNode(r,p,f);const y=i.Util.isPropertyInAnnotationObject(h),g=Array.isArray(s)?s:[s];for(const r of g){"string"!=typeof r&&e.emitError(new n.ErrorCoded(`Found illegal @type '${r}'`,n.ERROR_CODES.INVALID_TYPE_VALUE));const i=t.createVocabOrBaseTerm(l,r);i&&await a.EntryHandlerPredicate.handlePredicateObject(e,t,o,c,d,i,p,f,y)}let m=Promise.resolve(l),b=!1;for(const t of g.sort()){const r=i.Util.getContextValue(l,"@context",t,null);r&&(b=!0,m=m.then((t=>e.parseContext(r,t.getContextRaw()))))}!e.streamingProfile||!b&&e.streamingProfileAllowOutOfOrderPlainType||!e.processingStack[c]&&!e.idStack[c]||e.emitError(new n.ErrorCoded("Found an out-of-order type-scoped context, while streaming is enabled.(disable `streamingProfile`)",n.ERROR_CODES.INVALID_STREAMING_KEY_ORDER)),b&&(m=m.then((e=>!0!==e.getContextRaw()["@propagate"]?new n.JsonLdContextNormalized(Object.assign(Object.assign({},e.getContextRaw()),{"@propagate":!1,"@__propagateFallback":l.getContextRaw()})):e)),e.contextTree.setContext(o.slice(0,o.length-1),m)),e.processingType[c]=!0}}t.EntryHandlerKeywordType=s},30635:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordUnknownFallback=void 0;const n=r(27202);class i{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,i,a){const o=await t.unaliasKeyword(r[i],r,i);return!(!n.Util.isPotentialKeyword(o)||!a&&"@list"===o)}async test(e,t,r,i,a){return n.Util.isPotentialKeyword(r)}async handle(e,t,r,a,o,s){const c=i.VALID_KEYWORDS_TYPES[r];void 0!==c?c&&typeof o!==c.type&&e.emitError(new n.ErrorCoded(`Invalid value type for '${r}' with value '${o}'`,c.errorCode)):e.strictValues&&e.emitError(new Error(`Unknown keyword '${r}' with value '${o}'`)),e.emittedStack[s]=!1}}i.VALID_KEYWORDS_TYPES={"@index":{type:"string",errorCode:n.ERROR_CODES.INVALID_INDEX_VALUE},"@list":null,"@reverse":{type:"object",errorCode:n.ERROR_CODES.INVALID_REVERSE_VALUE},"@set":null,"@value":null},t.EntryHandlerKeywordUnknownFallback=i},94382:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordValue=void 0;const n=r(49203);class i extends n.EntryHandlerKeyword{constructor(){super("@value")}async validate(e,t,r,n,i){const a=r[n];return a&&!e.literalStack[n]&&await this.test(e,t,a,r,n)&&(e.literalStack[n]=!0),super.validate(e,t,r,n,i)}async test(e,t,r,n,i){return"@value"===await t.unaliasKeyword(n[i],n.slice(0,n.length-1),i-1,!0)}async handle(e,t,r,n,i,a){e.literalStack[a]=!0,delete e.unidentifiedValuesBuffer[a],delete e.unidentifiedGraphsBuffer[a],e.emittedStack[a]=!1}}t.EntryHandlerKeywordValue=i},33619:e=>{"use strict";e.exports=function e(t){return null===t||"object"!=typeof t||null!=t.toJSON?JSON.stringify(t):Array.isArray(t)?"["+t.reduce(((t,r,n)=>t+(0===n?"":",")+e(void 0===r||"symbol"==typeof r?null:r)),"")+"]":"{"+Object.keys(t).sort().reduce(((r,n,i)=>void 0===t[n]||"symbol"==typeof t[n]?r:r+(0===r.length?"":",")+e(n)+":"+e(t[n])),"")+"}"}},85832:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(45920),t),i(r(7814),t)},45920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonLdSerializer=void 0;const n=r(27202),i=r(85071),a=r(7814),o=r(58521);class s extends o.Transform{constructor(e={}){super({objectMode:!0}),this.indentation=0,this.options=e,this.options.baseIRI&&!this.options.context&&(this.options.context={"@base":this.options.baseIRI}),this.options.context?(this.originalContext=this.options.context,this.context=(new n.ContextParser).parse(this.options.context,{baseIRI:this.options.baseIRI})):this.context=Promise.resolve(new n.JsonLdContextNormalized({}))}import(e){const t=new o.PassThrough({objectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new s(this.options));return r}_transform(e,t,r){this.context.then((t=>{this.transformQuad(e,t),r()})).catch(r)}async list(e){const t=await this.context;return{"@list":e.map((e=>a.Util.termToValue(e,t,this.options)))}}_flush(e){return this.opened||this.pushDocumentStart(),this.lastPredicate&&this.endPredicate(),this.lastSubject&&this.endSubject(),this.lastGraph&&"DefaultGraph"!==this.lastGraph.termType&&this.endGraph(),this.endDocument(),e(null,null)}transformQuad(e,t){this.opened||this.pushDocumentStart();const r=this.lastGraph&&"DefaultGraph"!==this.lastGraph.termType&&this.lastGraph.equals(e.subject);if(!(r||this.lastGraph&&e.graph.equals(this.lastGraph))){let r="DefaultGraph"!==e.graph.termType&&this.lastSubject&&this.lastSubject.equals(e.graph);this.lastGraph&&("DefaultGraph"!==this.lastGraph.termType?(this.endPredicate(),this.endSubject(),this.endGraph(!0),r=!1):r?(this.endPredicate(!0),this.lastSubject=null):(this.endPredicate(),this.endSubject(!0))),"DefaultGraph"!==e.graph.termType&&(r||this.pushId(e.graph,!0,t),this.pushSeparator(this.options.space?i.SeparatorType.GRAPH_FIELD_NONCOMPACT:i.SeparatorType.GRAPH_FIELD_COMPACT),this.indentation++),this.lastGraph=e.graph}this.lastSubject&&e.subject.equals(this.lastSubject)||(r?(this.endPredicate(),this.endSubject(),this.indentation--,this.pushSeparator(i.SeparatorType.ARRAY_END_COMMA),this.lastGraph=e.graph):(this.lastSubject&&(this.endPredicate(),this.endSubject(!0)),this.pushId(e.subject,!0,t)),this.lastSubject=e.subject),this.lastPredicate&&e.predicate.equals(this.lastPredicate)||(this.lastPredicate&&this.endPredicate(!0),this.pushPredicate(e.predicate,t)),this.pushObject(e.object,t)}pushDocumentStart(){this.opened=!0,this.originalContext&&!this.options.excludeContext?(this.pushSeparator(i.SeparatorType.OBJECT_START),this.indentation++,this.pushSeparator(i.SeparatorType.CONTEXT_FIELD),this.pushIndented(JSON.stringify(this.originalContext,null,this.options.space)+","),this.pushSeparator(this.options.space?i.SeparatorType.GRAPH_FIELD_NONCOMPACT:i.SeparatorType.GRAPH_FIELD_COMPACT),this.indentation++):(this.pushSeparator(i.SeparatorType.ARRAY_START),this.indentation++)}pushId(e,t,r){if("Quad"===e.termType)this.pushNestedQuad(e,!0,r);else{const n="BlankNode"===e.termType?"_:"+e.value:r.compactIri(e.value,!1);t?this.pushSeparator(i.SeparatorType.OBJECT_START):(this.push(i.SeparatorType.OBJECT_START.label),this.options.space&&this.push("\n")),this.indentation++,this.pushIndented(this.options.space?`"@id": "${n}",`:`"@id":"${n}",`)}}pushPredicate(e,t){let r=e.value;this.options.useRdfType||r!==a.Util.RDF_TYPE||(r="@type",this.objectOptions=Object.assign(Object.assign({},this.options),{compactIds:!0,vocab:!0}));const n=t.compactIri(r,!0);this.pushIndented(this.options.space?`"${n}": [`:`"${n}":[`),this.indentation++,this.lastPredicate=e}pushObject(e,t){if(this.hadObjectForPredicate?this.pushSeparator(i.SeparatorType.COMMA):this.hadObjectForPredicate=!0,"Quad"===e.termType){const r=this.lastSubject,n=this.lastPredicate;return this.hadObjectForPredicate=!1,this.pushNestedQuad(e,!1,t),this.endSubject(!1),this.hadObjectForPredicate=!0,this.lastPredicate=n,void(this.lastSubject=r)}let r;try{r=e["@list"]?e:a.Util.termToValue(e,t,this.objectOptions||this.options)}catch(e){return this.emit("error",e)}this.pushIndented(JSON.stringify(r,null,this.options.space))}pushNestedQuad(e,t,r){this.pushSeparator(i.SeparatorType.OBJECT_START),this.indentation++,this.pushIndented(this.options.space?'"@id": ':'"@id":',!1),"DefaultGraph"!==e.graph.termType&&this.emit("error",new Error(`Found a nested quad with the non-default graph: ${e.graph.value}`)),this.pushId(e.subject,!1,r),this.pushPredicate(e.predicate,r),this.pushObject(e.object,r),this.endPredicate(!1),this.endSubject(t)}endDocument(){this.opened=!1,this.originalContext&&!this.options.excludeContext?(this.indentation--,this.pushSeparator(i.SeparatorType.ARRAY_END),this.indentation--,this.pushSeparator(i.SeparatorType.OBJECT_END)):(this.indentation--,this.pushSeparator(i.SeparatorType.ARRAY_END))}endPredicate(e){this.indentation--,this.pushSeparator(e?i.SeparatorType.ARRAY_END_COMMA:i.SeparatorType.ARRAY_END),this.hadObjectForPredicate=!1,this.objectOptions=null,this.lastPredicate=null}endSubject(e){this.indentation--,this.pushSeparator(e?i.SeparatorType.OBJECT_END_COMMA:i.SeparatorType.OBJECT_END),this.lastSubject=null}endGraph(e){this.indentation--,this.pushSeparator(i.SeparatorType.ARRAY_END),this.indentation--,this.pushSeparator(e?i.SeparatorType.OBJECT_END_COMMA:i.SeparatorType.OBJECT_END),this.lastGraph=null}pushSeparator(e){this.pushIndented(e.label)}pushIndented(e,t=!0){const r=this.getIndentPrefix(),n=e.split("\n").map((e=>r+e)).join("\n");this.push(n),this.options.space&&t&&this.push("\n")}getIndentPrefix(){return this.options.space?this.options.space.repeat(this.indentation):""}}t.JsonLdSerializer=s},85071:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeparatorType=void 0;class r{constructor(e){this.label=e}}t.SeparatorType=r,r.COMMA=new r(","),r.OBJECT_START=new r("{"),r.OBJECT_END=new r("}"),r.OBJECT_END_COMMA=new r("},"),r.ARRAY_START=new r("["),r.ARRAY_END=new r("]"),r.ARRAY_END_COMMA=new r("],"),r.GRAPH_FIELD_NONCOMPACT=new r('"@graph": ['),r.GRAPH_FIELD_COMPACT=new r('"@graph":['),r.CONTEXT_FIELD=new r('"@context":')},7814:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(27202);class i{static termToValue(e,t,r={compactIds:!1,useNativeTypes:!1}){switch(e.termType){case"NamedNode":const a=t.compactIri(e.value,r.vocab);return r.compactIds?a:{"@id":a};case"DefaultGraph":return r.compactIds?e.value:{"@id":e.value};case"BlankNode":const o=`_:${e.value}`;return r.compactIds?o:{"@id":o};case"Literal":if(e.datatype.value===i.RDF_JSON){let t;try{t=JSON.parse(e.value)}catch(e){throw new n.ErrorCoded("Invalid JSON literal: "+e.message,n.ERROR_CODES.INVALID_JSON_LITERAL)}return{"@value":t,"@type":"@json"}}if("i18n-datatype"===r.rdfDirection&&e.datatype.value.startsWith(i.I18N)){const[t,r]=e.datatype.value.substr(i.I18N.length,e.datatype.value.length).split("_");return Object.assign(Object.assign({"@value":e.value},t?{"@language":t}:{}),r?{"@direction":r}:{})}const s=e.datatype.value===i.XSD_STRING,c={"@value":!s&&r.useNativeTypes?i.stringToNativeType(e.value,e.datatype.value):e.value};return e.language?Object.assign(Object.assign({},c),{"@language":e.language}):s||"string"!=typeof c["@value"]?c:Object.assign(Object.assign({},c),{"@type":e.datatype.value})}}static stringToNativeType(e,t){if(t.startsWith(i.XSD))switch(t.substr(i.XSD.length)){case"boolean":if("true"===e)return!0;if("false"===e)return!1;throw new Error(`Invalid xsd:boolean value '${e}'`);case"integer":case"number":case"int":case"byte":case"long":const t=parseInt(e,10);if(isNaN(t))throw new Error(`Invalid xsd:integer value '${e}'`);return t;case"float":case"double":const r=parseFloat(e);if(isNaN(r))throw new Error(`Invalid xsd:float value '${e}'`);return r}return e}}t.Util=i,i.XSD="http://www.w3.org/2001/XMLSchema#",i.XSD_STRING=i.XSD+"string",i.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i.RDF_TYPE=i.RDF+"type",i.RDF_JSON=i.RDF+"JSON",i.I18N="https://www.w3.org/ns/i18n#"},5558:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(64295),t),i(r(49999),t),i(r(91094),t),i(r(86625),t),i(r(38303),t),i(r(30573),t),i(r(12104),t),i(r(35573),t),i(r(60179),t),i(r(34260),t)},30573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},12104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},35573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},60179:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MicrodataRdfParser=void 0;const n=r(15482),i=r(58521),a=r(49999),o=r(91094),s=r(86625),c=r(38303),u=r(34260),l=r(94066);class d extends i.Transform{constructor(e){super({readableObjectMode:!0}),this.itemScopeStack=[],this.textBufferStack=[],this.isEmittingReferences=!1,this.pendingItemRefsDomain={},this.pendingItemRefsRangeFinalized={},this.pendingItemRefsRangeCollecting={},e=e||{},this.options=e,this.util=new u.Util(e.dataFactory,e.baseIRI),this.defaultGraph=e.defaultGraph||this.util.dataFactory.defaultGraph(),this.htmlParseListener=e.htmlParseListener,this.vocabRegistry=e.vocabRegistry||l,this.parser=this.initializeParser(!!e.xmlMode)}import(e){const t=new i.PassThrough({readableObjectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new d(this.options));return r}_transform(e,t,r){this.parser.write(e.toString()),r()}_flush(e){this.parser.end(),e()}getItemScope(e){let t=this.itemScopeStack.length-(e?2:1);for(;t>0&&!this.itemScopeStack[t];)t--;return this.itemScopeStack[t]}getDepth(){return this.itemScopeStack.length}onTagOpen(e,t){if(!this.isEmittingReferences){if("id"in t){const e=t.id;this.pendingItemRefsRangeCollecting[e]={events:[],counter:0,ids:[]}}for(const r of Object.values(this.pendingItemRefsRangeCollecting))r.counter++,r.events.push({type:"open",name:e,attributes:t})}let r;if(this.textBufferStack.push(void 0),"itemscope"in t){let e;if(this.emittingReferencesItemScopeIdGenerator)e=this.emittingReferencesItemScopeIdGenerator();else{e="itemid"in t&&this.util.createSubject(t.itemid)||this.util.dataFactory.blankNode();for(const t of Object.values(this.pendingItemRefsRangeCollecting))t.ids.push(e)}r={subject:e},this.isEmittingReferences&&(r.blockEmission=!0);const n=this.getItemScope();n&&n.vocab&&(r.vocab=n.vocab),this.itemScopeStack.push(r)}else r=this.getItemScope(),this.itemScopeStack.push(void 0);if(r){if("itemtype"in t)for(const e of this.util.createVocabIris(t.itemtype,r,!1))r.vocab||(r.vocab=this.util.deriveVocab(e.value,this.vocabRegistry)),r.blockEmission||this.emitTriple(r.subject,this.util.dataFactory.namedNode(`${u.Util.RDF}type`),e);if("lang"in t&&(r.language=t.lang),"xml:lang"in t&&(r.language=t["xml:lang"]),"itemscope"in t&&!this.isEmittingReferences&&"itemref"in t)for(const e of t.itemref.split(/\s+/u))e in this.pendingItemRefsDomain||(this.pendingItemRefsDomain[e]=[]),this.pendingItemRefsDomain[e].push(r),this.tryToEmitReferences(e,r)}"itemprop"in t&&this.handleItemProperties(t.itemprop,!1,r,e,t),"itemprop-reverse"in t&&this.handleItemProperties(t["itemprop-reverse"],!0,r,e,t)}onText(e){if(!this.isEmittingReferences)for(const t of Object.values(this.pendingItemRefsRangeCollecting))t.events.push({type:"text",data:e});for(const t of this.textBufferStack)t&&t.push(e)}onTagClose(){if(!this.isEmittingReferences)for(const[e,t]of Object.entries(this.pendingItemRefsRangeCollecting))t.counter--,t.events.push({type:"close"}),0===t.counter&&(this.pendingItemRefsRangeFinalized[e]=t,delete this.pendingItemRefsRangeCollecting[e],this.tryToEmitReferences(e));const e=this.getItemScope(!0);if(e){const t=this.getDepth();if(e.predicates&&t in e.predicates)for(const[r,n]of Object.entries(e.predicates[t])){const i=this.util.createLiteral(this.textBufferStack[t].join(""),e);this.emitPredicateTriples(e,n,i,"reverse"===r),delete e.predicates[t][r]}}this.itemScopeStack.pop(),this.textBufferStack.pop()}onEnd(){}initializeParser(e){return new n.Parser({onclosetag:()=>{try{this.onTagClose(),this.htmlParseListener&&this.htmlParseListener.onTagClose()}catch(e){this.emit("error",e)}},onend:()=>{try{this.onEnd(),this.htmlParseListener&&this.htmlParseListener.onEnd()}catch(e){this.emit("error",e)}},onopentag:(e,t)=>{try{this.onTagOpen(e,t),this.htmlParseListener&&this.htmlParseListener.onTagOpen(e,t)}catch(e){this.emit("error",e)}},ontext:e=>{try{this.onText(e),this.htmlParseListener&&this.htmlParseListener.onText(e)}catch(e){this.emit("error",e)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:e})}handleItemProperties(e,t,r,n,i){const a=this.getItemScope(!0);if(a){const o=this.getDepth(),s=this.util.createVocabIris(e,a,!0);a.predicates||(a.predicates={}),a.predicates[o]||(a.predicates[o]={});const c=t?"reverse":"forward";a.predicates[o][c]=s;for(const t of this.util.getVocabularyExpansionType(e,a,this.vocabRegistry))s.push(t);if(r&&"itemscope"in i)this.emitPredicateTriples(a,s,r.subject,t),delete a.predicates[o][c];else for(const e of d.ITEM_PROPERTY_HANDLERS)if(e.canHandle(n,i)){const r=e.getObject(i,this.util,a);this.emitPredicateTriples(a,s,r,t),delete a.predicates[o][c]}a.predicates[o][c]&&(this.textBufferStack[o]=[])}}emitPredicateTriples(e,t,r,n){if(!e.blockEmission)for(const i of t)n?"Literal"!==r.termType&&this.emitTriple(r,i,e.subject):this.emitTriple(e.subject,i,r)}emitTriple(e,t,r){this.push(this.util.dataFactory.quad(e,t,r,this.defaultGraph))}tryToEmitReferences(e,t){const r=this.pendingItemRefsRangeFinalized[e];if(r){let n;if(t){n=[t];const r=this.pendingItemRefsDomain[e].indexOf(t);this.pendingItemRefsDomain[e].splice(r,1)}else n=this.pendingItemRefsDomain[e],delete this.pendingItemRefsDomain[e];if(n){const e=this.itemScopeStack,t=this.textBufferStack;this.isEmittingReferences=!0;for(const e of n){this.itemScopeStack=[e],this.textBufferStack=[void 0];const t=[...r.ids];this.emittingReferencesItemScopeIdGenerator=()=>t.shift();for(const e of r.events)switch(e.type){case"open":this.onTagOpen(e.name,e.attributes);break;case"text":this.onText(e.data);break;case"close":this.onTagClose()}}this.emittingReferencesItemScopeIdGenerator=void 0,this.itemScopeStack=e,this.textBufferStack=t,this.isEmittingReferences=!1}}}}t.MicrodataRdfParser=d,d.ITEM_PROPERTY_HANDLERS=[new a.ItemPropertyHandlerContent,new c.ItemPropertyHandlerUrl("a","href"),new c.ItemPropertyHandlerUrl("area","href"),new c.ItemPropertyHandlerUrl("audio","src"),new c.ItemPropertyHandlerUrl("embed","src"),new c.ItemPropertyHandlerUrl("iframe","src"),new c.ItemPropertyHandlerUrl("img","src"),new c.ItemPropertyHandlerUrl("link","href"),new c.ItemPropertyHandlerUrl("object","data"),new c.ItemPropertyHandlerUrl("source","src"),new c.ItemPropertyHandlerUrl("track","src"),new c.ItemPropertyHandlerUrl("video","src"),new o.ItemPropertyHandlerNumber("data","value"),new o.ItemPropertyHandlerNumber("meter","value"),new s.ItemPropertyHandlerTime]},34260:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(18050),i=r(9929);class a{constructor(e,t){this.dataFactory=e||new n.DataFactory,this.baseIRI=t||""}static isValidIri(e){return a.IRI_REGEX.test(e)}createVocabIris(e,t,r){return e.split(/\s+/u).filter((e=>!!e)).map((e=>{if(!a.isValidIri(e)){if(!r)return;e=`${t.vocab||`${this.baseIRI}#`}${e}`}return this.dataFactory.namedNode(e)})).filter((e=>!!e))}getVocabularyExpansionType(e,t,r){const n=e.split(/\s+/u);if(n.includes("subPropertyOf")||n.includes("equivalentProperty"))return[this.dataFactory.namedNode(`${a.RDF}type`)];if(t.vocab&&t.vocab in r&&r[t.vocab].properties){let e=[];for(const[i,a]of Object.entries(r[t.vocab].properties))n.includes(i)&&(e=[...Object.values(a).map((e=>this.dataFactory.namedNode(e)))]);return e}return[]}createSubject(e){if(!a.isValidIri(e))try{e=(0,i.resolve)(e,this.baseIRI)}catch(e){return}return this.dataFactory.namedNode(e)}createLiteral(e,t){return this.dataFactory.literal(e,t.language)}deriveVocab(e,t){let r;for(const n in t)if(e.startsWith(n)){r=n,r.endsWith("/")||(r+="#");break}if(!r){const t=e.indexOf("#");r=t>0?e.slice(0,t+1):(0,i.resolve)(".",e)}return r}}t.Util=a,a.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",a.XSD="http://www.w3.org/2001/XMLSchema#",a.RDFA="http://www.w3.org/ns/rdfa#",a.IRI_REGEX=/^([A-Za-z][\d+-.A-Za-z]*|_):[^ "<>[\\\]`{|}]*$/u},64295:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},49999:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemPropertyHandlerContent=void 0,t.ItemPropertyHandlerContent=class{canHandle(e,t){return"content"in t}getObject(e,t,r){return t.createLiteral(e.content,r)}}},91094:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemPropertyHandlerNumber=void 0;const n=r(34260);t.ItemPropertyHandlerNumber=class{constructor(e,t){this.tagName=e,this.attributeName=t}canHandle(e,t){return this.tagName===e&&this.attributeName in t}getObject(e,t,r){const i=e[this.attributeName];let a;return Number.isNaN(Number.parseInt(i,10))||i.includes(".")?Number.isNaN(Number.parseFloat(i))||(a=`${n.Util.XSD}double`):a=`${n.Util.XSD}integer`,t.dataFactory.literal(i,a&&t.dataFactory.namedNode(a))}}},86625:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemPropertyHandlerTime=void 0;const n=r(34260);class i{canHandle(e,t){return"time"===e&&"datetime"in t}getObject(e,t,r){const a=e.datetime;let o;for(const e of i.TIME_REGEXES)if(e.regex.test(a)){o=t.dataFactory.namedNode(n.Util.XSD+e.type);break}return t.dataFactory.literal(a,o)}}t.ItemPropertyHandlerTime=i,i.TIME_REGEXES=[{regex:/^-?P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d)?S)?)?$/u,type:"duration"},{regex:/^\d+-\d\d-\d\dT\d\d:\d\d:\d\d((Z?)|([+-]\d\d:\d\d))$/u,type:"dateTime"},{regex:/^\d+-\d\d-\d\dZ?$/u,type:"date"},{regex:/^\d\d:\d\d:\d\d((Z?)|([+-]\d\d:\d\d))$/u,type:"time"},{regex:/^\d+-\d\d$/u,type:"gYearMonth"},{regex:/^\d+$/u,type:"gYear"}]},38303:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemPropertyHandlerUrl=void 0;const n=r(9929);t.ItemPropertyHandlerUrl=class{constructor(e,t){this.tagName=e,this.attributeName=t}canHandle(e,t){return this.tagName===e&&this.attributeName in t}getObject(e,t,r){return t.dataFactory.namedNode((0,n.resolve)(e[this.attributeName],t.baseIRI))}}},7784:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},72243:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BlankNode:()=>x,DataFactory:()=>T,DefaultGraph:()=>R,Lexer:()=>g,Literal:()=>E,NamedNode:()=>O,Parser:()=>C,Quad:()=>N,Store:()=>re,StreamParser:()=>ie,StreamWriter:()=>ae,Term:()=>S,Triple:()=>N,Util:()=>n,Variable:()=>A,Writer:()=>Y,default:()=>oe,termFromId:()=>I,termToId:()=>P});var n={};r.r(n),r.d(n,{inDefaultGraph:()=>V,isBlankNode:()=>F,isDefaultGraph:()=>q,isLiteral:()=>B,isNamedNode:()=>k,isVariable:()=>U,prefix:()=>Q,prefixes:()=>$});var i=r(59509),a=r.n(i);const o="http://www.w3.org/1999/02/22-rdf-syntax-ns#",s="http://www.w3.org/2001/XMLSchema#",c="http://www.w3.org/2000/10/swap/",u={xsd:{decimal:`${s}decimal`,boolean:`${s}boolean`,double:`${s}double`,integer:`${s}integer`,string:`${s}string`},rdf:{type:`${o}type`,nil:`${o}nil`,first:`${o}first`,rest:`${o}rest`,langString:`${o}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${c}reify#forSome`,forAll:`${c}reify#forAll`},log:{implies:`${c}log#implies`}},{xsd:l}=u,d=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,h={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},p=/[\x00-\x20<>\\"\{\}\|\^\`]/,f={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},y=/$0^/;class g{constructor(e){if(this._iri=/^<((?:[^ <>{}\\]|\\[uU])+)>[ \t]*/,this._unescapedIri=/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>[ \t]*/,this._simpleQuotedString=/^"([^"\\\r\n]*)"(?=[^"])/,this._simpleApostropheString=/^'([^'\\\r\n]*)'(?=[^'])/,this._langcode=/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\-])/i,this._prefix=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,this._prefixed=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?:[ \t]+|(?=\.?[,;!\^\s#()\[\]\{\}"'<>]))/,this._variable=/^\?(?:(?:[A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=[.,;!\^\s#()\[\]\{\}"'<>])/,this._blank=/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?:[ \t]+|(?=\.?[,;:\s#()\[\]\{\}"'<>]))/,this._number=/^[\-+]?(?:(\d+\.\d*|\.?\d+)[eE][\-+]?|\d*(\.)?)\d+(?=\.?[,;:\s#()\[\]\{\}"'<>])/,this._boolean=/^(?:true|false)(?=[.,;\s#()\[\]\{\}"'<>])/,this._keyword=/^@[a-z]+(?=[\s#<:])/i,this._sparqlKeyword=/^(?:PREFIX|BASE|GRAPH)(?=[\s#<])/i,this._shortPredicates=/^a(?=[\s#()\[\]\{\}"'<>])/,this._newline=/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,this._comment=/#([^\n\r]*)/,this._whitespace=/^[ \t]+/,this._endOfFile=/^(?:#[^\n\r]*)?$/,e=e||{},this._lineMode=!!e.lineMode){this._n3Mode=!1;for(const e in this)!(e in f)&&this[e]instanceof RegExp&&(this[e]=y)}else this._n3Mode=!1!==e.n3;this._comments=!!e.comments,this._literalClosingPos=0}_tokenizeToEnd(e,t){let r=this._input,n=r.length;for(;;){let e,o;for(;e=this._newline.exec(r);)this._comments&&(o=this._comment.exec(e[0]))&&i("comment",o[1],"",this._line,e[0].length),r=r.substr(e[0].length,r.length),n=r.length,this._line++;if(!e&&(e=this._whitespace.exec(r))&&(r=r.substr(e[0].length,r.length)),this._endOfFile.test(r))return t&&(this._comments&&(o=this._comment.exec(r))&&i("comment",o[1],"",this._line,r.length),r=null,i("eof","","",this._line,0)),this._input=r;const s=this._line,c=r[0];let u="",d="",h="",f=null,y=0,g=!1;switch(c){case"^":if(r.length<3)break;if("^"!==r[1]){this._n3Mode&&(y=1,u="^");break}if(this._previousMarker="^^",r=r.substr(2),"<"!==r[0]){g=!0;break}case"<":if(f=this._unescapedIri.exec(r))u="IRI",d=f[1];else if(f=this._iri.exec(r)){if(d=this._unescape(f[1]),null===d||p.test(d))return a(this);u="IRI"}else r.length>1&&"<"===r[1]?(u="<<",y=2):this._n3Mode&&r.length>1&&"="===r[1]&&(u="inverse",y=2,d=">");break;case">":r.length>1&&">"===r[1]&&(u=">>",y=2);break;case"_":((f=this._blank.exec(r))||t&&(f=this._blank.exec(`${r} `)))&&(u="blank",h="_",d=f[1]);break;case'"':if(f=this._simpleQuotedString.exec(r))d=f[1];else if(({value:d,matchLength:y}=this._parseLiteral(r)),null===d)return a(this);null===f&&0===y||(u="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(f=this._simpleApostropheString.exec(r))d=f[1];else if(({value:d,matchLength:y}=this._parseLiteral(r)),null===d)return a(this);null===f&&0===y||(u="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(f=this._variable.exec(r))&&(u="var",d=f[0]);break;case"@":"literal"===this._previousMarker&&(f=this._langcode.exec(r))?(u="langcode",d=f[1]):(f=this._keyword.exec(r))&&(u=f[0]);break;case".":if(1===r.length?t:r[1]<"0"||r[1]>"9"){u=".",y=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(f=this._number.exec(r)||t&&(f=this._number.exec(`${r} `)))&&(u="literal",d=f[0],h="string"==typeof f[1]?l.double:"string"==typeof f[2]?l.decimal:l.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(f=this._sparqlKeyword.exec(r))?u=f[0].toUpperCase():g=!0;break;case"f":case"t":(f=this._boolean.exec(r))?(u="literal",d=f[0],h=l.boolean):g=!0;break;case"a":(f=this._shortPredicates.exec(r))?(u="abbreviation",d="a"):g=!0;break;case"=":this._n3Mode&&r.length>1&&(u="abbreviation",">"!==r[1]?(y=1,d="="):(y=2,d=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"}":this._lineMode||(y=1,u=c);break;case"{":!this._lineMode&&r.length>=2&&("|"===r[1]?(u="{|",y=2):(u=c,y=1));break;case"|":r.length>=2&&"}"===r[1]&&(u="|}",y=2);break;default:g=!0}if(g&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(f=this._prefix.exec(r))?((f=this._prefixed.exec(r))||t&&(f=this._prefixed.exec(`${r} `)))&&(u="prefixed",h=f[1]||"",d=this._unescape(f[2])):(u="prefix",d=f[1]||"")),"^^"===this._previousMarker)switch(u){case"prefixed":u="type";break;case"IRI":u="typeIRI";break;default:u=""}if(!u)return t||!/^'''|^"""/.test(r)&&/\n|\r/.test(r)?a(this):this._input=r;const m=y||f[0].length,b=i(u,d,h,s,m);this.previousToken=b,this._previousMarker=u,r=r.substr(m,r.length)}function i(t,i,a,o,s){const c=r?n-r.length:n,u={type:t,value:i,prefix:a,line:o,start:c,end:c+s};return e(null,u),u}function a(t){e(t._syntaxError(/^\S*/.exec(r)[0]))}}_unescape(e){let t=!1;const r=e.replace(d,((e,r,n,i)=>{if("string"==typeof r)return String.fromCharCode(Number.parseInt(r,16));if("string"==typeof n){let e=Number.parseInt(n,16);return e<=65535?String.fromCharCode(Number.parseInt(n,16)):String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e))}return i in h?h[i]:(t=!0,"")}));return t?null:r}_parseLiteral(e){if(e.length>=3){const t=e.match(/^(?:"""|"|'''|'|)/)[0],r=t.length;let n=Math.max(this._literalClosingPos,r);for(;(n=e.indexOf(t,n))>0;){let t=0;for(;"\\"===e[n-t-1];)t++;if(t%2==0){const t=e.substring(r,n),i=t.split(/\r\n|\r|\n/).length-1,a=n+r;if(1===r&&0!==i||3===r&&this._lineMode)break;return this._line+=i,{value:this._unescape(t),matchLength:a}}n++}this._literalClosingPos=e.length-r+1}return{value:"",matchLength:0}}_syntaxError(e){this._input=null;const t=new Error(`Unexpected "${e}" on line ${this._line}.`);return t.context={token:void 0,line:this._line,previousToken:this.previousToken},t}_readStartingBom(e){return e.startsWith("\ufeff")?e.substr(1):e}tokenize(e,t){if(this._line=1,"string"==typeof e){if(this._input=this._readStartingBom(e),"function"!=typeof t){const e=[];let t;if(this._tokenizeToEnd(((r,n)=>r?t=r:e.push(n)),!0),t)throw t;return e}a()((()=>this._tokenizeToEnd(t,!0)))}else this._pendingBuffer=null,"function"==typeof e.setEncoding&&e.setEncoding("utf8"),e.on("data",(e=>{null!==this._input&&0!==e.length&&(this._pendingBuffer&&(e=Buffer.concat([this._pendingBuffer,e]),this._pendingBuffer=null),128&e[e.length-1]?this._pendingBuffer=e:(void 0===this._input?this._input=this._readStartingBom("string"==typeof e?e:e.toString()):this._input+=e,this._tokenizeToEnd(t,!1)))})),e.on("end",(()=>{"string"==typeof this._input&&this._tokenizeToEnd(t,!0)})),e.on("error",t)}}const{rdf:m,xsd:b}=u;let v,_=0;const w={namedNode:function(e){return new O(e)},blankNode:function(e){return new x(e||"n3-"+_++)},variable:function(e){return new A(e)},literal:function(e,t){if("string"==typeof t)return new E(`"${e}"@${t.toLowerCase()}`);let r=t?t.value:"";return""===r&&("boolean"==typeof e?r=b.boolean:"number"==typeof e&&(Number.isFinite(e)?r=Number.isInteger(e)?b.integer:b.double:(r=b.double,Number.isNaN(e)||(e=e>0?"INF":"-INF")))),""===r||r===b.string?new E(`"${e}"`):new E(`"${e}"^^${r}`)},defaultGraph:function(){return v},quad:D,triple:D},T=w;class S{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof S?this.id===e.id:!!e&&this.termType===e.termType&&this.value===e.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class O extends S{get termType(){return"NamedNode"}}class E extends S{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const e=this.id;let t=e.lastIndexOf('"')+1;return tnull),this._blankNodePrefix="string"!=typeof e.blankNodePrefix?"":e.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=e.lexer||new g({lineMode:s,n3:o}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){j=0}_setBase(e){if(e){const t=e.indexOf("#");t>=0&&(e=e.substr(0,t)),this._base=e,this._basePath=e.indexOf("/")<0?e:e.replace(/[^\/?]*(?:\?.*)?$/,""),e=e.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=e[0],this._baseScheme=e[1]}else this._base="",this._basePath=""}_saveContext(e,t,r,n,i){const a=this._n3Mode;this._contextStack.push({type:e,subject:r,predicate:n,object:i,graph:t,inverse:!!a&&this._inversePredicate,blankPrefix:a?this._prefixes._:"",quantified:a?this._quantified:null}),a&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.value}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(e,t){const r=this._contextStack.pop();if(!r||r.type!==e)return this._error(`Unexpected ${t.type}`,t);this._subject=r.subject,this._predicate=r.predicate,this._object=r.object,this._graph=r.graph,this._n3Mode&&(this._inversePredicate=r.inverse,this._prefixes._=r.blankPrefix,this._quantified=r.quantified)}_readInTopContext(e){switch(e.type){case"eof":return null!==this._graph?this._error("Unclosed graph",e):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"PREFIX":this._sparqlStyle=!0;case"@prefix":return this._readPrefix;case"BASE":this._sparqlStyle=!0;case"@base":return this._readBaseIRI;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(e)}}_readEntity(e,t){let r;switch(e.type){case"IRI":case"typeIRI":const t=this._resolveIRI(e.value);if(null===t)return this._error("Invalid IRI",e);r=this._namedNode(t);break;case"type":case"prefixed":const n=this._prefixes[e.prefix];if(void 0===n)return this._error(`Undefined prefix "${e.prefix}:"`,e);r=this._namedNode(n+e.value);break;case"blank":r=this._blankNode(this._prefixes[e.prefix]+e.value);break;case"var":r=this._variable(e.value.substr(1));break;default:return this._error(`Expected entity but got ${e.type}`,e)}return!t&&this._n3Mode&&r.id in this._quantified&&(r=this._quantified[r.id]),r}_readSubject(e){switch(this._predicate=null,e.type){case"[":return this._saveContext("blank",this._graph,this._subject=this._blankNode(),null,null),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this.RDF_NIL,null,null),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._graph=this._blankNode(),null,null),this._readSubject):this._error("Unexpected graph",e);case"}":return this._readPunctuation(e);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier=this._blankNode,this._readQuantifierList):this._error('Unexpected "@forSome"',e);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier=this._variable,this._readQuantifierList):this._error('Unexpected "@forAll"',e);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",e);if(0===e.prefix.length)return this._literalValue=e.value,this._completeSubjectLiteral;this._subject=this._literal(e.value,this._namedNode(e.prefix));break;case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",e);default:if(void 0===(this._subject=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(e){const t=e.type;switch(t){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[e.value];break;case".":case"]":case"}":return null===this._predicate?this._error(`Unexpected ${t}`,e):(this._subject=null,"]"===t?this._readBlankNodeTail(e):this._readPunctuation(e));case";":return null!==this._predicate?this._readPredicate:this._error("Expected predicate but got ;",e);case"[":if(this._n3Mode)return this._saveContext("blank",this._graph,this._subject,this._subject=this._blankNode(),null),this._readBlankNodeHead;case"blank":if(!this._n3Mode)return this._error("Disallowed blank node as predicate",e);default:if(void 0===(this._predicate=this._readEntity(e)))return}return this._readObject}_readObject(e){switch(e.type){case"literal":if(0===e.prefix.length)return this._literalValue=e.value,this._readDataTypeOrLang;this._object=this._literal(e.value,this._namedNode(e.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._blankNode()),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this._subject,this._predicate,this.RDF_NIL),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",e);default:if(void 0===(this._object=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._getContextEndReader())}return this._getContextEndReader()}_readPredicateOrNamedGraph(e){return"{"===e.type?this._readGraph(e):this._readPredicate(e)}_readGraph(e){return"{"!==e.type?this._error(`Expected graph but got ${e.type}`,e):(this._graph=this._subject,this._subject=null,this._readSubject)}_readBlankNodeHead(e){return"]"===e.type?(this._subject=null,this._readBlankNodeTail(e)):(this._predicate=null,this._readPredicate(e))}_readBlankNodeTail(e){if("]"!==e.type)return this._readBlankNodePunctuation(e);null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph);const t=null===this._predicate;return this._restoreContext("blank",e),null!==this._object?this._getContextEndReader():null!==this._predicate?this._readObject:t?this._readPredicateOrNamedGraph:this._readPredicateAfterBlank}_readPredicateAfterBlank(e){switch(e.type){case".":case"}":return this._subject=null,this._readPunctuation(e);default:return this._readPredicate(e)}}_readListItem(e){let t=null,r=null,n=this._readListItem;const i=this._subject,a=this._contextStack,o=a[a.length-1];switch(e.type){case"[":this._saveContext("blank",this._graph,r=this._blankNode(),this.RDF_FIRST,this._subject=t=this._blankNode()),n=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,r=this._blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext("list",e),0!==a.length&&"list"===a[a.length-1].type&&this._emit(this._subject,this._predicate,this._object,this._graph),null===this._predicate){if(n=this._readPredicate,this._subject===this.RDF_NIL)return n}else if(n=this._getContextEndReader(),this._object===this.RDF_NIL)return n;r=this.RDF_NIL;break;case"literal":0===e.prefix.length?(this._literalValue=e.value,n=this._readListItemDataTypeOrLang):(t=this._literal(e.value,this._namedNode(e.prefix)),n=this._getContextEndReader());break;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);default:if(void 0===(t=this._readEntity(e)))return}if(null===r&&(this._subject=r=this._blankNode()),null===i?null===o.predicate?o.subject=r:o.object=r:this._emit(i,this.RDF_REST,r,this._graph),null!==t){if(this._n3Mode&&("IRI"===e.type||"prefixed"===e.type))return this._saveContext("item",this._graph,r,this.RDF_FIRST,t),this._subject=t,this._predicate=null,this._getPathReader(this._readListItem);this._emit(r,this.RDF_FIRST,t,this._graph)}return n}_readDataTypeOrLang(e){return this._completeObjectLiteral(e,!1)}_readListItemDataTypeOrLang(e){return this._completeObjectLiteral(e,!0)}_completeLiteral(e){let t=this._literal(this._literalValue);switch(e.type){case"type":case"typeIRI":const r=this._readEntity(e);if(void 0===r)return;t=this._literal(this._literalValue,r),e=null;break;case"langcode":t=this._literal(this._literalValue,e.value),e=null}return{token:e,literal:t}}_completeSubjectLiteral(e){return this._subject=this._completeLiteral(e).literal,this._readPredicateOrNamedGraph}_completeObjectLiteral(e,t){const r=this._completeLiteral(e);if(r)return this._object=r.literal,t&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),null===r.token?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(r.token))}_readFormulaTail(e){return"}"!==e.type?this._readPunctuation(e):(null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext("formula",e),null===this._object?this._readPredicate:this._getContextEndReader())}_readPunctuation(e){let t,r=this._graph;const n=this._subject,i=this._inversePredicate;switch(e.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",e);if(this._n3Mode)return this._readFormulaTail(e);this._graph=null;case".":this._subject=null,t=this._contextStack.length?this._readSubject:this._readInTopContext,i&&(this._inversePredicate=!1);break;case";":t=this._readPredicate;break;case",":t=this._readObject;break;case"{|":if(!this._supportsRDFStar)return this._error("Unexpected RDF* syntax",e);const a=this._predicate,o=this._object;this._subject=this._quad(n,a,o,this.DEFAULTGRAPH),t=this._readPredicate;break;case"|}":if("Quad"!==this._subject.termType)return this._error("Unexpected asserted triple closing",e);this._subject=null,t=this._readPunctuation;break;default:if(this._supportsQuads&&null===this._graph&&void 0!==(r=this._readEntity(e))){t=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}if(null!==n){const e=this._predicate,t=this._object;i?this._emit(t,e,n,r):this._emit(n,e,t,r)}return t}_readBlankNodePunctuation(e){let t;switch(e.type){case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}return this._emit(this._subject,this._predicate,this._object,this._graph),t}_readQuadPunctuation(e){return"."!==e.type?this._error("Expected dot to follow quad",e):this._readInTopContext}_readPrefix(e){return"prefix"!==e.type?this._error("Expected prefix to follow @prefix",e):(this._prefix=e.value,this._readPrefixIRI)}_readPrefixIRI(e){if("IRI"!==e.type)return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,e);const t=this._readEntity(e);return this._prefixes[this._prefix]=t.value,this._prefixCallback(this._prefix,t),this._readDeclarationPunctuation}_readBaseIRI(e){const t="IRI"===e.type&&this._resolveIRI(e.value);return t?(this._setBase(t),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",e)}_readNamedGraphLabel(e){switch(e.type){case"IRI":case"blank":case"prefixed":return this._readSubject(e),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",e)}}_readNamedGraphBlankLabel(e){return"]"!==e.type?this._error("Invalid graph label",e):(this._subject=this._blankNode(),this._readGraph)}_readDeclarationPunctuation(e){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(e)):"."!==e.type?this._error("Expected declaration to end with a dot",e):this._readInTopContext}_readQuantifierList(e){let t;switch(e.type){case"IRI":case"prefixed":if(void 0!==(t=this._readEntity(e,!0)))break;default:return this._error(`Unexpected ${e.type}`,e)}return this._explicitQuantifiers?(null===this._subject?this._emit(this._graph||this.DEFAULTGRAPH,this._predicate,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH):this._emit(this._subject,this.RDF_REST,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH),this._emit(this._subject,this.RDF_FIRST,t,this.QUANTIFIERS_GRAPH)):this._quantified[t.id]=this._quantifier(this._blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(e){return","===e.type?this._readQuantifierList:(this._explicitQuantifiers&&(this._emit(this._subject,this.RDF_REST,this.RDF_NIL,this.QUANTIFIERS_GRAPH),this._subject=null),this._readCallback=this._getContextEndReader(),this._readCallback(e))}_getPathReader(e){return this._afterPath=e,this._readPath}_readPath(e){switch(e.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const t=this._contextStack,r=t.length&&t[t.length-1];if(r&&"item"===r.type){const t=this._subject;this._restoreContext("item",e),this._emit(this._subject,this.RDF_FIRST,t,this._graph)}return this._afterPath(e)}}_readForwardPath(e){let t,r;const n=this._blankNode();if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(t=this._subject,this._subject=n):(t=this._object,this._object=n),this._emit(t,r,n,this._graph),this._readPath}_readBackwardPath(e){const t=this._blankNode();let r,n;if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(n=this._subject,this._subject=t):(n=this._object,this._object=t),this._emit(t,r,n,this._graph),this._readPath}_readRDFStarTailOrGraph(e){return">>"!==e.type?this._supportsQuads&&null===this._graph&&void 0!==(this._graph=this._readEntity(e))?this._readRDFStarTail:this._error(`Expected >> to follow "${this._object.id}"`,e):this._readRDFStarTail(e)}_readRDFStarTail(e){if(">>"!==e.type)return this._error(`Expected >> but got ${e.type}`,e);const t=this._quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext("<<",e),null===this._subject?(this._subject=t,this._readPredicate):(this._object=t,this._getContextEndReader())}_getContextEndReader(){const e=this._contextStack;if(!e.length)return this._readPunctuation;switch(e[e.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem;case"formula":return this._readFormulaTail;case"<<":return this._readRDFStarTailOrGraph}}_emit(e,t,r,n){this._callback(null,this._quad(e,t,r,n||this.DEFAULTGRAPH))}_error(e,t){const r=new Error(`${e} on line ${t.line}.`);r.context={token:t,line:t.line,previousToken:this._lexer.previousToken},this._callback(r),this._callback=M}_resolveIRI(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)?e:this._resolveRelativeIRI(e)}_resolveRelativeIRI(e){if(!e.length)return this._base;switch(e[0]){case"#":return this._base+e;case"?":return this._base.replace(/(?:\?.*)?$/,e);case"/":return("/"===e[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(e);default:return/^[^/:]*:/.test(e)?null:this._removeDotSegments(this._basePath+e)}}_removeDotSegments(e){if(!/(^|\/)\.\.?($|[/#?])/.test(e))return e;const t=e.length;let r="",n=-1,i=-1,a=0,o="/";for(;n=i&&(r=r.substr(0,a)),"/"!==o)return`${r}/${e.substr(n+1)}`;a=n+1}}}o=e[++n]}return r+e.substring(a)}parse(e,t,r){if(this._readCallback=this._readInTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${j++}_`,this._prefixCallback=r||M,this._inversePredicate=!1,this._quantified=Object.create(null),!t){const t=[];let r;if(this._callback=(e,n)=>{e?r=e:n&&t.push(n)},this._lexer.tokenize(e).every((e=>this._readCallback=this._readCallback(e))),r)throw r;return t}this._callback=t,this._lexer.tokenize(e,((e,t)=>{null!==e?(this._callback(e),this._callback=M):this._readCallback&&(this._readCallback=this._readCallback(t))}))}}function M(){}function L(e,t){const r=t.namedNode;e._namedNode=r,e._blankNode=t.blankNode,e._literal=t.literal,e._variable=t.variable,e._quad=t.quad,e.DEFAULTGRAPH=t.defaultGraph(),e.RDF_FIRST=r(u.rdf.first),e.RDF_REST=r(u.rdf.rest),e.RDF_NIL=r(u.rdf.nil),e.N3_FORALL=r(u.r.forAll),e.N3_FORSOME=r(u.r.forSome),e.ABBREVIATIONS={a:r(u.rdf.type),"=":r(u.owl.sameAs),">":r(u.log.implies)},e.QUANTIFIERS_GRAPH=r("urn:n3:quantifiers")}function k(e){return!!e&&"NamedNode"===e.termType}function F(e){return!!e&&"BlankNode"===e.termType}function B(e){return!!e&&"Literal"===e.termType}function U(e){return!!e&&"Variable"===e.termType}function q(e){return!!e&&"DefaultGraph"===e.termType}function V(e){return q(e.graph)}function Q(e,t){return $({"":e.value||e},t)("")}function $(e,t){const r=Object.create(null);for(const t in e)n(t,e[t]);function n(e,n){if("string"==typeof n){const i=Object.create(null);r[e]=e=>i[e]||(i[e]=t.namedNode(n+e))}else if(!(e in r))throw new Error(`Unknown prefix: ${e}`);return r[e]}return t=t||T,n}L(C.prototype,T);const H=T.defaultGraph(),{rdf:G,xsd:z}=u,K=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,X=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,J={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class W extends S{equals(e){return e===this}}class Y{constructor(e,t){if(this._prefixRegex=/$0^/,e&&"function"!=typeof e.write&&(t=e,e=null),t=t||{},this._lists=t.lists,e)this._outputStream=e,this._endStream=void 0===t.end||!!t.end;else{let e="";this._outputStream={write(t,r,n){e+=t,n&&n()},end:t=>{t&&t(null,e)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(t.format)?(this._lineMode=!0,this._writeQuad=this._writeQuadLine):(this._lineMode=!1,this._graph=H,this._prefixIRIs=Object.create(null),t.prefixes&&this.addPrefixes(t.prefixes),t.baseIRI&&(this._baseMatcher=new RegExp(`^${ee(t.baseIRI)}${t.baseIRI.endsWith("/")?"":"[#?]"}`),this._baseLength=t.baseIRI.length))}get _inDefaultGraph(){return H.equals(this._graph)}_write(e,t){this._outputStream.write(e,"utf8",t)}_writeQuad(e,t,r,n,i){try{n.equals(this._graph)||(this._write((null===this._subject?"":this._inDefaultGraph?".\n":"\n}\n")+(H.equals(n)?"":`${this._encodeIriOrBlank(n)} {\n`)),this._graph=n,this._subject=null),e.equals(this._subject)?t.equals(this._predicate)?this._write(`, ${this._encodeObject(r)}`,i):this._write(`;\n ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i):this._write(`${(null===this._subject?"":".\n")+this._encodeSubject(this._subject=e)} ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i)}catch(e){i&&i(e)}}_writeQuadLine(e,t,r,n,i){delete this._prefixMatch,this._write(this.quadToString(e,t,r,n),i)}quadToString(e,t,r,n){return`${this._encodeSubject(e)} ${this._encodeIriOrBlank(t)} ${this._encodeObject(r)}${n&&n.value?` ${this._encodeIriOrBlank(n)} .\n`:" .\n"}`}quadsToString(e){return e.map((e=>this.quadToString(e.subject,e.predicate,e.object,e.graph))).join("")}_encodeSubject(e){return"Quad"===e.termType?this._encodeQuad(e):this._encodeIriOrBlank(e)}_encodeIriOrBlank(e){if("NamedNode"!==e.termType)return this._lists&&e.value in this._lists&&(e=this.list(this._lists[e.value])),"id"in e?e.id:`_:${e.value}`;let t=e.value;this._baseMatcher&&this._baseMatcher.test(t)&&(t=t.substr(this._baseLength)),K.test(t)&&(t=t.replace(X,Z));const r=this._prefixRegex.exec(t);return r?r[1]?this._prefixIRIs[r[1]]+r[2]:t:`<${t}>`}_encodeLiteral(e){let t=e.value;if(K.test(t)&&(t=t.replace(X,Z)),e.language)return`"${t}"@${e.language}`;if(this._lineMode){if(e.datatype.value===z.string)return`"${t}"`}else switch(e.datatype.value){case z.string:return`"${t}"`;case z.boolean:if("true"===t||"false"===t)return t;break;case z.integer:if(/^[+-]?\d+$/.test(t))return t;break;case z.decimal:if(/^[+-]?\d*\.\d+$/.test(t))return t;break;case z.double:if(/^[+-]?(?:\d+\.\d*|\.?\d+)[eE][+-]?\d+$/.test(t))return t}return`"${t}"^^${this._encodeIriOrBlank(e.datatype)}`}_encodePredicate(e){return e.value===G.type?"a":this._encodeIriOrBlank(e)}_encodeObject(e){switch(e.termType){case"Quad":return this._encodeQuad(e);case"Literal":return this._encodeLiteral(e);default:return this._encodeIriOrBlank(e)}}_encodeQuad({subject:e,predicate:t,object:r,graph:n}){return`<<${this._encodeSubject(e)} ${this._encodePredicate(t)} ${this._encodeObject(r)}${q(n)?"":` ${this._encodeIriOrBlank(n)}`}>>`}_blockedWrite(){throw new Error("Cannot write because the writer has been closed.")}addQuad(e,t,r,n,i){void 0===r?this._writeQuad(e.subject,e.predicate,e.object,e.graph,t):"function"==typeof n?this._writeQuad(e,t,r,H,n):this._writeQuad(e,t,r,n||H,i)}addQuads(e){for(let t=0;t.\n`)}if(r){let e="",t="";for(const r in this._prefixIRIs)e+=e?`|${r}`:r,t+=(t?"|":"")+this._prefixIRIs[r];e=ee(e),this._prefixRegex=new RegExp(`^(?:${t})[^/]*$|^(${e})([_a-zA-Z][\\-_a-zA-Z0-9]*)$`)}this._write(r?"\n":"",t)}blank(e,t){let r,n,i=e;switch(void 0===e?i=[]:e.termType?i=[{predicate:e,object:t}]:"length"in e||(i=[e]),n=i.length){case 0:return new W("[]");case 1:if(r=i[0],!(r.object instanceof W))return new W(`[ ${this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)} ]`);default:let t="[";for(let a=0;a{t=null,e(r,n)});if(this._endStream)try{return this._outputStream.end(t)}catch(e){}t&&t()}}function Z(e){let t=J[e];return void 0===t&&(1===e.length?(t=e.charCodeAt(0).toString(16),t="\\u0000".substr(0,6-t.length)+t):(t=(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)+9216).toString(16),t="\\U00000000".substr(0,10-t.length)+t)),t}function ee(e){return e.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&")}var te=r(58521);class re{constructor(e,t){this._size=0,this._graphs=Object.create(null),this._id=0,this._ids=Object.create(null),this._entities=Object.create(null),this._blankNodeIndex=0,t||!e||e[0]||(t=e,e=null),t=t||{},this._factory=t.factory||T,e&&this.addQuads(e)}_termFromId(e,t){if("."===e[0]){const t=this._entities,r=e.split(".");return this._factory.quad(this._termFromId(t[r[1]]),this._termFromId(t[r[2]]),this._termFromId(t[r[3]]),r[4]&&this._termFromId(t[r[4]]))}return I(e,t)}_termToNumericId(e){if("Quad"===e.termType){const t=this._termToNumericId(e.subject),r=this._termToNumericId(e.predicate),n=this._termToNumericId(e.object);let i;return t&&r&&n&&(q(e.graph)||(i=this._termToNumericId(e.graph)))&&this._ids[i?`.${t}.${r}.${n}.${i}`:`.${t}.${r}.${n}`]}return this._ids[P(e)]}_termToNewNumericId(e){const t=e&&"Quad"===e.termType?`.${this._termToNewNumericId(e.subject)}.${this._termToNewNumericId(e.predicate)}.${this._termToNewNumericId(e.object)}${q(e.graph)?"":`.${this._termToNewNumericId(e.graph)}`}`:P(e);return this._ids[t]||(this._ids[this._entities[++this._id]=t]=this._id)}get size(){let e=this._size;if(null!==e)return e;e=0;const t=this._graphs;let r,n;for(const i in t)for(const a in r=t[i].subjects)for(const t in n=r[a])e+=Object.keys(n[t]).length;return this._size=e}_addToIndex(e,t,r,n){const i=e[t]||(e[t]={}),a=i[r]||(i[r]={}),o=n in a;return o||(a[n]=null),!o}_removeFromIndex(e,t,r,n){const i=e[t],a=i[r];delete a[n];for(const e in a)return;delete i[r];for(const e in i)return;delete e[t]}*_findInIndex(e,t,r,n,i,a,o,s){let c,u,l;const d=this._entities,h=this._termFromId(s,this._factory),p={subject:null,predicate:null,object:null};t&&((c=e,e={})[t]=c[t]);for(const t in e)if(u=e[t]){p[i]=this._termFromId(d[t],this._factory),r&&((c=u,u={})[r]=c[r]);for(const e in u)if(l=u[e]){p[a]=this._termFromId(d[e],this._factory);const t=n?n in l?[n]:[]:Object.keys(l);for(let e=0;e{r in t||(t[r]=!0,e(this._termFromId(this._entities[r],this._factory)))}}add(e){return this.addQuad(e),this}addQuad(e,t,r,n){t||(n=e.graph,r=e.object,t=e.predicate,e=e.subject),n=P(n);let i=this._graphs[n];i||(i=this._graphs[n]={subjects:{},predicates:{},objects:{}},Object.freeze(i)),e=this._termToNewNumericId(e),t=this._termToNewNumericId(t),r=this._termToNewNumericId(r);const a=this._addToIndex(i.subjects,e,t,r);return this._addToIndex(i.predicates,t,r,e),this._addToIndex(i.objects,r,e,t),this._size=null,a}addQuads(e){for(let t=0;t{this.addQuad(e)})),e}removeQuad(e,t,r,n){t||(n=e.graph,r=e.object,t=e.predicate,e=e.subject),n=P(n);const i=this._graphs;let a,o,s;if(!((e=e&&this._termToNumericId(e))&&(t=t&&this._termToNumericId(t))&&(r=r&&this._termToNumericId(r))&&(a=i[n])&&(o=a.subjects[e])&&(s=o[t])&&r in s))return!1;for(e in this._removeFromIndex(a.subjects,e,t,r),this._removeFromIndex(a.predicates,t,r,e),this._removeFromIndex(a.objects,r,e,t),null!==this._size&&this._size--,a.subjects)return!0;return delete i[n],!0}removeQuads(e){for(let t=0;t{this.removeQuad(e)})),e}removeMatches(e,t,r,n){const i=new te.Readable({objectMode:!0});return i._read=()=>{for(const a of this.readQuads(e,t,r,n))i.push(a);i.push(null)},this.remove(i)}deleteGraph(e){return this.removeMatches(null,null,null,e)}getQuads(e,t,r,n){return[...this.readQuads(e,t,r,n)]}*readQuads(e,t,r,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s,c;if(!(e&&!(o=this._termToNumericId(e))||t&&!(s=this._termToNumericId(t))||r&&!(c=this._termToNumericId(r))))for(const e in i)(a=i[e])&&(o?c?yield*this._findInIndex(a.objects,c,o,s,"object","subject","predicate",e):yield*this._findInIndex(a.subjects,o,s,null,"subject","predicate","object",e):s?yield*this._findInIndex(a.predicates,s,c,null,"predicate","object","subject",e):c?yield*this._findInIndex(a.objects,c,null,null,"object","subject","predicate",e):yield*this._findInIndex(a.subjects,null,null,null,"subject","predicate","object",e))}match(e,t,r,n){return new ne(this,e,t,r,n)}countQuads(e,t,r,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s,c,u=0;if(e&&!(o=this._termToNumericId(e))||t&&!(s=this._termToNumericId(t))||r&&!(c=this._termToNumericId(r)))return 0;for(const n in i)(a=i[n])&&(u+=e?r?this._countInIndex(a.objects,c,o,s):this._countInIndex(a.subjects,o,s,c):t?this._countInIndex(a.predicates,s,c,o):this._countInIndex(a.objects,c,o,s));return u}forEach(e,t,r,n,i){this.some((t=>(e(t),!1)),t,r,n,i)}every(e,t,r,n,i){let a=!1;const o=!this.some((t=>(a=!0,!e(t))),t,r,n,i);return a&&o}some(e,t,r,n,i){for(const a of this.readQuads(t,r,n,i))if(e(a))return!0;return!1}getSubjects(e,t,r){const n=[];return this.forSubjects((e=>{n.push(e)}),e,t,r),n}forSubjects(e,t,r,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s;if(e=this._uniqueEntities(e),!(t&&!(o=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(a=i[n])&&(o?s?this._loopBy2Keys(a.predicates,o,s,e):this._loopByKey1(a.subjects,o,e):s?this._loopByKey0(a.objects,s,e):this._loop(a.subjects,e))}getPredicates(e,t,r){const n=[];return this.forPredicates((e=>{n.push(e)}),e,t,r),n}forPredicates(e,t,r,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s;if(e=this._uniqueEntities(e),!(t&&!(o=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(a=i[n])&&(o?s?this._loopBy2Keys(a.objects,s,o,e):this._loopByKey0(a.subjects,o,e):s?this._loopByKey1(a.predicates,s,e):this._loop(a.predicates,e))}getObjects(e,t,r){const n=[];return this.forObjects((e=>{n.push(e)}),e,t,r),n}forObjects(e,t,r,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s;if(e=this._uniqueEntities(e),!(t&&!(o=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(a=i[n])&&(o?s?this._loopBy2Keys(a.subjects,o,s,e):this._loopByKey1(a.objects,o,e):s?this._loopByKey0(a.predicates,s,e):this._loop(a.objects,e))}getGraphs(e,t,r){const n=[];return this.forGraphs((e=>{n.push(e)}),e,t,r),n}forGraphs(e,t,r,n){for(const i in this._graphs)this.some((t=>(e(t.graph),!0)),t,r,n,i)}createBlankNode(e){let t,r;if(e)for(t=e=`_:${e}`,r=1;this._ids[t];)t=e+r++;else do{t="_:b"+this._blankNodeIndex++}while(this._ids[t]);return this._ids[t]=++this._id,this._entities[this._id]=t,this._factory.blankNode(t.substr(2))}extractLists({remove:e=!1,ignoreErrors:t=!1}={}){const r={},n=t?()=>!0:(e,t)=>{throw new Error(`${e.value} ${t}`)},i=this.getQuads(null,u.rdf.rest,u.rdf.nil,null),a=e?[...i]:[];return i.forEach((t=>{const i=[];let o,s,c=!1;const l=t.graph;let d=t.subject;for(;d&&!c;){const e=this.getQuads(null,null,d,null),t=this.getQuads(d,null,null,null);let r,h=null,p=null,f=null;for(let i=0;i{switch(e){case"data":t=n;break;case"end":r=n}}},((e,t)=>{e&&this.emit("error",e)||t&&this.push(t)}),((e,t)=>{this.emit("prefix",e,t)})),this._transform=(e,r,n)=>{t(e),n()},this._flush=e=>{r(),e()}}import(e){return e.on("data",(e=>{this.write(e)})),e.on("end",(()=>{this.end()})),e.on("error",(e=>{this.emit("error",e)})),this}}class ae extends te.Transform{constructor(e){super({encoding:"utf8",writableObjectMode:!0});const t=this._writer=new Y({write:(e,t,r)=>{this.push(e),r&&r()},end:e=>{this.push(null),e&&e()}},e);this._transform=(e,r,n)=>{t.addQuad(e,n)},this._flush=e=>{t.end(e)}}import(e){return e.on("data",(e=>{this.write(e)})),e.on("end",(()=>{this.end()})),e.on("error",(e=>{this.emit("error",e)})),e.on("prefix",((e,t)=>{this._writer.addPrefix(e,t)})),this}}const oe={Lexer:g,Parser:C,Writer:Y,Store:re,StreamParser:ie,StreamWriter:ae,Util:n,DataFactory:T,Term:S,NamedNode:O,Literal:E,BlankNode:x,Variable:A,DefaultGraph:R,Quad:N,Triple:N,termFromId:I,termToId:P}},39907:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],u=!1,l=-1;function d(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&h())}function h(){if(!u){var e=o(d);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l1)for(var r=1;r{!function(){var t;t="object"==typeof window&&window?window:r.g,e.exports?e.exports=t.Promise?t.Promise:o:t.Promise||(t.Promise=o);var n=t.setImmediate||function(e){setTimeout(e,1)};function i(e,t){return function(){e.apply(t,arguments)}}var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],h(e,i(c,this),i(u,this))}function s(e){var t=this;null!==this._state?n((function(){var r=t._state?e.onFulfilled:e.onRejected;if(null!==r){var n;try{n=r(t._value)}catch(t){return void e.reject(t)}e.resolve(n)}else(t._state?e.resolve:e.reject)(t._value)})):this._deferreds.push(e)}function c(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void h(i(t,e),i(c,this),i(u,this))}this._state=!0,this._value=e,l.call(this)}catch(e){u.call(this,e)}}function u(e){this._state=!1,this._value=e,l.call(this)}function l(){for(var e=0,t=this._deferreds.length;e{let n;e.exports="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:r.g):e=>(n||(n=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)))},18050:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(73968),t),i(r(31352),t),i(r(81947),t),i(r(91417),t),i(r(88963),t),i(r(89135),t),i(r(22e3),t)},73968:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlankNode=void 0,t.BlankNode=class{constructor(e){this.termType="BlankNode",this.value=e}equals(e){return!!e&&"BlankNode"===e.termType&&e.value===this.value}}},31352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataFactory=void 0;const n=r(73968),i=r(81947),a=r(91417),o=r(88963),s=r(89135),c=r(22e3);let u=0;t.DataFactory=class{constructor(e){this.blankNodeCounter=0,e=e||{},this.blankNodePrefix=e.blankNodePrefix||`df_${u++}_`}namedNode(e){return new o.NamedNode(e)}blankNode(e){return new n.BlankNode(e||`${this.blankNodePrefix}${this.blankNodeCounter++}`)}literal(e,t){return new a.Literal(e,t)}variable(e){return new c.Variable(e)}defaultGraph(){return i.DefaultGraph.INSTANCE}quad(e,t,r,n){return new s.Quad(e,t,r,n||this.defaultGraph())}fromTerm(e){switch(e.termType){case"NamedNode":return this.namedNode(e.value);case"BlankNode":return this.blankNode(e.value);case"Literal":return e.language?this.literal(e.value,e.language):e.datatype.equals(a.Literal.XSD_STRING)?this.literal(e.value):this.literal(e.value,this.fromTerm(e.datatype));case"Variable":return this.variable(e.value);case"DefaultGraph":return this.defaultGraph();case"Quad":return this.quad(this.fromTerm(e.subject),this.fromTerm(e.predicate),this.fromTerm(e.object),this.fromTerm(e.graph))}}fromQuad(e){return this.fromTerm(e)}resetBlankNodeCounter(){this.blankNodeCounter=0}}},81947:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultGraph=void 0;class r{constructor(){this.termType="DefaultGraph",this.value=""}equals(e){return!!e&&"DefaultGraph"===e.termType}}t.DefaultGraph=r,r.INSTANCE=new r},91417:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Literal=void 0;const n=r(88963);class i{constructor(e,t){this.termType="Literal",this.value=e,"string"==typeof t?(this.language=t,this.datatype=i.RDF_LANGUAGE_STRING):t?(this.language="",this.datatype=t):(this.language="",this.datatype=i.XSD_STRING)}equals(e){return!!e&&"Literal"===e.termType&&e.value===this.value&&e.language===this.language&&this.datatype.equals(e.datatype)}}t.Literal=i,i.RDF_LANGUAGE_STRING=new n.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),i.XSD_STRING=new n.NamedNode("http://www.w3.org/2001/XMLSchema#string")},88963:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedNode=void 0,t.NamedNode=class{constructor(e){this.termType="NamedNode",this.value=e}equals(e){return!!e&&"NamedNode"===e.termType&&e.value===this.value}}},89135:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Quad=void 0,t.Quad=class{constructor(e,t,r,n){this.termType="Quad",this.value="",this.subject=e,this.predicate=t,this.object=r,this.graph=n}equals(e){return!!e&&("Quad"===e.termType||!e.termType)&&this.subject.equals(e.subject)&&this.predicate.equals(e.predicate)&&this.object.equals(e.object)&&this.graph.equals(e.graph)}}},22e3:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Variable=void 0,t.Variable=class{constructor(e){this.termType="Variable",this.value=e}equals(e){return!!e&&"Variable"===e.termType&&e.value===this.value}}},91032:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(9157),t)},9157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTermGrounded=t.termToSignature=t.quadToSignature=t.sha1hex=t.hashTerm=t.hashTerms=t.getGraphBlankNodes=t.uniqGraph=t.deindexGraph=t.indexGraph=t.getQuadsWithoutBlankNodes=t.getQuadsWithBlankNodes=t.hasValue=t.hashValues=t.getBijectionInner=t.getBijection=t.isomorphic=void 0;const n=r(99499),i=r(22112),a=r(13252);function o(e,t){const r=p(h(e)),n=p(h(t));if(Object.keys(r).length!==Object.keys(n).length)return null;for(const e in r)if(r[e]!==n[e])return null;return s(y(d(e)),y(d(t)),g(e),g(t))}function s(e,t,r,n,a,o){a||(a={}),o||(o={});const[d,h]=m(e,r,a),[p,f]=m(t,n,o);if(Object.keys(d).length!==Object.keys(p).length)return null;for(const e in d)if(!l(p,d[e]))return null;let y={};for(const e of r){const t=i.termToString(e),r=h[t];for(const e in f)if(f[e]===r){y[t]=e,delete f[e];break}}if(!c(Object.keys(y).sort(),r.map(i.termToString).sort())||!c(u(y).sort(),n.map(i.termToString).sort())){y=null;for(const a of r){const o=i.termToString(a);if(!d[o])for(const a of n){const c=i.termToString(a);if(!p[c]&&h[o]===f[c]){const i=v(o);y=s(e,t,r,n,Object.assign(Object.assign({},d),{[o]:i}),Object.assign(Object.assign({},p),{[c]:i}))}}}}return y}function c(e,t){if(e.length!==t.length)return!1;for(let r=e.length;r--;)if(e[r]!==t[r])return!1;return!0}function u(e){const t=[];for(const r in e)t.push(e[r]);return t}function l(e,t){for(const r in e)if(e[r]===t)return!0;return!1}function d(e){return e.filter((e=>a.someTerms(e,(e=>"BlankNode"===e.termType||"Quad"===e.termType&&a.getTermsNested(e).some((e=>"BlankNode"===e.termType))))))}function h(e){return e.filter((e=>a.everyTerms(e,(e=>"BlankNode"!==e.termType&&!("Quad"===e.termType&&a.getTermsNested(e).some((e=>"BlankNode"===e.termType)))))))}function p(e){const t={};for(const r of e)t[JSON.stringify(i.quadToStringQuad(r))]=!0;return t}function f(e){return Object.keys(e).map((e=>i.stringQuadToQuad(JSON.parse(e))))}function y(e){return f(p(e))}function g(e){return a.uniqTerms(e.map((e=>a.getBlankNodes(a.getTermsNested(e)))).reduce(((e,t)=>e.concat(t)),[]))}function m(e,t,r){const n=Object.assign({},r),a={};let o=!0;for(;o;){const r=Object.keys(n).length;for(const r of t){const t=i.termToString(r);if(!n[t]){const[i,o]=b(r,e,n);i&&(n[t]=o),a[t]=o}}const s={};for(const e in a){const t=a[e];void 0===s[t]?s[t]=e:s[t]=!1}for(const e in s){const t=s[e];t&&(n[t]=e)}o=r!==Object.keys(n).length}return[n,a]}function b(e,t,r){const n=[];let i=!0;for(const o of t){const t=a.getTermsNested(o);if(t.some((t=>t.equals(e)))){n.push(_(o,r,e));for(const n of t)T(n,r)||n.equals(e)||(i=!1)}}return[i,v(n.sort().join(""))]}function v(e){return n.sha1().update(e).digest("hex")}function _(e,t,r){return a.getTerms(e).map((e=>w(e,t,r))).join("|")}function w(e,t,r){return e.equals(r)?"@self":"BlankNode"===e.termType?t[i.termToString(e)]||"@blank":"Quad"===e.termType?`<${_(e,t,r)}>`:i.termToString(e)}function T(e,t){return"BlankNode"!==e.termType&&!("Quad"===e.termType&&a.getTermsNested(e).some((e=>!T(e,t))))||!!t[i.termToString(e)]}t.isomorphic=function(e,t){return!!o(e,t)},t.getBijection=o,t.getBijectionInner=s,t.hashValues=u,t.hasValue=l,t.getQuadsWithBlankNodes=d,t.getQuadsWithoutBlankNodes=h,t.indexGraph=p,t.deindexGraph=f,t.uniqGraph=y,t.getGraphBlankNodes=g,t.hashTerms=m,t.hashTerm=b,t.sha1hex=v,t.quadToSignature=_,t.termToSignature=w,t.isTermGrounded=T},80740:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.getSupportedJavaScriptPrimitives=t.getSupportedRdfDatatypes=t.getTermRaw=t.toRdf=t.fromRdf=void 0;const a=r(18050),o=r(23303),s=r(76516);i(r(23303),t),i(r(48959),t),i(r(76516),t);const c=new a.DataFactory,u=new s.Translator;function l(e,t){return u.fromRdf(e,t)}u.registerHandler(new o.TypeHandlerString,o.TypeHandlerString.TYPES.map((e=>c.namedNode(e))),["string"]),u.registerHandler(new o.TypeHandlerBoolean,[o.TypeHandlerBoolean.TYPE].map((e=>c.namedNode(e))),["boolean"]),u.registerHandler(new o.TypeHandlerNumberDouble,o.TypeHandlerNumberDouble.TYPES.map((e=>c.namedNode(e))),["number"]),u.registerHandler(new o.TypeHandlerNumberInteger,o.TypeHandlerNumberInteger.TYPES.map((e=>c.namedNode(e))),["number"]),u.registerHandler(new o.TypeHandlerDate,o.TypeHandlerDate.TYPES.map((e=>c.namedNode(e))),["object"]),t.fromRdf=l,t.toRdf=function(e,t){return t&&"namedNode"in t&&(t={dataFactory:t}),(t=t||{})&&!t.dataFactory&&(t.dataFactory=c),u.toRdf(e,t)},t.getTermRaw=function(e,t){return"Literal"===e.termType?l(e,t):e.value},t.getSupportedRdfDatatypes=function(){return u.getSupportedRdfDatatypes()},t.getSupportedJavaScriptPrimitives=function(){return u.getSupportedJavaScriptPrimitives()}},48959:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},76516:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Translator=void 0,t.Translator=class{constructor(){this.supportedRdfDatatypes=[],this.fromRdfHandlers={},this.toRdfHandlers={}}static incorrectRdfDataType(e){throw new Error(`Invalid RDF ${e.datatype.value} value: '${e.value}'`)}registerHandler(e,t,r){for(const r of t)this.supportedRdfDatatypes.push(r),this.fromRdfHandlers[r.value]=e;for(const t of r){let r=this.toRdfHandlers[t];r||(this.toRdfHandlers[t]=r=[]),r.push(e)}}fromRdf(e,t){const r=this.fromRdfHandlers[e.datatype.value];return r?r.fromRdf(e,t):e.value}toRdf(e,t){const r=this.toRdfHandlers[typeof e];if(r)for(const n of r){const r=n.toRdf(e,t);if(r)return r}throw new Error(`Invalid JavaScript value: '${e}'`)}getSupportedRdfDatatypes(){return this.supportedRdfDatatypes}getSupportedJavaScriptPrimitives(){return Object.keys(this.toRdfHandlers)}}},48403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerBoolean=void 0;const n=r(76516);class i{fromRdf(e,t){switch(e.value){case"true":case"1":return!0;case"false":case"0":return!1}return t&&n.Translator.incorrectRdfDataType(e),!1}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(e?"true":"false",t||r.namedNode(i.TYPE))}}i.TYPE="http://www.w3.org/2001/XMLSchema#boolean",t.TypeHandlerBoolean=i},5603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerDate=void 0;const n=r(76516);class i{fromRdf(e,t){switch(t&&!e.value.match(i.VALIDATORS[e.datatype.value.substr(33,e.datatype.value.length)])&&n.Translator.incorrectRdfDataType(e),e.datatype.value){case"http://www.w3.org/2001/XMLSchema#gDay":return new Date(0,0,parseInt(e.value,10));case"http://www.w3.org/2001/XMLSchema#gMonthDay":const t=e.value.split("-");return new Date(0,parseInt(t[0],10)-1,parseInt(t[1],10));case"http://www.w3.org/2001/XMLSchema#gYear":return new Date(e.value+"-01-01");case"http://www.w3.org/2001/XMLSchema#gYearMonth":return new Date(e.value+"-01");default:return new Date(e.value)}}toRdf(e,{datatype:t,dataFactory:r}){if(t=t||r.namedNode(i.TYPES[0]),!(e instanceof Date))return null;const n=e;let a;switch(t.value){case"http://www.w3.org/2001/XMLSchema#gDay":a=String(n.getUTCDate());break;case"http://www.w3.org/2001/XMLSchema#gMonthDay":a=n.getUTCMonth()+1+"-"+n.getUTCDate();break;case"http://www.w3.org/2001/XMLSchema#gYear":a=String(n.getUTCFullYear());break;case"http://www.w3.org/2001/XMLSchema#gYearMonth":a=n.getUTCFullYear()+"-"+(n.getUTCMonth()+1);break;case"http://www.w3.org/2001/XMLSchema#date":a=n.toISOString().replace(/T.*$/,"");break;default:a=n.toISOString()}return r.literal(a,t)}}i.TYPES=["http://www.w3.org/2001/XMLSchema#dateTime","http://www.w3.org/2001/XMLSchema#date","http://www.w3.org/2001/XMLSchema#gDay","http://www.w3.org/2001/XMLSchema#gMonthDay","http://www.w3.org/2001/XMLSchema#gYear","http://www.w3.org/2001/XMLSchema#gYearMonth"],i.VALIDATORS={date:/^[0-9]+-[0-9][0-9]-[0-9][0-9]Z?$/,dateTime:/^[0-9]+-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9](\.[0-9][0-9][0-9])?((Z?)|([\+-][0-9][0-9]:[0-9][0-9]))$/,gDay:/^[0-9]+$/,gMonthDay:/^[0-9]+-[0-9][0-9]$/,gYear:/^[0-9]+$/,gYearMonth:/^[0-9]+-[0-9][0-9]$/},t.TypeHandlerDate=i},25947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerNumberDouble=void 0;const n=r(76516);class i{fromRdf(e,t){const r=parseFloat(e.value);return t&&isNaN(r)&&n.Translator.incorrectRdfDataType(e),r}toRdf(e,{datatype:t,dataFactory:r}){return t=t||r.namedNode(i.TYPES[0]),isNaN(e)?r.literal("NaN",t):isFinite(e)?e%1==0?null:r.literal(e.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),t):r.literal(e>0?"INF":"-INF",t)}}i.TYPES=["http://www.w3.org/2001/XMLSchema#double","http://www.w3.org/2001/XMLSchema#decimal","http://www.w3.org/2001/XMLSchema#float"],t.TypeHandlerNumberDouble=i},83002:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerNumberInteger=void 0;const n=r(76516);class i{fromRdf(e,t){const r=parseInt(e.value,10);return t&&(isNaN(r)||e.value.indexOf(".")>=0)&&n.Translator.incorrectRdfDataType(e),r}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(String(e),t||(e<=i.MAX_INT&&e>=i.MIN_INT?r.namedNode(i.TYPES[0]):r.namedNode(i.TYPES[1])))}}i.TYPES=["http://www.w3.org/2001/XMLSchema#integer","http://www.w3.org/2001/XMLSchema#long","http://www.w3.org/2001/XMLSchema#int","http://www.w3.org/2001/XMLSchema#byte","http://www.w3.org/2001/XMLSchema#short","http://www.w3.org/2001/XMLSchema#negativeInteger","http://www.w3.org/2001/XMLSchema#nonNegativeInteger","http://www.w3.org/2001/XMLSchema#nonPositiveInteger","http://www.w3.org/2001/XMLSchema#positiveInteger","http://www.w3.org/2001/XMLSchema#unsignedByte","http://www.w3.org/2001/XMLSchema#unsignedInt","http://www.w3.org/2001/XMLSchema#unsignedLong","http://www.w3.org/2001/XMLSchema#unsignedShort"],i.MAX_INT=2147483647,i.MIN_INT=-2147483648,t.TypeHandlerNumberInteger=i},2074:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerString=void 0;class r{fromRdf(e){return e.value}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(e,t)}}r.TYPES=["http://www.w3.org/2001/XMLSchema#string","http://www.w3.org/2001/XMLSchema#normalizedString","http://www.w3.org/2001/XMLSchema#anyURI","http://www.w3.org/2001/XMLSchema#base64Binary","http://www.w3.org/2001/XMLSchema#language","http://www.w3.org/2001/XMLSchema#Name","http://www.w3.org/2001/XMLSchema#NCName","http://www.w3.org/2001/XMLSchema#NMTOKEN","http://www.w3.org/2001/XMLSchema#token","http://www.w3.org/2001/XMLSchema#hexBinary","http://www.w3.org/1999/02/22-rdf-syntax-ns#langString","http://www.w3.org/2001/XMLSchema#time","http://www.w3.org/2001/XMLSchema#duration"],t.TypeHandlerString=r},23303:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(48403),t),i(r(5603),t),i(r(25947),t),i(r(83002),t),i(r(2074),t)},10953:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.storeStream=void 0;const n=r(92427);t.storeStream=function(e){const t=n.RdfStore.createDefault();return new Promise(((r,n)=>t.import(e).on("error",n).once("end",(()=>r(t)))))}},92427:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(51368),t),i(r(2369),t),i(r(62947),t),i(r(12924),t),i(r(76386),t),i(r(94992),t),i(r(26503),t),i(r(86721),t),i(r(93616),t),i(r(55100),t),i(r(95832),t),i(r(68752),t),i(r(38654),t),i(r(15698),t),i(r(53277),t),i(r(86937),t),i(r(15291),t),i(r(29390),t),i(r(25383),t),i(r(39034),t)},15291:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},29390:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arePatternsQuoted=t.quadHasVariables=t.quadToPattern=t.encodeOptionalTerms=t.orderQuadComponents=t.getComponentOrderScore=t.getBestIndex=t.QUAD_TERM_NAMES_INVERSE=void 0;const n=r(13252);function i(e,t){return e.map(((r,n)=>t.includes(r)?e.length-n:0)).reduce(((e,t)=>e+t),0)}function a(e){for(const t of n.QUAD_TERM_NAMES){const r=e[t];if("Variable"===r.termType||"Quad"===r.termType&&a(r))return!0}return!1}t.QUAD_TERM_NAMES_INVERSE=Object.fromEntries(n.QUAD_TERM_NAMES.map(((e,t)=>[e,t]))),t.getBestIndex=function(e,t){if(1===e.length||t.every((e=>void 0!==e)))return 0;const r=[];for(let e=0;e({score:i(e,r),index:t}))).sort(((e,t)=>t.score-e.score))[0].index},t.getComponentOrderScore=i,t.orderQuadComponents=function(e,r){return e.map((e=>{const n=t.QUAD_TERM_NAMES_INVERSE[e];return r[n]}))},t.encodeOptionalTerms=function(e,t){const r=e.map((e=>{if(e){if("Quad"===e.termType&&a(e))return;const r=t.encodeOptional(e);return void 0===r?"none":r}return e}));if(!r.includes("none"))return r},t.quadToPattern=function(e,t,r,n,i){let a=!1;return[[e||void 0,t||void 0,r||void 0,n||void 0].map((e=>{if(e){if("Variable"===e.termType)return;if("Quad"===e.termType)return i?e:void(a=!0)}return e})),a]},t.quadHasVariables=a,t.arePatternsQuoted=function(e){return e.map((e=>"Quad"===(null==e?void 0:e.termType)&&a(e)))}},25383:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},39034:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStore=void 0;const n=r(76664),i=r(18050),a=r(13252),o=r(51368),s=r(76386),c=r(26503),u=r(68752),l=r(29390);class d{constructor(e){this.features={quotedTripleFiltering:!0},this._size=0,this.options=e,this.dataFactory=e.dataFactory,this.dictionary=e.dictionary,this.indexesWrapped=d.constructIndexesWrapped(e),this.indexesWrappedComponentOrders=this.indexesWrapped.map((e=>e.componentOrder))}static createDefault(){return new d({indexCombinations:d.DEFAULT_INDEX_COMBINATIONS,indexConstructor:e=>new u.RdfStoreIndexNestedMapQuoted(e),dictionary:new c.TermDictionaryQuotedIndexed(new s.TermDictionaryNumberRecordFullTerms),dataFactory:new i.DataFactory})}static constructIndexesWrapped(e){const t=[];if(0===e.indexCombinations.length)throw new Error("At least one index combination is required");for(const r of e.indexCombinations){if(!d.isCombinationValid(r))throw new Error(`Invalid index combination: ${r}`);t.push({index:e.indexConstructor(e),componentOrder:r,componentOrderInverse:Object.fromEntries(r.map(((e,t)=>[e,t])))})}return t}static isCombinationValid(e){for(const t of a.QUAD_TERM_NAMES)if(!e.includes(t))return!1;return 4===e.length}get size(){return this._size}addQuad(e){const t=[this.dictionary.encode(e.subject),this.dictionary.encode(e.predicate),this.dictionary.encode(e.object),this.dictionary.encode(e.graph)];let r=!1;for(const e of this.indexesWrapped)r=e.index.set((0,l.orderQuadComponents)(e.componentOrder,t),!0);return!!r&&(this._size++,!0)}removeQuad(e){const t=[this.dictionary.encodeOptional(e.subject),this.dictionary.encodeOptional(e.predicate),this.dictionary.encodeOptional(e.object),this.dictionary.encodeOptional(e.graph)];if(t.includes(void 0))return!1;let r=!1;for(const e of this.indexesWrapped)if(r=e.index.remove((0,l.orderQuadComponents)(e.componentOrder,t)),!r)break;return!!r&&(this._size--,!0)}remove(e){return e.on("data",(e=>this.removeQuad(e))),e}removeMatches(e,t,r,n){return this.remove(this.match(e,t,r,n))}deleteGraph(e){return"string"==typeof e&&(e=this.dataFactory.namedNode(e)),this.removeMatches(void 0,void 0,void 0,e)}import(e){return e.on("data",(e=>this.addQuad(e))),e}*readQuads(e,t,r,n){const i=Boolean(this.dictionary.features.quotedTriples)&&Object.values(this.indexesWrapped).every((e=>e.index.features.quotedTripleFiltering)),[o,s]=(0,l.quadToPattern)(e,t,r,n,i),c=this.indexesWrapped[(0,l.getBestIndex)(this.indexesWrappedComponentOrders,o)],u=(0,l.orderQuadComponents)(c.componentOrder,o);for(const i of c.index.find(u)){const o=this.dataFactory.quad(i[c.componentOrderInverse.subject],i[c.componentOrderInverse.predicate],i[c.componentOrderInverse.object],i[c.componentOrderInverse.graph]);s?(0,a.matchPattern)(o,e,t,r,n)&&(yield o):yield o}}getQuads(e,t,r,n){return[...this.readQuads(e,t,r,n)]}match(e,t,r,i){return(0,n.wrap)(this.readQuads(e,t,r,i))}countQuads(e,t,r,n){const i=Boolean(this.dictionary.features.quotedTriples)&&Object.values(this.indexesWrapped).every((e=>e.index.features.quotedTripleFiltering)),[a]=(0,l.quadToPattern)(e,t,r,n,i);if(a.every((e=>void 0===e)))return this.size;const o=this.indexesWrapped[(0,l.getBestIndex)(this.indexesWrappedComponentOrders,a)],s=(0,l.orderQuadComponents)(o.componentOrder,a);return o.index.count(s)}asDataset(){return new o.DatasetCoreWrapper(this)}}d.DEFAULT_INDEX_COMBINATIONS=[["graph","subject","predicate","object"],["graph","predicate","object","subject"],["graph","object","subject","predicate"]],t.RdfStore=d},51368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DatasetCoreWrapper=void 0;const n=r(39034);class i{constructor(e){this.store=e}get size(){return this.store.size}add(e){return this.store.addQuad(e),this}delete(e){return this.store.removeQuad(e),this}has(e){for(const t of this.store.readQuads(e.subject,e.predicate,e.object,e.graph))return!0;return!1}match(e,t,r,a){const o=new n.RdfStore(this.store.options);for(const n of this.store.readQuads(e,t,r,a))o.addQuad(n);return new i(o)}[Symbol.iterator](){return this.store.readQuads()}}t.DatasetCoreWrapper=i},2369:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},62947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryNumberMap=void 0;const n=r(18050),i=r(22112);t.TermDictionaryNumberMap=class{constructor(e=new n.DataFactory){this.lastId=0,this.dictionary=new Map,this.reverseDictionary=new Map,this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const t=(0,i.termToString)(e);let r=this.dictionary.get(t);return void 0===r&&(r=this.lastId++,this.dictionary.set(t,r),this.reverseDictionary.set(r,t)),r}encodeOptional(e){const t=(0,i.termToString)(e);return this.dictionary.get(t)}decode(e){const t=this.reverseDictionary.get(e);if(void 0===t)throw new Error(`The value ${e} is not present in this dictionary`);return(0,i.stringToTerm)(t,this.dataFactory)}encodings(){return this.reverseDictionary.keys()}findQuotedTriples(e){throw new Error("findQuotedTriples is not supported")}findQuotedTriplesEncoded(e){throw new Error("findQuotedTriplesEncoded is not supported")}}},12924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryNumberRecord=void 0;const n=r(18050),i=r(22112);t.TermDictionaryNumberRecord=class{constructor(e=new n.DataFactory){this.lastId=0,this.dictionary={},this.reverseDictionary={},this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const t=(0,i.termToString)(e);let r=this.dictionary[t];return void 0===r&&(r=this.lastId++,this.dictionary[t]=r,this.reverseDictionary[r]=t),r}encodeOptional(e){const t=(0,i.termToString)(e);return this.dictionary[t]}decode(e){const t=this.reverseDictionary[e];if(void 0===t)throw new Error(`The value ${e} is not present in this dictionary`);return(0,i.stringToTerm)(t,this.dataFactory)}*encodings(){for(const e of Object.keys(this.reverseDictionary))yield Number.parseInt(e,10)}findQuotedTriples(e){throw new Error("findQuotedTriples is not supported")}findQuotedTriplesEncoded(e){throw new Error("findQuotedTriplesEncoded is not supported")}}},76386:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryNumberRecordFullTerms=void 0;const n=r(18050),i=r(22112);t.TermDictionaryNumberRecordFullTerms=class{constructor(e=new n.DataFactory){this.lastId=0,this.dictionary={},this.reverseDictionary={},this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const t=(0,i.termToString)(e);let r=this.dictionary[t];return void 0===r&&(r=this.lastId++,this.dictionary[t]=r,this.reverseDictionary[r]=e),r}encodeOptional(e){const t=(0,i.termToString)(e);return this.dictionary[t]}decode(e){const t=this.reverseDictionary[e];if(void 0===t)throw new Error(`The value ${e} is not present in this dictionary`);return t}*encodings(){for(const e of Object.keys(this.reverseDictionary))yield Number.parseInt(e,10)}findQuotedTriples(e){throw new Error("findQuotedTriples is not supported")}findQuotedTriplesEncoded(e){throw new Error("findQuotedTriplesEncoded is not supported")}}},94992:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryQuoted=void 0;const n=r(18050),i=r(13252);class a{constructor(e,t,r=new n.DataFactory){this.features={quotedTriples:!0},this.plainTermDictionary=e,this.quotedTriplesDictionary=t,this.dataFactory=r}encode(e){return"Quad"===e.termType?a.BITMASK|1+this.quotedTriplesDictionary.encode(e):this.plainTermDictionary.encode(e)}encodeOptional(e){if("Quad"===e.termType){const t=this.quotedTriplesDictionary.encodeOptional(e);return void 0===t?t:a.BITMASK|1+t}return this.plainTermDictionary.encodeOptional(e)}decode(e){if(a.BITMASK&e){const t=(~a.BITMASK&e)-1;return this.quotedTriplesDictionary.decode(t)}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.encodings())yield a.BITMASK|1+e}*findQuotedTriples(e){for(const t of this.findQuotedTriplesEncoded(e))yield this.decode(t)}*findQuotedTriplesEncoded(e){for(let t of this.quotedTriplesDictionary.encodings()){t=a.BITMASK|1+t;const r=this.decode(t);(0,i.matchPattern)(r,e.subject,e.predicate,e.object,e.graph)&&(yield t)}}}a.BITMASK=1<<31,t.TermDictionaryQuoted=a},26503:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryQuotedIndexed=void 0;const n=r(18050),i=r(95832),a=r(29390);class o{constructor(e,t=new n.DataFactory){this.quotedTriplesDictionary=[],this.features={quotedTriples:!0},this.plainTermDictionary=e;const r={indexCombinations:[],indexConstructor:void 0,dictionary:this,dataFactory:t};this.quotedTriplesReverseDictionaries=[new i.RdfStoreIndexNestedMap(r),new i.RdfStoreIndexNestedMap(r),new i.RdfStoreIndexNestedMap(r)],this.dataFactory=t}encode(e){return"Quad"===e.termType?this.encodeQuotedTriple(e,!1):this.plainTermDictionary.encode(e)}encodeQuotedTriple(e,t){if("DefaultGraph"!==e.graph.termType)throw new Error("Encoding of quoted quads outside of the default graph is not allowed");const r=(0,a.encodeOptionalTerms)([e.subject,e.predicate,e.object,e.graph],this),n=r&&r.every((e=>void 0!==e))?this.quotedTriplesReverseDictionaries[0].getEncoded(r):void 0;if(void 0!==n||t)return void 0===n?void 0:o.BITMASK|n;const i=[this.encode(e.subject),this.encode(e.predicate),this.encode(e.object)],s=this.quotedTriplesDictionary.length+1;this.quotedTriplesDictionary.push(i);const c=this.encode(this.dataFactory.defaultGraph());return this.quotedTriplesReverseDictionaries[0].set([i[0],i[1],i[2],c],s),this.quotedTriplesReverseDictionaries[1].set([i[1],i[2],i[0],c],s),this.quotedTriplesReverseDictionaries[2].set([i[2],i[0],i[1],c],s),o.BITMASK|s}encodeOptional(e){return"Quad"===e.termType?this.encodeQuotedTriple(e,!0):this.plainTermDictionary.encodeOptional(e)}decode(e){if(o.BITMASK&e){const t=(~o.BITMASK&e)-1;if(t>=this.quotedTriplesDictionary.length)throw new Error(`The value ${e} is not present in the quoted triples range of the dictionary`);const r=this.quotedTriplesDictionary[t];return this.dataFactory.quad(this.decode(r[0]),this.decode(r[1]),this.decode(r[2]))}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.keys())yield o.BITMASK|1+e}*findQuotedTriples(e){for(const t of this.findQuotedTriplesEncoded(e))yield this.decode(t)}*findQuotedTriplesEncoded(e){const[t,r]=(0,a.quadToPattern)(e.subject,e.predicate,e.object,e.graph,!0);for(const e of this.patternToIterable(t[0]))for(const r of this.patternToIterable(t[1]))for(const n of this.patternToIterable(t[2]))for(const i of this.patternToIterable(t[3]))if(e&&r||!r&&!n){const a=[e,r,n,i];for(const e of this.quotedTriplesReverseDictionaries[0].findEncoded(a,t))yield o.BITMASK|this.quotedTriplesReverseDictionaries[0].getEncoded(e)}else if(!e&&r){const a=[r,n,e,i];for(const e of this.quotedTriplesReverseDictionaries[1].findEncoded(a,t))yield o.BITMASK|this.quotedTriplesReverseDictionaries[1].getEncoded(e)}else{const a=[n,e,r,i];for(const e of this.quotedTriplesReverseDictionaries[2].findEncoded(a,t))yield o.BITMASK|this.quotedTriplesReverseDictionaries[2].getEncoded(e)}}*patternToIterable(e){if("Quad"===(null==e?void 0:e.termType))return void(yield*this.findQuotedTriplesEncoded(e));if(void 0===e)return void(yield);const t=this.encodeOptional(e);void 0!==t&&(yield t)}}o.BITMASK=1<<31,t.TermDictionaryQuotedIndexed=o},86721:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryQuotedReferential=void 0;const n=r(18050),i=r(13252),a=r(29390);class o{constructor(e,t=new n.DataFactory){this.quotedTriplesDictionary=[],this.quotedTriplesReverseDictionary={},this.features={quotedTriples:!0},this.plainTermDictionary=e,this.dataFactory=t}encode(e){return"Quad"===e.termType?this.encodeQuotedTriple(e,!1):this.plainTermDictionary.encode(e)}encodeQuotedTriple(e,t){var r;if("DefaultGraph"!==e.graph.termType)throw new Error("Encoding of quoted quads outside of the default graph is not allowed");const n=null===(r=(0,a.encodeOptionalTerms)([e.subject,e.predicate,e.object,void 0],this))||void 0===r?void 0:r.slice(0,3),i=n&&n.every((e=>void 0!==e))?this.quotedTriplesReverseDictionary[n.join(o.SEPARATOR)]:void 0;if(void 0!==i||t)return void 0===i?void 0:o.BITMASK|i;const s=[this.encode(e.subject),this.encode(e.predicate),this.encode(e.object)],c=this.quotedTriplesDictionary.length+1;return this.quotedTriplesDictionary.push(s),this.quotedTriplesReverseDictionary[s.join(o.SEPARATOR)]=c,o.BITMASK|c}encodeOptional(e){return"Quad"===e.termType?this.encodeQuotedTriple(e,!0):this.plainTermDictionary.encodeOptional(e)}decode(e){if(o.BITMASK&e){const t=(~o.BITMASK&e)-1;if(t>=this.quotedTriplesDictionary.length)throw new Error(`The value ${e} is not present in the quoted triples range of the dictionary`);const r=this.quotedTriplesDictionary[t];return this.dataFactory.quad(this.decode(r[0]),this.decode(r[1]),this.decode(r[2]))}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.keys())yield o.BITMASK|1+e}*findQuotedTriples(e){for(const t of this.findQuotedTriplesEncoded(e))yield this.decode(t)}*findQuotedTriplesEncoded(e){for(let t of this.quotedTriplesDictionary.keys()){t=o.BITMASK|1+t;const r=this.decode(t);(0,i.matchPattern)(r,e.subject,e.predicate,e.object,e.graph)&&(yield t)}}}o.BITMASK=1<<31,o.SEPARATOR="_",t.TermDictionaryQuotedReferential=o},93616:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionarySymbol=void 0;const n=r(18050),i=r(22112);t.TermDictionarySymbol=class{constructor(e=new n.DataFactory){this.features={quotedTriples:!1},this.dataFactory=e}encode(e){return Symbol.for(`rdf::${(0,i.termToString)(e)}`)}encodeOptional(e){return this.encode(e)}decode(e){const t=Symbol.keyFor(e);if(void 0===t)throw new Error(`The value ${String(e)} is not present in this dictionary`);return(0,i.stringToTerm)(t.slice(5),this.dataFactory)}encodings(){throw new Error("encodings is not supported")}findQuotedTriples(e){throw new Error("findQuotedTriples is not supported")}findQuotedTriplesEncoded(e){throw new Error("findQuotedTriplesEncoded is not supported")}}},55100:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},95832:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedMap=void 0;const n=r(29390);t.RdfStoreIndexNestedMap=class{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedMap=new Map}set(e,t){const r=this.nestedMap;let n=r.get(e[0]);n||(n=new Map,r.set(e[0],n));let i=n.get(e[1]);i||(i=new Map,n.set(e[1],i));let a=i.get(e[2]);a||(a=new Map,i.set(e[2],a));const o=a.has(e[3]);return o||a.set(e[3],t),!o}remove(e){const t=this.nestedMap,r=t.get(e[0]);if(!r)return!1;const n=r.get(e[1]);if(!n)return!1;const i=n.get(e[2]);if(!i)return!1;const a=i.delete(e[3]);return a&&0===i.size&&(n.delete(e[2]),0===n.size&&(r.delete(e[1]),0===r.size&&t.delete(e[0]))),a}get(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(t&&!t.includes(void 0))return this.getEncoded(t)}getEncoded(e){const t=this.nestedMap.get(e[0]);if(!t)return;const r=t.get(e[1]);if(!r)return;const n=r.get(e[2]);return n?n.get(e[3]):void 0}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!t)return;const[r,i,a,o]=t,[s,c,u,l]=e;let d,h,p,f,y,g,m;const b=this.nestedMap,v=void 0!==r?b.has(r)?[r]:[]:b.keys();for(const e of v){y=b.get(e),d=s||this.dictionary.decode(e);const t=void 0!==i?y.has(i)?[i]:[]:y.keys();for(const e of t){g=y.get(e),h=c||this.dictionary.decode(e);const t=void 0!==a?g.has(a)?[a]:[]:g.keys();for(const e of t){m=g.get(e),p=u||this.dictionary.decode(e);const t=void 0!==o?m.has(o)?[o]:[]:m.keys();for(const e of t)f=l||this.dictionary.decode(e),yield[d,h,p,f]}}}}*findEncoded(e,t){const[r,n,i,a]=e;let o,s,c;const u=this.nestedMap,l=void 0!==r?u.has(r)?[r]:[]:u.keys();for(const e of l){o=u.get(e);const t=void 0!==n?o.has(n)?[n]:[]:o.keys();for(const r of t){s=o.get(r);const t=void 0!==i?s.has(i)?[i]:[]:s.keys();for(const n of t){c=s.get(n);const t=void 0!==a?c.has(a)?[a]:[]:c.keys();for(const i of t)yield[e,r,n,i]}}}}count(e){let t=0;const r=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!r)return 0;const i=r[0],a=r[1],o=r[2],s=r[3];let c,u,l;const d=this.nestedMap,h=void 0!==i?d.has(i)?[i]:[]:d.keys();for(const e of h){c=d.get(e);const r=void 0!==a?c.has(a)?[a]:[]:c.keys();for(const e of r){u=c.get(e);const r=void 0!==o?u.has(o)?[o]:[]:u.keys();for(const e of r)l=u.get(e),void 0!==s?l.has(s)&&t++:t+=l.size}}return t}}},68752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedMapQuoted=void 0;const n=r(29390),i=r(95832);class a extends i.RdfStoreIndexNestedMap{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*getQuotedPatternKeys(e,t){for(const r of this.dictionary.findQuotedTriplesEncoded(t))e.has(r)&&(yield r)}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!t)return;const[r,i,a,o]=t,[s,c,u,l]=e,[d,h,p,f]=(0,n.arePatternsQuoted)(e);let y,g,m,b,v,_,w;const T=this.nestedMap,S=void 0!==s?d?this.getQuotedPatternKeys(T,s):T.has(r)?[r]:[]:T.keys();for(const e of S){v=T.get(e),y=!d&&s?s:this.dictionary.decode(e);const t=void 0!==c?h?this.getQuotedPatternKeys(v,c):v.has(i)?[i]:[]:v.keys();for(const e of t){_=v.get(e),g=!h&&c?c:this.dictionary.decode(e);const t=void 0!==u?p?this.getQuotedPatternKeys(_,u):_.has(a)?[a]:[]:_.keys();for(const e of t){w=_.get(e),m=!p&&u?u:this.dictionary.decode(e);const t=void 0!==l?f?this.getQuotedPatternKeys(w,l):w.has(o)?[o]:[]:w.keys();for(const e of t)b=!f&&l?l:this.dictionary.decode(e),yield[y,g,m,b]}}}}*findEncoded(e,t){const[r,i,a,o]=e,[s,c,u,l]=t,[d,h,p,f]=(0,n.arePatternsQuoted)(t);let y,g,m;const b=this.nestedMap,v=void 0!==s?d?this.getQuotedPatternKeys(b,s):b.has(r)?[r]:[]:b.keys();for(const e of v){y=b.get(e);const t=void 0!==c?h?this.getQuotedPatternKeys(y,c):y.has(i)?[i]:[]:y.keys();for(const r of t){g=y.get(r);const t=void 0!==u?p?this.getQuotedPatternKeys(g,u):g.has(a)?[a]:[]:g.keys();for(const n of t){m=g.get(n);const t=void 0!==l?f?this.getQuotedPatternKeys(m,l):m.has(o)?[o]:[]:m.keys();for(const i of t)yield[Number.parseInt(e,10),Number.parseInt(r,10),Number.parseInt(n,10),Number.parseInt(i,10)]}}}}count(e){let t=0;const r=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!r)return 0;const[i,a,o,s]=r,[c,u,l,d]=e,[h,p,f,y]=(0,n.arePatternsQuoted)(e);let g,m,b;const v=this.nestedMap,_=void 0!==c?h?this.getQuotedPatternKeys(v,c):v.has(i)?[i]:[]:v.keys();for(const e of _){g=v.get(e);const r=void 0!==u?p?this.getQuotedPatternKeys(g,u):g.has(a)?[a]:[]:g.keys();for(const e of r){m=g.get(e);const r=void 0!==l?f?this.getQuotedPatternKeys(m,l):m.has(o)?[o]:[]:m.keys();for(const e of r)b=m.get(e),void 0!==d?y?t+=[...this.getQuotedPatternKeys(b,d)].length:b.has(s)&&t++:t+=b.size}}return t}}t.RdfStoreIndexNestedMapQuoted=a},38654:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedMapRecursive=void 0;const n=r(29390);t.RdfStoreIndexNestedMapRecursive=class{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedMap=new Map}set(e,t){let r=this.nestedMap,n=!1;for(const[i,a]of e.entries()){const o=r;let s=o.get(a);s?i===e.length-1&&(n=!0):(s=i===e.length-1?t:new Map,o.set(a,s)),r=s}return!n}remove(e){const t=this.nestedMap,r=t.get(e[0]);if(!r)return!1;const n=r.get(e[1]);if(!n)return!1;const i=n.get(e[2]);if(!i)return!1;const a=i.delete(e[3]);return a&&0===i.size&&(n.delete(e[2]),0===n.size&&(r.delete(e[1]),0===r.size&&t.delete(e[0]))),a}get(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(t&&!t.includes(void 0))return this.getEncoded(t)}getEncoded(e){const t=this.nestedMap.get(e[0]);if(!t)return;const r=t.get(e[1]);if(!r)return;const n=r.get(e[2]);return n?n.get(e[3]):void 0}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(t)for(const r of this.findEncoded(t,e))yield[void 0!==t[0]?e[0]:this.dictionary.decode(r[0]),void 0!==t[1]?e[1]:this.dictionary.decode(r[1]),void 0!==t[2]?e[2]:this.dictionary.decode(r[2]),void 0!==t[3]?e[3]:this.dictionary.decode(r[3])]}*findEncoded(e,t){return yield*this.findEncodedInner(0,e,t,this.nestedMap,[])}*findEncodedInner(e,t,r,n,i){if(e===t.length)yield[...i];else{const a=t[e];if(r[e]){const o=a;if(void 0!==o){const s=n.get(o);s&&(i[e]=a,yield*this.findEncodedInner(e+1,t,r,s,i))}}else for(const[a,o]of n.entries())i[e]=a,yield*this.findEncodedInner(e+1,t,r,o,i)}}count(e){return this.countInner(0,e,this.nestedMap)}countInner(e,t,r){const n=t[e];let i=0;if(n){const a=this.dictionary.encodeOptional(n);if(void 0!==a){if(e===t.length-1)return r.has(a)?1:0;const n=r.get(a);n&&(i+=this.countInner(e+1,t,n))}}else{if(e===t.length-1)return r.size;for(const n of r.values())i+=this.countInner(e+1,t,n)}return i}}},15698:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedMapRecursiveQuoted=void 0;const n=r(29390),i=r(38654);class a extends i.RdfStoreIndexNestedMapRecursive{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*findEncoded(e,t){return yield*this.findEncodedInnerQuoted(0,e,t,(0,n.arePatternsQuoted)(t),this.nestedMap,[])}*findEncodedInnerQuoted(e,t,r,n,i,a){if(e===t.length)yield[...a];else{const o=t[e],s=r[e];if(s)if(n[e]){const o=this.dictionary.findQuotedTriplesEncoded(s);for(const s of o){const o=i.get(s);o&&(a[e]=s,yield*this.findEncodedInnerQuoted(e+1,t,r,n,o,a))}}else{const s=o;if(void 0!==s){const c=i.get(s);c&&(a[e]=o,yield*this.findEncodedInnerQuoted(e+1,t,r,n,c,a))}}else for(const[o,s]of i.entries())a[e]=o,yield*this.findEncodedInnerQuoted(e+1,t,r,n,s,a)}}countInner(e,t,r){const i=t[e];let a=0;if(i)if("Quad"===i.termType&&(0,n.quadHasVariables)(i)){const n=this.dictionary.findQuotedTriplesEncoded(i);for(const i of n)if(e===t.length-1)r.has(i)&&a++;else{const n=r.get(i);n&&(a+=this.countInner(e+1,t,n))}}else{const n=this.dictionary.encodeOptional(i);if(void 0!==n){if(e===t.length-1)return r.has(n)?1:0;const i=r.get(n);i&&(a+=this.countInner(e+1,t,i))}}else{if(e===t.length-1)return r.size;for(const n of r.values())a+=this.countInner(e+1,t,n)}return a}}t.RdfStoreIndexNestedMapRecursiveQuoted=a},53277:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedRecord=void 0;const n=r(29390);t.RdfStoreIndexNestedRecord=class{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedRecords={}}set(e,t){const r=this.nestedRecords,n=r[e[0]]||(r[e[0]]={}),i=n[e[1]]||(n[e[1]]={}),a=i[e[2]]||(i[e[2]]={});return!a[e[3]]&&(a[e[3]]=t,!0)}remove(e){const t=this.nestedRecords,r=t[e[0]];if(!r)return!1;const n=r[e[1]];if(!n)return!1;const i=n[e[2]];return!!i&&!!i[e[3]]&&(delete i[e[3]],0===Object.keys(i).length&&(delete n[e[2]],0===Object.keys(n).length&&(delete r[e[1]],0===Object.keys(r).length&&delete t[e[0]])),!0)}get(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(t&&!t.includes(void 0))return this.getEncoded(t)}getEncoded(e){var t,r,n;return null===(n=null===(r=null===(t=this.nestedRecords[e[0]])||void 0===t?void 0:t[e[1]])||void 0===r?void 0:r[e[2]])||void 0===n?void 0:n[e[3]]}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!t)return;const[r,i,a,o]=t,[s,c,u,l]=e;let d,h,p,f,y,g,m;const b=this.nestedRecords,v=void 0!==r?r in b?[r]:[]:Object.keys(b);for(const e of v){y=b[e],d=s||this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==i?i in y?[i]:[]:Object.keys(y);for(const e of t){g=y[e],h=c||this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==a?a in g?[a]:[]:Object.keys(g);for(const e of t){m=g[e],p=u||this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==o?o in m?[o]:[]:Object.keys(m);for(const e of t)f=l||this.dictionary.decode(Number.parseInt(e,10)),yield[d,h,p,f]}}}}*findEncoded(e,t){const[r,n,i,a]=e;let o,s,c;const u=this.nestedRecords,l=void 0!==r?r in u?[r]:[]:Object.keys(u);for(const e of l){o=u[e];const t=void 0!==n?n in o?[n]:[]:Object.keys(o);for(const r of t){s=o[r];const t=void 0!==i?i in s?[i]:[]:Object.keys(s);for(const n of t){c=s[n];const t=void 0!==a?a in c?[a]:[]:Object.keys(c);for(const i of t)yield[Number.parseInt(e,10),Number.parseInt(r,10),Number.parseInt(n,10),Number.parseInt(i,10)]}}}}count(e){let t=0;const r=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!r)return 0;const i=r[0],a=r[1],o=r[2],s=r[3];let c,u,l;const d=this.nestedRecords,h=void 0!==i?i in d?[i]:[]:Object.keys(d);for(const e of h){c=d[e];const r=void 0!==a?a in c?[a]:[]:Object.keys(c);for(const e of r){u=c[e];const r=void 0!==o?o in u?[o]:[]:Object.keys(u);for(const e of r)l=u[e],void 0!==s?s in l&&t++:t+=Object.keys(l).length}}return t}}},86937:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedRecordQuoted=void 0;const n=r(29390),i=r(53277);class a extends i.RdfStoreIndexNestedRecord{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*getQuotedPatternKeys(e,t){for(const r of this.dictionary.findQuotedTriplesEncoded(t))r in e&&(yield r)}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!t)return;const[r,i,a,o]=t,[s,c,u,l]=e,[d,h,p,f]=(0,n.arePatternsQuoted)(e);let y,g,m,b,v,_,w;const T=this.nestedRecords,S=void 0!==s?d?this.getQuotedPatternKeys(T,s):r in T?[r]:[]:Object.keys(T);for(const e of S){v=T[e],y=!d&&s?s:this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==c?h?this.getQuotedPatternKeys(v,c):i in v?[i]:[]:Object.keys(v);for(const e of t){_=v[e],g=!h&&c?c:this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==u?p?this.getQuotedPatternKeys(_,u):a in _?[a]:[]:Object.keys(_);for(const e of t){w=_[e],m=!p&&u?u:this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==l?f?this.getQuotedPatternKeys(w,l):o in w?[o]:[]:Object.keys(w);for(const e of t)b=!f&&l?l:this.dictionary.decode(Number.parseInt(e,10)),yield[y,g,m,b]}}}}*findEncoded(e,t){const[r,i,a,o]=e,[s,c,u,l]=t,[d,h,p,f]=(0,n.arePatternsQuoted)(t);let y,g,m;const b=this.nestedRecords,v=void 0!==s?d?this.getQuotedPatternKeys(b,s):r in b?[r]:[]:Object.keys(b);for(const e of v){y=b[e];const t=void 0!==c?h?this.getQuotedPatternKeys(y,c):i in y?[i]:[]:Object.keys(y);for(const r of t){g=y[r];const t=void 0!==u?p?this.getQuotedPatternKeys(g,u):a in g?[a]:[]:Object.keys(g);for(const n of t){m=g[n];const t=void 0!==l?f?this.getQuotedPatternKeys(m,l):o in m?[o]:[]:Object.keys(m);for(const i of t)yield[Number.parseInt(e,10),Number.parseInt(r,10),Number.parseInt(n,10),Number.parseInt(i,10)]}}}}count(e){let t=0;const r=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!r)return 0;const[i,a,o,s]=r,[c,u,l,d]=e,[h,p,f,y]=(0,n.arePatternsQuoted)(e);let g,m,b;const v=this.nestedRecords,_=void 0!==c?h?this.getQuotedPatternKeys(v,c):i in v?[i]:[]:Object.keys(v);for(const e of _){g=v[e];const r=void 0!==u?p?this.getQuotedPatternKeys(g,u):a in g?[a]:[]:Object.keys(g);for(const e of r){m=g[e];const r=void 0!==l?f?this.getQuotedPatternKeys(m,l):o in m?[o]:[]:Object.keys(m);for(const e of r)b=m[e],void 0!==d?y?t+=[...this.getQuotedPatternKeys(b,d)].length:s in b&&t++:t+=Object.keys(b).length}}return t}}t.RdfStoreIndexNestedRecordQuoted=a},2887:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(32935),t),i(r(73974),t)},32935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PendingStreamsIndex=void 0;const n=r(22112),i=r(13252);class a{constructor(){this.indexedStreams=new Map,this.allStreams=[]}termToString(e){return e&&"Variable"!==e.termType?(0,n.termToString)(e):a.ID_VARIABLE}addPatternListener(e,t,r,n,i){this.allStreams.push(e);const o=`${this.termToString(t)}${a.ID_SEPARATOR}${this.termToString(r)}${a.ID_SEPARATOR}${this.termToString(n)}${a.ID_SEPARATOR}${this.termToString(i)}`;let s=this.indexedStreams.get(o);s||(s=[],this.indexedStreams.set(o,s)),s.push(e)}getPendingStreamsForQuad(e){let t=[(0,i.getTerms)(e).map((e=>(0,n.termToString)(e)))];for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamingStore=void 0;const n=r(72243),i=r(58521),a=r(32935);t.StreamingStore=class{constructor(e=new n.Store){this.pendingStreams=new a.PendingStreamsIndex,this.ended=!1,this.store=e}end(){this.ended=!0;for(const e of this.pendingStreams.allStreams)e.push(null),e._pipeSource.unpipe()}importToListeners(e){e.on("data",(e=>{if(!this.ended&&!this.store.countQuads(e.subject,e.predicate,e.object,e.graph))for(const t of this.pendingStreams.getPendingStreamsForQuad(e))t.isInitialized&&(t.push(e),t.emit("quad",e))}))}import(e){if(this.ended)throw new Error("Attempted to import into an ended StreamingStore");return this.importToListeners(e),this.store.import(e)}match(e,t,r,n){const a=this.store.match(e,t,r,n);let o=a;if(!this.ended){const s=new i.PassThrough({objectMode:!0});this.pendingStreams.addPatternListener(s,e,t,r,n),o=a.pipe(s,{end:!1}),o._pipeSource=a;const c=a._read;a._read=e=>{s.isInitialized=!0,c.call(a,e)}}return o}getStore(){return this.store}}},64817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.termToString=t.stringToTerm=t.stringQuadToQuad=t.quadToStringQuad=t.getLiteralValue=t.getLiteralType=t.getLiteralLanguage=void 0;const n=r(91379);Object.defineProperty(t,"getLiteralLanguage",{enumerable:!0,get:function(){return n.getLiteralLanguage}}),Object.defineProperty(t,"getLiteralType",{enumerable:!0,get:function(){return n.getLiteralType}}),Object.defineProperty(t,"getLiteralValue",{enumerable:!0,get:function(){return n.getLiteralValue}}),Object.defineProperty(t,"quadToStringQuad",{enumerable:!0,get:function(){return n.quadToStringQuad}}),Object.defineProperty(t,"stringQuadToQuad",{enumerable:!0,get:function(){return n.stringQuadToQuad}}),Object.defineProperty(t,"stringToTerm",{enumerable:!0,get:function(){return n.stringToTerm}}),Object.defineProperty(t,"termToString",{enumerable:!0,get:function(){return n.termToString}})},91379:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringQuadToQuad=t.quadToStringQuad=t.stringToTerm=t.getLiteralLanguage=t.getLiteralType=t.getLiteralValue=t.termToString=void 0;const n=new(r(18050).DataFactory);function i(e){var t,r;if(e)switch(e.termType){case"NamedNode":return`<${t=e.value,t.replace(u,d)}>`;case"BlankNode":return`_:${e.value}`;case"Literal":{const t=e;return`"${r=t.value,u.test(r)&&(r=r.replace(u,d)),r}"${t.datatype&&"http://www.w3.org/2001/XMLSchema#string"!==t.datatype.value&&"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"!==t.datatype.value?`^^<${t.datatype.value}>`:""}${t.language?`@${t.language}`:""}`}case"Quad":return`<<${i(e.subject)} ${i(e.predicate)} ${i(e.object)}${"DefaultGraph"===e.graph.termType?"":` ${i(e.graph)}`}>>`;case"Variable":return`?${e.value}`;case"DefaultGraph":return e.value}}function a(e){const t=/^"([^]*)"((\^\^.*)|(@.*))?$/u.exec(e);if(!t)throw new Error(`${e} is not a literal`);return t[1].replace(/\\"/gu,'"')}function o(e){const t=/^"[^]*"(?:\^\^<([^"]+)>|(@)[^@"]+)?$/u.exec(e);if(!t)throw new Error(`${e} is not a literal`);return t[1]||(t[2]?"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString":"http://www.w3.org/2001/XMLSchema#string")}function s(e){const t=/^"[^]*"(?:@([^@"]+)|\^\^[^"]+)?$/u.exec(e);if(!t)throw new Error(`${e} is not a literal`);return t[1]?t[1].toLowerCase():""}function c(e,t){if(t=t||n,!e||0===e.length)return t.defaultGraph();switch(e[0]){case"_":return t.blankNode(e.slice(2));case"?":if(!t.variable)throw new Error("Missing 'variable()' method on the given DataFactory");return t.variable(e.slice(1));case'"':{const r=s(e),n=t.namedNode(o(e));return t.literal(a(e),r||n)}default:if(e.startsWith("<<")&&e.endsWith(">>")){const r=e.slice(2,-2),n=[];let i=0,a=0;for(let t=0;t"===o){if(0===i)throw new Error(`Found closing tag without opening tag in ${e}`);i--}" "===o&&0===i&&(n.push(r.slice(a,t)),a=t+1)}if(0!==i)throw new Error(`Found opening tag without closing tag in ${e}`);if(n.push(r.slice(a,r.length)),3!==n.length&&4!==n.length)throw new Error(`Nested quad syntax error ${e}`);return t.quad(c(n[0]),c(n[1]),c(n[2]),n[3]?c(n[3]):void 0)}if(!e.startsWith("<")||!e.endsWith(">"))throw new Error(`Detected invalid iri for named node (must be wrapped in <>): ${e}`);return t.namedNode(e.slice(1,-1))}}t.termToString=i,t.getLiteralValue=a,t.getLiteralType=o,t.getLiteralLanguage=s,t.stringToTerm=c,t.quadToStringQuad=function(e){return{subject:i(e.subject),predicate:i(e.predicate),object:i(e.object),graph:i(e.graph)}},t.stringQuadToQuad=function(e,t){return(t=t||n).quad(c(e.subject,t),c(e.predicate,t),c(e.object,t),c(e.graph,t))};const u=/["\\\t\n\r\b\f\u0000-\u0019]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=new Map([["\\","\\\\"],['"','\\"'],["\t","\\t"],["\n","\\n"],["\r","\\r"],["\b","\\b"],["\f","\\f"]]);function d(e){const t=l.get(e);if(!t){if(1===e.length){const t=e.charCodeAt(0).toString(16);return`${"\\u0000".slice(0,-t.length)}${t}`}const t=(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)+9216).toString(16);return`${"\\U00000000".slice(0,-t.length)}${t}`}return t}},22112:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.termToString=t.stringToTerm=t.stringQuadToQuad=t.quadToStringQuad=t.getLiteralValue=t.getLiteralType=t.getLiteralLanguage=void 0;const n=r(48244);Object.defineProperty(t,"getLiteralLanguage",{enumerable:!0,get:function(){return n.getLiteralLanguage}}),Object.defineProperty(t,"getLiteralType",{enumerable:!0,get:function(){return n.getLiteralType}}),Object.defineProperty(t,"getLiteralValue",{enumerable:!0,get:function(){return n.getLiteralValue}}),Object.defineProperty(t,"quadToStringQuad",{enumerable:!0,get:function(){return n.quadToStringQuad}}),Object.defineProperty(t,"stringQuadToQuad",{enumerable:!0,get:function(){return n.stringQuadToQuad}}),Object.defineProperty(t,"stringToTerm",{enumerable:!0,get:function(){return n.stringToTerm}}),Object.defineProperty(t,"termToString",{enumerable:!0,get:function(){return n.termToString}})},48244:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringQuadToQuad=t.quadToStringQuad=t.stringToTerm=t.getLiteralLanguage=t.getLiteralType=t.getLiteralValue=t.termToString=void 0;const n=new(r(18050).DataFactory);function i(e){if(e)switch(e.termType){case"NamedNode":case"DefaultGraph":return e.value;case"BlankNode":return"_:"+e.value;case"Literal":const t=e;return'"'+t.value+'"'+(t.datatype&&"http://www.w3.org/2001/XMLSchema#string"!==t.datatype.value&&"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"!==t.datatype.value?"^^"+t.datatype.value:"")+(t.language?"@"+t.language:"");case"Quad":return`<<${i(e.subject)} ${i(e.predicate)} ${i(e.object)}${"DefaultGraph"===e.graph.termType?"":" "+i(e.graph)}>>`;case"Variable":return"?"+e.value}}function a(e){const t=/^"([^]*)"/.exec(e);if(!t)throw new Error(e+" is not a literal");return t[1]}function o(e){const t=/^"[^]*"(?:\^\^([^"]+)|(@)[^@"]+)?$/.exec(e);if(!t)throw new Error(e+" is not a literal");return t[1]||(t[2]?"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString":"http://www.w3.org/2001/XMLSchema#string")}function s(e){const t=/^"[^]*"(?:@([^@"]+)|\^\^[^"]+)?$/.exec(e);if(!t)throw new Error(e+" is not a literal");return t[1]?t[1].toLowerCase():""}function c(e,t){if(t=t||n,!e||!e.length)return t.defaultGraph();switch(e[0]){case"_":return t.blankNode(e.substr(2));case"?":if(!t.variable)throw new Error("Missing 'variable()' method on the given DataFactory");return t.variable(e.substr(1));case'"':const r=s(e),n=t.namedNode(o(e));return t.literal(a(e),r||n);default:if("<"===e[0]&&e.length>4&&"<"===e[1]&&">"===e[e.length-1]&&">"===e[e.length-2]){const r=e.slice(2,-2).trim();let n=[],i=0,a=0,o=!1;for(let t=0;t"===s){if(0===i)throw new Error("Found closing tag without opening tag in "+e);i--}if('"'===s){let e=!1,n=t;for(;n-- >0&&"\\"===r[n];)e=!e;e||(o=!o)}if(" "===s&&!o&&0===i){for(n.push(r.slice(a,t));" "===r[t+1];)t+=1;a=t+1}}if(0!==i)throw new Error("Found opening tag without closing tag in "+e);if(n.push(r.slice(a,r.length)),3!==n.length&&4!==n.length)throw new Error("Nested quad syntax error "+e);return n=n.map((e=>e.startsWith("<")&&!e.includes(" ")?e.slice(1,-1):e)),t.quad(c(n[0]),c(n[1]),c(n[2]),n[3]?c(n[3]):void 0)}return t.namedNode(e)}}t.termToString=i,t.getLiteralValue=a,t.getLiteralType=o,t.getLiteralLanguage=s,t.stringToTerm=c,t.quadToStringQuad=function(e){return{subject:i(e.subject),predicate:i(e.predicate),object:i(e.object),graph:i(e.graph)}},t.stringQuadToQuad=function(e,t){return(t=t||n).quad(c(e.subject,t),c(e.predicate,t),c(e.object,t),c(e.graph,t))}},13252:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(10175),t),i(r(86552),t)},10175:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchPatternMappings=t.matchPatternComplete=t.matchPattern=t.matchTerm=t.getValueNestedPath=t.someTermsNested=t.someTerms=t.everyTermsNested=t.everyTerms=t.reduceTermsNested=t.reduceTerms=t.mapTermsNested=t.mapTerms=t.filterQuadTermNamesNested=t.filterQuadTermNames=t.filterTermsNested=t.filterTerms=t.forEachTermsNested=t.forEachTerms=t.collectNamedTerms=t.getNamedTerms=t.getTermsNested=t.getTerms=t.TRIPLE_TERM_NAMES=t.QUAD_TERM_NAMES=void 0;const n=new(r(18050).DataFactory);function i(e,t){return t&&"DefaultGraph"===e.graph.termType?[e.subject,e.predicate,e.object]:[e.subject,e.predicate,e.object,e.graph]}function a(e,t){return t(e.subject,"subject")&&t(e.predicate,"predicate")&&t(e.object,"object")&&t(e.graph,"graph")}function o(e,t){return!t||"Variable"===t.termType||"Quad"===t.termType&&"Quad"===e.termType&&c(e,t)||t.equals(e)}function s(e,t,r,n,i){return o(e.subject,t)&&o(e.predicate,r)&&o(e.object,n)&&o(e.graph,i)}function c(e,t){return s(e,t.subject,t.predicate,t.object,t.graph)}t.QUAD_TERM_NAMES=["subject","predicate","object","graph"],t.TRIPLE_TERM_NAMES=["subject","predicate","object"],t.getTerms=i,t.getTermsNested=function e(t,r){const n=[];for(const a of i(t,r))"Quad"===a.termType?e(a,r).forEach((e=>n.push(e))):n.push(a);return n},t.getNamedTerms=function(e){return[{key:"subject",value:e.subject},{key:"predicate",value:e.predicate},{key:"object",value:e.object},{key:"graph",value:e.graph}]},t.collectNamedTerms=function(e,t,r){const i={};return e.forEach((e=>i[e.key]=e.value)),t&&(i.subject=i.subject||t("subject"),i.predicate=i.predicate||t("predicate"),i.object=i.object||t("object"),i.graph=i.graph||t("graph")),(r||n).quad(i.subject,i.predicate,i.object,i.graph)},t.forEachTerms=function(e,t){t(e.subject,"subject"),t(e.predicate,"predicate"),t(e.object,"object"),t(e.graph,"graph")},t.forEachTermsNested=function e(t,r,n=[]){"Quad"===t.subject.termType?e(t.subject,r,[...n,"subject"]):r(t.subject,[...n,"subject"]),"Quad"===t.predicate.termType?e(t.predicate,r,[...n,"predicate"]):r(t.predicate,[...n,"predicate"]),"Quad"===t.object.termType?e(t.object,r,[...n,"object"]):r(t.object,[...n,"object"]),"Quad"===t.graph.termType?e(t.graph,r,[...n,"graph"]):r(t.graph,[...n,"graph"])},t.filterTerms=function(e,t){const r=[];return t(e.subject,"subject")&&r.push(e.subject),t(e.predicate,"predicate")&&r.push(e.predicate),t(e.object,"object")&&r.push(e.object),t(e.graph,"graph")&&r.push(e.graph),r},t.filterTermsNested=function e(t,r,n=[]){let i=[];return"Quad"===t.subject.termType?i=[...i,...e(t.subject,r,[...n,"subject"])]:r(t.subject,[...n,"subject"])&&i.push(t.subject),"Quad"===t.predicate.termType?i=[...i,...e(t.predicate,r,[...n,"predicate"])]:r(t.predicate,[...n,"predicate"])&&i.push(t.predicate),"Quad"===t.object.termType?i=[...i,...e(t.object,r,[...n,"object"])]:r(t.object,[...n,"object"])&&i.push(t.object),"Quad"===t.graph.termType?i=[...i,...e(t.graph,r,[...n,"graph"])]:r(t.graph,[...n,"graph"])&&i.push(t.graph),i},t.filterQuadTermNames=function(e,t){const r=[];return t(e.subject,"subject")&&r.push("subject"),t(e.predicate,"predicate")&&r.push("predicate"),t(e.object,"object")&&r.push("object"),t(e.graph,"graph")&&r.push("graph"),r},t.filterQuadTermNamesNested=function e(t,r,n=[]){let i=[];const a=[...n,"subject"];"Quad"===t.subject.termType?i=[...i,...e(t.subject,r,a)]:r(t.subject,a)&&i.push(a);const o=[...n,"predicate"];"Quad"===t.predicate.termType?i=[...i,...e(t.predicate,r,o)]:r(t.predicate,o)&&i.push(o);const s=[...n,"object"];"Quad"===t.object.termType?i=[...i,...e(t.object,r,s)]:r(t.object,s)&&i.push(s);const c=[...n,"graph"];return"Quad"===t.graph.termType?i=[...i,...e(t.graph,r,c)]:r(t.graph,c)&&i.push(c),i},t.mapTerms=function(e,t,r){return(r||n).quad(t(e.subject,"subject"),t(e.predicate,"predicate"),t(e.object,"object"),t(e.graph,"graph"))},t.mapTermsNested=function e(t,r,i,a=[]){return(i||n).quad("Quad"===t.subject.termType?e(t.subject,r,i,[...a,"subject"]):r(t.subject,[...a,"subject"]),"Quad"===t.predicate.termType?e(t.predicate,r,i,[...a,"predicate"]):r(t.predicate,[...a,"predicate"]),"Quad"===t.object.termType?e(t.object,r,i,[...a,"object"]):r(t.object,[...a,"object"]),"Quad"===t.graph.termType?e(t.graph,r,i,[...a,"graph"]):r(t.graph,[...a,"graph"]))},t.reduceTerms=function(e,t,r){let n=r;return n=t(n,e.subject,"subject"),n=t(n,e.predicate,"predicate"),n=t(n,e.object,"object"),t(n,e.graph,"graph")},t.reduceTermsNested=function e(t,r,n,i=[]){let a=n;return a="Quad"===t.subject.termType?e(t.subject,r,a,[...i,"subject"]):r(a,t.subject,[...i,"subject"]),a="Quad"===t.predicate.termType?e(t.predicate,r,a,[...i,"predicate"]):r(a,t.predicate,[...i,"predicate"]),a="Quad"===t.object.termType?e(t.object,r,a,[...i,"object"]):r(a,t.object,[...i,"object"]),a="Quad"===t.graph.termType?e(t.graph,r,a,[...i,"graph"]):r(a,t.graph,[...i,"graph"]),a},t.everyTerms=a,t.everyTermsNested=function e(t,r,n=[]){return("Quad"===t.subject.termType?e(t.subject,r,[...n,"subject"]):r(t.subject,[...n,"subject"]))&&("Quad"===t.predicate.termType?e(t.predicate,r,[...n,"predicate"]):r(t.predicate,[...n,"predicate"]))&&("Quad"===t.object.termType?e(t.object,r,[...n,"object"]):r(t.object,[...n,"object"]))&&("Quad"===t.graph.termType?e(t.graph,r,[...n,"graph"]):r(t.graph,[...n,"graph"]))},t.someTerms=function(e,t){return t(e.subject,"subject")||t(e.predicate,"predicate")||t(e.object,"object")||t(e.graph,"graph")},t.someTermsNested=function e(t,r,n=[]){return("Quad"===t.subject.termType?e(t.subject,r,[...n,"subject"]):r(t.subject,[...n,"subject"]))||("Quad"===t.predicate.termType?e(t.predicate,r,[...n,"predicate"]):r(t.predicate,[...n,"predicate"]))||("Quad"===t.object.termType?e(t.object,r,[...n,"object"]):r(t.object,[...n,"object"]))||("Quad"===t.graph.termType?e(t.graph,r,[...n,"graph"]):r(t.graph,[...n,"graph"]))},t.getValueNestedPath=function e(t,r){if(0===r.length)return t;if("Quad"===t.termType)return e(t[r[0]],r.slice(1));throw new Error(`Tried to get ${r[0]} from term of type ${t.termType}`)},t.matchTerm=o,t.matchPattern=s,t.matchPatternComplete=c,t.matchPatternMappings=function(e,t,r={}){const n={};return function e(t,i){return a(t,((t,a)=>{var o,s;const c=i[a];switch(t.termType){case"Variable":return r.skipVarMapping&&"Variable"===c.termType||(null!==(s=null===(o=n[t.value])||void 0===o?void 0:o.equals(c))&&void 0!==s?s:(n[t.value]=c,!0));case"Quad":return"Quad"===c.termType&&e(t,c);default:return t.equals(c)}}))}(t,e)&&(!r.returnMappings||n)}},86552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getQuads=t.getDefaultGraphs=t.getVariables=t.getLiterals=t.getBlankNodes=t.getNamedNodes=t.getTermsOfType=t.uniqTerms=t.TERM_TYPES=void 0;const n=r(22112);function i(e,t){return e.filter((e=>e.termType===t))}t.TERM_TYPES=["NamedNode","BlankNode","Literal","Variable","DefaultGraph","Quad"],t.uniqTerms=function(e){const t={};return e.filter((e=>{const r=(0,n.termToString)(e);return!(r in t)&&(t[r]=!0)}))},t.getTermsOfType=i,t.getNamedNodes=function(e){return i(e,"NamedNode")},t.getBlankNodes=function(e){return i(e,"BlankNode")},t.getLiterals=function(e){return i(e,"Literal")},t.getVariables=function(e){return i(e,"Variable")},t.getDefaultGraphs=function(e){return i(e,"DefaultGraph")},t.getQuads=function(e){return i(e,"Quad")}},21860:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(29145),t),i(r(55623),t),i(r(98532),t),i(r(59638),t),i(r(24012),t),i(r(69994),t)},29145:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},55623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},98532:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},59638:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfaParser=void 0;const n=r(15482),i=r(58521),a=r(45497),o=r(68713),s=r(24012),c=r(69994);class u extends i.Transform{constructor(e){super({readableObjectMode:!0}),this.activeTagStack=[],e=e||{},this.options=e,this.util=new c.Util(e.dataFactory,e.baseIRI),this.defaultGraph=e.defaultGraph||this.util.dataFactory.defaultGraph();const t=e.contentType?c.Util.contentTypeToProfile(e.contentType):e.profile||"";this.features=e.features||s.RDFA_FEATURES[t],this.htmlParseListener=e.htmlParseListener,this.rdfaPatterns=this.features.copyRdfaPatterns?{}:null,this.pendingRdfaPatternCopies=this.features.copyRdfaPatterns?{}:null,this.parser=this.initializeParser("xml"===t),this.activeTagStack.push({incompleteTriples:[],inlist:!1,language:e.language,listMapping:{},listMappingLocal:{},name:"",prefixesAll:Object.assign(Object.assign({},o["@context"]),this.features.xhtmlInitialContext?a["@context"]:{}),prefixesCustom:{},skipElement:!1,vocab:e.vocab})}import(e){const t=new i.PassThrough({readableObjectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new u(this.options));return r}_transform(e,t,r){this.parser.write(e.toString()),r()}_flush(e){this.parser.end(),e()}onTagOpen(e,t){let r=this.activeTagStack.length-1;for(;r>0&&this.activeTagStack[r].skipElement;)r--;let n=this.activeTagStack[r];r!==this.activeTagStack.length-1&&(n=Object.assign(Object.assign({},n),{language:this.activeTagStack[this.activeTagStack.length-1].language,prefixesAll:this.activeTagStack[this.activeTagStack.length-1].prefixesAll,prefixesCustom:this.activeTagStack[this.activeTagStack.length-1].prefixesCustom,vocab:this.activeTagStack[this.activeTagStack.length-1].vocab}));const i={collectChildTags:n.collectChildTags,incompleteTriples:[],inlist:"inlist"in t,listMapping:[],listMappingLocal:n.listMapping,localBaseIRI:n.localBaseIRI,name:e,prefixesAll:null,prefixesCustom:null,skipElement:!1};if(this.activeTagStack.push(i),i.collectChildTags){for(const e of Object.keys(n.prefixesCustom).sort()){const r=n.prefixesCustom[e],i=""===e?"xmlns":"xmlns:"+e;i in t||(t[i]=r)}const r=Object.keys(t).map((e=>`${e}="${t[e]}"`)).join(" ");if(i.text=[`<${e}${r?" "+r:""}>`],this.features.skipHandlingXmlLiteralChildren)return}let a,o,s,u=!0,l=!0;if(this.features.onlyAllowUriRelRevIfProperty&&("property"in t&&"rel"in t&&(u=!1,t.rel.indexOf(":")<0&&delete t.rel),"property"in t&&"rev"in t&&(l=!1,t.rev.indexOf(":")<0&&delete t.rev)),this.features.copyRdfaPatterns){if(n.collectedPatternTag){const r={attributes:t,children:[],name:e,referenced:!1,rootPattern:!1,text:[]};return n.collectedPatternTag.children.push(r),void(i.collectedPatternTag=r)}if("rdfa:Pattern"===t.typeof)return void(i.collectedPatternTag={attributes:t,children:[],name:e,parentTag:n,referenced:!1,rootPattern:!0,text:[]});if("rdfa:copy"===t.property){const e=t.resource||t.href||t.src;return void(this.rdfaPatterns[e]?this.emitPatternCopy(n,this.rdfaPatterns[e],e):(this.pendingRdfaPatternCopies[e]||(this.pendingRdfaPatternCopies[e]=[]),this.pendingRdfaPatternCopies[e].push(n)))}}if(this.features.baseTag&&"base"===e&&t.href&&(this.util.baseIRI=this.util.getBaseIRI(t.href)),this.features.xmlBase&&t["xml:base"]&&(i.localBaseIRI=this.util.getBaseIRI(t["xml:base"])),this.features.timeTag&&"time"===e&&!t.datatype&&(i.interpretObjectAsTime=!0),"vocab"in t?t.vocab?(i.vocab=t.vocab,this.emitTriple(this.util.getBaseIriTerm(i),this.util.dataFactory.namedNode(c.Util.RDFA+"usesVocabulary"),this.util.dataFactory.namedNode(i.vocab))):i.vocab=this.activeTagStack[0].vocab:i.vocab=n.vocab,i.prefixesCustom=c.Util.parsePrefixes(t,n.prefixesCustom,this.features.xmlnsPrefixMappings),i.prefixesAll=Object.keys(i.prefixesCustom).length>0?Object.assign(Object.assign({},n.prefixesAll),i.prefixesCustom):n.prefixesAll,this.features.roleAttribute&&t.role){const e=t.id?this.util.createIri("#"+t.id,i,!1,!1,!1):this.util.createBlankNode(),r=i.vocab;i.vocab="http://www.w3.org/1999/xhtml/vocab#";for(const r of this.util.createVocabIris(t.role,i,!0,!1))this.emitTriple(e,this.util.dataFactory.namedNode("http://www.w3.org/1999/xhtml/vocab#role"),r);i.vocab=r}"xml:lang"in t||this.features.langAttribute&&"lang"in t?i.language=t["xml:lang"]||t.lang:i.language=n.language;const d=2===this.activeTagStack.length;if("rel"in t||"rev"in t?("about"in t?(a=this.util.createIri(t.about,i,!1,!0,!0),i.explicitNewSubject=!!a,"typeof"in t&&(s=a)):d?a=!0:n.object&&(a=n.object),"resource"in t&&(o=this.util.createIri(t.resource,i,!1,!0,!0)),o||("href"in t||"src"in t?o=this.util.createIri(t.href||t.src,i,!1,!1,!0):!("typeof"in t)||"about"in t||this.isInheritSubjectInHeadBody(e)||(o=this.util.createBlankNode())),"typeof"in t&&!("about"in t)&&(s=this.isInheritSubjectInHeadBody(e)?a:o)):!("property"in t)||"content"in t||"datatype"in t?(("about"in t||"resource"in t)&&(a=this.util.createIri(t.about||t.resource,i,!1,!0,!0),i.explicitNewSubject=!!a),a||!("href"in t)&&!("src"in t)||(a=this.util.createIri(t.href||t.src,i,!1,!1,!0),i.explicitNewSubject=!!a),a||(d?a=!0:this.isInheritSubjectInHeadBody(e)?a=n.object:"typeof"in t?(a=this.util.createBlankNode(),i.explicitNewSubject=!0):n.object&&(a=n.object,"property"in t||(i.skipElement=!0))),"typeof"in t&&(s=a)):("about"in t?(a=this.util.createIri(t.about,i,!1,!0,!0),i.explicitNewSubject=!!a):d?a=!0:n.object&&(a=n.object),"typeof"in t&&("about"in t&&(s=this.util.createIri(t.about,i,!1,!0,!0)),!s&&d&&(s=!0),!s&&"resource"in t&&(s=this.util.createIri(t.resource,i,!1,!0,!0)),s||!("href"in t)&&!("src"in t)||(s=this.util.createIri(t.href||t.src,i,!1,!1,!0)),!s&&this.isInheritSubjectInHeadBody(e)&&(s=a),s||(s=this.util.createBlankNode()),o=s)),s)for(const e of this.util.createVocabIris(t.typeof,i,!0,!0))this.emitTriple(this.util.getResourceOrBaseIri(s,i),this.util.dataFactory.namedNode(c.Util.RDF+"type"),e);if(a&&(i.listMapping={}),o){if("rel"in t&&"inlist"in t)for(const e of this.util.createVocabIris(t.rel,i,u,!1))this.addListMapping(i,a,e,o);if(!("rel"in t)||!("inlist"in t)){if("rel"in t)for(const e of this.util.createVocabIris(t.rel,i,u,!1))this.emitTriple(this.util.getResourceOrBaseIri(a,i),e,this.util.getResourceOrBaseIri(o,i));if("rev"in t)for(const e of this.util.createVocabIris(t.rev,i,l,!1))this.emitTriple(this.util.getResourceOrBaseIri(o,i),e,this.util.getResourceOrBaseIri(a,i))}}if(!o){if("rel"in t)if("inlist"in t)for(const e of this.util.createVocabIris(t.rel,i,u,!1))this.addListMapping(i,a,e,null),i.incompleteTriples.push({predicate:e,reverse:!1,list:!0});else for(const e of this.util.createVocabIris(t.rel,i,u,!1))i.incompleteTriples.push({predicate:e,reverse:!1});if("rev"in t)for(const e of this.util.createVocabIris(t.rev,i,l,!1))i.incompleteTriples.push({predicate:e,reverse:!0});i.incompleteTriples.length>0&&(o=this.util.createBlankNode())}if("property"in t){let e;if(i.predicates=this.util.createVocabIris(t.property,i,!0,!1),"datatype"in t?(i.datatype=this.util.createIri(t.datatype,i,!0,!0,!1),i.datatype&&(i.datatype.value===c.Util.RDF+"XMLLiteral"||this.features.htmlDatatype&&i.datatype.value===c.Util.RDF+"HTML")&&(i.collectChildTags=!0)):("rev"in t||"rel"in t||"content"in t||("resource"in t&&(e=this.util.createIri(t.resource,i,!1,!0,!0)),!e&&"href"in t&&(e=this.util.createIri(t.href,i,!1,!1,!0)),!e&&"src"in t&&(e=this.util.createIri(t.src,i,!1,!1,!0))),"typeof"in t&&!("about"in t)&&(e=s)),"content"in t){const e=this.util.createLiteral(t.content,i);if("inlist"in t)for(const t of i.predicates)this.addListMapping(i,a,t,e);else{const t=this.util.getResourceOrBaseIri(a,i);for(const r of i.predicates)this.emitTriple(t,r,e)}i.predicates=null}else if(this.features.datetimeAttribute&&"datetime"in t){i.interpretObjectAsTime=!0;const e=this.util.createLiteral(t.datetime,i);if("inlist"in t)for(const t of i.predicates)this.addListMapping(i,a,t,e);else{const t=this.util.getResourceOrBaseIri(a,i);for(const r of i.predicates)this.emitTriple(t,r,e)}i.predicates=null}else if(e){const r=this.util.getResourceOrBaseIri(e,i);if("inlist"in t)for(const e of i.predicates)this.addListMapping(i,a,e,r);else{const e=this.util.getResourceOrBaseIri(a,i);for(const t of i.predicates)this.emitTriple(e,t,r)}i.predicates=null}}let h=!1;if(!i.skipElement&&a&&n.incompleteTriples.length>0){h=!0;const e=this.util.getResourceOrBaseIri(n.subject,i),t=this.util.getResourceOrBaseIri(a,i);for(const r of n.incompleteTriples)if(r.reverse)this.emitTriple(t,r.predicate,e);else if(r.list){let e=null;for(let t=this.activeTagStack.length-1;t>=0;t--)if(this.activeTagStack[t].inlist){e=this.activeTagStack[t];break}this.addListMapping(e,a,r.predicate,t)}else this.emitTriple(e,r.predicate,t)}!h&&n.incompleteTriples.length>0&&(i.incompleteTriples=i.incompleteTriples.concat(n.incompleteTriples)),i.subject=a||n.subject,i.object=o||a}onText(e){const t=this.activeTagStack[this.activeTagStack.length-1];this.features.copyRdfaPatterns&&t.collectedPatternTag?t.collectedPatternTag.text.push(e):(t.text||(t.text=[]),t.text.push(e))}onTagClose(){const e=this.activeTagStack[this.activeTagStack.length-1],t=this.activeTagStack[this.activeTagStack.length-2];if(!(e.collectChildTags&&t.collectChildTags&&this.features.skipHandlingXmlLiteralChildren)){if(this.features.copyRdfaPatterns&&e.collectedPatternTag&&e.collectedPatternTag.rootPattern){const t=e.collectedPatternTag.attributes.resource;if(delete e.collectedPatternTag.attributes.resource,delete e.collectedPatternTag.attributes.typeof,this.rdfaPatterns[t]=e.collectedPatternTag,this.pendingRdfaPatternCopies[t]){for(const r of this.pendingRdfaPatternCopies[t])this.emitPatternCopy(r,e.collectedPatternTag,t);delete this.pendingRdfaPatternCopies[t]}return void this.activeTagStack.pop()}if(e.predicates){const r=this.util.getResourceOrBaseIri(e.subject,e);let n=e.text||[];e.collectChildTags&&t.collectChildTags&&(n=n.slice(1));const i=this.util.createLiteral(n.join(""),e);if(e.inlist)for(const t of e.predicates)this.addListMapping(e,r,t,i);else for(const t of e.predicates)this.emitTriple(r,t,i);t.predicates||(e.text=null)}if(e.object&&Object.keys(e.listMapping).length>0){const t=this.util.getResourceOrBaseIri(e.object,e);for(const r in e.listMapping){const n=this.util.dataFactory.namedNode(r),i=e.listMapping[r];if(i.length>0){const r=i.map((()=>this.util.createBlankNode()));for(let t=0;t`),e.text&&t&&(t.text?t.text=t.text.concat(e.text):t.text=e.text)}onEnd(){if(this.features.copyRdfaPatterns){this.features.copyRdfaPatterns=!1;for(const e in this.rdfaPatterns){const t=this.rdfaPatterns[e];t.referenced||(t.attributes.typeof="rdfa:Pattern",t.attributes.resource=e,this.emitPatternCopy(t.parentTag,t,e),t.referenced=!1,delete t.attributes.typeof,delete t.attributes.resource)}for(const e in this.pendingRdfaPatternCopies)for(const t of this.pendingRdfaPatternCopies[e])this.activeTagStack.push(t),this.onTagOpen("link",{property:"rdfa:copy",href:e}),this.onTagClose(),this.activeTagStack.pop();this.features.copyRdfaPatterns=!0}}isInheritSubjectInHeadBody(e){return this.features.inheritSubjectInHeadBody&&("head"===e||"body"===e)}addListMapping(e,t,r,n){if(e.explicitNewSubject){const i=this.util.createBlankNode();this.emitTriple(this.util.getResourceOrBaseIri(t,e),r,i),this.emitTriple(i,this.util.dataFactory.namedNode(c.Util.RDF+"first"),this.util.getResourceOrBaseIri(n,e)),this.emitTriple(i,this.util.dataFactory.namedNode(c.Util.RDF+"rest"),this.util.dataFactory.namedNode(c.Util.RDF+"nil"))}else{let t=e.listMappingLocal[r.value];t||(e.listMappingLocal[r.value]=t=[]),n&&t.push(n)}}emitTriple(e,t,r){"NamedNode"===e.termType&&e.value.indexOf(":")<0||"NamedNode"===t.termType&&t.value.indexOf(":")<0||"NamedNode"===r.termType&&r.value.indexOf(":")<0||this.push(this.util.dataFactory.quad(e,t,r,this.defaultGraph))}emitPatternCopy(e,t,r){if(this.activeTagStack.push(e),t.referenced=!0,t.constructedBlankNodes){let e=0;this.util.blankNodeFactory=()=>t.constructedBlankNodes[e++]}else t.constructedBlankNodes=[],this.util.blankNodeFactory=()=>{const e=this.util.dataFactory.blankNode();return t.constructedBlankNodes.push(e),e};this.emitPatternCopyAbsolute(t,!0,r),this.util.blankNodeFactory=null,this.activeTagStack.pop()}emitPatternCopyAbsolute(e,t,r){if(t||"rdfa:copy"!==e.attributes.property||e.attributes.href!==r){this.onTagOpen(e.name,e.attributes);for(const t of e.text)this.onText(t);for(const t of e.children)this.emitPatternCopyAbsolute(t,!1,r);this.onTagClose()}}initializeParser(e){return new n.Parser({onclosetag:()=>{try{this.onTagClose(),this.htmlParseListener&&this.htmlParseListener.onTagClose()}catch(e){this.emit("error",e)}},onend:()=>{try{this.onEnd(),this.htmlParseListener&&this.htmlParseListener.onEnd()}catch(e){this.emit("error",e)}},onopentag:(e,t)=>{try{this.onTagOpen(e,t),this.htmlParseListener&&this.htmlParseListener.onTagOpen(e,t)}catch(e){this.emit("error",e)}},ontext:e=>{try{this.onText(e),this.htmlParseListener&&this.htmlParseListener.onText(e)}catch(e){this.emit("error",e)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:e})}}t.RdfaParser=u},24012:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RDFA_CONTENTTYPES=t.RDFA_FEATURES=void 0,t.RDFA_FEATURES={"":{baseTag:!0,xmlBase:!0,langAttribute:!0,onlyAllowUriRelRevIfProperty:!0,inheritSubjectInHeadBody:!0,datetimeAttribute:!0,timeTag:!0,htmlDatatype:!0,copyRdfaPatterns:!0,xmlnsPrefixMappings:!0,xhtmlInitialContext:!0,roleAttribute:!0},core:{baseTag:!1,xmlBase:!1,langAttribute:!0,onlyAllowUriRelRevIfProperty:!0,inheritSubjectInHeadBody:!1,datetimeAttribute:!1,timeTag:!1,htmlDatatype:!1,copyRdfaPatterns:!0,xmlnsPrefixMappings:!0,xhtmlInitialContext:!1,roleAttribute:!1},html:{baseTag:!0,xmlBase:!1,langAttribute:!0,onlyAllowUriRelRevIfProperty:!0,inheritSubjectInHeadBody:!0,datetimeAttribute:!0,timeTag:!0,htmlDatatype:!0,copyRdfaPatterns:!0,xmlnsPrefixMappings:!0,xhtmlInitialContext:!1,roleAttribute:!0},xhtml:{baseTag:!0,xmlBase:!1,langAttribute:!0,onlyAllowUriRelRevIfProperty:!0,inheritSubjectInHeadBody:!0,datetimeAttribute:!0,timeTag:!0,htmlDatatype:!0,copyRdfaPatterns:!0,xmlnsPrefixMappings:!0,xhtmlInitialContext:!0,roleAttribute:!0},xml:{baseTag:!1,xmlBase:!0,langAttribute:!0,onlyAllowUriRelRevIfProperty:!1,inheritSubjectInHeadBody:!1,datetimeAttribute:!0,timeTag:!0,htmlDatatype:!1,copyRdfaPatterns:!1,xmlnsPrefixMappings:!0,xhtmlInitialContext:!1,roleAttribute:!0}},t.RDFA_CONTENTTYPES={"text/html":"html","application/xhtml+xml":"xhtml","application/xml":"xml","text/xml":"xml","image/svg+xml":"xml"}},69994:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(9929),i=r(24012),a=r(18050);class o{constructor(e,t){this.dataFactory=e||new a.DataFactory,this.baseIRI=this.dataFactory.namedNode(t||""),this.baseIRIDocument=this.baseIRI}static parsePrefixes(e,t,r){const n={};if(r)for(const t in e)t.startsWith("xmlns")&&(n[t.substr(6)]=e[t]);if(e.prefix||Object.keys(n).length>0){const r=Object.assign(Object.assign({},t),n);if(e.prefix){let t;for(;t=o.PREFIX_REGEX.exec(e.prefix);)r[t[1]]=t[2]}return r}return t}static expandPrefixedTerm(e,t){const r=e.indexOf(":");let n,i;if(r>=0&&(n=e.substr(0,r),i=e.substr(r+1)),""===n)return"http://www.w3.org/1999/xhtml/vocab#"+i;if(n){const e=t.prefixesAll[n];if(e)return e+i}if(e){const r=t.prefixesAll[e.toLocaleLowerCase()];if(r)return r}return e}static isValidIri(e){return o.IRI_REGEX.test(e)}static contentTypeToProfile(e){return i.RDFA_CONTENTTYPES[e]||""}getBaseIRI(e){let t=e;const r=t.indexOf("#");return r>=0&&(t=t.substr(0,r)),this.dataFactory.namedNode((0,n.resolve)(t,this.baseIRI.value))}getResourceOrBaseIri(e,t){return!0===e?this.getBaseIriTerm(t):e}getBaseIriTerm(e){return e.localBaseIRI||this.baseIRI}createVocabIris(e,t,r,n){return e.split(/\s+/).filter((e=>e&&(r||e.indexOf(":")>=0))).map((e=>this.createIri(e,t,!0,!0,n))).filter((e=>null!=e))}createLiteral(e,t){if(t.interpretObjectAsTime&&!t.datatype)for(const r of o.TIME_REGEXES)if(e.match(r.regex)){t.datatype=this.dataFactory.namedNode(o.XSD+r.type);break}return this.dataFactory.literal(e,t.datatype||t.language)}createBlankNode(){return this.blankNodeFactory?this.blankNodeFactory():this.dataFactory.blankNode()}createIri(e,t,r,i,a){if(e=e||"",!i)return r||(e=(0,n.resolve)(e,this.getBaseIriTerm(t).value)),o.isValidIri(e)?this.dataFactory.namedNode(e):null;if(e.length>0&&"["===e[0]&&"]"===e[e.length-1]&&(e=e.substr(1,e.length-2)).indexOf(":")<0)return null;if(e.startsWith("_:"))return a?this.dataFactory.blankNode(e.substr(2)||"b_identity"):null;if(r&&t.vocab&&e.indexOf(":")<0)return this.dataFactory.namedNode(t.vocab+e);let s=o.expandPrefixedTerm(e,t);return r?e!==s&&(s=(0,n.resolve)(s,this.baseIRIDocument.value)):s=(0,n.resolve)(s,this.getBaseIriTerm(t).value),o.isValidIri(s)?this.dataFactory.namedNode(s):null}}t.Util=o,o.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",o.XSD="http://www.w3.org/2001/XMLSchema#",o.RDFA="http://www.w3.org/ns/rdfa#",o.PREFIX_REGEX=/\s*([^:\s]*)*:\s*([^\s]*)*\s*/g,o.TIME_REGEXES=[{regex:/^-?P([0-9]+Y)?([0-9]+M)?([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+(\.[0-9])?S)?)?$/,type:"duration"},{regex:/^[0-9]+-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9]((Z?)|([\+-][0-9][0-9]:[0-9][0-9]))$/,type:"dateTime"},{regex:/^[0-9]+-[0-9][0-9]-[0-9][0-9]Z?$/,type:"date"},{regex:/^[0-9][0-9]:[0-9][0-9]:[0-9][0-9]((Z?)|([\+-][0-9][0-9]:[0-9][0-9]))$/,type:"time"},{regex:/^[0-9]+-[0-9][0-9]$/,type:"gYearMonth"},{regex:/^[0-9]+$/,type:"gYear"}],o.IRI_REGEX=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^ "<>{}|\\\[\]`]*$/},97990:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(70326),t)},35695:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParseError=void 0;class r extends Error{constructor(e,t){const r=e.saxParser;super(e.trackPosition?`Line ${r.line} column ${r.column+1}: ${t}`:t)}}t.ParseError=r},70326:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParseType=t.RdfXmlParser=void 0;const n=r(9929),i=r(49126),a=r(58521),o=r(35695),s=r(18050),c=r(29815);class u extends a.Transform{constructor(e){super({readableObjectMode:!0}),this.activeTagStack=[],this.nodeIds={},e&&(Object.assign(this,e),this.options=e),this.dataFactory||(this.dataFactory=new s.DataFactory),this.baseIRI||(this.baseIRI=""),this.defaultGraph||(this.defaultGraph=this.dataFactory.defaultGraph()),!1!==this.validateUri&&(this.validateUri=!0),this.iriValidationStrategy||(this.iriValidationStrategy=this.validateUri?c.IriValidationStrategy.Pragmatic:c.IriValidationStrategy.None),this.saxParser=new i.SaxesParser({xmlns:!0,position:this.trackPosition}),this.attachSaxListeners()}import(e){const t=new a.PassThrough({readableObjectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new u(this.options));return r}_transform(e,t,r){try{this.saxParser.write(e)}catch(e){return r(e)}r()}newParseError(e){return new o.ParseError(this,e)}valueToUri(e,t){return this.uriToNamedNode((0,n.resolve)(e,t.baseIRI))}uriToNamedNode(e){const t=(0,c.validateIri)(e,this.iriValidationStrategy);if(t instanceof Error)throw this.newParseError(t.message);return this.dataFactory.namedNode(e)}validateNcname(e){if(!u.NCNAME_MATCHER.test(e))throw this.newParseError(`Not a valid NCName: ${e}`)}attachSaxListeners(){this.saxParser.on("error",(e=>this.emit("error",e))),this.saxParser.on("opentag",this.onTag.bind(this)),this.saxParser.on("text",this.onText.bind(this)),this.saxParser.on("cdata",this.onText.bind(this)),this.saxParser.on("closetag",this.onCloseTag.bind(this)),this.saxParser.on("doctype",this.onDoctype.bind(this))}onTag(e){const t=this.activeTagStack.length?this.activeTagStack[this.activeTagStack.length-1]:null;let r=l.RESOURCE;if(t&&(t.hadChildren=!0,r=t.childrenParseType),t&&t.childrenStringTags){const r=e.name;let n="";for(const t in e.attributes)n+=` ${t}="${e.attributes[t].value}"`;const i=`<${r}${n}>`;t.childrenStringTags.push(i);const a={childrenStringTags:t.childrenStringTags};return a.childrenStringEmitClosingTag=``,void this.activeTagStack.push(a)}const n={};t?(n.language=t.language,n.baseIRI=t.baseIRI):n.baseIRI=this.baseIRI,this.activeTagStack.push(n),r===l.RESOURCE?this.onTagResource(e,n,t,!t):this.onTagProperty(e,n,t)}onTagResource(e,t,r,i){t.childrenParseType=l.PROPERTY;let a=!0;if(e.uri===u.RDF){if(!i&&u.FORBIDDEN_NODE_ELEMENTS.indexOf(e.local)>=0)throw this.newParseError(`Illegal node element name: ${e.local}`);switch(e.local){case"RDF":t.childrenParseType=l.RESOURCE;case"Description":a=!1}}const o=[],s=[];let c=null,d=!1,h=!1,p=null;for(const i in e.attributes){const a=e.attributes[i];if(r&&a.uri===u.RDF)switch(a.local){case"about":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${a.value} and ${c} where found.`);c=a.value;continue;case"ID":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${a.value} and ${c} where found.`);this.validateNcname(a.value),c="#"+a.value,d=!0;continue;case"nodeID":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${a.value} and ${c} where found.`);this.validateNcname(a.value),c=a.value,h=!0;continue;case"bagID":throw this.newParseError("rdf:bagID is not supported.");case"type":p=a.value;continue;case"aboutEach":throw this.newParseError("rdf:aboutEach is not supported.");case"aboutEachPrefix":throw this.newParseError("rdf:aboutEachPrefix is not supported.");case"li":throw this.newParseError("rdf:li on node elements are not supported.")}else if(a.uri===u.XML){if("lang"===a.local){t.language=""===a.value?null:a.value.toLowerCase();continue}if("base"===a.local){t.baseIRI=(0,n.resolve)(a.value,t.baseIRI);continue}}"xml"===a.prefix||"xmlns"===a.prefix||""===a.prefix&&"xmlns"===a.local||!a.uri||(o.push(this.uriToNamedNode(a.uri+a.local)),s.push(a.value))}if(null!==c&&(t.subject=h?this.dataFactory.blankNode(c):this.valueToUri(c,t),d&&this.claimNodeId(t.subject)),t.subject||(t.subject=this.dataFactory.blankNode()),a){const n=this.uriToNamedNode(e.uri+e.local);this.emitTriple(t.subject,this.dataFactory.namedNode(u.RDF+"type"),n,r?r.reifiedStatementId:null)}if(r){if(r.predicate)if(r.childrenCollectionSubject){const e=this.dataFactory.blankNode();this.emitTriple(r.childrenCollectionSubject,r.childrenCollectionPredicate,e,r.reifiedStatementId),this.emitTriple(e,this.dataFactory.namedNode(u.RDF+"first"),t.subject,t.reifiedStatementId),r.childrenCollectionSubject=e,r.childrenCollectionPredicate=this.dataFactory.namedNode(u.RDF+"rest")}else{this.emitTriple(r.subject,r.predicate,t.subject,r.reifiedStatementId);for(let e=0;e=0)throw this.newParseError(`Illegal property element name: ${e.local}`);t.predicateSubPredicates=[],t.predicateSubObjects=[];let n=!1,i=!1,a=null,o=!0;const s=[],c=[];for(const r in e.attributes){const d=e.attributes[r];if(d.uri===u.RDF)switch(d.local){case"resource":if(a)throw this.newParseError(`Found both rdf:resource (${d.value}) and rdf:nodeID (${a}).`);if(n)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:resource (${d.value})`);t.hadChildren=!0,a=d.value,o=!1;continue;case"datatype":if(i)throw this.newParseError(`Found both non-rdf:* property attributes and rdf:datatype (${d.value}).`);if(n)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:datatype (${d.value})`);t.datatype=this.valueToUri(d.value,t);continue;case"nodeID":if(i)throw this.newParseError(`Found both non-rdf:* property attributes and rdf:nodeID (${d.value}).`);if(t.hadChildren)throw this.newParseError(`Found both rdf:resource and rdf:nodeID (${d.value}).`);if(n)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:nodeID (${d.value})`);this.validateNcname(d.value),t.hadChildren=!0,a=d.value,o=!0;continue;case"bagID":throw this.newParseError("rdf:bagID is not supported.");case"parseType":if(i)throw this.newParseError("rdf:parseType is not allowed when non-rdf:* property attributes are present");if(t.datatype)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:datatype (${t.datatype.value})`);if(a)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:nodeID or rdf:resource (${a})`);if("Resource"===d.value){n=!0,t.childrenParseType=l.PROPERTY;const e=this.dataFactory.blankNode();this.emitTriple(t.subject,t.predicate,e,t.reifiedStatementId),t.subject=e,t.predicate=null}else"Collection"===d.value?(n=!0,t.hadChildren=!0,t.childrenCollectionSubject=t.subject,t.childrenCollectionPredicate=t.predicate,o=!1):"Literal"===d.value&&(n=!0,t.childrenTagsToString=!0,t.childrenStringTags=[]);continue;case"ID":this.validateNcname(d.value),t.reifiedStatementId=this.valueToUri("#"+d.value,t),this.claimNodeId(t.reifiedStatementId);continue}else if(d.uri===u.XML&&"lang"===d.local){t.language=""===d.value?null:d.value.toLowerCase();continue}if("xml"!==d.prefix&&"xmlns"!==d.prefix&&(""!==d.prefix||"xmlns"!==d.local)&&d.uri){if(n||t.datatype)throw this.newParseError(`Found illegal rdf:* properties on property element with attribute: ${d.value}`);t.hadChildren=!0,i=!0,s.push(this.uriToNamedNode(d.uri+d.local)),c.push(this.dataFactory.literal(d.value,t.datatype||t.language))}}if(null!==a){const e=t.subject;t.subject=o?this.dataFactory.blankNode(a):this.valueToUri(a,t),this.emitTriple(e,t.predicate,t.subject,t.reifiedStatementId);for(let e=0;e/g,((e,t,r)=>(this.saxParser.ENTITIES[t]=r,"")))}}var l;t.RdfXmlParser=u,u.MIME_TYPE="application/rdf+xml",u.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",u.XML="http://www.w3.org/XML/1998/namespace",u.FORBIDDEN_NODE_ELEMENTS=["RDF","ID","about","bagID","parseType","resource","nodeID","li","aboutEach","aboutEachPrefix"],u.FORBIDDEN_PROPERTY_ELEMENTS=["Description","RDF","ID","about","bagID","parseType","resource","nodeID","aboutEach","aboutEachPrefix"],u.NCNAME_MATCHER=/^([A-Za-z\xC0-\xD6\xD8-\xF6\u{F8}-\u{2FF}\u{370}-\u{37D}\u{37F}-\u{1FFF}\u{200C}-\u{200D}\u{2070}-\u{218F}\u{2C00}-\u{2FEF}\u{3001}-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFFD}\u{10000}-\u{EFFFF}_])([A-Za-z\xC0-\xD6\xD8-\xF6\u{F8}-\u{2FF}\u{370}-\u{37D}\u{37F}-\u{1FFF}\u{200C}-\u{200D}\u{2070}-\u{218F}\u{2C00}-\u{2FEF}\u{3001}-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFFD}\u{10000}-\u{EFFFF}_\-.0-9#xB7\u{0300}-\u{036F}\u{203F}-\u{2040}])*$/u,function(e){e[e.RESOURCE=0]="RESOURCE",e[e.PROPERTY=1]="PROPERTY"}(l||(t.ParseType=l={}))},84077:e=>{e.exports=function(t){if(!e.exports.WEBSTREAM_SUPPORT)throw new Error("No web ReadableStream support");var r=!1,n={};return new ReadableStream({start:function(e){for(var i in n.data=a,n.end=a,n.end=o,n.close=o,n.error=o,n)t.on(i,n[i]);function a(n){r||(e.enqueue(n),t.pause())}function o(i){if(!r){for(var a in r=!0,n)t.removeListener(a,n[a]);i?e.error(i):e.close()}}t.pause()},pull:function(){r||t.resume()},cancel:function(){for(var e in r=!0,n)t.removeListener(e,n[e]);t.push(null),t.pause(),t.destroy?t.destroy():t.close&&t.close()}})},e.exports.WEBSTREAM_SUPPORT="undefined"!=typeof ReadableStream},21434:(e,t,r)=>{"use strict";const{SymbolDispose:n}=r(51473),{AbortError:i,codes:a}=r(52590),{isNodeStream:o,isWebStream:s,kControllerErrorFunction:c}=r(92520),u=r(94869),{ERR_INVALID_ARG_TYPE:l}=a;let d;e.exports.addAbortSignal=function(t,r){if(((e,t)=>{if("object"!=typeof e||!("aborted"in e))throw new l("signal","AbortSignal",e)})(t),!o(r)&&!s(r))throw new l("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const a=o(t)?()=>{t.destroy(new i(void 0,{cause:e.reason}))}:()=>{t[c](new i(void 0,{cause:e.reason}))};if(e.aborted)a();else{d=d||r(46609).addAbortListener;const i=d(e,a);u(t,i[n])}return t}},82:(e,t,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:a,Uint8Array:o}=r(51473),{Buffer:s}=r(1048),{inspect:c}=r(46609);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return s.alloc(0);const t=s.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)a(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(ea.length)){e===a.length?(t+=a,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(a,0,e),this.head=r,r.data=n(a,e));break}t+=a,e-=a.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=s.allocUnsafe(e),r=e;let n=this.head,i=0;do{const s=n.data;if(!(e>s.length)){e===s.length?(a(t,s,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(a(t,new o(s.buffer,s.byteOffset,e),r-e),this.head=n,n.data=s.slice(e));break}a(t,s,r-e),e-=s.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return c(this,{...t,depth:0,customInspect:!1})}}},67369:(e,t,r)=>{"use strict";const{pipeline:n}=r(16815),i=r(86279),{destroyer:a}=r(16527),{isNodeStream:o,isReadable:s,isWritable:c,isWebStream:u,isTransformStream:l,isWritableStream:d,isReadableStream:h}=r(92520),{AbortError:p,codes:{ERR_INVALID_ARG_VALUE:f,ERR_MISSING_ARGS:y}}=r(52590),g=r(94869);e.exports=function(...e){if(0===e.length)throw new y("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let r=0;r0&&!(c(e[r])||d(e[r])||l(e[r])))throw new f(`streams[${r}]`,t[r],"must be writable")}let r,m,b,v,_;const w=e[0],T=n(e,(function(e){const t=v;v=null,t?t(e):e?_.destroy(e):O||S||_.destroy()})),S=!!(c(w)||d(w)||l(w)),O=!!(s(T)||h(T)||l(T));if(_=new i({writableObjectMode:!(null==w||!w.writableObjectMode),readableObjectMode:!(null==T||!T.readableObjectMode),writable:S,readable:O}),S){if(o(w))_._write=function(e,t,n){w.write(e,t)?n():r=n},_._final=function(e){w.end(),m=e},w.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(u(w)){const e=(l(w)?w.writable:w).getWriter();_._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},_._final=async function(t){try{await e.ready,e.close().catch((()=>{})),m=t}catch(e){t(e)}}}const e=l(T)?T.readable:T;g(e,(()=>{if(m){const e=m;m=null,e()}}))}if(O)if(o(T))T.on("readable",(function(){if(b){const e=b;b=null,e()}})),T.on("end",(function(){_.push(null)})),_._read=function(){for(;;){const e=T.read();if(null===e)return void(b=_._read);if(!_.push(e))return}};else if(u(T)){const e=(l(T)?T.readable:T).getReader();_._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!_.push(t))return;if(r)return void _.push(null)}catch{return}}}return _._destroy=function(e,t){e||null===v||(e=new p),b=null,r=null,m=null,null===v?t(e):(v=t,o(T)&&a(T,e))},_}},16527:(e,t,r)=>{"use strict";const n=r(39907),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:a},AbortError:o}=r(52590),{Symbol:s}=r(51473),{kIsDestroyed:c,isDestroyed:u,isFinished:l,isServerRequest:d}=r(92520),h=s("kDestroy"),p=s("kConstruct");function f(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function y(e,t,r){let i=!1;function a(t){if(i)return;i=!0;const a=e._readableState,o=e._writableState;f(t,o,a),o&&(o.closed=!0),a&&(a.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(g,e,t):n.nextTick(m,e)}try{e._destroy(t||null,a)}catch(t){a(t)}}function g(e,t){b(e,t),m(e)}function m(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function b(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function v(e,t,r){const i=e._readableState,a=e._writableState;if(null!=a&&a.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=a&&a.autoDestroy?e.destroy(t):t&&(t.stack,a&&!a.errored&&(a.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(b,e,t):b(e,t))}function _(e){let t=!1;function r(r){if(t)return void v(e,null!=r?r:new a);t=!0;const i=e._readableState,o=e._writableState,s=o||i;i&&(i.constructed=!0),o&&(o.constructed=!0),s.destroyed?e.emit(h,r):r?v(e,r,!0):n.nextTick(w,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function w(e){e.emit(p)}function T(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function S(e){e.emit("close")}function O(e,t){e.emit("error",t),n.nextTick(S,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(p,t),e.listenerCount(p)>1||n.nextTick(_,e)},destroyer:function(e,t){e&&!u(e)&&(t||l(e)||(t=new o),d(e)?(e.socket=null,e.destroy(t)):T(e)?e.abort():T(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(O,e,t):n.nextTick(S,e),e.destroyed||(e[c]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,a=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(f(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),a.constructed?y(this,e,t):this.once(h,(function(r){y(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:v}},86279:(e,t,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:a,ObjectSetPrototypeOf:o}=r(51473);e.exports=u;const s=r(11509),c=r(65605);o(u.prototype,s.prototype),o(u,s);{const e=a(c.prototype);for(let t=0;t{const n=r(39907),i=r(1048),{isReadable:a,isWritable:o,isIterable:s,isNodeStream:c,isReadableNodeStream:u,isWritableNodeStream:l,isDuplexNodeStream:d,isReadableStream:h,isWritableStream:p}=r(92520),f=r(94869),{AbortError:y,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:m}}=r(52590),{destroyer:b}=r(16527),v=r(86279),_=r(11509),w=r(65605),{createDeferredPromise:T}=r(46609),S=r(81613),O=globalThis.Blob||i.Blob,E=void 0!==O?function(e){return e instanceof O}:function(e){return!1},x=globalThis.AbortController||r(67083).AbortController,{FunctionPrototypeCall:A}=r(51473);class R extends v{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function I(e){const t=e.readable&&"function"!=typeof e.readable.read?_.wrap(e.readable):e.readable,r=e.writable;let n,i,s,c,u,l=!!a(t),d=!!o(r);function h(e){const t=c;c=null,t?t(e):e&&u.destroy(e)}return u=new R({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:l,writable:d}),d&&(f(r,(e=>{d=!1,e&&b(t,e),h(e)})),u._write=function(e,t,i){r.write(e,t)?i():n=i},u._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),l&&(f(t,(e=>{l=!1,e&&b(t,e),h(e)})),t.on("readable",(function(){if(s){const e=s;s=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(s=u._read);if(!u.push(e))return}}),u._destroy=function(e,a){e||null===c||(e=new y),s=null,n=null,i=null,null===c?a(e):(c=a,b(r,e),b(t,e))},u}e.exports=function e(t,r){if(d(t))return t;if(u(t))return I({readable:t});if(l(t))return I({writable:t});if(c(t))return I({writable:!1,readable:!1});if(h(t))return I({readable:_.fromWeb(t)});if(p(t))return I({writable:w.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:a,destroy:o}=function(e){let{promise:t,resolve:r}=T();const i=new x,a=i.signal;return{value:e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:o,cb:s}=await e;if(n.nextTick(s),o)return;if(a.aborted)throw new y(void 0,{cause:a.reason});({promise:t,resolve:r}=T()),yield i}}(),{signal:a}),write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(s(e))return S(R,e,{objectMode:!0,write:i,final:a,destroy:o});const c=null==e?void 0:e.then;if("function"==typeof c){let t;const r=A(c,e,(e=>{if(null!=e)throw new m("nully","body",e)}),(e=>{b(t,e)}));return t=new R({objectMode:!0,readable:!1,write:i,final(e){a((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:o})}throw new m("Iterable, AsyncIterable or AsyncFunction",r,e)}if(E(t))return e(t.arrayBuffer());if(s(t))return S(R,t,{objectMode:!0,writable:!1});if(h(null==t?void 0:t.readable)&&p(null==t?void 0:t.writable))return R.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return I({readable:null!=t&&t.readable?u(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?l(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});const i=null==t?void 0:t.then;if("function"==typeof i){let e;return A(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{b(e,t)})),e=new R({objectMode:!0,writable:!1,read(){}})}throw new g(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},94869:(e,t,r)=>{const n=r(39907),{AbortError:i,codes:a}=r(52590),{ERR_INVALID_ARG_TYPE:o,ERR_STREAM_PREMATURE_CLOSE:s}=a,{kEmptyObject:c,once:u}=r(46609),{validateAbortSignal:l,validateFunction:d,validateObject:h,validateBoolean:p}=r(77840),{Promise:f,PromisePrototypeThen:y,SymbolDispose:g}=r(51473),{isClosed:m,isReadable:b,isReadableNodeStream:v,isReadableStream:_,isReadableFinished:w,isReadableErrored:T,isWritable:S,isWritableNodeStream:O,isWritableStream:E,isWritableFinished:x,isWritableErrored:A,isNodeStream:R,willEmitClose:I,kIsClosedPromise:P}=r(92520);let N;const D=()=>{};function j(e,t,a){var p,f;if(2===arguments.length?(a=t,t=c):null==t?t=c:h(t,"options"),d(a,"callback"),l(t.signal,"options.signal"),a=u(a),_(e)||E(e))return function(e,t,a){let o=!1,s=D;if(t.signal)if(s=()=>{o=!0,a.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(s);else{N=N||r(46609).addAbortListener;const n=N(t.signal,s),i=a;a=u(((...t)=>{n[g](),i.apply(e,t)}))}const c=(...t)=>{o||n.nextTick((()=>a.apply(e,t)))};return y(e[P].promise,c,c),D}(e,t,a);if(!R(e))throw new o("stream",["ReadableStream","WritableStream","Stream"],e);const j=null!==(p=t.readable)&&void 0!==p?p:v(e),C=null!==(f=t.writable)&&void 0!==f?f:O(e),M=e._writableState,L=e._readableState,k=()=>{e.writable||U()};let F=I(e)&&v(e)===j&&O(e)===C,B=x(e,!1);const U=()=>{B=!0,e.destroyed&&(F=!1),(!F||e.readable&&!j)&&(j&&!q||a.call(e))};let q=w(e,!1);const V=()=>{q=!0,e.destroyed&&(F=!1),(!F||e.writable&&!C)&&(C&&!B||a.call(e))},Q=t=>{a.call(e,t)};let $=m(e);const H=()=>{$=!0;const t=A(e)||T(e);return t&&"boolean"!=typeof t?a.call(e,t):j&&!q&&v(e,!0)&&!w(e,!1)?a.call(e,new s):!C||B||x(e,!1)?void a.call(e):a.call(e,new s)},G=()=>{$=!0;const t=A(e)||T(e);if(t&&"boolean"!=typeof t)return a.call(e,t);a.call(e)},z=()=>{e.req.on("finish",U)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?C&&!M&&(e.on("end",k),e.on("close",k)):(e.on("complete",U),F||e.on("abort",H),e.req?z():e.on("request",z)),F||"boolean"!=typeof e.aborted||e.on("aborted",H),e.on("end",V),e.on("finish",U),!1!==t.error&&e.on("error",Q),e.on("close",H),$?n.nextTick(H):null!=M&&M.errorEmitted||null!=L&&L.errorEmitted?F||n.nextTick(G):(j||F&&!b(e)||!B&&!1!==S(e))&&(C||F&&!S(e)||!q&&!1!==b(e))?L&&e.req&&e.aborted&&n.nextTick(G):n.nextTick(G);const K=()=>{a=D,e.removeListener("aborted",H),e.removeListener("complete",U),e.removeListener("abort",H),e.removeListener("request",z),e.req&&e.req.removeListener("finish",U),e.removeListener("end",k),e.removeListener("close",k),e.removeListener("finish",U),e.removeListener("end",V),e.removeListener("error",Q),e.removeListener("close",H)};if(t.signal&&!$){const o=()=>{const r=a;K(),r.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(o);else{N=N||r(46609).addAbortListener;const n=N(t.signal,o),i=a;a=u(((...t)=>{n[g](),i.apply(e,t)}))}}return K}e.exports=j,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=c),null!==(r=t)&&void 0!==r&&r.cleanup&&(p(t.cleanup,"cleanup"),n=t.cleanup),new f(((r,i)=>{const a=j(e,t,(e=>{n&&a(),e?i(e):r()}))}))}},81613:(e,t,r)=>{"use strict";const n=r(39907),{PromisePrototypeThen:i,SymbolAsyncIterator:a,SymbolIterator:o}=r(51473),{Buffer:s}=r(1048),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:u}=r(52590).codes;e.exports=function(e,t,r){let l,d;if("string"==typeof t||t instanceof s)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[a])d=!0,l=t[a]();else{if(!t||!t[o])throw new c("iterable",["Iterable"],t);d=!1,l=t[o]()}const h=new e({objectMode:!0,highWaterMark:1,...r});let p=!1;return h._read=function(){p||(p=!0,async function(){for(;;){try{const{value:e,done:t}=d?await l.next():l.next();if(t)h.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw p=!1,new u;if(h.push(t))continue;p=!1}}catch(e){h.destroy(e)}break}}())},h._destroy=function(e,t){i(async function(e){const t=null!=e,r="function"==typeof l.throw;if(t&&r){const{value:t,done:r}=await l.throw(e);if(await t,r)return}if("function"==typeof l.return){const{value:e}=await l.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},h}},23054:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(51473),{EventEmitter:a}=r(50046);function o(e){a.call(this,e)}function s(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(o.prototype,a.prototype),i(o,a),o.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",c),r.on("close",u));let o=!1;function c(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){d(),0===a.listenerCount(this,"error")&&this.emit("error",e)}function d(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",c),r.removeListener("close",u),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",d),r.removeListener("close",d),e.removeListener("close",d)}return s(r,"error",l),s(e,"error",l),r.on("end",d),r.on("close",d),e.on("close",d),e.emit("pipe",r),e},e.exports={Stream:o,prependListener:s}},64708:(e,t,r)=>{"use strict";const n=globalThis.AbortController||r(67083).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:a,ERR_MISSING_ARGS:o,ERR_OUT_OF_RANGE:s},AbortError:c}=r(52590),{validateAbortSignal:u,validateInteger:l,validateObject:d}=r(77840),h=r(51473).Symbol("kWeak"),p=r(51473).Symbol("kResistStopPropagation"),{finished:f}=r(94869),y=r(67369),{addAbortSignalNoValidate:g}=r(21434),{isWritable:m,isNodeStream:b}=r(92520),{deprecate:v}=r(46609),{ArrayPrototypePush:_,Boolean:w,MathFloor:T,Number:S,NumberIsNaN:O,Promise:E,PromiseReject:x,PromiseResolve:A,PromisePrototypeThen:R,Symbol:I}=r(51473),P=I("kEmpty"),N=I("kEof");function D(e,t){if("function"!=typeof e)throw new a("fn",["Function","AsyncFunction"],e);null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=T(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=T(t.highWaterMark)),l(n,"options.concurrency",1),l(i,"options.highWaterMark",0),i+=n,async function*(){const a=r(46609).AbortSignalAny([null==t?void 0:t.signal].filter(w)),o=this,s=[],u={signal:a};let l,d,h=!1,p=0;function f(){h=!0,y()}function y(){p-=1,g()}function g(){d&&!h&&p=i||p>=n)&&await new E((e=>{d=e}))}s.push(N)}catch(e){const t=x(e);R(t,y,f),s.push(t)}finally{h=!0,l&&(l(),l=null)}}();try{for(;;){for(;s.length>0;){const e=await s[0];if(e===N)return;if(a.aborted)throw new c;e!==P&&(yield e),s.shift(),g()}await new E((e=>{l=e}))}}finally{h=!0,d&&(d(),d=null)}}.call(this)}async function j(e,t=void 0){for await(const r of C.call(this,e,t))return!0;return!1}function C(e,t){if("function"!=typeof e)throw new a("fn",["Function","AsyncFunction"],e);return D.call(this,(async function(t,r){return await e(t,r)?t:P}),t)}class M extends o{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function L(e){if(e=S(e),O(e))return 0;if(e<0)throw new s("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:v((function(e=void 0){return null!=e&&d(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=L(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new c;e--<=0&&(yield r)}}.call(this)},filter:C,flatMap:function(e,t){const r=D.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:D,take:function(e,t=void 0){return null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=L(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new c;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),b(e)&&!m(e))throw new i("stream",e,"must be writable");const r=y(this,e);return null!=t&&t.signal&&g(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new a("fn",["Function","AsyncFunction"],e);return!await j.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new a("fn",["Function","AsyncFunction"],e);for await(const r of D.call(this,(async function(t,r){return await e(t,r),P}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new a("reducer",["Function","AsyncFunction"],e);null!=r&&d(r,"options"),null!=(null==r?void 0:r.signal)&&u(r.signal,"options.signal");let o=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new c(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await f(this.destroy(e)),e}const s=new n,l=s.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this,[p]:!0};r.signal.addEventListener("abort",(()=>s.abort()),e)}let y=!1;try{for await(const n of this){var g;if(y=!0,null!=r&&null!==(g=r.signal)&&void 0!==g&&g.aborted)throw new c;o?t=await e(t,n,{signal:l}):(t=n,o=!0)}if(!y&&!o)throw new M}finally{s.abort()}return t},toArray:async function(e){null!=e&&d(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c(void 0,{cause:e.signal.reason});_(t,n)}return t},some:j,find:async function(e,t){for await(const r of C.call(this,e,t))return r}}},76587:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(51473);e.exports=a;const i=r(32073);function a(e){if(!(this instanceof a))return new a(e);i.call(this,e)}n(a.prototype,i.prototype),n(a,i),a.prototype._transform=function(e,t,r){r(null,e)}},16815:(e,t,r)=>{const n=r(39907),{ArrayIsArray:i,Promise:a,SymbolAsyncIterator:o,SymbolDispose:s}=r(51473),c=r(94869),{once:u}=r(46609),l=r(16527),d=r(86279),{aggregateTwoErrors:h,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:f,ERR_MISSING_ARGS:y,ERR_STREAM_DESTROYED:g,ERR_STREAM_PREMATURE_CLOSE:m},AbortError:b}=r(52590),{validateFunction:v,validateAbortSignal:_}=r(77840),{isIterable:w,isReadable:T,isReadableNodeStream:S,isNodeStream:O,isTransformStream:E,isWebStream:x,isReadableStream:A,isReadableFinished:R}=r(92520),I=globalThis.AbortController||r(67083).AbortController;let P,N,D;function j(e,t,r){let n=!1;return e.on("close",(()=>{n=!0})),{destroy:t=>{n||(n=!0,l.destroyer(e,t||new g("pipe")))},cleanup:c(e,{readable:t,writable:r},(e=>{n=!e}))}}function C(e){if(w(e))return e;if(S(e))return async function*(e){N||(N=r(11509)),yield*N.prototype[o].call(e)}(e);throw new p("val",["Readable","Iterable","AsyncIterable"],e)}async function M(e,t,r,{end:n}){let i,o=null;const s=e=>{if(e&&(i=e),o){const e=o;o=null,e()}},u=()=>new a(((e,t)=>{i?t(i):o=()=>{i?t(i):e()}}));t.on("drain",s);const l=c(t,{readable:!1},s);try{t.writableNeedDrain&&await u();for await(const r of e)t.write(r)||await u();n&&(t.end(),await u()),r()}catch(e){r(i!==e?h(i,e):e)}finally{l(),t.off("drain",s)}}async function L(e,t,r,{end:n}){E(t)&&(t=t.writable);const i=t.getWriter();try{for await(const t of e)await i.ready,i.write(t).catch((()=>{}));await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function k(e,t,a){if(1===e.length&&i(e[0])&&(e=e[0]),e.length<2)throw new y("streams");const o=new I,c=o.signal,u=null==a?void 0:a.signal,l=[];function h(){U(new b)}let g,m,v;_(u,"options.signal"),D=D||r(46609).addAbortListener,u&&(g=D(u,h));const R=[];let N,k=0;function B(e){U(e,0==--k)}function U(e,r){var i;if(!e||m&&"ERR_STREAM_PREMATURE_CLOSE"!==m.code||(m=e),m||r){for(;R.length;)R.shift()(m);null===(i=g)||void 0===i||i[s](),o.abort(),r&&(m||l.forEach((e=>e())),n.nextTick(t,m,v))}}for(let $=0;$0,K=G||!1!==(null==a?void 0:a.end),X=$===e.length-1;if(O(H)){if(K){const{destroy:J,cleanup:W}=j(H,G,z);R.push(J),T(H)&&X&&l.push(W)}function q(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&B(e)}H.on("error",q),T(H)&&X&&l.push((()=>{H.removeListener("error",q)}))}if(0===$)if("function"==typeof H){if(N=H({signal:c}),!w(N))throw new f("Iterable, AsyncIterable or Stream","source",N)}else N=w(H)||S(H)||E(H)?H:d.from(H);else if("function"==typeof H){var V;if(N=E(N)?C(null===(V=N)||void 0===V?void 0:V.readable):C(N),N=H(N,{signal:c}),G){if(!w(N,!0))throw new f("AsyncIterable",`transform[${$-1}]`,N)}else{var Q;P||(P=r(76587));const Y=new P({objectMode:!0}),Z=null===(Q=N)||void 0===Q?void 0:Q.then;if("function"==typeof Z)k++,Z.call(N,(e=>{v=e,null!=e&&Y.write(e),K&&Y.end(),n.nextTick(B)}),(e=>{Y.destroy(e),n.nextTick(B,e)}));else if(w(N,!0))k++,M(N,Y,B,{end:K});else{if(!A(N)&&!E(N))throw new f("AsyncIterable or Promise","destination",N);{const re=N.readable||N;k++,M(re,Y,B,{end:K})}}N=Y;const{destroy:ee,cleanup:te}=j(N,!1,!0);R.push(ee),X&&l.push(te)}}else if(O(H)){if(S(N)){k+=2;const ne=F(N,H,B,{end:K});T(H)&&X&&l.push(ne)}else if(E(N)||A(N)){const ie=N.readable||N;k++,M(ie,H,B,{end:K})}else{if(!w(N))throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],N);k++,M(N,H,B,{end:K})}N=H}else if(x(H)){if(S(N))k++,L(C(N),H,B,{end:K});else if(A(N)||w(N))k++,L(N,H,B,{end:K});else{if(!E(N))throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],N);k++,L(N.readable,H,B,{end:K})}N=H}else N=d.from(H)}return(null!=c&&c.aborted||null!=u&&u.aborted)&&n.nextTick(h),N}function F(e,t,r,{end:i}){let a=!1;if(t.on("close",(()=>{a||r(new m)})),e.pipe(t,{end:!1}),i){function o(){a=!0,t.end()}R(e)?n.nextTick(o):e.once("end",o)}else r();return c(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),c(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:k,pipeline:function(...e){return k(e,u(function(e){return v(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},11509:(e,t,r)=>{const n=r(39907),{ArrayPrototypeIndexOf:i,NumberIsInteger:a,NumberIsNaN:o,NumberParseInt:s,ObjectDefineProperties:c,ObjectKeys:u,ObjectSetPrototypeOf:l,Promise:d,SafeSet:h,SymbolAsyncDispose:p,SymbolAsyncIterator:f,Symbol:y}=r(51473);e.exports=X,X.ReadableState=K;const{EventEmitter:g}=r(50046),{Stream:m,prependListener:b}=r(23054),{Buffer:v}=r(1048),{addAbortSignal:_}=r(21434),w=r(94869);let T=r(46609).debuglog("stream",(e=>{T=e}));const S=r(82),O=r(16527),{getHighWaterMark:E,getDefaultHighWaterMark:x}=r(89952),{aggregateTwoErrors:A,codes:{ERR_INVALID_ARG_TYPE:R,ERR_METHOD_NOT_IMPLEMENTED:I,ERR_OUT_OF_RANGE:P,ERR_STREAM_PUSH_AFTER_EOF:N,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:D},AbortError:j}=r(52590),{validateObject:C}=r(77840),M=y("kPaused"),{StringDecoder:L}=r(18888),k=r(81613);l(X.prototype,m.prototype),l(X,m);const F=()=>{},{errorOrDestroy:B}=O,U=1,q=16,V=32,Q=64,$=2048,H=4096,G=65536;function z(e){return{enumerable:!1,get(){return!!(this.state&e)},set(t){t?this.state|=e:this.state&=~e}}}function K(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(86279)),this.state=$|H|q|V,e&&e.objectMode&&(this.state|=U),n&&e&&e.readableObjectMode&&(this.state|=U),this.highWaterMark=e?E(this,e,"readableHighWaterMark",n):x(!1),this.buffer=new S,this.length=0,this.pipes=[],this.flowing=null,this[M]=null,e&&!1===e.emitClose&&(this.state&=~$),e&&!1===e.autoDestroy&&(this.state&=~H),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new L(e.encoding),this.encoding=e.encoding)}function X(e){if(!(this instanceof X))return new X(e);const t=this instanceof r(86279);this._readableState=new K(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&_(e.signal,this)),m.call(this,e),O.construct(this,(()=>{this._readableState.needReadable&&te(this,this._readableState)}))}function J(e,t,r,n){T("readableAddChunk",t);const i=e._readableState;let a;if(i.state&U||("string"==typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=v.from(t,r).toString(i.encoding):(t=v.from(t,r),r=""))):t instanceof v?r="":m._isUint8Array(t)?(t=m._uint8ArrayToBuffer(t),r=""):null!=t&&(a=new R("chunk",["string","Buffer","Uint8Array"],t))),a)B(e,a);else if(null===t)i.state&=-9,function(e,t){if(T("onEofChunk"),!t.ended){if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?Z(e):(t.needReadable=!1,t.emittedReadable=!0,ee(e))}}(e,i);else if(i.state&U||t&&t.length>0)if(n)if(4&i.state)B(e,new D);else{if(i.destroyed||i.errored)return!1;W(e,i,t,!0)}else if(i.ended)B(e,new N);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?W(e,i,t,!1):te(e,i)):W(e,i,t,!1)}else n||(i.state&=-9,te(e,i));return!i.ended&&(i.length0?(t.state&G?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.state&Q&&Z(e)),te(e,t)}function Y(e,t){return e<=0||0===t.length&&t.ended?0:t.state&U?1:o(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function Z(e){const t=e._readableState;T("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(T("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(ee,e))}function ee(e){const t=e._readableState;T("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,oe(e)}function te(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(re,e,t))}function re(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!1===t[M]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function ie(e){T("readable nexttick read 0"),e.read(0)}function ae(e,t){T("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),oe(e),t.flowing&&!t.reading&&e.read(0)}function oe(e){const t=e._readableState;for(T("flow",t.flowing);t.flowing&&null!==e.read(););}function se(e,t){"function"!=typeof e.read&&(e=X.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=F;function i(t){this===e?(n(),n=F):n=t}e.on("readable",i);const a=w(e,{writable:!1},(e=>{r=e?A(r,e):null,n(),n=F}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new d(i)}}}catch(e){throw r=A(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),a()):O.destroyer(e,null)}}(e,t);return r.stream=e,r}function ce(e,t){if(0===t.length)return null;let r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function ue(e){const t=e._readableState;T("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(le,t,e))}function le(e,t){if(T("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(de,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function de(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let he;function pe(){return void 0===he&&(he={}),he}c(K.prototype,{objectMode:z(U),ended:z(2),endEmitted:z(4),reading:z(8),constructed:z(q),sync:z(V),needReadable:z(Q),emittedReadable:z(128),readableListening:z(256),resumeScheduled:z(512),errorEmitted:z(1024),emitClose:z($),autoDestroy:z(H),destroyed:z(8192),closed:z(16384),closeEmitted:z(32768),multiAwaitDrain:z(G),readingMore:z(1<<17),dataEmitted:z(1<<18)}),X.prototype.destroy=O.destroy,X.prototype._undestroy=O.undestroy,X.prototype._destroy=function(e,t){t(e)},X.prototype[g.captureRejectionSymbol]=function(e){this.destroy(e)},X.prototype[p]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new j,this.destroy(e)),new d(((t,r)=>w(this,(n=>n&&n!==e?r(n):t(null)))))},X.prototype.push=function(e,t){return J(this,e,t,!1)},X.prototype.unshift=function(e,t){return J(this,e,t,!0)},X.prototype.isPaused=function(){const e=this._readableState;return!0===e[M]||!1===e.flowing},X.prototype.setEncoding=function(e){const t=new L(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},X.prototype.read=function(e){T("read",e),void 0===e?e=NaN:a(e)||(e=s(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new P("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return T("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?ue(this):Z(this),null;if(0===(e=Y(e,t))&&t.ended)return 0===t.length&&ue(this),null;let n,i=!!(t.state&Q);if(T("need readable",i),(0===t.length||t.length-e0?ce(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ue(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},X.prototype._read=function(e){throw new I("_read()")},X.prototype.pipe=function(e,t){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new h(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),T("pipe count=%d opts=%j",i.pipes.length,t);const a=t&&!1===t.end||e===n.stdout||e===n.stderr?y:o;function o(){T("onend"),e.end()}let s;i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",(function t(n,a){T("onunpipe"),n===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,T("cleanup"),e.removeListener("close",p),e.removeListener("finish",f),s&&e.removeListener("drain",s),e.removeListener("error",d),e.removeListener("unpipe",t),r.removeListener("end",o),r.removeListener("end",y),r.removeListener("data",l),c=!0,s&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&s())}));let c=!1;function u(){c||(1===i.pipes.length&&i.pipes[0]===e?(T("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(T("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),r.pause()),s||(s=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(T("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(T("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",s))}function l(t){T("ondata");const r=e.write(t);T("dest.write",r),!1===r&&u()}function d(t){if(T("onerror",t),y(),e.removeListener("error",d),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?B(e,t):e.emit("error",t)}}function p(){e.removeListener("finish",f),y()}function f(){T("onfinish"),e.removeListener("close",p),y()}function y(){T("unpipe"),r.unpipe(e)}return r.on("data",l),b(e,"error",d),e.once("close",p),e.once("finish",f),e.emit("pipe",r),!0===e.writableNeedDrain?u():i.flowing||(T("pipe resume"),r.resume()),e},X.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,T("on readable",i.length,i.reading),i.length?Z(this):i.reading||n.nextTick(ie,this))),r},X.prototype.addListener=X.prototype.on,X.prototype.removeListener=function(e,t){const r=m.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(ne,this),r},X.prototype.off=X.prototype.removeListener,X.prototype.removeAllListeners=function(e){const t=m.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(ne,this),t},X.prototype.resume=function(){const e=this._readableState;return e.flowing||(T("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(ae,e,t))}(this,e)),e[M]=!1,this},X.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[M]=!0,this},X.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{B(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=u(e);for(let t=1;t{"use strict";const{MathFloor:n,NumberIsInteger:i}=r(51473),{validateInteger:a}=r(77840),{ERR_INVALID_ARG_VALUE:o}=r(52590).codes;let s=16384,c=16;function u(e){return e?c:s}e.exports={getHighWaterMark:function(e,t,r,a){const s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,a,r);if(null!=s){if(!i(s)||s<0)throw new o(a?`options.${r}`:"options.highWaterMark",s);return n(s)}return u(e.objectMode)},getDefaultHighWaterMark:u,setDefaultHighWaterMark:function(e,t){a(t,"value",0),e?c=t:s=t}}},32073:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:i}=r(51473);e.exports=u;const{ERR_METHOD_NOT_IMPLEMENTED:a}=r(52590).codes,o=r(86279),{getHighWaterMark:s}=r(89952);n(u.prototype,o.prototype),n(u,o);const c=i("kCallback");function u(e){if(!(this instanceof u))return new u(e);const t=e?s(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),o.call(this,e),this._readableState.sync=!1,this[c]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function l(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function d(){this._final!==l&&l.call(this)}u.prototype._final=l,u.prototype._transform=function(e,t,r){throw new a("_transform()")},u.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,a=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||a===n.length||n.length{"use strict";const{SymbolAsyncIterator:n,SymbolIterator:i,SymbolFor:a}=r(51473),o=a("nodejs.stream.destroyed"),s=a("nodejs.stream.errored"),c=a("nodejs.stream.readable"),u=a("nodejs.stream.writable"),l=a("nodejs.stream.disturbed"),d=a("nodejs.webstream.isClosedPromise"),h=a("nodejs.webstream.controllerErrorFunction");function p(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function f(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function y(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function g(e){return!(!e||y(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function m(e){return!(!e||y(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function b(e){return!(!e||y(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function v(e){if(!y(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[o]||null!=n&&n.destroyed)}function _(e){if(!f(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function w(e,t){if(!p(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function T(e){return e&&null!=e[c]?e[c]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!v(e)&&p(e)&&e.readable&&!w(e)}function S(e){return e&&null!=e[u]?e[u]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!v(e)&&f(e)&&e.writable&&!_(e)}function O(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function E(e){return"boolean"==typeof e._sent100&&O(e)}e.exports={isDestroyed:v,kIsDestroyed:o,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[l])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:l,isErrored:function(e){var t,r,n,i,a,o,c,u,l,d;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(a=null!==(o=e[s])&&void 0!==o?o:e.readableErrored)&&void 0!==a?a:e.writableErrored)&&void 0!==i?i:null===(c=e._readableState)||void 0===c?void 0:c.errorEmitted)&&void 0!==n?n:null===(u=e._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(l=e._readableState)||void 0===l?void 0:l.errored)&&void 0!==t?t:null===(d=e._writableState)||void 0===d?void 0:d.errored))},kIsErrored:s,isReadable:T,kIsReadable:c,kIsClosedPromise:d,kControllerErrorFunction:h,kIsWritable:u,isClosed:function(e){if(!y(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&O(e)?e._closed:null},isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return y(e)?!(!v(e)&&(!1!==(null==t?void 0:t.readable)&&T(e)||!1!==(null==t?void 0:t.writable)&&S(e))):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[n]:!1===t?"function"==typeof e[i]:"function"==typeof e[n]||"function"==typeof e[i])},isReadableNodeStream:p,isReadableStream:g,isReadableEnded:function(e){if(!p(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:w,isReadableErrored:function(e){var t,r;return y(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:y,isWebStream:function(e){return g(e)||m(e)||b(e)},isWritable:S,isWritableNodeStream:f,isWritableStream:m,isWritableEnded:_,isWritableFinished:function(e,t){if(!f(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return y(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:E,willEmitClose:function(e){if(!y(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&E(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:b}},65605:(e,t,r)=>{const n=r(39907),{ArrayPrototypeSlice:i,Error:a,FunctionPrototypeSymbolHasInstance:o,ObjectDefineProperty:s,ObjectDefineProperties:c,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:l,Symbol:d,SymbolHasInstance:h}=r(51473);e.exports=C,C.WritableState=D;const{EventEmitter:p}=r(50046),f=r(23054).Stream,{Buffer:y}=r(1048),g=r(16527),{addAbortSignal:m}=r(21434),{getHighWaterMark:b,getDefaultHighWaterMark:v}=r(89952),{ERR_INVALID_ARG_TYPE:_,ERR_METHOD_NOT_IMPLEMENTED:w,ERR_MULTIPLE_CALLBACK:T,ERR_STREAM_CANNOT_PIPE:S,ERR_STREAM_DESTROYED:O,ERR_STREAM_ALREADY_FINISHED:E,ERR_STREAM_NULL_VALUES:x,ERR_STREAM_WRITE_AFTER_END:A,ERR_UNKNOWN_ENCODING:R}=r(52590).codes,{errorOrDestroy:I}=g;function P(){}u(C.prototype,f.prototype),u(C,f);const N=d("kOnFinished");function D(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(86279)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?b(this,e,"writableHighWaterMark",n):v(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=F.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,j(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[N]=[]}function j(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function C(e){const t=this instanceof r(86279);if(!t&&!o(C,this))return new C(e);this._writableState=new D(e,this,t),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&m(e.signal,this)),f.call(this,e),g.construct(this,(()=>{const e=this._writableState;e.writing||V(this,e),$(this,e)}))}function M(e,t,r,i){const a=e._writableState;if("function"==typeof r)i=r,r=a.defaultEncoding;else{if(r){if("buffer"!==r&&!y.isEncoding(r))throw new R(r)}else r=a.defaultEncoding;"function"!=typeof i&&(i=P)}if(null===t)throw new x;if(!a.objectMode)if("string"==typeof t)!1!==a.decodeStrings&&(t=y.from(t,r),r="buffer");else if(t instanceof y)r="buffer";else{if(!f._isUint8Array(t))throw new _("chunk",["string","Buffer","Uint8Array"],t);t=f._uint8ArrayToBuffer(t),r="buffer"}let o;return a.ending?o=new A:a.destroyed&&(o=new O("write")),o?(n.nextTick(i,o),I(e,o,!0),o):(a.pendingcb++,function(e,t,r,n,i){const a=t.objectMode?1:r.length;t.length+=a;const o=t.lengthr.bufferedIndex&&V(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===a?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:a,stream:e,state:r},n.nextTick(B,r.afterWriteTickInfo)):U(e,r,1,a))):I(e,new T)}function B({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,U(e,t,r,n)}function U(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&q(t),$(e,t)}function q(e){if(e.writing)return;for(let r=e.bufferedIndex;r1&&e._writev){t.pendingcb-=o-1;const n=t.allNoop?P:e=>{for(let t=s;t256?(r.splice(0,s),t.bufferedIndex=0):t.bufferedIndex=s}t.bufferProcessing=!1}function Q(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function $(e,t,r){Q(t)&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)I(e,null!=i?i:T());else if(r=!0,t.pendingcb--,i){const r=t[N].splice(0);for(let e=0;e{Q(t)?H(e,t):t.pendingcb--}),e,t)):Q(t)&&(t.pendingcb++,H(e,t))))}function H(e,t){t.pendingcb--,t.finished=!0;const r=t[N].splice(0);for(let e=0;e{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:a,ArrayPrototypeMap:o,NumberIsInteger:s,NumberIsNaN:c,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:l,NumberParseInt:d,ObjectPrototypeHasOwnProperty:h,RegExpPrototypeExec:p,String:f,StringPrototypeToUpperCase:y,StringPrototypeTrim:g}=r(51473),{hideStackFrames:m,codes:{ERR_SOCKET_BAD_PORT:b,ERR_INVALID_ARG_TYPE:v,ERR_INVALID_ARG_VALUE:_,ERR_OUT_OF_RANGE:w,ERR_UNKNOWN_SIGNAL:T}}=r(52590),{normalizeEncoding:S}=r(46609),{isAsyncFunction:O,isArrayBufferView:E}=r(46609).types,x={},A=/^[0-7]+$/,R=m(((e,t,r=l,n=u)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!s(e))throw new w(t,"an integer",e);if(en)throw new w(t,`>= ${r} && <= ${n}`,e)})),I=m(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!s(e))throw new w(t,"an integer",e);if(en)throw new w(t,`>= ${r} && <= ${n}`,e)})),P=m(((e,t,r=!1)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!s(e))throw new w(t,"an integer",e);const n=r?1:0,i=4294967295;if(ei)throw new w(t,`>= ${n} && <= ${i}`,e)}));function N(e,t){if("string"!=typeof e)throw new v(t,"string",e)}const D=m(((e,t,r)=>{if(!i(r,e)){const n=a(o(r,(e=>"string"==typeof e?`'${e}'`:f(e))),", ");throw new _(t,e,"must be one of: "+n)}}));function j(e,t){if("boolean"!=typeof e)throw new v(t,"boolean",e)}function C(e,t,r){return null!=e&&h(e,t)?e[t]:r}const M=m(((e,t,r=null)=>{const i=C(r,"allowArray",!1),a=C(r,"allowFunction",!1);if(!C(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!a||"function"!=typeof e))throw new v(t,"Object",e)})),L=m(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new v(t,"a dictionary",e)})),k=m(((e,t,r=0)=>{if(!n(e))throw new v(t,"Array",e);if(e.length{if(!E(e))throw new v(t,["Buffer","TypedArray","DataView"],e)})),B=m(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new v(t,"AbortSignal",e)})),U=m(((e,t)=>{if("function"!=typeof e)throw new v(t,"Function",e)})),q=m(((e,t)=>{if("function"!=typeof e||O(e))throw new v(t,"Function",e)})),V=m(((e,t)=>{if(void 0!==e)throw new v(t,"undefined",e)})),Q=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function $(e,t){if(void 0===e||!p(Q,e))throw new _(t,e,'must be an array or string of format "; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===p(A,e))throw new _(t,e,"must be a 32-bit unsigned integer or an octal string");e=d(e,8)}return P(e,t),e},validateArray:k,validateStringArray:function(e,t){k(e,t);for(let r=0;rn||(null!=r||null!=n)&&c(e))throw new w(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:M,validateOneOf:D,validatePlainFunction:q,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===g(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new b(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(N(e,t),void 0===x[e]){if(void 0!==x[y(e)])throw new T(e+" (signals must use all capital letters)");throw new T(e)}},validateString:N,validateUint32:P,validateUndefined:V,validateUnion:function(e,t,r){if(!i(r,e))throw new v(t,`('${a(r,"|")}')`,e)},validateAbortSignal:B,validateLinkHeaderValue:function(e){if("string"==typeof e)return $(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n; rel=preload; as=style"')}}},58521:(e,t,r)=>{"use strict";const n=r(50601),i=r(2010),a=n.Readable.destroy;e.exports=n.Readable,e.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,e.exports._isUint8Array=n._isUint8Array,e.exports.isDisturbed=n.isDisturbed,e.exports.isErrored=n.isErrored,e.exports.isReadable=n.isReadable,e.exports.Readable=n.Readable,e.exports.Writable=n.Writable,e.exports.Duplex=n.Duplex,e.exports.Transform=n.Transform,e.exports.PassThrough=n.PassThrough,e.exports.addAbortSignal=n.addAbortSignal,e.exports.finished=n.finished,e.exports.destroy=n.destroy,e.exports.destroy=a,e.exports.pipeline=n.pipeline,e.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),e.exports.Stream=n.Stream,e.exports.default=e.exports},52590:(e,t,r)=>{"use strict";const{format:n,inspect:i,AggregateError:a}=r(46609),o=globalThis.AggregateError||a,s=Symbol("kIsNodeError"),c=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,l={};function d(e,t){if(!e)throw new l.ERR_INTERNAL_ASSERTION(t)}function h(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function p(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return d(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const i=(t.match(/%[dfijoOs]/g)||[]).length;return d(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[s]=!0,l[e]=i}function f(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class y extends Error{constructor(e="The operation was aborted",t=void 0){if(void 0!==t&&"object"!=typeof t)throw new l.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}p("ERR_ASSERTION","%s",Error),p("ERR_INVALID_ARG_TYPE",((e,t,r)=>{d("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const a=[],o=[],s=[];for(const e of t)d("string"==typeof e,"All expected entries have to be of type string"),c.includes(e)?a.push(e.toLowerCase()):u.test(e)?o.push(e):(d("object"!==e,'The value "object" should be written as "Object"'),s.push(e));if(o.length>0){const e=a.indexOf("object");-1!==e&&(a.splice(a,e,1),o.push("Object"))}if(a.length>0){switch(a.length){case 1:n+=`of type ${a[0]}`;break;case 2:n+=`one of type ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of type ${a.join(", ")}, or ${e}`}}(o.length>0||s.length>0)&&(n+=" or ")}if(o.length>0){switch(o.length){case 1:n+=`an instance of ${o[0]}`;break;case 2:n+=`an instance of ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`an instance of ${o.join(", ")}, or ${e}`}}s.length>0&&(n+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(n+="an "),n+=`${s[0]}`;break;case 2:n+=`one of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`one of ${s.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var l;null!==(l=r.constructor)&&void 0!==l&&l.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${i(r,{depth:-1})}`}else{let e=i(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),p("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=i(t);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),p("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),p("ERR_MISSING_ARGS",((...e)=>{let t;d(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),p("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return d(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=h(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=h(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),p("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),p("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),p("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),p("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),p("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),p("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),p("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),p("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),p("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),p("ERR_STREAM_WRITE_AFTER_END","write after end",Error),p("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:y,aggregateTwoErrors:f((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new o([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:f,codes:l}},51473:e=>{"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),PromiseResolve:e=>Promise.resolve(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Boolean,Uint8Array}},46609:(e,t,r)=>{"use strict";const n=r(1048),{kResistStopPropagation:i,SymbolDispose:a}=r(51473),o=globalThis.AbortSignal||r(67083).AbortSignal,s=globalThis.AbortController||r(67083).AbortController,c=Object.getPrototypeOf((async function(){})).constructor,u=globalThis.Blob||n.Blob,l=void 0!==u?function(e){return e instanceof u}:function(e){return!1},d=(e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new ERR_INVALID_ARG_TYPE(t,"AbortSignal",e)};class h extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof c,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:l,deprecate:(e,t)=>e,addAbortListener:r(50046).addAbortListener||function(e,t){if(void 0===e)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);let r;return d(e,"signal"),((e,t)=>{if("function"!=typeof e)throw new ERR_INVALID_ARG_TYPE("listener","Function",e)})(t),e.aborted?queueMicrotask((()=>t())):(e.addEventListener("abort",t,{__proto__:null,once:!0,[i]:!0}),r=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[a](){var e;null===(e=r)||void 0===e||e()}}},AbortSignalAny:o.any||function(e){if(1===e.length)return e[0];const t=new s,r=()=>t.abort();return e.forEach((e=>{d(e,"signals"),e.addEventListener("abort",r,{once:!0})})),t.signal.addEventListener("abort",(()=>{e.forEach((e=>e.removeEventListener("abort",r)))}),{once:!0}),t.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},50601:(e,t,r)=>{const{Buffer:n}=r(1048),{ObjectDefineProperty:i,ObjectKeys:a,ReflectApply:o}=r(51473),{promisify:{custom:s}}=r(46609),{streamReturningOperators:c,promiseReturningOperators:u}=r(64708),{codes:{ERR_ILLEGAL_CONSTRUCTOR:l}}=r(52590),d=r(67369),{setDefaultHighWaterMark:h,getDefaultHighWaterMark:p}=r(89952),{pipeline:f}=r(16815),{destroyer:y}=r(16527),g=r(94869),m=r(2010),b=r(92520),v=e.exports=r(23054).Stream;v.isDestroyed=b.isDestroyed,v.isDisturbed=b.isDisturbed,v.isErrored=b.isErrored,v.isReadable=b.isReadable,v.isWritable=b.isWritable,v.Readable=r(11509);for(const T of a(c)){const S=c[T];function _(...e){if(new.target)throw l();return v.Readable.from(o(S,this,e))}i(_,"name",{__proto__:null,value:S.name}),i(_,"length",{__proto__:null,value:S.length}),i(v.Readable.prototype,T,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}for(const O of a(u)){const E=u[O];function _(...e){if(new.target)throw l();return o(E,this,e)}i(_,"name",{__proto__:null,value:E.name}),i(_,"length",{__proto__:null,value:E.length}),i(v.Readable.prototype,O,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}v.Writable=r(65605),v.Duplex=r(86279),v.Transform=r(32073),v.PassThrough=r(76587),v.pipeline=f;const{addAbortSignal:w}=r(21434);v.addAbortSignal=w,v.finished=g,v.destroy=y,v.compose=d,v.setDefaultHighWaterMark=h,v.getDefaultHighWaterMark=p,i(v,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>m}),i(f,s,{__proto__:null,enumerable:!0,get:()=>m.pipeline}),i(g,s,{__proto__:null,enumerable:!0,get:()=>m.finished}),v.Stream=v,v._isUint8Array=function(e){return e instanceof Uint8Array},v._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},2010:(e,t,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:i}=r(51473),{isIterable:a,isNodeStream:o,isWebStream:s}=r(92520),{pipelineImpl:c}=r(16815),{finished:u}=r(94869);r(50601),e.exports={finished:u,pipeline:function(...e){return new i(((t,r)=>{let i,u;const l=e[e.length-1];if(l&&"object"==typeof l&&!o(l)&&!a(l)&&!s(l)){const t=n(e);i=t.signal,u=t.end}c(e,((e,n)=>{e?r(e):t(n)}),{signal:i,end:u})}))}}},9929:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(29365),t)},29365:(e,t)=>{"use strict";function r(e){const t=[];let r=0;for(;re.join(""))).join("/")}function n(e,t){let n=t+1;t>=0?"/"===e[t+1]&&"/"===e[t+2]&&(n=t+3):"/"===e[0]&&"/"===e[1]&&(n=2);const i=e.indexOf("/",n);return i<0?e:e.substr(0,i)+r(e.substr(i))}function i(e){return!e||"#"===e||"?"===e||"/"===e}Object.defineProperty(t,"__esModule",{value:!0}),t.removeDotSegmentsOfPath=t.removeDotSegments=t.resolve=void 0,t.resolve=function(e,t){const i=(t=t||"").indexOf("#");if(i>0&&(t=t.substr(0,i)),!e.length){if(t.indexOf(":")<0)throw new Error(`Found invalid baseIRI '${t}' for value '${e}'`);return t}if(e.startsWith("?")){const r=t.indexOf("?");return r>0&&(t=t.substr(0,r)),t+e}if(e.startsWith("#"))return t+e;if(!t.length){const t=e.indexOf(":");if(t<0)throw new Error(`Found invalid relative IRI '${e}' for a missing baseIRI`);return n(e,t)}const a=e.indexOf(":");if(a>=0)return n(e,a);const o=t.indexOf(":");if(o<0)throw new Error(`Found invalid baseIRI '${t}' for value '${e}'`);const s=t.substr(0,o+1);if(0===e.indexOf("//"))return s+n(e,a);let c;if(t.indexOf("//",o)===o+1){if(c=t.indexOf("/",o+3),c<0)return t.length>o+3?t+"/"+n(e,a):s+n(e,a)}else if(c=t.indexOf("/",o+1),c<0)return s+n(e,a);if(0===e.indexOf("/"))return t.substr(0,c)+r(e);let u=t.substr(c);const l=u.lastIndexOf("/");return l>=0&&l{var n=r(1048),i=n.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},21925:e=>{var t=function(){var e=function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},t=[7,12,13,14,15,16,20,25,115,130],r=[7,13,16,20,25,115,130],n=[7,13,16,115,130],i=[1,25],a=[1,29],o=[1,27],s=[1,28],c=[13,16,115,130],u=[13,16,28,38,40,42,44,46,48,53,56,61,67,85,87,92,93,95,96,102,110,111,115,119,120,126,128,129,130,131,132,133,134,135,136],l=[28,56],d=[1,42],h=[46,48,53,56],p=[1,54],f=[1,60],y=[1,56],g=[1,57],m=[1,58],b=[1,63],v=[1,64],_=[1,65],w=[1,66],T=[1,67],S=[1,68],O=[1,75],E=[28,46,48,53,56],x=[28,42,46,48,53,56],A=[13,16,28,38,40,42,44,46,48,53,56,92,115,119,120,130,131,132,133,134,135,136],R=[13,16,28,38,40,42,44,46,48,53,56,67,85,87,92,95,96,115,119,120,126,128,129,130,131,132,133,134,135,136],I=[13,16,38,40,44,92,115,119,120,130,131,132,133,134,135,136],P=[13,16,28,38,40,42,44,46,48,53,56,67,85,87,92,95,96,115,117,118,119,120,126,128,129,130,131,132,133,134,135,136],N=[13,16,28,56,115,130],D=[13,16,38,58,87,96,109,115,126,130],j=[1,116],C=[1,112],M=[1,108],L=[1,114],k=[1,111],F=[7,13,16,20,25,44,48,53,56,67,85,87,95,96,115,128,129,130],B=[48,53],U=[48,53,87,96,126],q=[13,16,44,48,53,56,85,87,95,96,115,128,129,130],V=[1,126],Q=[13,16,40,44,48,53,56,85,87,95,96,115,128,129,130],$=[1,129],H=[48,53,67,87,96,126],G=[13,16,40,44,48,53,56,67,85,87,95,96,115,128,129,130],z=[1,133],K=[13,16,40,44,48,53,56,67,85,87,95,96,102,115,128,129,130],X=[13,16,40,44,48,53,56,67,85,87,93,95,96,102,110,111,115,128,129,130],J=[1,151],W=[1,153],Y=[1,156],Z=[1,157],ee=[1,158],te=[1,167],re=[1,175],ne=[13,16,44,48,53,56,67,85,87,95,96,115,128,129,130],ie=[13,16,44,48,53,56,67,85,87,95,96,115,126,128,129,130],ae=[13,16,46,92,115,119,120,130,131,132,133,134,135,136],oe={trace:function(){},yy:{},symbols_:{error:2,shaclDoc:3,shaclDoc_repetition0:4,shaclDoc_repetition1:5,ttlSection:6,EOF:7,directive:8,baseDecl:9,importsDecl:10,prefixDecl:11,KW_BASE:12,IRIREF:13,KW_IMPORTS:14,KW_PREFIX:15,PNAME_NS:16,nodeShapeIri:17,iri:18,nodeShape:19,KW_SHAPE:20,nodeShape_option0:21,nodeShape_option1:22,nodeShapeBody:23,shapeClass:24,KW_SHAPE_CLASS:25,shapeClass_option0:26,turtleAnnotation:27,";":28,turtleAnnotation2:29,predicate:30,turtleAnnotation2_option0:31,objectList:32,object:33,objectList_repetition0:34,iriOrLiteral:35,blankNodeSection:36,list:37,"(":38,list_repetition0:39,")":40,objectTail:41,",":42,LB:43,"[":44,RB:45,"]":46,LP:47,"%":48,RP:49,pcSection:50,iriHead:51,ttlStatement:52,".":53,ttlSection_repetition0:54,startNodeShape:55,"{":56,endNodeShape:57,"}":58,nodeShapeBody_repetition0:59,targetClass:60,"->":61,targetClass_repetition_plus0:62,constraint:63,constraint_group0:64,constraint_option0:65,orNotComponent:66,"|":67,nodeNot:68,nodeOrEmit:69,nodeOr:70,nodeOr_repetition_plus0:71,nodeValue:72,negation:73,nodeValue_group0:74,"=":75,iriOrLiteralOrArray:76,propertyShape:77,path:78,propertyShape_repetition0:79,propertyOrComponent:80,propertyNot:81,propertyOr:82,propertyOr_repetition_plus0:83,propertyAtom:84,NODEKIND:85,shapeRef:86,PARAM:87,propertyCount:88,propertyMinCount:89,"..":90,propertyMaxCount:91,INTEGER:92,"*":93,shapeRef_group0:94,"@":95,"!":96,pathAlternative:97,additionalAlternative:98,pathSequence:99,pathAlternative_repetition_plus0:100,additionalSequence:101,"/":102,pathEltOrInverse:103,pathSequence_repetition_plus0:104,pathElt:105,pathPrimary:106,pathMod:107,pathInverse:108,"^":109,"?":110,"+":111,iriOrLiteralOrArray_repetition0:112,literal:113,iri_group0:114,a:115,string:116,LANGTAG:117,"^^":118,DECIMAL:119,DOUBLE:120,literal_group0:121,string_group0:122,string_group1:123,shaclDoc_repetition1_group0:124,constraint_group0_repetition_plus0:125,TARGET:126,propertyShape_repetition0_group0:127,ATPNAME_LN:128,ATPNAME_NS:129,PNAME_LN:130,KW_TRUE:131,KW_FALSE:132,STRING_LITERAL1:133,STRING_LITERAL2:134,STRING_LITERAL_LONG1:135,STRING_LITERAL_LONG2:136,$accept:0,$end:1},terminals_:{2:"error",7:"EOF",12:"KW_BASE",13:"IRIREF",14:"KW_IMPORTS",15:"KW_PREFIX",16:"PNAME_NS",20:"KW_SHAPE",25:"KW_SHAPE_CLASS",28:";",38:"(",40:")",42:",",44:"[",46:"]",48:"%",53:".",56:"{",58:"}",61:"->",67:"|",75:"=",85:"NODEKIND",87:"PARAM",90:"..",92:"INTEGER",93:"*",95:"@",96:"!",102:"/",109:"^",110:"?",111:"+",115:"a",117:"LANGTAG",118:"^^",119:"DECIMAL",120:"DOUBLE",126:"TARGET",128:"ATPNAME_LN",129:"ATPNAME_NS",130:"PNAME_LN",131:"KW_TRUE",132:"KW_FALSE",133:"STRING_LITERAL1",134:"STRING_LITERAL2",135:"STRING_LITERAL_LONG1",136:"STRING_LITERAL_LONG2"},productions_:[0,[3,4],[8,1],[8,1],[8,1],[9,2],[10,2],[11,3],[17,1],[19,5],[24,4],[27,2],[29,2],[30,2],[32,2],[33,1],[33,1],[33,1],[37,3],[41,2],[43,1],[45,1],[36,3],[47,1],[49,1],[50,3],[51,1],[52,3],[6,1],[55,1],[57,1],[23,3],[60,2],[63,3],[66,2],[69,1],[70,1],[70,2],[68,1],[68,2],[72,3],[77,2],[80,2],[82,1],[82,2],[81,1],[81,2],[84,1],[84,1],[84,1],[84,3],[84,1],[88,5],[89,1],[91,1],[91,1],[86,1],[86,2],[73,1],[78,1],[98,2],[97,1],[97,2],[101,2],[99,1],[99,2],[105,1],[105,2],[103,1],[103,2],[108,1],[107,1],[107,1],[107,1],[106,1],[106,3],[76,1],[76,3],[35,1],[35,1],[18,1],[18,1],[18,1],[113,1],[113,2],[113,3],[113,1],[113,1],[113,1],[113,1],[116,1],[116,1],[4,0],[4,2],[124,1],[124,1],[5,0],[5,2],[21,0],[21,1],[22,0],[22,1],[26,0],[26,1],[31,0],[31,1],[34,0],[34,2],[39,0],[39,2],[54,0],[54,2],[59,0],[59,2],[62,1],[62,2],[125,1],[125,2],[64,1],[64,1],[65,0],[65,1],[71,1],[71,2],[74,1],[74,1],[127,1],[127,1],[79,0],[79,2],[83,1],[83,2],[94,1],[94,1],[100,1],[100,2],[104,1],[104,2],[112,0],[112,2],[114,1],[114,1],[121,1],[121,1],[122,1],[122,1],[123,1],[123,1]],performAction:function(e,t,r,n,i,a,o){var s,c,u=a.length-1;switch(i){case 1:this.$=Re(De.factory.namedNode(Te("")),De.factory.namedNode(ce),De.factory.namedNode(be+"Ontology"));break;case 5:De.base=De.factory.namedNode(a[u].slice(1,-1)),De.n3Parser._setBase(De.base.value);break;case 6:this.$=Re(De.base,De.factory.namedNode(be+"imports"),De.factory.namedNode(a[u].slice(1,-1)));break;case 7:this.$=De.prefixes[a[u-1].substr(0,a[u-1].length-1)]=Te(a[u]);break;case 8:De.nodeShapeStack=!1,Re(De.currentNodeShape=a[u],De.factory.namedNode(ce),De.factory.namedNode(me+"NodeShape"));break;case 10:this.$=Re(De.currentNodeShape,De.factory.namedNode(ce),De.factory.namedNode(ve+"Class"));break;case 11:this.$=Pe();break;case 13:this.$=a[u].forEach((e=>Re(De.currentNodeShape,a[u-1],e)));break;case 14:this.$=[a[u-1],...a[u]];break;case 18:this.$=we(a[u-1],!0);break;case 19:case 34:case 42:case 60:case 63:this.$=a[u];break;case 20:De.tempCurrentNodeShape=De.currentNodeShape,this.$=De.currentNodeShape=Ee();break;case 21:case 24:De.currentNodeShape=De.tempCurrentNodeShape;break;case 22:case 31:this.$=a[u-2];break;case 23:De.tempCurrentNodeShape=De.currentNodeShape,De.currentNodeShape=De.currentPropertyNode;break;case 26:De.currentNodeShape=a[u];break;case 29:De.nodeShapeStack?(De.nodeShapeStack.push(De.currentNodeShape),Re(De.currentPropertyNode,De.factory.namedNode(me+"node"),De.currentNodeShape=Ee())):De.nodeShapeStack=[],this.$=De.currentNodeShape;break;case 30:De.nodeShapeStack.length>0&&(De.currentNodeShape=De.nodeShapeStack.pop());break;case 32:this.$=a[u].forEach((e=>{Re(De.currentNodeShape,De.factory.namedNode(me+"targetClass"),e)}));break;case 35:this.$=Re(De.currentNodeShape,De.factory.namedNode(me+a[u][0]),a[u][1]);break;case 36:break;case 37:const e=we([a[u-1],...a[u]].map((e=>{const t=Ee();return Re(t,De.factory.namedNode(me+e[0]),e[1]),t})));this.$=["or",e];break;case 39:case 46:this.$=function(e,t,r){const n=Ee();return Re(n,De.factory.namedNode(me+t),r),[e,n]}("not",...a[u]);break;case 40:case 50:this.$=[a[u-2],a[u]];break;case 43:this.$=a[u]&&Ie(...a[u]);break;case 44:this.$=Ie("or",we([a[u-1],...a[u]].map((e=>{const t=Ee();return Re(t,De.factory.namedNode(me+e[0]),e[1]),t}))));break;case 47:this.$=[_e[a[u].value]?"datatype":"class",a[u]];break;case 48:this.$=["nodeKind",De.factory.namedNode(me+a[u])];break;case 49:this.$=["node",De.factory.namedNode(a[u])];break;case 51:this.$=void 0;break;case 53:this.$=a[u]>0&&Ie("minCount",Oe(a[u],pe));break;case 54:this.$=Ie("maxCount",Oe(a[u],pe));break;case 56:this.$=Se(a[u].slice(1));break;case 57:this.$=Te(a[u]);break;case 59:Re(De.currentNodeShape,De.factory.namedNode(me+"property"),De.currentPropertyNode=Ee()),Ie("path",a[u]);break;case 62:const t=Ee();Re(t,De.factory.namedNode(me+"alternativePath"),we([a[u-1],...a[u]])),this.$=t;break;case 65:this.$=we([a[u-1],...a[u]]);break;case 67:Re(this.$=Ee(),De.factory.namedNode(me+a[u]),a[u-1]);break;case 69:Re(this.$=Ee(),De.factory.namedNode(me+"inversePath"),a[u]);break;case 71:this.$="zeroOrOnePath";break;case 72:this.$="zeroOrMorePath";break;case 73:this.$="oneOrMorePath";break;case 75:this.$=a[u-1];break;case 77:this.$=we(a[u-1]);break;case 80:this.$=De.factory.namedNode(Te(a[u]));break;case 81:this.$=De.factory.namedNode(Se(a[u]));break;case 82:this.$=Pe(De.factory.namedNode(ce));break;case 83:this.$=Oe(a[u]);break;case 84:this.$=(s=a[u-1],c=lowercase(a[u].substr(1)),De.factory.literal(s,c));break;case 85:this.$=Oe(a[u-2],a[u]);break;case 86:this.$=Oe(a[u],pe);break;case 87:this.$=Oe(a[u],fe);break;case 88:this.$=Oe(a[u].toLowerCase(),ye);break;case 89:this.$=Oe(a[u].toLowerCase(),ge);break;case 90:this.$=Ae(a[u],1);break;case 91:this.$=Ae(a[u],3);break;case 92:case 96:case 106:case 108:case 110:case 112:case 128:case 138:this.$=[];break;case 93:case 97:case 107:case 109:case 111:case 113:case 115:case 117:case 123:case 129:case 131:case 135:case 137:case 139:a[u-1].push(a[u]);break;case 114:case 116:case 122:case 130:case 134:case 136:this.$=[a[u]]}},table:[e(t,[2,92],{3:1,4:2}),{1:[3]},e(r,[2,96],{5:3,8:4,9:5,10:6,11:7,12:[1,8],14:[1,9],15:[1,10]}),e(n,[2,110],{6:11,124:12,54:13,19:14,24:15,20:[1,16],25:[1,17]}),e(t,[2,93]),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{13:[1,18]},{13:[1,19]},{16:[1,20]},{7:[1,21]},e(r,[2,97]),{7:[2,28],13:i,16:a,18:24,51:23,52:22,114:26,115:o,130:s},e(r,[2,94]),e(r,[2,95]),{13:i,16:a,17:30,18:31,114:26,115:o,130:s},{13:i,16:a,17:32,18:31,114:26,115:o,130:s},e(t,[2,5]),e(t,[2,6]),{13:[1,33]},{1:[2,1]},e(n,[2,111]),{13:i,16:a,18:36,29:34,30:35,114:26,115:o,130:s},e(c,[2,26]),e(u,[2,80]),e(u,[2,81]),e(u,[2,82]),e(u,[2,140]),e(u,[2,141]),e(l,[2,98],{21:37,60:38,61:[1,39]}),e([28,56,61],[2,8]),{26:40,27:41,28:d,56:[2,102]},e(t,[2,7]),{53:[1,43]},e(h,[2,104],{31:44,27:45,28:d}),{13:i,16:a,18:51,32:46,33:47,35:48,36:49,37:50,38:p,43:53,44:f,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},{22:69,27:70,28:d,56:[2,100]},e(l,[2,99]),{13:i,16:a,18:72,62:71,114:26,115:o,130:s},{23:73,55:74,56:O},{56:[2,103]},{13:i,16:a,18:36,29:76,30:35,114:26,115:o,130:s},e(n,[2,27]),e(h,[2,12]),e(h,[2,105]),e(E,[2,13]),e(x,[2,106],{34:77}),e(A,[2,15]),e(A,[2,16]),e(A,[2,17]),e(R,[2,78]),e(R,[2,79]),{13:i,16:a,18:36,29:78,30:35,114:26,115:o,130:s},e(I,[2,108],{39:79}),e(R,[2,83],{117:[1,80],118:[1,81]}),e(R,[2,86]),e(R,[2,87]),e(R,[2,88]),e(R,[2,89]),e(c,[2,20]),e(P,[2,90]),e(P,[2,91]),e(R,[2,142]),e(R,[2,143]),e(P,[2,144]),e(P,[2,145]),e(P,[2,146]),e(P,[2,147]),{23:82,55:74,56:O},{56:[2,101]},e(l,[2,32],{114:26,18:83,13:i,16:a,115:o,130:s}),e(N,[2,114]),e(r,[2,10]),e(D,[2,112],{59:84}),e(D,[2,29]),e(h,[2,11]),e(E,[2,14],{41:85,42:[1,86]}),{45:87,46:[1,88]},{13:i,16:a,18:51,33:90,35:48,36:49,37:50,38:p,40:[1,89],43:53,44:f,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},e(R,[2,84]),{13:i,16:a,18:91,114:26,115:o,130:s},e(r,[2,9]),e(N,[2,115]),{13:i,16:a,18:115,38:j,57:92,58:[1,94],63:93,64:95,68:102,69:98,70:100,72:104,73:105,74:107,77:97,78:99,87:C,96:M,97:101,99:103,103:106,105:109,106:113,108:110,109:L,114:26,115:o,125:96,126:k,130:s},e(x,[2,107]),{13:i,16:a,18:51,33:117,35:48,36:49,37:50,38:p,43:53,44:f,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},e(A,[2,22]),e(A,[2,21]),e(A,[2,18]),e(I,[2,109]),e(R,[2,85]),e(F,[2,31]),e(D,[2,113]),e(F,[2,30]),{47:120,48:[1,121],50:119,53:[2,120],65:118},e(B,[2,118],{70:100,68:102,72:104,73:105,74:107,69:122,87:C,96:M,126:k}),e(B,[2,119]),e(U,[2,116]),e(q,[2,128],{79:123}),e(U,[2,35]),e(q,[2,59]),e(U,[2,36],{71:124,66:125,67:V}),e(Q,[2,61],{100:127,98:128,67:$}),e(H,[2,38]),{72:130,74:107,87:C,126:k},e(G,[2,64],{104:131,101:132,102:z}),{75:[1,134]},e([13,16,56,85,87,95,115,126,128,129,130],[2,58]),e(K,[2,68]),{13:i,16:a,18:115,38:j,105:135,106:113,114:26,115:o,130:s},{75:[2,124]},{75:[2,125]},e(K,[2,66],{107:136,93:[1,138],110:[1,137],111:[1,139]}),e([13,16,38,115,130],[2,70]),e(X,[2,74]),{13:i,16:a,18:115,38:j,97:140,99:103,103:106,105:109,106:113,108:110,109:L,114:26,115:o,130:s},e(x,[2,19]),{53:[1,141]},{53:[2,121]},{13:i,16:a,18:36,29:142,30:35,114:26,115:o,130:s},e(c,[2,23]),e(U,[2,117]),e(B,[2,41],{114:26,55:74,127:143,88:144,82:145,81:147,84:148,73:149,18:150,86:152,23:154,94:155,13:i,16:a,44:[1,146],56:O,85:J,87:W,95:Y,96:M,115:o,128:Z,129:ee,130:s}),e(U,[2,37],{66:159,67:V}),e(H,[2,122]),{68:160,72:104,73:105,74:107,87:C,96:M,126:k},e(Q,[2,62],{98:161,67:$}),e(G,[2,134]),{13:i,16:a,18:115,38:j,99:162,103:106,105:109,106:113,108:110,109:L,114:26,115:o,130:s},e(H,[2,39]),e(G,[2,65],{101:163,102:z}),e(K,[2,136]),{13:i,16:a,18:115,38:j,103:164,105:109,106:113,108:110,109:L,114:26,115:o,130:s},{13:i,16:a,18:51,35:166,44:te,76:165,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},e(K,[2,69]),e(K,[2,67]),e(K,[2,71]),e(K,[2,72]),e(K,[2,73]),{40:[1,168]},e(D,[2,33]),{48:[1,170],49:169},e(q,[2,129]),e(q,[2,126]),e(q,[2,127]),{89:171,92:[1,172]},e(q,[2,43],{83:173,80:174,67:re}),e(ne,[2,45]),{13:i,16:a,18:150,23:154,55:74,56:O,84:176,85:J,86:152,87:W,94:155,95:Y,114:26,115:o,128:Z,129:ee,130:s},e(ne,[2,47]),e(ne,[2,48]),e(ne,[2,49]),{75:[1,177]},e(ne,[2,51]),e(ne,[2,56]),{13:[1,178]},e(ne,[2,132]),e(ne,[2,133]),e(H,[2,123]),e(H,[2,34]),e(G,[2,135]),e(G,[2,60]),e(K,[2,137]),e(K,[2,63]),e(H,[2,40]),e(ie,[2,76]),e(ae,[2,138],{112:179}),e(X,[2,75]),{53:[2,25]},{53:[2,24]},{90:[1,180]},{90:[2,53]},e(q,[2,44],{80:181,67:re}),e(ne,[2,130]),{13:i,16:a,18:150,23:154,55:74,56:O,73:149,81:182,84:148,85:J,86:152,87:W,94:155,95:Y,96:M,114:26,115:o,128:Z,129:ee,130:s},e(ne,[2,46]),{13:i,16:a,18:51,35:166,44:te,76:183,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},e(ne,[2,57]),{13:i,16:a,18:51,35:185,46:[1,184],92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},{91:186,92:[1,187],93:[1,188]},e(ne,[2,131]),e(ne,[2,42]),e(ne,[2,50]),e(ie,[2,77]),e(ae,[2,139]),{46:[1,189]},{46:[2,54]},{46:[2,55]},e(q,[2,52])],defaultActions:{21:[2,1],41:[2,103],70:[2,101],111:[2,124],112:[2,125],119:[2,121],169:[2,25],170:[2,24],172:[2,53],187:[2,54],188:[2,55]},parseError:function(e,t){if(!t.recoverable){var r=new Error(e);throw r.hash=t,r}this.trace(e)},parse:function(e){var t=this,r=[0],n=[null],i=[],a=this.table,o="",s=0,c=0,u=0,l=i.slice.call(arguments,1),d=Object.create(this.lexer),h={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(h.yy[p]=this.yy[p]);d.setInput(e,h.yy),h.yy.lexer=d,h.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;i.push(f);var y,g=d.options&&d.options.ranges;"function"==typeof h.yy.parseError?this.parseError=h.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,b,v,_,w,T,S,O,E,x={};;){if(v=r[r.length-1],this.defaultActions[v]?_=this.defaultActions[v]:(null==m&&(y=void 0,"number"!=typeof(y=d.lex()||1)&&(y=t.symbols_[y]||y),m=y),_=a[v]&&a[v][m]),void 0===_||!_.length||!_[0]){var A;for(T in E=[],a[v])this.terminals_[T]&&T>2&&E.push("'"+this.terminals_[T]+"'");A=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:f,expected:E})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+m);switch(_[0]){case 1:r.push(m),n.push(d.yytext),i.push(d.yylloc),r.push(_[1]),m=null,b?(m=b,b=null):(c=d.yyleng,o=d.yytext,s=d.yylineno,f=d.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[_[1]][1],x.$=n[n.length-S],x._$={first_line:i[i.length-(S||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(S||1)].first_column,last_column:i[i.length-1].last_column},g&&(x._$.range=[i[i.length-(S||1)].range[0],i[i.length-1].range[1]]),void 0!==(w=this.performAction.apply(x,[o,c,s,h.yy,_[1],n,i].concat(l))))return w;S&&(r=r.slice(0,-1*S*2),n=n.slice(0,-1*S),i=i.slice(0,-1*S)),r.push(this.productions_[_[1]][0]),n.push(x.$),i.push(x._$),O=a[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}};const se="http://www.w3.org/1999/02/22-rdf-syntax-ns#",ce=se+"type",ue=se+"first",le=se+"rest",de=se+"nil",he="http://www.w3.org/2001/XMLSchema#",pe=he+"integer",fe=he+"decimal",ye=he+"double",ge=he+"boolean",me="http://www.w3.org/ns/shacl#",be="http://www.w3.org/2002/07/owl#",ve="http://www.w3.org/2000/01/rdf-schema#",_e={[pe]:!0,[fe]:!0,[he+"float"]:!0,[ye]:!0,[he+"string"]:!0,[ge]:!0,[he+"dateTime"]:!0,[he+"nonPositiveInteger"]:!0,[he+"negativeInteger"]:!0,[he+"long"]:!0,[he+"int"]:!0,[he+"short"]:!0,[he+"byte"]:!0,[he+"nonNegativeInteger"]:!0,[he+"unsignedLong"]:!0,[he+"unsignedShort"]:!0,[he+"unsignedByte"]:!0,[he+"positiveInteger"]:!0,[se+"langString"]:!0};function we(e,t=!1){let r=0,n=e.length;if(t&&0===n)return De.factory.namedNode(de);const i=head=Ee();return 0===n&&Re(head,De.factory.namedNode(le),De.factory.namedNode(de)),e.forEach((e=>{if(void 0===e)throw new Error("b");Re(head,De.factory.namedNode(ue),e),Re(head,De.factory.namedNode(le),head=++r20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var r,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;at[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{flex:!0,"case-insensitive":!0},performAction:function(e,t,r,n){switch(r){case 0:break;case 1:return 12;case 2:return 14;case 3:return 15;case 4:return 25;case 5:return 20;case 6:return 131;case 7:return 132;case 8:return 85;case 9:return 126;case 10:return 87;case 11:return"PASS";case 12:return"COMMENT";case 13:return 13;case 14:return 16;case 15:return 130;case 16:return 129;case 17:return 128;case 18:return 117;case 19:return 92;case 20:return 119;case 21:return 120;case 22:return"EXPONENT";case 23:return 133;case 24:return 134;case 25:return 135;case 26:return 136;case 27:return 61;case 28:return 90;case 29:return 58;case 30:return 56;case 31:return 38;case 32:return 40;case 33:return 44;case 34:return 46;case 35:return 110;case 36:return 93;case 37:return 111;case 38:return 67;case 39:return 118;case 40:return 53;case 41:return 96;case 42:return 102;case 43:return 75;case 44:return 95;case 45:return 109;case 46:return 28;case 47:return 42;case 48:return 48;case 49:return 115;case 50:return 7;case 51:console.log(t.yytext)}},rules:[/^(?:\s+|#[^\n\r]*)/i,/^(?:BASE)/i,/^(?:IMPORTS)/i,/^(?:PREFIX)/i,/^(?:shapeClass)/i,/^(?:shape)/i,/^(?:true)/i,/^(?:false)/i,/^(?:(BlankNode|IRI|Literal|BlankNodeOrIRI|BlankNodeOrLiteral|IRIOrLiteral\b))/i,/^(?:(targetNode|targetObjectsOf|targetSubjectsOf\b))/i,/^(?:(deactivated|severity|message|class|datatype|nodeKind|minExclusive|minInclusive|maxExclusive|maxInclusive|minLength|maxLength|pattern|flags|languageIn|uniqueLang|equals|disjoint|lessThan|lessThanOrEquals|qualifiedValueShape|qualifiedMinCount|qualifiedMaxCount|qualifiedValueShapesDisjoint|closed|ignoredProperties|hasValue|in))/i,/^(?:([ \t\r\n]+))/i,/^(?:(#[\r\n]*))/i,/^(?:(<([^=<>\"\{\}\|\^`\\\u0000-\u0020]|(\\u([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])|\\U([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])))*>))/i,/^(?:((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.)*((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040]))?)?:))/i,/^(?:(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.)*((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040]))?)?:)(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|:|[0-9]|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))*(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%)))))?)))/i,/^(?:(@(([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.)*((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040]))?)?:))/i,/^(?:(@((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.)*((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040]))?)?:)(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|:|[0-9]|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))*(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%)))))?)))/i,/^(?:(@[a-zA-Z]+(-[a-zA-Z0-9]+)*))/i,/^(?:([+-]?[0-9]+))/i,/^(?:([+-]?[0-9]*\.[0-9]+))/i,/^(?:([+-]?([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.?[0-9]+([eE][+-]?[0-9]+))))/i,/^(?:([eE][+-]?[0-9]+))/i,/^(?:('(?:(?:[^\u0027\u005C\u000A\u000D])|(\\[tbnrf\\\"\']))*'))/i,/^(?:("(?:(?:[^\u0022\u005C\u000A\u000D])|(\\[tbnrf\\\"\']))*"))/i,/^(?:('''(?:(?:'|'')?(?:[^'\\]|(\\[tbnrf\\\"\'])))*'''))/i,/^(?:("""(?:(?:"|"")?(?:[^\"\\]|(\\[tbnrf\\\"\'])))*"""))/i,/^(?:->)/i,/^(?:\.\.)/i,/^(?:\})/i,/^(?:\{)/i,/^(?:\()/i,/^(?:\))/i,/^(?:\[)/i,/^(?:\])/i,/^(?:\?)/i,/^(?:\*)/i,/^(?:\+)/i,/^(?:\|)/i,/^(?:\^\^)/i,/^(?:\.)/i,/^(?:!)/i,/^(?:\/)/i,/^(?:=)/i,/^(?:@)/i,/^(?:\^)/i,/^(?:;)/i,/^(?:,)/i,/^(?:%)/i,/^(?:a)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};function De(){this.yy={}}return oe.lexer=Ne,De.prototype=oe,oe.Parser=De,new De}();e.exports=t},21762:(e,t,r)=>{const n=r(21925).Parser,i=r(72243);class a{constructor(){}parse(e,{extendedSyntax:t,baseIRI:r}={}){this._parser=new n,this._parser.Parser.factory=i.DataFactory,this._parser.Parser.base=i.DataFactory.namedNode(r||"urn:x-base:default"),this._parser.Parser.extended=!0===t,this._parser.Parser.prefixes={rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",sh:"http://www.w3.org/ns/shacl#",xsd:"http://www.w3.org/2001/XMLSchema#"},this._parser.Parser.currentNodeShape=void 0,this._parser.Parser.currentPropertyNode=void 0,this._parser.Parser.nodeShapeStack=[],this._parser.Parser.tempCurrentNodeShape=void 0,this._parser.Parser.n3Parser=new i.Parser({baseIRI:r||"urn:x-base:default"});const a=[];return this._parser.Parser.onQuad=e=>{a.push(e)},this._parser.parse(e),a.prefixes=this._parser.Parser.prefixes,a}}e.exports.Parser=a,e.exports.parse=function(e,t){return(new a).parse(e,t)}},23344:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=r(72243),o=r(37669),s=r(64817),c=r(98118),u=i(r(57756)),l=i(r(14791)),d=i(r(58007));function h(e){var t;return null===(t=/^[^]*[#/]/.exec(e))||void 0===t?void 0:t[0]}const p={"http://www.w3.org/1999/02/22-rdf-syntax-ns#":"rdf","http://www.w3.org/2000/01/rdf-schema#":"rdfs","http://www.w3.org/ns/shacl#":"sh","http://www.w3.org/2001/XMLSchema#":"xsd"},f={rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",sh:"http://www.w3.org/ns/shacl#",xsd:"http://www.w3.org/2001/XMLSchema#"};t.default=class{constructor(e,t,r={},n=void 0,i=!0,a=!1,o,s=!1){this.store=e,this.base=n,this.errorOnExtraQuads=i,this.mintUnspecifiedPrefixes=a,this.fetch=o,this.extendedSyntax=s,this.prefixes={},this.prefixRev={};for(const e of Object.keys(r)){const t=r[e],n="string"==typeof t?t:t.value;n in p||e in f||(this.prefixRev[n]=e,this.prefixes[e]=n)}this.writer=t}write(){return n(this,void 0,void 0,(function*(){const e=this.store.getQuads(null,"http://www.w3.org/1999/02/22-rdf-syntax-ns#type","http://www.w3.org/2002/07/owl#Ontology",null);if(1!==e.length||"NamedNode"!==e[0].subject.termType)throw new Error("Base expected");{const t=e[0].subject;this.store.removeQuads(e),t.equals(new a.NamedNode("urn:x-base:default"))||this.writer.add(`BASE ${(0,s.termToString)(t)}`),yield this.writeImports(t)}if(this.mintUnspecifiedPrefixes){const e=new Set;for(const t of[...this.store.getSubjects(null,null,null),...this.store.getPredicates(null,null,null),...this.store.getObjects(null,null,null)])if("NamedNode"===t.termType){const r=h(t.value);!r||r in this.prefixRev||r in p||e.add(r)}const t=Object.assign(Object.assign({},this.prefixes),f);yield Promise.all([...e].map((e=>(0,o.uriToPrefix)(e,{fetch:this.fetch,mintOnUnknown:!0,existingPrefixes:t}).then((r=>{this.prefixes[r]=e,t[r]=e,this.prefixRev[e]=r})))))}const t=new Set([...this.store.getSubjects(null,null,null),...this.store.getPredicates(null,null,null),...this.store.getObjects(null,null,null)].filter((e=>"NamedNode"===e.termType)).map((e=>h(e.value))).filter((e=>"string"==typeof e)));for(const e in this.prefixRev)t.has(e)||(delete this.prefixes[this.prefixRev[e]],delete this.prefixRev[e]);if(yield this.writePrefixes(),this.prefixes=Object.assign(Object.assign({},this.prefixes),f),this.prefixRev=Object.assign(Object.assign({},this.prefixRev),p),this.writer.newLine(),yield this.writeShapes(),this.extendedSyntax){const e=this.store.getSubjects(null,null,null);e.length>0&&this.writer.newLine(1);for(const t of e)this.writer.add(yield this.termToString(t,!0,!0)),this.writer.add(" "),this.writer.indent(),yield this.writeTurtlePredicates(t),this.writer.deindent();e.length>0&&(this.writer.add(" ."),this.writer.newLine())}if(this.errorOnExtraQuads&&this.store.size>0)throw new Error("Dataset contains quads that cannot be written in SHACLC");this.writer.end()}))}writeImports(e){return n(this,void 0,void 0,(function*(){const t=this.store.getObjectsOnce(e,new a.NamedNode("http://www.w3.org/2002/07/owl#imports"),null);if(t.length>0)for(const e of t)this.writer.add(`IMPORTS <${e.value}>`,!0)}))}writePrefixes(){return n(this,void 0,void 0,(function*(){const e=Object.keys(this.prefixes).filter((e=>!(e in l.default))).sort();if(e.length>0)for(const t of e)this.writer.add(`PREFIX ${t}: <${this.prefixes[t]}>`,!0)}))}termToString(e,t=!1,r=!1){return n(this,void 0,void 0,(function*(){try{if(t)throw new Error("Shacl name disabled");return(0,c.getShaclName)(e)}catch(e){}if("NamedNode"===e.termType){const t=h(e.value);return t&&t in this.prefixRev&&t in this.prefixRev?`${this.prefixRev[t]}:${e.value.slice(t.length)}`:(0,s.termToString)(e)}if("Literal"===e.termType)return"http://www.w3.org/2001/XMLSchema#integer"===e.datatypeString||"http://www.w3.org/2001/XMLSchema#boolean"===e.datatypeString?e.value:(0,s.termToString)(e);throw"BlankNode"===e.termType&&r&&(0,s.termToString)(e),new Error(`Invalid term type for extra statement ${e.value} (${e.termType})`)}))}writeShapes(){return n(this,void 0,void 0,(function*(){for(const e of this.store.getSubjectsOnce(new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new a.NamedNode("http://www.w3.org/ns/shacl#NodeShape"),null)){this.store.getQuadsOnce(e,new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new a.NamedNode("http://www.w3.org/2000/01/rdf-schema#Class"),null).length>0?this.writer.add("shapeClass "):this.writer.add("shape "),this.writer.add(yield this.termToString(e)),this.writer.add(" ");const t=this.store.getObjectsOnce(e,new a.NamedNode("http://www.w3.org/ns/shacl#targetClass"),null);if(t.length>0){this.writer.add("-> ");for(const e of t)"NamedNode"===e.termType?this.writer.add(yield this.termToString(e)):(this.writer.add("!"),this.writer.add(yield this.termToString(this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#not"),!0)))),this.writer.add(" ")}const r=this.store.getPredicates(e,null,null).filter((e=>[new a.NamedNode("http://www.w3.org/ns/shacl#targetClass"),new a.NamedNode("http://www.w3.org/ns/shacl#property"),new a.NamedNode("http://www.w3.org/ns/shacl#or"),...Object.keys(d.default).map((e=>new a.NamedNode("http://www.w3.org/ns/shacl#"+e)))].every((t=>!e.equals(t)))));r.length>0&&(this.writer.add(";"),this.writer.indent(),this.writer.newLine(1)),this.extendedSyntax&&(yield this.writeGivenTurtlePredicates(e,r)),r.length>0&&(this.writer.add(" "),this.writer.deindent()),yield this.writeShapeBody(e,!1)}}))}getSingleProperty(e,t){let r=[e];try{let n=(0,c.getShaclName)(e.predicate),i="pred";if("not"===n){const t=this.store.getQuadsOnce(e.object,null,null,null);if(r=r.concat(t),1!==t.length)throw new Error("Can only handle having one predicate of 'not'");[e]=t,n=(0,c.getShaclName)(e.predicate),i="not"}if(!(n in t))throw new Error(`${n} is not allowed`);return{name:n,type:i,object:e.object}}catch(e){this.store.addQuads(r)}}singleLayerPropertiesList(e,t){const r=[];for(const n of this.store.getQuadsOnce(e,null,null,null)){const e=this.getSingleProperty(n,t);e&&r.push(e)}return r}expectOneProperty(e,t){const r=this.store.getQuadsOnce(e,null,null,null);if(1===r.length){const e=this.getSingleProperty(r[0],t);if(e)return e}this.store.addQuads(r)}orProperties(e,t){const r=[];for(const n of this.store.getQuadsOnce(e,new a.NamedNode("http://www.w3.org/ns/shacl#or"),null,null)){const e=[];for(const r of this.getList(n.object)){const i=this.expectOneProperty(r,t);if(!i)throw this.store.addQuad(n),new Error("Each entry of the 'or' statement must declare exactly one property");e.push(i)}r.push(e)}return r}getList(e){let t=e;const r=[];for(;!t.equals(new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"));)r.push(this.singleObject(t,new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),!0)),t=this.singleObject(t,new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),!0);return r}writeIriLiteralOrArray(e){return n(this,void 0,void 0,(function*(){if("BlankNode"===e.termType){this.writer.add("[");let t=!0;for(const r of this.getList(e))t?t=!1:this.writer.add(" "),this.writer.add(yield this.termToString(r));this.writer.add("]")}else this.writer.add(yield this.termToString(e))}))}singleObject(e,t,r){var n;return null===(n=this.singleQuad(e,t,r))||void 0===n?void 0:n.object}singleQuad(e,t,r=!1){const n=this.store.getQuadsOnce(e,t,null,null);if(r&&1!==n.length)throw this.store.addQuads(n),new Error(`The subject and predicate ${null==e?void 0:e.value} ${null==t?void 0:t.value} must have exactly one object. Instead has ${n.length}`);if(n.length>1)throw this.store.addQuads(n),new Error(`The subject and predicate ${null==e?void 0:e.value} ${null==t?void 0:t.value} can have at most one object. Instead has ${n.length}`);return 1===n.length?n[0]:void 0}writeAssigment({name:e,type:t,object:r}){return n(this,void 0,void 0,(function*(){"not"===t&&this.writer.add("!"),this.writer.add(e),this.writer.add("="),yield this.writeIriLiteralOrArray(r)}))}writeAtom({name:e,type:t,object:r}){return n(this,void 0,void 0,(function*(){switch("not"===t&&this.writer.add("!"),e){case"node":if("NamedNode"===r.termType)this.writer.add(`@${yield this.termToString(r)}`);else{if("BlankNode"!==r.termType)throw new Error("Invalid nested shape, must be blank node or IRI");yield this.writeShapeBody(r)}return;case"nodeKind":return void this.writer.add((0,c.getShaclName)(r));case"class":case"datatype":return void this.writer.add(yield this.termToString(r));default:this.writer.add(e),this.writer.add("="),yield this.writeIriLiteralOrArray(r)}}))}writeAssigments(e,t=" ",r=!0,i){return n(this,void 0,void 0,(function*(){for(const n of e)r?r=!1:this.writer.add(t),i?yield this.writeAtom(n):yield this.writeAssigment(n)}))}writeParams(e,t=!0,r,i=!1,a=!1){return n(this,void 0,void 0,(function*(){const n=this.orProperties(e,r),o=this.singleLayerPropertiesList(e,r);a&&(n.length>0||o.length>0)&&this.writer.newLine(1);for(const e of n)t?t=!1:this.writer.add(" "),yield this.writeAssigments(e,"|",!0,i);yield this.writeAssigments(o," ",t,i),a&&(n.length>0||o.length>0)&&this.writer.add(" .")}))}writeShapeBody(e,t=!0){return n(this,void 0,void 0,(function*(){this.writer.add("{").indent();const r=this.store.getObjectsOnce(e,new a.NamedNode("http://www.w3.org/ns/shacl#property"),null);yield this.writeParams(e,!0,d.default,!1,!0);for(const e of r)this.writer.newLine(1),yield this.writeProperty(e);this.writer.deindent().newLine(1),t?this.writer.add("} ."):this.writer.add("}").newLine(1)}))}writeProperty(e){return n(this,void 0,void 0,(function*(){yield this.writePath(this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#path"),!0));const t=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#minCount")),r=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#maxCount")),n=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#nodeKind")),i=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#class")),o=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#datatype")),s=this.store.getObjectsOnce(e,new a.NamedNode("http://www.w3.org/ns/shacl#node"),null);if(n&&(this.writer.add(" "),this.writer.add((0,c.getShaclName)(n))),i&&(this.writer.add(" "),this.writer.add(yield this.termToString(i))),o&&(this.writer.add(" "),this.writer.add(yield this.termToString(o))),void 0!==t||void 0!==r){if(this.writer.add(" ["),t){if("Literal"!==t.termType||"http://www.w3.org/2001/XMLSchema#integer"!==t.datatypeString)throw new Error("Invalid min value, must me an integer literal");this.writer.add(t.value)}else this.writer.add("0");if(this.writer.add(".."),r){if("Literal"!==r.termType||"http://www.w3.org/2001/XMLSchema#integer"!==r.datatypeString)throw new Error("Invalid max value, must me an integer literal");this.store.removeMatches(e,new a.NamedNode("http://www.w3.org/ns/shacl#maxCount"),void 0,void 0),this.writer.add(r.value)}else this.writer.add("*");this.writer.add("]")}yield this.writeParams(e,!1,u.default,!0);const l=[];for(const e of s)if("NamedNode"===e.termType)this.writer.add(" "),this.writer.add(`@${yield this.termToString(e)}`);else{if("BlankNode"!==e.termType)throw new Error("Invalid nested shape, must be blank node or IRI");l.push(e)}for(const e of l)this.writer.add(" "),yield this.writeShapeBody(e);this.extendedSyntax&&this.store.getQuads(e,null,null,null).length>0&&(this.writer.add(" %"),this.writer.indent(),this.writer.newLine(1),yield this.writeTurtlePredicates(e),this.writer.deindent(),this.writer.newLine(1),this.writer.add("%")),0===l.length&&this.writer.add(" .")}))}writeTurtlePredicates(e){return n(this,void 0,void 0,(function*(){return this.writeGivenTurtlePredicates(e,this.store.getPredicates(e,null,null))}))}writeGivenTurtlePredicates(e,t){return n(this,void 0,void 0,(function*(){let r=!1;if(t.some((e=>e.equals(a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))))){const t=this.store.getObjectsOnce(e,a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),null);t.length>0&&(r=!0,this.writer.add("a "),yield this.writeTurtleObjects(t))}for(const n of t)n.equals(a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))||(r?(this.writer.add(" ;"),this.writer.newLine(1)):r=!0,this.writer.add(yield this.termToString(n,!0)),this.writer.add(" "),yield this.writeTurtleObjects(this.store.getObjectsOnce(e,n,null)))}))}writeTurtleObjects(e){return n(this,void 0,void 0,(function*(){const t=[],r=[];for(const n of e)"BlankNode"===n.termType&&0===[...this.store.match(null,null,n),...this.store.match(null,n,null)].length?t.push(n):r.push(n);this.writer.add((yield Promise.all(r.map((e=>this.termToString(e,!0,!0))))).join(", "));let n=r.length>0;if(t.length>0)for(const e of t)n?this.writer.add(", "):n=!0,(yield this.writeList(e))||(this.writer.add("["),this.writer.indent(),this.writer.newLine(1),yield this.writeTurtlePredicates(e),this.writer.deindent(),this.writer.newLine(1),this.writer.add("]"))}))}writeList(e){return n(this,void 0,void 0,(function*(){let t=e;const r=[],n=[];for(;!t.equals(a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"));){const e=this.store.getQuadsOnce(t,a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),null,null),i=this.store.getQuadsOnce(t,a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),null,null);if(n.push(...e,...i),1!==e.length||1!==i.length||0!==this.store.getQuads(t,null,null,null).length)return this.store.addQuads(n),!1;r.push(e[0].object),t=i[0].object}let i=!1;this.writer.add("(");for(const e of r)i?this.writer.add(" "):i=!0,yield this.writeTurtleObjects([e]);return this.writer.add(")"),!0}))}writePath(e,t=!1){return n(this,void 0,void 0,(function*(){if("NamedNode"===e.termType)this.writer.add(yield this.termToString(e));else{if("BlankNode"!==e.termType)throw new Error("Path should be named node or blank node");{const r=this.store.getQuadsOnce(e,null,null,null);if(1===r.length){const{predicate:n,object:i}=r[0];switch(n.value){case"http://www.w3.org/ns/shacl#inversePath":return this.writer.add("^"),void(yield this.writePath(i,!0));case"http://www.w3.org/ns/shacl#alternativePath":{const e=this.getList(i);if(0===e.length)throw new Error("Invalid Alternative Path - no options");if(1===e.length)yield this.writePath(e[0]);else{t&&this.writer.add("(");let r=!0;for(const t of e)r?r=!1:this.writer.add("|"),yield this.writePath(t,!0);t&&this.writer.add(")")}return}case"http://www.w3.org/ns/shacl#zeroOrMorePath":return yield this.writePath(i,!0),void this.writer.add("*");case"http://www.w3.org/ns/shacl#oneOrMorePath":return yield this.writePath(i,!0),void this.writer.add("+");case"http://www.w3.org/ns/shacl#zeroOrOnePath":return yield this.writePath(i,!0),void this.writer.add("?");default:throw new Error(`Invalid path type ${e.value}`)}}else{this.store.addQuads(r);const n=this.getList(e);if(0===n.length)throw new Error("Invalid Path");{t&&this.writer.add("(");let e=!0;for(const t of n)e?e=!1:this.writer.add("/"),yield this.writePath(t,!0);t&&this.writer.add(")")}}}}}))}}},14791:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={owl:"http://www.w3.org/2002/07/owl#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",sh:"http://www.w3.org/ns/shacl#",xsd:"http://www.w3.org/2001/XMLSchema#"}},22939:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.write=void 0;const a=r(72243),o=i(r(23344)),s=i(r(29908)),c=i(r(23187));t.write=function(e,t){return n(this,void 0,void 0,(function*(){return new Promise(((r,i)=>n(this,void 0,void 0,(function*(){try{let n="";const i=new c.default(e),u=i.getGraphs(null,null,null);if(u.length>1)throw new Error("More than one graph found - can serialize in the default graph");if(1===u.length&&!u[0].equals(a.DataFactory.defaultGraph()))throw new Error(`Expected all triples to be in the default graph, instead triples were in ${u[0].value}`);const l=new s.default({write:e=>{n+=e},end:()=>{let e=i.getQuads(null,null,null,null);0===e.length&&(e=void 0),r({text:n,extraQuads:e})}}),d=new o.default(i,l,null==t?void 0:t.prefixes,void 0,!1!==(null==t?void 0:t.errorOnUnused),null==t?void 0:t.mintPrefixes,null==t?void 0:t.fetch,null==t?void 0:t.extendedSyntax);yield d.write()}catch(e){i(e)}}))))}))}},58007:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={targetNode:!0,targetObjectsOf:!0,targetSubjectsOf:!0,deactivated:!0,severity:!0,message:!0,class:!0,datatype:!0,nodeKind:!0,minExclusive:!0,minInclusive:!0,maxExclusive:!0,maxInclusive:!0,minLength:!0,maxLength:!0,pattern:!0,flags:!0,languageIn:!0,equals:!0,disjoint:!0,closed:!0,ignoredProperties:!0,hasValue:!0,in:!0}},57756:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={deactivated:!0,severity:!0,message:!0,class:!0,datatype:!0,nodeKind:!0,minExclusive:!0,minInclusive:!0,maxExclusive:!0,maxInclusive:!0,minLength:!0,maxLength:!0,pattern:!0,flags:!0,languageIn:!0,uniqueLang:!0,equals:!0,disjoint:!0,lessThan:!0,lessThanOrEquals:!0,qualifiedValueShape:!0,qualifiedMinCount:!0,qualifiedMaxCount:!0,qualifiedValueShapesDisjoint:!0,closed:!0,ignoredProperties:!0,hasValue:!0,in:!0,node:!0}},98118:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShaclName=void 0,t.getShaclName=function(e){if("NamedNode"!==e.termType||!e.value.startsWith("http://www.w3.org/ns/shacl#"))throw new Error(`Term ${e.value} is not part of the SHACL namespace`);return e.value.slice(27)}},23187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(72243);class i extends n.Store{getQuadsOnce(e,t,r,n){const i=this.getQuads(e,t,r,n);return this.removeQuads(i),i}getSubjectsOnce(e,t,r){return this.getQuadsOnce(null,e,t,r).map((e=>e.subject))}getObjectsOnce(e,t,r){return this.getQuadsOnce(e,t,null,r).map((e=>e.object))}}t.default=i},29908:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e){this.indents=0,this.write=e.write,this.end=e.end}indent(){return this.indents+=1,this}deindent(){if(this.indents<1)throw new Error(`Trying to deindent when indent is only ${this.indents}`);return this.indents-=1,this}add(e,t=!1){return this.write(t?`\n${"\t".repeat(this.indents)}${e}`:e,"utf-8"),this}newLine(e=2){return this.write("\n".repeat(e)+"\t".repeat(this.indents),"utf-8"),this}}},88110:e=>{e.exports=function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function r(e,t){var r=e[0],n=e[1],i=e[2],a=e[3];n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&i|~n&a)+t[0]-680876936|0)<<7|r>>>25)+n|0)&n|~r&i)+t[1]-389564586|0)<<12|a>>>20)+r|0)&r|~a&n)+t[2]+606105819|0)<<17|i>>>15)+a|0)&a|~i&r)+t[3]-1044525330|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&i|~n&a)+t[4]-176418897|0)<<7|r>>>25)+n|0)&n|~r&i)+t[5]+1200080426|0)<<12|a>>>20)+r|0)&r|~a&n)+t[6]-1473231341|0)<<17|i>>>15)+a|0)&a|~i&r)+t[7]-45705983|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&i|~n&a)+t[8]+1770035416|0)<<7|r>>>25)+n|0)&n|~r&i)+t[9]-1958414417|0)<<12|a>>>20)+r|0)&r|~a&n)+t[10]-42063|0)<<17|i>>>15)+a|0)&a|~i&r)+t[11]-1990404162|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&i|~n&a)+t[12]+1804603682|0)<<7|r>>>25)+n|0)&n|~r&i)+t[13]-40341101|0)<<12|a>>>20)+r|0)&r|~a&n)+t[14]-1502002290|0)<<17|i>>>15)+a|0)&a|~i&r)+t[15]+1236535329|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&a|i&~a)+t[1]-165796510|0)<<5|r>>>27)+n|0)&i|n&~i)+t[6]-1069501632|0)<<9|a>>>23)+r|0)&n|r&~n)+t[11]+643717713|0)<<14|i>>>18)+a|0)&r|a&~r)+t[0]-373897302|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&a|i&~a)+t[5]-701558691|0)<<5|r>>>27)+n|0)&i|n&~i)+t[10]+38016083|0)<<9|a>>>23)+r|0)&n|r&~n)+t[15]-660478335|0)<<14|i>>>18)+a|0)&r|a&~r)+t[4]-405537848|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&a|i&~a)+t[9]+568446438|0)<<5|r>>>27)+n|0)&i|n&~i)+t[14]-1019803690|0)<<9|a>>>23)+r|0)&n|r&~n)+t[3]-187363961|0)<<14|i>>>18)+a|0)&r|a&~r)+t[8]+1163531501|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&a|i&~a)+t[13]-1444681467|0)<<5|r>>>27)+n|0)&i|n&~i)+t[2]-51403784|0)<<9|a>>>23)+r|0)&n|r&~n)+t[7]+1735328473|0)<<14|i>>>18)+a|0)&r|a&~r)+t[12]-1926607734|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n^i^a)+t[5]-378558|0)<<4|r>>>28)+n|0)^n^i)+t[8]-2022574463|0)<<11|a>>>21)+r|0)^r^n)+t[11]+1839030562|0)<<16|i>>>16)+a|0)^a^r)+t[14]-35309556|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n^i^a)+t[1]-1530992060|0)<<4|r>>>28)+n|0)^n^i)+t[4]+1272893353|0)<<11|a>>>21)+r|0)^r^n)+t[7]-155497632|0)<<16|i>>>16)+a|0)^a^r)+t[10]-1094730640|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n^i^a)+t[13]+681279174|0)<<4|r>>>28)+n|0)^n^i)+t[0]-358537222|0)<<11|a>>>21)+r|0)^r^n)+t[3]-722521979|0)<<16|i>>>16)+a|0)^a^r)+t[6]+76029189|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n^i^a)+t[9]-640364487|0)<<4|r>>>28)+n|0)^n^i)+t[12]-421815835|0)<<11|a>>>21)+r|0)^r^n)+t[15]+530742520|0)<<16|i>>>16)+a|0)^a^r)+t[2]-995338651|0)<<23|n>>>9)+i|0,n=((n+=((a=((a+=(n^((r=((r+=(i^(n|~a))+t[0]-198630844|0)<<6|r>>>26)+n|0)|~i))+t[7]+1126891415|0)<<10|a>>>22)+r|0)^((i=((i+=(r^(a|~n))+t[14]-1416354905|0)<<15|i>>>17)+a|0)|~r))+t[5]-57434055|0)<<21|n>>>11)+i|0,n=((n+=((a=((a+=(n^((r=((r+=(i^(n|~a))+t[12]+1700485571|0)<<6|r>>>26)+n|0)|~i))+t[3]-1894986606|0)<<10|a>>>22)+r|0)^((i=((i+=(r^(a|~n))+t[10]-1051523|0)<<15|i>>>17)+a|0)|~r))+t[1]-2054922799|0)<<21|n>>>11)+i|0,n=((n+=((a=((a+=(n^((r=((r+=(i^(n|~a))+t[8]+1873313359|0)<<6|r>>>26)+n|0)|~i))+t[15]-30611744|0)<<10|a>>>22)+r|0)^((i=((i+=(r^(a|~n))+t[6]-1560198380|0)<<15|i>>>17)+a|0)|~r))+t[13]+1309151649|0)<<21|n>>>11)+i|0,n=((n+=((a=((a+=(n^((r=((r+=(i^(n|~a))+t[4]-145523070|0)<<6|r>>>26)+n|0)|~i))+t[11]-1120210379|0)<<10|a>>>22)+r|0)^((i=((i+=(r^(a|~n))+t[2]+718787259|0)<<15|i>>>17)+a|0)|~r))+t[9]-343485551|0)<<21|n>>>11)+i|0,e[0]=r+e[0]|0,e[1]=n+e[1]|0,e[2]=i+e[2]|0,e[3]=a+e[3]|0}function n(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}function i(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return r}function a(e){var t,i,a,o,s,c,u=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)r(l,n(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t>2]|=e.charCodeAt(t)<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(r(l,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,r(l,a),l}function o(e){var r,n="";for(r=0;r<4;r+=1)n+=t[e>>8*r+4&15]+t[e>>8*r&15];return n}function s(e){var t;for(t=0;tu?new ArrayBuffer(0):(n=u-c,i=new ArrayBuffer(n),a=new Uint8Array(i),o=new Uint8Array(this,c,n),a.set(o),i)}}(),l.prototype.append=function(e){return this.appendBinary(c(e)),this},l.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)r(this._hash,n(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},l.prototype.end=function(e){var t,r,n=this._buff,i=n.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t>2]|=n.charCodeAt(t)<<(t%4<<3);return this._finish(a,i),r=s(this._hash),e&&(r=u(r)),this.reset(),r},l.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},l.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},l.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},l.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},l.prototype._finish=function(e,t){var n,i,a,o=t;if(e[o>>2]|=128<<(o%4<<3),o>55)for(r(this._hash,e),o=0;o<16;o+=1)e[o]=0;n=(n=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(n[2],16),a=parseInt(n[1],16)||0,e[14]=i,e[15]=a,r(this._hash,e)},l.hash=function(e,t){return l.hashBinary(c(e),t)},l.hashBinary=function(e,t){var r=s(a(e));return t?u(r):r},l.ArrayBuffer=function(){this.reset()},l.ArrayBuffer.prototype.append=function(e){var t,n,a,o,s,c=(n=this._buff.buffer,a=e,o=!0,(s=new Uint8Array(n.byteLength+a.byteLength)).set(new Uint8Array(n)),s.set(new Uint8Array(a),n.byteLength),o?s:s.buffer),u=c.length;for(this._length+=e.byteLength,t=64;t<=u;t+=64)r(this._hash,i(c.subarray(t-64,t)));return this._buff=t-64>2]|=n[t]<<(t%4<<3);return this._finish(a,i),r=s(this._hash),e&&(r=u(r)),this.reset(),r},l.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},l.ArrayBuffer.prototype.getState=function(){var e,t=l.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},l.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var r,n=e.length,i=new ArrayBuffer(n),a=new Uint8Array(i);for(r=0;r>2]|=e[t]<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(r(l,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,r(l,a),l}(new Uint8Array(e)));return t?u(n):n},l}()},31578:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.toSparqlJs=t.toSparql=t.Factory=t.Algebra=t.translate=void 0;const s=o(r(71029));t.translate=s.default;const c=a(r(47914));t.Algebra=c;const u=o(r(376));t.Factory=u.default;const l=r(24693);Object.defineProperty(t,"toSparql",{enumerable:!0,get:function(){return l.toSparql}}),Object.defineProperty(t,"toSparqlJs",{enumerable:!0,get:function(){return l.toSparqlJs}});const d=o(r(83152));t.Util=d.default},47914:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.expressionTypes=t.types=void 0,(n=t.types||(t.types={})).ALT="alt",n.ASK="ask",n.BGP="bgp",n.CONSTRUCT="construct",n.DESCRIBE="describe",n.DISTINCT="distinct",n.EXPRESSION="expression",n.EXTEND="extend",n.FILTER="filter",n.FROM="from",n.GRAPH="graph",n.GROUP="group",n.INV="inv",n.JOIN="join",n.LEFT_JOIN="leftjoin",n.LINK="link",n.MINUS="minus",n.NOP="nop",n.NPS="nps",n.ONE_OR_MORE_PATH="OneOrMorePath",n.ORDER_BY="orderby",n.PATH="path",n.PATTERN="pattern",n.PROJECT="project",n.REDUCED="reduced",n.SEQ="seq",n.SERVICE="service",n.SLICE="slice",n.UNION="union",n.VALUES="values",n.ZERO_OR_MORE_PATH="ZeroOrMorePath",n.ZERO_OR_ONE_PATH="ZeroOrOnePath",n.COMPOSITE_UPDATE="compositeupdate",n.DELETE_INSERT="deleteinsert",n.LOAD="load",n.CLEAR="clear",n.CREATE="create",n.DROP="drop",n.ADD="add",n.MOVE="move",n.COPY="copy",(r=t.expressionTypes||(t.expressionTypes={})).AGGREGATE="aggregate",r.EXISTENCE="existence",r.NAMED="named",r.OPERATOR="operator",r.TERM="term",r.WILDCARD="wildcard"},376:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const o=a(r(47914)),s=r(18050),c=r(22112),u=r(55403);t.default=class{constructor(e){this.dataFactory=e||new s.DataFactory,this.stringType=this.createTerm("http://www.w3.org/2001/XMLSchema#string")}createAlt(e,t=!0){return this.flattenMulti({type:o.types.ALT,input:e},t)}createAsk(e){return{type:o.types.ASK,input:e}}createBoundAggregate(e,t,r,n,i){const a=this.createAggregateExpression(t,r,n,i);return a.variable=e,a}createBgp(e){return{type:o.types.BGP,patterns:e}}createConstruct(e,t){return{type:o.types.CONSTRUCT,input:e,template:t}}createDescribe(e,t){return{type:o.types.DESCRIBE,input:e,terms:t}}createDistinct(e){return{type:o.types.DISTINCT,input:e}}createExtend(e,t,r){return{type:o.types.EXTEND,input:e,variable:t,expression:r}}createFrom(e,t,r){return{type:o.types.FROM,input:e,default:t,named:r}}createFilter(e,t){return{type:o.types.FILTER,input:e,expression:t}}createGraph(e,t){return{type:o.types.GRAPH,input:e,name:t}}createGroup(e,t,r){return{type:o.types.GROUP,input:e,variables:t,aggregates:r}}createInv(e){return{type:o.types.INV,path:e}}createJoin(e,t=!0){return this.flattenMulti({type:o.types.JOIN,input:e},t)}createLeftJoin(e,t,r){return r?{type:o.types.LEFT_JOIN,input:[e,t],expression:r}:{type:o.types.LEFT_JOIN,input:[e,t]}}createLink(e){return{type:o.types.LINK,iri:e}}createMinus(e,t){return{type:o.types.MINUS,input:[e,t]}}createNop(){return{type:o.types.NOP}}createNps(e){return{type:o.types.NPS,iris:e}}createOneOrMorePath(e){return{type:o.types.ONE_OR_MORE_PATH,path:e}}createOrderBy(e,t){return{type:o.types.ORDER_BY,input:e,expressions:t}}createPath(e,t,r,n){return n?{type:o.types.PATH,subject:e,predicate:t,object:r,graph:n}:{type:o.types.PATH,subject:e,predicate:t,object:r,graph:this.dataFactory.defaultGraph()}}createPattern(e,t,r,n){const i=this.dataFactory.quad(e,t,r,n);return i.type=o.types.PATTERN,i}createProject(e,t){return{type:o.types.PROJECT,input:e,variables:t}}createReduced(e){return{type:o.types.REDUCED,input:e}}createSeq(e,t=!0){return this.flattenMulti({type:o.types.SEQ,input:e},t)}createService(e,t,r){return{type:o.types.SERVICE,input:e,name:t,silent:Boolean(r)}}createSlice(e,t,r){return t=t||0,void 0!==r?{type:o.types.SLICE,input:e,start:t,length:r}:{type:o.types.SLICE,input:e,start:t}}createUnion(e,t=!0){return this.flattenMulti({type:o.types.UNION,input:e},t)}createValues(e,t){return{type:o.types.VALUES,variables:e,bindings:t}}createZeroOrMorePath(e){return{type:o.types.ZERO_OR_MORE_PATH,path:e}}createZeroOrOnePath(e){return{type:o.types.ZERO_OR_ONE_PATH,path:e}}createAggregateExpression(e,t,r,n){return n?{type:o.types.EXPRESSION,expressionType:o.expressionTypes.AGGREGATE,aggregator:e,expression:t,separator:n,distinct:r}:{type:o.types.EXPRESSION,expressionType:o.expressionTypes.AGGREGATE,aggregator:e,expression:t,distinct:r}}createExistenceExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.EXISTENCE,not:e,input:t}}createNamedExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.NAMED,name:e,args:t}}createOperatorExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.OPERATOR,operator:e,args:t}}createTermExpression(e){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.TERM,term:e}}createWildcardExpression(){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.WILDCARD,wildcard:new u.Wildcard}}createTerm(e){return(0,c.stringToTerm)(e,this.dataFactory)}createCompositeUpdate(e){return{type:o.types.COMPOSITE_UPDATE,updates:e}}createDeleteInsert(e,t,r){const n={type:o.types.DELETE_INSERT};return e&&(n.delete=e),t&&(n.insert=t),r&&(n.where=r),n}createLoad(e,t,r){const n={type:o.types.LOAD,source:e};return t&&(n.destination=t),this.addSilent(n,Boolean(r))}createClear(e,t){return this.addSilent({type:o.types.CLEAR,source:e},Boolean(t))}createCreate(e,t){return this.addSilent({type:o.types.CREATE,source:e},Boolean(t))}createDrop(e,t){return this.addSilent({type:o.types.DROP,source:e},Boolean(t))}createAdd(e,t,r){return this.addSilent({type:o.types.ADD,source:e,destination:t},Boolean(r))}createMove(e,t,r){return this.addSilent({type:o.types.MOVE,source:e,destination:t},Boolean(r))}createCopy(e,t,r){return this.addSilent({type:o.types.COPY,source:e,destination:t},Boolean(r))}addSilent(e,t){return t&&(e.silent=t),e}flattenMulti(e,t){if(!t)return e;const r=e.type,n=e.input;let i=[];for(const e of n)e.type===r?i.push(...e.input):i.push(e);return e.input=i,e}}},24693:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.toSparqlJs=t.toSparql=void 0;const s=r(91032),c=r(22112),u=r(55403),l=a(r(47914)),d=o(r(376)),h=o(r(83152)),p=l.types,f=l.expressionTypes;let y;const g=new d.default;function m(e){b();let t=v(e=function(e){return D(e,[])}(e));return"group"===t.type?t.patterns[0]:t}function b(){y={project:!1,extend:[],group:[],aggregates:[],order:[]}}function v(e){switch(e.type!==p.EXTEND&&e.type!==p.ORDER_BY&&e.type!==p.GRAPH&&(y.project=!1),e.type){case p.EXPRESSION:return _(e);case p.ASK:return A(e,p.ASK);case p.BGP:return function(e){let t=e.patterns.map(E);return 0===t.length?null:{type:"bgp",triples:t}}(e);case p.CONSTRUCT:return function(e){return{type:"query",prefixes:{},queryType:"CONSTRUCT",template:e.template.map(E),where:h.default.flatten([v(e.input)])}}(e);case p.DESCRIBE:return A(e,p.DESCRIBE);case p.DISTINCT:return function(e){let t=v(e.input);return t.patterns[0].distinct=!0,t}(e);case p.EXTEND:return function(e){return y.project?(y.extend.push(e),v(e.input)):h.default.flatten([v(e.input),{type:"bind",variable:e.variable,expression:_(e.expression)}])}(e);case p.FROM:return function(e){const t=v(e.input);let r=t;return"group"===t.type&&(r=t.patterns[0]),r.from={default:e.default,named:e.named},t}(e);case p.FILTER:return function(e){return{type:"group",patterns:h.default.flatten([v(e.input),{type:"filter",expression:_(e.expression)}])}}(e);case p.GRAPH:return function(e){return{type:"graph",patterns:h.default.flatten([v(e.input)]),name:e.name}}(e);case p.GROUP:return function(e){const t=v(e.input),r=e.aggregates.map(O);return y.aggregates.push(...r),y.group.push(...e.variables),t}(e);case p.JOIN:return function(e){return h.default.flatten(e.input.map(v)).reduce(((e,t)=>("bgp"!==t.type||0==e.length||"bgp"!==e[e.length-1].type?e.push(t):e[e.length-1].triples.push(...t.triples),e)),[])}(e);case p.LEFT_JOIN:return function(e){const t={type:"optional",patterns:[v(e.input[1])]};return e.expression&&t.patterns.push({type:"filter",expression:_(e.expression)}),t.patterns=h.default.flatten(t.patterns),h.default.flatten([v(e.input[0]),t])}(e);case p.MINUS:return function(e){let t=v(e.input[1]);return"group"===t.type&&(t=t.patterns),Array.isArray(t)||(t=[t]),h.default.flatten([v(e.input[0]),{type:"minus",patterns:t}])}(e);case p.NOP:return{};case p.ORDER_BY:return function(e){return y.order.push(...e.expressions),v(e.input)}(e);case p.PATH:return function(e){return{type:"bgp",triples:[{subject:e.subject,predicate:w(e.predicate),object:e.object}]}}(e);case p.PATTERN:return E(e);case p.PROJECT:return A(e,p.PROJECT);case p.REDUCED:return function(e){let t=v(e.input);return t.patterns[0].reduced=!0,t}(e);case p.SERVICE:return function(e){let t=v(e.input);return"group"===t.type&&(t=t.patterns),Array.isArray(t)||(t=[t]),{type:"service",name:e.name,silent:e.silent,patterns:t}}(e);case p.SLICE:return function(e){let t=v(e.input),r=t;return t.type&&"group"===t.type&&(r=t.patterns[0]),0!==e.start&&(r.offset=e.start),void 0!==e.length&&(r.limit=e.length),t}(e);case p.UNION:return function(e){return{type:"union",patterns:e.input.map(v).map(S)}}(e);case p.VALUES:return function(e){return{type:"values",values:e.bindings.map((t=>{let r={};for(let n of e.variables){let e=`?${n.value}`;t[e]?r[e]=t[e]:r[e]=void 0}return r}))}}(e);case p.COMPOSITE_UPDATE:return function(e){return{prefixes:{},type:"update",updates:e.updates.map((e=>v(e).updates[0]))}}(e);case p.DELETE_INSERT:return function(e){var t;let r,n=e.where;if(n&&n.type===p.FROM){let e=n;n=e.input,r={default:e.default,named:e.named}}const i=[{updateType:"insertdelete",delete:N(e.delete||[]),insert:N(e.insert||[])}];if(r&&(i[0].using=r),!n||n.type===p.BGP&&0===n.patterns.length)i[0].where=[];else{const e=[];let r=v(D(n,e));if("group"===r.type?i[0].where=r.patterns:i[0].where=[r],e.length>0){if(1!==e.length)throw new Error("This is unexpected and might indicate an error in graph handling for updates.");""!==(null===(t=e[0])||void 0===t?void 0:t.value)&&(i[0].where=[{type:"graph",patterns:i[0].where,name:e[0]}])}}return e.delete||e.where?e.insert||e.where?!e.insert&&e.where&&"bgp"===e.where.type&&(0,s.isomorphic)(e.delete,e.where.patterns)&&(delete i[0].where,i[0].updateType="deletewhere"):(delete i[0].insert,delete i[0].where,e.delete.some((e=>"Variable"===e.subject.termType||"Variable"===e.predicate.termType||"Variable"===e.object.termType))?i[0].updateType="deletewhere":i[0].updateType="delete"):(i[0].updateType="insert",delete i[0].delete,delete i[0].where),{prefixes:{},type:"update",updates:i}}(e);case p.LOAD:return function(e){const t=[{type:"load",silent:Boolean(e.silent),source:e.source}];return e.destination&&(t[0].destination=e.destination),{prefixes:{},type:"update",updates:t}}(e);case p.CLEAR:return function(e){return I(e,"clear")}(e);case p.CREATE:return function(e){return I(e,"create")}(e);case p.DROP:return function(e){return I(e,"drop")}(e);case p.ADD:return function(e){return P(e,"add")}(e);case p.MOVE:return function(e){return P(e,"move")}(e);case p.COPY:return function(e){return P(e,"copy")}(e)}throw new Error(`Unknown Operation type ${e.type}`)}function _(e){switch(e.expressionType){case f.AGGREGATE:return function(e){const t={expression:_(e.expression),type:"aggregate",aggregation:e.aggregator,distinct:e.distinct};return e.separator&&(t.separator=e.separator),t}(e);case f.EXISTENCE:return function(e){return{type:"operation",operator:e.not?"notexists":"exists",args:h.default.flatten([v(e.input)])}}(e);case f.NAMED:return function(e){return{type:"functionCall",function:e.name,args:e.args.map(_)}}(e);case f.OPERATOR:return function(e){if("desc"===e.operator){return{expression:_(e.args[0]),descending:!0}}const t={type:"operation",operator:e.operator,args:e.args.map(_)};return"in"!==t.operator&&"notin"!==t.operator||(t.args=[t.args[0]].concat([t.args.slice(1)])),t}(e);case f.TERM:return function(e){return e.term}(e);case f.WILDCARD:return function(e){return e.wildcard}(e)}throw new Error(`Unknown Expression Operation type ${e.expressionType}`)}function w(e){switch(e.type){case p.ALT:return function(e){const t=e.input.map(w);return t.every((e=>"pathType"in e&&"!"===e.pathType))?{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:h.default.flatten(t.map((e=>e.items)))}]}:{type:"path",pathType:"|",items:t}}(e);case p.INV:return function(e){if(e.path.type===p.NPS){const t=e.path.iris.map((e=>({type:"path",pathType:"^",items:[e]})));return t.length<=1?{type:"path",pathType:"!",items:t}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:t}]}}return{type:"path",pathType:"^",items:[w(e.path)]}}(e);case p.LINK:return function(e){return e.iri}(e);case p.NPS:return function(e){return e.iris.length<=1?{type:"path",pathType:"!",items:e.iris}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:e.iris}]}}(e);case p.ONE_OR_MORE_PATH:return function(e){return{type:"path",pathType:"+",items:[w(e.path)]}}(e);case p.SEQ:return function(e){return{type:"path",pathType:"/",items:e.input.map(w)}}(e);case p.ZERO_OR_MORE_PATH:return function(e){return{type:"path",pathType:"*",items:[w(e.path)]}}(e);case p.ZERO_OR_ONE_PATH:return function(e){return{type:"path",pathType:"?",items:[w(e.path)]}}(e)}throw new Error(`Unknown Path type ${e.type}`)}function T(e){return(0,c.termToString)(e)}function S(e){return Array.isArray(e)?1===e.length?e[0]:{type:"group",patterns:e}:e}function O(e){return e}function E(e){return{subject:e.subject,predicate:e.predicate,object:e.object}}function x(e,t){let r=h.default.isSimpleTerm(e)?T(e):e;if("string"==typeof r){if(t[r])return t[r]}else if(Array.isArray(e))e=e.map((e=>x(e,t)));else for(let r of Object.keys(e))e[r]=x(e[r],t);return e}function A(e,t){const r={type:"query",prefixes:{}},n=r;let i;t===p.PROJECT?(r.queryType="SELECT",i=e.variables):t===p.ASK?r.queryType="ASK":t===p.DESCRIBE&&(r.queryType="DESCRIBE",i=e.terms);const a=y.extend,o=y.group,s=y.aggregates,c=y.order;b(),y.project=!0;let l=h.default.flatten([v(e.input)]);1===l.length&&"group"===l[0].type&&(l=l[0].patterns),r.where=l;let d={};for(let e of y.aggregates)d[T(e.variable)]=_(e);let f={};for(let e=y.extend.length-1;e>=0;--e){let t=y.extend[e];f[T(t.variable)]=x(_(t.expression),d)}if(y.group.length>0&&(n.group=y.group.map((e=>{let t=T(e);if(f[t]){let r=f[t];return delete f[t],{variable:e,expression:r}}return{expression:e}}))),y.order.length>0&&(n.order=y.order.map(v).map((e=>e.descending?e:{expression:e}))),i&&(n.variables=i.map((e=>{let t=T(e);return f[t]?{variable:e,expression:f[t]}:e})),0===n.variables.length&&(n.variables=[new u.Wildcard])),r.where.length>0&&"filter"===r.where[r.where.length-1].type){const e=r.where[r.where.length-1];R(e,Object.keys(d))&&(n.having=h.default.flatten([x(e.expression,d)]),r.where.splice(-1))}return y.extend=a,y.group=o,y.aggregates=s,y.order=c,{type:"group",patterns:[n]}}function R(e,t){return h.default.isSimpleTerm(e)?t.indexOf(T(e))>=0:Array.isArray(e)?e.some((e=>R(e,t))):e===Object(e)?Object.keys(e).some((r=>R(e[r],t))):t.indexOf(e)>=0}function I(e,t){const r=[{type:t,silent:Boolean(e.silent)}];return"DEFAULT"===e.source?r[0].graph={default:!0}:"NAMED"===e.source?r[0].graph={named:!0}:"ALL"===e.source?r[0].graph={all:!0}:r[0].graph={type:"graph",name:e.source},{prefixes:{},type:"update",updates:r}}function P(e,t){const r=[{type:t,silent:Boolean(e.silent)}];return r[0].source="DEFAULT"===e.source?{type:"graph",default:!0}:{type:"graph",name:e.source},r[0].destination="DEFAULT"===e.destination?{type:"graph",default:!0}:{type:"graph",name:e.destination},{prefixes:{},type:"update",updates:r}}function N(e){if(!e)return[];const t={};return e.forEach((e=>{const r=e.graph.value;t[r]||(t[r]=[]),t[r].push(e)})),Object.keys(t).map((e=>""===e?{type:"bgp",triples:t[e].map(E)}:{type:"graph",triples:t[e].map(E),name:t[e][0].graph}))}function D(e,t){if(Array.isArray(e))return e.map((e=>D(e,t)));if(!e.type)return e;if(e.type===p.DELETE_INSERT)return e;if((e.type===p.PATTERN||e.type===p.PATH)&&e.graph)return t.push(e.graph),""!==e.graph.name?e.type===p.PATTERN?g.createPattern(e.subject,e.predicate,e.object):g.createPath(e.subject,e.predicate,e.object):e;const r={},n={},i={};for(let t of Object.keys(e)){const a=[];if(r[t]=D(e[t],a),a.length>0){n[t]=a;for(const e of a)i[e.value]=e}}const a=Object.keys(i);if(a.length>0)if(1!==a.length||[p.PROJECT,p.SERVICE].includes(e.type)){if(e.type===p.BGP)return function(e,t){var r;const n={};for(let i=0;i""===n[e][0].value?t:g.createGraph(t,n[e][r]))):""!==n[e][0].value&&(r[e]=g.createGraph(t,n[e][0]))}}else t.push(i[a[0]]);return r}t.toSparql=function(e,t={}){return new u.Generator(t).stringify(m(e))},t.toSparqlJs=m},71029:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(53933),c=r(22112),u=a(r(47914)),l=o(r(376)),d=o(r(83152)),h=r(55403).Parser,p=u.types;let f,y=new Set,g=0,m=!1;function b(e,t,r){if(y=new Set,g=0,m=Boolean(t),!e.type)return f.createNop();if("query"!==e.type&&"update"!==e.type)throw new Error("Translate only works on complete query or update objects.");let n;var i;return w(e),"query"===e.type?(n=S({type:"group",patterns:e.where||[]}),n=function(e,t){const r=e,n=[],i={};if(r.variables=r.variables&&r.variables.map((e=>C(e,i))),r.having=r.having&&r.having.map((e=>C(e,i))),r.order=r.order&&r.order.map((e=>C(e,i))),r.group||Object.keys(i).length>0){const e=Object.keys(i).map((e=>function(e,t){if("aggregate"!==e.type||!e.aggregation)throw new Error(`Unexpected input: ${JSON.stringify(e)}`);const r=O(e);return r.variable=t,r}(i[e],f.createTerm(e)))),n=[];if(r.group)for(const e of r.group)if(d.default.isSimpleTerm(e.expression))n.push(e.expression);else{const r="variable"in e?e.variable:A();t=f.createExtend(t,r,O(e.expression)),n.push(r)}t=f.createGroup(t,n,e)}if(r.having)for(let e of r.having)t=f.createFilter(t,O(e));e.values&&(t=f.createJoin([t,j(e)]));let a=[];if("SELECT"===e.queryType||"DESCRIBE"===e.queryType)if(e.variables.some((e=>e&&d.default.isWildcard(e))))a=Object.values(T(e)).sort(((e,t)=>e.value.localeCompare(t.value)));else for(let t of e.variables)_(t)||!("variable"in t)?a.push(t):t.variable&&(a.push(t.variable),n.push(t));for(let e of n)t=f.createExtend(t,e.variable,O(e.expression));return r.order&&(t=f.createOrderBy(t,r.order.map((e=>{let t=O(e.expression);return e.descending&&(t=f.createOperatorExpression("desc",[t])),t})))),"SELECT"===e.queryType&&(t=f.createProject(t,a)),r.distinct&&(t=f.createDistinct(t)),r.reduced&&(t=f.createReduced(t)),"CONSTRUCT"===e.queryType?t=f.createConstruct(t,(e.template||[]).map(R)):"ASK"===e.queryType?t=f.createAsk(t):"DESCRIBE"===e.queryType&&(t=f.createDescribe(t,a)),(r.offset||r.limit)&&(t=f.createSlice(t,r.offset||0,r.limit)),r.from&&(t=f.createFrom(t,r.from.default,r.from.named)),t}(e,n)):"update"===e.type&&(n=1===(i=e).updates.length?M(i.updates[0]):f.createCompositeUpdate(i.updates.map(M))),r&&(n=k(n)),n}function v(e){return Boolean(null==e?void 0:e.termType)}function _(e){return"Variable"===(null==e?void 0:e.termType)}function w(e){if(v(e))_(e)&&y.add(`?${e.value}`);else if(Array.isArray(e))for(const t of e)w(t);else if(e&&"object"==typeof e)for(let t of Object.keys(e))t.startsWith("?")&&y.add(t),w(e[t])}function T(e){let t={};if((r=e).subject&&r.predicate&&r.object){const r=[T(e.subject),T(e.predicate),T(e.object),e.graph?T(e.graph):{}];Object.assign(t,...r)}else if(v(e))_(e)&&(t[e.value]=e);else if("bgp"===e.type){const r=e.triples;Object.assign(t,...r.map(T))}else if("path"===e.type)Object.assign(t,...e.items.map(T));else if("group"===e.type||"union"===e.type||"optional"===e.type)Object.assign(t,...e.patterns.map(T));else if("service"===e.type||"graph"===e.type)Object.assign(t,T(e.name)),Object.assign(t,...e.patterns.map(T));else if("bind"===e.type)Object.assign(t,T(e.variable));else if("values"===e.type){if(e.values.length>0){const r=Object.keys(e.values[0]).map((e=>f.createTerm(e)));Object.assign(t,...r.map(T))}}else if("query"===e.type&&("SELECT"===e.queryType||"DESCRIBE"===e.queryType)){e.where&&e.variables.some(d.default.isWildcard)&&Object.assign(t,...e.where.map(T));for(const r of e.variables)_(r)?Object.assign(t,T(r)):r.variable&&Object.assign(t,T(r.variable));if("SELECT"===e.queryType){if(e.group)for(const r of e.group)r.variable&&Object.assign(t,T(r.variable));if(e.values){const r={type:"values",values:e.values};Object.assign(t,T(r))}}}var r;return t}function S(e){if("bgp"===e.type)return function(e){let t=[],r=[];for(let i of e.triples)if("pathType"in i.predicate){let e=x((n=i).subject,E(n.predicate),n.object);for(let n of e)n.type===p.PATH?(t.length>0&&r.push(f.createBgp(t)),t=[],r.push(n)):t.push(n)}else t.push(R(i));var n;return t.length>0&&r.push(f.createBgp(t)),1===r.length?r[0]:f.createJoin(r)}(e);if("union"===e.type)return f.createUnion(e.patterns.map((e=>("group"!==e.type&&(e={type:"group",patterns:[e]}),S(e)))));if("graph"===e.type){let t=S({type:"group",patterns:e.patterns});return t=m?P(t,e.name):f.createGraph(t,e.name),t}if("values"===e.type)return j(e);if("query"===e.type)return b(e,m,!1);if("group"===e.type){let t=[],r=[];for(let n of e.patterns)("filter"===n.type?t:r).push(n);let n=r.reduce(N,f.createBgp([])),i=t.map((e=>O(e.expression)));return i.length>0&&(n=f.createFilter(n,i.reduce(((e,t)=>f.createOperatorExpression("&&",[e,t]))))),n}throw new Error(`Unexpected type: ${e.type}`)}function O(e){if(d.default.isSimpleTerm(e))return f.createTermExpression(e);if(d.default.isQuad(e))return d.default.hasQuadVariables(e)?f.createOperatorExpression("triple",[O(e.subject),O(e.predicate),O(e.object)]):f.createTermExpression(e);if(d.default.isWildcard(e))return f.createWildcardExpression();if("aggregation"in e)return f.createAggregateExpression(e.aggregation,O(e.expression),Boolean(e.distinct),e.separator);if("function"in e)return f.createNamedExpression(e.function,e.args.map(O));if("operator"in e)return"exists"===e.operator||"notexists"===e.operator?f.createExistenceExpression("notexists"===e.operator,S(e.args[0])):("in"!==e.operator&&"notin"!==e.operator||(e.args=[e.args[0]].concat(e.args[1])),f.createOperatorExpression(e.operator,e.args.map(O)));throw new Error(`Unknown expression: ${JSON.stringify(e)}`)}function E(e){if(d.default.isSimpleTerm(e)){if("NamedNode"===e.termType)return f.createLink(e);throw new Error(`Path predicate should be a NamedNode, got ${JSON.stringify(e)}`)}if("^"===e.pathType)return f.createInv(E(e.items[0]));if("!"===e.pathType){let t,r=[],n=[];t="pathType"in e.items[0]&&"|"===e.items[0].pathType?e.items[0].items:e.items;for(let e of t)if(d.default.isSimpleTerm(e))r.push(e);else{if("^"!==e.pathType)throw new Error(`Unexpected item: ${JSON.stringify(e)}`);n.push(e.items[0])}let i=f.createNps(r),a=f.createInv(f.createNps(n));return 0===n.length?i:0===r.length?a:f.createAlt([i,a])}if("/"===e.pathType)return f.createSeq(e.items.map(E));if("|"===e.pathType)return f.createAlt(e.items.map(E));if("*"===e.pathType)return f.createZeroOrMorePath(E(e.items[0]));if("+"===e.pathType)return f.createOneOrMorePath(E(e.items[0]));if("?"===e.pathType)return f.createZeroOrOnePath(E(e.items[0]));throw new Error(`Unable to translate path expression ${JSON.stringify(e)}`)}function x(e,t,r){if(t.type===p.LINK)return[f.createPattern(e,t.iri,r)];if(t.type===p.INV)return x(r,t.path,e);if(t.type===p.SEQ){let n=e;return d.default.flatten(t.input.map(((e,i)=>{const a=i===t.input.length-1?r:A(),o=x(n,e,a);return"Variable"===a.termType&&(n=a),o})))}return[f.createPath(e,t,r)]}function A(){let e="?var"+g++;return y.has(e)?A():(y.add(e),f.createTerm(e))}function R(e){if("pathType"in e.predicate)throw new Error("Trying to translate property path to quad.");return f.createPattern(e.subject,e.predicate,e.object,e.graph)}t.default=function(e,t){let r;if(t=t||{},f=new l.default(t.dataFactory),"string"==typeof e){let n=new h(t);n._resetBlanks(),r=n.parse(e)}else r=e;return b(r,t.quads,t.blankToVariable)};let I=Object.values(p);function P(e,t,r){if(e.type===p.GRAPH){if(r)throw new Error("Recursing through nested GRAPH statements with a replacement is impossible.");e=P(e.input,e.name)}else if(e.type===p.SERVICE);else if(e.type===p.BGP)e.patterns=e.patterns.map((e=>(r&&(e.subject.equals(t)&&(e.subject=r),e.predicate.equals(t)&&(e.predicate=r),e.object.equals(t)&&(e.object=r)),"DefaultGraph"===e.graph.termType&&(e.graph=t),e)));else if(e.type===p.PATH)r&&(e.subject.equals(t)&&(e.subject=r),e.object.equals(t)&&(e.object=r)),"DefaultGraph"===e.graph.termType&&(e.graph=t);else if(e.type!==p.PROJECT||r)if(e.type!==p.EXTEND||r)for(let n of Object.keys(e))Array.isArray(e[n])?e[n]=e[n].map((e=>P(e,t,r))):I.indexOf(e[n].type)>=0?e[n]=P(e[n],t,r):r&&_(e[n])&&e[n].equals(t)&&(e[n]=r);else e.variable.equals(t)&&(r=A()),e.input=P(e.input,t,r);else e.variables.some((e=>e.equals(t)))||(r=A()),e.input=P(e.input,t,r);return e}function N(e,t){if("optional"===t.type){const r=S({type:"group",patterns:t.patterns});e=r.type===p.FILTER?f.createLeftJoin(e,r.input,r.expression):f.createLeftJoin(e,r)}else if("minus"===t.type){const r=S({type:"group",patterns:t.patterns});e=f.createMinus(e,r)}else if("bind"===t.type)e=f.createExtend(e,t.variable,O(t.expression));else if("service"===t.type){const r={type:"group",patterns:t.patterns};e=D(e,f.createService(S(r),t.name,t.silent))}else e=D(e,S(t));return e}function D(e,t){return e.type===p.BGP&&t.type===p.BGP?e=f.createBgp([...e.patterns,...t.patterns]):e.type===p.BGP&&0===e.patterns.length?e=t:t.type===p.BGP&&0===t.patterns.length||(e=f.createJoin([e,t])),e}function j(e){let t=(0===e.values.length?[]:Object.keys(e.values[0])).map(f.createTerm.bind(f)),r=e.values.map((e=>{let t=Object.keys(e);t=t.filter((t=>void 0!==e[t]));let r={};for(let n of t)r[n]=e[n];return r}));return f.createValues(t,r)}function C(e,t){if("type"in e&&"aggregate"===e.type){let r,n=!1;for(let i of Object.keys(t))if(s(t[i],e)){r=f.createTerm(i),n=!0;break}return n||(r=A(),t[(0,c.termToString)(r)]=e),r}return"expression"in e&&e.expression?{...e,expression:C(e.expression,t)}:"args"in e&&e.args?{...e,args:e.args.map((e=>C(e,t)))}:e}function M(e){if("type"in e){if("load"===e.type)return function(e){return f.createLoad(e.source,e.destination,e.silent)}(e);if("clear"===e.type||"create"===e.type||"drop"===e.type)return function(e){let t;switch(t=d.default.isSimpleTerm(e.graph)?e.graph:e.graph.all?"ALL":e.graph.default?"DEFAULT":e.graph.named?"NAMED":e.graph.name,e.type){case"clear":return f.createClear(t,e.silent);case"create":return f.createCreate(t,e.silent);case"drop":return f.createDrop(t,e.silent)}}(e);if("add"===e.type||"copy"===e.type||"move"===e.type)return function(e){const t=e.source.default?"DEFAULT":e.source.name,r=e.destination.default?"DEFAULT":e.destination.name;switch(e.type){case"copy":return f.createCopy(t,r,e.silent);case"move":return f.createMove(t,r,e.silent);case"add":return f.createAdd(t,r,e.silent)}}(e)}else if("insertdelete"===e.updateType||"deletewhere"===e.updateType||"delete"===e.updateType||"insert"===e.updateType)return function(e){if(!m)throw new Error("INSERT/DELETE operations are only supported with quads option enabled");let t,r=[],n=[];if(e.delete&&(r=d.default.flatten(e.delete.map((t=>L(t,e.graph))))),e.insert&&(n=d.default.flatten(e.insert.map((t=>L(t,e.graph))))),e.where&&e.where.length>0){t=S({type:"group",patterns:e.where});const r=e.using;r?t=f.createFrom(t,r.default,r.named):e.graph&&(t=P(t,e.graph))}else"deletewhere"===e.updateType&&r.length>0&&(t=f.createBgp(r));return f.createDeleteInsert(r.length>0?r:void 0,n.length>0?n:void 0,t)}(e);throw new Error(`Unknown update type ${JSON.stringify(e)}`)}function L(e,t){let r=t;"graph"===e.type&&(r=e.name);let n=e.triples;return r&&(n=n.map((e=>Object.assign(e,{graph:r})))),n.map(R)}function k(e){const t={},r=Array.from(y).reduce(((e,t)=>(e[t]=!0,e)),{});return d.default.mapOperation(e,{[u.types.DELETE_INSERT]:e=>({result:e,recurse:!1}),[u.types.PATH]:(e,t)=>({result:t.createPath(n(e.subject),e.predicate,n(e.object),n(e.graph)),recurse:!1}),[u.types.PATTERN]:(e,t)=>({result:t.createPattern(n(e.subject),n(e.predicate),n(e.object),n(e.graph)),recurse:!1}),[u.types.CONSTRUCT]:e=>({result:f.createConstruct(k(e.input),e.template),recurse:!1})});function n(e){if("BlankNode"===e.termType){let n=t[e.value];return n||(n=d.default.createUniqueVariable(e.value,r,f.dataFactory),r[n.value]=!0,t[e.value]=n),n}return e}}},83152:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(47914),a=n(r(376)),o=r(13252);class s{static flatten(e){return Array.prototype.concat(...e).filter((e=>e))}static objectify(e){if(e.termType){if("Quad"===e.termType)return{type:"pattern",termType:"Quad",subject:s.objectify(e.subject),predicate:s.objectify(e.predicate),object:s.objectify(e.object),graph:s.objectify(e.graph)};{let t={termType:e.termType,value:e.value};return e.language&&(t.language=e.language),e.datatype&&(t.datatype=s.objectify(e.datatype)),t}}if(Array.isArray(e))return e.map((e=>s.objectify(e)));if(e===Object(e)){let t={};for(let r of Object.keys(e))t[r]=s.objectify(e[r]);return t}return e}static inScopeVariables(e){const t=[];function r(e){t.find((t=>e.value===t.value))||t.push(e)}function n(e){"Variable"===e.subject.termType&&r(e.subject),"Variable"===e.predicate.termType&&r(e.predicate),"Variable"===e.object.termType&&r(e.object),"Variable"===e.graph.termType&&r(e.graph),"Quad"===e.subject.termType&&n(e.subject),"Quad"===e.predicate.termType&&n(e.predicate),"Quad"===e.object.termType&&n(e.object),"Quad"===e.graph.termType&&n(e.graph)}return s.recurseOperation(e,{[i.types.EXPRESSION]:e=>(e.expressionType===i.expressionTypes.AGGREGATE&&e.variable&&r(e.variable),!0),[i.types.EXTEND]:e=>(r(e.variable),!0),[i.types.GRAPH]:e=>("Variable"===e.name.termType&&r(e.name),!0),[i.types.GROUP]:e=>(e.variables.forEach(r),!0),[i.types.PATH]:e=>("Variable"===e.subject.termType&&r(e.subject),"Variable"===e.object.termType&&r(e.object),"Variable"===e.graph.termType&&r(e.graph),"Quad"===e.subject.termType&&n(e.subject),"Quad"===e.object.termType&&n(e.object),"Quad"===e.graph.termType&&n(e.graph),!0),[i.types.PATTERN]:e=>(n(e),!0),[i.types.PROJECT]:e=>(e.variables.forEach(r),!1),[i.types.SERVICE]:e=>("Variable"===e.name.termType&&r(e.name),!0),[i.types.VALUES]:e=>(e.variables.forEach(r),!0)}),t}static recurseOperation(e,t){let r=e,n=!0;const a=t[e.type];if(a&&(n=a(e)),!n)return;let o=e=>s.recurseOperation(e,t);switch(r.type){case i.types.ALT:r.input.map(o);break;case i.types.ASK:o(r.input);break;case i.types.BGP:r.patterns.forEach(o);break;case i.types.CONSTRUCT:o(r.input),r.template.map(o);break;case i.types.DESCRIBE:case i.types.DISTINCT:o(r.input);break;case i.types.EXPRESSION:r.expressionType===i.expressionTypes.EXISTENCE&&o(r.input);break;case i.types.EXTEND:case i.types.FILTER:o(r.input),o(r.expression);break;case i.types.FROM:case i.types.GRAPH:o(r.input);break;case i.types.GROUP:o(r.input),r.aggregates.forEach(o);break;case i.types.INV:o(r.path);break;case i.types.JOIN:r.input.map(o);break;case i.types.LEFT_JOIN:r.input.map(o),r.expression&&o(r.expression);break;case i.types.LINK:break;case i.types.MINUS:r.input.map(o);break;case i.types.NOP:case i.types.NPS:break;case i.types.ONE_OR_MORE_PATH:o(r.path);break;case i.types.ORDER_BY:o(r.input),r.expressions.forEach(o);break;case i.types.PATH:o(r.predicate);break;case i.types.PATTERN:break;case i.types.PROJECT:case i.types.REDUCED:o(r.input);break;case i.types.SEQ:r.input.map(o);break;case i.types.SERVICE:case i.types.SLICE:o(r.input);break;case i.types.UNION:r.input.map(o);break;case i.types.VALUES:break;case i.types.ZERO_OR_MORE_PATH:case i.types.ZERO_OR_ONE_PATH:o(r.path);break;case i.types.COMPOSITE_UPDATE:r.updates.forEach((e=>o(e)));break;case i.types.DELETE_INSERT:r.delete&&r.delete.forEach((e=>o(e))),r.insert&&r.insert.forEach((e=>o(e))),r.where&&o(r.where);break;case i.types.LOAD:case i.types.CLEAR:case i.types.CREATE:case i.types.DROP:case i.types.ADD:case i.types.MOVE:case i.types.COPY:break;default:throw new Error(`Unknown Operation type ${r.type}`)}}static mapOperation(e,t,r){let n=e,o=!0,c=!0;r=r||new a.default;const u=t[e.type];if(u){const t=u(e,r);n=t.result,o=t.recurse,c=!1!==t.copyMetadata}let l;if(c&&(n.metadata||e.metadata)&&(l={...n.metadata,...e.metadata}),!o)return l&&(n.metadata=l),n;let d=e=>s.mapOperation(e,t,r);switch(n.type){case i.types.ALT:n=r.createAlt(n.input.map(d));break;case i.types.ASK:n=r.createAsk(d(n.input));break;case i.types.BGP:n=r.createBgp(n.patterns.map(d));break;case i.types.CONSTRUCT:n=r.createConstruct(d(n.input),n.template.map(d));break;case i.types.DESCRIBE:n=r.createDescribe(d(n.input),n.terms);break;case i.types.DISTINCT:n=r.createDistinct(d(n.input));break;case i.types.EXPRESSION:n=s.mapExpression(n,t,r);break;case i.types.EXTEND:n=r.createExtend(d(n.input),n.variable,d(n.expression));break;case i.types.FILTER:n=r.createFilter(d(n.input),d(n.expression));break;case i.types.FROM:n=r.createFrom(d(n.input),[...n.default],[...n.named]);break;case i.types.GRAPH:n=r.createGraph(d(n.input),n.name);break;case i.types.GROUP:n=r.createGroup(d(n.input),[].concat(n.variables),n.aggregates.map(d));break;case i.types.INV:n=r.createInv(d(n.path));break;case i.types.JOIN:n=r.createJoin(n.input.map(d));break;case i.types.LEFT_JOIN:n=r.createLeftJoin(d(n.input[0]),d(n.input[1]),n.expression?d(n.expression):void 0);break;case i.types.LINK:n=r.createLink(n.iri);break;case i.types.MINUS:n=r.createMinus(d(n.input[0]),d(n.input[1]));break;case i.types.NOP:n=r.createNop();break;case i.types.NPS:n=r.createNps([].concat(n.iris));break;case i.types.ONE_OR_MORE_PATH:n=r.createOneOrMorePath(d(n.path));break;case i.types.ORDER_BY:n=r.createOrderBy(d(n.input),n.expressions.map(d));break;case i.types.PATH:n=r.createPath(n.subject,d(n.predicate),n.object,n.graph);break;case i.types.PATTERN:n=r.createPattern(n.subject,n.predicate,n.object,n.graph);break;case i.types.PROJECT:n=r.createProject(d(n.input),[...n.variables]);break;case i.types.REDUCED:n=r.createReduced(d(n.input));break;case i.types.SEQ:n=r.createSeq(n.input.map(d));break;case i.types.SERVICE:n=r.createService(d(n.input),n.name,n.silent);break;case i.types.SLICE:n=r.createSlice(d(n.input),n.start,n.length);break;case i.types.UNION:n=r.createUnion(n.input.map(d));break;case i.types.VALUES:n=r.createValues([].concat(n.variables),n.bindings.map((e=>Object.assign({},e))));break;case i.types.ZERO_OR_MORE_PATH:n=r.createZeroOrMorePath(d(n.path));break;case i.types.ZERO_OR_ONE_PATH:n=r.createZeroOrOnePath(d(n.path));break;case i.types.COMPOSITE_UPDATE:n=r.createCompositeUpdate(n.updates.map(d));break;case i.types.DELETE_INSERT:n=r.createDeleteInsert(n.delete?n.delete.map(d):void 0,n.insert?n.insert.map(d):void 0,n.where?d(n.where):void 0);break;case i.types.LOAD:n=r.createLoad(n.source,n.destination,n.silent);break;case i.types.CLEAR:n=r.createClear(n.source,n.silent);break;case i.types.CREATE:n=r.createCreate(n.source,n.silent);break;case i.types.DROP:n=r.createDrop(n.source,n.silent);break;case i.types.ADD:n=r.createAdd(n.source,n.destination);break;case i.types.MOVE:n=r.createMove(n.source,n.destination);break;case i.types.COPY:n=r.createCopy(n.source,n.destination);break;default:throw new Error(`Unknown Operation type ${n.type}`)}return l&&(n.metadata=l),n}static mapExpression(e,t,r){let n=e,o=!0;r=r||new a.default;const c=t[e.expressionType];if(c&&({result:n,recurse:o}=c(e,r)),!o)return n;let u=e=>s.mapOperation(e,t,r);switch(e.expressionType){case i.expressionTypes.AGGREGATE:return e.variable?r.createBoundAggregate(e.variable,e.aggregator,u(e.expression),e.distinct,e.separator):r.createAggregateExpression(e.aggregator,u(e.expression),e.distinct,e.separator);case i.expressionTypes.EXISTENCE:return r.createExistenceExpression(e.not,u(e.input));case i.expressionTypes.NAMED:return r.createNamedExpression(e.name,e.args.map(u));case i.expressionTypes.OPERATOR:return r.createOperatorExpression(e.operator,e.args.map(u));case i.expressionTypes.TERM:return r.createTermExpression(e.term);case i.expressionTypes.WILDCARD:return r.createWildcardExpression();default:throw new Error(`Unknown Expression type ${e.expressionType}`)}}static cloneOperation(e){return s.mapOperation(e,{})}static cloneExpression(e){return s.mapExpression(e,{})}static createUniqueVariable(e,t,r){let n=0,i=e;for(;t[i];)i=`${e}${n++}`;return r.variable(i)}static isSimpleTerm(e){return void 0!==e.termType&&"Quad"!==e.termType&&"Wildcard"!==e.termType}static isQuad(e){return"Quad"===e.termType}static hasQuadVariables(e){return(0,o.someTermsNested)(e,(e=>"Variable"===e.termType))}static isWildcard(e){return"Wildcard"===e.termType}}t.default=s},33206:e=>{function t(e){this._options=e=e||{};var t=e.prefixes||{};this._prefixByIri={};var r=[];for(var n in t){var i=t[n];o(i)&&(this._prefixByIri[i]=n,r.push(i))}var a=r.join("|").replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&");this._prefixRegex=new RegExp("^("+a+")([a-zA-Z][\\-_a-zA-Z0-9]*)$"),this._usedPrefixes={},this._sparqlStar=e.sparqlStar,this._indent=o(e.indent)?e.indent:" ",this._newline=o(e.newline)?e.newline:"\n",this._explicitDatatype=Boolean(e.explicitDatatype)}t.prototype.toQuery=function(e){var t="";return e.queryType&&(t+=e.queryType.toUpperCase()+" "),e.reduced&&(t+="REDUCED "),e.distinct&&(t+="DISTINCT "),e.variables?t+=u(e.variables,void 0,(function(e){return s(e)?this.toEntity(e):"("+this.toExpression(e.expression)+" AS "+a(e.variable)+")"}),this)+" ":e.template&&(t+=this.group(e.template,!0)+this._newline),e.from&&(t+=this.graphs("FROM ",e.from.default)+this.graphs("FROM NAMED ",e.from.named)),e.where&&(t+="WHERE "+this.group(e.where,!0)+this._newline),e.updates&&(t+=u(e.updates,";"+this._newline,this.toUpdate,this)),e.group&&(t+="GROUP BY "+u(e.group,void 0,(function(e){var t=s(e.expression)?this.toEntity(e.expression):"("+this.toExpression(e.expression)+")";return e.variable?"("+t+" AS "+a(e.variable)+")":t}),this)+this._newline),e.having&&(t+="HAVING ("+u(e.having,void 0,this.toExpression,this)+")"+this._newline),e.order&&(t+="ORDER BY "+u(e.order,void 0,(function(e){var t="("+this.toExpression(e.expression)+")";return e.descending?"DESC "+t:t}),this)+this._newline),e.offset&&(t+="OFFSET "+e.offset+this._newline),e.limit&&(t+="LIMIT "+e.limit+this._newline),e.values&&(t+=this.values(e)),(t=this.baseAndPrefixes(e)+t).trim()},t.prototype.baseAndPrefixes=function(e){var t=e.base?"BASE <"+e.base+">"+this._newline:"",r="";for(var n in e.prefixes)(this._options.allPrefixes||this._usedPrefixes[n])&&(r+="PREFIX "+n+": <"+e.prefixes[n]+">"+this._newline);return t+r},t.prototype.toPattern=function(e){var t=e.type||e instanceof Array&&"array"||(e.subject&&e.predicate&&e.object?"triple":"");if(!(t in this))throw new Error("Unknown entry type: "+t);return this[t](e)},t.prototype.triple=function(e){return this.toEntity(e.subject)+" "+this.toEntity(e.predicate)+" "+this.toEntity(e.object)+"."},t.prototype.array=function(e){return u(e,this._newline,this.toPattern,this)},t.prototype.bgp=function(e){return this.encodeTriples(e.triples)},t.prototype.encodeTriples=function(e){if(!e.length)return"";for(var t=[],r=void 0,n=void 0,i=0;i":case">=":case"<=":case"&&":case"||":case"=":case"!=":case"+":case"-":case"*":case"/":return(s(i[0])?this.toEntity(i[0]):"("+this.toExpression(i[0])+")")+" "+t+" "+(s(i[1])?this.toEntity(i[1]):"("+this.toExpression(i[1])+")");case"!":return"!("+this.toExpression(i[0])+")";case"uplus":return"+("+this.toExpression(i[0])+")";case"uminus":return"-("+this.toExpression(i[0])+")";case"notin":t="NOT IN";case"in":return this.toExpression(i[0])+" "+t+"("+(o(i[1])?i[1]:u(i[1],", ",this.toExpression,this))+")";case"notexists":t="NOT EXISTS";case"exists":return t+" "+this.group(i[0],!0);default:return t+"("+u(i,", ",this.toExpression,this)+")"}default:throw new Error("Unknown expression type: "+e.type)}},t.prototype.toEntity=function(e){if(s(e))switch(e.termType){case"Wildcard":return"*";case"Variable":return a(e);case"BlankNode":return"_:"+e.value;case"Literal":var t=e.value||"",i=e.language||"",o=e.datatype;if(e='"'+t.replace(r,n)+'"',i)e+="@"+i;else if(o){if(!this._explicitDatatype)switch(o.value){case"http://www.w3.org/2001/XMLSchema#string":return e;case"http://www.w3.org/2001/XMLSchema#integer":if(/^\d+$/.test(t))return t+" "}e+="^^"+this.encodeIRI(o.value)}return e;case"Quad":if(!this._sparqlStar)throw new Error("SPARQL* support is not enabled");return e.graph&&"DefaultGraph"!==e.graph.termType?"<< GRAPH "+this.toEntity(e.graph)+" { "+this.toEntity(e.subject)+" "+this.toEntity(e.predicate)+" "+this.toEntity(e.object)+" } >>":"<< "+this.toEntity(e.subject)+" "+this.toEntity(e.predicate)+" "+this.toEntity(e.object)+" >>";default:return this.encodeIRI(e.value)}else{var c=e.items.map(this.toEntity,this),u=e.pathType;switch(u){case"^":case"!":return u+c[0];case"*":case"+":case"?":return"("+c[0]+u+")";default:return"("+c.join(u)+")"}}};var r=/["\\\t\n\r\b\f]/g,n=function(e){return i[e]},i={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};function a(e){return"?"+e.value}function o(e){return"string"==typeof e}function s(e){return"string"==typeof e.termType}function c(e,t){if(!e||!s(e))return!1;if(!t||!s(t))return!1;if(e.termType!==t.termType)return!1;switch(e.termType){case"Literal":return e.value===t.value&&e.language===t.language&&c(e.datatype,t.datatype);case"Quad":return c(e.subject,t.subject)&&c(e.predicate,t.predicate)&&c(e.object,t.object)&&c(e.graph,t.graph);default:return e.value===t.value}}function u(e,t,r,n){return e.map(r,n).join(o(t)?t:" ")}t.prototype.encodeIRI=function(e){var t=this._prefixRegex.exec(e);if(t){var r=this._prefixByIri[t[1]];return this._usedPrefixes[r]=!0,r+":"+t[2]}return"<"+e+">"},t.prototype.toUpdate=function(e){switch(e.type||e.updateType){case"load":return"LOAD"+(e.source?" "+this.toEntity(e.source):"")+(e.destination?" INTO GRAPH "+this.toEntity(e.destination):"");case"insert":return"INSERT DATA "+this.group(e.insert,!0);case"delete":return"DELETE DATA "+this.group(e.delete,!0);case"deletewhere":return"DELETE WHERE "+this.group(e.delete,!0);case"insertdelete":return(e.graph?"WITH "+this.toEntity(e.graph)+this._newline:"")+(e.delete.length?"DELETE "+this.group(e.delete,!0)+this._newline:"")+(e.insert.length?"INSERT "+this.group(e.insert,!0)+this._newline:"")+(e.using?this.graphs("USING ",e.using.default):"")+(e.using?this.graphs("USING NAMED ",e.using.named):"")+"WHERE "+this.group(e.where,!0);case"add":case"copy":case"move":return e.type.toUpperCase()+" "+(e.silent?"SILENT ":"")+(e.source.default?"DEFAULT":this.toEntity(e.source.name))+" TO "+this.toEntity(e.destination.name);case"create":case"clear":case"drop":return e.type.toUpperCase()+(e.silent?" SILENT ":" ")+(e.graph.default?"DEFAULT":e.graph.named?"NAMED":e.graph.all?"ALL":"GRAPH "+this.toEntity(e.graph.name));default:throw new Error("Unknown update query type: "+e.type)}},t.prototype.indent=function(e){return e.replace(/^/gm,this._indent)},e.exports=function(e={}){return{stringify:function(r){var n=Object.create(e);return n.prefixes=r.prefixes,new t(n).toQuery(r)},createGenerator:function(){return new t(e)}}}},17308:(e,t,r)=>{var n=function(){var e=function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},t=[6,12,13,15,16,24,32,36,41,45,100,110,113,115,116,123,126,131,197,224,229,308,329,330,331,332,333],n=[2,247],i=[100,110,113,115,116,123,126,131,329,330,331,332,333],a=[2,409],o=[1,18],s=[1,27],c=[13,16,45,197,224,229,308],u=[28,29,53],l=[28,53],d=[1,42],h=[1,45],p=[1,41],f=[1,44],y=[123,126],g=[1,67],m=[39,45,87],b=[13,16,45,197,224,308],v=[1,87],_=[2,281],w=[1,86],T=[13,16,45,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],S=[6,28,29,53,63,70,73,81,83,85],O=[6,13,16,28,29,53,63,70,73,81,83,85,87,308],E=[6,13,16,28,29,45,53,63,70,73,81,82,83,85,87,89,197,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314],x=[6,13,16,28,29,31,39,45,47,48,53,63,70,73,81,82,83,85,87,89,109,112,121,123,126,128,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,337,338,340,341,342,343,344,345,346],A=[13,16,308],R=[112,132,327,334],I=[13,16,112,132,308],P=[1,111],N=[1,117],D=[112,132,327,328,334],j=[13,16,112,132,308,328],C=[28,29,45,53,87],M=[1,138],L=[1,151],k=[1,128],F=[1,127],B=[1,129],U=[1,140],q=[1,141],V=[1,142],Q=[1,143],$=[1,144],H=[1,145],G=[1,147],z=[1,148],K=[2,457],X=[1,158],J=[1,159],W=[1,160],Y=[1,152],Z=[1,153],ee=[1,156],te=[1,171],re=[1,172],ne=[1,173],ie=[1,174],ae=[1,175],oe=[1,176],se=[1,167],ce=[1,168],ue=[1,169],le=[1,170],de=[1,157],he=[1,166],pe=[1,161],fe=[1,162],ye=[1,163],ge=[1,164],me=[1,165],be=[6,13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335],ve=[1,195],_e=[6,31,73,81,83,85],we=[2,285],Te=[1,199],Se=[1,201],Oe=[6,31,70,73,81,83,85],Ee=[2,283],xe=[1,207],Ae=[1,218],Re=[1,223],Ie=[1,219],Pe=[1,225],Ne=[1,226],De=[1,224],je=[6,63,70,73,81,83,85],Ce=[1,236],Me=[2,334],Le=[1,243],ke=[1,241],Fe=[6,193],Be=[2,349],Ue=[2,339],qe=[28,128],Ve=[47,48,193,272],Qe=[47,48,193,242,272],$e=[47,48,193,242,246,272],He=[47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,341,342,343,344,345,346],Ge=[39,47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,338,341,342,343,344,345,346],ze=[1,271],Ke=[1,270],Xe=[6,13,16,29,31,39,45,47,48,70,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,231,242,246,250,263,265,268,269,270,271,272,273,274,276,277,279,280,283,285,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,338,341,342,343,344,345,346,347,348,349,350,351],Je=[1,281],We=[1,280],Ye=[13,16,29,31,39,45,47,48,82,85,87,89,112,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,338,341,342,343,344,345,346],Ze=[45,89],et=[13,16,29,31,39,45,47,48,82,85,87,89,112,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,338,341,342,343,344,345,346],tt=[13,16,31,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],rt=[31,89],nt=[48,87],it=[6,13,16,45,48,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,337,338],at=[6,13,16,39,45,48,82,87,89,231,263,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,337,338,340],ot=[1,313],st=[6,85],ct=[6,31,81,83,85],ut=[2,361],lt=[2,353],dt=[1,343],ht=[31,112,335],pt=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,197,224,229,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],ft=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,197,224,229,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335],yt=[6,109,193],gt=[31,112],mt=[13,16,45,82,87,224,263,265,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312,346,347,348,349,350,351],bt=[1,390],vt=[1,391],_t=[13,16,87,197,308,314],wt=[13,16,39,45,82,87,224,263,265,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312,346,347,348,349,350,351],Tt=[1,417],St=[1,418],Ot=[13,16,48,197,229,308],Et=[6,31,85],xt=[6,13,16,31,45,73,81,83,85,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],At=[6,13,16,29,31,45,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,231,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,346,347,348,349,350,351],Rt=[29,31,85,112,159,160,161,163,164],It=[1,443],Pt=[1,444],Nt=[1,449],Dt=[31,112,193,232,318,335],jt=[13,16,45,48,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],Ct=[13,16,31,45,48,82,87,89,112,193,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],Mt=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],Lt=[13,16,31,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],kt=[31,45],Ft=[1,507],Bt=[1,508],Ut=[6,13,16,29,31,39,45,47,48,63,70,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,231,242,246,250,263,265,268,269,270,271,272,273,274,276,277,279,280,283,285,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,336,338,341,342,343,344,345,346,347,348,349,350,351],qt=[29,31,85,112,159,160,161,163,164,335],Vt=[6,13,16,31,45,70,73,81,83,85,87,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],Qt=[13,16,31,45,48,82,87,89,112,193,197,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],$t=[2,352],Ht=[13,16,197,308,314],Gt=[1,565],zt=[6,13,16,31,45,76,78,81,83,85,87,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],Kt=[13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],Xt=[13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335],Jt=[13,16,87,308],Wt=[2,364],Yt=[29,31,85,112,159,160,161,163,164,193,232,318,335],Zt=[31,112,193,232,272,318,335],er=[2,359],tr=[13,16,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],rr=[29,31,85,112,159,160,161,163,164,193,232,272,318,335],nr=[13,16,31,45,82,87,89,112,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],ir=[2,347],ar={trace:function(){},yy:{},symbols_:{error:2,QueryOrUpdate:3,Prologue:4,QueryOrUpdate_group0:5,EOF:6,Query:7,Qry:8,Query_option0:9,Prologue_repetition0:10,BaseDecl:11,BASE:12,IRIREF:13,PrefixDecl:14,PREFIX:15,PNAME_NS:16,SelectClauseWildcard:17,Qry_repetition0:18,WhereClause:19,SolutionModifierNoGroup:20,SelectClauseVars:21,Qry_repetition1:22,SolutionModifier:23,CONSTRUCT:24,ConstructTemplate:25,Qry_repetition2:26,Qry_repetition3:27,WHERE:28,"{":29,Qry_option0:30,"}":31,DESCRIBE:32,Qry_group0:33,Qry_repetition4:34,Qry_option1:35,ASK:36,Qry_repetition5:37,SelectClauseBase:38,"*":39,SelectClauseVars_repetition_plus0:40,SELECT:41,SelectClauseBase_option0:42,SelectClauseItem:43,Var:44,"(":45,Expression:46,AS:47,")":48,SubSelect:49,SubSelect_option0:50,SubSelect_option1:51,DatasetClause:52,FROM:53,DatasetClause_option0:54,iri:55,WhereClause_option0:56,GroupGraphPattern:57,SolutionModifier_option0:58,SolutionModifierNoGroup_option0:59,SolutionModifierNoGroup_option1:60,SolutionModifierNoGroup_option2:61,GroupClause:62,GROUP:63,BY:64,GroupClause_repetition_plus0:65,GroupCondition:66,BuiltInCall:67,FunctionCall:68,HavingClause:69,HAVING:70,HavingClause_repetition_plus0:71,OrderClause:72,ORDER:73,OrderClause_repetition_plus0:74,OrderCondition:75,ASC:76,BrackettedExpression:77,DESC:78,Constraint:79,LimitOffsetClauses:80,LIMIT:81,INTEGER:82,OFFSET:83,ValuesClause:84,VALUES:85,InlineData:86,VAR:87,InlineData_repetition0:88,NIL:89,InlineData_repetition1:90,InlineData_repetition_plus2:91,InlineData_repetition3:92,DataBlock:93,DataBlockValueList:94,DataBlockValueList_repetition_plus0:95,Update:96,Update_repetition0:97,Update1:98,Update_option0:99,LOAD:100,Update1_option0:101,Update1_option1:102,Update1_group0:103,Update1_option2:104,GraphRefAll:105,Update1_group1:106,Update1_option3:107,GraphOrDefault:108,TO:109,CREATE:110,Update1_option4:111,GRAPH:112,INSERTDATA:113,QuadPattern:114,DELETEDATA:115,DELETEWHERE:116,Update1_option5:117,InsertDeleteClause:118,Update1_repetition0:119,IntoGraphClause:120,INTO:121,GraphRef:122,DELETE:123,InsertDeleteClause_option0:124,InsertClause:125,INSERT:126,UsingClause:127,USING:128,UsingClause_option0:129,WithClause:130,WITH:131,DEFAULT:132,GraphOrDefault_option0:133,GraphRefAll_group0:134,Quads:135,Quads_option0:136,Quads_repetition0:137,QuadsNotTriples:138,VarOrIri:139,QuadsNotTriples_option0:140,QuadsNotTriples_option1:141,QuadsNotTriples_option2:142,TriplesTemplate:143,TriplesTemplate_repetition0:144,TriplesSameSubject:145,TriplesTemplate_option0:146,GroupGraphPatternSub:147,GroupGraphPatternSub_option0:148,GroupGraphPatternSub_repetition0:149,GroupGraphPatternSubTail:150,GraphPatternNotTriples:151,GroupGraphPatternSubTail_option0:152,GroupGraphPatternSubTail_option1:153,TriplesBlock:154,TriplesBlock_repetition0:155,TriplesSameSubjectPath:156,TriplesBlock_option0:157,GroupOrUnionGraphPattern:158,OPTIONAL:159,MINUS:160,SERVICE:161,GraphPatternNotTriples_option0:162,FILTER:163,BIND:164,InlineDataOneVar:165,InlineDataFull:166,InlineDataOneVar_repetition0:167,InlineDataFull_repetition0:168,InlineDataFull_repetition_plus1:169,InlineDataFull_repetition2:170,DataBlockValue:171,Literal:172,QuotedTriple:173,UNDEF:174,GroupOrUnionGraphPattern_repetition0:175,ArgList:176,ArgList_option0:177,ArgList_repetition0:178,ExpressionList:179,ExpressionList_repetition0:180,ConstructTemplate_option0:181,ConstructTriples:182,ConstructTriples_repetition0:183,ConstructTriples_option0:184,VarOrTermOrQuotedTP:185,PropertyListNotEmpty:186,TriplesNode:187,PropertyList:188,PropertyList_option0:189,VerbObjectList:190,PropertyListNotEmpty_repetition0:191,SemiOptionalVerbObjectList:192,";":193,SemiOptionalVerbObjectList_option0:194,Verb:195,ObjectList:196,a:197,ObjectList_repetition0:198,Object:199,GraphNode:200,Object_option0:201,PropertyListPathNotEmpty:202,TriplesNodePath:203,TriplesSameSubjectPath_option0:204,O:205,PropertyListPathNotEmpty_repetition0:206,PropertyListPathNotEmptyTail:207,O_group0:208,ObjectListPath:209,ObjectListPath_repetition0:210,ObjectPath:211,GraphNodePath:212,ObjectPath_option0:213,Path:214,Path_repetition0:215,PathSequence:216,PathSequence_repetition0:217,PathEltOrInverse:218,PathElt:219,PathPrimary:220,PathElt_option0:221,PathEltOrInverse_option0:222,IriOrA:223,"!":224,PathNegatedPropertySet:225,PathOneInPropertySet:226,PathNegatedPropertySet_repetition0:227,PathNegatedPropertySet_option0:228,"^":229,TriplesNode_repetition_plus0:230,"[":231,"]":232,TriplesNodePath_repetition_plus0:233,VarOrTermOrQuotedTPExpr:234,VarOrTerm:235,GraphTerm:236,BlankNode:237,ConditionalOrExpression:238,ConditionalAndExpression:239,ConditionalOrExpression_repetition0:240,ConditionalOrExpressionTail:241,"||":242,RelationalExpression:243,ConditionalAndExpression_repetition0:244,ConditionalAndExpressionTail:245,"&&":246,NumericExpression:247,RelationalExpression_group0:248,RelationalExpression_option0:249,IN:250,MultiplicativeExpression:251,NumericExpression_repetition0:252,AdditiveExpressionTail:253,AdditiveExpressionTail_group0:254,NumericLiteralPositive:255,AdditiveExpressionTail_repetition0:256,NumericLiteralNegative:257,AdditiveExpressionTail_repetition1:258,UnaryExpression:259,MultiplicativeExpression_repetition0:260,MultiplicativeExpressionTail:261,MultiplicativeExpressionTail_group0:262,"+":263,PrimaryExpression:264,"-":265,ExprQuotedTP:266,Aggregate:267,FUNC_ARITY0:268,FUNC_ARITY1:269,FUNC_ARITY1_SPARQL_STAR:270,FUNC_ARITY2:271,",":272,FUNC_ARITY3:273,FUNC_ARITY3_SPARQL_STAR:274,BuiltInCall_group0:275,BOUND:276,BNODE:277,BuiltInCall_option0:278,EXISTS:279,COUNT:280,Aggregate_option0:281,Aggregate_group0:282,FUNC_AGGREGATE:283,Aggregate_option1:284,GROUP_CONCAT:285,Aggregate_option2:286,Aggregate_option3:287,GroupConcatSeparator:288,SEPARATOR:289,"=":290,String:291,LANGTAG:292,"^^":293,DECIMAL:294,DOUBLE:295,BOOLEAN:296,INTEGER_POSITIVE:297,DECIMAL_POSITIVE:298,DOUBLE_POSITIVE:299,INTEGER_NEGATIVE:300,DECIMAL_NEGATIVE:301,DOUBLE_NEGATIVE:302,STRING_LITERAL1:303,STRING_LITERAL2:304,STRING_LITERAL_LONG1:305,STRING_LITERAL_LONG2:306,PrefixedName:307,PNAME_LN:308,BLANK_NODE_LABEL:309,ANON:310,QuotedTP:311,"<<":312,qtSubjectOrObject:313,">>":314,DataValueTerm:315,AnnotationPattern:316,"{|":317,"|}":318,AnnotationPatternPath:319,ExprVarOrTerm:320,QueryOrUpdate_group0_option0:321,Prologue_repetition0_group0:322,Qry_group0_repetition_plus0:323,SelectClauseBase_option0_group0:324,DISTINCT:325,REDUCED:326,NAMED:327,SILENT:328,CLEAR:329,DROP:330,ADD:331,MOVE:332,COPY:333,ALL:334,".":335,UNION:336,"|":337,"/":338,PathElt_option0_group0:339,"?":340,"!=":341,"<":342,">":343,"<=":344,">=":345,NOT:346,CONCAT:347,COALESCE:348,SUBSTR:349,REGEX:350,REPLACE:351,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",12:"BASE",13:"IRIREF",15:"PREFIX",16:"PNAME_NS",24:"CONSTRUCT",28:"WHERE",29:"{",31:"}",32:"DESCRIBE",36:"ASK",39:"*",41:"SELECT",45:"(",47:"AS",48:")",53:"FROM",63:"GROUP",64:"BY",70:"HAVING",73:"ORDER",76:"ASC",78:"DESC",81:"LIMIT",82:"INTEGER",83:"OFFSET",85:"VALUES",87:"VAR",89:"NIL",100:"LOAD",109:"TO",110:"CREATE",112:"GRAPH",113:"INSERTDATA",115:"DELETEDATA",116:"DELETEWHERE",121:"INTO",123:"DELETE",126:"INSERT",128:"USING",131:"WITH",132:"DEFAULT",159:"OPTIONAL",160:"MINUS",161:"SERVICE",163:"FILTER",164:"BIND",174:"UNDEF",193:";",197:"a",224:"!",229:"^",231:"[",232:"]",242:"||",246:"&&",250:"IN",263:"+",265:"-",268:"FUNC_ARITY0",269:"FUNC_ARITY1",270:"FUNC_ARITY1_SPARQL_STAR",271:"FUNC_ARITY2",272:",",273:"FUNC_ARITY3",274:"FUNC_ARITY3_SPARQL_STAR",276:"BOUND",277:"BNODE",279:"EXISTS",280:"COUNT",283:"FUNC_AGGREGATE",285:"GROUP_CONCAT",289:"SEPARATOR",290:"=",292:"LANGTAG",293:"^^",294:"DECIMAL",295:"DOUBLE",296:"BOOLEAN",297:"INTEGER_POSITIVE",298:"DECIMAL_POSITIVE",299:"DOUBLE_POSITIVE",300:"INTEGER_NEGATIVE",301:"DECIMAL_NEGATIVE",302:"DOUBLE_NEGATIVE",303:"STRING_LITERAL1",304:"STRING_LITERAL2",305:"STRING_LITERAL_LONG1",306:"STRING_LITERAL_LONG2",308:"PNAME_LN",309:"BLANK_NODE_LABEL",310:"ANON",312:"<<",314:">>",317:"{|",318:"|}",325:"DISTINCT",326:"REDUCED",327:"NAMED",328:"SILENT",329:"CLEAR",330:"DROP",331:"ADD",332:"MOVE",333:"COPY",334:"ALL",335:".",336:"UNION",337:"|",338:"/",340:"?",341:"!=",342:"<",343:">",344:"<=",345:">=",346:"NOT",347:"CONCAT",348:"COALESCE",349:"SUBSTR",350:"REGEX",351:"REPLACE"},productions_:[0,[3,3],[7,2],[4,1],[11,2],[14,3],[8,4],[8,4],[8,5],[8,7],[8,5],[8,4],[17,2],[21,2],[38,2],[43,1],[43,5],[49,4],[49,4],[52,3],[19,2],[23,2],[20,3],[62,3],[66,1],[66,1],[66,3],[66,5],[66,1],[69,2],[72,3],[75,2],[75,2],[75,1],[75,1],[80,2],[80,2],[80,4],[80,4],[84,2],[86,4],[86,4],[86,6],[86,2],[94,3],[96,3],[98,4],[98,3],[98,5],[98,4],[98,2],[98,2],[98,2],[98,5],[120,2],[118,3],[118,1],[125,2],[127,3],[130,2],[108,1],[108,2],[122,2],[105,1],[105,1],[114,3],[135,2],[138,7],[143,3],[57,3],[57,3],[147,2],[150,3],[154,3],[151,1],[151,2],[151,2],[151,3],[151,4],[151,2],[151,6],[151,1],[93,1],[93,1],[165,4],[166,4],[166,6],[171,1],[171,1],[171,1],[171,1],[158,2],[79,1],[79,1],[79,1],[68,2],[176,1],[176,5],[179,1],[179,4],[25,3],[182,3],[145,2],[145,2],[188,1],[186,2],[192,2],[190,2],[195,1],[195,1],[196,2],[199,2],[156,2],[156,2],[202,2],[207,1],[207,2],[205,2],[209,2],[211,2],[214,2],[216,2],[219,2],[218,2],[220,1],[220,2],[220,3],[225,1],[225,1],[225,4],[226,1],[226,2],[187,3],[187,3],[203,3],[203,3],[200,1],[200,1],[212,1],[212,1],[234,1],[235,1],[235,1],[139,1],[139,1],[44,1],[236,1],[236,1],[236,1],[236,1],[46,1],[238,2],[241,2],[239,2],[245,2],[243,1],[243,3],[243,4],[247,2],[253,2],[253,2],[253,2],[251,2],[261,2],[259,2],[259,2],[259,2],[259,1],[264,1],[264,1],[264,1],[264,1],[264,1],[264,1],[264,1],[77,3],[67,1],[67,2],[67,4],[67,4],[67,6],[67,8],[67,8],[67,2],[67,4],[67,2],[67,4],[67,3],[267,5],[267,5],[267,6],[288,4],[172,1],[172,2],[172,3],[172,1],[172,1],[172,1],[172,1],[172,1],[172,1],[255,1],[255,1],[255,1],[257,1],[257,1],[257,1],[291,1],[291,1],[291,1],[291,1],[55,1],[55,1],[307,1],[307,1],[237,1],[237,1],[311,5],[173,5],[313,1],[313,1],[313,1],[313,1],[313,1],[315,1],[315,1],[315,1],[185,1],[185,1],[185,1],[316,3],[319,3],[266,5],[320,1],[320,1],[320,1],[223,1],[223,1],[321,0],[321,1],[5,1],[5,1],[5,1],[9,0],[9,1],[322,1],[322,1],[10,0],[10,2],[18,0],[18,2],[22,0],[22,2],[26,0],[26,2],[27,0],[27,2],[30,0],[30,1],[323,1],[323,2],[33,1],[33,1],[34,0],[34,2],[35,0],[35,1],[37,0],[37,2],[40,1],[40,2],[324,1],[324,1],[42,0],[42,1],[50,0],[50,1],[51,0],[51,1],[54,0],[54,1],[56,0],[56,1],[58,0],[58,1],[59,0],[59,1],[60,0],[60,1],[61,0],[61,1],[65,1],[65,2],[71,1],[71,2],[74,1],[74,2],[88,0],[88,2],[90,0],[90,2],[91,1],[91,2],[92,0],[92,2],[95,1],[95,2],[97,0],[97,4],[99,0],[99,2],[101,0],[101,1],[102,0],[102,1],[103,1],[103,1],[104,0],[104,1],[106,1],[106,1],[106,1],[107,0],[107,1],[111,0],[111,1],[117,0],[117,1],[119,0],[119,2],[124,0],[124,1],[129,0],[129,1],[133,0],[133,1],[134,1],[134,1],[134,1],[136,0],[136,1],[137,0],[137,2],[140,0],[140,1],[141,0],[141,1],[142,0],[142,1],[144,0],[144,3],[146,0],[146,1],[148,0],[148,1],[149,0],[149,2],[152,0],[152,1],[153,0],[153,1],[155,0],[155,3],[157,0],[157,1],[162,0],[162,1],[167,0],[167,2],[168,0],[168,2],[169,1],[169,2],[170,0],[170,2],[175,0],[175,3],[177,0],[177,1],[178,0],[178,3],[180,0],[180,3],[181,0],[181,1],[183,0],[183,3],[184,0],[184,1],[189,0],[189,1],[191,0],[191,2],[194,0],[194,1],[198,0],[198,3],[201,0],[201,1],[204,0],[204,1],[206,0],[206,2],[208,1],[208,1],[210,0],[210,3],[213,0],[213,1],[215,0],[215,3],[217,0],[217,3],[339,1],[339,1],[339,1],[221,0],[221,1],[222,0],[222,1],[227,0],[227,3],[228,0],[228,1],[230,1],[230,2],[233,1],[233,2],[240,0],[240,2],[244,0],[244,2],[248,1],[248,1],[248,1],[248,1],[248,1],[248,1],[249,0],[249,1],[252,0],[252,2],[254,1],[254,1],[256,0],[256,2],[258,0],[258,2],[260,0],[260,2],[262,1],[262,1],[275,1],[275,1],[275,1],[275,1],[275,1],[278,0],[278,1],[281,0],[281,1],[282,1],[282,1],[284,0],[284,1],[286,0],[286,1],[287,0],[287,1]],performAction:function(e,t,r,n,i,a,o){var s,c,u,l,d=a.length-1;switch(i){case 1:if(a[d-1]=a[d-1]||{},nn.base&&(a[d-1].base=nn.base),nn.base="",a[d-1].prefixes=nn.prefixes,nn.prefixes=null,nn.pathOnly){if("path"===a[d-1].type||"termType"in a[d-1])return a[d-1];throw new Error("Received full SPARQL query in path only mode")}if("path"===a[d-1].type||"termType"in a[d-1])throw new Error("Received only path in full SPARQL mode");if("update"===a[d-1].type){const e={};for(const t of a[d-1].updates)if("insert"===t.updateType){const r={};for(const e of t.insert)if("bgp"===e.type||"graph"===e.type)for(const t of e.triples)"BlankNode"===t.subject.termType&&(r[t.subject.value]=!0),"BlankNode"===t.predicate.termType&&(r[t.predicate.value]=!0),"BlankNode"===t.object.termType&&(r[t.object.value]=!0);for(const t of Object.keys(r)){if(e[t])throw new Error("Detected reuse blank node across different INSERT DATA clauses");e[t]=!0}}}return a[d-1];case 2:this.$={...a[d-1],...a[d],type:"query"};break;case 4:nn.base=Er(a[d]);break;case 5:nn.prefixes||(nn.prefixes={}),a[d-1]=a[d-1].substr(0,a[d-1].length-1),a[d]=Er(a[d]),nn.prefixes[a[d-1]]=a[d];break;case 6:this.$={...a[d-3],...Nr(a[d-2]),...a[d-1],...a[d]};break;case 7:if(!nn.skipValidation&&(Kr(a[d-3].variables.map((e=>Gr(e.expression)))).some((e=>"count"===e.aggregation&&!(e.expression instanceof or)))||a[d].group))for(const e of a[d-3].variables)if("Variable"===e.termType){if(!a[d].group||!a[d].group.map((e=>Hr(e))).includes(Hr(e)))throw Error("Projection of ungrouped variable (?"+Hr(e)+")")}else if(0===Gr(e.expression).length){const t=zr(e.expression);for(const e of t)if(!a[d].group||!a[d].group.map||!a[d].group.map((e=>Hr(e))).includes(Hr(e)))throw Error("Use of ungrouped variable in projection of operation (?"+Hr(e)+")")}const e=a[d-1].where.filter((e=>"query"===e.type));if(e.length>0){const t=a[d-3].variables.filter((e=>e.variable&&e.variable.value)).map((e=>e.variable.value)),r=Kr(e.map((e=>e.variables))).map((e=>e.value||e.variable.value));for(const e of t)if(r.indexOf(e)>=0)throw Error("Target id of 'AS' (?"+e+") already used in subquery")}this.$=Sr(a[d-3],Nr(a[d-2]),a[d-1],a[d]);break;case 8:this.$=Sr({queryType:"CONSTRUCT",template:a[d-3]},Nr(a[d-2]),a[d-1],a[d]);break;case 9:this.$=Sr({queryType:"CONSTRUCT",template:a[d-2]=a[d-2]?a[d-2].triples:[]},Nr(a[d-5]),{where:[{type:"bgp",triples:Tr([],a[d-2])}]},a[d]);break;case 10:this.$=Sr({queryType:"DESCRIBE",variables:"*"===a[d-3]?[new or]:a[d-3]},Nr(a[d-2]),a[d-1],a[d]);break;case 11:this.$=Sr({queryType:"ASK"},Nr(a[d-2]),a[d-1],a[d]);break;case 12:this.$=Sr(a[d-1],{variables:[new or]});break;case 13:const t=function(e){const t=e.slice().sort(),r=[];for(let e=0;ee.value||e.variable.value)));if(t.length>0)throw Error("Two or more of the resulting columns have the same name (?"+t[0]+")");this.$=Sr(a[d-1],{variables:a[d]});break;case 14:this.$=Sr({queryType:"SELECT"},a[d]&&(a[d-1]=_r(a[d]),a[d]={},a[d][a[d-1]]=!0,a[d]));break;case 16:case 27:this.$=Rr(a[d-3],{variable:a[d-1]});break;case 17:case 18:this.$=Sr(a[d-3],a[d-2],a[d-1],a[d],{type:"query"});break;case 19:case 58:this.$={iri:a[d],named:!!a[d-1]};break;case 20:this.$={where:a[d].patterns};break;case 21:this.$=Sr(a[d-1],a[d]);break;case 22:this.$=Sr(a[d-2],a[d-1],a[d]);break;case 23:this.$={group:a[d]};break;case 24:case 25:case 28:case 31:case 33:case 34:this.$=Rr(a[d]);break;case 26:this.$=Rr(a[d-1]);break;case 29:this.$={having:a[d]};break;case 30:this.$={order:a[d]};break;case 32:this.$=Rr(a[d],{descending:!0});break;case 35:this.$={limit:Dr(a[d])};break;case 36:this.$={offset:Dr(a[d])};break;case 37:this.$={limit:Dr(a[d-2]),offset:Dr(a[d])};break;case 38:this.$={limit:Dr(a[d]),offset:Dr(a[d-2])};break;case 39:case 43:this.$={type:"values",values:a[d]};break;case 40:case 84:this.$=a[d-1].map((e=>({[a[d-3]]:e})));break;case 41:case 85:this.$=a[d-1].map((()=>({})));break;case 42:case 86:var h=a[d-4].length;a[d-4]=a[d-4].map(xr),this.$=a[d-1].map((function(e){if(e.length!==h)throw Error("Inconsistent VALUES length");for(var t={},r=0;r"bind"===e.type))){const t=a[d-1].indexOf(e),r=new Set;for(const e of a[d-1].slice(0,t))"group"!==e.type&&"bgp"!==e.type||Jr(e).forEach((e=>r.add(e)));if(r.has(e.variable.value))throw Error("Variable used to bind is already bound (?"+e.variable.value+")")}this.$={type:"group",patterns:a[d-1]};break;case 71:this.$=a[d-1]?Or([a[d-1]],a[d]):Or(a[d]);break;case 72:this.$=a[d]?[a[d-2],a[d]]:a[d-2];break;case 75:this.$=Sr(a[d],{type:"optional"});break;case 76:this.$=Sr(a[d],{type:"minus"});break;case 77:this.$=Sr(a[d],{type:"graph",name:a[d-1]});break;case 78:this.$=Sr(a[d],{type:"service",name:a[d-1],silent:!!a[d-2]});break;case 79:this.$={type:"filter",expression:a[d]};break;case 80:this.$={type:"bind",variable:a[d-1],expression:a[d-3]};break;case 89:this.$=Wr(a[d]);break;case 90:this.$=void 0;break;case 91:this.$=a[d-1].length?{type:"union",patterns:Or(a[d-1].map(jr),[jr(a[d])])}:a[d];break;case 95:this.$={...a[d],function:a[d-1]};break;case 96:this.$={type:"functionCall",args:[]};break;case 97:this.$={type:"functionCall",args:wr(a[d-2],a[d-1]),distinct:!!a[d-3]};break;case 98:case 115:case 128:case 247:case 249:case 251:case 253:case 255:case 263:case 267:case 297:case 299:case 303:case 307:case 328:case 341:case 349:case 355:case 361:case 367:case 369:case 373:case 375:case 379:case 381:case 385:case 391:case 395:case 401:case 405:case 409:case 411:case 420:case 428:case 430:case 440:case 444:case 446:case 448:this.$=[];break;case 99:this.$=wr(a[d-2],a[d-1]);break;case 101:this.$=Or(a[d-2],[a[d-1]]);break;case 102:case 112:this.$=Zr(a[d].map((e=>Sr(Lr(a[d-1]),e))));break;case 103:this.$=Zr(Tr(a[d].map((e=>Sr(Lr(a[d-1].entity),e))),a[d-1].triples));break;case 105:this.$=Or([a[d-1]],a[d]);break;case 106:this.$=Or(a[d]);break;case 107:this.$=$r(a[d-1],a[d]);break;case 109:case 237:this.$=nn.factory.namedNode(cr);break;case 110:case 118:this.$=wr(a[d-1],a[d]);break;case 111:this.$=a[d]?{annotation:a[d],object:a[d-1]}:a[d-1];break;case 113:this.$=a[d]?Zr(Tr(a[d].map((e=>Sr(Lr(a[d-1].entity),e))),a[d-1].triples)):a[d-1].triples;break;case 114:this.$=$r(...a[d-1],a[d]);break;case 116:this.$=$r(...a[d]);break;case 117:case 159:case 163:this.$=[a[d-1],a[d]];break;case 119:this.$=a[d]?{object:a[d-1],annotation:a[d]}:a[d-1];break;case 120:this.$=a[d-1].length?Ir("|",wr(a[d-1],a[d])):a[d];break;case 121:this.$=a[d-1].length?Ir("/",wr(a[d-1],a[d])):a[d];break;case 122:this.$=a[d]?Ir(a[d],[a[d-1]]):a[d-1];break;case 123:this.$=a[d-1]?Ir(a[d-1],[a[d]]):a[d];break;case 125:case 131:this.$=Ir(a[d-1],[a[d]]);break;case 129:this.$=Ir("|",wr(a[d-2],a[d-1]));break;case 132:case 134:this.$=function(e){var t=kr(),r=t,n=[],i=[];e.forEach((function(e){n.push(e.entity),Tr(i,e.triples)}));for(var a=0,o=0,s=n.length,c=Array(2*s);a2&&E.push("'"+this.terminals_[T]+"'");A=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:f,expected:E})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+m);switch(_[0]){case 1:r.push(m),n.push(d.yytext),i.push(d.yylloc),r.push(_[1]),m=null,b?(m=b,b=null):(c=d.yyleng,o=d.yytext,s=d.yylineno,f=d.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[_[1]][1],x.$=n[n.length-S],x._$={first_line:i[i.length-(S||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(S||1)].first_column,last_column:i[i.length-1].last_column},g&&(x._$.range=[i[i.length-(S||1)].range[0],i[i.length-1].range[1]]),void 0!==(w=this.performAction.apply(x,[o,c,s,h.yy,_[1],n,i].concat(l))))return w;S&&(r=r.slice(0,-1*S*2),n=n.slice(0,-1*S),i=i.slice(0,-1*S)),r.push(this.productions_[_[1]][0]),n.push(x.$),i.push(x._$),O=a[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}},or=r(54516).t,sr="http://www.w3.org/1999/02/22-rdf-syntax-ns#",cr=sr+"type",ur=sr+"first",lr=sr+"rest",dr=sr+"nil",hr="http://www.w3.org/2001/XMLSchema#",pr=hr+"integer",fr=hr+"decimal",yr=hr+"double",gr=hr+"boolean",mr="",br="",vr="";function _r(e){return e.toLowerCase()}function wr(e,t){return e.push(t),e}function Tr(e,t){return e.push.apply(e,t),e}function Sr(e){e||(e={});for(var t,r=1,n=arguments.length;r>10),56320+(1023&i))}var a=Ur[n];if(!a)throw new Error;return a}))}catch(e){return""}if(qr.exec(e))throw new Error("Invalid unicode codepoint of surrogate pair without corresponding codepoint in "+e);return e}function $r(e,t,r){var n=[],i=[];return t.forEach((function(t){let r=null;t.annotation&&(r=t.annotation,t=t.object),n.push(Lr(null,e,t.entity,r)),Tr(i,t.triples)})),Or(n,r||[],i)}function Hr(e){return e.variable?e.variable.value:e.value||e.expression.value}function Gr(e){if(!e)return[];if("aggregate"===e.type)return[e];if("operation"===e.type){const t=[];for(const r of e.args)t.push(...Gr(r));return t}return[]}function zr(e){const t=new Set,r=function(e){e&&("Variable"===e.termType?t.add(e):"operation"===e.type&&e.args.forEach(r))};return r(e),t}function Kr(e,t=1,r=[]){for(const n of e)t>0&&n instanceof Array?Kr(n,t-1,r):r.push(n);return r}function Xr(e){return"Variable"===e.termType}function Jr(e){if(e.triples){const t=[];for(const r of e.triples)Xr(r.subject)&&t.push(r.subject.value),Xr(r.predicate)&&t.push(r.predicate.value),Xr(r.object)&&t.push(r.object.value);return t}if(e.patterns){const t=[];for(const r of e.patterns)t.push(...Jr(r));return t}return[]}function Wr(e){if(!nn.sparqlStar)throw new Error("SPARQL-star support is not enabled");return e}function Yr(e,t,r){for(const n of t){const t=Lr("subject"in n?n.subject:e,n.predicate,n.object);r.push(t),n.annotations&&Yr(Mr(e,n.predicate,n.object),n.annotations,r)}}function Zr(e){if(nn.sparqlStar){const t=[];return e.forEach((e=>{const r=Lr(e.subject,e.predicate,e.object);t.push(r),e.annotations&&Yr(Mr(e.subject,e.predicate,e.object),e.annotations,t)})),t}return e}function en(e){for(const t of e){if("graph"===t.type&&"Variable"===t.name.termType)throw new Error("Detected illegal variable in GRAPH");if("bgp"===t.type||"graph"===t.type)for(const e of t.triples)if("Variable"===e.subject.termType||"Variable"===e.predicate.termType||"Variable"===e.object.termType)throw new Error("Detected illegal variable in BGP")}return e}function tn(e){for(const t of e)if("bgp"===t.type)for(const e of t.triples)if("BlankNode"===e.subject.termType||"BlankNode"===e.predicate.termType||"BlankNode"===e.object.termType)throw new Error("Detected illegal blank node in BGP");return e}var rn={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var r,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;at[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{flex:!0,"case-insensitive":!0},performAction:function(e,t,r,n){switch(r){case 0:break;case 1:return 12;case 2:return 15;case 3:return 41;case 4:return 325;case 5:return 326;case 6:return 45;case 7:return 47;case 8:return 48;case 9:return 39;case 10:return 24;case 11:return 28;case 12:return 29;case 13:return 31;case 14:return 32;case 15:return 36;case 16:return 53;case 17:return 327;case 18:return 63;case 19:return 64;case 20:return 70;case 21:return 73;case 22:return 76;case 23:return 78;case 24:return 81;case 25:return 83;case 26:return 85;case 27:return 193;case 28:return 100;case 29:return 328;case 30:return 121;case 31:return 329;case 32:return 330;case 33:return 110;case 34:return 331;case 35:return 109;case 36:return 332;case 37:return 333;case 38:return 113;case 39:return 115;case 40:return 116;case 41:return 131;case 42:return 123;case 43:return 126;case 44:return 128;case 45:return 132;case 46:return 112;case 47:return 334;case 48:return 335;case 49:return 159;case 50:return 161;case 51:return 164;case 52:return 174;case 53:return 160;case 54:return 336;case 55:return 163;case 56:return 312;case 57:return 314;case 58:return 317;case 59:return 318;case 60:return 272;case 61:return 197;case 62:return 337;case 63:return 338;case 64:return 229;case 65:return 340;case 66:return 263;case 67:return 224;case 68:return 231;case 69:return 232;case 70:return 242;case 71:return 246;case 72:return 290;case 73:return 341;case 74:return 342;case 75:return 343;case 76:return 344;case 77:return 345;case 78:return 250;case 79:return 346;case 80:return 265;case 81:return 276;case 82:return 277;case 83:return 268;case 84:return 269;case 85:return 270;case 86:return 271;case 87:return 347;case 88:return 348;case 89:return 273;case 90:return 274;case 91:return 350;case 92:return 349;case 93:return 351;case 94:return 279;case 95:return 280;case 96:return 283;case 97:return 285;case 98:return 289;case 99:return 293;case 100:return 296;case 101:return 13;case 102:return 16;case 103:return 308;case 104:return 309;case 105:return 87;case 106:return 292;case 107:return 82;case 108:return 294;case 109:return 295;case 110:return 297;case 111:return 298;case 112:return 299;case 113:return 300;case 114:return 301;case 115:return 302;case 116:return"EXPONENT";case 117:return 303;case 118:return 304;case 119:return 305;case 120:return 306;case 121:return 89;case 122:return 310;case 123:return 6;case 124:return"INVALID";case 125:console.log(t.yytext)}},rules:[/^(?:\s+|(#[^\n\r]*))/i,/^(?:BASE)/i,/^(?:PREFIX)/i,/^(?:SELECT)/i,/^(?:DISTINCT)/i,/^(?:REDUCED)/i,/^(?:\()/i,/^(?:AS)/i,/^(?:\))/i,/^(?:\*)/i,/^(?:CONSTRUCT)/i,/^(?:WHERE)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:DESCRIBE)/i,/^(?:ASK)/i,/^(?:FROM)/i,/^(?:NAMED)/i,/^(?:GROUP)/i,/^(?:BY)/i,/^(?:HAVING)/i,/^(?:ORDER)/i,/^(?:ASC)/i,/^(?:DESC)/i,/^(?:LIMIT)/i,/^(?:OFFSET)/i,/^(?:VALUES)/i,/^(?:;)/i,/^(?:LOAD)/i,/^(?:SILENT)/i,/^(?:INTO)/i,/^(?:CLEAR)/i,/^(?:DROP)/i,/^(?:CREATE)/i,/^(?:ADD)/i,/^(?:TO)/i,/^(?:MOVE)/i,/^(?:COPY)/i,/^(?:INSERT((\s+|(#[^\n\r]*)\n\r?)+)DATA)/i,/^(?:DELETE((\s+|(#[^\n\r]*)\n\r?)+)DATA)/i,/^(?:DELETE((\s+|(#[^\n\r]*)\n\r?)+)WHERE)/i,/^(?:WITH)/i,/^(?:DELETE)/i,/^(?:INSERT)/i,/^(?:USING)/i,/^(?:DEFAULT)/i,/^(?:GRAPH)/i,/^(?:ALL)/i,/^(?:\.)/i,/^(?:OPTIONAL)/i,/^(?:SERVICE)/i,/^(?:BIND)/i,/^(?:UNDEF)/i,/^(?:MINUS)/i,/^(?:UNION)/i,/^(?:FILTER)/i,/^(?:<<)/i,/^(?:>>)/i,/^(?:\{\|)/i,/^(?:\|\})/i,/^(?:,)/i,/^(?:a)/i,/^(?:\|)/i,/^(?:\/)/i,/^(?:\^)/i,/^(?:\?)/i,/^(?:\+)/i,/^(?:!)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:\|\|)/i,/^(?:&&)/i,/^(?:=)/i,/^(?:!=)/i,/^(?:<)/i,/^(?:>)/i,/^(?:<=)/i,/^(?:>=)/i,/^(?:IN)/i,/^(?:NOT)/i,/^(?:-)/i,/^(?:BOUND)/i,/^(?:BNODE)/i,/^(?:(RAND|NOW|UUID|STRUUID))/i,/^(?:(LANG|DATATYPE|IRI|URI|ABS|CEIL|FLOOR|ROUND|STRLEN|STR|UCASE|LCASE|ENCODE_FOR_URI|YEAR|MONTH|DAY|HOURS|MINUTES|SECONDS|TIMEZONE|TZ|MD5|SHA1|SHA256|SHA384|SHA512|isIRI|isURI|isBLANK|isLITERAL|isNUMERIC))/i,/^(?:(SUBJECT|PREDICATE|OBJECT|isTRIPLE))/i,/^(?:(LANGMATCHES|CONTAINS|STRSTARTS|STRENDS|STRBEFORE|STRAFTER|STRLANG|STRDT|sameTerm))/i,/^(?:CONCAT)/i,/^(?:COALESCE)/i,/^(?:IF)/i,/^(?:TRIPLE)/i,/^(?:REGEX)/i,/^(?:SUBSTR)/i,/^(?:REPLACE)/i,/^(?:EXISTS)/i,/^(?:COUNT)/i,/^(?:SUM|MIN|MAX|AVG|SAMPLE)/i,/^(?:GROUP_CONCAT)/i,/^(?:SEPARATOR)/i,/^(?:\^\^)/i,/^(?:true|false)/i,/^(?:(<(?:[^<>\"\{\}\|\^`\\\u0000-\u0020])*>))/i,/^(?:((([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?)?:))/i,/^(?:(((([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?)?:)((?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|:|[0-9]|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.|:|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))*(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|:|((%([0-9A-Fa-f])([0-9A-Fa-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%)))))?)))/i,/^(?:(_:(?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9])(?:(?:(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])|\.)*(((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|-|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040]))?))/i,/^(?:([\?\$]((?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9])(?:((?:([A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])|_))|[0-9]|\u00B7|[\u0300-\u036F\u203F-\u2040])*)))/i,/^(?:(@[a-zA-Z]+(?:-[a-zA-Z0-9]+)*))/i,/^(?:([0-9]+))/i,/^(?:([0-9]*\.[0-9]+))/i,/^(?:([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+)))/i,/^(?:(\+([0-9]+)))/i,/^(?:(\+([0-9]*\.[0-9]+)))/i,/^(?:(\+([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+))))/i,/^(?:(-([0-9]+)))/i,/^(?:(-([0-9]*\.[0-9]+)))/i,/^(?:(-([0-9]+\.[0-9]*([eE][+-]?[0-9]+)|\.([0-9])+([eE][+-]?[0-9]+)|([0-9])+([eE][+-]?[0-9]+))))/i,/^(?:([eE][+-]?[0-9]+))/i,/^(?:('(?:(?:[^\u0027\u005C\u000A\u000D])|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])))*'))/i,/^(?:("(?:(?:[^\u0022\u005C\u000A\u000D])|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])))*"))/i,/^(?:('''(?:(?:'|'')?(?:[^'\\]|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f]))))*'''))/i,/^(?:("""(?:(?:"|"")?(?:[^\"\\]|(\\[tbnrf\\\"']|\\u([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])|\\U([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f]))))*"""))/i,/^(?:(\((\u0020|\u0009|\u000D|\u000A)*\)))/i,/^(?:(\[(\u0020|\u0009|\u000D|\u000A)*\]))/i,/^(?:$)/i,/^(?:.)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125],inclusive:!0}}};function nn(){this.yy={}}return ar.lexer=rn,nn.prototype=ar,ar.Parser=nn,new nn}();e.exports=n},54516:e=>{class t{constructor(){return r||this}equals(e){return e&&this.termType===e.termType}}Object.defineProperty(t.prototype,"value",{enumerable:!0,value:"*"}),Object.defineProperty(t.prototype,"termType",{enumerable:!0,value:"Wildcard"});var r=new t;e.exports.t=t},55403:(e,t,r)=>{var n=r(17308).Parser,i=r(33206),a=r(54516).t,{DataFactory:o}=r(18050);e.exports={Parser:function({prefixes:e,baseIRI:t,factory:r,sparqlStar:i,skipValidation:a,skipUngroupedVariableCheck:s,pathOnly:c}={}){var u={};for(var l in e||{})u[l]=e[l];var d=new n;return d.parse=function(){return n.base=t||"",n.prefixes=Object.create(u),n.factory=r||new o,n.sparqlStar=Boolean(i),n.pathOnly=Boolean(c),n.skipValidation=Boolean(a)||Boolean(s),n.prototype.parse.apply(d,arguments)},d._resetBlanks=n._resetBlanks,d},Generator:i,Wildcard:a}},21451:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(71839),t)},71839:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SparqlJsonParser=void 0;const n=r(18050),i=r(58521),a=r(36885);t.SparqlJsonParser=class{constructor(e){var t;e=e||{},this.dataFactory=e.dataFactory||new n.DataFactory,this.prefixVariableQuestionMark=!!e.prefixVariableQuestionMark,this.suppressMissingStreamResultsError=null===(t=e.suppressMissingStreamResultsError)||void 0===t||t}parseJsonResults(e){return e.results.bindings.map((e=>this.parseJsonBindings(e)))}parseJsonResultsStream(e){const t=e=>s.emit("error",e);e.on("error",t);const r=new a;r.onError=t;let n=!1,o=!1;r.onValue=e=>{if("vars"===r.key&&2===r.stack.length&&"head"===r.stack[1].key)s.emit("variables",e.map((e=>this.dataFactory.variable(e)))),n=!0;else if("results"===r.key&&1===r.stack.length)o=!0;else if("number"==typeof r.key&&3===r.stack.length&&"results"===r.stack[1].key&&"bindings"===r.stack[2].key)try{s.push(this.parseJsonBindings(e))}catch(e){s.emit("error",e)}else"metadata"===r.key&&1===r.stack.length&&s.emit("metadata",e)};const s=e.on("end",(e=>{o||this.suppressMissingStreamResultsError?n||s.emit("variables",[]):s.emit("error",new Error("No valid SPARQL query results were found."))})).pipe(new i.Transform({objectMode:!0,transform(e,t,n){r.write(e),n()}}));return s}parseJsonBindings(e){const t={};for(const r in e){const n=e[r];t[this.prefixVariableQuestionMark?"?"+r:r]=this.parseJsonValue(n)}return t}parseJsonValue(e){let t;switch(e.type){case"bnode":t=this.dataFactory.blankNode(e.value);break;case"literal":t=e["xml:lang"]?this.dataFactory.literal(e.value,e["xml:lang"]):e.datatype?this.dataFactory.literal(e.value,this.dataFactory.namedNode(e.datatype)):this.dataFactory.literal(e.value);break;case"typed-literal":t=this.dataFactory.literal(e.value,this.dataFactory.namedNode(e.datatype));break;case"triple":const r=e.value;if(!(r&&r.subject&&r.predicate&&r.object))throw new Error("Invalid quoted triple: "+JSON.stringify(e));t=this.dataFactory.quad(this.parseJsonValue(r.subject),this.parseJsonValue(r.predicate),this.parseJsonValue(r.object));break;default:t=this.dataFactory.namedNode(e.value)}return t}parseJsonBoolean(e){if("boolean"in e)return e.boolean;throw new Error("No valid ASK response was found.")}parseJsonBooleanStream(e){return new Promise(((t,r)=>{const n=new a;n.onError=r,n.onValue=e=>{"boolean"===n.key&&"boolean"==typeof e&&1===n.stack.length&&t(e)},e.on("error",r).on("data",(e=>n.write(e))).on("end",(()=>r(new Error("No valid ASK response was found."))))}))}}},43004:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(78780),t)},78780:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Converter=void 0;const n=r(80740),i=r(21451);class a{constructor(e){(e=e||{delimiter:"_"}).prefixVariableQuestionMark=!1,this.delimiter=e.delimiter||"_",this.parser=new i.SparqlJsonParser(e),this.materializeRdfJsTerms=e.materializeRdfJsTerms}static addValueToTree(e,t,r,n,i,o){const s=t[0],c=n?n+o+s:s,u=i.singularizeVariables[c];if(1===t.length)u?e[s]||(e[s]=r):(e[s]||(e[s]=[]),e[s].push(r));else{let n;u?(e[s]||(e[s]={}),n=e[s]):(e[s]||(e[s]=[{}]),n=e[s][0]),a.addValueToTree(n,t.slice(1),r,c,i,o)}}static mergeTrees(e,t){if(typeof e!=typeof t)throw new Error(`Two incompatible tree nodes were found: ${typeof e} and ${typeof t}`);if(Array.isArray(e)!==Array.isArray(t))throw new Error(`Two incompatible tree nodes were found: Array?${Array.isArray(e)} and Array?${Array.isArray(t)}`);if("object"==typeof e&&"object"==typeof t){if(e.termType&&t.termType)return e.equals(t)?{valid:!0,result:e}:{valid:!1,result:e};if(Array.isArray(e)&&Array.isArray(t)){if(e.length>0){const r=[];let n=!1;for(const i of e){const e=a.mergeTrees(i,t[0]);e.valid?(n=!0,r.push(e.result)):r.push(i)}if(n)return{valid:!0,result:r}}return{valid:!0,result:e.concat(t)}}{const r={};for(const e in t)r[e]=t[e];for(const t in e)if(r[t]){const n=a.mergeTrees(e[t],r[t]);if(!n.valid)return{valid:!1,result:e};r[t]=n.result}else r[t]=e[t];return{valid:!0,result:r}}}throw new Error(`Unmergable tree types: ${typeof e} and ${typeof t}`)}static materializeTree(e){if(e.termType)return(0,n.getTermRaw)(e);if(Array.isArray(e))return e.map(a.materializeTree);{const t={};for(const r in e)t[r]=a.materializeTree(e[r]);return t}}sparqlJsonResultsToTree(e,t){return this.bindingsToTree(this.parser.parseJsonResults(e),t||{singularizeVariables:{}})}bindingsToTree(e,t){const r=t&&t.singularizeVariables[""];let n=r?{}:[];for(const i of e){const e=r?{}:[{}];for(const n in i){const o=n.split(this.delimiter),s=i[n];a.addValueToTree(r?e:e[0],o,s,"",t,this.delimiter)}n=a.mergeTrees(n,e).result}return this.materializeRdfJsTerms&&(n=a.materializeTree(n)),n}}t.Converter=a},52666:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(49679),t)},49679:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SparqlXmlParser=void 0;const n=r(18050),i=r(49126),a=r(58521);t.SparqlXmlParser=class{constructor(e){e=e||{},this.dataFactory=e.dataFactory||new n.DataFactory,this.prefixVariableQuestionMark=!!e.prefixVariableQuestionMark}parseXmlResultsStream(e){const t=e=>y.emit("error",e);e.on("error",t);const r=new i.SaxesParser,n=[];let o=!1,s=!1;const c=[];let u,l={},d="",h="",p="",f=[];r.on("error",t),r.on("opentag",(e=>{"variable"===e.name&&this.stackEquals(n,["sparql","head"])?c.push(this.dataFactory.variable(e.attributes.name)):"results"===e.name&&this.stackEquals(n,["sparql"])?s=!0:"result"===e.name&&this.stackEquals(n,["sparql","results"])?l={}:"binding"===e.name&&this.stackEquals(n,["sparql","results","result"])?(d=e.attributes.name||"",h="",u="",p="",f=[]):"triple"===e.name&&this.stackBeginsWith(n,["sparql","results","result"])?f.push({components:{}}):"triple"===n[n.length-1]&&this.stackBeginsWith(n,["sparql","results","result","binding"])?(h="",u="",p="",["subject","predicate","object"].includes(e.name)?f[f.length-1].currentComponent=e.name:t(new Error(`Illegal quoted triple component '${e.name}' found on line ${r.line+1}`))):this.stackBeginsWith(n,["sparql","results","result","binding"])&&(h=e.name,u="xml:lang"in e.attributes?e.attributes["xml:lang"]:"datatype"in e.attributes?this.dataFactory.namedNode(e.attributes.datatype):void 0),n.push(e.name)})),r.on("closetag",(e=>{if(this.stackEquals(n,["sparql","head"])&&(y.emit("variables",c),o=!0),this.stackEquals(n,["sparql","results","result"])&&y.push(l),this.stackBeginsWith(n,["sparql","results","result","binding"])){let e;if(!d&&h)t(new Error(`Terms should have a name on line ${r.line+1}`));else if("uri"===h)e=this.dataFactory.namedNode(p);else if("bnode"===h)e=this.dataFactory.blankNode(p);else if("literal"===h)e=this.dataFactory.literal(p,u);else if("triple"===n[n.length-1]){const n=f.pop();n&&n.components.subject&&n.components.predicate&&n.components.object?e=this.dataFactory.quad(n.components.subject,n.components.predicate,n.components.object):t(new Error(`Incomplete quoted triple on line ${r.line+1}`))}else h&&t(new Error(`Invalid term type '${h}' on line ${r.line+1}`));if(e)if(f.length>0){const n=f[f.length-1];n.components[n.currentComponent]&&t(new Error(`The ${n.currentComponent} in a quoted triple on line ${r.line+1} was already defined before`)),n.components[n.currentComponent]=e}else{const t=this.prefixVariableQuestionMark?"?"+d:d;l[t]=e}h=void 0}n.pop()})),r.on("text",(e=>{this.stackBeginsWith(n,["sparql","results","result","binding"])&&n[n.length-1]===h&&(p=e)}));const y=e.on("end",(e=>{s?o||y.emit("variables",[]):y.emit("error",new Error("No valid SPARQL query results were found."))})).pipe(new a.Transform({objectMode:!0,transform(e,t,n){r.write(e),n()}}));return y}parseXmlBooleanStream(e){return new Promise(((t,r)=>{const n=new i.SaxesParser,a=[];n.on("error",r),n.on("opentag",(e=>{a.push(e.name)})),n.on("closetag",(e=>{a.pop()})),n.on("text",(e=>{this.stackEquals(a,["sparql","boolean"])&&t("true"===e)})),e.on("error",r).on("data",(e=>n.write(e))).on("end",(()=>r(new Error("No valid ASK response was found."))))}))}stackEquals(e,t){return e.length===t.length&&e.every(((e,r)=>t[r]===e))}stackBeginsWith(e,t){return e.length>=t.length&&t.every(((t,r)=>e[r]===t))}}},76574:(e,t,r)=>{var n=r(21848);e.exports=function(e,t,r){"function"==typeof t&&(r=t,t=null);var i="",a=new n((function(r,n){e.on("data",(function(e){i+="string"==typeof t?e.toString(t):e.toString()})),e.on("end",(function(){r(i)})),e.on("error",n)}));return r&&a.then((function(e){r(null,e)}),r),a}},18888:(e,t,r)=>{"use strict";var n=r(25636).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},68492:e=>{!function(t){"use strict";var r=function(){function e(e){this.options=e}return e.prototype.toString=function(){return JSON&&JSON.stringify?JSON.stringify(this.options):this.options},e}(),n={isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},isString:function(e){return"[object String]"===Object.prototype.toString.apply(e)},isNumber:function(e){return"[object Number]"===Object.prototype.toString.apply(e)},isBoolean:function(e){return"[object Boolean]"===Object.prototype.toString.apply(e)},join:function(e,t){var r,n="",i=!0;for(r=0;r="0"&&e<="9"}return{isAlpha:function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"},isDigit:e,isHexDigit:function(t){return e(t)||t>="a"&&t<="f"||t>="A"&&t<="F"}}}(),a=function(){var e=function(e){return e<=127?1:194<=e&&e<=223?2:224<=e&&e<=239?3:240<=e&&e<=244?4:0},t=function(e){return 128<=e&&e<=191};function r(e,t){return"%"===e.charAt(t)&&i.isHexDigit(e.charAt(t+1))&&i.isHexDigit(e.charAt(t+2))}function n(e,t){return parseInt(e.substr(t,2),16)}return{encodeCharacter:function(e){var t,r,n="",i=function(e){return unescape(encodeURIComponent(e))}(e);for(r=0;r1?r+=n:r+=c(n)||s(n)?n:a.encodeCharacter(n);return r},encodeLiteralCharacter:function(e,t){var r=a.pctCharAt(e,t);return r.length>1||c(r)||s(r)?r:a.encodeCharacter(r)}}}(),l=function(){var e={};function t(t){e[t]={symbol:t,separator:"?"===t?"&":""===t||"+"===t||"#"===t?",":t,named:";"===t||"&"===t||"?"===t,ifEmpty:"&"===t||"?"===t?"=":"",first:"+"===t?"":t,encode:"+"===t||"#"===t?u.encodePassReserved:u.encode,toString:function(){return this.symbol}}}return t(""),t("+"),t("#"),t("."),t("/"),t(";"),t("?"),t("&"),{valueOf:function(t){return e[t]?e[t]:"=,!@|".indexOf(t)>=0?null:e[""]}}}();function d(e){var t;if(null==e)return!1;if(n.isArray(e))return e.length>0;if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return!0;for(t in e)if(e.hasOwnProperty(t)&&d(e[t]))return!0;return!1}var h=function(){function e(e){this.literal=u.encodeLiteral(e)}return e.prototype.expand=function(){return this.literal},e.prototype.toString=e.prototype.expand,e}(),p=function(){function e(e){var t,n,s=[],c=null,u=null,d=null,h="";function p(){var t=e.substring(u,n);if(0===t.length)throw new r({expressionText:e,message:"a varname must be specified",position:n});c={varname:t,exploded:!1,maxLength:null},u=null}function y(){if(d===n)throw new r({expressionText:e,message:"after a ':' you have to specify the length",position:n});c.maxLength=parseInt(e.substring(d,n),10),d=null}for(t=function(t){var i=l.valueOf(t);if(null===i)throw new r({expressionText:e,message:"illegal use of reserved operator",position:n,operator:t});return i}(e.charAt(0)),n=t.symbol.length,u=n;n=4)throw new r({expressionText:e,message:"A :prefix must have max 4 digits",position:n});continue}y()}if(":"!==h)if("*"!==h){if(","!==h)throw new r({expressionText:e,message:"illegal character",character:h,position:n});s.push(c),c=null,u=n+1}else{if(null===c)throw new r({expressionText:e,message:"exploded without varspec",position:n});if(c.exploded)throw new r({expressionText:e,message:"exploded twice",position:n});if(c.maxLength)throw new r({expressionText:e,message:"an explode (*) MUST NOT follow to a prefix",position:n});c.exploded=!0}else{if(null!==c.maxLength)throw new r({expressionText:e,message:"only one :maxLength is allowed per varspec",position:n});if(c.exploded)throw new r({expressionText:e,message:"an exploeded varspec MUST NOT be varspeced",position:n});d=n+1}}return null!==u&&p(),null!==d&&y(),s.push(c),new f(e,t,s)}return function(t){var n,i,a=[],o=null,s=0;for(n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return c.default}});var n=h(r(74603)),i=h(r(22298)),a=h(r(42712)),o=h(r(93423)),s=h(r(35911)),c=h(r(24072)),u=h(r(4564)),l=h(r(46585)),d=h(r(29975));function h(e){return e&&e.__esModule?e:{default:e}}},72668:(e,t)=>{"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function n(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function i(e,t,r,i,a,o){return n((s=n(n(t,e),n(i,o)))<<(c=a)|s>>>32-c,r);var s,c}function a(e,t,r,n,a,o,s){return i(t&r|~t&n,e,t,a,o,s)}function o(e,t,r,n,a,o,s){return i(t&n|r&~n,e,t,a,o,s)}function s(e,t,r,n,a,o,s){return i(t^r^n,e,t,a,o,s)}function c(e,t,r,n,a,o,s){return i(r^(t|~n),e,t,a,o,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let r=0;r>5]>>>i%32&255,a=parseInt(n.charAt(r>>>4&15)+n.charAt(15&r),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[r/8])<{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};t.default=r},35911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default="00000000-0000-0000-0000-000000000000"},29975:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(4564))&&n.__esModule?n:{default:n};t.default=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}},16635:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},74089:(e,t)=>{"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)};const n=new Uint8Array(16)},34271:(e,t)=>{"use strict";function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let r=0;r>>0;d=l,l=u,u=n(c,30)>>>0,c=o,o=s}i[0]=i[0]+o>>>0,i[1]=i[1]+c>>>0,i[2]=i[2]+u>>>0,i[3]=i[3]+l>>>0,i[4]=i[4]+d>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]}},46585:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=o;var n,i=(n=r(4564))&&n.__esModule?n:{default:n};const a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));function o(e,t=0){return a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]}t.default=function(e,t=0){const r=o(e,t);if(!(0,i.default)(r))throw TypeError("Stringified UUID is invalid");return r}},74603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(74089))&&n.__esModule?n:{default:n},a=r(46585);let o,s,c=0,u=0;t.default=function(e,t,r){let n=t&&r||0;const l=t||new Array(16);let d=(e=e||{}).node||o,h=void 0!==e.clockseq?e.clockseq:s;if(null==d||null==h){const t=e.random||(e.rng||i.default)();null==d&&(d=o=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==h&&(h=s=16383&(t[6]<<8|t[7]))}let p=void 0!==e.msecs?e.msecs:Date.now(),f=void 0!==e.nsecs?e.nsecs:u+1;const y=p-c+(f-u)/1e4;if(y<0&&void 0===e.clockseq&&(h=h+1&16383),(y<0||p>c)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=p,u=f,s=h,p+=122192928e5;const g=(1e4*(268435455&p)+f)%4294967296;l[n++]=g>>>24&255,l[n++]=g>>>16&255,l[n++]=g>>>8&255,l[n++]=255&g;const m=p/4294967296*1e4&268435455;l[n++]=m>>>8&255,l[n++]=255&m,l[n++]=m>>>24&15|16,l[n++]=m>>>16&255,l[n++]=h>>>8|128,l[n++]=255&h;for(let e=0;e<6;++e)l[n+e]=d[e];return t||(0,a.unsafeStringify)(l)}},22298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(14782)),i=a(r(72668));function a(e){return e&&e.__esModule?e:{default:e}}var o=(0,n.default)("v3",48,i.default);t.default=o},14782:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,r){function n(e,n,o,s){var c;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(40193)),i=o(r(74089)),a=r(46585);function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t,r){if(n.default.randomUUID&&!t&&!e)return n.default.randomUUID();const o=(e=e||{}).random||(e.rng||i.default)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=o[e];return t}return(0,a.unsafeStringify)(o)}},93423:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(14782)),i=a(r(34271));function a(e){return e&&e.__esModule?e:{default:e}}var o=(0,n.default)("v5",80,i.default);t.default=o},4564:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(16635))&&n.__esModule?n:{default:n};t.default=function(e){return"string"==typeof e&&i.default.test(e)}},24072:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(4564))&&n.__esModule?n:{default:n};t.default=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},29815:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(33285),t)},33285:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateIri=t.IriValidationStrategy=void 0;const r=function(){const e="[!$&'()*+,;=]",t="%[a-fA-F0-9]{2}",r="([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",n=`${r}\\.${r}\\.${r}\\.${r}`,i="[a-fA-F0-9]{1,4}",a=`(${i}:${i}|${n})`,o="[a-zA-Z0-9\\-._~ -퟿豈-﷏ﷰ-￯𐀀-🿽𠀀-𯿽𰀀-𿿽񀀀-񏿽񐀀-񟿽񠀀-񯿽񰀀-񿿽򀀀-򏿽򐀀-򟿽򠀀-򯿽򰀀-򿿽󀀀-󏿽󐀀-󟿽󡀀-󯿽]",s=`(${o}|${t}|${e}|[:@])*`,c=`(${s})+`,u=`(${s})*`;return new RegExp(`^[a-zA-Z][a-zA-Z0-9+\\-.]*:(\\/\\/((${o}|${t}|${e}|:)*@)?(\\[(((${i}:){6}${a}|::(${i}:){5}${a}|(${i})?::(${i}:){4}${a}|((${i}:){0,1}${i})?::(${i}:){3}${a}|((${i}:){0,2}${i})?::(${i}:){2}${a}|((${i}:){0,3}${i})?::${i}:${a}|((${i}:){0,4}${i})?::${a}|((${i}:){0,5}${i})?::${i}|((${i}:){0,6}${i})?::)|v[a-fA-F0-9]+\\.(${e}|${e}|":)+)\\]|${n}|(${o}|${t}|${e})*)(:[0-9]*)?(\\/${u})*|\\/(${c}(\\/${u})*)?|${c}(\\/${u})*|)(\\?(${s}|[-󰀀-󿿽􀀀-􏿽]|[\\/?])*)?(#(${s}|[\\/?])*)?$`,"u")}(),n=/^[A-Za-z][\d+-.A-Za-z]*:[^\u0000-\u0020"<>\\^`{|}]*$/u;var i;!function(e){e.Strict="strict",e.Pragmatic="pragmatic",e.None="none"}(i=t.IriValidationStrategy||(t.IriValidationStrategy={})),t.validateIri=function(e,t=i.Strict){switch(t){case i.Strict:return r.test(e)?void 0:new Error(`Invalid IRI according to RFC 3987: '${e}'`);case i.Pragmatic:return n.test(e)?void 0:new Error(`Invalid IRI according to RDF Turtle: '${e}'`);case i.None:return;default:return new Error(`Not supported validation strategy "${t}"`)}}},55675:(e,t,r)=>{e.exports=function e(t,r,n){function i(o,s){if(!r[o]){if(!t[o]){if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[o]={exports:{}};t[o][0].call(u.exports,(function(e){return i(t[o][1][e]||e)}),u,u.exports,e,t,r,n)}return r[o].exports}for(var a=void 0,o=0;o=0;s--)if(c[s]!==u[s])return!1;for(s=c.length-1;s>=0;s--)if(!h(e[o=c[s]],t[o],r,n))return!1;return!0}(e,t,r,s))}return r?e===t:e==t}function p(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function f(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function y(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&l(i,r,"Missing expected exception"+n);var a="string"==typeof n,o=!e&&i&&!r;if((!e&&g.isError(i)&&a&&f(i,r)||o)&&l(i,r,"Got unwanted exception"+n),e&&i&&r&&!f(i,r)||!e&&i)throw i}var g=e("util/"),m=Object.prototype.hasOwnProperty,b=Array.prototype.slice,v="foo"===function(){}.name,_=t.exports=d,w=/\s*function\s+([^\(\s]*)\s*/;_.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return c(u(e.actual),128)+" "+e.operator+" "+c(u(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||l;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=s(t),a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},g.inherits(_.AssertionError,Error),_.fail=l,_.ok=d,_.equal=function(e,t,r){e!=t&&l(e,t,r,"==",_.equal)},_.notEqual=function(e,t,r){e==t&&l(e,t,r,"!=",_.notEqual)},_.deepEqual=function(e,t,r){h(e,t,!1)||l(e,t,r,"deepEqual",_.deepEqual)},_.deepStrictEqual=function(e,t,r){h(e,t,!0)||l(e,t,r,"deepStrictEqual",_.deepStrictEqual)},_.notDeepEqual=function(e,t,r){h(e,t,!1)&&l(e,t,r,"notDeepEqual",_.notDeepEqual)},_.notDeepStrictEqual=function e(t,r,n){h(t,r,!0)&&l(t,r,n,"notDeepStrictEqual",e)},_.strictEqual=function(e,t,r){e!==t&&l(e,t,r,"===",_.strictEqual)},_.notStrictEqual=function(e,t,r){e===t&&l(e,t,r,"!==",_.notStrictEqual)},_.throws=function(e,t,r){y(!0,e,t,r)},_.doesNotThrow=function(e,t,r){y(!1,e,t,r)},_.ifError=function(e){if(e)throw e};var T=Object.keys||function(e){var t=[];for(var r in e)m.call(e,r)&&t.push(r);return t}}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":7}],3:[function(e,t,r){},{}],4:[function(e,t,r){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(){y&&p&&(y=!1,p.length?f=p.concat(f):g=-1,f.length&&s())}function s(){if(!y){var e=a(o);y=!0;for(var t=f.length;t;){for(p=f,f=[];++g1)for(var r=1;r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(t)?r.showHidden=t:t&&n._extend(r,t),y(r.showHidden)&&(r.showHidden=!1),y(r.depth)&&(r.depth=2),y(r.colors)&&(r.colors=!1),y(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=a),s(r,e,r.depth)}function a(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function o(e,t){return e}function s(e,t,r){if(e.customInspect&&t&&_(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return f(i)||(i=s(e,i,r)),i}var a=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(f(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return p(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):h(t)?e.stylize("null","null"):void 0}(e,t);if(a)return a;var o=Object.keys(t),m=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),v(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return c(t);if(0===o.length){if(_(t)){var w=t.name?": "+t.name:"";return e.stylize("[Function"+w+"]","special")}if(g(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(b(t))return e.stylize(Date.prototype.toString.call(t),"date");if(v(t))return c(t)}var T,O="",E=!1,x=["{","}"];return l(t)&&(E=!0,x=["[","]"]),_(t)&&(O=" [Function"+(t.name?": "+t.name:"")+"]"),g(t)&&(O=" "+RegExp.prototype.toString.call(t)),b(t)&&(O=" "+Date.prototype.toUTCString.call(t)),v(t)&&(O=" "+c(t)),0!==o.length||E&&0!=t.length?r<0?g(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),T=E?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(T,O,x)):x[0]+O+x[1]}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,t,r,n,i,a){var o,c,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?c=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(c=e.stylize("[Setter]","special")),S(n,i)||(o="["+i+"]"),c||(e.seen.indexOf(u.value)<0?(c=h(r)?s(e,u.value,null):s(e,u.value,r-1)).indexOf("\n")>-1&&(c=a?c.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+c.split("\n").map((function(e){return" "+e})).join("\n")):c=e.stylize("[Circular]","special")),y(o)){if(a&&i.match(/^\d+$/))return c;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+c}function l(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function h(e){return null===e}function p(e){return"number"==typeof e}function f(e){return"string"==typeof e}function y(e){return void 0===e}function g(e){return m(e)&&"[object RegExp]"===w(e)}function m(e){return"object"==typeof e&&null!==e}function b(e){return m(e)&&"[object Date]"===w(e)}function v(e){return m(e)&&("[object Error]"===w(e)||e instanceof Error)}function _(e){return"function"==typeof e}function w(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var O=/%[sdj%]/g;n.format=function(e){if(!f(e)){for(var t=[],r=0;r=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return 1},a=Object.create(Le.prototype);return o(a),M(a,Object.create(Be.prototype),e,t,r,n,i),a}function o(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function s(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function c(e){return void 0!==e._reader}function u(e){return new Promise((function(t,r){var n={_resolve:t,_reject:r};e._reader._readIntoRequests.push(n)}))}function l(e){return new Promise((function(t,r){var n={_resolve:t,_reject:r};e._reader._readRequests.push(n)}))}function d(e,t){return e._disturbed=!0,"closed"===e._state?Promise.resolve(void 0):"errored"===e._state?Promise.reject(e._storedError):(h(e),e._readableStreamController[Ce](t).then((function(){})))}function h(e){e._state="closed";var t=e._reader;if(void 0!==t){if(!0===_(t)){var r=!0,n=!1,i=void 0;try{for(var a,o=t._readRequests[Symbol.iterator]();!(r=(a=o.next()).done);r=!0)(0,a.value._resolve)(de(void 0,!0))}catch(e){n=!0,i=e}finally{try{!r&&o.return&&o.return()}finally{if(n)throw i}}t._readRequests=[]}!function(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(t)}}function p(e,t){e._state="errored",e._storedError=t;var r=e._reader;if(void 0!==r){if(!0===_(r)){var n=!0,i=!1,a=void 0;try{for(var o,s=r._readRequests[Symbol.iterator]();!(n=(o=s.next()).done);n=!0)o.value._reject(t)}catch(e){i=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}r._readRequests=[]}else{var c=!0,u=!1,l=void 0;try{for(var d,h=r._readIntoRequests[Symbol.iterator]();!(c=(d=h.next()).done);c=!0)d.value._reject(t)}catch(e){u=!0,l=e}finally{try{!c&&h.return&&h.return()}finally{if(u)throw l}}r._readIntoRequests=[]}re(r,t),r._closedPromise.catch((function(){}))}}function f(e,t,r){e._reader._readRequests.shift()._resolve(de(t,r))}function y(e){return e._reader._readIntoRequests.length}function g(e){return e._reader._readRequests.length}function m(e){var t=e._reader;return void 0!==t&&!1!==v(t)}function b(e){var t=e._reader;return void 0!==t&&!1!==_(t)}function v(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function _(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function w(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?function(e){e._closedPromise=new Promise((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}(e):"closed"===t._state?function(e){e._closedPromise=Promise.resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(e):(function(e,t){e._closedPromise=Promise.reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(e,t._storedError),e._closedPromise.catch((function(){})))}function T(e,t){return d(e._ownerReadableStream,t)}function S(e){"readable"===e._ownerReadableStream._state?re(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){e._closedPromise=Promise.reject(t)}(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._closedPromise.catch((function(){})),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function O(e,t){var r=e._ownerReadableStream;return r._disturbed=!0,"errored"===r._state?Promise.reject(r._storedError):function(e,t){var r=e._controlledReadableByteStream,n=1;t.constructor!==DataView&&(n=t.constructor.BYTES_PER_ELEMENT);var i=t.constructor,a={buffer:ye(t.buffer),byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:n,ctor:i,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(a),u(r);if("closed"===r._state){var o=new t.constructor(a.buffer,a.byteOffset,0);return Promise.resolve(de(o,!0))}if(e._queueTotalSize>0){if(!0===Q(e,a)){var s=q(a);return H(e),Promise.resolve(de(s,!1))}if(!0===e._closeRequested){var c=new TypeError("Insufficient bytes to fill elements in the given buffer");return J(e,c),Promise.reject(c)}}e._pendingPullIntos.push(a);var l=u(r);return F(e),l}(r._readableStreamController,t)}function E(e){var t=e._ownerReadableStream;return t._disturbed=!0,"closed"===t._state?Promise.resolve(de(void 0,!0)):"errored"===t._state?Promise.reject(t._storedError):t._readableStreamController[Me]()}function x(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function A(e){!1!==R(e)&&(!0!==e._pulling?(e._pulling=!0,e._pullAlgorithm().then((function(){if(e._pulling=!1,!0===e._pullAgain)return e._pullAgain=!1,A(e)}),(function(t){D(e,t)})).catch(_e)):e._pullAgain=!0)}function R(e){var t=e._controlledReadableStream;return!1!==C(e)&&!1!==e._started&&(!0===c(t)&&g(t)>0||j(e)>0)}function I(e){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&h(t)}function P(e,t){var r=e._controlledReadableStream;if(!0===c(r)&&g(r)>0)f(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(t){throw D(e,t),t}try{Se(e,t,n)}catch(t){throw D(e,t),t}}A(e)}function N(e,t){var r=e._controlledReadableStream;Oe(e),p(r,t)}function D(e,t){"readable"===e._controlledReadableStream._state&&N(e,t)}function j(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function C(e){var t=e._controlledReadableStream._state;return!1===e._closeRequested&&"readable"===t}function M(e,t,r,n,i,a,o){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Oe(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=o,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t;var s=r();Promise.resolve(s).then((function(){t._started=!0,A(t)}),(function(e){D(t,e)})).catch(_e)}function L(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function k(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function F(e){!1!==function(e){var t=e._controlledReadableByteStream;return"readable"===t._state&&!0!==e._closeRequested&&!1!==e._started&&(!0===b(t)&&g(t)>0||!0===m(t)&&y(t)>0||W(e)>0)}(e)&&(!0!==e._pulling?(e._pulling=!0,e._pullAlgorithm().then((function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,F(e))}),(function(t){"readable"===e._controlledReadableByteStream._state&&J(e,t)})).catch(_e)):e._pullAgain=!0)}function B(e){G(e),e._pendingPullIntos=[]}function U(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=q(t);"default"===t.readerType?f(e,n,r):function(e,t,r){e._reader._readIntoRequests.shift()._resolve(de(t,r))}(e,n,r)}function q(e){var t=e.bytesFilled,r=e.elementSize;return new e.ctor(e.buffer,e.byteOffset,t/r)}function V(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function Q(e,t){var r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i,o=a-a%r,s=i,c=!1;o>n&&(s=o-t.bytesFilled,c=!0);for(var u=e._queue;s>0;){var l=u[0],d=Math.min(s,l.byteLength),h=t.byteOffset+t.bytesFilled;ue(t.buffer,h,l.buffer,l.byteOffset,d),l.byteLength===d?u.shift():(l.byteOffset+=d,l.byteLength-=d),e._queueTotalSize-=d,$(e,d,t),s-=d}return c}function $(e,t,r){G(e),r.bytesFilled+=t}function H(e){0===e._queueTotalSize&&!0===e._closeRequested?h(e._controlledReadableByteStream):F(e)}function G(e){void 0!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=void 0,e._byobRequest=void 0)}function z(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos[0];!0===Q(e,t)&&(X(e),U(e._controlledReadableByteStream,t))}}function K(e,t){var r=e._pendingPullIntos[0];if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");!function(e,t){t.buffer=ye(t.buffer);var r=e._controlledReadableByteStream;if(!0===m(r))for(;y(r)>0;)U(r,X(e))}(e,r)}else!function(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if($(e,t,r),!(r.bytesFilled0){var i=r.byteOffset+r.bytesFilled,a=r.buffer.slice(i-n,i);V(e,a,0,a.byteLength)}r.buffer=ye(r.buffer),r.bytesFilled-=n,U(e._controlledReadableByteStream,r),z(e)}}(e,t,r)}function X(e){var t=e._pendingPullIntos.shift();return G(e),t}function J(e,t){var r=e._controlledReadableByteStream;B(e),Oe(e),p(r,t)}function W(e){var t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Y(e,t,r,n,i,a,o){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,B(t),t._queue=t._queueTotalSize=void 0,Oe(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=ge(a),t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=o,t._pendingPullIntos=[],e._readableStreamController=t;var s=r();Promise.resolve(s).then((function(){t._started=!0,F(t)}),(function(r){"readable"===e._state&&J(t,r)})).catch(_e)}function Z(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}function ee(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function te(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}function re(e,t){e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function ne(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}function ie(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function ae(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function oe(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}var se=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,a=r.highWaterMark;n(this,e),o(this);var s=t.type;if("bytes"===String(s)){if(void 0===a&&(a=0),a=ge(a),void 0!==i)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(e,t,r){var n=Object.create(qe.prototype),i=le(t,"pull",0,[n]),a=le(t,"cancel",1,[]),o=t.autoAllocateChunkSize;if(void 0!==o&&(!1===Number.isInteger(o)||o<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");Y(e,n,(function(){return pe(t,"start",[n])}),i,a,r,o)}(this,t,a)}else{if(void 0!==s)throw new RangeError("Invalid type is specified");void 0===a&&(a=1),function(e,t,r,n){var i=Object.create(Be.prototype),a=le(t,"pull",0,[i]),o=le(t,"cancel",1,[]);M(e,i,(function(){return pe(t,"start",[i])}),a,o,r,n)}(this,t,a=ge(a),me(i))}}return se(e,[{key:"cancel",value:function(e){return!1===s(this)?Promise.reject(Z("cancel")):!0===c(this)?Promise.reject(new TypeError("Cannot cancel a stream that already has a reader")):d(this,e)}},{key:"getReader",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mode;if(!1===s(this))throw Z("getReader");if(void 0===e)return i(this);if("byob"===(e=String(e)))return function(e){return new Fe(e)}(this);throw new RangeError("Invalid mode is specified")}},{key:"pipeThrough",value:function(e,t){var r=e.writable,n=e.readable;if(void 0===r||void 0===n)throw new TypeError("readable and writable arguments must be defined");return function(e){try{Promise.prototype.then.call(e,void 0,(function(){}))}catch(e){}}(this.pipeTo(r,t)),n}},{key:"pipeTo",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.preventClose,a=r.preventAbort,o=r.preventCancel;if(!1===s(this))return Promise.reject(Z("pipeTo"));if(!1===Ae(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));if(n=Boolean(n),a=Boolean(a),o=Boolean(o),!0===c(this))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"));if(!0===Re(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"));var u=i(this),l=xe(e),h=!1,p=Promise.resolve();return new Promise((function(r,i){function s(){var e=p;return p.then((function(){return e!==p?s():void 0}))}function c(e,t,r){"errored"===e._state?r(e._storedError):t.catch(r).catch(_e)}function f(t,r,n){function i(){t().then((function(){return g(r,n)}),(function(e){return g(!0,e)})).catch(_e)}!0!==h&&(h=!0,"writable"===e._state&&!1===je(e)?s().then(i):i())}function y(t,r){!0!==h&&(h=!0,"writable"===e._state&&!1===je(e)?s().then((function(){return g(t,r)})).catch(_e):g(t,r))}function g(e,t){Ne(l),S(u),e?i(t):r(void 0)}if(c(t,u._closedPromise,(function(t){!1===a?f((function(){return Ie(e,t)}),!0,t):y(!0,t)})),c(e,l._closedPromise,(function(e){!1===o?f((function(){return d(t,e)}),!0,e):y(!0,e)})),function(e,t,r){"closed"===e._state?r():t.then(r).catch(_e)}(t,u._closedPromise,(function(){!1===n?f((function(){return Pe(l)})):y()})),!0===je(e)||"closed"===e._state){var m=new TypeError("the destination writable stream closed before all data could be piped to it");!1===o?f((function(){return d(t,m)}),!0,m):y(!0,m)}(function e(){return!0===h?Promise.resolve():l._readyPromise.then((function(){return E(u).then((function(e){var t=e.value;!0!==e.done&&(p=De(l,t).catch((function(){})))}))})).then(e)})().catch((function(e){p=Promise.resolve(),_e(e)}))}))}},{key:"tee",value:function(){if(!1===s(this))throw Z("tee");var e=function(e,t){function r(){return E(o).then((function(e){var t=e.value;if(!0===e.done&&!1===s&&(!1===c&&I(p._readableStreamController),!1===u&&I(f._readableStreamController),s=!0),!0!==s){var r=t,n=t;!1===c&&P(p._readableStreamController,r),!1===u&&P(f._readableStreamController,n)}}))}function n(){}var o=i(e),s=!1,c=!1,u=!1,l=void 0,h=void 0,p=void 0,f=void 0,y=void 0,g=new Promise((function(e){y=e}));return p=a(n,r,(function(t){if(c=!0,l=t,!0===u){var r=be([l,h]),n=d(e,r);y(n)}return g})),f=a(n,r,(function(t){if(u=!0,h=t,!0===c){var r=be([l,h]),n=d(e,r);y(n)}return g})),o._closedPromise.catch((function(e){!0!==s&&(D(p._readableStreamController,e),D(f._readableStreamController,e),s=!0)})),[p,f]}(this);return be(e)}},{key:"locked",get:function(){if(!1===s(this))throw Z("locked");return c(this)}}]),e}();t.exports={CreateReadableByteStream:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,a=Object.create(Le.prototype);return o(a),Y(a,Object.create(qe.prototype),e,t,r,n,i),a},CreateReadableStream:a,ReadableStream:Le,IsReadableStreamDisturbed:function(e){return e._disturbed},ReadableStreamDefaultControllerClose:I,ReadableStreamDefaultControllerEnqueue:P,ReadableStreamDefaultControllerError:N,ReadableStreamDefaultControllerGetDesiredSize:j,ReadableStreamDefaultControllerHasBackpressure:function(e){return!0!==R(e)},ReadableStreamDefaultControllerCanCloseOrEnqueue:C};var ke=function(){function e(t){if(n(this,e),!1===s(t))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===c(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");w(this,t),this._readRequests=[]}return se(e,[{key:"cancel",value:function(e){return!1===_(this)?Promise.reject(te("cancel")):void 0===this._ownerReadableStream?Promise.reject(ee("cancel")):T(this,e)}},{key:"read",value:function(){return!1===_(this)?Promise.reject(te("read")):void 0===this._ownerReadableStream?Promise.reject(ee("read from")):E(this)}},{key:"releaseLock",value:function(){if(!1===_(this))throw te("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");S(this)}}},{key:"closed",get:function(){return!1===_(this)?Promise.reject(te("closed")):this._closedPromise}}]),e}(),Fe=function(){function e(t){if(n(this,e),!s(t))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===L(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(c(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");w(this,t),this._readIntoRequests=[]}return se(e,[{key:"cancel",value:function(e){return v(this)?void 0===this._ownerReadableStream?Promise.reject(ee("cancel")):T(this,e):Promise.reject(ne("cancel"))}},{key:"read",value:function(e){return v(this)?void 0===this._ownerReadableStream?Promise.reject(ee("read from")):ArrayBuffer.isView(e)?!0===fe(e.buffer)?Promise.reject(new TypeError("Cannot read into a view onto a detached ArrayBuffer")):0===e.byteLength?Promise.reject(new TypeError("view must have non-zero byteLength")):O(this,e):Promise.reject(new TypeError("view must be an array buffer view")):Promise.reject(ne("read"))}},{key:"releaseLock",value:function(){if(!v(this))throw ne("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");S(this)}}},{key:"closed",get:function(){return v(this)?this._closedPromise:Promise.reject(ne("closed"))}}]),e}(),Be=function(){function e(){throw n(this,e),new TypeError}return se(e,[{key:"close",value:function(){if(!1===x(this))throw ie("close");if(!1===C(this))throw new TypeError("The stream is not in a state that permits close");I(this)}},{key:"enqueue",value:function(e){if(!1===x(this))throw ie("enqueue");if(!1===C(this))throw new TypeError("The stream is not in a state that permits enqueue");return P(this,e)}},{key:"error",value:function(e){if(!1===x(this))throw ie("error");var t=this._controlledReadableStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");N(this,e)}},{key:Ce,value:function(e){return Oe(this),this._cancelAlgorithm(e)}},{key:Me,value:function(){var e=this._controlledReadableStream;if(this._queue.length>0){var t=Te(this);return!0===this._closeRequested&&0===this._queue.length?h(e):A(this),Promise.resolve(de(t,!1))}var r=l(e);return A(this),r}},{key:"desiredSize",get:function(){if(!1===x(this))throw ie("desiredSize");return j(this)}}]),e}(),Ue=function(){function e(){throw n(this,e),new TypeError("ReadableStreamBYOBRequest cannot be used directly")}return se(e,[{key:"respond",value:function(e){if(!1===k(this))throw ae("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!0===fe(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");!function(e,t){if(t=Number(t),!1===he(t))throw new RangeError("bytesWritten must be a finite");K(e,t)}(this._associatedReadableByteStreamController,e)}},{key:"respondWithNewView",value:function(e){if(!1===k(this))throw ae("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(!0===fe(e.buffer))throw new TypeError("The supplied view's buffer has been detached and so cannot be used as a response");!function(e,t){var r=e._pendingPullIntos[0];if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,K(e,t.byteLength)}(this._associatedReadableByteStreamController,e)}},{key:"view",get:function(){if(!1===k(this))throw ae("view");return this._view}}]),e}(),qe=function(){function e(){throw n(this,e),new TypeError("ReadableByteStreamController constructor cannot be used directly")}return se(e,[{key:"close",value:function(){if(!1===L(this))throw oe("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");!function(e){var t=e._controlledReadableByteStream;if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0&&e._pendingPullIntos[0].bytesFilled>0){var r=new TypeError("Insufficient bytes to fill elements in the given buffer");throw J(e,r),r}h(t)}}(this)}},{key:"enqueue",value:function(e){if(!1===L(this))throw oe("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(e))throw new TypeError("You can only enqueue array buffer views when using a ReadableByteStreamController");if(!0===fe(e.buffer))throw new TypeError("Cannot enqueue a view onto a detached ArrayBuffer");!function(e,t){var r=e._controlledReadableByteStream,n=t.buffer,i=t.byteOffset,a=t.byteLength,o=ye(n);!0===b(r)?0===g(r)?V(e,o,i,a):f(r,new Uint8Array(o,i,a),!1):!0===m(r)?(V(e,o,i,a),z(e)):V(e,o,i,a)}(this,e)}},{key:"error",value:function(e){if(!1===L(this))throw oe("error");var t=this._controlledReadableByteStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");J(this,e)}},{key:Ce,value:function(e){return this._pendingPullIntos.length>0&&(this._pendingPullIntos[0].bytesFilled=0),Oe(this),this._cancelAlgorithm(e)}},{key:Me,value:function(){var e=this._controlledReadableByteStream;if(this._queueTotalSize>0){var t=this._queue.shift();this._queueTotalSize-=t.byteLength,H(this);var r=void 0;try{r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}catch(e){return Promise.reject(e)}return Promise.resolve(de(r,!1))}var n=this._autoAllocateChunkSize;if(void 0!==n){var i=void 0;try{i=new ArrayBuffer(n)}catch(e){return Promise.reject(e)}var a={buffer:i,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(a)}var o=l(e);return F(this),o}},{key:"byobRequest",get:function(){if(!1===L(this))throw oe("byobRequest");if(void 0===this._byobRequest&&this._pendingPullIntos.length>0){var e=this._pendingPullIntos[0],t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled),r=Object.create(Ue.prototype);(function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r})(r,this,t),this._byobRequest=r}return this._byobRequest}},{key:"desiredSize",get:function(){if(!1===L(this))throw oe("desiredSize");return W(this)}}]),e}()},{"./helpers.js":10,"./queue-with-sizes.js":11,"./utils.js":14,"./writable-stream.js":15,"better-assert":16}],13:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,r,n,i,a){function u(){return t}e._writable=D(u,(function(t){return function(e,t){y("TransformStreamDefaultSinkWriteAlgorithm()");var r=e._transformStreamController;return!0===e._backpressure?e._backpressureChangePromise.then((function(){var n=e._writable;if("erroring"===n._state)throw n._storedError;return r._transformAlgorithm(t)})):r._transformAlgorithm(t)}(e,t)}),(function(){return function(e){y("TransformStreamDefaultSinkCloseAlgorithm()");var t=e._readable;return e._transformStreamController._flushAlgorithm().then((function(){if("errored"===t._state)throw t._storedError;var e=t._readableStreamController;!0===P(e)&&E(e)})).catch((function(r){throw o(e,r),t._storedError}))}(e)}),(function(){return function(e){return o(e,new TypeError("Writable side aborted")),Promise.resolve()}(e)}),r,n),e._readable=O(u,(function(){return function(e){return y("TransformStreamDefaultSourcePullAlgorithm()"),c(e,!1),e._backpressureChangePromise}(e)}),(function(t){return s(e,t),Promise.resolve()}),i,a),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,c(e,!0),e._transformStreamController=void 0}function a(e){return!!_(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function o(e,t){y("TransformStreamError()"),"readable"===e._readable._state&&A(e._readable._readableStreamController,t),s(e,t)}function s(e,t){j(e._writable._writableStreamController,t),!0===e._backpressure&&c(e,!1)}function c(e,t){y("TransformStreamSetBackpressure() [backpressure = "+t+"]"),void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=new Promise((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}function u(e){return!!_(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function l(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}function d(e,t){y("TransformStreamDefaultControllerEnqueue()");var r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!1===P(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{x(n,t)}catch(e){throw s(r,e),r._readable._storedError}I(n)!==r._backpressure&&c(r,!0)}function h(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function p(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}var f=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(n(this,e),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var s=r.size,c=T(s),u=r.highWaterMark;void 0===u&&(u=1),u=w(u);var h=a.size,p=T(h),f=a.highWaterMark;void 0===f&&(f=0),f=w(f);var y=void 0;i(this,new Promise((function(e){y=e})),u,c,f,p),function(e,t){var r=Object.create(M.prototype),n=function(e){try{return d(r,e),Promise.resolve()}catch(e){return Promise.reject(e)}},i=t.transform;if(void 0!==i){if("function"!=typeof i)throw new TypeError("transform is not a method");n=function(n){return v(i,t,[n,r]).catch((function(t){throw o(e,t),t}))}}var a=b(t,"flush",0,[r]);l(e,r,n,a)}(this,t);var g=m(t,"start",[this._transformStreamController]);y(g)}return f(e,[{key:"readable",get:function(){if(!1===a(this))throw p("readable");return this._readable}},{key:"writable",get:function(){if(!1===a(this))throw p("writable");return this._writable}}]),e}(),M=function(){function e(){throw n(this,e),new TypeError("TransformStreamDefaultController instances cannot be created directly")}return f(e,[{key:"enqueue",value:function(e){if(!1===u(this))throw h("enqueue");d(this,e)}},{key:"error",value:function(e){if(!1===u(this))throw h("error");!function(e,t){o(e._controlledTransformStream,t)}(this,e)}},{key:"terminate",value:function(){if(!1===u(this))throw h("terminate");!function(e){y("TransformStreamDefaultControllerTerminate()");var t=e._controlledTransformStream,r=t._readable._readableStreamController;!0===P(r)&&E(r),s(t,new TypeError("TransformStream terminated"))}(this)}},{key:"desiredSize",get:function(){if(!1===u(this))throw h("desiredSize");var e=this._controlledTransformStream._readable._readableStreamController;return R(e)}}]),e}();t.exports={CreateTransformStream:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return 1},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){return 1},c=Object.create(C.prototype),u=void 0;i(c,new Promise((function(e){u=e})),n,a,o,s),l(c,Object.create(M.prototype),t,r);var d=e();return u(d),c},TransformStream:C}},{"./helpers.js":10,"./readable-stream.js":12,"./writable-stream.js":15,"better-assert":16,debug:18}],14:[function(e,t,r){"use strict";var n=e("better-assert");r.rethrowAssertionErrorRejection=function(e){e&&e.constructor===n.AssertionError&&setTimeout((function(){throw e}),0)}},{"better-assert":16}],15:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return new Y(e)}function a(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=[],e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function o(e){return!!V(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function s(e){return void 0!==e._writer}function c(e,t){var r=e._state;if("closed"===r)return Promise.resolve(void 0);if("errored"===r)return Promise.reject(e._storedError);var n=new TypeError("Requested to abort");if(void 0!==e._pendingAbortRequest)return Promise.reject(n);var i=!1;"erroring"===r&&(i=!0,t=void 0);var a=new Promise((function(r,n){e._pendingAbortRequest={_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:i}}));return!1===i&&l(e,n),a}function u(e,t){L("WritableStreamDealWithRejection(stream, %o)",t),"writable"!==e._state?d(e):l(e,t)}function l(e,t){L("WritableStreamStartErroring(stream, %o)",t);var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&b(n,t),!1===function(e){return void 0===e._inFlightWriteRequest&&void 0===e._inFlightCloseRequest?(L("WritableStreamHasOperationMarkedInFlight() is false"),!1):(L("WritableStreamHasOperationMarkedInFlight() is true"),!0)}(e)&&!0===r._started&&d(e)}function d(e){L("WritableStreamFinishErroring()"),e._state="errored",e._writableStreamController[J]();var t=e._storedError,r=!0,n=!1,i=void 0;try{for(var a,o=e._writeRequests[Symbol.iterator]();!(r=(a=o.next()).done);r=!0)a.value._reject(t)}catch(e){n=!0,i=e}finally{try{!r&&o.return&&o.return()}finally{if(n)throw i}}if(e._writeRequests=[],void 0!==e._pendingAbortRequest){var s=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,!0===s._wasAlreadyErroring)return s._reject(t),void p(e);e._writableStreamController[X](s._reason).then((function(){s._resolve(),p(e)}),(function(t){s._reject(t),p(e)}))}else p(e)}function h(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function p(e){L("WritableStreamRejectCloseAndClosedPromiseIfNeeded()"),void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&(N(t,e._storedError),t._closedPromise.catch((function(){})))}function f(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(!0===t?function(e){L("defaultWriterReadyPromiseReset()"),e._readyPromise=new Promise((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}(r):C(r)),e._backpressure=t}function y(e){return!!V(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function g(e){var t=e._ownerWritableStream,r=t._state;if("closed"===r||"errored"===r)return Promise.reject(new TypeError("The stream (in "+r+" state) is not in the writable state and cannot be closed"));var n=new Promise((function(e,r){var n={_resolve:e,_reject:r};t._closeRequest=n}));return!0===t._backpressure&&"writable"===r&&C(e),function(e){G(e,"close",0),S(e)}(t._writableStreamController),n}function m(e,t){"pending"===e._closedPromiseState?N(e,t):function(e,t){e._closedPromise=Promise.reject(t),e._closedPromiseState="rejected"}(e,t),e._closedPromise.catch((function(){}))}function b(e,t){L("WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, %o)",t),"pending"===e._readyPromiseState?function(e,t){L("defaultWriterReadyPromiseReject(writer, %o)",t),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}(e,t):function(e,t){L("defaultWriterReadyPromiseResetToRejected(writer, %o)",t),e._readyPromise=Promise.reject(t),e._readyPromiseState="rejected"}(e,t),e._readyPromise.catch((function(){}))}function v(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");b(e,r),m(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function _(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,i=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return O(e,t),1}}(n,t);if(r!==e._ownerWritableStream)return Promise.reject(I("write to"));var a=r._state;if("errored"===a)return Promise.reject(r._storedError);if(!0===h(r)||"closed"===a)return Promise.reject(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===a)return Promise.reject(r._storedError);var o=function(e){return new Promise((function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}(r);return function(e,t,r){var n={chunk:t};try{G(e,n,r)}catch(t){return void O(e,t)}var i=e._controlledWritableStream;!1===h(i)&&"writable"===i._state&&f(i,E(e)),S(e)}(n,t,i),o}function w(e,t,r,n,i,a,o,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,K(t),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=o,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=a;var c=E(t);f(e,c);var l=r();Promise.resolve(l).then((function(){t._started=!0,S(t)}),(function(r){t._started=!0,u(e,r)})).catch(Q)}function T(e){return e._strategyHWM-e._queueTotalSize}function S(e){L("WritableStreamDefaultControllerAdvanceQueueIfNeeded()");var t=e._controlledWritableStream;if(!1!==e._started&&void 0===t._inFlightWriteRequest){var r=t._state;if("closed"!==r&&"errored"!==r)if("erroring"!==r){if(0!==e._queue.length){var n=z(e);"close"===n?function(e){var t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),H(e),e._closeAlgorithm().then((function(){!function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var t=e._writer;void 0!==t&&function(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}(t)}(t)}),(function(e){!function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),u(e,t)}(t,e)})).catch(Q)}(e):function(e,t){var r=e._controlledWritableStream;(function(e){e._inFlightWriteRequest=e._writeRequests.shift()})(r),e._writeAlgorithm(t).then((function(){!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);var t=r._state;if(H(e),!1===h(r)&&"writable"===t){var n=E(e);f(r,n)}S(e)}),(function(e){!function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,u(e,t)}(r,e)})).catch(Q)}(e,n.chunk)}}else d(t)}}function O(e,t){"writable"===e._controlledWritableStream._state&&x(e,t)}function E(e){return T(e)<=0}function x(e,t){l(e._controlledWritableStream,t)}function A(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function R(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function I(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function P(e){e._closedPromise=new Promise((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function N(e,t){e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}function D(e,t){L("defaultWriterReadyPromiseInitializeAsRejected(writer, %o)",t),e._readyPromise=Promise.reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}function j(e){L("defaultWriterReadyPromiseInitializeAsResolved()"),e._readyPromise=Promise.resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}function C(e){L("defaultWriterReadyPromiseResolve()"),e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}var M=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,o=r.highWaterMark,s=void 0===o?1:o;if(n(this,e),a(this),void 0!==t.type)throw new RangeError("Invalid type is specified");var c=q(i);!function(e,t,r,n){var i=Object.create(Z.prototype),a=F(t,"write",1,[i]),o=F(t,"close",0,[]),s=F(t,"abort",1,[]);w(e,i,(function(){return B(t,"start",[i])}),a,o,s,r,n)}(this,t,s=U(s),c)}return M(e,[{key:"abort",value:function(e){return!1===o(this)?Promise.reject(A("abort")):!0===s(this)?Promise.reject(new TypeError("Cannot abort a stream that already has a writer")):c(this,e)}},{key:"getWriter",value:function(){if(!1===o(this))throw A("getWriter");return i(this)}},{key:"locked",get:function(){if(!1===o(this))throw A("locked");return s(this)}}]),e}();t.exports={AcquireWritableStreamDefaultWriter:i,CreateWritableStream:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){return 1},s=Object.create(W.prototype);return a(s),w(s,Object.create(Z.prototype),e,t,r,n,i,o),s},IsWritableStream:o,IsWritableStreamLocked:s,WritableStream:W,WritableStreamAbort:c,WritableStreamDefaultControllerErrorIfNeeded:O,WritableStreamDefaultWriterCloseWithErrorPropagation:function(e){var t=e._ownerWritableStream,r=t._state;return!0===h(t)||"closed"===r?Promise.resolve():"errored"===r?Promise.reject(t._storedError):g(e)},WritableStreamDefaultWriterRelease:v,WritableStreamDefaultWriterWrite:_,WritableStreamCloseQueuedOrInFlight:h};var Y=function(){function e(t){if(n(this,e),!1===o(t))throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===s(t))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=t,t._writer=this;var r=t._state;if("writable"===r)!1===h(t)&&!0===t._backpressure?function(e){L("defaultWriterReadyPromiseInitialize()"),e._readyPromise=new Promise((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}(this):j(this),P(this);else if("erroring"===r)D(this,t._storedError),this._readyPromise.catch((function(){})),P(this);else if("closed"===r)j(this),function(e){e._closedPromise=Promise.resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}(this);else{var i=t._storedError;D(this,i),this._readyPromise.catch((function(){})),function(e,t){e._closedPromise=Promise.reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}(this,i),this._closedPromise.catch((function(){}))}}return M(e,[{key:"abort",value:function(e){return!1===y(this)?Promise.reject(R("abort")):void 0===this._ownerWritableStream?Promise.reject(I("abort")):function(e,t){return c(e._ownerWritableStream,t)}(this,e)}},{key:"close",value:function(){if(!1===y(this))return Promise.reject(R("close"));var e=this._ownerWritableStream;return void 0===e?Promise.reject(I("close")):!0===h(e)?Promise.reject(new TypeError("cannot close an already-closing stream")):g(this)}},{key:"releaseLock",value:function(){if(!1===y(this))throw R("releaseLock");void 0!==this._ownerWritableStream&&v(this)}},{key:"write",value:function(e){return!1===y(this)?Promise.reject(R("write")):void 0===this._ownerWritableStream?Promise.reject(I("write to")):_(this,e)}},{key:"closed",get:function(){return!1===y(this)?Promise.reject(R("closed")):this._closedPromise}},{key:"desiredSize",get:function(){if(!1===y(this))throw R("desiredSize");if(void 0===this._ownerWritableStream)throw I("desiredSize");return e=this._ownerWritableStream,"errored"===(t=e._state)||"erroring"===t?null:"closed"===t?0:T(e._writableStreamController);var e,t}},{key:"ready",get:function(){return!1===y(this)?Promise.reject(R("ready")):this._readyPromise}}]),e}(),Z=function(){function e(){throw n(this,e),new TypeError("WritableStreamDefaultController cannot be constructed explicitly")}return M(e,[{key:"error",value:function(e){if(!1===function(e){return!!V(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&x(this,e)}},{key:X,value:function(e){return this._abortAlgorithm(e)}},{key:J,value:function(){K(this)}}]),e}()},{"./helpers.js":10,"./queue-with-sizes.js":11,"./utils.js":14,"better-assert":16,debug:18}],16:[function(e,t,r){(function(r){var n=e("assert").AssertionError,i=e("callsite"),a=e("fs");t.exports=r.env.NO_ASSERT?function(){}:function(e){if(!e){var t=i(),r=t[1],o=r.getFileName(),s=r.getLineNumber(),c=(c=a.readFileSync(o,"utf8")).split("\n")[s-1].match(/assert\((.*)\)/)[1];throw new n({message:c,stackStartFunction:t[0].getFunction()})}}}).call(this,e("_process"))},{_process:4,assert:2,callsite:17,fs:3}],17:[function(e,t,r){t.exports=function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};var t=new Error;Error.captureStackTrace(t,arguments.callee);var r=t.stack;return Error.prepareStackTrace=e,r}},{}],18:[function(e,t,r){(function(n){function i(){var e;try{e=r.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}(r=t.exports=e("./debug")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,a=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(a=i))})),e.splice(a,0,n)}},r.save=function(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(e){}},r.load=i,r.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},r.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(i())}).call(this,e("_process"))},{"./debug":19,_process:4}],19:[function(e,t,r){function n(e){function t(){if(t.enabled){var e=t,i=+new Date,a=i-(n||i);e.diff=a,e.prev=n,e.curr=i,n=i;for(var o=new Array(arguments.length),s=0;s100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*d;case"days":case"day":case"d":return r*l;case"hours":case"hour":case"hrs":case"hr":case"h":return r*u;case"minutes":case"minute":case"mins":case"min":case"m":return r*c;case"seconds":case"second":case"secs":case"sec":case"s":return r*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function i(e){return e>=l?Math.round(e/l)+"d":e>=u?Math.round(e/u)+"h":e>=c?Math.round(e/c)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function a(e){return o(e,l,"day")||o(e,u,"hour")||o(e,c,"minute")||o(e,s,"second")||e+" ms"}function o(e,t,r){if(!(e0)return n(e);if("number"===r&&!1===isNaN(e))return t.long?a(e):i(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}]},{},[1])(1)},94824:(e,t)=>{"use strict";function r(e){return e>=65&&e<=90||e>=97&&e<=122||58===e||95===e||8204===e||8205===e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}Object.defineProperty(t,"__esModule",{value:!0}),t.CHAR="\t\n\r -퟿-�𐀀-􏿿",t.S=" \t\r\n",t.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",t.NAME_CHAR="-"+t.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",t.CHAR_RE=new RegExp("^["+t.CHAR+"]$","u"),t.S_RE=new RegExp("^["+t.S+"]+$","u"),t.NAME_START_CHAR_RE=new RegExp("^["+t.NAME_START_CHAR+"]$","u"),t.NAME_CHAR_RE=new RegExp("^["+t.NAME_CHAR+"]$","u"),t.NAME_RE=new RegExp("^["+t.NAME_START_CHAR+"]["+t.NAME_CHAR+"]*$","u"),t.NMTOKEN_RE=new RegExp("^["+t.NAME_CHAR+"]+$","u"),t.S_LIST=[32,10,13,9],t.isChar=function(e){return e>=32&&e<=55295||10===e||13===e||9===e||e>=57344&&e<=65533||e>=65536&&e<=1114111},t.isS=function(e){return 32===e||10===e||13===e||9===e},t.isNameStartChar=r,t.isNameChar=function(e){return r(e)||e>=48&&e<=57||45===e||46===e||183===e||e>=768&&e<=879||e>=8255&&e<=8256}},30718:(e,t)=>{"use strict";function r(e){return e>=65&&e<=90||e>=97&&e<=122||58===e||95===e||8204===e||8205===e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}Object.defineProperty(t,"__esModule",{value:!0}),t.CHAR="-퟿-�𐀀-􏿿",t.RESTRICTED_CHAR="-\b\v\f--„†-Ÿ",t.S=" \t\r\n",t.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",t.NAME_CHAR="-"+t.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",t.CHAR_RE=new RegExp("^["+t.CHAR+"]$","u"),t.RESTRICTED_CHAR_RE=new RegExp("^["+t.RESTRICTED_CHAR+"]$","u"),t.S_RE=new RegExp("^["+t.S+"]+$","u"),t.NAME_START_CHAR_RE=new RegExp("^["+t.NAME_START_CHAR+"]$","u"),t.NAME_CHAR_RE=new RegExp("^["+t.NAME_CHAR+"]$","u"),t.NAME_RE=new RegExp("^["+t.NAME_START_CHAR+"]["+t.NAME_CHAR+"]*$","u"),t.NMTOKEN_RE=new RegExp("^["+t.NAME_CHAR+"]+$","u"),t.S_LIST=[32,10,13,9],t.isChar=function(e){return e>=1&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111},t.isRestrictedChar=function(e){return e>=1&&e<=8||11===e||12===e||e>=14&&e<=31||e>=127&&e<=132||e>=134&&e<=159},t.isCharAndNotRestricted=function(e){return 9===e||10===e||13===e||e>31&&e<127||133===e||e>159&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111},t.isS=function(e){return 32===e||10===e||13===e||9===e},t.isNameStartChar=r,t.isNameChar=function(e){return r(e)||e>=48&&e<=57||45===e||46===e||183===e||e>=768&&e<=879||e>=8255&&e<=8256}},26457:(e,t)=>{"use strict";function r(e){return e>=65&&e<=90||95===e||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}Object.defineProperty(t,"__esModule",{value:!0}),t.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",t.NC_NAME_CHAR="-"+t.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",t.NC_NAME_START_CHAR_RE=new RegExp("^["+t.NC_NAME_START_CHAR+"]$","u"),t.NC_NAME_CHAR_RE=new RegExp("^["+t.NC_NAME_CHAR+"]$","u"),t.NC_NAME_RE=new RegExp("^["+t.NC_NAME_START_CHAR+"]["+t.NC_NAME_CHAR+"]*$","u"),t.isNCNameStartChar=r,t.isNCNameChar=function(e){return r(e)||45===e||46===e||e>=48&&e<=57||183===e||e>=768&&e<=879||e>=8255&&e<=8256}},98634:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var o=a(r(33096)),s=r(3379),c=new Set(["input","option","optgroup","select","button","datalist","textarea"]),u=new Set(["p"]),l=new Set(["thead","tbody"]),d=new Set(["dd","dt"]),h=new Set(["rt","rp"]),p=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",u],["h1",u],["h2",u],["h3",u],["h4",u],["h5",u],["h6",u],["select",c],["input",c],["output",c],["button",c],["datalist",c],["textarea",c],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",d],["dt",d],["address",u],["article",u],["aside",u],["blockquote",u],["details",u],["div",u],["dl",u],["fieldset",u],["figcaption",u],["figure",u],["footer",u],["form",u],["header",u],["hr",u],["main",u],["nav",u],["ol",u],["pre",u],["section",u],["table",u],["ul",u],["rt",h],["rp",h],["tbody",l],["tfoot",l]]),f=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),y=new Set(["math","svg"]),g=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),m=/\s|\//,b=function(){function e(e,t){var r,n,i,a,s,c;void 0===t&&(t={}),this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=e?e:{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=null!==(r=t.lowerCaseTags)&&void 0!==r?r:this.htmlMode,this.lowerCaseAttributeNames=null!==(n=t.lowerCaseAttributeNames)&&void 0!==n?n:this.htmlMode,this.recognizeSelfClosing=null!==(i=t.recognizeSelfClosing)&&void 0!==i?i:!this.htmlMode,this.tokenizer=new(null!==(a=t.Tokenizer)&&void 0!==a?a:o.default)(this.options,this),this.foreignContext=[!this.htmlMode],null===(c=(s=this.cbs).onparserinit)||void 0===c||c.call(s,this)}return e.prototype.ontext=function(e,t){var r,n,i=this.getSlice(e,t);this.endIndex=t-1,null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,i),this.startIndex=t},e.prototype.ontextentity=function(e,t){var r,n;this.endIndex=t-1,null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,(0,s.fromCodePoint)(e)),this.startIndex=t},e.prototype.isVoidElement=function(e){return this.htmlMode&&f.has(e)},e.prototype.onopentagname=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)},e.prototype.emitOpenTag=function(e){var t,r,n,i;this.openTagStart=this.startIndex,this.tagname=e;var a=this.htmlMode&&p.get(e);if(a)for(;this.stack.length>0&&a.has(this.stack[0]);){var o=this.stack.shift();null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,o,!0)}this.isVoidElement(e)||(this.stack.unshift(e),this.htmlMode&&(y.has(e)?this.foreignContext.unshift(!0):g.has(e)&&this.foreignContext.unshift(!1))),null===(i=(n=this.cbs).onopentagname)||void 0===i||i.call(n,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(e){var t,r;this.startIndex=this.openTagStart,this.attribs&&(null===(r=(t=this.cbs).onopentag)||void 0===r||r.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},e.prototype.onclosetag=function(e,t){var r,n,i,a,o,s,c,u;this.endIndex=t;var l=this.getSlice(e,t);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),this.htmlMode&&(y.has(l)||g.has(l))&&this.foreignContext.shift(),this.isVoidElement(l))this.htmlMode&&"br"===l&&(null===(a=(i=this.cbs).onopentagname)||void 0===a||a.call(i,"br"),null===(s=(o=this.cbs).onopentag)||void 0===s||s.call(o,"br",{},!0),null===(u=(c=this.cbs).onclosetag)||void 0===u||u.call(c,"br",!1));else{var d=this.stack.indexOf(l);if(-1!==d)for(var h=0;h<=d;h++){var p=this.stack.shift();null===(n=(r=this.cbs).onclosetag)||void 0===n||n.call(r,p,h!==d)}else this.htmlMode&&"p"===l&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1},e.prototype.onselfclosingtag=function(e){this.endIndex=e,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},e.prototype.closeCurrentTag=function(e){var t,r,n=this.tagname;this.endOpenTag(e),this.stack[0]===n&&(null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,n,!e),this.stack.shift())},e.prototype.onattribname=function(e,t){this.startIndex=e;var r=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(e,t){this.attribvalue+=this.getSlice(e,t)},e.prototype.onattribentity=function(e){this.attribvalue+=(0,s.fromCodePoint)(e)},e.prototype.onattribend=function(e,t){var r,n;this.endIndex=t,null===(n=(r=this.cbs).onattribute)||void 0===n||n.call(r,this.attribname,this.attribvalue,e===o.QuoteType.Double?'"':e===o.QuoteType.Single?"'":e===o.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(m),r=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(n),"!".concat(r))}this.startIndex=t+1},e.prototype.onprocessinginstruction=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(n),"?".concat(r))}this.startIndex=t+1},e.prototype.oncomment=function(e,t,r){var n,i,a,o;this.endIndex=t,null===(i=(n=this.cbs).oncomment)||void 0===i||i.call(n,this.getSlice(e,t-r)),null===(o=(a=this.cbs).oncommentend)||void 0===o||o.call(a),this.startIndex=t+1},e.prototype.oncdata=function(e,t,r){var n,i,a,o,s,c,u,l,d,h;this.endIndex=t;var p=this.getSlice(e,t-r);!this.htmlMode||this.options.recognizeCDATA?(null===(i=(n=this.cbs).oncdatastart)||void 0===i||i.call(n),null===(o=(a=this.cbs).ontext)||void 0===o||o.call(a,p),null===(c=(s=this.cbs).oncdataend)||void 0===c||c.call(s)):(null===(l=(u=this.cbs).oncomment)||void 0===l||l.call(u,"[CDATA[".concat(p,"]]")),null===(h=(d=this.cbs).oncommentend)||void 0===h||h.call(d)),this.startIndex=t+1},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=0;r=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,t-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))},e.prototype.end=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var n,i,a,o=r(3379);function s(e){return e===n.Space||e===n.NewLine||e===n.Tab||e===n.FormFeed||e===n.CarriageReturn}function c(e){return e===n.Slash||e===n.Gt||s(e)}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(n||(n={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"}(i||(i={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(a||(t.QuoteType=a={}));var u={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])},l=function(){function e(e,t){var r=e.xmlMode,n=void 0!==r&&r,a=e.decodeEntities,s=void 0===a||a,c=this;this.cbs=t,this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=i.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=n,this.decodeEntities=s,this.entityDecoder=new o.EntityDecoder(n?o.xmlDecodeTree:o.htmlDecodeTree,(function(e,t){return c.emitCodePoint(e,t)}))}return e.prototype.reset=function(){this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},e.prototype.write=function(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()},e.prototype.end=function(){this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=i.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===n.Amp&&this.startEntity()},e.prototype.stateSpecialStartSequence=function(e){var t=this.sequenceIndex===this.currentSequence.length;if(t?c(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=i.InTagName,this.stateInTagName(e)},e.prototype.stateInSpecialTag=function(e){if(this.sequenceIndex===this.currentSequence.length){if(e===n.Gt||s(e)){var t=this.index-this.currentSequence.length;if(this.sectionStart=n.LowerA&&e<=n.LowerZ||e>=n.UpperA&&e<=n.UpperZ}(e)},e.prototype.startSpecial=function(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=i.SpecialStartSequence},e.prototype.stateBeforeTagName=function(e){if(e===n.ExclamationMark)this.state=i.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===n.Questionmark)this.state=i.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){var t=32|e;this.sectionStart=this.index,this.xmlMode?this.state=i.InTagName:t===u.ScriptEnd[2]?this.state=i.BeforeSpecialS:t===u.TitleEnd[2]?this.state=i.BeforeSpecialT:this.state=i.InTagName}else e===n.Slash?this.state=i.BeforeClosingTagName:(this.state=i.Text,this.stateText(e))},e.prototype.stateInTagName=function(e){c(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateBeforeClosingTagName=function(e){s(e)||(e===n.Gt?this.state=i.Text:(this.state=this.isTagStartChar(e)?i.InClosingTagName:i.InSpecialComment,this.sectionStart=this.index))},e.prototype.stateInClosingTagName=function(e){(e===n.Gt||s(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterClosingTagName,this.stateAfterClosingTagName(e))},e.prototype.stateAfterClosingTagName=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeAttributeName=function(e){e===n.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=i.InSpecialTag,this.sequenceIndex=0):this.state=i.Text,this.sectionStart=this.index+1):e===n.Slash?this.state=i.InSelfClosingTag:s(e)||(this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateInSelfClosingTag=function(e){e===n.Gt?(this.cbs.onselfclosingtag(this.index),this.state=i.Text,this.sectionStart=this.index+1,this.isSpecial=!1):s(e)||(this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateInAttributeName=function(e){(e===n.Eq||c(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=i.AfterAttributeName,this.stateAfterAttributeName(e))},e.prototype.stateAfterAttributeName=function(e){e===n.Eq?this.state=i.BeforeAttributeValue:e===n.Slash||e===n.Gt?(this.cbs.onattribend(a.NoValue,this.sectionStart),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):s(e)||(this.cbs.onattribend(a.NoValue,this.sectionStart),this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateBeforeAttributeValue=function(e){e===n.DoubleQuote?(this.state=i.InAttributeValueDq,this.sectionStart=this.index+1):e===n.SingleQuote?(this.state=i.InAttributeValueSq,this.sectionStart=this.index+1):s(e)||(this.sectionStart=this.index,this.state=i.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))},e.prototype.handleInAttributeValue=function(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===n.DoubleQuote?a.Double:a.Single,this.index+1),this.state=i.BeforeAttributeName):this.decodeEntities&&e===n.Amp&&this.startEntity()},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,n.DoubleQuote)},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,n.SingleQuote)},e.prototype.stateInAttributeValueNoQuotes=function(e){s(e)||e===n.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(a.Unquoted,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===n.Amp&&this.startEntity()},e.prototype.stateBeforeDeclaration=function(e){e===n.OpeningSquareBracket?(this.state=i.CDATASequence,this.sequenceIndex=0):this.state=e===n.Dash?i.BeforeComment:i.InDeclaration},e.prototype.stateInDeclaration=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateInProcessingInstruction=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeComment=function(e){e===n.Dash?(this.state=i.InCommentLike,this.currentSequence=u.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=i.InDeclaration},e.prototype.stateInSpecialComment=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeSpecialS=function(e){var t=32|e;t===u.ScriptEnd[3]?this.startSpecial(u.ScriptEnd,4):t===u.StyleEnd[3]?this.startSpecial(u.StyleEnd,4):(this.state=i.InTagName,this.stateInTagName(e))},e.prototype.stateBeforeSpecialT=function(e){var t=32|e;t===u.TitleEnd[3]?this.startSpecial(u.TitleEnd,4):t===u.TextareaEnd[3]?this.startSpecial(u.TextareaEnd,4):(this.state=i.InTagName,this.stateInTagName(e))},e.prototype.startEntity=function(){this.baseState=this.state,this.state=i.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?o.DecodingMode.Strict:this.baseState===i.Text||this.baseState===i.InSpecialTag?o.DecodingMode.Legacy:o.DecodingMode.Attribute)},e.prototype.stateInEntity=function(){var e=this.entityDecoder.write(this.buffer,this.index-this.offset);e>=0?(this.state=this.baseState,0===e&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1},e.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===i.Text||this.state===i.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==i.InAttributeValueDq&&this.state!==i.InAttributeValueSq&&this.state!==i.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},e.prototype.shouldContinue=function(){return this.index=e||(this.state===i.InCommentLike?this.currentSequence===u.CdataEnd?this.cbs.oncdata(this.sectionStart,e,0):this.cbs.oncomment(this.sectionStart,e,0):this.state===i.InTagName||this.state===i.BeforeAttributeName||this.state===i.BeforeAttributeValue||this.state===i.AfterAttributeName||this.state===i.InAttributeName||this.state===i.InAttributeValueSq||this.state===i.InAttributeValueDq||this.state===i.InAttributeValueNq||this.state===i.InClosingTagName||this.cbs.ontext(this.sectionStart,e))},e.prototype.emitCodePoint=function(e,t){this.baseState!==i.Text&&this.baseState!==i.InSpecialTag?(this.sectionStart{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterator=t.isIterable=t.isSourceExpression=t.isPromise=t.isEventEmitter=t.isFunction=t.range=t.union=t.fromIterable=t.fromIterator=t.fromArray=t.single=t.empty=t.wrap=t.WrappingIterator=t.ClonedIterator=t.UnionIterator=t.MultiTransformIterator=t.SimpleTransformIterator=t.TransformIterator=t.BufferedIterator=t.MappingIterator=t.DESTINATION=t.identity=t.IntegerIterator=t.ArrayIterator=t.SingletonIterator=t.EmptyIterator=t.AsyncIterator=t.DESTROYED=t.ENDED=t.CLOSED=t.CLOSING=t.OPEN=t.INIT=t.setTaskScheduler=t.getTaskScheduler=t.scheduleTask=t.LinkedList=void 0;const n=r(50046),i=r(14241);Object.defineProperty(t,"LinkedList",{enumerable:!0,get:function(){return i.LinkedList}});let a=r(93240).createTaskScheduler();t.scheduleTask=function(e){a(e)},t.getTaskScheduler=function(){return a},t.setTaskScheduler=function(e){a=e},t.INIT=1,t.OPEN=2,t.CLOSING=4,t.CLOSED=8,t.ENDED=16,t.DESTROYED=32;class o extends n.EventEmitter{constructor(e=t.OPEN){super(),this._readable=!1,this._state=e,this.on("newListener",s)}_changeState(e,r=!1){const n=e>this._state&&this._statethis.emit("end"))):this.emit("end"))),n}read(){return null}forEach(e,t){this.on("data",j(e,t))}close(){this._changeState(t.CLOSED)&&this._endAsync()}destroy(e){this.done||this._destroy(e,(t=>{(e=e||t)&&this.emit("error",e),this._end(!0)}))}_destroy(e,t){t()}_end(e=!1){this._changeState(e?t.DESTROYED:t.ENDED)&&(this._readable=!1,this.removeAllListeners("readable"),this.removeAllListeners("data"),this.removeAllListeners("end"))}_endAsync(){a((()=>this._end()))}get readable(){return this._readable}set readable(e){e=Boolean(e)&&!this.done,this._readable!==e&&(this._readable=e,e&&a((()=>this.emit("readable"))))}get closed(){return this._state>=t.CLOSING}get ended(){return this._state===t.ENDED}get destroyed(){return this._state===t.DESTROYED}get done(){return this._state>=t.ENDED}toString(){const e=this._toStringDetails();return`[${this.constructor.name}${e?` ${e}`:""}]`}_toStringDetails(){return""}toArray(e){const t=[],r="number"==typeof(null==e?void 0:e.limit)?e.limit:1/0;return this.ended||r<=0?Promise.resolve(t):new Promise(((e,n)=>{const i=()=>e(t),a=o=>{t.push(o),t.length>=r&&(this.removeListener("error",n),this.removeListener("data",a),this.removeListener("end",i),e(t))};this.on("error",n),this.on("data",a),this.on("end",i)}))}getProperty(e,t){const r=this._properties;if(!t)return r&&r[e];if(r&&e in r)a((()=>t(r[e])));else{let r;(r=this._propertyCallbacks)||(this._propertyCallbacks=r=Object.create(null)),e in r?r[e].push(t):r[e]=[t]}}setProperty(e,t){(this._properties||(this._properties=Object.create(null)))[e]=t;const r=this._propertyCallbacks||{},n=r[e];if(n){for(e in delete r[e],a((()=>{for(const e of n)e(t)})),r)return;delete this._propertyCallbacks}}getProperties(){const e=this._properties,t={};for(const r in e)t[r]=e[r];return t}setProperties(e){for(const t in e)this.setProperty(t,e[t])}copyProperties(e,t){for(const r of t)e.getProperty(r,(e=>this.setProperty(r,e)))}transform(e){return new O(this,e)}map(e,t){return new y(this,j(e,t))}filter(e,t){return this.map((function(r){return e.call(t||this,r)?r:null}))}uniq(e=f){const t=new Set;return this.filter((function(r){const n=e.call(this,r);return!t.has(n)&&(t.add(n),!0)}))}prepend(e){return this.transform({prepend:e})}append(e){return this.transform({append:e})}surround(e,t){return this.transform({prepend:e,append:t})}skip(e){return this.map((t=>e-- >0?null:t))}take(e){return this.transform({limit:e})}range(e,t){return this.transform({offset:e,limit:Math.max(t-e+1,0)})}clone(){return new A(this)}[Symbol.asyncIterator](){const e=this;let t=null,r=null,n=null;function i(){if(null!==t)if(null!==n)a(n);else if(e.done)t({done:!0,value:void 0}),t=r=null,o();else{const n=e.read();null!==n&&(t({done:!1,value:n}),t=r=null)}}function a(e){null!==r?(r(e),t=r=n=null,o()):null===n&&(n=e)}function o(){e.removeListener("readable",i),e.removeListener("end",i),e.removeListener("error",a)}return e.addListener("readable",i),e.addListener("end",i),e.addListener("error",a),{next:()=>new Promise(((e,n)=>{t=e,r=n,i()}))}}}function s(e){"data"===e&&(this.removeListener("newListener",s),u(this,"readable",c),this.readable&&a((()=>c.call(this))))}function c(){let e;for(;0!==this.listenerCount("data")&&null!==(e=this.read());)this.emit("data",e);0!==this.listenerCount("data")||this.done||(this.removeListener("readable",c),u(this,"newListener",s))}function u(e,t,r){e.listeners(t).includes(r)||e.on(t,r)}t.AsyncIterator=o;class l extends o{constructor(){super(),this._changeState(t.ENDED,!0)}}t.EmptyIterator=l;class d extends o{constructor(e){super(),this._item=e,null===e?this.close():this.readable=!0}read(){const e=this._item;return this._item=null,this.close(),e}_toStringDetails(){return null===this._item?"":`(${this._item})`}}t.SingletonIterator=d;class h extends o{constructor(e=[],{autoStart:t=!0,preserve:r=!0}={}){super();const n=r||!Array.isArray(e)?[...e]:e;this._index=0,this._sourceStarted=!1!==t,this._truncateThreshold=r?-1:64,this._sourceStarted&&0===n.length?this.close():this._buffer=n,this.readable=!0}read(){this._sourceStarted||(this._sourceStarted=!0);let e=null;return this._buffer&&(this._index=t&&this.close(),Promise.resolve(i)}}t.ArrayIterator=h;class p extends o{constructor({start:e=0,step:t=1,end:r}={}){super(),Number.isFinite(e)&&(e=Math.trunc(e)),this._next=e,Number.isFinite(t)&&(t=Math.trunc(t)),this._step=t;const n=t>=0,i=n?1/0:-1/0;Number.isFinite(r)?r=Math.trunc(r):r!==-i&&(r=i),this._last=r,!Number.isFinite(e)||(n?e>r:e=0?n>r:nthis._init(r))),this._sourceStarted=!1!==r}get maxBufferSize(){return this._maxBufferSize}set maxBufferSize(e){e!==1/0&&(e=Number.isFinite(e)?Math.max(Math.trunc(e),1):4),this._maxBufferSize!==e&&(this._maxBufferSize=e,this._state===t.OPEN&&this._fillBuffer())}_init(e){let r=!1;this._reading=!0,this._begin((()=>{if(r)throw new Error("done callback called multiple times");r=!0,this._reading=!1,this._changeState(t.OPEN),e?this._fillBufferAsync():this.readable=!0}))}_begin(e){e()}read(){if(this.done)return null;this._sourceStarted||(this._sourceStarted=!0);const e=this._buffer;let t;return e.empty?(t=null,this.readable=!1):t=e.shift(),!this._reading&&e.length0&&(this._pushedCount=0,this._reading=!0,this._read(e,(()=>{if(!e)throw new Error("done callback called multiple times");e=0,this._reading=!1,this.closed?this._completeClose():this._pushedCount&&(this.readable=!0,this._buffer.length{this._reading=!1,this._fillBuffer()})))}close(){this._reading?this._changeState(t.CLOSING):this._completeClose()}_completeClose(){this._changeState(t.CLOSED)&&(this._reading=!0,this._flush((()=>{if(!this._reading)throw new Error("done callback called multiple times");this._reading=!1,this._buffer.empty&&this._endAsync()})))}_destroy(e,t){this._buffer.clear(),t()}_flush(e){e()}_toStringDetails(){const e=this._buffer;return`{${e.empty?"":`next: ${e.first}, `}buffer: ${e.length}}`}}t.BufferedIterator=m;class b extends m{constructor(e,t=e||{}){super(t),this._boundPush=e=>this._push(e),k(e)||(e=t.source),M(e)?this.source=e:e&&(this._createSource=L(e)?()=>e:e,this._sourceStarted&&this._loadSourceAsync()),this._optional=Boolean(t.optional),this._destroySource=!1!==t.destroySource}get source(){return C(this._createSource)&&this._loadSourceAsync(),this._source}set source(e){const r=this._source=this._validateSource(e);r[t.DESTINATION]=this,this.done?this._destroySource&&r.destroy():r.done?this.close():(r.on("end",T),r.on("readable",S),r.on("error",_))}_loadSourceAsync(){C(this._createSource)&&(Promise.resolve(this._createSource()).then((e=>{delete this._createSource,this.source=e,this._fillBuffer()}),(e=>this.emit("error",e))),this._createSource=null)}_validateSource(e,t=!1){if(this._source||void 0!==this._createSource)throw new Error("The source cannot be changed after it has been set");return g(e,t)}_read(e,t){const r=()=>{this._pushedCountthis._readAndTransform(r,t))):t()};this._readAndTransform(r,t)}_readAndTransform(e,t){let r;const n=this.source;!n||n.done||null===(r=n.read())?t():this._optional?this._optionalTransform(r,e):this._transform(r,e,this._boundPush)}_optionalTransform(e,t){const r=this._pushedCount;this._transform(e,(()=>{r===this._pushedCount&&this._push(e),t()}),this._boundPush)}_transform(e,t,r){r(e),t()}_closeWhenDone(){this.close()}_end(e){const r=this._source;r&&(r.removeListener("end",T),r.removeListener("error",_),r.removeListener("readable",S),delete r[t.DESTINATION],this._destroySource&&r.destroy()),super._end(e)}}function v(){this[t.DESTINATION].readable=!0}function _(e){this[t.DESTINATION].emit("error",e)}function w(){this[t.DESTINATION].close()}function T(){this[t.DESTINATION]._closeWhenDone()}function S(){!1!==this[t.DESTINATION]._sourceStarted&&this[t.DESTINATION]._fillBuffer()}t.TransformIterator=b;class O extends b{constructor(e,t){if(super(e,t),this._offset=0,this._limit=1/0,this._filter=e=>!0,t=t||(k(e)?null:e)){const e=C(t)?t:t.transform,{limit:r,offset:n,filter:i,map:a,prepend:o,append:s}=t;n===1/0||r===-1/0?this._limit=0:(Number.isFinite(n)&&(this._offset=Math.max(Math.trunc(n),0)),Number.isFinite(r)&&(this._limit=Math.max(Math.trunc(r),0)),C(i)&&(this._filter=i),C(a)&&(this._map=a),this._transform=C(e)?e:null),o&&(this._prepender=M(o)?o:D(o)),s&&(this._appender=M(s)?s:D(s))}}_read(e,t){const r=()=>this._readAndTransformSimple(e,n,t);function n(){a(r)}this._readAndTransformSimple(e,n,t)}_readAndTransformSimple(e,t,r){let n;const{source:i}=this;if(i&&!i.done){for(0===this._limit&&this.close();!this.closed&&this._pushedCountthis._push(e);!e||e.done?t():(e.on("data",r),e.on("end",(function n(){e.removeListener("data",r),e.removeListener("end",n),t()})))}}t.SimpleTransformIterator=O,t.MultiTransformIterator=class extends b{constructor(e,t){if(super(e,t),this._transformerQueue=[],t){const e=C(t)?t:t.multiTransform;e&&(this._createTransformer=e)}}_read(e,r){const n=this._transformerQueue,i=this._optional;let a,o;for(;(a=n[0])&&a.transformer.done;){i&&null!==a.item&&(e--,this._push(a.item)),n.shift();const{transformer:t}=a;t.removeListener("end",S),t.removeListener("readable",S),t.removeListener("error",_)}const{source:s}=this;for(;s&&!s.done&&n.length0&&null!==(o=t.read());)this._push(o),i&&(a.item=null)}else s&&s.done&&this.close();r()}_createTransformer(e){return new d(e)}_closeWhenDone(){this._transformerQueue.length||this.close()}_end(e){if(super._end(e),this._destroySource)for(const e of this._transformerQueue)e.transformer.destroy()}};class E extends m{constructor(e,t={}){super(t),this._sources=[],this._currentSource=-1;const r=!1!==t.autoStart;if(M(e))e.on("error",(e=>this.emit("error",e))),this._pending={loading:!1,sources:e},r&&this._loadSources();else if(Array.isArray(e)&&e.length>0)for(const t of e)this._addSource(t);else r&&this.close();this._destroySources=!1!==t.destroySources}_loadSources(){const e=this._pending.sources;this._pending.loading=!0,e.done?(delete this._pending,this.close()):(e.on("data",(e=>{this._addSource(e),this._fillBufferAsync()})),e.on("end",(()=>{delete this._pending,this._fillBuffer()})))}_addSource(e){L(e)&&(e=P(e)),e.done||(this._sources.push(e),e[t.DESTINATION]=this,e.on("error",_),e.on("readable",S),e.on("end",x))}_removeEmptySources(){this._sources=this._sources.filter(((e,t)=>(e.done&&t<=this._currentSource&&this._currentSource--,!e.done))),this._fillBuffer()}_read(e,t){var r;!1===(null===(r=this._pending)||void 0===r?void 0:r.loading)&&this._loadSources();let n,i=0;for(;i!==(i=e);)for(let t=0;t0;t++)this._currentSource=(this._currentSource+1)%this._sources.length,null!==(n=this._sources[this._currentSource].read())&&(e--,this._push(n));this._pending||0!==this._sources.length||this.close(),t()}_end(e=!1){if(super._end(e),this._destroySources){for(const e of this._sources)e.destroy();this._pending&&(this._pending.sources.destroy(),delete this._pending)}}}function x(){this[t.DESTINATION]._removeEmptySources()}t.UnionIterator=E;class A extends b{constructor(e){super(e,{autoStart:!1}),this._readPosition=0,this._reading=!1,e&&(this.readable=!0)}_init(){}close(){o.prototype.close.call(this)}get source(){return super.source}set source(e){const r=this._source=this._validateSource(e),n=r&&r[t.DESTINATION]||(r[t.DESTINATION]=new R(r));this.done?this._destroySource&&r.destroy():n.endsAt(0)?this.close():(n.register(this),!1!==r._sourceStarted&&null===n.readAt(0)||(this.readable=!0));const i=this._propertyCallbacks;for(const e in i){const t=i[e];for(const r of t)this._getSourceProperty(e,r)}}_validateSource(e,r=!1){const n=e&&e[t.DESTINATION];return super._validateSource(e,!n||n instanceof R)}getProperty(e,t){const{source:r}=this,n=this._properties,i=n&&e in n;if(!t)return i?n&&n[e]:r&&r.getProperty(e);super.getProperty(e,t),r&&!i&&this._getSourceProperty(e,t)}_getSourceProperty(e,t){this.source.getProperty(e,(r=>{this._properties&&e in this._properties||t(r)}))}getProperties(){const e=this.source?this.source.getProperties():{},t=this._properties;for(const r in t)e[r]=t[r];return e}_toStringDetails(){return`{source: ${this.source?this.source.toString():"none"}}`}read(){this._sourceStarted||(this._sourceStarted=!0);const e=this.source;let r=null;if(!this.done&&e){const n=e[t.DESTINATION];null!==(r=n.readAt(this._readPosition))?this._readPosition++:this.readable=!1,n.endsAt(this._readPosition)&&this.close()}return r}_end(e){const r=this.source,n=null==r?void 0:r[t.DESTINATION];n&&n.unregister(this),m.prototype._end.call(this,e)}}t.ClonedIterator=A;class R{constructor(e){if(this._history=[],this._trackers=new Set,this._source=e,!e.done){const t=()=>{for(const e of this._trackers)e.readable=!0},r=e=>{for(const t of this._trackers)t.emit("error",e)},n=()=>{for(const e of this._trackers)!1!==e._sourceStarted&&e._readPosition===this._history.length&&e.close();this._trackers.clear(),e.removeListener("end",n),e.removeListener("error",r),e.removeListener("readable",t)};e.on("end",n),e.on("error",r),e.on("readable",t)}}register(e){this._source.done||this._trackers.add(e)}unregister(e){this._trackers.delete(e)}readAt(e){let t=null;return e{this._source=null,this.source=e})).catch((e=>this.emit("error",e)))):e&&(this.source=e)}set source(e){let r=e;if(null!==this._source)throw new Error("The source cannot be changed after it has been set");if(F(r)&&(r=r[Symbol.iterator]()),B(r)){let e=r;r=new n.EventEmitter,r.read=()=>{if(null!==e){let t;for(;!(t=e.next()).done;)if(null!==t.value)return t.value;e=null,this.close()}return null}}else r=g(r);this.done?this._destroySource&&C(r.destroy)&&r.destroy():(r[t.DESTINATION]=this,r.on("end",w),r.on("error",_),r.on("readable",v),this._source=r,this.readable=!1!==r.readable)}read(){if(null!==this._source&&!1!==this._source.readable){const e=this._source.read();if(null!==e)return e;this.readable=!1}return null}_end(e=!1){null!==this._source&&(this._source.removeListener("end",w),this._source.removeListener("error",_),this._source.removeListener("readable",v),delete this._source[t.DESTINATION],this._destroySource&&C(this._source.destroy)&&this._source.destroy(),this._source=null),super._end(e)}}function P(e,t){if(t&&("autoStart"in t||"optional"in t||"source"in t||"maxBufferSize"in t))return e&&!M(e)&&(e=new I(e)),new b(e,t);if(!e)return N();if(L(e))return new I(e,t);if(e instanceof o)return e;if(Array.isArray(e))return D(e);if(F(e)||B(e)||M(e))return new I(e,t);throw new TypeError(`Invalid source: ${e}`)}function N(){return new l}function D(e){return new h(e)}function j(e,t){return t?e.bind(t):e}function C(e){return"function"==typeof e}function M(e){return C(null==e?void 0:e.on)}function L(e){return C(null==e?void 0:e.then)}function k(e){return e&&(M(e)||L(e)||C(e))}function F(e){return e&&Symbol.iterator in e}function B(e){return C(null==e?void 0:e.next)}t.WrappingIterator=I,t.wrap=P,t.empty=N,t.single=function(e){return new d(e)},t.fromArray=D,t.fromIterator=function(e){return new I(e)},t.fromIterable=function(e){return new I(e)},t.union=function(e){return new E(e)},t.range=function(e,t,r){return new p({start:e,end:t,step:r})},t.isFunction=C,t.isEventEmitter=M,t.isPromise=L,t.isSourceExpression=k,t.isIterable=F,t.isIterator=B},14241:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedList=void 0,t.LinkedList=class{constructor(){this._length=0,this._head=null,this._tail=null}get length(){return this._length}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}get empty(){return null===this._head}push(e){const t={value:e,next:null};null===this._tail?this._head=this._tail=t:this._tail.next=this._tail=t,this._length++}shift(){if(null===this._head)return;const{value:e,next:t}=this._head;return this._head=t,null===t&&(this._tail=null),this._length--,e}clear(){this._length=0,this._head=this._tail=null}}},93240:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTaskScheduler=void 0;const r=Promise.resolve(void 0);t.createTaskScheduler=function(){const e="function"==typeof queueMicrotask?queueMicrotask:e=>r.then(e),t="function"==typeof setImmediate?setImmediate:e=>setTimeout(e,0);let n=0,i=null;return r=>{null!==i?i.push(r):++n<100?e(r):(i=[r],t((()=>{for(const t of i)e(t);i=null,n=0})))}}},35069:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=void 0;const r="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,n=new Set,i="object"==typeof process&&process?process:{},a=(e,t,r,n)=>{"function"==typeof i.emitWarning?i.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)};let o=globalThis.AbortController,s=globalThis.AbortSignal;if(void 0===o){s=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},o=class{constructor(){t()}signal=new s;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(const t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e="1"!==i.env?.LRU_CACHE_IGNORE_AC_WARNING;const t=()=>{e&&(e=!1,a("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}Symbol("type");const c=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),u=e=>c(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?l:null:null;class l extends Array{constructor(e){super(e),this.fill(0)}}class d{heap;length;static#e=!1;static create(e){const t=u(e);if(!t)return[];d.#e=!0;const r=new d(e,t);return d.#e=!1,r}constructor(e,t){if(!d.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class h{#t;#r;#n;#i;#a;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#s;#c;#u;#l;#d;#h;#p;#f;#y;#g;#m;#b;#v;#_;#w;#T;static unsafeExposeInternals(e){return{starts:e.#b,ttls:e.#v,sizes:e.#m,keyMap:e.#c,keyList:e.#u,valList:e.#l,next:e.#d,prev:e.#h,get head(){return e.#p},get tail(){return e.#f},free:e.#y,isBackgroundFetch:t=>e.#S(t),backgroundFetch:(t,r,n,i)=>e.#O(t,r,n,i),moveToTail:t=>e.#E(t),indexes:t=>e.#x(t),rindexes:t=>e.#A(t),isStale:t=>e.#R(t)}}get max(){return this.#t}get maxSize(){return this.#r}get calculatedSize(){return this.#s}get size(){return this.#o}get fetchMethod(){return this.#a}get dispose(){return this.#n}get disposeAfter(){return this.#i}constructor(e){const{max:t=0,ttl:r,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:s,updateAgeOnHas:l,allowStale:p,dispose:f,disposeAfter:y,noDisposeOnSet:g,noUpdateTTL:m,maxSize:b=0,maxEntrySize:v=0,sizeCalculation:_,fetchMethod:w,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:O,allowStaleOnFetchAbort:E,ignoreFetchAbort:x}=e;if(0!==t&&!c(t))throw new TypeError("max option must be a nonnegative integer");const A=t?u(t):Array;if(!A)throw new Error("invalid max value: "+t);if(this.#t=t,this.#r=b,this.maxEntrySize=v||this.#r,this.sizeCalculation=_,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==w&&"function"!=typeof w)throw new TypeError("fetchMethod must be a function if specified");if(this.#a=w,this.#w=!!w,this.#c=new Map,this.#u=new Array(t).fill(void 0),this.#l=new Array(t).fill(void 0),this.#d=new A(t),this.#h=new A(t),this.#p=0,this.#f=0,this.#y=d.create(t),this.#o=0,this.#s=0,"function"==typeof f&&(this.#n=f),"function"==typeof y?(this.#i=y,this.#g=[]):(this.#i=void 0,this.#g=void 0),this.#_=!!this.#n,this.#T=!!this.#i,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!O,this.allowStaleOnFetchAbort=!!E,this.ignoreFetchAbort=!!x,0!==this.maxEntrySize){if(0!==this.#r&&!c(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!c(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#I()}if(this.allowStale=!!p,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!l,this.ttlResolution=c(i)||0===i?i:1,this.ttlAutopurge=!!o,this.ttl=r||0,this.ttl){if(!c(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(0===this.#t&&0===this.ttl&&0===this.#r)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#r){const e="LRU_CACHE_UNBOUNDED";(e=>!n.has(e))(e)&&(n.add(e),a("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",e,h))}}getRemainingTTL(e){return this.#c.has(e)?1/0:0}#P(){const e=new l(this.#t),t=new l(this.#t);this.#v=e,this.#b=t,this.#N=(n,i,a=r.now())=>{if(t[n]=0!==i?a:0,e[n]=i,0!==i&&this.ttlAutopurge){const e=setTimeout((()=>{this.#R(n)&&this.delete(this.#u[n])}),i+1);e.unref&&e.unref()}},this.#D=n=>{t[n]=0!==e[n]?r.now():0},this.#j=(r,a)=>{if(e[a]){const o=e[a],s=t[a];if(!o||!s)return;r.ttl=o,r.start=s,r.now=n||i();const c=r.now-s;r.remainingTTL=o-c}};let n=0;const i=()=>{const e=r.now();if(this.ttlResolution>0){n=e;const t=setTimeout((()=>n=0),this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=r=>{const a=this.#c.get(r);if(void 0===a)return 0;const o=e[a],s=t[a];return o&&s?o-((n||i())-s):1/0},this.#R=r=>{const a=t[r],o=e[r];return!!o&&!!a&&(n||i())-a>o}}#D=()=>{};#j=()=>{};#N=()=>{};#R=()=>!1;#I(){const e=new l(this.#t);this.#s=0,this.#m=e,this.#C=t=>{this.#s-=e[t],e[t]=0},this.#M=(e,t,r,n)=>{if(this.#S(t))return 0;if(!c(r)){if(!n)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof n)throw new TypeError("sizeCalculation must be a function");if(r=n(t,e),!c(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return r},this.#L=(t,r,n)=>{if(e[t]=r,this.#r){const r=this.#r-e[t];for(;this.#s>r;)this.#k(!0)}this.#s+=e[t],n&&(n.entrySize=r,n.totalCalculatedSize=this.#s)}}#C=e=>{};#L=(e,t,r)=>{};#M=(e,t,r,n)=>{if(r||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#x({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#f;this.#F(t)&&(!e&&this.#R(t)||(yield t),t!==this.#p);)t=this.#h[t]}*#A({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#p;this.#F(t)&&(!e&&this.#R(t)||(yield t),t!==this.#f);)t=this.#d[t]}#F(e){return void 0!==e&&this.#c.get(this.#u[e])===e}*entries(){for(const e of this.#x())void 0===this.#l[e]||void 0===this.#u[e]||this.#S(this.#l[e])||(yield[this.#u[e],this.#l[e]])}*rentries(){for(const e of this.#A())void 0===this.#l[e]||void 0===this.#u[e]||this.#S(this.#l[e])||(yield[this.#u[e],this.#l[e]])}*keys(){for(const e of this.#x()){const t=this.#u[e];void 0===t||this.#S(this.#l[e])||(yield t)}}*rkeys(){for(const e of this.#A()){const t=this.#u[e];void 0===t||this.#S(this.#l[e])||(yield t)}}*values(){for(const e of this.#x())void 0===this.#l[e]||this.#S(this.#l[e])||(yield this.#l[e])}*rvalues(){for(const e of this.#A())void 0===this.#l[e]||this.#S(this.#l[e])||(yield this.#l[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(const r of this.#x()){const n=this.#l[r],i=this.#S(n)?n.__staleWhileFetching:n;if(void 0!==i&&e(i,this.#u[r],this))return this.get(this.#u[r],t)}}forEach(e,t=this){for(const r of this.#x()){const n=this.#l[r],i=this.#S(n)?n.__staleWhileFetching:n;void 0!==i&&e.call(t,i,this.#u[r],this)}}rforEach(e,t=this){for(const r of this.#A()){const n=this.#l[r],i=this.#S(n)?n.__staleWhileFetching:n;void 0!==i&&e.call(t,i,this.#u[r],this)}}purgeStale(){let e=!1;for(const t of this.#A({allowStale:!0}))this.#R(t)&&(this.delete(this.#u[t]),e=!0);return e}info(e){const t=this.#c.get(e);if(void 0===t)return;const n=this.#l[t],i=this.#S(n)?n.__staleWhileFetching:n;if(void 0===i)return;const a={value:i};if(this.#v&&this.#b){const e=this.#v[t],n=this.#b[t];if(e&&n){const t=e-(r.now()-n);a.ttl=t,a.start=Date.now()}}return this.#m&&(a.size=this.#m[t]),a}dump(){const e=[];for(const t of this.#x({allowStale:!0})){const n=this.#u[t],i=this.#l[t],a=this.#S(i)?i.__staleWhileFetching:i;if(void 0===a||void 0===n)continue;const o={value:a};if(this.#v&&this.#b){o.ttl=this.#v[t];const e=r.now()-this.#b[t];o.start=Math.floor(Date.now()-e)}this.#m&&(o.size=this.#m[t]),e.unshift([n,o])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}set(e,t,r={}){if(void 0===t)return this.delete(e),this;const{ttl:n=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:s}=r;let{noUpdateTTL:c=this.noUpdateTTL}=r;const u=this.#M(e,t,r.size||0,o);if(this.maxEntrySize&&u>this.maxEntrySize)return s&&(s.set="miss",s.maxEntrySizeExceeded=!0),this.delete(e),this;let l=0===this.#o?void 0:this.#c.get(e);if(void 0===l)l=0===this.#o?this.#f:0!==this.#y.length?this.#y.pop():this.#o===this.#t?this.#k(!1):this.#o,this.#u[l]=e,this.#l[l]=t,this.#c.set(e,l),this.#d[this.#f]=l,this.#h[l]=this.#f,this.#f=l,this.#o++,this.#L(l,u,s),s&&(s.set="add"),c=!1;else{this.#E(l);const r=this.#l[l];if(t!==r){if(this.#w&&this.#S(r)){r.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:t}=r;void 0===t||a||(this.#_&&this.#n?.(t,e,"set"),this.#T&&this.#g?.push([t,e,"set"]))}else a||(this.#_&&this.#n?.(r,e,"set"),this.#T&&this.#g?.push([r,e,"set"]));if(this.#C(l),this.#L(l,u,s),this.#l[l]=t,s){s.set="replace";const e=r&&this.#S(r)?r.__staleWhileFetching:r;void 0!==e&&(s.oldValue=e)}}else s&&(s.set="update")}if(0===n||this.#v||this.#P(),this.#v&&(c||this.#N(l,n,i),s&&this.#j(s,l)),!a&&this.#T&&this.#g){const e=this.#g;let t;for(;t=e?.shift();)this.#i?.(...t)}return this}pop(){try{for(;this.#o;){const e=this.#l[this.#p];if(this.#k(!0),this.#S(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#T&&this.#g){const e=this.#g;let t;for(;t=e?.shift();)this.#i?.(...t)}}}#k(e){const t=this.#p,r=this.#u[t],n=this.#l[t];return this.#w&&this.#S(n)?n.__abortController.abort(new Error("evicted")):(this.#_||this.#T)&&(this.#_&&this.#n?.(n,r,"evict"),this.#T&&this.#g?.push([n,r,"evict"])),this.#C(t),e&&(this.#u[t]=void 0,this.#l[t]=void 0,this.#y.push(t)),1===this.#o?(this.#p=this.#f=0,this.#y.length=0):this.#p=this.#d[t],this.#c.delete(r),this.#o--,t}has(e,t={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:n}=t,i=this.#c.get(e);if(void 0!==i){const e=this.#l[i];if(this.#S(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#R(i))return r&&this.#D(i),n&&(n.has="hit",this.#j(n,i)),!0;n&&(n.has="stale",this.#j(n,i))}else n&&(n.has="miss");return!1}peek(e,t={}){const{allowStale:r=this.allowStale}=t,n=this.#c.get(e);if(void 0===n||!r&&this.#R(n))return;const i=this.#l[n];return this.#S(i)?i.__staleWhileFetching:i}#O(e,t,r,n){const i=void 0===t?void 0:this.#l[t];if(this.#S(i))return i;const a=new o,{signal:s}=r;s?.addEventListener("abort",(()=>a.abort(s.reason)),{signal:a.signal});const c={signal:a.signal,options:r,context:n},u=(n,i=!1)=>{const{aborted:o}=a.signal,s=r.ignoreFetchAbort&&void 0!==n;if(r.status&&(o&&!i?(r.status.fetchAborted=!0,r.status.fetchError=a.signal.reason,s&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),o&&!s&&!i)return l(a.signal.reason);const u=d;return this.#l[t]===d&&(void 0===n?u.__staleWhileFetching?this.#l[t]=u.__staleWhileFetching:this.delete(e):(r.status&&(r.status.fetchUpdated=!0),this.set(e,n,c.options))),n},l=n=>{const{aborted:i}=a.signal,o=i&&r.allowStaleOnFetchAbort,s=o||r.allowStaleOnFetchRejection,c=s||r.noDeleteOnFetchRejection,u=d;if(this.#l[t]===d&&(c&&void 0!==u.__staleWhileFetching?o||(this.#l[t]=u.__staleWhileFetching):this.delete(e)),s)return r.status&&void 0!==u.__staleWhileFetching&&(r.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw n};r.status&&(r.status.fetchDispatched=!0);const d=new Promise(((t,n)=>{const o=this.#a?.(e,i,c);o&&o instanceof Promise&&o.then((e=>t(void 0===e?void 0:e)),n),a.signal.addEventListener("abort",(()=>{r.ignoreFetchAbort&&!r.allowStaleOnFetchAbort||(t(void 0),r.allowStaleOnFetchAbort&&(t=e=>u(e,!0)))}))})).then(u,(e=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=e),l(e)))),h=Object.assign(d,{__abortController:a,__staleWhileFetching:i,__returned:void 0});return void 0===t?(this.set(e,h,{...c.options,status:void 0}),t=this.#c.get(e)):this.#l[t]=h,h}#S(e){if(!this.#w)return!1;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof o}async fetch(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:f,forceRefresh:y=!1,status:g,signal:m}=t;if(!this.#w)return g&&(g.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,status:g});const b={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:o,size:s,sizeCalculation:c,noUpdateTTL:u,noDeleteOnFetchRejection:l,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:h,status:g,signal:m};let v=this.#c.get(e);if(void 0===v){g&&(g.fetch="miss");const t=this.#O(e,v,b,f);return t.__returned=t}{const t=this.#l[v];if(this.#S(t)){const e=r&&void 0!==t.__staleWhileFetching;return g&&(g.fetch="inflight",e&&(g.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}const i=this.#R(v);if(!y&&!i)return g&&(g.fetch="hit"),this.#E(v),n&&this.#D(v),g&&this.#j(g,v),t;const a=this.#O(e,v,b,f),o=void 0!==a.__staleWhileFetching&&r;return g&&(g.fetch=i?"stale":"refresh",o&&i&&(g.returnedStale=!0)),o?a.__staleWhileFetching:a.__returned=a}}get(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}=t,o=this.#c.get(e);if(void 0!==o){const t=this.#l[o],s=this.#S(t);return a&&this.#j(a,o),this.#R(o)?(a&&(a.get="stale"),s?(a&&r&&void 0!==t.__staleWhileFetching&&(a.returnedStale=!0),r?t.__staleWhileFetching:void 0):(i||this.delete(e),a&&r&&(a.returnedStale=!0),r?t:void 0)):(a&&(a.get="hit"),s?t.__staleWhileFetching:(this.#E(o),n&&this.#D(o),t))}a&&(a.get="miss")}#B(e,t){this.#h[t]=e,this.#d[e]=t}#E(e){e!==this.#f&&(e===this.#p?this.#p=this.#d[e]:this.#B(this.#h[e],this.#d[e]),this.#B(this.#f,e),this.#f=e)}delete(e){let t=!1;if(0!==this.#o){const r=this.#c.get(e);if(void 0!==r)if(t=!0,1===this.#o)this.clear();else{this.#C(r);const t=this.#l[r];if(this.#S(t)?t.__abortController.abort(new Error("deleted")):(this.#_||this.#T)&&(this.#_&&this.#n?.(t,e,"delete"),this.#T&&this.#g?.push([t,e,"delete"])),this.#c.delete(e),this.#u[r]=void 0,this.#l[r]=void 0,r===this.#f)this.#f=this.#h[r];else if(r===this.#p)this.#p=this.#d[r];else{const e=this.#h[r];this.#d[e]=this.#d[r];const t=this.#d[r];this.#h[t]=this.#h[r]}this.#o--,this.#y.push(r)}}if(this.#T&&this.#g?.length){const e=this.#g;let t;for(;t=e?.shift();)this.#i?.(...t)}return t}clear(){for(const e of this.#A({allowStale:!0})){const t=this.#l[e];if(this.#S(t))t.__abortController.abort(new Error("deleted"));else{const r=this.#u[e];this.#_&&this.#n?.(t,r,"delete"),this.#T&&this.#g?.push([t,r,"delete"])}}if(this.#c.clear(),this.#l.fill(void 0),this.#u.fill(void 0),this.#v&&this.#b&&(this.#v.fill(0),this.#b.fill(0)),this.#m&&this.#m.fill(0),this.#p=0,this.#f=0,this.#y.length=0,this.#s=0,this.#o=0,this.#T&&this.#g){const e=this.#g;let t;for(;t=e?.shift();)this.#i?.(...t)}}}t.LRUCache=h},12037:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readableFromWeb=t.ReadableFromWeb=void 0;const n=r(58521);class i extends n.Readable{constructor(e,t){super(t),this.reader=e.getReader(),this.readerClosed=!1,this.reader.closed.then((()=>{this.readerClosed=!0})).catch((e=>{this.readerClosed=!0,this.destroy(e)}))}_read(){this.reader.read().then((e=>this.push(e.done?null:e.value))).catch((e=>this.destroy(e)))}destroy(e){return this.readerClosed||this.reader.cancel(e).then().catch((()=>{})),super.destroy(e)}}t.ReadableFromWeb=i,t.readableFromWeb=function(e,t){return new i(e,t)}},33523:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readableFromWeb=void 0;var n=r(12037);Object.defineProperty(t,"readableFromWeb",{enumerable:!0,get:function(){return n.readableFromWeb}})},94066:e=>{"use strict";e.exports=JSON.parse('{"http://schema.org/":{"properties":{"additionalType":{"subPropertyOf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}}},"http://microformats.org/profile/hcard":{}}')},45497:e=>{"use strict";e.exports=JSON.parse('{"@context":{"alternate":"http://www.w3.org/1999/xhtml/vocab#alternate","appendix":"http://www.w3.org/1999/xhtml/vocab#appendix","cite":"http://www.w3.org/1999/xhtml/vocab#cite","bookmark":"http://www.w3.org/1999/xhtml/vocab#bookmark","contents":"http://www.w3.org/1999/xhtml/vocab#contents","chapter":"http://www.w3.org/1999/xhtml/vocab#chapter","copyright":"http://www.w3.org/1999/xhtml/vocab#copyright","first":"http://www.w3.org/1999/xhtml/vocab#first","glossary":"http://www.w3.org/1999/xhtml/vocab#glossary","help":"http://www.w3.org/1999/xhtml/vocab#help","icon":"http://www.w3.org/1999/xhtml/vocab#icon","index":"http://www.w3.org/1999/xhtml/vocab#index","last":"http://www.w3.org/1999/xhtml/vocab#last","license":"http://www.w3.org/1999/xhtml/vocab#license","meta":"http://www.w3.org/1999/xhtml/vocab#meta","next":"http://www.w3.org/1999/xhtml/vocab#next","prev":"http://www.w3.org/1999/xhtml/vocab#prev","previous":"http://www.w3.org/1999/xhtml/vocab#previous","section":"http://www.w3.org/1999/xhtml/vocab#section","start":"http://www.w3.org/1999/xhtml/vocab#start","stylesheet":"http://www.w3.org/1999/xhtml/vocab#stylesheet","subsection":"http://www.w3.org/1999/xhtml/vocab#subsection","top":"http://www.w3.org/1999/xhtml/vocab#top","up":"http://www.w3.org/1999/xhtml/vocab#up","p3pv1":"http://www.w3.org/1999/xhtml/vocab#p3pv1"}}')},68713:e=>{"use strict";e.exports=JSON.parse('{"@context":{"as":"https://www.w3.org/ns/activitystreams#","cat":"http://www.w3.org/ns/dcat#","cc":"http://creativecommons.org/ns#","cnt":"http://www.w3.org/2008/content#","csvw":"http://www.w3.org/ns/csvw#","ctag":"http://commontag.org/ns#","dc":"http://purl.org/dc/terms/","dc11":"http://purl.org/dc/elements/1.1/","dcat":"http://www.w3.org/ns/dcat#","dcterms":"http://purl.org/dc/terms/","dqv":"http://www.w3.org/ns/dqv#","duv":"https://www.w3.org/TR/vocab-duv#","earl":"http://www.w3.org/ns/earl#","foaf":"http://xmlns.com/foaf/0.1/","gldp":"http://www.w3.org/ns/people#","gr":"http://purl.org/goodrelations/v1#","grddl":"http://www.w3.org/2003/g/data-view#","ht":"http://www.w3.org/2006/http#","ical":"http://www.w3.org/2002/12/cal/icaltzd#","ldp":"http://www.w3.org/ns/ldp#","ma":"http://www.w3.org/ns/ma-ont#","oa":"http://www.w3.org/ns/oa#","odrl":"http://www.w3.org/ns/odrl/2/","og":"http://ogp.me/ns#","org":"http://www.w3.org/ns/org#","owl":"http://www.w3.org/2002/07/owl#","prov":"http://www.w3.org/ns/prov#","ptr":"http://www.w3.org/2009/pointers#","qb":"http://purl.org/linked-data/cube#","rev":"http://purl.org/stuff/rev#","rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","rdfa":"http://www.w3.org/ns/rdfa#","rdfs":"http://www.w3.org/2000/01/rdf-schema#","rif":"http://www.w3.org/2007/rif#","rr":"http://www.w3.org/ns/r2rml#","schema":"http://schema.org/","sd":"http://www.w3.org/ns/sparql-service-description#","sioc":"http://rdfs.org/sioc/ns#","skos":"http://www.w3.org/2004/02/skos/core#","skosxl":"http://www.w3.org/2008/05/skos-xl#","ssn":"http://www.w3.org/ns/ssn/","sosa":"http://www.w3.org/ns/sosa/","time":"http://www.w3.org/2006/time#","v":"http://rdf.data-vocabulary.org/#","vcard":"http://www.w3.org/2006/vcard/ns#","void":"http://rdfs.org/ns/void#","wdr":"http://www.w3.org/2007/05/powder#","wdrs":"http://www.w3.org/2007/05/powder-s#","xhv":"http://www.w3.org/1999/xhtml/vocab#","xml":"http://www.w3.org/XML/1998/namespace","xsd":"http://www.w3.org/2001/XMLSchema#","describedby":"http://www.w3.org/2007/05/powder-s#describedby","license":"http://www.w3.org/1999/xhtml/vocab#license","role":"http://www.w3.org/1999/xhtml/vocab#role"}}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(90128);Comunica=n})(); //# sourceMappingURL=comunica-browser.js.map \ No newline at end of file diff --git a/versions/latest/engines/query-sparql-file/comunica-browser.js.map b/versions/latest/engines/query-sparql-file/comunica-browser.js.map index 97a721a..c552c7a 100644 --- a/versions/latest/engines/query-sparql-file/comunica-browser.js.map +++ b/versions/latest/engines/query-sparql-file/comunica-browser.js.map @@ -1 +1 @@ -{"version":3,"file":"comunica-browser.js","mappings":";0CAAA,IAAI,OAAEA,GAAW,EAAQ,MAErBC,EAAI,CAAC,EAELC,EAAgBD,EAAEC,WAAgB,EAClCC,EAAgBF,EAAEE,YAAgB,EAClCC,EAAgBH,EAAEG,aAAgB,EAClCC,EAAgBJ,EAAEI,cAAgB,EAClCC,EAAgBL,EAAEK,MAAgB,EAClCC,EAAgBN,EAAEM,MAAgB,EAClCC,EAAgBP,EAAEO,KAAgB,EAClCC,EAAgBR,EAAEQ,MAAgB,EAClCC,EAAgBT,EAAES,KAAgB,EAClCC,EAAgBV,EAAEU,OAAgB,GAClCC,EAAgBX,EAAEW,OAAgB,GAElCC,EAAUZ,EAAEY,MAAU,GACtBC,EAAUb,EAAEa,KAAU,GACtBC,EAAUd,EAAEc,MAAU,GACtBC,EAAUf,EAAEe,MAAU,GACtBC,EAAUhB,EAAEgB,MAAU,GACtBC,EAAUjB,EAAEiB,OAAU,GACtBC,EAAUlB,EAAEkB,OAAU,GACtBC,EAAUnB,EAAEmB,OAAU,GACtBC,EAAUpB,EAAEoB,OAAU,GACtBC,EAAUrB,EAAEqB,MAAU,GACtBC,EAAUtB,EAAEsB,MAAU,GACtBC,EAAUvB,EAAEuB,MAAU,GACtBC,EAAUxB,EAAEwB,QAAU,GACtBC,EAAUzB,EAAEyB,QAAU,GACtBC,EAAU1B,EAAE0B,QAAU,GACtBC,EAAU3B,EAAE2B,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ACA,iBACA,eACA,UACA,UACA,UACA,UACA,UACA,iBACA,UACA,UACA,cACA,eACA,WACA,eACA,qBACA,cACA,SACA,eACA,gBACA,WACA,iBACA,iBACA,YACFrc,KAAI,SAAU6qE,GAAO,MAAO,CAACA,EAAI1qE,cAAe0qE,EAAM,KACxD9rE,EAAQm8G,eAAiB,IAAI7+F,IAAI,CAC7B,gBACA,gBACA,gBACA,gBACA,cACA,WACA,gBACA,kBACA,WACA,cACA,WACA,oBACA,gBACA,eACA,mBACA,YACA,aACA,WACA,eACA,oBACA,eACA,cACA,cACA,mBACA,YACA,aACA,aACA,sBACA,mBACA,eACA,YACA,YACA,YACA,gBACA,sBACA,iBACA,OACA,OACA,cACA,YACA,qBACA,mBACA,mBACA,mBACA,eACA,cACA,eACA,cACA,eACA,iBACA,cACA,UACA,UACA,aACA,UACA,aACA,mBACA,mBACA,cACFrc,KAAI,SAAU6qE,GAAO,MAAO,CAACA,EAAI1qE,cAAe0qE,EAAM,wCCrGxD,IAAIuwC,EAAYvgH,MAAQA,KAAKugH,UAAa,WAStC,OARAA,EAAWn/G,OAAOoU,QAAU,SAAS68F,GACjC,IAAK,IAAIntG,EAAG7D,EAAI,EAAGuB,EAAI+f,UAAUphB,OAAQF,EAAIuB,EAAGvB,IAE5C,IAAK,IAAIoH,KADTvD,EAAIyd,UAAUthB,GACOD,OAAOM,UAAUgH,eAAeC,KAAKzD,EAAGuD,KACzD4pG,EAAE5pG,GAAKvD,EAAEuD,IAEjB,OAAO4pG,CACX,EACOkO,EAASh6G,MAAMvG,KAAM2iB,UAChC,EACI7a,EAAmB9H,MAAQA,KAAK8H,kBAAqB1G,OAAO2G,OAAS,SAAUC,EAAGC,EAAGlF,EAAGmF,QAC7E/H,IAAP+H,IAAkBA,EAAKnF,GAC3B,IAAIoF,EAAO/G,OAAOgH,yBAAyBH,EAAGlF,GACzCoF,KAAS,QAASA,GAAQF,EAAEI,WAAaF,EAAKG,UAAYH,EAAKI,gBAClEJ,EAAO,CAAE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E,ECND6rR,EAAoB9lO,EAAI,WACvB,GAA0B,iBAAf5rB,WAAyB,OAAOA,WAC3C,IACC,OAAO56B,MAAQ,IAAI8/G,SAAS,cAAb,EAChB,CAAE,MAAO35G,GACR,GAAsB,iBAAX+Z,OAAqB,OAAOA,MACxC,CACA,CAPuB,GCAxBosQ,EAAoBtkR,EAAI,CAAC6B,EAAK29G,IAAUpmH,OAAOM,UAAUgH,eAAeC,KAAKkB,EAAK29G,GCClF8kK,EAAoBtiL,EAAK9lG,IACH,oBAAXqF,QAA0BA,OAAO62I,aAC1Ch/I,OAAO+C,eAAeD,EAASqF,OAAO62I,YAAa,CAAElgJ,MAAO,WAE7DkB,OAAO+C,eAAeD,EAAS,aAAc,CAAEhE,OAAO,GAAO,ECF9D,IAAIysR,EAAsBL,EAAoB","sources":["webpack://Comunica/../../node_modules/@bergos/jsonparse/jsonparse.js","webpack://Comunica/../../node_modules/@jeswr/prefixcc/dist/fragment.js","webpack://Comunica/../../node_modules/@jeswr/prefixcc/dist/index.js","webpack://Comunica/../../node_modules/@jeswr/prefixcc/dist/lookup/fetchContext.js","webpack://Comunica/../../node_modules/@jeswr/prefixcc/dist/lookup/index.js","webpack://Comunica/../../node_modules/@jeswr/prefixcc/dist/lookup/lookupAllPrefixes.js","webpack://Comunica/../../node_modules/@jeswr/prefixcc/dist/lookup/lookupNamespace.js","webpack://Comunica/../../node_modules/@jeswr/prefixcc/dist/lookup/lookupPrefix.js","webpack://Comunica/../../node_modules/@jeswr/prefixcc/node_modules/cross-fetch/dist/browser-ponyfill.js","webpack://Comunica/../../node_modules/@rubensworks/saxes/saxes.js","webpack://Comunica/../../node_modules/@smessie/readable-web-to-node-stream/lib/index.js","webpack://Comunica/../../node_modules/abort-controller/browser.js","webpack://Comunica/../../node_modules/arrayify-stream/index.js","webpack://Comunica/../../node_modules/asyncjoin/index.js","webpack://Comunica/../../node_modules/asyncjoin/join/DynamicNestedLoopJoin.js","webpack://Comunica/../../node_modules/asyncjoin/join/HashJoin.js","webpack://Comunica/../../node_modules/asyncjoin/join/NestedLoopJoin.js","webpack://Comunica/../../node_modules/asyncjoin/join/SymmetricHashJoin.js","webpack://Comunica/../../node_modules/asyncjoin/util/MergeIterator.js","webpack://Comunica/./engine-browser.js","webpack://Comunica/QueryEngine.ts","webpack://Comunica/index-browser.ts","webpack://Comunica/ActorAbstractMediaTyped.ts","webpack://Comunica/ActorAbstractMediaTypedFixed.ts","webpack://Comunica/index.ts","webpack://Comunica/ActorAbstractPath.ts","webpack://Comunica/PathVariableObjectIterator.ts","webpack://Comunica/ActorContextPreprocessConvertShortcuts.ts","webpack://Comunica/ActorContextPreprocessQuerySourceIdentify.ts","webpack://Comunica/ActorContextPreprocessQuerySourceSkolemize.ts","webpack://Comunica/QuerySourceSkolemized.ts","webpack://Comunica/utils.ts","webpack://Comunica/ActorContextPreprocessSetDefaults.ts","webpack://Comunica/ActorContextPreprocessSourceToDestination.ts","webpack://Comunica/ActorDereferenceFallback.ts","webpack://Comunica/ActorDereferenceHttp-browser.ts","webpack://Comunica/ActorDereferenceHttpBase.ts","webpack://Comunica/ActorDereferenceRdfParse.ts","webpack://Comunica/ActorHashBindingsSha1.ts","webpack://Comunica/ActorHttpFetch.ts","webpack://Comunica/FetchInitPreprocessor-browser.ts","webpack://Comunica/ActorHttpProxy.ts","webpack://Comunica/ProxyHandlerStatic.ts","webpack://Comunica/ActorHttpWayback.ts","webpack://Comunica/ActorInitQuery-browser.ts","webpack://Comunica/ActorInitQueryBase.ts","webpack://Comunica/QueryEngineBase.ts","webpack://Comunica/ActorOptimizeQueryOperationAssignSourcesExhaustive.ts","webpack://Comunica/ActorOptimizeQueryOperationBgpToJoin.ts","webpack://Comunica/ActorOptimizeQueryOperationDescribeToConstructsSubject.ts","webpack://Comunica/ActorOptimizeQueryOperationFilterPushdown.ts","webpack://Comunica/ActorOptimizeQueryOperationGroupSources.ts","webpack://Comunica/ActorOptimizeQueryOperationJoinBgp.ts","webpack://Comunica/ActorOptimizeQueryOperationJoinConnected.ts","webpack://Comunica/ActorOptimizeQueryOperationPruneEmptySourceOperations.ts","webpack://Comunica/ActorOptimizeQueryOperationRewriteAdd.ts","webpack://Comunica/ActorOptimizeQueryOperationRewriteCopy.ts","webpack://Comunica/ActorOptimizeQueryOperationRewriteMove.ts","webpack://Comunica/ActorQueryOperationAsk.ts","webpack://Comunica/ActorQueryOperationBgpJoin.ts","webpack://Comunica/ActorQueryOperationConstruct.ts","webpack://Comunica/BindingsToQuadsIterator.ts","webpack://Comunica/ActorQueryOperationDistinctHash.ts","webpack://Comunica/ActorQueryOperationExtend.ts","webpack://Comunica/ActorQueryOperationFilter.ts","webpack://Comunica/ActorQueryOperationFromQuad.ts","webpack://Comunica/ActorQueryOperationGroup.ts","webpack://Comunica/GroupsState.ts","webpack://Comunica/ActorQueryOperationJoin.ts","webpack://Comunica/ActorQueryOperationLeftJoin.ts","webpack://Comunica/ActorQueryOperationMinus.ts","webpack://Comunica/ActorQueryOperationNop.ts","webpack://Comunica/ActorQueryOperationOrderBy.ts","webpack://Comunica/SortIterator.ts","webpack://Comunica/ActorQueryOperationPathAlt.ts","webpack://Comunica/ActorQueryOperationPathInv.ts","webpack://Comunica/ActorQueryOperationPathLink.ts","webpack://Comunica/ActorQueryOperationPathNps.ts","webpack://Comunica/ActorQueryOperationPathOneOrMore.ts","webpack://Comunica/ActorQueryOperationPathSeq.ts","webpack://Comunica/ActorQueryOperationPathZeroOrMore.ts","webpack://Comunica/ActorQueryOperationPathZeroOrOne.ts","webpack://Comunica/ActorQueryOperationProject.ts","webpack://Comunica/ActorQueryOperationReducedHash.ts","webpack://Comunica/ActorQueryOperationService.ts","webpack://Comunica/ActorQueryOperationSlice.ts","webpack://Comunica/ActorQueryOperationSource.ts","webpack://Comunica/ActorQueryOperationUnion.ts","webpack://Comunica/ActorQueryOperationClear.ts","webpack://Comunica/ActorQueryOperationUpdateCompositeUpdate.ts","webpack://Comunica/ActorQueryOperationCreate.ts","webpack://Comunica/ActorQueryOperationUpdateDeleteInsert.ts","webpack://Comunica/ActorQueryOperationDrop.ts","webpack://Comunica/ActorQueryOperationLoad.ts","webpack://Comunica/ActorQueryOperationValues.ts","webpack://Comunica/ActorQueryParseGraphql.ts","webpack://Comunica/ActorQueryParseSparql.ts","webpack://Comunica/ActorQueryProcessExplainLogical.ts","webpack://Comunica/ActorQueryProcessExplainParsed.ts","webpack://Comunica/ActorQueryProcessExplainPhysical.ts","webpack://Comunica/MemoryPhysicalQueryPlanLogger.ts","webpack://Comunica/ActorQueryProcessSequential.ts","webpack://Comunica/ActorQueryResultSerializeJson.ts","webpack://Comunica/ActorQueryResultSerializeRdf.ts","webpack://Comunica/ActorQueryResultSerializeSimple.ts","webpack://Comunica/ActorQueryResultSerializeSparqlCsv.ts","webpack://Comunica/ActionObserverHttp.ts","webpack://Comunica/ActorQueryResultSerializeSparqlJson.ts","webpack://Comunica/ActorQueryResultSerializeSparqlTsv.ts","webpack://Comunica/ActorQueryResultSerializeSparqlXml.ts","webpack://Comunica/XmlSerializer.ts","webpack://Comunica/ActorQueryResultSerializeStats.ts","webpack://Comunica/ActorQueryResultSerializeTable.ts","webpack://Comunica/ActorQueryResultSerializeTree.ts","webpack://Comunica/ActorQuerySourceIdentifyHypermediaNone.ts","webpack://Comunica/ActorQuerySourceIdentifyHypermediaQpf.ts","webpack://Comunica/QuerySourceQpf.ts","webpack://Comunica/ActorQuerySourceIdentifyHypermediaSparql.ts","webpack://Comunica/QuerySourceSparql.ts","webpack://Comunica/ActorQuerySourceIdentifyHypermedia.ts","webpack://Comunica/LinkedRdfSourcesAsyncRdfIterator.ts","webpack://Comunica/MediatedLinkedRdfSourcesAsyncRdfIterator.ts","webpack://Comunica/QuerySourceHypermedia.ts","webpack://Comunica/StreamingStoreMetadata.ts","webpack://Comunica/ActorQuerySourceIdentifyRdfJs.ts","webpack://Comunica/QuerySourceRdfJs.ts","webpack://Comunica/ActorQuerySourceIdentifySerialized.ts","webpack://Comunica/ActorRdfJoinEntriesSortCardinality.ts","webpack://Comunica/ActorRdfJoinHash.ts","webpack://Comunica/ActorRdfJoinMultiBindSource.ts","webpack://Comunica/ActorRdfJoinMultiBind.ts","webpack://Comunica/ActorRdfJoinMultiEmpty.ts","webpack://Comunica/ActorRdfJoinMultiSmallestFilterBindings.ts","webpack://Comunica/ActorRdfJoinMultiSmallest.ts","webpack://Comunica/ActorRdfJoinNestedLoop.ts","webpack://Comunica/ActorRdfJoinNone.ts","webpack://Comunica/ActorRdfJoinSingle.ts","webpack://Comunica/ActorRdfJoinSymmetricHash.ts","webpack://Comunica/ActorRdfJoinMinusHashUndef.ts","webpack://Comunica/BindingsIndex.ts","webpack://Comunica/ActorRdfJoinMinusHash.ts","webpack://Comunica/ActorRdfJoinOptionalBind.ts","webpack://Comunica/ActorRdfJoinOptionalHash.ts","webpack://Comunica/BindingsIndexDef.ts","webpack://Comunica/BindingsIndexUndef.ts","webpack://Comunica/ActorRdfJoinOptionalNestedLoop.ts","webpack://Comunica/ActorRdfJoinSelectivityVariableCounting.ts","webpack://Comunica/ActorRdfMetadataAccumulateCanContainUndefs.ts","webpack://Comunica/ActorRdfMetadataAccumulateCardinality.ts","webpack://Comunica/ActorRdfMetadataAccumulatePageSize.ts","webpack://Comunica/ActorRdfMetadataAccumulateRequestTime.ts","webpack://Comunica/ActorRdfMetadataAll.ts","webpack://Comunica/ActorRdfMetadataExtractAllowHttpMethods.ts","webpack://Comunica/ActorRdfMetadataExtractHydraControls.ts","webpack://Comunica/ActorRdfMetadataExtractHydraCount.ts","webpack://Comunica/ActorRdfMetadataExtractHydraPagesize.ts","webpack://Comunica/ActorRdfMetadataExtractPatchSparqlUpdate.ts","webpack://Comunica/ActorRdfMetadataExtractPutAccepted.ts","webpack://Comunica/ActorRdfMetadataExtractRequestTime.ts","webpack://Comunica/ActorRdfMetadataExtractSparqlService.ts","webpack://Comunica/ActorRdfMetadataPrimaryTopic.ts","webpack://Comunica/ActorRdfParseHtmlMicrodata.ts","webpack://Comunica/ActorRdfParseHtmlRdfa.ts","webpack://Comunica/ActorRdfParseHtmlScript.ts","webpack://Comunica/HtmlScriptListener.ts","webpack://Comunica/ActorRdfParseHtml.ts","webpack://Comunica/ActorRdfParseJsonLd.ts","webpack://Comunica/DocumentLoaderMediated.ts","webpack://Comunica/ActorRdfParseN3.ts","webpack://Comunica/ActorRdfParseRdfXml.ts","webpack://Comunica/ActorRdfParseShaclc.ts","webpack://Comunica/PrefixWrappingIterator.ts","webpack://Comunica/ActorRdfParseXmlRdfa.ts","webpack://Comunica/ActorRdfResolveHypermediaLinksNext.ts","webpack://Comunica/ActorRdfResolveHypermediaLinksQueueFifo.ts","webpack://Comunica/LinkQueueFifo.ts","webpack://Comunica/ActorRdfSerializeJsonLd.ts","webpack://Comunica/ActorRdfSerializeN3.ts","webpack://Comunica/ActorRdfSerializeShaclc.ts","webpack://Comunica/ActorRdfUpdateHypermediaPatchSparqlUpdate.ts","webpack://Comunica/QuadDestinationPatchSparqlUpdate.ts","webpack://Comunica/ActorRdfUpdateHypermediaPutLdp.ts","webpack://Comunica/QuadDestinationPutLdp.ts","webpack://Comunica/ActorRdfUpdateHypermediaSparql.ts","webpack://Comunica/QuadDestinationSparql.ts","webpack://Comunica/ActorRdfUpdateQuadsHypermedia.ts","webpack://Comunica/ActorRdfUpdateQuadsRdfJsStore.ts","webpack://Comunica/RdfJsQuadDestination.ts","webpack://Comunica/Bindings.ts","webpack://Comunica/BindingsFactory.ts","webpack://Comunica/bindingsToString.ts","webpack://Comunica/ActorContextPreprocess.ts","webpack://Comunica/ActorDereferenceRdf.ts","webpack://Comunica/ActorDereference.ts","webpack://Comunica/ActorDereferenceBase.ts","webpack://Comunica/ActorDereferenceParse.ts","webpack://Comunica/ActorHashBindings.ts","webpack://Comunica/ActorHttpInvalidate.ts","webpack://Comunica/ActorHttpInvalidateListenable.ts","webpack://Comunica/ActorHttp.ts","webpack://Comunica/ActorInit.ts","webpack://Comunica/ActorOptimizeQueryOperation.ts","webpack://Comunica/ActorQueryOperation.ts","webpack://Comunica/ActorQueryOperationTyped.ts","webpack://Comunica/ActorQueryOperationTypedMediated.ts","webpack://Comunica/BusQueryOperation.ts","webpack://Comunica/ClosableTransformIterator.ts","webpack://Comunica/ActorQueryParse.ts","webpack://Comunica/ActorQueryProcess.ts","webpack://Comunica/ActorQueryResultSerialize.ts","webpack://Comunica/ActorQueryResultSerializeFixedMediaTypes.ts","webpack://Comunica/ActorQuerySourceIdentify.ts","webpack://Comunica/Utils.ts","webpack://Comunica/ActorRdfJoinEntriesSort.ts","webpack://Comunica/ActorRdfJoinSelectivity.ts","webpack://Comunica/ActorRdfJoin.ts","webpack://Comunica/ChunkedIterator.ts","webpack://Comunica/instrumentIterator.ts","webpack://Comunica/ActorRdfMetadataAccumulate.ts","webpack://Comunica/ActorRdfMetadataExtract.ts","webpack://Comunica/ActorRdfMetadata.ts","webpack://Comunica/ActorRdfParse.ts","webpack://Comunica/ActorRdfParseFixedMediaTypes.ts","webpack://Comunica/ActorRdfResolveHypermediaLinksQueue.ts","webpack://Comunica/LinkQueueWrapper.ts","webpack://Comunica/ActorRdfResolveHypermediaLinks.ts","webpack://Comunica/ActorRdfSerialize.ts","webpack://Comunica/ActorRdfSerializeFixedMediaTypes.ts","webpack://Comunica/ActorRdfUpdateHypermedia.ts","webpack://Comunica/ActorRdfUpdateQuads.ts","webpack://Comunica/ActorRdfUpdateQuadsDestination.ts","webpack://Comunica/Keys.ts","webpack://Comunica/ActionContext.ts","webpack://Comunica/ActionObserver.ts","webpack://Comunica/Actor.ts","webpack://Comunica/Bus.ts","webpack://Comunica/BusIndexed.ts","webpack://Comunica/ContextEntries.ts","webpack://Comunica/Mediator.ts","webpack://Comunica/BlankNodeBindingsScoped.ts","webpack://Comunica/BlankNodeScoped.ts","webpack://Comunica/Aggregator.ts","webpack://Comunica/Average.ts","webpack://Comunica/Count.ts","webpack://Comunica/GroupConcat.ts","webpack://Comunica/Max.ts","webpack://Comunica/Min.ts","webpack://Comunica/Sample.ts","webpack://Comunica/Sum.ts","webpack://Comunica/WildcardCountAggregator.ts","webpack://Comunica/AggregateEvaluator.ts","webpack://Comunica/AsyncAggregateEvaluator.ts","webpack://Comunica/AsyncEvaluator.ts","webpack://Comunica/SyncEvaluator.ts","webpack://Comunica/AsyncRecursiveEvaluator.ts","webpack://Comunica/BaseAggregateEvaluator.ts","webpack://Comunica/BaseExpressionEvaluator.ts","webpack://Comunica/SyncRecursiveEvaluator.ts","webpack://Comunica/Aggregate.ts","webpack://Comunica/AsyncExtension.ts","webpack://Comunica/Existence.ts","webpack://Comunica/Expressions.ts","webpack://Comunica/Named.ts","webpack://Comunica/Operator.ts","webpack://Comunica/SpecialOperator.ts","webpack://Comunica/SyncExtension.ts","webpack://Comunica/Term.ts","webpack://Comunica/Variable.ts","webpack://Comunica/Core.ts","webpack://Comunica/Helpers.ts","webpack://Comunica/NamedFunctions.ts","webpack://Comunica/OverloadTree.ts","webpack://Comunica/RegularFunctions.ts","webpack://Comunica/SpecialFunctions.ts","webpack://Comunica/XPathFunctions.ts","webpack://Comunica/AlgebraTransformer.ts","webpack://Comunica/TermTransformer.ts","webpack://Comunica/Consts.ts","webpack://Comunica/DateTimeHelpers.ts","webpack://Comunica/Errors.ts","webpack://Comunica/Ordering.ts","webpack://Comunica/Parsing.ts","webpack://Comunica/Serialization.ts","webpack://Comunica/SpecAlgos.ts","webpack://Comunica/TypeHandling.ts","webpack://Comunica/LoggerVoid.ts","webpack://Comunica/MediatorAll.ts","webpack://Comunica/MediatorCombinePipeline.ts","webpack://Comunica/MediatorCombineUnion.ts","webpack://Comunica/MediatorJoinCoefficientsFixed.ts","webpack://Comunica/MediatorNumber.ts","webpack://Comunica/MediatorRace.ts","webpack://Comunica/MetadataValidationState.ts","webpack://Comunica/Logger.ts","webpack://Comunica/../../node_modules/base64-js/index.js","webpack://Comunica/../../node_modules/bignumber.js/bignumber.js","webpack://Comunica/../../node_modules/buffer/index.js","webpack://Comunica/../../node_modules/canonicalize/lib/canonicalize.js","webpack://Comunica/../../node_modules/cross-fetch/dist/browser-polyfill.js","webpack://Comunica/../../node_modules/cross-fetch/dist/browser-ponyfill.js","webpack://Comunica/../../node_modules/dom-serializer/lib/foreignNames.js","webpack://Comunica/../../node_modules/dom-serializer/lib/index.js","webpack://Comunica/../../node_modules/domelementtype/lib/index.js","webpack://Comunica/../../node_modules/domhandler/lib/index.js","webpack://Comunica/../../node_modules/domhandler/lib/node.js","webpack://Comunica/../../node_modules/domutils/lib/feeds.js","webpack://Comunica/../../node_modules/domutils/lib/helpers.js","webpack://Comunica/../../node_modules/domutils/lib/index.js","webpack://Comunica/../../node_modules/domutils/lib/legacy.js","webpack://Comunica/../../node_modules/domutils/lib/manipulation.js","webpack://Comunica/../../node_modules/domutils/lib/querying.js","webpack://Comunica/../../node_modules/domutils/lib/stringify.js","webpack://Comunica/../../node_modules/domutils/lib/traversal.js","webpack://Comunica/../../node_modules/entities/lib/decode.js","webpack://Comunica/../../node_modules/entities/lib/decode_codepoint.js","webpack://Comunica/../../node_modules/entities/lib/encode.js","webpack://Comunica/../../node_modules/entities/lib/escape.js","webpack://Comunica/../../node_modules/entities/lib/generated/decode-data-html.js","webpack://Comunica/../../node_modules/entities/lib/generated/decode-data-xml.js","webpack://Comunica/../../node_modules/entities/lib/generated/encode-html.js","webpack://Comunica/../../node_modules/entities/lib/index.js","webpack://Comunica/../../node_modules/event-emitter-promisify/dist/index.js","webpack://Comunica/../../node_modules/events/events.js","webpack://Comunica/../../node_modules/fast-deep-equal/es6/index.js","webpack://Comunica/../../node_modules/fetch-sparql-endpoint/index.js","webpack://Comunica/../../node_modules/fetch-sparql-endpoint/lib/SparqlEndpointFetcher.js","webpack://Comunica/../../node_modules/fetch-sparql-endpoint/node_modules/cross-fetch/dist/browser-polyfill.js","webpack://Comunica/../../node_modules/graphql-to-sparql/index.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/Converter.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/IConvertContext.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/IConvertSettings.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/Util.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerAdapter.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerDefinitionAdapter.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerDefinitionFragment.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerDefinitionOperation.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerDocument.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerSelectionAdapter.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerSelectionField.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerSelectionFragmentSpread.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerSelectionInlineFragment.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/directivenode/DirectiveNodeHandlerAdapter.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/directivenode/DirectiveNodeHandlerInclude.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/directivenode/DirectiveNodeHandlerOptional.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/directivenode/DirectiveNodeHandlerPlural.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/directivenode/DirectiveNodeHandlerSingle.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/directivenode/DirectiveNodeHandlerSkip.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/directivenode/index.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/index.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerAdapter.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerBoolean.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerEnum.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerFloat.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerInt.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerList.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerNull.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerObject.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerString.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerVariable.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/index.js","webpack://Comunica/../../node_modules/graphql/error/GraphQLError.js","webpack://Comunica/../../node_modules/graphql/error/syntaxError.js","webpack://Comunica/../../node_modules/graphql/jsutils/defineInspect.js","webpack://Comunica/../../node_modules/graphql/jsutils/devAssert.js","webpack://Comunica/../../node_modules/graphql/jsutils/inspect.js","webpack://Comunica/../../node_modules/graphql/jsutils/instanceOf.js","webpack://Comunica/../../node_modules/graphql/jsutils/invariant.js","webpack://Comunica/../../node_modules/graphql/jsutils/isObjectLike.js","webpack://Comunica/../../node_modules/graphql/jsutils/nodejsCustomInspectSymbol.js","webpack://Comunica/../../node_modules/graphql/language/ast.js","webpack://Comunica/../../node_modules/graphql/language/blockString.js","webpack://Comunica/../../node_modules/graphql/language/directiveLocation.js","webpack://Comunica/../../node_modules/graphql/language/index.js","webpack://Comunica/../../node_modules/graphql/language/kinds.js","webpack://Comunica/../../node_modules/graphql/language/lexer.js","webpack://Comunica/../../node_modules/graphql/language/location.js","webpack://Comunica/../../node_modules/graphql/language/parser.js","webpack://Comunica/../../node_modules/graphql/language/predicates.js","webpack://Comunica/../../node_modules/graphql/language/printLocation.js","webpack://Comunica/../../node_modules/graphql/language/printer.js","webpack://Comunica/../../node_modules/graphql/language/source.js","webpack://Comunica/../../node_modules/graphql/language/tokenKind.js","webpack://Comunica/../../node_modules/graphql/language/visitor.js","webpack://Comunica/../../node_modules/graphql/polyfills/symbols.js","webpack://Comunica/../../node_modules/hash.js/lib/hash.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/common.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/hmac.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/ripemd.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/sha.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/sha/1.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/sha/224.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/sha/256.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/sha/384.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/sha/512.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/sha/common.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/utils.js","webpack://Comunica/../../node_modules/htmlparser2/lib/Parser.js","webpack://Comunica/../../node_modules/htmlparser2/lib/Tokenizer.js","webpack://Comunica/../../node_modules/htmlparser2/lib/index.js","webpack://Comunica/../../node_modules/http-link-header/lib/link.js","webpack://Comunica/../../node_modules/ieee754/index.js","webpack://Comunica/../../node_modules/immutable/dist/immutable.es.js","webpack://Comunica/../../node_modules/inherits/inherits_browser.js","webpack://Comunica/../../node_modules/is-stream/index.js","webpack://Comunica/../../node_modules/jsonld-context-parser/index.js","webpack://Comunica/../../node_modules/jsonld-context-parser/lib/ContextParser.js","webpack://Comunica/../../node_modules/jsonld-context-parser/lib/ErrorCoded.js","webpack://Comunica/../../node_modules/jsonld-context-parser/lib/FetchDocumentLoader.js","webpack://Comunica/../../node_modules/jsonld-context-parser/lib/IDocumentLoader.js","webpack://Comunica/../../node_modules/jsonld-context-parser/lib/JsonLdContext.js","webpack://Comunica/../../node_modules/jsonld-context-parser/lib/JsonLdContextNormalized.js","webpack://Comunica/../../node_modules/jsonld-context-parser/lib/Util.js","webpack://Comunica/../../node_modules/jsonld-context-parser/node_modules/cross-fetch/dist/browser-polyfill.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/index.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/ContextTree.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/JsonLdParser.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/ParsingContext.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/Util.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/containerhandler/ContainerHandlerIdentifier.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/containerhandler/ContainerHandlerIndex.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/containerhandler/ContainerHandlerLanguage.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/containerhandler/ContainerHandlerType.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/EntryHandlerArrayValue.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/EntryHandlerContainer.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/EntryHandlerInvalidFallback.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/EntryHandlerPredicate.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeyword.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordAnnotation.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordContext.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordGraph.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordId.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordIncluded.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordNest.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordType.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordUnknownFallback.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordValue.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/node_modules/canonicalize/lib/canonicalize.js","webpack://Comunica/../../node_modules/jsonld-streaming-serializer/index.js","webpack://Comunica/../../node_modules/jsonld-streaming-serializer/lib/JsonLdSerializer.js","webpack://Comunica/../../node_modules/jsonld-streaming-serializer/lib/SeparatorType.js","webpack://Comunica/../../node_modules/jsonld-streaming-serializer/lib/Util.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/index.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/IHtmlParseListener.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/IItemScope.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/IVocabRegistry.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/MicrodataRdfParser.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/Util.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/propertyhandler/IItemPropertyHandler.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/propertyhandler/ItemPropertyHandlerContent.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/propertyhandler/ItemPropertyHandlerNumber.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/propertyhandler/ItemPropertyHandlerTime.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/propertyhandler/ItemPropertyHandlerUrl.js","webpack://Comunica/../../node_modules/minimalistic-assert/index.js","webpack://Comunica/../../node_modules/n3/src/IRIs.js","webpack://Comunica/../../node_modules/n3/src/N3Lexer.js","webpack://Comunica/../../node_modules/n3/src/N3DataFactory.js","webpack://Comunica/../../node_modules/n3/src/N3Parser.js","webpack://Comunica/../../node_modules/n3/src/N3Util.js","webpack://Comunica/../../node_modules/n3/src/N3Writer.js","webpack://Comunica/../../node_modules/n3/src/N3Store.js","webpack://Comunica/../../node_modules/n3/src/N3StreamParser.js","webpack://Comunica/../../node_modules/n3/src/N3StreamWriter.js","webpack://Comunica/../../node_modules/n3/src/index.js","webpack://Comunica/../../node_modules/process/browser.js","webpack://Comunica/../../node_modules/promise-polyfill/Promise.js","webpack://Comunica/../../node_modules/queue-microtask/index.js","webpack://Comunica/../../node_modules/rdf-data-factory/index.js","webpack://Comunica/../../node_modules/rdf-data-factory/lib/BlankNode.js","webpack://Comunica/../../node_modules/rdf-data-factory/lib/DataFactory.js","webpack://Comunica/../../node_modules/rdf-data-factory/lib/DefaultGraph.js","webpack://Comunica/../../node_modules/rdf-data-factory/lib/Literal.js","webpack://Comunica/../../node_modules/rdf-data-factory/lib/NamedNode.js","webpack://Comunica/../../node_modules/rdf-data-factory/lib/Quad.js","webpack://Comunica/../../node_modules/rdf-data-factory/lib/Variable.js","webpack://Comunica/../../node_modules/rdf-isomorphic/index.js","webpack://Comunica/../../node_modules/rdf-isomorphic/lib/RdfIsomorphic.js","webpack://Comunica/../../node_modules/rdf-literal/index.js","webpack://Comunica/../../node_modules/rdf-literal/lib/ITypeHandler.js","webpack://Comunica/../../node_modules/rdf-literal/lib/Translator.js","webpack://Comunica/../../node_modules/rdf-literal/lib/handler/TypeHandlerBoolean.js","webpack://Comunica/../../node_modules/rdf-literal/lib/handler/TypeHandlerDate.js","webpack://Comunica/../../node_modules/rdf-literal/lib/handler/TypeHandlerNumberDouble.js","webpack://Comunica/../../node_modules/rdf-literal/lib/handler/TypeHandlerNumberInteger.js","webpack://Comunica/../../node_modules/rdf-literal/lib/handler/TypeHandlerString.js","webpack://Comunica/../../node_modules/rdf-literal/lib/handler/index.js","webpack://Comunica/../../node_modules/rdf-store-stream/index.js","webpack://Comunica/../../node_modules/rdf-stores/index.js","webpack://Comunica/../../node_modules/rdf-stores/lib/IRdfStoreOptions.js","webpack://Comunica/../../node_modules/rdf-stores/lib/OrderUtils.js","webpack://Comunica/../../node_modules/rdf-stores/lib/PatternTerm.js","webpack://Comunica/../../node_modules/rdf-stores/lib/RdfStore.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dataset/DatasetCoreWrapper.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dictionary/ITermDictionary.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dictionary/TermDictionaryNumberMap.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dictionary/TermDictionaryNumberRecord.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dictionary/TermDictionaryNumberRecordFullTerms.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dictionary/TermDictionaryQuoted.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dictionary/TermDictionaryQuotedIndexed.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dictionary/TermDictionaryQuotedReferential.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dictionary/TermDictionarySymbol.js","webpack://Comunica/../../node_modules/rdf-stores/lib/index/IRdfStoreIndex.js","webpack://Comunica/../../node_modules/rdf-stores/lib/index/RdfStoreIndexNestedMap.js","webpack://Comunica/../../node_modules/rdf-stores/lib/index/RdfStoreIndexNestedMapQuoted.js","webpack://Comunica/../../node_modules/rdf-stores/lib/index/RdfStoreIndexNestedMapRecursive.js","webpack://Comunica/../../node_modules/rdf-stores/lib/index/RdfStoreIndexNestedMapRecursiveQuoted.js","webpack://Comunica/../../node_modules/rdf-stores/lib/index/RdfStoreIndexNestedRecord.js","webpack://Comunica/../../node_modules/rdf-stores/lib/index/RdfStoreIndexNestedRecordQuoted.js","webpack://Comunica/../../node_modules/rdf-streaming-store/index.js","webpack://Comunica/../../node_modules/rdf-streaming-store/lib/PendingStreamsIndex.js","webpack://Comunica/../../node_modules/rdf-streaming-store/lib/StreamingStore.js","webpack://Comunica/../../node_modules/rdf-string-ttl/index.js","webpack://Comunica/../../node_modules/rdf-string-ttl/lib/TermUtil.js","webpack://Comunica/../../node_modules/rdf-string/index.js","webpack://Comunica/../../node_modules/rdf-string/lib/TermUtil.js","webpack://Comunica/../../node_modules/rdf-terms/index.js","webpack://Comunica/../../node_modules/rdf-terms/lib/QuadTermUtil.js","webpack://Comunica/../../node_modules/rdf-terms/lib/TermUtil.js","webpack://Comunica/../../node_modules/rdfa-streaming-parser/index.js","webpack://Comunica/../../node_modules/rdfa-streaming-parser/lib/IActiveTag.js","webpack://Comunica/../../node_modules/rdfa-streaming-parser/lib/IHtmlParseListener.js","webpack://Comunica/../../node_modules/rdfa-streaming-parser/lib/IRdfaPattern.js","webpack://Comunica/../../node_modules/rdfa-streaming-parser/lib/RdfaParser.js","webpack://Comunica/../../node_modules/rdfa-streaming-parser/lib/RdfaProfile.js","webpack://Comunica/../../node_modules/rdfa-streaming-parser/lib/Util.js","webpack://Comunica/../../node_modules/rdfxml-streaming-parser/index.js","webpack://Comunica/../../node_modules/rdfxml-streaming-parser/lib/ParseError.js","webpack://Comunica/../../node_modules/rdfxml-streaming-parser/lib/RdfXmlParser.js","webpack://Comunica/../../node_modules/readable-stream-node-to-web/index.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/add-abort-signal.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/buffer_list.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/compose.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/destroy.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/duplex.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/duplexify.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/end-of-stream.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/from.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/legacy.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/operators.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/passthrough.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/pipeline.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/readable.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/state.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/transform.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/utils.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/writable.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/validators.js","webpack://Comunica/../../node_modules/readable-stream/lib/ours/browser.js","webpack://Comunica/../../node_modules/readable-stream/lib/ours/errors.js","webpack://Comunica/../../node_modules/readable-stream/lib/ours/primordials.js","webpack://Comunica/../../node_modules/readable-stream/lib/ours/util.js","webpack://Comunica/../../node_modules/readable-stream/lib/stream.js","webpack://Comunica/../../node_modules/readable-stream/lib/stream/promises.js","webpack://Comunica/../../node_modules/relative-to-absolute-iri/index.js","webpack://Comunica/../../node_modules/relative-to-absolute-iri/lib/Resolve.js","webpack://Comunica/../../node_modules/safe-buffer/index.js","webpack://Comunica/../../node_modules/shaclc-parse/lib/ShaclcParser.js","webpack://Comunica/../../node_modules/shaclc-parse/lib/index.js","webpack://Comunica/../../node_modules/shaclc-write/dist/ShaclcGenerator.js","webpack://Comunica/../../node_modules/shaclc-write/dist/base-prefixes.js","webpack://Comunica/../../node_modules/shaclc-write/dist/index.js","webpack://Comunica/../../node_modules/shaclc-write/dist/node-param.js","webpack://Comunica/../../node_modules/shaclc-write/dist/property-param .js","webpack://Comunica/../../node_modules/shaclc-write/dist/utils.js","webpack://Comunica/../../node_modules/shaclc-write/dist/volatile-store.js","webpack://Comunica/../../node_modules/shaclc-write/dist/writer.js","webpack://Comunica/../../node_modules/spark-md5/spark-md5.js","webpack://Comunica/../../node_modules/sparqlalgebrajs/index.js","webpack://Comunica/../../node_modules/sparqlalgebrajs/lib/algebra.js","webpack://Comunica/../../node_modules/sparqlalgebrajs/lib/factory.js","webpack://Comunica/../../node_modules/sparqlalgebrajs/lib/sparql.js","webpack://Comunica/../../node_modules/sparqlalgebrajs/lib/sparqlAlgebra.js","webpack://Comunica/../../node_modules/sparqlalgebrajs/lib/util.js","webpack://Comunica/../../node_modules/sparqljs/lib/SparqlGenerator.js","webpack://Comunica/../../node_modules/sparqljs/lib/SparqlParser.js","webpack://Comunica/../../node_modules/sparqljs/lib/Wildcard.js","webpack://Comunica/../../node_modules/sparqljs/sparql.js","webpack://Comunica/../../node_modules/sparqljson-parse/index.js","webpack://Comunica/../../node_modules/sparqljson-parse/lib/SparqlJsonParser.js","webpack://Comunica/../../node_modules/sparqljson-to-tree/index.js","webpack://Comunica/../../node_modules/sparqljson-to-tree/lib/Converter.js","webpack://Comunica/../../node_modules/sparqlxml-parse/index.js","webpack://Comunica/../../node_modules/sparqlxml-parse/lib/SparqlXmlParser.js","webpack://Comunica/../../node_modules/stream-to-string/index.js","webpack://Comunica/../../node_modules/string_decoder/lib/string_decoder.js","webpack://Comunica/../../node_modules/uritemplate/bin/uritemplate.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/index.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/md5.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/native.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/nil.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/parse.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/regex.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/rng.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/sha1.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/stringify.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/v1.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/v3.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/v35.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/v4.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/v5.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/validate.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/version.js","webpack://Comunica/../../node_modules/validate-iri/index.js","webpack://Comunica/../../node_modules/validate-iri/lib/Validate.js","webpack://Comunica/../../node_modules/web-streams-ponyfill/dist/polyfill-ie11.min.js","webpack://Comunica/../../node_modules/xmlchars/xml/1.0/ed5.js","webpack://Comunica/../../node_modules/xmlchars/xml/1.1/ed2.js","webpack://Comunica/../../node_modules/xmlchars/xmlns/1.0/ed3.js","webpack://Comunica/../../packages/actor-rdf-parse-html/node_modules/htmlparser2/lib/Parser.js","webpack://Comunica/../../packages/actor-rdf-parse-html/node_modules/htmlparser2/lib/Tokenizer.js","webpack://Comunica/../../packages/actor-rdf-parse-html/node_modules/htmlparser2/lib/index.js","webpack://Comunica/../../node_modules/asynciterator/dist/asynciterator.js","webpack://Comunica/../../node_modules/asynciterator/dist/linkedlist.js","webpack://Comunica/../../node_modules/asynciterator/dist/taskscheduler.js","webpack://Comunica/../../node_modules/lru-cache/dist/commonjs/index.js","webpack://Comunica/../../node_modules/readable-from-web/lib/ReadableFromWeb.js","webpack://Comunica/../../node_modules/readable-from-web/lib/index.js","webpack://Comunica/webpack/bootstrap","webpack://Comunica/webpack/runtime/compat get default export","webpack://Comunica/webpack/runtime/define property getters","webpack://Comunica/webpack/runtime/global","webpack://Comunica/webpack/runtime/hasOwnProperty shorthand","webpack://Comunica/webpack/runtime/make namespace object","webpack://Comunica/webpack/startup"],"sourcesContent":["var { Buffer } = require('buffer')\n// Named constants with unique integer values\nvar C = {};\n// Tokens\nvar LEFT_BRACE = C.LEFT_BRACE = 0x1;\nvar RIGHT_BRACE = C.RIGHT_BRACE = 0x2;\nvar LEFT_BRACKET = C.LEFT_BRACKET = 0x3;\nvar RIGHT_BRACKET = C.RIGHT_BRACKET = 0x4;\nvar COLON = C.COLON = 0x5;\nvar COMMA = C.COMMA = 0x6;\nvar TRUE = C.TRUE = 0x7;\nvar FALSE = C.FALSE = 0x8;\nvar NULL = C.NULL = 0x9;\nvar STRING = C.STRING = 0xa;\nvar NUMBER = C.NUMBER = 0xb;\n// Tokenizer States\nvar START = C.START = 0x11;\nvar STOP = C.STOP = 0x12;\nvar TRUE1 = C.TRUE1 = 0x21;\nvar TRUE2 = C.TRUE2 = 0x22;\nvar TRUE3 = C.TRUE3 = 0x23;\nvar FALSE1 = C.FALSE1 = 0x31;\nvar FALSE2 = C.FALSE2 = 0x32;\nvar FALSE3 = C.FALSE3 = 0x33;\nvar FALSE4 = C.FALSE4 = 0x34;\nvar NULL1 = C.NULL1 = 0x41;\nvar NULL2 = C.NULL2 = 0x42;\nvar NULL3 = C.NULL3 = 0x43;\nvar NUMBER1 = C.NUMBER1 = 0x51;\nvar NUMBER3 = C.NUMBER3 = 0x53;\nvar STRING1 = C.STRING1 = 0x61;\nvar STRING2 = C.STRING2 = 0x62;\nvar STRING3 = C.STRING3 = 0x63;\nvar STRING4 = C.STRING4 = 0x64;\nvar STRING5 = C.STRING5 = 0x65;\nvar STRING6 = C.STRING6 = 0x66;\n// Parser States\nvar VALUE = C.VALUE = 0x71;\nvar KEY = C.KEY = 0x72;\n// Parser Modes\nvar OBJECT = C.OBJECT = 0x81;\nvar ARRAY = C.ARRAY = 0x82;\n// Character constants\nvar BACK_SLASH = \"\\\\\".charCodeAt(0);\nvar FORWARD_SLASH = \"\\/\".charCodeAt(0);\nvar BACKSPACE = \"\\b\".charCodeAt(0);\nvar FORM_FEED = \"\\f\".charCodeAt(0);\nvar NEWLINE = \"\\n\".charCodeAt(0);\nvar CARRIAGE_RETURN = \"\\r\".charCodeAt(0);\nvar TAB = \"\\t\".charCodeAt(0);\n\nvar STRING_BUFFER_SIZE = 64 * 1024;\n\nfunction alloc(size) {\n return Buffer.alloc ? Buffer.alloc(size) : new Buffer(size);\n}\n\nfunction Parser() {\n this.tState = START;\n this.value = undefined;\n\n this.string = undefined; // string data\n this.stringBuffer = alloc(STRING_BUFFER_SIZE);\n this.stringBufferOffset = 0;\n this.unicode = undefined; // unicode escapes\n this.highSurrogate = undefined;\n\n this.key = undefined;\n this.mode = undefined;\n this.stack = [];\n this.state = VALUE;\n this.bytes_remaining = 0; // number of bytes remaining in multi byte utf8 char to read after split boundary\n this.bytes_in_sequence = 0; // bytes in multi byte utf8 char to read\n this.temp_buffs = { \"2\": alloc(2), \"3\": alloc(3), \"4\": alloc(4) }; // for rebuilding chars split before boundary is reached\n\n // Stream offset\n this.offset = -1;\n}\n\n// Slow code to string converter (only used when throwing syntax errors)\nParser.toknam = function (code) {\n var keys = Object.keys(C);\n for (var i = 0, l = keys.length; i < l; i++) {\n var key = keys[i];\n if (C[key] === code) { return key; }\n }\n return code && (\"0x\" + code.toString(16));\n};\n\nvar proto = Parser.prototype;\nproto.onError = function (err) { throw err; };\nproto.charError = function (buffer, i) {\n this.tState = STOP;\n this.onError(new Error(\"Unexpected \" + JSON.stringify(String.fromCharCode(buffer[i])) + \" at position \" + i + \" in state \" + Parser.toknam(this.tState)));\n};\nproto.appendStringChar = function (char) {\n if (this.stringBufferOffset >= STRING_BUFFER_SIZE) {\n this.string += this.stringBuffer.toString('utf8');\n this.stringBufferOffset = 0;\n }\n\n this.stringBuffer[this.stringBufferOffset++] = char;\n};\nproto.appendStringBuf = function (buf, start, end) {\n var size = buf.length;\n if (typeof start === 'number') {\n if (typeof end === 'number') {\n if (end < 0) {\n // adding a negative end decreeses the size\n size = buf.length - start + end;\n } else {\n size = end - start;\n }\n } else {\n size = buf.length - start;\n }\n }\n\n if (size < 0) {\n size = 0;\n }\n\n if (this.stringBufferOffset + size > STRING_BUFFER_SIZE) {\n this.string += this.stringBuffer.toString('utf8', 0, this.stringBufferOffset);\n this.stringBufferOffset = 0;\n }\n\n buf.copy(this.stringBuffer, this.stringBufferOffset, start, end);\n this.stringBufferOffset += size;\n};\nproto.write = function (buffer) {\n if (typeof buffer === \"string\") buffer = new Buffer(buffer);\n var n;\n for (var i = 0, l = buffer.length; i < l; i++) {\n if (this.tState === START){\n n = buffer[i];\n this.offset++;\n if(n === 0x7b){ this.onToken(LEFT_BRACE, \"{\"); // {\n }else if(n === 0x7d){ this.onToken(RIGHT_BRACE, \"}\"); // }\n }else if(n === 0x5b){ this.onToken(LEFT_BRACKET, \"[\"); // [\n }else if(n === 0x5d){ this.onToken(RIGHT_BRACKET, \"]\"); // ]\n }else if(n === 0x3a){ this.onToken(COLON, \":\"); // :\n }else if(n === 0x2c){ this.onToken(COMMA, \",\"); // ,\n }else if(n === 0x74){ this.tState = TRUE1; // t\n }else if(n === 0x66){ this.tState = FALSE1; // f\n }else if(n === 0x6e){ this.tState = NULL1; // n\n }else if(n === 0x22){ // \"\n this.string = \"\";\n this.stringBufferOffset = 0;\n this.tState = STRING1;\n }else if(n === 0x2d){ this.string = \"-\"; this.tState = NUMBER1; // -\n }else{\n if (n >= 0x30 && n < 0x40) { // 1-9\n this.string = String.fromCharCode(n); this.tState = NUMBER3;\n } else if (n === 0x20 || n === 0x09 || n === 0x0a || n === 0x0d) {\n // whitespace\n } else {\n return this.charError(buffer, i);\n }\n }\n }else if (this.tState === STRING1){ // After open quote\n n = buffer[i]; // get current byte from buffer\n // check for carry over of a multi byte char split between data chunks\n // & fill temp buffer it with start of this data chunk up to the boundary limit set in the last iteration\n if (this.bytes_remaining > 0) {\n for (var j = 0; j < this.bytes_remaining; j++) {\n this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence - this.bytes_remaining + j] = buffer[j];\n }\n\n this.appendStringBuf(this.temp_buffs[this.bytes_in_sequence]);\n this.bytes_in_sequence = this.bytes_remaining = 0;\n i = i + j - 1;\n } else if (this.bytes_remaining === 0 && n >= 128) { // else if no remainder bytes carried over, parse multi byte (>=128) chars one at a time\n if (n <= 193 || n > 244) {\n return this.onError(new Error(\"Invalid UTF-8 character at position \" + i + \" in state \" + Parser.toknam(this.tState)));\n }\n if ((n >= 194) && (n <= 223)) this.bytes_in_sequence = 2;\n if ((n >= 224) && (n <= 239)) this.bytes_in_sequence = 3;\n if ((n >= 240) && (n <= 244)) this.bytes_in_sequence = 4;\n if ((this.bytes_in_sequence + i) > buffer.length) { // if bytes needed to complete char fall outside buffer length, we have a boundary split\n for (var k = 0; k <= (buffer.length - 1 - i); k++) {\n this.temp_buffs[this.bytes_in_sequence][k] = buffer[i + k]; // fill temp buffer of correct size with bytes available in this chunk\n }\n this.bytes_remaining = (i + this.bytes_in_sequence) - buffer.length;\n i = buffer.length - 1;\n } else {\n this.appendStringBuf(buffer, i, i + this.bytes_in_sequence);\n i = i + this.bytes_in_sequence - 1;\n }\n } else if (n === 0x22) {\n this.tState = START;\n this.string += this.stringBuffer.toString('utf8', 0, this.stringBufferOffset);\n this.stringBufferOffset = 0;\n this.onToken(STRING, this.string);\n this.offset += Buffer.byteLength(this.string, 'utf8') + 1;\n this.string = undefined;\n }\n else if (n === 0x5c) {\n this.tState = STRING2;\n }\n else if (n >= 0x20) { this.appendStringChar(n); }\n else {\n return this.charError(buffer, i);\n }\n }else if (this.tState === STRING2){ // After backslash\n n = buffer[i];\n if(n === 0x22){ this.appendStringChar(n); this.tState = STRING1;\n }else if(n === 0x5c){ this.appendStringChar(BACK_SLASH); this.tState = STRING1;\n }else if(n === 0x2f){ this.appendStringChar(FORWARD_SLASH); this.tState = STRING1;\n }else if(n === 0x62){ this.appendStringChar(BACKSPACE); this.tState = STRING1;\n }else if(n === 0x66){ this.appendStringChar(FORM_FEED); this.tState = STRING1;\n }else if(n === 0x6e){ this.appendStringChar(NEWLINE); this.tState = STRING1;\n }else if(n === 0x72){ this.appendStringChar(CARRIAGE_RETURN); this.tState = STRING1;\n }else if(n === 0x74){ this.appendStringChar(TAB); this.tState = STRING1;\n }else if(n === 0x75){ this.unicode = \"\"; this.tState = STRING3;\n }else{\n return this.charError(buffer, i);\n }\n }else if (this.tState === STRING3 || this.tState === STRING4 || this.tState === STRING5 || this.tState === STRING6){ // unicode hex codes\n n = buffer[i];\n // 0-9 A-F a-f\n if ((n >= 0x30 && n < 0x40) || (n > 0x40 && n <= 0x46) || (n > 0x60 && n <= 0x66)) {\n this.unicode += String.fromCharCode(n);\n if (this.tState++ === STRING6) {\n var intVal = parseInt(this.unicode, 16);\n this.unicode = undefined;\n if (this.highSurrogate !== undefined && intVal >= 0xDC00 && intVal < (0xDFFF + 1)) { //<56320,57343> - lowSurrogate\n this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate, intVal)));\n this.highSurrogate = undefined;\n } else if (this.highSurrogate === undefined && intVal >= 0xD800 && intVal < (0xDBFF + 1)) { //<55296,56319> - highSurrogate\n this.highSurrogate = intVal;\n } else {\n if (this.highSurrogate !== undefined) {\n this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate)));\n this.highSurrogate = undefined;\n }\n this.appendStringBuf(new Buffer(String.fromCharCode(intVal)));\n }\n this.tState = STRING1;\n }\n } else {\n return this.charError(buffer, i);\n }\n } else if (this.tState === NUMBER1 || this.tState === NUMBER3) {\n n = buffer[i];\n\n switch (n) {\n case 0x30: // 0\n case 0x31: // 1\n case 0x32: // 2\n case 0x33: // 3\n case 0x34: // 4\n case 0x35: // 5\n case 0x36: // 6\n case 0x37: // 7\n case 0x38: // 8\n case 0x39: // 9\n case 0x2e: // .\n case 0x65: // e\n case 0x45: // E\n case 0x2b: // +\n case 0x2d: // -\n this.string += String.fromCharCode(n);\n this.tState = NUMBER3;\n break;\n default:\n this.tState = START;\n var error = this.numberReviver(this.string);\n if (error){\n return error;\n }\n\n this.offset += this.string.length - 1;\n this.string = undefined;\n i--;\n break;\n }\n }else if (this.tState === TRUE1){ // r\n if (buffer[i] === 0x72) { this.tState = TRUE2; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === TRUE2){ // u\n if (buffer[i] === 0x75) { this.tState = TRUE3; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === TRUE3){ // e\n if (buffer[i] === 0x65) { this.tState = START; this.onToken(TRUE, true); this.offset+= 3; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === FALSE1){ // a\n if (buffer[i] === 0x61) { this.tState = FALSE2; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === FALSE2){ // l\n if (buffer[i] === 0x6c) { this.tState = FALSE3; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === FALSE3){ // s\n if (buffer[i] === 0x73) { this.tState = FALSE4; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === FALSE4){ // e\n if (buffer[i] === 0x65) { this.tState = START; this.onToken(FALSE, false); this.offset+= 4; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === NULL1){ // u\n if (buffer[i] === 0x75) { this.tState = NULL2; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === NULL2){ // l\n if (buffer[i] === 0x6c) { this.tState = NULL3; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === NULL3){ // l\n if (buffer[i] === 0x6c) { this.tState = START; this.onToken(NULL, null); this.offset += 3; }\n else { return this.charError(buffer, i); }\n }\n }\n};\nproto.onToken = function (token, value) {\n // Override this to get events\n};\n\nproto.parseError = function (token, value) {\n this.tState = STOP;\n this.onError(new Error(\"Unexpected \" + Parser.toknam(token) + (value ? (\"(\" + JSON.stringify(value) + \")\") : \"\") + \" in state \" + Parser.toknam(this.state)));\n};\nproto.push = function () {\n this.stack.push({value: this.value, key: this.key, mode: this.mode});\n};\nproto.pop = function () {\n var value = this.value;\n var parent = this.stack.pop();\n this.value = parent.value;\n this.key = parent.key;\n this.mode = parent.mode;\n this.emit(value);\n if (!this.mode) { this.state = VALUE; }\n};\nproto.emit = function (value) {\n if (this.mode) { this.state = COMMA; }\n this.onValue(value);\n};\nproto.onValue = function (value) {\n // Override me\n};\nproto.onToken = function (token, value) {\n if(this.state === VALUE){\n if(token === STRING || token === NUMBER || token === TRUE || token === FALSE || token === NULL){\n if (this.value) {\n this.value[this.key] = value;\n }\n this.emit(value);\n }else if(token === LEFT_BRACE){\n this.push();\n if (this.value) {\n this.value = this.value[this.key] = {};\n } else {\n this.value = {};\n }\n this.key = undefined;\n this.state = KEY;\n this.mode = OBJECT;\n }else if(token === LEFT_BRACKET){\n this.push();\n if (this.value) {\n this.value = this.value[this.key] = [];\n } else {\n this.value = [];\n }\n this.key = 0;\n this.mode = ARRAY;\n this.state = VALUE;\n }else if(token === RIGHT_BRACE){\n if (this.mode === OBJECT) {\n this.pop();\n } else {\n return this.parseError(token, value);\n }\n }else if(token === RIGHT_BRACKET){\n if (this.mode === ARRAY) {\n this.pop();\n } else {\n return this.parseError(token, value);\n }\n }else{\n return this.parseError(token, value);\n }\n }else if(this.state === KEY){\n if (token === STRING) {\n this.key = value;\n this.state = COLON;\n } else if (token === RIGHT_BRACE) {\n this.pop();\n } else {\n return this.parseError(token, value);\n }\n }else if(this.state === COLON){\n if (token === COLON) { this.state = VALUE; }\n else { return this.parseError(token, value); }\n }else if(this.state === COMMA){\n if (token === COMMA) {\n if (this.mode === ARRAY) { this.key++; this.state = VALUE; }\n else if (this.mode === OBJECT) { this.state = KEY; }\n\n } else if (token === RIGHT_BRACKET && this.mode === ARRAY || token === RIGHT_BRACE && this.mode === OBJECT) {\n this.pop();\n } else {\n return this.parseError(token, value);\n }\n }else{\n return this.parseError(token, value);\n }\n};\n\n// Override to implement your own number reviver.\n// Any value returned is treated as error and will interrupt parsing.\nproto.numberReviver = function (text) {\n var result = Number(text);\n\n if (isNaN(result)) {\n return this.charError(buffer, i);\n }\n\n if ((text.match(/[0-9]+/) == text) && (result.toString() != text)) {\n // Long string of digits which is an ID string and not valid and/or safe JavaScript integer Number\n this.onToken(STRING, text);\n } else {\n this.onToken(NUMBER, result);\n }\n}\n\nParser.C = C;\n\nmodule.exports = Parser;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fragment = void 0;\nfunction getFragment(inputStr) {\n let str = inputStr;\n if (str.endsWith('/') || str.endsWith('#')) {\n str = str.slice(0, str.length - 1);\n }\n const args = [];\n if (str.lastIndexOf('/') > 0) {\n args.push(str.lastIndexOf('/'));\n }\n if (str.lastIndexOf('#') > 0) {\n args.push(str.lastIndexOf('#'));\n }\n const i = Math.max(...args);\n return str.slice(i + 1);\n}\nfunction camelize(str) {\n var _a;\n const res = (_a = str\n .split(/[^a-z0-9]+/ig)\n .filter((s) => s !== '')\n .map((s) => s[0].toUpperCase() + s.slice(1))\n .join('')\n // Make sure the prefix does not start with a number\n .match(/[a-z][a-z0-9]+/ig)) === null || _a === void 0 ? void 0 : _a[0];\n // Include 'v' so we always return something matching the pattern\n // [a-z][a-z0-9]+\n return typeof res === 'undefined' ? undefined : res[0].toLowerCase() + res.slice(1);\n}\nfunction fragment(str) {\n let value = getFragment(str);\n value = value ? camelize(value) : undefined;\n return value || 'v';\n}\nexports.fragment = fragment;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lookupAllPrefixes = exports.prefixToUri = exports.uriToPrefix = void 0;\nconst fragment_1 = require(\"./fragment\");\nconst lookup_1 = require(\"./lookup\");\nfunction uriToPrefix(uri, options) {\n return __awaiter(this, void 0, void 0, function* () {\n let result;\n // Collect the prefix\n try {\n result = yield (0, lookup_1.lookupPrefix)(uri, options);\n }\n catch (_a) {\n if (options === null || options === void 0 ? void 0 : options.mintOnUnknown) {\n // Keep prefixes at most 4 characters long when minting a new one\n result = (0, fragment_1.fragment)(uri).slice(0, 4);\n }\n }\n // If there is a bank of existing prefixes make sure to make a unique one\n // by postfixing a number\n if (typeof result !== 'undefined'\n && typeof (options === null || options === void 0 ? void 0 : options.existingPrefixes) === 'object'\n && result in options.existingPrefixes) {\n let i = 0;\n while (`${result}${i}` in options.existingPrefixes) {\n i += 1;\n }\n result = `${result}${i}`;\n }\n return result;\n });\n}\nexports.uriToPrefix = uriToPrefix;\n/**\n * Lookup the namespace commonly associated with a given prefix\n * @param prefix The prefix to lookup the namespace for\n * @param options You can optionally pass a custom fetch function\n */\nfunction prefixToUri(prefix, options) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // The await needs to be here so that we can return undefined on rejection\n return yield (0, lookup_1.lookupUri)(prefix, options);\n }\n catch (_a) {\n return undefined;\n }\n });\n}\nexports.prefixToUri = prefixToUri;\nvar lookup_2 = require(\"./lookup\");\nObject.defineProperty(exports, \"lookupAllPrefixes\", { enumerable: true, get: function () { return lookup_2.lookupAllPrefixes; } });\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fetchContext = exports.fetchJson = void 0;\n// TODO: Use universal fetch here\nconst cross_fetch_1 = require(\"cross-fetch\");\nfunction fetchJson(url, options) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n // Select the correct fetch function\n const fetchFn = (_a = options === null || options === void 0 ? void 0 : options.fetch) !== null && _a !== void 0 ? _a : cross_fetch_1.fetch;\n return (yield fetchFn(url)).json();\n });\n}\nexports.fetchJson = fetchJson;\nfunction fetchContext(url, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return (yield fetchJson(url, options))['@context'];\n });\n}\nexports.fetchContext = fetchContext;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lookupNamespace\"), exports);\n__exportStar(require(\"./lookupPrefix\"), exports);\n__exportStar(require(\"./lookupAllPrefixes\"), exports);\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lookupAllPrefixes = void 0;\nconst fetchContext_1 = require(\"./fetchContext\");\n/**\n * Use prefix.cc to look up all recorded prefixes\n */\nfunction lookupAllPrefixes(options) {\n return __awaiter(this, void 0, void 0, function* () {\n return (0, fetchContext_1.fetchContext)('https://prefix.cc/context', options);\n });\n}\nexports.lookupAllPrefixes = lookupAllPrefixes;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lookupUri = void 0;\nconst fetchContext_1 = require(\"./fetchContext\");\n/**\n * Use prefix.cc to look up the namespace associated with a given prefix.\n * Errors if one cannot be found.\n *\n * @param prefix The prefix of which to obtain the namespace\n * @param options Optional fetch function to use\n */\nfunction lookupUri(prefix, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const uri = (yield (0, fetchContext_1.fetchContext)(`https://prefix.cc/${prefix}.file.jsonld`, options))[prefix];\n if (typeof uri !== 'string') {\n throw new Error(`Expected uri to be a string, received: ${uri} of type ${typeof uri}`);\n }\n return uri;\n });\n}\nexports.lookupUri = lookupUri;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lookupPrefix = void 0;\nconst fetchContext_1 = require(\"./fetchContext\");\n/**\n * Use prefix.cc to look up the prefix for a URI namespace, rejects if there is an error in\n * looking up the prefix, or if no prefixes are returned\n *\n * @param uri The URI to obtain a prefix for\n * @param options Optional fetch function to use\n */\nfunction lookupPrefix(uri, options) {\n return __awaiter(this, void 0, void 0, function* () {\n // Create the correct url to lookup including search parameters\n const url = new URL('https://prefix.cc/reverse');\n url.searchParams.append('uri', uri);\n url.searchParams.append('format', 'jsonld');\n const prefixes = Object.keys(yield (0, fetchContext_1.fetchContext)(url, options));\n if (prefixes.length === 0) {\n throw new Error('No prefixes returned');\n }\n return prefixes[0];\n });\n}\nexports.lookupPrefix = lookupPrefix;\n","var global = typeof self !== 'undefined' ? self : this;\nvar __self__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = global.DOMException\n}\nF.prototype = global;\nreturn new F();\n})();\n(function(self) {\n\nvar irrelevant = (function (exports) {\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = 'statusText' in options ? options.statusText : 'OK';\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = self.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options));\n };\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.onabort = function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n };\n\n xhr.open(request.method, request.url, true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob';\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!self.fetch) {\n self.fetch = fetch;\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n})({});\n})(__self__);\n__self__.fetch.ponyfill = true;\n// Remove \"polyfill\" property added by whatwg-fetch\ndelete __self__.fetch.polyfill;\n// Choose between native implementation (global) or custom implementation (__self__)\n// var ctx = global.fetch ? global : __self__;\nvar ctx = __self__; // this line disable service worker support temporarily\nexports = ctx.fetch // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers\nexports.Request = ctx.Request\nexports.Response = ctx.Response\nmodule.exports = exports\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SaxesParser = exports.EVENTS = void 0;\nconst ed5 = require(\"xmlchars/xml/1.0/ed5\");\nconst ed2 = require(\"xmlchars/xml/1.1/ed2\");\nconst NSed3 = require(\"xmlchars/xmlns/1.0/ed3\");\nvar isS = ed5.isS;\nvar isChar10 = ed5.isChar;\nvar isNameStartChar = ed5.isNameStartChar;\nvar isNameChar = ed5.isNameChar;\nvar S_LIST = ed5.S_LIST;\nvar NAME_RE = ed5.NAME_RE;\nvar isChar11 = ed2.isChar;\nvar isNCNameStartChar = NSed3.isNCNameStartChar;\nvar isNCNameChar = NSed3.isNCNameChar;\nvar NC_NAME_RE = NSed3.NC_NAME_RE;\nconst XML_NAMESPACE = \"http://www.w3.org/XML/1998/namespace\";\nconst XMLNS_NAMESPACE = \"http://www.w3.org/2000/xmlns/\";\nconst rootNS = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment\n __proto__: null,\n xml: XML_NAMESPACE,\n xmlns: XMLNS_NAMESPACE,\n};\nconst XML_ENTITIES = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment\n __proto__: null,\n amp: \"&\",\n gt: \">\",\n lt: \"<\",\n quot: \"\\\"\",\n apos: \"'\",\n};\n// EOC: end-of-chunk\nconst EOC = -1;\nconst NL_LIKE = -2;\nconst S_BEGIN = 0; // Initial state.\nconst S_BEGIN_WHITESPACE = 1; // leading whitespace\nconst S_DOCTYPE = 2; // \nconst TAB = 9;\nconst NL = 0xA;\nconst CR = 0xD;\nconst SPACE = 0x20;\nconst BANG = 0x21;\nconst DQUOTE = 0x22;\nconst AMP = 0x26;\nconst SQUOTE = 0x27;\nconst MINUS = 0x2D;\nconst FORWARD_SLASH = 0x2F;\nconst SEMICOLON = 0x3B;\nconst LESS = 0x3C;\nconst EQUAL = 0x3D;\nconst GREATER = 0x3E;\nconst QUESTION = 0x3F;\nconst OPEN_BRACKET = 0x5B;\nconst CLOSE_BRACKET = 0x5D;\nconst NEL = 0x85;\nconst LS = 0x2028; // Line Separator\nconst isQuote = (c) => c === DQUOTE || c === SQUOTE;\nconst QUOTES = [DQUOTE, SQUOTE];\nconst DOCTYPE_TERMINATOR = [...QUOTES, OPEN_BRACKET, GREATER];\nconst DTD_TERMINATOR = [...QUOTES, LESS, CLOSE_BRACKET];\nconst XML_DECL_NAME_TERMINATOR = [EQUAL, QUESTION, ...S_LIST];\nconst ATTRIB_VALUE_UNQUOTED_TERMINATOR = [...S_LIST, GREATER, AMP, LESS];\nfunction nsPairCheck(parser, prefix, uri) {\n switch (prefix) {\n case \"xml\":\n if (uri !== XML_NAMESPACE) {\n parser.fail(`xml prefix must be bound to ${XML_NAMESPACE}.`);\n }\n break;\n case \"xmlns\":\n if (uri !== XMLNS_NAMESPACE) {\n parser.fail(`xmlns prefix must be bound to ${XMLNS_NAMESPACE}.`);\n }\n break;\n default:\n }\n switch (uri) {\n case XMLNS_NAMESPACE:\n parser.fail(prefix === \"\" ?\n `the default namespace may not be set to ${uri}.` :\n `may not assign a prefix (even \"xmlns\") to the URI \\\n${XMLNS_NAMESPACE}.`);\n break;\n case XML_NAMESPACE:\n switch (prefix) {\n case \"xml\":\n // Assinging the XML namespace to \"xml\" is fine.\n break;\n case \"\":\n parser.fail(`the default namespace may not be set to ${uri}.`);\n break;\n default:\n parser.fail(\"may not assign the xml namespace to another prefix.\");\n }\n break;\n default:\n }\n}\nfunction nsMappingCheck(parser, mapping) {\n for (const local of Object.keys(mapping)) {\n nsPairCheck(parser, local, mapping[local]);\n }\n}\nconst isNCName = (name) => NC_NAME_RE.test(name);\nconst isName = (name) => NAME_RE.test(name);\nconst FORBIDDEN_START = 0;\nconst FORBIDDEN_BRACKET = 1;\nconst FORBIDDEN_BRACKET_BRACKET = 2;\n/**\n * The list of supported events.\n */\nexports.EVENTS = [\n \"xmldecl\",\n \"text\",\n \"processinginstruction\",\n \"doctype\",\n \"comment\",\n \"opentagstart\",\n \"attribute\",\n \"opentag\",\n \"closetag\",\n \"cdata\",\n \"error\",\n \"end\",\n \"ready\",\n];\nconst EVENT_NAME_TO_HANDLER_NAME = {\n xmldecl: \"xmldeclHandler\",\n text: \"textHandler\",\n processinginstruction: \"piHandler\",\n doctype: \"doctypeHandler\",\n comment: \"commentHandler\",\n opentagstart: \"openTagStartHandler\",\n attribute: \"attributeHandler\",\n opentag: \"openTagHandler\",\n closetag: \"closeTagHandler\",\n cdata: \"cdataHandler\",\n error: \"errorHandler\",\n end: \"endHandler\",\n ready: \"readyHandler\",\n};\n// eslint-disable-next-line @typescript-eslint/ban-types\nclass SaxesParser {\n /**\n * Indicates whether or not the parser is closed. If ``true``, wait for\n * the ``ready`` event to write again.\n */\n get closed() {\n return this._closed;\n }\n /**\n * @param opt The parser options.\n */\n constructor(opt) {\n this.opt = opt !== null && opt !== void 0 ? opt : {};\n this.fragmentOpt = !!this.opt.fragment;\n const xmlnsOpt = this.xmlnsOpt = !!this.opt.xmlns;\n this.trackPosition = this.opt.position !== false;\n this.fileName = this.opt.fileName;\n if (xmlnsOpt) {\n // This is the function we use to perform name checks on PIs and entities.\n // When namespaces are used, colons are not allowed in PI target names or\n // entity names. So the check depends on whether namespaces are used. See:\n //\n // https://www.w3.org/XML/xml-names-19990114-errata.html\n // NE08\n //\n this.nameStartCheck = isNCNameStartChar;\n this.nameCheck = isNCNameChar;\n this.isName = isNCName;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.processAttribs = this.processAttribsNS;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.pushAttrib = this.pushAttribNS;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment\n this.ns = Object.assign({ __proto__: null }, rootNS);\n const additional = this.opt.additionalNamespaces;\n if (additional != null) {\n nsMappingCheck(this, additional);\n Object.assign(this.ns, additional);\n }\n }\n else {\n this.nameStartCheck = isNameStartChar;\n this.nameCheck = isNameChar;\n this.isName = isName;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.processAttribs = this.processAttribsPlain;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.pushAttrib = this.pushAttribPlain;\n }\n //\n // The order of the members in this table needs to correspond to the state\n // numbers given to the states that correspond to the methods being recorded\n // here.\n //\n this.stateTable = [\n /* eslint-disable @typescript-eslint/unbound-method */\n this.sBegin,\n this.sBeginWhitespace,\n this.sDoctype,\n this.sDoctypeQuote,\n this.sDTD,\n this.sDTDQuoted,\n this.sDTDOpenWaka,\n this.sDTDOpenWakaBang,\n this.sDTDComment,\n this.sDTDCommentEnding,\n this.sDTDCommentEnded,\n this.sDTDPI,\n this.sDTDPIEnding,\n this.sText,\n this.sEntity,\n this.sOpenWaka,\n this.sOpenWakaBang,\n this.sComment,\n this.sCommentEnding,\n this.sCommentEnded,\n this.sCData,\n this.sCDataEnding,\n this.sCDataEnding2,\n this.sPIFirstChar,\n this.sPIRest,\n this.sPIBody,\n this.sPIEnding,\n this.sXMLDeclNameStart,\n this.sXMLDeclName,\n this.sXMLDeclEq,\n this.sXMLDeclValueStart,\n this.sXMLDeclValue,\n this.sXMLDeclSeparator,\n this.sXMLDeclEnding,\n this.sOpenTag,\n this.sOpenTagSlash,\n this.sAttrib,\n this.sAttribName,\n this.sAttribNameSawWhite,\n this.sAttribValue,\n this.sAttribValueQuoted,\n this.sAttribValueClosed,\n this.sAttribValueUnquoted,\n this.sCloseTag,\n this.sCloseTagSawWhite,\n /* eslint-enable @typescript-eslint/unbound-method */\n ];\n this._init();\n }\n _init() {\n var _a;\n this.openWakaBang = \"\";\n this.text = \"\";\n this.name = \"\";\n this.piTarget = \"\";\n this.entity = \"\";\n this.q = null;\n this.tags = [];\n this.tag = null;\n this.topNS = null;\n this.chunk = \"\";\n this.chunkPosition = 0;\n this.i = 0;\n this.prevI = 0;\n this.carriedFromPrevious = undefined;\n this.forbiddenState = FORBIDDEN_START;\n this.attribList = [];\n // The logic is organized so as to minimize the need to check\n // this.opt.fragment while parsing.\n const { fragmentOpt } = this;\n this.state = fragmentOpt ? S_TEXT : S_BEGIN;\n // We want these to be all true if we are dealing with a fragment.\n this.reportedTextBeforeRoot = this.reportedTextAfterRoot = this.closedRoot =\n this.sawRoot = fragmentOpt;\n // An XML declaration is intially possible only when parsing whole\n // documents.\n this.xmlDeclPossible = !fragmentOpt;\n this.xmlDeclExpects = [\"version\"];\n this.entityReturnState = undefined;\n let { defaultXMLVersion } = this.opt;\n if (defaultXMLVersion === undefined) {\n if (this.opt.forceXMLVersion === true) {\n throw new Error(\"forceXMLVersion set but defaultXMLVersion is not set\");\n }\n defaultXMLVersion = \"1.0\";\n }\n this.setXMLVersion(defaultXMLVersion);\n this.positionAtNewLine = 0;\n this.doctype = false;\n this._closed = false;\n this.xmlDecl = {\n version: undefined,\n encoding: undefined,\n standalone: undefined,\n };\n this.line = 1;\n this.column = 0;\n this.ENTITIES = Object.create(XML_ENTITIES);\n (_a = this.readyHandler) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n /**\n * The stream position the parser is currently looking at. This field is\n * zero-based.\n *\n * This field is not based on counting Unicode characters but is to be\n * interpreted as a plain index into a JavaScript string.\n */\n get position() {\n return this.chunkPosition + this.i;\n }\n /**\n * The column number of the next character to be read by the parser. *\n * This field is zero-based. (The first column in a line is 0.)\n *\n * This field reports the index at which the next character would be in the\n * line if the line were represented as a JavaScript string. Note that this\n * *can* be different to a count based on the number of *Unicode characters*\n * due to how JavaScript handles astral plane characters.\n *\n * See [[column]] for a number that corresponds to a count of Unicode\n * characters.\n */\n get columnIndex() {\n return this.position - this.positionAtNewLine;\n }\n /**\n * Set an event listener on an event. The parser supports one handler per\n * event type. If you try to set an event handler over an existing handler,\n * the old handler is silently overwritten.\n *\n * @param name The event to listen to.\n *\n * @param handler The handler to set.\n */\n on(name, handler) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n this[EVENT_NAME_TO_HANDLER_NAME[name]] = handler;\n }\n /**\n * Unset an event handler.\n *\n * @parma name The event to stop listening to.\n */\n off(name) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n this[EVENT_NAME_TO_HANDLER_NAME[name]] = undefined;\n }\n /**\n * Make an error object. The error object will have a message that contains\n * the ``fileName`` option passed at the creation of the parser. If position\n * tracking was turned on, it will also have line and column number\n * information.\n *\n * @param message The message describing the error to report.\n *\n * @returns An error object with a properly formatted message.\n */\n makeError(message) {\n var _a;\n let msg = (_a = this.fileName) !== null && _a !== void 0 ? _a : \"\";\n if (this.trackPosition) {\n if (msg.length > 0) {\n msg += \":\";\n }\n msg += `${this.line}:${this.column}`;\n }\n if (msg.length > 0) {\n msg += \": \";\n }\n return new Error(msg + message);\n }\n /**\n * Report a parsing error. This method is made public so that client code may\n * check for issues that are outside the scope of this project and can report\n * errors.\n *\n * @param message The error to report.\n *\n * @returns this\n */\n fail(message) {\n const err = this.makeError(message);\n const handler = this.errorHandler;\n if (handler === undefined) {\n throw err;\n }\n else {\n handler(err);\n }\n return this;\n }\n /**\n * Write a XML data to the parser.\n *\n * @param chunk The XML data to write.\n *\n * @returns this\n */\n // We do need object for the type here. Yes, it often causes problems\n // but not in this case.\n write(chunk) {\n if (this.closed) {\n return this.fail(\"cannot write after close; assign an onready handler.\");\n }\n let end = false;\n if (chunk === null) {\n // We cannot return immediately because carriedFromPrevious may need\n // processing.\n end = true;\n chunk = \"\";\n }\n else if (typeof chunk === \"object\") {\n chunk = chunk.toString();\n }\n // We checked if performing a pre-decomposition of the string into an array\n // of single complete characters (``Array.from(chunk)``) would be faster\n // than the current repeated calls to ``charCodeAt``. As of August 2018, it\n // isn't. (There may be Node-specific code that would perform faster than\n // ``Array.from`` but don't want to be dependent on Node.)\n if (this.carriedFromPrevious !== undefined) {\n // The previous chunk had char we must carry over.\n chunk = `${this.carriedFromPrevious}${chunk}`;\n this.carriedFromPrevious = undefined;\n }\n let limit = chunk.length;\n const lastCode = chunk.charCodeAt(limit - 1);\n if (!end &&\n // A trailing CR or surrogate must be carried over to the next\n // chunk.\n (lastCode === CR || (lastCode >= 0xD800 && lastCode <= 0xDBFF))) {\n // The chunk ends with a character that must be carried over. We cannot\n // know how to handle it until we get the next chunk or the end of the\n // stream. So save it for later.\n this.carriedFromPrevious = chunk[limit - 1];\n limit--;\n chunk = chunk.slice(0, limit);\n }\n const { stateTable } = this;\n this.chunk = chunk;\n this.i = 0;\n while (this.i < limit) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument\n stateTable[this.state].call(this);\n }\n this.chunkPosition += limit;\n return end ? this.end() : this;\n }\n /**\n * Close the current stream. Perform final well-formedness checks and reset\n * the parser tstate.\n *\n * @returns this\n */\n close() {\n return this.write(null);\n }\n /**\n * Get a single code point out of the current chunk. This updates the current\n * position if we do position tracking.\n *\n * This is the algorithm to use for XML 1.0.\n *\n * @returns The character read.\n */\n getCode10() {\n const { chunk, i } = this;\n this.prevI = i;\n // Yes, we do this instead of doing this.i++. Doing it this way, we do not\n // read this.i again, which is a bit faster.\n this.i = i + 1;\n if (i >= chunk.length) {\n return EOC;\n }\n // Using charCodeAt and handling the surrogates ourselves is faster\n // than using codePointAt.\n const code = chunk.charCodeAt(i);\n this.column++;\n if (code < 0xD800) {\n if (code >= SPACE || code === TAB) {\n return code;\n }\n switch (code) {\n case NL:\n this.line++;\n this.column = 0;\n this.positionAtNewLine = this.position;\n return NL;\n case CR:\n // We may get NaN if we read past the end of the chunk, which is fine.\n if (chunk.charCodeAt(i + 1) === NL) {\n // A \\r\\n sequence is converted to \\n so we have to skip over the\n // next character. We already know it has a size of 1 so ++ is fine\n // here.\n this.i = i + 2;\n }\n // Otherwise, a \\r is just converted to \\n, so we don't have to skip\n // ahead.\n // In either case, \\r becomes \\n.\n this.line++;\n this.column = 0;\n this.positionAtNewLine = this.position;\n return NL_LIKE;\n default:\n // If we get here, then code < SPACE and it is not NL CR or TAB.\n this.fail(\"disallowed character.\");\n return code;\n }\n }\n if (code > 0xDBFF) {\n // This is a specialized version of isChar10 that takes into account\n // that in this context code > 0xDBFF and code <= 0xFFFF. So it does not\n // test cases that don't need testing.\n if (!(code >= 0xE000 && code <= 0xFFFD)) {\n this.fail(\"disallowed character.\");\n }\n return code;\n }\n const final = 0x10000 + ((code - 0xD800) * 0x400) +\n (chunk.charCodeAt(i + 1) - 0xDC00);\n this.i = i + 2;\n // This is a specialized version of isChar10 that takes into account that in\n // this context necessarily final >= 0x10000.\n if (final > 0x10FFFF) {\n this.fail(\"disallowed character.\");\n }\n return final;\n }\n /**\n * Get a single code point out of the current chunk. This updates the current\n * position if we do position tracking.\n *\n * This is the algorithm to use for XML 1.1.\n *\n * @returns {number} The character read.\n */\n getCode11() {\n const { chunk, i } = this;\n this.prevI = i;\n // Yes, we do this instead of doing this.i++. Doing it this way, we do not\n // read this.i again, which is a bit faster.\n this.i = i + 1;\n if (i >= chunk.length) {\n return EOC;\n }\n // Using charCodeAt and handling the surrogates ourselves is faster\n // than using codePointAt.\n const code = chunk.charCodeAt(i);\n this.column++;\n if (code < 0xD800) {\n if ((code > 0x1F && code < 0x7F) || (code > 0x9F && code !== LS) ||\n code === TAB) {\n return code;\n }\n switch (code) {\n case NL: // 0xA\n this.line++;\n this.column = 0;\n this.positionAtNewLine = this.position;\n return NL;\n case CR: { // 0xD\n // We may get NaN if we read past the end of the chunk, which is\n // fine.\n const next = chunk.charCodeAt(i + 1);\n if (next === NL || next === NEL) {\n // A CR NL or CR NEL sequence is converted to NL so we have to skip\n // over the next character. We already know it has a size of 1.\n this.i = i + 2;\n }\n // Otherwise, a CR is just converted to NL, no skip.\n }\n /* yes, fall through */\n case NEL: // 0x85\n case LS: // Ox2028\n this.line++;\n this.column = 0;\n this.positionAtNewLine = this.position;\n return NL_LIKE;\n default:\n this.fail(\"disallowed character.\");\n return code;\n }\n }\n if (code > 0xDBFF) {\n // This is a specialized version of isCharAndNotRestricted that takes into\n // account that in this context code > 0xDBFF and code <= 0xFFFF. So it\n // does not test cases that don't need testing.\n if (!(code >= 0xE000 && code <= 0xFFFD)) {\n this.fail(\"disallowed character.\");\n }\n return code;\n }\n const final = 0x10000 + ((code - 0xD800) * 0x400) +\n (chunk.charCodeAt(i + 1) - 0xDC00);\n this.i = i + 2;\n // This is a specialized version of isCharAndNotRestricted that takes into\n // account that in this context necessarily final >= 0x10000.\n if (final > 0x10FFFF) {\n this.fail(\"disallowed character.\");\n }\n return final;\n }\n /**\n * Like ``getCode`` but with the return value normalized so that ``NL`` is\n * returned for ``NL_LIKE``.\n */\n getCodeNorm() {\n const c = this.getCode();\n return c === NL_LIKE ? NL : c;\n }\n unget() {\n this.i = this.prevI;\n this.column--;\n }\n /**\n * Capture characters into a buffer until encountering one of a set of\n * characters.\n *\n * @param chars An array of codepoints. Encountering a character in the array\n * ends the capture. (``chars`` may safely contain ``NL``.)\n *\n * @return The character code that made the capture end, or ``EOC`` if we hit\n * the end of the chunk. The return value cannot be NL_LIKE: NL is returned\n * instead.\n */\n captureTo(chars) {\n let { i: start } = this;\n const { chunk } = this;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const c = this.getCode();\n const isNLLike = c === NL_LIKE;\n const final = isNLLike ? NL : c;\n if (final === EOC || chars.includes(final)) {\n this.text += chunk.slice(start, this.prevI);\n return final;\n }\n if (isNLLike) {\n this.text += `${chunk.slice(start, this.prevI)}\\n`;\n start = this.i;\n }\n }\n }\n /**\n * Capture characters into a buffer until encountering a character.\n *\n * @param char The codepoint that ends the capture. **NOTE ``char`` MAY NOT\n * CONTAIN ``NL``.** Passing ``NL`` will result in buggy behavior.\n *\n * @return ``true`` if we ran into the character. Otherwise, we ran into the\n * end of the current chunk.\n */\n captureToChar(char) {\n let { i: start } = this;\n const { chunk } = this;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let c = this.getCode();\n switch (c) {\n case NL_LIKE:\n this.text += `${chunk.slice(start, this.prevI)}\\n`;\n start = this.i;\n c = NL;\n break;\n case EOC:\n this.text += chunk.slice(start);\n return false;\n default:\n }\n if (c === char) {\n this.text += chunk.slice(start, this.prevI);\n return true;\n }\n }\n }\n /**\n * Capture characters that satisfy ``isNameChar`` into the ``name`` field of\n * this parser.\n *\n * @return The character code that made the test fail, or ``EOC`` if we hit\n * the end of the chunk. The return value cannot be NL_LIKE: NL is returned\n * instead.\n */\n captureNameChars() {\n const { chunk, i: start } = this;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const c = this.getCode();\n if (c === EOC) {\n this.name += chunk.slice(start);\n return EOC;\n }\n // NL is not a name char so we don't have to test specifically for it.\n if (!isNameChar(c)) {\n this.name += chunk.slice(start, this.prevI);\n return c === NL_LIKE ? NL : c;\n }\n }\n }\n /**\n * Skip white spaces.\n *\n * @return The character that ended the skip, or ``EOC`` if we hit\n * the end of the chunk. The return value cannot be NL_LIKE: NL is returned\n * instead.\n */\n skipSpaces() {\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const c = this.getCodeNorm();\n if (c === EOC || !isS(c)) {\n return c;\n }\n }\n }\n setXMLVersion(version) {\n this.currentXMLVersion = version;\n /* eslint-disable @typescript-eslint/unbound-method */\n if (version === \"1.0\") {\n this.isChar = isChar10;\n this.getCode = this.getCode10;\n }\n else {\n this.isChar = isChar11;\n this.getCode = this.getCode11;\n }\n /* eslint-enable @typescript-eslint/unbound-method */\n }\n // STATE ENGINE METHODS\n // This needs to be a state separate from S_BEGIN_WHITESPACE because we want\n // to be sure never to come back to this state later.\n sBegin() {\n // We are essentially peeking at the first character of the chunk. Since\n // S_BEGIN can be in effect only when we start working on the first chunk,\n // the index at which we must look is necessarily 0. Note also that the\n // following test does not depend on decoding surrogates.\n // If the initial character is 0xFEFF, ignore it.\n if (this.chunk.charCodeAt(0) === 0xFEFF) {\n this.i++;\n this.column++;\n }\n this.state = S_BEGIN_WHITESPACE;\n }\n sBeginWhitespace() {\n // We need to know whether we've encountered spaces or not because as soon\n // as we run into a space, an XML declaration is no longer possible. Rather\n // than slow down skipSpaces even in places where we don't care whether it\n // skipped anything or not, we check whether prevI is equal to the value of\n // i from before we skip spaces.\n const iBefore = this.i;\n const c = this.skipSpaces();\n if (this.prevI !== iBefore) {\n this.xmlDeclPossible = false;\n }\n switch (c) {\n case LESS:\n this.state = S_OPEN_WAKA;\n // We could naively call closeText but in this state, it is not normal\n // to have text be filled with any data.\n if (this.text.length !== 0) {\n throw new Error(\"no-empty text at start\");\n }\n break;\n case EOC:\n break;\n default:\n this.unget();\n this.state = S_TEXT;\n this.xmlDeclPossible = false;\n }\n }\n sDoctype() {\n var _a;\n const c = this.captureTo(DOCTYPE_TERMINATOR);\n switch (c) {\n case GREATER: {\n (_a = this.doctypeHandler) === null || _a === void 0 ? void 0 : _a.call(this, this.text);\n this.text = \"\";\n this.state = S_TEXT;\n this.doctype = true; // just remember that we saw it.\n break;\n }\n case EOC:\n break;\n default:\n this.text += String.fromCodePoint(c);\n if (c === OPEN_BRACKET) {\n this.state = S_DTD;\n }\n else if (isQuote(c)) {\n this.state = S_DOCTYPE_QUOTE;\n this.q = c;\n }\n }\n }\n sDoctypeQuote() {\n const q = this.q;\n if (this.captureToChar(q)) {\n this.text += String.fromCodePoint(q);\n this.q = null;\n this.state = S_DOCTYPE;\n }\n }\n sDTD() {\n const c = this.captureTo(DTD_TERMINATOR);\n if (c === EOC) {\n return;\n }\n this.text += String.fromCodePoint(c);\n if (c === CLOSE_BRACKET) {\n this.state = S_DOCTYPE;\n }\n else if (c === LESS) {\n this.state = S_DTD_OPEN_WAKA;\n }\n else if (isQuote(c)) {\n this.state = S_DTD_QUOTED;\n this.q = c;\n }\n }\n sDTDQuoted() {\n const q = this.q;\n if (this.captureToChar(q)) {\n this.text += String.fromCodePoint(q);\n this.state = S_DTD;\n this.q = null;\n }\n }\n sDTDOpenWaka() {\n const c = this.getCodeNorm();\n this.text += String.fromCodePoint(c);\n switch (c) {\n case BANG:\n this.state = S_DTD_OPEN_WAKA_BANG;\n this.openWakaBang = \"\";\n break;\n case QUESTION:\n this.state = S_DTD_PI;\n break;\n default:\n this.state = S_DTD;\n }\n }\n sDTDOpenWakaBang() {\n const char = String.fromCodePoint(this.getCodeNorm());\n const owb = this.openWakaBang += char;\n this.text += char;\n if (owb !== \"-\") {\n this.state = owb === \"--\" ? S_DTD_COMMENT : S_DTD;\n this.openWakaBang = \"\";\n }\n }\n sDTDComment() {\n if (this.captureToChar(MINUS)) {\n this.text += \"-\";\n this.state = S_DTD_COMMENT_ENDING;\n }\n }\n sDTDCommentEnding() {\n const c = this.getCodeNorm();\n this.text += String.fromCodePoint(c);\n this.state = c === MINUS ? S_DTD_COMMENT_ENDED : S_DTD_COMMENT;\n }\n sDTDCommentEnded() {\n const c = this.getCodeNorm();\n this.text += String.fromCodePoint(c);\n if (c === GREATER) {\n this.state = S_DTD;\n }\n else {\n this.fail(\"malformed comment.\");\n // will be recorded as\n // a comment of \" blah -- bloo \"\n this.state = S_DTD_COMMENT;\n }\n }\n sDTDPI() {\n if (this.captureToChar(QUESTION)) {\n this.text += \"?\";\n this.state = S_DTD_PI_ENDING;\n }\n }\n sDTDPIEnding() {\n const c = this.getCodeNorm();\n this.text += String.fromCodePoint(c);\n if (c === GREATER) {\n this.state = S_DTD;\n }\n }\n sText() {\n //\n // We did try a version of saxes where the S_TEXT state was split in two\n // states: one for text inside the root element, and one for text\n // outside. This was avoiding having to test this.tags.length to decide\n // what implementation to actually use.\n //\n // Peformance testing on gigabyte-size files did not show any advantage to\n // using the two states solution instead of the current one. Conversely, it\n // made the code a bit more complicated elsewhere. For instance, a comment\n // can appear before the root element so when a comment ended it was\n // necessary to determine whether to return to the S_TEXT state or to the\n // new text-outside-root state.\n //\n if (this.tags.length !== 0) {\n this.handleTextInRoot();\n }\n else {\n this.handleTextOutsideRoot();\n }\n }\n sEntity() {\n // This is essentially a specialized version of captureToChar(SEMICOLON...)\n let { i: start } = this;\n const { chunk } = this;\n // eslint-disable-next-line no-labels, no-restricted-syntax\n loop: \n // eslint-disable-next-line no-constant-condition\n while (true) {\n switch (this.getCode()) {\n case NL_LIKE:\n this.entity += `${chunk.slice(start, this.prevI)}\\n`;\n start = this.i;\n break;\n case SEMICOLON: {\n const { entityReturnState } = this;\n const entity = this.entity + chunk.slice(start, this.prevI);\n this.state = entityReturnState;\n let parsed;\n if (entity === \"\") {\n this.fail(\"empty entity name.\");\n parsed = \"&;\";\n }\n else {\n parsed = this.parseEntity(entity);\n this.entity = \"\";\n }\n if (entityReturnState !== S_TEXT || this.textHandler !== undefined) {\n this.text += parsed;\n }\n // eslint-disable-next-line no-labels\n break loop;\n }\n case EOC:\n this.entity += chunk.slice(start);\n // eslint-disable-next-line no-labels\n break loop;\n default:\n }\n }\n }\n sOpenWaka() {\n // Reminder: a state handler is called with at least one character\n // available in the current chunk. So the first call to get code inside of\n // a state handler cannot return ``EOC``. That's why we don't test\n // for it.\n const c = this.getCode();\n // either a /, ?, !, or text is coming next.\n if (isNameStartChar(c)) {\n this.state = S_OPEN_TAG;\n this.unget();\n this.xmlDeclPossible = false;\n }\n else {\n switch (c) {\n case FORWARD_SLASH:\n this.state = S_CLOSE_TAG;\n this.xmlDeclPossible = false;\n break;\n case BANG:\n this.state = S_OPEN_WAKA_BANG;\n this.openWakaBang = \"\";\n this.xmlDeclPossible = false;\n break;\n case QUESTION:\n this.state = S_PI_FIRST_CHAR;\n break;\n default:\n this.fail(\"disallowed character in tag name\");\n this.state = S_TEXT;\n this.xmlDeclPossible = false;\n }\n }\n }\n sOpenWakaBang() {\n this.openWakaBang += String.fromCodePoint(this.getCodeNorm());\n switch (this.openWakaBang) {\n case \"[CDATA[\":\n if (!this.sawRoot && !this.reportedTextBeforeRoot) {\n this.fail(\"text data outside of root node.\");\n this.reportedTextBeforeRoot = true;\n }\n if (this.closedRoot && !this.reportedTextAfterRoot) {\n this.fail(\"text data outside of root node.\");\n this.reportedTextAfterRoot = true;\n }\n this.state = S_CDATA;\n this.openWakaBang = \"\";\n break;\n case \"--\":\n this.state = S_COMMENT;\n this.openWakaBang = \"\";\n break;\n case \"DOCTYPE\":\n this.state = S_DOCTYPE;\n if (this.doctype || this.sawRoot) {\n this.fail(\"inappropriately located doctype declaration.\");\n }\n this.openWakaBang = \"\";\n break;\n default:\n // 7 happens to be the maximum length of the string that can possibly\n // match one of the cases above.\n if (this.openWakaBang.length >= 7) {\n this.fail(\"incorrect syntax.\");\n }\n }\n }\n sComment() {\n if (this.captureToChar(MINUS)) {\n this.state = S_COMMENT_ENDING;\n }\n }\n sCommentEnding() {\n var _a;\n const c = this.getCodeNorm();\n if (c === MINUS) {\n this.state = S_COMMENT_ENDED;\n (_a = this.commentHandler) === null || _a === void 0 ? void 0 : _a.call(this, this.text);\n this.text = \"\";\n }\n else {\n this.text += `-${String.fromCodePoint(c)}`;\n this.state = S_COMMENT;\n }\n }\n sCommentEnded() {\n const c = this.getCodeNorm();\n if (c !== GREATER) {\n this.fail(\"malformed comment.\");\n // will be recorded as\n // a comment of \" blah -- bloo \"\n this.text += `--${String.fromCodePoint(c)}`;\n this.state = S_COMMENT;\n }\n else {\n this.state = S_TEXT;\n }\n }\n sCData() {\n if (this.captureToChar(CLOSE_BRACKET)) {\n this.state = S_CDATA_ENDING;\n }\n }\n sCDataEnding() {\n const c = this.getCodeNorm();\n if (c === CLOSE_BRACKET) {\n this.state = S_CDATA_ENDING_2;\n }\n else {\n this.text += `]${String.fromCodePoint(c)}`;\n this.state = S_CDATA;\n }\n }\n sCDataEnding2() {\n var _a;\n const c = this.getCodeNorm();\n switch (c) {\n case GREATER: {\n (_a = this.cdataHandler) === null || _a === void 0 ? void 0 : _a.call(this, this.text);\n this.text = \"\";\n this.state = S_TEXT;\n break;\n }\n case CLOSE_BRACKET:\n this.text += \"]\";\n break;\n default:\n this.text += `]]${String.fromCodePoint(c)}`;\n this.state = S_CDATA;\n }\n }\n // We need this separate state to check the first character fo the pi target\n // with this.nameStartCheck which allows less characters than this.nameCheck.\n sPIFirstChar() {\n const c = this.getCodeNorm();\n // This is first because in the case where the file is well-formed this is\n // the branch taken. We optimize for well-formedness.\n if (this.nameStartCheck(c)) {\n this.piTarget += String.fromCodePoint(c);\n this.state = S_PI_REST;\n }\n else if (c === QUESTION || isS(c)) {\n this.fail(\"processing instruction without a target.\");\n this.state = c === QUESTION ? S_PI_ENDING : S_PI_BODY;\n }\n else {\n this.fail(\"disallowed character in processing instruction name.\");\n this.piTarget += String.fromCodePoint(c);\n this.state = S_PI_REST;\n }\n }\n sPIRest() {\n // Capture characters into a piTarget while ``this.nameCheck`` run on the\n // character read returns true.\n const { chunk, i: start } = this;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const c = this.getCodeNorm();\n if (c === EOC) {\n this.piTarget += chunk.slice(start);\n return;\n }\n // NL cannot satisfy this.nameCheck so we don't have to test specifically\n // for it.\n if (!this.nameCheck(c)) {\n this.piTarget += chunk.slice(start, this.prevI);\n const isQuestion = c === QUESTION;\n if (isQuestion || isS(c)) {\n if (this.piTarget === \"xml\") {\n if (!this.xmlDeclPossible) {\n this.fail(\"an XML declaration must be at the start of the document.\");\n }\n this.state = isQuestion ? S_XML_DECL_ENDING : S_XML_DECL_NAME_START;\n }\n else {\n this.state = isQuestion ? S_PI_ENDING : S_PI_BODY;\n }\n }\n else {\n this.fail(\"disallowed character in processing instruction name.\");\n this.piTarget += String.fromCodePoint(c);\n }\n break;\n }\n }\n }\n sPIBody() {\n if (this.text.length === 0) {\n const c = this.getCodeNorm();\n if (c === QUESTION) {\n this.state = S_PI_ENDING;\n }\n else if (!isS(c)) {\n this.text = String.fromCodePoint(c);\n }\n }\n // The question mark character is not valid inside any of the XML\n // declaration name/value pairs.\n else if (this.captureToChar(QUESTION)) {\n this.state = S_PI_ENDING;\n }\n }\n sPIEnding() {\n var _a;\n const c = this.getCodeNorm();\n if (c === GREATER) {\n const { piTarget } = this;\n if (piTarget.toLowerCase() === \"xml\") {\n this.fail(\"the XML declaration must appear at the start of the document.\");\n }\n (_a = this.piHandler) === null || _a === void 0 ? void 0 : _a.call(this, {\n target: piTarget,\n body: this.text,\n });\n this.piTarget = this.text = \"\";\n this.state = S_TEXT;\n }\n else if (c === QUESTION) {\n // We ran into ?? as part of a processing instruction. We initially took\n // the first ? as a sign that the PI was ending, but it is not. So we have\n // to add it to the body but we take the new ? as a sign that the PI is\n // ending.\n this.text += \"?\";\n }\n else {\n this.text += `?${String.fromCodePoint(c)}`;\n this.state = S_PI_BODY;\n }\n this.xmlDeclPossible = false;\n }\n sXMLDeclNameStart() {\n const c = this.skipSpaces();\n // The question mark character is not valid inside any of the XML\n // declaration name/value pairs.\n if (c === QUESTION) {\n // It is valid to go to S_XML_DECL_ENDING from this state.\n this.state = S_XML_DECL_ENDING;\n return;\n }\n if (c !== EOC) {\n this.state = S_XML_DECL_NAME;\n this.name = String.fromCodePoint(c);\n }\n }\n sXMLDeclName() {\n const c = this.captureTo(XML_DECL_NAME_TERMINATOR);\n // The question mark character is not valid inside any of the XML\n // declaration name/value pairs.\n if (c === QUESTION) {\n this.state = S_XML_DECL_ENDING;\n this.name += this.text;\n this.text = \"\";\n this.fail(\"XML declaration is incomplete.\");\n return;\n }\n if (!(isS(c) || c === EQUAL)) {\n return;\n }\n this.name += this.text;\n this.text = \"\";\n if (!this.xmlDeclExpects.includes(this.name)) {\n switch (this.name.length) {\n case 0:\n this.fail(\"did not expect any more name/value pairs.\");\n break;\n case 1:\n this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);\n break;\n default:\n this.fail(`expected one of ${this.xmlDeclExpects.join(\", \")}`);\n }\n }\n this.state = c === EQUAL ? S_XML_DECL_VALUE_START : S_XML_DECL_EQ;\n }\n sXMLDeclEq() {\n const c = this.getCodeNorm();\n // The question mark character is not valid inside any of the XML\n // declaration name/value pairs.\n if (c === QUESTION) {\n this.state = S_XML_DECL_ENDING;\n this.fail(\"XML declaration is incomplete.\");\n return;\n }\n if (isS(c)) {\n return;\n }\n if (c !== EQUAL) {\n this.fail(\"value required.\");\n }\n this.state = S_XML_DECL_VALUE_START;\n }\n sXMLDeclValueStart() {\n const c = this.getCodeNorm();\n // The question mark character is not valid inside any of the XML\n // declaration name/value pairs.\n if (c === QUESTION) {\n this.state = S_XML_DECL_ENDING;\n this.fail(\"XML declaration is incomplete.\");\n return;\n }\n if (isS(c)) {\n return;\n }\n if (!isQuote(c)) {\n this.fail(\"value must be quoted.\");\n this.q = SPACE;\n }\n else {\n this.q = c;\n }\n this.state = S_XML_DECL_VALUE;\n }\n sXMLDeclValue() {\n const c = this.captureTo([this.q, QUESTION]);\n // The question mark character is not valid inside any of the XML\n // declaration name/value pairs.\n if (c === QUESTION) {\n this.state = S_XML_DECL_ENDING;\n this.text = \"\";\n this.fail(\"XML declaration is incomplete.\");\n return;\n }\n if (c === EOC) {\n return;\n }\n const value = this.text;\n this.text = \"\";\n switch (this.name) {\n case \"version\": {\n this.xmlDeclExpects = [\"encoding\", \"standalone\"];\n const version = value;\n this.xmlDecl.version = version;\n // This is the test specified by XML 1.0 but it is fine for XML 1.1.\n if (!/^1\\.[0-9]+$/.test(version)) {\n this.fail(\"version number must match /^1\\\\.[0-9]+$/.\");\n }\n // When forceXMLVersion is set, the XML declaration is ignored.\n else if (!this.opt.forceXMLVersion) {\n this.setXMLVersion(version);\n }\n break;\n }\n case \"encoding\":\n if (!/^[A-Za-z][A-Za-z0-9._-]*$/.test(value)) {\n this.fail(\"encoding value must match \\\n/^[A-Za-z0-9][A-Za-z0-9._-]*$/.\");\n }\n this.xmlDeclExpects = [\"standalone\"];\n this.xmlDecl.encoding = value;\n break;\n case \"standalone\":\n if (value !== \"yes\" && value !== \"no\") {\n this.fail(\"standalone value must match \\\"yes\\\" or \\\"no\\\".\");\n }\n this.xmlDeclExpects = [];\n this.xmlDecl.standalone = value;\n break;\n default:\n // We don't need to raise an error here since we've already raised one\n // when checking what name was expected.\n }\n this.name = \"\";\n this.state = S_XML_DECL_SEPARATOR;\n }\n sXMLDeclSeparator() {\n const c = this.getCodeNorm();\n // The question mark character is not valid inside any of the XML\n // declaration name/value pairs.\n if (c === QUESTION) {\n // It is valid to go to S_XML_DECL_ENDING from this state.\n this.state = S_XML_DECL_ENDING;\n return;\n }\n if (!isS(c)) {\n this.fail(\"whitespace required.\");\n this.unget();\n }\n this.state = S_XML_DECL_NAME_START;\n }\n sXMLDeclEnding() {\n var _a;\n const c = this.getCodeNorm();\n if (c === GREATER) {\n if (this.piTarget !== \"xml\") {\n this.fail(\"processing instructions are not allowed before root.\");\n }\n else if (this.name !== \"version\" &&\n this.xmlDeclExpects.includes(\"version\")) {\n this.fail(\"XML declaration must contain a version.\");\n }\n (_a = this.xmldeclHandler) === null || _a === void 0 ? void 0 : _a.call(this, this.xmlDecl);\n this.name = \"\";\n this.piTarget = this.text = \"\";\n this.state = S_TEXT;\n }\n else {\n // We got here because the previous character was a ?, but the question\n // mark character is not valid inside any of the XML declaration\n // name/value pairs.\n this.fail(\"The character ? is disallowed anywhere in XML declarations.\");\n }\n this.xmlDeclPossible = false;\n }\n sOpenTag() {\n var _a;\n const c = this.captureNameChars();\n if (c === EOC) {\n return;\n }\n const tag = this.tag = {\n name: this.name,\n attributes: Object.create(null),\n };\n this.name = \"\";\n if (this.xmlnsOpt) {\n this.topNS = tag.ns = Object.create(null);\n }\n (_a = this.openTagStartHandler) === null || _a === void 0 ? void 0 : _a.call(this, tag);\n this.sawRoot = true;\n if (!this.fragmentOpt && this.closedRoot) {\n this.fail(\"documents may contain only one root.\");\n }\n switch (c) {\n case GREATER:\n this.openTag();\n break;\n case FORWARD_SLASH:\n this.state = S_OPEN_TAG_SLASH;\n break;\n default:\n if (!isS(c)) {\n this.fail(\"disallowed character in tag name.\");\n }\n this.state = S_ATTRIB;\n }\n }\n sOpenTagSlash() {\n if (this.getCode() === GREATER) {\n this.openSelfClosingTag();\n }\n else {\n this.fail(\"forward-slash in opening tag not followed by >.\");\n this.state = S_ATTRIB;\n }\n }\n sAttrib() {\n const c = this.skipSpaces();\n if (c === EOC) {\n return;\n }\n if (isNameStartChar(c)) {\n this.unget();\n this.state = S_ATTRIB_NAME;\n }\n else if (c === GREATER) {\n this.openTag();\n }\n else if (c === FORWARD_SLASH) {\n this.state = S_OPEN_TAG_SLASH;\n }\n else {\n this.fail(\"disallowed character in attribute name.\");\n }\n }\n sAttribName() {\n const c = this.captureNameChars();\n if (c === EQUAL) {\n this.state = S_ATTRIB_VALUE;\n }\n else if (isS(c)) {\n this.state = S_ATTRIB_NAME_SAW_WHITE;\n }\n else if (c === GREATER) {\n this.fail(\"attribute without value.\");\n this.pushAttrib(this.name, this.name);\n this.name = this.text = \"\";\n this.openTag();\n }\n else if (c !== EOC) {\n this.fail(\"disallowed character in attribute name.\");\n }\n }\n sAttribNameSawWhite() {\n const c = this.skipSpaces();\n switch (c) {\n case EOC:\n return;\n case EQUAL:\n this.state = S_ATTRIB_VALUE;\n break;\n default:\n this.fail(\"attribute without value.\");\n // Should we do this???\n // this.tag.attributes[this.name] = \"\";\n this.text = \"\";\n this.name = \"\";\n if (c === GREATER) {\n this.openTag();\n }\n else if (isNameStartChar(c)) {\n this.unget();\n this.state = S_ATTRIB_NAME;\n }\n else {\n this.fail(\"disallowed character in attribute name.\");\n this.state = S_ATTRIB;\n }\n }\n }\n sAttribValue() {\n const c = this.getCodeNorm();\n if (isQuote(c)) {\n this.q = c;\n this.state = S_ATTRIB_VALUE_QUOTED;\n }\n else if (!isS(c)) {\n this.fail(\"unquoted attribute value.\");\n this.state = S_ATTRIB_VALUE_UNQUOTED;\n this.unget();\n }\n }\n sAttribValueQuoted() {\n // We deliberately do not use captureTo here. The specialized code we use\n // here is faster than using captureTo.\n const { q, chunk } = this;\n let { i: start } = this;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n switch (this.getCode()) {\n case q:\n this.pushAttrib(this.name, this.text + chunk.slice(start, this.prevI));\n this.name = this.text = \"\";\n this.q = null;\n this.state = S_ATTRIB_VALUE_CLOSED;\n return;\n case AMP:\n this.text += chunk.slice(start, this.prevI);\n this.state = S_ENTITY;\n this.entityReturnState = S_ATTRIB_VALUE_QUOTED;\n return;\n case NL:\n case NL_LIKE:\n case TAB:\n this.text += `${chunk.slice(start, this.prevI)} `;\n start = this.i;\n break;\n case LESS:\n this.text += chunk.slice(start, this.prevI);\n this.fail(\"disallowed character.\");\n return;\n case EOC:\n this.text += chunk.slice(start);\n return;\n default:\n }\n }\n }\n sAttribValueClosed() {\n const c = this.getCodeNorm();\n if (isS(c)) {\n this.state = S_ATTRIB;\n }\n else if (c === GREATER) {\n this.openTag();\n }\n else if (c === FORWARD_SLASH) {\n this.state = S_OPEN_TAG_SLASH;\n }\n else if (isNameStartChar(c)) {\n this.fail(\"no whitespace between attributes.\");\n this.unget();\n this.state = S_ATTRIB_NAME;\n }\n else {\n this.fail(\"disallowed character in attribute name.\");\n }\n }\n sAttribValueUnquoted() {\n // We don't do anything regarding EOL or space handling for unquoted\n // attributes. We already have failed by the time we get here, and the\n // contract that saxes upholds states that upon failure, it is not safe to\n // rely on the data passed to event handlers (other than\n // ``onerror``). Passing \"bad\" data is not a problem.\n const c = this.captureTo(ATTRIB_VALUE_UNQUOTED_TERMINATOR);\n switch (c) {\n case AMP:\n this.state = S_ENTITY;\n this.entityReturnState = S_ATTRIB_VALUE_UNQUOTED;\n break;\n case LESS:\n this.fail(\"disallowed character.\");\n break;\n case EOC:\n break;\n default:\n if (this.text.includes(\"]]>\")) {\n this.fail(\"the string \\\"]]>\\\" is disallowed in char data.\");\n }\n this.pushAttrib(this.name, this.text);\n this.name = this.text = \"\";\n if (c === GREATER) {\n this.openTag();\n }\n else {\n this.state = S_ATTRIB;\n }\n }\n }\n sCloseTag() {\n const c = this.captureNameChars();\n if (c === GREATER) {\n this.closeTag();\n }\n else if (isS(c)) {\n this.state = S_CLOSE_TAG_SAW_WHITE;\n }\n else if (c !== EOC) {\n this.fail(\"disallowed character in closing tag.\");\n }\n }\n sCloseTagSawWhite() {\n switch (this.skipSpaces()) {\n case GREATER:\n this.closeTag();\n break;\n case EOC:\n break;\n default:\n this.fail(\"disallowed character in closing tag.\");\n }\n }\n // END OF STATE ENGINE METHODS\n handleTextInRoot() {\n // This is essentially a specialized version of captureTo which is optimized\n // for performing the ]]> check. A previous version of this code, checked\n // ``this.text`` for the presence of ]]>. It simplified the code but was\n // very costly when character data contained a lot of entities to be parsed.\n //\n // Since we are using a specialized loop, we also keep track of the presence\n // of ]]> in text data. The sequence ]]> is forbidden to appear as-is.\n //\n let { i: start, forbiddenState } = this;\n const { chunk, textHandler: handler } = this;\n // eslint-disable-next-line no-labels, no-restricted-syntax\n scanLoop: \n // eslint-disable-next-line no-constant-condition\n while (true) {\n switch (this.getCode()) {\n case LESS: {\n this.state = S_OPEN_WAKA;\n if (handler !== undefined) {\n const { text } = this;\n const slice = chunk.slice(start, this.prevI);\n if (text.length !== 0) {\n handler(text + slice);\n this.text = \"\";\n }\n else if (slice.length !== 0) {\n handler(slice);\n }\n }\n forbiddenState = FORBIDDEN_START;\n // eslint-disable-next-line no-labels\n break scanLoop;\n }\n case AMP:\n this.state = S_ENTITY;\n this.entityReturnState = S_TEXT;\n if (handler !== undefined) {\n this.text += chunk.slice(start, this.prevI);\n }\n forbiddenState = FORBIDDEN_START;\n // eslint-disable-next-line no-labels\n break scanLoop;\n case CLOSE_BRACKET:\n switch (forbiddenState) {\n case FORBIDDEN_START:\n forbiddenState = FORBIDDEN_BRACKET;\n break;\n case FORBIDDEN_BRACKET:\n forbiddenState = FORBIDDEN_BRACKET_BRACKET;\n break;\n case FORBIDDEN_BRACKET_BRACKET:\n break;\n default:\n throw new Error(\"impossible state\");\n }\n break;\n case GREATER:\n if (forbiddenState === FORBIDDEN_BRACKET_BRACKET) {\n this.fail(\"the string \\\"]]>\\\" is disallowed in char data.\");\n }\n forbiddenState = FORBIDDEN_START;\n break;\n case NL_LIKE:\n if (handler !== undefined) {\n this.text += `${chunk.slice(start, this.prevI)}\\n`;\n }\n start = this.i;\n forbiddenState = FORBIDDEN_START;\n break;\n case EOC:\n if (handler !== undefined) {\n this.text += chunk.slice(start);\n }\n // eslint-disable-next-line no-labels\n break scanLoop;\n default:\n forbiddenState = FORBIDDEN_START;\n }\n }\n this.forbiddenState = forbiddenState;\n }\n handleTextOutsideRoot() {\n // This is essentially a specialized version of captureTo which is optimized\n // for a specialized task. We keep track of the presence of non-space\n // characters in the text since these are errors when appearing outside the\n // document root element.\n let { i: start } = this;\n const { chunk, textHandler: handler } = this;\n let nonSpace = false;\n // eslint-disable-next-line no-labels, no-restricted-syntax\n outRootLoop: \n // eslint-disable-next-line no-constant-condition\n while (true) {\n const code = this.getCode();\n switch (code) {\n case LESS: {\n this.state = S_OPEN_WAKA;\n if (handler !== undefined) {\n const { text } = this;\n const slice = chunk.slice(start, this.prevI);\n if (text.length !== 0) {\n handler(text + slice);\n this.text = \"\";\n }\n else if (slice.length !== 0) {\n handler(slice);\n }\n }\n // eslint-disable-next-line no-labels\n break outRootLoop;\n }\n case AMP:\n this.state = S_ENTITY;\n this.entityReturnState = S_TEXT;\n if (handler !== undefined) {\n this.text += chunk.slice(start, this.prevI);\n }\n nonSpace = true;\n // eslint-disable-next-line no-labels\n break outRootLoop;\n case NL_LIKE:\n if (handler !== undefined) {\n this.text += `${chunk.slice(start, this.prevI)}\\n`;\n }\n start = this.i;\n break;\n case EOC:\n if (handler !== undefined) {\n this.text += chunk.slice(start);\n }\n // eslint-disable-next-line no-labels\n break outRootLoop;\n default:\n if (!isS(code)) {\n nonSpace = true;\n }\n }\n }\n if (!nonSpace) {\n return;\n }\n // We use the reportedTextBeforeRoot and reportedTextAfterRoot flags\n // to avoid reporting errors for every single character that is out of\n // place.\n if (!this.sawRoot && !this.reportedTextBeforeRoot) {\n this.fail(\"text data outside of root node.\");\n this.reportedTextBeforeRoot = true;\n }\n if (this.closedRoot && !this.reportedTextAfterRoot) {\n this.fail(\"text data outside of root node.\");\n this.reportedTextAfterRoot = true;\n }\n }\n pushAttribNS(name, value) {\n var _a;\n const { prefix, local } = this.qname(name);\n const attr = { name, prefix, local, value };\n this.attribList.push(attr);\n (_a = this.attributeHandler) === null || _a === void 0 ? void 0 : _a.call(this, attr);\n if (prefix === \"xmlns\") {\n const trimmed = value.trim();\n if (this.currentXMLVersion === \"1.0\" && trimmed === \"\") {\n this.fail(\"invalid attempt to undefine prefix in XML 1.0\");\n }\n this.topNS[local] = trimmed;\n nsPairCheck(this, local, trimmed);\n }\n else if (name === \"xmlns\") {\n const trimmed = value.trim();\n this.topNS[\"\"] = trimmed;\n nsPairCheck(this, \"\", trimmed);\n }\n }\n pushAttribPlain(name, value) {\n var _a;\n const attr = { name, value };\n this.attribList.push(attr);\n (_a = this.attributeHandler) === null || _a === void 0 ? void 0 : _a.call(this, attr);\n }\n /**\n * End parsing. This performs final well-formedness checks and resets the\n * parser to a clean state.\n *\n * @returns this\n */\n end() {\n var _a, _b;\n if (!this.sawRoot) {\n this.fail(\"document must contain a root element.\");\n }\n const { tags } = this;\n while (tags.length > 0) {\n const tag = tags.pop();\n this.fail(`unclosed tag: ${tag.name}`);\n }\n if ((this.state !== S_BEGIN) && (this.state !== S_TEXT)) {\n this.fail(\"unexpected end.\");\n }\n const { text } = this;\n if (text.length !== 0) {\n (_a = this.textHandler) === null || _a === void 0 ? void 0 : _a.call(this, text);\n this.text = \"\";\n }\n this._closed = true;\n (_b = this.endHandler) === null || _b === void 0 ? void 0 : _b.call(this);\n this._init();\n return this;\n }\n /**\n * Resolve a namespace prefix.\n *\n * @param prefix The prefix to resolve.\n *\n * @returns The namespace URI or ``undefined`` if the prefix is not defined.\n */\n resolve(prefix) {\n var _a, _b;\n let uri = this.topNS[prefix];\n if (uri !== undefined) {\n return uri;\n }\n const { tags } = this;\n for (let index = tags.length - 1; index >= 0; index--) {\n uri = tags[index].ns[prefix];\n if (uri !== undefined) {\n return uri;\n }\n }\n uri = this.ns[prefix];\n if (uri !== undefined) {\n return uri;\n }\n return (_b = (_a = this.opt).resolvePrefix) === null || _b === void 0 ? void 0 : _b.call(_a, prefix);\n }\n /**\n * Parse a qname into its prefix and local name parts.\n *\n * @param name The name to parse\n *\n * @returns\n */\n qname(name) {\n // This is faster than using name.split(\":\").\n const colon = name.indexOf(\":\");\n if (colon === -1) {\n return { prefix: \"\", local: name };\n }\n const local = name.slice(colon + 1);\n const prefix = name.slice(0, colon);\n if (prefix === \"\" || local === \"\" || local.includes(\":\")) {\n this.fail(`malformed name: ${name}.`);\n }\n return { prefix, local };\n }\n processAttribsNS() {\n var _a;\n const { attribList } = this;\n const tag = this.tag;\n {\n // add namespace info to tag\n const { prefix, local } = this.qname(tag.name);\n tag.prefix = prefix;\n tag.local = local;\n const uri = tag.uri = (_a = this.resolve(prefix)) !== null && _a !== void 0 ? _a : \"\";\n if (prefix !== \"\") {\n if (prefix === \"xmlns\") {\n this.fail(\"tags may not have \\\"xmlns\\\" as prefix.\");\n }\n if (uri === \"\") {\n this.fail(`unbound namespace prefix: ${JSON.stringify(prefix)}.`);\n tag.uri = prefix;\n }\n }\n }\n if (attribList.length === 0) {\n return;\n }\n const { attributes } = tag;\n const seen = new Set();\n // Note: do not apply default ns to attributes:\n // http://www.w3.org/TR/REC-xml-names/#defaulting\n for (const attr of attribList) {\n const { name, prefix, local } = attr;\n let uri;\n let eqname;\n if (prefix === \"\") {\n uri = name === \"xmlns\" ? XMLNS_NAMESPACE : \"\";\n eqname = name;\n }\n else {\n uri = this.resolve(prefix);\n // if there's any attributes with an undefined namespace,\n // then fail on them now.\n if (uri === undefined) {\n this.fail(`unbound namespace prefix: ${JSON.stringify(prefix)}.`);\n uri = prefix;\n }\n eqname = `{${uri}}${local}`;\n }\n if (seen.has(eqname)) {\n this.fail(`duplicate attribute: ${eqname}.`);\n }\n seen.add(eqname);\n attr.uri = uri;\n attributes[name] = attr;\n }\n this.attribList = [];\n }\n processAttribsPlain() {\n const { attribList } = this;\n // eslint-disable-next-line prefer-destructuring\n const attributes = this.tag.attributes;\n for (const { name, value } of attribList) {\n if (attributes[name] !== undefined) {\n this.fail(`duplicate attribute: ${name}.`);\n }\n attributes[name] = value;\n }\n this.attribList = [];\n }\n /**\n * Handle a complete open tag. This parser code calls this once it has seen\n * the whole tag. This method checks for well-formeness and then emits\n * ``onopentag``.\n */\n openTag() {\n var _a;\n this.processAttribs();\n const { tags } = this;\n const tag = this.tag;\n tag.isSelfClosing = false;\n // There cannot be any pending text here due to the onopentagstart that was\n // necessarily emitted before we get here. So we do not check text.\n (_a = this.openTagHandler) === null || _a === void 0 ? void 0 : _a.call(this, tag);\n tags.push(tag);\n this.state = S_TEXT;\n this.name = \"\";\n }\n /**\n * Handle a complete self-closing tag. This parser code calls this once it has\n * seen the whole tag. This method checks for well-formeness and then emits\n * ``onopentag`` and ``onclosetag``.\n */\n openSelfClosingTag() {\n var _a, _b, _c;\n this.processAttribs();\n const { tags } = this;\n const tag = this.tag;\n tag.isSelfClosing = true;\n // There cannot be any pending text here due to the onopentagstart that was\n // necessarily emitted before we get here. So we do not check text.\n (_a = this.openTagHandler) === null || _a === void 0 ? void 0 : _a.call(this, tag);\n (_b = this.closeTagHandler) === null || _b === void 0 ? void 0 : _b.call(this, tag);\n const top = this.tag = (_c = tags[tags.length - 1]) !== null && _c !== void 0 ? _c : null;\n if (top === null) {\n this.closedRoot = true;\n }\n this.state = S_TEXT;\n this.name = \"\";\n }\n /**\n * Handle a complete close tag. This parser code calls this once it has seen\n * the whole tag. This method checks for well-formeness and then emits\n * ``onclosetag``.\n */\n closeTag() {\n const { tags, name } = this;\n // Our state after this will be S_TEXT, no matter what, and we can clear\n // tagName now.\n this.state = S_TEXT;\n this.name = \"\";\n if (name === \"\") {\n this.fail(\"weird empty close tag.\");\n this.text += \"\";\n return;\n }\n const handler = this.closeTagHandler;\n let l = tags.length;\n while (l-- > 0) {\n const tag = this.tag = tags.pop();\n this.topNS = tag.ns;\n handler === null || handler === void 0 ? void 0 : handler(tag);\n if (tag.name === name) {\n break;\n }\n this.fail(\"unexpected close tag.\");\n }\n if (l === 0) {\n this.closedRoot = true;\n }\n else if (l < 0) {\n this.fail(`unmatched closing tag: ${name}.`);\n this.text += ``;\n }\n }\n /**\n * Resolves an entity. Makes any necessary well-formedness checks.\n *\n * @param entity The entity to resolve.\n *\n * @returns The parsed entity.\n */\n parseEntity(entity) {\n // startsWith would be significantly slower for this test.\n if (entity[0] !== \"#\") {\n const defined = this.ENTITIES[entity];\n if (defined !== undefined) {\n return defined;\n }\n this.fail(this.isName(entity) ? \"undefined entity.\" :\n \"disallowed character in entity name.\");\n return `&${entity};`;\n }\n let num = NaN;\n if (entity[1] === \"x\" && /^#x[0-9a-f]+$/i.test(entity)) {\n num = parseInt(entity.slice(2), 16);\n }\n else if (/^#[0-9]+$/.test(entity)) {\n num = parseInt(entity.slice(1), 10);\n }\n // The character reference is required to match the CHAR production.\n if (!this.isChar(num)) {\n this.fail(\"malformed character entity.\");\n return `&${entity};`;\n }\n return String.fromCodePoint(num);\n }\n}\nexports.SaxesParser = SaxesParser;\n//# sourceMappingURL=saxes.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReadableWebToNodeStream = void 0;\nconst readable_stream_1 = require(\"readable-stream\");\n/**\n * Converts a Web-API stream into Node stream.Readable class\n * Node stream readable: https://nodejs.org/api/stream.html#stream_readable_streams\n * Web API readable-stream: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream\n * Node readable stream: https://nodejs.org/api/stream.html#stream_readable_streams\n */\nclass ReadableWebToNodeStream extends readable_stream_1.Readable {\n /**\n *\n * @param stream ReadableStream: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream\n */\n constructor(stream) {\n super();\n this.bytesRead = 0;\n this.released = false;\n this.reader = stream.getReader();\n }\n /**\n * Implementation of readable._read(size).\n * When readable._read() is called, if data is available from the resource,\n * the implementation should begin pushing that data into the read queue\n * https://nodejs.org/api/stream.html#stream_readable_read_size_1\n */\n async _read() {\n // Should start pushing data into the queue\n // Read data from the underlying Web-API-readable-stream\n if (this.released) {\n this.push(null); // Signal EOF\n return;\n }\n this.pendingRead = this.reader.read();\n const data = await this.pendingRead;\n // clear the promise before pushing pushing new data to the queue and allow sequential calls to _read()\n delete this.pendingRead;\n if (data.done || this.released) {\n this.push(null); // Signal EOF\n }\n else {\n this.bytesRead += data.value.length;\n this.push(data.value); // Push new data to the queue\n }\n }\n /**\n * If there is no unresolved read call to Web-API Readable​Stream immediately returns;\n * otherwise will wait until the read is resolved.\n */\n async waitForReadToComplete() {\n if (this.pendingRead) {\n await this.pendingRead;\n }\n }\n /**\n * Close wrapper\n */\n async close() {\n await this.syncAndRelease();\n }\n async syncAndRelease() {\n this.released = true;\n await this.waitForReadToComplete();\n await this.reader.releaseLock();\n }\n}\nexports.ReadableWebToNodeStream = ReadableWebToNodeStream;\n//# sourceMappingURL=index.js.map","/*globals self, window */\n\"use strict\"\n\n/*eslint-disable @mysticatea/prettier */\nconst { AbortController, AbortSignal } =\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window :\n /* otherwise */ undefined\n/*eslint-enable @mysticatea/prettier */\n\nmodule.exports = AbortController\nmodule.exports.AbortSignal = AbortSignal\nmodule.exports.default = AbortController\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction promisifyEventEmitter(event, result) {\n return new Promise((resolve, reject) => {\n event.on('end', () => resolve(result));\n event.on('error', reject);\n });\n}\nfunction arrayifyStream(stream) {\n const array = [];\n return promisifyEventEmitter(stream.on('data', data => array.push(data)), array);\n}\nexports.default = arrayifyStream;\n//# sourceMappingURL=index.js.map","\nconst DynamicNestedLoopJoin = require('./join/DynamicNestedLoopJoin');\nconst HashJoin = require('./join/HashJoin');\nconst NestedLoopJoin = require('./join/NestedLoopJoin');\nconst SymmetricHashJoin = require('./join/SymmetricHashJoin');\n\nconst MergeStream = require('./util/MergeIterator');\n\nmodule.exports = {\n DynamicNestedLoopJoin,\n HashJoin,\n NestedLoopJoin,\n SymmetricHashJoin,\n\n MergeStream\n};","\nlet AsyncIterator = require('asynciterator');\nlet MultiTransformIterator = AsyncIterator.MultiTransformIterator;\nlet SimpleTransformIterator = AsyncIterator.SimpleTransformIterator;\n\n// Nested Loop Join, but the values of the inner loop are determined by each value of the outer loop, possibly reducing the number of necessary checks\nclass DynamicNestedLoopJoin extends MultiTransformIterator\n{\n constructor (left, funRight, funJoin, options)\n {\n super(left, options);\n\n this.funRight = funRight;\n this.funJoin = funJoin;\n }\n\n _createTransformer (leftItem)\n {\n return new SimpleTransformIterator(this.funRight(leftItem), { transform: (rightItem, done, push) =>\n {\n let result = this.funJoin(leftItem, rightItem);\n if (result !== null)\n push(result);\n done();\n }});\n }\n}\n\nmodule.exports = DynamicNestedLoopJoin;\n","\nlet AsyncIterator = require('asynciterator').AsyncIterator;\n\n// https://en.wikipedia.org/wiki/Hash_join\nclass HashJoin extends AsyncIterator\n{\n constructor (left, right, funHash, funJoin)\n {\n super();\n\n this.addedDataListener = false;\n this.left = left;\n this.right = right;\n this.funHash = funHash;\n this.funJoin = funJoin;\n\n this.leftMap = new Map();\n\n this.match = null;\n this.matches = [];\n this.matchIdx = 0;\n\n this.left.on('error', (error) => this.destroy(error));\n this.right.on('error', (error) => this.destroy(error));\n\n this.readable = false;\n\n this.left.on('end', allowJoining.bind(this));\n\n function allowJoining ()\n {\n this.readable = true;\n this.right.on('readable', () => this.readable = true);\n this.right.on('end', () => { if (!this.hasResults()) this._end(); });\n }\n\n this.on('newListener', (eventName) =>\n {\n if (eventName === 'data')\n {\n this._addDataListenerIfNeeded();\n }\n });\n if (this.left.readable)\n this._addDataListenerIfNeeded();\n this.left.on('readable', () => this._addDataListenerIfNeeded());\n }\n\n hasResults ()\n {\n return !this.right.ended || this.matchIdx < this.matches.length;\n }\n\n _end ()\n {\n super._end();\n this.left.destroy();\n this.right.destroy();\n }\n\n read ()\n {\n this._addDataListenerIfNeeded();\n\n while(true) {\n if (this.ended || !this.readable)\n return null;\n\n while (this.matchIdx < this.matches.length)\n {\n let item = this.matches[this.matchIdx++];\n let result = this.funJoin(item, this.match);\n if (result !== null)\n return result;\n }\n\n if (!this.hasResults())\n this._end();\n\n this.match = this.right.read();\n\n if (this.match === null)\n {\n this.readable = false;\n return null;\n }\n\n let hash = this.funHash(this.match);\n this.matches = this.leftMap.get(hash) || [];\n this.matchIdx = 0;\n }\n }\n\n _addDataListenerIfNeeded() {\n if (!this.addedDataListener)\n {\n this.addedDataListener = true;\n this._addDataListener();\n }\n }\n\n _addDataListener()\n {\n this.left.on('data', addItem.bind(this));\n\n function addItem(item)\n {\n let hash = this.funHash(item);\n if (!this.leftMap.has(hash))\n this.leftMap.set(hash, []);\n let arr = this.leftMap.get(hash);\n arr.push(item);\n }\n }\n}\n\nmodule.exports = HashJoin;\n","\nconst { MultiTransformIterator, SimpleTransformIterator, scheduleTask } = require('asynciterator');\n\n// https://en.wikipedia.org/wiki/Nested_loop_join\nclass NestedLoopJoin extends MultiTransformIterator\n{\n constructor (left, right, funJoin, options)\n {\n super(left, options);\n\n this.right = right;\n this.funJoin = funJoin; // function that joins 2 elements or returns null if join is not possible\n this.on('end', () => this.right.close());\n }\n\n _end ()\n {\n super._end();\n scheduleTask(() => this.right.destroy());\n }\n\n _createTransformer (leftItem)\n {\n return new SimpleTransformIterator(this.right.clone(), { transform: (rightItem, done, push) =>\n {\n let result = this.funJoin(leftItem, rightItem);\n if (result !== null)\n push(result);\n done();\n }});\n }\n}\n\nmodule.exports = NestedLoopJoin;\n","\nlet AsyncIterator = require('asynciterator').AsyncIterator;\n\n// https://en.wikipedia.org/wiki/Symmetric_Hash_Join\nclass SymmetricHashJoin extends AsyncIterator\n{\n constructor (left, right, funHash, funJoin)\n {\n super();\n\n this.left = left;\n this.right = right;\n\n this.funHash = funHash;\n this.funJoin = funJoin;\n\n this.usedLeft = false;\n this.leftMap = new Map();\n this.rightMap = new Map();\n\n this.on('end', () => this._cleanup() );\n\n this.match = null;\n this.matches = [];\n this.matchIdx = 0;\n\n if (this.left.readable || this.right.readable)\n {\n this.readable = true;\n }\n\n this.left.on('error', (error) => this.destroy(error));\n this.right.on('error', (error) => this.destroy(error));\n\n this.left.on('readable', () => this.readable = true);\n this.right.on('readable', () => this.readable = true);\n\n // this needs to be here since it's possible the left/right streams only get ended after there are no more results left\n this.left.on ('end', () => { if (!this.hasResults()) this._end(); });\n this.right.on('end', () => { if (!this.hasResults()) this._end(); });\n }\n\n hasResults()\n {\n // The \"!!this.match\" condition was added as a workaround to race\n // conditions and/or duplicate \"end\" events that may lead to premature\n // cleanups of the \"this.matches\" array.\n // See https://github.com/joachimvh/asyncjoin/issues/7\n return !this.left.ended || !this.right.ended || (!!this.matches && this.matchIdx < this.matches.length);\n }\n\n _cleanup ()\n {\n // motivate garbage collector to remove these\n this.leftMap = null;\n this.rightMap = null;\n this.matches = null;\n }\n\n _end ()\n {\n super._end();\n this.left.destroy();\n this.right.destroy();\n }\n\n read ()\n {\n while(true){\n if (this.ended)\n return null;\n\n while (this.matchIdx < this.matches.length)\n {\n let item = this.matches[this.matchIdx++];\n let result = this.usedLeft ? this.funJoin(this.match, item) : this.funJoin(item, this.match);\n if (result !== null)\n return result;\n }\n\n if (!this.hasResults())\n this._end();\n\n let item = null;\n // try both streams if the first one has no value\n for (let i = 0; i < 2; ++i)\n {\n item = this.usedLeft ? this.right.read() : this.left.read();\n this.usedLeft = !this.usedLeft; // try other stream next time\n\n // found a result, no need to check the other stream this run\n if (item !== null)\n break;\n }\n\n if (this.done || item === null)\n {\n this.readable = false;\n return null;\n }\n\n let hash = this.funHash(item);\n\n if (this.usedLeft && this.right.done) {\n this.leftMap = null;\n } else if (this.left.done) {\n this.rightMap = null;\n } else {\n let map = this.usedLeft ? this.leftMap : this.rightMap;\n if (!map.has(hash))\n map.set(hash, []);\n let arr = map.get(hash);\n arr.push(item);\n }\n\n this.match = item;\n this.matches = (this.usedLeft ? this.rightMap : this.leftMap).get(hash) || [];\n this.matchIdx = 0;\n }\n }\n}\n\nmodule.exports = SymmetricHashJoin;\n","\nlet AsyncIterator = require('asynciterator').AsyncIterator;\n\n// merges the contents of multiple streams\nclass MergeIterator extends AsyncIterator\n{\n constructor (streams)\n {\n super();\n \n if (!Array.isArray(streams))\n streams = Array.prototype.slice.call(arguments);\n \n this.streams = streams;\n \n for (let stream of streams)\n {\n stream.on('readable', () => this.emit('readable'));\n stream.on('end', () => this._removeStream(stream));\n }\n \n if (this.streams.length === 0)\n this.close();\n \n this.idx = this.streams.length-1;\n }\n \n _removeStream (stream)\n {\n let idx = this.streams.indexOf(stream);\n if (idx < 0)\n return;\n \n this.streams.splice(idx, 1);\n if (this.idx >= this.streams.length)\n --this.idx;\n \n if (this.streams.length === 0)\n this._end();\n }\n \n close ()\n {\n super.close();\n for (let stream of this.streams)\n stream.close();\n }\n \n read ()\n {\n for (let attempts = 0; attempts < this.streams.length; ++attempts)\n {\n this.idx = (this.idx + 1) % this.streams.length;\n let item = this.streams[this.idx].read();\n if (item !== null)\n return item;\n }\n \n return null;\n }\n}\n\nmodule.exports = MergeIterator;","module.exports = function(variables) {\nfunction getVariableValue(name) {\n if (!variables || !(name in variables)) {\n throw new Error('Undefined variable: ' + name);\n }\n return variables[name];\n}\nconst df_467_1 = new (require('@comunica/logger-void').LoggerVoid)();\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_init__3_0_0_components_ActorInit_jsonld_ActorInit_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-init/^3.0.0/components/ActorInit.jsonld#ActorInit_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__3_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-context-preprocess/^3.0.0/components/ActorContextPreprocess.jsonld#ActorContextPreprocess_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_hash_bindings__3_0_0_components_ActorHashBindings_jsonld_ActorHashBindings_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-hash-bindings/^3.0.0/components/ActorHashBindings.jsonld#ActorHashBindings_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-optimize-query-operation/^3.0.0/components/ActorOptimizeQueryOperation.jsonld#ActorOptimizeQueryOperation_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_parse__3_0_0_components_ActorQueryParse_jsonld_ActorQueryParse_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-parse/^3.0.0/components/ActorQueryParse.jsonld#ActorQueryParse_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-result-serialize/^3.0.0/components/ActorQueryResultSerialize.jsonld#ActorQueryResultSerialize_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify_hypermedia__3_0_0_components_ActorQuerySourceIdentifyHypermedia_jsonld_ActorQuerySourceIdentifyHypermedia_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-source-identify-hypermedia/^3.0.0/components/ActorQuerySourceIdentifyHypermedia.jsonld#ActorQuerySourceIdentifyHypermedia_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_dereference__3_0_0_components_ActorDereference_jsonld_ActorDereference_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^3.0.0/components/ActorDereference.jsonld#ActorDereference_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_dereference_rdf__3_0_0_components_ActorDereferenceRdf_jsonld_ActorDereferenceRdf_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference-rdf/^3.0.0/components/ActorDereferenceRdf.jsonld#ActorDereferenceRdf_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join_entries_sort__3_0_0_components_ActorRdfJoinEntriesSort_jsonld_ActorRdfJoinEntriesSort_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-entries-sort/^3.0.0/components/ActorRdfJoinEntriesSort.jsonld#ActorRdfJoinEntriesSort_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join_selectivity__3_0_0_components_ActorRdfJoinSelectivity_jsonld_ActorRdfJoinSelectivity_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-selectivity/^3.0.0/components/ActorRdfJoinSelectivity.jsonld#ActorRdfJoinSelectivity_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata__3_0_0_components_ActorRdfMetadata_jsonld_ActorRdfMetadata_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata/^3.0.0/components/ActorRdfMetadata.jsonld#ActorRdfMetadata_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_accumulate__3_0_0_components_ActorRdfMetadataAccumulate_jsonld_ActorRdfMetadataAccumulate_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata-accumulate/^3.0.0/components/ActorRdfMetadataAccumulate.jsonld#ActorRdfMetadataAccumulate_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata-extract/^3.0.0/components/ActorRdfMetadataExtract.jsonld#ActorRdfMetadataExtract_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-parse/^3.0.0/components/ActorRdfParse.jsonld#ActorRdfParse_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse_html__3_0_0_components_ActorRdfParseHtml_jsonld_ActorRdfParseHtml_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-parse-html/^3.0.0/components/ActorRdfParseHtml.jsonld#ActorRdfParseHtml_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_resolve_hypermedia_links__3_0_0_components_ActorRdfResolveHypermediaLinks_jsonld_ActorRdfResolveHypermediaLinks_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia-links/^3.0.0/components/ActorRdfResolveHypermediaLinks.jsonld#ActorRdfResolveHypermediaLinks_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_resolve_hypermedia_links_queue__3_0_0_components_ActorRdfResolveHypermediaLinksQueue_jsonld_ActorRdfResolveHypermediaLinksQueue_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia-links-queue/^3.0.0/components/ActorRdfResolveHypermediaLinksQueue.jsonld#ActorRdfResolveHypermediaLinksQueue_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_serialize__3_0_0_components_ActorRdfSerialize_jsonld_ActorRdfSerialize_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-serialize/^3.0.0/components/ActorRdfSerialize.jsonld#ActorRdfSerialize_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_hypermedia__3_0_0_components_ActorRdfUpdateHypermedia_jsonld_ActorRdfUpdateHypermedia_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-hypermedia/^3.0.0/components/ActorRdfUpdateHypermedia.jsonld#ActorRdfUpdateHypermedia_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_quads__3_0_0_components_ActorRdfUpdateQuads_jsonld_ActorRdfUpdateQuads_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-quads/^3.0.0/components/ActorRdfUpdateQuads.jsonld#ActorRdfUpdateQuads_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^3.0.0/components/ActorHttp.jsonld#ActorHttp_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_fallback_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^3.0.0/components/ActorHttp.jsonld#ActorHttp_fallback_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus = new (require('@comunica/bus-query-operation').BusQueryOperation)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^3.0.0/components/ActorQueryOperation.jsonld#ActorQueryOperation_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_process__3_0_0_components_ActorQueryProcess_jsonld_ActorQueryProcess_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-process/^3.0.0/components/ActorQueryProcess.jsonld#ActorQueryProcess_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify__3_0_0_components_ActorQuerySourceIdentify_jsonld_ActorQuerySourceIdentify_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-source-identify/^3.0.0/components/ActorQuerySourceIdentify.jsonld#ActorQuerySourceIdentify_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^3.0.0/components/ActorRdfJoin.jsonld#ActorRdfJoin_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http_invalidate__3_0_0_components_ActorHttpInvalidate_jsonld_ActorHttpInvalidate_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http-invalidate/^3.0.0/components/ActorHttpInvalidate.jsonld#ActorHttpInvalidate_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_merge_bindings_context__3_0_0_components_ActorMergeBindingsContext_jsonld_ActorMergeBindingsContext_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-merge-bindings-context/^3.0.0/components/ActorMergeBindingsContext.jsonld#ActorMergeBindingsContext_default_bus'\n});\nconst urn_comunica_default_context_preprocess_actors_convert_shortcuts = new (require('@comunica/actor-context-preprocess-convert-shortcuts').ActorContextPreprocessConvertShortcuts)({\n 'contextKeyShortcuts': {\"baseIRI\":\"@comunica/actor-init-query:baseIRI\",\"datetime\":\"@comunica/actor-http-memento:datetime\",\"destination\":\"@comunica/bus-rdf-update-quads:destination\",\"explain\":\"@comunica/actor-init-query:explain\",\"extensionFunctionCreator\":\"@comunica/actor-init-query:extensionFunctionCreator\",\"extensionFunctions\":\"@comunica/actor-init-query:extensionFunctions\",\"fetch\":\"@comunica/bus-http:fetch\",\"functionArgumentsCache\":\"@comunica/actor-init-query:functionArgumentsCache\",\"httpAuth\":\"@comunica/bus-http:auth\",\"httpBodyTimeout\":\"@comunica/bus-http:http-body-timeout\",\"httpIncludeCredentials\":\"@comunica/bus-http:include-credentials\",\"httpProxyHandler\":\"@comunica/actor-http-proxy:httpProxyHandler\",\"httpRetryCount\":\"@comunica/bus-http:http-retry-count\",\"httpRetryDelay\":\"@comunica/bus-http:http-retry-delay\",\"httpRetryOnServerError\":\"@comunica/bus-http:http-retry-on-server-error\",\"httpTimeout\":\"@comunica/bus-http:http-timeout\",\"initialBindings\":\"@comunica/actor-init-query:initialBindings\",\"lenient\":\"@comunica/actor-init-query:lenient\",\"log\":\"@comunica/core:log\",\"noCache\":\"@comunica/actor-init-query:noCache\",\"queryFormat\":\"@comunica/actor-init-query:queryFormat\",\"queryTimestamp\":\"@comunica/actor-init-query:queryTimestamp\",\"readOnly\":\"@comunica/bus-query-operation:readOnly\",\"recoverBrokenLinks\":\"@comunica/bus-http-wayback:recover-broken-links\",\"sources\":\"@comunica/actor-init-query:querySourcesUnidentified\",\"traverse\":\"@comunica/bus-query-source-identify:traverse\",\"unionDefaultGraph\":\"@comunica/bus-query-operation:unionDefaultGraph\"},\n 'name': 'urn:comunica:default:context-preprocess/actors#convert-shortcuts',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__3_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus\n});\nconst urn_comunica_default_context_preprocess_actors_set_defaults = new (require('@comunica/actor-context-preprocess-set-defaults').ActorContextPreprocessSetDefaults)({\n 'logger': df_467_1,\n 'name': 'urn:comunica:default:context-preprocess/actors#set-defaults',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__3_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus\n});\nconst urn_comunica_default_context_preprocess_actors_source_to_destination = new (require('@comunica/actor-context-preprocess-source-to-destination').ActorContextPreprocessSourceToDestination)({\n 'name': 'urn:comunica:default:context-preprocess/actors#source-to-destination',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__3_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus\n});\nconst urn_comunica_default_context_preprocess_actors_query_source_skolemize = new (require('@comunica/actor-context-preprocess-query-source-skolemize').ActorContextPreprocessQuerySourceSkolemize)({\n 'name': 'urn:comunica:default:context-preprocess/actors#query-source-skolemize',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__3_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus\n});\nconst urn_comunica_default_context_preprocess_mediators_main = new (require('@comunica/mediator-combine-pipeline').MediatorCombinePipeline)({\n 'name': 'urn:comunica:default:context-preprocess/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__3_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus\n});\nconst urn_comunica_default_hash_bindings_actors_sha1 = new (require('@comunica/actor-hash-bindings-sha1').ActorHashBindingsSha1)({\n 'name': 'urn:comunica:default:hash-bindings/actors#sha1',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_hash_bindings__3_0_0_components_ActorHashBindings_jsonld_ActorHashBindings_default_bus\n});\nconst urn_comunica_default_hash_bindings_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:hash-bindings/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_hash_bindings__3_0_0_components_ActorHashBindings_jsonld_ActorHashBindings_default_bus\n});\nconst urn_comunica_default_optimize_query_operation_actors_rewrite_copy = new (require('@comunica/actor-optimize-query-operation-rewrite-copy').ActorOptimizeQueryOperationRewriteCopy)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#rewrite-copy',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus\n});\nconst urn_comunica_default_optimize_query_operation_actors_rewrite_move = new (require('@comunica/actor-optimize-query-operation-rewrite-move').ActorOptimizeQueryOperationRewriteMove)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#rewrite-move',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus\n});\nconst urn_comunica_default_optimize_query_operation_actors_rewrite_add = new (require('@comunica/actor-optimize-query-operation-rewrite-add').ActorOptimizeQueryOperationRewriteAdd)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#rewrite-add',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus\n});\nconst urn_comunica_default_optimize_query_operation_actors_group_sources = new (require('@comunica/actor-optimize-query-operation-group-sources').ActorOptimizeQueryOperationGroupSources)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#group-sources',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus\n});\nconst urn_comunica_default_optimize_query_operation_mediators_main = new (require('@comunica/mediator-combine-pipeline').MediatorCombinePipeline)({\n 'filterErrors': true,\n 'name': 'urn:comunica:default:optimize-query-operation/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus\n});\nconst urn_comunica_default_query_parse_actors_sparql = new (require('@comunica/actor-query-parse-sparql').ActorQueryParseSparql)({\n 'prefixes': {\"dbpedia\":\"http://dbpedia.org/resource/\",\"dbpedia-owl\":\"http://dbpedia.org/ontology/\",\"dbpprop\":\"http://dbpedia.org/property/\",\"dc\":\"http://purl.org/dc/terms/\",\"dc11\":\"http://purl.org/dc/elements/1.1/\",\"dcterms\":\"http://purl.org/dc/terms/\",\"foaf\":\"http://xmlns.com/foaf/0.1/\",\"geo\":\"http://www.w3.org/2003/01/geo/wgs84_pos#\",\"owl\":\"http://www.w3.org/2002/07/owl#\",\"rdf\":\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\",\"rdfs\":\"http://www.w3.org/2000/01/rdf-schema#\",\"schema\":\"http://schema.org/\",\"skos\":\"http://www.w3.org/2008/05/skos#\",\"xsd\":\"http://www.w3.org/2001/XMLSchema#\"},\n 'name': 'urn:comunica:default:query-parse/actors#sparql',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_parse__3_0_0_components_ActorQueryParse_jsonld_ActorQueryParse_default_bus\n});\nconst urn_comunica_default_query_parse_actors_graphql = new (require('@comunica/actor-query-parse-graphql').ActorQueryParseGraphql)({\n 'name': 'urn:comunica:default:query-parse/actors#graphql',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_parse__3_0_0_components_ActorQueryParse_jsonld_ActorQueryParse_default_bus\n});\nconst urn_comunica_default_query_parse_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:query-parse/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_parse__3_0_0_components_ActorQueryParse_jsonld_ActorQueryParse_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_json = new (require('@comunica/actor-query-result-serialize-json').ActorQueryResultSerializeJson)({\n 'mediaTypePriorities': {\"application/json\":1},\n 'mediaTypeFormats': {\"application/json\":\"https://comunica.linkeddatafragments.org/#results_JSON\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#json',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_simple = new (require('@comunica/actor-query-result-serialize-simple').ActorQueryResultSerializeSimple)({\n 'mediaTypePriorities': {\"simple\":0.9},\n 'mediaTypeFormats': {\"simple\":\"https://comunica.linkeddatafragments.org/#results_simple\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#simple',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_csv = new (require('@comunica/actor-query-result-serialize-sparql-csv').ActorQueryResultSerializeSparqlCsv)({\n 'mediaTypePriorities': {\"text/csv\":0.75},\n 'mediaTypeFormats': {\"text/csv\":\"http://www.w3.org/ns/formats/SPARQL_Results_CSV\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#csv',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_sparql_tsv = new (require('@comunica/actor-query-result-serialize-sparql-tsv').ActorQueryResultSerializeSparqlTsv)({\n 'mediaTypePriorities': {\"text/tab-separated-values\":0.75},\n 'mediaTypeFormats': {\"text/tab-separated-values\":\"http://www.w3.org/ns/formats/SPARQL_Results_TSV\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#sparql-tsv',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_sparql_xml = new (require('@comunica/actor-query-result-serialize-sparql-xml').ActorQueryResultSerializeSparqlXml)({\n 'mediaTypePriorities': {\"application/sparql-results+xml\":0.8},\n 'mediaTypeFormats': {\"application/sparql-results+xml\":\"http://www.w3.org/ns/formats/SPARQL_Results_XML\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#sparql-xml',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_table = new (require('@comunica/actor-query-result-serialize-table').ActorQueryResultSerializeTable)({\n 'columnWidth': 50,\n 'mediaTypePriorities': {\"table\":0.6},\n 'mediaTypeFormats': {\"table\":\"https://comunica.linkeddatafragments.org/#results_table\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#table',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_tree = new (require('@comunica/actor-query-result-serialize-tree').ActorQueryResultSerializeTree)({\n 'mediaTypePriorities': {\"tree\":0.5},\n 'mediaTypeFormats': {\"tree\":\"https://comunica.linkeddatafragments.org/#results_tree\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#tree',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_mediators_serialize = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:query-result-serialize/mediators#serialize',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_mediators_mediaType = new (require('@comunica/mediator-combine-union').MediatorCombineUnion)({\n 'field': 'mediaTypes',\n 'name': 'urn:comunica:default:query-result-serialize/mediators#mediaType',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_mediators_mediaTypeFormat = new (require('@comunica/mediator-combine-union').MediatorCombineUnion)({\n 'field': 'mediaTypeFormats',\n 'name': 'urn:comunica:default:query-result-serialize/mediators#mediaTypeFormat',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_source_identify_hypermedia_mediators_main = new (require('@comunica/mediator-number').MediatorNumber)({\n 'field': 'filterFactor',\n 'type': 'max',\n 'ignoreErrors': true,\n 'name': 'urn:comunica:default:query-source-identify-hypermedia/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify_hypermedia__3_0_0_components_ActorQuerySourceIdentifyHypermedia_jsonld_ActorQuerySourceIdentifyHypermedia_default_bus\n});\nconst urn_comunica_default_dereference_actors_fallback = new (require('@comunica/actor-dereference-fallback').ActorDereferenceFallback)({\n 'name': 'urn:comunica:default:dereference/actors#fallback',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_dereference__3_0_0_components_ActorDereference_jsonld_ActorDereference_default_bus\n});\nconst urn_comunica_default_dereference_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:dereference/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_dereference__3_0_0_components_ActorDereference_jsonld_ActorDereference_default_bus\n});\nconst urn_comunica_default_dereference_rdf_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:dereference-rdf/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_dereference_rdf__3_0_0_components_ActorDereferenceRdf_jsonld_ActorDereferenceRdf_default_bus\n});\nconst urn_comunica_default_rdf_join_entries_sort_actors_cardinality = new (require('@comunica/actor-rdf-join-entries-sort-cardinality').ActorRdfJoinEntriesSortCardinality)({\n 'name': 'urn:comunica:default:rdf-join-entries-sort/actors#cardinality',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join_entries_sort__3_0_0_components_ActorRdfJoinEntriesSort_jsonld_ActorRdfJoinEntriesSort_default_bus\n});\nconst urn_comunica_default_rdf_join_entries_sort_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:rdf-join-entries-sort/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join_entries_sort__3_0_0_components_ActorRdfJoinEntriesSort_jsonld_ActorRdfJoinEntriesSort_default_bus\n});\nconst urn_comunica_default_rdf_join_selectivity_actors_variable_counting = new (require('@comunica/actor-rdf-join-selectivity-variable-counting').ActorRdfJoinSelectivityVariableCounting)({\n 'name': 'urn:comunica:default:rdf-join-selectivity/actors#variable-counting',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join_selectivity__3_0_0_components_ActorRdfJoinSelectivity_jsonld_ActorRdfJoinSelectivity_default_bus\n});\nconst urn_comunica_default_rdf_join_selectivity_mediators_main = new (require('@comunica/mediator-number').MediatorNumber)({\n 'field': 'accuracy',\n 'type': 'max',\n 'ignoreErrors': true,\n 'name': 'urn:comunica:default:rdf-join-selectivity/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join_selectivity__3_0_0_components_ActorRdfJoinSelectivity_jsonld_ActorRdfJoinSelectivity_default_bus\n});\nconst urn_comunica_default_rdf_metadata_actors_primary_topic = new (require('@comunica/actor-rdf-metadata-primary-topic').ActorRdfMetadataPrimaryTopic)({\n 'metadataToData': false,\n 'dataToMetadataOnInvalidMetadataGraph': true,\n 'name': 'urn:comunica:default:rdf-metadata/actors#primary-topic',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata__3_0_0_components_ActorRdfMetadata_jsonld_ActorRdfMetadata_default_bus\n});\nconst urn_comunica_default_rdf_metadata_actors_all = new (require('@comunica/actor-rdf-metadata-all').ActorRdfMetadataAll)({\n 'name': 'urn:comunica:default:rdf-metadata/actors#all',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata__3_0_0_components_ActorRdfMetadata_jsonld_ActorRdfMetadata_default_bus\n});\nconst urn_comunica_default_rdf_metadata_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:rdf-metadata/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata__3_0_0_components_ActorRdfMetadata_jsonld_ActorRdfMetadata_default_bus\n});\nconst urn_comunica_default_rdf_metadata_accumulate_actors_cancontainundefs = new (require('@comunica/actor-rdf-metadata-accumulate-cancontainundefs').ActorRdfMetadataAccumulateCanContainUndefs)({\n 'name': 'urn:comunica:default:rdf-metadata-accumulate/actors#cancontainundefs',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_accumulate__3_0_0_components_ActorRdfMetadataAccumulate_jsonld_ActorRdfMetadataAccumulate_default_bus\n});\nconst urn_comunica_default_rdf_metadata_accumulate_actors_cardinality = new (require('@comunica/actor-rdf-metadata-accumulate-cardinality').ActorRdfMetadataAccumulateCardinality)({\n 'name': 'urn:comunica:default:rdf-metadata-accumulate/actors#cardinality',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_accumulate__3_0_0_components_ActorRdfMetadataAccumulate_jsonld_ActorRdfMetadataAccumulate_default_bus\n});\nconst urn_comunica_default_rdf_metadata_accumulate_actors_pagesize = new (require('@comunica/actor-rdf-metadata-accumulate-pagesize').ActorRdfMetadataAccumulatePageSize)({\n 'name': 'urn:comunica:default:rdf-metadata-accumulate/actors#pagesize',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_accumulate__3_0_0_components_ActorRdfMetadataAccumulate_jsonld_ActorRdfMetadataAccumulate_default_bus\n});\nconst urn_comunica_default_rdf_metadata_accumulate_actors_requesttime = new (require('@comunica/actor-rdf-metadata-accumulate-requesttime').ActorRdfMetadataAccumulateRequestTime)({\n 'name': 'urn:comunica:default:rdf-metadata-accumulate/actors#requesttime',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_accumulate__3_0_0_components_ActorRdfMetadataAccumulate_jsonld_ActorRdfMetadataAccumulate_default_bus\n});\nconst urn_comunica_default_rdf_metadata_accumulate_mediators_main = new (require('@comunica/mediator-combine-union').MediatorCombineUnion)({\n 'field': 'metadata',\n 'name': 'urn:comunica:default:rdf-metadata-accumulate/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_accumulate__3_0_0_components_ActorRdfMetadataAccumulate_jsonld_ActorRdfMetadataAccumulate_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_actors_hydra_controls = new (require('@comunica/actor-rdf-metadata-extract-hydra-controls').ActorRdfMetadataExtractHydraControls)({\n 'name': 'urn:comunica:default:rdf-metadata-extract/actors#hydra-controls',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_actors_hydra_count = new (require('@comunica/actor-rdf-metadata-extract-hydra-count').ActorRdfMetadataExtractHydraCount)({\n 'predicates': [\n 'http://www.w3.org/ns/hydra/core#totalItems',\n 'http://rdfs.org/ns/void#triples'\n],\n 'name': 'urn:comunica:default:rdf-metadata-extract/actors#hydra-count',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_actors_hydra_pagesize = new (require('@comunica/actor-rdf-metadata-extract-hydra-pagesize').ActorRdfMetadataExtractHydraPagesize)({\n 'predicates': [\n 'http://www.w3.org/ns/hydra/core#itemsPerPage'\n],\n 'name': 'urn:comunica:default:rdf-metadata-extract/actors#hydra-pagesize',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_actors_request_time = new (require('@comunica/actor-rdf-metadata-extract-request-time').ActorRdfMetadataExtractRequestTime)({\n 'name': 'urn:comunica:default:rdf-metadata-extract/actors#request-time',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_actors_allow_http_methods = new (require('@comunica/actor-rdf-metadata-extract-allow-http-methods').ActorRdfMetadataExtractAllowHttpMethods)({\n 'name': 'urn:comunica:default:rdf-metadata-extract/actors#allow-http-methods',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_actors_put_accepted = new (require('@comunica/actor-rdf-metadata-extract-put-accepted').ActorRdfMetadataExtractPutAccepted)({\n 'name': 'urn:comunica:default:rdf-metadata-extract/actors#put-accepted',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_actors_patch_sparql_update = new (require('@comunica/actor-rdf-metadata-extract-patch-sparql-update').ActorRdfMetadataExtractPatchSparqlUpdate)({\n 'name': 'urn:comunica:default:rdf-metadata-extract/actors#patch-sparql-update',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_actors_sparql_service = new (require('@comunica/actor-rdf-metadata-extract-sparql-service').ActorRdfMetadataExtractSparqlService)({\n 'inferHttpsEndpoint': true,\n 'name': 'urn:comunica:default:rdf-metadata-extract/actors#sparql-service',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_mediators_main = new (require('@comunica/mediator-combine-union').MediatorCombineUnion)({\n 'filterErrors': true,\n 'field': 'metadata',\n 'name': 'urn:comunica:default:rdf-metadata-extract/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_parse_actors_n3 = new (require('@comunica/actor-rdf-parse-n3').ActorRdfParseN3)({\n 'mediaTypePriorities': {\"application/n-quads\":1,\"application/n-triples\":0.8,\"application/trig\":0.95,\"text/n3\":0.35,\"text/turtle\":0.6},\n 'mediaTypeFormats': {\"application/n-quads\":\"http://www.w3.org/ns/formats/N-Quads\",\"application/n-triples\":\"http://www.w3.org/ns/formats/N-Triples\",\"application/trig\":\"http://www.w3.org/ns/formats/TriG\",\"text/n3\":\"http://www.w3.org/ns/formats/N3\",\"text/turtle\":\"http://www.w3.org/ns/formats/Turtle\"},\n 'priorityScale': 1,\n 'name': 'urn:comunica:default:rdf-parse/actors#n3',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus\n});\nconst urn_comunica_default_rdf_parse_actors_rdfxml = new (require('@comunica/actor-rdf-parse-rdfxml').ActorRdfParseRdfXml)({\n 'mediaTypePriorities': {\"application/rdf+xml\":1},\n 'mediaTypeFormats': {\"application/rdf+xml\":\"http://www.w3.org/ns/formats/RDF_XML\"},\n 'priorityScale': 0.5,\n 'name': 'urn:comunica:default:rdf-parse/actors#rdfxml',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus\n});\nconst urn_comunica_default_rdf_parse_actors_xmlrdfa = new (require('@comunica/actor-rdf-parse-xml-rdfa').ActorRdfParseXmlRdfa)({\n 'mediaTypePriorities': {\"application/xml\":1,\"image/svg+xml\":1,\"text/xml\":1},\n 'mediaTypeFormats': {\"application/xml\":\"http://www.w3.org/ns/formats/RDFa\",\"image/svg+xml\":\"http://www.w3.org/ns/formats/RDFa\",\"text/xml\":\"http://www.w3.org/ns/formats/RDFa\"},\n 'priorityScale': 0.3,\n 'name': 'urn:comunica:default:rdf-parse/actors#xmlrdfa',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus\n});\nconst urn_comunica_default_rdf_parse_actors_shaclc = new (require('@comunica/actor-rdf-parse-shaclc').ActorRdfParseShaclc)({\n 'mediaTypePriorities': {\"text/shaclc\":1,\"text/shaclc-ext\":0.5},\n 'mediaTypeFormats': {\"text/shaclc\":\"http://www.w3.org/ns/formats/Shaclc\",\"text/shaclc-ext\":\"http://www.w3.org/ns/formats/ShaclcExtended\"},\n 'priorityScale': 0.1,\n 'name': 'urn:comunica:default:rdf-parse/actors#shaclc',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus\n});\nconst urn_comunica_default_rdf_parse_mediators_parse = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:rdf-parse/mediators#parse',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus\n});\nconst urn_comunica_default_rdf_parse_mediators_mediaType = new (require('@comunica/mediator-combine-union').MediatorCombineUnion)({\n 'field': 'mediaTypes',\n 'name': 'urn:comunica:default:rdf-parse/mediators#mediaType',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus\n});\nconst urn_comunica_default_rdf_parse_actors_html = new (require('@comunica/actor-rdf-parse-html').ActorRdfParseHtml)({\n 'busRdfParseHtml': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse_html__3_0_0_components_ActorRdfParseHtml_jsonld_ActorRdfParseHtml_default_bus,\n 'mediaTypePriorities': {\"application/xhtml+xml\":0.9,\"text/html\":1},\n 'mediaTypeFormats': {\"application/xhtml+xml\":\"http://www.w3.org/ns/formats/HTML\",\"text/html\":\"http://www.w3.org/ns/formats/HTML\"},\n 'priorityScale': 0.2,\n 'name': 'urn:comunica:default:rdf-parse/actors#html',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus\n});\nconst urn_comunica_default_rdf_parse_html_actors_microdata = new (require('@comunica/actor-rdf-parse-html-microdata').ActorRdfParseHtmlMicrodata)({\n 'name': 'urn:comunica:default:rdf-parse-html/actors#microdata',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse_html__3_0_0_components_ActorRdfParseHtml_jsonld_ActorRdfParseHtml_default_bus\n});\nconst urn_comunica_default_rdf_parse_html_actors_rdfa = new (require('@comunica/actor-rdf-parse-html-rdfa').ActorRdfParseHtmlRdfa)({\n 'name': 'urn:comunica:default:rdf-parse-html/actors#rdfa',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse_html__3_0_0_components_ActorRdfParseHtml_jsonld_ActorRdfParseHtml_default_bus\n});\nconst urn_comunica_default_rdf_resolve_hypermedia_links_actors_next = new (require('@comunica/actor-rdf-resolve-hypermedia-links-next').ActorRdfResolveHypermediaLinksNext)({\n 'name': 'urn:comunica:default:rdf-resolve-hypermedia-links/actors#next',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_resolve_hypermedia_links__3_0_0_components_ActorRdfResolveHypermediaLinks_jsonld_ActorRdfResolveHypermediaLinks_default_bus\n});\nconst urn_comunica_default_rdf_resolve_hypermedia_links_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:rdf-resolve-hypermedia-links/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_resolve_hypermedia_links__3_0_0_components_ActorRdfResolveHypermediaLinks_jsonld_ActorRdfResolveHypermediaLinks_default_bus\n});\nconst urn_comunica_default_rdf_resolve_hypermedia_links_queue_actors_fifo = new (require('@comunica/actor-rdf-resolve-hypermedia-links-queue-fifo').ActorRdfResolveHypermediaLinksQueueFifo)({\n 'name': 'urn:comunica:default:rdf-resolve-hypermedia-links-queue/actors#fifo',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_resolve_hypermedia_links_queue__3_0_0_components_ActorRdfResolveHypermediaLinksQueue_jsonld_ActorRdfResolveHypermediaLinksQueue_default_bus\n});\nconst urn_comunica_default_rdf_resolve_hypermedia_links_queue_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:rdf-resolve-hypermedia-links-queue/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_resolve_hypermedia_links_queue__3_0_0_components_ActorRdfResolveHypermediaLinksQueue_jsonld_ActorRdfResolveHypermediaLinksQueue_default_bus\n});\nconst urn_comunica_default_rdf_serialize_actors_n3 = new (require('@comunica/actor-rdf-serialize-n3').ActorRdfSerializeN3)({\n 'mediaTypePriorities': {\"application/n-quads\":1,\"application/n-triples\":0.8,\"application/trig\":0.95,\"text/n3\":0.35,\"text/turtle\":0.6},\n 'mediaTypeFormats': {\"application/n-quads\":\"http://www.w3.org/ns/formats/N-Quads\",\"application/n-triples\":\"http://www.w3.org/ns/formats/N-Triples\",\"application/trig\":\"http://www.w3.org/ns/formats/TriG\",\"text/n3\":\"http://www.w3.org/ns/formats/N3\",\"text/turtle\":\"http://www.w3.org/ns/formats/Turtle\"},\n 'name': 'urn:comunica:default:rdf-serialize/actors#n3',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_serialize__3_0_0_components_ActorRdfSerialize_jsonld_ActorRdfSerialize_default_bus\n});\nconst urn_comunica_default_rdf_serialize_actors_jsonld = new (require('@comunica/actor-rdf-serialize-jsonld').ActorRdfSerializeJsonLd)({\n 'jsonStringifyIndentSpaces': 2,\n 'mediaTypePriorities': {\"application/ld+json\":1},\n 'mediaTypeFormats': {\"application/ld+json\":\"http://www.w3.org/ns/formats/JSON-LD\"},\n 'priorityScale': 0.9,\n 'name': 'urn:comunica:default:rdf-serialize/actors#jsonld',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_serialize__3_0_0_components_ActorRdfSerialize_jsonld_ActorRdfSerialize_default_bus\n});\nconst urn_comunica_default_rdf_serialize_actors_shaclc = new (require('@comunica/actor-rdf-serialize-shaclc').ActorRdfSerializeShaclc)({\n 'mediaTypePriorities': {\"text/shaclc\":1,\"text/shaclc-ext\":0.5},\n 'mediaTypeFormats': {\"text/shaclc\":\"http://www.w3.org/ns/formats/Shaclc\",\"text/shaclc-ext\":\"http://www.w3.org/ns/formats/ShaclcExtended\"},\n 'priorityScale': 0.1,\n 'name': 'urn:comunica:default:rdf-serialize/actors#shaclc',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_serialize__3_0_0_components_ActorRdfSerialize_jsonld_ActorRdfSerialize_default_bus\n});\nconst urn_comunica_default_rdf_serialize_mediators_serialize = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:rdf-serialize/mediators#serialize',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_serialize__3_0_0_components_ActorRdfSerialize_jsonld_ActorRdfSerialize_default_bus\n});\nconst urn_comunica_default_rdf_serialize_mediators_mediaType = new (require('@comunica/mediator-combine-union').MediatorCombineUnion)({\n 'field': 'mediaTypes',\n 'name': 'urn:comunica:default:rdf-serialize/mediators#mediaType',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_serialize__3_0_0_components_ActorRdfSerialize_jsonld_ActorRdfSerialize_default_bus\n});\nconst urn_comunica_default_rdf_serialize_mediators_mediaTypeFormat = new (require('@comunica/mediator-combine-union').MediatorCombineUnion)({\n 'field': 'mediaTypeFormats',\n 'name': 'urn:comunica:default:rdf-serialize/mediators#mediaTypeFormat',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_serialize__3_0_0_components_ActorRdfSerialize_jsonld_ActorRdfSerialize_default_bus\n});\nconst urn_comunica_default_rdf_update_hypermedia_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:rdf-update-hypermedia/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_hypermedia__3_0_0_components_ActorRdfUpdateHypermedia_jsonld_ActorRdfUpdateHypermedia_default_bus\n});\nconst urn_comunica_default_rdf_update_quads_actors_rdfjs_store = new (require('@comunica/actor-rdf-update-quads-rdfjs-store').ActorRdfUpdateQuadsRdfJsStore)({\n 'name': 'urn:comunica:default:rdf-update-quads/actors#rdfjs-store',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_quads__3_0_0_components_ActorRdfUpdateQuads_jsonld_ActorRdfUpdateQuads_default_bus\n});\nconst urn_comunica_default_rdf_update_quads_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:rdf-update-quads/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_quads__3_0_0_components_ActorRdfUpdateQuads_jsonld_ActorRdfUpdateQuads_default_bus\n});\nconst urn_comunica_default_http_actors_fetch = new (require('@comunica/actor-http-fetch').ActorHttpFetch)({\n 'agentOptions': {\"keepAlive\":true,\"maxSockets\":5},\n 'name': 'urn:comunica:default:http/actors#fetch',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_default_bus\n});\nconst urn_comunica_default_http_mediators_no_fallback = new (require('@comunica/mediator-number').MediatorNumber)({\n 'field': 'time',\n 'type': 'min',\n 'ignoreErrors': true,\n 'name': 'urn:comunica:default:http/mediators#no-fallback',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_default_bus\n});\nconst urn_comunica_default_http_mediators_main = new (require('@comunica/mediator-number').MediatorNumber)({\n 'field': 'time',\n 'type': 'min',\n 'ignoreErrors': true,\n 'name': 'urn:comunica:default:http/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_fallback_bus\n});\nconst urn_comunica_default_query_operation_actors_source = new (require('@comunica/actor-query-operation-source').ActorQueryOperationSource)({\n 'name': 'urn:comunica:default:query-operation/actors#source',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_mediators_main = new (require('@comunica/mediator-number').MediatorNumber)({\n 'field': 'httpRequests',\n 'type': 'min',\n 'ignoreErrors': true,\n 'name': 'urn:comunica:default:query-operation/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_process_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:query-process/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_process__3_0_0_components_ActorQueryProcess_jsonld_ActorQueryProcess_default_bus\n});\nconst urn_comunica_default_query_source_identify_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:query-source-identify/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify__3_0_0_components_ActorQuerySourceIdentify_jsonld_ActorQuerySourceIdentify_default_bus\n});\nconst urn_comunica_default_rdf_join_mediators_main = new (require('@comunica/mediator-join-coefficients-fixed').MediatorJoinCoefficientsFixed)({\n 'cpuWeight': 10,\n 'memoryWeight': 1,\n 'timeWeight': 2,\n 'ioWeight': 100,\n 'name': 'urn:comunica:default:rdf-join/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_context_preprocess_query_source_identify__3_0_0_components_ActorContextPreprocessQuerySourceIdentify_jsonld_IActorContextPreprocessQuerySourceIdentifyArgs_default_invalidator = new (require('@comunica/bus-http-invalidate').ActorHttpInvalidateListenable)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-context-preprocess-query-source-identify/^3.0.0/components/ActorContextPreprocessQuerySourceIdentify.jsonld#IActorContextPreprocessQuerySourceIdentifyArgs_default_invalidator',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http_invalidate__3_0_0_components_ActorHttpInvalidate_jsonld_ActorHttpInvalidate_default_bus\n});\nconst urn_comunica_default_http_invalidate_mediators_main = new (require('@comunica/mediator-all').MediatorAll)({\n 'name': 'urn:comunica:default:http-invalidate/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http_invalidate__3_0_0_components_ActorHttpInvalidate_jsonld_ActorHttpInvalidate_default_bus\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_rdf_update_quads_hypermedia__3_0_0_components_ActorRdfUpdateQuadsHypermedia_jsonld_IActorRdfUpdateQuadsHypermediaArgs_default_invalidator = new (require('@comunica/bus-http-invalidate').ActorHttpInvalidateListenable)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-update-quads-hypermedia/^3.0.0/components/ActorRdfUpdateQuadsHypermedia.jsonld#IActorRdfUpdateQuadsHypermediaArgs_default_invalidator',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http_invalidate__3_0_0_components_ActorHttpInvalidate_jsonld_ActorHttpInvalidate_default_bus\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_query_result_serialize_sparql_json__3_0_0_components_ActionObserverHttp_jsonld_IActionObserverHttpArgs_default_invalidator = new (require('@comunica/bus-http-invalidate').ActorHttpInvalidateListenable)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-sparql-json/^3.0.0/components/ActionObserverHttp.jsonld#IActionObserverHttpArgs_default_invalidator',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http_invalidate__3_0_0_components_ActorHttpInvalidate_jsonld_ActorHttpInvalidate_default_bus\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_query_result_serialize_stats__3_0_0_components_ActionObserverHttp_jsonld_IActionObserverHttpArgs_default_invalidator = new (require('@comunica/bus-http-invalidate').ActorHttpInvalidateListenable)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-stats/^3.0.0/components/ActionObserverHttp.jsonld#IActionObserverHttpArgs_default_invalidator',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http_invalidate__3_0_0_components_ActorHttpInvalidate_jsonld_ActorHttpInvalidate_default_bus\n});\nconst urn_comunica_default_merge_bindings_context_mediators_main = new (require('@comunica/mediator-combine-union').MediatorCombineUnion)({\n 'field': 'mergeHandlers',\n 'name': 'urn:comunica:default:merge-bindings-context/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_merge_bindings_context__3_0_0_components_ActorMergeBindingsContext_jsonld_ActorMergeBindingsContext_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_single = new (require('@comunica/actor-rdf-join-inner-single').ActorRdfJoinSingle)({\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-single',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_multi_empty = new (require('@comunica/actor-rdf-join-inner-multi-empty').ActorRdfJoinMultiEmpty)({\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-multi-empty',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_multi_bind_source = new (require('@comunica/actor-rdf-join-inner-multi-bind-source').ActorRdfJoinMultiBindSource)({\n 'selectivityModifier': 0.0001,\n 'blockSize': 16,\n 'mediatorJoinEntriesSort': urn_comunica_default_rdf_join_entries_sort_mediators_main,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-multi-bind-source',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_hash = new (require('@comunica/actor-rdf-join-inner-hash').ActorRdfJoinHash)({\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-hash',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_symmetric_hash = new (require('@comunica/actor-rdf-join-inner-symmetrichash').ActorRdfJoinSymmetricHash)({\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-symmetric-hash',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_nested_loop = new (require('@comunica/actor-rdf-join-inner-nestedloop').ActorRdfJoinNestedLoop)({\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-nested-loop',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_minus_hash = new (require('@comunica/actor-rdf-join-minus-hash').ActorRdfJoinMinusHash)({\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#minus-hash',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_minus_hash_undef = new (require('@comunica/actor-rdf-join-minus-hash-undef').ActorRdfJoinMinusHashUndef)({\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#minus-hash-undef',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_optional_hash_def_nonblocking = new (require('@comunica/actor-rdf-join-optional-hash').ActorRdfJoinOptionalHash)({\n 'canHandleUndefs': false,\n 'blocking': false,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#optional-hash-def-nonblocking',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_optional_hash_def_blocking = new (require('@comunica/actor-rdf-join-optional-hash').ActorRdfJoinOptionalHash)({\n 'canHandleUndefs': false,\n 'blocking': true,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#optional-hash-def-blocking',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_optional_hash_undef_nonblocking = new (require('@comunica/actor-rdf-join-optional-hash').ActorRdfJoinOptionalHash)({\n 'canHandleUndefs': true,\n 'blocking': false,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#optional-hash-undef-nonblocking',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_optional_hash_undef_blocking = new (require('@comunica/actor-rdf-join-optional-hash').ActorRdfJoinOptionalHash)({\n 'canHandleUndefs': true,\n 'blocking': true,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#optional-hash-undef-blocking',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_optional_nested_loop = new (require('@comunica/actor-rdf-join-optional-nestedloop').ActorRdfJoinOptionalNestedLoop)({\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#optional-nested-loop',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_dereference_rdf_actors_parse = new (require('@comunica/actor-dereference-rdf-parse').ActorDereferenceRdfParse)({\n 'mediatorDereference': urn_comunica_default_dereference_mediators_main,\n 'mediatorParse': urn_comunica_default_rdf_parse_mediators_parse,\n 'mediatorParseMediatypes': urn_comunica_default_rdf_parse_mediators_mediaType,\n 'mediaMappings': {\"htm\":\"text/html\",\"html\":\"text/html\",\"json\":\"application/json\",\"jsonld\":\"application/ld+json\",\"n3\":\"text/n3\",\"nq\":\"application/n-quads\",\"nquads\":\"application/n-quads\",\"nt\":\"application/n-triples\",\"ntriples\":\"application/n-triples\",\"owl\":\"application/rdf+xml\",\"rdf\":\"application/rdf+xml\",\"rdfxml\":\"application/rdf+xml\",\"shaclc\":\"text/shaclc\",\"shaclce\":\"text/shaclc-ext\",\"shc\":\"text/shaclc\",\"shce\":\"text/shaclc-ext\",\"svg\":\"image/svg+xml\",\"svgz\":\"image/svg+xml\",\"trig\":\"application/trig\",\"ttl\":\"text/turtle\",\"turtle\":\"text/turtle\",\"xht\":\"application/xhtml+xml\",\"xhtml\":\"application/xhtml+xml\",\"xml\":\"application/xml\"},\n 'name': 'urn:comunica:default:dereference-rdf/actors#parse',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_dereference_rdf__3_0_0_components_ActorDereferenceRdf_jsonld_ActorDereferenceRdf_default_bus\n});\nconst urn_comunica_default_rdf_parse_html_actors_script = new (require('@comunica/actor-rdf-parse-html-script').ActorRdfParseHtmlScript)({\n 'mediatorRdfParseMediatypes': urn_comunica_default_rdf_parse_mediators_mediaType,\n 'mediatorRdfParseHandle': urn_comunica_default_rdf_parse_mediators_parse,\n 'name': 'urn:comunica:default:rdf-parse-html/actors#script',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse_html__3_0_0_components_ActorRdfParseHtml_jsonld_ActorRdfParseHtml_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_rdf = new (require('@comunica/actor-query-result-serialize-rdf').ActorQueryResultSerializeRdf)({\n 'mediatorRdfSerialize': urn_comunica_default_rdf_serialize_mediators_serialize,\n 'mediatorMediaTypeCombiner': urn_comunica_default_rdf_serialize_mediators_mediaType,\n 'mediatorMediaTypeFormatCombiner': urn_comunica_default_rdf_serialize_mediators_mediaTypeFormat,\n 'name': 'urn:comunica:default:query-result-serialize/actors#rdf',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_http_actors_wayback = new (require('@comunica/actor-http-wayback').ActorHttpWayback)({\n 'mediatorHttp': urn_comunica_default_http_mediators_no_fallback,\n 'name': 'urn:comunica:default:http/actors#wayback',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_fallback_bus\n});\nconst urn_comunica_default_rdf_parse_actors_jsonld = new (require('@comunica/actor-rdf-parse-jsonld').ActorRdfParseJsonLd)({\n 'mediatorHttp': urn_comunica_default_http_mediators_main,\n 'mediaTypePriorities': {\"application/json\":0.15,\"application/ld+json\":1},\n 'mediaTypeFormats': {\"application/json\":\"http://www.w3.org/ns/formats/JSON-LD\",\"application/ld+json\":\"http://www.w3.org/ns/formats/JSON-LD\"},\n 'priorityScale': 0.9,\n 'name': 'urn:comunica:default:rdf-parse/actors#jsonld',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus\n});\nconst urn_comunica_default_rdf_update_hypermedia_actors_patch_sparql_update = new (require('@comunica/actor-rdf-update-hypermedia-patch-sparql-update').ActorRdfUpdateHypermediaPatchSparqlUpdate)({\n 'mediatorHttp': urn_comunica_default_http_mediators_main,\n 'name': 'urn:comunica:default:rdf-update-hypermedia/actors#patch-sparql-update',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_hypermedia__3_0_0_components_ActorRdfUpdateHypermedia_jsonld_ActorRdfUpdateHypermedia_default_bus\n});\nconst urn_comunica_default_rdf_update_hypermedia_actors_put_ldp = new (require('@comunica/actor-rdf-update-hypermedia-put-ldp').ActorRdfUpdateHypermediaPutLdp)({\n 'mediatorHttp': urn_comunica_default_http_mediators_main,\n 'mediatorRdfSerializeMediatypes': urn_comunica_default_rdf_serialize_mediators_mediaType,\n 'mediatorRdfSerialize': urn_comunica_default_rdf_serialize_mediators_serialize,\n 'name': 'urn:comunica:default:rdf-update-hypermedia/actors#put-ldp',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_hypermedia__3_0_0_components_ActorRdfUpdateHypermedia_jsonld_ActorRdfUpdateHypermedia_default_bus\n});\nconst urn_comunica_default_rdf_update_hypermedia_actors_sparql = new (require('@comunica/actor-rdf-update-hypermedia-sparql').ActorRdfUpdateHypermediaSparql)({\n 'mediatorHttp': urn_comunica_default_http_mediators_main,\n 'checkUrlSuffixSparql': true,\n 'checkUrlSuffixUpdate': true,\n 'name': 'urn:comunica:default:rdf-update-hypermedia/actors#sparql',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_hypermedia__3_0_0_components_ActorRdfUpdateHypermedia_jsonld_ActorRdfUpdateHypermedia_default_bus\n});\nconst urn_comunica_default_query_operation_actors_ask = new (require('@comunica/actor-query-operation-ask').ActorQueryOperationAsk)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#ask',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_bgp = new (require('@comunica/actor-query-operation-bgp-join').ActorQueryOperationBgpJoin)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#bgp',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_construct = new (require('@comunica/actor-query-operation-construct').ActorQueryOperationConstruct)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#construct',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_distinct = new (require('@comunica/actor-query-operation-distinct-hash').ActorQueryOperationDistinctHash)({\n 'mediatorHashBindings': urn_comunica_default_hash_bindings_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#distinct',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_from = new (require('@comunica/actor-query-operation-from-quad').ActorQueryOperationFromQuad)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#from',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_project = new (require('@comunica/actor-query-operation-project').ActorQueryOperationProject)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#project',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_reduced = new (require('@comunica/actor-query-operation-reduced-hash').ActorQueryOperationReducedHash)({\n 'mediatorHashBindings': urn_comunica_default_hash_bindings_mediators_main,\n 'cacheSize': 100,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#reduced',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_slice = new (require('@comunica/actor-query-operation-slice').ActorQueryOperationSlice)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#slice',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_union = new (require('@comunica/actor-query-operation-union').ActorQueryOperationUnion)({\n 'mediatorRdfMetadataAccumulate': urn_comunica_default_rdf_metadata_accumulate_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#union',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_path_alt = new (require('@comunica/actor-query-operation-path-alt').ActorQueryOperationPathAlt)({\n 'mediatorRdfMetadataAccumulate': urn_comunica_default_rdf_metadata_accumulate_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#path-alt',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_path_inv = new (require('@comunica/actor-query-operation-path-inv').ActorQueryOperationPathInv)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#path-inv',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_path_link = new (require('@comunica/actor-query-operation-path-link').ActorQueryOperationPathLink)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#path-link',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_path_nps = new (require('@comunica/actor-query-operation-path-nps').ActorQueryOperationPathNps)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#path-nps',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_update_clear = new (require('@comunica/actor-query-operation-update-clear').ActorQueryOperationClear)({\n 'mediatorUpdateQuads': urn_comunica_default_rdf_update_quads_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#update-clear',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_update_composite = new (require('@comunica/actor-query-operation-update-compositeupdate').ActorQueryOperationUpdateCompositeUpdate)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#update-composite',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_update_create = new (require('@comunica/actor-query-operation-update-create').ActorQueryOperationCreate)({\n 'mediatorUpdateQuads': urn_comunica_default_rdf_update_quads_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#update-create',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_update_drop = new (require('@comunica/actor-query-operation-update-drop').ActorQueryOperationDrop)({\n 'mediatorUpdateQuads': urn_comunica_default_rdf_update_quads_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#update-drop',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_update_load = new (require('@comunica/actor-query-operation-update-load').ActorQueryOperationLoad)({\n 'mediatorUpdateQuads': urn_comunica_default_rdf_update_quads_mediators_main,\n 'mediatorQuerySourceIdentify': urn_comunica_default_query_source_identify_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#update-load',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_join = new (require('@comunica/actor-query-operation-join').ActorQueryOperationJoin)({\n 'mediatorJoin': urn_comunica_default_rdf_join_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#join',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_minus = new (require('@comunica/actor-query-operation-minus').ActorQueryOperationMinus)({\n 'mediatorJoin': urn_comunica_default_rdf_join_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#minus',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_path_seq = new (require('@comunica/actor-query-operation-path-seq').ActorQueryOperationPathSeq)({\n 'mediatorJoin': urn_comunica_default_rdf_join_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#path-seq',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_multi_smallest = new (require('@comunica/actor-rdf-join-inner-multi-smallest').ActorRdfJoinMultiSmallest)({\n 'mediatorJoinEntriesSort': urn_comunica_default_rdf_join_entries_sort_mediators_main,\n 'mediatorJoin': urn_comunica_default_rdf_join_mediators_main,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-multi-smallest',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_multi_smallest_filter_bindings = new (require('@comunica/actor-rdf-join-inner-multi-smallest-filter-bindings').ActorRdfJoinMultiSmallestFilterBindings)({\n 'selectivityModifier': 0.0001,\n 'blockSize': 64,\n 'mediatorJoinEntriesSort': urn_comunica_default_rdf_join_entries_sort_mediators_main,\n 'mediatorJoin': urn_comunica_default_rdf_join_mediators_main,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-multi-smallest-filter-bindings',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_optimize_query_operation_actors_filter_pushdown = new (require('@comunica/actor-optimize-query-operation-filter-pushdown').ActorOptimizeQueryOperationFilterPushdown)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#filter-pushdown',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus,\n 'beforeActors': [\n urn_comunica_default_optimize_query_operation_actors_group_sources\n]\n});\nconst urn_comunica_default_dereference_actors_http = new (require('@comunica/actor-dereference-http').ActorDereferenceHttp)({\n 'mediatorHttp': urn_comunica_default_http_mediators_main,\n 'maxAcceptHeaderLength': 1024,\n 'maxAcceptHeaderLengthBrowser': 128,\n 'name': 'urn:comunica:default:dereference/actors#http',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_dereference__3_0_0_components_ActorDereference_jsonld_ActorDereference_default_bus,\n 'beforeActors': [\n urn_comunica_default_dereference_actors_fallback\n]\n});\nconst urn_comunica_default_http_actors_proxy = new (require('@comunica/actor-http-proxy').ActorHttpProxy)({\n 'mediatorHttp': urn_comunica_default_http_mediators_main,\n 'name': 'urn:comunica:default:http/actors#proxy',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_default_bus,\n 'beforeActors': [\n urn_comunica_default_http_actors_fetch\n]\n});\nconst urn_comunica_default_context_preprocess_actors_query_source_identify = new (require('@comunica/actor-context-preprocess-query-source-identify').ActorContextPreprocessQuerySourceIdentify)({\n 'cacheSize': 100,\n 'httpInvalidator': https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_context_preprocess_query_source_identify__3_0_0_components_ActorContextPreprocessQuerySourceIdentify_jsonld_IActorContextPreprocessQuerySourceIdentifyArgs_default_invalidator,\n 'mediatorQuerySourceIdentify': urn_comunica_default_query_source_identify_mediators_main,\n 'mediatorContextPreprocess': urn_comunica_default_context_preprocess_mediators_main,\n 'name': 'urn:comunica:default:context-preprocess/actors#query-source-identify',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__3_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus,\n 'beforeActors': [\n urn_comunica_default_context_preprocess_actors_query_source_skolemize\n]\n});\nconst urn_comunica_default_init_actors_query = new (require('@comunica/actor-init-query').ActorInitQuery)({\n 'mediatorQueryProcess': urn_comunica_default_query_process_mediators_main,\n 'mediatorQueryResultSerialize': urn_comunica_default_query_result_serialize_mediators_serialize,\n 'mediatorQueryResultSerializeMediaTypeCombiner': urn_comunica_default_query_result_serialize_mediators_mediaType,\n 'mediatorQueryResultSerializeMediaTypeFormatCombiner': urn_comunica_default_query_result_serialize_mediators_mediaTypeFormat,\n 'mediatorHttpInvalidate': urn_comunica_default_http_invalidate_mediators_main,\n 'defaultQueryInputFormat': 'sparql',\n 'allowNoSources': false,\n 'name': 'urn:comunica:default:init/actors#query',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_init__3_0_0_components_ActorInit_jsonld_ActorInit_default_bus\n});\nconst urn_comunica_default_rdf_update_quads_actors_hypermedia = new (require('@comunica/actor-rdf-update-quads-hypermedia').ActorRdfUpdateQuadsHypermedia)({\n 'cacheSize': 100,\n 'httpInvalidator': https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_rdf_update_quads_hypermedia__3_0_0_components_ActorRdfUpdateQuadsHypermedia_jsonld_IActorRdfUpdateQuadsHypermediaArgs_default_invalidator,\n 'mediatorDereferenceRdf': urn_comunica_default_dereference_rdf_mediators_main,\n 'mediatorMetadata': urn_comunica_default_rdf_metadata_mediators_main,\n 'mediatorMetadataExtract': urn_comunica_default_rdf_metadata_extract_mediators_main,\n 'mediatorRdfUpdateHypermedia': urn_comunica_default_rdf_update_hypermedia_mediators_main,\n 'name': 'urn:comunica:default:rdf-update-quads/actors#hypermedia',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_quads__3_0_0_components_ActorRdfUpdateQuads_jsonld_ActorRdfUpdateQuads_default_bus\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_query_result_serialize_sparql_json__3_0_0_components_ActorQueryResultSerializeSparqlJson_jsonld_ActorQueryResultSerializeSparqlJson_default_observer = new (require('@comunica/actor-query-result-serialize-sparql-json').ActionObserverHttp)({\n 'httpInvalidator': https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_query_result_serialize_sparql_json__3_0_0_components_ActionObserverHttp_jsonld_IActionObserverHttpArgs_default_invalidator,\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-sparql-json/^3.0.0/components/ActorQueryResultSerializeSparqlJson.jsonld#ActorQueryResultSerializeSparqlJson_default_observer',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_default_bus\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_query_result_serialize_stats__3_0_0_components_ActorQueryResultSerializeStats_jsonld_ActorQueryResultSerializeStats_default_observer = new (require('@comunica/actor-query-result-serialize-stats').ActionObserverHttp)({\n 'httpInvalidator': https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_query_result_serialize_stats__3_0_0_components_ActionObserverHttp_jsonld_IActionObserverHttpArgs_default_invalidator,\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-stats/^3.0.0/components/ActorQueryResultSerializeStats.jsonld#ActorQueryResultSerializeStats_default_observer',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_default_bus\n});\nconst urn_comunica_default_query_source_identify_hypermedia_actors_qpf = new (require('@comunica/actor-query-source-identify-hypermedia-qpf').ActorQuerySourceIdentifyHypermediaQpf)({\n 'mediatorMetadata': urn_comunica_default_rdf_metadata_mediators_main,\n 'mediatorMetadataExtract': urn_comunica_default_rdf_metadata_extract_mediators_main,\n 'mediatorDereferenceRdf': urn_comunica_default_dereference_rdf_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'subjectUri': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#subject',\n 'predicateUri': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate',\n 'objectUri': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#object',\n 'graphUri': 'http://www.w3.org/ns/sparql-service-description#graph',\n 'name': 'urn:comunica:default:query-source-identify-hypermedia/actors#qpf',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify_hypermedia__3_0_0_components_ActorQuerySourceIdentifyHypermedia_jsonld_ActorQuerySourceIdentifyHypermedia_default_bus\n});\nconst urn_comunica_default_rdf_resolve_quad_pattern_actors_sparql = new (require('@comunica/actor-query-source-identify-hypermedia-sparql').ActorQuerySourceIdentifyHypermediaSparql)({\n 'mediatorHttp': urn_comunica_default_http_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'checkUrlSuffix': true,\n 'forceHttpGet': false,\n 'cacheSize': 1024,\n 'bindMethod': 'values',\n 'countTimeout': 3000,\n 'name': 'urn:comunica:default:rdf-resolve-quad-pattern/actors#sparql',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify_hypermedia__3_0_0_components_ActorQuerySourceIdentifyHypermedia_jsonld_ActorQuerySourceIdentifyHypermedia_default_bus\n});\nconst urn_comunica_default_query_source_identify_hypermedia_actors_none = new (require('@comunica/actor-query-source-identify-hypermedia-none').ActorQuerySourceIdentifyHypermediaNone)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'name': 'urn:comunica:default:query-source-identify-hypermedia/actors#none',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify_hypermedia__3_0_0_components_ActorQuerySourceIdentifyHypermedia_jsonld_ActorQuerySourceIdentifyHypermedia_default_bus\n});\nconst urn_comunica_default_query_operation_actors_extend = new (require('@comunica/actor-query-operation-extend').ActorQueryOperationExtend)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#extend',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_filter = new (require('@comunica/actor-query-operation-filter').ActorQueryOperationFilter)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#filter',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_group = new (require('@comunica/actor-query-operation-group').ActorQueryOperationGroup)({\n 'mediatorHashBindings': urn_comunica_default_hash_bindings_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#group',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_leftjoin = new (require('@comunica/actor-query-operation-leftjoin').ActorQueryOperationLeftJoin)({\n 'mediatorJoin': urn_comunica_default_rdf_join_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#leftjoin',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_nop = new (require('@comunica/actor-query-operation-nop').ActorQueryOperationNop)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#nop',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_orderby = new (require('@comunica/actor-query-operation-orderby').ActorQueryOperationOrderBy)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#orderby',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_service = new (require('@comunica/actor-query-operation-service').ActorQueryOperationService)({\n 'forceSparqlEndpoint': false,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQuerySourceIdentify': urn_comunica_default_query_source_identify_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#service',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_values = new (require('@comunica/actor-query-operation-values').ActorQueryOperationValues)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#values',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_path_one_or_more = new (require('@comunica/actor-query-operation-path-one-or-more').ActorQueryOperationPathOneOrMore)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#path-one-or-more',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_path_zero_or_more = new (require('@comunica/actor-query-operation-path-zero-or-more').ActorQueryOperationPathZeroOrMore)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#path-zero-or-more',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_path_zero_or_one = new (require('@comunica/actor-query-operation-path-zero-or-one').ActorQueryOperationPathZeroOrOne)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#path-zero-or-one',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_update_delete_insert = new (require('@comunica/actor-query-operation-update-deleteinsert').ActorQueryOperationUpdateDeleteInsert)({\n 'mediatorUpdateQuads': urn_comunica_default_rdf_update_quads_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#update-delete-insert',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_process_actors_sequential = new (require('@comunica/actor-query-process-sequential').ActorQueryProcessSequential)({\n 'mediatorContextPreprocess': urn_comunica_default_context_preprocess_mediators_main,\n 'mediatorQueryParse': urn_comunica_default_query_parse_mediators_main,\n 'mediatorOptimizeQueryOperation': urn_comunica_default_optimize_query_operation_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'name': 'urn:comunica:default:query-process/actors#sequential',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_process__3_0_0_components_ActorQueryProcess_jsonld_ActorQueryProcess_default_bus\n});\nconst urn_comunica_default_query_source_identify_actors_hypermedia = new (require('@comunica/actor-query-source-identify-hypermedia').ActorQuerySourceIdentifyHypermedia)({\n 'cacheSize': 100,\n 'maxIterators': 64,\n 'aggregateTraversalStore': true,\n 'mediatorDereferenceRdf': urn_comunica_default_dereference_rdf_mediators_main,\n 'mediatorMetadata': urn_comunica_default_rdf_metadata_mediators_main,\n 'mediatorMetadataExtract': urn_comunica_default_rdf_metadata_extract_mediators_main,\n 'mediatorMetadataAccumulate': urn_comunica_default_rdf_metadata_accumulate_mediators_main,\n 'mediatorQuerySourceIdentifyHypermedia': urn_comunica_default_query_source_identify_hypermedia_mediators_main,\n 'mediatorRdfResolveHypermediaLinks': urn_comunica_default_rdf_resolve_hypermedia_links_mediators_main,\n 'mediatorRdfResolveHypermediaLinksQueue': urn_comunica_default_rdf_resolve_hypermedia_links_queue_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'name': 'urn:comunica:default:query-source-identify/actors#hypermedia',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify__3_0_0_components_ActorQuerySourceIdentify_jsonld_ActorQuerySourceIdentify_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_none = new (require('@comunica/actor-rdf-join-inner-none').ActorRdfJoinNone)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-none',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_multi_bind = new (require('@comunica/actor-rdf-join-inner-multi-bind').ActorRdfJoinMultiBind)({\n 'bindOrder': 'depth-first',\n 'selectivityModifier': 0.0001,\n 'mediatorJoinEntriesSort': urn_comunica_default_rdf_join_entries_sort_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-multi-bind',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_optional_bind = new (require('@comunica/actor-rdf-join-optional-bind').ActorRdfJoinOptionalBind)({\n 'bindOrder': 'depth-first',\n 'selectivityModifier': 0.000001,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#optional-bind',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_sparql_json = new (require('@comunica/actor-query-result-serialize-sparql-json').ActorQueryResultSerializeSparqlJson)({\n 'emitMetadata': true,\n 'httpObserver': https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_query_result_serialize_sparql_json__3_0_0_components_ActorQueryResultSerializeSparqlJson_jsonld_ActorQueryResultSerializeSparqlJson_default_observer,\n 'mediaTypePriorities': {\"application/sparql-results+json\":0.8},\n 'mediaTypeFormats': {\"application/sparql-results+json\":\"http://www.w3.org/ns/formats/SPARQL_Results_JSON\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#sparql-json',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_stats = new (require('@comunica/actor-query-result-serialize-stats').ActorQueryResultSerializeStats)({\n 'httpObserver': https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_query_result_serialize_stats__3_0_0_components_ActorQueryResultSerializeStats_jsonld_ActorQueryResultSerializeStats_default_observer,\n 'mediaTypePriorities': {\"stats\":0.5},\n 'mediaTypeFormats': {\"stats\":\"https://comunica.linkeddatafragments.org/#results_stats\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#stats',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_process_actors_explain_parsed = new (require('@comunica/actor-query-process-explain-parsed').ActorQueryProcessExplainParsed)({\n 'queryProcessor': urn_comunica_default_query_process_actors_sequential,\n 'name': 'urn:comunica:default:query-process/actors#explain-parsed',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_process__3_0_0_components_ActorQueryProcess_jsonld_ActorQueryProcess_default_bus\n});\nconst urn_comunica_default_query_process_actors_explain_physical = new (require('@comunica/actor-query-process-explain-physical').ActorQueryProcessExplainPhysical)({\n 'queryProcessor': urn_comunica_default_query_process_actors_sequential,\n 'name': 'urn:comunica:default:query-process/actors#explain-physical',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_process__3_0_0_components_ActorQueryProcess_jsonld_ActorQueryProcess_default_bus\n});\nconst urn_comunica_default_query_process_actors_explain_logical = new (require('@comunica/actor-query-process-explain-logical').ActorQueryProcessExplainLogical)({\n 'queryProcessor': urn_comunica_default_query_process_actors_sequential,\n 'name': 'urn:comunica:default:query-process/actors#explain-logical',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_process__3_0_0_components_ActorQueryProcess_jsonld_ActorQueryProcess_default_bus\n});\nconst urn_comunica_default_optimize_query_operation_actors_prune_empty_source_operations = new (require('@comunica/actor-optimize-query-operation-prune-empty-source-operations').ActorOptimizeQueryOperationPruneEmptySourceOperations)({\n 'useAskIfSupported': false,\n 'name': 'urn:comunica:default:optimize-query-operation/actors#prune-empty-source-operations',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus,\n 'beforeActors': [\n urn_comunica_default_optimize_query_operation_actors_filter_pushdown\n]\n});\nconst urn_comunica_default_query_source_identify_actors_rdfjs = new (require('@comunica/actor-query-source-identify-rdfjs').ActorQuerySourceIdentifyRdfJs)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'name': 'urn:comunica:default:query-source-identify/actors#rdfjs',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify__3_0_0_components_ActorQuerySourceIdentify_jsonld_ActorQuerySourceIdentify_default_bus,\n 'beforeActors': [\n urn_comunica_default_query_source_identify_actors_hypermedia\n]\n});\nconst urn_comunica_default_query_source_identify_actors_serialized = new (require('@comunica/actor-query-source-identify-serialized').ActorQuerySourceIdentifySerialized)({\n 'mediatorRdfParse': urn_comunica_default_rdf_parse_mediators_parse,\n 'mediatorQuerySourceIdentify': urn_comunica_default_query_source_identify_mediators_main,\n 'name': 'urn:comunica:default:query-source-identify/actors#serialized',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify__3_0_0_components_ActorQuerySourceIdentify_jsonld_ActorQuerySourceIdentify_default_bus,\n 'beforeActors': [\n urn_comunica_default_query_source_identify_actors_hypermedia\n]\n});\nconst urn_comunica_default_optimize_query_operation_actors_join_connected = new (require('@comunica/actor-optimize-query-operation-join-connected').ActorOptimizeQueryOperationJoinConnected)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#join-connected',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus,\n 'beforeActors': [\n urn_comunica_default_optimize_query_operation_actors_prune_empty_source_operations\n]\n});\nconst urn_comunica_default_optimize_query_operation_actors_bgp_to_join = new (require('@comunica/actor-optimize-query-operation-bgp-to-join').ActorOptimizeQueryOperationBgpToJoin)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#bgp-to-join',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus,\n 'beforeActors': [\n urn_comunica_default_optimize_query_operation_actors_join_connected\n]\n});\nconst urn_comunica_default_optimize_query_operation_actors_join_bgp = new (require('@comunica/actor-optimize-query-operation-join-bgp').ActorOptimizeQueryOperationJoinBgp)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#join-bgp',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus,\n 'beforeActors': [\n urn_comunica_default_optimize_query_operation_actors_bgp_to_join\n]\n});\nconst urn_comunica_default_optimize_query_operation_actors_assign_sources_exhaustive = new (require('@comunica/actor-optimize-query-operation-assign-sources-exhaustive').ActorOptimizeQueryOperationAssignSourcesExhaustive)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#assign-sources-exhaustive',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus,\n 'beforeActors': [\n urn_comunica_default_optimize_query_operation_actors_join_bgp\n]\n});\nconst urn_comunica_default_optimize_query_operation_actors_describe_to_constructs_subject = new (require('@comunica/actor-optimize-query-operation-describe-to-constructs-subject').ActorOptimizeQueryOperationDescribeToConstructsSubject)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#describe-to-constructs-subject',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus,\n 'beforeActors': [\n urn_comunica_default_optimize_query_operation_actors_assign_sources_exhaustive\n]\n});\nconst urn_comunica_default_Runner = (https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_init__3_0_0_components_ActorInit_jsonld_ActorInit_default_bus, [\n urn_comunica_default_context_preprocess_actors_convert_shortcuts,\n urn_comunica_default_context_preprocess_actors_set_defaults,\n urn_comunica_default_context_preprocess_actors_source_to_destination,\n urn_comunica_default_context_preprocess_actors_query_source_identify,\n urn_comunica_default_context_preprocess_actors_query_source_skolemize,\n urn_comunica_default_hash_bindings_actors_sha1,\n urn_comunica_default_init_actors_query,\n urn_comunica_default_optimize_query_operation_actors_rewrite_copy,\n urn_comunica_default_optimize_query_operation_actors_rewrite_move,\n urn_comunica_default_optimize_query_operation_actors_rewrite_add,\n urn_comunica_default_optimize_query_operation_actors_describe_to_constructs_subject,\n urn_comunica_default_optimize_query_operation_actors_assign_sources_exhaustive,\n urn_comunica_default_optimize_query_operation_actors_join_bgp,\n urn_comunica_default_optimize_query_operation_actors_bgp_to_join,\n urn_comunica_default_optimize_query_operation_actors_join_connected,\n urn_comunica_default_optimize_query_operation_actors_prune_empty_source_operations,\n urn_comunica_default_optimize_query_operation_actors_filter_pushdown,\n urn_comunica_default_optimize_query_operation_actors_group_sources,\n urn_comunica_default_query_parse_actors_sparql,\n urn_comunica_default_query_parse_actors_graphql,\n urn_comunica_default_query_result_serialize_actors_json,\n urn_comunica_default_query_result_serialize_actors_rdf,\n urn_comunica_default_query_result_serialize_actors_simple,\n urn_comunica_default_query_result_serialize_actors_csv,\n urn_comunica_default_query_result_serialize_actors_sparql_json,\n urn_comunica_default_query_result_serialize_actors_sparql_tsv,\n urn_comunica_default_query_result_serialize_actors_sparql_xml,\n urn_comunica_default_query_result_serialize_actors_stats,\n urn_comunica_default_query_result_serialize_actors_table,\n urn_comunica_default_query_result_serialize_actors_tree,\n urn_comunica_default_query_source_identify_hypermedia_actors_qpf,\n urn_comunica_default_rdf_resolve_quad_pattern_actors_sparql,\n urn_comunica_default_query_source_identify_hypermedia_actors_none,\n urn_comunica_default_dereference_actors_http,\n urn_comunica_default_dereference_actors_fallback,\n urn_comunica_default_dereference_rdf_actors_parse,\n urn_comunica_default_rdf_join_entries_sort_actors_cardinality,\n urn_comunica_default_rdf_join_selectivity_actors_variable_counting,\n urn_comunica_default_rdf_metadata_actors_primary_topic,\n urn_comunica_default_rdf_metadata_actors_all,\n urn_comunica_default_rdf_metadata_accumulate_actors_cancontainundefs,\n urn_comunica_default_rdf_metadata_accumulate_actors_cardinality,\n urn_comunica_default_rdf_metadata_accumulate_actors_pagesize,\n urn_comunica_default_rdf_metadata_accumulate_actors_requesttime,\n urn_comunica_default_rdf_metadata_extract_actors_hydra_controls,\n urn_comunica_default_rdf_metadata_extract_actors_hydra_count,\n urn_comunica_default_rdf_metadata_extract_actors_hydra_pagesize,\n urn_comunica_default_rdf_metadata_extract_actors_request_time,\n urn_comunica_default_rdf_metadata_extract_actors_allow_http_methods,\n urn_comunica_default_rdf_metadata_extract_actors_put_accepted,\n urn_comunica_default_rdf_metadata_extract_actors_patch_sparql_update,\n urn_comunica_default_rdf_metadata_extract_actors_sparql_service,\n urn_comunica_default_rdf_parse_actors_n3,\n urn_comunica_default_rdf_parse_actors_jsonld,\n urn_comunica_default_rdf_parse_actors_rdfxml,\n urn_comunica_default_rdf_parse_actors_xmlrdfa,\n urn_comunica_default_rdf_parse_actors_html,\n urn_comunica_default_rdf_parse_actors_shaclc,\n urn_comunica_default_rdf_parse_html_actors_microdata,\n urn_comunica_default_rdf_parse_html_actors_rdfa,\n urn_comunica_default_rdf_parse_html_actors_script,\n urn_comunica_default_rdf_resolve_hypermedia_links_actors_next,\n urn_comunica_default_rdf_resolve_hypermedia_links_queue_actors_fifo,\n urn_comunica_default_rdf_serialize_actors_n3,\n urn_comunica_default_rdf_serialize_actors_jsonld,\n urn_comunica_default_rdf_serialize_actors_shaclc,\n urn_comunica_default_rdf_update_hypermedia_actors_patch_sparql_update,\n urn_comunica_default_rdf_update_hypermedia_actors_put_ldp,\n urn_comunica_default_rdf_update_hypermedia_actors_sparql,\n urn_comunica_default_rdf_update_quads_actors_hypermedia,\n urn_comunica_default_rdf_update_quads_actors_rdfjs_store,\n urn_comunica_default_http_actors_proxy,\n urn_comunica_default_http_actors_fetch,\n urn_comunica_default_http_actors_wayback,\n urn_comunica_default_query_operation_actors_ask,\n urn_comunica_default_query_operation_actors_bgp,\n urn_comunica_default_query_operation_actors_construct,\n urn_comunica_default_query_operation_actors_distinct,\n urn_comunica_default_query_operation_actors_extend,\n urn_comunica_default_query_operation_actors_filter,\n urn_comunica_default_query_operation_actors_from,\n urn_comunica_default_query_operation_actors_group,\n urn_comunica_default_query_operation_actors_join,\n urn_comunica_default_query_operation_actors_leftjoin,\n urn_comunica_default_query_operation_actors_minus,\n urn_comunica_default_query_operation_actors_nop,\n urn_comunica_default_query_operation_actors_orderby,\n urn_comunica_default_query_operation_actors_project,\n urn_comunica_default_query_operation_actors_reduced,\n urn_comunica_default_query_operation_actors_service,\n urn_comunica_default_query_operation_actors_slice,\n urn_comunica_default_query_operation_actors_source,\n urn_comunica_default_query_operation_actors_union,\n urn_comunica_default_query_operation_actors_values,\n urn_comunica_default_query_operation_actors_path_alt,\n urn_comunica_default_query_operation_actors_path_inv,\n urn_comunica_default_query_operation_actors_path_link,\n urn_comunica_default_query_operation_actors_path_nps,\n urn_comunica_default_query_operation_actors_path_one_or_more,\n urn_comunica_default_query_operation_actors_path_seq,\n urn_comunica_default_query_operation_actors_path_zero_or_more,\n urn_comunica_default_query_operation_actors_path_zero_or_one,\n urn_comunica_default_query_operation_actors_update_clear,\n urn_comunica_default_query_operation_actors_update_composite,\n urn_comunica_default_query_operation_actors_update_create,\n urn_comunica_default_query_operation_actors_update_delete_insert,\n urn_comunica_default_query_operation_actors_update_load,\n urn_comunica_default_query_operation_actors_update_drop,\n urn_comunica_default_query_process_actors_sequential,\n urn_comunica_default_query_process_actors_explain_parsed,\n urn_comunica_default_query_process_actors_explain_physical,\n urn_comunica_default_query_process_actors_explain_logical,\n urn_comunica_default_query_source_identify_actors_hypermedia,\n urn_comunica_default_query_source_identify_actors_rdfjs,\n urn_comunica_default_query_source_identify_actors_serialized,\n urn_comunica_default_rdf_join_actors_inner_none,\n urn_comunica_default_rdf_join_actors_inner_single,\n urn_comunica_default_rdf_join_actors_inner_multi_empty,\n urn_comunica_default_rdf_join_actors_inner_multi_bind_source,\n urn_comunica_default_rdf_join_actors_inner_multi_bind,\n urn_comunica_default_rdf_join_actors_inner_hash,\n urn_comunica_default_rdf_join_actors_inner_symmetric_hash,\n urn_comunica_default_rdf_join_actors_inner_nested_loop,\n urn_comunica_default_rdf_join_actors_inner_multi_smallest,\n urn_comunica_default_rdf_join_actors_inner_multi_smallest_filter_bindings,\n urn_comunica_default_rdf_join_actors_minus_hash,\n urn_comunica_default_rdf_join_actors_minus_hash_undef,\n urn_comunica_default_rdf_join_actors_optional_bind,\n urn_comunica_default_rdf_join_actors_optional_hash_def_nonblocking,\n urn_comunica_default_rdf_join_actors_optional_hash_def_blocking,\n urn_comunica_default_rdf_join_actors_optional_hash_undef_nonblocking,\n urn_comunica_default_rdf_join_actors_optional_hash_undef_blocking,\n urn_comunica_default_rdf_join_actors_optional_nested_loop\n]);\nreturn urn_comunica_default_init_actors_query;\n}\n\n","import { QueryEngineBase } from '@comunica/actor-init-query';\nimport type { ActorInitQueryBase } from '@comunica/actor-init-query';\nimport type { IQueryContextCommon } from '@comunica/types';\n\n// eslint-disable-next-line ts/no-require-imports,ts/no-var-requires,import/extensions\nconst engineDefault = require('../engine-default.js');\n\n/**\n * A Comunica SPARQL query engine.\n */\nexport class QueryEngine\n extends QueryEngineBase {\n public constructor(engine: ActorInitQueryBase = engineDefault()) {\n super(engine);\n }\n}\n","/* eslint-disable unicorn/filename-case */\n/* eslint-enable unicorn/filename-case */\nexport * from './QueryEngine';\n","import type { IAction, IActorArgs, IActorOutput, IActorTest, Mediate } from '@comunica/core';\nimport { Actor } from '@comunica/core';\nimport type { IActionContext } from '@comunica/types';\n\n/**\n * An abstract actor that handles media-typed actions.\n *\n * It splits up a action between a 'handle' and a 'mediaTypes' action.\n * A 'mediaTypes' action is used to retrieve the available media types from this actor.\n * A 'handle' action is abstract, and can be implemented to do anything,\n * such as parsing, serializing, etc.\n * @see IActionAbstractMediaTyped\n *\n * @see ActorAbstractMediaTypedFixed\n */\nexport abstract class ActorAbstractMediaTyped\n extends Actor, IActorTestAbstractMediaTyped, IActorOutputAbstractMediaTyped> {\n public constructor(args: IActorArgsMediaTyped) {\n super(args);\n }\n\n public async run(action: IActionAbstractMediaTyped): Promise> {\n if ('handle' in action) {\n const typedAction: IActionAbstractMediaTypedHandle = action;\n return { handle: await this.runHandle(typedAction.handle, typedAction.handleMediaType, action.context) };\n }\n if ('mediaTypes' in action) {\n return { mediaTypes: await this.getMediaTypes(action.context) };\n }\n if ('mediaTypeFormats' in action) {\n return { mediaTypeFormats: await this.getMediaTypeFormats(action.context) };\n }\n throw new Error('Either a handle, mediaTypes or mediaTypeFormats action needs to be provided');\n }\n\n public async test(action: IActionAbstractMediaTyped): Promise> {\n if ('handle' in action) {\n const typedAction: IActionAbstractMediaTypedHandle = action;\n return { handle: await this.testHandle(typedAction.handle, typedAction.handleMediaType, action.context) };\n }\n if ('mediaTypes' in action) {\n return { mediaTypes: await this.testMediaType(action.context) };\n }\n if ('mediaTypeFormats' in action) {\n return { mediaTypeFormats: await this.testMediaTypeFormats(action.context) };\n }\n throw new Error('Either a handle, mediaTypes or mediaTypeFormats action needs to be provided');\n }\n\n /**\n * Check if this actor can run the given handle action,\n * without actually running it.\n *\n * @param {HI} action The handle action to test.\n * @param {string} mediaType The media type to test.\n * @param {ActionContext} context An optional context.\n * @return {Promise} A promise that resolves to the handle test result.\n */\n public abstract testHandle(action: HI, mediaType: string | undefined, context: IActionContext): Promise;\n\n /**\n * Run the given handle action on this actor.\n *\n * @param {HI} action The handle action to run.\n * @param {string} mediaType The media type to run with.\n * @param {ActionContext} context An optional context.\n * @return {Promise} A promise that resolves to the handle run result.\n */\n public abstract runHandle(action: HI, mediaType: string | undefined, context: IActionContext): Promise;\n\n /**\n * Check if this actor can emit its media types.\n *\n * @param {ActionContext} context An optional context.\n * @return {Promise} A promise that resolves to the media type run result.\n */\n public abstract testMediaType(context: IActionContext): Promise;\n\n /**\n * Get the media type of this given actor.\n *\n * @param {ActionContext} context An optional context.\n * @return {Promise<{[id: string]: number}>} A promise that resolves to the media types.\n */\n public abstract getMediaTypes(context: IActionContext): Promise>;\n\n /**\n * Check if this actor can emit its media type formats.\n *\n * @param {ActionContext} context An optional context.\n * @return {Promise} A promise that resolves to the media type run result.\n */\n public abstract testMediaTypeFormats(context: IActionContext): Promise;\n\n /**\n * Get the media type formats of this given actor.\n *\n * @param {ActionContext} context An optional context.\n * @return {Promise<{[id: string]: string}>} A promise that resolves to the media types.\n */\n public abstract getMediaTypeFormats(context: IActionContext): Promise>;\n}\n\nexport interface IActorArgsMediaTyped extends IActorArgs<\n IActionAbstractMediaTyped,\nIActorTestAbstractMediaTyped,\nIActorOutputAbstractMediaTyped\n> {}\n\nexport type IActionAbstractMediaTyped = IActionAbstractMediaTypedHandle | IActionAbstractMediaTypedMediaTypes\n| IActionAbstractMediaTypedMediaTypeFormats;\nexport interface IActionAbstractMediaTypedHandle extends IAction {\n /**\n * The handle action input.\n */\n handle: HI;\n /**\n * The handle media type that should be used when 'handle' is truthy.\n */\n handleMediaType?: string;\n}\n\nexport interface IActionAbstractMediaTypedMediaTypes extends IAction {\n /**\n * True if media types should be retrieved.\n */\n mediaTypes: boolean;\n}\n\nexport interface IActionAbstractMediaTypedMediaTypeFormats extends IAction {\n /**\n * True if media type formats should be retrieved.\n */\n mediaTypeFormats: boolean;\n}\n\n/**\n * Either 'handle', or 'mediaTypes' or 'mediaTypeFormats' must be truthy.\n * Groups may not be truthy at the same time.\n */\nexport type IActorTestAbstractMediaTyped = IActorTestAbstractMediaTypedHandle\n| IActorTestAbstractMediaTypedMediaTypes | IActorTestAbstractMediaTypedMediaTypeFormats;\nexport interface IActorTestAbstractMediaTypedHandle extends IActorTest {\n /**\n * The handle test output.\n */\n handle: HT;\n}\nexport interface IActorTestAbstractMediaTypedMediaTypes extends IActorTest {\n /**\n * True if media types can be retrieved.\n */\n mediaTypes: boolean;\n}\nexport interface IActorTestAbstractMediaTypedMediaTypeFormats extends IActorTest {\n /**\n * True if media type formats can be retrieved.\n */\n mediaTypeFormats?: boolean;\n}\n\n/**\n * Either 'handle', or 'mediaTypes' or 'mediaTypeFormats' must be truthy.\n * Groups may not be truthy at the same time.\n */\nexport type IActorOutputAbstractMediaTyped = IActorOutputAbstractMediaTypedHandle\n| IActorOutputAbstractMediaTypedMediaTypes | IActorOutputAbstractMediaTypedMediaTypeFormats;\nexport interface IActorOutputAbstractMediaTypedHandle extends IActorOutput {\n /**\n * The handle action output.\n */\n handle: HO;\n}\nexport interface IActorOutputAbstractMediaTypedMediaTypes extends IActorOutput {\n /**\n * An object containing media types as keys,\n * and preferences as values, with values ranging from 0 to 1.\n */\n mediaTypes: Record;\n}\nexport interface IActorOutputAbstractMediaTypedMediaTypeFormats extends IActorOutput {\n /**\n * An object containing media types as keys,\n * and format IRIs as values.\n */\n mediaTypeFormats: Record;\n}\n\nexport type MediateMediaTypes = Mediate<\nIActionAbstractMediaTypedMediaTypes,\nIActorOutputAbstractMediaTypedMediaTypes,\nIActorTestAbstractMediaTypedMediaTypes\n>;\n\nexport type MediateMediaTyped = Mediate<\nIActionAbstractMediaTypedHandle,\nIActorOutputAbstractMediaTypedHandle,\nIActorTestAbstractMediaTypedHandle\n>;\n","import type { IActionContext } from '@comunica/types';\nimport type { IActorArgsMediaTyped } from './ActorAbstractMediaTyped';\nimport { ActorAbstractMediaTyped } from './ActorAbstractMediaTyped';\n\nexport abstract class ActorAbstractMediaTypedFixed extends ActorAbstractMediaTyped {\n public readonly mediaTypePriorities: Record;\n public readonly mediaTypeFormats: Record;\n public readonly priorityScale: number;\n\n public constructor(args: IActorArgsMediaTypedFixed) {\n super(args);\n const scale: number = this.priorityScale || this.priorityScale === 0 ? this.priorityScale : 1;\n if (this.mediaTypePriorities) {\n for (const [ _index, [ key, value ]] of Object.entries(this.mediaTypePriorities).entries()) {\n this.mediaTypePriorities[key] = scale * value;\n }\n }\n this.mediaTypePriorities = Object.freeze(this.mediaTypePriorities);\n this.mediaTypeFormats = Object.freeze(this.mediaTypeFormats);\n }\n\n public async testHandle(action: HI, mediaType: string | undefined, context: IActionContext): Promise {\n if (!mediaType || !(mediaType in this.mediaTypePriorities)) {\n throw new Error(`Unrecognized media type: ${mediaType}`);\n }\n return await this.testHandleChecked(action, context);\n }\n\n /**\n * Check to see if this actor can handle the given action.\n * The media type has already been checked before this is called.\n *\n * @param {ActionContext} context An optional context.\n * @param {HI} action The action to test.\n */\n public abstract testHandleChecked(action: HI, context: IActionContext): Promise;\n\n public async testMediaType(_context: IActionContext): Promise {\n return true;\n }\n\n public async getMediaTypes(_context: IActionContext): Promise> {\n return this.mediaTypePriorities;\n }\n\n public async testMediaTypeFormats(_context: IActionContext): Promise {\n return true;\n }\n\n public async getMediaTypeFormats(_context: IActionContext): Promise> {\n return this.mediaTypeFormats;\n }\n}\n\nexport interface IActorArgsMediaTypedFixed extends IActorArgsMediaTyped {\n /**\n * A record of media types, with media type name as key, and its priority as value.\n * Priorities are numbers between [0, 1].\n * @range {json}\n */\n mediaTypePriorities: Record;\n /**\n * A record of media types, with media type name as key, and its format IRI as value.\n * @range {json}\n */\n mediaTypeFormats: Record;\n /**\n * A multiplier for media type priorities.\n * This can be used for keeping the original media types in place,\n * but scaling all of their scores with a certain value.\n * @range {double}\n */\n priorityScale?: number;\n}\n","export * from './ActorAbstractMediaTyped';\nexport * from './ActorAbstractMediaTypedFixed';\n","import type { BindingsFactory } from '@comunica/bindings-factory';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport { KeysQueryOperation } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport type {\n IQueryOperationResultBindings,\n Bindings,\n IActionContext,\n MetadataBindings,\n IQuerySourceWrapper,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport {\n BufferedIterator,\n MultiTransformIterator,\n TransformIterator,\n EmptyIterator,\n} from 'asynciterator';\nimport { DataFactory } from 'rdf-data-factory';\nimport { termToString } from 'rdf-string';\nimport { Algebra, Factory } from 'sparqlalgebrajs';\nimport { PathVariableObjectIterator } from './PathVariableObjectIterator';\n\nconst DF = new DataFactory();\n\n/**\n * An abstract actor that handles Path operations.\n *\n * Provides multiple helper functions used by the Path operation actors.\n */\nexport abstract class ActorAbstractPath extends ActorQueryOperationTypedMediated {\n protected static readonly FACTORY: Factory = new Factory();\n\n protected readonly predicateType: string;\n\n protected constructor(args: IActorQueryOperationTypedMediatedArgs, predicateType: string) {\n super(args, 'path');\n this.predicateType = predicateType;\n }\n\n public async testOperation(operation: Algebra.Path, _context: IActionContext): Promise {\n if (operation.predicate.type !== this.predicateType) {\n throw new Error(`This Actor only supports ${this.predicateType} Path operations.`);\n }\n\n return true;\n }\n\n // Generates a variable that does not yet occur in the path\n public generateVariable(path?: Algebra.Path, name?: string): RDF.Variable {\n if (!name) {\n return this.generateVariable(path, 'b');\n }\n\n // Path predicates can't contain variables\n if (path && (path.subject.value === name || path.object.value === name)) {\n return this.generateVariable(path, `${name}b`);\n }\n\n return DF.variable(name);\n }\n\n // Such connectivity matching does not introduce duplicates (it does not incorporate any count of the number\n // of ways the connection can be made) even if the repeated path itself would otherwise result in duplicates.\n // https://www.w3.org/TR/sparql11-query/#propertypaths\n public async isPathArbitraryLengthDistinct(context: IActionContext, path: Algebra.Path):\n Promise<{ context: IActionContext; operation: IQueryOperationResultBindings | undefined }> {\n if (!context.get(KeysQueryOperation.isPathArbitraryLengthDistinctKey)) {\n context = context.set(KeysQueryOperation.isPathArbitraryLengthDistinctKey, true);\n return { context, operation: ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({\n operation: ActorAbstractPath.FACTORY.createDistinct(path),\n context,\n })) };\n }\n\n context = context.set(KeysQueryOperation.isPathArbitraryLengthDistinctKey, false);\n return { context, operation: undefined };\n }\n\n private async predicateStarGraphVariable(\n subject: RDF.Term,\n object: RDF.Variable,\n predicate: Algebra.PropertyPathSymbol,\n graph: RDF.Variable,\n context: IActionContext,\n bindingsFactory: BindingsFactory,\n ): Promise {\n const sources = this.getPathSources(predicate);\n // TODO: refactor this with an iterator just like PathVariableObjectIterator so we handle backpressure correctly\n // Construct path to obtain all graphs where subject exists\n const predVar = this.generateVariable(ActorAbstractPath.FACTORY\n .createPath(subject, predicate, object, graph));\n const findGraphs = ActorAbstractPath.FACTORY.createUnion([\n this.assignPatternSources(ActorAbstractPath.FACTORY.createPattern(subject, predVar, object, graph), sources),\n this.assignPatternSources(ActorAbstractPath.FACTORY.createPattern(object, predVar, subject, graph), sources),\n ]);\n const results = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ context, operation: findGraphs }),\n );\n\n const passedGraphs: Set = new Set();\n\n const bindingsStream = new MultiTransformIterator(\n results.bindingsStream,\n {\n multiTransform: (bindings: Bindings) => {\n // Extract the graph and start a predicate* search starting from subject in each graph\n const graphValue: RDF.Term = bindings.get(graph)!;\n if (passedGraphs.has(graphValue.value)) {\n return new EmptyIterator();\n }\n passedGraphs.add(graphValue.value);\n return new TransformIterator(\n async() => {\n const it = new BufferedIterator();\n await this.getObjectsPredicateStar(subject, predicate, graphValue, context, {}, it, { count: 0 });\n return it.transform({\n transform(item, next, push) {\n push(bindingsFactory.bindings([\n [ object, item ],\n [ graph, graphValue ],\n ]));\n next();\n },\n });\n },\n { maxBufferSize: 128 },\n );\n },\n autoStart: false,\n },\n );\n\n return {\n bindingsStream,\n metadata: results.metadata,\n };\n }\n\n /**\n * Returns an iterator with Bindings of the query subject predicate* ?o or subject predicate+ ?o\n * If graph is a variable, it will also be in those bindings\n * @param {Term} subject Term of where we start the predicate* search.\n * @param {Algebra.PropertyPathSymbol} predicate Predicate of the *-path.\n * @param {Variable} object Variable of the zeroOrMore-query.\n * @param {Term} graph The graph in which we search for the pattern. (Possibly a variable)\n * @param {ActionContext} context The context to pass to sub-opertations\n * @param emitFirstSubject If the path operation is predicate*, otherwise it is predicate+.\n * @return {Promise} Iterator to where all bindings of query should have been pushed.\n */\n public async getObjectsPredicateStarEval(\n subject: RDF.Term,\n predicate: Algebra.PropertyPathSymbol,\n object: RDF.Variable,\n graph: RDF.Term,\n context: IActionContext,\n emitFirstSubject: boolean,\n bindingsFactory: BindingsFactory,\n ): Promise {\n if (graph.termType === 'Variable') {\n return this.predicateStarGraphVariable(subject, object, predicate, graph, context, bindingsFactory);\n }\n\n const it = new PathVariableObjectIterator(\n subject,\n predicate,\n graph,\n context,\n this.mediatorQueryOperation,\n emitFirstSubject,\n );\n\n const bindingsStream = it.transform({\n autoStart: false,\n transform(item, next, push) {\n push(bindingsFactory.bindings([[ object, item ]]));\n next();\n },\n });\n\n return {\n bindingsStream,\n async metadata() {\n const metadata: MetadataBindings = await new Promise((resolve) => {\n it.getProperty('metadata', (metadataInner: any) => resolve(metadataInner()));\n });\n // Increment cardinality by one, because we always have at least one result once we reach this stage.\n // See the transformation above where we push a single binding.\n metadata.cardinality.value++;\n return metadata;\n },\n };\n }\n\n /**\n * Pushes all terms to iterator `it` that are a solution of object predicate* ?o.\n * @param {Term} object Term of where we start the predicate* search.\n * @param {Algebra.PropertyPathSymbol} predicate Predicate of the *-path.\n * @param {Term} graph The graph in which we search for the pattern.\n * @param {ActionContext} context\n * @param {Record} termHashes Remembers the objects we've already searched for.\n * @param {BufferedIterator} it Iterator to push terms to.\n * @param {any} counter Counts how many searches are in progress to close it when needed (when counter == 0).\n * @return {Promise} The results metadata.\n */\n public async getObjectsPredicateStar(\n object: RDF.Term,\n predicate: Algebra.PropertyPathSymbol,\n graph: RDF.Term,\n context: IActionContext,\n termHashes: Record,\n it: BufferedIterator,\n counter: any,\n ): Promise {\n const termString = termToString(object);\n if (termHashes[termString]) {\n return;\n }\n\n ( it)._push(object);\n termHashes[termString] = object;\n counter.count++;\n\n const thisVariable = this.generateVariable();\n const path = ActorAbstractPath.FACTORY.createPath(object, predicate, thisVariable, graph);\n const results = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ operation: path, context }),\n );\n // TODO: fixme\n // eslint-disable-next-line ts/no-misused-promises\n results.bindingsStream.on('data', async(bindings: Bindings) => {\n const result = bindings.get(thisVariable);\n await this.getObjectsPredicateStar(result!, predicate, graph, context, termHashes, it, counter);\n });\n results.bindingsStream.on('end', () => {\n if (--counter.count === 0) {\n it.close();\n }\n });\n\n return results.metadata;\n }\n\n /**\n * Pushes all terms to iterator `it` that are a solution of ?s predicate* ?o.\n * @param {string} subjectVar String representation of subjectVariable\n * @param {string} objectVar String representation of objectVariable\n * @param {Term} subjectVal Term of where we start the predicate* search.\n * @param {Term} objectVal Found solution for an object, start for the new step.\n * @param {Algebra.PropertyPathSymbol} predicate Predicate of the *-path.\n * @param {Term} graph The graph in which we search for the pattern.\n * @param {ActionContext} context\n * @param {{[id: string]: Promise}} termHashesGlobal\n * Remembers solutions for when objectVal is already been calculated, can be reused when same objectVal occurs\n * @param {{[id: string]: Term}} termHashesCurrentSubject\n * Remembers the pairs we've already searched for, can stop searching if so.\n * @param {BufferedIterator} it Iterator to push terms to.\n * @param {any} counter Counts how many searches are in progress to close it when needed (when counter == 0).\n * @return {Promise} All solutions of query should have been pushed to it by then.\n */\n // Let the iterator `it` emit all bindings of size 2, with subjectStringVariable as value subjectVal\n // and objectStringVariable as value all nodes reachable through predicate* beginning at objectVal\n public async getSubjectAndObjectBindingsPredicateStar(\n subjectVar: RDF.Variable,\n objectVar: RDF.Variable,\n subjectVal: RDF.Term,\n objectVal: RDF.Term,\n predicate: Algebra.PropertyPathSymbol,\n graph: RDF.Term,\n context: IActionContext,\n termHashesGlobal: Record>,\n termHashesCurrentSubject: Record,\n it: BufferedIterator,\n counter: any,\n bindingsFactory: BindingsFactory,\n ): Promise {\n const termString = termToString(objectVal) + termToString(graph);\n\n // If this combination of subject and object already done, return nothing\n if (termHashesCurrentSubject[termString]) {\n return;\n }\n\n counter.count++;\n termHashesCurrentSubject[termString] = true;\n ( it)._push(bindingsFactory.bindings([\n [ subjectVar, subjectVal ],\n [ objectVar, objectVal ],\n ]));\n\n // If every reachable node from object has already been calculated, use these for current subject too\n if (termString in termHashesGlobal) {\n const objects = await termHashesGlobal[termString];\n for (const object of objects) {\n await this.getSubjectAndObjectBindingsPredicateStar(\n subjectVar,\n objectVar,\n subjectVal,\n object,\n predicate,\n graph,\n context,\n termHashesGlobal,\n termHashesCurrentSubject,\n it,\n counter,\n bindingsFactory,\n );\n }\n if (--counter.count === 0) {\n it.close();\n }\n\n return;\n }\n\n // Construct promise to calculate all reachable nodes from this object\n // TODO: fixme\n // eslint-disable-next-line no-async-promise-executor,ts/no-misused-promises\n const promise = new Promise(async(resolve, reject) => {\n const objectsArray: RDF.Term[] = [];\n\n // Construct path that leads us one step through predicate\n const thisVariable = this.generateVariable();\n const path = ActorAbstractPath.FACTORY.createPath(objectVal, predicate, thisVariable, graph);\n const results = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ operation: path, context }),\n );\n\n // Recursive call on all neighbours\n // TODO: fixme\n // eslint-disable-next-line ts/no-misused-promises\n results.bindingsStream.on('data', async(bindings: RDF.Bindings) => {\n const result: RDF.Term = bindings.get(thisVariable)!;\n objectsArray.push(result);\n await this.getSubjectAndObjectBindingsPredicateStar(\n subjectVar,\n objectVar,\n subjectVal,\n result,\n predicate,\n graph,\n context,\n termHashesGlobal,\n termHashesCurrentSubject,\n it,\n counter,\n bindingsFactory,\n );\n });\n results.bindingsStream.on('error', reject);\n results.bindingsStream.on('end', () => {\n if (--counter.count === 0) {\n it.close();\n }\n resolve(objectsArray);\n });\n });\n\n // Set it in the termHashesGlobal when this object occurs again they can wait for this promise\n termHashesGlobal[termString] = promise;\n }\n\n /**\n * Find all sources recursively contained in the given path operation.\n * @param operation\n */\n public getPathSources(operation: Algebra.PropertyPathSymbol): IQuerySourceWrapper[] {\n switch (operation.type) {\n case Algebra.types.ALT:\n case Algebra.types.SEQ:\n return operation.input\n .flatMap((subOp: Algebra.PropertyPathSymbol) => this.getPathSources(subOp));\n case Algebra.types.INV:\n case Algebra.types.ONE_OR_MORE_PATH:\n case Algebra.types.ZERO_OR_MORE_PATH:\n case Algebra.types.ZERO_OR_ONE_PATH:\n return this.getPathSources(operation.path);\n case Algebra.types.LINK:\n case Algebra.types.NPS: {\n const source = ActorQueryOperation.getOperationSource(operation);\n if (!source) {\n throw new Error(`Could not find a required source on a link path operation`);\n }\n return [ source ];\n }\n }\n }\n\n public assignPatternSources(pattern: Algebra.Pattern, sources: IQuerySourceWrapper[]): Algebra.Operation {\n if (sources.length === 0) {\n throw new Error(`Attempted to assign zero sources to a pattern during property path handling`);\n }\n if (sources.length === 1) {\n return ActorQueryOperation.assignOperationSource(pattern, sources[0]);\n }\n return ActorAbstractPath.FACTORY.createUnion(sources\n .map(source => ActorQueryOperation.assignOperationSource(pattern, source)), true);\n }\n}\n\nexport interface IPathResultStream {\n bindingsStream: AsyncIterator;\n metadata: () => Promise;\n}\n","import type { MediatorQueryOperation } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type { IActionContext } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { BufferedIterator } from 'asynciterator';\nimport { DataFactory } from 'rdf-data-factory';\nimport { termToString } from 'rdf-string';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { Factory } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\nconst FACTORY = new Factory();\n\n/**\n * An iterator that implements the multi-length property path operation (* and +)\n * for a fixed subject and predicate, and a variable object.\n */\nexport class PathVariableObjectIterator extends BufferedIterator {\n private readonly termHashes: Map = new Map();\n private readonly runningOperations: AsyncIterator[] = [];\n private readonly pendingOperations: { variable: RDF.Variable; operation: Algebra.Path }[] = [];\n\n public constructor(\n private readonly subject: RDF.Term,\n private readonly predicate: Algebra.PropertyPathSymbol,\n private readonly graph: RDF.Term,\n private readonly context: IActionContext,\n private readonly mediatorQueryOperation: MediatorQueryOperation,\n emitFirstSubject: boolean,\n private readonly maxRunningOperations = 16,\n ) {\n // The autoStart flag must be true to kickstart metadata collection\n super({ autoStart: true });\n\n // Push the subject as starting point\n this._push(this.subject, emitFirstSubject);\n }\n\n protected override _end(destroy?: boolean): void {\n // Close all running iterators\n for (const it of this.runningOperations) {\n it.destroy();\n }\n\n super._end(destroy);\n }\n\n protected override _push(item: RDF.Term, pushAsResult = true): void {\n let termString;\n if (pushAsResult) {\n // Don't push if this subject was already found\n termString = termToString(item);\n if (this.termHashes.has(termString)) {\n return;\n }\n }\n\n // Add a pending path operation for this item\n const variable = DF.variable('b');\n this.pendingOperations.push({\n variable,\n operation: FACTORY.createPath(item, this.predicate, variable, this.graph),\n });\n\n // Otherwise, push the subject\n if (termString) {\n this.termHashes.set(termString, item);\n super._push(item);\n }\n }\n\n protected override _read(count: number, done: () => void): void {\n // eslint-disable-next-line ts/no-this-alias\n const self = this;\n (async function() {\n // Open as many operations as possible\n while (self.runningOperations.length < self.maxRunningOperations) {\n if (self.pendingOperations.length === 0) {\n break;\n }\n\n const pendingOperation = self.pendingOperations.pop()!;\n const results = ActorQueryOperation.getSafeBindings(\n await self.mediatorQueryOperation.mediate({ operation: pendingOperation.operation, context: self.context }),\n );\n const runningOperation = results.bindingsStream.transform({\n autoStart: false,\n transform(bindings, next, push) {\n const newTerm: RDF.Term = bindings.get(pendingOperation.variable)!;\n push(newTerm);\n next();\n },\n });\n if (!runningOperation.done) {\n self.runningOperations.push(runningOperation);\n runningOperation.on('error', error => self.destroy(error));\n runningOperation.on('readable', () => {\n self.readable = true;\n self._fillBufferAsync();\n });\n runningOperation.on('end', () => {\n self.runningOperations.splice(self.runningOperations.indexOf(runningOperation), 1);\n self.readable = true;\n self._fillBufferAsync();\n });\n }\n\n self.setProperty('metadata', results.metadata);\n }\n\n // Try to read `count` items (based on UnionIterator)\n let lastCount = 0;\n let item: RDF.Term | null;\n // eslint-disable-next-line no-cond-assign\n while (lastCount !== (lastCount = count)) {\n // Prioritize the operations that have been added first\n for (let i = 0; i < self.runningOperations.length && count > 0; i++) {\n // eslint-disable-next-line no-cond-assign\n if ((item = self.runningOperations[i].read()) !== null) {\n count--;\n self._push(item);\n }\n }\n }\n\n // Close if everything has been read\n if (self.runningOperations.length === 0 && self.pendingOperations.length === 0) {\n self.close();\n }\n })().then(() => {\n done();\n }, error => this.destroy(error));\n }\n}\n","import type { IActorContextPreprocessOutput, IActorContextPreprocessArgs } from '@comunica/bus-context-preprocess';\nimport { ActorContextPreprocess } from '@comunica/bus-context-preprocess';\nimport type { IAction, IActorTest } from '@comunica/core';\nimport { ActionContextKey } from '@comunica/core';\nimport type { IActionContext } from '@comunica/types';\n\n/**\n * A comunica Convert Shortcuts Context Preprocess Actor.\n */\nexport class ActorContextPreprocessConvertShortcuts extends ActorContextPreprocess {\n public readonly contextKeyShortcuts: Record;\n\n public constructor(args: IActorContextPreprocessConvertShortcutsArgs) {\n super(args);\n }\n\n public async test(_action: IAction): Promise {\n return true;\n }\n\n public async run(action: IAction): Promise {\n return {\n context: ActorContextPreprocessConvertShortcuts.expandShortcuts(action.context, this.contextKeyShortcuts),\n };\n }\n\n public static expandShortcuts(context: IActionContext, contextKeyShortcuts: Record): IActionContext {\n for (const key of context.keys()) {\n if (contextKeyShortcuts[key.name]) {\n context = context\n .set(new ActionContextKey(contextKeyShortcuts[key.name]), context.get(key))\n .delete(key);\n }\n }\n return context;\n }\n}\n\nexport interface IActorContextPreprocessConvertShortcutsArgs extends IActorContextPreprocessArgs {\n /**\n * A record of context shortcuts to full context keys (as defined in @comunica/context-entries).\n * @range {json}\n * @default {{\n * \"sources\": \"@comunica/actor-init-query:querySourcesUnidentified\",\n * \"destination\": \"@comunica/bus-rdf-update-quads:destination\",\n * \"initialBindings\": \"@comunica/actor-init-query:initialBindings\",\n * \"queryFormat\": \"@comunica/actor-init-query:queryFormat\",\n * \"baseIRI\": \"@comunica/actor-init-query:baseIRI\",\n * \"log\": \"@comunica/core:log\",\n * \"datetime\": \"@comunica/actor-http-memento:datetime\",\n * \"queryTimestamp\": \"@comunica/actor-init-query:queryTimestamp\",\n * \"httpProxyHandler\": \"@comunica/actor-http-proxy:httpProxyHandler\",\n * \"lenient\": \"@comunica/actor-init-query:lenient\",\n * \"httpIncludeCredentials\": \"@comunica/bus-http:include-credentials\",\n * \"httpAuth\": \"@comunica/bus-http:auth\",\n * \"httpTimeout\": \"@comunica/bus-http:http-timeout\",\n * \"httpBodyTimeout\": \"@comunica/bus-http:http-body-timeout\",\n * \"httpRetryCount\": \"@comunica/bus-http:http-retry-count\",\n * \"httpRetryDelay\": \"@comunica/bus-http:http-retry-delay\",\n * \"httpRetryOnServerError\": \"@comunica/bus-http:http-retry-on-server-error\",\n * \"fetch\": \"@comunica/bus-http:fetch\",\n * \"recoverBrokenLinks\": \"@comunica/bus-http-wayback:recover-broken-links\",\n * \"readOnly\": \"@comunica/bus-query-operation:readOnly\",\n * \"extensionFunctions\": \"@comunica/actor-init-query:extensionFunctions\",\n * \"extensionFunctionCreator\": \"@comunica/actor-init-query:extensionFunctionCreator\",\n * \"functionArgumentsCache\": \"@comunica/actor-init-query:functionArgumentsCache\",\n * \"explain\": \"@comunica/actor-init-query:explain\",\n * \"unionDefaultGraph\": \"@comunica/bus-query-operation:unionDefaultGraph\",\n * \"traverse\": \"@comunica/bus-query-source-identify:traverse\",\n * \"noCache\": \"@comunica/actor-init-query:noCache\"\n * }}\n */\n contextKeyShortcuts: Record;\n}\n","import type {\n IActorContextPreprocessOutput,\n IActorContextPreprocessArgs,\n MediatorContextPreprocess,\n} from '@comunica/bus-context-preprocess';\nimport { ActorContextPreprocess } from '@comunica/bus-context-preprocess';\nimport type { ActorHttpInvalidateListenable, IActionHttpInvalidate } from '@comunica/bus-http-invalidate';\nimport type { MediatorQuerySourceIdentify } from '@comunica/bus-query-source-identify';\nimport { KeysInitQuery, KeysQueryOperation } from '@comunica/context-entries';\nimport type { IAction, IActorTest } from '@comunica/core';\nimport { ActionContext } from '@comunica/core';\nimport type {\n IQuerySourceWrapper,\n QuerySourceUnidentified,\n QuerySourceUnidentifiedExpanded,\n IActionContext,\n IQuerySourceUnidentifiedExpanded,\n} from '@comunica/types';\nimport { LRUCache } from 'lru-cache';\n\n/**\n * A comunica Query Source Identify Context Preprocess Actor.\n */\nexport class ActorContextPreprocessQuerySourceIdentify extends ActorContextPreprocess {\n public readonly cacheSize: number;\n public readonly httpInvalidator: ActorHttpInvalidateListenable;\n public readonly mediatorQuerySourceIdentify: MediatorQuerySourceIdentify;\n public readonly mediatorContextPreprocess: MediatorContextPreprocess;\n public readonly cache?: LRUCache>;\n\n public constructor(args: IActorContextPreprocessQuerySourceIdentifyArgs) {\n super(args);\n this.cache = this.cacheSize ? new LRUCache({ max: this.cacheSize }) : undefined;\n const cache = this.cache;\n if (cache) {\n this.httpInvalidator.addInvalidateListener(\n ({ url }: IActionHttpInvalidate) => url ? cache.delete(url) : cache.clear(),\n );\n }\n }\n\n public async test(_action: IAction): Promise {\n return true;\n }\n\n public async run(action: IAction): Promise {\n let context = action.context;\n\n // Rewrite sources\n if (context.has(KeysInitQuery.querySourcesUnidentified)) {\n const querySourcesUnidentified: QuerySourceUnidentified[] = action.context\n .get(KeysInitQuery.querySourcesUnidentified)!;\n const querySourcesUnidentifiedExpanded = await Promise.all(querySourcesUnidentified\n .map(querySource => this.expandSource(querySource)));\n const querySources: IQuerySourceWrapper[] = await Promise.all(querySourcesUnidentifiedExpanded\n .map(async querySourceUnidentified => this.identifySource(querySourceUnidentified, action.context)));\n context = action.context\n .delete(KeysInitQuery.querySourcesUnidentified)\n .set(KeysQueryOperation.querySources, querySources);\n }\n\n return { context };\n }\n\n public async expandSource(querySource: QuerySourceUnidentified): Promise {\n if (typeof querySource === 'string' || 'match' in querySource) {\n return { value: querySource };\n }\n return {\n ...>querySource,\n context: (await this.mediatorContextPreprocess.mediate({\n context: ActionContext.ensureActionContext(querySource.context ?? {}),\n })).context,\n };\n }\n\n public identifySource(\n querySourceUnidentified: QuerySourceUnidentifiedExpanded,\n context: IActionContext,\n ): Promise {\n let sourcePromise: Promise | undefined;\n\n // Try to read from cache\n // Only sources based on string values (e.g. URLs) are supported!\n if (typeof querySourceUnidentified.value === 'string' && this.cache) {\n sourcePromise = this.cache.get(querySourceUnidentified.value)!;\n }\n\n // If not in cache, identify the source\n if (!sourcePromise) {\n sourcePromise = this.mediatorQuerySourceIdentify.mediate({ querySourceUnidentified, context })\n .then(({ querySource }) => querySource);\n\n // Set in cache\n if (typeof querySourceUnidentified.value === 'string' && this.cache) {\n this.cache.set(querySourceUnidentified.value, sourcePromise);\n }\n }\n\n return sourcePromise;\n }\n}\n\nexport interface IActorContextPreprocessQuerySourceIdentifyArgs extends IActorContextPreprocessArgs {\n /**\n * The maximum number of entries in the LRU cache, set to 0 to disable.\n * @range {integer}\n * @default {100}\n */\n cacheSize: number;\n /* eslint-disable max-len */\n /**\n * An actor that listens to HTTP invalidation events\n * @default { a }\n */\n httpInvalidator: ActorHttpInvalidateListenable;\n /* eslint-enable max-len */\n /**\n * Mediator for identifying query sources.\n */\n mediatorQuerySourceIdentify: MediatorQuerySourceIdentify;\n /**\n * The context processing combinator\n */\n mediatorContextPreprocess: MediatorContextPreprocess;\n}\n","import type { IActorContextPreprocessOutput, IActorContextPreprocessArgs } from '@comunica/bus-context-preprocess';\nimport { ActorContextPreprocess } from '@comunica/bus-context-preprocess';\nimport { KeysQueryOperation, KeysQuerySourceIdentify } from '@comunica/context-entries';\nimport type { IActorTest, IAction } from '@comunica/core';\nimport type { IQuerySourceWrapper, QuerySourceReference } from '@comunica/types';\nimport { QuerySourceSkolemized } from './QuerySourceSkolemized';\nimport { getSourceId } from './utils';\n\n/**\n * A comunica Query Source Skolemize Context Preprocess Actor.\n */\nexport class ActorContextPreprocessQuerySourceSkolemize extends ActorContextPreprocess {\n public constructor(args: IActorContextPreprocessArgs) {\n super(args);\n }\n\n public async test(_action: IAction): Promise {\n return true;\n }\n\n public async run(action: IAction): Promise {\n let context = action.context;\n\n // Wrap sources in skolemized sources\n if (context.has(KeysQueryOperation.querySources)) {\n // Determine map of source id's\n if (!context.has(KeysQuerySourceIdentify.sourceIds)) {\n context = context.set(KeysQuerySourceIdentify.sourceIds, new Map());\n }\n const sourceIds: Map = context.getSafe(KeysQuerySourceIdentify.sourceIds);\n\n let sources: IQuerySourceWrapper[] = context.getSafe(KeysQueryOperation.querySources);\n sources = sources.map(sourceWrapper => ({\n source: new QuerySourceSkolemized(sourceWrapper.source, getSourceId(sourceIds, sourceWrapper.source)),\n context: sourceWrapper.context,\n }));\n context = context.set(KeysQueryOperation.querySources, sources);\n }\n\n return { context };\n }\n}\n","import { MetadataValidationState } from '@comunica/metadata';\nimport type {\n BindingsStream,\n FragmentSelectorShape,\n IActionContext,\n IQueryBindingsOptions,\n IQuerySource,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { ArrayIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { deskolemizeOperation, skolemizeBindingsStream, skolemizeQuadStream } from './utils';\n\n/**\n * A IQuerySource wrapper that skolemizes outgoing quads and bindings.\n */\nexport class QuerySourceSkolemized implements IQuerySource {\n /**\n * The query source to wrap over.\n */\n public readonly innerSource: IQuerySource;\n /**\n * ID of the inner source, see KeysRdfResolveQuadPattern.sourceIds.\n */\n public readonly sourceId: string;\n\n public constructor(innerSource: IQuerySource, sourceId: string) {\n this.innerSource = innerSource;\n this.sourceId = sourceId;\n }\n\n public async getSelectorShape(context: IActionContext): Promise {\n return this.innerSource.getSelectorShape(context);\n }\n\n public queryBindings(\n operation: Algebra.Operation,\n context: IActionContext,\n options: IQueryBindingsOptions | undefined,\n ): BindingsStream {\n const operationMapped = deskolemizeOperation(operation, this.sourceId);\n if (!operationMapped) {\n const it: BindingsStream = new ArrayIterator([], { autoStart: false });\n it.setProperty('metadata', {\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 0 },\n canContainUndefs: false,\n variables: [],\n });\n return it;\n }\n return skolemizeBindingsStream(this.innerSource.queryBindings(operationMapped, context, options), this.sourceId);\n }\n\n public queryBoolean(operation: Algebra.Ask, context: IActionContext): Promise {\n return this.innerSource.queryBoolean(operation, context);\n }\n\n public queryQuads(operation: Algebra.Operation, context: IActionContext): AsyncIterator {\n const operationMapped = deskolemizeOperation(operation, this.sourceId);\n if (!operationMapped) {\n const it: AsyncIterator = new ArrayIterator([], { autoStart: false });\n it.setProperty('metadata', {\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 0 },\n });\n return it;\n }\n return skolemizeQuadStream(this.innerSource.queryQuads(operationMapped, context), this.sourceId);\n }\n\n public queryVoid(operation: Algebra.Update, context: IActionContext): Promise {\n return this.innerSource.queryVoid(operation, context);\n }\n\n public get referenceValue(): string | RDF.Source {\n return this.innerSource.referenceValue;\n }\n\n public toString(): string {\n return `${this.innerSource.toString()}(SkolemID:${this.sourceId})`;\n }\n}\n","import { BlankNodeScoped } from '@comunica/data-factory';\nimport type {\n BindingsStream,\n IQuerySource,\n MetadataBindings,\n MetadataQuads,\n QuerySourceReference,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { DataFactory } from 'rdf-data-factory';\nimport { mapTermsNested } from 'rdf-terms';\nimport { Algebra, Util } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\n\nexport const SKOLEM_PREFIX = 'urn:comunica_skolem:source_';\n\n/**\n * Get the unique, deterministic id for the given source.\n * @param sourceIds ID's of datasources, see KeysRdfResolveQuadPattern.sourceIds.\n * @param source A data source.\n * @return The id of the given source.\n */\nexport function getSourceId(sourceIds: Map, source: IQuerySource): string {\n let sourceId = sourceIds.get(source.referenceValue);\n if (sourceId === undefined) {\n sourceId = `${sourceIds.size}`;\n sourceIds.set(source.referenceValue, sourceId);\n }\n return sourceId;\n}\n\n/**\n * If the given term is a blank node, return a deterministic named node for it\n * based on the source id and the blank node value.\n * @param term Any RDF term.\n * @param sourceId A source identifier.\n * @return If the given term was a blank node, this will return a skolemized named node, otherwise the original term.\n */\nexport function skolemizeTerm(term: RDF.Term, sourceId: string): RDF.Term | BlankNodeScoped {\n if (term.termType === 'BlankNode') {\n return new BlankNodeScoped(`bc_${sourceId}_${term.value}`, DF.namedNode(`${SKOLEM_PREFIX}${sourceId}:${term.value}`));\n }\n return term;\n}\n\n/**\n * Skolemize all terms in the given quad.\n * @param quad An RDF quad.\n * @param sourceId A source identifier.\n * @return The skolemized quad.\n */\nexport function skolemizeQuad(quad: Q, sourceId: string): Q {\n return mapTermsNested(quad, term => skolemizeTerm(term, sourceId));\n}\n\n/**\n * Skolemize all terms in the given bindings.\n * @param bindings An RDF bindings object.\n * @param sourceId A source identifier.\n * @return The skolemized bindings.\n */\nexport function skolemizeBindings(bindings: RDF.Bindings, sourceId: string): RDF.Bindings {\n return bindings.map((term) => {\n if (term.termType === 'Quad') {\n return skolemizeQuad(term, sourceId);\n }\n return skolemizeTerm(term, sourceId);\n });\n}\n\n/**\n * Skolemize all terms in the given quad stream.\n * @param iterator An RDF quad stream.\n * @param sourceId A source identifier.\n * @return The skolemized quad stream.\n */\nexport function skolemizeQuadStream(iterator: AsyncIterator, sourceId: string): AsyncIterator {\n const ret = iterator.map(quad => skolemizeQuad(quad, sourceId));\n function inheritMetadata(): void {\n iterator.getProperty('metadata', (metadata: MetadataQuads) => {\n ret.setProperty('metadata', metadata);\n metadata.state.addInvalidateListener(inheritMetadata);\n });\n }\n inheritMetadata();\n return ret;\n}\n\n/**\n * Skolemize all terms in the given bindings stream.\n * @param iterator An RDF bindings stream.\n * @param sourceId A source identifier.\n * @return The skolemized bindings stream.\n */\nexport function skolemizeBindingsStream(iterator: BindingsStream, sourceId: string): BindingsStream {\n const ret = iterator.map(bindings => skolemizeBindings(bindings, sourceId));\n function inheritMetadata(): void {\n iterator.getProperty('metadata', (metadata: MetadataBindings) => {\n ret.setProperty('metadata', metadata);\n metadata.state.addInvalidateListener(inheritMetadata);\n });\n }\n inheritMetadata();\n return ret;\n}\n\n/**\n * If a given term was a skolemized named node for the given source id,\n * deskolemize it again to a blank node.\n * If the given term was a skolemized named node for another source, return false.\n * If the given term was not a skolemized named node, return the original term.\n * @param term Any RDF term.\n * @param sourceId A source identifier.\n */\nexport function deskolemizeTerm(term: RDF.Term, sourceId: string): RDF.Term | null {\n if (term.termType === 'BlankNode' && 'skolemized' in term) {\n term = ( term).skolemized;\n }\n if (term.termType === 'NamedNode' && term.value.startsWith(SKOLEM_PREFIX)) {\n const colonSeparator = term.value.indexOf(':', SKOLEM_PREFIX.length);\n const termSourceId = term.value.slice(SKOLEM_PREFIX.length, colonSeparator);\n // We had a skolemized term\n if (termSourceId === sourceId) {\n // It came from the correct source\n const termLabel = term.value.slice(colonSeparator + 1, term.value.length);\n return DF.blankNode(termLabel);\n }\n // It came from a different source\n return null;\n }\n return term;\n}\n\nexport function deskolemizeTermNestedThrowing(term: RDF.Term, sourceId: string): RDF.Term {\n if (term.termType === 'Quad') {\n return mapTermsNested(term, (subTerm) => {\n const deskolemized = deskolemizeTerm(subTerm, sourceId);\n if (!deskolemized) {\n throw new Error(`Skolemized term is not in scope for this source`);\n }\n return deskolemized;\n });\n }\n const ret = deskolemizeTerm(term, sourceId);\n if (ret === null) {\n throw new Error(`Skolemized term is not in scope for this source`);\n }\n return ret;\n}\n\n/**\n * Deskolemize all terms in the given quad.\n * @param quad An RDF quad.\n * @param sourceId A source identifier.\n * @return The deskolemized quad.\n */\nexport function deskolemizeQuad(quad: Q, sourceId: string): Q {\n return mapTermsNested(quad, (term: RDF.Term): RDF.Term => {\n const newTerm = deskolemizeTerm(term, sourceId);\n // If the term was skolemized in a different source then don't deskolemize it\n return newTerm ?? term;\n });\n}\n\n/**\n * Deskolemize all terms in the given quad.\n * Will return undefined if there is at least one blank node not in scope for this sourceId.\n * @param operation An algebra operation.\n * @param sourceId A source identifier.\n */\nexport function deskolemizeOperation(operation: O, sourceId: string): O | undefined {\n try {\n return Util.mapOperation(operation, {\n [Algebra.types.PATTERN](op, factory) {\n return {\n result: Object.assign(factory.createPattern(\n deskolemizeTermNestedThrowing(op.subject, sourceId),\n deskolemizeTermNestedThrowing(op.predicate, sourceId),\n deskolemizeTermNestedThrowing(op.object, sourceId),\n deskolemizeTermNestedThrowing(op.graph, sourceId),\n ), { metadata: op.metadata }),\n recurse: false,\n };\n },\n [Algebra.types.PATH](op, factory) {\n return {\n result: Object.assign(factory.createPath(\n deskolemizeTermNestedThrowing(op.subject, sourceId),\n op.predicate,\n deskolemizeTermNestedThrowing(op.object, sourceId),\n deskolemizeTermNestedThrowing(op.graph, sourceId),\n ), { metadata: op.metadata }),\n recurse: false,\n };\n },\n });\n } catch {\n // Return undefined for skolemized terms not in scope for this source\n }\n}\n","import type {\n IActorContextPreprocessOutput,\n IActorContextPreprocessArgs,\n IActionContextPreprocess,\n} from '@comunica/bus-context-preprocess';\nimport { ActorContextPreprocess } from '@comunica/bus-context-preprocess';\nimport { KeysCore, KeysInitQuery, KeysQuerySourceIdentify } from '@comunica/context-entries';\nimport type { IAction, IActorTest } from '@comunica/core';\nimport type { FunctionArgumentsCache, Logger } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\n\n/**\n * A comunica Set Defaults Context Preprocess Actor.\n */\nexport class ActorContextPreprocessSetDefaults extends ActorContextPreprocess {\n private readonly defaultFunctionArgumentsCache: FunctionArgumentsCache;\n public readonly logger: Logger;\n\n public constructor(args: IActorContextPreprocessSetDefaultsArgs) {\n super(args);\n this.defaultFunctionArgumentsCache = {};\n }\n\n public async test(_action: IAction): Promise {\n return true;\n }\n\n public async run(action: IActionContextPreprocess): Promise {\n let context = action.context;\n\n if (action.initialize) {\n // Set default values\n context = context\n .setDefault(KeysInitQuery.queryTimestamp, new Date())\n .setDefault(KeysQuerySourceIdentify.sourceIds, new Map())\n .setDefault(KeysCore.log, this.logger)\n .setDefault(KeysInitQuery.functionArgumentsCache, this.defaultFunctionArgumentsCache)\n .setDefault(KeysQuerySourceIdentify.hypermediaSourcesAggregatedStores, new Map());\n\n // Handle default query format\n let queryFormat: RDF.QueryFormat = { language: 'sparql', version: '1.1' };\n if (context.has(KeysInitQuery.queryFormat)) {\n queryFormat = context.get(KeysInitQuery.queryFormat)!;\n if (queryFormat.language === 'graphql') {\n context = context.setDefault(KeysInitQuery.graphqlSingularizeVariables, {});\n }\n } else {\n context = context.set(KeysInitQuery.queryFormat, queryFormat);\n }\n }\n\n return { context };\n }\n}\n\nexport interface IActorContextPreprocessSetDefaultsArgs extends IActorContextPreprocessArgs {\n /**\n * The logger of this actor\n * @default {a }\n */\n logger: Logger;\n}\n","import type { IActorContextPreprocessOutput, IActorContextPreprocessArgs } from '@comunica/bus-context-preprocess';\nimport { ActorContextPreprocess } from '@comunica/bus-context-preprocess';\nimport { KeysInitQuery, KeysRdfUpdateQuads } from '@comunica/context-entries';\nimport type { IActorTest, IAction } from '@comunica/core';\nimport type { QuerySourceUnidentified } from '@comunica/types';\n\n/**\n * A comunica Source To Destination Context Preprocess Actor.\n */\nexport class ActorContextPreprocessSourceToDestination extends ActorContextPreprocess {\n public constructor(args: IActorContextPreprocessArgs) {\n super(args);\n }\n\n public async test(_action: IAction): Promise {\n return true;\n }\n\n public async run(action: IAction): Promise {\n if (action.context.get(KeysInitQuery.querySourcesUnidentified) &&\n !action.context.get(KeysRdfUpdateQuads.destination)) {\n const sources: QuerySourceUnidentified[] = action.context.get(KeysInitQuery.querySourcesUnidentified)!;\n if (sources.length === 1) {\n return { context: action.context.set(KeysRdfUpdateQuads.destination, sources[0]) };\n }\n }\n return action;\n }\n}\n","import type { IActionDereference, IActorDereferenceOutput, IActorDereferenceArgs } from '@comunica/bus-dereference';\nimport { ActorDereference } from '@comunica/bus-dereference';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica Fallback Dereference Actor.\n */\nexport class ActorDereferenceFallback extends ActorDereference {\n public constructor(args: IActorDereferenceArgs) {\n super(args);\n }\n\n public async test(_action: IActionDereference): Promise {\n return true;\n }\n\n public async run(action: IActionDereference): Promise {\n return this.handleDereferenceErrors(action, new Error(`Could not dereference '${action.url}'`));\n }\n}\n","/* eslint-disable unicorn/filename-case */\n/* eslint-enable unicorn/filename-case */\nimport {\n ActorDereferenceHttpBase,\n} from './ActorDereferenceHttpBase';\n\n/**\n * The browser variant of {@link ActorDereferenceHttp}.\n */\nexport class ActorDereferenceHttp extends ActorDereferenceHttpBase {\n protected getMaxAcceptHeaderLength(): number {\n return this.maxAcceptHeaderLengthBrowser;\n }\n}\n","import type { IActionDereference, IActorDereferenceArgs, IActorDereferenceOutput } from '@comunica/bus-dereference';\nimport { ActorDereference, emptyReadable } from '@comunica/bus-dereference';\nimport type { IActorHttpOutput, MediatorHttp } from '@comunica/bus-http';\nimport { ActorHttp } from '@comunica/bus-http';\nimport type { IActorTest } from '@comunica/core';\nimport { Headers } from 'cross-fetch';\nimport { resolve as resolveRelative } from 'relative-to-absolute-iri';\n\n// Use require instead of import for default exports, to be compatible with variants of esModuleInterop in tsconfig.\nimport stringifyStream = require('stream-to-string');\n\nconst REGEX_MEDIATYPE = /^[^ ;]*/u;\n\nexport function mediaTypesToAcceptString(mediaTypes: Record, maxLength: number): string {\n const wildcard = '*/*;q=0.1';\n const parts: string[] = [];\n const sortedMediaTypes = Object.entries(mediaTypes)\n .map(([ mediaType, priority ]) => ({ mediaType, priority }))\n .sort((left, right) => right.priority === left.priority ?\n left.mediaType.localeCompare(right.mediaType) :\n right.priority - left.priority);\n // Take into account the ',' characters joining each type\n let partsLength = sortedMediaTypes.length - 1;\n for (const { mediaType, priority } of sortedMediaTypes) {\n const part = mediaType + (priority === 1 ? '' : `;q=${priority.toFixed(3).replace(/0*$/u, '')}`);\n if (partsLength + part.length > maxLength) {\n while (partsLength + wildcard.length > maxLength) {\n const last = parts.pop() ?? '';\n // Don't forget the ','\n partsLength -= last.length + 1;\n }\n parts.push(wildcard);\n break;\n }\n parts.push(part);\n partsLength += part.length;\n }\n return parts.length === 0 ? '*/*' : parts.join(',');\n}\n\n/**\n * An actor that listens on the 'dereference' bus.\n *\n * It resolves the URL using the HTTP bus using an accept header compiled from the available media types.\n */\nexport abstract class ActorDereferenceHttpBase extends ActorDereference implements IActorDereferenceHttpArgs {\n public readonly mediatorHttp: MediatorHttp;\n public readonly maxAcceptHeaderLength: number;\n public readonly maxAcceptHeaderLengthBrowser: number;\n\n public constructor(args: IActorDereferenceHttpArgs) {\n super(args);\n }\n\n public async test({ url }: IActionDereference): Promise {\n if (!/^https?:/u.test(url)) {\n throw new Error(`Cannot retrieve ${url} because it is not an HTTP(S) URL.`);\n }\n return true;\n }\n\n public async run(action: IActionDereference): Promise {\n let exists = true;\n\n // Append any custom passed headers\n const headers = new Headers(action.headers);\n\n // Resolve HTTP URL using appropriate accept header\n headers.append(\n 'Accept',\n mediaTypesToAcceptString(await action.mediaTypes?.() ?? {}, this.getMaxAcceptHeaderLength()),\n );\n\n let httpResponse: IActorHttpOutput;\n const requestTimeStart = Date.now();\n try {\n httpResponse = await this.mediatorHttp.mediate({\n context: action.context,\n init: { headers, method: action.method },\n input: action.url,\n });\n } catch (error: unknown) {\n return this.handleDereferenceErrors(action, error);\n }\n // The response URL can be relative to the given URL\n const url = resolveRelative(httpResponse.url, action.url);\n const requestTime = Date.now() - requestTimeStart;\n\n // Only parse if retrieval was successful\n if (httpResponse.status !== 200) {\n exists = false;\n // Consume the body, to avoid process to hang\n const bodyString = httpResponse.body ?\n await stringifyStream(ActorHttp.toNodeReadable(httpResponse.body)) :\n 'empty response';\n\n if (!action.acceptErrors) {\n const error = new Error(`Could not retrieve ${action.url} (HTTP status ${httpResponse.status}):\\n${bodyString}`);\n return this.handleDereferenceErrors(action, error, httpResponse.headers, requestTime);\n }\n }\n\n const mediaType = REGEX_MEDIATYPE.exec(httpResponse.headers.get('content-type') ?? '')?.[0];\n\n // Return the parsed quad stream and whether or not only triples are supported\n return {\n url,\n data: exists ? ActorHttp.toNodeReadable(httpResponse.body) : emptyReadable(),\n exists,\n requestTime,\n headers: httpResponse.headers,\n mediaType: mediaType === 'text/plain' ? undefined : mediaType,\n };\n }\n\n protected abstract getMaxAcceptHeaderLength(): number;\n}\n\nexport interface IActorDereferenceHttpArgs extends IActorDereferenceArgs {\n /**\n * The HTTP mediator.\n */\n mediatorHttp: MediatorHttp;\n /**\n * The maximum allowed accept header value length for non-browser environments.\n * @range {integer}\n * @default {1024}\n */\n maxAcceptHeaderLength: number;\n /**\n * The maximum allowed accept header value length for browser environments.\n * @range {integer}\n * @default {128}\n */\n maxAcceptHeaderLengthBrowser: number;\n}\n","import type { IActorDereferenceOutput } from '@comunica/bus-dereference';\nimport type { IActorDereferenceRdfArgs } from '@comunica/bus-dereference-rdf';\nimport { ActorDereferenceRdf } from '@comunica/bus-dereference-rdf';\nimport type { IActionRdfParseMetadata } from '@comunica/bus-rdf-parse';\n\n/**\n * A comunica Parse Dereference RDF Actor.\n */\nexport class ActorDereferenceRdfParse extends ActorDereferenceRdf {\n /**\n * @param args - @defaultNested {{\n * \"ttl\": \"text/turtle\",\n * \"turtle\": \"text/turtle\",\n * \"shaclc\": \"text/shaclc\",\n * \"shc\": \"text/shaclc\",\n * \"shaclce\": \"text/shaclc-ext\",\n * \"shce\": \"text/shaclc-ext\",\n * \"nt\": \"application/n-triples\",\n * \"ntriples\": \"application/n-triples\",\n * \"nq\": \"application/n-quads\",\n * \"nquads\": \"application/n-quads\",\n * \"rdf\": \"application/rdf+xml\",\n * \"rdfxml\": \"application/rdf+xml\",\n * \"owl\": \"application/rdf+xml\",\n * \"n3\": \"text/n3\",\n * \"trig\": \"application/trig\",\n * \"jsonld\": \"application/ld+json\",\n * \"json\": \"application/json\",\n * \"html\": \"text/html\",\n * \"htm\": \"text/html\",\n * \"xhtml\": \"application/xhtml+xml\",\n * \"xht\": \"application/xhtml+xml\",\n * \"xml\": \"application/xml\",\n * \"svg\": \"image/svg+xml\",\n * \"svgz\": \"image/svg+xml\"\n * }} mediaMappings\n */\n public constructor(args: IActorDereferenceRdfArgs) {\n super(args);\n }\n\n public async getMetadata(dereference: IActorDereferenceOutput): Promise {\n return { baseIRI: dereference.url };\n }\n}\n\nexport interface IActorDereferenceRdfParseArgs extends IActorDereferenceRdfArgs {\n\n}\n","import type { IActionHashBindings, IActorHashBindingsOutput } from '@comunica/bus-hash-bindings';\nimport { ActorHashBindings } from '@comunica/bus-hash-bindings';\nimport type { IActorTest } from '@comunica/core';\nimport { sha1 } from 'hash.js';\nimport { termToString } from 'rdf-string';\n\n// eslint-disable-next-line ts/no-require-imports,ts/no-var-requires\nconst canonicalize = require('canonicalize');\n\n/**\n * A comunica Memento Http Actor.\n */\nexport class ActorHashBindingsSha1 extends ActorHashBindings {\n public async test(action: IActionHashBindings): Promise {\n if (!action.allowHashCollisions) {\n throw new Error(`Actor ${this.name} can not provide hash functions without hash collisions`);\n }\n return true;\n }\n\n public async run(_action: IActionHashBindings): Promise {\n return {\n hashFunction: bindings => sha1()\n .update(canonicalize(Object.fromEntries([ ...bindings ]\n .map(([ key, value ]) => [ termToString(key), termToString(value) ]))))\n .digest('hex'),\n hashCollisions: true,\n };\n }\n}\n","import type { IActionHttp, IActorHttpOutput, IActorHttpArgs } from '@comunica/bus-http';\nimport { ActorHttp } from '@comunica/bus-http';\nimport { KeysHttp } from '@comunica/context-entries';\nimport type { IMediatorTypeTime } from '@comunica/mediatortype-time';\nimport type { Readable } from 'readable-stream';\nimport 'cross-fetch/polyfill';\nimport { FetchInitPreprocessor } from './FetchInitPreprocessor';\nimport type { IFetchInitPreprocessor } from './IFetchInitPreprocessor';\n\n/**\n * A node-fetch actor that listens on the 'init' bus.\n *\n * It will call `fetch` with either action.input or action.url.\n */\nexport class ActorHttpFetch extends ActorHttp {\n private readonly userAgent: string;\n private readonly fetchInitPreprocessor: IFetchInitPreprocessor;\n\n public constructor(args: IActorHttpFetchArgs) {\n super(args);\n this.userAgent = ActorHttpFetch.createUserAgent();\n this.fetchInitPreprocessor = new FetchInitPreprocessor(args.agentOptions);\n }\n\n public static createUserAgent(): string {\n return `Comunica/actor-http-fetch (${typeof globalThis.navigator === 'undefined' ?\n `Node.js ${process.version}; ${process.platform}` :\n `Browser-${globalThis.navigator.userAgent}`})`;\n }\n\n public async test(_action: IActionHttp): Promise {\n return { time: Number.POSITIVE_INFINITY };\n }\n\n /**\n * Perform a fetch request, taking care of retries\n * @param fetchFn\n * @param requestInput Url or RequestInfo to pass to fetchFn\n * @param requestInit RequestInit to pass to fetch function\n * @param retryCount Maximum retries after which to abort\n * @param retryDelay Time in milliseconds to wait between retries\n * @returns a fetch `Response` object\n */\n private static async getResponse(\n fetchFn: (input: RequestInfo | URL, init?: RequestInit | undefined) => Promise,\n requestInput: RequestInfo | URL,\n requestInit: RequestInit,\n retryCount: number,\n retryDelay: number,\n throwOnServerError: boolean,\n ): Promise {\n let lastError: unknown;\n // The retryCount is 0-based. Therefore, add 1 to triesLeft.\n let triesLeft = retryCount + 1;\n\n // When retry count is greater than 0, repeat fetch.\n while (triesLeft-- > 0) {\n try {\n const response = await fetchFn(requestInput, requestInit);\n // Check, if server sent a 5xx error response.\n if (throwOnServerError && response.status >= 500 && response.status < 600) {\n throw new Error(`Server replied with response code ${response.status}: ${response.statusText}`);\n }\n return response;\n } catch (error: unknown) {\n lastError = error;\n // If the fetch was aborted by timeout, we won't retry.\n if (requestInit.signal?.aborted) {\n throw error;\n }\n\n if (triesLeft > 0) {\n // Wait for specified delay, before retrying.\n await new Promise((resolve, reject) => {\n setTimeout(resolve, retryDelay);\n // Cancel waiting, if timeout is reached.\n requestInit.signal?.addEventListener('abort', () => {\n reject(new Error('Fetch aborted by timeout.'));\n });\n });\n }\n }\n }\n // The fetch was not successful. We throw.\n if (retryCount > 0) {\n // Feedback the last error, if there were retry attempts.\n throw new Error(`Number of fetch retries (${retryCount}) exceeded. Last error: ${String(lastError)}`);\n } else {\n throw lastError;\n }\n }\n\n public async run(action: IActionHttp): Promise {\n // Prepare headers\n const initHeaders = action.init?.headers ?? {};\n action.init = action.init ?? {};\n action.init.headers = new Headers(initHeaders);\n if (!action.init.headers.has('user-agent')) {\n action.init.headers.append('user-agent', this.userAgent);\n }\n const authString: string | undefined = action.context.get(KeysHttp.auth);\n if (authString) {\n action.init.headers.append('Authorization', `Basic ${Buffer.from(authString).toString('base64')}`);\n }\n\n // Log request\n this.logInfo(action.context, `Requesting ${typeof action.input === 'string' ?\n action.input :\n action.input.url}`, () => ({\n headers: ActorHttp.headersToHash(new Headers(action.init!.headers)),\n method: action.init!.method ?? 'GET',\n }));\n\n // TODO: remove this workaround once this has a fix: https://github.com/inrupt/solid-client-authn-js/issues/1708\n if (action.init?.headers && 'append' in action.init.headers && action.context.has(KeysHttp.fetch)) {\n action.init.headers = ActorHttp.headersToHash(action.init.headers);\n }\n\n let requestInit = { ...action.init };\n\n if (action.context.get(KeysHttp.includeCredentials)) {\n requestInit.credentials = 'include';\n }\n\n const httpTimeout: number | undefined = action.context?.get(KeysHttp.httpTimeout);\n let requestTimeout: NodeJS.Timeout | undefined;\n let onTimeout: (() => void) | undefined;\n if (httpTimeout !== undefined) {\n const controller = await this.fetchInitPreprocessor.createAbortController();\n requestInit.signal = controller.signal;\n onTimeout = () => controller.abort();\n requestTimeout = setTimeout(() => onTimeout!(), httpTimeout);\n }\n\n try {\n requestInit = await this.fetchInitPreprocessor.handle(requestInit);\n // Number of retries to perform after a failed fetch.\n const retryCount: number = action.context?.get(KeysHttp.httpRetryCount) ?? 0;\n const retryDelay: number = action.context?.get(KeysHttp.httpRetryDelay) ?? 0;\n const retryOnSeverError: boolean = action.context?.get(KeysHttp.httpRetryOnServerError) ?? false;\n const customFetch: ((input: RequestInfo | URL, init?: RequestInit) => Promise) | undefined = action\n .context?.get(KeysHttp.fetch);\n\n // Execute the fetch (with retries and timeouts, if applicable).\n const response = await ActorHttpFetch.getResponse(\n customFetch ?? fetch,\n action.input,\n requestInit,\n retryCount,\n retryDelay,\n retryOnSeverError,\n );\n\n // We remove or update the timeout\n if (requestTimeout !== undefined) {\n const httpBodyTimeout = action.context?.get(KeysHttp.httpBodyTimeout) || false;\n if (httpBodyTimeout && response.body) {\n // eslint-disable-next-line ts/no-misused-promises\n onTimeout = () => response.body?.cancel(new Error(`HTTP timeout when reading the body of ${response.url}.\nThis error can be disabled by modifying the 'httpBodyTimeout' and/or 'httpTimeout' options.`));\n (response.body).on('close', () => {\n clearTimeout(requestTimeout);\n });\n } else {\n clearTimeout(requestTimeout);\n }\n }\n\n // Node-fetch does not support body.cancel, while it is mandatory according to the fetch and readablestream api.\n // If it doesn't exist, we monkey-patch it.\n if (response.body && !response.body.cancel) {\n response.body.cancel = async(error?: Error) => {\n (response.body).destroy(error);\n if (requestTimeout !== undefined) {\n // We make sure to remove the timeout if it is still enabled\n clearTimeout(requestTimeout);\n }\n };\n }\n\n return response;\n } catch (error: unknown) {\n if (requestTimeout !== undefined) {\n clearTimeout(requestTimeout);\n }\n throw error;\n }\n }\n}\n\nexport interface IActorHttpFetchArgs extends IActorHttpArgs {\n /**\n * The agent options for the HTTP agent\n * @range {json}\n * @default {{ \"keepAlive\": true, \"maxSockets\": 5 }}\n */\n agentOptions?: Record;\n}\n","/* eslint-disable unicorn/filename-case */\n/* eslint-enable unicorn/filename-case */\n\nimport { ActorHttp } from '@comunica/bus-http';\nimport type { IFetchInitPreprocessor } from './IFetchInitPreprocessor';\n\n/**\n * Overrides things for fetch requests in browsers\n */\nexport class FetchInitPreprocessor implements IFetchInitPreprocessor {\n public async handle(init: RequestInit): Promise {\n // Remove overridden user-agent header within browsers to avoid CORS issues\n if (init.headers) {\n const headers = new Headers(init.headers);\n if (headers.has('user-agent')) {\n headers.delete('user-agent');\n }\n init.headers = headers;\n }\n\n // TODO: remove this workaround once this has a fix: https://github.com/inrupt/solid-client-authn-js/issues/1708\n if (init?.headers && 'append' in init.headers) {\n init.headers = ActorHttp.headersToHash(init.headers);\n }\n\n // Browsers don't yet support passing ReadableStream as body to requests, see\n // https://bugs.chromium.org/p/chromium/issues/detail?id=688906\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1387483\n // As such, we convert those bodies to a plain string\n // TODO: remove this once browser support ReadableStream in requests\n if (init.body && typeof init.body !== 'string' && 'getReader' in init.body) {\n const reader = init.body.getReader();\n const chunks = [];\n\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n chunks.push(value);\n }\n init.body = chunks.join('');\n }\n\n // Only enable keepalive functionality if we are not sending a body (some browsers seem to trip over this)\n return { keepalive: !init.body, ...init };\n }\n\n public async createAbortController(): Promise {\n return new AbortController();\n }\n}\n","import type { IActionHttp, IActorHttpOutput, MediatorHttp, IActorHttpArgs } from '@comunica/bus-http';\nimport { ActorHttp } from '@comunica/bus-http';\nimport { KeysHttpProxy } from '@comunica/context-entries';\nimport type { IMediatorTypeTime } from '@comunica/mediatortype-time';\nimport type { IProxyHandler } from '@comunica/types';\n\n/**\n * A comunica Proxy Http Actor.\n */\nexport class ActorHttpProxy extends ActorHttp {\n public readonly mediatorHttp: MediatorHttp;\n\n public constructor(args: IActorHttpProxyArgs) {\n super(args);\n }\n\n public async test(action: IActionHttp): Promise {\n const proxyHandler: IProxyHandler | undefined = action.context.get(KeysHttpProxy.httpProxyHandler);\n if (!proxyHandler) {\n throw new Error(`Actor ${this.name} could not find a proxy handler in the context.`);\n }\n if (!await proxyHandler.getProxy(action)) {\n throw new Error(`Actor ${this.name} could not determine a proxy for the given request.`);\n }\n return { time: Number.POSITIVE_INFINITY };\n }\n\n public async run(action: IActionHttp): Promise {\n const requestedUrl = typeof action.input === 'string' ? action.input : action.input.url;\n const proxyHandler: IProxyHandler = action.context.get(KeysHttpProxy.httpProxyHandler)!;\n\n // Send a request for the modified request\n const output = await this.mediatorHttp.mediate({\n ...await proxyHandler.getProxy(action),\n context: action.context.delete(KeysHttpProxy.httpProxyHandler),\n });\n\n // Modify the response URL\n // use defineProperty to allow modification of unmodifiable objects\n Object.defineProperty(output, 'url', {\n configurable: true,\n enumerable: true,\n get: () => output.headers.get('x-final-url') ?? requestedUrl,\n });\n return output;\n }\n}\n\nexport interface IActorHttpProxyArgs extends IActorHttpArgs {\n /**\n * The HTTP mediator\n */\n mediatorHttp: MediatorHttp;\n}\n","import type { IProxyHandler, IRequest } from '@comunica/types';\n\n/**\n * A proxy handler that prefixes all URLs with a given string.\n */\nexport class ProxyHandlerStatic implements IProxyHandler {\n private readonly prefixUrl: string;\n\n public constructor(prefixUrl: string) {\n this.prefixUrl = prefixUrl;\n }\n\n public async getProxy(request: IRequest): Promise {\n return {\n init: request.init,\n input: this.modifyInput(request.input),\n };\n }\n\n public modifyInput(input: RequestInfo): RequestInfo {\n if (typeof input === 'string') {\n return this.prefixUrl + input;\n }\n return new Request(this.prefixUrl + input.url, input);\n }\n}\n","import type { IActionHttp, IActorHttpArgs, IActorHttpOutput, MediatorHttp } from '@comunica/bus-http';\nimport { ActorHttp } from '@comunica/bus-http';\nimport { KeysHttpWayback, KeysHttpProxy } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IProxyHandler, IRequest } from '@comunica/types';\n\n// Use require instead of import for default exports, to be compatible with variants of esModuleInterop in tsconfig.\nimport stringifyStream = require('stream-to-string');\nimport 'cross-fetch/polyfill';\n\nconst WAYBACK_URL = 'http://wayback.archive-it.org/';\n\nfunction addWayback(action: IRequest): IRequest {\n const request = new Request(action.input, action.init);\n return {\n input: new Request(new URL(`/${request.url}`, WAYBACK_URL), request),\n };\n}\n\nfunction getProxyHandler(context: IActionContext): (action: IRequest) => Promise {\n const handler = context.get(KeysHttpProxy.httpProxyHandler);\n if (handler) {\n return (action: IRequest) => handler.getProxy(addWayback(action));\n }\n return (action: IRequest) => Promise.resolve(addWayback(action));\n}\n\n/**\n * A Comunica actor to intercept HTTP requests to recover broken links using the WayBack Machine\n */\nexport class ActorHttpWayback extends ActorHttp {\n public readonly mediatorHttp: MediatorHttp;\n\n public constructor(args: IActorHttpWaybackArgs) {\n super(args);\n }\n\n public async test(_action: IActionHttp): Promise {\n return true;\n }\n\n public async run(action: IActionHttp): Promise {\n let result = await this.mediatorHttp.mediate(action);\n\n if (result.status === 404 && action.context.get(KeysHttpWayback.recoverBrokenLinks)) {\n let fallbackResult = await this.mediatorHttp.mediate({\n ...action,\n context: action.context\n .set(KeysHttpWayback.recoverBrokenLinks, false)\n .set(KeysHttpProxy.httpProxyHandler, { getProxy: getProxyHandler(action.context) }),\n });\n\n // If the wayback machine returns a 200 status then use that result\n if (fallbackResult.status === 200) {\n [ result, fallbackResult ] = [ fallbackResult, result ];\n }\n\n // Consume stream to avoid process\n const { body } = fallbackResult;\n if (body) {\n if ('cancel' in body && typeof body.cancel === 'function') {\n await body.cancel();\n } else if ('destroy' in body && typeof (body).destroy === 'function') {\n (body).destroy();\n } else {\n await stringifyStream(ActorHttp.toNodeReadable(body));\n }\n }\n }\n\n return result;\n }\n}\n\nexport interface IActorHttpWaybackArgs extends IActorHttpArgs {\n mediatorHttp: MediatorHttp;\n}\n","/* eslint-disable unicorn/filename-case */\n/* eslint-enable unicorn/filename-case */\nimport { ActorInitQueryBase } from './ActorInitQueryBase';\n\n/* istanbul ignore next */\nif (typeof process === 'undefined') {\n // Polyfills process.nextTick for readable-stream\n globalThis.process = require('process/');\n}\n\nexport class ActorInitQuery extends ActorInitQueryBase {}\n","import type { MediatorHttpInvalidate } from '@comunica/bus-http-invalidate';\nimport type { IActionInit, IActorInitArgs, IActorOutputInit } from '@comunica/bus-init';\nimport { ActorInit } from '@comunica/bus-init';\nimport type { MediatorQueryProcess } from '@comunica/bus-query-process';\nimport type {\n MediatorQueryResultSerializeHandle,\n MediatorQueryResultSerializeMediaTypes,\n MediatorQueryResultSerializeMediaTypeFormats,\n} from '@comunica/bus-query-result-serialize';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A browser-safe comunica Query Init Actor.\n */\nexport class ActorInitQueryBase extends ActorInit implements IActorInitQueryBaseArgs {\n public readonly mediatorQueryResultSerialize: MediatorQueryResultSerializeHandle;\n public readonly mediatorQueryResultSerializeMediaTypeCombiner: MediatorQueryResultSerializeMediaTypes;\n public readonly mediatorQueryResultSerializeMediaTypeFormatCombiner: MediatorQueryResultSerializeMediaTypeFormats;\n public readonly mediatorHttpInvalidate: MediatorHttpInvalidate;\n public readonly mediatorQueryProcess: MediatorQueryProcess;\n\n public readonly queryString?: string;\n public readonly defaultQueryInputFormat?: string;\n public readonly allowNoSources?: boolean;\n public readonly context?: string;\n\n public async test(_action: IActionInit): Promise {\n return true;\n }\n\n public async run(_action: IActionInit): Promise {\n throw new Error('ActorInitSparql#run is not supported in the browser.');\n }\n}\n\nexport interface IActorInitQueryBaseArgs extends IActorInitArgs {\n /**\n * The query process mediator\n */\n mediatorQueryProcess: MediatorQueryProcess;\n /**\n * The query serialize mediator\n */\n mediatorQueryResultSerialize: MediatorQueryResultSerializeHandle;\n /**\n * The query serialize media type combinator\n */\n mediatorQueryResultSerializeMediaTypeCombiner: MediatorQueryResultSerializeMediaTypes;\n /**\n * The query serialize media type format combinator\n */\n mediatorQueryResultSerializeMediaTypeFormatCombiner: MediatorQueryResultSerializeMediaTypeFormats;\n /**\n * The HTTP cache invalidation mediator\n */\n mediatorHttpInvalidate: MediatorHttpInvalidate;\n\n /**\n * A SPARQL query string\n */\n queryString?: string;\n /**\n * The default query input format\n * @default {sparql}\n */\n defaultQueryInputFormat?: string;\n /**\n * If it should be allowed that the user passes no sources.\n * @default {false}\n */\n allowNoSources?: boolean;\n /**\n * A JSON string of a query operation context\n */\n context?: string;\n}\n","import type { IActionSparqlSerialize, IActorQueryResultSerializeOutput } from '@comunica/bus-query-result-serialize';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport { ActionContext } from '@comunica/core';\nimport type {\n IActionContext,\n IQueryOperationResult,\n IQueryEngine,\n IQueryExplained,\n QueryFormatType,\n QueryType,\n QueryExplainMode,\n BindingsStream,\n QueryAlgebraContext,\n QueryStringContext,\n IQueryBindingsEnhanced,\n IQueryQuadsEnhanced,\n QueryEnhanced,\n IQueryContextCommon,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport type { ActorInitQueryBase } from './ActorInitQueryBase';\n\n/**\n * Base implementation of a Comunica query engine.\n */\nexport class QueryEngineBase<\n // eslint-disable-next-line unused-imports/no-unused-vars\n QueryContext extends IQueryContextCommon = IQueryContextCommon,\n QueryStringContextInner extends RDF.QueryStringContext = QueryStringContext,\n QueryAlgebraContextInner extends RDF.QueryAlgebraContext = QueryAlgebraContext,\n>\nimplements IQueryEngine {\n private readonly actorInitQuery: ActorInitQueryBase;\n\n public constructor(actorInitQuery: ActorInitQueryBase) {\n this.actorInitQuery = actorInitQuery;\n }\n\n public async queryBindings(\n query: QueryFormatTypeInner,\n context?: QueryFormatTypeInner extends string ? QueryStringContextInner : QueryAlgebraContextInner,\n ): Promise {\n return this.queryOfType(query, context, 'bindings');\n }\n\n public async queryQuads(\n query: QueryFormatTypeInner,\n context?: QueryFormatTypeInner extends string ? QueryStringContextInner : QueryAlgebraContextInner,\n ): Promise & RDF.ResultStream> {\n return this.queryOfType(query, context, 'quads');\n }\n\n public async queryBoolean(\n query: QueryFormatTypeInner,\n context?: QueryFormatTypeInner extends string ? QueryStringContextInner : QueryAlgebraContextInner,\n ): Promise {\n return this.queryOfType(query, context, 'boolean');\n }\n\n public async queryVoid(\n query: QueryFormatTypeInner,\n context?: QueryFormatTypeInner extends string ? QueryStringContextInner : QueryAlgebraContextInner,\n ): Promise {\n return this.queryOfType(query, context, 'void');\n }\n\n protected async queryOfType(\n query: QueryFormatTypeInner,\n context: undefined | (QueryFormatTypeInner extends string ?\n QueryStringContextInner : QueryAlgebraContextInner),\n expectedType: QueryTypeOut['resultType'],\n ): Promise> {\n const result = await this.query(query, context);\n if (result.resultType === expectedType) {\n return > await result.execute();\n }\n throw new Error(`Query result type '${expectedType}' was expected, while '${result.resultType}' was found.`);\n }\n\n /**\n * Evaluate the given query\n * @param query A query string or algebra.\n * @param context An optional query context.\n * @return {Promise} A promise that resolves to the query output.\n */\n public async query(\n query: QueryFormatTypeInner,\n context?: QueryFormatTypeInner extends string ? QueryStringContextInner : QueryAlgebraContextInner,\n ): Promise {\n const output = await this.queryOrExplain(query, context);\n if ('explain' in output) {\n throw new Error(`Tried to explain a query when in query-only mode`);\n }\n return output;\n }\n\n /**\n * Explain the given query\n * @param query A query string or algebra.\n * @param context An optional query context.\n * @param explainMode The explain mode.\n * @return {Promise} A promise that resolves to\n * the query output or explanation.\n */\n public async explain(\n query: QueryFormatTypeInner,\n context: QueryFormatTypeInner extends string ? QueryStringContextInner : QueryAlgebraContextInner,\n explainMode: QueryExplainMode,\n ): Promise {\n context.explain = explainMode;\n const output = await this.queryOrExplain(query, context);\n return output;\n }\n\n /**\n * Evaluate or explain the given query\n * @param query A query string or algebra.\n * @param context An optional query context.\n * @return {Promise} A promise that resolves to\n * the query output or explanation.\n */\n public async queryOrExplain(\n query: QueryFormatTypeInner,\n context?: QueryFormatTypeInner extends string ? QueryStringContextInner : QueryAlgebraContextInner,\n ): Promise {\n const actionContext: IActionContext = ActionContext.ensureActionContext(context);\n\n // Invalidate caches if cache argument is set to false\n if (actionContext.get(KeysInitQuery.noCache)) {\n await this.invalidateHttpCache();\n }\n\n // Invoke query process\n const { result } = await this.actorInitQuery.mediatorQueryProcess.mediate({ query, context: actionContext });\n if ('explain' in result) {\n return result;\n }\n return QueryEngineBase.internalToFinalResult(result);\n }\n\n /**\n * @param context An optional context.\n * @return {Promise<{[p: string]: number}>} All available SPARQL (weighted) result media types.\n */\n public async getResultMediaTypes(context?: any): Promise> {\n context = ActionContext.ensureActionContext(context);\n return (await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeCombiner\n .mediate({ context, mediaTypes: true })).mediaTypes;\n }\n\n /**\n * @param context An optional context.\n * @return {Promise<{[p: string]: number}>} All available SPARQL result media type formats.\n */\n public async getResultMediaTypeFormats(context?: any): Promise> {\n context = ActionContext.ensureActionContext(context);\n return (await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeFormatCombiner\n .mediate({ context, mediaTypeFormats: true })).mediaTypeFormats;\n }\n\n /**\n * Convert a query result to a string stream based on a certain media type.\n * @param {IQueryOperationResult} queryResult A query result.\n * @param {string} mediaType A media type.\n * @param {ActionContext} context An optional context.\n * @return {Promise} A text stream.\n */\n public async resultToString(queryResult: RDF.Query, mediaType?: string, context?: any):\n Promise {\n context = ActionContext.ensureActionContext(context);\n if (!mediaType) {\n switch (queryResult.resultType) {\n case 'bindings':\n mediaType = 'application/json';\n break;\n case 'quads':\n mediaType = 'application/trig';\n break;\n default:\n mediaType = 'simple';\n break;\n }\n }\n const handle: IActionSparqlSerialize = { ...await QueryEngineBase.finalToInternalResult(queryResult), context };\n return (await this.actorInitQuery.mediatorQueryResultSerialize\n .mediate({ context, handle, handleMediaType: mediaType })).handle;\n }\n\n /**\n * Invalidate all internal caches related to the given page URL.\n * If no page URL is given, then all pages will be invalidated.\n * @param {string} url The page URL to invalidate.\n * @param context An optional ActionContext to pass to the actors.\n * @return {Promise} A promise resolving when the caches have been invalidated.\n */\n public invalidateHttpCache(url?: string, context?: any): Promise {\n context = ActionContext.ensureActionContext(context);\n return this.actorInitQuery.mediatorHttpInvalidate.mediate({ url, context });\n }\n\n /**\n * Convert an internal query result to a final one.\n * @param internalResult An intermediary query result.\n */\n public static internalToFinalResult(internalResult: IQueryOperationResult): QueryType {\n switch (internalResult.type) {\n case 'bindings':\n return {\n resultType: 'bindings',\n execute: async() => internalResult.bindingsStream,\n metadata: async() => await internalResult.metadata(),\n context: internalResult.context,\n };\n case 'quads':\n return {\n resultType: 'quads',\n execute: async() => internalResult.quadStream,\n metadata: async() => await internalResult.metadata(),\n context: internalResult.context,\n };\n case 'boolean':\n return {\n resultType: 'boolean',\n execute: async() => internalResult.execute(),\n context: internalResult.context,\n };\n case 'void':\n return {\n resultType: 'void',\n execute: async() => internalResult.execute(),\n context: internalResult.context,\n };\n }\n }\n\n /**\n * Convert a final query result to an internal one.\n * @param finalResult A final query result.\n */\n public static async finalToInternalResult(finalResult: RDF.Query): Promise {\n switch (finalResult.resultType) {\n case 'bindings':\n return {\n type: 'bindings',\n bindingsStream: await finalResult.execute(),\n metadata: async() => await finalResult.metadata(),\n };\n case 'quads':\n return {\n type: 'quads',\n quadStream: > await finalResult.execute(),\n metadata: async() => await finalResult.metadata(),\n };\n case 'boolean':\n return {\n type: 'boolean',\n execute: () => finalResult.execute(),\n };\n case 'void':\n return {\n type: 'void',\n execute: () => finalResult.execute(),\n };\n }\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n IActorOptimizeQueryOperationArgs,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport { getDataDestinationValue } from '@comunica/bus-rdf-update-quads';\nimport { KeysInitQuery, KeysQueryOperation, KeysRdfUpdateQuads } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport type { IDataDestination, IQuerySourceWrapper } from '@comunica/types';\nimport { Algebra, Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Assign Sources Exhaustive Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationAssignSourcesExhaustive extends ActorOptimizeQueryOperation {\n public constructor(args: IActorOptimizeQueryOperationArgs) {\n super(args);\n }\n\n public async test(_action: IActionOptimizeQueryOperation): Promise {\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n const sources: IQuerySourceWrapper[] = action.context.get(KeysQueryOperation.querySources) ?? [];\n if (sources.length === 0) {\n return { operation: action.operation, context: action.context };\n }\n if (sources.length === 1) {\n const sourceWrapper = sources[0];\n const destination: IDataDestination | undefined = action.context.get(KeysRdfUpdateQuads.destination);\n if (!destination || sourceWrapper.source.referenceValue === getDataDestinationValue(destination)) {\n try {\n const shape = await sourceWrapper.source.getSelectorShape(action.context);\n if (ActorQueryOperation.doesShapeAcceptOperation(shape, action.operation)) {\n return {\n operation: ActorQueryOperation.assignOperationSource(action.operation, sourceWrapper),\n context: action.context,\n };\n }\n } catch {\n // Fallback to the default case when the selector shape does not exist,\n // which can occur for a non-existent destination.\n }\n }\n }\n return {\n operation: this.assignExhaustive(action.operation, sources),\n // We only keep queryString in the context if we only have a single source that accepts the full operation.\n // In that case, the queryString can be sent to the source as-is.\n context: action.context\n .delete(KeysInitQuery.queryString),\n };\n }\n\n /**\n * Assign the given sources to the leaves in the given query operation.\n * Leaves will be wrapped in a union operation and duplicated for every source.\n * The input operation will not be modified.\n * @param operation The input operation.\n * @param sources The sources to assign.\n */\n public assignExhaustive(operation: Algebra.Operation, sources: IQuerySourceWrapper[]): Algebra.Operation {\n // eslint-disable-next-line ts/no-this-alias\n const self = this;\n return Util.mapOperation(operation, {\n [Algebra.types.PATTERN](subOperation, factory) {\n if (sources.length === 1) {\n return {\n result: ActorQueryOperation.assignOperationSource(subOperation, sources[0]),\n recurse: false,\n };\n }\n return {\n result: factory.createUnion(sources\n .map(source => ActorQueryOperation.assignOperationSource(subOperation, source))),\n recurse: false,\n };\n },\n [Algebra.types.LINK](subOperation, factory) {\n if (sources.length === 1) {\n return {\n result: ActorQueryOperation.assignOperationSource(subOperation, sources[0]),\n recurse: false,\n };\n }\n return {\n result: factory.createAlt(sources\n .map(source => ActorQueryOperation.assignOperationSource(subOperation, source))),\n recurse: false,\n };\n },\n [Algebra.types.NPS](subOperation, factory) {\n if (sources.length === 1) {\n return {\n result: ActorQueryOperation.assignOperationSource(subOperation, sources[0]),\n recurse: false,\n };\n }\n return {\n result: factory.createAlt(sources\n .map(source => ActorQueryOperation.assignOperationSource(subOperation, source))),\n recurse: false,\n };\n },\n [Algebra.types.SERVICE](subOperation) {\n return {\n result: subOperation,\n recurse: false,\n };\n },\n [Algebra.types.CONSTRUCT](subOperation, factory) {\n return {\n result: factory.createConstruct(\n self.assignExhaustive(subOperation.input, sources),\n subOperation.template,\n ),\n recurse: false,\n };\n },\n [Algebra.types.DELETE_INSERT](subOperation, factory) {\n return {\n result: factory.createDeleteInsert(\n subOperation.delete,\n subOperation.insert,\n subOperation.where ? self.assignExhaustive(subOperation.where, sources) : undefined,\n ),\n recurse: false,\n };\n },\n });\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { Algebra, Factory } from 'sparqlalgebrajs';\nimport { Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica BGP to Join Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationBgpToJoin extends ActorOptimizeQueryOperation {\n public async test(_action: IActionOptimizeQueryOperation): Promise {\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n const operation = Util.mapOperation(action.operation, {\n bgp(op: Algebra.Bgp, factory: Factory) {\n return {\n recurse: false,\n result: factory.createJoin(op.patterns),\n };\n },\n });\n return { operation, context: action.context };\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n IActorOptimizeQueryOperationArgs,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type * as RDF from '@rdfjs/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport { Algebra, Factory } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\nconst AF = new Factory();\n\n/**\n * A comunica Describe To Constructs Subject Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationDescribeToConstructsSubject extends ActorOptimizeQueryOperation {\n public constructor(args: IActorOptimizeQueryOperationArgs) {\n super(args);\n }\n\n public async test(action: IActionOptimizeQueryOperation): Promise {\n if (action.operation.type !== Algebra.types.DESCRIBE) {\n throw new Error(`Actor ${this.name} only supports describe operations, but got ${action.operation.type}`);\n }\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n const operationOriginal: Algebra.Describe = action.operation;\n\n // Create separate construct queries for all non-variable terms\n const operations: Algebra.Construct[] = operationOriginal.terms\n .filter(term => term.termType !== 'Variable')\n .map((term: RDF.Term) => {\n // Transform each term to a separate construct operation with S ?p ?o patterns (BGP) for all terms\n const patterns: RDF.BaseQuad[] = [\n DF.quad(term, DF.variable('__predicate'), DF.variable('__object')),\n ];\n\n // eslint-disable-next-line unicorn/no-array-for-each\n patterns.forEach((templatePattern: any) => templatePattern.type = 'pattern');\n const templateOperation: Algebra.Operation = {\n type: Algebra.types.BGP,\n patterns: patterns,\n };\n\n // Create a construct query\n return {\n input: templateOperation,\n template: patterns,\n type: 'construct',\n };\n });\n\n // If we have variables in the term list,\n // create one separate construct operation to determine these variables using the input pattern.\n if (operations.length !== operationOriginal.terms.length) {\n let variablePatterns: Algebra.Pattern[] = [];\n operationOriginal.terms\n .filter(term => term.termType === 'Variable')\n // eslint-disable-next-line unicorn/no-array-for-each\n .forEach((term: RDF.Term, i: number) => {\n // Transform each term to an S ?p ?o pattern in a non-conflicting way\n const patterns: RDF.BaseQuad[] = [\n DF.quad(term, DF.variable(`__predicate${i}`), DF.variable(`__object${i}`)),\n ];\n\n // eslint-disable-next-line unicorn/no-array-for-each\n patterns.forEach((templatePattern: any) => templatePattern.type = 'pattern');\n variablePatterns = [ ...variablePatterns, ... patterns ];\n });\n\n // Add a single construct for the variables\n // This requires a join between the input pattern and our variable patterns that form a simple BGP\n operations.push({\n input: {\n type: Algebra.types.JOIN,\n input: [\n operationOriginal.input,\n { type: Algebra.types.BGP, patterns: variablePatterns },\n ],\n },\n template: variablePatterns,\n type: Algebra.types.CONSTRUCT,\n });\n }\n\n // Union the construct operations\n const operation = AF.createUnion(operations, false);\n\n return { operation, context: action.context };\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n IActorOptimizeQueryOperationArgs,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { uniqTerms } from 'rdf-terms';\nimport type { Factory } from 'sparqlalgebrajs';\nimport { Algebra, Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Filter Pushdown Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationFilterPushdown extends ActorOptimizeQueryOperation {\n public constructor(args: IActorOptimizeQueryOperationArgs) {\n super(args);\n }\n\n public async test(_action: IActionOptimizeQueryOperation): Promise {\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n // eslint-disable-next-line ts/no-this-alias\n const self = this;\n const operation = Util.mapOperation(action.operation, {\n filter(op: Algebra.Filter, factory: Factory) {\n // For all filter expressions in the operation,\n // we attempt to push them down as deep as possible into the algebra.\n const variables = self.getExpressionVariables(op.expression);\n return {\n recurse: true,\n result: self.filterPushdown(op.expression, variables, op.input, factory, action.context),\n };\n },\n });\n return { operation, context: action.context };\n }\n\n /**\n * Get all variables inside the given expression.\n * @param expression An expression.\n * @return An array of variables, or undefined if the expression is unsupported for pushdown.\n */\n public getExpressionVariables(expression: Algebra.Expression): RDF.Variable[] {\n switch (expression.expressionType) {\n case Algebra.expressionTypes.AGGREGATE:\n case Algebra.expressionTypes.WILDCARD:\n throw new Error(`Getting expression variables is not supported for ${expression.expressionType}`);\n case Algebra.expressionTypes.EXISTENCE:\n return Util.inScopeVariables(expression.input);\n case Algebra.expressionTypes.NAMED:\n return [];\n case Algebra.expressionTypes.OPERATOR:\n return uniqTerms(expression.args.flatMap(arg => this.getExpressionVariables(arg)));\n case Algebra.expressionTypes.TERM:\n if (expression.term.termType === 'Variable') {\n return [ expression.term ];\n }\n return [];\n }\n }\n\n protected getOverlappingOperations(\n operation: Algebra.Operation,\n expressionVariables: RDF.Variable[],\n ): {\n fullyOverlapping: Algebra.Operation[];\n partiallyOverlapping: Algebra.Operation[];\n notOverlapping: Algebra.Operation[];\n } {\n const fullyOverlapping: Algebra.Operation[] = [];\n const partiallyOverlapping: Algebra.Operation[] = [];\n const notOverlapping: Algebra.Operation[] = [];\n for (const input of operation.input) {\n const inputVariables = Util.inScopeVariables(input);\n if (this.variablesSubSetOf(expressionVariables, inputVariables)) {\n fullyOverlapping.push(input);\n } else if (this.variablesIntersect(expressionVariables, inputVariables)) {\n partiallyOverlapping.push(input);\n } else {\n notOverlapping.push(input);\n }\n }\n\n return {\n fullyOverlapping,\n partiallyOverlapping,\n notOverlapping,\n };\n }\n\n /**\n * Recursively push down the given expression into the given operation if possible.\n * Different operators have different semantics for choosing whether or not to push down,\n * and how this pushdown is done.\n * For every passed operator, it is checked whether or not the filter will have any effect on the operation.\n * If not, the filter is voided.\n * @param expression An expression to push down.\n * @param expressionVariables The variables inside the given expression.\n * @param operation The operation to push down into.\n * @param factory An algebra factory.\n * @param context The action context.\n * @return The modified operation.\n */\n public filterPushdown(\n expression: Algebra.Expression,\n expressionVariables: RDF.Variable[],\n operation: Algebra.Operation,\n factory: Factory,\n context: IActionContext,\n ): Algebra.Operation {\n switch (operation.type) {\n case Algebra.types.EXTEND:\n // Pass if the variable is not part of the expression\n if (!this.variablesIntersect([ operation.variable ], expressionVariables)) {\n return factory.createExtend(\n this.filterPushdown(expression, expressionVariables, operation.input, factory, context),\n operation.variable,\n operation.expression,\n );\n }\n return factory.createFilter(operation, expression);\n case Algebra.types.FILTER:\n // Always pass\n return factory.createFilter(\n this.filterPushdown(expression, expressionVariables, operation.input, factory, context),\n operation.expression,\n );\n case Algebra.types.JOIN: {\n // Don't push down for empty join\n if (operation.input.length === 0) {\n return factory.createFilter(operation, expression);\n }\n\n // Determine overlapping operations\n const {\n fullyOverlapping,\n partiallyOverlapping,\n notOverlapping,\n } = this.getOverlappingOperations(operation, expressionVariables);\n\n const joins: Algebra.Operation[] = [];\n this.logDebug(context, `Push down filter across join entries with ${fullyOverlapping.length} fully overlapping, ${partiallyOverlapping.length} partially overlapping, and ${notOverlapping.length} not overlapping`);\n if (fullyOverlapping.length > 0) {\n joins.push(factory.createJoin(fullyOverlapping\n .map(input => this.filterPushdown(expression, expressionVariables, input, factory, context))));\n }\n if (partiallyOverlapping.length > 0) {\n joins.push(factory.createFilter(factory.createJoin(partiallyOverlapping, false), expression));\n }\n if (notOverlapping.length > 0) {\n joins.push(...notOverlapping);\n }\n\n return joins.length === 1 ? joins[0] : factory.createJoin(joins);\n }\n case Algebra.types.NOP:\n return operation;\n case Algebra.types.PROJECT:\n // Push down if variables overlap\n if (this.variablesIntersect(operation.variables, expressionVariables)) {\n return factory.createProject(\n this.filterPushdown(expression, expressionVariables, operation.input, factory, context),\n operation.variables,\n );\n }\n // Void expression otherwise\n return operation;\n case Algebra.types.UNION: {\n // Determine overlapping operations\n const {\n fullyOverlapping,\n partiallyOverlapping,\n notOverlapping,\n } = this.getOverlappingOperations(operation, expressionVariables);\n\n const unions: Algebra.Operation[] = [];\n this.logDebug(context, `Push down filter across union entries with ${fullyOverlapping.length} fully overlapping, ${partiallyOverlapping.length} partially overlapping, and ${notOverlapping.length} not overlapping`);\n if (fullyOverlapping.length > 0) {\n unions.push(factory.createUnion(fullyOverlapping\n .map(input => this.filterPushdown(expression, expressionVariables, input, factory, context))));\n }\n if (partiallyOverlapping.length > 0) {\n unions.push(factory.createFilter(factory.createUnion(partiallyOverlapping, false), expression));\n }\n if (notOverlapping.length > 0) {\n unions.push(...notOverlapping);\n }\n\n return unions.length === 1 ? unions[0] : factory.createUnion(unions);\n }\n case Algebra.types.VALUES:\n // Only keep filter if it overlaps with the variables\n if (this.variablesIntersect(operation.variables, expressionVariables)) {\n return factory.createFilter(operation, expression);\n }\n return operation;\n case Algebra.types.LEFT_JOIN:\n case Algebra.types.MINUS:\n case Algebra.types.ALT:\n case Algebra.types.ASK:\n case Algebra.types.BGP:\n case Algebra.types.CONSTRUCT:\n case Algebra.types.DESCRIBE:\n case Algebra.types.DISTINCT:\n case Algebra.types.EXPRESSION:\n case Algebra.types.FROM:\n case Algebra.types.GRAPH:\n case Algebra.types.GROUP:\n case Algebra.types.INV:\n case Algebra.types.LINK:\n case Algebra.types.NPS:\n case Algebra.types.ONE_OR_MORE_PATH:\n case Algebra.types.ORDER_BY:\n case Algebra.types.PATTERN:\n case Algebra.types.REDUCED:\n case Algebra.types.SEQ:\n case Algebra.types.SERVICE:\n case Algebra.types.SLICE:\n case Algebra.types.PATH:\n case Algebra.types.ZERO_OR_MORE_PATH:\n case Algebra.types.ZERO_OR_ONE_PATH:\n case Algebra.types.COMPOSITE_UPDATE:\n case Algebra.types.DELETE_INSERT:\n case Algebra.types.LOAD:\n case Algebra.types.CLEAR:\n case Algebra.types.CREATE:\n case Algebra.types.DROP:\n case Algebra.types.ADD:\n case Algebra.types.MOVE:\n case Algebra.types.COPY:\n // Operations that do not support pushing down\n // Left-join and minus might be possible to support in the future.\n return factory.createFilter(operation, expression);\n }\n }\n\n /**\n * Check if there is an overlap between the two given lists of variables.\n * @param varsA A list of variables.\n * @param varsB A list of variables.\n */\n public variablesIntersect(varsA: RDF.Variable[], varsB: RDF.Variable[]): boolean {\n return varsA.some(varA => varsB.some(varB => varA.equals(varB)));\n }\n\n /**\n * Check if all variables from the first list are included in the second list.\n * The second list may contain other variables as well.\n * @param varsNeedles A list of variables to search for.\n * @param varsHaystack A list of variables to search in.\n */\n public variablesSubSetOf(varsNeedles: RDF.Variable[], varsHaystack: RDF.Variable[]): boolean {\n return varsNeedles.length <= varsHaystack.length &&\n varsNeedles.every(varA => varsHaystack.some(varB => varA.equals(varB)));\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n IActorOptimizeQueryOperationArgs,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQuerySourceWrapper } from '@comunica/types';\nimport { Algebra, Factory } from 'sparqlalgebrajs';\n\nconst AF = new Factory();\n\n/**\n * A comunica Group Sources Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationGroupSources extends ActorOptimizeQueryOperation {\n public constructor(args: IActorOptimizeQueryOperationArgs) {\n super(args);\n }\n\n public async test(action: IActionOptimizeQueryOperation): Promise {\n if (ActorQueryOperation.getOperationSource(action.operation)) {\n throw new Error(`Actor ${this.name} does not work with top-level operation sources.`);\n }\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n return { operation: await this.groupOperation(action.operation, action.context), context: action.context };\n }\n\n /**\n * Group operations belonging to the same source together, only if that source accepts the grouped operations.\n * This grouping will be done recursively for the whole operation tree.\n * Operations annotated with sources are considered leaves in the tree.\n * @param operation An operation to group.\n * @param context The action context.\n */\n public async groupOperation(operation: Algebra.Operation, context: IActionContext): Promise {\n // Return operation as-is if the operation already has a single source, or if the operation has no children.\n if (ActorQueryOperation.getOperationSource(operation) ?? !('input' in operation)) {\n return operation;\n }\n\n // If operation has a single input, move source annotation upwards if the source can handle it.\n if (!Array.isArray(operation.input)) {\n const groupedInput = await this.groupOperation(operation.input, context);\n if (groupedInput.metadata?.scopedSource) {\n const source: IQuerySourceWrapper = ActorQueryOperation.getOperationSource(groupedInput)!;\n if (ActorQueryOperation\n .doesShapeAcceptOperation(await source.source.getSelectorShape(context), operation)) {\n this.logDebug(context, `Hoist 1 source-specific operation into a single ${operation.type} operation for ${source.source.toString()}`);\n ActorQueryOperation.removeOperationSource(groupedInput);\n operation = ActorQueryOperation.assignOperationSource(operation, source);\n }\n }\n return { ...operation, input: groupedInput };\n }\n\n // If operation has multiple inputs, cluster source annotations.\n const inputs: Algebra.Operation[] = await Promise.all(operation.input\n .map(subInput => this.groupOperation(subInput, context)));\n const clusters = this.clusterOperationsWithEqualSources(inputs);\n\n // If we just have a single cluster, move the source annotation upwards\n if (clusters.length === 1) {\n const newInputs = clusters[0];\n const source = ActorQueryOperation.getOperationSource(clusters[0][0])!;\n return {\n ...await this.moveSourceAnnotationUpwardsIfPossible(operation, newInputs, source, context),\n input: newInputs,\n };\n }\n\n // If the number of clusters is equal to the number of original inputs, do nothing.\n if (clusters.length === inputs.length) {\n return { ...operation, input: inputs };\n }\n\n // If we have multiple clusters, created nested multi-operations\n let multiFactoryMethod: (children: Algebra.Operation[], flatten: boolean) => Algebra.Operation;\n switch (operation.type) {\n case Algebra.types.JOIN:\n multiFactoryMethod = AF.createJoin.bind(AF);\n break;\n case Algebra.types.UNION:\n multiFactoryMethod = AF.createUnion.bind(AF);\n break;\n case Algebra.types.ALT:\n multiFactoryMethod = AF.createAlt.bind(AF);\n break;\n case Algebra.types.SEQ:\n multiFactoryMethod = AF.createSeq.bind(AF);\n break;\n default:\n // While LeftJoin and Minus are also multi-operations,\n // these can never occur because they only have 2 inputs,\n // so these cases will always be captured by one of the 2 if-cases above\n // (clusters.length === 1 or clusters.length === input.length)\n\n // In all other cases, error\n throw new Error(`Unsupported operation '${operation.type}' detected while grouping sources`);\n }\n return await this.groupOperationMulti(clusters, multiFactoryMethod, context);\n }\n\n protected async groupOperationMulti(\n clusters: Algebra.Operation[][],\n factoryMethod: (children: Algebra.Operation[], flatten: boolean) => Algebra.Operation,\n context: IActionContext,\n ): Promise {\n let flatten = true;\n const nestedMerges = await Promise.all(clusters.map(async(cluster) => {\n const source = ActorQueryOperation.getOperationSource(cluster[0])!;\n const merged = await this\n .moveSourceAnnotationUpwardsIfPossible(factoryMethod(cluster, true), cluster, source, context);\n if (ActorQueryOperation.getOperationSource(merged)) {\n flatten = false;\n }\n return merged;\n }));\n return factoryMethod(nestedMerges, flatten);\n }\n\n /**\n * Cluster the given operations by equal source annotations.\n * @param operationsIn An array of operations to cluster.\n */\n public clusterOperationsWithEqualSources(operationsIn: Algebra.Operation[]): Algebra.Operation[][] {\n // Operations can have a source, or no source at all\n const sourceOperations: Map = new Map();\n const sourcelessOperations: Algebra.Operation[] = [];\n\n // Cluster by source\n for (const operation of operationsIn) {\n const source: IQuerySourceWrapper = ActorQueryOperation.getOperationSource(operation)!;\n if (source) {\n if (!sourceOperations.has(source)) {\n sourceOperations.set(source, []);\n }\n sourceOperations.get(source)!.push(operation);\n } else {\n sourcelessOperations.push(operation);\n }\n }\n\n // Return clusters\n const clusters: Algebra.Operation[][] = [];\n if (sourcelessOperations.length > 0) {\n clusters.push(sourcelessOperations);\n }\n for (const [ source, operations ] of sourceOperations.entries()) {\n clusters.push(operations\n .map(operation => ActorQueryOperation.assignOperationSource(operation, source)));\n }\n return clusters;\n }\n\n /**\n * If the given source accepts the grouped operation, annotate the grouped operation with the source,\n * and remove the source annotation from the seperate input operations.\n * Otherwise, return the grouped operation unchanged.\n * @param operation A grouped operation consisting of all given input operations.\n * @param inputs An array of operations that share the same source annotation.\n * @param source The common source.\n * @param context The action context.\n */\n public async moveSourceAnnotationUpwardsIfPossible(\n operation: O,\n inputs: Algebra.Operation[],\n source: IQuerySourceWrapper | undefined,\n context: IActionContext,\n ): Promise {\n if (source && ActorQueryOperation\n .doesShapeAcceptOperation(await source.source.getSelectorShape(context), operation)) {\n this.logDebug(context, `Hoist ${inputs.length} source-specific operations into a single ${operation.type} operation for ${source.source.toString()}`);\n operation = ActorQueryOperation.assignOperationSource(operation, source);\n for (const input of inputs) {\n ActorQueryOperation.removeOperationSource(input);\n }\n }\n return operation;\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { Algebra, Factory } from 'sparqlalgebrajs';\nimport { Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Join BGP Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationJoinBgp extends ActorOptimizeQueryOperation {\n public async test(_action: IActionOptimizeQueryOperation): Promise {\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n const operation = Util.mapOperation(action.operation, {\n join(op: Algebra.Join, factory: Factory) {\n if (op.input.every(subInput => subInput.type === 'bgp')) {\n return {\n recurse: false,\n result: factory.createBgp(op.input.flatMap(subInput => subInput.patterns)),\n };\n }\n return {\n recurse: false,\n result: op,\n };\n },\n });\n return { operation, context: action.context };\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { Algebra, Factory } from 'sparqlalgebrajs';\nimport { Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Join Connected Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationJoinConnected extends ActorOptimizeQueryOperation {\n public async test(_action: IActionOptimizeQueryOperation): Promise {\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n const operation = Util.mapOperation(action.operation, {\n join(op: Algebra.Join, factory: Factory) {\n return {\n recurse: false,\n result: ActorOptimizeQueryOperationJoinConnected.cluster(op, factory),\n };\n },\n });\n return { operation, context: action.context };\n }\n\n /**\n * Iteratively cluster join entries based on their overlapping variables.\n * @param op A join operation.\n * @param factory An algebra factory.\n */\n public static cluster(op: Algebra.Join, factory: Factory): Algebra.Join {\n // Initialize each entry to be in a separate cluster\n const initialClusters: IJoinCluster[] = op.input.map(subOp => ({\n inScopeVariables: Object.fromEntries(Util.inScopeVariables(subOp).map(variable => [ variable.value, true ])),\n entries: [ subOp ],\n }));\n\n // Iteratively merge clusters until they don't change anymore\n let oldClusters: IJoinCluster[];\n let newClusters: IJoinCluster[] = initialClusters;\n do {\n oldClusters = newClusters;\n newClusters = ActorOptimizeQueryOperationJoinConnected.clusterIteration(oldClusters);\n } while (oldClusters.length !== newClusters.length);\n\n // Create new join operation of latest clusters\n const subJoins = newClusters.map(cluster => factory.createJoin(cluster.entries));\n return subJoins.length === 1 ? subJoins[0] : factory.createJoin(subJoins, false);\n }\n\n /**\n * Perform a single clustering iteration.\n * Clusters will be joined if they have overlapping variables.\n * @param oldCluster\n */\n public static clusterIteration(oldCluster: IJoinCluster[]): IJoinCluster[] {\n const newClusters: IJoinCluster[] = [];\n\n for (const entry of oldCluster) {\n // Try to add entry to a join cluster\n let joined = false;\n for (const newEntry of newClusters) {\n if (ActorOptimizeQueryOperationJoinConnected\n .haveOverlappingVariables(entry.inScopeVariables, newEntry.inScopeVariables)) {\n newEntry.entries = [ ...newEntry.entries, ...entry.entries ];\n newEntry.inScopeVariables = { ...newEntry.inScopeVariables, ...entry.inScopeVariables };\n joined = true;\n break;\n }\n }\n\n // If none was found, create new cluster\n if (!joined) {\n newClusters.push({\n inScopeVariables: entry.inScopeVariables,\n entries: entry.entries,\n });\n }\n }\n\n return newClusters;\n }\n\n /**\n * Check if the two given variable objects are overlapping.\n * @param variablesA A variables objects.\n * @param variablesB A variables objects.\n */\n public static haveOverlappingVariables(\n variablesA: Record,\n variablesB: Record,\n ): boolean {\n for (const variableA of Object.keys(variablesA)) {\n if (variablesB[variableA]) {\n return true;\n }\n }\n return false;\n }\n}\n\n/**\n * A cluster of join entries.\n */\nexport interface IJoinCluster {\n /**\n * Union of all variables in scope within the join entries.\n */\n inScopeVariables: Record;\n /**\n * Join entries\n */\n entries: Algebra.Operation[];\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n IActorOptimizeQueryOperationArgs,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport { KeysQuerySourceIdentify } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQuerySourceWrapper, MetadataBindings } from '@comunica/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport { Algebra, Factory, Util } from 'sparqlalgebrajs';\n\nconst AF = new Factory();\nconst DF = new DataFactory();\n\n/**\n * A comunica Prune Empty Source Operations Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationPruneEmptySourceOperations extends ActorOptimizeQueryOperation {\n private readonly useAskIfSupported: boolean;\n\n public constructor(args: IActorOptimizeQueryOperationPruneEmptySourceOperationsArgs) {\n super(args);\n }\n\n public async test(action: IActionOptimizeQueryOperation): Promise {\n if (ActorQueryOperation.getOperationSource(action.operation)) {\n throw new Error(`Actor ${this.name} does not work with top-level operation sources.`);\n }\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n let operation = action.operation;\n\n // Collect all operations with source types\n // Only consider unions of patterns or alts of links, since these are created during exhaustive source assignment.\n const collectedOperations: (Algebra.Pattern | Algebra.Link)[] = [];\n // eslint-disable-next-line ts/no-this-alias\n const self = this;\n Util.recurseOperation(operation, {\n [Algebra.types.UNION](subOperation) {\n self.collectMultiOperationInputs(subOperation.input, collectedOperations, Algebra.types.PATTERN);\n return true;\n },\n [Algebra.types.ALT](subOperation) {\n self.collectMultiOperationInputs(subOperation.input, collectedOperations, Algebra.types.LINK);\n return false;\n },\n [Algebra.types.SERVICE]() {\n return false;\n },\n });\n\n // Determine in an async manner whether or not these sources return non-empty results\n const emptyOperations: Set = new Set();\n await Promise.all(collectedOperations.map(async(collectedOperation) => {\n const checkOperation = collectedOperation.type === 'link' ?\n AF.createPattern(DF.variable('?s'), collectedOperation.iri, DF.variable('?o')) :\n collectedOperation;\n if (!await this.hasSourceResults(\n ActorQueryOperation.getOperationSource(collectedOperation)!,\n checkOperation,\n action.context,\n )) {\n emptyOperations.add(collectedOperation);\n }\n }));\n\n // Only perform next mapping if we have at least one empty operation\n if (emptyOperations.size > 0) {\n this.logDebug(action.context, `Pruning ${emptyOperations.size} source-specific operations`);\n // Rewrite operations by removing the empty children\n operation = Util.mapOperation(operation, {\n [Algebra.types.UNION](subOperation, factory) {\n return self.mapMultiOperation(subOperation, emptyOperations, children => factory.createUnion(children));\n },\n [Algebra.types.ALT](subOperation, factory) {\n return self.mapMultiOperation(subOperation, emptyOperations, children => factory.createAlt(children));\n },\n });\n\n // Identify and remove projections that have become empty now due to missing variables\n operation = Util.mapOperation(operation, {\n [Algebra.types.PROJECT](subOperation, factory) {\n let emptyProject = false;\n Util.recurseOperation(subOperation, {\n [Algebra.types.UNION](subSubOperation) {\n if (subSubOperation.input.length === 0) {\n emptyProject = true;\n }\n return true;\n },\n [Algebra.types.ALT](subSubOperation) {\n if (subSubOperation.input.length === 0) {\n emptyProject = true;\n }\n return true;\n },\n });\n\n if (emptyProject) {\n return {\n recurse: false,\n result: factory.createUnion([]),\n };\n }\n return {\n recurse: true,\n result: subOperation,\n };\n },\n });\n }\n\n return { operation, context: action.context };\n }\n\n protected collectMultiOperationInputs(\n inputs: Algebra.Operation[],\n collectedOperations: (Algebra.Pattern | Algebra.Link)[],\n inputType: (Algebra.Pattern | Algebra.Link)['type'],\n ): void {\n for (const input of inputs) {\n if (ActorQueryOperation.getOperationSource(input) && input.type === inputType) {\n collectedOperations.push(input);\n }\n }\n }\n\n protected mapMultiOperation(\n operation: O,\n emptyOperations: Set,\n multiOperationFactory: (input: O['input']) => Algebra.Operation,\n ): {\n result: Algebra.Operation;\n recurse: boolean;\n } {\n // Determine which operations return non-empty results\n const nonEmptyInputs = operation.input.filter(input => !emptyOperations.has(input));\n\n // Remove empty operations\n if (nonEmptyInputs.length === operation.input.length) {\n return { result: operation, recurse: true };\n }\n if (nonEmptyInputs.length === 0) {\n return { result: multiOperationFactory([]), recurse: false };\n }\n if (nonEmptyInputs.length === 1) {\n return { result: nonEmptyInputs[0], recurse: true };\n }\n return { result: multiOperationFactory(nonEmptyInputs), recurse: true };\n }\n\n /**\n * Check if the given query operation will produce at least one result in the given source.\n * @param source A query source.\n * @param input A query operation.\n * @param context The query context.\n */\n public async hasSourceResults(\n source: IQuerySourceWrapper,\n input: Algebra.Operation,\n context: IActionContext,\n ): Promise {\n // Traversal sources should never be considered empty at optimization time.\n if (source.context?.get(KeysQuerySourceIdentify.traverse)) {\n return true;\n }\n\n // Send an ASK query\n if (this.useAskIfSupported) {\n const askOperation = AF.createAsk(input);\n if (ActorQueryOperation\n .doesShapeAcceptOperation(await source.source.getSelectorShape(context), askOperation)) {\n return source.source.queryBoolean(askOperation, context);\n }\n }\n\n // Send the operation as-is and check the response cardinality\n const bindingsStream = source.source.queryBindings(input, context);\n return new Promise((resolve, reject) => {\n bindingsStream.on('error', reject);\n bindingsStream.getProperty('metadata', (metadata: MetadataBindings) => {\n bindingsStream.destroy();\n resolve(metadata.cardinality.value > 0);\n });\n });\n }\n}\n\nexport interface IActorOptimizeQueryOperationPruneEmptySourceOperationsArgs extends IActorOptimizeQueryOperationArgs {\n /**\n * If true, ASK queries will be sent to the source instead of COUNT queries to check emptiness for patterns.\n * This will only be done for sources that accept ASK queries.\n * @default {false}\n */\n useAskIfSupported: boolean;\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n IActorOptimizeQueryOperationArgs,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type * as RDF from '@rdfjs/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport { Algebra, Util } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\n\n/**\n * A comunica Rewrite Add Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationRewriteAdd extends ActorOptimizeQueryOperation {\n public constructor(args: IActorOptimizeQueryOperationArgs) {\n super(args);\n }\n\n public async test(_action: IActionOptimizeQueryOperation): Promise {\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n const operation = Util.mapOperation(action.operation, {\n [Algebra.types.ADD](operationOriginal, factory) {\n // CONSTRUCT all quads from the source, and INSERT them into the destination\n const destination = operationOriginal.destination === 'DEFAULT' ?\n DF.defaultGraph() :\n operationOriginal.destination;\n const source = operationOriginal.source === 'DEFAULT' ? DF.defaultGraph() : operationOriginal.source;\n\n const result = factory.createDeleteInsert(undefined, [\n factory.createPattern(DF.variable('s'), DF.variable('p'), DF.variable('o'), destination),\n ], factory.createPattern(DF.variable('s'), DF.variable('p'), DF.variable('o'), source));\n\n return {\n result,\n recurse: false,\n };\n },\n });\n\n return { operation, context: action.context };\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n IActorOptimizeQueryOperationArgs,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport { Algebra, Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Rewrite Copy Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationRewriteCopy extends ActorOptimizeQueryOperation {\n public constructor(args: IActorOptimizeQueryOperationArgs) {\n super(args);\n }\n\n public async test(_action: IActionOptimizeQueryOperation): Promise {\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n const operation = Util.mapOperation(action.operation, {\n [Algebra.types.COPY](operationOriginal, factory) {\n // No-op if source === destination\n let result: Algebra.CompositeUpdate;\n if ((typeof operationOriginal.destination === 'string' && typeof operationOriginal.source === 'string' &&\n operationOriginal.destination === operationOriginal.source) ||\n (typeof operationOriginal.destination !== 'string' && typeof operationOriginal.source !== 'string' &&\n operationOriginal.destination.equals(operationOriginal.source))) {\n result = factory.createCompositeUpdate([]);\n } else {\n // COPY is equivalent to drop destination, and add\n result = factory.createCompositeUpdate([\n factory.createDrop(operationOriginal.destination, true),\n factory.createAdd(operationOriginal.source, operationOriginal.destination, operationOriginal.silent),\n ]);\n }\n\n return {\n result,\n recurse: false,\n };\n },\n });\n\n return { operation, context: action.context };\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n IActorOptimizeQueryOperationArgs,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport { Algebra, Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Rewrite Move Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationRewriteMove extends ActorOptimizeQueryOperation {\n public constructor(args: IActorOptimizeQueryOperationArgs) {\n super(args);\n }\n\n public async test(_action: IActionOptimizeQueryOperation): Promise {\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n const operation = Util.mapOperation(action.operation, {\n [Algebra.types.MOVE](operationOriginal, factory) {\n // No-op if source === destination\n let result: Algebra.CompositeUpdate;\n if ((typeof operationOriginal.destination === 'string' && typeof operationOriginal.source === 'string' &&\n operationOriginal.destination === operationOriginal.source) ||\n (typeof operationOriginal.destination !== 'string' && typeof operationOriginal.source !== 'string' &&\n operationOriginal.destination.equals(operationOriginal.source))) {\n result = factory.createCompositeUpdate([]);\n } else {\n // MOVE is equivalent to drop destination, add, and drop source\n const updates = [\n factory.createDrop(operationOriginal.destination, true),\n factory.createAdd(operationOriginal.source, operationOriginal.destination, operationOriginal.silent),\n factory.createDrop(operationOriginal.source),\n ];\n result = factory.createCompositeUpdate(updates);\n }\n\n return {\n result,\n recurse: false,\n };\n },\n });\n\n return { operation, context: action.context };\n }\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type {\n IActionContext,\n IQueryOperationResult,\n IQueryOperationResultBindings,\n} from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Ask Query Operation Actor.\n */\nexport class ActorQueryOperationAsk extends ActorQueryOperationTypedMediated {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, 'ask');\n }\n\n public async testOperation(_operation: Algebra.Ask, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Ask, context: IActionContext): Promise {\n // Call other query operations like this:\n const output: IQueryOperationResult = await this.mediatorQueryOperation.mediate(\n { operation: operation.input, context },\n );\n const { bindingsStream }: IQueryOperationResultBindings = ActorQueryOperation.getSafeBindings(output);\n return { type: 'boolean', execute: async() => (await bindingsStream.take(1).toArray()).length === 1 };\n }\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport { Factory } from 'sparqlalgebrajs';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation) actor\n * that handles SPARQL BGP operations by rewriting it as a join operator.\n */\nexport class ActorQueryOperationBgpJoin extends ActorQueryOperationTypedMediated {\n public static readonly FACTORY = new Factory();\n\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, 'bgp');\n }\n\n public async testOperation(_operation: Algebra.Bgp, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Bgp, context: IActionContext):\n Promise {\n return this.mediatorQueryOperation.mediate({\n operation: ActorQueryOperationBgpJoin.FACTORY.createJoin(operation.patterns),\n context,\n });\n }\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type {\n IQueryOperationResultBindings,\n IActionContext,\n IQueryOperationResult,\n MetadataQuads,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { getTermsNested, getVariables, uniqTerms } from 'rdf-terms';\nimport { Algebra } from 'sparqlalgebrajs';\nimport { BindingsToQuadsIterator } from './BindingsToQuadsIterator';\n\n/**\n * A comunica Construct Query Operation Actor.\n */\nexport class ActorQueryOperationConstruct extends ActorQueryOperationTypedMediated {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, 'construct');\n }\n\n /**\n * Find all variables in a list of triple patterns.\n * @param {Algebra.Pattern[]} patterns An array of triple patterns.\n * @return {RDF.Variable[]} The variables in the triple patterns.\n */\n public static getVariables(patterns: RDF.BaseQuad[]): RDF.Variable[] {\n return uniqTerms(( []).concat\n .apply([], patterns.map(pattern => getVariables(getTermsNested(pattern)))));\n }\n\n public async testOperation(_operation: Algebra.Construct, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operationOriginal: Algebra.Construct, context: IActionContext):\n Promise {\n // Apply a projection on our CONSTRUCT variables first, as the query may contain other variables as well.\n const variables: RDF.Variable[] = ActorQueryOperationConstruct.getVariables(operationOriginal.template);\n const operation: Algebra.Operation = { type: Algebra.types.PROJECT, input: operationOriginal.input, variables };\n\n // Evaluate the input query\n const output: IQueryOperationResultBindings = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ operation, context }),\n );\n\n // Construct triples using the result based on the pattern.\n // If it's a DESCRIBE query don't apply the blank node localisation.\n const quadStream: AsyncIterator = new BindingsToQuadsIterator(\n operationOriginal.template,\n output.bindingsStream,\n );\n\n // Let the final metadata contain the estimated number of triples\n const metadata: (() => Promise) = () => output.metadata().then(meta => ({\n ...meta,\n order: undefined,\n cardinality: {\n type: meta.cardinality.type,\n value: meta.cardinality.value * operationOriginal.template.length,\n },\n canContainUndefs: false,\n availableOrders: undefined,\n }));\n\n return {\n metadata,\n quadStream,\n type: 'quads',\n };\n }\n}\n","import type { Bindings, BindingsStream } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { ArrayIterator, MultiTransformIterator } from 'asynciterator';\nimport { DataFactory } from 'rdf-data-factory';\nimport { mapTermsNested } from 'rdf-terms';\n\nconst DF = new DataFactory();\n\n/**\n * Transforms a bindings stream into a quad stream given a quad template.\n *\n * This conforms to the SPARQL 1.1 spec on constructing triples:\n * https://www.w3.org/TR/sparql11-query/#rConstructTriples\n */\nexport class BindingsToQuadsIterator extends MultiTransformIterator {\n protected readonly template: RDF.BaseQuad[];\n protected blankNodeCounter: number;\n\n public constructor(template: RDF.BaseQuad[], bindingsStream: BindingsStream) {\n super(bindingsStream, { autoStart: false });\n this.template = template;\n this.blankNodeCounter = 0;\n }\n\n /**\n * Bind the given term.\n * If the term is a variable and the variable is bound in the bindings object,\n * return the bindings value.\n * If the term is a variable and the variable is not bound in the bindings object,\n * a falsy value is returned..\n * Otherwise, the term itself is returned.\n * @param {Bindings} bindings A bindings object.\n * @param {RDF.Term} term An RDF term.\n * @return {RDF.Term} If the given term is not a variable, the term itself is returned.\n * If the given term is a variable, then the bound term is returned,\n * or a falsy value if it did not exist in the bindings.\n */\n public static bindTerm(bindings: Bindings, term: RDF.Term): RDF.Term | undefined {\n if (term.termType === 'Variable') {\n return bindings.get(term);\n }\n return term;\n }\n\n /**\n * Bind the given quad pattern.\n * If one of the terms was a variable AND is not bound in the bindings,\n * a falsy value will be returned.\n * @param {Bindings} bindings A bindings object.\n * @param {RDF.Quad} pattern An RDF quad.\n * @return {RDF.Quad} A bound RDF quad or undefined.\n */\n public static bindQuad(bindings: Bindings, pattern: RDF.BaseQuad): RDF.Quad | undefined {\n try {\n return mapTermsNested( pattern, (term) => {\n const boundTerm = BindingsToQuadsIterator.bindTerm(bindings, term);\n if (!boundTerm) {\n throw new Error('Unbound term');\n }\n return boundTerm;\n });\n } catch {\n // Do nothing\n }\n }\n\n /**\n * Convert a blank node to a unique blank node in the given context.\n * If the given term is not a blank node, the term itself will be returned.\n * @param blankNodeCounter A counter value for the blank node.\n * @param {RDF.Term} term The term that should be localized.\n * @return {RDF.Term} A term.\n */\n public static localizeBlankNode(blankNodeCounter: number, term: RDF.Term): RDF.Term {\n if (term.termType === 'BlankNode') {\n return DF.blankNode(`${term.value}${blankNodeCounter}`);\n }\n return term;\n }\n\n /**\n * Convert the given quad to a quad that only contains unique blank nodes.\n * @param blankNodeCounter A counter value for the blank node.\n * @param {RDF.BaseQuad} pattern The pattern that should be localized.\n * @return {RDF.BaseQuad} A quad.\n */\n public static localizeQuad(blankNodeCounter: number, pattern: RDF.BaseQuad): RDF.BaseQuad {\n return mapTermsNested(pattern, term => BindingsToQuadsIterator.localizeBlankNode(blankNodeCounter, term));\n }\n\n /**\n * Convert the given template to a list of quads based on the given bindings.\n * @param {Bindings} bindings A bindings object.\n * @param {RDF.Quad[]} template A list of quad patterns.\n * @param blankNodeCounter A counter value for the blank node.\n * @return {RDF.Quad[]} A list of quads.\n */\n public bindTemplate(bindings: Bindings, template: RDF.BaseQuad[], blankNodeCounter: number): RDF.Quad[] {\n const quads: RDF.BaseQuad[] = template\n // Make sure the multiple instantiations of the template contain different blank nodes, as required by SPARQL 1.1.\n .map(BindingsToQuadsIterator.localizeQuad.bind(null, blankNodeCounter))\n // Bind variables to bound terms\n .map(x => BindingsToQuadsIterator.bindQuad.bind(null, bindings)(x))\n // Remove quads that contained unbound terms, i.e., variables.\n .filter(Boolean);\n return quads;\n }\n\n public override _createTransformer(bindings: Bindings): AsyncIterator {\n return new ArrayIterator(this.bindTemplate(\n bindings,\n this.template,\n this.blankNodeCounter++,\n ), { autoStart: false });\n }\n}\n","import type { MediatorHashBindings } from '@comunica/bus-hash-bindings';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type {\n Bindings,\n BindingsStream,\n IActionContext,\n IQueryOperationResult,\n IQueryOperationResultBindings,\n} from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Distinct Hash Query Operation Actor.\n */\nexport class ActorQueryOperationDistinctHash extends ActorQueryOperationTypedMediated {\n public readonly mediatorHashBindings: MediatorHashBindings;\n\n public constructor(args: IActorQueryOperationDistinctHashArgs) {\n super(args, 'distinct');\n }\n\n public async testOperation(_operation: Algebra.Distinct, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Distinct, context: IActionContext): Promise {\n const output: IQueryOperationResultBindings = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ operation: operation.input, context }),\n );\n const bindingsStream: BindingsStream = output.bindingsStream.filter(await this.newHashFilter(context));\n return {\n type: 'bindings',\n bindingsStream,\n metadata: output.metadata,\n };\n }\n\n /**\n * Create a new distinct filter function.\n * This will maintain an internal hash datastructure so that every bindings object only returns true once.\n * @param context The action context.\n * @return {(bindings: Bindings) => boolean} A distinct filter for bindings.\n */\n public async newHashFilter(context: IActionContext): Promise<(bindings: Bindings) => boolean> {\n const { hashFunction } = await this.mediatorHashBindings.mediate({ allowHashCollisions: true, context });\n const hashes: Record = {};\n return (bindings: Bindings) => {\n const hash: string = hashFunction(bindings);\n\n return !(hash in hashes) && (hashes[hash] = true);\n };\n }\n}\n\nexport interface IActorQueryOperationDistinctHashArgs extends IActorQueryOperationTypedMediatedArgs {\n mediatorHashBindings: MediatorHashBindings;\n}\n","import { BindingsFactory, bindingsToString } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { ExpressionError } from '@comunica/expression-evaluator';\nimport { AsyncEvaluator, isExpressionError } from '@comunica/expression-evaluator';\nimport type { Bindings, IActionContext, IQueryOperationResult, IQueryOperationResultBindings } from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Extend Query Operation Actor.\n *\n * See https://www.w3.org/TR/sparql11-query/#sparqlAlgebra;\n */\nexport class ActorQueryOperationExtend extends ActorQueryOperationTypedMediated {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationExtendArgs) {\n super(args, 'extend');\n }\n\n public async testOperation(operation: Algebra.Extend, context: IActionContext): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n // Will throw error for unsupported opperations\n const _ = Boolean(new AsyncEvaluator(\n operation.expression,\n ActorQueryOperation.getAsyncExpressionContext(context, this.mediatorQueryOperation, bindingsFactory),\n ));\n return true;\n }\n\n public async runOperation(operation: Algebra.Extend, context: IActionContext):\n Promise {\n const { expression, input, variable } = operation;\n\n const output: IQueryOperationResultBindings = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ operation: input, context }),\n );\n\n // Throw if the variable has already been bound\n if ((await output.metadata()).variables.some(innerVariable => innerVariable.equals(variable))) {\n throw new Error(`Illegal binding to variable '${variable.value}' that has already been bound`);\n }\n\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n const config = { ...ActorQueryOperation.getAsyncExpressionContext(\n context,\n this.mediatorQueryOperation,\n bindingsFactory,\n ) };\n const evaluator = new AsyncEvaluator(expression, config);\n\n // Transform the stream by extending each Bindings with the expression result\n const transform = async(bindings: Bindings, next: any, push: (pusbBindings: Bindings) => void): Promise => {\n try {\n const result = await evaluator.evaluate(bindings);\n // Extend operation is undefined when the key already exists\n // We just override it here.\n const extended = bindings.set(variable, result);\n push(extended);\n } catch (error: unknown) {\n if (isExpressionError( error)) {\n // Errors silently don't actually extend according to the spec\n push(bindings);\n // But let's warn anyway\n this.logWarn(context, `Expression error for extend operation (${( error).message})` +\n `with bindings '${bindingsToString(bindings)}'`);\n } else {\n bindingsStream.emit('error', error);\n }\n }\n next();\n };\n\n // eslint-disable-next-line ts/no-misused-promises\n const bindingsStream = output.bindingsStream.transform({ autoStart: false, transform });\n return {\n type: 'bindings',\n bindingsStream,\n async metadata() {\n const outputMetadata = await output.metadata();\n return { ...outputMetadata, variables: [ ...outputMetadata.variables, variable ]};\n },\n };\n }\n}\n\nexport interface IActorQueryOperationExtendArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import { BindingsFactory, bindingsToString } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport { AsyncEvaluator, isExpressionError } from '@comunica/expression-evaluator';\nimport type { Bindings, IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Filter Sparqlee Query Operation Actor.\n */\nexport class ActorQueryOperationFilter extends ActorQueryOperationTypedMediated {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationFilterSparqleeArgs) {\n super(args, 'filter');\n }\n\n public async testOperation(operation: Algebra.Filter, context: IActionContext): Promise {\n // Will throw error for unsupported operators\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n const config = { ...ActorQueryOperation.getAsyncExpressionContext(\n context,\n this.mediatorQueryOperation,\n bindingsFactory,\n ) };\n const _ = new AsyncEvaluator(operation.expression, config);\n return true;\n }\n\n public async runOperation(operation: Algebra.Filter, context: IActionContext):\n Promise {\n const outputRaw = await this.mediatorQueryOperation.mediate({ operation: operation.input, context });\n const output = ActorQueryOperation.getSafeBindings(outputRaw);\n ActorQueryOperation.validateQueryOutput(output, 'bindings');\n\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n const config = { ...ActorQueryOperation.getAsyncExpressionContext(\n context,\n this.mediatorQueryOperation,\n bindingsFactory,\n ) };\n const evaluator = new AsyncEvaluator(operation.expression, config);\n\n const transform = async(item: Bindings, next: any, push: (bindings: Bindings) => void): Promise => {\n try {\n const result = await evaluator.evaluateAsEBV(item);\n if (result) {\n push(item);\n }\n } catch (error: unknown) {\n // We ignore all Expression errors.\n // Other errors (likely programming mistakes) are still propagated.\n //\n // > Specifically, FILTERs eliminate any solutions that,\n // > when substituted into the expression, either result in\n // > an effective boolean value of false or produce an error.\n // > ...\n // > These errors have no effect outside of FILTER evaluation.\n // https://www.w3.org/TR/sparql11-query/#expressions\n if (isExpressionError( error)) {\n // In many cases, this is a user error, where the user should manually cast the variable to a string.\n // In order to help users debug this, we should report these errors via the logger as warnings.\n this.logWarn(context, 'Error occurred while filtering.', () => ({ error, bindings: bindingsToString(item) }));\n } else {\n bindingsStream.emit('error', error);\n }\n }\n next();\n };\n\n // eslint-disable-next-line ts/no-misused-promises\n const bindingsStream = output.bindingsStream.transform({ transform, autoStart: false });\n return { type: 'bindings', bindingsStream, metadata: output.metadata };\n }\n}\n\nexport interface IActorQueryOperationFilterSparqleeArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { Algebra, Factory } from 'sparqlalgebrajs';\n\n/**\n * A comunica From Query Operation Actor.\n */\nexport class ActorQueryOperationFromQuad extends ActorQueryOperationTypedMediated {\n private static readonly FACTORY: Factory = new Factory();\n private static readonly ALGEBRA_TYPES: string[] = Object.keys(Algebra.types).map(key => ( Algebra.types)[key]);\n\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, 'from');\n }\n\n /**\n * Create a deep copy of the given operation.\n * @param {Operation} operation An operation.\n * @param {(subOperation: Operation) => Operation} recursiveCb A callback for recursive operation calls.\n * @return {Operation} The copied operation.\n */\n public static copyOperation(\n operation: Algebra.Operation,\n recursiveCb: (subOperation: Algebra.Operation) => Algebra.Operation,\n ): Algebra.Operation {\n const copiedOperation: Algebra.Operation = {};\n for (const key of Object.keys(operation)) {\n if (Array.isArray(operation[key]) && key !== 'template') {\n // We exclude the 'template' entry, as we don't want to modify the template value of construct operations\n if (key === 'variables') {\n copiedOperation[key] = operation[key];\n } else {\n copiedOperation[key] = operation[key].map(recursiveCb);\n }\n } else if (ActorQueryOperationFromQuad.ALGEBRA_TYPES.includes(operation[key].type)) {\n copiedOperation[key] = recursiveCb(operation[key]);\n } else {\n copiedOperation[key] = operation[key];\n }\n }\n return copiedOperation;\n }\n\n /**\n * Recursively transform the given operation to use the given graphs as default graph\n * This will (possibly) create a new operation and not modify the given operation.\n * @param {Operation} operation An operation.\n * @param {RDF.Term[]} defaultGraphs Graph terms.\n * @return {Operation} A new operation.\n */\n public static applyOperationDefaultGraph(operation: Algebra.Operation, defaultGraphs: RDF.Term[]): Algebra.Operation {\n // If the operation is a BGP or Path, change the graph.\n if ((operation.type === 'bgp' && operation.patterns.length > 0) ||\n operation.type === 'path' ||\n operation.type === 'pattern') {\n if (operation.type === 'bgp') {\n return ActorQueryOperationFromQuad.joinOperations(operation.patterns.map((pattern: Algebra.Pattern) => {\n if (pattern.graph.termType !== 'DefaultGraph') {\n return ActorQueryOperationFromQuad.FACTORY.createBgp([ pattern ]);\n }\n const bgps = defaultGraphs.map((graph: RDF.Term) =>\n ActorQueryOperationFromQuad.FACTORY.createBgp([ Object.assign(\n ActorQueryOperationFromQuad.FACTORY\n .createPattern(pattern.subject, pattern.predicate, pattern.object, graph),\n { metadata: pattern.metadata },\n ) ]));\n return ActorQueryOperationFromQuad.unionOperations(bgps);\n }));\n }\n if (operation.graph.termType !== 'DefaultGraph') {\n return operation;\n }\n const paths = defaultGraphs.map(\n (graph: RDF.Term) => {\n if (operation.type === 'path') {\n return ActorQueryOperationFromQuad.FACTORY\n .createPath(operation.subject, operation.predicate, operation.object, graph);\n }\n return Object.assign(ActorQueryOperationFromQuad.FACTORY\n .createPattern(\n operation.subject,\n operation.predicate,\n operation.object,\n graph,\n ), { metadata: operation.metadata });\n },\n );\n return ActorQueryOperationFromQuad.unionOperations(paths);\n }\n\n return ActorQueryOperationFromQuad.copyOperation(\n operation,\n (subOperation: Algebra.Operation) => this.applyOperationDefaultGraph(subOperation, defaultGraphs),\n );\n }\n\n /**\n * Recursively transform the given operation to use the given graphs as named graph\n * This will (possibly) create a new operation and not modify the given operation.\n * @param {Operation} operation An operation.\n * @param {RDF.Term[]} namedGraphs Graph terms.\n * @param {RDF.Term[]} defaultGraphs Default graph terms.\n * @return {Operation} A new operation.\n */\n public static applyOperationNamedGraph(\n operation: Algebra.Operation,\n namedGraphs: RDF.NamedNode[],\n defaultGraphs: RDF.Term[],\n ): Algebra.Operation {\n // If the operation is a BGP or Path, change the graph.\n if ((operation.type === 'bgp' && operation.patterns.length > 0) ||\n operation.type === 'path' ||\n operation.type === 'pattern') {\n const patternGraph: RDF.Term = operation.type === 'bgp' ? operation.patterns[0].graph : operation.graph;\n if (patternGraph.termType === 'DefaultGraph') {\n // SPARQL spec (8.2) describes that when FROM NAMED's are used without a FROM, the default graph must be empty.\n // The FROMs are transformed before this step to a named node, so this will not apply to this case anymore.\n return { type: Algebra.types.BGP, patterns: []};\n }\n if (patternGraph.termType === 'Variable') {\n if (namedGraphs.length === 1) {\n const graph: RDF.NamedNode = namedGraphs[0];\n // If the pattern graph is a variable, replace the graph and bind the variable using VALUES\n const bindings: Record = {};\n bindings[`?${patternGraph.value}`] = graph;\n const values: Algebra.Values = ActorQueryOperationFromQuad.FACTORY\n .createValues([ patternGraph ], [ bindings ]);\n\n let pattern: Algebra.Operation;\n if (operation.type === 'bgp') {\n pattern = ActorQueryOperationFromQuad.FACTORY\n .createBgp(operation.patterns.map((pat: Algebra.Pattern) => ActorQueryOperationFromQuad.FACTORY\n .createPattern(pat.subject, pat.predicate, pat.object, graph)));\n } else if (operation.type === 'path') {\n pattern = ActorQueryOperationFromQuad.FACTORY\n .createPath(operation.subject, operation.predicate, operation.object, graph);\n } else {\n pattern = ActorQueryOperationFromQuad.FACTORY\n .createPattern(operation.subject, operation.predicate, operation.object, graph);\n }\n\n return ActorQueryOperationFromQuad.FACTORY.createJoin([ values, pattern ]);\n }\n // If the pattern graph is a variable, take the union of the pattern applied to each available named graph\n return ActorQueryOperationFromQuad.unionOperations(namedGraphs.map(\n (graph: RDF.NamedNode) => ActorQueryOperationFromQuad.applyOperationNamedGraph(\n operation,\n [ graph ],\n defaultGraphs,\n ),\n ));\n }\n // The pattern's graph is defined (including the default graphs)\n const isNamedGraphAvailable: boolean = [ ...namedGraphs, ...defaultGraphs ].some(\n (namedGraph: RDF.Term) => namedGraph.equals(patternGraph),\n );\n if (isNamedGraphAvailable) {\n // Return the pattern as-is if the pattern's graph was selected in a FROM NAMED\n return operation;\n }\n // No-op if the pattern's graph was not selected in a FROM NAMED.\n return { type: Algebra.types.BGP, patterns: []};\n }\n\n return ActorQueryOperationFromQuad.copyOperation(\n operation,\n (subOperation: Algebra.Operation) => this.applyOperationNamedGraph(subOperation, namedGraphs, defaultGraphs),\n );\n }\n\n /**\n * Transform the given array of operations into a join operation.\n * @param {Operation[]} operations An array of operations, must contain at least one operation.\n * @return {Join} A join operation.\n */\n public static joinOperations(operations: Algebra.Operation[]): Algebra.Operation {\n if (operations.length === 1) {\n return operations[0];\n }\n if (operations.length > 1) {\n return ActorQueryOperationFromQuad.FACTORY.createJoin(operations);\n }\n throw new Error('A join can only be applied on at least one operation');\n }\n\n /**\n * Transform the given array of operations into a union operation.\n * @param {Operation[]} operations An array of operations, must contain at least one operation.\n * @return {Union} A union operation.\n */\n public static unionOperations(operations: Algebra.Operation[]): Algebra.Operation {\n if (operations.length === 1) {\n return operations[0];\n }\n if (operations.length > 1) {\n return ActorQueryOperationFromQuad.FACTORY.createUnion(operations);\n }\n throw new Error('A union can only be applied on at least one operation');\n }\n\n /**\n * Transform an operation based on the default and named graphs in the pattern.\n *\n * FROM sets the default graph.\n * If multiple are available, take the union of the operation for all of them at quad-pattern level.\n *\n * FROM NAMED indicates which named graphs are available.\n * This will rewrite the query so that only triples from the given named graphs can be selected.\n *\n * @param {From} pattern A from operation.\n * @return {Operation} The transformed operation.\n */\n public static createOperation(pattern: Algebra.From): Algebra.Operation {\n let operation: Algebra.Operation = pattern.input;\n if (pattern.default.length > 0) {\n operation = ActorQueryOperationFromQuad.applyOperationDefaultGraph(operation, pattern.default);\n }\n if (pattern.named.length > 0 || pattern.default.length > 0) {\n operation = ActorQueryOperationFromQuad.applyOperationNamedGraph(operation, pattern.named, pattern.default);\n }\n return operation;\n }\n\n public async testOperation(_operation: Algebra.From, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(\n operationOriginal: Algebra.From,\n context: IActionContext,\n ): Promise {\n const operation: Algebra.Operation = ActorQueryOperationFromQuad.createOperation(operationOriginal);\n return this.mediatorQueryOperation.mediate({ operation, context });\n }\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorHashBindings } from '@comunica/bus-hash-bindings';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport { AsyncEvaluator } from '@comunica/expression-evaluator';\nimport type { BindingsStream, IActionContext, IQueryOperationResult } from '@comunica/types';\nimport { ArrayIterator, TransformIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { GroupsState } from './GroupsState';\n\n/**\n * A comunica Group Query Operation Actor.\n */\nexport class ActorQueryOperationGroup extends ActorQueryOperationTypedMediated {\n public readonly mediatorHashBindings: MediatorHashBindings;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationGroupArgs) {\n super(args, 'group');\n }\n\n public async testOperation(operation: Algebra.Group, context: IActionContext): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n for (const aggregate of operation.aggregates) {\n // Will throw for unsupported expressions\n const _ = new AsyncEvaluator(\n aggregate.expression,\n ActorQueryOperation.getAsyncExpressionContext(context, this.mediatorQueryOperation, bindingsFactory),\n );\n }\n return true;\n }\n\n public async runOperation(operation: Algebra.Group, context: IActionContext):\n Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n // Create a hash function\n const { hashFunction } = await this.mediatorHashBindings.mediate({ allowHashCollisions: true, context });\n\n // Get result stream for the input query\n const { input, aggregates } = operation;\n const outputRaw = await this.mediatorQueryOperation.mediate({ operation: input, context });\n const output = ActorQueryOperation.getSafeBindings(outputRaw);\n\n // The variables in scope are the variables on which we group, i.e. pattern.variables.\n // For 'GROUP BY ?x, ?z', this is [?x, ?z], for 'GROUP by expr(?x) as ?e' this is [?e].\n // But also in scope are the variables defined by the aggregations, since GROUP has to handle this.\n const variables = [\n ...operation.variables,\n ...aggregates.map(agg => agg.variable),\n ];\n\n const sparqleeConfig = ActorQueryOperation.getAsyncExpressionContext(\n context,\n this.mediatorQueryOperation,\n bindingsFactory,\n );\n\n // Wrap a new promise inside an iterator that completes when the stream has ended or when an error occurs\n const bindingsStream = new TransformIterator(() => new Promise((resolve, reject) => {\n const groups = new GroupsState(hashFunction, operation, sparqleeConfig, bindingsFactory);\n\n // Phase 2: Collect aggregator results\n // We can only return when the binding stream ends, when that happens\n // we return the identified groups. Which are nothing more than Bindings\n // of the grouping variables merged with the aggregate variables\n // eslint-disable-next-line ts/no-misused-promises\n output.bindingsStream.on('end', async() => {\n try {\n const bindingsStreamInner = new ArrayIterator(await groups.collectResults(), { autoStart: false });\n resolve(bindingsStreamInner);\n } catch (error: unknown) {\n reject(error);\n }\n });\n\n // Make sure to propagate any errors in the binding stream\n output.bindingsStream.on('error', reject);\n\n // Phase 1: Consume the stream, identify the groups and populate the aggregators.\n // We need to bind this after the 'error' and 'end' listeners to avoid the\n // stream having ended before those listeners are bound.\n output.bindingsStream.on('data', (bindings) => {\n groups.consumeBindings(bindings).catch(reject);\n });\n }), { autoStart: false });\n\n return {\n type: 'bindings',\n bindingsStream,\n metadata: async() => ({ ...await output.metadata(), variables }),\n };\n }\n}\n\nexport interface IActorQueryOperationGroupArgs extends IActorQueryOperationTypedMediatedArgs {\n mediatorHashBindings: MediatorHashBindings;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type { BindingsFactory } from '@comunica/bindings-factory';\nimport type { HashFunction } from '@comunica/bus-hash-bindings';\nimport type { IAsyncEvaluatorContext } from '@comunica/expression-evaluator';\nimport { AsyncAggregateEvaluator } from '@comunica/expression-evaluator';\nimport type { Bindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport type { Algebra } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\n\n/**\n * A simple type alias for strings that should be hashes of Bindings\n */\nexport type BindingsHash = string;\n\n/**\n * A state container for a single group\n *\n * @property {Bindings} bindings - The binding entries on which we group\n */\nexport interface IGroup {\n bindings: Bindings;\n aggregators: Record;\n}\n\n/**\n * A state manager for the groups constructed by consuming the bindings-stream.\n */\nexport class GroupsState {\n private readonly groups: Map;\n // We need to the promises of a group so we can await the initialisation/ creation of them.\n // Without this we could have duplicate work/ override precious work.\n private readonly groupsInitializer: Map>;\n private readonly groupVariables: Set;\n private readonly distinctHashes: null | Map>;\n private waitCounter: number;\n // Function that resolves the promise given by collectResults\n private waitResolver: (bindings: Bindings[]) => void;\n private resultHasBeenCalled: boolean;\n\n public constructor(\n private readonly hashFunction: HashFunction,\n private readonly pattern: Algebra.Group,\n private readonly sparqleeConfig: IAsyncEvaluatorContext,\n private readonly bindingsFactory: BindingsFactory,\n ) {\n this.groups = new Map();\n this.groupsInitializer = new Map();\n this.groupVariables = new Set(this.pattern.variables.map(x => x.value));\n this.distinctHashes = pattern.aggregates.some(({ distinct }) => distinct) ?\n new Map() :\n null;\n this.waitCounter = 1;\n this.resultHasBeenCalled = false;\n }\n\n /**\n * - Consumes a stream binding\n * - Find the corresponding group and create one if need be\n * - Feeds the binding to the group's aggregators\n *\n * @param {Bindings} bindings - The Bindings to consume\n */\n public consumeBindings(bindings: Bindings): Promise {\n const check = this.resultCheck();\n if (check) {\n return check;\n }\n // We increment the counter and decrement him when put action is performed.\n this.waitCounter++;\n\n // Select the bindings on which we group\n const grouper = bindings\n .filter((_, variable) => this.groupVariables.has(variable.value));\n const groupHash = this.hashBindings(grouper);\n\n // First member of group -> create new group\n let groupInitializer: Promise | undefined = this.groupsInitializer.get(groupHash);\n\n let res: Promise;\n if (groupInitializer) {\n const groupInitializerDefined = groupInitializer;\n res = (async() => {\n const group = await groupInitializerDefined;\n await Promise.all(this.pattern.aggregates.map(async(aggregate) => {\n // If distinct, check first whether we have inserted these values already\n if (aggregate.distinct) {\n const hash = this.hashBindings(bindings);\n if (this.distinctHashes!.get(groupHash)!.has(hash)) {\n return;\n }\n this.distinctHashes!.get(groupHash)!.add(hash);\n }\n\n const variable = aggregate.variable.value;\n await group.aggregators[variable].put(bindings);\n }));\n })().then(async() => {\n this.subtractWaitCounterAndCollect();\n });\n } else {\n // Initialize state for all aggregators for new group\n groupInitializer = (async() => {\n const aggregators: Record = {};\n await Promise.all(this.pattern.aggregates.map(async(aggregate) => {\n const key = aggregate.variable.value;\n aggregators[key] = new AsyncAggregateEvaluator(aggregate, this.sparqleeConfig);\n await aggregators[key].put(bindings);\n }));\n\n if (this.distinctHashes) {\n const bindingsHash = this.hashBindings(bindings);\n this.distinctHashes.set(groupHash, new Set([ bindingsHash ]));\n }\n const group = { aggregators, bindings: grouper };\n this.groups.set(groupHash, group);\n this.subtractWaitCounterAndCollect();\n return group;\n })();\n this.groupsInitializer.set(groupHash, groupInitializer);\n res = groupInitializer;\n }\n return res;\n }\n\n private subtractWaitCounterAndCollect(): void {\n if (--this.waitCounter === 0) {\n this.handleResultCollection();\n }\n }\n\n private handleResultCollection(): void {\n // Collect groups\n let rows: Bindings[] = [ ...this.groups ].map(([ _, group ]) => {\n const { bindings: groupBindings, aggregators } = group;\n\n // Collect aggregator bindings\n // If the aggregate errorred, the result will be undefined\n let returnBindings = groupBindings;\n for (const variable in aggregators) {\n const value = aggregators[variable].result();\n if (value) {\n // Filter undefined\n returnBindings = returnBindings.set(DF.variable(variable), value);\n }\n }\n\n // Merge grouping bindings and aggregator bindings\n return returnBindings;\n });\n\n // Case: No Input\n // Some aggregators still define an output on the empty input\n // Result is a single Bindings\n if (rows.length === 0 && this.groupVariables.size === 0) {\n const single: [RDF.Variable, RDF.Term][] = [];\n for (const aggregate of this.pattern.aggregates) {\n const key = aggregate.variable;\n const value = AsyncAggregateEvaluator.emptyValue(aggregate);\n if (value !== undefined) {\n single.push([ key, value ]);\n }\n }\n rows = [ this.bindingsFactory.bindings(single) ];\n }\n this.waitResolver(rows);\n }\n\n private resultCheck(): Promise | undefined {\n if (this.resultHasBeenCalled) {\n return Promise.reject(new Error('Calling any function after calling collectResult is invalid.'));\n }\n }\n\n /**\n * Collect the result of the final state. This returns a Bindings per group,\n * and a (possibly empty) Bindings in case no Bindings have been consumed yet.\n * You can only call this method once, after calling this method,\n * calling any function on this will result in an error being thrown.\n */\n public collectResults(): Promise {\n const check = this.resultCheck();\n if (check) {\n return check;\n }\n this.resultHasBeenCalled = true;\n const res = new Promise((resolve) => {\n this.waitResolver = resolve;\n });\n this.subtractWaitCounterAndCollect();\n return res;\n }\n\n /**\n * @param {Bindings} bindings - Bindings to hash\n */\n private hashBindings(bindings: Bindings): BindingsHash {\n return this.hashFunction(bindings);\n }\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { MediatorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IActorTest } from '@comunica/core';\nimport type { IQueryOperationResult, IActionContext, IJoinEntry } from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Join Query Operation Actor.\n */\nexport class ActorQueryOperationJoin extends ActorQueryOperationTypedMediated {\n public readonly mediatorJoin: MediatorRdfJoin;\n\n public constructor(args: IActorQueryOperationJoinArgs) {\n super(args, 'join');\n }\n\n public async testOperation(_operation: Algebra.Join, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(\n operationOriginal: Algebra.Join,\n context: IActionContext,\n ): Promise {\n const entries: IJoinEntry[] = (await Promise.all(operationOriginal.input\n .map(async subOperation => ({\n output: await this.mediatorQueryOperation.mediate({ operation: subOperation, context }),\n operation: subOperation,\n }))))\n .map(({ output, operation }) => ({\n output: ActorQueryOperation.getSafeBindings(output),\n operation,\n }));\n\n return this.mediatorJoin.mediate({ type: 'inner', entries, context });\n }\n}\n\nexport interface IActorQueryOperationJoinArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for joining Bindings streams\n */\n mediatorJoin: MediatorRdfJoin;\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { MediatorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IActorTest } from '@comunica/core';\nimport { AsyncEvaluator, isExpressionError } from '@comunica/expression-evaluator';\nimport type { IQueryOperationResult, Bindings, IActionContext, IJoinEntry } from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica LeftJoin Query Operation Actor.\n */\nexport class ActorQueryOperationLeftJoin extends ActorQueryOperationTypedMediated {\n public readonly mediatorJoin: MediatorRdfJoin;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationLeftJoinArgs) {\n super(args, 'leftjoin');\n }\n\n public async testOperation(_operation: Algebra.LeftJoin, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operationOriginal: Algebra.LeftJoin, context: IActionContext):\n Promise {\n // Delegate to join bus\n const entries: IJoinEntry[] = (await Promise.all(operationOriginal.input\n .map(async subOperation => ({\n output: await this.mediatorQueryOperation.mediate({ operation: subOperation, context }),\n operation: subOperation,\n }))))\n .map(({ output, operation }) => ({\n output: ActorQueryOperation.getSafeBindings(output),\n operation,\n }));\n const joined = await this.mediatorJoin.mediate({ type: 'optional', entries, context });\n\n // If the pattern contains an expression, filter the resulting stream\n if (operationOriginal.expression) {\n const rightMetadata = await entries[1].output.metadata();\n const expressionVariables = rightMetadata.variables;\n\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n const config = { ...ActorQueryOperation.getAsyncExpressionContext(\n context,\n this.mediatorQueryOperation,\n bindingsFactory,\n ) };\n const evaluator = new AsyncEvaluator(operationOriginal.expression, config);\n const bindingsStream = joined.bindingsStream\n .transform({\n autoStart: false,\n // eslint-disable-next-line ts/no-misused-promises\n transform: async(bindings: Bindings, done: () => void, push: (item: Bindings) => void) => {\n // If variables of the right-hand entry are missing, we skip expression evaluation\n if (!expressionVariables.every(variable => bindings.has(variable.value))) {\n push(bindings);\n return done();\n }\n\n try {\n const result = await evaluator.evaluateAsEBV(bindings);\n if (result) {\n push(bindings);\n }\n } catch (error: unknown) {\n // We ignore all Expression errors.\n // Other errors (likely programming mistakes) are still propagated.\n // Left Join is defined in terms of Filter (https://www.w3.org/TR/sparql11-query/#defn_algJoin),\n // and Filter requires this (https://www.w3.org/TR/sparql11-query/#expressions).\n if (isExpressionError(error)) {\n // In many cases, this is a user error, where the user should manually cast the variable to a string.\n // In order to help users debug this, we should report these errors via the logger as warnings.\n this.logWarn(context, 'Error occurred while filtering.', () => ({ error, bindings }));\n } else {\n bindingsStream.emit('error', error);\n }\n }\n done();\n },\n });\n joined.bindingsStream = bindingsStream;\n }\n\n return joined;\n }\n}\n\nexport interface IActorQueryOperationLeftJoinArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for joining Bindings streams\n */\n mediatorJoin: MediatorRdfJoin;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { MediatorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult, IJoinEntry } from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Minus Query Operation Actor.\n */\nexport class ActorQueryOperationMinus extends ActorQueryOperationTypedMediated {\n public readonly mediatorJoin: MediatorRdfJoin;\n\n public constructor(args: IActorQueryOperationMinusArgs) {\n super(args, 'minus');\n }\n\n public async testOperation(_operation: Algebra.Minus, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(\n operationOriginal: Algebra.Minus,\n context: IActionContext,\n ): Promise {\n const entries: IJoinEntry[] = (await Promise.all(operationOriginal.input\n .map(async subOperation => ({\n output: await this.mediatorQueryOperation.mediate({ operation: subOperation, context }),\n operation: subOperation,\n }))))\n .map(({ output, operation }) => ({\n output: ActorQueryOperation.getSafeBindings(output),\n operation,\n }));\n\n return this.mediatorJoin.mediate({ type: 'minus', entries, context });\n }\n}\n\nexport interface IActorQueryOperationMinusArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for joining Bindings streams\n */\n mediatorJoin: MediatorRdfJoin;\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { SingletonIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation)\n * actor that handles SPARQL nop operations.\n */\nexport class ActorQueryOperationNop extends ActorQueryOperationTypedMediated {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationNopArgs) {\n super(args, 'nop');\n }\n\n public async testOperation(_operation: Algebra.Nop, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Nop, context: IActionContext): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n\n return {\n bindingsStream: new SingletonIterator(bindingsFactory.bindings()),\n metadata: () => Promise.resolve({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 1 },\n canContainUndefs: false,\n variables: [],\n }),\n type: 'bindings',\n };\n }\n}\n\nexport interface IActorQueryOperationNopArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport { AsyncEvaluator, isExpressionError, orderTypes } from '@comunica/expression-evaluator';\nimport type { Bindings, IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type { Term } from '@rdfjs/types';\nimport { Algebra } from 'sparqlalgebrajs';\nimport { SortIterator } from './SortIterator';\n\n/**\n * A comunica OrderBy Sparqlee Query Operation Actor.\n */\nexport class ActorQueryOperationOrderBy extends ActorQueryOperationTypedMediated {\n private readonly window: number;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationOrderBySparqleeArgs) {\n super(args, 'orderby');\n this.window = args.window ?? Number.POSITIVE_INFINITY;\n }\n\n public async testOperation(operation: Algebra.OrderBy, context: IActionContext): Promise {\n // Will throw error for unsupported operators\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n\n for (let expr of operation.expressions) {\n expr = this.extractSortExpression(expr);\n const _ = new AsyncEvaluator(\n expr,\n ActorQueryOperation.getAsyncExpressionContext(context, this.mediatorQueryOperation, bindingsFactory),\n );\n }\n return true;\n }\n\n public async runOperation(operation: Algebra.OrderBy, context: IActionContext):\n Promise {\n const outputRaw = await this.mediatorQueryOperation.mediate({ operation: operation.input, context });\n const output = ActorQueryOperation.getSafeBindings(outputRaw);\n\n const options = { window: this.window };\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n const sparqleeConfig = {\n ...ActorQueryOperation.getAsyncExpressionContext(context, this.mediatorQueryOperation, bindingsFactory),\n };\n let { bindingsStream } = output;\n\n // Sorting backwards since the first one is the most important therefore should be ordered last.\n for (let i = operation.expressions.length - 1; i >= 0; i--) {\n let expr = operation.expressions[i];\n const isAscending = this.isAscending(expr);\n expr = this.extractSortExpression(expr);\n // Transform the stream by annotating it with the expr result\n const evaluator = new AsyncEvaluator(expr, sparqleeConfig);\n interface IAnnotatedBinding {\n bindings: Bindings;\n result: Term | undefined;\n }\n\n const transform = async(bindings: Bindings, next: any, push: (result: IAnnotatedBinding) => void):\n Promise => {\n try {\n const result = await evaluator.evaluate(bindings);\n push({ bindings, result });\n } catch (error: unknown) {\n // We ignore all Expression errors.\n // Other errors (likely programming mistakes) are still propagated.\n // I can't recall where this is defined in the spec.\n if (!isExpressionError( error)) {\n bindingsStream.emit('error', error);\n }\n push({ bindings, result: undefined });\n }\n next();\n };\n // eslint-disable-next-line ts/no-misused-promises\n const transformedStream = bindingsStream.transform({ transform });\n\n // Sort the annoted stream\n const sortedStream = new SortIterator(transformedStream, (left, right) => {\n let compare = orderTypes(left.result, right.result);\n if (!isAscending) {\n compare *= -1;\n }\n return compare;\n }, options);\n\n // Remove the annotation\n bindingsStream = sortedStream.map(({ bindings }) => bindings);\n }\n\n return {\n type: 'bindings',\n bindingsStream,\n metadata: output.metadata,\n };\n }\n\n // Remove descending operator if necessary\n private extractSortExpression(expr: Algebra.Expression): Algebra.Expression {\n const { expressionType, operator } = expr;\n if (expressionType !== Algebra.expressionTypes.OPERATOR) {\n return expr;\n }\n return operator === 'desc' ?\n expr.args[0] :\n expr;\n }\n\n private isAscending(expr: Algebra.Expression): boolean {\n const { expressionType, operator } = expr;\n if (expressionType !== Algebra.expressionTypes.OPERATOR) {\n return true;\n }\n return operator !== 'desc';\n }\n}\n\n/**\n * The window parameter determines how many of the elements to consider when sorting.\n */\nexport interface IActorQueryOperationOrderBySparqleeArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n /**\n * The size of the window for the sort iterator.\n * @range {integer}\n */\n window?: number;\n}\n","import type { AsyncIterator } from 'asynciterator';\nimport { TransformIterator } from 'asynciterator';\n\n// Based on https://github.com/LinkedDataFragments/Client.js/blob/master/lib/sparql/SortIterator.js\nexport class SortIterator extends TransformIterator {\n private readonly windowLength: number;\n private readonly sort: (left: T, right: T) => number;\n private readonly sorted: T[];\n\n public constructor(source: AsyncIterator, sort: (left: T, right: T) => number, options?: any) {\n super(source, options);\n\n // The `window` parameter indicates the length of the sliding window to apply sorting\n const window: number = options && options.window;\n this.windowLength = Number.isFinite(window) && window > 0 ? window : Number.POSITIVE_INFINITY;\n this.sort = sort;\n this.sorted = [];\n }\n\n // Reads the smallest item in the current sorting window\n public override _read(count: number, done: () => void): void {\n let item;\n let { length } = this.sorted;\n // Try to read items until we reach the desired window length\n while (length !== this.windowLength) {\n item = this.source!.read();\n if (item === null) {\n break;\n }\n // Insert the item in the sorted window (smallest last)\n let left = 0;\n let right = length - 1;\n let mid;\n let order;\n while (left <= right) {\n mid = Math.trunc((left + right) / 2);\n order = this.sort(item, this.sorted[mid]);\n if (order < 0) {\n left = mid + 1;\n } else if (order > 0) {\n right = mid - 1;\n } else {\n left = mid;\n right = -1;\n }\n }\n this.sorted.splice(left, 0, item);\n length++;\n }\n // Push the smallest item in the window\n if (length === this.windowLength) {\n this._push(this.sorted.pop()!);\n }\n done();\n }\n\n // Flushes remaining data after the source has ended\n public override _flush(done: () => void): void {\n let { length } = this.sorted;\n while (length--) {\n this._push(this.sorted.pop()!);\n }\n done();\n }\n}\n","import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport { ActorQueryOperationUnion } from '@comunica/actor-query-operation-union';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type { MediatorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type {\n IQueryOperationResultBindings,\n IQueryOperationResult,\n IActionContext,\n MetadataBindings,\n} from '@comunica/types';\nimport { UnionIterator } from 'asynciterator';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path Alt Query Operation Actor.\n */\nexport class ActorQueryOperationPathAlt extends ActorAbstractPath {\n public readonly mediatorRdfMetadataAccumulate: MediatorRdfMetadataAccumulate;\n\n public constructor(args: IActorQueryOperationPathAltArgs) {\n super(args, Algebra.types.ALT);\n }\n\n public async runOperation(operation: Algebra.Path, context: IActionContext): Promise {\n const predicate = operation.predicate;\n\n const subOperations: IQueryOperationResultBindings[] = (await Promise.all(predicate.input\n .map(subPredicate => this.mediatorQueryOperation.mediate({\n context,\n operation: ActorAbstractPath.FACTORY\n .createPath(operation.subject, subPredicate, operation.object, operation.graph),\n }))))\n .map(ActorQueryOperation.getSafeBindings);\n\n const bindingsStream = new UnionIterator(subOperations.map(op => op.bindingsStream), { autoStart: false });\n const metadata: (() => Promise) = () =>\n Promise.all(subOperations.map(output => output.metadata()))\n .then(subMeta => ActorQueryOperationUnion\n .unionMetadata(subMeta, true, context, this.mediatorRdfMetadataAccumulate));\n\n return {\n type: 'bindings',\n bindingsStream,\n metadata,\n };\n }\n}\n\nexport interface IActorQueryOperationPathAltArgs extends IActorQueryOperationTypedMediatedArgs {\n mediatorRdfMetadataAccumulate: MediatorRdfMetadataAccumulate;\n}\n","import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path Inv Query Operation Actor.\n */\nexport class ActorQueryOperationPathInv extends ActorAbstractPath {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, Algebra.types.INV);\n }\n\n public async runOperation(operation: Algebra.Path, context: IActionContext): Promise {\n const predicate = operation.predicate;\n const invPath = ActorAbstractPath.FACTORY\n .createPath(operation.object, predicate.path, operation.subject, operation.graph);\n return this.mediatorQueryOperation.mediate({ operation: invPath, context });\n }\n}\n","import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path Link Query Operation Actor.\n */\nexport class ActorQueryOperationPathLink extends ActorAbstractPath {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, Algebra.types.LINK);\n }\n\n public async runOperation(\n operationOriginal: Algebra.Path,\n context: IActionContext,\n ): Promise {\n const predicate = operationOriginal.predicate;\n const operation = Object.assign(ActorAbstractPath.FACTORY.createPattern(\n operationOriginal.subject,\n predicate.iri,\n operationOriginal.object,\n operationOriginal.graph,\n ), { metadata: predicate.metadata });\n return this.mediatorQueryOperation.mediate({ operation, context });\n }\n}\n","import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n} from '@comunica/bus-query-operation';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path Nps Query Operation Actor.\n */\nexport class ActorQueryOperationPathNps extends ActorAbstractPath {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, Algebra.types.NPS);\n }\n\n public async runOperation(operation: Algebra.Path, context: IActionContext): Promise {\n const predicate = operation.predicate;\n const blank = this.generateVariable(operation);\n\n const pattern = Object.assign(ActorAbstractPath.FACTORY\n .createPattern(operation.subject, blank, operation.object, operation.graph), { metadata: predicate.metadata });\n const output = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ operation: pattern, context }),\n );\n\n // Remove the generated blank nodes from the bindings\n const bindingsStream = output.bindingsStream\n .map(bindings => predicate.iris.some(iri => iri.equals(bindings.get(blank))) ? null : bindings.delete(blank));\n\n return {\n type: 'bindings',\n bindingsStream,\n metadata: output.metadata,\n };\n }\n}\n","import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type { IQueryOperationResultBindings, Bindings, IQueryOperationResult, IActionContext } from '@comunica/types';\nimport { BufferedIterator, MultiTransformIterator, TransformIterator } from 'asynciterator';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path OneOrMore Query Operation Actor.\n */\nexport class ActorQueryOperationPathOneOrMore extends ActorAbstractPath {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationPathOneOrMoreArgs) {\n super(args, Algebra.types.ONE_OR_MORE_PATH);\n }\n\n public async runOperation(operation: Algebra.Path, context: IActionContext): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n const distinct = await this.isPathArbitraryLengthDistinct(context, operation);\n if (distinct.operation) {\n return distinct.operation;\n }\n\n context = distinct.context;\n\n const predicate = operation.predicate;\n\n if (operation.subject.termType !== 'Variable' && operation.object.termType === 'Variable') {\n const objectVar = operation.object;\n const starEval = await this.getObjectsPredicateStarEval(\n operation.subject,\n predicate.path,\n objectVar,\n operation.graph,\n context,\n false,\n bindingsFactory,\n );\n const variables = operation.graph.termType === 'Variable' ? [ objectVar, operation.graph ] : [ objectVar ];\n return {\n type: 'bindings',\n bindingsStream: starEval.bindingsStream,\n metadata: async() => ({ ...await starEval.metadata(), variables }),\n };\n }\n if (operation.subject.termType === 'Variable' && operation.object.termType === 'Variable') {\n // Get all the results of subjects with same predicate, but once, then fill in first variable for those\n const single = ActorAbstractPath.FACTORY.createDistinct(\n ActorAbstractPath.FACTORY\n .createPath(operation.subject, operation.predicate.path, operation.object, operation.graph),\n );\n const results = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ context, operation: single }),\n );\n const subjectVar = operation.subject;\n const objectVar = operation.object;\n\n const termHashes = {};\n\n const bindingsStream: MultiTransformIterator = new MultiTransformIterator(\n results.bindingsStream,\n {\n multiTransform: (bindings: Bindings) => {\n const subject = bindings.get(subjectVar);\n const object = bindings.get(objectVar);\n const graph = operation.graph.termType === 'Variable' ? bindings.get(operation.graph) : operation.graph;\n return new TransformIterator(\n async() => {\n const it = new BufferedIterator();\n await this.getSubjectAndObjectBindingsPredicateStar(\n subjectVar,\n objectVar,\n subject!,\n object!,\n predicate.path,\n graph!,\n context,\n termHashes,\n {},\n it,\n { count: 0 },\n bindingsFactory,\n );\n return it.transform({\n transform(item, next, push) {\n if (operation.graph.termType === 'Variable') {\n item = item.set(operation.graph, graph!);\n }\n push(item);\n next();\n },\n });\n },\n { maxBufferSize: 128 },\n );\n },\n autoStart: false,\n },\n );\n const variables = operation.graph.termType === 'Variable' ?\n [ subjectVar, objectVar, operation.graph ] :\n [ subjectVar, objectVar ];\n return {\n type: 'bindings',\n bindingsStream,\n metadata: async() => ({ ...await results.metadata(), variables }),\n };\n }\n if (operation.subject.termType === 'Variable' && operation.object.termType !== 'Variable') {\n return > this.mediatorQueryOperation.mediate({\n context,\n operation: ActorAbstractPath.FACTORY.createPath(\n operation.object,\n ActorAbstractPath.FACTORY.createOneOrMorePath(\n ActorAbstractPath.FACTORY.createInv(predicate.path),\n ),\n operation.subject,\n operation.graph,\n ),\n });\n }\n // If (!sVar && !oVar)\n const variable = this.generateVariable();\n const results = ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({\n context,\n operation: ActorAbstractPath.FACTORY.createPath(operation.subject, predicate, variable, operation.graph),\n }));\n const bindingsStream = results.bindingsStream.transform({\n filter: item => operation.object.equals(item.get(variable)),\n transform(item, next, push) {\n const binding = operation.graph.termType === 'Variable' ?\n bindingsFactory.bindings([[ operation.graph, item.get(operation.graph)! ]]) :\n bindingsFactory.bindings();\n push(binding);\n next();\n },\n });\n return {\n type: 'bindings',\n bindingsStream,\n metadata: async() => ({\n ...await results.metadata(),\n variables: operation.graph.termType === 'Variable' ? [ operation.graph ] : [],\n }),\n };\n }\n}\n\nexport interface IActorQueryOperationPathOneOrMoreArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n} from '@comunica/bus-query-operation';\nimport type { MediatorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { Bindings, IActionContext, IQueryOperationResult, IJoinEntry } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path Seq Query Operation Actor.\n */\nexport class ActorQueryOperationPathSeq extends ActorAbstractPath {\n public readonly mediatorJoin: MediatorRdfJoin;\n\n public constructor(args: IActorQueryOperationPathSeq) {\n super(args, Algebra.types.SEQ);\n }\n\n public async runOperation(\n operationOriginal: Algebra.Path,\n context: IActionContext,\n ): Promise {\n const predicate = operationOriginal.predicate;\n\n let joiner: RDF.Term = operationOriginal.subject;\n const generatedVariableNames: RDF.Variable[] = [];\n const entries: IJoinEntry[] = await Promise.all(predicate.input\n .map((subPredicate, i) => {\n const nextJoiner = i === predicate.input.length - 1 ? operationOriginal.object : this.generateVariable(operationOriginal, `b${i}`);\n const operation = ActorAbstractPath.FACTORY\n .createPath(joiner, subPredicate, nextJoiner, operationOriginal.graph);\n const output = this.mediatorQueryOperation.mediate({\n context,\n operation,\n });\n\n joiner = nextJoiner;\n if (i < predicate.input.length - 1) {\n generatedVariableNames.push(nextJoiner);\n }\n\n return { output, operation };\n })\n .map(async({ output, operation }) => ({\n output: ActorQueryOperation.getSafeBindings(await output),\n operation,\n })));\n\n const join = ActorQueryOperation.getSafeBindings(await this.mediatorJoin\n .mediate({ type: 'inner', entries, context }));\n // Remove the generated variable from the bindings\n const bindingsStream = join.bindingsStream.transform({\n transform(item, next, push) {\n for (const generatedVariableName of generatedVariableNames) {\n item = item.delete(generatedVariableName);\n }\n push(item);\n next();\n },\n });\n\n // Remove the generated variable from the list of variables\n return {\n type: 'bindings',\n bindingsStream,\n async metadata() {\n const joinMetadata = await join.metadata();\n const variables = joinMetadata.variables.filter(variable => !generatedVariableNames\n .some(generatedVariableName => generatedVariableName.value === variable.value));\n return { ...joinMetadata, variables };\n },\n };\n }\n}\n\nexport interface IActorQueryOperationPathSeq extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for joining Bindings streams\n */\n mediatorJoin: MediatorRdfJoin;\n}\n","import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type { Bindings, IQueryOperationResult, IActionContext } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { MultiTransformIterator, TransformIterator, EmptyIterator, BufferedIterator } from 'asynciterator';\nimport { termToString } from 'rdf-string';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path ZeroOrMore Query Operation Actor.\n */\nexport class ActorQueryOperationPathZeroOrMore extends ActorAbstractPath {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationPathZeroOrMoreArgs) {\n super(args, Algebra.types.ZERO_OR_MORE_PATH);\n }\n\n public async runOperation(operation: Algebra.Path, context: IActionContext): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n\n const distinct = await this.isPathArbitraryLengthDistinct(context, operation);\n if (distinct.operation) {\n return distinct.operation;\n }\n\n context = distinct.context;\n\n const predicate = operation.predicate;\n const sources = this.getPathSources(predicate);\n\n const sVar = operation.subject.termType === 'Variable';\n const oVar = operation.object.termType === 'Variable';\n\n if (operation.subject.termType === 'Variable' && operation.object.termType === 'Variable') {\n // Query ?s ?p ?o, to get all possible namedNodes in de the db\n const predVar = this.generateVariable(operation);\n const single = this.assignPatternSources(ActorAbstractPath.FACTORY\n .createPattern(operation.subject, predVar, operation.object, operation.graph), sources);\n const results = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ context, operation: single }),\n );\n const subjectVar = operation.subject;\n const objectVar = operation.object;\n\n // Set with all namedNodes we have already started a predicate* search from\n const entities: Set = new Set();\n\n const termHashes = {};\n\n const bindingsStream: MultiTransformIterator = new MultiTransformIterator(\n results.bindingsStream,\n {\n multiTransform: (bindings: Bindings) => {\n // Get the subject and object of the triples (?s ?p ?o) and extract graph if it was a variable\n const subject: RDF.Term = bindings.get(subjectVar)!;\n const object: RDF.Term = bindings.get(objectVar)!;\n const graph: RDF.Term = operation.graph.termType === 'Variable' ?\n bindings.get(operation.graph)! :\n operation.graph;\n // Make a hash of namedNode + graph to remember from where we already started a search\n const subjectGraphHash = termToString(subject) + termToString(graph);\n const objectGraphHash = termToString(object) + termToString(graph);\n return new TransformIterator(\n async() => {\n // If no new namedNodes in this triple, return nothing\n if (entities.has(subjectGraphHash) && entities.has(objectGraphHash)) {\n return new EmptyIterator();\n }\n // Set up an iterator to which getSubjectAndObjectBindingsPredicateStar will push solutions\n const it = new BufferedIterator();\n const counter = { count: 0 };\n // If not started from this namedNode (subject in triple) in this graph, start a search\n if (!entities.has(subjectGraphHash)) {\n entities.add(subjectGraphHash);\n await this.getSubjectAndObjectBindingsPredicateStar(\n subjectVar,\n objectVar,\n subject,\n subject,\n predicate.path,\n graph,\n context,\n termHashes,\n {},\n it,\n counter,\n bindingsFactory,\n );\n }\n // If not started from this namedNode (object in triple) in this graph, start a search\n if (!entities.has(objectGraphHash)) {\n entities.add(objectGraphHash);\n await this.getSubjectAndObjectBindingsPredicateStar(\n subjectVar,\n objectVar,\n object,\n object,\n predicate.path,\n graph,\n context,\n termHashes,\n {},\n it,\n counter,\n bindingsFactory,\n );\n }\n return it.transform({\n transform(item, next, push) {\n // If the graph was a variable, fill in it's binding (we got it from the ?s ?p ?o binding)\n if (operation.graph.termType === 'Variable') {\n item = item.set(operation.graph, graph);\n }\n push(item);\n next();\n },\n });\n },\n );\n },\n },\n );\n const variables: RDF.Variable[] = operation.graph.termType === 'Variable' ?\n [ subjectVar, operation.object, operation.graph ] :\n [ subjectVar, operation.object ];\n return {\n type: 'bindings',\n bindingsStream,\n metadata: async() => ({ ...await results.metadata(), variables }),\n };\n }\n if (!sVar && !oVar) {\n const variable = this.generateVariable();\n const starEval = await this.getObjectsPredicateStarEval(\n operation.subject,\n predicate.path,\n variable,\n operation.graph,\n context,\n true,\n bindingsFactory,\n );\n // Check this\n const bindingsStream = starEval.bindingsStream.transform({\n filter: item => operation.object.equals(item.get(variable)),\n transform(item, next, push) {\n // Return graph binding if graph was a variable, otherwise empty binding\n const binding = operation.graph.termType === 'Variable' ?\n bindingsFactory.bindings([[ operation.graph, item.get(operation.graph)! ]]) :\n bindingsFactory.bindings();\n push(binding);\n next();\n },\n });\n return {\n type: 'bindings',\n bindingsStream,\n metadata: async() => ({\n ...await starEval.metadata(),\n variables: operation.graph.termType === 'Variable' ? [ operation.graph ] : [],\n }),\n };\n }\n // If (sVar || oVar)\n const subject = sVar ? operation.object : operation.subject;\n const value: RDF.Variable = (sVar ? operation.subject : operation.object);\n const pred = sVar ? ActorAbstractPath.FACTORY.createInv(predicate.path) : predicate.path;\n const starEval = await this.getObjectsPredicateStarEval(\n subject,\n pred,\n value,\n operation.graph,\n context,\n true,\n bindingsFactory,\n );\n const variables: RDF.Variable[] = operation.graph.termType === 'Variable' ? [ value, operation.graph ] : [ value ];\n return {\n type: 'bindings',\n bindingsStream: starEval.bindingsStream,\n metadata: async() => ({ ...await starEval.metadata(), variables }),\n };\n }\n}\n\nexport interface IActorQueryOperationPathZeroOrMoreArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type { Bindings, IQueryOperationResult, IActionContext, BindingsStream } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport {\n SingletonIterator,\n UnionIterator,\n} from 'asynciterator';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path ZeroOrOne Query Operation Actor.\n */\nexport class ActorQueryOperationPathZeroOrOne extends ActorAbstractPath {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationPathZeroOrOneArgs) {\n super(args, Algebra.types.ZERO_OR_ONE_PATH);\n }\n\n public async runOperation(\n operation: Algebra.Path,\n context: IActionContext,\n ): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n const predicate = operation.predicate;\n const sources = this.getPathSources(predicate);\n\n const extra: Bindings[] = [];\n\n // Both subject and object non-variables\n if (operation.subject.termType !== 'Variable' &&\n operation.object.termType !== 'Variable' &&\n operation.subject.equals(operation.object)) {\n return {\n type: 'bindings',\n bindingsStream: new SingletonIterator(bindingsFactory.bindings()),\n metadata: () => Promise.resolve({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 1 },\n canContainUndefs: false,\n variables: [],\n }),\n };\n }\n\n // Check if we require a distinct path operation\n const distinct = await this.isPathArbitraryLengthDistinct(context, operation);\n if (distinct.operation) {\n return distinct.operation;\n }\n context = distinct.context;\n\n // Create an operator that resolve to the \"One\" part\n const bindingsOne = ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({\n context,\n operation: ActorAbstractPath.FACTORY\n .createPath(operation.subject, predicate.path, operation.object, operation.graph),\n }));\n\n // Determine the bindings stream based on the variable-ness of subject and object\n let bindingsStream: BindingsStream;\n if (operation.subject.termType === 'Variable' && operation.object.termType === 'Variable') {\n // Both subject and object are variables\n // To determine the \"Zero\" part, we\n // query ?s ?p ?o. FILTER ?s = ?0, to get all possible namedNodes in de the db\n const varP = this.generateVariable(operation);\n const bindingsZero = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({\n context,\n operation: ActorAbstractPath.FACTORY.createFilter(\n this.assignPatternSources(ActorAbstractPath.FACTORY\n .createPattern(operation.subject, varP, operation.object, operation.graph), sources),\n ActorAbstractPath.FACTORY.createOperatorExpression('=', [\n ActorAbstractPath.FACTORY.createTermExpression(operation.subject),\n ActorAbstractPath.FACTORY.createTermExpression(operation.object),\n ]),\n ),\n }),\n ).bindingsStream.map(bindings => bindings.delete(varP));\n bindingsStream = new UnionIterator([\n bindingsZero,\n bindingsOne.bindingsStream,\n ], { autoStart: false });\n } else {\n // If subject or object is not a variable, then determining the \"Zero\" part is simple.\n if (operation.subject.termType === 'Variable') {\n extra.push(bindingsFactory.bindings([[ operation.subject, operation.object ]]));\n }\n if (operation.object.termType === 'Variable') {\n extra.push(bindingsFactory.bindings([[ operation.object, operation.subject ]]));\n }\n\n bindingsStream = bindingsOne.bindingsStream.prepend(extra);\n }\n\n return {\n type: 'bindings',\n bindingsStream,\n metadata: bindingsOne.metadata,\n };\n }\n}\nexport interface IActorQueryOperationPathZeroOrOneArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport { BlankNodeBindingsScoped } from '@comunica/data-factory';\nimport type {\n Bindings,\n BindingsStream,\n IActionContext,\n IQueryOperationResult,\n IQueryOperationResultBindings,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport type { Algebra } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\n\n/**\n * A comunica Project Query Operation Actor.\n */\nexport class ActorQueryOperationProject extends ActorQueryOperationTypedMediated {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, 'project');\n }\n\n public async testOperation(_operation: Algebra.Project, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Project, context: IActionContext):\n Promise {\n // Resolve the input\n const output: IQueryOperationResultBindings = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ operation: operation.input, context }),\n );\n\n // Find all variables that should be deleted from the input stream.\n const outputMetadata = await output.metadata();\n const variables = operation.variables;\n const deleteVariables = outputMetadata.variables\n .filter(variable => !variables.some(subVariable => variable.value === subVariable.value));\n\n // Error if there are variables that are not bound in the input stream.\n const missingVariables = variables\n .filter(variable => !outputMetadata.variables.some(subVariable => variable.value === subVariable.value));\n if (missingVariables.length > 0) {\n // eslint-disable-next-line ts/restrict-template-expressions\n throw new Error(`Variables '${missingVariables.map(variable => `?${variable.value}`)}' are used in the projection result, but are not assigned.`);\n }\n\n // Make sure the project variables are the only variables that are present in the bindings.\n let bindingsStream: BindingsStream = deleteVariables.length === 0 ?\n output.bindingsStream :\n output.bindingsStream.map((bindings: Bindings) => {\n for (const deleteVariable of deleteVariables) {\n bindings = bindings.delete(deleteVariable);\n }\n return bindings;\n });\n\n // Make sure that blank nodes with same labels are not reused over different bindings, as required by SPARQL 1.1.\n // Required for the BNODE() function: https://www.w3.org/TR/sparql11-query/#func-bnode\n // When we have a scoped blank node, make sure the skolemized value is maintained.\n let blankNodeCounter = 0;\n bindingsStream = bindingsStream.map((bindings: Bindings) => {\n blankNodeCounter++;\n const scopedBlankNodesCache = new Map();\n return bindings.map((term) => {\n if (term instanceof BlankNodeBindingsScoped) {\n let scopedBlankNode = scopedBlankNodesCache.get(term.value);\n if (!scopedBlankNode) {\n scopedBlankNode = DF.blankNode(`${term.value}${blankNodeCounter}`);\n scopedBlankNodesCache.set(term.value, scopedBlankNode);\n }\n return scopedBlankNode;\n }\n return term;\n });\n });\n\n return {\n type: 'bindings',\n bindingsStream,\n metadata: async() => ({ ...outputMetadata, variables }),\n };\n }\n}\n","import type { MediatorHashBindings } from '@comunica/bus-hash-bindings';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type {\n Bindings,\n BindingsStream,\n IActionContext,\n IQueryOperationResult,\n IQueryOperationResultBindings,\n} from '@comunica/types';\nimport { LRUCache } from 'lru-cache';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Reduced Hash Query Operation Actor.\n */\nexport class ActorQueryOperationReducedHash extends ActorQueryOperationTypedMediated {\n public readonly mediatorHashBindings: MediatorHashBindings;\n public readonly cacheSize: number;\n\n public constructor(args: IActorQueryOperationReducedHashArgs) {\n super(args, 'reduced');\n }\n\n public async testOperation(_operation: Algebra.Reduced, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Reduced, context: IActionContext): Promise {\n const output: IQueryOperationResultBindings = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ operation: operation.input, context }),\n );\n const bindingsStream: BindingsStream = output.bindingsStream.filter(await this.newHashFilter(context));\n return {\n type: 'bindings',\n bindingsStream,\n metadata: output.metadata,\n };\n }\n\n /**\n * Create a new distinct filter function.\n * This will maintain an internal hash datastructure so that every bindings object only returns true once.\n * @param context The action context.\n * @return {(bindings: Bindings) => boolean} A distinct filter for bindings.\n */\n public async newHashFilter(context: IActionContext): Promise<(bindings: Bindings) => boolean> {\n const { hashFunction } = await this.mediatorHashBindings.mediate({ allowHashCollisions: true, context });\n const hashes = new LRUCache({ max: this.cacheSize });\n return (bindings: Bindings) => {\n const hash: string = hashFunction(bindings);\n if (hashes.has(hash)) {\n return false;\n }\n hashes.set(hash, true);\n return true;\n };\n }\n}\n\nexport interface IActorQueryOperationReducedHashArgs extends IActorQueryOperationTypedMediatedArgs {\n mediatorHashBindings: MediatorHashBindings;\n /**\n * @range {integer}\n * @default {100}\n */\n cacheSize: number;\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { MediatorQuerySourceIdentify } from '@comunica/bus-query-source-identify';\nimport type { IActorTest } from '@comunica/core';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type { IActionContext, IQueryOperationResult, IQueryOperationResultBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { SingletonIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Service Query Operation Actor.\n * It unwraps the SERVICE operation and executes it on the given source.\n */\nexport class ActorQueryOperationService extends ActorQueryOperationTypedMediated {\n public readonly forceSparqlEndpoint: boolean;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n public readonly mediatorQuerySourceIdentify: MediatorQuerySourceIdentify;\n\n public constructor(args: IActorQueryOperationServiceArgs) {\n super(args, 'service');\n }\n\n public async testOperation(operation: Algebra.Service, _context: IActionContext): Promise {\n if (operation.name.termType !== 'NamedNode') {\n throw new Error(`${this.name} can only query services by IRI, while a ${operation.name.termType} was given.`);\n }\n return true;\n }\n\n public async runOperation(operation: Algebra.Service, context: IActionContext):\n Promise {\n // Identify the SERVICE target as query source\n const { querySource } = await this.mediatorQuerySourceIdentify.mediate({\n querySourceUnidentified: {\n value: operation.name.value,\n type: this.forceSparqlEndpoint ? 'sparql' : undefined,\n },\n context,\n });\n\n // Attach the source to the operation, and execute\n let output: IQueryOperationResultBindings;\n try {\n output = ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({\n operation: ActorQueryOperation.assignOperationSource(operation.input, querySource),\n context,\n }));\n } catch (error: unknown) {\n if (operation.silent) {\n // Emit a single empty binding\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n output = {\n bindingsStream: new SingletonIterator(bindingsFactory.bindings()),\n type: 'bindings',\n metadata: async() => ({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 1 },\n canContainUndefs: false,\n variables: [],\n }),\n };\n this.logWarn(context, `An error occurred when executing a SERVICE clause: ${( error).message}`);\n } else {\n throw error;\n }\n }\n\n return output;\n }\n}\n\nexport interface IActorQueryOperationServiceArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * If the SERVICE target should be assumed to be a SPARQL endpoint.\n * @default {false}\n */\n forceSparqlEndpoint: boolean;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n /**\n * The mediator for identifying query sources.\n */\n mediatorQuerySourceIdentify: MediatorQuerySourceIdentify;\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport { KeysQueryOperation } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport type {\n IQueryOperationResult,\n IQueryOperationResultBindings,\n IQueryOperationResultQuads,\n IQueryOperationResultStream,\n IMetadata,\n IActionContext,\n} from '@comunica/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Slice Query Operation Actor.\n */\nexport class ActorQueryOperationSlice extends ActorQueryOperationTypedMediated {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, 'slice');\n }\n\n public async testOperation(_operation: Algebra.Slice, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Slice, context: IActionContext):\n Promise {\n // Add limit indicator to the context, which can be used for query planning\n // eslint-disable-next-line unicorn/explicit-length-check\n if (operation.length) {\n context = context.set(KeysQueryOperation.limitIndicator, operation.length);\n }\n\n // Resolve the input\n const output: IQueryOperationResult = await this.mediatorQueryOperation\n .mediate({ operation: operation.input, context });\n\n if (output.type === 'bindings') {\n const bindingsStream = this.sliceStream(output.bindingsStream, operation);\n return {\n type: 'bindings',\n bindingsStream,\n metadata: this.sliceMetadata(output, operation),\n };\n }\n\n if (output.type === 'quads') {\n const quadStream = this.sliceStream(output.quadStream, operation);\n return {\n type: 'quads',\n quadStream,\n metadata: this.sliceMetadata(output, operation),\n };\n }\n\n throw new Error(`Invalid query output type: Expected 'bindings' or 'quads' but got '${output.type}'`);\n }\n\n // Slice the stream based on the pattern values\n private sliceStream(stream: AsyncIterator, pattern: Algebra.Slice): AsyncIterator {\n // eslint-disable-next-line unicorn/explicit-length-check\n const hasLength: boolean = Boolean(pattern.length) || pattern.length === 0;\n const { start } = pattern;\n const end = hasLength ? pattern.start + pattern.length! - 1 : Number.POSITIVE_INFINITY;\n return stream.transform({ offset: start, limit: Math.max(end - start + 1, 0), autoStart: false });\n }\n\n // If we find metadata, apply slicing on the total number of items\n private sliceMetadata(\n output: IQueryOperationResultStream,\n pattern: Algebra.Slice,\n ): () => Promise> {\n // eslint-disable-next-line unicorn/explicit-length-check\n const hasLength: boolean = Boolean(pattern.length) || pattern.length === 0;\n return () => (<() => Promise>>output.metadata)()\n .then((subMetadata) => {\n const cardinality = { ...subMetadata.cardinality };\n if (Number.isFinite(cardinality.value)) {\n cardinality.value = Math.max(0, cardinality.value - pattern.start);\n if (hasLength) {\n cardinality.value = Math.min(cardinality.value, pattern.length!);\n }\n }\n return { ...subMetadata, cardinality };\n });\n }\n}\n","import type { IActionQueryOperation, IActorQueryOperationArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport { getMetadataBindings, getMetadataQuads } from '@comunica/metadata';\nimport type {\n IPhysicalQueryPlanLogger,\n IQueryOperationResult,\n IQuerySourceWrapper,\n} from '@comunica/types';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Source Query Operation Actor.\n */\nexport class ActorQueryOperationSource extends ActorQueryOperation {\n public constructor(args: IActorQueryOperationArgs) {\n super(args);\n }\n\n public async test(action: IActionQueryOperation): Promise {\n if (!ActorQueryOperation.getOperationSource(action.operation)) {\n throw new Error(`Actor ${this.name} requires an operation with source annotation.`);\n }\n return { httpRequests: 1 };\n }\n\n public async run(action: IActionQueryOperation): Promise {\n // Log to physical plan\n const physicalQueryPlanLogger: IPhysicalQueryPlanLogger | undefined = action.context\n .get(KeysInitQuery.physicalQueryPlanLogger);\n if (physicalQueryPlanLogger) {\n physicalQueryPlanLogger.logOperation(\n action.operation.type,\n undefined,\n action.operation,\n action.context.get(KeysInitQuery.physicalQueryPlanNode),\n this.name,\n {},\n );\n action.context = action.context.set(KeysInitQuery.physicalQueryPlanNode, action.operation);\n }\n\n const sourceWrapper: IQuerySourceWrapper = ActorQueryOperation.getOperationSource(action.operation)!;\n const mergedContext = sourceWrapper.context ? action.context.merge(sourceWrapper.context) : action.context;\n\n // eslint-disable-next-line ts/switch-exhaustiveness-check\n switch (action.operation.type) {\n // Special case: allow CONSTRUCT queries that are SLICED to be pushed into sources as well.\n case Algebra.types.SLICE:\n case Algebra.types.CONSTRUCT: {\n if (action.operation.type === Algebra.types.SLICE && action.operation.input.type !== Algebra.types.CONSTRUCT) {\n break;\n }\n const quadStream = sourceWrapper.source.queryQuads(action.operation, mergedContext);\n const metadata = getMetadataQuads(quadStream);\n return {\n type: 'quads',\n quadStream,\n metadata,\n };\n }\n case Algebra.types.ASK:\n return {\n type: 'boolean',\n execute: () => sourceWrapper.source.queryBoolean(action.operation, mergedContext),\n };\n case Algebra.types.COMPOSITE_UPDATE:\n case Algebra.types.DELETE_INSERT:\n case Algebra.types.LOAD:\n case Algebra.types.CLEAR:\n case Algebra.types.CREATE:\n case Algebra.types.DROP:\n case Algebra.types.ADD:\n case Algebra.types.MOVE:\n case Algebra.types.COPY:\n return {\n type: 'void',\n execute: () => sourceWrapper.source.queryVoid(action.operation, mergedContext),\n };\n }\n\n const bindingsStream = sourceWrapper.source.queryBindings(action.operation, mergedContext);\n const metadata = getMetadataBindings(bindingsStream);\n return {\n type: 'bindings',\n bindingsStream,\n metadata,\n };\n }\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { MediatorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type { IActorTest } from '@comunica/core';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type {\n BindingsStream,\n IQueryOperationResultBindings,\n IActionContext,\n IQueryOperationResult,\n MetadataBindings,\n MetadataQuads,\n IQueryOperationResultQuads,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { UnionIterator } from 'asynciterator';\nimport { uniqTerms } from 'rdf-terms';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Union Query Operation Actor.\n */\nexport class ActorQueryOperationUnion extends ActorQueryOperationTypedMediated {\n public readonly mediatorRdfMetadataAccumulate: MediatorRdfMetadataAccumulate;\n\n public constructor(args: IActorQueryOperationUnionArgs) {\n super(args, 'union');\n }\n\n /**\n * Takes the union of the given double array variables.\n * Uniqueness is guaranteed.\n * @param {string[][]} variables Double array of variables to take the union of.\n * @return {string[]} The union of the given variables.\n */\n public static unionVariables(variables: RDF.Variable[][]): RDF.Variable[] {\n return uniqTerms(variables.flat());\n }\n\n /**\n * Takes the union of the given metadata array.\n * It will ensure that the cardinality metadata value is properly calculated.\n * @param {{[p: string]: any}[]} metadatas Array of metadata.\n * @param bindings If the union of the variables field should also be taken.\n * @param context The action context\n * @param mediatorRdfMetadataAccumulate Mediator for metadata accumulation\n * @return {{[p: string]: any}} Union of the metadata.\n */\n public static async unionMetadata<\n Bindings extends boolean,\n M extends (Bindings extends true ? MetadataBindings : MetadataQuads),\n >(\n metadatas: M[],\n bindings: Bindings,\n context: IActionContext,\n mediatorRdfMetadataAccumulate: MediatorRdfMetadataAccumulate,\n // eslint-disable-next-line function-paren-newline\n ): Promise {\n let accumulatedMetadata: M = (await mediatorRdfMetadataAccumulate\n .mediate({ mode: 'initialize', context })).metadata;\n\n // Accumulate cardinality\n for (const appendingMetadata of metadatas) {\n accumulatedMetadata = {\n ...appendingMetadata,\n ...(await mediatorRdfMetadataAccumulate\n .mediate({\n mode: 'append',\n accumulatedMetadata: accumulatedMetadata,\n appendingMetadata: appendingMetadata,\n context,\n })).metadata,\n };\n }\n\n // Create new metadata state\n accumulatedMetadata.state = new MetadataValidationState();\n\n // Propagate metadata invalidations\n const invalidateListener = (): void => accumulatedMetadata.state.invalidate();\n for (const metadata of metadatas) {\n metadata.state.addInvalidateListener(invalidateListener);\n }\n\n // Union variables\n if (bindings) {\n accumulatedMetadata.variables = ActorQueryOperationUnion\n .unionVariables(metadatas.map(metadata => metadata.variables));\n }\n\n return accumulatedMetadata;\n }\n\n public async testOperation(_operation: Algebra.Union, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Union, context: IActionContext):\n Promise {\n // Determine the type over which we are taking a union\n const outputsRaw = await Promise.all(operation.input\n .map(subOperation => this.mediatorQueryOperation.mediate({ operation: subOperation, context })));\n let outputType: string | undefined;\n for (const output of outputsRaw) {\n if (outputType === undefined) {\n outputType = output.type;\n } else if (outputType !== output.type) {\n throw new Error(`Unable to union ${outputType} and ${output.type}`);\n }\n }\n\n // Handle bindings\n if (outputType === 'bindings' || operation.input.length === 0) {\n const outputs: IQueryOperationResultBindings[] = outputsRaw.map(ActorQueryOperation.getSafeBindings);\n\n const bindingsStream: BindingsStream = new UnionIterator(outputs.map(\n (output: IQueryOperationResultBindings) => output.bindingsStream,\n ), { autoStart: false });\n\n const metadata: () => Promise = () => Promise.all(outputs.map(output => output.metadata()))\n .then(subMeta => ActorQueryOperationUnion\n .unionMetadata(subMeta, true, context, this.mediatorRdfMetadataAccumulate));\n return { type: 'bindings', bindingsStream, metadata };\n }\n\n // Handle quads\n if (outputType === 'quads') {\n const outputs: IQueryOperationResultQuads[] = outputsRaw.map(ActorQueryOperation.getSafeQuads);\n\n const quadStream = new UnionIterator(outputs.map(\n (output: IQueryOperationResultQuads) => output.quadStream,\n ), { autoStart: false });\n\n const metadata: () => Promise = () => Promise.all(outputs.map(output => output.metadata()))\n .then(subMeta => ActorQueryOperationUnion\n .unionMetadata(subMeta, false, context, this.mediatorRdfMetadataAccumulate));\n return { type: 'quads', quadStream, metadata };\n }\n\n // Throw otherwise\n throw new Error(`Unable to union ${outputType}`);\n }\n}\n\nexport interface IActorQueryOperationUnionArgs extends IActorQueryOperationTypedMediatedArgs {\n mediatorRdfMetadataAccumulate: MediatorRdfMetadataAccumulate;\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type {\n MediatorRdfUpdateQuads,\n} from '@comunica/bus-rdf-update-quads';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport type { Algebra } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\n\n/**\n * A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation) actor\n * that handles SPARQL clear operations.\n */\nexport class ActorQueryOperationClear extends ActorQueryOperationTypedMediated {\n public readonly mediatorUpdateQuads: MediatorRdfUpdateQuads;\n\n public constructor(args: IActorQueryOperationClearArgs) {\n super(args, 'clear');\n }\n\n public async testOperation(operation: Algebra.Clear, context: IActionContext): Promise {\n ActorQueryOperation.throwOnReadOnly(context);\n return true;\n }\n\n public async runOperation(operation: Algebra.Clear, context: IActionContext):\n Promise {\n // Delegate to update-quads bus\n let graphs: RDF.DefaultGraph | 'NAMED' | 'ALL' | RDF.NamedNode[];\n if (operation.source === 'DEFAULT') {\n graphs = DF.defaultGraph();\n } else if (typeof operation.source === 'string') {\n graphs = operation.source;\n } else {\n graphs = [ operation.source ];\n }\n const { execute } = await this.mediatorUpdateQuads.mediate({\n deleteGraphs: {\n graphs,\n requireExistence: !operation.silent,\n dropGraphs: false,\n },\n context,\n });\n\n return {\n type: 'void',\n execute,\n };\n }\n}\n\nexport interface IActorQueryOperationClearArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * The RDF Update Quads mediator\n */\n mediatorUpdateQuads: MediatorRdfUpdateQuads;\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Update CompositeUpdate Query Operation Actor.\n */\nexport class ActorQueryOperationUpdateCompositeUpdate\n extends ActorQueryOperationTypedMediated {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, 'compositeupdate');\n }\n\n public async testOperation(\n operation: Algebra.CompositeUpdate,\n context: IActionContext,\n ): Promise {\n ActorQueryOperation.throwOnReadOnly(context);\n return true;\n }\n\n public async runOperation(operationOriginal: Algebra.CompositeUpdate, context: IActionContext):\n Promise {\n const execute = (): Promise => (async(): Promise => {\n // Execute update operations in sequence\n for (const operation of operationOriginal.updates) {\n const subResult = ActorQueryOperation\n .getSafeVoid(await this.mediatorQueryOperation.mediate({ operation, context }));\n await subResult.execute();\n }\n })();\n\n return {\n type: 'void',\n execute,\n };\n }\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { MediatorRdfUpdateQuads } from '@comunica/bus-rdf-update-quads';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation) actor that\n * handles SPARQL create operations.\n */\nexport class ActorQueryOperationCreate extends ActorQueryOperationTypedMediated {\n public readonly mediatorUpdateQuads: MediatorRdfUpdateQuads;\n\n public constructor(args: IActorQueryOperationCreateArgs) {\n super(args, 'create');\n }\n\n public async testOperation(operation: Algebra.Create, context: IActionContext): Promise {\n ActorQueryOperation.throwOnReadOnly(context);\n return true;\n }\n\n public async runOperation(operation: Algebra.Create, context: IActionContext):\n Promise {\n // Delegate to update-quads bus\n const { execute } = await this.mediatorUpdateQuads.mediate({\n createGraphs: {\n graphs: [ operation.source ],\n requireNonExistence: !operation.silent,\n },\n context,\n });\n\n return {\n type: 'void',\n execute,\n };\n }\n}\n\nexport interface IActorQueryOperationCreateArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * The RDF Update Quads mediator\n */\n mediatorUpdateQuads: MediatorRdfUpdateQuads;\n}\n","import { BindingsToQuadsIterator } from '@comunica/actor-query-operation-construct';\nimport { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { MediatorRdfUpdateQuads } from '@comunica/bus-rdf-update-quads';\nimport type { IActorTest } from '@comunica/core';\nimport type { IQueryOperationResult, BindingsStream, IActionContext } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { ArrayIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Update DeleteInsert Query Operation Actor.\n */\nexport class ActorQueryOperationUpdateDeleteInsert extends ActorQueryOperationTypedMediated {\n public readonly mediatorUpdateQuads: MediatorRdfUpdateQuads;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n protected blankNodeCounter = 0;\n\n public constructor(args: IActorQueryOperationUpdateDeleteInsertArgs) {\n super(args, 'deleteinsert');\n }\n\n public async testOperation(\n operation: Algebra.DeleteInsert,\n context: IActionContext,\n ): Promise {\n ActorQueryOperation.throwOnReadOnly(context);\n return true;\n }\n\n public async runOperation(operation: Algebra.DeleteInsert, context: IActionContext):\n Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n // Evaluate the where clause\n const whereBindings: BindingsStream = operation.where ?\n ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation\n .mediate({ operation: operation.where, context })).bindingsStream :\n new ArrayIterator([ bindingsFactory.bindings() ], { autoStart: false });\n\n // Construct triples using the result based on the pattern.\n let quadStreamInsert: AsyncIterator | undefined;\n let quadStreamDelete: AsyncIterator | undefined;\n if (operation.insert) {\n // Localize blank nodes in pattern, to avoid clashes across different INSERT/DELETE calls\n quadStreamInsert = new BindingsToQuadsIterator(\n operation.insert.map(BindingsToQuadsIterator.localizeQuad.bind(null, this.blankNodeCounter)),\n whereBindings.clone(),\n );\n this.blankNodeCounter++;\n }\n if (operation.delete) {\n // Localize blank nodes in pattern, to avoid clashes across different INSERT/DELETE calls\n quadStreamDelete = new BindingsToQuadsIterator(\n operation.delete.map(BindingsToQuadsIterator.localizeQuad.bind(null, this.blankNodeCounter)),\n whereBindings.clone(),\n );\n this.blankNodeCounter++;\n }\n\n // Evaluate the required modifications\n const { execute } = await this.mediatorUpdateQuads.mediate({\n quadStreamInsert,\n quadStreamDelete,\n context,\n });\n\n return {\n type: 'void',\n execute,\n };\n }\n}\n\nexport interface IActorQueryOperationUpdateDeleteInsertArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * The RDF Update Quads mediator\n */\n mediatorUpdateQuads: MediatorRdfUpdateQuads;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { MediatorRdfUpdateQuads } from '@comunica/bus-rdf-update-quads';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport type { Algebra } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\n\n/**\n * A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation) actor\n * that handles SPARQL drop operations.\n */\nexport class ActorQueryOperationDrop extends ActorQueryOperationTypedMediated {\n public readonly mediatorUpdateQuads: MediatorRdfUpdateQuads;\n\n public constructor(args: IActorQueryOperationDropArgs) {\n super(args, 'drop');\n }\n\n public async testOperation(operation: Algebra.Drop, context: IActionContext): Promise {\n ActorQueryOperation.throwOnReadOnly(context);\n return true;\n }\n\n public async runOperation(operation: Algebra.Drop, context: IActionContext):\n Promise {\n // Delegate to update-quads bus\n let graphs: RDF.DefaultGraph | 'NAMED' | 'ALL' | RDF.NamedNode[];\n if (operation.source === 'DEFAULT') {\n graphs = DF.defaultGraph();\n } else if (typeof operation.source === 'string') {\n graphs = operation.source;\n } else {\n graphs = [ operation.source ];\n }\n const { execute } = await this.mediatorUpdateQuads.mediate({\n deleteGraphs: {\n graphs,\n requireExistence: !operation.silent,\n dropGraphs: true,\n },\n context,\n });\n\n return {\n type: 'void',\n execute,\n };\n }\n}\n\nexport interface IActorQueryOperationDropArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * The RDF Update Quads mediator\n */\n mediatorUpdateQuads: MediatorRdfUpdateQuads;\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { MediatorQuerySourceIdentify } from '@comunica/bus-query-source-identify';\nimport type { MediatorRdfUpdateQuads } from '@comunica/bus-rdf-update-quads';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { Factory } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\n\n/**\n * A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation) actor\n * that handles SPARQL load operations.\n */\nexport class ActorQueryOperationLoad extends ActorQueryOperationTypedMediated {\n public readonly mediatorUpdateQuads: MediatorRdfUpdateQuads;\n public readonly mediatorQuerySourceIdentify: MediatorQuerySourceIdentify;\n\n private readonly factory: Factory;\n private readonly constructOperation: Algebra.Construct;\n\n public constructor(args: IActorQueryOperationLoadArgs) {\n super(args, 'load');\n this.factory = new Factory();\n }\n\n public async testOperation(operation: Algebra.Load, context: IActionContext): Promise {\n ActorQueryOperation.throwOnReadOnly(context);\n return true;\n }\n\n public async runOperation(operation: Algebra.Load, context: IActionContext):\n Promise {\n // Determine query source\n let subContext = context;\n if (operation.silent) {\n subContext = subContext.set(KeysInitQuery.lenient, true);\n }\n const { querySource } = await this.mediatorQuerySourceIdentify.mediate({\n querySourceUnidentified: { value: operation.source.value },\n context: subContext,\n });\n\n // Create CONSTRUCT query on the given source\n const output = ActorQueryOperationLoad.getSafeQuads(await this.mediatorQueryOperation.mediate({\n operation: this.factory.createConstruct(\n ActorQueryOperation.assignOperationSource(\n this.factory.createPattern(DF.variable('s'), DF.variable('p'), DF.variable('o')),\n querySource,\n ),\n [ this.factory.createPattern(DF.variable('s'), DF.variable('p'), DF.variable('o')) ],\n ),\n context: subContext,\n }));\n\n // Determine quad stream to insert\n let quadStream = output.quadStream;\n if (operation.destination) {\n quadStream = quadStream.map(quad => DF.quad(quad.subject, quad.predicate, quad.object, operation.destination));\n }\n\n // Insert quad stream\n const { execute } = await this.mediatorUpdateQuads.mediate({\n quadStreamInsert: quadStream,\n context,\n });\n\n return {\n type: 'void',\n execute,\n };\n }\n}\n\nexport interface IActorQueryOperationLoadArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * The RDF Update Quads mediator\n */\n mediatorUpdateQuads: MediatorRdfUpdateQuads;\n /**\n * Mediator for identifying load sources.\n */\n mediatorQuerySourceIdentify: MediatorQuerySourceIdentify;\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActionQueryOperation } from '@comunica/bus-query-operation';\nimport { ActorQueryOperationTyped } from '@comunica/bus-query-operation';\nimport type { IActorArgs, IActorTest } from '@comunica/core';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type {\n IQueryOperationResult,\n BindingsStream,\n Bindings,\n IActionContext,\n MetadataBindings,\n} from '@comunica/types';\nimport { ArrayIterator } from 'asynciterator';\nimport { DataFactory } from 'rdf-data-factory';\nimport type { Algebra } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\n\n/**\n * A comunica Values Query Operation Actor.\n */\nexport class ActorQueryOperationValues extends ActorQueryOperationTyped {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationUpdateDeleteInsertArgs) {\n super(args, 'values');\n }\n\n public async testOperation(_operation: Algebra.Values, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Values, context: IActionContext):\n Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n const bindingsStream: BindingsStream = new ArrayIterator(operation.bindings\n .map(x => bindingsFactory.bindings(Object.entries(x)\n .map(([ key, value ]) => [ DF.variable(key.slice(1)), value ]))));\n const variables = operation.variables;\n const metadata = (): Promise => Promise.resolve({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: operation.bindings.length },\n canContainUndefs: operation.bindings.some(bindings => variables.some(variable => !(`?${variable.value}` in bindings))),\n variables,\n });\n return { type: 'bindings', bindingsStream, metadata };\n }\n}\n\nexport interface IActorQueryOperationUpdateDeleteInsertArgs extends\n IActorArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type { IActionQueryParse, IActorQueryParseArgs, IActorQueryParseOutput } from '@comunica/bus-query-parse';\nimport { ActorQueryParse } from '@comunica/bus-query-parse';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport { Converter } from 'graphql-to-sparql';\n\n/**\n * A comunica GraphQL SPARQL Parse Actor.\n */\nexport class ActorQueryParseGraphql extends ActorQueryParse {\n private readonly graphqlToSparql: Converter;\n\n public constructor(args: IActorQueryParseArgs) {\n super(args);\n this.graphqlToSparql = new Converter({ requireContext: true });\n }\n\n public async test(action: IActionQueryParse): Promise {\n if (action.queryFormat?.language !== 'graphql') {\n throw new Error('This actor can only parse GraphQL queries');\n }\n return true;\n }\n\n public async run(action: IActionQueryParse): Promise {\n const context: any = action.context.get(KeysInitQuery.jsonLdContext) || {};\n const options = {\n // eslint-disable-next-line ts/no-unnecessary-type-assertion\n singularizeVariables: action.context.get(KeysInitQuery.graphqlSingularizeVariables),\n };\n return { operation: await this.graphqlToSparql.graphqlToSparqlAlgebra(action.query, context, options) };\n }\n}\n","import type { IActionQueryParse, IActorQueryParseArgs, IActorQueryParseOutput } from '@comunica/bus-query-parse';\nimport { ActorQueryParse } from '@comunica/bus-query-parse';\nimport type { IActorTest } from '@comunica/core';\nimport { translate } from 'sparqlalgebrajs';\nimport { Parser as SparqlParser } from 'sparqljs';\n\n/**\n * A comunica Algebra SPARQL Parse Actor.\n */\nexport class ActorQueryParseSparql extends ActorQueryParse {\n public readonly prefixes: Record;\n\n public constructor(args: IActorQueryParseSparqlArgs) {\n super(args);\n this.prefixes = Object.freeze(this.prefixes);\n }\n\n public async test(action: IActionQueryParse): Promise {\n if (action.queryFormat && action.queryFormat.language !== 'sparql') {\n throw new Error('This actor can only parse SPARQL queries');\n }\n return true;\n }\n\n public async run(action: IActionQueryParse): Promise {\n const parser = new SparqlParser({ prefixes: this.prefixes, baseIRI: action.baseIRI, sparqlStar: true });\n const parsedSyntax = parser.parse(action.query);\n const baseIRI = parsedSyntax.type === 'query' ? parsedSyntax.base : undefined;\n return {\n baseIRI,\n operation: translate(parsedSyntax, {\n quads: true,\n prefixes: this.prefixes,\n blankToVariable: true,\n baseIRI: action.baseIRI,\n }),\n };\n }\n}\n\nexport interface IActorQueryParseSparqlArgs extends IActorQueryParseArgs {\n /**\n * Default prefixes to use\n * @range {json}\n * @default {{\n * \"rdf\": \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\",\n * \"rdfs\": \"http://www.w3.org/2000/01/rdf-schema#\",\n * \"owl\": \"http://www.w3.org/2002/07/owl#\",\n * \"xsd\": \"http://www.w3.org/2001/XMLSchema#\",\n * \"dc\": \"http://purl.org/dc/terms/\",\n * \"dcterms\": \"http://purl.org/dc/terms/\",\n * \"dc11\": \"http://purl.org/dc/elements/1.1/\",\n * \"foaf\": \"http://xmlns.com/foaf/0.1/\",\n * \"geo\": \"http://www.w3.org/2003/01/geo/wgs84_pos#\",\n * \"dbpedia\": \"http://dbpedia.org/resource/\",\n * \"dbpedia-owl\": \"http://dbpedia.org/ontology/\",\n * \"dbpprop\": \"http://dbpedia.org/property/\",\n * \"schema\": \"http://schema.org/\",\n * \"skos\": \"http://www.w3.org/2008/05/skos#\"\n * }}\n */\n prefixes?: Record;\n}\n","import type {\n IActionQueryProcess,\n IActorQueryProcessOutput,\n IActorQueryProcessArgs,\n IQueryProcessSequential,\n} from '@comunica/bus-query-process';\nimport {\n ActorQueryProcess,\n} from '@comunica/bus-query-process';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport { ActionContextKey } from '@comunica/core';\n\n/**\n * A comunica Explain Logical Query Process Actor.\n */\nexport class ActorQueryProcessExplainLogical extends ActorQueryProcess {\n public readonly queryProcessor: IQueryProcessSequential;\n\n public constructor(args: IActorQueryProcessExplainLogicalArgs) {\n super(args);\n }\n\n public async test(action: IActionQueryProcess): Promise {\n if ((action.context.get(KeysInitQuery.explain) ||\n action.context.get(new ActionContextKey('explain'))) !== 'logical') {\n throw new Error(`${this.name} can only explain in 'logical' mode.`);\n }\n return true;\n }\n\n public async run(action: IActionQueryProcess): Promise {\n // Parse and optimize the query\n let { operation, context } = await this.queryProcessor.parse(action.query, action.context);\n ({ operation, context } = await this.queryProcessor.optimize(operation, context));\n\n return {\n result: {\n explain: true,\n type: 'logical',\n data: operation,\n },\n };\n }\n}\n\nexport interface IActorQueryProcessExplainLogicalArgs extends IActorQueryProcessArgs {\n queryProcessor: IQueryProcessSequential;\n}\n","import type {\n IActionQueryProcess,\n IActorQueryProcessOutput,\n IActorQueryProcessArgs,\n IQueryProcessSequential,\n} from '@comunica/bus-query-process';\nimport {\n ActorQueryProcess,\n} from '@comunica/bus-query-process';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport { ActionContextKey } from '@comunica/core';\n\n/**\n * A comunica Explain Parsed Query Process Actor.\n */\nexport class ActorQueryProcessExplainParsed extends ActorQueryProcess {\n public readonly queryProcessor: IQueryProcessSequential;\n\n public constructor(args: IActorQueryProcessExplainParsedArgs) {\n super(args);\n }\n\n public async test(action: IActionQueryProcess): Promise {\n if ((action.context.get(KeysInitQuery.explain) ||\n action.context.get(new ActionContextKey('explain'))) !== 'parsed') {\n throw new Error(`${this.name} can only explain in 'parsed' mode.`);\n }\n return true;\n }\n\n public async run(action: IActionQueryProcess): Promise {\n // Parse the query\n const { operation } = await this.queryProcessor.parse(action.query, action.context);\n\n return {\n result: {\n explain: true,\n type: 'parsed',\n data: operation,\n },\n };\n }\n}\n\nexport interface IActorQueryProcessExplainParsedArgs extends IActorQueryProcessArgs {\n queryProcessor: IQueryProcessSequential;\n}\n","import type {\n IActionQueryProcess,\n IActorQueryProcessOutput,\n IActorQueryProcessArgs,\n IQueryProcessSequential,\n} from '@comunica/bus-query-process';\nimport {\n ActorQueryProcess,\n} from '@comunica/bus-query-process';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport { ActionContextKey } from '@comunica/core';\nimport { MemoryPhysicalQueryPlanLogger } from './MemoryPhysicalQueryPlanLogger';\n\n/**\n * A comunica Explain Physical Query Process Actor.\n */\nexport class ActorQueryProcessExplainPhysical extends ActorQueryProcess {\n public readonly queryProcessor: IQueryProcessSequential;\n\n public constructor(args: IActorQueryProcessExplainPhysicalArgs) {\n super(args);\n }\n\n public async test(action: IActionQueryProcess): Promise {\n const mode = (action.context.get(KeysInitQuery.explain) || action.context.get(new ActionContextKey('explain')));\n if (mode !== 'physical' && mode !== 'physical-json') {\n throw new Error(`${this.name} can only explain in 'physical' or 'physical-json' mode.`);\n }\n return true;\n }\n\n public async run(action: IActionQueryProcess): Promise {\n // Run all query processing steps in sequence\n\n let { operation, context } = await this.queryProcessor.parse(action.query, action.context);\n ({ operation, context } = await this.queryProcessor.optimize(operation, context));\n\n // If we need a physical query plan, store a physical query plan logger in the context, and collect it after exec\n const physicalQueryPlanLogger = new MemoryPhysicalQueryPlanLogger();\n context = context.set(KeysInitQuery.physicalQueryPlanLogger, physicalQueryPlanLogger);\n\n const output = await this.queryProcessor.evaluate(operation, context);\n\n // Make sure the whole result is produced\n switch (output.type) {\n case 'bindings':\n await output.bindingsStream.toArray();\n break;\n case 'quads':\n await output.quadStream.toArray();\n break;\n case 'boolean':\n await output.execute();\n break;\n case 'void':\n await output.execute();\n break;\n }\n\n const mode: 'physical' | 'physical-json' = (action.context.get(KeysInitQuery.explain) ??\n action.context.getSafe(new ActionContextKey('explain')));\n return {\n result: {\n explain: true,\n type: mode,\n data: mode === 'physical' ? physicalQueryPlanLogger.toCompactString() : physicalQueryPlanLogger.toJson(),\n },\n };\n }\n}\n\nexport interface IActorQueryProcessExplainPhysicalArgs extends IActorQueryProcessArgs {\n queryProcessor: IQueryProcessSequential;\n}\n","import type { IPhysicalQueryPlanLogger, IPlanNode } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { termToString } from 'rdf-string';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A physical query plan logger that stores everything in memory.\n */\nexport class MemoryPhysicalQueryPlanLogger implements IPhysicalQueryPlanLogger {\n private readonly planNodes: Map;\n private rootNode: IPlanNode | undefined;\n\n public constructor() {\n this.planNodes = new Map();\n }\n\n public logOperation(\n logicalOperator: string,\n physicalOperator: string | undefined,\n node: any,\n parentNode: any,\n actor: string,\n metadata: any,\n ): void {\n const planNode: IPlanNode = {\n actor,\n logicalOperator,\n physicalOperator,\n rawNode: node,\n children: [],\n metadata,\n };\n this.planNodes.set(node, planNode);\n\n if (this.rootNode) {\n if (!parentNode) {\n throw new Error(`Detected more than one parent-less node`);\n }\n const planParentNode = this.planNodes.get(parentNode);\n if (!planParentNode) {\n throw new Error(`Could not find parent node`);\n }\n planParentNode.children.push(planNode);\n } else {\n if (parentNode) {\n throw new Error(`No root node has been set yet, while a parent is being referenced`);\n }\n this.rootNode = planNode;\n }\n }\n\n public stashChildren(node: any, filter?: (planNodeFilter: IPlanNode) => boolean): void {\n const planNode = this.planNodes.get(node);\n if (!planNode) {\n throw new Error(`Could not find plan node`);\n }\n planNode.children = filter ? planNode.children.filter(filter) : [];\n }\n\n public unstashChild(\n node: any,\n parentNode: any,\n ): void {\n const planNode = this.planNodes.get(node);\n if (planNode) {\n const planParentNode = this.planNodes.get(parentNode);\n if (!planParentNode) {\n throw new Error(`Could not find plan parent node`);\n }\n planParentNode.children.push(planNode);\n }\n }\n\n public appendMetadata(\n node: any,\n metadata: any,\n ): void {\n const planNode = this.planNodes.get(node);\n if (planNode) {\n planNode.metadata = {\n ...planNode.metadata,\n ...metadata,\n };\n }\n }\n\n public toJson(): IPlanNodeJson | Record {\n return this.rootNode ? this.planNodeToJson(this.rootNode) : {};\n }\n\n private planNodeToJson(node: IPlanNode): IPlanNodeJson {\n const data: IPlanNodeJson = {\n logical: node.logicalOperator,\n physical: node.physicalOperator,\n ...this.getLogicalMetadata(node.rawNode),\n ...this.compactMetadata(node.metadata),\n };\n\n if (node.children.length > 0) {\n data.children = node.children.map(child => this.planNodeToJson(child));\n }\n\n // Special case: compact children for bind joins.\n if (data.physical === 'bind' && data.children) {\n // Group children by query plan format\n const childrenGrouped: Record = {};\n for (const child of data.children) {\n const lastSubChild = child.children?.at(-1) ?? child;\n const key = this.getPlanHash(lastSubChild).join(',');\n if (!childrenGrouped[key]) {\n childrenGrouped[key] = [];\n }\n childrenGrouped[key].push(child);\n }\n\n // Compact query plan occurrences\n const childrenCompact: IPlanNodeJsonChildCompact[] = [];\n for (const children of Object.values(childrenGrouped)) {\n childrenCompact.push({\n occurrences: children.length,\n firstOccurrence: children[0],\n });\n }\n\n // Replace children with compacted representation\n data.childrenCompact = childrenCompact;\n delete data.children;\n }\n\n return data;\n }\n\n private getPlanHash(node: IPlanNodeJson): string[] {\n let entries = [ `${node.logical}-${node.physical}` ];\n if (node.children) {\n entries = [\n ...entries,\n ...node.children.flatMap(child => this.getPlanHash(child)),\n ];\n } else if (node.childrenCompact) {\n entries = [\n ...entries,\n ...node.childrenCompact.flatMap(child => this.getPlanHash(child.firstOccurrence)),\n ];\n }\n return entries;\n }\n\n private compactMetadata(metadata: any): any {\n return Object.fromEntries(Object.entries(metadata)\n .map(([ key, value ]) => [ key, this.compactMetadataValue(value) ]));\n }\n\n private compactMetadataValue(value: any): any {\n return value && typeof value === 'object' && 'termType' in value ? this.getLogicalMetadata(value) : value;\n }\n\n private getLogicalMetadata(rawNode: any): IPlanNodeJsonLogicalMetadata {\n const data: IPlanNodeJsonLogicalMetadata = {};\n\n if ('type' in rawNode) {\n const operation: Algebra.Operation = rawNode;\n\n if (operation.metadata?.scopedSource) {\n data.source = ( operation.metadata.scopedSource).source.toString();\n }\n\n // eslint-disable-next-line ts/switch-exhaustiveness-check\n switch (operation.type) {\n case 'pattern':\n data.pattern = this.quadToString(operation);\n break;\n case 'project':\n data.variables = operation.variables.map(variable => variable.value);\n break;\n }\n }\n\n return data;\n }\n\n private quadToString(quad: RDF.BaseQuad): string {\n return `${termToString(quad.subject)} ${termToString(quad.predicate)} ${termToString(quad.object)}${quad.graph.termType === 'DefaultGraph' ? '' : ` ${termToString(quad.graph)}`}`;\n }\n\n public toCompactString(): string {\n const node = this.toJson();\n const lines: string[] = [];\n const sources: Map = new Map();\n\n if ('logical' in node) {\n this.nodeToCompactString(lines, sources, '', node);\n } else {\n lines.push('Empty');\n }\n\n if (sources.size > 0) {\n lines.push('');\n lines.push('sources:');\n for (const [ key, id ] of sources.entries()) {\n lines.push(` ${id}: ${key}`);\n }\n }\n\n return lines.join('\\n');\n }\n\n public nodeToCompactString(\n lines: string[],\n sources: Map,\n indent: string,\n node: IPlanNodeJson,\n metadata?: string,\n ): void {\n let sourceId: number | undefined;\n if (node.source) {\n sourceId = sources.get(node.source);\n if (sourceId === undefined) {\n sourceId = sources.size;\n sources.set(node.source, sourceId);\n }\n }\n\n lines.push(`${\n indent}${\n node.logical}${\n node.physical ? `(${node.physical})` : ''}${\n node.pattern ? ` (${node.pattern})` : ''}${\n node.variables ? ` (${node.variables.join(',')})` : ''}${\n node.bindOperation ? ` bindOperation:(${node.bindOperation.pattern}) bindCardEst:${node.bindOperationCardinality.type === 'estimate' ? '~' : ''}${numberToString(node.bindOperationCardinality.value)}` : ''}${\n node.cardinality ? ` cardEst:${node.cardinality.type === 'estimate' ? '~' : ''}${numberToString(node.cardinality.value)}` : ''}${\n node.source ? ` src:${sourceId}` : ''}${\n node.cardinalityReal ? ` cardReal:${node.cardinalityReal}` : ''}${\n node.timeSelf ? ` timeSelf:${numberToString(node.timeSelf)}ms` : ''}${\n node.timeLife ? ` timeLife:${numberToString(node.timeLife)}ms` : ''}${\n metadata ? ` ${metadata}` : ''}`);\n for (const child of node.children ?? []) {\n this.nodeToCompactString(lines, sources, `${indent} `, child);\n }\n for (const child of node.childrenCompact ?? []) {\n this.nodeToCompactString(lines, sources, `${indent} `, child.firstOccurrence, `compacted-occurrences:${child.occurrences}`);\n }\n }\n}\n\nexport function numberToString(value: number): string {\n return value.toLocaleString('en-US', { minimumFractionDigits: 0, maximumFractionDigits: 3 });\n}\n\ninterface IPlanNodeJson extends IPlanNodeJsonLogicalMetadata {\n logical: string;\n physical?: string;\n [metadataKey: string]: any;\n children?: IPlanNodeJson[];\n childrenCompact?: IPlanNodeJsonChildCompact[];\n}\n\ninterface IPlanNodeJsonChildCompact {\n occurrences: number;\n firstOccurrence: IPlanNodeJson;\n}\n\ninterface IPlanNodeJsonLogicalMetadata {\n pattern?: string;\n source?: string;\n variables?: string[];\n cardinality?: RDF.QueryResultCardinality;\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorContextPreprocess } from '@comunica/bus-context-preprocess';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { MediatorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport type { MediatorQueryOperation } from '@comunica/bus-query-operation';\nimport { materializeOperation } from '@comunica/bus-query-operation';\nimport type { MediatorQueryParse } from '@comunica/bus-query-parse';\nimport type {\n IActionQueryProcess,\n IActorQueryProcessOutput,\n IActorQueryProcessArgs,\n IQueryProcessSequential,\n IQueryProcessSequentialOutput,\n} from '@comunica/bus-query-process';\nimport {\n ActorQueryProcess,\n} from '@comunica/bus-query-process';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport { ActionContextKey } from '@comunica/core';\nimport type {\n IActionContext,\n IQueryOperationResult,\n QueryFormatType,\n} from '@comunica/types';\n\nimport type * as RDF from '@rdfjs/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Sequential Query Process Actor.\n */\nexport class ActorQueryProcessSequential extends ActorQueryProcess implements IQueryProcessSequential {\n public readonly mediatorContextPreprocess: MediatorContextPreprocess;\n public readonly mediatorQueryParse: MediatorQueryParse;\n public readonly mediatorOptimizeQueryOperation: MediatorOptimizeQueryOperation;\n public readonly mediatorQueryOperation: MediatorQueryOperation;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryProcessSequentialArgs) {\n super(args);\n }\n\n public async test(action: IActionQueryProcess): Promise {\n if (action.context.get(KeysInitQuery.explain) || action.context.get(new ActionContextKey('explain'))) {\n throw new Error(`${this.name} is not able to explain queries.`);\n }\n return true;\n }\n\n public async run(action: IActionQueryProcess): Promise {\n // Run all query processing steps in sequence\n let { operation, context } = await this.parse(action.query, action.context);\n ({ operation, context } = await this.optimize(operation, context));\n const output = await this.evaluate(operation, context);\n\n return { result: output };\n }\n\n public async parse(query: QueryFormatType, context: IActionContext): Promise {\n // Pre-processing the context\n context = (await this.mediatorContextPreprocess.mediate({ context, initialize: true })).context;\n\n // Parse query\n let operation: Algebra.Operation;\n if (typeof query === 'string') {\n // Save the original query string in the context\n context = context.set(KeysInitQuery.queryString, query);\n\n const baseIRI: string | undefined = context.get(KeysInitQuery.baseIRI);\n const queryFormat: RDF.QueryFormat = context.get(KeysInitQuery.queryFormat)!;\n const queryParseOutput = await this.mediatorQueryParse.mediate({ context, query, queryFormat, baseIRI });\n operation = queryParseOutput.operation;\n // Update the baseIRI in the context if the query modified it.\n if (queryParseOutput.baseIRI) {\n context = context.set(KeysInitQuery.baseIRI, queryParseOutput.baseIRI);\n }\n } else {\n operation = query;\n }\n\n // Apply initial bindings in context\n if (context.has(KeysInitQuery.initialBindings)) {\n const bindingsFactory = await BindingsFactory\n .create(this.mediatorMergeBindingsContext, context);\n operation = materializeOperation(operation, context.get(KeysInitQuery.initialBindings)!, bindingsFactory);\n\n // Delete the query string from the context, since our initial query might have changed\n context = context.delete(KeysInitQuery.queryString);\n }\n\n return { operation, context };\n }\n\n public async optimize(operation: Algebra.Operation, context: IActionContext): Promise {\n // Save initial query in context\n context = context.set(KeysInitQuery.query, operation);\n\n ({ operation, context } = await this.mediatorOptimizeQueryOperation.mediate({ context, operation }));\n\n // Save original query in context\n context = context.set(KeysInitQuery.query, operation);\n\n return { operation, context };\n }\n\n public async evaluate(operation: Algebra.Operation, context: IActionContext): Promise {\n const output = await this.mediatorQueryOperation.mediate({ context, operation });\n output.context = context;\n return output;\n }\n}\n\nexport interface IActorQueryProcessSequentialArgs extends IActorQueryProcessArgs {\n /**\n * The context processing combinator\n */\n mediatorContextPreprocess: MediatorContextPreprocess;\n /**\n * The query parse mediator\n */\n mediatorQueryParse: MediatorQueryParse;\n /**\n * The query operation optimize mediator\n */\n mediatorOptimizeQueryOperation: MediatorOptimizeQueryOperation;\n /**\n * The query operation mediator\n */\n mediatorQueryOperation: MediatorQueryOperation;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport { ActorQueryResultSerializeFixedMediaTypes } from '@comunica/bus-query-result-serialize';\nimport type {\n IActionContext,\n IQueryOperationResultBindings,\n IQueryOperationResultBoolean,\n IQueryOperationResultQuads,\n} from '@comunica/types';\nimport { wrap } from 'asynciterator';\nimport * as RdfString from 'rdf-string';\nimport { Readable } from 'readable-stream';\n\n/**\n * A comunica JSON Query Result Serialize Actor.\n */\nexport class ActorQueryResultSerializeJson extends ActorQueryResultSerializeFixedMediaTypes {\n /**\n * @param args -\n * \\ @defaultNested {{\n * \"application/json\": 1.0\n * }} mediaTypePriorities\n * \\ @defaultNested {{\n * \"application/json\": \"https://comunica.linkeddatafragments.org/#results_JSON\"\n * }} mediaTypeFormats\n */\n public constructor(args: IActorQueryResultSerializeFixedMediaTypesArgs) {\n super(args);\n }\n\n public override async testHandleChecked(action: IActionSparqlSerialize, _context: IActionContext): Promise {\n if (![ 'bindings', 'quads', 'boolean' ].includes(action.type)) {\n throw new Error('This actor can only handle bindings or quad streams.');\n }\n return true;\n }\n\n public async runHandle(action: IActionSparqlSerialize, _mediaType: string, _context: IActionContext):\n Promise {\n const data = new Readable();\n data._read = () => {\n // Do nothing\n };\n\n if (action.type === 'bindings' || action.type === 'quads') {\n let stream = action.type === 'bindings' ?\n wrap(( action).bindingsStream)\n .map(element => JSON.stringify(Object.fromEntries([ ...element ]\n .map(([ key, value ]) => [ key.value, RdfString.termToString(value) ])))) :\n wrap(( action).quadStream)\n .map(element => JSON.stringify(RdfString.quadToStringQuad(element)));\n\n let empty = true;\n stream = stream.map((element) => {\n const ret = `${empty ? '' : ','}\\n${element}`;\n empty = false;\n return ret;\n }).prepend([ '[' ]).append([ '\\n]\\n' ]);\n\n data.wrap( stream);\n } else {\n try {\n data.push(`${JSON.stringify(await ( action).execute())}\\n`);\n data.push(null);\n } catch (error: unknown) {\n setTimeout(() => data.emit('error', error));\n }\n }\n\n return { data };\n }\n}\n","import type {\n IActorQueryResultSerializeArgs,\n IActorQueryResultSerializeOutput,\n IActionSparqlSerialize,\n} from '@comunica/bus-query-result-serialize';\nimport { ActorQueryResultSerialize } from '@comunica/bus-query-result-serialize';\nimport type {\n MediatorRdfSerializeHandle,\n MediatorRdfSerializeMediaTypeFormats,\n MediatorRdfSerializeMediaTypes,\n} from '@comunica/bus-rdf-serialize';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResultQuads } from '@comunica/types';\n\n/**\n * A comunica RDF Query Result Serialize Actor.\n *\n * It serializes quad streams (for example resulting from a CONSTRUCT query)\n * to an RDF syntax.\n */\nexport class ActorQueryResultSerializeRdf extends ActorQueryResultSerialize\n implements IActorQueryResultSerializeRdfArgs {\n public readonly mediatorRdfSerialize: MediatorRdfSerializeHandle;\n public readonly mediatorMediaTypeCombiner: MediatorRdfSerializeMediaTypes;\n public readonly mediatorMediaTypeFormatCombiner: MediatorRdfSerializeMediaTypeFormats;\n\n public constructor(args: IActorQueryResultSerializeRdfArgs) {\n super(args);\n }\n\n public async testHandle(action: IActionSparqlSerialize, mediaType: string, context: IActionContext):\n Promise {\n // Check if we are provided with a quad stream\n if (action.type !== 'quads') {\n throw new Error(`Actor ${this.name} can only handle quad streams`);\n }\n\n // Check if the given media type can be handled\n const { mediaTypes } = await this.mediatorMediaTypeCombiner.mediate(\n { context, mediaTypes: true },\n );\n if (!(mediaType in mediaTypes)) {\n throw new Error(`Actor ${this.name} can not handle media type ${mediaType}. All available types: ${\n // eslint-disable-next-line ts/restrict-template-expressions\n Object.keys(mediaTypes)}`);\n }\n return true;\n }\n\n public async runHandle(action: IActionSparqlSerialize, mediaType: string, context: IActionContext):\n Promise {\n // Delegate handling to the mediator\n return (await this.mediatorRdfSerialize.mediate({\n context,\n handle: {\n context,\n quadStream: ( action).quadStream,\n },\n handleMediaType: mediaType,\n })).handle;\n }\n\n public async testMediaType(_context: IActionContext): Promise {\n return true;\n }\n\n public async getMediaTypes(context: IActionContext): Promise> {\n return (await this.mediatorMediaTypeCombiner.mediate({ context, mediaTypes: true })).mediaTypes;\n }\n\n public async testMediaTypeFormats(_context: IActionContext): Promise {\n return true;\n }\n\n public async getMediaTypeFormats(context: IActionContext): Promise> {\n return (await this.mediatorMediaTypeFormatCombiner.mediate({ context, mediaTypeFormats: true })).mediaTypeFormats;\n }\n}\n\nexport interface IActorQueryResultSerializeRdfArgs extends IActorQueryResultSerializeArgs {\n mediatorRdfSerialize: MediatorRdfSerializeHandle;\n mediatorMediaTypeCombiner: MediatorRdfSerializeMediaTypes;\n mediatorMediaTypeFormatCombiner: MediatorRdfSerializeMediaTypeFormats;\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport { ActorQueryResultSerializeFixedMediaTypes } from '@comunica/bus-query-result-serialize';\nimport type {\n IActionContext,\n IQueryOperationResultBindings,\n IQueryOperationResultBoolean,\n IQueryOperationResultQuads,\n IQueryOperationResultVoid,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { wrap } from 'asynciterator';\nimport { termToString } from 'rdf-string';\nimport { Readable } from 'readable-stream';\n\n/**\n * A comunica Simple Sparql Serialize Actor.\n */\nexport class ActorQueryResultSerializeSimple extends ActorQueryResultSerializeFixedMediaTypes {\n /**\n * @param args -\n * \\ @defaultNested {{ \"simple\": 0.9 }} mediaTypePriorities\n * \\ @defaultNested {{ \"simple\": \"https://comunica.linkeddatafragments.org/#results_simple\" }} mediaTypeFormats\n */\n public constructor(args: IActorQueryResultSerializeFixedMediaTypesArgs) {\n super(args);\n }\n\n public override async testHandleChecked(action: IActionSparqlSerialize, _context: IActionContext): Promise {\n if (![ 'bindings', 'quads', 'boolean', 'void' ].includes(action.type)) {\n throw new Error('This actor can only handle bindings streams, quad streams, booleans, or updates.');\n }\n return true;\n }\n\n protected static termToString(term: RDF.Term): string {\n return term.termType === 'Quad' ? termToString(term) : term.value;\n }\n\n public async runHandle(action: IActionSparqlSerialize, _mediaType: string, _context: IActionContext):\n Promise {\n const data = new Readable();\n if (action.type === 'bindings') {\n data.wrap( (action).bindingsStream.map((bindings: RDF.Bindings) => `${[ ...bindings ].map(\n ([ key, value ]) => `?${key.value}: ${ActorQueryResultSerializeSimple.termToString(value)}`,\n ).join('\\n')}\\n\\n`));\n } else if (action.type === 'quads') {\n data.wrap( (action).quadStream.map(quad =>\n `subject: ${ActorQueryResultSerializeSimple.termToString(quad.subject)}\\n` +\n `predicate: ${ActorQueryResultSerializeSimple.termToString(quad.predicate)}\\n` +\n `object: ${ActorQueryResultSerializeSimple.termToString(quad.object)}\\n` +\n `graph: ${ActorQueryResultSerializeSimple.termToString(quad.graph)}\\n\\n`));\n } else {\n data.wrap( wrap(\n action.type === 'boolean' ?\n ( action).execute().then(value => [ `${value}\\n` ]) :\n (action).execute().then(() => [ 'ok\\n' ]),\n ));\n }\n\n return { data };\n }\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport {\n ActorQueryResultSerializeFixedMediaTypes,\n} from '@comunica/bus-query-result-serialize';\nimport type { Bindings, IActionContext, IQueryOperationResultBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { Readable } from 'readable-stream';\n\n/**\n * A comunica SPARQL CSV Query Result Serialize Actor.\n */\nexport class ActorQueryResultSerializeSparqlCsv extends ActorQueryResultSerializeFixedMediaTypes {\n /**\n * @param args -\n * \\ @defaultNested {{\n * \"text/csv\": 0.75\n * }} mediaTypePriorities\n * \\ @defaultNested {{\n * \"text/csv\": \"http://www.w3.org/ns/formats/SPARQL_Results_CSV\"\n * }} mediaTypeFormats\n */\n public constructor(args: IActorQueryResultSerializeFixedMediaTypesArgs) {\n super(args);\n }\n\n /**\n * Converts an RDF term to its CSV representation.\n * @param {RDF.Term} value An RDF term.\n * @return {string} A string representation of the given value.\n */\n public static bindingToCsvBindings(value?: RDF.Term): string {\n if (!value) {\n return '';\n }\n\n let stringValue = value.value;\n\n if (value.termType === 'Literal') {\n // This is a lossy representation, since language and datatype are not encoded in here.\n stringValue = `${stringValue}`;\n } else if (value.termType === 'BlankNode') {\n stringValue = `_:${stringValue}`;\n } else if (value.termType === 'Quad') {\n let object = ActorQueryResultSerializeSparqlCsv.bindingToCsvBindings(value.object);\n if (value.object.termType === 'Literal') {\n // If object is a literal, it must be put in quotes, and internal quotes must be escaped\n object = `\"${object.replaceAll('\"', '\"\"')}\"`;\n }\n stringValue = `<< ${ActorQueryResultSerializeSparqlCsv.bindingToCsvBindings(value.subject)} ${ActorQueryResultSerializeSparqlCsv.bindingToCsvBindings(value.predicate)} ${object} >>`;\n } else {\n stringValue = `<${stringValue}>`;\n }\n\n // If a value contains certain characters, put it between double quotes\n if (/[\",\\n\\r]/u.test(stringValue)) {\n // Within quote strings, \" is written using a pair of quotation marks \"\".\n stringValue = `\"${stringValue.replaceAll('\"', '\"\"')}\"`;\n }\n\n return stringValue;\n }\n\n public override async testHandleChecked(action: IActionSparqlSerialize, _context: IActionContext): Promise {\n if (action.type !== 'bindings') {\n throw new Error('This actor can only handle bindings streams.');\n }\n return true;\n }\n\n public async runHandle(action: IActionSparqlSerialize, _mediaType: string | undefined, _context: IActionContext):\n Promise {\n const bindingsAction = action;\n\n const data = new Readable();\n\n const metadata = await bindingsAction.metadata();\n\n // Write head\n data.push(`${metadata.variables.map(variable => variable.value).join(',')}\\r\\n`);\n\n // Write body\n data.wrap( bindingsAction.bindingsStream.map((bindings: Bindings) => `${metadata.variables\n .map(key => ActorQueryResultSerializeSparqlCsv.bindingToCsvBindings(bindings.get(key)))\n .join(',')}\\r\\n`));\n\n return { data };\n }\n}\n","import type { IActionHttp, IActorHttpOutput } from '@comunica/bus-http';\nimport type { ActorHttpInvalidateListenable } from '@comunica/bus-http-invalidate';\nimport type { Actor, IActionObserverArgs, IActorTest } from '@comunica/core';\nimport { ActionObserver } from '@comunica/core';\n\n/**\n * Observes HTTP actions, and maintains a counter of the number of requests.\n */\nexport class ActionObserverHttp extends ActionObserver {\n public readonly httpInvalidator: ActorHttpInvalidateListenable;\n public requests = 0;\n\n /* eslint-disable max-len */\n /**\n * @param args - @defaultNested {} bus\n */\n public constructor(args: IActionObserverHttpArgs) {\n super(args);\n this.bus.subscribeObserver(this);\n this.httpInvalidator.addInvalidateListener(() => {\n this.requests = 0;\n });\n }\n /* eslint-enable max-len */\n\n public onRun(\n _actor: Actor,\n _action: IActionHttp,\n _output: Promise,\n ): void {\n this.requests++;\n }\n}\n\nexport interface IActionObserverHttpArgs extends IActionObserverArgs {\n /* eslint-disable max-len */\n /**\n * An actor that listens to HTTP invalidation events\n * @default { a }\n */\n httpInvalidator: ActorHttpInvalidateListenable;\n /* eslint-enable max-len */\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport { ActorQueryResultSerializeFixedMediaTypes } from '@comunica/bus-query-result-serialize';\nimport type {\n IActionContext,\n IQueryOperationResultBindings,\n IQueryOperationResultBoolean,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { wrap } from 'asynciterator';\nimport { Readable } from 'readable-stream';\nimport type { ActionObserverHttp } from './ActionObserverHttp';\n\n/**\n * A comunica sparql-results+xml Serialize Actor.\n */\nexport class ActorQueryResultSerializeSparqlJson extends ActorQueryResultSerializeFixedMediaTypes {\n private readonly emitMetadata: boolean;\n public readonly httpObserver: ActionObserverHttp;\n\n /* eslint-disable max-len */\n /**\n * @param args -\n * \\ @defaultNested {{\n * \"application/sparql-results+json\": 0.8\n * }} mediaTypePriorities\n * \\ @defaultNested {{\n * \"application/sparql-results+json\": \"http://www.w3.org/ns/formats/SPARQL_Results_JSON\"\n * }} mediaTypeFormats\n * \\ @defaultNested {true} emitMetadata\n * \\ @defaultNested { a } httpObserver\n */\n public constructor(args: IActorQueryResultSerializeSparqlJsonArgs) {\n super(args);\n }\n /* eslint-enable max-len */\n\n /**\n * Converts an RDF term to its JSON representation.\n * @param {RDF.Term} value An RDF term.\n * @return {any} A JSON object.\n */\n public static bindingToJsonBindings(value: RDF.Term): any {\n if (value.termType === 'Literal') {\n const literal: RDF.Literal = value;\n const jsonValue: any = { value: literal.value, type: 'literal' };\n const { language, datatype } = literal;\n if (language) {\n jsonValue['xml:lang'] = language;\n } else if (datatype && datatype.value !== 'http://www.w3.org/2001/XMLSchema#string') {\n jsonValue.datatype = datatype.value;\n }\n return jsonValue;\n }\n if (value.termType === 'BlankNode') {\n return { value: value.value, type: 'bnode' };\n }\n if (value.termType === 'Quad') {\n return {\n value: {\n subject: ActorQueryResultSerializeSparqlJson.bindingToJsonBindings(value.subject),\n predicate: ActorQueryResultSerializeSparqlJson.bindingToJsonBindings(value.predicate),\n object: ActorQueryResultSerializeSparqlJson.bindingToJsonBindings(value.object),\n },\n type: 'triple',\n };\n }\n return { value: value.value, type: 'uri' };\n }\n\n public override async testHandleChecked(action: IActionSparqlSerialize, _context: IActionContext): Promise {\n if (![ 'bindings', 'boolean' ].includes(action.type)) {\n throw new Error('This actor can only handle bindings streams or booleans.');\n }\n return true;\n }\n\n public async runHandle(action: IActionSparqlSerialize, _mediaType: string | undefined, _context: IActionContext):\n Promise {\n const data = new Readable();\n // Write head\n const head: any = {};\n if (action.type === 'bindings') {\n const metadata = await ( action).metadata();\n if (metadata.variables.length > 0) {\n head.vars = metadata.variables.map(variable => variable.value);\n }\n }\n data.push(`{\"head\": ${JSON.stringify(head)},\\n`);\n\n if (action.type === 'bindings') {\n const resultStream = ( action).bindingsStream;\n data.push('\"results\": { \"bindings\": [\\n');\n\n let first = true;\n\n function* end(cb: () => string): Generator {\n yield cb();\n }\n\n // Write bindings\n data.wrap(\n // JSON SPARQL results spec does not allow unbound variables and blank node bindings\n wrap(resultStream).map((bindings) => {\n const res = `${first ? '' : ',\\n'}${JSON.stringify(Object.fromEntries([ ...bindings ]\n .map(([ key, value ]) => [ key.value, ActorQueryResultSerializeSparqlJson.bindingToJsonBindings(value) ])))}`;\n first = false;\n return res;\n }).append(wrap(end(() => `\\n]}${this.emitMetadata ? `,\\n\"metadata\": { \"httpRequests\": ${this.httpObserver.requests} }` : ''}}\\n`))),\n );\n } else {\n data.wrap( wrap(( action).execute().then(value => [ `\"boolean\":${value}\\n}\\n` ])));\n }\n\n return { data };\n }\n}\n\nexport interface IActorQueryResultSerializeSparqlJsonArgs extends IActorQueryResultSerializeFixedMediaTypesArgs {\n emitMetadata: boolean;\n httpObserver: ActionObserverHttp;\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport {\n ActorQueryResultSerializeFixedMediaTypes,\n} from '@comunica/bus-query-result-serialize';\nimport type { IActionContext, IQueryOperationResultBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { termToString } from 'rdf-string-ttl';\nimport { Readable } from 'readable-stream';\n\n/**\n * A comunica SPARQL TSV Query Result Serialize Actor.\n */\nexport class ActorQueryResultSerializeSparqlTsv extends ActorQueryResultSerializeFixedMediaTypes {\n /**\n * @param args -\n * \\ @defaultNested {{\n * \"text/tab-separated-values\": 0.75\n * }} mediaTypePriorities\n * \\ @defaultNested {{\n * \"text/tab-separated-values\": \"http://www.w3.org/ns/formats/SPARQL_Results_TSV\"\n * }} mediaTypeFormats\n */\n public constructor(args: IActorQueryResultSerializeFixedMediaTypesArgs) {\n super(args);\n }\n\n /**\n * Converts an RDF term to its TSV representation.\n * @param {RDF.Term} value An RDF term.\n * @return {string} A string representation of the given value.\n */\n public static bindingToTsvBindings(value?: RDF.Term): string {\n if (!value) {\n return '';\n }\n\n // Escape tab, newline and carriage return characters\n return termToString(value)\n .replaceAll('\\t', '\\\\t')\n .replaceAll('\\n', '\\\\n')\n .replaceAll('\\r', '\\\\r');\n }\n\n public override async testHandleChecked(action: IActionSparqlSerialize, _context: IActionContext): Promise {\n if (action.type !== 'bindings') {\n throw new Error('This actor can only handle bindings streams.');\n }\n return true;\n }\n\n public async runHandle(action: IActionSparqlSerialize, _mediaType: string | undefined, _context: IActionContext):\n Promise {\n const bindingsAction = action;\n\n const data = new Readable();\n // Write head\n const metadata = await bindingsAction.metadata();\n data.push(`${metadata.variables.map((variable: RDF.Variable) => variable.value).join('\\t')}\\n`);\n\n // Write Bindings\n data.wrap( bindingsAction.bindingsStream.map((bindings: RDF.Bindings) => `${metadata.variables\n .map((key: RDF.Variable) => ActorQueryResultSerializeSparqlTsv\n .bindingToTsvBindings(bindings.get(key)))\n .join('\\t')}\\n`));\n\n return { data };\n }\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport { ActorQueryResultSerializeFixedMediaTypes } from '@comunica/bus-query-result-serialize';\nimport type {\n IActionContext,\n IQueryOperationResultBindings,\n IQueryOperationResultBoolean,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { wrap } from 'asynciterator';\nimport { Readable } from 'readable-stream';\nimport { XmlSerializer, type IXmlNode } from './XmlSerializer';\n\n/**\n * A comunica sparql-results+xml Serialize Actor.\n */\nexport class ActorQueryResultSerializeSparqlXml extends ActorQueryResultSerializeFixedMediaTypes {\n /**\n * @param args -\n * \\ @defaultNested {{\n * \"application/sparql-results+xml\": 0.8\n * }} mediaTypePriorities\n * \\ @defaultNested {{\n * \"application/sparql-results+xml\": \"http://www.w3.org/ns/formats/SPARQL_Results_XML\"\n * }} mediaTypeFormats\n */\n public constructor(args: IActorQueryResultSerializeFixedMediaTypesArgs) {\n super(args);\n }\n\n /**\n * Converts an RDF term to its object-based XML representation.\n * @param {RDF.Term} value An RDF term.\n * @param {string} key A variable name, '?' must be included as a prefix.\n * @return {IXmlNode} An object-based XML tag.\n */\n public static bindingToXmlBindings(value: RDF.Term, key: RDF.Variable): IXmlNode {\n return { name: 'binding', attributes: { name: key.value }, children: [ this.valueToXmlValue(value) ]};\n }\n\n public static valueToXmlValue(value: RDF.Term): IXmlNode {\n let attributes;\n switch (value.termType) {\n case 'Literal':\n if (value.language) {\n attributes = { 'xml:lang': value.language };\n } else if (value.datatype && value.datatype.value !== 'http://www.w3.org/2001/XMLSchema#string') {\n attributes = { datatype: value.datatype.value };\n } else {\n attributes = {};\n }\n return { name: 'literal', attributes, children: value.value };\n case 'BlankNode':\n return { name: 'bnode', children: value.value };\n case 'Quad':\n return {\n name: 'triple',\n children: [\n { name: 'subject', children: [ this.valueToXmlValue(value.subject) ]},\n { name: 'predicate', children: [ this.valueToXmlValue(value.predicate) ]},\n { name: 'object', children: [ this.valueToXmlValue(value.object) ]},\n ],\n };\n default:\n return { name: 'uri', children: value.value };\n }\n }\n\n public override async testHandleChecked(action: IActionSparqlSerialize, _context: IActionContext): Promise {\n if (![ 'bindings', 'boolean' ].includes(action.type)) {\n throw new Error('This actor can only handle bindings streams or booleans.');\n }\n return true;\n }\n\n public async runHandle(action: IActionSparqlSerialize, _mediaType: string, _context: IActionContext):\n Promise {\n const data = new Readable();\n data._read = () => {\n // Do nothing\n };\n\n const serializer = new XmlSerializer();\n const metadata = await ( action).metadata();\n\n data.push(XmlSerializer.header);\n data.push(serializer.open('sparql', { xmlns: 'http://www.w3.org/2005/sparql-results#' }));\n data.push(\n serializer.serializeNode({\n name: 'head',\n children: metadata.variables.map(variable => ({ name: 'variable', attributes: { name: variable.value }})),\n }),\n );\n\n if (action.type === 'bindings') {\n function* end(): Generator {\n yield serializer.close();\n yield serializer.close();\n }\n data.push(serializer.open('results'));\n const stream = wrap(( action).bindingsStream).map(\n (bindings: RDF.Bindings) => serializer.serializeNode({\n name: 'result',\n children: [ ...bindings ].map(\n ([ key, value ]) => ActorQueryResultSerializeSparqlXml.bindingToXmlBindings(value, key),\n ),\n }),\n ).append(wrap(end()));\n data.wrap( stream);\n } else {\n try {\n const result = await ( action).execute();\n data.push(serializer.serializeNode({ name: 'boolean', children: result.toString() }));\n data.push(serializer.close());\n setTimeout(() => data.push(null));\n } catch (error: unknown) {\n setTimeout(() => data.emit('error', error));\n }\n }\n\n return { data };\n }\n}\n","/**\n * A very simple XML serializer\n */\nexport class XmlSerializer {\n private readonly stack: string[] = [];\n\n public static header = `\\n`;\n\n public constructor() {}\n\n /**\n *\n * @param name should be a valid XML tag name\n * @param attributes keys should be valid attribute names\n */\n public open(name: string, attributes?: Record): string {\n const res = `${this.identation() + this.formatTag(name, attributes, 'open')}\\n`;\n this.stack.push(name);\n return res;\n }\n\n public close(): string {\n const name = this.stack.pop();\n if (name === undefined) {\n throw new Error('There is no tag left to close');\n }\n return `${this.identation() + this.formatTag(name, {}, 'close')}\\n`;\n }\n\n public serializeNode(node: IXmlNode): string {\n if (node.children === undefined) {\n return `${this.identation() + this.formatTag(node.name, node.attributes, 'self-closing')}\\n`;\n }\n if (typeof node.children === 'string') {\n return `${this.identation() + this.formatTag(node.name, node.attributes, 'open') + this.escape(node.children) + this.formatTag(node.name, {}, 'close')}\\n`;\n }\n const parts = [];\n parts.push(`${this.identation() + this.formatTag(node.name, node.attributes, 'open')}\\n`);\n this.stack.push(node.name);\n for (const child of node.children) {\n parts.push(this.serializeNode(child));\n }\n this.stack.pop();\n parts.push(`${this.identation() + this.formatTag(node.name, {}, 'close')}\\n`);\n return parts.join('');\n }\n\n private identation(): string {\n return this.stack.map(_ => ' ').join('');\n }\n\n private formatTag(\n name: string,\n attributes: Record | undefined,\n state: 'open' | 'close' | 'self-closing',\n ): string {\n // eslint-disable-next-line ts/restrict-template-expressions\n return `<${state === 'close' ? '/' : ''}${name}${Object.entries(attributes ?? {}).map(attr => ` ${attr[0]}=\"${this.escape(attr[1])}\"`)}${state === 'self-closing' ? '/' : ''}>`;\n }\n\n private escape(text: string): string {\n return text.replaceAll(/[\"&'<>]/gu, <(substring: string) => string> ((char: '\"' | '&' | '\\'' | '<' | '>') => {\n switch (char) {\n case '<': return '<';\n case '>': return '>';\n case '&': return '&';\n case '\\'': return ''';\n case '\"': return '"';\n }\n }));\n }\n}\n\nexport interface IXmlNode {\n name: string;\n attributes?: Record;\n children?: (IXmlNode[]) | string;\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport { ActorQueryResultSerializeFixedMediaTypes } from '@comunica/bus-query-result-serialize';\nimport type {\n IActionContext,\n IQueryOperationResultBindings,\n IQueryOperationResultQuads,\n} from '@comunica/types';\nimport { wrap } from 'asynciterator';\nimport { Readable } from 'readable-stream';\nimport type { ActionObserverHttp } from './ActionObserverHttp';\n\nconst process: NodeJS.Process = require('process/');\n\n/**\n * Serializes SPARQL results for testing and debugging.\n */\nexport class ActorQueryResultSerializeStats extends ActorQueryResultSerializeFixedMediaTypes {\n public readonly httpObserver: ActionObserverHttp;\n\n /* eslint-disable max-len */\n /**\n * @param args -\n * \\ @defaultNested {{ \"stats\": 0.5 }} mediaTypePriorities\n * \\ @defaultNested {{ \"stats\": \"https://comunica.linkeddatafragments.org/#results_stats\" }} mediaTypeFormats\n * \\ @defaultNested { a } httpObserver\n */\n public constructor(args: IActorQueryResultSerializeStatsArgs) {\n super(args);\n }\n /* eslint-enable max-len */\n\n public override async testHandleChecked(action: IActionSparqlSerialize, _context: IActionContext): Promise {\n if (![ 'bindings', 'quads' ].includes(action.type)) {\n throw new Error('This actor can only handle bindings streams or quad streams.');\n }\n return true;\n }\n\n public pushHeader(data: Readable): void {\n const header: string = [ 'Result', 'Delay (ms)', 'HTTP requests',\n ].join(',');\n data.push(`${header}\\n`);\n }\n\n public createStat(startTime: number, result: number): string {\n const row: string = [ result, this.delay(startTime), this.httpObserver.requests,\n ].join(',');\n return `${row}\\n`;\n }\n\n public createFooter(startTime: number): string {\n const footer: string = [ 'TOTAL', this.delay(startTime), this.httpObserver.requests,\n ].join(',');\n return `${footer}\\n`;\n }\n\n public async runHandle(action: IActionSparqlSerialize, _mediaType: string, _context: IActionContext):\n Promise {\n const data = new Readable();\n\n const resultStream = action.type === 'bindings' ?\n ( action).bindingsStream :\n ( action).quadStream;\n\n const startTime = this.now();\n let result = 1;\n\n function* end(cb: () => string): Generator {\n yield cb();\n }\n const stream = wrap(resultStream)\n .map(() => this.createStat(startTime, result++))\n .append(wrap(end(() => this.createFooter(startTime))));\n\n this.pushHeader(data);\n data.wrap( stream);\n\n return { data };\n }\n\n /* istanbul ignore next */\n public now(): number {\n // TODO: remove when we will drop support of Node 14\n if (typeof performance === 'undefined') {\n const time: [number, number] = process.hrtime();\n return time[0] * 1_000 + (time[1] / 1_000_000);\n }\n return performance.now();\n }\n\n public delay(startTime: number): number {\n return this.now() - startTime;\n }\n}\n\nexport interface IActorQueryResultSerializeStatsArgs extends IActorQueryResultSerializeFixedMediaTypesArgs {\n httpObserver: ActionObserverHttp;\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport { ActorQueryResultSerializeFixedMediaTypes } from '@comunica/bus-query-result-serialize';\nimport type {\n Bindings,\n IActionContext,\n IQueryOperationResultBindings,\n IQueryOperationResultQuads,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport { termToString } from 'rdf-string';\nimport { getTerms, QUAD_TERM_NAMES } from 'rdf-terms';\nimport { Readable } from 'readable-stream';\n\nconst DF = new DataFactory();\nconst QUAD_TERM_NAMES_VARS = QUAD_TERM_NAMES.map(name => DF.variable(name));\n\n/**\n * A comunica Table Sparql Serialize Actor.\n */\nexport class ActorQueryResultSerializeTable extends ActorQueryResultSerializeFixedMediaTypes\n implements IActorQueryResultSerializeTableArgs {\n public readonly columnWidth: number;\n public readonly padding: string;\n\n /**\n * @param args -\n * \\ @defaultNested {{ \"table\": 0.6 }} mediaTypePriorities\n * \\ @defaultNested {{ \"table\": \"https://comunica.linkeddatafragments.org/#results_table\" }} mediaTypeFormats\n */\n public constructor(args: IActorQueryResultSerializeTableArgs) {\n super(args);\n this.padding = ActorQueryResultSerializeTable.repeat(' ', this.columnWidth);\n }\n\n public static repeat(str: string, count: number): string {\n return str.repeat(count);\n }\n\n public override async testHandleChecked(action: IActionSparqlSerialize, _context: IActionContext): Promise {\n if (![ 'bindings', 'quads' ].includes(action.type)) {\n throw new Error('This actor can only handle bindings or quad streams.');\n }\n return true;\n }\n\n public termToString(term: RDF.Term): string {\n return term.termType === 'Quad' ? termToString(term) : term.value;\n }\n\n public pad(str: string): string {\n if (str.length <= this.columnWidth) {\n return str + this.padding.slice(str.length);\n }\n return `${str.slice(0, this.columnWidth - 1)}…`;\n }\n\n public pushHeader(data: Readable, labels: RDF.Variable[]): void {\n const header: string = labels.map(label => this.pad(label.value)).join(' ');\n data.push(`${header}\\n${ActorQueryResultSerializeTable.repeat('-', header.length)}\\n`);\n }\n\n public createRow(labels: RDF.Variable[], bindings: Bindings): string {\n return `${labels\n .map(label => bindings.has(label) ? this.termToString(bindings.get(label)!) : '')\n .map(label => this.pad(label))\n .join(' ')}\\n`;\n }\n\n public async runHandle(action: IActionSparqlSerialize, _mediaType: string, _context: IActionContext):\n Promise {\n const data = new Readable();\n\n let resultStream: NodeJS.EventEmitter;\n if (action.type === 'bindings') {\n resultStream = (action).bindingsStream.map(\n bindings => this.createRow(labels, bindings),\n );\n const labels = (await (action).metadata()).variables;\n this.pushHeader(data, labels);\n } else {\n resultStream = (action).quadStream.map(quad => `${getTerms(quad).map(term => this.pad(this.termToString(term))).join(' ')}\\n`);\n this.pushHeader(data, QUAD_TERM_NAMES_VARS);\n }\n data.wrap( resultStream);\n\n return { data };\n }\n}\n\nexport interface IActorQueryResultSerializeTableArgs extends IActorQueryResultSerializeFixedMediaTypesArgs {\n /**\n * The table column width in number of characters\n * @range {integer}\n * @default {50}\n */\n columnWidth: number;\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport { ActorQueryResultSerializeFixedMediaTypes } from '@comunica/bus-query-result-serialize';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport { ActionContext } from '@comunica/core';\nimport type { IQueryOperationResultBindings, BindingsStream, IActionContext } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { Readable } from 'readable-stream';\nimport type { IConverterSettings, ISchema } from 'sparqljson-to-tree';\nimport { Converter } from 'sparqljson-to-tree';\n\n/**\n * A comunica Tree Query Result Serialize Actor.\n */\nexport class ActorQueryResultSerializeTree extends ActorQueryResultSerializeFixedMediaTypes\n implements IActorQueryResultSerializeFixedMediaTypesArgs {\n /**\n * @param args -\n * \\ @defaultNested {{ \"tree\": 0.5 }} mediaTypePriorities\n * \\ @defaultNested {{ \"tree\": \"https://comunica.linkeddatafragments.org/#results_tree\" }} mediaTypeFormats\n */\n public constructor(args: IActorQueryResultSerializeFixedMediaTypesArgs) {\n super(args);\n }\n\n /**\n *\n * @param {BindingsStream} bindingsStream\n * @param context\n * @param {IConverterSettings} converterSettings\n * @return {Promise}\n */\n public static async bindingsStreamToGraphQl(\n bindingsStream: BindingsStream,\n context: IActionContext | Record | undefined,\n converterSettings?: IConverterSettings,\n ): Promise {\n const actionContext: IActionContext = ActionContext.ensureActionContext(context);\n const converter: Converter = new Converter(converterSettings);\n const schema: ISchema = {\n singularizeVariables: actionContext.get(KeysInitQuery.graphqlSingularizeVariables) ?? {},\n };\n\n return converter.bindingsToTree(await bindingsStream.map((bindings: RDF.Bindings) =>\n Object.fromEntries([ ...bindings ]\n .map(([ key, value ]) => [ key.value, value ]))).toArray(), schema);\n }\n\n public override async testHandleChecked(action: IActionSparqlSerialize): Promise {\n if (action.type !== 'bindings') {\n throw new Error('This actor can only handle bindings streams.');\n }\n return true;\n }\n\n public async runHandle(\n action: IActionSparqlSerialize,\n _mediaType: string,\n ): Promise {\n const data = new Readable();\n data._read = () => {\n data._read = () => { /* Do nothing */ };\n ActorQueryResultSerializeTree.bindingsStreamToGraphQl(\n ( action).bindingsStream,\n action.context,\n { materializeRdfJsTerms: true },\n )\n .then((result: any) => {\n data.push(JSON.stringify(result, null, ' '));\n data.push(null);\n })\n .catch(error => data.emit('error', error));\n };\n\n return { data };\n }\n}\n","import { QuerySourceRdfJs } from '@comunica/actor-query-source-identify-rdfjs';\nimport { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type {\n IActionQuerySourceIdentifyHypermedia,\n IActorQuerySourceIdentifyHypermediaOutput,\n IActorQuerySourceIdentifyHypermediaArgs,\n IActorQuerySourceIdentifyHypermediaTest,\n} from '@comunica/bus-query-source-identify-hypermedia';\nimport { ActorQuerySourceIdentifyHypermedia } from '@comunica/bus-query-source-identify-hypermedia';\nimport { storeStream } from 'rdf-store-stream';\n\n/**\n * A comunica None Query Source Identify Hypermedia Actor.\n */\nexport class ActorQuerySourceIdentifyHypermediaNone extends ActorQuerySourceIdentifyHypermedia {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQuerySourceIdentifyHypermediaNoneArgs) {\n super(args, 'file');\n }\n\n public async testMetadata(\n _action: IActionQuerySourceIdentifyHypermedia,\n ): Promise {\n return { filterFactor: 0 };\n }\n\n public async run(action: IActionQuerySourceIdentifyHypermedia): Promise {\n this.logInfo(action.context, `Identified as file source: ${action.url}`);\n const source = new QuerySourceRdfJs(\n await storeStream(action.quads),\n await BindingsFactory.create(this.mediatorMergeBindingsContext, action.context),\n );\n source.toString = () => `QuerySourceRdfJs(${action.url})`;\n source.referenceValue = action.url;\n return { source };\n }\n}\n\nexport interface IActorQuerySourceIdentifyHypermediaNoneArgs extends IActorQuerySourceIdentifyHypermediaArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorDereferenceRdf } from '@comunica/bus-dereference-rdf';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type {\n IActionQuerySourceIdentifyHypermedia,\n IActorQuerySourceIdentifyHypermediaOutput,\n IActorQuerySourceIdentifyHypermediaArgs,\n IActorQuerySourceIdentifyHypermediaTest,\n} from '@comunica/bus-query-source-identify-hypermedia';\nimport {\n ActorQuerySourceIdentifyHypermedia,\n} from '@comunica/bus-query-source-identify-hypermedia';\nimport type { MediatorRdfMetadata } from '@comunica/bus-rdf-metadata';\nimport type { MediatorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActionContext } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { QuerySourceQpf } from './QuerySourceQpf';\n\n/**\n * A comunica QPF Query Source Identify Hypermedia Actor.\n */\nexport class ActorQuerySourceIdentifyHypermediaQpf extends ActorQuerySourceIdentifyHypermedia\n implements IActorQuerySourceIdentifyHypermediaQpfArgs {\n public readonly mediatorMetadata: MediatorRdfMetadata;\n public readonly mediatorMetadataExtract: MediatorRdfMetadataExtract;\n public readonly mediatorDereferenceRdf: MediatorDereferenceRdf;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n public readonly subjectUri: string;\n public readonly predicateUri: string;\n public readonly objectUri: string;\n public readonly graphUri?: string;\n public constructor(args: IActorQuerySourceIdentifyHypermediaQpfArgs) {\n super(args, 'qpf');\n }\n\n public override async test(\n action: IActionQuerySourceIdentifyHypermedia,\n ): Promise {\n if (action.forceSourceType && (action.forceSourceType !== 'qpf' && action.forceSourceType !== 'brtpf')) {\n throw new Error(`Actor ${this.name} is not able to handle source type ${action.forceSourceType}.`);\n }\n return this.testMetadata(action);\n }\n\n public async testMetadata(\n action: IActionQuerySourceIdentifyHypermedia,\n ): Promise {\n const { searchForm } = await this.createSource(\n action.url,\n action.metadata,\n action.context,\n action.forceSourceType === 'brtpf',\n );\n if (action.handledDatasets && action.handledDatasets[searchForm.dataset]) {\n throw new Error(`Actor ${this.name} can only be applied for the first page of a QPF dataset.`);\n }\n return { filterFactor: 1 };\n }\n\n /**\n * Look for the search form\n * @param {IActionRdfResolveHypermedia} action the metadata to look for the form.\n * @return {Promise} A promise resolving to a hypermedia form.\n */\n public async run(action: IActionQuerySourceIdentifyHypermedia): Promise {\n this.logInfo(action.context, `Identified as qpf source: ${action.url}`);\n const source = await this.createSource(\n action.url,\n action.metadata,\n action.context,\n action.forceSourceType === 'brtpf',\n action.quads,\n );\n return { source, dataset: source.searchForm.dataset };\n }\n\n protected async createSource(\n url: string,\n metadata: Record,\n context: IActionContext,\n bindingsRestricted: boolean,\n quads?: RDF.Stream,\n ): Promise {\n return new QuerySourceQpf(\n this.mediatorMetadata,\n this.mediatorMetadataExtract,\n this.mediatorDereferenceRdf,\n await BindingsFactory.create(this.mediatorMergeBindingsContext, context),\n this.subjectUri,\n this.predicateUri,\n this.objectUri,\n this.graphUri,\n url,\n metadata,\n bindingsRestricted,\n quads,\n );\n }\n}\n\nexport interface IActorQuerySourceIdentifyHypermediaQpfArgs extends IActorQuerySourceIdentifyHypermediaArgs {\n /**\n * The metadata mediator\n */\n mediatorMetadata: MediatorRdfMetadata;\n /**\n * The metadata extract mediator\n */\n mediatorMetadataExtract: MediatorRdfMetadataExtract;\n /**\n * The RDF dereference mediator\n */\n mediatorDereferenceRdf: MediatorDereferenceRdf;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n /**\n * The URI that should be interpreted as subject URI\n * @default {http://www.w3.org/1999/02/22-rdf-syntax-ns#subject}\n */\n subjectUri: string;\n /**\n * The URI that should be interpreted as predicate URI\n * @default {http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate}\n */\n predicateUri: string;\n /**\n * The URI that should be interpreted as object URI\n * @default {http://www.w3.org/1999/02/22-rdf-syntax-ns#object}\n */\n objectUri: string;\n /**\n * The URI that should be interpreted as graph URI\n * @default {http://www.w3.org/ns/sparql-service-description#graph}\n */\n graphUri?: string;\n}\n","import type { ISearchForm } from '@comunica/actor-rdf-metadata-extract-hydra-controls';\nimport type { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorDereferenceRdf } from '@comunica/bus-dereference-rdf';\nimport { filterMatchingQuotedQuads, quadsToBindings } from '@comunica/bus-query-source-identify';\nimport type { MediatorRdfMetadata, IActorRdfMetadataOutput } from '@comunica/bus-rdf-metadata';\nimport type { MediatorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport { KeysQueryOperation } from '@comunica/context-entries';\nimport type {\n IQuerySource,\n BindingsStream,\n IActionContext,\n FragmentSelectorShape,\n IQueryBindingsOptions,\n MetadataBindings,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { ArrayIterator, TransformIterator, wrap } from 'asynciterator';\nimport { DataFactory } from 'rdf-data-factory';\nimport { termToString } from 'rdf-string';\nimport { termToString as termToStringTtl } from 'rdf-string-ttl';\nimport {\n everyTermsNested,\n mapTerms,\n matchPattern,\n} from 'rdf-terms';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { Factory } from 'sparqlalgebrajs';\n\nconst AF = new Factory();\nconst DF = new DataFactory();\n\nexport class QuerySourceQpf implements IQuerySource {\n protected static readonly SELECTOR_SHAPE: FragmentSelectorShape = {\n type: 'operation',\n operation: {\n operationType: 'pattern',\n pattern: AF.createPattern(DF.variable('s'), DF.variable('p'), DF.variable('o'), DF.variable('g')),\n },\n variablesOptional: [\n DF.variable('s'),\n DF.variable('p'),\n DF.variable('o'),\n DF.variable('g'),\n ],\n };\n\n protected static readonly SELECTOR_SHAPE_BR: FragmentSelectorShape = {\n type: 'operation',\n operation: {\n operationType: 'pattern',\n pattern: AF.createPattern(DF.variable('s'), DF.variable('p'), DF.variable('o'), DF.variable('g')),\n },\n variablesOptional: [\n DF.variable('s'),\n DF.variable('p'),\n DF.variable('o'),\n DF.variable('g'),\n ],\n filterBindings: true,\n };\n\n public readonly searchForm: ISearchForm;\n\n private readonly mediatorMetadata: MediatorRdfMetadata;\n private readonly mediatorMetadataExtract: MediatorRdfMetadataExtract;\n private readonly mediatorDereferenceRdf: MediatorDereferenceRdf;\n private readonly bindingsFactory: BindingsFactory;\n\n public readonly referenceValue: string;\n private readonly subjectUri: string;\n private readonly predicateUri: string;\n private readonly objectUri: string;\n private readonly graphUri?: string;\n private readonly url: string;\n private readonly defaultGraph?: RDF.NamedNode;\n private readonly bindingsRestricted: boolean;\n private readonly cachedQuads: Record>;\n\n public constructor(\n mediatorMetadata: MediatorRdfMetadata,\n mediatorMetadataExtract: MediatorRdfMetadataExtract,\n mediatorDereferenceRdf: MediatorDereferenceRdf,\n bindingsFactory: BindingsFactory,\n subjectUri: string,\n predicateUri: string,\n objectUri: string,\n graphUri: string | undefined,\n url: string,\n metadata: Record,\n bindingsRestricted: boolean,\n initialQuads?: RDF.Stream,\n ) {\n this.referenceValue = url;\n this.mediatorMetadata = mediatorMetadata;\n this.mediatorMetadataExtract = mediatorMetadataExtract;\n this.mediatorDereferenceRdf = mediatorDereferenceRdf;\n this.bindingsFactory = bindingsFactory;\n this.subjectUri = subjectUri;\n this.predicateUri = predicateUri;\n this.objectUri = objectUri;\n this.graphUri = graphUri;\n this.url = url;\n this.bindingsRestricted = bindingsRestricted;\n this.cachedQuads = {};\n const searchForm = this.getSearchForm(metadata);\n if (!searchForm) {\n throw new Error('Illegal state: found no TPF/QPF search form anymore in metadata.');\n }\n this.searchForm = searchForm;\n this.defaultGraph = metadata.defaultGraph ? DF.namedNode(metadata.defaultGraph) : undefined;\n if (initialQuads) {\n let wrappedQuads: AsyncIterator = wrap(initialQuads);\n if (this.defaultGraph) {\n wrappedQuads = this.reverseMapQuadsToDefaultGraph(wrappedQuads);\n }\n wrappedQuads.setProperty('metadata', metadata);\n this.cacheQuads(wrappedQuads, DF.variable(''), DF.variable(''), DF.variable(''), DF.variable(''));\n }\n }\n\n public async getSelectorShape(): Promise {\n return this.bindingsRestricted ? QuerySourceQpf.SELECTOR_SHAPE_BR : QuerySourceQpf.SELECTOR_SHAPE;\n }\n\n public queryBindings(\n operation: Algebra.Operation,\n context: IActionContext,\n options?: IQueryBindingsOptions,\n ): BindingsStream {\n if (operation.type !== 'pattern') {\n throw new Error(`Attempted to pass non-pattern operation '${operation.type}' to QuerySourceQpf`);\n }\n\n const unionDefaultGraph = Boolean(context.get(KeysQueryOperation.unionDefaultGraph));\n\n // Create an async iterator from the matched quad stream\n let it = this.match(\n operation.subject,\n operation.predicate,\n operation.object,\n operation.graph,\n unionDefaultGraph,\n context,\n options,\n );\n\n it = filterMatchingQuotedQuads(operation, it);\n return quadsToBindings(it, operation, this.bindingsFactory, unionDefaultGraph);\n }\n\n /**\n * Get a first QPF search form.\n * @param {{[p: string]: any}} metadata A metadata object.\n * @return {ISearchForm} A search form, or null if none could be found.\n */\n public getSearchForm(metadata: Record): ISearchForm | undefined {\n if (!metadata.searchForms || !metadata.searchForms.values) {\n return;\n }\n\n // Find a quad pattern or triple pattern search form\n const { searchForms } = metadata;\n for (const searchForm of searchForms.values) {\n if (this.graphUri &&\n this.subjectUri in searchForm.mappings &&\n this.predicateUri in searchForm.mappings &&\n this.objectUri in searchForm.mappings &&\n this.graphUri in searchForm.mappings &&\n Object.keys(searchForm.mappings).length === 4) {\n return searchForm;\n }\n if (this.subjectUri in searchForm.mappings &&\n this.predicateUri in searchForm.mappings &&\n this.objectUri in searchForm.mappings &&\n Object.keys(searchForm.mappings).length === 3) {\n return searchForm;\n }\n }\n }\n\n /**\n * Create a QPF fragment IRI for the given quad pattern.\n * @param {ISearchForm} searchForm A search form.\n * @param {Term} subject A term.\n * @param {Term} predicate A term.\n * @param {Term} object A term.\n * @param {Term} graph A term.\n * @return {string} A URI.\n */\n public createFragmentUri(\n searchForm: ISearchForm,\n subject: RDF.Term,\n predicate: RDF.Term,\n object: RDF.Term,\n graph: RDF.Term,\n ): string {\n const entries: Record = {};\n const input = [\n { uri: this.subjectUri, term: subject },\n { uri: this.predicateUri, term: predicate },\n { uri: this.objectUri, term: object },\n { uri: this.graphUri, term: graph },\n ];\n for (const entry of input) {\n // If bindingsRestricted, also pass variables, so the server knows how to bind values.\n if (entry.uri && (this.bindingsRestricted || (entry.term.termType !== 'Variable' &&\n (entry.term.termType !== 'Quad' || everyTermsNested(entry.term, value => value.termType !== 'Variable'))))) {\n entries[entry.uri] = termToString(entry.term);\n }\n }\n return searchForm.getUri(entries);\n }\n\n protected match(\n subject: RDF.Term,\n predicate: RDF.Term,\n object: RDF.Term,\n graph: RDF.Term,\n unionDefaultGraph: boolean,\n context: IActionContext,\n options?: IQueryBindingsOptions,\n ): AsyncIterator {\n // If we are querying the default graph,\n // and the source has an overridden value for the default graph (such as QPF can provide),\n // we override the graph parameter with that value.\n let modifiedGraph = false;\n if (graph.termType === 'DefaultGraph') {\n if (this.defaultGraph) {\n modifiedGraph = true;\n graph = this.defaultGraph;\n } else if (Object.keys(this.searchForm.mappings).length === 4 && !this.defaultGraph) {\n // If the sd:defaultGraph is not declared on a QPF endpoint\n if (unionDefaultGraph) {\n // With union-default-graph, take union of graphs.\n graph = DF.variable('g');\n } else {\n // Without union-default-graph, the default graph must be empty.\n const quads = new ArrayIterator([], { autoStart: false });\n quads.setProperty('metadata', {\n requestTime: 0,\n cardinality: { type: 'exact', value: 0 },\n first: null,\n next: null,\n last: null,\n canContainUndefs: false,\n });\n return quads;\n }\n } else if (Object.keys(this.searchForm.mappings).length === 3) {\n // If have a TPF endpoint, set graph to variable so we could get the cached triples\n graph = DF.variable('g');\n }\n }\n\n // Try to emit from cache (skip if filtering bindings)\n if (!options?.filterBindings) {\n const cached = this.getCachedQuads(subject, predicate, object, graph);\n if (cached) {\n return cached;\n }\n }\n\n // Kickstart metadata collection, because the quads iterator is lazy\n // eslint-disable-next-line ts/no-this-alias\n const self = this;\n let quads: AsyncIterator;\n const dataStreamPromise = (async function() {\n let url: string = self.createFragmentUri(self.searchForm, subject, predicate, object, graph);\n\n // Handle bindings-restricted interfaces\n if (options?.filterBindings) {\n url = await self.getBindingsRestrictedLink(\n subject,\n predicate,\n object,\n graph,\n url,\n options.filterBindings,\n );\n }\n\n const dereferenceRdfOutput = await self.mediatorDereferenceRdf.mediate({ context, url });\n url = dereferenceRdfOutput.url;\n\n // Determine the metadata\n const rdfMetadataOuput: IActorRdfMetadataOutput = await self.mediatorMetadata.mediate(\n { context, url, quads: dereferenceRdfOutput.data, triples: dereferenceRdfOutput.metadata?.triples },\n );\n\n // Extract the metadata\n const { metadata } = await self.mediatorMetadataExtract\n .mediate({\n context,\n url,\n metadata: rdfMetadataOuput.metadata,\n requestTime: dereferenceRdfOutput.requestTime,\n });\n quads!.setProperty('metadata', { ...metadata, canContainUndefs: false, subsetOf: self.url });\n\n // While we could resolve this before metadata extraction, we do it afterwards to ensure metadata emission\n // before the end event is emitted.\n return rdfMetadataOuput.data;\n })();\n\n quads = new TransformIterator(async() => {\n const dataStream = await dataStreamPromise;\n\n // The server is free to send any data in its response (such as metadata),\n // including quads that do not match the given matter.\n // Therefore, we have to filter away all non-matching quads here.\n const actualDefaultGraph = DF.defaultGraph();\n let filteredOutput: AsyncIterator = wrap(dataStream)\n .transform({\n filter(quad: RDF.Quad) {\n if (matchPattern(quad, subject, predicate, object, graph)) {\n return true;\n }\n // Special case: if we are querying in the default graph, and we had an overridden default graph,\n // also accept that incoming triples may be defined in the actual default graph\n return modifiedGraph && matchPattern(quad, subject, predicate, object, actualDefaultGraph);\n },\n });\n if (modifiedGraph || graph.termType === 'Variable') {\n // Reverse-map the overridden default graph back to the actual default graph\n filteredOutput = this.reverseMapQuadsToDefaultGraph(filteredOutput);\n }\n\n return filteredOutput;\n }, { autoStart: false });\n\n // Skip cache if filtering bindings\n if (options?.filterBindings) {\n return quads;\n }\n\n this.cacheQuads(quads, subject, predicate, object, graph);\n return this.getCachedQuads(subject, predicate, object, graph)!;\n }\n\n /**\n * If we add bindings for brTPF, append it to the URL.\n * We have to hardcode this because brTPF doesn't expose a URL template for passing bindings.\n * @param subject The subject.\n * @param predicate The predicate.\n * @param object The object.\n * @param graph The graph.\n * @param url The original QPF URL.\n * @param filterBindings The bindings to restrict with.\n * @param filterBindings.bindings The bindings stream.\n * @param filterBindings.metadata The bindings metadata.\n * @protected\n */\n public async getBindingsRestrictedLink(\n subject: RDF.Term,\n predicate: RDF.Term,\n object: RDF.Term,\n graph: RDF.Term,\n url: string,\n filterBindings: { bindings: BindingsStream; metadata: MetadataBindings },\n ): Promise {\n // Determine values\n const values: string[] = [];\n for (const binding of await filterBindings.bindings.toArray()) {\n const value: string[] = [ '(' ];\n for (const variable of filterBindings.metadata.variables) {\n const term = binding.get(variable);\n value.push(term ? termToStringTtl(term) : 'UNDEF');\n value.push(' ');\n }\n value.push(')');\n values.push(value.join(''));\n }\n\n if (values.length === 0) {\n // This is a hack to force an empty result page,\n // because the brTPF server returns a server error when passing 0 bindings.\n values.push('()');\n }\n\n // Append to URL (brTPF uses the SPARQL VALUES syntax, without the VALUES prefix)\n const valuesUrl = encodeURIComponent(`(${filterBindings.metadata.variables.map(variable => `?${variable.value}`).join(' ')}) { ${values.join(' ')} }`);\n return `${url}&values=${valuesUrl}`;\n }\n\n protected reverseMapQuadsToDefaultGraph(quads: AsyncIterator): AsyncIterator {\n const actualDefaultGraph = DF.defaultGraph();\n return quads.map(\n quad => mapTerms(\n quad,\n (term, key) => key === 'graph' && term.equals(this.defaultGraph) ? actualDefaultGraph : term,\n ),\n );\n }\n\n public getPatternId(subject: RDF.Term, predicate: RDF.Term, object: RDF.Term, graph: RDF.Term): string {\n return JSON.stringify({\n s: subject.termType === 'Variable' ? '' : _termToString(subject),\n p: predicate.termType === 'Variable' ? '' : _termToString(predicate),\n o: object.termType === 'Variable' ? '' : _termToString(object),\n g: graph.termType === 'Variable' ? '' : _termToString(graph),\n });\n }\n\n protected cacheQuads(\n quads: AsyncIterator,\n subject: RDF.Term,\n predicate: RDF.Term,\n object: RDF.Term,\n graph: RDF.Term,\n ): void {\n const patternId = this.getPatternId(subject, predicate, object, graph);\n this.cachedQuads[patternId] = quads.clone();\n }\n\n protected getCachedQuads(subject: RDF.Term, predicate: RDF.Term, object: RDF.Term, graph: RDF.Term):\n AsyncIterator | undefined {\n const patternId = this.getPatternId(subject, predicate, object, graph);\n const quads = this.cachedQuads[patternId];\n if (quads) {\n return quads.clone();\n }\n }\n\n public queryQuads(\n _operation: Algebra.Operation,\n _context: IActionContext,\n ): AsyncIterator {\n throw new Error('queryQuads is not implemented in QuerySourceQpf');\n }\n\n public queryBoolean(\n _operation: Algebra.Ask,\n _context: IActionContext,\n ): Promise {\n throw new Error('queryBoolean is not implemented in QuerySourceQpf');\n }\n\n public queryVoid(\n _operation: Algebra.Update,\n _context: IActionContext,\n ): Promise {\n throw new Error('queryVoid is not implemented in QuerySourceQpf');\n }\n}\n\nfunction _termToString(term: RDF.Term): string {\n return term.termType === 'DefaultGraph' ?\n // Any character that cannot be present in a URL will do\n '|' :\n termToString(term);\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorHttp } from '@comunica/bus-http';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type {\n IActionQuerySourceIdentifyHypermedia,\n IActorQuerySourceIdentifyHypermediaOutput,\n IActorQuerySourceIdentifyHypermediaArgs,\n IActorQuerySourceIdentifyHypermediaTest,\n} from '@comunica/bus-query-source-identify-hypermedia';\nimport {\n ActorQuerySourceIdentifyHypermedia,\n} from '@comunica/bus-query-source-identify-hypermedia';\nimport { QuerySourceSparql } from './QuerySourceSparql';\n\n/**\n * A comunica SPARQL Query Source Identify Hypermedia Actor.\n */\nexport class ActorQuerySourceIdentifyHypermediaSparql extends ActorQuerySourceIdentifyHypermedia {\n public readonly mediatorHttp: MediatorHttp;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n public readonly checkUrlSuffix: boolean;\n public readonly forceHttpGet: boolean;\n public readonly cacheSize: number;\n public readonly bindMethod: BindMethod;\n public readonly countTimeout: number;\n\n public constructor(args: IActorQuerySourceIdentifyHypermediaSparqlArgs) {\n super(args, 'sparql');\n }\n\n public async testMetadata(\n action: IActionQuerySourceIdentifyHypermedia,\n ): Promise {\n if (!action.forceSourceType && !action.metadata.sparqlService &&\n !(this.checkUrlSuffix && action.url.endsWith('/sparql'))) {\n throw new Error(`Actor ${this.name} could not detect a SPARQL service description or URL ending on /sparql.`);\n }\n return { filterFactor: 1 };\n }\n\n public async run(action: IActionQuerySourceIdentifyHypermedia): Promise {\n this.logInfo(action.context, `Identified ${action.url} as sparql source with service URL: ${action.metadata.sparqlService || action.url}`);\n const source = new QuerySourceSparql(\n action.forceSourceType ? action.url : action.metadata.sparqlService || action.url,\n action.context,\n this.mediatorHttp,\n this.bindMethod,\n await BindingsFactory.create(this.mediatorMergeBindingsContext, action.context),\n this.forceHttpGet,\n this.cacheSize,\n this.countTimeout,\n );\n return { source };\n }\n}\n\nexport interface IActorQuerySourceIdentifyHypermediaSparqlArgs extends IActorQuerySourceIdentifyHypermediaArgs {\n /**\n * The HTTP mediator\n */\n mediatorHttp: MediatorHttp;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n /**\n * If URLs ending with '/sparql' should also be considered SPARQL endpoints.\n * @default {true}\n */\n checkUrlSuffix: boolean;\n /**\n * If non-update queries should be sent via HTTP GET instead of POST\n * @default {false}\n */\n forceHttpGet: boolean;\n /**\n * The cache size for COUNT queries.\n * @range {integer}\n * @default {1024}\n */\n cacheSize?: number;\n /**\n * The query operation for communicating bindings.\n * @default {values}\n */\n bindMethod: BindMethod;\n /**\n * Timeout in ms of how long count queries are allowed to take.\n * If the timeout is reached, an infinity cardinality is returned.\n * @default {3000}\n */\n countTimeout: number;\n}\n\nexport type BindMethod = 'values' | 'union' | 'filter';\n","import type { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorHttp } from '@comunica/bus-http';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type {\n IQuerySource,\n BindingsStream,\n IActionContext,\n FragmentSelectorShape,\n Bindings,\n MetadataBindings,\n IQueryBindingsOptions,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { wrap, TransformIterator } from 'asynciterator';\nimport { SparqlEndpointFetcher } from 'fetch-sparql-endpoint';\nimport { LRUCache } from 'lru-cache';\nimport { DataFactory } from 'rdf-data-factory';\nimport { Algebra, Factory, toSparql, Util } from 'sparqlalgebrajs';\nimport type { BindMethod } from './ActorQuerySourceIdentifyHypermediaSparql';\n\nconst AF = new Factory();\nconst DF = new DataFactory();\nconst VAR_COUNT = DF.variable('count');\nconst COUNT_INFINITY: RDF.QueryResultCardinality = { type: 'estimate', value: Number.POSITIVE_INFINITY };\n\nexport class QuerySourceSparql implements IQuerySource {\n protected static readonly SELECTOR_SHAPE: FragmentSelectorShape = {\n type: 'disjunction',\n children: [\n {\n type: 'operation',\n operation: { operationType: 'type', type: Algebra.types.PROJECT },\n joinBindings: true,\n },\n {\n type: 'operation',\n operation: { operationType: 'type', type: Algebra.types.CONSTRUCT },\n },\n {\n type: 'operation',\n operation: { operationType: 'type', type: Algebra.types.DESCRIBE },\n },\n {\n type: 'operation',\n operation: { operationType: 'type', type: Algebra.types.ASK },\n },\n {\n type: 'operation',\n operation: { operationType: 'type', type: Algebra.types.COMPOSITE_UPDATE },\n },\n ],\n };\n\n public readonly referenceValue: string;\n private readonly url: string;\n private readonly context: IActionContext;\n private readonly mediatorHttp: MediatorHttp;\n private readonly bindMethod: BindMethod;\n private readonly countTimeout: number;\n private readonly bindingsFactory: BindingsFactory;\n\n private readonly endpointFetcher: SparqlEndpointFetcher;\n private readonly cache: LRUCache | undefined;\n\n private lastSourceContext: IActionContext | undefined;\n\n public constructor(\n url: string,\n context: IActionContext,\n mediatorHttp: MediatorHttp,\n bindMethod: BindMethod,\n bindingsFactory: BindingsFactory,\n forceHttpGet: boolean,\n cacheSize: number,\n countTimeout: number,\n ) {\n this.referenceValue = url;\n this.url = url;\n this.context = context;\n this.mediatorHttp = mediatorHttp;\n this.bindMethod = bindMethod;\n this.bindingsFactory = bindingsFactory;\n this.endpointFetcher = new SparqlEndpointFetcher({\n method: forceHttpGet ? 'GET' : 'POST',\n fetch: (input: Request | string, init?: RequestInit) => this.mediatorHttp.mediate(\n { input, init, context: this.lastSourceContext! },\n ),\n prefixVariableQuestionMark: true,\n });\n this.cache = cacheSize > 0 ?\n new LRUCache({ max: cacheSize }) :\n undefined;\n this.countTimeout = countTimeout;\n }\n\n public async getSelectorShape(): Promise {\n return QuerySourceSparql.SELECTOR_SHAPE;\n }\n\n public queryBindings(\n operationIn: Algebra.Operation,\n context: IActionContext,\n options?: IQueryBindingsOptions,\n ): BindingsStream {\n // If bindings are passed, modify the operations\n let operationPromise: Promise;\n if (options?.joinBindings) {\n operationPromise = QuerySourceSparql.addBindingsToOperation(this.bindMethod, operationIn, options.joinBindings);\n } else {\n operationPromise = Promise.resolve(operationIn);\n }\n\n const bindings: BindingsStream = new TransformIterator(async() => {\n // Prepare queries\n const operation = await operationPromise;\n const variables: RDF.Variable[] = Util.inScopeVariables(operation);\n const queryString = context.get(KeysInitQuery.queryString);\n const selectQuery: string = !options?.joinBindings && queryString ?\n queryString :\n QuerySourceSparql.operationToSelectQuery(operation, variables);\n\n return this.queryBindingsRemote(this.url, selectQuery, variables, context);\n }, { autoStart: false });\n this.attachMetadata(bindings, context, operationPromise);\n\n return bindings;\n }\n\n public queryQuads(operation: Algebra.Operation, context: IActionContext): AsyncIterator {\n this.lastSourceContext = this.context.merge(context);\n const rawStream = this.endpointFetcher.fetchTriples(\n this.url,\n context.get(KeysInitQuery.queryString) ?? QuerySourceSparql.operationToQuery(operation),\n );\n this.lastSourceContext = undefined;\n const quads = wrap(rawStream, { autoStart: false, maxBufferSize: Number.POSITIVE_INFINITY });\n this.attachMetadata(quads, context, Promise.resolve(operation.input));\n return quads;\n }\n\n public queryBoolean(operation: Algebra.Ask, context: IActionContext): Promise {\n this.lastSourceContext = this.context.merge(context);\n const promise = this.endpointFetcher.fetchAsk(\n this.url,\n context.get(KeysInitQuery.queryString) ?? QuerySourceSparql.operationToQuery(operation),\n );\n this.lastSourceContext = undefined;\n return promise;\n }\n\n public queryVoid(operation: Algebra.Update, context: IActionContext): Promise {\n this.lastSourceContext = this.context.merge(context);\n const promise = this.endpointFetcher.fetchUpdate(\n this.url,\n context.get(KeysInitQuery.queryString) ?? QuerySourceSparql.operationToQuery(operation),\n );\n this.lastSourceContext = undefined;\n return promise;\n }\n\n protected attachMetadata(\n target: AsyncIterator,\n context: IActionContext,\n operationPromise: Promise,\n ): void {\n // Emit metadata containing the estimated count\n let variablesCount: RDF.Variable[] = [];\n // eslint-disable-next-line no-async-promise-executor,ts/no-misused-promises\n new Promise(async(resolve, reject) => {\n // Prepare queries\n let countQuery: string;\n try {\n const operation = await operationPromise;\n variablesCount = Util.inScopeVariables(operation);\n countQuery = QuerySourceSparql.operationToCountQuery(operation);\n\n const cachedCardinality = this.cache?.get(countQuery);\n if (cachedCardinality !== undefined) {\n return resolve(cachedCardinality);\n }\n\n const timeoutHandler = setTimeout(() => resolve(COUNT_INFINITY), this.countTimeout);\n const bindingsStream: BindingsStream = await this\n .queryBindingsRemote(this.url, countQuery, [ VAR_COUNT ], context);\n bindingsStream.on('data', (bindings: Bindings) => {\n clearTimeout(timeoutHandler);\n const count = bindings.get(VAR_COUNT);\n const cardinality: RDF.QueryResultCardinality = { type: 'estimate', value: Number.POSITIVE_INFINITY };\n if (count) {\n const cardinalityValue: number = Number.parseInt(count.value, 10);\n if (!Number.isNaN(cardinalityValue)) {\n cardinality.type = 'exact';\n cardinality.value = cardinalityValue;\n this.cache?.set(countQuery, cardinality);\n }\n }\n return resolve(cardinality);\n });\n bindingsStream.on('error', () => {\n clearTimeout(timeoutHandler);\n resolve(COUNT_INFINITY);\n });\n bindingsStream.on('end', () => {\n clearTimeout(timeoutHandler);\n resolve(COUNT_INFINITY);\n });\n } catch (error: unknown) {\n return reject(error);\n }\n })\n .then(cardinality => target.setProperty('metadata', {\n cardinality,\n canContainUndefs: false,\n variables: variablesCount,\n }))\n .catch(() => target.setProperty('metadata', {\n cardinality: COUNT_INFINITY,\n canContainUndefs: false,\n variables: variablesCount,\n }));\n }\n\n /**\n * Create an operation that includes the bindings from the given bindings stream.\n * @param bindMethod A method for adding bindings to an operation.\n * @param operation The operation to bind to.\n * @param addBindings The bindings to add.\n * @param addBindings.bindings The bindings stream.\n * @param addBindings.metadata The bindings metadata.\n */\n public static async addBindingsToOperation(\n bindMethod: BindMethod,\n operation: Algebra.Operation,\n addBindings: { bindings: BindingsStream; metadata: MetadataBindings },\n ): Promise {\n const bindings = await addBindings.bindings.toArray();\n\n switch (bindMethod) {\n case 'values':\n return AF.createJoin([\n AF.createValues(\n addBindings.metadata.variables,\n bindings.map(binding => Object.fromEntries([ ...binding ]\n .map(([ key, value ]) => [ `?${key.value}`, value ]))),\n ),\n operation,\n ], false);\n case 'union': { throw new Error('Not implemented yet: \"union\" case'); }\n case 'filter': { throw new Error('Not implemented yet: \"filter\" case'); }\n }\n }\n\n /**\n * Convert an operation to a select query for this pattern.\n * @param {Algebra.Operation} operation A query operation.\n * @param {RDF.Variable[]} variables The variables in scope for the operation.\n * @return {string} A select query string.\n */\n public static operationToSelectQuery(operation: Algebra.Operation, variables: RDF.Variable[]): string {\n return QuerySourceSparql.operationToQuery(AF.createProject(operation, variables));\n }\n\n /**\n * Convert an operation to a count query for the number of matching triples for this pattern.\n * @param {Algebra.Operation} operation A query operation.\n * @return {string} A count query string.\n */\n public static operationToCountQuery(operation: Algebra.Operation): string {\n return QuerySourceSparql.operationToQuery(AF.createProject(\n AF.createExtend(\n AF.createGroup(\n operation,\n [],\n [ AF.createBoundAggregate(\n DF.variable('var0'),\n 'count',\n AF.createWildcardExpression(),\n false,\n ) ],\n ),\n DF.variable('count'),\n AF.createTermExpression(DF.variable('var0')),\n ),\n [ DF.variable('count') ],\n ));\n }\n\n /**\n * Convert an operation to a query for this pattern.\n * @param {Algebra.Operation} operation A query operation.\n * @return {string} A query string.\n */\n public static operationToQuery(operation: Algebra.Operation): string {\n return toSparql(operation, { sparqlStar: true });\n }\n\n /**\n * Send a SPARQL query to a SPARQL endpoint and retrieve its bindings as a stream.\n * @param {string} endpoint A SPARQL endpoint URL.\n * @param {string} query A SPARQL query string.\n * @param {RDF.Variable[]} variables The expected variables.\n * @param {IActionContext} context The source context.\n * @return {BindingsStream} A stream of bindings.\n */\n public async queryBindingsRemote(\n endpoint: string,\n query: string,\n variables: RDF.Variable[],\n context: IActionContext,\n ): Promise {\n this.lastSourceContext = this.context.merge(context);\n const rawStream = await this.endpointFetcher.fetchBindings(endpoint, query);\n this.lastSourceContext = undefined;\n\n const it = wrap(rawStream, { autoStart: false, maxBufferSize: Number.POSITIVE_INFINITY })\n .map((rawData: Record) => this.bindingsFactory.bindings(variables\n .map((variable) => {\n const value = rawData[`?${variable.value}`];\n if (!value) {\n it.emit('error', new Error(`The endpoint ${endpoint} failed to provide a binding for ${variable.value}.`));\n }\n return [ variable, value ];\n })));\n return it;\n }\n\n public toString(): string {\n return `QuerySourceSparql(${this.url})`;\n }\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorDereferenceRdf } from '@comunica/bus-dereference-rdf';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport { ActorQuerySourceIdentify } from '@comunica/bus-query-source-identify';\nimport type {\n IActionQuerySourceIdentify,\n IActorQuerySourceIdentifyOutput,\n IActorQuerySourceIdentifyArgs,\n} from '@comunica/bus-query-source-identify';\nimport type { MediatorQuerySourceIdentifyHypermedia } from '@comunica/bus-query-source-identify-hypermedia';\nimport type { MediatorRdfMetadata } from '@comunica/bus-rdf-metadata';\nimport type { MediatorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type { MediatorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { MediatorRdfResolveHypermediaLinks } from '@comunica/bus-rdf-resolve-hypermedia-links';\nimport type { MediatorRdfResolveHypermediaLinksQueue } from '@comunica/bus-rdf-resolve-hypermedia-links-queue';\nimport { KeysQuerySourceIdentify } from '@comunica/context-entries';\nimport { ActionContext } from '@comunica/core';\nimport type { IActorTest } from '@comunica/core';\nimport { QuerySourceHypermedia } from './QuerySourceHypermedia';\n\n/**\n * A comunica Hypermedia Query Source Identify Actor.\n */\nexport class ActorQuerySourceIdentifyHypermedia extends ActorQuerySourceIdentify {\n public readonly mediatorDereferenceRdf: MediatorDereferenceRdf;\n public readonly mediatorMetadata: MediatorRdfMetadata;\n public readonly mediatorMetadataExtract: MediatorRdfMetadataExtract;\n public readonly mediatorMetadataAccumulate: MediatorRdfMetadataAccumulate;\n public readonly mediatorQuerySourceIdentifyHypermedia: MediatorQuerySourceIdentifyHypermedia;\n public readonly mediatorRdfResolveHypermediaLinks: MediatorRdfResolveHypermediaLinks;\n public readonly mediatorRdfResolveHypermediaLinksQueue: MediatorRdfResolveHypermediaLinksQueue;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n public readonly cacheSize: number;\n public readonly maxIterators: number;\n public readonly aggregateTraversalStore: boolean;\n\n public constructor(args: IActorQuerySourceIdentifyHypermediaArgs) {\n super(args);\n }\n\n public async test(action: IActionQuerySourceIdentify): Promise {\n if (typeof action.querySourceUnidentified.value !== 'string') {\n throw new TypeError(`${this.name} requires a single query source with a URL value to be present in the context.`);\n }\n return true;\n }\n\n public async run(action: IActionQuerySourceIdentify): Promise {\n return {\n querySource: {\n source: new QuerySourceHypermedia(\n this.cacheSize,\n action.querySourceUnidentified.value,\n action.querySourceUnidentified.type,\n this.maxIterators,\n this.aggregateTraversalStore &&\n Boolean(action.querySourceUnidentified.context?.get(KeysQuerySourceIdentify.traverse)),\n {\n mediatorMetadata: this.mediatorMetadata,\n mediatorMetadataExtract: this.mediatorMetadataExtract,\n mediatorMetadataAccumulate: this.mediatorMetadataAccumulate,\n mediatorDereferenceRdf: this.mediatorDereferenceRdf,\n mediatorQuerySourceIdentifyHypermedia: this.mediatorQuerySourceIdentifyHypermedia,\n mediatorRdfResolveHypermediaLinks: this.mediatorRdfResolveHypermediaLinks,\n mediatorRdfResolveHypermediaLinksQueue: this.mediatorRdfResolveHypermediaLinksQueue,\n },\n warningMessage => this.logWarn(action.context, warningMessage),\n await BindingsFactory.create(this.mediatorMergeBindingsContext, action.context),\n ),\n context: action.querySourceUnidentified.context ?? new ActionContext(),\n },\n };\n }\n}\n\nexport interface IActorQuerySourceIdentifyHypermediaArgs extends IActorQuerySourceIdentifyArgs {\n /**\n * The maximum number of entries in the LRU cache, set to 0 to disable.\n * @range {integer}\n * @default {100}\n */\n cacheSize: number;\n /**\n * The maximum number of links that can be followed in parallel.\n * @default {64}\n */\n maxIterators: number;\n /**\n * If all discovered quads across all links from a traversal source should be indexed in an aggregated store,\n * to speed up later calls.\n * This only applies to sources annotated with KeysQuerySourceIdentify.traverse.\n * @default {true}\n */\n aggregateTraversalStore: boolean;\n /**\n * The RDF dereference mediator\n */\n mediatorDereferenceRdf: MediatorDereferenceRdf;\n /**\n * The metadata mediator\n */\n mediatorMetadata: MediatorRdfMetadata;\n /**\n * The metadata extract mediator\n */\n mediatorMetadataExtract: MediatorRdfMetadataExtract;\n /**\n * The metadata accumulate mediator\n */\n mediatorMetadataAccumulate?: MediatorRdfMetadataAccumulate;\n /**\n * The hypermedia resolve mediator\n */\n mediatorQuerySourceIdentifyHypermedia: MediatorQuerySourceIdentifyHypermedia;\n /**\n * The hypermedia links resolve mediator\n */\n mediatorRdfResolveHypermediaLinks: MediatorRdfResolveHypermediaLinks;\n /**\n * The hypermedia links queue resolve mediator\n */\n mediatorRdfResolveHypermediaLinksQueue: MediatorRdfResolveHypermediaLinksQueue;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type { ILink } from '@comunica/bus-rdf-resolve-hypermedia-links';\nimport type { ILinkQueue } from '@comunica/bus-rdf-resolve-hypermedia-links-queue';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type { IQuerySource, IActionContext, MetadataBindings, IQueryBindingsOptions } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator, BufferedIteratorOptions } from 'asynciterator';\nimport { BufferedIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\n\nexport abstract class LinkedRdfSourcesAsyncRdfIterator extends BufferedIterator {\n protected readonly operation: Algebra.Operation;\n protected readonly queryBindingsOptions: IQueryBindingsOptions | undefined;\n protected readonly context: IActionContext;\n\n private readonly cacheSize: number;\n protected readonly firstUrl: string;\n private readonly maxIterators: number;\n private readonly sourceStateGetter: SourceStateGetter;\n\n protected started = false;\n private readonly currentIterators: AsyncIterator[] = [];\n private iteratorsPendingCreation = 0;\n private iteratorsPendingTermination = 0;\n // eslint-disable-next-line unicorn/no-useless-undefined\n private accumulatedMetadata: Promise = Promise.resolve(undefined);\n private preflightMetadata: Promise | undefined;\n\n public constructor(\n cacheSize: number,\n operation: Algebra.Operation,\n queryBindingsOptions: IQueryBindingsOptions | undefined,\n context: IActionContext,\n firstUrl: string,\n maxIterators: number,\n sourceStateGetter: SourceStateGetter,\n options?: BufferedIteratorOptions,\n ) {\n super({ autoStart: false, ...options });\n this._reading = false;\n this.cacheSize = cacheSize;\n this.operation = operation;\n this.queryBindingsOptions = queryBindingsOptions;\n this.context = context;\n this.firstUrl = firstUrl;\n this.maxIterators = maxIterators;\n this.sourceStateGetter = sourceStateGetter;\n\n if (this.maxIterators <= 0) {\n throw new Error(`LinkedRdfSourcesAsyncRdfIterator.maxIterators must be larger than zero, but got ${this.maxIterators}`);\n }\n }\n\n /**\n * Start filling the buffer of this iterator.\n */\n public kickstart(): void {\n if (!this.started) {\n this._fillBufferAsync();\n }\n }\n\n public override getProperty

(propertyName: string, callback?: (value: P) => void): P | undefined {\n if (propertyName === 'metadata' && !this.started) {\n // If the iterator has not started yet, forcefully fetch the metadata from the source without starting the\n // iterator. This way, we keep the iterator lazy.\n if (!this.preflightMetadata) {\n this.preflightMetadata = new Promise((resolve, reject) => {\n this.sourceStateGetter({ url: this.firstUrl }, {})\n .then((sourceState) => {\n // Don't pass query options, as we don't want to consume any passed iterators\n const bindingsStream = sourceState.source.queryBindings(this.operation, this.context);\n bindingsStream.getProperty('metadata', (metadata: MetadataBindings) => {\n metadata.state = new MetadataValidationState();\n bindingsStream.destroy();\n this.accumulateMetadata(sourceState.metadata, metadata)\n .then((accumulatedMetadata) => {\n // Also merge fields that were not explicitly accumulated\n const returnMetadata = { ...sourceState.metadata, ...metadata, ...accumulatedMetadata };\n resolve(returnMetadata);\n })\n .catch(() => {\n resolve({\n ...sourceState.metadata,\n state: new MetadataValidationState(),\n });\n });\n });\n })\n .catch(reject);\n });\n }\n this.preflightMetadata\n .then(metadata => this.setProperty('metadata', metadata))\n .catch(() => {\n // Ignore errors\n });\n }\n return super.getProperty(propertyName, callback);\n }\n\n protected override _end(destroy?: boolean): void {\n // Close all running iterators\n for (const it of this.currentIterators) {\n it.destroy();\n }\n\n super._end(destroy);\n }\n\n /**\n * Get the internal link queue.\n * The returned instance must always be the same.\n */\n public abstract getLinkQueue(): Promise;\n\n /**\n * Determine the links to be followed from the current source given its metadata.\n * @param metadata The metadata of a source.\n */\n protected abstract getSourceLinks(metadata: Record): Promise;\n\n public override _read(count: number, done: () => void): void {\n if (this.started) {\n // Read from all current iterators\n for (const iterator of this.currentIterators) {\n while (count > 0) {\n const read = iterator.read();\n if (read === null) {\n break;\n } else {\n count--;\n this._push(read);\n }\n }\n if (count <= 0) {\n break;\n }\n }\n\n // Schedule new iterators if needed\n if (count >= 0 && this.canStartNewIterator()) {\n // We can safely ignore skip catching the error, since we are guaranteed to have\n // successfully got the source for this.firstUrl before.\n // eslint-disable-next-line ts/no-floating-promises\n this.sourceStateGetter({ url: this.firstUrl }, {})\n .then((sourceState) => {\n this.startIteratorsForNextUrls(sourceState.handledDatasets, false);\n done();\n });\n } else {\n done();\n }\n } else {\n // The first time this is called, prepare the first source\n this.started = true;\n\n // Await the source to be set, and start the source iterator\n this.sourceStateGetter({ url: this.firstUrl }, {})\n .then((sourceState) => {\n this.startIterator(sourceState);\n done();\n })\n // Destroy should be async because it can be called before it is listened to\n .catch(error => setTimeout(() => this.destroy(error)));\n }\n }\n\n protected canStartNewIterator(): boolean {\n return (this.currentIterators.length + this.iteratorsPendingCreation + this.iteratorsPendingTermination) <\n this.maxIterators && (!this.canStartNewIteratorConsiderReadable() || !this.readable);\n }\n\n protected canStartNewIteratorConsiderReadable(): boolean {\n return true;\n }\n\n protected areIteratorsRunning(): boolean {\n return (this.currentIterators.length + this.iteratorsPendingCreation + this.iteratorsPendingTermination) > 0;\n }\n\n /**\n * Append the fields from appendingMetadata into accumulatedMetadata.\n * @param accumulatedMetadata The fields to append to.\n * @param appendingMetadata The fields to append.\n * @protected\n */\n protected abstract accumulateMetadata(\n accumulatedMetadata: MetadataBindings,\n appendingMetadata: MetadataBindings,\n ): Promise;\n\n /**\n * Start a new iterator for the given source.\n * Once the iterator is done, it will either determine a new source, or it will close the linked iterator.\n * @param {ISourceState} startSource The start source state.\n */\n protected startIterator(startSource: ISourceState): void {\n // Delegate the quad pattern query to the given source\n try {\n const iterator = startSource.source.queryBindings(this.operation, this.context, this.queryBindingsOptions);\n this.currentIterators.push(iterator);\n let receivedEndEvent = false;\n let receivedMetadata = false;\n\n // Attach readers to the newly created iterator\n (iterator)._destination = this;\n iterator.on('error', (error: Error) => this.destroy(error));\n iterator.on('readable', () => this._fillBuffer());\n iterator.on('end', () => {\n this.currentIterators.splice(this.currentIterators.indexOf(iterator), 1);\n\n // Indicate that this iterator still needs to flush its next-links.\n // Without this, the linked iterator could sometimes be closed before next-links are obtained.\n receivedEndEvent = true;\n if (!receivedMetadata) {\n this.iteratorsPendingTermination++;\n }\n\n // If the metadata was already received, handle the next URL in the queue\n if (receivedMetadata) {\n this.startIteratorsForNextUrls(startSource.handledDatasets, true);\n }\n });\n\n // Listen for the metadata of the source\n // The metadata property is guaranteed to be set\n iterator.getProperty('metadata', (metadata: MetadataBindings) => {\n // Accumulate the metadata object\n this.accumulatedMetadata = this.accumulatedMetadata\n .then(previousMetadata => (async() => {\n if (!previousMetadata) {\n previousMetadata = startSource.metadata;\n }\n return this.accumulateMetadata(previousMetadata, metadata);\n })()\n .then((accumulatedMetadata) => {\n // Also merge fields that were not explicitly accumulated\n const returnMetadata = { ...startSource.metadata, ...metadata, ...accumulatedMetadata };\n\n // Create new metadata state\n returnMetadata.state = new MetadataValidationState();\n\n // Emit metadata, and invalidate any metadata that was set before\n this.updateMetadata(returnMetadata);\n\n // Invalidate any preflight metadata\n if (this.preflightMetadata) {\n this.preflightMetadata\n .then(metadataIn => metadataIn.state.invalidate())\n .catch(() => {\n // Ignore errors\n });\n }\n\n // Determine next urls, which will eventually become a next-next source.\n this.getSourceLinks(returnMetadata)\n .then((nextUrls: ILink[]) => Promise.all(nextUrls))\n .then(async(nextUrls: ILink[]) => {\n // Append all next URLs to our queue\n const linkQueue = await this.getLinkQueue();\n for (const nextUrl of nextUrls) {\n linkQueue.push(nextUrl, startSource.link);\n }\n\n receivedMetadata = true;\n if (receivedEndEvent) {\n this.iteratorsPendingTermination--;\n }\n\n this.startIteratorsForNextUrls(startSource.handledDatasets, true);\n }).catch(error => this.destroy(error));\n\n return returnMetadata;\n })).catch((error) => {\n this.destroy(error);\n return {};\n });\n });\n } catch (syncError: unknown) {\n this.destroy( syncError);\n }\n }\n\n protected updateMetadata(metadataNew: MetadataBindings): void {\n const metadataToInvalidate = this.getProperty('metadata');\n this.setProperty('metadata', metadataNew);\n metadataToInvalidate?.state.invalidate();\n }\n\n protected isRunning(): boolean {\n return !this.done;\n }\n\n /**\n * Check if a next URL is in the queue.\n * If yes, start a new iterator.\n * If no, close this iterator.\n * @param handledDatasets\n * @param canClose\n */\n protected startIteratorsForNextUrls(handledDatasets: Record, canClose: boolean): void {\n this.getLinkQueue()\n .then((linkQueue) => {\n // Create as many new iterators as possible\n while (this.canStartNewIterator() && this.isRunning()) {\n const nextLink = linkQueue.pop();\n if (nextLink) {\n this.iteratorsPendingCreation++;\n this.sourceStateGetter(nextLink, handledDatasets)\n .then((nextSourceState) => {\n this.iteratorsPendingCreation--;\n this.startIterator(nextSourceState);\n })\n .catch(error => this.emit('error', error));\n } else {\n break;\n }\n }\n\n // Close, only if no other iterators are still running\n if (canClose && this.isCloseable(linkQueue, true)) {\n this.close();\n }\n })\n .catch(error => this.destroy(error));\n }\n\n protected isCloseable(linkQueue: ILinkQueue, _requireQueueEmpty: boolean): boolean {\n return linkQueue.isEmpty() && !this.areIteratorsRunning();\n }\n}\n\n/**\n * The current state of a source.\n * This is needed for following links within a source.\n */\nexport interface ISourceState {\n /**\n * The link to this source.\n */\n link: ILink;\n /**\n * A source.\n */\n source: IQuerySource;\n /**\n * The source's initial metadata.\n */\n metadata: MetadataBindings;\n /**\n * All dataset identifiers that have been passed for this source.\n */\n handledDatasets: Record;\n}\n\nexport type SourceStateGetter = (link: ILink, handledDatasets: Record) => Promise;\n","import type { MediatorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type { ILink, MediatorRdfResolveHypermediaLinks } from '@comunica/bus-rdf-resolve-hypermedia-links';\nimport type {\n ILinkQueue,\n MediatorRdfResolveHypermediaLinksQueue,\n} from '@comunica/bus-rdf-resolve-hypermedia-links-queue';\nimport { KeysQueryOperation } from '@comunica/context-entries';\nimport type { IActionContext, IAggregatedStore, IQueryBindingsOptions, MetadataBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { Factory } from 'sparqlalgebrajs';\nimport type { SourceStateGetter, ISourceState } from './LinkedRdfSourcesAsyncRdfIterator';\nimport { LinkedRdfSourcesAsyncRdfIterator } from './LinkedRdfSourcesAsyncRdfIterator';\n\nconst DF = new DataFactory();\nconst AF = new Factory();\n\n/**\n * An quad iterator that can iterate over consecutive RDF sources\n * that are determined using the rdf-resolve-hypermedia-links bus.\n *\n * @see LinkedRdfSourcesAsyncRdfIterator\n */\nexport class MediatedLinkedRdfSourcesAsyncRdfIterator extends LinkedRdfSourcesAsyncRdfIterator {\n private readonly mediatorMetadataAccumulate: MediatorRdfMetadataAccumulate;\n private readonly mediatorRdfResolveHypermediaLinks: MediatorRdfResolveHypermediaLinks;\n private readonly mediatorRdfResolveHypermediaLinksQueue: MediatorRdfResolveHypermediaLinksQueue;\n private readonly forceSourceType?: string;\n private readonly handledUrls: Record;\n private readonly aggregatedStore: IAggregatedStore | undefined;\n private linkQueue: Promise | undefined;\n private wasForcefullyClosed = false;\n\n public constructor(\n cacheSize: number,\n operation: Algebra.Operation,\n queryBindingsOptions: IQueryBindingsOptions | undefined,\n context: IActionContext,\n forceSourceType: string | undefined,\n firstUrl: string,\n maxIterators: number,\n sourceStateGetter: SourceStateGetter,\n aggregatedStore: IAggregatedStore | undefined,\n mediatorMetadataAccumulate: MediatorRdfMetadataAccumulate,\n mediatorRdfResolveHypermediaLinks: MediatorRdfResolveHypermediaLinks,\n mediatorRdfResolveHypermediaLinksQueue: MediatorRdfResolveHypermediaLinksQueue,\n ) {\n super(\n cacheSize,\n operation,\n queryBindingsOptions,\n context,\n firstUrl,\n maxIterators,\n sourceStateGetter,\n // Buffersize must be infinite for an aggregated store because it must keep filling until there are no more\n // derived iterators in the aggregated store.\n aggregatedStore ? { maxBufferSize: Number.POSITIVE_INFINITY } : undefined,\n );\n this.forceSourceType = forceSourceType;\n this.mediatorMetadataAccumulate = mediatorMetadataAccumulate;\n this.mediatorRdfResolveHypermediaLinks = mediatorRdfResolveHypermediaLinks;\n this.mediatorRdfResolveHypermediaLinksQueue = mediatorRdfResolveHypermediaLinksQueue;\n this.handledUrls = { [firstUrl]: true };\n this.aggregatedStore = aggregatedStore;\n }\n\n // Mark the aggregated store as ended once we trigger the closing or destroying of this iterator.\n // We don't override _end, because that would mean that we have to wait\n // until the buffer of this iterator must be fully consumed, which will not always be the case.\n\n public override close(): void {\n if (!this.aggregatedStore) {\n super.close();\n return;\n }\n\n this.getLinkQueue()\n .then((linkQueue) => {\n if (this.isCloseable(linkQueue, false)) {\n // Wait a tick before ending the aggregatedStore, to ensure that pending match() calls to it have started.\n if (this.aggregatedStore) {\n setTimeout(() => this.aggregatedStore!.end());\n }\n super.close();\n } else {\n this.wasForcefullyClosed = true;\n }\n })\n .catch(error => super.destroy(error));\n }\n\n public override destroy(cause?: Error): void {\n if (!this.aggregatedStore) {\n super.destroy(cause);\n return;\n }\n\n this.getLinkQueue()\n .then((linkQueue) => {\n if (cause ?? this.isCloseable(linkQueue, false)) {\n // Wait a tick before ending the aggregatedStore, to ensure that pending match() calls to it have started.\n if (this.aggregatedStore) {\n setTimeout(() => this.aggregatedStore!.end());\n }\n super.destroy(cause);\n } else {\n this.wasForcefullyClosed = true;\n }\n })\n .catch(error => super.destroy(error));\n }\n\n protected override isCloseable(linkQueue: ILinkQueue, requireQueueEmpty: boolean): boolean {\n return (requireQueueEmpty ? linkQueue.isEmpty() : this.wasForcefullyClosed || linkQueue.isEmpty()) &&\n !this.areIteratorsRunning();\n }\n\n protected override canStartNewIterator(): boolean {\n // Also allow sub-iterators to be started if the aggregated store has at least one running iterator.\n // We need this because there are cases where these running iterators will be consumed before this linked iterator.\n return (!this.wasForcefullyClosed &&\n // eslint-disable-next-line ts/prefer-nullish-coalescing\n (this.aggregatedStore && this.aggregatedStore.hasRunningIterators())) || super.canStartNewIterator();\n }\n\n protected override canStartNewIteratorConsiderReadable(): boolean {\n return !this.aggregatedStore;\n }\n\n protected override isRunning(): boolean {\n // Same as above\n // eslint-disable-next-line ts/prefer-nullish-coalescing\n return (this.aggregatedStore && this.aggregatedStore.hasRunningIterators()) || !this.done;\n }\n\n public getLinkQueue(): Promise {\n if (!this.linkQueue) {\n this.linkQueue = this.mediatorRdfResolveHypermediaLinksQueue\n .mediate({ firstUrl: this.firstUrl, context: this.context })\n .then(result => result.linkQueue);\n }\n return this.linkQueue;\n }\n\n protected async getSourceLinks(metadata: Record): Promise {\n try {\n const { links } = await this.mediatorRdfResolveHypermediaLinks.mediate({ context: this.context, metadata });\n\n // Filter URLs to avoid cyclic next-page loops\n return links.filter((link) => {\n if (this.handledUrls[link.url]) {\n return false;\n }\n this.handledUrls[link.url] = true;\n return true;\n });\n } catch {\n // No next URLs may be available, for example when we've reached the end of a Hydra next-page sequence.\n return [];\n }\n }\n\n protected override startIterator(startSource: ISourceState): void {\n if (this.aggregatedStore && !this.aggregatedStore.containedSources.has(startSource.link.url)) {\n // A source that has been cached due to earlier query executions may not be part of the aggregated store yet.\n // In that case, we add all quads from that source to the aggregated store.\n this.aggregatedStore?.containedSources.add(startSource.link.url);\n const stream = startSource.source.queryBindings(\n AF.createPattern(\n DF.variable('s'),\n DF.variable('p'),\n DF.variable('o'),\n DF.variable('g'),\n ),\n this.context.set(KeysQueryOperation.unionDefaultGraph, true),\n ).map(bindings => DF.quad(\n bindings.get('s')!,\n bindings.get('p')!,\n bindings.get('o')!,\n bindings.get('g'),\n ));\n this.aggregatedStore.import( stream)\n .on('end', () => {\n super.startIterator(startSource);\n });\n } else {\n super.startIterator(startSource);\n }\n }\n\n public async accumulateMetadata(\n accumulatedMetadata: MetadataBindings,\n appendingMetadata: MetadataBindings,\n ): Promise {\n return (await this.mediatorMetadataAccumulate.mediate({\n mode: 'append',\n accumulatedMetadata,\n appendingMetadata,\n context: this.context,\n })).metadata;\n }\n\n protected override updateMetadata(metadataNew: MetadataBindings): void {\n super.updateMetadata(metadataNew);\n this.aggregatedStore?.setBaseMetadata(metadataNew, true);\n }\n}\n","import { QuerySourceRdfJs } from '@comunica/actor-query-source-identify-rdfjs';\nimport type { BindingsFactory } from '@comunica/bindings-factory';\nimport type { IActorDereferenceRdfOutput, MediatorDereferenceRdf } from '@comunica/bus-dereference-rdf';\nimport type { MediatorQuerySourceIdentifyHypermedia } from '@comunica/bus-query-source-identify-hypermedia';\nimport type { IActorRdfMetadataOutput, MediatorRdfMetadata } from '@comunica/bus-rdf-metadata';\nimport type { MediatorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type { MediatorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { ILink, MediatorRdfResolveHypermediaLinks } from '@comunica/bus-rdf-resolve-hypermedia-links';\nimport type { MediatorRdfResolveHypermediaLinksQueue } from '@comunica/bus-rdf-resolve-hypermedia-links-queue';\nimport { KeysQuerySourceIdentify } from '@comunica/context-entries';\nimport type {\n BindingsStream,\n FragmentSelectorShape,\n IActionContext,\n IAggregatedStore,\n IQueryBindingsOptions,\n IQuerySource,\n MetadataBindings,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { TransformIterator } from 'asynciterator';\nimport { LRUCache } from 'lru-cache';\nimport { Readable } from 'readable-stream';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport type { ISourceState } from './LinkedRdfSourcesAsyncRdfIterator';\nimport { MediatedLinkedRdfSourcesAsyncRdfIterator } from './MediatedLinkedRdfSourcesAsyncRdfIterator';\nimport { StreamingStoreMetadata } from './StreamingStoreMetadata';\n\nexport class QuerySourceHypermedia implements IQuerySource {\n public readonly referenceValue: string;\n public readonly firstUrl: string;\n public readonly forceSourceType?: string;\n public readonly aggregateStore: boolean;\n public readonly mediators: IMediatorArgs;\n public readonly logWarning: (warningMessage: string) => void;\n public readonly bindingsFactory: BindingsFactory;\n\n /**\n * A cache for source URLs to source states.\n */\n public sourcesState: LRUCache>;\n\n private readonly cacheSize: number;\n private readonly maxIterators: number;\n\n public constructor(\n cacheSize: number,\n firstUrl: string,\n forceSourceType: string | undefined,\n maxIterators: number,\n aggregateStore: boolean,\n mediators: IMediatorArgs,\n logWarning: (warningMessage: string) => void,\n bindingsFactory: BindingsFactory,\n ) {\n this.referenceValue = firstUrl;\n this.cacheSize = cacheSize;\n this.firstUrl = firstUrl;\n this.forceSourceType = forceSourceType;\n this.maxIterators = maxIterators;\n this.mediators = mediators;\n this.aggregateStore = aggregateStore;\n this.logWarning = logWarning;\n this.bindingsFactory = bindingsFactory;\n this.sourcesState = new LRUCache>({ max: this.cacheSize });\n }\n\n public async getSelectorShape(context: IActionContext): Promise {\n const source = await this.getSourceCached({ url: this.firstUrl }, {}, context, this.getAggregateStore(context));\n return source.source.getSelectorShape(context);\n }\n\n public queryBindings(\n operation: Algebra.Operation,\n context: IActionContext,\n options?: IQueryBindingsOptions,\n ): BindingsStream {\n // Optimized match with aggregated store if enabled and started.\n const aggregatedStore: IAggregatedStore | undefined = this.getAggregateStore(context);\n if (aggregatedStore && operation.type === 'pattern' && aggregatedStore.started) {\n return new QuerySourceRdfJs(aggregatedStore, this.bindingsFactory).queryBindings(operation, context);\n }\n\n // Initialize the sources state on first call\n if (this.sourcesState.size === 0) {\n this.getSourceCached({ url: this.firstUrl }, {}, context, aggregatedStore)\n .catch(error => it.destroy(error));\n }\n\n const it: MediatedLinkedRdfSourcesAsyncRdfIterator = new MediatedLinkedRdfSourcesAsyncRdfIterator(\n this.cacheSize,\n operation,\n options,\n context,\n this.forceSourceType,\n this.firstUrl,\n this.maxIterators,\n (link, handledDatasets) => this.getSourceCached(link, handledDatasets, context, aggregatedStore),\n aggregatedStore,\n this.mediators.mediatorMetadataAccumulate,\n this.mediators.mediatorRdfResolveHypermediaLinks,\n this.mediators.mediatorRdfResolveHypermediaLinksQueue,\n );\n if (aggregatedStore) {\n aggregatedStore.started = true;\n\n // Kickstart this iterator when derived iterators are created from the aggregatedStore,\n // otherwise the traversal process will not start if this iterator is not the first one to be consumed.\n const listener = (): void => it.kickstart();\n aggregatedStore.addIteratorCreatedListener(listener);\n it.on('end', () => aggregatedStore.removeIteratorCreatedListener(listener));\n }\n\n return it;\n }\n\n public queryQuads(operation: Algebra.Operation, context: IActionContext): AsyncIterator {\n return new TransformIterator(async() => {\n const source = await this.getSourceCached({ url: this.firstUrl }, {}, context, this.getAggregateStore(context));\n return source.source.queryQuads(operation, context);\n });\n }\n\n public async queryBoolean(operation: Algebra.Ask, context: IActionContext): Promise {\n const source = await this.getSourceCached({ url: this.firstUrl }, {}, context, this.getAggregateStore(context));\n return await source.source.queryBoolean(operation, context);\n }\n\n public async queryVoid(operation: Algebra.Update, context: IActionContext): Promise {\n const source = await this.getSourceCached({ url: this.firstUrl }, {}, context, this.getAggregateStore(context));\n return await source.source.queryVoid(operation, context);\n }\n\n /**\n * Resolve a source for the given URL.\n * @param link A source link.\n * @param handledDatasets A hash of dataset identifiers that have already been handled.\n * @param context The action context.\n * @param aggregatedStore An optional aggregated store.\n */\n public async getSource(\n link: ILink,\n handledDatasets: Record,\n context: IActionContext,\n aggregatedStore: IAggregatedStore | undefined,\n ): Promise {\n // Include context entries from link\n if (link.context) {\n context = context.merge(link.context);\n }\n\n // Get the RDF representation of the given document\n let url = link.url;\n let quads: RDF.Stream;\n let metadata: Record;\n try {\n const dereferenceRdfOutput: IActorDereferenceRdfOutput = await this.mediators.mediatorDereferenceRdf\n .mediate({ context, url });\n url = dereferenceRdfOutput.url;\n\n // Determine the metadata\n const rdfMetadataOutput: IActorRdfMetadataOutput = await this.mediators.mediatorMetadata.mediate(\n { context, url, quads: dereferenceRdfOutput.data, triples: dereferenceRdfOutput.metadata?.triples },\n );\n\n rdfMetadataOutput.data.on('error', () => {\n // Silence errors in the data stream,\n // as they will be emitted again in the metadata stream,\n // and will result in a promise rejection anyways.\n // If we don't do this, we end up with an unhandled error message\n });\n\n metadata = (await this.mediators.mediatorMetadataExtract.mediate({\n context,\n url,\n // The problem appears to be conflicting metadata keys here\n metadata: rdfMetadataOutput.metadata,\n headers: dereferenceRdfOutput.headers,\n requestTime: dereferenceRdfOutput.requestTime,\n })).metadata;\n quads = rdfMetadataOutput.data;\n\n // Optionally filter the resulting data\n if (link.transform) {\n quads = await link.transform(quads);\n }\n } catch (error: unknown) {\n // Make sure that dereference errors are only emitted once an actor really needs the read quads\n // This for example allows SPARQL endpoints that error on service description fetching to still be source-forcible\n quads = new Readable();\n quads.read = () => {\n setTimeout(() => quads.emit('error', error));\n return null;\n };\n ({ metadata } = await this.mediators.mediatorMetadataAccumulate.mediate({ context, mode: 'initialize' }));\n\n // Log as warning, because the quads above may not always be consumed (e.g. for SPARQL endpoints),\n // so the user would not be notified of something going wrong otherwise.\n this.logWarning(`Metadata extraction for ${url} failed: ${( error).message}`);\n }\n\n // Aggregate all discovered quads into a store.\n aggregatedStore?.setBaseMetadata( metadata, false);\n aggregatedStore?.containedSources.add(link.url);\n aggregatedStore?.import(quads);\n\n // Determine the source\n const { source, dataset } = await this.mediators.mediatorQuerySourceIdentifyHypermedia.mediate({\n context,\n forceSourceType: link.url === this.firstUrl ? this.forceSourceType : undefined,\n handledDatasets,\n metadata,\n quads,\n url,\n });\n\n if (dataset) {\n // Mark the dataset as applied\n // This is needed to make sure that things like QPF search forms are only applied once,\n // and next page links are followed after that.\n handledDatasets[dataset] = true;\n }\n\n return { link, source, metadata: metadata, handledDatasets };\n }\n\n /**\n * Resolve a source for the given URL.\n * This will first try to retrieve the source from cache.\n * @param link A source ILink.\n * @param handledDatasets A hash of dataset identifiers that have already been handled.\n * @param context The action context.\n * @param aggregatedStore An optional aggregated store.\n */\n protected getSourceCached(\n link: ILink,\n handledDatasets: Record,\n context: IActionContext,\n aggregatedStore: IAggregatedStore | undefined,\n ): Promise {\n let source = this.sourcesState.get(link.url);\n if (source) {\n return source;\n }\n source = this.getSource(link, handledDatasets, context, aggregatedStore);\n if (link.url === this.firstUrl || aggregatedStore === undefined) {\n this.sourcesState.set(link.url, source);\n }\n return source;\n }\n\n public getAggregateStore(context: IActionContext): IAggregatedStore | undefined {\n let aggregatedStore: IAggregatedStore | undefined;\n if (this.aggregateStore) {\n const aggregatedStores: Map | undefined = context\n .get(KeysQuerySourceIdentify.hypermediaSourcesAggregatedStores);\n if (aggregatedStores) {\n aggregatedStore = aggregatedStores.get(this.firstUrl);\n if (!aggregatedStore) {\n aggregatedStore = new StreamingStoreMetadata(\n undefined,\n async(accumulatedMetadata, appendingMetadata) => \n (await this.mediators.mediatorMetadataAccumulate.mediate({\n mode: 'append',\n accumulatedMetadata,\n appendingMetadata,\n context,\n })).metadata,\n );\n aggregatedStores.set(this.firstUrl, aggregatedStore);\n }\n return aggregatedStore;\n }\n }\n }\n\n public toString(): string {\n return `QuerySourceHypermedia(${this.firstUrl})`;\n }\n}\n\nexport interface IMediatorArgs {\n mediatorDereferenceRdf: MediatorDereferenceRdf;\n mediatorMetadata: MediatorRdfMetadata;\n mediatorMetadataExtract: MediatorRdfMetadataExtract;\n mediatorMetadataAccumulate: MediatorRdfMetadataAccumulate;\n mediatorQuerySourceIdentifyHypermedia: MediatorQuerySourceIdentifyHypermedia;\n mediatorRdfResolveHypermediaLinks: MediatorRdfResolveHypermediaLinks;\n mediatorRdfResolveHypermediaLinksQueue: MediatorRdfResolveHypermediaLinksQueue;\n}\n","// eslint-disable-next-line import/no-nodejs-modules\nimport type { EventEmitter } from 'node:events';\nimport { ClosableTransformIterator } from '@comunica/bus-query-operation';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type { MetadataQuads, IAggregatedStore, MetadataBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { StreamingStore } from 'rdf-streaming-store';\n\n/**\n * A StreamingStore that returns an AsyncIterator with a valid MetadataQuads property.\n */\nexport class StreamingStoreMetadata extends StreamingStore implements IAggregatedStore {\n public started = false;\n public containedSources = new Set();\n public readonly runningIterators: Set> = new Set>();\n protected readonly iteratorCreatedListeners: Set<() => void> = new Set();\n protected readonly metadataAccumulator:\n (accumulatedMetadata: MetadataBindings, appendingMetadata: MetadataBindings) => Promise;\n\n protected baseMetadata: MetadataBindings = {\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 0 },\n canContainUndefs: false,\n variables: [],\n };\n\n public constructor(\n store: RDF.Store | undefined,\n metadataAccumulator:\n (accumulatedMetadata: MetadataBindings, appendingMetadata: MetadataBindings) => Promise,\n ) {\n super(store);\n this.metadataAccumulator = metadataAccumulator;\n }\n\n public override import(stream: RDF.Stream): EventEmitter {\n if (!this.ended) {\n super.import(stream);\n }\n return stream;\n }\n\n public hasRunningIterators(): boolean {\n return this.runningIterators.size > 0;\n }\n\n public override match(\n subject?: RDF.Term | null,\n predicate?: RDF.Term | null,\n object?: RDF.Term | null,\n graph?: RDF.Term | null,\n ): AsyncIterator {\n // Wrap the raw stream in an AsyncIterator\n const rawStream = super.match(subject, predicate, object, graph);\n const iterator = new ClosableTransformIterator(\n rawStream,\n {\n autoStart: false,\n onClose: () => {\n // Running iterators are deleted once closed or destroyed\n this.runningIterators.delete(iterator);\n },\n },\n );\n\n // Expose the metadata property containing the cardinality\n let count = this.getStore().countQuads(subject!, predicate!, object!, graph!);\n const metadata: MetadataQuads = {\n state: new MetadataValidationState(),\n cardinality: {\n type: 'estimate',\n value: count,\n },\n canContainUndefs: false,\n };\n iterator.setProperty('metadata', metadata);\n iterator.setProperty('lastCount', count);\n\n // Every time a new quad is pushed into the iterator, update the metadata\n rawStream.on('quad', () => {\n iterator.setProperty('lastCount', ++count);\n this.updateMetadataState(iterator, count);\n });\n\n // Store all running iterators until they close or are destroyed\n this.runningIterators.add(iterator);\n\n // Invoke creation listeners\n for (const listener of this.iteratorCreatedListeners) {\n listener();\n }\n\n return iterator;\n }\n\n public setBaseMetadata(metadata: MetadataBindings, updateStates: boolean): void {\n this.baseMetadata = { ...metadata };\n this.baseMetadata.cardinality = { type: 'exact', value: 0 };\n\n if (updateStates) {\n for (const iterator of this.runningIterators) {\n const count: number = iterator.getProperty('lastCount')!;\n this.updateMetadataState(iterator, count);\n }\n }\n }\n\n protected updateMetadataState(iterator: AsyncIterator, count: number): void {\n // Append the given cardinality to the base metadata\n const metadataNew: MetadataBindings = {\n state: new MetadataValidationState(),\n cardinality: {\n type: 'estimate',\n value: count,\n },\n canContainUndefs: false,\n variables: [],\n };\n\n this.metadataAccumulator(this.baseMetadata, metadataNew)\n .then((accumulatedMetadata) => {\n accumulatedMetadata.state = new MetadataValidationState();\n\n // Set the new metadata, and invalidate the previous state\n const metadataToInvalidate = iterator.getProperty('metadata');\n iterator.setProperty('metadata', accumulatedMetadata);\n metadataToInvalidate?.state.invalidate();\n })\n .catch(() => {\n // Void errors\n });\n }\n\n public addIteratorCreatedListener(listener: () => void): void {\n this.iteratorCreatedListeners.add(listener);\n }\n\n public removeIteratorCreatedListener(listener: () => void): void {\n this.iteratorCreatedListeners.delete(listener);\n }\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type {\n IActionQuerySourceIdentify,\n IActorQuerySourceIdentifyOutput,\n IActorQuerySourceIdentifyArgs,\n} from '@comunica/bus-query-source-identify';\nimport { ActorQuerySourceIdentify } from '@comunica/bus-query-source-identify';\nimport type { IActorTest } from '@comunica/core';\nimport { ActionContext } from '@comunica/core';\nimport type * as RDF from '@rdfjs/types';\nimport { QuerySourceRdfJs } from './QuerySourceRdfJs';\n\n/**\n * A comunica RDFJS Query Source Identify Actor.\n */\nexport class ActorQuerySourceIdentifyRdfJs extends ActorQuerySourceIdentify {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQuerySourceIdentifyRdfJsArgs) {\n super(args);\n }\n\n public async test(action: IActionQuerySourceIdentify): Promise {\n const source = action.querySourceUnidentified;\n if (source.type !== undefined && source.type !== 'rdfjs') {\n throw new Error(`${this.name} requires a single query source with rdfjs type to be present in the context.`);\n }\n if (typeof source.value === 'string' || !('match' in source.value)) {\n throw new Error(`${this.name} received an invalid rdfjs query source.`);\n }\n return true;\n }\n\n public async run(action: IActionQuerySourceIdentify): Promise {\n return {\n querySource: {\n source: new QuerySourceRdfJs(\n action.querySourceUnidentified.value,\n await BindingsFactory.create(this.mediatorMergeBindingsContext, action.context),\n ),\n context: action.querySourceUnidentified.context ?? new ActionContext(),\n },\n };\n }\n}\n\nexport interface IActorQuerySourceIdentifyRdfJsArgs extends IActorQuerySourceIdentifyArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type { BindingsFactory } from '@comunica/bindings-factory';\nimport { filterMatchingQuotedQuads, quadsToBindings } from '@comunica/bus-query-source-identify';\nimport { KeysQueryOperation } from '@comunica/context-entries';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type { IQuerySource, BindingsStream, IActionContext, FragmentSelectorShape } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { AsyncIterator, wrap as wrapAsyncIterator } from 'asynciterator';\nimport { DataFactory } from 'rdf-data-factory';\nimport { someTermsNested, filterTermsNested, someTerms, uniqTerms } from 'rdf-terms';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { Factory } from 'sparqlalgebrajs';\nimport type { IRdfJsSourceExtended } from './IRdfJsSourceExtended';\n\nconst AF = new Factory();\nconst DF = new DataFactory();\n\nexport class QuerySourceRdfJs implements IQuerySource {\n protected static readonly SELECTOR_SHAPE: FragmentSelectorShape = {\n type: 'operation',\n operation: {\n operationType: 'pattern',\n pattern: AF.createPattern(DF.variable('s'), DF.variable('p'), DF.variable('o')),\n },\n variablesOptional: [\n DF.variable('s'),\n DF.variable('p'),\n DF.variable('o'),\n ],\n };\n\n public referenceValue: string | RDF.Source;\n protected readonly source: IRdfJsSourceExtended;\n private readonly bindingsFactory: BindingsFactory;\n\n public constructor(source: RDF.Source, bindingsFactory: BindingsFactory) {\n this.source = source;\n this.referenceValue = source;\n this.bindingsFactory = bindingsFactory;\n }\n\n public static nullifyVariables(term: RDF.Term | undefined, quotedTripleFiltering: boolean): RDF.Term | undefined {\n return !term || term.termType === 'Variable' || (!quotedTripleFiltering &&\n term.termType === 'Quad' && someTermsNested(term, value => value.termType === 'Variable')) ?\n undefined :\n term;\n }\n\n public static hasDuplicateVariables(pattern: RDF.BaseQuad): boolean {\n const variables = filterTermsNested(pattern, term => term.termType === 'Variable');\n return variables.length > 1 && uniqTerms(variables).length < variables.length;\n }\n\n public async getSelectorShape(): Promise {\n return QuerySourceRdfJs.SELECTOR_SHAPE;\n }\n\n public queryBindings(operation: Algebra.Operation, context: IActionContext): BindingsStream {\n if (operation.type !== 'pattern') {\n throw new Error(`Attempted to pass non-pattern operation '${operation.type}' to QuerySourceRdfJs`);\n }\n\n // Check if the source supports quoted triple filtering\n const quotedTripleFiltering = Boolean(this.source.features?.quotedTripleFiltering);\n\n // Create an async iterator from the matched quad stream\n const rawStream = this.source.match(\n QuerySourceRdfJs.nullifyVariables(operation.subject, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.predicate, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.object, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.graph, quotedTripleFiltering),\n );\n let it: AsyncIterator = rawStream instanceof AsyncIterator ?\n rawStream :\n wrapAsyncIterator(rawStream, { autoStart: false });\n\n // Perform post-match-filtering if the source does not support quoted triple filtering.\n if (!quotedTripleFiltering) {\n it = filterMatchingQuotedQuads(operation, it);\n }\n\n // Determine metadata\n if (!it.getProperty('metadata')) {\n this.setMetadata(it, operation)\n .catch(error => it.destroy(error));\n }\n\n return quadsToBindings(\n it,\n operation,\n this.bindingsFactory,\n Boolean(context.get(KeysQueryOperation.unionDefaultGraph)),\n );\n }\n\n protected async setMetadata(\n it: AsyncIterator,\n operation: Algebra.Pattern,\n ): Promise {\n // Check if the source supports quoted triple filtering\n const quotedTripleFiltering = Boolean(this.source.features?.quotedTripleFiltering);\n\n let cardinality: number;\n if (this.source.countQuads) {\n // If the source provides a dedicated method for determining cardinality, use that.\n cardinality = await this.source.countQuads(\n QuerySourceRdfJs.nullifyVariables(operation.subject, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.predicate, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.object, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.graph, quotedTripleFiltering),\n );\n } else {\n // Otherwise, fallback to a sub-optimal alternative where we just call match again to count the quads.\n // WARNING: we can NOT reuse the original data stream here,\n // because we may lose data elements due to things happening async.\n let i = 0;\n cardinality = await new Promise((resolve, reject) => {\n const matches = this.source.match(\n QuerySourceRdfJs.nullifyVariables(operation.subject, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.predicate, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.object, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.graph, quotedTripleFiltering),\n );\n matches.on('error', reject);\n matches.on('end', () => resolve(i));\n matches.on('data', () => i++);\n });\n }\n\n // If `match` would require filtering afterwards, our count will be an over-estimate.\n const wouldRequirePostFiltering = (!quotedTripleFiltering &&\n someTerms(operation, term => term.termType === 'Quad')) ||\n QuerySourceRdfJs.hasDuplicateVariables(operation);\n\n it.setProperty('metadata', {\n state: new MetadataValidationState(),\n cardinality: { type: wouldRequirePostFiltering ? 'estimate' : 'exact', value: cardinality },\n canContainUndefs: false,\n });\n }\n\n public queryQuads(\n _operation: Algebra.Operation,\n _context: IActionContext,\n ): AsyncIterator {\n throw new Error('queryQuads is not implemented in QuerySourceQpf');\n }\n\n public queryBoolean(\n _operation: Algebra.Ask,\n _context: IActionContext,\n ): Promise {\n throw new Error('queryBoolean is not implemented in QuerySourceQpf');\n }\n\n public queryVoid(\n _operation: Algebra.Update,\n _context: IActionContext,\n ): Promise {\n throw new Error('queryVoid is not implemented in QuerySourceQpf');\n }\n\n public toString(): string {\n return `QuerySourceRdfJs(${this.source.constructor.name})`;\n }\n}\n","import type {\n IActionQuerySourceIdentify,\n IActorQuerySourceIdentifyOutput,\n IActorQuerySourceIdentifyArgs,\n MediatorQuerySourceIdentify,\n} from '@comunica/bus-query-source-identify';\nimport { ActorQuerySourceIdentify } from '@comunica/bus-query-source-identify';\nimport type { IActionRdfParseHandle, MediatorRdfParseHandle } from '@comunica/bus-rdf-parse';\nimport type { IActorTest } from '@comunica/core';\nimport type {\n IQuerySourceSerialized,\n QuerySourceUnidentifiedExpanded,\n IActionContext,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { storeStream } from 'rdf-store-stream';\nimport { Readable } from 'readable-stream';\n\n/**\n * A comunica Serialized Query Source Identify Actor.\n */\nexport class ActorQuerySourceIdentifySerialized extends ActorQuerySourceIdentify {\n public readonly cacheSize: number;\n public readonly mediatorRdfParse: MediatorRdfParseHandle;\n public readonly mediatorQuerySourceIdentify: MediatorQuerySourceIdentify;\n public constructor(args: IActorQuerySourceIdentifySerializedArgs) {\n super(args);\n }\n\n public async test(action: IActionQuerySourceIdentify): Promise {\n if (!this.isStringSource(action.querySourceUnidentified)) {\n throw new Error(`${this.name} requires a single query source with serialized type to be present in the context.`);\n }\n return true;\n }\n\n public async run(action: IActionQuerySourceIdentify): Promise {\n // Delegate source identification to the same bus again, by converting the string into an RDF/JS source\n return await this.mediatorQuerySourceIdentify.mediate({\n querySourceUnidentified: {\n type: 'rdfjs',\n value: await this.getRdfSource(action.context, action.querySourceUnidentified),\n context: action.querySourceUnidentified.context,\n },\n context: action.context,\n });\n }\n\n /**\n * Parses the string data source through the RDF parse bus, returning the RDF source.\n * @param context The run action context\n * @param source The source from the run action context\n * @returns Parsed RDF source that can be passed to quad pattern resolve mediator as an RDF/JS source\n */\n protected async getRdfSource(context: IActionContext, source: IQuerySourceSerialized): Promise {\n const textStream = new Readable({ objectMode: true });\n /* istanbul ignore next */\n textStream._read = () => {\n // Do nothing\n };\n textStream.push(source.value);\n textStream.push(null);\n\n const parseAction: IActionRdfParseHandle = {\n context,\n handle: {\n metadata: { baseIRI: source.baseIRI },\n data: textStream,\n context,\n },\n handleMediaType: source.mediaType,\n };\n\n const parseResult = await this.mediatorRdfParse.mediate(parseAction);\n return await storeStream(parseResult.handle.data);\n }\n\n private isStringSource(source: QuerySourceUnidentifiedExpanded): source is IQuerySourceSerialized {\n if (!('type' in source)) {\n if (!(typeof source.value === 'string')) {\n return false;\n }\n return 'mediaType' in source;\n }\n return source.type === 'serialized';\n }\n}\n\nexport interface IActorQuerySourceIdentifySerializedArgs extends IActorQuerySourceIdentifyArgs {\n /**\n * The quad pattern parser mediator.\n */\n mediatorRdfParse: MediatorRdfParseHandle;\n /**\n * The query source identify mediator.\n */\n mediatorQuerySourceIdentify: MediatorQuerySourceIdentify;\n}\n","import type { IActionRdfJoinEntriesSort, IActorRdfJoinEntriesSortOutput } from '@comunica/bus-rdf-join-entries-sort';\nimport { ActorRdfJoinEntriesSort } from '@comunica/bus-rdf-join-entries-sort';\nimport type { IActorArgs, IActorTest } from '@comunica/core';\n\n/**\n * An actor that sorts join entries by increasing cardinality.\n */\nexport class ActorRdfJoinEntriesSortCardinality extends ActorRdfJoinEntriesSort {\n public constructor(\n args: IActorArgs,\n ) {\n super(args);\n }\n\n public async test(_action: IActionRdfJoinEntriesSort): Promise {\n return true;\n }\n\n public async run(action: IActionRdfJoinEntriesSort): Promise {\n const entries = [ ...action.entries ]\n .sort((entryLeft, entryRight) => entryLeft.metadata.cardinality.value - entryRight.metadata.cardinality.value);\n return { entries };\n }\n}\n","import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { Bindings, MetadataBindings } from '@comunica/types';\nimport { HashJoin } from 'asyncjoin';\n\n/**\n * A comunica Hash RDF Join Actor.\n */\nexport class ActorRdfJoinHash extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'hash',\n limitEntries: 2,\n });\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n const metadatas = await ActorRdfJoin.getMetadatas(action.entries);\n const variables = ActorRdfJoin.overlappingVariables(metadatas);\n const join = new HashJoin(\n action.entries[0].output.bindingsStream,\n action.entries[1].output.bindingsStream,\n entry => ActorRdfJoin.hash(entry, variables),\n ActorRdfJoin.joinBindings,\n );\n return {\n result: {\n type: 'bindings',\n bindingsStream: join,\n metadata: async() => await this.constructResultMetadata(action.entries, metadatas, action.context),\n },\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n return {\n iterations: metadatas[0].cardinality.value + metadatas[1].cardinality.value,\n persistedItems: metadatas[0].cardinality.value,\n blockingItems: metadatas[0].cardinality.value,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1],\n };\n }\n}\n","import { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type { IActionRdfJoin, IActorRdfJoinArgs, IActorRdfJoinOutputInner } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin, ChunkedIterator } from '@comunica/bus-rdf-join';\nimport type { MediatorRdfJoinEntriesSort } from '@comunica/bus-rdf-join-entries-sort';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type {\n IJoinEntryWithMetadata,\n IQueryOperationResultBindings,\n IQuerySourceWrapper,\n MetadataBindings,\n IActionContext,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { UnionIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { Factory } from 'sparqlalgebrajs';\n\nconst AF = new Factory();\n\n/**\n * A comunica Inner Multi Bind Source RDF Join Actor.\n */\nexport class ActorRdfJoinMultiBindSource extends ActorRdfJoin {\n public readonly selectivityModifier: number;\n public readonly blockSize: number;\n public readonly mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n\n public constructor(args: IActorRdfJoinInnerMultiBindSourceArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'bind-source',\n canHandleUndefs: true,\n });\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n // Order the entries so we can pick the first one (usually the one with the lowest cardinality)\n const entriesUnsorted = await ActorRdfJoin.getEntriesWithMetadatas(action.entries);\n const entries = await this.sortJoinEntries(entriesUnsorted, action.context);\n\n this.logDebug(\n action.context,\n 'First entry for Bind Join Source: ',\n () => ({ entry: entries[0].operation, metadata: entries[0].metadata }),\n );\n\n // Close the non-smallest streams\n for (const [ i, element ] of entries.entries()) {\n if (i !== 0) {\n element.output.bindingsStream.close();\n }\n }\n\n // Take the stream with the lowest cardinality\n const smallestStream: IQueryOperationResultBindings = entries[0].output;\n const smallestMetadata = entries[0].metadata;\n const remainingEntries = [ ...entries ];\n remainingEntries.splice(0, 1);\n\n // Get source for remaining entries (guaranteed thanks to prior check in getJoinCoefficients())\n const sourceWrapper: IQuerySourceWrapper = ActorQueryOperation.getOperationSource(remainingEntries[0].operation)!;\n\n // Determine the operation to pass\n const operation = this.createOperationFromEntries(remainingEntries);\n\n // Slice the smallest stream into chunks according to the block size, so we avoid blocking too long.\n const chunkedStreams: AsyncIterator> = new ChunkedIterator(\n smallestStream.bindingsStream,\n this.blockSize,\n { autoStart: false },\n );\n\n // For each chunk, pass the query and the bindings to the source for execution\n const bindingsStream = new UnionIterator(chunkedStreams.map(chunk => sourceWrapper.source.queryBindings(\n operation,\n sourceWrapper.context ? action.context.merge(sourceWrapper.context) : action.context,\n { joinBindings: { bindings: chunk, metadata: smallestMetadata }},\n )));\n\n return {\n result: {\n type: 'bindings',\n bindingsStream,\n metadata: () => this.constructResultMetadata(entries, entries.map(entry => entry.metadata), action.context),\n },\n physicalPlanMetadata: {\n bindIndex: entriesUnsorted.indexOf(entries[0]),\n },\n };\n }\n\n protected async sortJoinEntries(\n entries: IJoinEntryWithMetadata[],\n context: IActionContext,\n ): Promise {\n entries = await ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort, entries, context);\n\n // Prioritize entries with modified operations, so these are not re-executed\n entries = entries.sort((entryLeft, entryRight) => {\n if (entryLeft.operationModified && !entryRight.operationModified) {\n return -1;\n }\n return 0;\n });\n\n return entries;\n }\n\n public async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n // Order the entries so we can pick the first one (usually the one with the lowest cardinality)\n const entries = await this.sortJoinEntries(action.entries\n .map((entry, i) => ({ ...entry, metadata: metadatas[i] })), action.context);\n metadatas = entries.map(entry => entry.metadata);\n\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n\n // Determine first stream and remaining ones\n const remainingEntries = [ ...entries ];\n const remainingRequestInitialTimes = [ ...requestInitialTimes ];\n const remainingRequestItemTimes = [ ...requestItemTimes ];\n remainingEntries.splice(0, 1);\n remainingRequestInitialTimes.splice(0, 1);\n remainingRequestItemTimes.splice(0, 1);\n\n // Reject binding on operations without sources\n const sources = remainingEntries.map(entry => ActorQueryOperation.getOperationSource(entry.operation));\n if (sources.some(source => !source)) {\n throw new Error(`Actor ${this.name} can not bind on remaining operations without source annotation`);\n }\n\n // Reject binding on operations with un-equal sources\n if (sources.some(source => source !== sources[0])) {\n throw new Error(`Actor ${this.name} can not bind on remaining operations with non-equal source annotation`);\n }\n\n // Reject if the source can not handle bindings\n const sourceWrapper: IQuerySourceWrapper = sources[0]!;\n const testingOperation = this.createOperationFromEntries(remainingEntries);\n const selectorShape = await sourceWrapper.source.getSelectorShape(action.context);\n if (!ActorQueryOperation\n .doesShapeAcceptOperation(selectorShape, testingOperation, { joinBindings: true })) {\n throw new Error(`Actor ${this.name} detected a source that can not handle passing down join bindings`);\n }\n\n // Determine selectivities of smallest entry with all other entries\n const selectivities = await Promise.all(remainingEntries\n .map(async entry => (await this.mediatorJoinSelectivity.mediate({\n entries: [ entries[0], entry ],\n context: action.context,\n })).selectivity * this.selectivityModifier));\n\n // Determine coefficients for remaining entries\n const cardinalityRemaining = remainingEntries\n .map((entry, i) => entry.metadata.cardinality.value * selectivities[i])\n .reduce((sum, element) => sum + element, 0);\n\n return {\n iterations: 1,\n persistedItems: metadatas[0].cardinality.value,\n blockingItems: metadatas[0].cardinality.value,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + cardinalityRemaining * requestItemTimes[1],\n };\n }\n\n public createOperationFromEntries(remainingEntries: IJoinEntryWithMetadata[]): Algebra.Operation {\n if (remainingEntries.length === 1) {\n return remainingEntries[0].operation;\n }\n return AF.createJoin(remainingEntries.map(entry => entry.operation), true);\n }\n}\n\nexport interface IActorRdfJoinInnerMultiBindSourceArgs extends IActorRdfJoinArgs {\n /**\n * Multiplier for selectivity values\n * @range {double}\n * @default {0.0001}\n */\n selectivityModifier: number;\n /**\n * The maximum amount of bindings to send to the source per block.\n * @default {16}\n */\n blockSize: number;\n /**\n * The join entries sort mediator\n */\n mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { MediatorQueryOperation } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, materializeOperation } from '@comunica/bus-query-operation';\nimport type {\n IActionRdfJoin,\n IActorRdfJoinOutputInner,\n IActorRdfJoinArgs,\n} from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { MediatorRdfJoinEntriesSort } from '@comunica/bus-rdf-join-entries-sort';\nimport { KeysQueryOperation } from '@comunica/context-entries';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { Bindings, BindingsStream, IQueryOperationResultBindings, MetadataBindings } from '@comunica/types';\nimport { MultiTransformIterator, TransformIterator, UnionIterator } from 'asynciterator';\nimport { Factory, Algebra, Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Multi-way Bind RDF Join Actor.\n */\nexport class ActorRdfJoinMultiBind extends ActorRdfJoin {\n public readonly bindOrder: BindOrder;\n public readonly selectivityModifier: number;\n public readonly mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n public readonly mediatorQueryOperation: MediatorQueryOperation;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public static readonly FACTORY = new Factory();\n\n public constructor(args: IActorRdfJoinMultiBindArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'bind',\n canHandleUndefs: true,\n isLeaf: false,\n });\n }\n\n /**\n * Create a new bindings stream that takes every binding of the base stream\n * and binds it to the remaining patterns, evaluates those patterns, and emits all their bindings.\n *\n * @param bindOrder The order in which elements should be bound.\n * @param baseStream The base stream.\n * @param operations The operations to bind with each binding of the base stream.\n * @param operationBinder A callback to retrieve the bindings stream of bound operations.\n * @param optional If the original bindings should be emitted when the resulting bindings stream is empty.\n * @return {BindingsStream}\n */\n public static createBindStream(\n bindOrder: BindOrder,\n baseStream: BindingsStream,\n operations: Algebra.Operation[],\n operationBinder: (boundOperations: Algebra.Operation[], operationBindings: Bindings)\n => Promise,\n optional: boolean,\n bindingsFactory: BindingsFactory,\n ): BindingsStream {\n // Enable auto-start on sub-bindings during depth-first binding for best performance.\n const autoStartSubBindings = bindOrder === 'depth-first';\n\n // Create bindings function\n const binder = (bindings: Bindings): BindingsStream => {\n // We don't bind the filter because filters are always handled last,\n // and we need to avoid binding filters of sub-queries, which are to be handled first. (see spec test bind10)\n const subOperations = operations\n .map(operation => materializeOperation(operation, bindings, bindingsFactory, { bindFilter: true }));\n const bindingsMerger = (subBindings: Bindings): Bindings | undefined => subBindings.merge(bindings);\n return new TransformIterator(async() => (await operationBinder(subOperations, bindings))\n .transform({ map: bindingsMerger }), { maxBufferSize: 128, autoStart: autoStartSubBindings });\n };\n\n // Create an iterator that binds elements from the base stream in different orders\n switch (bindOrder) {\n case 'depth-first':\n return new MultiTransformIterator(baseStream, { autoStart: false, multiTransform: binder, optional });\n case 'breadth-first':\n return new UnionIterator(baseStream.transform({\n map: binder,\n optional,\n }), { autoStart: false });\n default:\n // eslint-disable-next-line ts/restrict-template-expressions\n throw new Error(`Received request for unknown bind order: ${bindOrder}`);\n }\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, action.context);\n\n // Order the entries so we can pick the first one (usually the one with the lowest cardinality)\n const entriesUnsorted = await ActorRdfJoin.getEntriesWithMetadatas(action.entries);\n const entries = await ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort, entriesUnsorted, action.context);\n\n this.logDebug(\n action.context,\n 'First entry for Bind Join: ',\n () => ({ entry: entries[0].operation, metadata: entries[0].metadata }),\n );\n\n // Close the non-smallest streams\n for (const [ i, element ] of entries.entries()) {\n if (i !== 0) {\n element.output.bindingsStream.close();\n }\n }\n\n // Take the stream with the lowest cardinality\n const smallestStream: IQueryOperationResultBindings = entries[0].output;\n const remainingEntries = [ ...entries ];\n remainingEntries.splice(0, 1);\n\n // Bind the remaining patterns for each binding in the stream\n const subContext = action.context\n .set(KeysQueryOperation.joinLeftMetadata, entries[0].metadata)\n .set(KeysQueryOperation.joinRightMetadatas, remainingEntries.map(entry => entry.metadata));\n const bindingsStream: BindingsStream = ActorRdfJoinMultiBind.createBindStream(\n this.bindOrder,\n smallestStream.bindingsStream,\n remainingEntries.map(entry => entry.operation),\n async(operations: Algebra.Operation[], operationBindings: Bindings) => {\n // Send the materialized patterns to the mediator for recursive join evaluation.\n const operation = operations.length === 1 ?\n operations[0] :\n ActorRdfJoinMultiBind.FACTORY.createJoin(operations);\n const output = ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate(\n { operation, context: subContext?.set(KeysQueryOperation.joinBindings, operationBindings) },\n ));\n return output.bindingsStream;\n },\n false,\n bindingsFactory,\n );\n\n return {\n result: {\n type: 'bindings',\n bindingsStream,\n metadata: () => this.constructResultMetadata(entries, entries.map(entry => entry.metadata), action.context),\n },\n physicalPlanMetadata: {\n bindIndex: entriesUnsorted.indexOf(entries[0]),\n bindOperation: entries[0].operation,\n bindOperationCardinality: entries[0].metadata.cardinality,\n bindOrder: this.bindOrder,\n },\n };\n }\n\n public canBindWithOperation(operation: Algebra.Operation): boolean {\n let valid = true;\n Util.recurseOperation(operation, {\n [Algebra.types.EXTEND](): boolean {\n valid = false;\n return false;\n },\n [Algebra.types.GROUP](): boolean {\n valid = false;\n return false;\n },\n // [Algebr\n });\n\n return valid;\n }\n\n public async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n // Order the entries so we can pick the first one (usually the one with the lowest cardinality)\n const entries = await ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort, action.entries\n .map((entry, i) => ({ ...entry, metadata: metadatas[i] })), action.context);\n metadatas = entries.map(entry => entry.metadata);\n\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n\n // Determine first stream and remaining ones\n const remainingEntries = [ ...entries ];\n const remainingRequestInitialTimes = [ ...requestInitialTimes ];\n const remainingRequestItemTimes = [ ...requestItemTimes ];\n remainingEntries.splice(0, 1);\n remainingRequestInitialTimes.splice(0, 1);\n remainingRequestItemTimes.splice(0, 1);\n\n // Reject binding on some operation types\n if (remainingEntries\n .some(entry => !this.canBindWithOperation(entry.operation))) {\n throw new Error(`Actor ${this.name} can not bind on Extend and Group operations`);\n }\n\n // Reject binding on modified operations, since using the output directly would be significantly more efficient.\n if (remainingEntries.some(entry => entry.operationModified)) {\n throw new Error(`Actor ${this.name} can not be used over remaining entries with modified operations`);\n }\n\n // Determine selectivities of smallest entry with all other entries\n const selectivities = await Promise.all(remainingEntries\n .map(async entry => (await this.mediatorJoinSelectivity.mediate({\n entries: [ entries[0], entry ],\n context: action.context,\n })).selectivity * this.selectivityModifier));\n\n // Determine coefficients for remaining entries\n const cardinalityRemaining = remainingEntries\n .map((entry, i) => entry.metadata.cardinality.value * selectivities[i])\n .reduce((sum, element) => sum + element, 0);\n const receiveInitialCostRemaining = remainingRequestInitialTimes\n .reduce((sum, element) => sum + element, 0);\n const receiveItemCostRemaining = remainingRequestItemTimes\n .reduce((sum, element) => sum + element, 0);\n\n return {\n iterations: metadatas[0].cardinality.value * cardinalityRemaining,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: requestInitialTimes[0] +\n metadatas[0].cardinality.value * (\n requestItemTimes[0] +\n receiveInitialCostRemaining +\n cardinalityRemaining * receiveItemCostRemaining\n ),\n };\n }\n}\n\nexport interface IActorRdfJoinMultiBindArgs extends IActorRdfJoinArgs {\n /**\n * The order in which elements should be bound\n * @default {depth-first}\n */\n bindOrder: BindOrder;\n /**\n * Multiplier for selectivity values\n * @range {double}\n * @default {0.0001}\n */\n selectivityModifier: number;\n /**\n * The join entries sort mediator\n */\n mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n /**\n * The query operation mediator\n */\n mediatorQueryOperation: MediatorQueryOperation;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n\nexport type BindOrder = 'depth-first' | 'breadth-first';\n","import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type { MetadataBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { ArrayIterator } from 'asynciterator';\n\n/**\n * A comunica Multi Empty RDF Join Actor.\n */\nexport class ActorRdfJoinMultiEmpty extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'multi-empty',\n canHandleUndefs: true,\n });\n }\n\n public override async test(action: IActionRdfJoin): Promise {\n if ((await ActorRdfJoin.getMetadatas(action.entries))\n .every(metadata => ActorRdfJoin.getCardinality(metadata).value > 0)) {\n throw new Error(`Actor ${this.name} can only join entries where at least one is empty`);\n }\n return super.test(action);\n }\n\n protected override async getOutput(action: IActionRdfJoin): Promise {\n // Close all entries\n for (const entry of action.entries) {\n entry.output.bindingsStream.close();\n }\n\n return {\n result: {\n bindingsStream: new ArrayIterator([], { autoStart: false }),\n metadata: async() => ({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 0 },\n canContainUndefs: false,\n variables: ActorRdfJoin.joinVariables(await ActorRdfJoin.getMetadatas(action.entries)),\n }),\n type: 'bindings',\n },\n };\n }\n\n protected async getJoinCoefficients(\n _action: IActionRdfJoin,\n _metadatas: MetadataBindings[],\n ): Promise {\n return {\n iterations: 0,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: 0,\n };\n }\n}\n","import { bindingsToString } from '@comunica/bindings-factory';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type {\n IActionRdfJoin,\n IActorRdfJoinArgs,\n MediatorRdfJoin,\n IActorRdfJoinOutputInner,\n} from '@comunica/bus-rdf-join';\nimport { ChunkedIterator, ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { MediatorRdfJoinEntriesSort } from '@comunica/bus-rdf-join-entries-sort';\nimport { KeysRdfJoin } from '@comunica/context-entries';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type {\n BindingsStream,\n IActionContext,\n IJoinEntry,\n IJoinEntryWithMetadata,\n IQuerySourceWrapper,\n MetadataBindings,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { UnionIterator } from 'asynciterator';\nimport { Factory } from 'sparqlalgebrajs';\n\n/**\n * A comunica Inner Multi Smallest Filter Bindings RDF Join Actor.\n */\nexport class ActorRdfJoinMultiSmallestFilterBindings extends ActorRdfJoin {\n public readonly selectivityModifier: number;\n public readonly blockSize: number;\n public readonly mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n public readonly mediatorJoin: MediatorRdfJoin;\n\n public static readonly FACTORY = new Factory();\n public constructor(args: IActorRdfJoinMultiSmallestFilterBindingsArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'multi-smallest-filter-bindings',\n limitEntries: 2,\n limitEntriesMin: true,\n isLeaf: false,\n });\n }\n\n /**\n * Order the given join entries using the join-entries-sort bus.\n * @param {IJoinEntryWithMetadata[]} entries An array of join entries.\n * @param context The action context.\n * @return {IJoinEntryWithMetadata[]} The sorted join entries.\n */\n public async sortJoinEntries(\n entries: IJoinEntryWithMetadata[],\n context: IActionContext,\n ): Promise<{ first: IJoinEntryWithMetadata; second: IJoinEntryWithMetadata; remaining: IJoinEntryWithMetadata[] }> {\n let { entries: entriesSorted } = await this.mediatorJoinEntriesSort.mediate({ entries, context });\n\n // Prioritize entries with modified operations, so these are not re-executed\n entriesSorted = entriesSorted.sort((entryLeft, entryRight) => {\n if (entryLeft.operationModified && !entryRight.operationModified) {\n return -1;\n }\n return 0;\n });\n\n const first = entriesSorted.splice(0, 1)[0];\n\n // Let second entry first be prioritized for sharing as many variables with first as possible,\n // then having the fewest variables,\n // and then having the lowest cardinality.\n let second: IJoinEntryWithMetadata | undefined;\n let secondIndex = -1;\n let secondSharedVariables = 0;\n for (const [ i, entry ] of entriesSorted.entries()) {\n const sharedVariables = first.metadata.variables\n .filter(variableFirst => entry.metadata.variables\n .some(variableSecond => variableFirst.equals(variableSecond))).length;\n if (!second || (sharedVariables > secondSharedVariables ||\n (sharedVariables === secondSharedVariables &&\n (entry.metadata.variables.length < second.metadata.variables.length ||\n (entry.metadata.variables.length === second.metadata.variables.length &&\n entry.metadata.cardinality.value < second.metadata.cardinality.value))))) {\n second = entry;\n secondIndex = i;\n secondSharedVariables = sharedVariables;\n }\n }\n\n if (secondSharedVariables === 0) {\n throw new Error(`Actor ${this.name} can only join with common variables`);\n }\n\n const remaining = entriesSorted;\n remaining.splice(secondIndex, 1);\n return { first, second: second!, remaining };\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n // Determine the two smallest streams by sorting (e.g. via cardinality)\n const entriesUnsorted = await ActorRdfJoin.getEntriesWithMetadatas([ ...action.entries ]);\n const { first, second: secondIn, remaining: remainingIn } = await this.sortJoinEntries(\n entriesUnsorted,\n action.context,\n );\n\n // Clone first stream, because we will use it twice\n const smallestStream1 = first.output.bindingsStream;\n first.output.bindingsStream = smallestStream1.clone();\n\n // Project the first stream on common variables, and filter out duplicates\n // The common variables array is guaranteed to be non-empty, due to the way the test of this actor is implemented.\n const commonVariables = first.metadata.variables\n .filter(variableFirst => secondIn.metadata.variables\n .some(variableSecond => variableFirst.equals(variableSecond)));\n const hashes: Record = {};\n const smallestStream1Projected: BindingsStream = smallestStream1.clone()\n .map(binding => binding.filter((value, key) =>\n commonVariables.some(commonVariable => commonVariable.equals(key))))\n .filter((binding) => {\n const hash: string = bindingsToString(binding);\n return !(hash in hashes) && (hashes[hash] = true);\n });\n\n // Slice the first stream into chunks according to the block size, so we avoid blocking too long.\n const chunkedStreams: AsyncIterator> = new ChunkedIterator(\n smallestStream1Projected,\n this.blockSize,\n { autoStart: false },\n );\n\n // Push down bindings of first stream when querying for second stream\n const sourceWrapper: IQuerySourceWrapper = ActorQueryOperation.getOperationSource(secondIn.operation)!;\n const secondStream = new UnionIterator(chunkedStreams.map(chunk => sourceWrapper.source.queryBindings(\n secondIn.operation,\n sourceWrapper.context ? action.context.merge(sourceWrapper.context) : action.context,\n { filterBindings: { bindings: chunk, metadata: first.metadata }},\n )));\n const second: IJoinEntry = {\n output: {\n type: 'bindings',\n bindingsStream: secondStream,\n metadata: secondIn.output.metadata,\n },\n operation: secondIn.operation,\n operationModified: true,\n };\n\n // Destroy the unused original second stream\n secondIn.output.bindingsStream.destroy();\n\n // Join the two selected streams\n const joinedEntry: IJoinEntry = {\n output: ActorQueryOperation.getSafeBindings(await this.mediatorJoin\n .mediate({\n type: action.type,\n entries: [ first, second ],\n context: action.context.set(KeysRdfJoin.lastPhysicalJoin, this.physicalName),\n })),\n operation: ActorRdfJoinMultiSmallestFilterBindings.FACTORY\n .createJoin([ first.operation, second.operation ], false),\n operationModified: true,\n };\n\n // And then join the result with the remaining streams\n const remaining: IJoinEntry[] = remainingIn;\n remaining.unshift(joinedEntry);\n\n return {\n result: await this.mediatorJoin.mediate({\n type: action.type,\n entries: remaining,\n context: action.context,\n }),\n physicalPlanMetadata: {\n firstIndex: entriesUnsorted.indexOf(first),\n secondIndex: entriesUnsorted.indexOf(secondIn),\n },\n };\n }\n\n public async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n // Avoid infinite recursion\n if (action.context.get(KeysRdfJoin.lastPhysicalJoin) === this.physicalName) {\n throw new Error(`Actor ${this.name} can not be called recursively`);\n }\n\n metadatas = [ ...metadatas ];\n // Determine the two smallest streams by sorting (e.g. via cardinality)\n const { first, second, remaining } = await this.sortJoinEntries(action.entries\n .map((entry, i) => ({ ...entry, metadata: metadatas[i] })), action.context);\n\n // Only pass if the second entry accepts filterBindings\n const sourceWrapper: IQuerySourceWrapper | undefined = ActorQueryOperation.getOperationSource(second.operation);\n if (!sourceWrapper) {\n throw new Error(`Actor ${this.name} can only process if entries[1] has a source`);\n }\n const testingOperation = second.operation;\n const selectorShape = await sourceWrapper.source.getSelectorShape(action.context);\n if (!ActorQueryOperation\n .doesShapeAcceptOperation(selectorShape, testingOperation, { filterBindings: true })) {\n throw new Error(`Actor ${this.name} can only process if entries[1] accept filterBindings`);\n }\n\n // Determine cost coefficients\n metadatas = [ first.metadata, second.metadata, ...remaining.map(remain => remain.metadata) ];\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n const { selectivity } = await this.mediatorJoinSelectivity.mediate({\n entries: [ first, second ],\n context: action.context,\n });\n const cardinalityRemaining = remaining\n .reduce((mul, remain) => mul * remain.metadata.cardinality.value * this.selectivityModifier, 1);\n\n return {\n iterations: selectivity * this.selectivityModifier *\n second.metadata.cardinality.value * cardinalityRemaining,\n persistedItems: first.metadata.cardinality.value,\n blockingItems: first.metadata.cardinality.value,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + cardinalityRemaining * requestItemTimes[1],\n };\n }\n}\n\nexport interface IActorRdfJoinMultiSmallestFilterBindingsArgs extends IActorRdfJoinArgs {\n /**\n * Multiplier for selectivity values\n * @range {double}\n * @default {0.0001}\n */\n selectivityModifier: number;\n /**\n * The maximum amount of bindings to send to the source per block.\n * @default {64}\n */\n blockSize: number;\n /**\n * The join entries sort mediator\n */\n mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n /**\n * A mediator for joining Bindings streams\n */\n mediatorJoin: MediatorRdfJoin;\n}\n","import {\n ActorQueryOperation,\n} from '@comunica/bus-query-operation';\nimport type {\n IActionRdfJoin,\n IActorRdfJoinOutputInner,\n IActorRdfJoinArgs,\n MediatorRdfJoin,\n} from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { MediatorRdfJoinEntriesSort } from '@comunica/bus-rdf-join-entries-sort';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { MetadataBindings, IJoinEntry, IActionContext, IJoinEntryWithMetadata } from '@comunica/types';\nimport { Factory } from 'sparqlalgebrajs';\n\n/**\n * A Multi Smallest RDF Join Actor.\n * It accepts 3 or more streams, joins the smallest two, and joins the result with the remaining streams.\n */\nexport class ActorRdfJoinMultiSmallest extends ActorRdfJoin {\n public readonly mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n public readonly mediatorJoin: MediatorRdfJoin;\n\n public static readonly FACTORY = new Factory();\n\n public constructor(args: IActorRdfJoinMultiSmallestArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'multi-smallest',\n limitEntries: 3,\n limitEntriesMin: true,\n canHandleUndefs: true,\n isLeaf: false,\n });\n }\n\n /**\n * Order the given join entries using the join-entries-sort bus.\n * @param {IJoinEntryWithMetadata[]} entries An array of join entries.\n * @param context The action context.\n * @return {IJoinEntryWithMetadata[]} The sorted join entries.\n */\n public async sortJoinEntries(\n entries: IJoinEntryWithMetadata[],\n context: IActionContext,\n ): Promise {\n return (await this.mediatorJoinEntriesSort.mediate({ entries, context })).entries;\n }\n\n protected async getOutput(action: IActionRdfJoin): Promise {\n // Determine the two smallest streams by sorting (e.g. via cardinality)\n const entries: IJoinEntry[] = await this.sortJoinEntries(\n await ActorRdfJoin.getEntriesWithMetadatas([ ...action.entries ]),\n action.context,\n );\n const smallestEntry1 = entries[0];\n const smallestEntry2 = entries[1];\n entries.splice(0, 2);\n\n // Join the two selected streams, and then join the result with the remaining streams\n const firstEntry: IJoinEntry = {\n output: ActorQueryOperation.getSafeBindings(await this.mediatorJoin\n .mediate({ type: action.type, entries: [ smallestEntry1, smallestEntry2 ], context: action.context })),\n operation: ActorRdfJoinMultiSmallest.FACTORY\n .createJoin([ smallestEntry1.operation, smallestEntry2.operation ], false),\n };\n entries.push(firstEntry);\n return {\n result: await this.mediatorJoin.mediate({\n type: action.type,\n entries,\n context: action.context,\n }),\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n metadatas = [ ...metadatas ];\n // Determine the two smallest streams by sorting (e.g. via cardinality)\n const entriesWithMetadata = await this.sortJoinEntries(action.entries\n .map((entry, i) => ({ ...entry, metadata: metadatas[i] })), action.context);\n metadatas = entriesWithMetadata.map(entry => entry.metadata);\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n\n return {\n iterations: metadatas[0].cardinality.value * metadatas[1].cardinality.value *\n metadatas.slice(2).reduce((acc, metadata) => acc * metadata.cardinality.value, 1),\n persistedItems: 0,\n blockingItems: 0,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1] +\n metadatas.slice(2).reduce((sum, metadata, i) => sum + requestInitialTimes.slice(2)[i] +\n metadata.cardinality.value * requestItemTimes.slice(2)[i], 0),\n };\n }\n}\n\nexport interface IActorRdfJoinMultiSmallestArgs extends IActorRdfJoinArgs {\n /**\n * The join entries sort mediator\n */\n mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n /**\n * A mediator for joining Bindings streams\n */\n mediatorJoin: MediatorRdfJoin;\n}\n","import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { Bindings, MetadataBindings } from '@comunica/types';\nimport { NestedLoopJoin } from 'asyncjoin';\n\n/**\n * A comunica NestedLoop RDF Join Actor.\n */\nexport class ActorRdfJoinNestedLoop extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'nested-loop',\n limitEntries: 2,\n canHandleUndefs: true,\n });\n }\n\n protected async getOutput(action: IActionRdfJoin): Promise {\n const join = new NestedLoopJoin(\n action.entries[0].output.bindingsStream,\n action.entries[1].output.bindingsStream,\n ActorRdfJoin.joinBindings,\n { autoStart: false },\n );\n return {\n result: {\n type: 'bindings',\n bindingsStream: join,\n metadata: async() => await this.constructResultMetadata(\n action.entries,\n await ActorRdfJoin.getMetadatas(action.entries),\n action.context,\n ),\n },\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n return {\n iterations: metadatas[0].cardinality.value * metadatas[1].cardinality.value,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1],\n };\n }\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type * as RDF from '@rdfjs/types';\nimport { ArrayIterator } from 'asynciterator';\n\n/**\n * A comunica None RDF Join Actor.\n */\nexport class ActorRdfJoinNone extends ActorRdfJoin {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorRdfJoinNoneArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'none',\n limitEntries: 0,\n });\n }\n\n public override async test(action: IActionRdfJoin): Promise {\n // Allow joining of one or zero streams\n if (action.entries.length > 0) {\n throw new Error(`Actor ${this.name} can only join zero entries`);\n }\n return await this.getJoinCoefficients();\n }\n\n protected async getOutput(action: IActionRdfJoin): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, action.context);\n return {\n result: {\n bindingsStream: new ArrayIterator([ bindingsFactory.bindings() ], { autoStart: false }),\n metadata: () => Promise.resolve({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 1 },\n canContainUndefs: false,\n variables: [],\n }),\n type: 'bindings',\n },\n };\n }\n\n protected async getJoinCoefficients(): Promise {\n return {\n iterations: 0,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: 0,\n };\n }\n}\n\nexport interface IActorRdfJoinNoneArgs extends IActorRdfJoinArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\n\n/**\n * A comunica Single RDF Join Actor.\n */\nexport class ActorRdfJoinSingle extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'single',\n limitEntries: 1,\n });\n this.includeInLogs = false;\n }\n\n public override async test(action: IActionRdfJoin): Promise {\n // Allow joining of one or zero streams\n if (action.entries.length !== 1) {\n throw new Error(`Actor ${this.name} can only join a single entry`);\n }\n return await this.getJoinCoefficients();\n }\n\n protected async getOutput(action: IActionRdfJoin): Promise {\n return {\n result: action.entries[0].output,\n };\n }\n\n protected async getJoinCoefficients(): Promise {\n return {\n iterations: 0,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: 0,\n };\n }\n}\n","import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { Bindings, MetadataBindings } from '@comunica/types';\nimport { SymmetricHashJoin } from 'asyncjoin';\n\n/**\n * A comunica Hash RDF Join Actor.\n */\nexport class ActorRdfJoinSymmetricHash extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinSymmetricHashArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'symmetric-hash',\n limitEntries: 2,\n });\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n const metadatas = await ActorRdfJoin.getMetadatas(action.entries);\n const variables = ActorRdfJoin.overlappingVariables(metadatas);\n const join = new SymmetricHashJoin(\n action.entries[0].output.bindingsStream,\n action.entries[1].output.bindingsStream,\n entry => ActorRdfJoinSymmetricHash.hash(entry, variables),\n ActorRdfJoin.joinBindings,\n );\n return {\n result: {\n type: 'bindings',\n bindingsStream: join,\n metadata: async() => await this.constructResultMetadata(action.entries, metadatas, action.context),\n },\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n return {\n iterations: metadatas[0].cardinality.value + metadatas[1].cardinality.value,\n persistedItems: metadatas[0].cardinality.value + metadatas[1].cardinality.value,\n blockingItems: 0,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1],\n };\n }\n}\n\nexport interface IActorRdfJoinSymmetricHashArgs extends IActorRdfJoinArgs {\n}\n","import { ClosableTransformIterator } from '@comunica/bus-query-operation';\nimport type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport {\n ActorRdfJoin,\n} from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { MetadataBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { BindingsIndex } from './BindingsIndex';\n\n/**\n * A comunica Minus Hash RDF Join Actor.\n */\nexport class ActorRdfJoinMinusHashUndef extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'minus',\n physicalName: 'hash-undef',\n limitEntries: 2,\n canHandleUndefs: true,\n });\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n const buffer = action.entries[1].output;\n const output = action.entries[0].output;\n\n const metadatas = await ActorRdfJoin.getMetadatas(action.entries);\n const commonVariables: RDF.Variable[] = ActorRdfJoin.overlappingVariables(metadatas);\n if (commonVariables.length > 0) {\n /**\n * To assure we've filtered all B (`buffer`) values from A (`output`) we wait until we've fetched all values of B.\n * Then we save these triples in `index` and use it to filter our A-stream.\n */\n const index: BindingsIndex = new BindingsIndex(commonVariables);\n const bindingsStream = new ClosableTransformIterator(async() => {\n await new Promise((resolve) => {\n buffer.bindingsStream.on('data', data => index.add(data));\n buffer.bindingsStream.on('end', resolve);\n buffer.bindingsStream.on('error', (error) => {\n bindingsStream.emit('error', error);\n });\n });\n return output.bindingsStream.filter(data => !index.contains(data));\n }, {\n autoStart: false,\n onClose() {\n buffer.bindingsStream.destroy();\n output.bindingsStream.destroy();\n },\n });\n return {\n result: {\n type: 'bindings',\n bindingsStream,\n async metadata() {\n const bufferMetadata = await output.metadata();\n const outputMetadata = await output.metadata();\n return {\n ...outputMetadata,\n canContainUndefs: bufferMetadata.canContainUndefs || outputMetadata.canContainUndefs,\n };\n },\n },\n };\n }\n // Destroy the buffer stream since it is not needed when\n // there are no common variables.\n buffer.bindingsStream.destroy();\n return {\n result: output,\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n return {\n // Slightly increase iteration cost, as operations in our BindingsIndex do not happen in constant time\n // This enables the mediator to favor other minus actors,\n // while this one will only be selected when streams contain undefs.\n iterations: (metadatas[0].cardinality.value + metadatas[1].cardinality.value) * 1.01,\n persistedItems: metadatas[0].cardinality.value,\n blockingItems: metadatas[0].cardinality.value,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1],\n };\n }\n}\n","import type { Bindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { termToString } from 'rdf-string';\n\n/**\n * A simple efficient tree-based index for maintaining bindings,\n * and checking whether or not a bindings is contained in this index.\n *\n * This will consider bindings with a variable term or a missing term\n * as a 'match-all' with other terms.\n */\nexport class BindingsIndex {\n private readonly keys: RDF.Variable[];\n private readonly data: IDataIndex = {};\n\n public constructor(keys: RDF.Variable[]) {\n this.keys = keys;\n }\n\n protected static hashTerm(term: RDF.Term | undefined): string {\n return term && term.termType !== 'Variable' ? termToString(term) : '';\n }\n\n /**\n * Add the given bindings to the index.\n * @param {Bindings} bindings A bindings.\n */\n public add(bindings: Bindings): void {\n if (this.isBindingsValid(bindings)) {\n let dataIt = this.data;\n for (const key of this.keys) {\n const dataKey = BindingsIndex.hashTerm(bindings.get(key));\n let subDataIt = dataIt[dataKey];\n if (!subDataIt) {\n subDataIt = dataIt[dataKey] = {};\n }\n dataIt = subDataIt;\n }\n }\n }\n\n /**\n * Check if the given bindings is contained in this index.\n * @param {Bindings} bindings A bindings.\n * @return {boolean} If it exists in the index.\n */\n public contains(bindings: Bindings): boolean {\n // Always return false if the bindings contain none of the expected keys\n if (!this.isBindingsValid(bindings)) {\n return false;\n }\n\n return this.containsRecursive(bindings, this.keys, [ this.data ]);\n }\n\n protected isBindingsValid(bindings: Bindings): boolean {\n let validKeys = false;\n for (const key of this.keys) {\n if (bindings.get(key)) {\n validKeys = true;\n break;\n }\n }\n return validKeys;\n }\n\n protected containsRecursive(bindings: Bindings, keys: RDF.Variable[], dataIndexes: IDataIndex[]): boolean {\n if (keys.length === 0) {\n return true;\n }\n\n let key: RDF.Variable;\n // eslint-disable-next-line prefer-const\n [ key, ...keys ] = keys;\n for (const data of dataIndexes) {\n // If the index contained a variable, all terms will match.\n const dataKey = BindingsIndex.hashTerm(bindings.get(key));\n if (dataKey) {\n // Check the entry for the term, and the variable term.\n const subDatas = [ data[dataKey], data[''] ].filter(Boolean);\n if (subDatas.length === 0) {\n continue;\n }\n if (this.containsRecursive(bindings, keys, subDatas)) {\n return true;\n }\n } else {\n // Iterate over all entries\n let subDatas = Object.keys(data).map(subKey => data[subKey]);\n if (subDatas.length === 0) {\n subDatas = [{}];\n }\n if (this.containsRecursive(bindings, keys, subDatas)) {\n return true;\n }\n }\n }\n return false;\n }\n}\n\nexport interface IDataIndex {\n [key: string]: IDataIndex;\n}\n","import { ClosableTransformIterator } from '@comunica/bus-query-operation';\nimport type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport {\n ActorRdfJoin,\n} from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { MetadataBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\n\n/**\n * A comunica Minus Hash RDF Join Actor.\n */\nexport class ActorRdfJoinMinusHash extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'minus',\n physicalName: 'hash',\n limitEntries: 2,\n });\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n const buffer = action.entries[1].output;\n const output = action.entries[0].output;\n\n const metadatas = await ActorRdfJoin.getMetadatas(action.entries);\n const commonVariables: RDF.Variable[] = ActorRdfJoin.overlappingVariables(metadatas);\n if (commonVariables.length > 0) {\n /**\n * To assure we've filtered all B (`buffer`) values from A (`output`) we wait until we've fetched all values of B.\n * Then we save these triples in `index` and use it to filter our A-stream.\n */\n const index: Record = {};\n const bindingsStream = new ClosableTransformIterator(async() => {\n await new Promise((resolve) => {\n buffer.bindingsStream.on('data', (data) => {\n index[ActorRdfJoin.hashNonClashing(data, commonVariables)] = true;\n });\n buffer.bindingsStream.on('end', resolve);\n buffer.bindingsStream.on('error', (error) => {\n bindingsStream.emit('error', error);\n });\n });\n return output.bindingsStream.filter(data => !index[ActorRdfJoin.hashNonClashing(data, commonVariables)]);\n }, {\n autoStart: false,\n onClose() {\n buffer.bindingsStream.destroy();\n output.bindingsStream.destroy();\n },\n });\n return {\n result: {\n type: 'bindings',\n bindingsStream,\n metadata: output.metadata,\n },\n };\n }\n // Destroy the buffer stream since it is not needed when\n // there are no common variables.\n buffer.bindingsStream.destroy();\n return {\n result: output,\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n return {\n iterations: metadatas[0].cardinality.value + metadatas[1].cardinality.value,\n persistedItems: metadatas[0].cardinality.value,\n blockingItems: metadatas[0].cardinality.value,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1],\n };\n }\n}\n","import type { BindOrder } from '@comunica/actor-rdf-join-inner-multi-bind';\nimport { ActorRdfJoinMultiBind } from '@comunica/actor-rdf-join-inner-multi-bind';\nimport { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { MediatorQueryOperation } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport { KeysQueryOperation } from '@comunica/context-entries';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { Bindings, BindingsStream, MetadataBindings } from '@comunica/types';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Optional Bind RDF Join Actor.\n */\nexport class ActorRdfJoinOptionalBind extends ActorRdfJoin {\n public readonly bindOrder: BindOrder;\n public readonly selectivityModifier: number;\n public readonly mediatorQueryOperation: MediatorQueryOperation;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorRdfJoinOptionalBindArgs) {\n super(args, {\n logicalType: 'optional',\n physicalName: 'bind',\n limitEntries: 2,\n canHandleUndefs: true,\n isLeaf: false,\n });\n }\n\n protected async getOutput(action: IActionRdfJoin): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, action.context);\n // Close the right stream, since we don't need that one\n action.entries[1].output.bindingsStream.close();\n\n // Bind the right pattern for each binding in the stream\n const subContext = action.context\n .set(KeysQueryOperation.joinLeftMetadata, await action.entries[0].output.metadata())\n .set(KeysQueryOperation.joinRightMetadatas, [ await action.entries[1].output.metadata() ]);\n const bindingsStream: BindingsStream = ActorRdfJoinMultiBind.createBindStream(\n this.bindOrder,\n action.entries[0].output.bindingsStream,\n [ action.entries[1].operation ],\n async(operations: Algebra.Operation[], operationBindings: Bindings) => {\n // Send the materialized patterns to the mediator for recursive join evaluation.\n // Length of operations will always be 1\n const operation = operations[0];\n const output = ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate(\n { operation, context: subContext?.set(KeysQueryOperation.joinBindings, operationBindings) },\n ));\n return output.bindingsStream;\n },\n true,\n bindingsFactory,\n );\n\n return {\n result: {\n type: 'bindings',\n bindingsStream,\n metadata: async() => await this.constructResultMetadata(\n action.entries,\n await ActorRdfJoin.getMetadatas(action.entries),\n action.context,\n { canContainUndefs: true },\n ),\n },\n };\n }\n\n public async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n // This actor only works well with common variables\n if (ActorRdfJoin.overlappingVariables(metadatas).length === 0) {\n throw new Error(`Actor ${this.name} only join entries with at least one common variable`);\n }\n\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n\n // Reject binding on some operation types\n if (action.entries[1].operation.type === Algebra.types.EXTEND ||\n action.entries[1].operation.type === Algebra.types.GROUP) {\n throw new Error(`Actor ${this.name} can not bind on Extend and Group operations`);\n }\n\n // Determine selectivity of join\n const selectivity = (await this.mediatorJoinSelectivity.mediate({\n entries: action.entries,\n context: action.context,\n })).selectivity * this.selectivityModifier;\n\n return {\n iterations: metadatas[0].cardinality.value * metadatas[1].cardinality.value * selectivity,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: requestInitialTimes[0] +\n metadatas[0].cardinality.value * (\n requestItemTimes[0] +\n requestInitialTimes[1] +\n selectivity * metadatas[1].cardinality.value * requestItemTimes[1]\n ),\n };\n }\n}\n\nexport interface IActorRdfJoinOptionalBindArgs extends IActorRdfJoinArgs {\n /**\n * The order in which elements should be bound\n * @default {depth-first}\n */\n bindOrder: BindOrder;\n /**\n * Multiplier for selectivity values\n * @range {double}\n * @default {0.000001}\n */\n selectivityModifier: number;\n /**\n * The query operation mediator\n */\n mediatorQueryOperation: MediatorQueryOperation;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n}\n","import { ClosableTransformIterator } from '@comunica/bus-query-operation';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type {\n IActionRdfJoin,\n IActorRdfJoinArgs,\n IActorRdfJoinOutputInner,\n} from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { BindingsStream, MetadataBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { UnionIterator, ArrayIterator, MultiTransformIterator, BufferedIterator } from 'asynciterator';\nimport { termToString } from 'rdf-string';\nimport { BindingsIndexDef } from './BindingsIndexDef';\nimport { BindingsIndexUndef } from './BindingsIndexUndef';\nimport type { IBindingsIndex } from './IBindingsIndex';\n\n/**\n * A comunica Optional Hash RDF Join Actor.\n */\nexport class ActorRdfJoinOptionalHash extends ActorRdfJoin {\n private readonly blocking: boolean;\n\n public constructor(args: IActorRdfJoinOptionalHashArgs) {\n super(args, {\n logicalType: 'optional',\n physicalName: `hash-${args.canHandleUndefs ? 'undef' : 'def'}-${args.blocking ? 'blocking' : 'nonblocking'}`,\n limitEntries: 2,\n canHandleUndefs: args.canHandleUndefs,\n });\n }\n\n public static constructIndex(undef: boolean, commonVariables: RDF.Variable[]): IBindingsIndex {\n return undef ?\n new BindingsIndexUndef(\n commonVariables,\n (term: RDF.Term | undefined) => term && term.termType !== 'Variable' ? termToString(term) : '',\n ) :\n new BindingsIndexDef(commonVariables, ActorRdfJoin.hashNonClashing);\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n const buffer = action.entries[1].output;\n const output = action.entries[0].output;\n\n const metadatas = await ActorRdfJoin.getMetadatas(action.entries);\n const commonVariables: RDF.Variable[] = ActorRdfJoin.overlappingVariables(metadatas);\n\n let bindingsStream: BindingsStream;\n if (this.blocking) {\n // -- Blocking optional ---\n\n bindingsStream = new ClosableTransformIterator(async() => {\n // We index all bindings from the right-hand OPTIONAL iterator first in a blocking manner.\n const index: IBindingsIndex = ActorRdfJoinOptionalHash\n .constructIndex(this.canHandleUndefs, commonVariables);\n await new Promise((resolve) => {\n buffer.bindingsStream.on('data', (bindings) => {\n const iterator = index.getFirst(bindings) ?? index.put(bindings, []);\n iterator.push(bindings);\n });\n buffer.bindingsStream.on('end', resolve);\n buffer.bindingsStream.on('error', (error) => {\n bindingsStream.emit('error', error);\n });\n });\n\n // Start our left-hand iterator and try to join with the index\n return new MultiTransformIterator(\n output.bindingsStream,\n {\n multiTransform: (bindings: RDF.Bindings): AsyncIterator => new ArrayIterator(\n (index.get(bindings).flat())\n .map(indexBindings => ActorRdfJoin.joinBindings(bindings, indexBindings))\n .filter(b => b !== null),\n { autoStart: false },\n ),\n optional: true,\n autoStart: false,\n },\n );\n }, {\n autoStart: false,\n onClose() {\n buffer.bindingsStream.destroy();\n output.bindingsStream.destroy();\n },\n });\n } else {\n // -- Non-blocking optional ---\n // This can be slightly slower than the blocking one above, due to the streaming overhead.\n\n bindingsStream = new ClosableTransformIterator(async() => {\n // We index all bindings from the right-hand OPTIONAL iterator.\n // They are indexed with iterator values, so our main stream can already get started.\n const index: IBindingsIndex> = ActorRdfJoinOptionalHash\n .constructIndex(this.canHandleUndefs, commonVariables);\n let indexActive = true;\n buffer.bindingsStream.on('data', (bindings) => {\n const iterator = index.getFirst(bindings) ??\n index.put(bindings, new BufferedIterator({ autoStart: false }));\n ( iterator)._push(bindings);\n });\n buffer.bindingsStream.on('end', () => {\n for (const iterator of index.values()) {\n iterator.close();\n }\n indexActive = false;\n });\n buffer.bindingsStream.on('error', (error) => {\n bindingsStream.emit('error', error);\n });\n\n // Start our left-hand iterator and try to join with the index\n return new MultiTransformIterator(\n output.bindingsStream,\n {\n multiTransform: (bindings: RDF.Bindings): AsyncIterator => {\n // Find iterators from the index\n let iterators: AsyncIterator[] = index.get(bindings);\n\n // If no index entry was found, set an empty iterator.\n // If we index has been closed already, don't modify the index, but just use an empty dummy iterator.\n if (iterators.length === 0) {\n if (indexActive) {\n iterators = [ index.put(bindings, new BufferedIterator({ autoStart: false })) ];\n } else {\n iterators = [];\n }\n }\n\n // Merge all iterators in a single one,\n // and clone each one to make sure we can still use them in the future.\n const iterator = new UnionIterator(iterators.map(it => it.clone()), { autoStart: false });\n return iterator.map(indexBindings => ActorRdfJoin.joinBindings(bindings, indexBindings));\n },\n optional: true,\n autoStart: false,\n },\n );\n }, {\n autoStart: false,\n onClose() {\n buffer.bindingsStream.destroy();\n output.bindingsStream.destroy();\n },\n });\n }\n\n return {\n result: {\n type: 'bindings',\n bindingsStream,\n metadata: async() => await this.constructResultMetadata(\n action.entries,\n await ActorRdfJoin.getMetadatas(action.entries),\n action.context,\n { canContainUndefs: true },\n ),\n },\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n // This actor only works with common variables\n if (ActorRdfJoin.overlappingVariables(metadatas).length === 0) {\n throw new Error(`Actor ${this.name} only join entries with at least one common variable`);\n }\n\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n let iterations = metadatas[0].cardinality.value + metadatas[1].cardinality.value;\n if (!this.canHandleUndefs) {\n // Our non-undef implementation is slightly more performant.\n iterations *= 0.8;\n }\n if (this.blocking) {\n // Our blocking implementation is slightly more performant.\n iterations *= 0.9;\n }\n return {\n iterations,\n persistedItems: metadatas[0].cardinality.value,\n blockingItems: this.blocking ? metadatas[0].cardinality.value : 0,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1],\n };\n }\n}\n\nexport interface IActorRdfJoinOptionalHashArgs extends IActorRdfJoinArgs {\n /**\n * If this actor can handle undefined values.\n * If false, performance will be slightly better.\n */\n canHandleUndefs: boolean;\n /**\n * If the join will block when collecting the optional stream.\n * If true, performance will be better.\n */\n blocking: boolean;\n}\n","import type * as RDF from '@rdfjs/types';\nimport type { IBindingsIndex } from './IBindingsIndex';\n\n/**\n * A simple efficient hash-based index for maintaining bindings,\n * and checking whether or not a bindings is contained in this index.\n *\n * This can not handle bindings with undefined values.\n */\nexport class BindingsIndexDef implements IBindingsIndex {\n private readonly keys: RDF.Variable[];\n private readonly hashFn: (term: RDF.Bindings, keys: RDF.Variable[]) => string;\n private readonly index: Record;\n\n public constructor(keys: RDF.Variable[], hashFn: (term: RDF.Bindings, keys: RDF.Variable[]) => string) {\n this.keys = keys;\n this.hashFn = hashFn;\n this.index = {};\n }\n\n public put(bindings: RDF.Bindings, value: V): V {\n return this.index[this.hashFn(bindings, this.keys)] = value;\n }\n\n public get(bindings: RDF.Bindings): V[] {\n const v = this.getFirst(bindings);\n return v ? [ v ] : [];\n }\n\n public getFirst(bindings: RDF.Bindings): V | undefined {\n return this.index[this.hashFn(bindings, this.keys)];\n }\n\n public values(): V[] {\n return Object.values(this.index);\n }\n}\n","import type { Bindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { IBindingsIndex } from './IBindingsIndex';\n\n/**\n * A simple efficient tree-based index for maintaining bindings,\n * and checking whether or not a bindings is contained in this index.\n *\n * This will consider bindings with a variable term or an undefined term\n * as a 'match-all' with other terms.\n */\nexport class BindingsIndexUndef implements IBindingsIndex {\n private readonly keys: RDF.Variable[];\n private readonly data: IDataIndex = {};\n private readonly hashFn: (term: RDF.Term | undefined) => string;\n\n public constructor(keys: RDF.Variable[], hashFn: (term: RDF.Term | undefined) => string) {\n this.keys = keys;\n this.hashFn = hashFn;\n }\n\n /**\n * Add the given bindings to the index.\n * @param {Bindings} bindings A bindings.\n * @param {V} value The value to put.\n */\n public put(bindings: Bindings, value: V): V {\n if (this.isBindingsValid(bindings)) {\n let dataIt: IDataIndex | V = this.data;\n for (let i = 0; i < this.keys.length; i++) {\n const key = this.keys[i];\n const dataKey = this.hashFn(bindings.get(key));\n let subDataIt: IDataIndex | V | undefined = (> dataIt)[dataKey];\n if (!subDataIt) {\n subDataIt = ((> dataIt))[dataKey] = i === this.keys.length - 1 ? value : {};\n }\n dataIt = subDataIt;\n }\n }\n return value;\n }\n\n protected isBindingsValid(bindings: Bindings): boolean {\n let validKeys = false;\n for (const key of this.keys) {\n if (bindings.has(key)) {\n validKeys = true;\n break;\n }\n }\n return validKeys;\n }\n\n /**\n * Get the value of the given bindings is contained in this index.\n * @param {Bindings} bindings A bindings.\n * @return {V[]} The values.\n */\n public get(bindings: Bindings): V[] {\n // Always return undefined if the bindings contain none of the expected keys\n if (!this.isBindingsValid(bindings)) {\n return [];\n }\n\n return this.getRecursive(bindings, this.keys, [ this.data ]);\n }\n\n protected getRecursive(bindings: Bindings | undefined, keys: RDF.Variable[], dataIndexes: IDataIndex[]): V[] {\n if (keys.length === 0) {\n return dataIndexes;\n }\n\n let key: RDF.Variable;\n // eslint-disable-next-line prefer-const\n [ key, ...keys ] = keys;\n const matchingRecursive: V[][] = [];\n for (const data of dataIndexes) {\n // If the index contained a variable, all terms will match.\n const dataKey = this.hashFn(bindings?.get(key));\n if (dataKey) {\n // Check the entry for the term, and the variable term.\n const subDatas = []> [ data[dataKey], data[''] ].filter(Boolean);\n if (subDatas.length === 0) {\n continue;\n }\n matchingRecursive.push(this.getRecursive(bindings, keys, subDatas));\n } else {\n // Iterate over all entries\n const subDatas = []> Object.values(data);\n if (subDatas.length === 0) {\n continue;\n }\n matchingRecursive.push(this.getRecursive(bindings, keys, subDatas));\n }\n }\n return matchingRecursive.flat();\n }\n\n /**\n * Get the first value of the given bindings is contained in this index.\n * @param {Bindings} bindings A bindings.\n * @return {V | undefined} The value.\n */\n public getFirst(bindings: Bindings): V | undefined {\n // Always return undefined if the bindings contain none of the expected keys\n if (!this.isBindingsValid(bindings)) {\n return undefined;\n }\n\n return this.getRecursiveFirst(bindings, this.keys, [ this.data ]);\n }\n\n protected getRecursiveFirst(bindings: Bindings, keys: RDF.Variable[], dataIndexes: IDataIndex[]): V | undefined {\n if (keys.length === 0) {\n return dataIndexes[0];\n }\n\n let key: RDF.Variable;\n // eslint-disable-next-line prefer-const\n [ key, ...keys ] = keys;\n for (const data of dataIndexes) {\n // If the index contained a variable, all terms will match.\n const dataKey = this.hashFn(bindings.get(key));\n if (dataKey) {\n // Check the entry for the term, and the variable term.\n const subDatas = []> [ data[dataKey], data[''] ].filter(Boolean);\n if (subDatas.length === 0) {\n continue;\n }\n const ret = this.getRecursiveFirst(bindings, keys, subDatas);\n if (ret) {\n return ret;\n }\n } else {\n // Iterate over all entries\n const subDatas = []> Object.values(data);\n if (subDatas.length === 0) {\n continue;\n }\n const ret = this.getRecursiveFirst(bindings, keys, subDatas);\n if (ret) {\n return ret;\n }\n }\n }\n return undefined;\n }\n\n public values(): V[] {\n return this.keys.length === 0 ? [] : this.getRecursive(undefined, this.keys, [ this.data ]);\n }\n}\n\nexport interface IDataIndex {\n [key: string]: IDataIndex | V;\n}\n","import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport {\n ActorRdfJoin,\n} from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { Bindings, MetadataBindings } from '@comunica/types';\nimport { NestedLoopJoin } from 'asyncjoin';\n\n/**\n * A comunica Optional Nested Loop RDF Join Actor.\n */\nexport class ActorRdfJoinOptionalNestedLoop extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'optional',\n physicalName: 'nested-loop',\n limitEntries: 2,\n canHandleUndefs: true,\n });\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n const join = new NestedLoopJoin(\n action.entries[0].output.bindingsStream,\n action.entries[1].output.bindingsStream,\n ActorRdfJoin.joinBindings,\n { optional: true, autoStart: false },\n );\n return {\n result: {\n type: 'bindings',\n bindingsStream: join,\n metadata: async() => await this.constructResultMetadata(\n action.entries,\n await ActorRdfJoin.getMetadatas(action.entries),\n action.context,\n { canContainUndefs: true },\n ),\n },\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n return {\n iterations: metadatas[0].cardinality.value * metadatas[1].cardinality.value,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1],\n };\n }\n}\n","import type { IActionRdfJoinSelectivity, IActorRdfJoinSelectivityOutput } from '@comunica/bus-rdf-join-selectivity';\nimport { ActorRdfJoinSelectivity } from '@comunica/bus-rdf-join-selectivity';\nimport type { IActorArgs } from '@comunica/core';\nimport type { IMediatorTypeAccuracy } from '@comunica/mediatortype-accuracy';\nimport { Algebra, Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Variable Counting RDF Join Selectivity Actor.\n * Based on the \"variable counting predicates\" heuristic from\n * \"SPARQL basic graph pattern optimization using selectivity estimation.\"\n */\nexport class ActorRdfJoinSelectivityVariableCounting extends ActorRdfJoinSelectivity {\n // Calculated as sum of unbound join type costs times 2 (best-case)\n public static MAX_PAIRWISE_COST = 41 * 2;\n\n public constructor(\n args: IActorArgs,\n ) {\n super(args);\n }\n\n public async test(_action: IActionRdfJoinSelectivity): Promise {\n return { accuracy: 0.5 };\n }\n\n public static getPatternCost(pattern: Algebra.Pattern | Algebra.Path): number {\n let cost = 1;\n if (pattern.subject.termType === 'Variable') {\n cost += 4;\n }\n if (pattern.predicate.termType === 'Variable' || pattern.type === Algebra.types.PATH) {\n cost += 1;\n }\n if (pattern.object.termType === 'Variable') {\n cost += 2;\n }\n if (pattern.graph.termType === 'Variable') {\n cost += 1;\n }\n return cost / 9;\n }\n\n public static getJoinTypes(\n operation1: Algebra.Pattern | Algebra.Path,\n operation2: Algebra.Pattern | Algebra.Path,\n ): JoinTypes[] {\n const joinTypes: JoinTypes[] = [];\n\n // Check operation1.subject\n if (operation1.subject.termType === 'Variable') {\n if (operation1.subject.equals(operation2.subject)) {\n joinTypes.push(JoinTypes.unboundSS);\n }\n if (operation2.type === 'pattern' && operation1.subject.equals(operation2.predicate)) {\n joinTypes.push(JoinTypes.unboundSP);\n }\n if (operation1.subject.equals(operation2.object)) {\n joinTypes.push(JoinTypes.unboundSO);\n }\n if (operation1.subject.equals(operation2.graph)) {\n joinTypes.push(JoinTypes.unboundSG);\n }\n } else {\n if (operation1.subject.equals(operation2.subject)) {\n joinTypes.push(JoinTypes.boundSS);\n }\n if (operation2.type === 'pattern' && operation1.subject.equals(operation2.predicate)) {\n joinTypes.push(JoinTypes.boundSP);\n }\n if (operation1.subject.equals(operation2.object)) {\n joinTypes.push(JoinTypes.boundSO);\n }\n if (operation1.subject.equals(operation2.graph)) {\n joinTypes.push(JoinTypes.boundSG);\n }\n }\n\n // Check operation1.predicate\n if (operation1.type === 'pattern') {\n if (operation1.predicate.termType === 'Variable') {\n if (operation1.predicate.equals(operation2.subject)) {\n joinTypes.push(JoinTypes.unboundPS);\n }\n if (operation2.type === 'pattern' && operation1.predicate.equals(operation2.predicate)) {\n joinTypes.push(JoinTypes.unboundPP);\n }\n if (operation1.predicate.equals(operation2.object)) {\n joinTypes.push(JoinTypes.unboundPO);\n }\n if (operation1.predicate.equals(operation2.graph)) {\n joinTypes.push(JoinTypes.unboundPG);\n }\n } else {\n if (operation1.predicate.equals(operation2.subject)) {\n joinTypes.push(JoinTypes.boundPS);\n }\n if (operation2.type === 'pattern' && operation1.predicate.equals(operation2.predicate)) {\n joinTypes.push(JoinTypes.boundPP);\n }\n if (operation1.predicate.equals(operation2.object)) {\n joinTypes.push(JoinTypes.boundPO);\n }\n if (operation1.predicate.equals(operation2.graph)) {\n joinTypes.push(JoinTypes.boundPG);\n }\n }\n }\n\n // Check operation1.object\n if (operation1.object.termType === 'Variable') {\n if (operation1.object.equals(operation2.subject)) {\n joinTypes.push(JoinTypes.unboundOS);\n }\n if (operation2.type === 'pattern' && operation1.object.equals(operation2.predicate)) {\n joinTypes.push(JoinTypes.unboundOP);\n }\n if (operation1.object.equals(operation2.object)) {\n joinTypes.push(JoinTypes.unboundOO);\n }\n if (operation1.object.equals(operation2.graph)) {\n joinTypes.push(JoinTypes.unboundOG);\n }\n } else {\n if (operation1.object.equals(operation2.subject)) {\n joinTypes.push(JoinTypes.boundOS);\n }\n if (operation2.type === 'pattern' && operation1.object.equals(operation2.predicate)) {\n joinTypes.push(JoinTypes.boundOP);\n }\n if (operation1.object.equals(operation2.object)) {\n joinTypes.push(JoinTypes.boundOO);\n }\n if (operation1.object.equals(operation2.graph)) {\n joinTypes.push(JoinTypes.boundOG);\n }\n }\n\n // Check operation1.graph\n if (operation1.graph.termType === 'Variable') {\n if (operation1.graph.equals(operation2.subject)) {\n joinTypes.push(JoinTypes.unboundGS);\n }\n if (operation2.type === 'pattern' && operation1.graph.equals(operation2.predicate)) {\n joinTypes.push(JoinTypes.unboundGP);\n }\n if (operation1.graph.equals(operation2.object)) {\n joinTypes.push(JoinTypes.unboundGO);\n }\n if (operation1.graph.equals(operation2.graph)) {\n joinTypes.push(JoinTypes.unboundGG);\n }\n } else {\n if (operation1.graph.equals(operation2.subject)) {\n joinTypes.push(JoinTypes.boundGS);\n }\n if (operation2.type === 'pattern' && operation1.graph.equals(operation2.predicate)) {\n joinTypes.push(JoinTypes.boundGP);\n }\n if (operation1.graph.equals(operation2.object)) {\n joinTypes.push(JoinTypes.boundGO);\n }\n if (operation1.graph.equals(operation2.graph)) {\n joinTypes.push(JoinTypes.boundGG);\n }\n }\n\n return joinTypes;\n }\n\n public static getOperationsPairwiseJoinCost(\n operation1: Algebra.Pattern | Algebra.Path,\n operation2: Algebra.Pattern | Algebra.Path,\n ): number {\n let cost = ActorRdfJoinSelectivityVariableCounting.MAX_PAIRWISE_COST;\n\n for (const joinType of ActorRdfJoinSelectivityVariableCounting.getJoinTypes(operation1, operation2)) {\n switch (joinType) {\n case JoinTypes.boundSS:\n cost -= 2 * 2;\n break;\n case JoinTypes.boundSP:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundSO:\n cost -= 1 * 2;\n break;\n case JoinTypes.boundSG:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundPS:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundPP:\n // Special case: patterns with equal (bound) predicates have the highest cost\n return 1;\n case JoinTypes.boundPO:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundPG:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundOS:\n cost -= 1 * 2;\n break;\n case JoinTypes.boundOP:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundOO:\n cost -= 1 * 2;\n break;\n case JoinTypes.boundOG:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundGS:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundGP:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundGO:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundGG:\n cost -= 3 * 2;\n break;\n case JoinTypes.unboundSS:\n cost -= 2;\n break;\n case JoinTypes.unboundSP:\n cost -= 3;\n break;\n case JoinTypes.unboundSO:\n cost -= 1;\n break;\n case JoinTypes.unboundSG:\n cost -= 3;\n break;\n case JoinTypes.unboundPS:\n cost -= 3;\n break;\n case JoinTypes.unboundPP:\n cost -= 3;\n break;\n case JoinTypes.unboundPO:\n cost -= 3;\n break;\n case JoinTypes.unboundPG:\n cost -= 3;\n break;\n case JoinTypes.unboundOS:\n cost -= 1;\n break;\n case JoinTypes.unboundOP:\n cost -= 3;\n break;\n case JoinTypes.unboundOO:\n cost -= 1;\n break;\n case JoinTypes.unboundOG:\n cost -= 3;\n break;\n case JoinTypes.unboundGS:\n cost -= 3;\n break;\n case JoinTypes.unboundGP:\n cost -= 3;\n break;\n case JoinTypes.unboundGO:\n cost -= 3;\n break;\n case JoinTypes.unboundGG:\n cost -= 3;\n break;\n }\n }\n\n return cost / ActorRdfJoinSelectivityVariableCounting.MAX_PAIRWISE_COST;\n }\n\n public static getOperationsJoinCost(operations: Algebra.Operation[]): number {\n // Determine all operations that select values (patterns and paths)\n const patterns: (Algebra.Pattern | Algebra.Path)[] = [];\n for (const operation of operations) {\n Util.recurseOperation(operation, {\n [Algebra.types.PATTERN](pattern: Algebra.Pattern): boolean {\n patterns.push(pattern);\n return false;\n },\n [Algebra.types.PATH](path: Algebra.Path): boolean {\n patterns.push(path);\n return false;\n },\n });\n }\n\n // Determine pairwise costs\n let totalCost = 0;\n let costEntries = 0;\n for (const pattern1 of patterns) {\n for (const pattern2 of patterns) {\n if (pattern1 !== pattern2) {\n totalCost += ActorRdfJoinSelectivityVariableCounting.getOperationsPairwiseJoinCost(pattern1, pattern2);\n costEntries++;\n }\n }\n }\n\n // If there are no overlapping patterns, the cost is 1\n if (costEntries === 0) {\n return 1;\n }\n\n // Combine all pairwise costs, and multiply with costs of each pattern separately\n return totalCost / costEntries * patterns\n .reduce((factor, pattern) => factor * ActorRdfJoinSelectivityVariableCounting.getPatternCost(pattern), 1);\n }\n\n public async run(action: IActionRdfJoinSelectivity): Promise {\n if (action.entries.length <= 1) {\n return { selectivity: 1 };\n }\n return {\n selectivity: ActorRdfJoinSelectivityVariableCounting\n .getOperationsJoinCost(action.entries.map(entry => entry.operation)),\n };\n }\n}\n\nexport enum JoinTypes {\n boundSS,\n boundSP,\n boundSO,\n boundSG,\n boundPS,\n boundPP,\n boundPO,\n boundPG,\n boundOS,\n boundOP,\n boundOO,\n boundOG,\n boundGS,\n boundGP,\n boundGO,\n boundGG,\n\n unboundSS,\n unboundSP,\n unboundSO,\n unboundSG,\n unboundPS,\n unboundPP,\n unboundPO,\n unboundPG,\n unboundOS,\n unboundOP,\n unboundOO,\n unboundOG,\n unboundGS,\n unboundGP,\n unboundGO,\n unboundGG,\n}\n","import type {\n IActionRdfMetadataAccumulate,\n IActorRdfMetadataAccumulateOutput,\n IActorRdfMetadataAccumulateArgs,\n} from '@comunica/bus-rdf-metadata-accumulate';\nimport { ActorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica CanContainUndefs RDF Metadata Accumulate Actor.\n */\nexport class ActorRdfMetadataAccumulateCanContainUndefs extends ActorRdfMetadataAccumulate {\n public constructor(args: IActorRdfMetadataAccumulateArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataAccumulate): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataAccumulate): Promise {\n // Return default value on initialize\n if (action.mode === 'initialize') {\n return { metadata: { canContainUndefs: false }};\n }\n\n // Otherwise, attempt to increment existing value\n let canContainUndefs = action.accumulatedMetadata.canContainUndefs;\n if (action.appendingMetadata.canContainUndefs) {\n canContainUndefs = true;\n }\n return { metadata: { canContainUndefs }};\n }\n}\n","import type {\n IActionRdfMetadataAccumulate,\n IActorRdfMetadataAccumulateOutput,\n IActorRdfMetadataAccumulateArgs,\n} from '@comunica/bus-rdf-metadata-accumulate';\nimport { ActorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type { IActorTest } from '@comunica/core';\nimport type { QueryResultCardinality } from '@comunica/types';\n\n/**\n * A comunica Cardinality RDF Metadata Accumulate Actor.\n */\nexport class ActorRdfMetadataAccumulateCardinality extends ActorRdfMetadataAccumulate {\n public constructor(args: IActorRdfMetadataAccumulateArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataAccumulate): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataAccumulate): Promise {\n // Return default value on initialize\n if (action.mode === 'initialize') {\n return { metadata: { cardinality: { type: 'exact', value: 0 }}};\n }\n\n // Otherwise, attempt to update existing value\n const cardinality: QueryResultCardinality = { ...action.accumulatedMetadata.cardinality };\n\n if (cardinality.dataset) {\n if (action.appendingMetadata.cardinality.dataset) {\n // If the accumulated cardinality is dataset-wide\n if (cardinality.dataset !== action.appendingMetadata.cardinality.dataset &&\n action.appendingMetadata.subsetOf === cardinality.dataset) {\n // If the appending cardinality refers to the subset of a dataset,\n // use the cardinality of the subset.\n return { metadata: { cardinality: action.appendingMetadata.cardinality }};\n }\n if (cardinality.dataset === action.appendingMetadata.cardinality.dataset) {\n // If the appending cardinality is for the same dataset,\n // keep the accumulated cardinality unchanged.\n return { metadata: { cardinality }};\n }\n // If the appending cardinality refers to another dataset,\n // remove the dataset scopes.\n delete cardinality.dataset;\n } else {\n // If the appending cardinality refers to a dataset subset,\n // keep the accumulated cardinality unchanged.\n return { metadata: { cardinality }};\n }\n }\n\n if (!action.appendingMetadata.cardinality || !Number.isFinite(action.appendingMetadata.cardinality.value)) {\n // We're already at infinite, so ignore any later metadata\n cardinality.type = 'estimate';\n cardinality.value = Number.POSITIVE_INFINITY;\n } else {\n if (action.appendingMetadata.cardinality.type === 'estimate') {\n cardinality.type = 'estimate';\n }\n cardinality.value += action.appendingMetadata.cardinality.value;\n }\n\n return { metadata: { cardinality }};\n }\n}\n","import type {\n IActionRdfMetadataAccumulate,\n IActorRdfMetadataAccumulateOutput,\n IActorRdfMetadataAccumulateArgs,\n} from '@comunica/bus-rdf-metadata-accumulate';\nimport { ActorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica PageSize RDF Metadata Accumulate Actor.\n */\nexport class ActorRdfMetadataAccumulatePageSize extends ActorRdfMetadataAccumulate {\n public constructor(args: IActorRdfMetadataAccumulateArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataAccumulate): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataAccumulate): Promise {\n // Return nothing on initialize\n if (action.mode === 'initialize') {\n return { metadata: {}};\n }\n\n // Otherwise, attempt to increment existing value\n return {\n metadata: {\n ...('pageSize' in action.accumulatedMetadata) || ('pageSize' in action.appendingMetadata) ?\n {\n pageSize: (action.accumulatedMetadata.pageSize ?? 0) + (action.appendingMetadata.pageSize ?? 0),\n } :\n {},\n },\n };\n }\n}\n","import type {\n IActionRdfMetadataAccumulate,\n IActorRdfMetadataAccumulateOutput,\n IActorRdfMetadataAccumulateArgs,\n} from '@comunica/bus-rdf-metadata-accumulate';\nimport { ActorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica RequestTime RDF Metadata Accumulate Actor.\n */\nexport class ActorRdfMetadataAccumulateRequestTime extends ActorRdfMetadataAccumulate {\n public constructor(args: IActorRdfMetadataAccumulateArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataAccumulate): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataAccumulate): Promise {\n // Return nothing on initialize\n if (action.mode === 'initialize') {\n return { metadata: {}};\n }\n\n // Otherwise, attempt to increment existing value\n return {\n metadata: {\n ...('requestTime' in action.accumulatedMetadata) || ('requestTime' in action.appendingMetadata) ?\n {\n requestTime: (action.accumulatedMetadata.requestTime ?? 0) + (action.appendingMetadata.requestTime ?? 0),\n } :\n {},\n },\n };\n }\n}\n","import type { IActionRdfMetadata, IActorRdfMetadataArgs, IActorRdfMetadataOutput } from '@comunica/bus-rdf-metadata';\nimport { ActorRdfMetadata } from '@comunica/bus-rdf-metadata';\nimport type { IActorTest } from '@comunica/core';\nimport { Readable } from 'readable-stream';\n\n/**\n * A comunica All RDF Metadata Actor.\n */\nexport class ActorRdfMetadataAll extends ActorRdfMetadata {\n public constructor(args: IActorRdfMetadataArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadata): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadata): Promise {\n const data: Readable = new Readable({ objectMode: true });\n const metadata: Readable = new Readable({ objectMode: true });\n\n // Forward errors (attach them immediately as they could arrive earlier)\n action.quads.on('error', (error) => {\n data.emit('error', error);\n metadata.emit('error', error);\n });\n\n // Terminate both streams on-end\n action.quads.on('end', () => {\n data.push(null);\n metadata.push(null);\n });\n\n const read: (size: number) => void = data._read = metadata._read = (size) => {\n while (size > 0) {\n const item = action.quads.read();\n if (item === null) {\n return action.quads.once('readable', () => read(size));\n }\n size--;\n data.push(item);\n metadata.push(item);\n }\n };\n\n return { data, metadata };\n }\n}\n","import type {\n IActionRdfMetadataExtract,\n IActorRdfMetadataExtractArgs,\n IActorRdfMetadataExtractOutput,\n} from '@comunica/bus-rdf-metadata-extract';\nimport { ActorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica Allow HTTP Methods RDF Metadata Extract Actor.\n */\nexport class ActorRdfMetadataExtractAllowHttpMethods extends ActorRdfMetadataExtract {\n public constructor(args: IActorRdfMetadataExtractArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataExtract): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataExtract): Promise {\n const metadata: Record = {};\n if (action.headers?.get('allow')) {\n metadata.allowHttpMethods = action.headers.get('allow')?.split(/, */u);\n }\n return { metadata };\n }\n}\n","import type {\n IActionRdfMetadataExtract,\n IActorRdfMetadataExtractOutput,\n IActorRdfMetadataExtractArgs,\n} from '@comunica/bus-rdf-metadata-extract';\nimport { ActorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActorTest } from '@comunica/core';\nimport type * as RDF from '@rdfjs/types';\nimport type { UriTemplate } from 'uritemplate';\nimport { parse as parseUriTemplate } from 'uritemplate';\n\n/**\n * An RDF Metadata Extract Actor that extracts all Hydra controls from the metadata stream.\n */\nexport class ActorRdfMetadataExtractHydraControls extends ActorRdfMetadataExtract {\n public static readonly HYDRA: string = 'http://www.w3.org/ns/hydra/core#';\n public static readonly LINK_TYPES: string[] = [ 'first', 'next', 'previous', 'last' ];\n protected readonly parsedUriTemplateCache: Record = {};\n\n public constructor(args: IActorRdfMetadataExtractArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataExtract): Promise {\n return true;\n }\n\n /**\n * Collect all Hydra page links from the given Hydra properties object.\n * @param pageUrl The page URL in which the Hydra properties are defined.\n * @param hydraProperties The collected Hydra properties.\n * @return The Hydra links\n */\n public getLinks(pageUrl: string, hydraProperties: Record>):\n Record {\n return Object.fromEntries(ActorRdfMetadataExtractHydraControls.LINK_TYPES.map((link) => {\n // First check the correct hydra:next, then the deprecated hydra:nextPage\n const links = hydraProperties[link] || hydraProperties[`${link}Page`];\n const linkTargets = links && links[pageUrl];\n return [ link, linkTargets && linkTargets.length > 0 ? [ linkTargets[0] ] : [] ];\n }));\n }\n\n /**\n * Parse a URI template, or retrieve it from a cache.\n * @param {string} template A URI template string.\n * @return {} A parsed URI template object.\n */\n public parseUriTemplateCached(template: string): UriTemplate {\n const cachedUriTemplate: UriTemplate = this.parsedUriTemplateCache[template];\n if (cachedUriTemplate) {\n return cachedUriTemplate;\n }\n\n return this.parsedUriTemplateCache[template] = parseUriTemplate(template);\n }\n\n /**\n * Collect all search forms from the given Hydra properties object.\n * @param hydraProperties The collected Hydra properties.\n * @return The search forms.\n */\n public getSearchForms(hydraProperties: Record>): ISearchForms {\n const searchFormData: Record = hydraProperties.search;\n const searchForms: ISearchForm[] = [];\n if (searchFormData) {\n for (const dataset in searchFormData) {\n for (const searchFormId of searchFormData[dataset]) {\n const searchTemplates = (hydraProperties.template || {})[searchFormId] || [];\n\n // Parse the template\n if (searchTemplates.length !== 1) {\n throw new Error(`Expected 1 hydra:template for ${searchFormId}`);\n }\n const template: string = searchTemplates[0];\n const searchTemplate: UriTemplate = this.parseUriTemplateCached(template);\n\n // Parse the template mappings\n const mappings: Record = Object\n .fromEntries(((hydraProperties.mapping || {})[searchFormId] || [])\n .map((mapping) => {\n const variable = ((hydraProperties.variable || {})[mapping] || [])[0];\n const property = ((hydraProperties.property || {})[mapping] || [])[0];\n if (!variable) {\n throw new Error(`Expected a hydra:variable for ${mapping}`);\n }\n if (!property) {\n throw new Error(`Expected a hydra:property for ${mapping}`);\n }\n return [ property, variable ];\n }));\n\n // Gets the URL of the Triple Pattern Fragment with the given triple pattern\n const getUri = (entries: Record): string => searchTemplate\n .expand(Object.fromEntries(Object.keys(entries).map(key => [ mappings[key], entries[key] ])));\n\n searchForms.push({ dataset, template, mappings, getUri });\n }\n }\n }\n return { values: searchForms };\n }\n\n /**\n * Collect all hydra properties from a given metadata stream\n * in a nice convenient nested hash (property / subject / objects).\n * @param {RDF.Stream} metadata\n * @return The collected Hydra properties.\n */\n public getHydraProperties(metadata: RDF.Stream): Promise>> {\n return new Promise((resolve, reject) => {\n metadata.on('error', reject);\n\n // Collect all hydra properties in a nice convenient nested hash (property / subject / objects).\n const hydraProperties: Record> = {};\n metadata.on('data', (quad) => {\n if (quad.predicate.value.startsWith(ActorRdfMetadataExtractHydraControls.HYDRA)) {\n const property = quad.predicate.value.slice(ActorRdfMetadataExtractHydraControls.HYDRA.length);\n const subjectProperties = hydraProperties[property] || (hydraProperties[property] = {});\n const objects = subjectProperties[quad.subject.value] || (subjectProperties[quad.subject.value] = []);\n objects.push(quad.object.value);\n }\n });\n\n metadata.on('end', () => resolve(hydraProperties));\n });\n }\n\n public async run(action: IActionRdfMetadataExtract): Promise {\n const metadata: IActorRdfMetadataExtractOutput['metadata'] = {};\n const hydraProperties = await this.getHydraProperties(action.metadata);\n Object.assign(metadata, this.getLinks(action.url, hydraProperties));\n metadata.searchForms = this.getSearchForms(hydraProperties);\n return { metadata };\n }\n}\n\nexport interface ISearchForm {\n /**\n * The dataset in which the search form is defined.\n */\n dataset: string;\n /**\n * The URI template containing Hydra variables.\n */\n template: string;\n /**\n * The mappings.\n * With as keys the Hydra properties,\n * and as values the Hydra variables\n */\n mappings: Record;\n\n /**\n * Instantiate a uri based on the given Hydra variable values.\n * @param entries Entries with as keys Hydra properties,\n * and as values Hydra variable values.\n * @return {string} The instantiated URI\n */\n getUri: (entries: Record) => string;\n}\n\nexport interface ISearchForms {\n /**\n * All available search forms.\n */\n values: ISearchForm[];\n}\n","import type {\n IActionRdfMetadataExtract,\n IActorRdfMetadataExtractOutput,\n IActorRdfMetadataExtractArgs,\n} from '@comunica/bus-rdf-metadata-extract';\nimport { ActorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * An RDF Metadata Extract Actor that extracts total items counts from a metadata stream based on the given predicates.\n */\nexport class ActorRdfMetadataExtractHydraCount extends ActorRdfMetadataExtract\n implements IActorRdfParseFixedMediaTypesArgs {\n public readonly predicates: string[];\n\n public constructor(args: IActorRdfParseFixedMediaTypesArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataExtract): Promise {\n return true;\n }\n\n public run(action: IActionRdfMetadataExtract): Promise {\n return new Promise((resolve, reject) => {\n // Forward errors\n action.metadata.on('error', reject);\n\n // Immediately resolve when a value has been found.\n action.metadata.on('data', (quad) => {\n if (this.predicates.includes(quad.predicate.value)) {\n resolve({\n metadata: {\n cardinality: {\n type: 'estimate',\n value: Number.parseInt(quad.object.value, 10),\n dataset: quad.subject.value,\n },\n },\n });\n }\n });\n\n // If no value has been found, assume infinity.\n action.metadata.on('end', () => {\n resolve({ metadata: { cardinality: { type: 'estimate', value: 0 }}});\n });\n });\n }\n}\n\nexport interface IActorRdfParseFixedMediaTypesArgs extends IActorRdfMetadataExtractArgs {\n /**\n * A predicate that provides a count estimate\n * @default {http://www.w3.org/ns/hydra/core#totalItems}\n * @default {http://rdfs.org/ns/void#triples}\n */\n predicates: string[];\n}\n","import type {\n IActionRdfMetadataExtract,\n IActorRdfMetadataExtractOutput,\n IActorRdfMetadataExtractArgs,\n} from '@comunica/bus-rdf-metadata-extract';\nimport { ActorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica Hydra Pagesize RDF Metadata Extract Actor.\n */\nexport class ActorRdfMetadataExtractHydraPagesize extends ActorRdfMetadataExtract {\n public readonly predicates: string[];\n\n public constructor(args: IActorRdfMetadataExtractHydraPagesizeArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataExtract): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataExtract): Promise {\n return new Promise((resolve, reject) => {\n // Forward errors\n action.metadata.on('error', reject);\n\n // Immediately resolve when a value has been found.\n action.metadata.on('data', (quad) => {\n if (this.predicates.includes(quad.predicate.value)) {\n resolve({ metadata: { pageSize: Number.parseInt(quad.object.value, 10) }});\n }\n });\n\n // If no value has been found, don't define the pageSize value.\n action.metadata.on('end', () => {\n resolve({ metadata: {}});\n });\n });\n }\n}\n\nexport interface IActorRdfMetadataExtractHydraPagesizeArgs extends IActorRdfMetadataExtractArgs {\n /**\n * A predicate that provides the page size\n * @default {http://www.w3.org/ns/hydra/core#itemsPerPage}\n */\n predicates: string[];\n}\n","import type {\n IActionRdfMetadataExtract,\n IActorRdfMetadataExtractOutput,\n IActorRdfMetadataExtractArgs,\n} from '@comunica/bus-rdf-metadata-extract';\nimport { ActorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica Patch SPARQL Update RDF Metadata Extract Actor.\n */\nexport class ActorRdfMetadataExtractPatchSparqlUpdate extends ActorRdfMetadataExtract {\n public constructor(args: IActorRdfMetadataExtractArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataExtract): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataExtract): Promise {\n const metadata: IActorRdfMetadataExtractOutput['metadata'] = {};\n // The ms-author-via header is added for backwards-compatibility with old Solid servers\n if (\n action.headers?.get('accept-patch')?.includes('application/sparql-update') ??\n action.headers?.get('ms-author-via')?.includes('SPARQL')\n ) {\n metadata.patchSparqlUpdate = true;\n }\n return { metadata };\n }\n}\n","import type {\n IActionRdfMetadataExtract,\n IActorRdfMetadataExtractOutput,\n IActorRdfMetadataExtractArgs,\n} from '@comunica/bus-rdf-metadata-extract';\nimport { ActorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica PUT Accepted RDF Metadata Extract Actor.\n */\nexport class ActorRdfMetadataExtractPutAccepted extends ActorRdfMetadataExtract {\n public constructor(args: IActorRdfMetadataExtractArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataExtract): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataExtract): Promise {\n const metadata: IActorRdfMetadataExtractOutput['metadata'] = {};\n if (action.headers?.get('accept-put')) {\n metadata.putAccepted = action.headers.get('accept-put')?.split(/, */u);\n }\n return { metadata };\n }\n}\n","import type {\n IActionRdfMetadataExtract,\n IActorRdfMetadataExtractOutput,\n IActorRdfMetadataExtractArgs,\n} from '@comunica/bus-rdf-metadata-extract';\nimport { ActorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica Request Time RDF Metadata Extract Actor.\n */\nexport class ActorRdfMetadataExtractRequestTime extends ActorRdfMetadataExtract {\n public constructor(args: IActorRdfMetadataExtractArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataExtract): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataExtract): Promise {\n return { metadata: { requestTime: action.requestTime }};\n }\n}\n","import type {\n IActionRdfMetadataExtract,\n IActorRdfMetadataExtractOutput,\n IActorRdfMetadataExtractArgs,\n} from '@comunica/bus-rdf-metadata-extract';\nimport { ActorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActorTest } from '@comunica/core';\nimport { resolve as resolveIri } from 'relative-to-absolute-iri';\n\n/**\n * A comunica RDF Metadata Extract Actor for SPARQL service descriptions.\n */\nexport class ActorRdfMetadataExtractSparqlService extends ActorRdfMetadataExtract {\n private readonly inferHttpsEndpoint: boolean;\n\n public constructor(args: IActorRdfMetadataExtractSparqlServiceArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataExtract): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataExtract): Promise {\n return new Promise((resolve, reject) => {\n // Forward errors\n action.metadata.on('error', reject);\n\n // Immediately resolve when a SPARQL service endpoint URL has been found\n const metadata: any = {};\n action.metadata.on('data', (quad) => {\n if (quad.predicate.value === 'http://www.w3.org/ns/sparql-service-description#endpoint' &&\n (quad.subject.termType === 'BlankNode' || quad.subject.value === action.url)) {\n metadata.sparqlService = quad.object.termType === 'Literal' ?\n resolveIri(quad.object.value, action.url) :\n quad.object.value;\n\n // Fix a common mistake in SPARQL endpoint setups where HTTPS SD's refer to a non-existing HTTP API\n if (this.inferHttpsEndpoint &&\n action.url.startsWith('https') && !metadata.sparqlService.startsWith('https')) {\n metadata.sparqlService = metadata.sparqlService.replace('http:', 'https:');\n }\n } else if (quad.predicate.value === 'http://www.w3.org/ns/sparql-service-description#defaultGraph') {\n metadata.defaultGraph = quad.object.value;\n }\n });\n\n // If no value has been found, emit nothing.\n action.metadata.on('end', () => {\n resolve({ metadata });\n });\n });\n }\n}\n\nexport interface IActorRdfMetadataExtractSparqlServiceArgs extends IActorRdfMetadataExtractArgs {\n /**\n * If HTTPS endpoints should be forcefully used if the original URL was HTTPS-based\n * @default {true}\n */\n inferHttpsEndpoint: boolean;\n}\n","import type { IActionRdfMetadata, IActorRdfMetadataArgs, IActorRdfMetadataOutput } from '@comunica/bus-rdf-metadata';\nimport { ActorRdfMetadata } from '@comunica/bus-rdf-metadata';\nimport type { IActorTest } from '@comunica/core';\nimport type * as RDF from '@rdfjs/types';\nimport { Readable } from 'readable-stream';\n\n/**\n * An RDF Metadata Actor that splits off the metadata based on the existence of a 'foaf:primaryTopic' link.\n * Only non-triple quad streams are supported.\n */\nexport class ActorRdfMetadataPrimaryTopic extends ActorRdfMetadata {\n private readonly metadataToData: boolean;\n private readonly dataToMetadataOnInvalidMetadataGraph: boolean;\n\n public constructor(args: IActorRdfMetadataPrimaryTopicArgs) {\n super(args);\n }\n\n public async test(action: IActionRdfMetadata): Promise {\n if (action.triples) {\n throw new Error('This actor only supports non-triple quad streams.');\n }\n return true;\n }\n\n public async run(action: IActionRdfMetadata): Promise {\n const data: Readable = new Readable({ objectMode: true });\n const metadata: Readable = new Readable({ objectMode: true });\n\n // Delay attachment of listeners until the data or metadata stream is being read.\n const attachListeners = (): void => {\n // Attach listeners only once\n data._read = metadata._read = () => {\n // Do nothing\n };\n\n // Forward errors\n action.quads.on('error', (error) => {\n data.emit('error', error);\n metadata.emit('error', error);\n });\n\n // First pass over data to categorize in graphs,\n // and to detect the primaryTopic triple.\n const graphs: Record = {};\n let endpointIdentifier: string | undefined;\n const primaryTopics: Record = {};\n action.quads.on('data', (quad) => {\n if (quad.predicate.value === 'http://rdfs.org/ns/void#subset' &&\n quad.object.value === action.url) {\n endpointIdentifier = quad.subject.value;\n } else if (quad.predicate.value === 'http://xmlns.com/foaf/0.1/primaryTopic') {\n primaryTopics[quad.object.value] = quad.subject.value;\n }\n let quads: RDF.Quad[] = graphs[quad.graph.value];\n if (!quads) {\n quads = graphs[quad.graph.value] = [];\n }\n quads.push(quad);\n });\n\n // When the stream has finished,\n // determine the appropriate metadata graph,\n // and emit all quads to the appropriate streams.\n action.quads.on('end', () => {\n const metadataGraph: string | undefined = endpointIdentifier ? primaryTopics[endpointIdentifier] : undefined;\n for (const graphName in graphs) {\n if (graphName === metadataGraph) {\n for (const quad of graphs[graphName]) {\n metadata.push(quad);\n }\n // Also emit metadata to data if requested\n if (this.metadataToData) {\n for (const quad of graphs[graphName]) {\n data.push(quad);\n }\n }\n } else {\n for (const quad of graphs[graphName]) {\n data.push(quad);\n }\n if (!metadataGraph && this.dataToMetadataOnInvalidMetadataGraph) {\n for (const quad of graphs[graphName]) {\n metadata.push(quad);\n }\n }\n }\n }\n data.push(null);\n metadata.push(null);\n });\n };\n data._read = metadata._read = () => {\n attachListeners();\n };\n\n return { data, metadata };\n }\n}\n\nexport interface IActorRdfMetadataPrimaryTopicArgs extends IActorRdfMetadataArgs {\n /**\n * If detected metadata triples should also be emitted as data triples\n * @default {false}\n */\n metadataToData: boolean;\n /**\n * If all data should also be seen as metadata when no metadata graph was detected\n * @default {true}\n */\n dataToMetadataOnInvalidMetadataGraph: boolean;\n}\n","import type {\n IActionRdfParseHtml,\n IActorRdfParseHtmlArgs,\n IActorRdfParseHtmlOutput,\n} from '@comunica/bus-rdf-parse-html';\nimport { ActorRdfParseHtml } from '@comunica/bus-rdf-parse-html';\nimport type { IActorTest } from '@comunica/core';\nimport { MicrodataRdfParser } from 'microdata-rdf-streaming-parser';\n\n/**\n * A comunica Microdata RDF Parse Html Actor.\n */\nexport class ActorRdfParseHtmlMicrodata extends ActorRdfParseHtml {\n public constructor(args: IActorRdfParseHtmlArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfParseHtml): Promise {\n return true;\n }\n\n public async run(action: IActionRdfParseHtml): Promise {\n const mediaType = action.headers ? action.headers.get('content-type') : null;\n const xmlMode = mediaType?.includes('xml');\n\n const htmlParseListener = new MicrodataRdfParser({ baseIRI: action.baseIRI, xmlMode });\n htmlParseListener.on('error', action.error);\n htmlParseListener.on('data', action.emit);\n // eslint-disable-next-line ts/unbound-method\n const onTagEndOld = htmlParseListener.onEnd;\n htmlParseListener.onEnd = () => {\n onTagEndOld.call(htmlParseListener);\n action.end();\n };\n return { htmlParseListener };\n }\n}\n","import type {\n IActionRdfParseHtml,\n IActorRdfParseHtmlOutput,\n IActorRdfParseHtmlArgs,\n} from '@comunica/bus-rdf-parse-html';\nimport { ActorRdfParseHtml } from '@comunica/bus-rdf-parse-html';\nimport type { IActorTest } from '@comunica/core';\nimport { RdfaParser } from 'rdfa-streaming-parser';\n\n/**\n * A comunica RDFa RDF Parse Html Actor.\n */\nexport class ActorRdfParseHtmlRdfa extends ActorRdfParseHtml {\n public constructor(args: IActorRdfParseHtmlArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfParseHtml): Promise {\n return true;\n }\n\n public async run(action: IActionRdfParseHtml): Promise {\n const mediaType = action.headers ? action.headers.get('content-type') : null;\n const language = (action.headers && action.headers.get('content-language')) ?? undefined;\n const profile = mediaType && mediaType.includes('xml') ? 'xhtml' : 'html';\n\n const htmlParseListener = new RdfaParser({ baseIRI: action.baseIRI, profile, language });\n htmlParseListener.on('error', action.error);\n htmlParseListener.on('data', action.emit);\n // eslint-disable-next-line ts/unbound-method\n const onTagEndOld = htmlParseListener.onEnd;\n htmlParseListener.onEnd = () => {\n onTagEndOld.call(htmlParseListener);\n action.end();\n };\n return { htmlParseListener };\n }\n}\n","import type { MediatorRdfParseHandle, MediatorRdfParseMediaTypes } from '@comunica/bus-rdf-parse';\nimport type {\n IActionRdfParseHtml,\n IActorRdfParseHtmlOutput,\n IActorRdfParseHtmlArgs,\n} from '@comunica/bus-rdf-parse-html';\nimport { ActorRdfParseHtml } from '@comunica/bus-rdf-parse-html';\nimport type { IActorTest } from '@comunica/core';\nimport { HtmlScriptListener } from './HtmlScriptListener';\n\n/**\n * A HTML script RDF Parse actor that listens on the 'rdf-parse' bus.\n *\n * It is able to extract and parse any RDF serialization from script tags in HTML files\n * and announce the presence of them by media type.\n */\nexport class ActorRdfParseHtmlScript extends ActorRdfParseHtml {\n private readonly mediatorRdfParseMediatypes: MediatorRdfParseMediaTypes;\n private readonly mediatorRdfParseHandle: MediatorRdfParseHandle;\n\n public constructor(args: IActorRdfParseHtmlScriptArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfParseHtml): Promise {\n return true;\n }\n\n public async run(action: IActionRdfParseHtml): Promise {\n const supportedTypes: Record = (await this.mediatorRdfParseMediatypes\n .mediate({ context: action.context, mediaTypes: true })).mediaTypes;\n const htmlParseListener = new HtmlScriptListener(\n this.mediatorRdfParseHandle,\n action.emit,\n action.error,\n action.end,\n supportedTypes,\n action.context,\n action.baseIRI,\n action.headers,\n );\n return { htmlParseListener };\n }\n}\n\nexport interface IActorRdfParseHtmlScriptArgs extends IActorRdfParseHtmlArgs {\n /**\n * The RDF Parse mediator for collecting media types\n */\n mediatorRdfParseMediatypes: MediatorRdfParseMediaTypes;\n /**\n * The RDF Parse mediator for handling parsing\n */\n mediatorRdfParseHandle: MediatorRdfParseHandle;\n}\n","import type { MediatorRdfParseHandle } from '@comunica/bus-rdf-parse';\nimport type { IHtmlParseListener } from '@comunica/bus-rdf-parse-html';\nimport { KeysRdfParseHtmlScript } from '@comunica/context-entries';\nimport type { IActionContext } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { Readable } from 'readable-stream';\nimport { resolve as resolveIri } from 'relative-to-absolute-iri';\n\n/**\n * An HTML parse listeners that detects `.\n this.sequenceIndex = Number(c === CharCodes.Lt);\n }\n };\n Tokenizer.prototype.stateCDATASequence = function (c) {\n if (c === Sequences.Cdata[this.sequenceIndex]) {\n if (++this.sequenceIndex === Sequences.Cdata.length) {\n this.state = State.InCommentLike;\n this.currentSequence = Sequences.CdataEnd;\n this.sequenceIndex = 0;\n this.sectionStart = this.index + 1;\n }\n }\n else {\n this.sequenceIndex = 0;\n this.state = State.InDeclaration;\n this.stateInDeclaration(c); // Reconsume the character\n }\n };\n /**\n * When we wait for one specific character, we can speed things up\n * by skipping through the buffer until we find it.\n *\n * @returns Whether the character was found.\n */\n Tokenizer.prototype.fastForwardTo = function (c) {\n while (++this.index < this.buffer.length + this.offset) {\n if (this.buffer.charCodeAt(this.index - this.offset) === c) {\n return true;\n }\n }\n /*\n * We increment the index at the end of the `parse` loop,\n * so set it to `buffer.length - 1` here.\n *\n * TODO: Refactor `parse` to increment index before calling states.\n */\n this.index = this.buffer.length + this.offset - 1;\n return false;\n };\n /**\n * Comments and CDATA end with `-->` and `]]>`.\n *\n * Their common qualities are:\n * - Their end sequences have a distinct character they start with.\n * - That character is then repeated, so we have to check multiple repeats.\n * - All characters but the start character of the sequence can be skipped.\n */\n Tokenizer.prototype.stateInCommentLike = function (c) {\n if (c === this.currentSequence[this.sequenceIndex]) {\n if (++this.sequenceIndex === this.currentSequence.length) {\n if (this.currentSequence === Sequences.CdataEnd) {\n this.cbs.oncdata(this.sectionStart, this.index, 2);\n }\n else {\n this.cbs.oncomment(this.sectionStart, this.index, 2);\n }\n this.sequenceIndex = 0;\n this.sectionStart = this.index + 1;\n this.state = State.Text;\n }\n }\n else if (this.sequenceIndex === 0) {\n // Fast-forward to the first character of the sequence\n if (this.fastForwardTo(this.currentSequence[0])) {\n this.sequenceIndex = 1;\n }\n }\n else if (c !== this.currentSequence[this.sequenceIndex - 1]) {\n // Allow long sequences, eg. --->, ]]]>\n this.sequenceIndex = 0;\n }\n };\n /**\n * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.\n *\n * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).\n * We allow anything that wouldn't end the tag.\n */\n Tokenizer.prototype.isTagStartChar = function (c) {\n return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c);\n };\n Tokenizer.prototype.startSpecial = function (sequence, offset) {\n this.isSpecial = true;\n this.currentSequence = sequence;\n this.sequenceIndex = offset;\n this.state = State.SpecialStartSequence;\n };\n Tokenizer.prototype.stateBeforeTagName = function (c) {\n if (c === CharCodes.ExclamationMark) {\n this.state = State.BeforeDeclaration;\n this.sectionStart = this.index + 1;\n }\n else if (c === CharCodes.Questionmark) {\n this.state = State.InProcessingInstruction;\n this.sectionStart = this.index + 1;\n }\n else if (this.isTagStartChar(c)) {\n var lower = c | 0x20;\n this.sectionStart = this.index;\n if (!this.xmlMode && lower === Sequences.TitleEnd[2]) {\n this.startSpecial(Sequences.TitleEnd, 3);\n }\n else {\n this.state =\n !this.xmlMode && lower === Sequences.ScriptEnd[2]\n ? State.BeforeSpecialS\n : State.InTagName;\n }\n }\n else if (c === CharCodes.Slash) {\n this.state = State.BeforeClosingTagName;\n }\n else {\n this.state = State.Text;\n this.stateText(c);\n }\n };\n Tokenizer.prototype.stateInTagName = function (c) {\n if (isEndOfTagSection(c)) {\n this.cbs.onopentagname(this.sectionStart, this.index);\n this.sectionStart = -1;\n this.state = State.BeforeAttributeName;\n this.stateBeforeAttributeName(c);\n }\n };\n Tokenizer.prototype.stateBeforeClosingTagName = function (c) {\n if (isWhitespace(c)) {\n // Ignore\n }\n else if (c === CharCodes.Gt) {\n this.state = State.Text;\n }\n else {\n this.state = this.isTagStartChar(c)\n ? State.InClosingTagName\n : State.InSpecialComment;\n this.sectionStart = this.index;\n }\n };\n Tokenizer.prototype.stateInClosingTagName = function (c) {\n if (c === CharCodes.Gt || isWhitespace(c)) {\n this.cbs.onclosetag(this.sectionStart, this.index);\n this.sectionStart = -1;\n this.state = State.AfterClosingTagName;\n this.stateAfterClosingTagName(c);\n }\n };\n Tokenizer.prototype.stateAfterClosingTagName = function (c) {\n // Skip everything until \">\"\n if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n this.state = State.Text;\n this.baseState = State.Text;\n this.sectionStart = this.index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeAttributeName = function (c) {\n if (c === CharCodes.Gt) {\n this.cbs.onopentagend(this.index);\n if (this.isSpecial) {\n this.state = State.InSpecialTag;\n this.sequenceIndex = 0;\n }\n else {\n this.state = State.Text;\n }\n this.baseState = this.state;\n this.sectionStart = this.index + 1;\n }\n else if (c === CharCodes.Slash) {\n this.state = State.InSelfClosingTag;\n }\n else if (!isWhitespace(c)) {\n this.state = State.InAttributeName;\n this.sectionStart = this.index;\n }\n };\n Tokenizer.prototype.stateInSelfClosingTag = function (c) {\n if (c === CharCodes.Gt) {\n this.cbs.onselfclosingtag(this.index);\n this.state = State.Text;\n this.baseState = State.Text;\n this.sectionStart = this.index + 1;\n this.isSpecial = false; // Reset special state, in case of self-closing special tags\n }\n else if (!isWhitespace(c)) {\n this.state = State.BeforeAttributeName;\n this.stateBeforeAttributeName(c);\n }\n };\n Tokenizer.prototype.stateInAttributeName = function (c) {\n if (c === CharCodes.Eq || isEndOfTagSection(c)) {\n this.cbs.onattribname(this.sectionStart, this.index);\n this.sectionStart = -1;\n this.state = State.AfterAttributeName;\n this.stateAfterAttributeName(c);\n }\n };\n Tokenizer.prototype.stateAfterAttributeName = function (c) {\n if (c === CharCodes.Eq) {\n this.state = State.BeforeAttributeValue;\n }\n else if (c === CharCodes.Slash || c === CharCodes.Gt) {\n this.cbs.onattribend(QuoteType.NoValue, this.index);\n this.state = State.BeforeAttributeName;\n this.stateBeforeAttributeName(c);\n }\n else if (!isWhitespace(c)) {\n this.cbs.onattribend(QuoteType.NoValue, this.index);\n this.state = State.InAttributeName;\n this.sectionStart = this.index;\n }\n };\n Tokenizer.prototype.stateBeforeAttributeValue = function (c) {\n if (c === CharCodes.DoubleQuote) {\n this.state = State.InAttributeValueDq;\n this.sectionStart = this.index + 1;\n }\n else if (c === CharCodes.SingleQuote) {\n this.state = State.InAttributeValueSq;\n this.sectionStart = this.index + 1;\n }\n else if (!isWhitespace(c)) {\n this.sectionStart = this.index;\n this.state = State.InAttributeValueNq;\n this.stateInAttributeValueNoQuotes(c); // Reconsume token\n }\n };\n Tokenizer.prototype.handleInAttributeValue = function (c, quote) {\n if (c === quote ||\n (!this.decodeEntities && this.fastForwardTo(quote))) {\n this.cbs.onattribdata(this.sectionStart, this.index);\n this.sectionStart = -1;\n this.cbs.onattribend(quote === CharCodes.DoubleQuote\n ? QuoteType.Double\n : QuoteType.Single, this.index);\n this.state = State.BeforeAttributeName;\n }\n else if (this.decodeEntities && c === CharCodes.Amp) {\n this.baseState = this.state;\n this.state = State.BeforeEntity;\n }\n };\n Tokenizer.prototype.stateInAttributeValueDoubleQuotes = function (c) {\n this.handleInAttributeValue(c, CharCodes.DoubleQuote);\n };\n Tokenizer.prototype.stateInAttributeValueSingleQuotes = function (c) {\n this.handleInAttributeValue(c, CharCodes.SingleQuote);\n };\n Tokenizer.prototype.stateInAttributeValueNoQuotes = function (c) {\n if (isWhitespace(c) || c === CharCodes.Gt) {\n this.cbs.onattribdata(this.sectionStart, this.index);\n this.sectionStart = -1;\n this.cbs.onattribend(QuoteType.Unquoted, this.index);\n this.state = State.BeforeAttributeName;\n this.stateBeforeAttributeName(c);\n }\n else if (this.decodeEntities && c === CharCodes.Amp) {\n this.baseState = this.state;\n this.state = State.BeforeEntity;\n }\n };\n Tokenizer.prototype.stateBeforeDeclaration = function (c) {\n if (c === CharCodes.OpeningSquareBracket) {\n this.state = State.CDATASequence;\n this.sequenceIndex = 0;\n }\n else {\n this.state =\n c === CharCodes.Dash\n ? State.BeforeComment\n : State.InDeclaration;\n }\n };\n Tokenizer.prototype.stateInDeclaration = function (c) {\n if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n this.cbs.ondeclaration(this.sectionStart, this.index);\n this.state = State.Text;\n this.sectionStart = this.index + 1;\n }\n };\n Tokenizer.prototype.stateInProcessingInstruction = function (c) {\n if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n this.cbs.onprocessinginstruction(this.sectionStart, this.index);\n this.state = State.Text;\n this.sectionStart = this.index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeComment = function (c) {\n if (c === CharCodes.Dash) {\n this.state = State.InCommentLike;\n this.currentSequence = Sequences.CommentEnd;\n // Allow short comments (eg. )\n this.sequenceIndex = 2;\n this.sectionStart = this.index + 1;\n }\n else {\n this.state = State.InDeclaration;\n }\n };\n Tokenizer.prototype.stateInSpecialComment = function (c) {\n if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n this.cbs.oncomment(this.sectionStart, this.index, 0);\n this.state = State.Text;\n this.sectionStart = this.index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeSpecialS = function (c) {\n var lower = c | 0x20;\n if (lower === Sequences.ScriptEnd[3]) {\n this.startSpecial(Sequences.ScriptEnd, 4);\n }\n else if (lower === Sequences.StyleEnd[3]) {\n this.startSpecial(Sequences.StyleEnd, 4);\n }\n else {\n this.state = State.InTagName;\n this.stateInTagName(c); // Consume the token again\n }\n };\n Tokenizer.prototype.stateBeforeEntity = function (c) {\n // Start excess with 1 to include the '&'\n this.entityExcess = 1;\n this.entityResult = 0;\n if (c === CharCodes.Number) {\n this.state = State.BeforeNumericEntity;\n }\n else if (c === CharCodes.Amp) {\n // We have two `&` characters in a row. Stay in the current state.\n }\n else {\n this.trieIndex = 0;\n this.trieCurrent = this.entityTrie[0];\n this.state = State.InNamedEntity;\n this.stateInNamedEntity(c);\n }\n };\n Tokenizer.prototype.stateInNamedEntity = function (c) {\n this.entityExcess += 1;\n this.trieIndex = (0, decode_js_1.determineBranch)(this.entityTrie, this.trieCurrent, this.trieIndex + 1, c);\n if (this.trieIndex < 0) {\n this.emitNamedEntity();\n this.index--;\n return;\n }\n this.trieCurrent = this.entityTrie[this.trieIndex];\n var masked = this.trieCurrent & decode_js_1.BinTrieFlags.VALUE_LENGTH;\n // If the branch is a value, store it and continue\n if (masked) {\n // The mask is the number of bytes of the value, including the current byte.\n var valueLength = (masked >> 14) - 1;\n // If we have a legacy entity while parsing strictly, just skip the number of bytes\n if (!this.allowLegacyEntity() && c !== CharCodes.Semi) {\n this.trieIndex += valueLength;\n }\n else {\n // Add 1 as we have already incremented the excess\n var entityStart = this.index - this.entityExcess + 1;\n if (entityStart > this.sectionStart) {\n this.emitPartial(this.sectionStart, entityStart);\n }\n // If this is a surrogate pair, consume the next two bytes\n this.entityResult = this.trieIndex;\n this.trieIndex += valueLength;\n this.entityExcess = 0;\n this.sectionStart = this.index + 1;\n if (valueLength === 0) {\n this.emitNamedEntity();\n }\n }\n }\n };\n Tokenizer.prototype.emitNamedEntity = function () {\n this.state = this.baseState;\n if (this.entityResult === 0) {\n return;\n }\n var valueLength = (this.entityTrie[this.entityResult] & decode_js_1.BinTrieFlags.VALUE_LENGTH) >>\n 14;\n switch (valueLength) {\n case 1: {\n this.emitCodePoint(this.entityTrie[this.entityResult] &\n ~decode_js_1.BinTrieFlags.VALUE_LENGTH);\n break;\n }\n case 2: {\n this.emitCodePoint(this.entityTrie[this.entityResult + 1]);\n break;\n }\n case 3: {\n this.emitCodePoint(this.entityTrie[this.entityResult + 1]);\n this.emitCodePoint(this.entityTrie[this.entityResult + 2]);\n }\n }\n };\n Tokenizer.prototype.stateBeforeNumericEntity = function (c) {\n if ((c | 0x20) === CharCodes.LowerX) {\n this.entityExcess++;\n this.state = State.InHexEntity;\n }\n else {\n this.state = State.InNumericEntity;\n this.stateInNumericEntity(c);\n }\n };\n Tokenizer.prototype.emitNumericEntity = function (strict) {\n var entityStart = this.index - this.entityExcess - 1;\n var numberStart = entityStart + 2 + Number(this.state === State.InHexEntity);\n if (numberStart !== this.index) {\n // Emit leading data if any\n if (entityStart > this.sectionStart) {\n this.emitPartial(this.sectionStart, entityStart);\n }\n this.sectionStart = this.index + Number(strict);\n this.emitCodePoint((0, decode_js_1.replaceCodePoint)(this.entityResult));\n }\n this.state = this.baseState;\n };\n Tokenizer.prototype.stateInNumericEntity = function (c) {\n if (c === CharCodes.Semi) {\n this.emitNumericEntity(true);\n }\n else if (isNumber(c)) {\n this.entityResult = this.entityResult * 10 + (c - CharCodes.Zero);\n this.entityExcess++;\n }\n else {\n if (this.allowLegacyEntity()) {\n this.emitNumericEntity(false);\n }\n else {\n this.state = this.baseState;\n }\n this.index--;\n }\n };\n Tokenizer.prototype.stateInHexEntity = function (c) {\n if (c === CharCodes.Semi) {\n this.emitNumericEntity(true);\n }\n else if (isNumber(c)) {\n this.entityResult = this.entityResult * 16 + (c - CharCodes.Zero);\n this.entityExcess++;\n }\n else if (isHexDigit(c)) {\n this.entityResult =\n this.entityResult * 16 + ((c | 0x20) - CharCodes.LowerA + 10);\n this.entityExcess++;\n }\n else {\n if (this.allowLegacyEntity()) {\n this.emitNumericEntity(false);\n }\n else {\n this.state = this.baseState;\n }\n this.index--;\n }\n };\n Tokenizer.prototype.allowLegacyEntity = function () {\n return (!this.xmlMode &&\n (this.baseState === State.Text ||\n this.baseState === State.InSpecialTag));\n };\n /**\n * Remove data that has already been consumed from the buffer.\n */\n Tokenizer.prototype.cleanup = function () {\n // If we are inside of text or attributes, emit what we already have.\n if (this.running && this.sectionStart !== this.index) {\n if (this.state === State.Text ||\n (this.state === State.InSpecialTag && this.sequenceIndex === 0)) {\n this.cbs.ontext(this.sectionStart, this.index);\n this.sectionStart = this.index;\n }\n else if (this.state === State.InAttributeValueDq ||\n this.state === State.InAttributeValueSq ||\n this.state === State.InAttributeValueNq) {\n this.cbs.onattribdata(this.sectionStart, this.index);\n this.sectionStart = this.index;\n }\n }\n };\n Tokenizer.prototype.shouldContinue = function () {\n return this.index < this.buffer.length + this.offset && this.running;\n };\n /**\n * Iterates through the buffer, calling the function corresponding to the current state.\n *\n * States that are more likely to be hit are higher up, as a performance improvement.\n */\n Tokenizer.prototype.parse = function () {\n while (this.shouldContinue()) {\n var c = this.buffer.charCodeAt(this.index - this.offset);\n switch (this.state) {\n case State.Text: {\n this.stateText(c);\n break;\n }\n case State.SpecialStartSequence: {\n this.stateSpecialStartSequence(c);\n break;\n }\n case State.InSpecialTag: {\n this.stateInSpecialTag(c);\n break;\n }\n case State.CDATASequence: {\n this.stateCDATASequence(c);\n break;\n }\n case State.InAttributeValueDq: {\n this.stateInAttributeValueDoubleQuotes(c);\n break;\n }\n case State.InAttributeName: {\n this.stateInAttributeName(c);\n break;\n }\n case State.InCommentLike: {\n this.stateInCommentLike(c);\n break;\n }\n case State.InSpecialComment: {\n this.stateInSpecialComment(c);\n break;\n }\n case State.BeforeAttributeName: {\n this.stateBeforeAttributeName(c);\n break;\n }\n case State.InTagName: {\n this.stateInTagName(c);\n break;\n }\n case State.InClosingTagName: {\n this.stateInClosingTagName(c);\n break;\n }\n case State.BeforeTagName: {\n this.stateBeforeTagName(c);\n break;\n }\n case State.AfterAttributeName: {\n this.stateAfterAttributeName(c);\n break;\n }\n case State.InAttributeValueSq: {\n this.stateInAttributeValueSingleQuotes(c);\n break;\n }\n case State.BeforeAttributeValue: {\n this.stateBeforeAttributeValue(c);\n break;\n }\n case State.BeforeClosingTagName: {\n this.stateBeforeClosingTagName(c);\n break;\n }\n case State.AfterClosingTagName: {\n this.stateAfterClosingTagName(c);\n break;\n }\n case State.BeforeSpecialS: {\n this.stateBeforeSpecialS(c);\n break;\n }\n case State.InAttributeValueNq: {\n this.stateInAttributeValueNoQuotes(c);\n break;\n }\n case State.InSelfClosingTag: {\n this.stateInSelfClosingTag(c);\n break;\n }\n case State.InDeclaration: {\n this.stateInDeclaration(c);\n break;\n }\n case State.BeforeDeclaration: {\n this.stateBeforeDeclaration(c);\n break;\n }\n case State.BeforeComment: {\n this.stateBeforeComment(c);\n break;\n }\n case State.InProcessingInstruction: {\n this.stateInProcessingInstruction(c);\n break;\n }\n case State.InNamedEntity: {\n this.stateInNamedEntity(c);\n break;\n }\n case State.BeforeEntity: {\n this.stateBeforeEntity(c);\n break;\n }\n case State.InHexEntity: {\n this.stateInHexEntity(c);\n break;\n }\n case State.InNumericEntity: {\n this.stateInNumericEntity(c);\n break;\n }\n default: {\n // `this._state === State.BeforeNumericEntity`\n this.stateBeforeNumericEntity(c);\n }\n }\n this.index++;\n }\n this.cleanup();\n };\n Tokenizer.prototype.finish = function () {\n if (this.state === State.InNamedEntity) {\n this.emitNamedEntity();\n }\n // If there is remaining data, emit it in a reasonable way\n if (this.sectionStart < this.index) {\n this.handleTrailingData();\n }\n this.cbs.onend();\n };\n /** Handle any trailing data. */\n Tokenizer.prototype.handleTrailingData = function () {\n var endIndex = this.buffer.length + this.offset;\n if (this.state === State.InCommentLike) {\n if (this.currentSequence === Sequences.CdataEnd) {\n this.cbs.oncdata(this.sectionStart, endIndex, 0);\n }\n else {\n this.cbs.oncomment(this.sectionStart, endIndex, 0);\n }\n }\n else if (this.state === State.InNumericEntity &&\n this.allowLegacyEntity()) {\n this.emitNumericEntity(false);\n // All trailing data will have been consumed\n }\n else if (this.state === State.InHexEntity &&\n this.allowLegacyEntity()) {\n this.emitNumericEntity(false);\n // All trailing data will have been consumed\n }\n else if (this.state === State.InTagName ||\n this.state === State.BeforeAttributeName ||\n this.state === State.BeforeAttributeValue ||\n this.state === State.AfterAttributeName ||\n this.state === State.InAttributeName ||\n this.state === State.InAttributeValueSq ||\n this.state === State.InAttributeValueDq ||\n this.state === State.InAttributeValueNq ||\n this.state === State.InClosingTagName) {\n /*\n * If we are currently in an opening or closing tag, us not calling the\n * respective callback signals that the tag should be ignored.\n */\n }\n else {\n this.cbs.ontext(this.sectionStart, endIndex);\n }\n };\n Tokenizer.prototype.emitPartial = function (start, endIndex) {\n if (this.baseState !== State.Text &&\n this.baseState !== State.InSpecialTag) {\n this.cbs.onattribdata(start, endIndex);\n }\n else {\n this.cbs.ontext(start, endIndex);\n }\n };\n Tokenizer.prototype.emitCodePoint = function (cp) {\n if (this.baseState !== State.Text &&\n this.baseState !== State.InSpecialTag) {\n this.cbs.onattribentity(cp);\n }\n else {\n this.cbs.ontextentity(cp);\n }\n };\n return Tokenizer;\n}());\nexports.default = Tokenizer;\n//# sourceMappingURL=Tokenizer.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DomUtils = exports.parseFeed = exports.getFeed = exports.ElementType = exports.Tokenizer = exports.createDomStream = exports.parseDOM = exports.parseDocument = exports.DefaultHandler = exports.DomHandler = exports.Parser = void 0;\nvar Parser_js_1 = require(\"./Parser.js\");\nvar Parser_js_2 = require(\"./Parser.js\");\nObject.defineProperty(exports, \"Parser\", { enumerable: true, get: function () { return Parser_js_2.Parser; } });\nvar domhandler_1 = require(\"domhandler\");\nvar domhandler_2 = require(\"domhandler\");\nObject.defineProperty(exports, \"DomHandler\", { enumerable: true, get: function () { return domhandler_2.DomHandler; } });\n// Old name for DomHandler\nObject.defineProperty(exports, \"DefaultHandler\", { enumerable: true, get: function () { return domhandler_2.DomHandler; } });\n// Helper methods\n/**\n * Parses the data, returns the resulting document.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM builder.\n */\nfunction parseDocument(data, options) {\n var handler = new domhandler_1.DomHandler(undefined, options);\n new Parser_js_1.Parser(handler, options).end(data);\n return handler.root;\n}\nexports.parseDocument = parseDocument;\n/**\n * Parses data, returns an array of the root nodes.\n *\n * Note that the root nodes still have a `Document` node as their parent.\n * Use `parseDocument` to get the `Document` node instead.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM builder.\n * @deprecated Use `parseDocument` instead.\n */\nfunction parseDOM(data, options) {\n return parseDocument(data, options).children;\n}\nexports.parseDOM = parseDOM;\n/**\n * Creates a parser instance, with an attached DOM handler.\n *\n * @param callback A callback that will be called once parsing has been completed.\n * @param options Optional options for the parser and DOM builder.\n * @param elementCallback An optional callback that will be called every time a tag has been completed inside of the DOM.\n */\nfunction createDomStream(callback, options, elementCallback) {\n var handler = new domhandler_1.DomHandler(callback, options, elementCallback);\n return new Parser_js_1.Parser(handler, options);\n}\nexports.createDomStream = createDomStream;\nvar Tokenizer_js_1 = require(\"./Tokenizer.js\");\nObject.defineProperty(exports, \"Tokenizer\", { enumerable: true, get: function () { return __importDefault(Tokenizer_js_1).default; } });\n/*\n * All of the following exports exist for backwards-compatibility.\n * They should probably be removed eventually.\n */\nexports.ElementType = __importStar(require(\"domelementtype\"));\nvar domutils_1 = require(\"domutils\");\nvar domutils_2 = require(\"domutils\");\nObject.defineProperty(exports, \"getFeed\", { enumerable: true, get: function () { return domutils_2.getFeed; } });\nvar parseFeedDefaultOptions = { xmlMode: true };\n/**\n * Parse a feed.\n *\n * @param feed The feed that should be parsed, as a string.\n * @param options Optionally, options for parsing. When using this, you should set `xmlMode` to `true`.\n */\nfunction parseFeed(feed, options) {\n if (options === void 0) { options = parseFeedDefaultOptions; }\n return (0, domutils_1.getFeed)(parseDOM(feed, options));\n}\nexports.parseFeed = parseFeed;\nexports.DomUtils = __importStar(require(\"domutils\"));\n//# sourceMappingURL=index.js.map","'use strict'\n\nvar COMPATIBLE_ENCODING_PATTERN = /^utf-?8|ascii|utf-?16-?le|ucs-?2|base-?64|latin-?1$/i\nvar WS_TRIM_PATTERN = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g\nvar WS_CHAR_PATTERN = /\\s|\\uFEFF|\\xA0/\nvar WS_FOLD_PATTERN = /\\r?\\n[\\x20\\x09]+/g\nvar DELIMITER_PATTERN = /[;,\"]/\nvar WS_DELIMITER_PATTERN = /[;,\"]|\\s/\n\n/**\n * Token character pattern\n * @type {RegExp}\n * @see https://tools.ietf.org/html/rfc7230#section-3.2.6\n */\nvar TOKEN_PATTERN = /^[!#$%&'*+\\-\\.^_`|~\\da-zA-Z]+$/\n\nvar STATE = {\n IDLE: 1 << 0,\n URI: 1 << 1,\n ATTR: 1 << 2,\n}\n\nfunction trim( value ) {\n return value.replace( WS_TRIM_PATTERN, '' )\n}\n\nfunction hasWhitespace( value ) {\n return WS_CHAR_PATTERN.test( value )\n}\n\nfunction skipWhitespace( value, offset ) {\n while( hasWhitespace( value[offset] ) ) {\n offset++\n }\n return offset\n}\n\nfunction needsQuotes( value ) {\n return WS_DELIMITER_PATTERN.test( value ) ||\n !TOKEN_PATTERN.test( value )\n}\n\n/**\n * Shallow compares two objects to check if their properties match.\n * @param {object} object1 First object to compare.\n * @param {object} object2 Second object to compare.\n * @returns {boolean} Do the objects have matching properties.\n */\nfunction shallowCompareObjects( object1, object2 ) {\n return (\n Object.keys( object1 ).length === Object.keys( object2 ).length &&\n Object.keys( object1 ).every(\n ( key ) => key in object2 && object1[ key ] === object2[ key ]\n )\n );\n}\n\nclass Link {\n\n /**\n * Link\n * @constructor\n * @param {String} [value]\n * @returns {Link}\n */\n constructor( value ) {\n\n /** @type {Array} URI references */\n this.refs = []\n\n if( value ) {\n this.parse( value )\n }\n\n }\n\n /**\n * Get refs with given relation type\n * @param {String} value\n * @returns {Array}\n */\n rel( value ) {\n\n var links = []\n var type = value.toLowerCase()\n\n for( var i = 0; i < this.refs.length; i++ ) {\n if( typeof this.refs[ i ].rel === 'string' && this.refs[ i ].rel.toLowerCase() === type ) {\n links.push( this.refs[ i ] )\n }\n }\n\n return links\n\n }\n\n /**\n * Get refs where given attribute has a given value\n * @param {String} attr\n * @param {String} value\n * @returns {Array}\n */\n get( attr, value ) {\n\n attr = attr.toLowerCase()\n value = value.toLowerCase()\n\n var links = []\n\n for( var i = 0; i < this.refs.length; i++ ) {\n if( typeof this.refs[ i ][ attr ] === 'string' && this.refs[ i ][ attr ].toLowerCase() === value ) {\n links.push( this.refs[ i ] )\n }\n }\n\n return links\n\n }\n\n /** Sets a reference. */\n set( link ) {\n this.refs.push( link )\n return this\n }\n\n /**\n * Sets a reference if a reference with similar properties isn’t already set.\n */\n setUnique( link ) {\n\n if( !this.refs.some(( ref ) => shallowCompareObjects( ref, link )) ) {\n this.refs.push( link )\n }\n\n return this\n\n }\n\n has( attr, value ) {\n\n attr = attr.toLowerCase()\n value = value.toLowerCase()\n\n for( var i = 0; i < this.refs.length; i++ ) {\n if( typeof this.refs[ i ][ attr ] === 'string' && this.refs[ i ][ attr ].toLowerCase() === value ) {\n return true\n }\n }\n\n return false\n\n }\n\n parse( value, offset ) {\n\n offset = offset || 0\n value = offset ? value.slice( offset ) : value\n\n // Trim & unfold folded lines\n value = trim( value ).replace( WS_FOLD_PATTERN, '' )\n\n var state = STATE.IDLE\n var length = value.length\n var offset = 0\n var ref = null\n\n while( offset < length ) {\n if( state === STATE.IDLE ) {\n if( hasWhitespace( value[offset] ) ) {\n offset++\n continue\n } else if( value[offset] === '<' ) {\n if( ref != null ) {\n ref.rel != null ?\n this.refs.push( ...Link.expandRelations( ref ) ) :\n this.refs.push( ref )\n }\n var end = value.indexOf( '>', offset )\n if( end === -1 ) throw new Error( 'Expected end of URI delimiter at offset ' + offset )\n ref = { uri: value.slice( offset + 1, end ) }\n // this.refs.push( ref )\n offset = end\n state = STATE.URI\n } else {\n throw new Error( 'Unexpected character \"' + value[offset] + '\" at offset ' + offset )\n }\n offset++\n } else if( state === STATE.URI ) {\n if( hasWhitespace( value[offset] ) ) {\n offset++\n continue\n } else if( value[offset] === ';' ) {\n state = STATE.ATTR\n offset++\n } else if( value[offset] === ',' ) {\n state = STATE.IDLE\n offset++\n } else {\n throw new Error( 'Unexpected character \"' + value[offset] + '\" at offset ' + offset )\n }\n } else if( state === STATE.ATTR ) {\n if( value[offset] ===';' || hasWhitespace( value[offset] ) ) {\n offset++\n continue\n }\n var end = value.indexOf( '=', offset )\n if( end === -1 ) end = value.indexOf( ';', offset )\n if( end === -1 ) end = value.length\n var attr = trim( value.slice( offset, end ) ).toLowerCase()\n var attrValue = ''\n offset = end + 1\n offset = skipWhitespace( value, offset )\n if( value[offset] === '\"' ) {\n offset++\n while( offset < length ) {\n if( value[offset] === '\"' ) {\n offset++; break\n }\n if( value[offset] === '\\\\' ) {\n offset++\n }\n attrValue += value[offset]\n offset++\n }\n } else {\n var end = offset + 1\n while( !DELIMITER_PATTERN.test( value[end] ) && end < length ) {\n end++\n }\n attrValue = value.slice( offset, end )\n offset = end\n }\n if( ref[ attr ] && Link.isSingleOccurenceAttr( attr ) ) {\n // Ignore multiples of attributes which may only appear once\n } else if( attr[ attr.length - 1 ] === '*' ) {\n ref[ attr ] = Link.parseExtendedValue( attrValue )\n } else {\n attrValue = attr === 'type' ?\n attrValue.toLowerCase() : attrValue\n if( ref[ attr ] != null ) {\n if( Array.isArray( ref[ attr ] ) ) {\n ref[ attr ].push( attrValue )\n } else {\n ref[ attr ] = [ ref[ attr ], attrValue ]\n }\n } else {\n ref[ attr ] = attrValue\n }\n }\n switch( value[offset] ) {\n case ',': state = STATE.IDLE; break\n case ';': state = STATE.ATTR; break\n }\n offset++\n } else {\n throw new Error( 'Unknown parser state \"' + state + '\"' )\n }\n }\n\n if( ref != null ) {\n ref.rel != null ?\n this.refs.push( ...Link.expandRelations( ref ) ) :\n this.refs.push( ref )\n }\n\n ref = null\n\n return this\n\n }\n\n toString() {\n\n var refs = []\n var link = ''\n var ref = null\n\n for( var i = 0; i < this.refs.length; i++ ) {\n ref = this.refs[i]\n link = Object.keys( this.refs[i] ).reduce( function( link, attr ) {\n if( attr === 'uri' ) return link\n return link + '; ' + Link.formatAttribute( attr, ref[ attr ] )\n }, '<' + ref.uri + '>' )\n refs.push( link )\n }\n\n return refs.join( ', ' )\n\n }\n\n}\n\n/**\n * Determines whether an encoding can be\n * natively handled with a `Buffer`\n * @param {String} value\n * @returns {Boolean}\n */\nLink.isCompatibleEncoding = function( value ) {\n return COMPATIBLE_ENCODING_PATTERN.test( value )\n}\n\nLink.parse = function( value, offset ) {\n return new Link().parse( value, offset )\n}\n\nLink.isSingleOccurenceAttr = function( attr ) {\n return attr === 'rel' || attr === 'type' || attr === 'media' ||\n attr === 'title' || attr === 'title*'\n}\n\nLink.isTokenAttr = function( attr ) {\n return attr === 'rel' || attr === 'type' || attr === 'anchor'\n}\n\nLink.escapeQuotes = function( value ) {\n return value.replace( /\"/g, '\\\\\"' )\n}\n\nLink.expandRelations = function( ref ) {\n var rels = ref.rel.split( ' ' )\n return rels.map( function( rel ) {\n var value = Object.assign( {}, ref )\n value.rel = rel\n return value\n })\n}\n\n/**\n * Parses an extended value and attempts to decode it\n * @internal\n * @param {String} value\n * @return {Object}\n */\nLink.parseExtendedValue = function( value ) {\n var parts = /([^']+)?(?:'([^']*)')?(.+)/.exec( value )\n return {\n language: parts[2].toLowerCase(),\n encoding: Link.isCompatibleEncoding( parts[1] ) ?\n null : parts[1].toLowerCase(),\n value: Link.isCompatibleEncoding( parts[1] ) ?\n decodeURIComponent( parts[3] ) : parts[3]\n }\n}\n\n/**\n * Format a given extended attribute and it's value\n * @param {String} attr\n * @param {Object} data\n * @return {String}\n */\nLink.formatExtendedAttribute = function( attr, data ) {\n\n var encoding = ( data.encoding || 'utf-8' ).toUpperCase()\n var language = data.language || 'en'\n\n var encodedValue = ''\n\n if( Buffer.isBuffer( data.value ) && Link.isCompatibleEncoding( encoding ) ) {\n encodedValue = data.value.toString( encoding )\n } else if( Buffer.isBuffer( data.value ) ) {\n encodedValue = data.value.toString( 'hex' )\n .replace( /[0-9a-f]{2}/gi, '%$1' )\n } else {\n encodedValue = encodeURIComponent( data.value )\n }\n\n return attr + '=' + encoding + '\\'' +\n language + '\\'' + encodedValue\n\n}\n\n/**\n * Format a given attribute and it's value\n * @param {String} attr\n * @param {String|Object} value\n * @return {String}\n */\nLink.formatAttribute = function( attr, value ) {\n\n if( Array.isArray( value ) ) {\n return value.map(( item ) => {\n return Link.formatAttribute( attr, item )\n }).join( '; ' )\n }\n\n if( attr[ attr.length - 1 ] === '*' || typeof value !== 'string' ) {\n return Link.formatExtendedAttribute( attr, value )\n }\n\n if( Link.isTokenAttr( attr ) ) {\n value = needsQuotes( value ) ?\n '\"' + Link.escapeQuotes( value ) + '\"' :\n Link.escapeQuotes( value )\n } else if( needsQuotes( value ) ) {\n value = encodeURIComponent( value )\n // We don't need to escape <,> <;> within quotes\n value = value\n .replace( /%20/g, ' ' )\n .replace( /%2C/g, ',' )\n .replace( /%3B/g, ';' )\n\n value = '\"' + value + '\"'\n }\n\n return attr + '=' + value\n\n}\n\nmodule.exports = Link\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","/**\n * MIT License\n * \n * Copyright (c) 2014-present, Lee Byron and other contributors.\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar DELETE = 'delete';\n\n// Constants describing the size of trie nodes.\nvar SHIFT = 5; // Resulted in best performance after ______?\nvar SIZE = 1 << SHIFT;\nvar MASK = SIZE - 1;\n\n// A consistent shared value representing \"not set\" which equals nothing other\n// than itself, and nothing that could be provided externally.\nvar NOT_SET = {};\n\n// Boolean references, Rough equivalent of `bool &`.\nfunction MakeRef() {\n return { value: false };\n}\n\nfunction SetRef(ref) {\n if (ref) {\n ref.value = true;\n }\n}\n\n// A function which returns a value representing an \"owner\" for transient writes\n// to tries. The return value will only ever equal itself, and will not equal\n// the return of any subsequent call of this function.\nfunction OwnerID() {}\n\nfunction ensureSize(iter) {\n if (iter.size === undefined) {\n iter.size = iter.__iterate(returnTrue);\n }\n return iter.size;\n}\n\nfunction wrapIndex(iter, index) {\n // This implements \"is array index\" which the ECMAString spec defines as:\n //\n // A String property name P is an array index if and only if\n // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal\n // to 2^32−1.\n //\n // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects\n if (typeof index !== 'number') {\n var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32\n if ('' + uint32Index !== index || uint32Index === 4294967295) {\n return NaN;\n }\n index = uint32Index;\n }\n return index < 0 ? ensureSize(iter) + index : index;\n}\n\nfunction returnTrue() {\n return true;\n}\n\nfunction wholeSlice(begin, end, size) {\n return (\n ((begin === 0 && !isNeg(begin)) ||\n (size !== undefined && begin <= -size)) &&\n (end === undefined || (size !== undefined && end >= size))\n );\n}\n\nfunction resolveBegin(begin, size) {\n return resolveIndex(begin, size, 0);\n}\n\nfunction resolveEnd(end, size) {\n return resolveIndex(end, size, size);\n}\n\nfunction resolveIndex(index, size, defaultIndex) {\n // Sanitize indices using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n return index === undefined\n ? defaultIndex\n : isNeg(index)\n ? size === Infinity\n ? size\n : Math.max(0, size + index) | 0\n : size === undefined || size === index\n ? index\n : Math.min(size, index) | 0;\n}\n\nfunction isNeg(value) {\n // Account for -0 which is negative, but not less than 0.\n return value < 0 || (value === 0 && 1 / value === -Infinity);\n}\n\nvar IS_COLLECTION_SYMBOL = '@@__IMMUTABLE_ITERABLE__@@';\n\nfunction isCollection(maybeCollection) {\n return Boolean(maybeCollection && maybeCollection[IS_COLLECTION_SYMBOL]);\n}\n\nvar IS_KEYED_SYMBOL = '@@__IMMUTABLE_KEYED__@@';\n\nfunction isKeyed(maybeKeyed) {\n return Boolean(maybeKeyed && maybeKeyed[IS_KEYED_SYMBOL]);\n}\n\nvar IS_INDEXED_SYMBOL = '@@__IMMUTABLE_INDEXED__@@';\n\nfunction isIndexed(maybeIndexed) {\n return Boolean(maybeIndexed && maybeIndexed[IS_INDEXED_SYMBOL]);\n}\n\nfunction isAssociative(maybeAssociative) {\n return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n}\n\nvar Collection = function Collection(value) {\n return isCollection(value) ? value : Seq(value);\n};\n\nvar KeyedCollection = /*@__PURE__*/(function (Collection) {\n function KeyedCollection(value) {\n return isKeyed(value) ? value : KeyedSeq(value);\n }\n\n if ( Collection ) KeyedCollection.__proto__ = Collection;\n KeyedCollection.prototype = Object.create( Collection && Collection.prototype );\n KeyedCollection.prototype.constructor = KeyedCollection;\n\n return KeyedCollection;\n}(Collection));\n\nvar IndexedCollection = /*@__PURE__*/(function (Collection) {\n function IndexedCollection(value) {\n return isIndexed(value) ? value : IndexedSeq(value);\n }\n\n if ( Collection ) IndexedCollection.__proto__ = Collection;\n IndexedCollection.prototype = Object.create( Collection && Collection.prototype );\n IndexedCollection.prototype.constructor = IndexedCollection;\n\n return IndexedCollection;\n}(Collection));\n\nvar SetCollection = /*@__PURE__*/(function (Collection) {\n function SetCollection(value) {\n return isCollection(value) && !isAssociative(value) ? value : SetSeq(value);\n }\n\n if ( Collection ) SetCollection.__proto__ = Collection;\n SetCollection.prototype = Object.create( Collection && Collection.prototype );\n SetCollection.prototype.constructor = SetCollection;\n\n return SetCollection;\n}(Collection));\n\nCollection.Keyed = KeyedCollection;\nCollection.Indexed = IndexedCollection;\nCollection.Set = SetCollection;\n\nvar IS_SEQ_SYMBOL = '@@__IMMUTABLE_SEQ__@@';\n\nfunction isSeq(maybeSeq) {\n return Boolean(maybeSeq && maybeSeq[IS_SEQ_SYMBOL]);\n}\n\nvar IS_RECORD_SYMBOL = '@@__IMMUTABLE_RECORD__@@';\n\nfunction isRecord(maybeRecord) {\n return Boolean(maybeRecord && maybeRecord[IS_RECORD_SYMBOL]);\n}\n\nfunction isImmutable(maybeImmutable) {\n return isCollection(maybeImmutable) || isRecord(maybeImmutable);\n}\n\nvar IS_ORDERED_SYMBOL = '@@__IMMUTABLE_ORDERED__@@';\n\nfunction isOrdered(maybeOrdered) {\n return Boolean(maybeOrdered && maybeOrdered[IS_ORDERED_SYMBOL]);\n}\n\nvar ITERATE_KEYS = 0;\nvar ITERATE_VALUES = 1;\nvar ITERATE_ENTRIES = 2;\n\nvar REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\n\nvar ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n\nvar Iterator = function Iterator(next) {\n this.next = next;\n};\n\nIterator.prototype.toString = function toString () {\n return '[Iterator]';\n};\n\nIterator.KEYS = ITERATE_KEYS;\nIterator.VALUES = ITERATE_VALUES;\nIterator.ENTRIES = ITERATE_ENTRIES;\n\nIterator.prototype.inspect = Iterator.prototype.toSource = function () {\n return this.toString();\n};\nIterator.prototype[ITERATOR_SYMBOL] = function () {\n return this;\n};\n\nfunction iteratorValue(type, k, v, iteratorResult) {\n var value = type === 0 ? k : type === 1 ? v : [k, v];\n iteratorResult\n ? (iteratorResult.value = value)\n : (iteratorResult = {\n value: value,\n done: false,\n });\n return iteratorResult;\n}\n\nfunction iteratorDone() {\n return { value: undefined, done: true };\n}\n\nfunction hasIterator(maybeIterable) {\n if (Array.isArray(maybeIterable)) {\n // IE11 trick as it does not support `Symbol.iterator`\n return true;\n }\n\n return !!getIteratorFn(maybeIterable);\n}\n\nfunction isIterator(maybeIterator) {\n return maybeIterator && typeof maybeIterator.next === 'function';\n}\n\nfunction getIterator(iterable) {\n var iteratorFn = getIteratorFn(iterable);\n return iteratorFn && iteratorFn.call(iterable);\n}\n\nfunction getIteratorFn(iterable) {\n var iteratorFn =\n iterable &&\n ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||\n iterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n}\n\nfunction isEntriesIterable(maybeIterable) {\n var iteratorFn = getIteratorFn(maybeIterable);\n return iteratorFn && iteratorFn === maybeIterable.entries;\n}\n\nfunction isKeysIterable(maybeIterable) {\n var iteratorFn = getIteratorFn(maybeIterable);\n return iteratorFn && iteratorFn === maybeIterable.keys;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction isArrayLike(value) {\n if (Array.isArray(value) || typeof value === 'string') {\n return true;\n }\n\n return (\n value &&\n typeof value === 'object' &&\n Number.isInteger(value.length) &&\n value.length >= 0 &&\n (value.length === 0\n ? // Only {length: 0} is considered Array-like.\n Object.keys(value).length === 1\n : // An object is only Array-like if it has a property where the last value\n // in the array-like may be found (which could be undefined).\n value.hasOwnProperty(value.length - 1))\n );\n}\n\nvar Seq = /*@__PURE__*/(function (Collection) {\n function Seq(value) {\n return value === undefined || value === null\n ? emptySequence()\n : isImmutable(value)\n ? value.toSeq()\n : seqFromValue(value);\n }\n\n if ( Collection ) Seq.__proto__ = Collection;\n Seq.prototype = Object.create( Collection && Collection.prototype );\n Seq.prototype.constructor = Seq;\n\n Seq.prototype.toSeq = function toSeq () {\n return this;\n };\n\n Seq.prototype.toString = function toString () {\n return this.__toString('Seq {', '}');\n };\n\n Seq.prototype.cacheResult = function cacheResult () {\n if (!this._cache && this.__iterateUncached) {\n this._cache = this.entrySeq().toArray();\n this.size = this._cache.length;\n }\n return this;\n };\n\n // abstract __iterateUncached(fn, reverse)\n\n Seq.prototype.__iterate = function __iterate (fn, reverse) {\n var cache = this._cache;\n if (cache) {\n var size = cache.length;\n var i = 0;\n while (i !== size) {\n var entry = cache[reverse ? size - ++i : i++];\n if (fn(entry[1], entry[0], this) === false) {\n break;\n }\n }\n return i;\n }\n return this.__iterateUncached(fn, reverse);\n };\n\n // abstract __iteratorUncached(type, reverse)\n\n Seq.prototype.__iterator = function __iterator (type, reverse) {\n var cache = this._cache;\n if (cache) {\n var size = cache.length;\n var i = 0;\n return new Iterator(function () {\n if (i === size) {\n return iteratorDone();\n }\n var entry = cache[reverse ? size - ++i : i++];\n return iteratorValue(type, entry[0], entry[1]);\n });\n }\n return this.__iteratorUncached(type, reverse);\n };\n\n return Seq;\n}(Collection));\n\nvar KeyedSeq = /*@__PURE__*/(function (Seq) {\n function KeyedSeq(value) {\n return value === undefined || value === null\n ? emptySequence().toKeyedSeq()\n : isCollection(value)\n ? isKeyed(value)\n ? value.toSeq()\n : value.fromEntrySeq()\n : isRecord(value)\n ? value.toSeq()\n : keyedSeqFromValue(value);\n }\n\n if ( Seq ) KeyedSeq.__proto__ = Seq;\n KeyedSeq.prototype = Object.create( Seq && Seq.prototype );\n KeyedSeq.prototype.constructor = KeyedSeq;\n\n KeyedSeq.prototype.toKeyedSeq = function toKeyedSeq () {\n return this;\n };\n\n return KeyedSeq;\n}(Seq));\n\nvar IndexedSeq = /*@__PURE__*/(function (Seq) {\n function IndexedSeq(value) {\n return value === undefined || value === null\n ? emptySequence()\n : isCollection(value)\n ? isKeyed(value)\n ? value.entrySeq()\n : value.toIndexedSeq()\n : isRecord(value)\n ? value.toSeq().entrySeq()\n : indexedSeqFromValue(value);\n }\n\n if ( Seq ) IndexedSeq.__proto__ = Seq;\n IndexedSeq.prototype = Object.create( Seq && Seq.prototype );\n IndexedSeq.prototype.constructor = IndexedSeq;\n\n IndexedSeq.of = function of (/*...values*/) {\n return IndexedSeq(arguments);\n };\n\n IndexedSeq.prototype.toIndexedSeq = function toIndexedSeq () {\n return this;\n };\n\n IndexedSeq.prototype.toString = function toString () {\n return this.__toString('Seq [', ']');\n };\n\n return IndexedSeq;\n}(Seq));\n\nvar SetSeq = /*@__PURE__*/(function (Seq) {\n function SetSeq(value) {\n return (\n isCollection(value) && !isAssociative(value) ? value : IndexedSeq(value)\n ).toSetSeq();\n }\n\n if ( Seq ) SetSeq.__proto__ = Seq;\n SetSeq.prototype = Object.create( Seq && Seq.prototype );\n SetSeq.prototype.constructor = SetSeq;\n\n SetSeq.of = function of (/*...values*/) {\n return SetSeq(arguments);\n };\n\n SetSeq.prototype.toSetSeq = function toSetSeq () {\n return this;\n };\n\n return SetSeq;\n}(Seq));\n\nSeq.isSeq = isSeq;\nSeq.Keyed = KeyedSeq;\nSeq.Set = SetSeq;\nSeq.Indexed = IndexedSeq;\n\nSeq.prototype[IS_SEQ_SYMBOL] = true;\n\n// #pragma Root Sequences\n\nvar ArraySeq = /*@__PURE__*/(function (IndexedSeq) {\n function ArraySeq(array) {\n this._array = array;\n this.size = array.length;\n }\n\n if ( IndexedSeq ) ArraySeq.__proto__ = IndexedSeq;\n ArraySeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );\n ArraySeq.prototype.constructor = ArraySeq;\n\n ArraySeq.prototype.get = function get (index, notSetValue) {\n return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n };\n\n ArraySeq.prototype.__iterate = function __iterate (fn, reverse) {\n var array = this._array;\n var size = array.length;\n var i = 0;\n while (i !== size) {\n var ii = reverse ? size - ++i : i++;\n if (fn(array[ii], ii, this) === false) {\n break;\n }\n }\n return i;\n };\n\n ArraySeq.prototype.__iterator = function __iterator (type, reverse) {\n var array = this._array;\n var size = array.length;\n var i = 0;\n return new Iterator(function () {\n if (i === size) {\n return iteratorDone();\n }\n var ii = reverse ? size - ++i : i++;\n return iteratorValue(type, ii, array[ii]);\n });\n };\n\n return ArraySeq;\n}(IndexedSeq));\n\nvar ObjectSeq = /*@__PURE__*/(function (KeyedSeq) {\n function ObjectSeq(object) {\n var keys = Object.keys(object).concat(\n Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : []\n );\n this._object = object;\n this._keys = keys;\n this.size = keys.length;\n }\n\n if ( KeyedSeq ) ObjectSeq.__proto__ = KeyedSeq;\n ObjectSeq.prototype = Object.create( KeyedSeq && KeyedSeq.prototype );\n ObjectSeq.prototype.constructor = ObjectSeq;\n\n ObjectSeq.prototype.get = function get (key, notSetValue) {\n if (notSetValue !== undefined && !this.has(key)) {\n return notSetValue;\n }\n return this._object[key];\n };\n\n ObjectSeq.prototype.has = function has (key) {\n return hasOwnProperty.call(this._object, key);\n };\n\n ObjectSeq.prototype.__iterate = function __iterate (fn, reverse) {\n var object = this._object;\n var keys = this._keys;\n var size = keys.length;\n var i = 0;\n while (i !== size) {\n var key = keys[reverse ? size - ++i : i++];\n if (fn(object[key], key, this) === false) {\n break;\n }\n }\n return i;\n };\n\n ObjectSeq.prototype.__iterator = function __iterator (type, reverse) {\n var object = this._object;\n var keys = this._keys;\n var size = keys.length;\n var i = 0;\n return new Iterator(function () {\n if (i === size) {\n return iteratorDone();\n }\n var key = keys[reverse ? size - ++i : i++];\n return iteratorValue(type, key, object[key]);\n });\n };\n\n return ObjectSeq;\n}(KeyedSeq));\nObjectSeq.prototype[IS_ORDERED_SYMBOL] = true;\n\nvar CollectionSeq = /*@__PURE__*/(function (IndexedSeq) {\n function CollectionSeq(collection) {\n this._collection = collection;\n this.size = collection.length || collection.size;\n }\n\n if ( IndexedSeq ) CollectionSeq.__proto__ = IndexedSeq;\n CollectionSeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );\n CollectionSeq.prototype.constructor = CollectionSeq;\n\n CollectionSeq.prototype.__iterateUncached = function __iterateUncached (fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var collection = this._collection;\n var iterator = getIterator(collection);\n var iterations = 0;\n if (isIterator(iterator)) {\n var step;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n }\n return iterations;\n };\n\n CollectionSeq.prototype.__iteratorUncached = function __iteratorUncached (type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var collection = this._collection;\n var iterator = getIterator(collection);\n if (!isIterator(iterator)) {\n return new Iterator(iteratorDone);\n }\n var iterations = 0;\n return new Iterator(function () {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, iterations++, step.value);\n });\n };\n\n return CollectionSeq;\n}(IndexedSeq));\n\n// # pragma Helper functions\n\nvar EMPTY_SEQ;\n\nfunction emptySequence() {\n return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n}\n\nfunction keyedSeqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (seq) {\n return seq.fromEntrySeq();\n }\n if (typeof value === 'object') {\n return new ObjectSeq(value);\n }\n throw new TypeError(\n 'Expected Array or collection object of [k, v] entries, or keyed object: ' +\n value\n );\n}\n\nfunction indexedSeqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (seq) {\n return seq;\n }\n throw new TypeError(\n 'Expected Array or collection object of values: ' + value\n );\n}\n\nfunction seqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (seq) {\n return isEntriesIterable(value)\n ? seq.fromEntrySeq()\n : isKeysIterable(value)\n ? seq.toSetSeq()\n : seq;\n }\n if (typeof value === 'object') {\n return new ObjectSeq(value);\n }\n throw new TypeError(\n 'Expected Array or collection object of values, or keyed object: ' + value\n );\n}\n\nfunction maybeIndexedSeqFromValue(value) {\n return isArrayLike(value)\n ? new ArraySeq(value)\n : hasIterator(value)\n ? new CollectionSeq(value)\n : undefined;\n}\n\nvar IS_MAP_SYMBOL = '@@__IMMUTABLE_MAP__@@';\n\nfunction isMap(maybeMap) {\n return Boolean(maybeMap && maybeMap[IS_MAP_SYMBOL]);\n}\n\nfunction isOrderedMap(maybeOrderedMap) {\n return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);\n}\n\nfunction isValueObject(maybeValue) {\n return Boolean(\n maybeValue &&\n typeof maybeValue.equals === 'function' &&\n typeof maybeValue.hashCode === 'function'\n );\n}\n\n/**\n * An extension of the \"same-value\" algorithm as [described for use by ES6 Map\n * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)\n *\n * NaN is considered the same as NaN, however -0 and 0 are considered the same\n * value, which is different from the algorithm described by\n * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).\n *\n * This is extended further to allow Objects to describe the values they\n * represent, by way of `valueOf` or `equals` (and `hashCode`).\n *\n * Note: because of this extension, the key equality of Immutable.Map and the\n * value equality of Immutable.Set will differ from ES6 Map and Set.\n *\n * ### Defining custom values\n *\n * The easiest way to describe the value an object represents is by implementing\n * `valueOf`. For example, `Date` represents a value by returning a unix\n * timestamp for `valueOf`:\n *\n * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...\n * var date2 = new Date(1234567890000);\n * date1.valueOf(); // 1234567890000\n * assert( date1 !== date2 );\n * assert( Immutable.is( date1, date2 ) );\n *\n * Note: overriding `valueOf` may have other implications if you use this object\n * where JavaScript expects a primitive, such as implicit string coercion.\n *\n * For more complex types, especially collections, implementing `valueOf` may\n * not be performant. An alternative is to implement `equals` and `hashCode`.\n *\n * `equals` takes another object, presumably of similar type, and returns true\n * if it is equal. Equality is symmetrical, so the same result should be\n * returned if this and the argument are flipped.\n *\n * assert( a.equals(b) === b.equals(a) );\n *\n * `hashCode` returns a 32bit integer number representing the object which will\n * be used to determine how to store the value object in a Map or Set. You must\n * provide both or neither methods, one must not exist without the other.\n *\n * Also, an important relationship between these methods must be upheld: if two\n * values are equal, they *must* return the same hashCode. If the values are not\n * equal, they might have the same hashCode; this is called a hash collision,\n * and while undesirable for performance reasons, it is acceptable.\n *\n * if (a.equals(b)) {\n * assert( a.hashCode() === b.hashCode() );\n * }\n *\n * All Immutable collections are Value Objects: they implement `equals()`\n * and `hashCode()`.\n */\nfunction is(valueA, valueB) {\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n if (\n typeof valueA.valueOf === 'function' &&\n typeof valueB.valueOf === 'function'\n ) {\n valueA = valueA.valueOf();\n valueB = valueB.valueOf();\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n }\n return !!(\n isValueObject(valueA) &&\n isValueObject(valueB) &&\n valueA.equals(valueB)\n );\n}\n\nvar imul =\n typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2\n ? Math.imul\n : function imul(a, b) {\n a |= 0; // int\n b |= 0; // int\n var c = a & 0xffff;\n var d = b & 0xffff;\n // Shift by 0 fixes the sign on the high part.\n return (c * d + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0)) | 0; // int\n };\n\n// v8 has an optimization for storing 31-bit signed numbers.\n// Values which have either 00 or 11 as the high order bits qualify.\n// This function drops the highest order bit in a signed number, maintaining\n// the sign bit.\nfunction smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xbfffffff);\n}\n\nvar defaultValueOf = Object.prototype.valueOf;\n\nfunction hash(o) {\n if (o == null) {\n return hashNullish(o);\n }\n\n if (typeof o.hashCode === 'function') {\n // Drop any high bits from accidentally long hash codes.\n return smi(o.hashCode(o));\n }\n\n var v = valueOf(o);\n\n if (v == null) {\n return hashNullish(v);\n }\n\n switch (typeof v) {\n case 'boolean':\n // The hash values for built-in constants are a 1 value for each 5-byte\n // shift region expect for the first, which encodes the value. This\n // reduces the odds of a hash collision for these common values.\n return v ? 0x42108421 : 0x42108420;\n case 'number':\n return hashNumber(v);\n case 'string':\n return v.length > STRING_HASH_CACHE_MIN_STRLEN\n ? cachedHashString(v)\n : hashString(v);\n case 'object':\n case 'function':\n return hashJSObj(v);\n case 'symbol':\n return hashSymbol(v);\n default:\n if (typeof v.toString === 'function') {\n return hashString(v.toString());\n }\n throw new Error('Value type ' + typeof v + ' cannot be hashed.');\n }\n}\n\nfunction hashNullish(nullish) {\n return nullish === null ? 0x42108422 : /* undefined */ 0x42108423;\n}\n\n// Compress arbitrarily large numbers into smi hashes.\nfunction hashNumber(n) {\n if (n !== n || n === Infinity) {\n return 0;\n }\n var hash = n | 0;\n if (hash !== n) {\n hash ^= n * 0xffffffff;\n }\n while (n > 0xffffffff) {\n n /= 0xffffffff;\n hash ^= n;\n }\n return smi(hash);\n}\n\nfunction cachedHashString(string) {\n var hashed = stringHashCache[string];\n if (hashed === undefined) {\n hashed = hashString(string);\n if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n STRING_HASH_CACHE_SIZE = 0;\n stringHashCache = {};\n }\n STRING_HASH_CACHE_SIZE++;\n stringHashCache[string] = hashed;\n }\n return hashed;\n}\n\n// http://jsperf.com/hashing-strings\nfunction hashString(string) {\n // This is the hash from JVM\n // The hash code for a string is computed as\n // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],\n // where s[i] is the ith character of the string and n is the length of\n // the string. We \"mod\" the result to make it between 0 (inclusive) and 2^31\n // (exclusive) by dropping high bits.\n var hashed = 0;\n for (var ii = 0; ii < string.length; ii++) {\n hashed = (31 * hashed + string.charCodeAt(ii)) | 0;\n }\n return smi(hashed);\n}\n\nfunction hashSymbol(sym) {\n var hashed = symbolMap[sym];\n if (hashed !== undefined) {\n return hashed;\n }\n\n hashed = nextHash();\n\n symbolMap[sym] = hashed;\n\n return hashed;\n}\n\nfunction hashJSObj(obj) {\n var hashed;\n if (usingWeakMap) {\n hashed = weakMap.get(obj);\n if (hashed !== undefined) {\n return hashed;\n }\n }\n\n hashed = obj[UID_HASH_KEY];\n if (hashed !== undefined) {\n return hashed;\n }\n\n if (!canDefineProperty) {\n hashed = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n if (hashed !== undefined) {\n return hashed;\n }\n\n hashed = getIENodeHash(obj);\n if (hashed !== undefined) {\n return hashed;\n }\n }\n\n hashed = nextHash();\n\n if (usingWeakMap) {\n weakMap.set(obj, hashed);\n } else if (isExtensible !== undefined && isExtensible(obj) === false) {\n throw new Error('Non-extensible objects are not allowed as keys.');\n } else if (canDefineProperty) {\n Object.defineProperty(obj, UID_HASH_KEY, {\n enumerable: false,\n configurable: false,\n writable: false,\n value: hashed,\n });\n } else if (\n obj.propertyIsEnumerable !== undefined &&\n obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable\n ) {\n // Since we can't define a non-enumerable property on the object\n // we'll hijack one of the less-used non-enumerable properties to\n // save our hash on it. Since this is a function it will not show up in\n // `JSON.stringify` which is what we want.\n obj.propertyIsEnumerable = function () {\n return this.constructor.prototype.propertyIsEnumerable.apply(\n this,\n arguments\n );\n };\n obj.propertyIsEnumerable[UID_HASH_KEY] = hashed;\n } else if (obj.nodeType !== undefined) {\n // At this point we couldn't get the IE `uniqueID` to use as a hash\n // and we couldn't use a non-enumerable property to exploit the\n // dontEnum bug so we simply add the `UID_HASH_KEY` on the node\n // itself.\n obj[UID_HASH_KEY] = hashed;\n } else {\n throw new Error('Unable to set a non-enumerable property on object.');\n }\n\n return hashed;\n}\n\n// Get references to ES5 object methods.\nvar isExtensible = Object.isExtensible;\n\n// True if Object.defineProperty works as expected. IE8 fails this test.\nvar canDefineProperty = (function () {\n try {\n Object.defineProperty({}, '@', {});\n return true;\n } catch (e) {\n return false;\n }\n})();\n\n// IE has a `uniqueID` property on DOM nodes. We can construct the hash from it\n// and avoid memory leaks from the IE cloneNode bug.\nfunction getIENodeHash(node) {\n if (node && node.nodeType > 0) {\n switch (node.nodeType) {\n case 1: // Element\n return node.uniqueID;\n case 9: // Document\n return node.documentElement && node.documentElement.uniqueID;\n }\n }\n}\n\nfunction valueOf(obj) {\n return obj.valueOf !== defaultValueOf && typeof obj.valueOf === 'function'\n ? obj.valueOf(obj)\n : obj;\n}\n\nfunction nextHash() {\n var nextHash = ++_objHashUID;\n if (_objHashUID & 0x40000000) {\n _objHashUID = 0;\n }\n return nextHash;\n}\n\n// If possible, use a WeakMap.\nvar usingWeakMap = typeof WeakMap === 'function';\nvar weakMap;\nif (usingWeakMap) {\n weakMap = new WeakMap();\n}\n\nvar symbolMap = Object.create(null);\n\nvar _objHashUID = 0;\n\nvar UID_HASH_KEY = '__immutablehash__';\nif (typeof Symbol === 'function') {\n UID_HASH_KEY = Symbol(UID_HASH_KEY);\n}\n\nvar STRING_HASH_CACHE_MIN_STRLEN = 16;\nvar STRING_HASH_CACHE_MAX_SIZE = 255;\nvar STRING_HASH_CACHE_SIZE = 0;\nvar stringHashCache = {};\n\nvar ToKeyedSequence = /*@__PURE__*/(function (KeyedSeq) {\n function ToKeyedSequence(indexed, useKeys) {\n this._iter = indexed;\n this._useKeys = useKeys;\n this.size = indexed.size;\n }\n\n if ( KeyedSeq ) ToKeyedSequence.__proto__ = KeyedSeq;\n ToKeyedSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype );\n ToKeyedSequence.prototype.constructor = ToKeyedSequence;\n\n ToKeyedSequence.prototype.get = function get (key, notSetValue) {\n return this._iter.get(key, notSetValue);\n };\n\n ToKeyedSequence.prototype.has = function has (key) {\n return this._iter.has(key);\n };\n\n ToKeyedSequence.prototype.valueSeq = function valueSeq () {\n return this._iter.valueSeq();\n };\n\n ToKeyedSequence.prototype.reverse = function reverse () {\n var this$1$1 = this;\n\n var reversedSequence = reverseFactory(this, true);\n if (!this._useKeys) {\n reversedSequence.valueSeq = function () { return this$1$1._iter.toSeq().reverse(); };\n }\n return reversedSequence;\n };\n\n ToKeyedSequence.prototype.map = function map (mapper, context) {\n var this$1$1 = this;\n\n var mappedSequence = mapFactory(this, mapper, context);\n if (!this._useKeys) {\n mappedSequence.valueSeq = function () { return this$1$1._iter.toSeq().map(mapper, context); };\n }\n return mappedSequence;\n };\n\n ToKeyedSequence.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1$1 = this;\n\n return this._iter.__iterate(function (v, k) { return fn(v, k, this$1$1); }, reverse);\n };\n\n ToKeyedSequence.prototype.__iterator = function __iterator (type, reverse) {\n return this._iter.__iterator(type, reverse);\n };\n\n return ToKeyedSequence;\n}(KeyedSeq));\nToKeyedSequence.prototype[IS_ORDERED_SYMBOL] = true;\n\nvar ToIndexedSequence = /*@__PURE__*/(function (IndexedSeq) {\n function ToIndexedSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n if ( IndexedSeq ) ToIndexedSequence.__proto__ = IndexedSeq;\n ToIndexedSequence.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );\n ToIndexedSequence.prototype.constructor = ToIndexedSequence;\n\n ToIndexedSequence.prototype.includes = function includes (value) {\n return this._iter.includes(value);\n };\n\n ToIndexedSequence.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1$1 = this;\n\n var i = 0;\n reverse && ensureSize(this);\n return this._iter.__iterate(\n function (v) { return fn(v, reverse ? this$1$1.size - ++i : i++, this$1$1); },\n reverse\n );\n };\n\n ToIndexedSequence.prototype.__iterator = function __iterator (type, reverse) {\n var this$1$1 = this;\n\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var i = 0;\n reverse && ensureSize(this);\n return new Iterator(function () {\n var step = iterator.next();\n return step.done\n ? step\n : iteratorValue(\n type,\n reverse ? this$1$1.size - ++i : i++,\n step.value,\n step\n );\n });\n };\n\n return ToIndexedSequence;\n}(IndexedSeq));\n\nvar ToSetSequence = /*@__PURE__*/(function (SetSeq) {\n function ToSetSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n if ( SetSeq ) ToSetSequence.__proto__ = SetSeq;\n ToSetSequence.prototype = Object.create( SetSeq && SetSeq.prototype );\n ToSetSequence.prototype.constructor = ToSetSequence;\n\n ToSetSequence.prototype.has = function has (key) {\n return this._iter.includes(key);\n };\n\n ToSetSequence.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1$1 = this;\n\n return this._iter.__iterate(function (v) { return fn(v, v, this$1$1); }, reverse);\n };\n\n ToSetSequence.prototype.__iterator = function __iterator (type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function () {\n var step = iterator.next();\n return step.done\n ? step\n : iteratorValue(type, step.value, step.value, step);\n });\n };\n\n return ToSetSequence;\n}(SetSeq));\n\nvar FromEntriesSequence = /*@__PURE__*/(function (KeyedSeq) {\n function FromEntriesSequence(entries) {\n this._iter = entries;\n this.size = entries.size;\n }\n\n if ( KeyedSeq ) FromEntriesSequence.__proto__ = KeyedSeq;\n FromEntriesSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype );\n FromEntriesSequence.prototype.constructor = FromEntriesSequence;\n\n FromEntriesSequence.prototype.entrySeq = function entrySeq () {\n return this._iter.toSeq();\n };\n\n FromEntriesSequence.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1$1 = this;\n\n return this._iter.__iterate(function (entry) {\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedCollection = isCollection(entry);\n return fn(\n indexedCollection ? entry.get(1) : entry[1],\n indexedCollection ? entry.get(0) : entry[0],\n this$1$1\n );\n }\n }, reverse);\n };\n\n FromEntriesSequence.prototype.__iterator = function __iterator (type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function () {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedCollection = isCollection(entry);\n return iteratorValue(\n type,\n indexedCollection ? entry.get(0) : entry[0],\n indexedCollection ? entry.get(1) : entry[1],\n step\n );\n }\n }\n });\n };\n\n return FromEntriesSequence;\n}(KeyedSeq));\n\nToIndexedSequence.prototype.cacheResult =\n ToKeyedSequence.prototype.cacheResult =\n ToSetSequence.prototype.cacheResult =\n FromEntriesSequence.prototype.cacheResult =\n cacheResultThrough;\n\nfunction flipFactory(collection) {\n var flipSequence = makeSequence(collection);\n flipSequence._iter = collection;\n flipSequence.size = collection.size;\n flipSequence.flip = function () { return collection; };\n flipSequence.reverse = function () {\n var reversedSequence = collection.reverse.apply(this); // super.reverse()\n reversedSequence.flip = function () { return collection.reverse(); };\n return reversedSequence;\n };\n flipSequence.has = function (key) { return collection.includes(key); };\n flipSequence.includes = function (key) { return collection.has(key); };\n flipSequence.cacheResult = cacheResultThrough;\n flipSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n\n return collection.__iterate(function (v, k) { return fn(k, v, this$1$1) !== false; }, reverse);\n };\n flipSequence.__iteratorUncached = function (type, reverse) {\n if (type === ITERATE_ENTRIES) {\n var iterator = collection.__iterator(type, reverse);\n return new Iterator(function () {\n var step = iterator.next();\n if (!step.done) {\n var k = step.value[0];\n step.value[0] = step.value[1];\n step.value[1] = k;\n }\n return step;\n });\n }\n return collection.__iterator(\n type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,\n reverse\n );\n };\n return flipSequence;\n}\n\nfunction mapFactory(collection, mapper, context) {\n var mappedSequence = makeSequence(collection);\n mappedSequence.size = collection.size;\n mappedSequence.has = function (key) { return collection.has(key); };\n mappedSequence.get = function (key, notSetValue) {\n var v = collection.get(key, NOT_SET);\n return v === NOT_SET\n ? notSetValue\n : mapper.call(context, v, key, collection);\n };\n mappedSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n\n return collection.__iterate(\n function (v, k, c) { return fn(mapper.call(context, v, k, c), k, this$1$1) !== false; },\n reverse\n );\n };\n mappedSequence.__iteratorUncached = function (type, reverse) {\n var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);\n return new Iterator(function () {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n return iteratorValue(\n type,\n key,\n mapper.call(context, entry[1], key, collection),\n step\n );\n });\n };\n return mappedSequence;\n}\n\nfunction reverseFactory(collection, useKeys) {\n var this$1$1 = this;\n\n var reversedSequence = makeSequence(collection);\n reversedSequence._iter = collection;\n reversedSequence.size = collection.size;\n reversedSequence.reverse = function () { return collection; };\n if (collection.flip) {\n reversedSequence.flip = function () {\n var flipSequence = flipFactory(collection);\n flipSequence.reverse = function () { return collection.flip(); };\n return flipSequence;\n };\n }\n reversedSequence.get = function (key, notSetValue) { return collection.get(useKeys ? key : -1 - key, notSetValue); };\n reversedSequence.has = function (key) { return collection.has(useKeys ? key : -1 - key); };\n reversedSequence.includes = function (value) { return collection.includes(value); };\n reversedSequence.cacheResult = cacheResultThrough;\n reversedSequence.__iterate = function (fn, reverse) {\n var this$1$1 = this;\n\n var i = 0;\n reverse && ensureSize(collection);\n return collection.__iterate(\n function (v, k) { return fn(v, useKeys ? k : reverse ? this$1$1.size - ++i : i++, this$1$1); },\n !reverse\n );\n };\n reversedSequence.__iterator = function (type, reverse) {\n var i = 0;\n reverse && ensureSize(collection);\n var iterator = collection.__iterator(ITERATE_ENTRIES, !reverse);\n return new Iterator(function () {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n return iteratorValue(\n type,\n useKeys ? entry[0] : reverse ? this$1$1.size - ++i : i++,\n entry[1],\n step\n );\n });\n };\n return reversedSequence;\n}\n\nfunction filterFactory(collection, predicate, context, useKeys) {\n var filterSequence = makeSequence(collection);\n if (useKeys) {\n filterSequence.has = function (key) {\n var v = collection.get(key, NOT_SET);\n return v !== NOT_SET && !!predicate.call(context, v, key, collection);\n };\n filterSequence.get = function (key, notSetValue) {\n var v = collection.get(key, NOT_SET);\n return v !== NOT_SET && predicate.call(context, v, key, collection)\n ? v\n : notSetValue;\n };\n }\n filterSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n\n var iterations = 0;\n collection.__iterate(function (v, k, c) {\n if (predicate.call(context, v, k, c)) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$1$1);\n }\n }, reverse);\n return iterations;\n };\n filterSequence.__iteratorUncached = function (type, reverse) {\n var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);\n var iterations = 0;\n return new Iterator(function () {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n var value = entry[1];\n if (predicate.call(context, value, key, collection)) {\n return iteratorValue(type, useKeys ? key : iterations++, value, step);\n }\n }\n });\n };\n return filterSequence;\n}\n\nfunction countByFactory(collection, grouper, context) {\n var groups = Map().asMutable();\n collection.__iterate(function (v, k) {\n groups.update(grouper.call(context, v, k, collection), 0, function (a) { return a + 1; });\n });\n return groups.asImmutable();\n}\n\nfunction groupByFactory(collection, grouper, context) {\n var isKeyedIter = isKeyed(collection);\n var groups = (isOrdered(collection) ? OrderedMap() : Map()).asMutable();\n collection.__iterate(function (v, k) {\n groups.update(\n grouper.call(context, v, k, collection),\n function (a) { return ((a = a || []), a.push(isKeyedIter ? [k, v] : v), a); }\n );\n });\n var coerce = collectionClass(collection);\n return groups.map(function (arr) { return reify(collection, coerce(arr)); }).asImmutable();\n}\n\nfunction partitionFactory(collection, predicate, context) {\n var isKeyedIter = isKeyed(collection);\n var groups = [[], []];\n collection.__iterate(function (v, k) {\n groups[predicate.call(context, v, k, collection) ? 1 : 0].push(\n isKeyedIter ? [k, v] : v\n );\n });\n var coerce = collectionClass(collection);\n return groups.map(function (arr) { return reify(collection, coerce(arr)); });\n}\n\nfunction sliceFactory(collection, begin, end, useKeys) {\n var originalSize = collection.size;\n\n if (wholeSlice(begin, end, originalSize)) {\n return collection;\n }\n\n var resolvedBegin = resolveBegin(begin, originalSize);\n var resolvedEnd = resolveEnd(end, originalSize);\n\n // begin or end will be NaN if they were provided as negative numbers and\n // this collection's size is unknown. In that case, cache first so there is\n // a known size and these do not resolve to NaN.\n if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n return sliceFactory(collection.toSeq().cacheResult(), begin, end, useKeys);\n }\n\n // Note: resolvedEnd is undefined when the original sequence's length is\n // unknown and this slice did not supply an end and should contain all\n // elements after resolvedBegin.\n // In that case, resolvedSize will be NaN and sliceSize will remain undefined.\n var resolvedSize = resolvedEnd - resolvedBegin;\n var sliceSize;\n if (resolvedSize === resolvedSize) {\n sliceSize = resolvedSize < 0 ? 0 : resolvedSize;\n }\n\n var sliceSeq = makeSequence(collection);\n\n // If collection.size is undefined, the size of the realized sliceSeq is\n // unknown at this point unless the number of items to slice is 0\n sliceSeq.size =\n sliceSize === 0 ? sliceSize : (collection.size && sliceSize) || undefined;\n\n if (!useKeys && isSeq(collection) && sliceSize >= 0) {\n sliceSeq.get = function (index, notSetValue) {\n index = wrapIndex(this, index);\n return index >= 0 && index < sliceSize\n ? collection.get(index + resolvedBegin, notSetValue)\n : notSetValue;\n };\n }\n\n sliceSeq.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n\n if (sliceSize === 0) {\n return 0;\n }\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var skipped = 0;\n var isSkipping = true;\n var iterations = 0;\n collection.__iterate(function (v, k) {\n if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {\n iterations++;\n return (\n fn(v, useKeys ? k : iterations - 1, this$1$1) !== false &&\n iterations !== sliceSize\n );\n }\n });\n return iterations;\n };\n\n sliceSeq.__iteratorUncached = function (type, reverse) {\n if (sliceSize !== 0 && reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n // Don't bother instantiating parent iterator if taking 0.\n if (sliceSize === 0) {\n return new Iterator(iteratorDone);\n }\n var iterator = collection.__iterator(type, reverse);\n var skipped = 0;\n var iterations = 0;\n return new Iterator(function () {\n while (skipped++ < resolvedBegin) {\n iterator.next();\n }\n if (++iterations > sliceSize) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (useKeys || type === ITERATE_VALUES || step.done) {\n return step;\n }\n if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations - 1, undefined, step);\n }\n return iteratorValue(type, iterations - 1, step.value[1], step);\n });\n };\n\n return sliceSeq;\n}\n\nfunction takeWhileFactory(collection, predicate, context) {\n var takeSequence = makeSequence(collection);\n takeSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterations = 0;\n collection.__iterate(\n function (v, k, c) { return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$1$1); }\n );\n return iterations;\n };\n takeSequence.__iteratorUncached = function (type, reverse) {\n var this$1$1 = this;\n\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);\n var iterating = true;\n return new Iterator(function () {\n if (!iterating) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var k = entry[0];\n var v = entry[1];\n if (!predicate.call(context, v, k, this$1$1)) {\n iterating = false;\n return iteratorDone();\n }\n return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n });\n };\n return takeSequence;\n}\n\nfunction skipWhileFactory(collection, predicate, context, useKeys) {\n var skipSequence = makeSequence(collection);\n skipSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var isSkipping = true;\n var iterations = 0;\n collection.__iterate(function (v, k, c) {\n if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$1$1);\n }\n });\n return iterations;\n };\n skipSequence.__iteratorUncached = function (type, reverse) {\n var this$1$1 = this;\n\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);\n var skipping = true;\n var iterations = 0;\n return new Iterator(function () {\n var step;\n var k;\n var v;\n do {\n step = iterator.next();\n if (step.done) {\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n }\n if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations++, undefined, step);\n }\n return iteratorValue(type, iterations++, step.value[1], step);\n }\n var entry = step.value;\n k = entry[0];\n v = entry[1];\n skipping && (skipping = predicate.call(context, v, k, this$1$1));\n } while (skipping);\n return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n });\n };\n return skipSequence;\n}\n\nfunction concatFactory(collection, values) {\n var isKeyedCollection = isKeyed(collection);\n var iters = [collection]\n .concat(values)\n .map(function (v) {\n if (!isCollection(v)) {\n v = isKeyedCollection\n ? keyedSeqFromValue(v)\n : indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n } else if (isKeyedCollection) {\n v = KeyedCollection(v);\n }\n return v;\n })\n .filter(function (v) { return v.size !== 0; });\n\n if (iters.length === 0) {\n return collection;\n }\n\n if (iters.length === 1) {\n var singleton = iters[0];\n if (\n singleton === collection ||\n (isKeyedCollection && isKeyed(singleton)) ||\n (isIndexed(collection) && isIndexed(singleton))\n ) {\n return singleton;\n }\n }\n\n var concatSeq = new ArraySeq(iters);\n if (isKeyedCollection) {\n concatSeq = concatSeq.toKeyedSeq();\n } else if (!isIndexed(collection)) {\n concatSeq = concatSeq.toSetSeq();\n }\n concatSeq = concatSeq.flatten(true);\n concatSeq.size = iters.reduce(function (sum, seq) {\n if (sum !== undefined) {\n var size = seq.size;\n if (size !== undefined) {\n return sum + size;\n }\n }\n }, 0);\n return concatSeq;\n}\n\nfunction flattenFactory(collection, depth, useKeys) {\n var flatSequence = makeSequence(collection);\n flatSequence.__iterateUncached = function (fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterations = 0;\n var stopped = false;\n function flatDeep(iter, currentDepth) {\n iter.__iterate(function (v, k) {\n if ((!depth || currentDepth < depth) && isCollection(v)) {\n flatDeep(v, currentDepth + 1);\n } else {\n iterations++;\n if (fn(v, useKeys ? k : iterations - 1, flatSequence) === false) {\n stopped = true;\n }\n }\n return !stopped;\n }, reverse);\n }\n flatDeep(collection, 0);\n return iterations;\n };\n flatSequence.__iteratorUncached = function (type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = collection.__iterator(type, reverse);\n var stack = [];\n var iterations = 0;\n return new Iterator(function () {\n while (iterator) {\n var step = iterator.next();\n if (step.done !== false) {\n iterator = stack.pop();\n continue;\n }\n var v = step.value;\n if (type === ITERATE_ENTRIES) {\n v = v[1];\n }\n if ((!depth || stack.length < depth) && isCollection(v)) {\n stack.push(iterator);\n iterator = v.__iterator(type, reverse);\n } else {\n return useKeys ? step : iteratorValue(type, iterations++, v, step);\n }\n }\n return iteratorDone();\n });\n };\n return flatSequence;\n}\n\nfunction flatMapFactory(collection, mapper, context) {\n var coerce = collectionClass(collection);\n return collection\n .toSeq()\n .map(function (v, k) { return coerce(mapper.call(context, v, k, collection)); })\n .flatten(true);\n}\n\nfunction interposeFactory(collection, separator) {\n var interposedSequence = makeSequence(collection);\n interposedSequence.size = collection.size && collection.size * 2 - 1;\n interposedSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n\n var iterations = 0;\n collection.__iterate(\n function (v) { return (!iterations || fn(separator, iterations++, this$1$1) !== false) &&\n fn(v, iterations++, this$1$1) !== false; },\n reverse\n );\n return iterations;\n };\n interposedSequence.__iteratorUncached = function (type, reverse) {\n var iterator = collection.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n var step;\n return new Iterator(function () {\n if (!step || iterations % 2) {\n step = iterator.next();\n if (step.done) {\n return step;\n }\n }\n return iterations % 2\n ? iteratorValue(type, iterations++, separator)\n : iteratorValue(type, iterations++, step.value, step);\n });\n };\n return interposedSequence;\n}\n\nfunction sortFactory(collection, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n var isKeyedCollection = isKeyed(collection);\n var index = 0;\n var entries = collection\n .toSeq()\n .map(function (v, k) { return [k, v, index++, mapper ? mapper(v, k, collection) : v]; })\n .valueSeq()\n .toArray();\n entries\n .sort(function (a, b) { return comparator(a[3], b[3]) || a[2] - b[2]; })\n .forEach(\n isKeyedCollection\n ? function (v, i) {\n entries[i].length = 2;\n }\n : function (v, i) {\n entries[i] = v[1];\n }\n );\n return isKeyedCollection\n ? KeyedSeq(entries)\n : isIndexed(collection)\n ? IndexedSeq(entries)\n : SetSeq(entries);\n}\n\nfunction maxFactory(collection, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n if (mapper) {\n var entry = collection\n .toSeq()\n .map(function (v, k) { return [v, mapper(v, k, collection)]; })\n .reduce(function (a, b) { return (maxCompare(comparator, a[1], b[1]) ? b : a); });\n return entry && entry[0];\n }\n return collection.reduce(function (a, b) { return (maxCompare(comparator, a, b) ? b : a); });\n}\n\nfunction maxCompare(comparator, a, b) {\n var comp = comparator(b, a);\n // b is considered the new max if the comparator declares them equal, but\n // they are not equal and b is in fact a nullish value.\n return (\n (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) ||\n comp > 0\n );\n}\n\nfunction zipWithFactory(keyIter, zipper, iters, zipAll) {\n var zipSequence = makeSequence(keyIter);\n var sizes = new ArraySeq(iters).map(function (i) { return i.size; });\n zipSequence.size = zipAll ? sizes.max() : sizes.min();\n // Note: this a generic base implementation of __iterate in terms of\n // __iterator which may be more generically useful in the future.\n zipSequence.__iterate = function (fn, reverse) {\n /* generic:\n var iterator = this.__iterator(ITERATE_ENTRIES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n iterations++;\n if (fn(step.value[1], step.value[0], this) === false) {\n break;\n }\n }\n return iterations;\n */\n // indexed:\n var iterator = this.__iterator(ITERATE_VALUES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n zipSequence.__iteratorUncached = function (type, reverse) {\n var iterators = iters.map(\n function (i) { return ((i = Collection(i)), getIterator(reverse ? i.reverse() : i)); }\n );\n var iterations = 0;\n var isDone = false;\n return new Iterator(function () {\n var steps;\n if (!isDone) {\n steps = iterators.map(function (i) { return i.next(); });\n isDone = zipAll ? steps.every(function (s) { return s.done; }) : steps.some(function (s) { return s.done; });\n }\n if (isDone) {\n return iteratorDone();\n }\n return iteratorValue(\n type,\n iterations++,\n zipper.apply(\n null,\n steps.map(function (s) { return s.value; })\n )\n );\n });\n };\n return zipSequence;\n}\n\n// #pragma Helper Functions\n\nfunction reify(iter, seq) {\n return iter === seq ? iter : isSeq(iter) ? seq : iter.constructor(seq);\n}\n\nfunction validateEntry(entry) {\n if (entry !== Object(entry)) {\n throw new TypeError('Expected [K, V] tuple: ' + entry);\n }\n}\n\nfunction collectionClass(collection) {\n return isKeyed(collection)\n ? KeyedCollection\n : isIndexed(collection)\n ? IndexedCollection\n : SetCollection;\n}\n\nfunction makeSequence(collection) {\n return Object.create(\n (isKeyed(collection)\n ? KeyedSeq\n : isIndexed(collection)\n ? IndexedSeq\n : SetSeq\n ).prototype\n );\n}\n\nfunction cacheResultThrough() {\n if (this._iter.cacheResult) {\n this._iter.cacheResult();\n this.size = this._iter.size;\n return this;\n }\n return Seq.prototype.cacheResult.call(this);\n}\n\nfunction defaultComparator(a, b) {\n if (a === undefined && b === undefined) {\n return 0;\n }\n\n if (a === undefined) {\n return 1;\n }\n\n if (b === undefined) {\n return -1;\n }\n\n return a > b ? 1 : a < b ? -1 : 0;\n}\n\nfunction arrCopy(arr, offset) {\n offset = offset || 0;\n var len = Math.max(0, arr.length - offset);\n var newArr = new Array(len);\n for (var ii = 0; ii < len; ii++) {\n newArr[ii] = arr[ii + offset];\n }\n return newArr;\n}\n\nfunction invariant(condition, error) {\n if (!condition) { throw new Error(error); }\n}\n\nfunction assertNotInfinite(size) {\n invariant(\n size !== Infinity,\n 'Cannot perform this action with an infinite size.'\n );\n}\n\nfunction coerceKeyPath(keyPath) {\n if (isArrayLike(keyPath) && typeof keyPath !== 'string') {\n return keyPath;\n }\n if (isOrdered(keyPath)) {\n return keyPath.toArray();\n }\n throw new TypeError(\n 'Invalid keyPath: expected Ordered Collection or Array: ' + keyPath\n );\n}\n\nvar toString = Object.prototype.toString;\n\nfunction isPlainObject(value) {\n // The base prototype's toString deals with Argument objects and native namespaces like Math\n if (\n !value ||\n typeof value !== 'object' ||\n toString.call(value) !== '[object Object]'\n ) {\n return false;\n }\n\n var proto = Object.getPrototypeOf(value);\n if (proto === null) {\n return true;\n }\n\n // Iteratively going up the prototype chain is needed for cross-realm environments (differing contexts, iframes, etc)\n var parentProto = proto;\n var nextProto = Object.getPrototypeOf(proto);\n while (nextProto !== null) {\n parentProto = nextProto;\n nextProto = Object.getPrototypeOf(parentProto);\n }\n return parentProto === proto;\n}\n\n/**\n * Returns true if the value is a potentially-persistent data structure, either\n * provided by Immutable.js or a plain Array or Object.\n */\nfunction isDataStructure(value) {\n return (\n typeof value === 'object' &&\n (isImmutable(value) || Array.isArray(value) || isPlainObject(value))\n );\n}\n\nfunction quoteString(value) {\n try {\n return typeof value === 'string' ? JSON.stringify(value) : String(value);\n } catch (_ignoreError) {\n return JSON.stringify(value);\n }\n}\n\nfunction has(collection, key) {\n return isImmutable(collection)\n ? collection.has(key)\n : isDataStructure(collection) && hasOwnProperty.call(collection, key);\n}\n\nfunction get(collection, key, notSetValue) {\n return isImmutable(collection)\n ? collection.get(key, notSetValue)\n : !has(collection, key)\n ? notSetValue\n : typeof collection.get === 'function'\n ? collection.get(key)\n : collection[key];\n}\n\nfunction shallowCopy(from) {\n if (Array.isArray(from)) {\n return arrCopy(from);\n }\n var to = {};\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n return to;\n}\n\nfunction remove(collection, key) {\n if (!isDataStructure(collection)) {\n throw new TypeError(\n 'Cannot update non-data-structure value: ' + collection\n );\n }\n if (isImmutable(collection)) {\n if (!collection.remove) {\n throw new TypeError(\n 'Cannot update immutable value without .remove() method: ' + collection\n );\n }\n return collection.remove(key);\n }\n if (!hasOwnProperty.call(collection, key)) {\n return collection;\n }\n var collectionCopy = shallowCopy(collection);\n if (Array.isArray(collectionCopy)) {\n collectionCopy.splice(key, 1);\n } else {\n delete collectionCopy[key];\n }\n return collectionCopy;\n}\n\nfunction set(collection, key, value) {\n if (!isDataStructure(collection)) {\n throw new TypeError(\n 'Cannot update non-data-structure value: ' + collection\n );\n }\n if (isImmutable(collection)) {\n if (!collection.set) {\n throw new TypeError(\n 'Cannot update immutable value without .set() method: ' + collection\n );\n }\n return collection.set(key, value);\n }\n if (hasOwnProperty.call(collection, key) && value === collection[key]) {\n return collection;\n }\n var collectionCopy = shallowCopy(collection);\n collectionCopy[key] = value;\n return collectionCopy;\n}\n\nfunction updateIn$1(collection, keyPath, notSetValue, updater) {\n if (!updater) {\n updater = notSetValue;\n notSetValue = undefined;\n }\n var updatedValue = updateInDeeply(\n isImmutable(collection),\n collection,\n coerceKeyPath(keyPath),\n 0,\n notSetValue,\n updater\n );\n return updatedValue === NOT_SET ? notSetValue : updatedValue;\n}\n\nfunction updateInDeeply(\n inImmutable,\n existing,\n keyPath,\n i,\n notSetValue,\n updater\n) {\n var wasNotSet = existing === NOT_SET;\n if (i === keyPath.length) {\n var existingValue = wasNotSet ? notSetValue : existing;\n var newValue = updater(existingValue);\n return newValue === existingValue ? existing : newValue;\n }\n if (!wasNotSet && !isDataStructure(existing)) {\n throw new TypeError(\n 'Cannot update within non-data-structure value in path [' +\n keyPath.slice(0, i).map(quoteString) +\n ']: ' +\n existing\n );\n }\n var key = keyPath[i];\n var nextExisting = wasNotSet ? NOT_SET : get(existing, key, NOT_SET);\n var nextUpdated = updateInDeeply(\n nextExisting === NOT_SET ? inImmutable : isImmutable(nextExisting),\n nextExisting,\n keyPath,\n i + 1,\n notSetValue,\n updater\n );\n return nextUpdated === nextExisting\n ? existing\n : nextUpdated === NOT_SET\n ? remove(existing, key)\n : set(\n wasNotSet ? (inImmutable ? emptyMap() : {}) : existing,\n key,\n nextUpdated\n );\n}\n\nfunction setIn$1(collection, keyPath, value) {\n return updateIn$1(collection, keyPath, NOT_SET, function () { return value; });\n}\n\nfunction setIn(keyPath, v) {\n return setIn$1(this, keyPath, v);\n}\n\nfunction removeIn(collection, keyPath) {\n return updateIn$1(collection, keyPath, function () { return NOT_SET; });\n}\n\nfunction deleteIn(keyPath) {\n return removeIn(this, keyPath);\n}\n\nfunction update$1(collection, key, notSetValue, updater) {\n return updateIn$1(collection, [key], notSetValue, updater);\n}\n\nfunction update(key, notSetValue, updater) {\n return arguments.length === 1\n ? key(this)\n : update$1(this, key, notSetValue, updater);\n}\n\nfunction updateIn(keyPath, notSetValue, updater) {\n return updateIn$1(this, keyPath, notSetValue, updater);\n}\n\nfunction merge$1() {\n var iters = [], len = arguments.length;\n while ( len-- ) iters[ len ] = arguments[ len ];\n\n return mergeIntoKeyedWith(this, iters);\n}\n\nfunction mergeWith$1(merger) {\n var iters = [], len = arguments.length - 1;\n while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];\n\n if (typeof merger !== 'function') {\n throw new TypeError('Invalid merger function: ' + merger);\n }\n return mergeIntoKeyedWith(this, iters, merger);\n}\n\nfunction mergeIntoKeyedWith(collection, collections, merger) {\n var iters = [];\n for (var ii = 0; ii < collections.length; ii++) {\n var collection$1 = KeyedCollection(collections[ii]);\n if (collection$1.size !== 0) {\n iters.push(collection$1);\n }\n }\n if (iters.length === 0) {\n return collection;\n }\n if (\n collection.toSeq().size === 0 &&\n !collection.__ownerID &&\n iters.length === 1\n ) {\n return collection.constructor(iters[0]);\n }\n return collection.withMutations(function (collection) {\n var mergeIntoCollection = merger\n ? function (value, key) {\n update$1(collection, key, NOT_SET, function (oldVal) { return oldVal === NOT_SET ? value : merger(oldVal, value, key); }\n );\n }\n : function (value, key) {\n collection.set(key, value);\n };\n for (var ii = 0; ii < iters.length; ii++) {\n iters[ii].forEach(mergeIntoCollection);\n }\n });\n}\n\nfunction merge(collection) {\n var sources = [], len = arguments.length - 1;\n while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];\n\n return mergeWithSources(collection, sources);\n}\n\nfunction mergeWith(merger, collection) {\n var sources = [], len = arguments.length - 2;\n while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ];\n\n return mergeWithSources(collection, sources, merger);\n}\n\nfunction mergeDeep$1(collection) {\n var sources = [], len = arguments.length - 1;\n while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];\n\n return mergeDeepWithSources(collection, sources);\n}\n\nfunction mergeDeepWith$1(merger, collection) {\n var sources = [], len = arguments.length - 2;\n while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ];\n\n return mergeDeepWithSources(collection, sources, merger);\n}\n\nfunction mergeDeepWithSources(collection, sources, merger) {\n return mergeWithSources(collection, sources, deepMergerWith(merger));\n}\n\nfunction mergeWithSources(collection, sources, merger) {\n if (!isDataStructure(collection)) {\n throw new TypeError(\n 'Cannot merge into non-data-structure value: ' + collection\n );\n }\n if (isImmutable(collection)) {\n return typeof merger === 'function' && collection.mergeWith\n ? collection.mergeWith.apply(collection, [ merger ].concat( sources ))\n : collection.merge\n ? collection.merge.apply(collection, sources)\n : collection.concat.apply(collection, sources);\n }\n var isArray = Array.isArray(collection);\n var merged = collection;\n var Collection = isArray ? IndexedCollection : KeyedCollection;\n var mergeItem = isArray\n ? function (value) {\n // Copy on write\n if (merged === collection) {\n merged = shallowCopy(merged);\n }\n merged.push(value);\n }\n : function (value, key) {\n var hasVal = hasOwnProperty.call(merged, key);\n var nextVal =\n hasVal && merger ? merger(merged[key], value, key) : value;\n if (!hasVal || nextVal !== merged[key]) {\n // Copy on write\n if (merged === collection) {\n merged = shallowCopy(merged);\n }\n merged[key] = nextVal;\n }\n };\n for (var i = 0; i < sources.length; i++) {\n Collection(sources[i]).forEach(mergeItem);\n }\n return merged;\n}\n\nfunction deepMergerWith(merger) {\n function deepMerger(oldValue, newValue, key) {\n return isDataStructure(oldValue) &&\n isDataStructure(newValue) &&\n areMergeable(oldValue, newValue)\n ? mergeWithSources(oldValue, [newValue], deepMerger)\n : merger\n ? merger(oldValue, newValue, key)\n : newValue;\n }\n return deepMerger;\n}\n\n/**\n * It's unclear what the desired behavior is for merging two collections that\n * fall into separate categories between keyed, indexed, or set-like, so we only\n * consider them mergeable if they fall into the same category.\n */\nfunction areMergeable(oldDataStructure, newDataStructure) {\n var oldSeq = Seq(oldDataStructure);\n var newSeq = Seq(newDataStructure);\n // This logic assumes that a sequence can only fall into one of the three\n // categories mentioned above (since there's no `isSetLike()` method).\n return (\n isIndexed(oldSeq) === isIndexed(newSeq) &&\n isKeyed(oldSeq) === isKeyed(newSeq)\n );\n}\n\nfunction mergeDeep() {\n var iters = [], len = arguments.length;\n while ( len-- ) iters[ len ] = arguments[ len ];\n\n return mergeDeepWithSources(this, iters);\n}\n\nfunction mergeDeepWith(merger) {\n var iters = [], len = arguments.length - 1;\n while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];\n\n return mergeDeepWithSources(this, iters, merger);\n}\n\nfunction mergeIn(keyPath) {\n var iters = [], len = arguments.length - 1;\n while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];\n\n return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeWithSources(m, iters); });\n}\n\nfunction mergeDeepIn(keyPath) {\n var iters = [], len = arguments.length - 1;\n while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];\n\n return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeDeepWithSources(m, iters); }\n );\n}\n\nfunction withMutations(fn) {\n var mutable = this.asMutable();\n fn(mutable);\n return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n}\n\nfunction asMutable() {\n return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n}\n\nfunction asImmutable() {\n return this.__ensureOwner();\n}\n\nfunction wasAltered() {\n return this.__altered;\n}\n\nvar Map = /*@__PURE__*/(function (KeyedCollection) {\n function Map(value) {\n return value === undefined || value === null\n ? emptyMap()\n : isMap(value) && !isOrdered(value)\n ? value\n : emptyMap().withMutations(function (map) {\n var iter = KeyedCollection(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v, k) { return map.set(k, v); });\n });\n }\n\n if ( KeyedCollection ) Map.__proto__ = KeyedCollection;\n Map.prototype = Object.create( KeyedCollection && KeyedCollection.prototype );\n Map.prototype.constructor = Map;\n\n Map.of = function of () {\n var keyValues = [], len = arguments.length;\n while ( len-- ) keyValues[ len ] = arguments[ len ];\n\n return emptyMap().withMutations(function (map) {\n for (var i = 0; i < keyValues.length; i += 2) {\n if (i + 1 >= keyValues.length) {\n throw new Error('Missing value for key: ' + keyValues[i]);\n }\n map.set(keyValues[i], keyValues[i + 1]);\n }\n });\n };\n\n Map.prototype.toString = function toString () {\n return this.__toString('Map {', '}');\n };\n\n // @pragma Access\n\n Map.prototype.get = function get (k, notSetValue) {\n return this._root\n ? this._root.get(0, undefined, k, notSetValue)\n : notSetValue;\n };\n\n // @pragma Modification\n\n Map.prototype.set = function set (k, v) {\n return updateMap(this, k, v);\n };\n\n Map.prototype.remove = function remove (k) {\n return updateMap(this, k, NOT_SET);\n };\n\n Map.prototype.deleteAll = function deleteAll (keys) {\n var collection = Collection(keys);\n\n if (collection.size === 0) {\n return this;\n }\n\n return this.withMutations(function (map) {\n collection.forEach(function (key) { return map.remove(key); });\n });\n };\n\n Map.prototype.clear = function clear () {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._root = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyMap();\n };\n\n // @pragma Composition\n\n Map.prototype.sort = function sort (comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator));\n };\n\n Map.prototype.sortBy = function sortBy (mapper, comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator, mapper));\n };\n\n Map.prototype.map = function map (mapper, context) {\n var this$1$1 = this;\n\n return this.withMutations(function (map) {\n map.forEach(function (value, key) {\n map.set(key, mapper.call(context, value, key, this$1$1));\n });\n });\n };\n\n // @pragma Mutability\n\n Map.prototype.__iterator = function __iterator (type, reverse) {\n return new MapIterator(this, type, reverse);\n };\n\n Map.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1$1 = this;\n\n var iterations = 0;\n this._root &&\n this._root.iterate(function (entry) {\n iterations++;\n return fn(entry[1], entry[0], this$1$1);\n }, reverse);\n return iterations;\n };\n\n Map.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n if (this.size === 0) {\n return emptyMap();\n }\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeMap(this.size, this._root, ownerID, this.__hash);\n };\n\n return Map;\n}(KeyedCollection));\n\nMap.isMap = isMap;\n\nvar MapPrototype = Map.prototype;\nMapPrototype[IS_MAP_SYMBOL] = true;\nMapPrototype[DELETE] = MapPrototype.remove;\nMapPrototype.removeAll = MapPrototype.deleteAll;\nMapPrototype.setIn = setIn;\nMapPrototype.removeIn = MapPrototype.deleteIn = deleteIn;\nMapPrototype.update = update;\nMapPrototype.updateIn = updateIn;\nMapPrototype.merge = MapPrototype.concat = merge$1;\nMapPrototype.mergeWith = mergeWith$1;\nMapPrototype.mergeDeep = mergeDeep;\nMapPrototype.mergeDeepWith = mergeDeepWith;\nMapPrototype.mergeIn = mergeIn;\nMapPrototype.mergeDeepIn = mergeDeepIn;\nMapPrototype.withMutations = withMutations;\nMapPrototype.wasAltered = wasAltered;\nMapPrototype.asImmutable = asImmutable;\nMapPrototype['@@transducer/init'] = MapPrototype.asMutable = asMutable;\nMapPrototype['@@transducer/step'] = function (result, arr) {\n return result.set(arr[0], arr[1]);\n};\nMapPrototype['@@transducer/result'] = function (obj) {\n return obj.asImmutable();\n};\n\n// #pragma Trie Nodes\n\nvar ArrayMapNode = function ArrayMapNode(ownerID, entries) {\n this.ownerID = ownerID;\n this.entries = entries;\n};\n\nArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n};\n\nArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n\n var entries = this.entries;\n var idx = 0;\n var len = entries.length;\n for (; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && entries.length === 1) {\n return; // undefined\n }\n\n if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {\n return createNodes(ownerID, entries, key, value);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1\n ? newEntries.pop()\n : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new ArrayMapNode(ownerID, newEntries);\n};\n\nvar BitmapIndexedNode = function BitmapIndexedNode(ownerID, bitmap, nodes) {\n this.ownerID = ownerID;\n this.bitmap = bitmap;\n this.nodes = nodes;\n};\n\nBitmapIndexedNode.prototype.get = function get (shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK);\n var bitmap = this.bitmap;\n return (bitmap & bit) === 0\n ? notSetValue\n : this.nodes[popCount(bitmap & (bit - 1))].get(\n shift + SHIFT,\n keyHash,\n key,\n notSetValue\n );\n};\n\nBitmapIndexedNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var bit = 1 << keyHashFrag;\n var bitmap = this.bitmap;\n var exists = (bitmap & bit) !== 0;\n\n if (!exists && value === NOT_SET) {\n return this;\n }\n\n var idx = popCount(bitmap & (bit - 1));\n var nodes = this.nodes;\n var node = exists ? nodes[idx] : undefined;\n var newNode = updateNode(\n node,\n ownerID,\n shift + SHIFT,\n keyHash,\n key,\n value,\n didChangeSize,\n didAlter\n );\n\n if (newNode === node) {\n return this;\n }\n\n if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {\n return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);\n }\n\n if (\n exists &&\n !newNode &&\n nodes.length === 2 &&\n isLeafNode(nodes[idx ^ 1])\n ) {\n return nodes[idx ^ 1];\n }\n\n if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n return newNode;\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newBitmap = exists ? (newNode ? bitmap : bitmap ^ bit) : bitmap | bit;\n var newNodes = exists\n ? newNode\n ? setAt(nodes, idx, newNode, isEditable)\n : spliceOut(nodes, idx, isEditable)\n : spliceIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.bitmap = newBitmap;\n this.nodes = newNodes;\n return this;\n }\n\n return new BitmapIndexedNode(ownerID, newBitmap, newNodes);\n};\n\nvar HashArrayMapNode = function HashArrayMapNode(ownerID, count, nodes) {\n this.ownerID = ownerID;\n this.count = count;\n this.nodes = nodes;\n};\n\nHashArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var node = this.nodes[idx];\n return node\n ? node.get(shift + SHIFT, keyHash, key, notSetValue)\n : notSetValue;\n};\n\nHashArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var removed = value === NOT_SET;\n var nodes = this.nodes;\n var node = nodes[idx];\n\n if (removed && !node) {\n return this;\n }\n\n var newNode = updateNode(\n node,\n ownerID,\n shift + SHIFT,\n keyHash,\n key,\n value,\n didChangeSize,\n didAlter\n );\n if (newNode === node) {\n return this;\n }\n\n var newCount = this.count;\n if (!node) {\n newCount++;\n } else if (!newNode) {\n newCount--;\n if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {\n return packNodes(ownerID, nodes, newCount, idx);\n }\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newNodes = setAt(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.count = newCount;\n this.nodes = newNodes;\n return this;\n }\n\n return new HashArrayMapNode(ownerID, newCount, newNodes);\n};\n\nvar HashCollisionNode = function HashCollisionNode(ownerID, keyHash, entries) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entries = entries;\n};\n\nHashCollisionNode.prototype.get = function get (shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n};\n\nHashCollisionNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n\n var removed = value === NOT_SET;\n\n if (keyHash !== this.keyHash) {\n if (removed) {\n return this;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);\n }\n\n var entries = this.entries;\n var idx = 0;\n var len = entries.length;\n for (; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && len === 2) {\n return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1\n ? newEntries.pop()\n : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new HashCollisionNode(ownerID, this.keyHash, newEntries);\n};\n\nvar ValueNode = function ValueNode(ownerID, keyHash, entry) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entry = entry;\n};\n\nValueNode.prototype.get = function get (shift, keyHash, key, notSetValue) {\n return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n};\n\nValueNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n var keyMatch = is(key, this.entry[0]);\n if (keyMatch ? value === this.entry[1] : removed) {\n return this;\n }\n\n SetRef(didAlter);\n\n if (removed) {\n SetRef(didChangeSize);\n return; // undefined\n }\n\n if (keyMatch) {\n if (ownerID && ownerID === this.ownerID) {\n this.entry[1] = value;\n return this;\n }\n return new ValueNode(ownerID, this.keyHash, [key, value]);\n }\n\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);\n};\n\n// #pragma Iterators\n\nArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate =\n function (fn, reverse) {\n var entries = this.entries;\n for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n return false;\n }\n }\n };\n\nBitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate =\n function (fn, reverse) {\n var nodes = this.nodes;\n for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n var node = nodes[reverse ? maxIndex - ii : ii];\n if (node && node.iterate(fn, reverse) === false) {\n return false;\n }\n }\n };\n\n// eslint-disable-next-line no-unused-vars\nValueNode.prototype.iterate = function (fn, reverse) {\n return fn(this.entry);\n};\n\nvar MapIterator = /*@__PURE__*/(function (Iterator) {\n function MapIterator(map, type, reverse) {\n this._type = type;\n this._reverse = reverse;\n this._stack = map._root && mapIteratorFrame(map._root);\n }\n\n if ( Iterator ) MapIterator.__proto__ = Iterator;\n MapIterator.prototype = Object.create( Iterator && Iterator.prototype );\n MapIterator.prototype.constructor = MapIterator;\n\n MapIterator.prototype.next = function next () {\n var type = this._type;\n var stack = this._stack;\n while (stack) {\n var node = stack.node;\n var index = stack.index++;\n var maxIndex = (void 0);\n if (node.entry) {\n if (index === 0) {\n return mapIteratorValue(type, node.entry);\n }\n } else if (node.entries) {\n maxIndex = node.entries.length - 1;\n if (index <= maxIndex) {\n return mapIteratorValue(\n type,\n node.entries[this._reverse ? maxIndex - index : index]\n );\n }\n } else {\n maxIndex = node.nodes.length - 1;\n if (index <= maxIndex) {\n var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n if (subNode) {\n if (subNode.entry) {\n return mapIteratorValue(type, subNode.entry);\n }\n stack = this._stack = mapIteratorFrame(subNode, stack);\n }\n continue;\n }\n }\n stack = this._stack = this._stack.__prev;\n }\n return iteratorDone();\n };\n\n return MapIterator;\n}(Iterator));\n\nfunction mapIteratorValue(type, entry) {\n return iteratorValue(type, entry[0], entry[1]);\n}\n\nfunction mapIteratorFrame(node, prev) {\n return {\n node: node,\n index: 0,\n __prev: prev,\n };\n}\n\nfunction makeMap(size, root, ownerID, hash) {\n var map = Object.create(MapPrototype);\n map.size = size;\n map._root = root;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n}\n\nvar EMPTY_MAP;\nfunction emptyMap() {\n return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n}\n\nfunction updateMap(map, k, v) {\n var newRoot;\n var newSize;\n if (!map._root) {\n if (v === NOT_SET) {\n return map;\n }\n newSize = 1;\n newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);\n } else {\n var didChangeSize = MakeRef();\n var didAlter = MakeRef();\n newRoot = updateNode(\n map._root,\n map.__ownerID,\n 0,\n undefined,\n k,\n v,\n didChangeSize,\n didAlter\n );\n if (!didAlter.value) {\n return map;\n }\n newSize = map.size + (didChangeSize.value ? (v === NOT_SET ? -1 : 1) : 0);\n }\n if (map.__ownerID) {\n map.size = newSize;\n map._root = newRoot;\n map.__hash = undefined;\n map.__altered = true;\n return map;\n }\n return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n}\n\nfunction updateNode(\n node,\n ownerID,\n shift,\n keyHash,\n key,\n value,\n didChangeSize,\n didAlter\n) {\n if (!node) {\n if (value === NOT_SET) {\n return node;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return new ValueNode(ownerID, keyHash, [key, value]);\n }\n return node.update(\n ownerID,\n shift,\n keyHash,\n key,\n value,\n didChangeSize,\n didAlter\n );\n}\n\nfunction isLeafNode(node) {\n return (\n node.constructor === ValueNode || node.constructor === HashCollisionNode\n );\n}\n\nfunction mergeIntoNode(node, ownerID, shift, keyHash, entry) {\n if (node.keyHash === keyHash) {\n return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);\n }\n\n var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;\n var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\n var newNode;\n var nodes =\n idx1 === idx2\n ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)]\n : ((newNode = new ValueNode(ownerID, keyHash, entry)),\n idx1 < idx2 ? [node, newNode] : [newNode, node]);\n\n return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);\n}\n\nfunction createNodes(ownerID, entries, key, value) {\n if (!ownerID) {\n ownerID = new OwnerID();\n }\n var node = new ValueNode(ownerID, hash(key), [key, value]);\n for (var ii = 0; ii < entries.length; ii++) {\n var entry = entries[ii];\n node = node.update(ownerID, 0, undefined, entry[0], entry[1]);\n }\n return node;\n}\n\nfunction packNodes(ownerID, nodes, count, excluding) {\n var bitmap = 0;\n var packedII = 0;\n var packedNodes = new Array(count);\n for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {\n var node = nodes[ii];\n if (node !== undefined && ii !== excluding) {\n bitmap |= bit;\n packedNodes[packedII++] = node;\n }\n }\n return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n}\n\nfunction expandNodes(ownerID, nodes, bitmap, including, node) {\n var count = 0;\n var expandedNodes = new Array(SIZE);\n for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n }\n expandedNodes[including] = node;\n return new HashArrayMapNode(ownerID, count + 1, expandedNodes);\n}\n\nfunction popCount(x) {\n x -= (x >> 1) & 0x55555555;\n x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n x = (x + (x >> 4)) & 0x0f0f0f0f;\n x += x >> 8;\n x += x >> 16;\n return x & 0x7f;\n}\n\nfunction setAt(array, idx, val, canEdit) {\n var newArray = canEdit ? array : arrCopy(array);\n newArray[idx] = val;\n return newArray;\n}\n\nfunction spliceIn(array, idx, val, canEdit) {\n var newLen = array.length + 1;\n if (canEdit && idx + 1 === newLen) {\n array[idx] = val;\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n newArray[ii] = val;\n after = -1;\n } else {\n newArray[ii] = array[ii + after];\n }\n }\n return newArray;\n}\n\nfunction spliceOut(array, idx, canEdit) {\n var newLen = array.length - 1;\n if (canEdit && idx === newLen) {\n array.pop();\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n after = 1;\n }\n newArray[ii] = array[ii + after];\n }\n return newArray;\n}\n\nvar MAX_ARRAY_MAP_SIZE = SIZE / 4;\nvar MAX_BITMAP_INDEXED_SIZE = SIZE / 2;\nvar MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;\n\nvar IS_LIST_SYMBOL = '@@__IMMUTABLE_LIST__@@';\n\nfunction isList(maybeList) {\n return Boolean(maybeList && maybeList[IS_LIST_SYMBOL]);\n}\n\nvar List = /*@__PURE__*/(function (IndexedCollection) {\n function List(value) {\n var empty = emptyList();\n if (value === undefined || value === null) {\n return empty;\n }\n if (isList(value)) {\n return value;\n }\n var iter = IndexedCollection(value);\n var size = iter.size;\n if (size === 0) {\n return empty;\n }\n assertNotInfinite(size);\n if (size > 0 && size < SIZE) {\n return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));\n }\n return empty.withMutations(function (list) {\n list.setSize(size);\n iter.forEach(function (v, i) { return list.set(i, v); });\n });\n }\n\n if ( IndexedCollection ) List.__proto__ = IndexedCollection;\n List.prototype = Object.create( IndexedCollection && IndexedCollection.prototype );\n List.prototype.constructor = List;\n\n List.of = function of (/*...values*/) {\n return this(arguments);\n };\n\n List.prototype.toString = function toString () {\n return this.__toString('List [', ']');\n };\n\n // @pragma Access\n\n List.prototype.get = function get (index, notSetValue) {\n index = wrapIndex(this, index);\n if (index >= 0 && index < this.size) {\n index += this._origin;\n var node = listNodeFor(this, index);\n return node && node.array[index & MASK];\n }\n return notSetValue;\n };\n\n // @pragma Modification\n\n List.prototype.set = function set (index, value) {\n return updateList(this, index, value);\n };\n\n List.prototype.remove = function remove (index) {\n return !this.has(index)\n ? this\n : index === 0\n ? this.shift()\n : index === this.size - 1\n ? this.pop()\n : this.splice(index, 1);\n };\n\n List.prototype.insert = function insert (index, value) {\n return this.splice(index, 0, value);\n };\n\n List.prototype.clear = function clear () {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = this._origin = this._capacity = 0;\n this._level = SHIFT;\n this._root = this._tail = this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyList();\n };\n\n List.prototype.push = function push (/*...values*/) {\n var values = arguments;\n var oldSize = this.size;\n return this.withMutations(function (list) {\n setListBounds(list, 0, oldSize + values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(oldSize + ii, values[ii]);\n }\n });\n };\n\n List.prototype.pop = function pop () {\n return setListBounds(this, 0, -1);\n };\n\n List.prototype.unshift = function unshift (/*...values*/) {\n var values = arguments;\n return this.withMutations(function (list) {\n setListBounds(list, -values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(ii, values[ii]);\n }\n });\n };\n\n List.prototype.shift = function shift () {\n return setListBounds(this, 1);\n };\n\n // @pragma Composition\n\n List.prototype.concat = function concat (/*...collections*/) {\n var arguments$1 = arguments;\n\n var seqs = [];\n for (var i = 0; i < arguments.length; i++) {\n var argument = arguments$1[i];\n var seq = IndexedCollection(\n typeof argument !== 'string' && hasIterator(argument)\n ? argument\n : [argument]\n );\n if (seq.size !== 0) {\n seqs.push(seq);\n }\n }\n if (seqs.length === 0) {\n return this;\n }\n if (this.size === 0 && !this.__ownerID && seqs.length === 1) {\n return this.constructor(seqs[0]);\n }\n return this.withMutations(function (list) {\n seqs.forEach(function (seq) { return seq.forEach(function (value) { return list.push(value); }); });\n });\n };\n\n List.prototype.setSize = function setSize (size) {\n return setListBounds(this, 0, size);\n };\n\n List.prototype.map = function map (mapper, context) {\n var this$1$1 = this;\n\n return this.withMutations(function (list) {\n for (var i = 0; i < this$1$1.size; i++) {\n list.set(i, mapper.call(context, list.get(i), i, this$1$1));\n }\n });\n };\n\n // @pragma Iteration\n\n List.prototype.slice = function slice (begin, end) {\n var size = this.size;\n if (wholeSlice(begin, end, size)) {\n return this;\n }\n return setListBounds(\n this,\n resolveBegin(begin, size),\n resolveEnd(end, size)\n );\n };\n\n List.prototype.__iterator = function __iterator (type, reverse) {\n var index = reverse ? this.size : 0;\n var values = iterateList(this, reverse);\n return new Iterator(function () {\n var value = values();\n return value === DONE\n ? iteratorDone()\n : iteratorValue(type, reverse ? --index : index++, value);\n });\n };\n\n List.prototype.__iterate = function __iterate (fn, reverse) {\n var index = reverse ? this.size : 0;\n var values = iterateList(this, reverse);\n var value;\n while ((value = values()) !== DONE) {\n if (fn(value, reverse ? --index : index++, this) === false) {\n break;\n }\n }\n return index;\n };\n\n List.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n if (this.size === 0) {\n return emptyList();\n }\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeList(\n this._origin,\n this._capacity,\n this._level,\n this._root,\n this._tail,\n ownerID,\n this.__hash\n );\n };\n\n return List;\n}(IndexedCollection));\n\nList.isList = isList;\n\nvar ListPrototype = List.prototype;\nListPrototype[IS_LIST_SYMBOL] = true;\nListPrototype[DELETE] = ListPrototype.remove;\nListPrototype.merge = ListPrototype.concat;\nListPrototype.setIn = setIn;\nListPrototype.deleteIn = ListPrototype.removeIn = deleteIn;\nListPrototype.update = update;\nListPrototype.updateIn = updateIn;\nListPrototype.mergeIn = mergeIn;\nListPrototype.mergeDeepIn = mergeDeepIn;\nListPrototype.withMutations = withMutations;\nListPrototype.wasAltered = wasAltered;\nListPrototype.asImmutable = asImmutable;\nListPrototype['@@transducer/init'] = ListPrototype.asMutable = asMutable;\nListPrototype['@@transducer/step'] = function (result, arr) {\n return result.push(arr);\n};\nListPrototype['@@transducer/result'] = function (obj) {\n return obj.asImmutable();\n};\n\nvar VNode = function VNode(array, ownerID) {\n this.array = array;\n this.ownerID = ownerID;\n};\n\n// TODO: seems like these methods are very similar\n\nVNode.prototype.removeBefore = function removeBefore (ownerID, level, index) {\n if (index === level ? 1 << level : this.array.length === 0) {\n return this;\n }\n var originIndex = (index >>> level) & MASK;\n if (originIndex >= this.array.length) {\n return new VNode([], ownerID);\n }\n var removingFirst = originIndex === 0;\n var newChild;\n if (level > 0) {\n var oldChild = this.array[originIndex];\n newChild =\n oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n if (newChild === oldChild && removingFirst) {\n return this;\n }\n }\n if (removingFirst && !newChild) {\n return this;\n }\n var editable = editableVNode(this, ownerID);\n if (!removingFirst) {\n for (var ii = 0; ii < originIndex; ii++) {\n editable.array[ii] = undefined;\n }\n }\n if (newChild) {\n editable.array[originIndex] = newChild;\n }\n return editable;\n};\n\nVNode.prototype.removeAfter = function removeAfter (ownerID, level, index) {\n if (index === (level ? 1 << level : 0) || this.array.length === 0) {\n return this;\n }\n var sizeIndex = ((index - 1) >>> level) & MASK;\n if (sizeIndex >= this.array.length) {\n return this;\n }\n\n var newChild;\n if (level > 0) {\n var oldChild = this.array[sizeIndex];\n newChild =\n oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n if (newChild === oldChild && sizeIndex === this.array.length - 1) {\n return this;\n }\n }\n\n var editable = editableVNode(this, ownerID);\n editable.array.splice(sizeIndex + 1);\n if (newChild) {\n editable.array[sizeIndex] = newChild;\n }\n return editable;\n};\n\nvar DONE = {};\n\nfunction iterateList(list, reverse) {\n var left = list._origin;\n var right = list._capacity;\n var tailPos = getTailOffset(right);\n var tail = list._tail;\n\n return iterateNodeOrLeaf(list._root, list._level, 0);\n\n function iterateNodeOrLeaf(node, level, offset) {\n return level === 0\n ? iterateLeaf(node, offset)\n : iterateNode(node, level, offset);\n }\n\n function iterateLeaf(node, offset) {\n var array = offset === tailPos ? tail && tail.array : node && node.array;\n var from = offset > left ? 0 : left - offset;\n var to = right - offset;\n if (to > SIZE) {\n to = SIZE;\n }\n return function () {\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n return array && array[idx];\n };\n }\n\n function iterateNode(node, level, offset) {\n var values;\n var array = node && node.array;\n var from = offset > left ? 0 : (left - offset) >> level;\n var to = ((right - offset) >> level) + 1;\n if (to > SIZE) {\n to = SIZE;\n }\n return function () {\n while (true) {\n if (values) {\n var value = values();\n if (value !== DONE) {\n return value;\n }\n values = null;\n }\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n values = iterateNodeOrLeaf(\n array && array[idx],\n level - SHIFT,\n offset + (idx << level)\n );\n }\n };\n }\n}\n\nfunction makeList(origin, capacity, level, root, tail, ownerID, hash) {\n var list = Object.create(ListPrototype);\n list.size = capacity - origin;\n list._origin = origin;\n list._capacity = capacity;\n list._level = level;\n list._root = root;\n list._tail = tail;\n list.__ownerID = ownerID;\n list.__hash = hash;\n list.__altered = false;\n return list;\n}\n\nvar EMPTY_LIST;\nfunction emptyList() {\n return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n}\n\nfunction updateList(list, index, value) {\n index = wrapIndex(list, index);\n\n if (index !== index) {\n return list;\n }\n\n if (index >= list.size || index < 0) {\n return list.withMutations(function (list) {\n index < 0\n ? setListBounds(list, index).set(0, value)\n : setListBounds(list, 0, index + 1).set(index, value);\n });\n }\n\n index += list._origin;\n\n var newTail = list._tail;\n var newRoot = list._root;\n var didAlter = MakeRef();\n if (index >= getTailOffset(list._capacity)) {\n newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n } else {\n newRoot = updateVNode(\n newRoot,\n list.__ownerID,\n list._level,\n index,\n value,\n didAlter\n );\n }\n\n if (!didAlter.value) {\n return list;\n }\n\n if (list.__ownerID) {\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n}\n\nfunction updateVNode(node, ownerID, level, index, value, didAlter) {\n var idx = (index >>> level) & MASK;\n var nodeHas = node && idx < node.array.length;\n if (!nodeHas && value === undefined) {\n return node;\n }\n\n var newNode;\n\n if (level > 0) {\n var lowerNode = node && node.array[idx];\n var newLowerNode = updateVNode(\n lowerNode,\n ownerID,\n level - SHIFT,\n index,\n value,\n didAlter\n );\n if (newLowerNode === lowerNode) {\n return node;\n }\n newNode = editableVNode(node, ownerID);\n newNode.array[idx] = newLowerNode;\n return newNode;\n }\n\n if (nodeHas && node.array[idx] === value) {\n return node;\n }\n\n if (didAlter) {\n SetRef(didAlter);\n }\n\n newNode = editableVNode(node, ownerID);\n if (value === undefined && idx === newNode.array.length - 1) {\n newNode.array.pop();\n } else {\n newNode.array[idx] = value;\n }\n return newNode;\n}\n\nfunction editableVNode(node, ownerID) {\n if (ownerID && node && ownerID === node.ownerID) {\n return node;\n }\n return new VNode(node ? node.array.slice() : [], ownerID);\n}\n\nfunction listNodeFor(list, rawIndex) {\n if (rawIndex >= getTailOffset(list._capacity)) {\n return list._tail;\n }\n if (rawIndex < 1 << (list._level + SHIFT)) {\n var node = list._root;\n var level = list._level;\n while (node && level > 0) {\n node = node.array[(rawIndex >>> level) & MASK];\n level -= SHIFT;\n }\n return node;\n }\n}\n\nfunction setListBounds(list, begin, end) {\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin |= 0;\n }\n if (end !== undefined) {\n end |= 0;\n }\n var owner = list.__ownerID || new OwnerID();\n var oldOrigin = list._origin;\n var oldCapacity = list._capacity;\n var newOrigin = oldOrigin + begin;\n var newCapacity =\n end === undefined\n ? oldCapacity\n : end < 0\n ? oldCapacity + end\n : oldOrigin + end;\n if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n return list;\n }\n\n // If it's going to end after it starts, it's empty.\n if (newOrigin >= newCapacity) {\n return list.clear();\n }\n\n var newLevel = list._level;\n var newRoot = list._root;\n\n // New origin might need creating a higher root.\n var offsetShift = 0;\n while (newOrigin + offsetShift < 0) {\n newRoot = new VNode(\n newRoot && newRoot.array.length ? [undefined, newRoot] : [],\n owner\n );\n newLevel += SHIFT;\n offsetShift += 1 << newLevel;\n }\n if (offsetShift) {\n newOrigin += offsetShift;\n oldOrigin += offsetShift;\n newCapacity += offsetShift;\n oldCapacity += offsetShift;\n }\n\n var oldTailOffset = getTailOffset(oldCapacity);\n var newTailOffset = getTailOffset(newCapacity);\n\n // New size might need creating a higher root.\n while (newTailOffset >= 1 << (newLevel + SHIFT)) {\n newRoot = new VNode(\n newRoot && newRoot.array.length ? [newRoot] : [],\n owner\n );\n newLevel += SHIFT;\n }\n\n // Locate or create the new tail.\n var oldTail = list._tail;\n var newTail =\n newTailOffset < oldTailOffset\n ? listNodeFor(list, newCapacity - 1)\n : newTailOffset > oldTailOffset\n ? new VNode([], owner)\n : oldTail;\n\n // Merge Tail into tree.\n if (\n oldTail &&\n newTailOffset > oldTailOffset &&\n newOrigin < oldCapacity &&\n oldTail.array.length\n ) {\n newRoot = editableVNode(newRoot, owner);\n var node = newRoot;\n for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n var idx = (oldTailOffset >>> level) & MASK;\n node = node.array[idx] = editableVNode(node.array[idx], owner);\n }\n node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;\n }\n\n // If the size has been reduced, there's a chance the tail needs to be trimmed.\n if (newCapacity < oldCapacity) {\n newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n }\n\n // If the new origin is within the tail, then we do not need a root.\n if (newOrigin >= newTailOffset) {\n newOrigin -= newTailOffset;\n newCapacity -= newTailOffset;\n newLevel = SHIFT;\n newRoot = null;\n newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\n // Otherwise, if the root has been trimmed, garbage collect.\n } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n offsetShift = 0;\n\n // Identify the new top root node of the subtree of the old root.\n while (newRoot) {\n var beginIndex = (newOrigin >>> newLevel) & MASK;\n if ((beginIndex !== newTailOffset >>> newLevel) & MASK) {\n break;\n }\n if (beginIndex) {\n offsetShift += (1 << newLevel) * beginIndex;\n }\n newLevel -= SHIFT;\n newRoot = newRoot.array[beginIndex];\n }\n\n // Trim the new sides of the new root.\n if (newRoot && newOrigin > oldOrigin) {\n newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n }\n if (newRoot && newTailOffset < oldTailOffset) {\n newRoot = newRoot.removeAfter(\n owner,\n newLevel,\n newTailOffset - offsetShift\n );\n }\n if (offsetShift) {\n newOrigin -= offsetShift;\n newCapacity -= offsetShift;\n }\n }\n\n if (list.__ownerID) {\n list.size = newCapacity - newOrigin;\n list._origin = newOrigin;\n list._capacity = newCapacity;\n list._level = newLevel;\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n}\n\nfunction getTailOffset(size) {\n return size < SIZE ? 0 : ((size - 1) >>> SHIFT) << SHIFT;\n}\n\nvar OrderedMap = /*@__PURE__*/(function (Map) {\n function OrderedMap(value) {\n return value === undefined || value === null\n ? emptyOrderedMap()\n : isOrderedMap(value)\n ? value\n : emptyOrderedMap().withMutations(function (map) {\n var iter = KeyedCollection(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v, k) { return map.set(k, v); });\n });\n }\n\n if ( Map ) OrderedMap.__proto__ = Map;\n OrderedMap.prototype = Object.create( Map && Map.prototype );\n OrderedMap.prototype.constructor = OrderedMap;\n\n OrderedMap.of = function of (/*...values*/) {\n return this(arguments);\n };\n\n OrderedMap.prototype.toString = function toString () {\n return this.__toString('OrderedMap {', '}');\n };\n\n // @pragma Access\n\n OrderedMap.prototype.get = function get (k, notSetValue) {\n var index = this._map.get(k);\n return index !== undefined ? this._list.get(index)[1] : notSetValue;\n };\n\n // @pragma Modification\n\n OrderedMap.prototype.clear = function clear () {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._map.clear();\n this._list.clear();\n this.__altered = true;\n return this;\n }\n return emptyOrderedMap();\n };\n\n OrderedMap.prototype.set = function set (k, v) {\n return updateOrderedMap(this, k, v);\n };\n\n OrderedMap.prototype.remove = function remove (k) {\n return updateOrderedMap(this, k, NOT_SET);\n };\n\n OrderedMap.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1$1 = this;\n\n return this._list.__iterate(\n function (entry) { return entry && fn(entry[1], entry[0], this$1$1); },\n reverse\n );\n };\n\n OrderedMap.prototype.__iterator = function __iterator (type, reverse) {\n return this._list.fromEntrySeq().__iterator(type, reverse);\n };\n\n OrderedMap.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n var newList = this._list.__ensureOwner(ownerID);\n if (!ownerID) {\n if (this.size === 0) {\n return emptyOrderedMap();\n }\n this.__ownerID = ownerID;\n this.__altered = false;\n this._map = newMap;\n this._list = newList;\n return this;\n }\n return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n };\n\n return OrderedMap;\n}(Map));\n\nOrderedMap.isOrderedMap = isOrderedMap;\n\nOrderedMap.prototype[IS_ORDERED_SYMBOL] = true;\nOrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n\nfunction makeOrderedMap(map, list, ownerID, hash) {\n var omap = Object.create(OrderedMap.prototype);\n omap.size = map ? map.size : 0;\n omap._map = map;\n omap._list = list;\n omap.__ownerID = ownerID;\n omap.__hash = hash;\n omap.__altered = false;\n return omap;\n}\n\nvar EMPTY_ORDERED_MAP;\nfunction emptyOrderedMap() {\n return (\n EMPTY_ORDERED_MAP ||\n (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()))\n );\n}\n\nfunction updateOrderedMap(omap, k, v) {\n var map = omap._map;\n var list = omap._list;\n var i = map.get(k);\n var has = i !== undefined;\n var newMap;\n var newList;\n if (v === NOT_SET) {\n // removed\n if (!has) {\n return omap;\n }\n if (list.size >= SIZE && list.size >= map.size * 2) {\n newList = list.filter(function (entry, idx) { return entry !== undefined && i !== idx; });\n newMap = newList\n .toKeyedSeq()\n .map(function (entry) { return entry[0]; })\n .flip()\n .toMap();\n if (omap.__ownerID) {\n newMap.__ownerID = newList.__ownerID = omap.__ownerID;\n }\n } else {\n newMap = map.remove(k);\n newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);\n }\n } else if (has) {\n if (v === list.get(i)[1]) {\n return omap;\n }\n newMap = map;\n newList = list.set(i, [k, v]);\n } else {\n newMap = map.set(k, list.size);\n newList = list.set(list.size, [k, v]);\n }\n if (omap.__ownerID) {\n omap.size = newMap.size;\n omap._map = newMap;\n omap._list = newList;\n omap.__hash = undefined;\n omap.__altered = true;\n return omap;\n }\n return makeOrderedMap(newMap, newList);\n}\n\nvar IS_STACK_SYMBOL = '@@__IMMUTABLE_STACK__@@';\n\nfunction isStack(maybeStack) {\n return Boolean(maybeStack && maybeStack[IS_STACK_SYMBOL]);\n}\n\nvar Stack = /*@__PURE__*/(function (IndexedCollection) {\n function Stack(value) {\n return value === undefined || value === null\n ? emptyStack()\n : isStack(value)\n ? value\n : emptyStack().pushAll(value);\n }\n\n if ( IndexedCollection ) Stack.__proto__ = IndexedCollection;\n Stack.prototype = Object.create( IndexedCollection && IndexedCollection.prototype );\n Stack.prototype.constructor = Stack;\n\n Stack.of = function of (/*...values*/) {\n return this(arguments);\n };\n\n Stack.prototype.toString = function toString () {\n return this.__toString('Stack [', ']');\n };\n\n // @pragma Access\n\n Stack.prototype.get = function get (index, notSetValue) {\n var head = this._head;\n index = wrapIndex(this, index);\n while (head && index--) {\n head = head.next;\n }\n return head ? head.value : notSetValue;\n };\n\n Stack.prototype.peek = function peek () {\n return this._head && this._head.value;\n };\n\n // @pragma Modification\n\n Stack.prototype.push = function push (/*...values*/) {\n var arguments$1 = arguments;\n\n if (arguments.length === 0) {\n return this;\n }\n var newSize = this.size + arguments.length;\n var head = this._head;\n for (var ii = arguments.length - 1; ii >= 0; ii--) {\n head = {\n value: arguments$1[ii],\n next: head,\n };\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pushAll = function pushAll (iter) {\n iter = IndexedCollection(iter);\n if (iter.size === 0) {\n return this;\n }\n if (this.size === 0 && isStack(iter)) {\n return iter;\n }\n assertNotInfinite(iter.size);\n var newSize = this.size;\n var head = this._head;\n iter.__iterate(function (value) {\n newSize++;\n head = {\n value: value,\n next: head,\n };\n }, /* reverse */ true);\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pop = function pop () {\n return this.slice(1);\n };\n\n Stack.prototype.clear = function clear () {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._head = undefined;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyStack();\n };\n\n Stack.prototype.slice = function slice (begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n var resolvedBegin = resolveBegin(begin, this.size);\n var resolvedEnd = resolveEnd(end, this.size);\n if (resolvedEnd !== this.size) {\n // super.slice(begin, end);\n return IndexedCollection.prototype.slice.call(this, begin, end);\n }\n var newSize = this.size - resolvedBegin;\n var head = this._head;\n while (resolvedBegin--) {\n head = head.next;\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n // @pragma Mutability\n\n Stack.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n if (this.size === 0) {\n return emptyStack();\n }\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeStack(this.size, this._head, ownerID, this.__hash);\n };\n\n // @pragma Iteration\n\n Stack.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1$1 = this;\n\n if (reverse) {\n return new ArraySeq(this.toArray()).__iterate(\n function (v, k) { return fn(v, k, this$1$1); },\n reverse\n );\n }\n var iterations = 0;\n var node = this._head;\n while (node) {\n if (fn(node.value, iterations++, this) === false) {\n break;\n }\n node = node.next;\n }\n return iterations;\n };\n\n Stack.prototype.__iterator = function __iterator (type, reverse) {\n if (reverse) {\n return new ArraySeq(this.toArray()).__iterator(type, reverse);\n }\n var iterations = 0;\n var node = this._head;\n return new Iterator(function () {\n if (node) {\n var value = node.value;\n node = node.next;\n return iteratorValue(type, iterations++, value);\n }\n return iteratorDone();\n });\n };\n\n return Stack;\n}(IndexedCollection));\n\nStack.isStack = isStack;\n\nvar StackPrototype = Stack.prototype;\nStackPrototype[IS_STACK_SYMBOL] = true;\nStackPrototype.shift = StackPrototype.pop;\nStackPrototype.unshift = StackPrototype.push;\nStackPrototype.unshiftAll = StackPrototype.pushAll;\nStackPrototype.withMutations = withMutations;\nStackPrototype.wasAltered = wasAltered;\nStackPrototype.asImmutable = asImmutable;\nStackPrototype['@@transducer/init'] = StackPrototype.asMutable = asMutable;\nStackPrototype['@@transducer/step'] = function (result, arr) {\n return result.unshift(arr);\n};\nStackPrototype['@@transducer/result'] = function (obj) {\n return obj.asImmutable();\n};\n\nfunction makeStack(size, head, ownerID, hash) {\n var map = Object.create(StackPrototype);\n map.size = size;\n map._head = head;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n}\n\nvar EMPTY_STACK;\nfunction emptyStack() {\n return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n}\n\nvar IS_SET_SYMBOL = '@@__IMMUTABLE_SET__@@';\n\nfunction isSet(maybeSet) {\n return Boolean(maybeSet && maybeSet[IS_SET_SYMBOL]);\n}\n\nfunction isOrderedSet(maybeOrderedSet) {\n return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);\n}\n\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (\n !isCollection(b) ||\n (a.size !== undefined && b.size !== undefined && a.size !== b.size) ||\n (a.__hash !== undefined &&\n b.__hash !== undefined &&\n a.__hash !== b.__hash) ||\n isKeyed(a) !== isKeyed(b) ||\n isIndexed(a) !== isIndexed(b) ||\n isOrdered(a) !== isOrdered(b)\n ) {\n return false;\n }\n\n if (a.size === 0 && b.size === 0) {\n return true;\n }\n\n var notAssociative = !isAssociative(a);\n\n if (isOrdered(a)) {\n var entries = a.entries();\n return (\n b.every(function (v, k) {\n var entry = entries.next().value;\n return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));\n }) && entries.next().done\n );\n }\n\n var flipped = false;\n\n if (a.size === undefined) {\n if (b.size === undefined) {\n if (typeof a.cacheResult === 'function') {\n a.cacheResult();\n }\n } else {\n flipped = true;\n var _ = a;\n a = b;\n b = _;\n }\n }\n\n var allEqual = true;\n var bSize = b.__iterate(function (v, k) {\n if (\n notAssociative\n ? !a.has(v)\n : flipped\n ? !is(v, a.get(k, NOT_SET))\n : !is(a.get(k, NOT_SET), v)\n ) {\n allEqual = false;\n return false;\n }\n });\n\n return allEqual && a.size === bSize;\n}\n\nfunction mixin(ctor, methods) {\n var keyCopier = function (key) {\n ctor.prototype[key] = methods[key];\n };\n Object.keys(methods).forEach(keyCopier);\n Object.getOwnPropertySymbols &&\n Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n return ctor;\n}\n\nfunction toJS(value) {\n if (!value || typeof value !== 'object') {\n return value;\n }\n if (!isCollection(value)) {\n if (!isDataStructure(value)) {\n return value;\n }\n value = Seq(value);\n }\n if (isKeyed(value)) {\n var result$1 = {};\n value.__iterate(function (v, k) {\n result$1[k] = toJS(v);\n });\n return result$1;\n }\n var result = [];\n value.__iterate(function (v) {\n result.push(toJS(v));\n });\n return result;\n}\n\nvar Set = /*@__PURE__*/(function (SetCollection) {\n function Set(value) {\n return value === undefined || value === null\n ? emptySet()\n : isSet(value) && !isOrdered(value)\n ? value\n : emptySet().withMutations(function (set) {\n var iter = SetCollection(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v) { return set.add(v); });\n });\n }\n\n if ( SetCollection ) Set.__proto__ = SetCollection;\n Set.prototype = Object.create( SetCollection && SetCollection.prototype );\n Set.prototype.constructor = Set;\n\n Set.of = function of (/*...values*/) {\n return this(arguments);\n };\n\n Set.fromKeys = function fromKeys (value) {\n return this(KeyedCollection(value).keySeq());\n };\n\n Set.intersect = function intersect (sets) {\n sets = Collection(sets).toArray();\n return sets.length\n ? SetPrototype.intersect.apply(Set(sets.pop()), sets)\n : emptySet();\n };\n\n Set.union = function union (sets) {\n sets = Collection(sets).toArray();\n return sets.length\n ? SetPrototype.union.apply(Set(sets.pop()), sets)\n : emptySet();\n };\n\n Set.prototype.toString = function toString () {\n return this.__toString('Set {', '}');\n };\n\n // @pragma Access\n\n Set.prototype.has = function has (value) {\n return this._map.has(value);\n };\n\n // @pragma Modification\n\n Set.prototype.add = function add (value) {\n return updateSet(this, this._map.set(value, value));\n };\n\n Set.prototype.remove = function remove (value) {\n return updateSet(this, this._map.remove(value));\n };\n\n Set.prototype.clear = function clear () {\n return updateSet(this, this._map.clear());\n };\n\n // @pragma Composition\n\n Set.prototype.map = function map (mapper, context) {\n var this$1$1 = this;\n\n // keep track if the set is altered by the map function\n var didChanges = false;\n\n var newMap = updateSet(\n this,\n this._map.mapEntries(function (ref) {\n var v = ref[1];\n\n var mapped = mapper.call(context, v, v, this$1$1);\n\n if (mapped !== v) {\n didChanges = true;\n }\n\n return [mapped, mapped];\n }, context)\n );\n\n return didChanges ? newMap : this;\n };\n\n Set.prototype.union = function union () {\n var iters = [], len = arguments.length;\n while ( len-- ) iters[ len ] = arguments[ len ];\n\n iters = iters.filter(function (x) { return x.size !== 0; });\n if (iters.length === 0) {\n return this;\n }\n if (this.size === 0 && !this.__ownerID && iters.length === 1) {\n return this.constructor(iters[0]);\n }\n return this.withMutations(function (set) {\n for (var ii = 0; ii < iters.length; ii++) {\n if (typeof iters[ii] === 'string') {\n set.add(iters[ii]);\n } else {\n SetCollection(iters[ii]).forEach(function (value) { return set.add(value); });\n }\n }\n });\n };\n\n Set.prototype.intersect = function intersect () {\n var iters = [], len = arguments.length;\n while ( len-- ) iters[ len ] = arguments[ len ];\n\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function (iter) { return SetCollection(iter); });\n var toRemove = [];\n this.forEach(function (value) {\n if (!iters.every(function (iter) { return iter.includes(value); })) {\n toRemove.push(value);\n }\n });\n return this.withMutations(function (set) {\n toRemove.forEach(function (value) {\n set.remove(value);\n });\n });\n };\n\n Set.prototype.subtract = function subtract () {\n var iters = [], len = arguments.length;\n while ( len-- ) iters[ len ] = arguments[ len ];\n\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function (iter) { return SetCollection(iter); });\n var toRemove = [];\n this.forEach(function (value) {\n if (iters.some(function (iter) { return iter.includes(value); })) {\n toRemove.push(value);\n }\n });\n return this.withMutations(function (set) {\n toRemove.forEach(function (value) {\n set.remove(value);\n });\n });\n };\n\n Set.prototype.sort = function sort (comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator));\n };\n\n Set.prototype.sortBy = function sortBy (mapper, comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator, mapper));\n };\n\n Set.prototype.wasAltered = function wasAltered () {\n return this._map.wasAltered();\n };\n\n Set.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1$1 = this;\n\n return this._map.__iterate(function (k) { return fn(k, k, this$1$1); }, reverse);\n };\n\n Set.prototype.__iterator = function __iterator (type, reverse) {\n return this._map.__iterator(type, reverse);\n };\n\n Set.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n if (this.size === 0) {\n return this.__empty();\n }\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return this.__make(newMap, ownerID);\n };\n\n return Set;\n}(SetCollection));\n\nSet.isSet = isSet;\n\nvar SetPrototype = Set.prototype;\nSetPrototype[IS_SET_SYMBOL] = true;\nSetPrototype[DELETE] = SetPrototype.remove;\nSetPrototype.merge = SetPrototype.concat = SetPrototype.union;\nSetPrototype.withMutations = withMutations;\nSetPrototype.asImmutable = asImmutable;\nSetPrototype['@@transducer/init'] = SetPrototype.asMutable = asMutable;\nSetPrototype['@@transducer/step'] = function (result, arr) {\n return result.add(arr);\n};\nSetPrototype['@@transducer/result'] = function (obj) {\n return obj.asImmutable();\n};\n\nSetPrototype.__empty = emptySet;\nSetPrototype.__make = makeSet;\n\nfunction updateSet(set, newMap) {\n if (set.__ownerID) {\n set.size = newMap.size;\n set._map = newMap;\n return set;\n }\n return newMap === set._map\n ? set\n : newMap.size === 0\n ? set.__empty()\n : set.__make(newMap);\n}\n\nfunction makeSet(map, ownerID) {\n var set = Object.create(SetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n}\n\nvar EMPTY_SET;\nfunction emptySet() {\n return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n}\n\n/**\n * Returns a lazy seq of nums from start (inclusive) to end\n * (exclusive), by step, where start defaults to 0, step to 1, and end to\n * infinity. When start is equal to end, returns empty list.\n */\nvar Range = /*@__PURE__*/(function (IndexedSeq) {\n function Range(start, end, step) {\n if (!(this instanceof Range)) {\n return new Range(start, end, step);\n }\n invariant(step !== 0, 'Cannot step a Range by 0');\n start = start || 0;\n if (end === undefined) {\n end = Infinity;\n }\n step = step === undefined ? 1 : Math.abs(step);\n if (end < start) {\n step = -step;\n }\n this._start = start;\n this._end = end;\n this._step = step;\n this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n if (this.size === 0) {\n if (EMPTY_RANGE) {\n return EMPTY_RANGE;\n }\n EMPTY_RANGE = this;\n }\n }\n\n if ( IndexedSeq ) Range.__proto__ = IndexedSeq;\n Range.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );\n Range.prototype.constructor = Range;\n\n Range.prototype.toString = function toString () {\n if (this.size === 0) {\n return 'Range []';\n }\n return (\n 'Range [ ' +\n this._start +\n '...' +\n this._end +\n (this._step !== 1 ? ' by ' + this._step : '') +\n ' ]'\n );\n };\n\n Range.prototype.get = function get (index, notSetValue) {\n return this.has(index)\n ? this._start + wrapIndex(this, index) * this._step\n : notSetValue;\n };\n\n Range.prototype.includes = function includes (searchValue) {\n var possibleIndex = (searchValue - this._start) / this._step;\n return (\n possibleIndex >= 0 &&\n possibleIndex < this.size &&\n possibleIndex === Math.floor(possibleIndex)\n );\n };\n\n Range.prototype.slice = function slice (begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n begin = resolveBegin(begin, this.size);\n end = resolveEnd(end, this.size);\n if (end <= begin) {\n return new Range(0, 0);\n }\n return new Range(\n this.get(begin, this._end),\n this.get(end, this._end),\n this._step\n );\n };\n\n Range.prototype.indexOf = function indexOf (searchValue) {\n var offsetValue = searchValue - this._start;\n if (offsetValue % this._step === 0) {\n var index = offsetValue / this._step;\n if (index >= 0 && index < this.size) {\n return index;\n }\n }\n return -1;\n };\n\n Range.prototype.lastIndexOf = function lastIndexOf (searchValue) {\n return this.indexOf(searchValue);\n };\n\n Range.prototype.__iterate = function __iterate (fn, reverse) {\n var size = this.size;\n var step = this._step;\n var value = reverse ? this._start + (size - 1) * step : this._start;\n var i = 0;\n while (i !== size) {\n if (fn(value, reverse ? size - ++i : i++, this) === false) {\n break;\n }\n value += reverse ? -step : step;\n }\n return i;\n };\n\n Range.prototype.__iterator = function __iterator (type, reverse) {\n var size = this.size;\n var step = this._step;\n var value = reverse ? this._start + (size - 1) * step : this._start;\n var i = 0;\n return new Iterator(function () {\n if (i === size) {\n return iteratorDone();\n }\n var v = value;\n value += reverse ? -step : step;\n return iteratorValue(type, reverse ? size - ++i : i++, v);\n });\n };\n\n Range.prototype.equals = function equals (other) {\n return other instanceof Range\n ? this._start === other._start &&\n this._end === other._end &&\n this._step === other._step\n : deepEqual(this, other);\n };\n\n return Range;\n}(IndexedSeq));\n\nvar EMPTY_RANGE;\n\nfunction getIn$1(collection, searchKeyPath, notSetValue) {\n var keyPath = coerceKeyPath(searchKeyPath);\n var i = 0;\n while (i !== keyPath.length) {\n collection = get(collection, keyPath[i++], NOT_SET);\n if (collection === NOT_SET) {\n return notSetValue;\n }\n }\n return collection;\n}\n\nfunction getIn(searchKeyPath, notSetValue) {\n return getIn$1(this, searchKeyPath, notSetValue);\n}\n\nfunction hasIn$1(collection, keyPath) {\n return getIn$1(collection, keyPath, NOT_SET) !== NOT_SET;\n}\n\nfunction hasIn(searchKeyPath) {\n return hasIn$1(this, searchKeyPath);\n}\n\nfunction toObject() {\n assertNotInfinite(this.size);\n var object = {};\n this.__iterate(function (v, k) {\n object[k] = v;\n });\n return object;\n}\n\n// Note: all of these methods are deprecated.\nCollection.isIterable = isCollection;\nCollection.isKeyed = isKeyed;\nCollection.isIndexed = isIndexed;\nCollection.isAssociative = isAssociative;\nCollection.isOrdered = isOrdered;\n\nCollection.Iterator = Iterator;\n\nmixin(Collection, {\n // ### Conversion to other types\n\n toArray: function toArray() {\n assertNotInfinite(this.size);\n var array = new Array(this.size || 0);\n var useTuples = isKeyed(this);\n var i = 0;\n this.__iterate(function (v, k) {\n // Keyed collections produce an array of tuples.\n array[i++] = useTuples ? [k, v] : v;\n });\n return array;\n },\n\n toIndexedSeq: function toIndexedSeq() {\n return new ToIndexedSequence(this);\n },\n\n toJS: function toJS$1() {\n return toJS(this);\n },\n\n toKeyedSeq: function toKeyedSeq() {\n return new ToKeyedSequence(this, true);\n },\n\n toMap: function toMap() {\n // Use Late Binding here to solve the circular dependency.\n return Map(this.toKeyedSeq());\n },\n\n toObject: toObject,\n\n toOrderedMap: function toOrderedMap() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedMap(this.toKeyedSeq());\n },\n\n toOrderedSet: function toOrderedSet() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedSet(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSet: function toSet() {\n // Use Late Binding here to solve the circular dependency.\n return Set(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSetSeq: function toSetSeq() {\n return new ToSetSequence(this);\n },\n\n toSeq: function toSeq() {\n return isIndexed(this)\n ? this.toIndexedSeq()\n : isKeyed(this)\n ? this.toKeyedSeq()\n : this.toSetSeq();\n },\n\n toStack: function toStack() {\n // Use Late Binding here to solve the circular dependency.\n return Stack(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toList: function toList() {\n // Use Late Binding here to solve the circular dependency.\n return List(isKeyed(this) ? this.valueSeq() : this);\n },\n\n // ### Common JavaScript methods and properties\n\n toString: function toString() {\n return '[Collection]';\n },\n\n __toString: function __toString(head, tail) {\n if (this.size === 0) {\n return head + tail;\n }\n return (\n head +\n ' ' +\n this.toSeq().map(this.__toStringMapper).join(', ') +\n ' ' +\n tail\n );\n },\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n concat: function concat() {\n var values = [], len = arguments.length;\n while ( len-- ) values[ len ] = arguments[ len ];\n\n return reify(this, concatFactory(this, values));\n },\n\n includes: function includes(searchValue) {\n return this.some(function (value) { return is(value, searchValue); });\n },\n\n entries: function entries() {\n return this.__iterator(ITERATE_ENTRIES);\n },\n\n every: function every(predicate, context) {\n assertNotInfinite(this.size);\n var returnValue = true;\n this.__iterate(function (v, k, c) {\n if (!predicate.call(context, v, k, c)) {\n returnValue = false;\n return false;\n }\n });\n return returnValue;\n },\n\n filter: function filter(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, true));\n },\n\n partition: function partition(predicate, context) {\n return partitionFactory(this, predicate, context);\n },\n\n find: function find(predicate, context, notSetValue) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[1] : notSetValue;\n },\n\n forEach: function forEach(sideEffect, context) {\n assertNotInfinite(this.size);\n return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n },\n\n join: function join(separator) {\n assertNotInfinite(this.size);\n separator = separator !== undefined ? '' + separator : ',';\n var joined = '';\n var isFirst = true;\n this.__iterate(function (v) {\n isFirst ? (isFirst = false) : (joined += separator);\n joined += v !== null && v !== undefined ? v.toString() : '';\n });\n return joined;\n },\n\n keys: function keys() {\n return this.__iterator(ITERATE_KEYS);\n },\n\n map: function map(mapper, context) {\n return reify(this, mapFactory(this, mapper, context));\n },\n\n reduce: function reduce$1(reducer, initialReduction, context) {\n return reduce(\n this,\n reducer,\n initialReduction,\n context,\n arguments.length < 2,\n false\n );\n },\n\n reduceRight: function reduceRight(reducer, initialReduction, context) {\n return reduce(\n this,\n reducer,\n initialReduction,\n context,\n arguments.length < 2,\n true\n );\n },\n\n reverse: function reverse() {\n return reify(this, reverseFactory(this, true));\n },\n\n slice: function slice(begin, end) {\n return reify(this, sliceFactory(this, begin, end, true));\n },\n\n some: function some(predicate, context) {\n assertNotInfinite(this.size);\n var returnValue = false;\n this.__iterate(function (v, k, c) {\n if (predicate.call(context, v, k, c)) {\n returnValue = true;\n return false;\n }\n });\n return returnValue;\n },\n\n sort: function sort(comparator) {\n return reify(this, sortFactory(this, comparator));\n },\n\n values: function values() {\n return this.__iterator(ITERATE_VALUES);\n },\n\n // ### More sequential methods\n\n butLast: function butLast() {\n return this.slice(0, -1);\n },\n\n isEmpty: function isEmpty() {\n return this.size !== undefined ? this.size === 0 : !this.some(function () { return true; });\n },\n\n count: function count(predicate, context) {\n return ensureSize(\n predicate ? this.toSeq().filter(predicate, context) : this\n );\n },\n\n countBy: function countBy(grouper, context) {\n return countByFactory(this, grouper, context);\n },\n\n equals: function equals(other) {\n return deepEqual(this, other);\n },\n\n entrySeq: function entrySeq() {\n var collection = this;\n if (collection._cache) {\n // We cache as an entries array, so we can just return the cache!\n return new ArraySeq(collection._cache);\n }\n var entriesSequence = collection.toSeq().map(entryMapper).toIndexedSeq();\n entriesSequence.fromEntrySeq = function () { return collection.toSeq(); };\n return entriesSequence;\n },\n\n filterNot: function filterNot(predicate, context) {\n return this.filter(not(predicate), context);\n },\n\n findEntry: function findEntry(predicate, context, notSetValue) {\n var found = notSetValue;\n this.__iterate(function (v, k, c) {\n if (predicate.call(context, v, k, c)) {\n found = [k, v];\n return false;\n }\n });\n return found;\n },\n\n findKey: function findKey(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry && entry[0];\n },\n\n findLast: function findLast(predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n },\n\n findLastEntry: function findLastEntry(predicate, context, notSetValue) {\n return this.toKeyedSeq()\n .reverse()\n .findEntry(predicate, context, notSetValue);\n },\n\n findLastKey: function findLastKey(predicate, context) {\n return this.toKeyedSeq().reverse().findKey(predicate, context);\n },\n\n first: function first(notSetValue) {\n return this.find(returnTrue, null, notSetValue);\n },\n\n flatMap: function flatMap(mapper, context) {\n return reify(this, flatMapFactory(this, mapper, context));\n },\n\n flatten: function flatten(depth) {\n return reify(this, flattenFactory(this, depth, true));\n },\n\n fromEntrySeq: function fromEntrySeq() {\n return new FromEntriesSequence(this);\n },\n\n get: function get(searchKey, notSetValue) {\n return this.find(function (_, key) { return is(key, searchKey); }, undefined, notSetValue);\n },\n\n getIn: getIn,\n\n groupBy: function groupBy(grouper, context) {\n return groupByFactory(this, grouper, context);\n },\n\n has: function has(searchKey) {\n return this.get(searchKey, NOT_SET) !== NOT_SET;\n },\n\n hasIn: hasIn,\n\n isSubset: function isSubset(iter) {\n iter = typeof iter.includes === 'function' ? iter : Collection(iter);\n return this.every(function (value) { return iter.includes(value); });\n },\n\n isSuperset: function isSuperset(iter) {\n iter = typeof iter.isSubset === 'function' ? iter : Collection(iter);\n return iter.isSubset(this);\n },\n\n keyOf: function keyOf(searchValue) {\n return this.findKey(function (value) { return is(value, searchValue); });\n },\n\n keySeq: function keySeq() {\n return this.toSeq().map(keyMapper).toIndexedSeq();\n },\n\n last: function last(notSetValue) {\n return this.toSeq().reverse().first(notSetValue);\n },\n\n lastKeyOf: function lastKeyOf(searchValue) {\n return this.toKeyedSeq().reverse().keyOf(searchValue);\n },\n\n max: function max(comparator) {\n return maxFactory(this, comparator);\n },\n\n maxBy: function maxBy(mapper, comparator) {\n return maxFactory(this, comparator, mapper);\n },\n\n min: function min(comparator) {\n return maxFactory(\n this,\n comparator ? neg(comparator) : defaultNegComparator\n );\n },\n\n minBy: function minBy(mapper, comparator) {\n return maxFactory(\n this,\n comparator ? neg(comparator) : defaultNegComparator,\n mapper\n );\n },\n\n rest: function rest() {\n return this.slice(1);\n },\n\n skip: function skip(amount) {\n return amount === 0 ? this : this.slice(Math.max(0, amount));\n },\n\n skipLast: function skipLast(amount) {\n return amount === 0 ? this : this.slice(0, -Math.max(0, amount));\n },\n\n skipWhile: function skipWhile(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, true));\n },\n\n skipUntil: function skipUntil(predicate, context) {\n return this.skipWhile(not(predicate), context);\n },\n\n sortBy: function sortBy(mapper, comparator) {\n return reify(this, sortFactory(this, comparator, mapper));\n },\n\n take: function take(amount) {\n return this.slice(0, Math.max(0, amount));\n },\n\n takeLast: function takeLast(amount) {\n return this.slice(-Math.max(0, amount));\n },\n\n takeWhile: function takeWhile(predicate, context) {\n return reify(this, takeWhileFactory(this, predicate, context));\n },\n\n takeUntil: function takeUntil(predicate, context) {\n return this.takeWhile(not(predicate), context);\n },\n\n update: function update(fn) {\n return fn(this);\n },\n\n valueSeq: function valueSeq() {\n return this.toIndexedSeq();\n },\n\n // ### Hashable Object\n\n hashCode: function hashCode() {\n return this.__hash || (this.__hash = hashCollection(this));\n },\n\n // ### Internal\n\n // abstract __iterate(fn, reverse)\n\n // abstract __iterator(type, reverse)\n});\n\nvar CollectionPrototype = Collection.prototype;\nCollectionPrototype[IS_COLLECTION_SYMBOL] = true;\nCollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.values;\nCollectionPrototype.toJSON = CollectionPrototype.toArray;\nCollectionPrototype.__toStringMapper = quoteString;\nCollectionPrototype.inspect = CollectionPrototype.toSource = function () {\n return this.toString();\n};\nCollectionPrototype.chain = CollectionPrototype.flatMap;\nCollectionPrototype.contains = CollectionPrototype.includes;\n\nmixin(KeyedCollection, {\n // ### More sequential methods\n\n flip: function flip() {\n return reify(this, flipFactory(this));\n },\n\n mapEntries: function mapEntries(mapper, context) {\n var this$1$1 = this;\n\n var iterations = 0;\n return reify(\n this,\n this.toSeq()\n .map(function (v, k) { return mapper.call(context, [k, v], iterations++, this$1$1); })\n .fromEntrySeq()\n );\n },\n\n mapKeys: function mapKeys(mapper, context) {\n var this$1$1 = this;\n\n return reify(\n this,\n this.toSeq()\n .flip()\n .map(function (k, v) { return mapper.call(context, k, v, this$1$1); })\n .flip()\n );\n },\n});\n\nvar KeyedCollectionPrototype = KeyedCollection.prototype;\nKeyedCollectionPrototype[IS_KEYED_SYMBOL] = true;\nKeyedCollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.entries;\nKeyedCollectionPrototype.toJSON = toObject;\nKeyedCollectionPrototype.__toStringMapper = function (v, k) { return quoteString(k) + ': ' + quoteString(v); };\n\nmixin(IndexedCollection, {\n // ### Conversion to other types\n\n toKeyedSeq: function toKeyedSeq() {\n return new ToKeyedSequence(this, false);\n },\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n filter: function filter(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, false));\n },\n\n findIndex: function findIndex(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n\n indexOf: function indexOf(searchValue) {\n var key = this.keyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n\n lastIndexOf: function lastIndexOf(searchValue) {\n var key = this.lastKeyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n\n reverse: function reverse() {\n return reify(this, reverseFactory(this, false));\n },\n\n slice: function slice(begin, end) {\n return reify(this, sliceFactory(this, begin, end, false));\n },\n\n splice: function splice(index, removeNum /*, ...values*/) {\n var numArgs = arguments.length;\n removeNum = Math.max(removeNum || 0, 0);\n if (numArgs === 0 || (numArgs === 2 && !removeNum)) {\n return this;\n }\n // If index is negative, it should resolve relative to the size of the\n // collection. However size may be expensive to compute if not cached, so\n // only call count() if the number is in fact negative.\n index = resolveBegin(index, index < 0 ? this.count() : this.size);\n var spliced = this.slice(0, index);\n return reify(\n this,\n numArgs === 1\n ? spliced\n : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))\n );\n },\n\n // ### More collection methods\n\n findLastIndex: function findLastIndex(predicate, context) {\n var entry = this.findLastEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n\n first: function first(notSetValue) {\n return this.get(0, notSetValue);\n },\n\n flatten: function flatten(depth) {\n return reify(this, flattenFactory(this, depth, false));\n },\n\n get: function get(index, notSetValue) {\n index = wrapIndex(this, index);\n return index < 0 ||\n this.size === Infinity ||\n (this.size !== undefined && index > this.size)\n ? notSetValue\n : this.find(function (_, key) { return key === index; }, undefined, notSetValue);\n },\n\n has: function has(index) {\n index = wrapIndex(this, index);\n return (\n index >= 0 &&\n (this.size !== undefined\n ? this.size === Infinity || index < this.size\n : this.indexOf(index) !== -1)\n );\n },\n\n interpose: function interpose(separator) {\n return reify(this, interposeFactory(this, separator));\n },\n\n interleave: function interleave(/*...collections*/) {\n var collections = [this].concat(arrCopy(arguments));\n var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, collections);\n var interleaved = zipped.flatten(true);\n if (zipped.size) {\n interleaved.size = zipped.size * collections.length;\n }\n return reify(this, interleaved);\n },\n\n keySeq: function keySeq() {\n return Range(0, this.size);\n },\n\n last: function last(notSetValue) {\n return this.get(-1, notSetValue);\n },\n\n skipWhile: function skipWhile(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, false));\n },\n\n zip: function zip(/*, ...collections */) {\n var collections = [this].concat(arrCopy(arguments));\n return reify(this, zipWithFactory(this, defaultZipper, collections));\n },\n\n zipAll: function zipAll(/*, ...collections */) {\n var collections = [this].concat(arrCopy(arguments));\n return reify(this, zipWithFactory(this, defaultZipper, collections, true));\n },\n\n zipWith: function zipWith(zipper /*, ...collections */) {\n var collections = arrCopy(arguments);\n collections[0] = this;\n return reify(this, zipWithFactory(this, zipper, collections));\n },\n});\n\nvar IndexedCollectionPrototype = IndexedCollection.prototype;\nIndexedCollectionPrototype[IS_INDEXED_SYMBOL] = true;\nIndexedCollectionPrototype[IS_ORDERED_SYMBOL] = true;\n\nmixin(SetCollection, {\n // ### ES6 Collection methods (ES6 Array and Map)\n\n get: function get(value, notSetValue) {\n return this.has(value) ? value : notSetValue;\n },\n\n includes: function includes(value) {\n return this.has(value);\n },\n\n // ### More sequential methods\n\n keySeq: function keySeq() {\n return this.valueSeq();\n },\n});\n\nvar SetCollectionPrototype = SetCollection.prototype;\nSetCollectionPrototype.has = CollectionPrototype.includes;\nSetCollectionPrototype.contains = SetCollectionPrototype.includes;\nSetCollectionPrototype.keys = SetCollectionPrototype.values;\n\n// Mixin subclasses\n\nmixin(KeyedSeq, KeyedCollectionPrototype);\nmixin(IndexedSeq, IndexedCollectionPrototype);\nmixin(SetSeq, SetCollectionPrototype);\n\n// #pragma Helper functions\n\nfunction reduce(collection, reducer, reduction, context, useFirst, reverse) {\n assertNotInfinite(collection.size);\n collection.__iterate(function (v, k, c) {\n if (useFirst) {\n useFirst = false;\n reduction = v;\n } else {\n reduction = reducer.call(context, reduction, v, k, c);\n }\n }, reverse);\n return reduction;\n}\n\nfunction keyMapper(v, k) {\n return k;\n}\n\nfunction entryMapper(v, k) {\n return [k, v];\n}\n\nfunction not(predicate) {\n return function () {\n return !predicate.apply(this, arguments);\n };\n}\n\nfunction neg(predicate) {\n return function () {\n return -predicate.apply(this, arguments);\n };\n}\n\nfunction defaultZipper() {\n return arrCopy(arguments);\n}\n\nfunction defaultNegComparator(a, b) {\n return a < b ? 1 : a > b ? -1 : 0;\n}\n\nfunction hashCollection(collection) {\n if (collection.size === Infinity) {\n return 0;\n }\n var ordered = isOrdered(collection);\n var keyed = isKeyed(collection);\n var h = ordered ? 1 : 0;\n var size = collection.__iterate(\n keyed\n ? ordered\n ? function (v, k) {\n h = (31 * h + hashMerge(hash(v), hash(k))) | 0;\n }\n : function (v, k) {\n h = (h + hashMerge(hash(v), hash(k))) | 0;\n }\n : ordered\n ? function (v) {\n h = (31 * h + hash(v)) | 0;\n }\n : function (v) {\n h = (h + hash(v)) | 0;\n }\n );\n return murmurHashOfSize(size, h);\n}\n\nfunction murmurHashOfSize(size, h) {\n h = imul(h, 0xcc9e2d51);\n h = imul((h << 15) | (h >>> -15), 0x1b873593);\n h = imul((h << 13) | (h >>> -13), 5);\n h = ((h + 0xe6546b64) | 0) ^ size;\n h = imul(h ^ (h >>> 16), 0x85ebca6b);\n h = imul(h ^ (h >>> 13), 0xc2b2ae35);\n h = smi(h ^ (h >>> 16));\n return h;\n}\n\nfunction hashMerge(a, b) {\n return (a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2))) | 0; // int\n}\n\nvar OrderedSet = /*@__PURE__*/(function (Set) {\n function OrderedSet(value) {\n return value === undefined || value === null\n ? emptyOrderedSet()\n : isOrderedSet(value)\n ? value\n : emptyOrderedSet().withMutations(function (set) {\n var iter = SetCollection(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v) { return set.add(v); });\n });\n }\n\n if ( Set ) OrderedSet.__proto__ = Set;\n OrderedSet.prototype = Object.create( Set && Set.prototype );\n OrderedSet.prototype.constructor = OrderedSet;\n\n OrderedSet.of = function of (/*...values*/) {\n return this(arguments);\n };\n\n OrderedSet.fromKeys = function fromKeys (value) {\n return this(KeyedCollection(value).keySeq());\n };\n\n OrderedSet.prototype.toString = function toString () {\n return this.__toString('OrderedSet {', '}');\n };\n\n return OrderedSet;\n}(Set));\n\nOrderedSet.isOrderedSet = isOrderedSet;\n\nvar OrderedSetPrototype = OrderedSet.prototype;\nOrderedSetPrototype[IS_ORDERED_SYMBOL] = true;\nOrderedSetPrototype.zip = IndexedCollectionPrototype.zip;\nOrderedSetPrototype.zipWith = IndexedCollectionPrototype.zipWith;\nOrderedSetPrototype.zipAll = IndexedCollectionPrototype.zipAll;\n\nOrderedSetPrototype.__empty = emptyOrderedSet;\nOrderedSetPrototype.__make = makeOrderedSet;\n\nfunction makeOrderedSet(map, ownerID) {\n var set = Object.create(OrderedSetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n}\n\nvar EMPTY_ORDERED_SET;\nfunction emptyOrderedSet() {\n return (\n EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()))\n );\n}\n\nvar PairSorting = {\n LeftThenRight: -1,\n RightThenLeft: +1,\n};\n\nfunction throwOnInvalidDefaultValues(defaultValues) {\n if (isRecord(defaultValues)) {\n throw new Error(\n 'Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.'\n );\n }\n\n if (isImmutable(defaultValues)) {\n throw new Error(\n 'Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.'\n );\n }\n\n if (defaultValues === null || typeof defaultValues !== 'object') {\n throw new Error(\n 'Can not call `Record` with a non-object as default values. Use a plain javascript object instead.'\n );\n }\n}\n\nvar Record = function Record(defaultValues, name) {\n var hasInitialized;\n\n throwOnInvalidDefaultValues(defaultValues);\n\n var RecordType = function Record(values) {\n var this$1$1 = this;\n\n if (values instanceof RecordType) {\n return values;\n }\n if (!(this instanceof RecordType)) {\n return new RecordType(values);\n }\n if (!hasInitialized) {\n hasInitialized = true;\n var keys = Object.keys(defaultValues);\n var indices = (RecordTypePrototype._indices = {});\n // Deprecated: left to attempt not to break any external code which\n // relies on a ._name property existing on record instances.\n // Use Record.getDescriptiveName() instead\n RecordTypePrototype._name = name;\n RecordTypePrototype._keys = keys;\n RecordTypePrototype._defaultValues = defaultValues;\n for (var i = 0; i < keys.length; i++) {\n var propName = keys[i];\n indices[propName] = i;\n if (RecordTypePrototype[propName]) {\n /* eslint-disable no-console */\n typeof console === 'object' &&\n console.warn &&\n console.warn(\n 'Cannot define ' +\n recordName(this) +\n ' with property \"' +\n propName +\n '\" since that property name is part of the Record API.'\n );\n /* eslint-enable no-console */\n } else {\n setProp(RecordTypePrototype, propName);\n }\n }\n }\n this.__ownerID = undefined;\n this._values = List().withMutations(function (l) {\n l.setSize(this$1$1._keys.length);\n KeyedCollection(values).forEach(function (v, k) {\n l.set(this$1$1._indices[k], v === this$1$1._defaultValues[k] ? undefined : v);\n });\n });\n return this;\n };\n\n var RecordTypePrototype = (RecordType.prototype =\n Object.create(RecordPrototype));\n RecordTypePrototype.constructor = RecordType;\n\n if (name) {\n RecordType.displayName = name;\n }\n\n return RecordType;\n};\n\nRecord.prototype.toString = function toString () {\n var str = recordName(this) + ' { ';\n var keys = this._keys;\n var k;\n for (var i = 0, l = keys.length; i !== l; i++) {\n k = keys[i];\n str += (i ? ', ' : '') + k + ': ' + quoteString(this.get(k));\n }\n return str + ' }';\n};\n\nRecord.prototype.equals = function equals (other) {\n return (\n this === other ||\n (isRecord(other) && recordSeq(this).equals(recordSeq(other)))\n );\n};\n\nRecord.prototype.hashCode = function hashCode () {\n return recordSeq(this).hashCode();\n};\n\n// @pragma Access\n\nRecord.prototype.has = function has (k) {\n return this._indices.hasOwnProperty(k);\n};\n\nRecord.prototype.get = function get (k, notSetValue) {\n if (!this.has(k)) {\n return notSetValue;\n }\n var index = this._indices[k];\n var value = this._values.get(index);\n return value === undefined ? this._defaultValues[k] : value;\n};\n\n// @pragma Modification\n\nRecord.prototype.set = function set (k, v) {\n if (this.has(k)) {\n var newValues = this._values.set(\n this._indices[k],\n v === this._defaultValues[k] ? undefined : v\n );\n if (newValues !== this._values && !this.__ownerID) {\n return makeRecord(this, newValues);\n }\n }\n return this;\n};\n\nRecord.prototype.remove = function remove (k) {\n return this.set(k);\n};\n\nRecord.prototype.clear = function clear () {\n var newValues = this._values.clear().setSize(this._keys.length);\n\n return this.__ownerID ? this : makeRecord(this, newValues);\n};\n\nRecord.prototype.wasAltered = function wasAltered () {\n return this._values.wasAltered();\n};\n\nRecord.prototype.toSeq = function toSeq () {\n return recordSeq(this);\n};\n\nRecord.prototype.toJS = function toJS$1 () {\n return toJS(this);\n};\n\nRecord.prototype.entries = function entries () {\n return this.__iterator(ITERATE_ENTRIES);\n};\n\nRecord.prototype.__iterator = function __iterator (type, reverse) {\n return recordSeq(this).__iterator(type, reverse);\n};\n\nRecord.prototype.__iterate = function __iterate (fn, reverse) {\n return recordSeq(this).__iterate(fn, reverse);\n};\n\nRecord.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newValues = this._values.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._values = newValues;\n return this;\n }\n return makeRecord(this, newValues, ownerID);\n};\n\nRecord.isRecord = isRecord;\nRecord.getDescriptiveName = recordName;\nvar RecordPrototype = Record.prototype;\nRecordPrototype[IS_RECORD_SYMBOL] = true;\nRecordPrototype[DELETE] = RecordPrototype.remove;\nRecordPrototype.deleteIn = RecordPrototype.removeIn = deleteIn;\nRecordPrototype.getIn = getIn;\nRecordPrototype.hasIn = CollectionPrototype.hasIn;\nRecordPrototype.merge = merge$1;\nRecordPrototype.mergeWith = mergeWith$1;\nRecordPrototype.mergeIn = mergeIn;\nRecordPrototype.mergeDeep = mergeDeep;\nRecordPrototype.mergeDeepWith = mergeDeepWith;\nRecordPrototype.mergeDeepIn = mergeDeepIn;\nRecordPrototype.setIn = setIn;\nRecordPrototype.update = update;\nRecordPrototype.updateIn = updateIn;\nRecordPrototype.withMutations = withMutations;\nRecordPrototype.asMutable = asMutable;\nRecordPrototype.asImmutable = asImmutable;\nRecordPrototype[ITERATOR_SYMBOL] = RecordPrototype.entries;\nRecordPrototype.toJSON = RecordPrototype.toObject =\n CollectionPrototype.toObject;\nRecordPrototype.inspect = RecordPrototype.toSource = function () {\n return this.toString();\n};\n\nfunction makeRecord(likeRecord, values, ownerID) {\n var record = Object.create(Object.getPrototypeOf(likeRecord));\n record._values = values;\n record.__ownerID = ownerID;\n return record;\n}\n\nfunction recordName(record) {\n return record.constructor.displayName || record.constructor.name || 'Record';\n}\n\nfunction recordSeq(record) {\n return keyedSeqFromValue(record._keys.map(function (k) { return [k, record.get(k)]; }));\n}\n\nfunction setProp(prototype, name) {\n try {\n Object.defineProperty(prototype, name, {\n get: function () {\n return this.get(name);\n },\n set: function (value) {\n invariant(this.__ownerID, 'Cannot set on an immutable record.');\n this.set(name, value);\n },\n });\n } catch (error) {\n // Object.defineProperty failed. Probably IE8.\n }\n}\n\n/**\n * Returns a lazy Seq of `value` repeated `times` times. When `times` is\n * undefined, returns an infinite sequence of `value`.\n */\nvar Repeat = /*@__PURE__*/(function (IndexedSeq) {\n function Repeat(value, times) {\n if (!(this instanceof Repeat)) {\n return new Repeat(value, times);\n }\n this._value = value;\n this.size = times === undefined ? Infinity : Math.max(0, times);\n if (this.size === 0) {\n if (EMPTY_REPEAT) {\n return EMPTY_REPEAT;\n }\n EMPTY_REPEAT = this;\n }\n }\n\n if ( IndexedSeq ) Repeat.__proto__ = IndexedSeq;\n Repeat.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );\n Repeat.prototype.constructor = Repeat;\n\n Repeat.prototype.toString = function toString () {\n if (this.size === 0) {\n return 'Repeat []';\n }\n return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n };\n\n Repeat.prototype.get = function get (index, notSetValue) {\n return this.has(index) ? this._value : notSetValue;\n };\n\n Repeat.prototype.includes = function includes (searchValue) {\n return is(this._value, searchValue);\n };\n\n Repeat.prototype.slice = function slice (begin, end) {\n var size = this.size;\n return wholeSlice(begin, end, size)\n ? this\n : new Repeat(\n this._value,\n resolveEnd(end, size) - resolveBegin(begin, size)\n );\n };\n\n Repeat.prototype.reverse = function reverse () {\n return this;\n };\n\n Repeat.prototype.indexOf = function indexOf (searchValue) {\n if (is(this._value, searchValue)) {\n return 0;\n }\n return -1;\n };\n\n Repeat.prototype.lastIndexOf = function lastIndexOf (searchValue) {\n if (is(this._value, searchValue)) {\n return this.size;\n }\n return -1;\n };\n\n Repeat.prototype.__iterate = function __iterate (fn, reverse) {\n var size = this.size;\n var i = 0;\n while (i !== size) {\n if (fn(this._value, reverse ? size - ++i : i++, this) === false) {\n break;\n }\n }\n return i;\n };\n\n Repeat.prototype.__iterator = function __iterator (type, reverse) {\n var this$1$1 = this;\n\n var size = this.size;\n var i = 0;\n return new Iterator(function () { return i === size\n ? iteratorDone()\n : iteratorValue(type, reverse ? size - ++i : i++, this$1$1._value); }\n );\n };\n\n Repeat.prototype.equals = function equals (other) {\n return other instanceof Repeat\n ? is(this._value, other._value)\n : deepEqual(other);\n };\n\n return Repeat;\n}(IndexedSeq));\n\nvar EMPTY_REPEAT;\n\nfunction fromJS(value, converter) {\n return fromJSWith(\n [],\n converter || defaultConverter,\n value,\n '',\n converter && converter.length > 2 ? [] : undefined,\n { '': value }\n );\n}\n\nfunction fromJSWith(stack, converter, value, key, keyPath, parentValue) {\n if (\n typeof value !== 'string' &&\n !isImmutable(value) &&\n (isArrayLike(value) || hasIterator(value) || isPlainObject(value))\n ) {\n if (~stack.indexOf(value)) {\n throw new TypeError('Cannot convert circular structure to Immutable');\n }\n stack.push(value);\n keyPath && key !== '' && keyPath.push(key);\n var converted = converter.call(\n parentValue,\n key,\n Seq(value).map(function (v, k) { return fromJSWith(stack, converter, v, k, keyPath, value); }\n ),\n keyPath && keyPath.slice()\n );\n stack.pop();\n keyPath && keyPath.pop();\n return converted;\n }\n return value;\n}\n\nfunction defaultConverter(k, v) {\n // Effectively the opposite of \"Collection.toSeq()\"\n return isIndexed(v) ? v.toList() : isKeyed(v) ? v.toMap() : v.toSet();\n}\n\nvar version = \"4.3.5\";\n\nvar Immutable = {\n version: version,\n\n Collection: Collection,\n // Note: Iterable is deprecated\n Iterable: Collection,\n\n Seq: Seq,\n Map: Map,\n OrderedMap: OrderedMap,\n List: List,\n Stack: Stack,\n Set: Set,\n OrderedSet: OrderedSet,\n PairSorting: PairSorting,\n\n Record: Record,\n Range: Range,\n Repeat: Repeat,\n\n is: is,\n fromJS: fromJS,\n hash: hash,\n\n isImmutable: isImmutable,\n isCollection: isCollection,\n isKeyed: isKeyed,\n isIndexed: isIndexed,\n isAssociative: isAssociative,\n isOrdered: isOrdered,\n isValueObject: isValueObject,\n isPlainObject: isPlainObject,\n isSeq: isSeq,\n isList: isList,\n isMap: isMap,\n isOrderedMap: isOrderedMap,\n isStack: isStack,\n isSet: isSet,\n isOrderedSet: isOrderedSet,\n isRecord: isRecord,\n\n get: get,\n getIn: getIn$1,\n has: has,\n hasIn: hasIn$1,\n merge: merge,\n mergeDeep: mergeDeep$1,\n mergeWith: mergeWith,\n mergeDeepWith: mergeDeepWith$1,\n remove: remove,\n removeIn: removeIn,\n set: set,\n setIn: setIn$1,\n update: update$1,\n updateIn: updateIn$1,\n};\n\n// Note: Iterable is deprecated\nvar Iterable = Collection;\n\nexport default Immutable;\nexport { Collection, Iterable, List, Map, OrderedMap, OrderedSet, PairSorting, Range, Record, Repeat, Seq, Set, Stack, fromJS, get, getIn$1 as getIn, has, hasIn$1 as hasIn, hash, is, isAssociative, isCollection, isImmutable, isIndexed, isKeyed, isList, isMap, isOrdered, isOrderedMap, isOrderedSet, isPlainObject, isRecord, isSeq, isSet, isStack, isValueObject, merge, mergeDeep$1 as mergeDeep, mergeDeepWith$1 as mergeDeepWith, mergeWith, remove, removeIn, set, setIn$1 as setIn, update$1 as update, updateIn$1 as updateIn, version };\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","'use strict';\n\nconst isStream = stream =>\n\tstream !== null &&\n\ttypeof stream === 'object' &&\n\ttypeof stream.pipe === 'function';\n\nisStream.writable = stream =>\n\tisStream(stream) &&\n\tstream.writable !== false &&\n\ttypeof stream._write === 'function' &&\n\ttypeof stream._writableState === 'object';\n\nisStream.readable = stream =>\n\tisStream(stream) &&\n\tstream.readable !== false &&\n\ttypeof stream._read === 'function' &&\n\ttypeof stream._readableState === 'object';\n\nisStream.duplex = stream =>\n\tisStream.writable(stream) &&\n\tisStream.readable(stream);\n\nisStream.transform = stream =>\n\tisStream.duplex(stream) &&\n\ttypeof stream._transform === 'function';\n\nmodule.exports = isStream;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/ContextParser\"), exports);\n__exportStar(require(\"./lib/ErrorCoded\"), exports);\n__exportStar(require(\"./lib/FetchDocumentLoader\"), exports);\n__exportStar(require(\"./lib/IDocumentLoader\"), exports);\n__exportStar(require(\"./lib/JsonLdContext\"), exports);\n__exportStar(require(\"./lib/JsonLdContextNormalized\"), exports);\n__exportStar(require(\"./lib/Util\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContextParser = void 0;\nrequire(\"cross-fetch/polyfill\");\nconst relative_to_absolute_iri_1 = require(\"relative-to-absolute-iri\");\nconst ErrorCoded_1 = require(\"./ErrorCoded\");\nconst FetchDocumentLoader_1 = require(\"./FetchDocumentLoader\");\nconst JsonLdContextNormalized_1 = require(\"./JsonLdContextNormalized\");\nconst Util_1 = require(\"./Util\");\n/**\n * Parses JSON-LD contexts.\n */\nclass ContextParser {\n constructor(options) {\n options = options || {};\n this.documentLoader = options.documentLoader || new FetchDocumentLoader_1.FetchDocumentLoader();\n this.documentCache = {};\n this.validateContext = !options.skipValidation;\n this.expandContentTypeToBase = !!options.expandContentTypeToBase;\n this.remoteContextsDepthLimit = options.remoteContextsDepthLimit || 32;\n this.redirectSchemaOrgHttps = 'redirectSchemaOrgHttps' in options ? !!options.redirectSchemaOrgHttps : true;\n }\n /**\n * Validate the given @language value.\n * An error will be thrown if it is invalid.\n * @param value An @language value.\n * @param {boolean} strictRange If the string value should be strictly checked against a regex.\n * @param {string} errorCode The error code to emit on errors.\n * @return {boolean} If validation passed.\n * Can only be false if strictRange is false and the string value did not pass the regex.\n */\n static validateLanguage(value, strictRange, errorCode) {\n if (typeof value !== 'string') {\n throw new ErrorCoded_1.ErrorCoded(`The value of an '@language' must be a string, got '${JSON.stringify(value)}'`, errorCode);\n }\n if (!Util_1.Util.REGEX_LANGUAGE_TAG.test(value)) {\n if (strictRange) {\n throw new ErrorCoded_1.ErrorCoded(`The value of an '@language' must be a valid language tag, got '${JSON.stringify(value)}'`, errorCode);\n }\n else {\n return false;\n }\n }\n return true;\n }\n /**\n * Validate the given @direction value.\n * An error will be thrown if it is invalid.\n * @param value An @direction value.\n * @param {boolean} strictValues If the string value should be strictly checked against a regex.\n * @return {boolean} If validation passed.\n * Can only be false if strictRange is false and the string value did not pass the regex.\n */\n static validateDirection(value, strictValues) {\n if (typeof value !== 'string') {\n throw new ErrorCoded_1.ErrorCoded(`The value of an '@direction' must be a string, got '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_BASE_DIRECTION);\n }\n if (!Util_1.Util.REGEX_DIRECTION_TAG.test(value)) {\n if (strictValues) {\n throw new ErrorCoded_1.ErrorCoded(`The value of an '@direction' must be 'ltr' or 'rtl', got '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_BASE_DIRECTION);\n }\n else {\n return false;\n }\n }\n return true;\n }\n /**\n * Add an @id term for all @reverse terms.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n * @return {IJsonLdContextNormalizedRaw} The mutated input context.\n */\n idifyReverseTerms(context) {\n for (const key of Object.keys(context)) {\n let value = context[key];\n if (value && typeof value === 'object') {\n if (value['@reverse'] && !value['@id']) {\n if (typeof value['@reverse'] !== 'string' || Util_1.Util.isValidKeyword(value['@reverse'])) {\n throw new ErrorCoded_1.ErrorCoded(`Invalid @reverse value, must be absolute IRI or blank node: '${value['@reverse']}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n value = context[key] = Object.assign(Object.assign({}, value), { '@id': value['@reverse'] });\n value['@id'] = value['@reverse'];\n if (Util_1.Util.isPotentialKeyword(value['@reverse'])) {\n delete value['@reverse'];\n }\n else {\n value['@reverse'] = true;\n }\n }\n }\n }\n return context;\n }\n /**\n * Expand all prefixed terms in the given context.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n * @param {boolean} expandContentTypeToBase If @type inside the context may be expanded\n * via @base if @vocab is set to null.\n * @param {string[]} keys Optional set of keys from the context to expand. If left undefined, all\n * keys in the context will be expanded.\n */\n expandPrefixedTerms(context, expandContentTypeToBase, keys) {\n const contextRaw = context.getContextRaw();\n for (const key of (keys || Object.keys(contextRaw))) {\n // Only expand allowed keys\n if (Util_1.Util.EXPAND_KEYS_BLACKLIST.indexOf(key) < 0 && !Util_1.Util.isReservedInternalKeyword(key)) {\n // Error if we try to alias a keyword to something else.\n const keyValue = contextRaw[key];\n if (Util_1.Util.isPotentialKeyword(key) && Util_1.Util.ALIAS_DOMAIN_BLACKLIST.indexOf(key) >= 0) {\n if (key !== '@type' || typeof contextRaw[key] === 'object'\n && !(contextRaw[key]['@protected'] || contextRaw[key]['@container'] === '@set')) {\n throw new ErrorCoded_1.ErrorCoded(`Keywords can not be aliased to something else.\nTried mapping ${key} to ${JSON.stringify(keyValue)}`, ErrorCoded_1.ERROR_CODES.KEYWORD_REDEFINITION);\n }\n }\n // Error if we try to alias to an illegal keyword\n if (Util_1.Util.ALIAS_RANGE_BLACKLIST.indexOf(Util_1.Util.getContextValueId(keyValue)) >= 0) {\n throw new ErrorCoded_1.ErrorCoded(`Aliasing to certain keywords is not allowed.\nTried mapping ${key} to ${JSON.stringify(keyValue)}`, ErrorCoded_1.ERROR_CODES.INVALID_KEYWORD_ALIAS);\n }\n // Error if this term was marked as prefix as well\n if (keyValue && Util_1.Util.isPotentialKeyword(Util_1.Util.getContextValueId(keyValue))\n && keyValue['@prefix'] === true) {\n throw new ErrorCoded_1.ErrorCoded(`Tried to use keyword aliases as prefix: '${key}': '${JSON.stringify(keyValue)}'`, ErrorCoded_1.ERROR_CODES.INVALID_TERM_DEFINITION);\n }\n // Loop because prefixes might be nested\n while (Util_1.Util.isPrefixValue(contextRaw[key])) {\n const value = contextRaw[key];\n let changed = false;\n if (typeof value === 'string') {\n contextRaw[key] = context.expandTerm(value, true);\n changed = changed || value !== contextRaw[key];\n }\n else {\n const id = value['@id'];\n const type = value['@type'];\n // If @id is missing, don't allow @id to be added if @prefix: true and key not being a valid IRI.\n const canAddIdEntry = !('@prefix' in value) || Util_1.Util.isValidIri(key);\n if ('@id' in value) {\n // Use @id value for expansion\n if (id !== undefined && id !== null && typeof id === 'string') {\n contextRaw[key] = Object.assign(Object.assign({}, contextRaw[key]), { '@id': context.expandTerm(id, true) });\n changed = changed || id !== contextRaw[key]['@id'];\n }\n }\n else if (!Util_1.Util.isPotentialKeyword(key) && canAddIdEntry) {\n // Add an explicit @id value based on the expanded key value\n const newId = context.expandTerm(key, true);\n if (newId !== key) {\n // Don't set @id if expansion failed\n contextRaw[key] = Object.assign(Object.assign({}, contextRaw[key]), { '@id': newId });\n changed = true;\n }\n }\n if (type && typeof type === 'string' && type !== '@vocab'\n && (!value['@container'] || !value['@container']['@type'])\n && canAddIdEntry) {\n // First check @vocab, then fallback to @base\n let expandedType = context.expandTerm(type, true);\n if (expandContentTypeToBase && type === expandedType) {\n expandedType = context.expandTerm(type, false);\n }\n if (expandedType !== type) {\n changed = true;\n contextRaw[key] = Object.assign(Object.assign({}, contextRaw[key]), { '@type': expandedType });\n }\n }\n }\n if (!changed) {\n break;\n }\n }\n }\n }\n }\n /**\n * Normalize the @language entries in the given context to lowercase.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n * @param {IParseOptions} parseOptions The parsing options.\n */\n normalize(context, { processingMode, normalizeLanguageTags }) {\n // Lowercase language keys in 1.0\n if (normalizeLanguageTags || processingMode === 1.0) {\n for (const key of Object.keys(context)) {\n if (key === '@language' && typeof context[key] === 'string') {\n context[key] = context[key].toLowerCase();\n }\n else {\n const value = context[key];\n if (value && typeof value === 'object') {\n if (typeof value['@language'] === 'string') {\n const lowercase = value['@language'].toLowerCase();\n if (lowercase !== value['@language']) {\n context[key] = Object.assign(Object.assign({}, value), { '@language': lowercase });\n }\n }\n }\n }\n }\n }\n }\n /**\n * Convert all @container strings and array values to hash-based values.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n */\n containersToHash(context) {\n for (const key of Object.keys(context)) {\n const value = context[key];\n if (value && typeof value === 'object') {\n if (typeof value['@container'] === 'string') {\n context[key] = Object.assign(Object.assign({}, value), { '@container': { [value['@container']]: true } });\n }\n else if (Array.isArray(value['@container'])) {\n const newValue = {};\n for (const containerValue of value['@container']) {\n newValue[containerValue] = true;\n }\n context[key] = Object.assign(Object.assign({}, value), { '@container': newValue });\n }\n }\n }\n }\n /**\n * Normalize and apply context-level @protected terms onto each term separately.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n * @param {number} processingMode The processing mode.\n */\n applyScopedProtected(context, { processingMode }, expandOptions) {\n if (processingMode && processingMode >= 1.1) {\n if (context['@protected']) {\n for (const key of Object.keys(context)) {\n if (Util_1.Util.isReservedInternalKeyword(key)) {\n continue;\n }\n if (!Util_1.Util.isPotentialKeyword(key) && !Util_1.Util.isTermProtected(context, key)) {\n const value = context[key];\n if (value && typeof value === 'object') {\n if (!('@protected' in context[key])) {\n // Mark terms with object values as protected if they don't have an @protected: false annotation\n context[key] = Object.assign(Object.assign({}, context[key]), { '@protected': true });\n }\n }\n else {\n // Convert string-based term values to object-based values with @protected: true\n context[key] = {\n '@id': value,\n '@protected': true,\n };\n if (Util_1.Util.isSimpleTermDefinitionPrefix(value, expandOptions)) {\n context[key] = Object.assign(Object.assign({}, context[key]), { '@prefix': true });\n }\n }\n }\n }\n delete context['@protected'];\n }\n }\n }\n /**\n * Check if the given context inheritance does not contain any overrides of protected terms.\n * @param {IJsonLdContextNormalizedRaw} contextBefore The context that may contain some protected terms.\n * @param {IJsonLdContextNormalizedRaw} contextAfter A new context that is being applied on the first one.\n * @param {IExpandOptions} expandOptions Options that are needed for any expansions during this validation.\n * @param {string[]} keys Optional set of keys from the context to validate. If left undefined, all\n * keys defined in contextAfter will be checked.\n */\n validateKeywordRedefinitions(contextBefore, contextAfter, expandOptions, keys) {\n for (const key of (keys !== null && keys !== void 0 ? keys : Object.keys(contextAfter))) {\n if (Util_1.Util.isTermProtected(contextBefore, key)) {\n // The entry in the context before will always be in object-mode\n // If the new entry is in string-mode, convert it to object-mode\n // before checking if it is identical.\n if (typeof contextAfter[key] === 'string') {\n contextAfter[key] = { '@id': contextAfter[key], '@protected': true };\n }\n else {\n // We modify this deliberately,\n // as we need it for the value comparison (they must be identical modulo '@protected')),\n // and for the fact that this new value will override the first one.\n contextAfter[key] = Object.assign(Object.assign({}, contextAfter[key]), { '@protected': true });\n }\n // Error if they are not identical\n if (!Util_1.Util.deepEqual(contextBefore[key], contextAfter[key])) {\n throw new ErrorCoded_1.ErrorCoded(`Attempted to override the protected keyword ${key} from ${JSON.stringify(Util_1.Util.getContextValueId(contextBefore[key]))} to ${JSON.stringify(Util_1.Util.getContextValueId(contextAfter[key]))}`, ErrorCoded_1.ERROR_CODES.PROTECTED_TERM_REDEFINITION);\n }\n }\n }\n }\n /**\n * Validate the entries of the given context.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n * @param {IParseOptions} options The parse options.\n */\n validate(context, { processingMode }) {\n for (const key of Object.keys(context)) {\n // Ignore reserved internal keywords.\n if (Util_1.Util.isReservedInternalKeyword(key)) {\n continue;\n }\n // Do not allow empty term\n if (key === '') {\n throw new ErrorCoded_1.ErrorCoded(`The empty term is not allowed, got: '${key}': '${JSON.stringify(context[key])}'`, ErrorCoded_1.ERROR_CODES.INVALID_TERM_DEFINITION);\n }\n const value = context[key];\n const valueType = typeof value;\n // First check if the key is a keyword\n if (Util_1.Util.isPotentialKeyword(key)) {\n switch (key.substr(1)) {\n case 'vocab':\n if (value !== null && valueType !== 'string') {\n throw new ErrorCoded_1.ErrorCoded(`Found an invalid @vocab IRI: ${value}`, ErrorCoded_1.ERROR_CODES.INVALID_VOCAB_MAPPING);\n }\n break;\n case 'base':\n if (value !== null && valueType !== 'string') {\n throw new ErrorCoded_1.ErrorCoded(`Found an invalid @base IRI: ${context[key]}`, ErrorCoded_1.ERROR_CODES.INVALID_BASE_IRI);\n }\n break;\n case 'language':\n if (value !== null) {\n ContextParser.validateLanguage(value, true, ErrorCoded_1.ERROR_CODES.INVALID_DEFAULT_LANGUAGE);\n }\n break;\n case 'version':\n if (value !== null && valueType !== 'number') {\n throw new ErrorCoded_1.ErrorCoded(`Found an invalid @version number: ${value}`, ErrorCoded_1.ERROR_CODES.INVALID_VERSION_VALUE);\n }\n break;\n case 'direction':\n if (value !== null) {\n ContextParser.validateDirection(value, true);\n }\n break;\n case 'propagate':\n if (processingMode === 1.0) {\n throw new ErrorCoded_1.ErrorCoded(`Found an illegal @propagate keyword: ${value}`, ErrorCoded_1.ERROR_CODES.INVALID_CONTEXT_ENTRY);\n }\n if (value !== null && valueType !== 'boolean') {\n throw new ErrorCoded_1.ErrorCoded(`Found an invalid @propagate value: ${value}`, ErrorCoded_1.ERROR_CODES.INVALID_PROPAGATE_VALUE);\n }\n break;\n }\n // Don't allow keywords to be overridden\n if (Util_1.Util.isValidKeyword(key) && Util_1.Util.isValidKeyword(Util_1.Util.getContextValueId(value))) {\n throw new ErrorCoded_1.ErrorCoded(`Illegal keyword alias in term value, found: '${key}': '${Util_1.Util\n .getContextValueId(value)}'`, ErrorCoded_1.ERROR_CODES.KEYWORD_REDEFINITION);\n }\n continue;\n }\n // Otherwise, consider the key a term\n if (value !== null) {\n switch (valueType) {\n case 'string':\n if (Util_1.Util.getPrefix(value, context) === key) {\n throw new ErrorCoded_1.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${key}': '${JSON\n .stringify(value)}'`, ErrorCoded_1.ERROR_CODES.CYCLIC_IRI_MAPPING);\n }\n if (Util_1.Util.isValidIriWeak(key)) {\n if (value === '@type') {\n throw new ErrorCoded_1.ErrorCoded(`IRIs can not be mapped to @type, found: '${key}': '${value}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n else if (Util_1.Util.isValidIri(value) && value !== new JsonLdContextNormalized_1.JsonLdContextNormalized(context).expandTerm(key)) {\n throw new ErrorCoded_1.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${key}': '${value}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n }\n break;\n case 'object':\n if (!Util_1.Util.isCompactIri(key) && !('@id' in value)\n && (value['@type'] === '@id' ? !context['@base'] : !context['@vocab'])) {\n throw new ErrorCoded_1.ErrorCoded(`Missing @id in context entry: '${key}': '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n for (const objectKey of Object.keys(value)) {\n const objectValue = value[objectKey];\n if (!objectValue) {\n continue;\n }\n switch (objectKey) {\n case '@id':\n if (Util_1.Util.isValidKeyword(objectValue)\n && objectValue !== '@type' && objectValue !== '@id' && objectValue !== '@graph' && objectValue !== '@nest') {\n throw new ErrorCoded_1.ErrorCoded(`Illegal keyword alias in term value, found: '${key}': '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n if (Util_1.Util.isValidIriWeak(key)) {\n if (objectValue === '@type') {\n throw new ErrorCoded_1.ErrorCoded(`IRIs can not be mapped to @type, found: '${key}': '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n else if (Util_1.Util.isValidIri(objectValue)\n && objectValue !== new JsonLdContextNormalized_1.JsonLdContextNormalized(context).expandTerm(key)) {\n throw new ErrorCoded_1.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${key}': '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n }\n if (typeof objectValue !== 'string') {\n throw new ErrorCoded_1.ErrorCoded(`Detected non-string @id in context entry: '${key}': '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n if (Util_1.Util.getPrefix(objectValue, context) === key) {\n throw new ErrorCoded_1.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${key}': '${JSON\n .stringify(value)}'`, ErrorCoded_1.ERROR_CODES.CYCLIC_IRI_MAPPING);\n }\n break;\n case '@type':\n if (value['@container'] === '@type' && objectValue !== '@id' && objectValue !== '@vocab') {\n throw new ErrorCoded_1.ErrorCoded(`@container: @type only allows @type: @id or @vocab, but got: '${key}': '${objectValue}'`, ErrorCoded_1.ERROR_CODES.INVALID_TYPE_MAPPING);\n }\n if (typeof objectValue !== 'string') {\n throw new ErrorCoded_1.ErrorCoded(`The value of an '@type' must be a string, got '${JSON.stringify(valueType)}'`, ErrorCoded_1.ERROR_CODES.INVALID_TYPE_MAPPING);\n }\n if (objectValue !== '@id' && objectValue !== '@vocab'\n && (processingMode === 1.0 || objectValue !== '@json')\n && (processingMode === 1.0 || objectValue !== '@none')\n && (objectValue[0] === '_' || !Util_1.Util.isValidIri(objectValue))) {\n throw new ErrorCoded_1.ErrorCoded(`A context @type must be an absolute IRI, found: '${key}': '${objectValue}'`, ErrorCoded_1.ERROR_CODES.INVALID_TYPE_MAPPING);\n }\n break;\n case '@reverse':\n if (typeof objectValue === 'string' && value['@id'] && value['@id'] !== objectValue) {\n throw new ErrorCoded_1.ErrorCoded(`Found non-matching @id and @reverse term values in '${key}':\\\n'${objectValue}' and '${value['@id']}'`, ErrorCoded_1.ERROR_CODES.INVALID_REVERSE_PROPERTY);\n }\n if ('@nest' in value) {\n throw new ErrorCoded_1.ErrorCoded(`@nest is not allowed in the reverse property '${key}'`, ErrorCoded_1.ERROR_CODES.INVALID_REVERSE_PROPERTY);\n }\n break;\n case '@container':\n if (processingMode === 1.0) {\n if (Object.keys(objectValue).length > 1\n || Util_1.Util.CONTAINERS_1_0.indexOf(Object.keys(objectValue)[0]) < 0) {\n throw new ErrorCoded_1.ErrorCoded(`Invalid term @container for '${key}' ('${Object.keys(objectValue)}') in 1.0, \\\nmust be only one of ${Util_1.Util.CONTAINERS_1_0.join(', ')}`, ErrorCoded_1.ERROR_CODES.INVALID_CONTAINER_MAPPING);\n }\n }\n for (const containerValue of Object.keys(objectValue)) {\n if (containerValue === '@list' && value['@reverse']) {\n throw new ErrorCoded_1.ErrorCoded(`Term value can not be @container: @list and @reverse at the same time on '${key}'`, ErrorCoded_1.ERROR_CODES.INVALID_REVERSE_PROPERTY);\n }\n if (Util_1.Util.CONTAINERS.indexOf(containerValue) < 0) {\n throw new ErrorCoded_1.ErrorCoded(`Invalid term @container for '${key}' ('${containerValue}'), \\\nmust be one of ${Util_1.Util.CONTAINERS.join(', ')}`, ErrorCoded_1.ERROR_CODES.INVALID_CONTAINER_MAPPING);\n }\n }\n break;\n case '@language':\n ContextParser.validateLanguage(objectValue, true, ErrorCoded_1.ERROR_CODES.INVALID_LANGUAGE_MAPPING);\n break;\n case '@direction':\n ContextParser.validateDirection(objectValue, true);\n break;\n case '@prefix':\n if (objectValue !== null && typeof objectValue !== 'boolean') {\n throw new ErrorCoded_1.ErrorCoded(`Found an invalid term @prefix boolean in: '${key}': '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_PREFIX_VALUE);\n }\n if (!('@id' in value) && !Util_1.Util.isValidIri(key)) {\n throw new ErrorCoded_1.ErrorCoded(`Invalid @prefix definition for '${key}' ('${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_TERM_DEFINITION);\n }\n break;\n case '@index':\n if (processingMode === 1.0 || !value['@container'] || !value['@container']['@index']) {\n throw new ErrorCoded_1.ErrorCoded(`Attempt to add illegal key to value object: '${key}': '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_TERM_DEFINITION);\n }\n break;\n case '@nest':\n if (Util_1.Util.isPotentialKeyword(objectValue) && objectValue !== '@nest') {\n throw new ErrorCoded_1.ErrorCoded(`Found an invalid term @nest value in: '${key}': '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_NEST_VALUE);\n }\n }\n }\n break;\n default:\n throw new ErrorCoded_1.ErrorCoded(`Found an invalid term value: '${key}': '${value}'`, ErrorCoded_1.ERROR_CODES.INVALID_TERM_DEFINITION);\n }\n }\n }\n }\n /**\n * Apply the @base context entry to the given context under certain circumstances.\n * @param context A context.\n * @param options Parsing options.\n * @param inheritFromParent If the @base value from the parent context can be inherited.\n * @return The given context.\n */\n applyBaseEntry(context, options, inheritFromParent) {\n // In some special cases, this can be a string, so ignore those.\n if (typeof context === 'string') {\n return context;\n }\n // Give priority to @base in the parent context\n if (inheritFromParent && !('@base' in context) && options.parentContext\n && typeof options.parentContext === 'object' && '@base' in options.parentContext) {\n context['@base'] = options.parentContext['@base'];\n if (options.parentContext['@__baseDocument']) {\n context['@__baseDocument'] = true;\n }\n }\n // Override the base IRI if provided.\n if (options.baseIRI && !options.external) {\n if (!('@base' in context)) {\n // The context base is the document base\n context['@base'] = options.baseIRI;\n context['@__baseDocument'] = true;\n }\n else if (context['@base'] !== null && typeof context['@base'] === 'string'\n && !Util_1.Util.isValidIri(context['@base'])) {\n // The context base is relative to the document base\n context['@base'] = (0, relative_to_absolute_iri_1.resolve)(context['@base'], options.parentContext && options.parentContext['@base'] || options.baseIRI);\n }\n }\n return context;\n }\n /**\n * Resolve relative context IRIs, or return full IRIs as-is.\n * @param {string} contextIri A context IRI.\n * @param {string} baseIRI A base IRI.\n * @return {string} The normalized context IRI.\n */\n normalizeContextIri(contextIri, baseIRI) {\n if (!Util_1.Util.isValidIri(contextIri)) {\n try {\n contextIri = (0, relative_to_absolute_iri_1.resolve)(contextIri, baseIRI);\n }\n catch (_a) {\n throw new Error(`Invalid context IRI: ${contextIri}`);\n }\n }\n // TODO: Temporary workaround for fixing schema.org CORS issues (https://github.com/schemaorg/schemaorg/issues/2578#issuecomment-652324465)\n if (this.redirectSchemaOrgHttps && contextIri.startsWith('http://schema.org')) {\n contextIri = 'https://schema.org/';\n }\n return contextIri;\n }\n /**\n * Parse scoped contexts in the given context.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n * @param {IParseOptions} options Parsing options.\n * @return {IJsonLdContextNormalizedRaw} The mutated input context.\n * @param {string[]} keys Optional set of keys from the context to parseInnerContexts of. If left undefined, all\n * keys in the context will be iterated over.\n */\n async parseInnerContexts(context, options, keys) {\n for (const key of (keys !== null && keys !== void 0 ? keys : Object.keys(context))) {\n const value = context[key];\n if (value && typeof value === 'object') {\n if ('@context' in value && value['@context'] !== null && !options.ignoreScopedContexts) {\n // Simulate a processing based on the parent context to check if there are any (potential errors).\n // Honestly, I find it a bit weird to do this here, as the context may be unused,\n // and the final effective context may differ based on any other embedded/scoped contexts.\n // But hey, it's part of the spec, so we have no choice...\n // https://w3c.github.io/json-ld-api/#h-note-10\n if (this.validateContext) {\n try {\n const parentContext = Object.assign(Object.assign({}, context), { [key]: Object.assign({}, context[key]) });\n delete parentContext[key]['@context'];\n await this.parse(value['@context'], Object.assign(Object.assign({}, options), { external: false, parentContext, ignoreProtection: true, ignoreRemoteScopedContexts: true, ignoreScopedContexts: true }));\n }\n catch (e) {\n throw new ErrorCoded_1.ErrorCoded(e.message, ErrorCoded_1.ERROR_CODES.INVALID_SCOPED_CONTEXT);\n }\n }\n context[key] = Object.assign(Object.assign({}, value), { '@context': (await this.parse(value['@context'], Object.assign(Object.assign({}, options), { external: false, minimalProcessing: true, ignoreRemoteScopedContexts: true, parentContext: context })))\n .getContextRaw() });\n }\n }\n }\n return context;\n }\n async parse(context, options = {}, \n // These options are only for internal use on recursive calls and should not be used by\n // libraries consuming this function\n internalOptions = {}) {\n const { baseIRI, parentContext, external, processingMode = ContextParser.DEFAULT_PROCESSING_MODE, normalizeLanguageTags, ignoreProtection, minimalProcessing, } = options;\n const remoteContexts = options.remoteContexts || {};\n // Avoid remote context overflows\n if (Object.keys(remoteContexts).length >= this.remoteContextsDepthLimit) {\n throw new ErrorCoded_1.ErrorCoded('Detected an overflow in remote context inclusions: ' + Object.keys(remoteContexts), ErrorCoded_1.ERROR_CODES.CONTEXT_OVERFLOW);\n }\n if (context === null || context === undefined) {\n // Don't allow context nullification and there are protected terms\n if (!ignoreProtection && parentContext && Util_1.Util.hasProtectedTerms(parentContext)) {\n throw new ErrorCoded_1.ErrorCoded('Illegal context nullification when terms are protected', ErrorCoded_1.ERROR_CODES.INVALID_CONTEXT_NULLIFICATION);\n }\n // Context that are explicitly set to null are empty.\n return new JsonLdContextNormalized_1.JsonLdContextNormalized(this.applyBaseEntry({}, options, false));\n }\n else if (typeof context === 'string') {\n const contextIri = this.normalizeContextIri(context, baseIRI);\n const overriddenLoad = this.getOverriddenLoad(contextIri, options);\n if (overriddenLoad) {\n return new JsonLdContextNormalized_1.JsonLdContextNormalized(overriddenLoad);\n }\n const parsedStringContext = await this.parse(await this.load(contextIri), Object.assign(Object.assign({}, options), { baseIRI: contextIri, external: true, remoteContexts: Object.assign(Object.assign({}, remoteContexts), { [contextIri]: true }) }));\n this.applyBaseEntry(parsedStringContext.getContextRaw(), options, true);\n return parsedStringContext;\n }\n else if (Array.isArray(context)) {\n // As a performance consideration, first load all external contexts in parallel.\n const contextIris = [];\n const contexts = await Promise.all(context.map((subContext, i) => {\n if (typeof subContext === 'string') {\n const contextIri = this.normalizeContextIri(subContext, baseIRI);\n contextIris[i] = contextIri;\n const overriddenLoad = this.getOverriddenLoad(contextIri, options);\n if (overriddenLoad) {\n return overriddenLoad;\n }\n return this.load(contextIri);\n }\n else {\n return subContext;\n }\n }));\n // Don't apply inheritance logic on minimal processing\n if (minimalProcessing) {\n return new JsonLdContextNormalized_1.JsonLdContextNormalized(contexts);\n }\n const reducedContexts = await contexts.reduce((accContextPromise, contextEntry, i) => accContextPromise\n .then((accContext) => this.parse(contextEntry, Object.assign(Object.assign({}, options), { baseIRI: contextIris[i] || options.baseIRI, external: !!contextIris[i] || options.external, parentContext: accContext.getContextRaw(), remoteContexts: contextIris[i] ? Object.assign(Object.assign({}, remoteContexts), { [contextIris[i]]: true }) : remoteContexts }), \n // @ts-expect-error: This third argument causes a type error because we have hidden it from consumers\n {\n skipValidation: i < contexts.length - 1,\n })), Promise.resolve(new JsonLdContextNormalized_1.JsonLdContextNormalized(parentContext || {})));\n // Override the base IRI if provided.\n this.applyBaseEntry(reducedContexts.getContextRaw(), options, true);\n return reducedContexts;\n }\n else if (typeof context === 'object') {\n if ('@context' in context) {\n return await this.parse(context['@context'], options);\n }\n // Make a deep clone of the given context, to avoid modifying it.\n context = Object.assign({}, context);\n // According to the JSON-LD spec, @base must be ignored from external contexts.\n if (external) {\n delete context['@base'];\n }\n // Override the base IRI if provided.\n this.applyBaseEntry(context, options, true);\n // Hashify container entries\n // Do this before protected term validation as that influences term format\n this.containersToHash(context);\n // Don't perform any other modifications if only minimal processing is needed.\n if (minimalProcessing) {\n return new JsonLdContextNormalized_1.JsonLdContextNormalized(context);\n }\n // In JSON-LD 1.1, load @import'ed context prior to processing.\n let importContext = {};\n if ('@import' in context) {\n if (processingMode >= 1.1) {\n // Only accept string values\n if (typeof context['@import'] !== 'string') {\n throw new ErrorCoded_1.ErrorCoded('An @import value must be a string, but got ' + typeof context['@import'], ErrorCoded_1.ERROR_CODES.INVALID_IMPORT_VALUE);\n }\n // Load context\n importContext = await this.loadImportContext(this.normalizeContextIri(context['@import'], baseIRI));\n delete context['@import'];\n }\n else {\n throw new ErrorCoded_1.ErrorCoded('Context importing is not supported in JSON-LD 1.0', ErrorCoded_1.ERROR_CODES.INVALID_CONTEXT_ENTRY);\n }\n }\n this.applyScopedProtected(importContext, { processingMode }, JsonLdContextNormalized_1.defaultExpandOptions);\n const newContext = Object.assign(importContext, context);\n // Handle terms (before protection checks)\n this.idifyReverseTerms(newContext);\n this.normalize(newContext, { processingMode, normalizeLanguageTags });\n this.applyScopedProtected(newContext, { processingMode }, JsonLdContextNormalized_1.defaultExpandOptions);\n const keys = Object.keys(newContext);\n const overlappingKeys = [];\n if (typeof parentContext === 'object') {\n // Merge different parts of the final context in order\n for (const key in parentContext) {\n if (key in newContext) {\n overlappingKeys.push(key);\n }\n else {\n newContext[key] = parentContext[key];\n }\n }\n }\n // Parse inner contexts with minimal processing\n await this.parseInnerContexts(newContext, options, keys);\n const newContextWrapped = new JsonLdContextNormalized_1.JsonLdContextNormalized(newContext);\n // In JSON-LD 1.1, @vocab can be relative to @vocab in the parent context, or a compact IRI.\n if ((newContext && newContext['@version'] || ContextParser.DEFAULT_PROCESSING_MODE) >= 1.1\n && ((context['@vocab'] && typeof context['@vocab'] === 'string') || context['@vocab'] === '')) {\n if (parentContext && '@vocab' in parentContext && context['@vocab'].indexOf(':') < 0) {\n newContext['@vocab'] = parentContext['@vocab'] + context['@vocab'];\n }\n else if (Util_1.Util.isCompactIri(context['@vocab']) || context['@vocab'] in newContext) {\n // @vocab is a compact IRI or refers exactly to a prefix\n newContext['@vocab'] = newContextWrapped.expandTerm(context['@vocab'], true);\n }\n }\n this.expandPrefixedTerms(newContextWrapped, this.expandContentTypeToBase, keys);\n // In JSON-LD 1.1, check if we are not redefining any protected keywords\n if (!ignoreProtection && parentContext && processingMode >= 1.1) {\n this.validateKeywordRedefinitions(parentContext, newContext, JsonLdContextNormalized_1.defaultExpandOptions, overlappingKeys);\n }\n if (this.validateContext && !internalOptions.skipValidation) {\n this.validate(newContext, { processingMode });\n }\n return newContextWrapped;\n }\n else {\n throw new ErrorCoded_1.ErrorCoded(`Tried parsing a context that is not a string, array or object, but got ${context}`, ErrorCoded_1.ERROR_CODES.INVALID_LOCAL_CONTEXT);\n }\n }\n /**\n * Fetch the given URL as a raw JSON-LD context.\n * @param url An URL.\n * @return A promise resolving to a raw JSON-LD context.\n */\n async load(url) {\n // First try to retrieve the context from cache\n const cached = this.documentCache[url];\n if (cached) {\n return cached;\n }\n // If not in cache, load it\n let document;\n try {\n document = await this.documentLoader.load(url);\n }\n catch (e) {\n throw new ErrorCoded_1.ErrorCoded(`Failed to load remote context ${url}: ${e.message}`, ErrorCoded_1.ERROR_CODES.LOADING_REMOTE_CONTEXT_FAILED);\n }\n // Validate the context\n if (!('@context' in document)) {\n throw new ErrorCoded_1.ErrorCoded(`Missing @context in remote context at ${url}`, ErrorCoded_1.ERROR_CODES.INVALID_REMOTE_CONTEXT);\n }\n return this.documentCache[url] = document['@context'];\n }\n /**\n * Override the given context that may be loaded.\n *\n * This will check whether or not the url is recursively being loaded.\n * @param url An URL.\n * @param options Parsing options.\n * @return An overridden context, or null.\n * Optionally an error can be thrown if a cyclic context is detected.\n */\n getOverriddenLoad(url, options) {\n if (url in (options.remoteContexts || {})) {\n if (options.ignoreRemoteScopedContexts) {\n return url;\n }\n else {\n throw new ErrorCoded_1.ErrorCoded('Detected a cyclic context inclusion of ' + url, ErrorCoded_1.ERROR_CODES.RECURSIVE_CONTEXT_INCLUSION);\n }\n }\n return null;\n }\n /**\n * Load an @import'ed context.\n * @param importContextIri The full URI of an @import value.\n */\n async loadImportContext(importContextIri) {\n // Load the context - and do a deep clone since we are about to mutate it\n let importContext = await this.load(importContextIri);\n // Require the context to be a non-array object\n if (typeof importContext !== 'object' || Array.isArray(importContext)) {\n throw new ErrorCoded_1.ErrorCoded('An imported context must be a single object: ' + importContextIri, ErrorCoded_1.ERROR_CODES.INVALID_REMOTE_CONTEXT);\n }\n // Error if the context contains another @import\n if ('@import' in importContext) {\n throw new ErrorCoded_1.ErrorCoded('An imported context can not import another context: ' + importContextIri, ErrorCoded_1.ERROR_CODES.INVALID_CONTEXT_ENTRY);\n }\n importContext = Object.assign({}, importContext);\n // Containers have to be converted into hash values the same way as for the importing context\n // Otherwise context validation will fail for container values\n this.containersToHash(importContext);\n return importContext;\n }\n}\nContextParser.DEFAULT_PROCESSING_MODE = 1.1;\nexports.ContextParser = ContextParser;\n//# sourceMappingURL=ContextParser.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ERROR_CODES = exports.ErrorCoded = void 0;\n/**\n * An error that has a certain error code.\n *\n * The error code can be any string.\n * All standardized error codes are listed in {@link ERROR_CODES}.\n */\nclass ErrorCoded extends Error {\n /* istanbul ignore next */\n constructor(message, code) {\n super(message);\n this.code = code;\n }\n}\nexports.ErrorCoded = ErrorCoded;\n/**\n * All standardized JSON-LD error codes.\n * @see https://w3c.github.io/json-ld-api/#dom-jsonlderrorcode\n */\n// tslint:disable:object-literal-sort-keys\nvar ERROR_CODES;\n(function (ERROR_CODES) {\n ERROR_CODES[\"COLLIDING_KEYWORDS\"] = \"colliding keywords\";\n ERROR_CODES[\"CONFLICTING_INDEXES\"] = \"conflicting indexes\";\n ERROR_CODES[\"CYCLIC_IRI_MAPPING\"] = \"cyclic IRI mapping\";\n ERROR_CODES[\"INVALID_ID_VALUE\"] = \"invalid @id value\";\n ERROR_CODES[\"INVALID_INDEX_VALUE\"] = \"invalid @index value\";\n ERROR_CODES[\"INVALID_NEST_VALUE\"] = \"invalid @nest value\";\n ERROR_CODES[\"INVALID_PREFIX_VALUE\"] = \"invalid @prefix value\";\n ERROR_CODES[\"INVALID_PROPAGATE_VALUE\"] = \"invalid @propagate value\";\n ERROR_CODES[\"INVALID_REVERSE_VALUE\"] = \"invalid @reverse value\";\n ERROR_CODES[\"INVALID_IMPORT_VALUE\"] = \"invalid @import value\";\n ERROR_CODES[\"INVALID_VERSION_VALUE\"] = \"invalid @version value\";\n ERROR_CODES[\"INVALID_BASE_IRI\"] = \"invalid base IRI\";\n ERROR_CODES[\"INVALID_CONTAINER_MAPPING\"] = \"invalid container mapping\";\n ERROR_CODES[\"INVALID_CONTEXT_ENTRY\"] = \"invalid context entry\";\n ERROR_CODES[\"INVALID_CONTEXT_NULLIFICATION\"] = \"invalid context nullification\";\n ERROR_CODES[\"INVALID_DEFAULT_LANGUAGE\"] = \"invalid default language\";\n ERROR_CODES[\"INVALID_INCLUDED_VALUE\"] = \"invalid @included value\";\n ERROR_CODES[\"INVALID_IRI_MAPPING\"] = \"invalid IRI mapping\";\n ERROR_CODES[\"INVALID_JSON_LITERAL\"] = \"invalid JSON literal\";\n ERROR_CODES[\"INVALID_KEYWORD_ALIAS\"] = \"invalid keyword alias\";\n ERROR_CODES[\"INVALID_LANGUAGE_MAP_VALUE\"] = \"invalid language map value\";\n ERROR_CODES[\"INVALID_LANGUAGE_MAPPING\"] = \"invalid language mapping\";\n ERROR_CODES[\"INVALID_LANGUAGE_TAGGED_STRING\"] = \"invalid language-tagged string\";\n ERROR_CODES[\"INVALID_LANGUAGE_TAGGED_VALUE\"] = \"invalid language-tagged value\";\n ERROR_CODES[\"INVALID_LOCAL_CONTEXT\"] = \"invalid local context\";\n ERROR_CODES[\"INVALID_REMOTE_CONTEXT\"] = \"invalid remote context\";\n ERROR_CODES[\"INVALID_REVERSE_PROPERTY\"] = \"invalid reverse property\";\n ERROR_CODES[\"INVALID_REVERSE_PROPERTY_MAP\"] = \"invalid reverse property map\";\n ERROR_CODES[\"INVALID_REVERSE_PROPERTY_VALUE\"] = \"invalid reverse property value\";\n ERROR_CODES[\"INVALID_SCOPED_CONTEXT\"] = \"invalid scoped context\";\n ERROR_CODES[\"INVALID_SCRIPT_ELEMENT\"] = \"invalid script element\";\n ERROR_CODES[\"INVALID_SET_OR_LIST_OBJECT\"] = \"invalid set or list object\";\n ERROR_CODES[\"INVALID_TERM_DEFINITION\"] = \"invalid term definition\";\n ERROR_CODES[\"INVALID_TYPE_MAPPING\"] = \"invalid type mapping\";\n ERROR_CODES[\"INVALID_TYPE_VALUE\"] = \"invalid type value\";\n ERROR_CODES[\"INVALID_TYPED_VALUE\"] = \"invalid typed value\";\n ERROR_CODES[\"INVALID_VALUE_OBJECT\"] = \"invalid value object\";\n ERROR_CODES[\"INVALID_VALUE_OBJECT_VALUE\"] = \"invalid value object value\";\n ERROR_CODES[\"INVALID_VOCAB_MAPPING\"] = \"invalid vocab mapping\";\n ERROR_CODES[\"IRI_CONFUSED_WITH_PREFIX\"] = \"IRI confused with prefix\";\n ERROR_CODES[\"KEYWORD_REDEFINITION\"] = \"keyword redefinition\";\n ERROR_CODES[\"LOADING_DOCUMENT_FAILED\"] = \"loading document failed\";\n ERROR_CODES[\"LOADING_REMOTE_CONTEXT_FAILED\"] = \"loading remote context failed\";\n ERROR_CODES[\"MULTIPLE_CONTEXT_LINK_HEADERS\"] = \"multiple context link headers\";\n ERROR_CODES[\"PROCESSING_MODE_CONFLICT\"] = \"processing mode conflict\";\n ERROR_CODES[\"PROTECTED_TERM_REDEFINITION\"] = \"protected term redefinition\";\n ERROR_CODES[\"CONTEXT_OVERFLOW\"] = \"context overflow\";\n ERROR_CODES[\"INVALID_BASE_DIRECTION\"] = \"invalid base direction\";\n ERROR_CODES[\"RECURSIVE_CONTEXT_INCLUSION\"] = \"recursive context inclusion\";\n ERROR_CODES[\"INVALID_STREAMING_KEY_ORDER\"] = \"invalid streaming key order\";\n /**\n * JSON-LD-star\n */\n ERROR_CODES[\"INVALID_EMBEDDED_NODE\"] = \"invalid embedded node\";\n ERROR_CODES[\"INVALID_ANNOTATION\"] = \"invalid annotation\";\n})(ERROR_CODES = exports.ERROR_CODES || (exports.ERROR_CODES = {}));\n//# sourceMappingURL=ErrorCoded.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FetchDocumentLoader = void 0;\nrequire(\"cross-fetch/polyfill\");\nconst ErrorCoded_1 = require(\"./ErrorCoded\");\nconst http_link_header_1 = require(\"http-link-header\");\nconst relative_to_absolute_iri_1 = require(\"relative-to-absolute-iri\");\n/**\n * Loads documents via the fetch API.\n */\nclass FetchDocumentLoader {\n constructor(fetcher) {\n this.fetcher = fetcher;\n }\n async load(url) {\n const response = await (this.fetcher || fetch)(url, { headers: new Headers({ accept: 'application/ld+json' }) });\n if (response.ok && response.headers) {\n let mediaType = response.headers.get('Content-Type');\n if (mediaType) {\n const colonPos = mediaType.indexOf(';');\n if (colonPos > 0) {\n mediaType = mediaType.substr(0, colonPos);\n }\n }\n if (mediaType === 'application/ld+json') {\n // Return JSON-LD if proper content type was returned\n return (await response.json());\n }\n else {\n // Check for alternate link for a non-JSON-LD response\n if (response.headers.has('Link')) {\n let alternateUrl;\n response.headers.forEach((value, key) => {\n if (key === 'link') {\n const linkHeader = (0, http_link_header_1.parse)(value);\n for (const link of linkHeader.get('type', 'application/ld+json')) {\n if (link.rel === 'alternate') {\n if (alternateUrl) {\n throw new Error('Multiple JSON-LD alternate links were found on ' + url);\n }\n alternateUrl = (0, relative_to_absolute_iri_1.resolve)(link.uri, url);\n }\n }\n }\n });\n if (alternateUrl) {\n return this.load(alternateUrl);\n }\n }\n throw new ErrorCoded_1.ErrorCoded(`Unsupported JSON-LD media type ${mediaType}`, ErrorCoded_1.ERROR_CODES.LOADING_DOCUMENT_FAILED);\n }\n }\n else {\n throw new Error(response.statusText || `Status code: ${response.status}`);\n }\n }\n}\nexports.FetchDocumentLoader = FetchDocumentLoader;\n//# sourceMappingURL=FetchDocumentLoader.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IDocumentLoader.js.map","\"use strict\";\n// tslint:disable:max-line-length\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=JsonLdContext.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultExpandOptions = exports.JsonLdContextNormalized = void 0;\nconst relative_to_absolute_iri_1 = require(\"relative-to-absolute-iri\");\nconst ErrorCoded_1 = require(\"./ErrorCoded\");\nconst Util_1 = require(\"./Util\");\n/**\n * A class exposing operations over a normalized JSON-LD context.\n */\nclass JsonLdContextNormalized {\n constructor(contextRaw) {\n this.contextRaw = contextRaw;\n }\n /**\n * @return The raw inner context.\n */\n getContextRaw() {\n return this.contextRaw;\n }\n /**\n * Expand the term or prefix of the given term if it has one,\n * otherwise return the term as-is.\n *\n * This will try to expand the IRI as much as possible.\n *\n * Iff in vocab-mode, then other references to other terms in the context can be used,\n * such as to `myTerm`:\n * ```\n * {\n * \"myTerm\": \"http://example.org/myLongTerm\"\n * }\n * ```\n *\n * @param {string} term A term that is an URL or a prefixed URL.\n * @param {boolean} expandVocab If the term is a predicate or type and should be expanded based on @vocab,\n * otherwise it is considered a regular term that is expanded based on @base.\n * @param {IExpandOptions} options Options that define the way how expansion must be done.\n * @return {string} The expanded term, the term as-is, or null if it was explicitly disabled in the context.\n * @throws If the term is aliased to an invalid value (not a string, IRI or keyword).\n */\n expandTerm(term, expandVocab, options = exports.defaultExpandOptions) {\n const contextValue = this.contextRaw[term];\n // Immediately return if the term was disabled in the context\n if (contextValue === null || (contextValue && contextValue['@id'] === null)) {\n return null;\n }\n // Check the @id\n let validIriMapping = true;\n if (contextValue && expandVocab) {\n const value = Util_1.Util.getContextValueId(contextValue);\n if (value && value !== term) {\n if (typeof value !== 'string' || (!Util_1.Util.isValidIri(value) && !Util_1.Util.isValidKeyword(value))) {\n // Don't mark this mapping as invalid if we have an unknown keyword, but of the correct form.\n if (!Util_1.Util.isPotentialKeyword(value)) {\n validIriMapping = false;\n }\n }\n else {\n return value;\n }\n }\n }\n // Check if the term is prefixed\n const prefix = Util_1.Util.getPrefix(term, this.contextRaw);\n const vocab = this.contextRaw['@vocab'];\n const vocabRelative = (!!vocab || vocab === '') && vocab.indexOf(':') < 0;\n const base = this.contextRaw['@base'];\n const potentialKeyword = Util_1.Util.isPotentialKeyword(term);\n if (prefix) {\n const contextPrefixValue = this.contextRaw[prefix];\n const value = Util_1.Util.getContextValueId(contextPrefixValue);\n if (value) {\n if (typeof contextPrefixValue === 'string' || !options.allowPrefixForcing) {\n // If we have a simple term definition,\n // check the last character of the prefix to determine whether or not it is a prefix.\n // Validate that prefix ends with gen-delim character, unless @prefix is true\n if (!Util_1.Util.isSimpleTermDefinitionPrefix(value, options)) {\n // Treat the term as an absolute IRI\n return term;\n }\n }\n else {\n // If we have an expanded term definition, default to @prefix: false\n if (value[0] !== '_' && !potentialKeyword && !contextPrefixValue['@prefix'] && !(term in this.contextRaw)) {\n // Treat the term as an absolute IRI\n return term;\n }\n }\n return value + term.substr(prefix.length + 1);\n }\n }\n else if (expandVocab && ((vocab || vocab === '') || (options.allowVocabRelativeToBase && (base && vocabRelative)))\n && !potentialKeyword && !Util_1.Util.isCompactIri(term)) {\n if (vocabRelative) {\n if (options.allowVocabRelativeToBase) {\n return ((vocab || base) ? (0, relative_to_absolute_iri_1.resolve)(vocab, base) : '') + term;\n }\n else {\n throw new ErrorCoded_1.ErrorCoded(`Relative vocab expansion for term '${term}' with vocab '${vocab}' is not allowed.`, ErrorCoded_1.ERROR_CODES.INVALID_VOCAB_MAPPING);\n }\n }\n else {\n return vocab + term;\n }\n }\n else if (!expandVocab && base && !potentialKeyword && !Util_1.Util.isCompactIri(term)) {\n return (0, relative_to_absolute_iri_1.resolve)(term, base);\n }\n // Return the term as-is, unless we discovered an invalid IRI mapping for this term in the context earlier.\n if (validIriMapping) {\n return term;\n }\n else {\n throw new ErrorCoded_1.ErrorCoded(`Invalid IRI mapping found for context entry '${term}': '${JSON.stringify(contextValue)}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n }\n /**\n * Compact the given term using @base, @vocab, an aliased term, or a prefixed term.\n *\n * This will try to compact the IRI as much as possible.\n *\n * @param {string} iri An IRI to compact.\n * @param {boolean} vocab If the term is a predicate or type and should be compacted based on @vocab,\n * otherwise it is considered a regular term that is compacted based on @base.\n * @return {string} The compacted term or the IRI as-is.\n */\n compactIri(iri, vocab) {\n // Try @vocab compacting\n if (vocab && this.contextRaw['@vocab'] && iri.startsWith(this.contextRaw['@vocab'])) {\n return iri.substr(this.contextRaw['@vocab'].length);\n }\n // Try @base compacting\n if (!vocab && this.contextRaw['@base'] && iri.startsWith(this.contextRaw['@base'])) {\n return iri.substr(this.contextRaw['@base'].length);\n }\n // Loop over all terms in the context\n // This will try to prefix as short as possible.\n // Once a fully compacted alias is found, return immediately, as we can not go any shorter.\n const shortestPrefixing = { prefix: '', suffix: iri };\n for (const key in this.contextRaw) {\n const value = this.contextRaw[key];\n if (value && !Util_1.Util.isPotentialKeyword(key)) {\n const contextIri = Util_1.Util.getContextValueId(value);\n if (iri.startsWith(contextIri)) {\n const suffix = iri.substr(contextIri.length);\n if (!suffix) {\n if (vocab) {\n // Immediately return on compacted alias\n return key;\n }\n }\n else if (suffix.length < shortestPrefixing.suffix.length) {\n // Overwrite the shortest prefix\n shortestPrefixing.prefix = key;\n shortestPrefixing.suffix = suffix;\n }\n }\n }\n }\n // Return the shortest prefix\n if (shortestPrefixing.prefix) {\n return shortestPrefixing.prefix + ':' + shortestPrefixing.suffix;\n }\n return iri;\n }\n}\nexports.JsonLdContextNormalized = JsonLdContextNormalized;\nexports.defaultExpandOptions = {\n allowPrefixForcing: true,\n allowPrefixNonGenDelims: false,\n allowVocabRelativeToBase: true,\n};\n//# sourceMappingURL=JsonLdContextNormalized.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Util = void 0;\nclass Util {\n /**\n * Check if the given term is a valid compact IRI.\n * Otherwise, it may be an IRI.\n * @param {string} term A term.\n * @return {boolean} If it is a compact IRI.\n */\n static isCompactIri(term) {\n return term.indexOf(':') > 0 && !(term && term[0] === '#');\n }\n /**\n * Get the prefix from the given term.\n * @see https://json-ld.org/spec/latest/json-ld/#compact-iris\n * @param {string} term A term that is an URL or a prefixed URL.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n * @return {string} The prefix or null.\n */\n static getPrefix(term, context) {\n // Do not consider relative IRIs starting with a hash as compact IRIs\n if (term && term[0] === '#') {\n return null;\n }\n const separatorPos = term.indexOf(':');\n if (separatorPos >= 0) {\n // Suffix can not begin with two slashes\n if (term.length > separatorPos + 1\n && term.charAt(separatorPos + 1) === '/'\n && term.charAt(separatorPos + 2) === '/') {\n return null;\n }\n const prefix = term.substr(0, separatorPos);\n // Prefix can not be an underscore (this is a blank node)\n if (prefix === '_') {\n return null;\n }\n // Prefix must match a term in the active context\n if (context[prefix]) {\n return prefix;\n }\n }\n return null;\n }\n /**\n * From a given context entry value, get the string value, or the @id field.\n * @param contextValue A value for a term in a context.\n * @return {string} The id value, or null.\n */\n static getContextValueId(contextValue) {\n if (contextValue === null || typeof contextValue === 'string') {\n return contextValue;\n }\n const id = contextValue['@id'];\n return id ? id : null;\n }\n /**\n * Check if the given simple term definition (string-based value of a context term)\n * should be considered a prefix.\n * @param value A simple term definition value.\n * @param options Options that define the way how expansion must be done.\n */\n static isSimpleTermDefinitionPrefix(value, options) {\n return !Util.isPotentialKeyword(value)\n && (options.allowPrefixNonGenDelims || (typeof value === 'string' && (value[0] === '_' || Util.isPrefixIriEndingWithGenDelim(value))));\n }\n /**\n * Check if the given keyword is of the keyword format \"@\"1*ALPHA.\n * @param {string} keyword A potential keyword.\n * @return {boolean} If the given keyword is of the keyword format.\n */\n static isPotentialKeyword(keyword) {\n return typeof keyword === 'string' && Util.KEYWORD_REGEX.test(keyword);\n }\n /**\n * Check if the given prefix ends with a gen-delim character.\n * @param {string} prefixIri A prefix IRI.\n * @return {boolean} If the given prefix IRI is valid.\n */\n static isPrefixIriEndingWithGenDelim(prefixIri) {\n return Util.ENDS_WITH_GEN_DELIM.test(prefixIri);\n }\n /**\n * Check if the given context value can be a prefix value.\n * @param value A context value.\n * @return {boolean} If it can be a prefix value.\n */\n static isPrefixValue(value) {\n return value && (typeof value === 'string' || (value && typeof value === 'object'));\n }\n /**\n * Check if the given IRI is valid.\n * @param {string} iri A potential IRI.\n * @return {boolean} If the given IRI is valid.\n */\n static isValidIri(iri) {\n return Boolean(iri && Util.IRI_REGEX.test(iri));\n }\n /**\n * Check if the given IRI is valid, this includes the possibility of being a relative IRI.\n * @param {string} iri A potential IRI.\n * @return {boolean} If the given IRI is valid.\n */\n static isValidIriWeak(iri) {\n return !!iri && iri[0] !== ':' && Util.IRI_REGEX_WEAK.test(iri);\n }\n /**\n * Check if the given keyword is a defined according to the JSON-LD specification.\n * @param {string} keyword A potential keyword.\n * @return {boolean} If the given keyword is valid.\n */\n static isValidKeyword(keyword) {\n return Util.VALID_KEYWORDS[keyword];\n }\n /**\n * Check if the given term is protected in the context.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n * @param {string} key A context term.\n * @return {boolean} If the given term has an @protected flag.\n */\n static isTermProtected(context, key) {\n const value = context[key];\n return !(typeof value === 'string') && value && value['@protected'];\n }\n /**\n * Check if the given context has at least one protected term.\n * @param context A context.\n * @return If the context has a protected term.\n */\n static hasProtectedTerms(context) {\n for (const key of Object.keys(context)) {\n if (Util.isTermProtected(context, key)) {\n return true;\n }\n }\n return false;\n }\n /**\n * Check if the given key is an internal reserved keyword.\n * @param key A context key.\n */\n static isReservedInternalKeyword(key) {\n return key.startsWith('@__');\n }\n /**\n * Check if two objects are deepEqual to on another.\n * @param object1 The first object to test.\n * @param object2 The second object to test.\n */\n static deepEqual(object1, object2) {\n const objKeys1 = Object.keys(object1);\n const objKeys2 = Object.keys(object2);\n if (objKeys1.length !== objKeys2.length)\n return false;\n return objKeys1.every((key) => {\n const value1 = object1[key];\n const value2 = object2[key];\n return (value1 === value2) || (value1 !== null &&\n value2 !== null &&\n typeof value1 === \"object\" &&\n typeof value2 === \"object\" &&\n this.deepEqual(value1, value2));\n });\n }\n ;\n}\n// Regex for valid IRIs\nUtil.IRI_REGEX = /^([A-Za-z][A-Za-z0-9+-.]*|_):[^ \"<>{}|\\\\\\[\\]`#]*(#[^#]*)?$/;\n// Weaker regex for valid IRIs, this includes relative IRIs\nUtil.IRI_REGEX_WEAK = /(?::[^:])|\\//;\n// Regex for keyword form\nUtil.KEYWORD_REGEX = /^@[a-z]+$/i;\n// Regex to see if an IRI ends with a gen-delim character (see RFC 3986)\nUtil.ENDS_WITH_GEN_DELIM = /[:/?#\\[\\]@]$/;\n// Regex for language tags\nUtil.REGEX_LANGUAGE_TAG = /^[a-zA-Z]+(-[a-zA-Z0-9]+)*$/;\n// Regex for base directions\nUtil.REGEX_DIRECTION_TAG = /^(ltr)|(rtl)$/;\n// All known valid JSON-LD keywords\n// @see https://www.w3.org/TR/json-ld11/#keywords\nUtil.VALID_KEYWORDS = {\n '@annotation': true,\n '@base': true,\n '@container': true,\n '@context': true,\n '@direction': true,\n '@graph': true,\n '@id': true,\n '@import': true,\n '@included': true,\n '@index': true,\n '@json': true,\n '@language': true,\n '@list': true,\n '@nest': true,\n '@none': true,\n '@prefix': true,\n '@propagate': true,\n '@protected': true,\n '@reverse': true,\n '@set': true,\n '@type': true,\n '@value': true,\n '@version': true,\n '@vocab': true,\n};\n// Keys in the contexts that will not be expanded based on the base IRI\nUtil.EXPAND_KEYS_BLACKLIST = [\n '@base',\n '@vocab',\n '@language',\n '@version',\n '@direction',\n];\n// Keys in the contexts that may not be aliased from\nUtil.ALIAS_DOMAIN_BLACKLIST = [\n '@container',\n '@graph',\n '@id',\n '@index',\n '@list',\n '@nest',\n '@none',\n '@prefix',\n '@reverse',\n '@set',\n '@type',\n '@value',\n '@version',\n];\n// Keys in the contexts that may not be aliased to\nUtil.ALIAS_RANGE_BLACKLIST = [\n '@context',\n '@preserve',\n];\n// All valid @container values\nUtil.CONTAINERS = [\n '@list',\n '@set',\n '@index',\n '@language',\n '@graph',\n '@id',\n '@type',\n];\n// All valid @container values under processing mode 1.0\nUtil.CONTAINERS_1_0 = [\n '@list',\n '@set',\n '@index',\n];\nexports.Util = Util;\n//# sourceMappingURL=Util.js.map","(function(self) {\n\nvar irrelevant = (function (exports) {\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = 'statusText' in options ? options.statusText : 'OK';\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = self.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options));\n };\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.onabort = function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n };\n\n xhr.open(request.method, request.url, true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob';\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!self.fetch) {\n self.fetch = fetch;\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n})({});\n})(typeof self !== 'undefined' ? self : this);\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/JsonLdParser\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContextTree = void 0;\n/**\n * A tree structure that holds all contexts,\n * based on their position in the JSON object.\n *\n * Positions are identified by a path of keys.\n */\nclass ContextTree {\n constructor() {\n this.subTrees = {};\n }\n getContext(keys) {\n if (keys.length > 0) {\n const [head, ...tail] = keys;\n const subTree = this.subTrees[head];\n if (subTree) {\n const subContext = subTree.getContext(tail);\n if (subContext) {\n return subContext.then(({ context, depth }) => ({ context, depth: depth + 1 }));\n }\n }\n }\n return this.context ? this.context.then((context) => ({ context, depth: 0 })) : null;\n }\n setContext(keys, context) {\n if (keys.length === 0) {\n this.context = context;\n }\n else {\n const [head, ...tail] = keys;\n let subTree = this.subTrees[head];\n if (!subTree) {\n subTree = this.subTrees[head] = new ContextTree();\n }\n subTree.setContext(tail, context);\n }\n }\n removeContext(path) {\n this.setContext(path, null);\n }\n}\nexports.ContextTree = ContextTree;\n//# sourceMappingURL=ContextTree.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JsonLdParser = void 0;\n// tslint:disable-next-line:no-var-requires\nconst Parser = require('@bergos/jsonparse');\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst readable_stream_1 = require(\"readable-stream\");\nconst EntryHandlerArrayValue_1 = require(\"./entryhandler/EntryHandlerArrayValue\");\nconst EntryHandlerContainer_1 = require(\"./entryhandler/EntryHandlerContainer\");\nconst EntryHandlerInvalidFallback_1 = require(\"./entryhandler/EntryHandlerInvalidFallback\");\nconst EntryHandlerPredicate_1 = require(\"./entryhandler/EntryHandlerPredicate\");\nconst EntryHandlerKeywordContext_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordContext\");\nconst EntryHandlerKeywordGraph_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordGraph\");\nconst EntryHandlerKeywordId_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordId\");\nconst EntryHandlerKeywordIncluded_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordIncluded\");\nconst EntryHandlerKeywordNest_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordNest\");\nconst EntryHandlerKeywordType_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordType\");\nconst EntryHandlerKeywordUnknownFallback_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordUnknownFallback\");\nconst EntryHandlerKeywordValue_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordValue\");\nconst ParsingContext_1 = require(\"./ParsingContext\");\nconst Util_1 = require(\"./Util\");\nconst http_link_header_1 = require(\"http-link-header\");\nconst EntryHandlerKeywordAnnotation_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordAnnotation\");\n/**\n * A stream transformer that parses JSON-LD (text) streams to an {@link RDF.Stream}.\n */\nclass JsonLdParser extends readable_stream_1.Transform {\n constructor(options) {\n super({ readableObjectMode: true });\n options = options || {};\n this.options = options;\n this.parsingContext = new ParsingContext_1.ParsingContext(Object.assign({ parser: this }, options));\n this.util = new Util_1.Util({ dataFactory: options.dataFactory, parsingContext: this.parsingContext });\n this.jsonParser = new Parser();\n this.contextJobs = [];\n this.typeJobs = [];\n this.contextAwaitingJobs = [];\n this.lastDepth = 0;\n this.lastKeys = [];\n this.lastOnValueJob = Promise.resolve();\n this.attachJsonParserListeners();\n this.on('end', () => {\n if (typeof this.jsonParser.mode !== 'undefined') {\n this.emit('error', new Error('Unclosed document'));\n }\n });\n }\n /**\n * Construct a JsonLdParser from the given HTTP response.\n *\n * This will throw an error if no valid JSON response is received\n * (application/ld+json, application/json, or something+json).\n *\n * For raw JSON responses, exactly one link header pointing to a JSON-LD context is required.\n *\n * This method is not responsible for handling redirects.\n *\n * @param baseIRI The URI of the received response.\n * @param mediaType The received content type.\n * @param headers Optional HTTP headers.\n * @param options Optional parser options.\n */\n static fromHttpResponse(baseIRI, mediaType, headers, options) {\n let context;\n let wellKnownMediaTypes = ['application/activity+json'];\n if (options && options.wellKnownMediaTypes) {\n wellKnownMediaTypes = options.wellKnownMediaTypes;\n }\n // Special cases when receiving something else than the JSON-LD media type or the wellKnownMediaTypes\n if (mediaType !== 'application/ld+json' && !wellKnownMediaTypes.includes(mediaType)) {\n // Only accept JSON or JSON extension types\n if (mediaType !== 'application/json' && !mediaType.endsWith('+json')) {\n throw new jsonld_context_parser_1.ErrorCoded(`Unsupported JSON-LD media type ${mediaType}`, jsonld_context_parser_1.ERROR_CODES.LOADING_DOCUMENT_FAILED);\n }\n // We need exactly one JSON-LD context in the link header\n if (headers && headers.has('Link')) {\n headers.forEach((value, key) => {\n if (key === 'link') {\n const linkHeader = (0, http_link_header_1.parse)(value);\n for (const link of linkHeader.get('rel', 'http://www.w3.org/ns/json-ld#context')) {\n if (context) {\n throw new jsonld_context_parser_1.ErrorCoded('Multiple JSON-LD context link headers were found on ' + baseIRI, jsonld_context_parser_1.ERROR_CODES.MULTIPLE_CONTEXT_LINK_HEADERS);\n }\n context = link.uri;\n }\n }\n });\n }\n if (!context && !(options === null || options === void 0 ? void 0 : options.ignoreMissingContextLinkHeader)) {\n throw new jsonld_context_parser_1.ErrorCoded(`Missing context link header for media type ${mediaType} on ${baseIRI}`, jsonld_context_parser_1.ERROR_CODES.LOADING_DOCUMENT_FAILED);\n }\n }\n // Check if the streaming profile is present\n let streamingProfile;\n if (headers && headers.has('Content-Type')) {\n const contentType = headers.get('Content-Type');\n const match = /; *profile=([^\"]*)/.exec(contentType);\n if (match && match[1] === 'http://www.w3.org/ns/json-ld#streaming') {\n streamingProfile = true;\n }\n }\n return new JsonLdParser(Object.assign({ baseIRI,\n context,\n streamingProfile }, options ? options : {}));\n }\n /**\n * Parses the given text stream into a quad stream.\n * @param {NodeJS.EventEmitter} stream A text stream.\n * @return {RDF.Stream} A quad stream.\n */\n import(stream) {\n if ('pipe' in stream) {\n stream.on('error', (error) => parsed.emit('error', error));\n const parsed = stream.pipe(new JsonLdParser(this.options));\n return parsed;\n }\n else {\n const output = new readable_stream_1.PassThrough({ readableObjectMode: true });\n stream.on('error', (error) => parsed.emit('error', error));\n stream.on('data', (data) => output.push(data));\n stream.on('end', () => output.push(null));\n const parsed = output.pipe(new JsonLdParser(this.options));\n return parsed;\n }\n }\n _transform(chunk, encoding, callback) {\n this.jsonParser.write(chunk);\n this.lastOnValueJob\n .then(() => callback(), (error) => callback(error));\n }\n /**\n * Start a new job for parsing the given value.\n *\n * This will let the first valid {@link IEntryHandler} handle the entry.\n *\n * @param {any[]} keys The stack of keys.\n * @param value The value to parse.\n * @param {number} depth The depth to parse at.\n * @param {boolean} lastDepthCheck If the lastDepth check should be done for buffer draining.\n * @return {Promise} A promise resolving when the job is done.\n */\n async newOnValueJob(keys, value, depth, lastDepthCheck) {\n let flushStacks = true;\n // When we go up the stack, emit all unidentified values\n // We need to do this before the new job, because the new job may require determined values from the flushed jobs.\n if (lastDepthCheck && depth < this.lastDepth) {\n // Check if we had any RDF lists that need to be terminated with an rdf:nil\n const listPointer = this.parsingContext.listPointerStack[this.lastDepth];\n if (listPointer) {\n // Terminate the list if the had at least one value\n if (listPointer.value) {\n this.push(this.util.dataFactory.quad(listPointer.value, this.util.rdfRest, this.util.rdfNil, this.util.getDefaultGraph()));\n }\n // Add the list id to the id stack, so it can be used higher up in the stack\n listPointer.listId.listHead = true;\n this.parsingContext.idStack[listPointer.listRootDepth + 1] = [listPointer.listId];\n this.parsingContext.listPointerStack.splice(this.lastDepth, 1);\n }\n // Flush the buffer for lastDepth\n // If the parent key is a special type of container, postpone flushing until that parent is handled.\n if (await EntryHandlerContainer_1.EntryHandlerContainer.isBufferableContainerHandler(this.parsingContext, this.lastKeys, this.lastDepth)) {\n this.parsingContext.pendingContainerFlushBuffers\n .push({ depth: this.lastDepth, keys: this.lastKeys.slice(0, this.lastKeys.length) });\n flushStacks = false;\n }\n else {\n await this.flushBuffer(this.lastDepth, this.lastKeys);\n }\n }\n const key = await this.util.unaliasKeyword(keys[depth], keys, depth);\n const parentKey = await this.util.unaliasKeywordParent(keys, depth);\n this.parsingContext.emittedStack[depth] = true;\n let handleKey = true;\n // Keywords inside @reverse is not allowed apart from @context\n if (jsonld_context_parser_1.Util.isValidKeyword(key) && parentKey === '@reverse' && key !== '@context') {\n this.emit('error', new jsonld_context_parser_1.ErrorCoded(`Found the @id '${value}' inside an @reverse property`, jsonld_context_parser_1.ERROR_CODES.INVALID_REVERSE_PROPERTY_MAP));\n }\n // Skip further processing if one of the parent nodes are invalid.\n // We use the validationStack to reuse validation results that were produced before with common key stacks.\n let inProperty = false;\n if (this.parsingContext.validationStack.length > 1) {\n inProperty = this.parsingContext.validationStack[this.parsingContext.validationStack.length - 1].property;\n }\n for (let i = Math.max(1, this.parsingContext.validationStack.length - 1); i < keys.length - 1; i++) {\n const validationResult = this.parsingContext.validationStack[i]\n || (this.parsingContext.validationStack[i] = await this.validateKey(keys.slice(0, i + 1), i, inProperty));\n if (!validationResult.valid) {\n this.parsingContext.emittedStack[depth] = false;\n handleKey = false;\n break;\n }\n else if (!inProperty && validationResult.property) {\n inProperty = true;\n }\n }\n // Skip further processing if this node is part of a literal\n if (await this.util.isLiteral(keys, depth)) {\n handleKey = false;\n }\n // Get handler\n if (handleKey) {\n for (const entryHandler of JsonLdParser.ENTRY_HANDLERS) {\n const testResult = await entryHandler.test(this.parsingContext, this.util, key, keys, depth);\n if (testResult) {\n // Pass processing over to the handler\n await entryHandler.handle(this.parsingContext, this.util, key, keys, value, depth, testResult);\n // Flag that this depth is processed\n if (entryHandler.isStackProcessor()) {\n this.parsingContext.processingStack[depth] = true;\n }\n break;\n }\n }\n }\n // Validate value indexes on the root.\n if (depth === 0 && Array.isArray(value)) {\n await this.util.validateValueIndexes(value);\n }\n // When we go up the stack, flush the old stack\n if (flushStacks && depth < this.lastDepth) {\n // Reset our stacks\n this.flushStacks(this.lastDepth);\n }\n this.lastDepth = depth;\n this.lastKeys = keys;\n // Clear the keyword cache at this depth, and everything underneath.\n this.parsingContext.unaliasedKeywordCacheStack.splice(depth - 1);\n }\n /**\n * Flush the processing stacks at the given depth.\n * @param {number} depth A depth.\n */\n flushStacks(depth) {\n this.parsingContext.processingStack.splice(depth, 1);\n this.parsingContext.processingType.splice(depth, 1);\n this.parsingContext.emittedStack.splice(depth, 1);\n this.parsingContext.idStack.splice(depth, 1);\n this.parsingContext.graphStack.splice(depth + 1, 1);\n this.parsingContext.graphContainerTermStack.splice(depth, 1);\n this.parsingContext.jsonLiteralStack.splice(depth, 1);\n this.parsingContext.validationStack.splice(depth - 1, 2);\n this.parsingContext.literalStack.splice(depth, this.parsingContext.literalStack.length - depth);\n this.parsingContext.annotationsBuffer.splice(depth, 1);\n // TODO: just like the literal stack, splice all other stack until the end as well?\n }\n /**\n * Flush buffers for the given depth.\n *\n * This should be called after the last entry at a given depth was processed.\n *\n * @param {number} depth A depth.\n * @param {any[]} keys A stack of keys.\n * @return {Promise} A promise resolving if flushing is done.\n */\n async flushBuffer(depth, keys) {\n let subjects = this.parsingContext.idStack[depth];\n const subjectsWasDefined = !!subjects;\n if (!subjectsWasDefined) {\n subjects = this.parsingContext.idStack[depth] = [this.util.dataFactory.blankNode()];\n }\n // Flush values at this level\n const valueBuffer = this.parsingContext.unidentifiedValuesBuffer[depth];\n if (valueBuffer) {\n for (const subject of subjects) {\n const depthOffsetGraph = await this.util.getDepthOffsetGraph(depth, keys);\n const graphs = (this.parsingContext.graphStack[depth] || depthOffsetGraph >= 0)\n ? this.parsingContext.idStack[depth - depthOffsetGraph - 1]\n : [await this.util.getGraphContainerValue(keys, depth)];\n if (graphs) {\n for (const graph of graphs) {\n // Flush values to stream if the graph @id is known\n this.parsingContext.emittedStack[depth] = true;\n for (const bufferedValue of valueBuffer) {\n this.util.emitQuadChecked(depth, subject, bufferedValue.predicate, bufferedValue.object, graph, bufferedValue.reverse, bufferedValue.isEmbedded);\n }\n }\n }\n else {\n // Place the values in the graphs buffer if the graph @id is not yet known\n const subGraphBuffer = this.parsingContext.getUnidentifiedGraphBufferSafe(depth - await this.util.getDepthOffsetGraph(depth, keys) - 1);\n for (const bufferedValue of valueBuffer) {\n if (bufferedValue.reverse) {\n subGraphBuffer.push({\n object: subject,\n predicate: bufferedValue.predicate,\n subject: bufferedValue.object,\n isEmbedded: bufferedValue.isEmbedded,\n });\n }\n else {\n subGraphBuffer.push({\n object: bufferedValue.object,\n predicate: bufferedValue.predicate,\n subject,\n isEmbedded: bufferedValue.isEmbedded,\n });\n }\n }\n }\n }\n this.parsingContext.unidentifiedValuesBuffer.splice(depth, 1);\n this.parsingContext.literalStack.splice(depth, 1);\n this.parsingContext.jsonLiteralStack.splice(depth, 1);\n }\n // Flush graphs at this level\n const graphBuffer = this.parsingContext.unidentifiedGraphsBuffer[depth];\n if (graphBuffer) {\n for (const subject of subjects) {\n // A @graph statement at the root without @id relates to the default graph,\n // unless there are top-level properties,\n // others relate to blank nodes.\n const graph = depth === 1 && subject.termType === 'BlankNode'\n && !this.parsingContext.topLevelProperties ? this.util.getDefaultGraph() : subject;\n this.parsingContext.emittedStack[depth] = true;\n for (const bufferedValue of graphBuffer) {\n this.parsingContext.emitQuad(depth, this.util.dataFactory.quad(bufferedValue.subject, bufferedValue.predicate, bufferedValue.object, graph));\n }\n }\n this.parsingContext.unidentifiedGraphsBuffer.splice(depth, 1);\n }\n // Push unhandled annotations up the stack as nested annotations\n const annotationsBuffer = this.parsingContext.annotationsBuffer[depth];\n if (annotationsBuffer) {\n // Throw an error if we reach the top, and still have annotations\n if (annotationsBuffer.length > 0 && depth === 1) {\n this.parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Annotations can not be made on top-level nodes`, jsonld_context_parser_1.ERROR_CODES.INVALID_ANNOTATION));\n }\n // Pass the annotations buffer up one level in the stack\n const annotationsBufferParent = this.parsingContext.getAnnotationsBufferSafe(depth - 1);\n for (const annotation of annotationsBuffer) {\n annotationsBufferParent.push(annotation);\n }\n delete this.parsingContext.annotationsBuffer[depth];\n }\n }\n /**\n * Check if at least one {@link IEntryHandler} validates the entry to true.\n * @param {any[]} keys A stack of keys.\n * @param {number} depth A depth.\n * @param {boolean} inProperty If the current depth is part of a valid property node.\n * @return {Promise<{ valid: boolean, property: boolean }>} A promise resolving to true or false.\n */\n async validateKey(keys, depth, inProperty) {\n for (const entryHandler of JsonLdParser.ENTRY_HANDLERS) {\n if (await entryHandler.validate(this.parsingContext, this.util, keys, depth, inProperty)) {\n return { valid: true, property: inProperty || entryHandler.isPropertyHandler() };\n }\n }\n return { valid: false, property: false };\n }\n /**\n * Attach all required listeners to the JSON parser.\n *\n * This should only be called once.\n */\n attachJsonParserListeners() {\n // Listen to json parser events\n this.jsonParser.onValue = (value) => {\n const depth = this.jsonParser.stack.length;\n const keys = (new Array(depth + 1).fill(0)).map((v, i) => {\n return i === depth ? this.jsonParser.key : this.jsonParser.stack[i].key;\n });\n if (!this.isParsingContextInner(depth)) { // Don't parse inner nodes inside @context\n const valueJobCb = () => this.newOnValueJob(keys, value, depth, true);\n if (!this.parsingContext.streamingProfile\n && !this.parsingContext.contextTree.getContext(keys.slice(0, -1))) {\n // If an out-of-order context is allowed,\n // we have to buffer everything.\n // We store jobs for @context's and @type's separately,\n // because at the end, we have to process them first.\n // We also handle @type because these *could* introduce a type-scoped context.\n if (keys[depth] === '@context') {\n let jobs = this.contextJobs[depth];\n if (!jobs) {\n jobs = this.contextJobs[depth] = [];\n }\n jobs.push(valueJobCb);\n }\n else {\n this.contextAwaitingJobs.push({ job: valueJobCb, keys, depth });\n }\n }\n else {\n // Make sure that our value jobs are chained synchronously\n this.lastOnValueJob = this.lastOnValueJob.then(valueJobCb);\n }\n // Execute all buffered jobs on deeper levels\n if (!this.parsingContext.streamingProfile && depth === 0) {\n this.lastOnValueJob = this.lastOnValueJob\n .then(() => this.executeBufferedJobs());\n }\n }\n };\n this.jsonParser.onError = (error) => {\n this.emit('error', error);\n };\n }\n /**\n * Check if the parser is currently parsing an element that is part of an @context entry.\n * @param {number} depth A depth.\n * @return {boolean} A boolean.\n */\n isParsingContextInner(depth) {\n for (let i = depth; i > 0; i--) {\n if (this.jsonParser.stack[i - 1].key === '@context') {\n return true;\n }\n }\n return false;\n }\n /**\n * Execute all buffered jobs.\n * @return {Promise} A promise resolving if all jobs are finished.\n */\n async executeBufferedJobs() {\n // Handle context jobs\n for (const jobs of this.contextJobs) {\n if (jobs) {\n for (const job of jobs) {\n await job();\n }\n }\n }\n // Clear the keyword cache.\n this.parsingContext.unaliasedKeywordCacheStack.splice(0);\n const contextAwaitingJobs = [];\n for (const job of this.contextAwaitingJobs) {\n if ((await this.util.unaliasKeyword(job.keys[job.depth], job.keys, job.depth, true)) === '@type'\n || typeof job.keys[job.depth] === 'number' && (await this.util.unaliasKeyword(job.keys[job.depth - 1], job.keys, job.depth - 1, true)) === '@type') { // Also capture @type with array values\n // Remove @type from keys, because we want it to apply to parent later on\n this.typeJobs.push({ job: job.job, keys: job.keys.slice(0, job.keys.length - 1) });\n }\n else {\n contextAwaitingJobs.push(job);\n }\n }\n // Handle non-context jobs\n for (const job of contextAwaitingJobs) {\n // Check if we have a type (with possible type-scoped context) that should be handled before.\n // We check all possible parent nodes for the current job, from root to leaves.\n if (this.typeJobs.length > 0) {\n // First collect all applicable type jobs\n const applicableTypeJobs = [];\n const applicableTypeJobIds = [];\n for (let i = 0; i < this.typeJobs.length; i++) {\n const typeJob = this.typeJobs[i];\n if (Util_1.Util.isPrefixArray(typeJob.keys, job.keys)) {\n applicableTypeJobs.push(typeJob);\n applicableTypeJobIds.push(i);\n }\n }\n // Next, sort the jobs from short to long key length (to ensure types higher up in the tree to be handled first)\n const sortedTypeJobs = applicableTypeJobs.sort((job1, job2) => job1.keys.length - job2.keys.length);\n // Finally, execute the jobs in order\n for (const typeJob of sortedTypeJobs) {\n await typeJob.job();\n }\n // Remove the executed type jobs\n // Sort first, so we can efficiently splice\n const sortedApplicableTypeJobIds = applicableTypeJobIds.sort().reverse();\n for (const jobId of sortedApplicableTypeJobIds) {\n this.typeJobs.splice(jobId, 1);\n }\n }\n await job.job();\n }\n }\n}\nJsonLdParser.DEFAULT_PROCESSING_MODE = '1.1';\nJsonLdParser.ENTRY_HANDLERS = [\n new EntryHandlerArrayValue_1.EntryHandlerArrayValue(),\n new EntryHandlerKeywordContext_1.EntryHandlerKeywordContext(),\n new EntryHandlerKeywordId_1.EntryHandlerKeywordId(),\n new EntryHandlerKeywordIncluded_1.EntryHandlerKeywordIncluded(),\n new EntryHandlerKeywordGraph_1.EntryHandlerKeywordGraph(),\n new EntryHandlerKeywordNest_1.EntryHandlerKeywordNest(),\n new EntryHandlerKeywordType_1.EntryHandlerKeywordType(),\n new EntryHandlerKeywordValue_1.EntryHandlerKeywordValue(),\n new EntryHandlerKeywordAnnotation_1.EntryHandlerKeywordAnnotation(),\n new EntryHandlerContainer_1.EntryHandlerContainer(),\n new EntryHandlerKeywordUnknownFallback_1.EntryHandlerKeywordUnknownFallback(),\n new EntryHandlerPredicate_1.EntryHandlerPredicate(),\n new EntryHandlerInvalidFallback_1.EntryHandlerInvalidFallback(),\n];\nexports.JsonLdParser = JsonLdParser;\n//# sourceMappingURL=JsonLdParser.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ParsingContext = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst ErrorCoded_1 = require(\"jsonld-context-parser/lib/ErrorCoded\");\nconst ContextTree_1 = require(\"./ContextTree\");\nconst JsonLdParser_1 = require(\"./JsonLdParser\");\n/**\n * Data holder for parsing information.\n */\nclass ParsingContext {\n constructor(options) {\n // Initialize settings\n this.contextParser = new jsonld_context_parser_1.ContextParser({ documentLoader: options.documentLoader, skipValidation: options.skipContextValidation });\n this.streamingProfile = !!options.streamingProfile;\n this.baseIRI = options.baseIRI;\n this.produceGeneralizedRdf = !!options.produceGeneralizedRdf;\n this.allowSubjectList = !!options.allowSubjectList;\n this.processingMode = options.processingMode || JsonLdParser_1.JsonLdParser.DEFAULT_PROCESSING_MODE;\n this.strictValues = !!options.strictValues;\n this.validateValueIndexes = !!options.validateValueIndexes;\n this.defaultGraph = options.defaultGraph;\n this.rdfDirection = options.rdfDirection;\n this.normalizeLanguageTags = options.normalizeLanguageTags;\n this.streamingProfileAllowOutOfOrderPlainType = options.streamingProfileAllowOutOfOrderPlainType;\n this.rdfstar = options.rdfstar !== false;\n this.rdfstarReverseInEmbedded = options.rdfstarReverseInEmbedded;\n this.topLevelProperties = false;\n this.activeProcessingMode = parseFloat(this.processingMode);\n // Initialize stacks\n this.processingStack = [];\n this.processingType = [];\n this.emittedStack = [];\n this.idStack = [];\n this.graphStack = [];\n this.graphContainerTermStack = [];\n this.listPointerStack = [];\n this.contextTree = new ContextTree_1.ContextTree();\n this.literalStack = [];\n this.validationStack = [];\n this.unaliasedKeywordCacheStack = [];\n this.jsonLiteralStack = [];\n this.unidentifiedValuesBuffer = [];\n this.unidentifiedGraphsBuffer = [];\n this.annotationsBuffer = [];\n this.pendingContainerFlushBuffers = [];\n this.parser = options.parser;\n if (options.context) {\n this.rootContext = this.parseContext(options.context);\n this.rootContext.then((context) => this.validateContext(context));\n }\n else {\n this.rootContext = Promise.resolve(new jsonld_context_parser_1.JsonLdContextNormalized(this.baseIRI ? { '@base': this.baseIRI, '@__baseDocument': true } : {}));\n }\n }\n /**\n * Parse the given context with the configured options.\n * @param {JsonLdContext} context A context to parse.\n * @param {JsonLdContextNormalized} parentContext An optional parent context.\n * @param {boolean} ignoreProtection If @protected term checks should be ignored.\n * @return {Promise} A promise resolving to the parsed context.\n */\n async parseContext(context, parentContext, ignoreProtection) {\n return this.contextParser.parse(context, {\n baseIRI: this.baseIRI,\n ignoreProtection,\n normalizeLanguageTags: this.normalizeLanguageTags,\n parentContext,\n processingMode: this.activeProcessingMode,\n });\n }\n /**\n * Check if the given context is valid.\n * If not, an error will be thrown.\n * @param {JsonLdContextNormalized} context A context.\n */\n validateContext(context) {\n const activeVersion = context.getContextRaw()['@version'];\n if (activeVersion) {\n if (this.activeProcessingMode && activeVersion > this.activeProcessingMode) {\n throw new ErrorCoded_1.ErrorCoded(`Unsupported JSON-LD version '${activeVersion}' under active processing mode ${this.activeProcessingMode}.`, ErrorCoded_1.ERROR_CODES.PROCESSING_MODE_CONFLICT);\n }\n else {\n if (this.activeProcessingMode && activeVersion < this.activeProcessingMode) {\n throw new ErrorCoded_1.ErrorCoded(`Invalid JSON-LD version ${activeVersion} under active processing mode ${this.activeProcessingMode}.`, ErrorCoded_1.ERROR_CODES.INVALID_VERSION_VALUE);\n }\n this.activeProcessingMode = activeVersion;\n }\n }\n }\n /**\n * Get the context at the given path.\n * @param {keys} keys The path of keys to get the context at.\n * @param {number} offset The path offset, defaults to 1.\n * @return {Promise} A promise resolving to a context.\n */\n async getContext(keys, offset = 1) {\n const keysOriginal = keys;\n // Ignore array keys at the end\n while (typeof keys[keys.length - 1] === 'number') {\n keys = keys.slice(0, keys.length - 1);\n }\n // Handle offset on keys\n if (offset) {\n keys = keys.slice(0, -offset);\n }\n // Determine the closest context\n const contextData = await this.getContextPropagationAware(keys);\n const context = contextData.context;\n // Process property-scoped contexts (high-to-low)\n let contextRaw = context.getContextRaw();\n for (let i = contextData.depth; i < keysOriginal.length - offset; i++) {\n const key = keysOriginal[i];\n const contextKeyEntry = contextRaw[key];\n if (contextKeyEntry && typeof contextKeyEntry === 'object' && '@context' in contextKeyEntry) {\n const scopedContext = (await this.parseContext(contextKeyEntry, contextRaw, true)).getContextRaw();\n const propagate = !(key in scopedContext)\n || scopedContext[key]['@context']['@propagate']; // Propagation is true by default\n if (propagate !== false || i === keysOriginal.length - 1 - offset) {\n contextRaw = Object.assign({}, scopedContext);\n // Clean up final context\n delete contextRaw['@propagate'];\n contextRaw[key] = Object.assign({}, contextRaw[key]);\n if ('@id' in contextKeyEntry) {\n contextRaw[key]['@id'] = contextKeyEntry['@id'];\n }\n delete contextRaw[key]['@context'];\n if (propagate !== false) {\n this.contextTree.setContext(keysOriginal.slice(0, i + offset), Promise.resolve(new jsonld_context_parser_1.JsonLdContextNormalized(contextRaw)));\n }\n }\n }\n }\n return new jsonld_context_parser_1.JsonLdContextNormalized(contextRaw);\n }\n /**\n * Get the context at the given path.\n * Non-propagating contexts will be skipped,\n * unless the context at that exact depth is retrieved.\n *\n * This ONLY takes into account context propagation logic,\n * so this should usually not be called directly,\n * call {@link #getContext} instead.\n *\n * @param keys The path of keys to get the context at.\n * @return {Promise<{ context: JsonLdContextNormalized, depth: number }>} A context and its depth.\n */\n async getContextPropagationAware(keys) {\n const originalDepth = keys.length;\n let contextData = null;\n let hasApplicablePropertyScopedContext;\n do {\n hasApplicablePropertyScopedContext = false;\n if (contextData && '@__propagateFallback' in contextData.context.getContextRaw()) {\n // If a propagation fallback context has been set,\n // fallback to that context and retry for the same depth.\n contextData.context = new jsonld_context_parser_1.JsonLdContextNormalized(contextData.context.getContextRaw()['@__propagateFallback']);\n }\n else {\n if (contextData) {\n // If we had a previous iteration, jump to the parent of context depth.\n // We must do this because once we get here, last context had propagation disabled,\n // so we check its first parent instead.\n keys = keys.slice(0, contextData.depth - 1);\n }\n contextData = await this.contextTree.getContext(keys) || { context: await this.rootContext, depth: 0 };\n }\n // Allow non-propagating contexts to propagate one level deeper\n // if it defines a property-scoped context that is applicable for the current key.\n // @see https://w3c.github.io/json-ld-api/tests/toRdf-manifest#tc012\n const lastKey = keys[keys.length - 1];\n if (lastKey in contextData.context.getContextRaw()) {\n const lastKeyValue = contextData.context.getContextRaw()[lastKey];\n if (lastKeyValue && typeof lastKeyValue === 'object' && '@context' in lastKeyValue) {\n hasApplicablePropertyScopedContext = true;\n }\n }\n } while (contextData.depth > 0 // Root context has a special case\n && contextData.context.getContextRaw()['@propagate'] === false // Stop loop if propagation is true\n && contextData.depth !== originalDepth // Stop loop if requesting exact depth of non-propagating\n && !hasApplicablePropertyScopedContext);\n // Special case for root context that does not allow propagation.\n // Fallback to empty context in that case.\n if (contextData.depth === 0\n && contextData.context.getContextRaw()['@propagate'] === false\n && contextData.depth !== originalDepth) {\n contextData.context = new jsonld_context_parser_1.JsonLdContextNormalized({});\n }\n return contextData;\n }\n /**\n * Start a new job for parsing the given value.\n * @param {any[]} keys The stack of keys.\n * @param value The value to parse.\n * @param {number} depth The depth to parse at.\n * @param {boolean} lastDepthCheck If the lastDepth check should be done for buffer draining.\n * @return {Promise} A promise resolving when the job is done.\n */\n async newOnValueJob(keys, value, depth, lastDepthCheck) {\n await this.parser.newOnValueJob(keys, value, depth, lastDepthCheck);\n }\n /**\n * Flush the pending container flush buffers\n * @return {boolean} If any pending buffers were flushed.\n */\n async handlePendingContainerFlushBuffers() {\n if (this.pendingContainerFlushBuffers.length > 0) {\n for (const pendingFlushBuffer of this.pendingContainerFlushBuffers) {\n await this.parser.flushBuffer(pendingFlushBuffer.depth, pendingFlushBuffer.keys);\n this.parser.flushStacks(pendingFlushBuffer.depth);\n }\n this.pendingContainerFlushBuffers.splice(0, this.pendingContainerFlushBuffers.length);\n return true;\n }\n else {\n return false;\n }\n }\n /**\n * Emit the given quad into the output stream.\n * @param {number} depth The depth the quad was generated at.\n * @param {Quad} quad A quad to emit.\n */\n emitQuad(depth, quad) {\n if (depth === 1) {\n this.topLevelProperties = true;\n }\n this.parser.push(quad);\n }\n /**\n * Emit the given error into the output stream.\n * @param {Error} error An error to emit.\n */\n emitError(error) {\n this.parser.emit('error', error);\n }\n /**\n * Emit the given context into the output stream under the 'context' event.\n * @param {JsonLdContext} context A context to emit.\n */\n emitContext(context) {\n this.parser.emit('context', context);\n }\n /**\n * Safely get or create the depth value of {@link ParsingContext.unidentifiedValuesBuffer}.\n * @param {number} depth A depth.\n * @return {{predicate: Term; object: Term; reverse: boolean}[]} An element of\n * {@link ParsingContext.unidentifiedValuesBuffer}.\n */\n getUnidentifiedValueBufferSafe(depth) {\n let buffer = this.unidentifiedValuesBuffer[depth];\n if (!buffer) {\n buffer = [];\n this.unidentifiedValuesBuffer[depth] = buffer;\n }\n return buffer;\n }\n /**\n * Safely get or create the depth value of {@link ParsingContext.unidentifiedGraphsBuffer}.\n * @param {number} depth A depth.\n * @return {{predicate: Term; object: Term; reverse: boolean}[]} An element of\n * {@link ParsingContext.unidentifiedGraphsBuffer}.\n */\n getUnidentifiedGraphBufferSafe(depth) {\n let buffer = this.unidentifiedGraphsBuffer[depth];\n if (!buffer) {\n buffer = [];\n this.unidentifiedGraphsBuffer[depth] = buffer;\n }\n return buffer;\n }\n /**\n * Safely get or create the depth value of {@link ParsingContext.annotationsBuffer}.\n * @param {number} depth A depth.\n * @return {} An element of {@link ParsingContext.annotationsBuffer}.\n */\n getAnnotationsBufferSafe(depth) {\n let buffer = this.annotationsBuffer[depth];\n if (!buffer) {\n buffer = [];\n this.annotationsBuffer[depth] = buffer;\n }\n return buffer;\n }\n /**\n * @return IExpandOptions The expand options for the active processing mode.\n */\n getExpandOptions() {\n return ParsingContext.EXPAND_OPTIONS[this.activeProcessingMode];\n }\n /**\n * Shift the stack at the given offset to the given depth.\n *\n * This will override anything in the stack at `depth`,\n * and this will remove anything at `depth + depthOffset`\n *\n * @param depth The target depth.\n * @param depthOffset The origin depth, relative to `depth`.\n */\n shiftStack(depth, depthOffset) {\n // Copy the id stack value up one level so that the next job can access the id.\n const deeperIdStack = this.idStack[depth + depthOffset];\n if (deeperIdStack) {\n this.idStack[depth] = deeperIdStack;\n this.emittedStack[depth] = true;\n delete this.idStack[depth + depthOffset];\n }\n // Shorten key stack\n if (this.pendingContainerFlushBuffers.length) {\n for (const buffer of this.pendingContainerFlushBuffers) {\n if (buffer.depth >= depth + depthOffset) {\n buffer.depth -= depthOffset;\n buffer.keys.splice(depth, depthOffset);\n }\n }\n }\n // Splice stacks\n if (this.unidentifiedValuesBuffer[depth + depthOffset]) {\n this.unidentifiedValuesBuffer[depth] = this.unidentifiedValuesBuffer[depth + depthOffset];\n delete this.unidentifiedValuesBuffer[depth + depthOffset];\n }\n if (this.annotationsBuffer[depth + depthOffset - 1]) {\n if (!this.annotationsBuffer[depth - 1]) {\n this.annotationsBuffer[depth - 1] = [];\n }\n this.annotationsBuffer[depth - 1] = [\n ...this.annotationsBuffer[depth - 1],\n ...this.annotationsBuffer[depth + depthOffset - 1],\n ];\n delete this.annotationsBuffer[depth + depthOffset - 1];\n }\n // TODO: also do the same for other stacks\n }\n}\nParsingContext.EXPAND_OPTIONS = {\n 1.0: {\n allowPrefixForcing: false,\n allowPrefixNonGenDelims: false,\n allowVocabRelativeToBase: false,\n },\n 1.1: {\n allowPrefixForcing: true,\n allowPrefixNonGenDelims: false,\n allowVocabRelativeToBase: true,\n },\n};\nexports.ParsingContext = ParsingContext;\n//# sourceMappingURL=ParsingContext.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Util = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst EntryHandlerContainer_1 = require(\"./entryhandler/EntryHandlerContainer\");\n// tslint:disable-next-line:no-var-requires\nconst canonicalizeJson = require('canonicalize');\n/**\n * Utility functions and methods.\n */\nclass Util {\n constructor(options) {\n this.parsingContext = options.parsingContext;\n this.dataFactory = options.dataFactory || new rdf_data_factory_1.DataFactory();\n this.rdfFirst = this.dataFactory.namedNode(Util.RDF + 'first');\n this.rdfRest = this.dataFactory.namedNode(Util.RDF + 'rest');\n this.rdfNil = this.dataFactory.namedNode(Util.RDF + 'nil');\n this.rdfType = this.dataFactory.namedNode(Util.RDF + 'type');\n this.rdfJson = this.dataFactory.namedNode(Util.RDF + 'JSON');\n }\n /**\n * Helper function to get the value of a context entry,\n * or fallback to a certain value.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} contextKey A pre-defined JSON-LD key in context entries.\n * @param {string} key A context entry key.\n * @param {string} fallback A fallback value for when the given contextKey\n * could not be found in the value with the given key.\n * @return {string} The value of the given contextKey in the entry behind key in the given context,\n * or the given fallback value.\n */\n static getContextValue(context, contextKey, key, fallback) {\n const entry = context.getContextRaw()[key];\n if (!entry) {\n return fallback;\n }\n const type = entry[contextKey];\n return type === undefined ? fallback : type;\n }\n /**\n * Get the container type of the given key in the context.\n *\n * Should any context-scoping bugs should occur related to this in the future,\n * it may be required to increase the offset from the depth at which the context is retrieved by one (to 2).\n * This is because containers act 2 levels deep.\n *\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key A context entry key.\n * @return {string} The container type.\n */\n static getContextValueContainer(context, key) {\n return Util.getContextValue(context, '@container', key, { '@set': true });\n }\n /**\n * Get the value type of the given key in the context.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key A context entry key.\n * @return {string} The node type.\n */\n static getContextValueType(context, key) {\n const valueType = Util.getContextValue(context, '@type', key, null);\n if (valueType === '@none') {\n return null;\n }\n return valueType;\n }\n /**\n * Get the language of the given key in the context.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key A context entry key.\n * @return {string} The node type.\n */\n static getContextValueLanguage(context, key) {\n return Util.getContextValue(context, '@language', key, context.getContextRaw()['@language'] || null);\n }\n /**\n * Get the direction of the given key in the context.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key A context entry key.\n * @return {string} The node type.\n */\n static getContextValueDirection(context, key) {\n return Util.getContextValue(context, '@direction', key, context.getContextRaw()['@direction'] || null);\n }\n /**\n * Check if the given key in the context is a reversed property.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key A context entry key.\n * @return {boolean} If the context value has a @reverse key.\n */\n static isContextValueReverse(context, key) {\n return !!Util.getContextValue(context, '@reverse', key, null);\n }\n /**\n * Get the @index of the given key in the context.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key A context entry key.\n * @return {string} The index.\n */\n static getContextValueIndex(context, key) {\n return Util.getContextValue(context, '@index', key, context.getContextRaw()['@index'] || null);\n }\n /**\n * Check if the given key refers to a reversed property.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key The property key.\n * @param {string} parentKey The parent key.\n * @return {boolean} If the property must be reversed.\n */\n static isPropertyReverse(context, key, parentKey) {\n // '!==' is needed because reversed properties in a @reverse container should cancel each other out.\n return parentKey === '@reverse' !== Util.isContextValueReverse(context, key);\n }\n /**\n * Check if the given key exists inside an embedded node as direct child.\n * @param {string} parentKey The parent key.\n * @return {boolean} If the property is embedded.\n */\n static isPropertyInEmbeddedNode(parentKey) {\n return parentKey === '@id';\n }\n /**\n * Check if the given key exists inside an annotation object as direct child.\n * @param {string} parentKey The parent key.\n * @return {boolean} If the property is an annotation.\n */\n static isPropertyInAnnotationObject(parentKey) {\n return parentKey === '@annotation';\n }\n /**\n * Check if the given IRI is valid.\n * @param {string} iri A potential IRI.\n * @return {boolean} If the given IRI is valid.\n */\n static isValidIri(iri) {\n return iri !== null && jsonld_context_parser_1.Util.isValidIri(iri);\n }\n /**\n * Check if the given first array (needle) is a prefix of the given second array (haystack).\n * @param needle An array to check if it is a prefix.\n * @param haystack An array to look in.\n */\n static isPrefixArray(needle, haystack) {\n if (needle.length > haystack.length) {\n return false;\n }\n for (let i = 0; i < needle.length; i++) {\n if (needle[i] !== haystack[i]) {\n return false;\n }\n }\n return true;\n }\n /**\n * Make sure that @id-@index pairs are equal over all array values.\n * Reject otherwise.\n * @param {any[]} value An array value.\n * @return {Promise} A promise rejecting if conflicts are present.\n */\n async validateValueIndexes(value) {\n if (this.parsingContext.validateValueIndexes) {\n const indexHashes = {};\n for (const entry of value) {\n if (entry && typeof entry === 'object') {\n const id = entry['@id'];\n const index = entry['@index'];\n if (id && index) {\n const existingIndexValue = indexHashes[id];\n if (existingIndexValue && existingIndexValue !== index) {\n throw new jsonld_context_parser_1.ErrorCoded(`Conflicting @index value for ${id}`, jsonld_context_parser_1.ERROR_CODES.CONFLICTING_INDEXES);\n }\n indexHashes[id] = index;\n }\n }\n }\n }\n }\n /**\n * Convert a given JSON value to an RDF term.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key The current JSON key.\n * @param value A JSON value.\n * @param {number} depth The depth the value is at.\n * @param {string[]} keys The path of keys.\n * @return {Promise} An RDF term array.\n */\n async valueToTerm(context, key, value, depth, keys) {\n // Skip further processing if we have an @type: @json\n if (Util.getContextValueType(context, key) === '@json') {\n return [this.dataFactory.literal(this.valueToJsonString(value), this.rdfJson)];\n }\n const type = typeof value;\n switch (type) {\n case 'object':\n // Skip if we have a null or undefined object\n if (value === null || value === undefined) {\n return [];\n }\n // Special case for arrays\n if (Array.isArray(value)) {\n // We handle arrays at value level so we can emit earlier, so this is handled already when we get here.\n // Empty context-based lists are emitted at this place, because our streaming algorithm doesn't detect those.\n if ('@list' in Util.getContextValueContainer(context, key)) {\n if (value.length === 0) {\n return [this.rdfNil];\n }\n else {\n return this.parsingContext.idStack[depth + 1] || [];\n }\n }\n await this.validateValueIndexes(value);\n return [];\n }\n // Handle property-scoped contexts\n context = await this.getContextSelfOrPropertyScoped(context, key);\n // Handle local context in the value\n if ('@context' in value) {\n context = await this.parsingContext.parseContext(value['@context'], (await this.parsingContext.getContext(keys, 0)).getContextRaw());\n }\n // In all other cases, we have a hash\n value = await this.unaliasKeywords(value, keys, depth, context); // Un-alias potential keywords in this hash\n if ('@value' in value) {\n let val;\n let valueLanguage;\n let valueDirection;\n let valueType;\n let valueIndex; // We don't use the index, but we need to check its type for spec-compliance\n for (key in value) {\n const subValue = value[key];\n switch (key) {\n case '@value':\n val = subValue;\n break;\n case '@language':\n valueLanguage = subValue;\n break;\n case '@direction':\n valueDirection = subValue;\n break;\n case '@type':\n valueType = subValue;\n break;\n case '@index':\n valueIndex = subValue;\n break;\n case '@annotation':\n // This keyword is allowed, but is processed like normal nodes\n break;\n default:\n throw new jsonld_context_parser_1.ErrorCoded(`Unknown value entry '${key}' in @value: ${JSON.stringify(value)}`, jsonld_context_parser_1.ERROR_CODES.INVALID_VALUE_OBJECT);\n }\n }\n // Skip further processing if we have an @type: @json\n if (await this.unaliasKeyword(valueType, keys, depth, true, context) === '@json') {\n return [this.dataFactory.literal(this.valueToJsonString(val), this.rdfJson)];\n }\n // Validate @value\n if (val === null) {\n return [];\n }\n if (typeof val === 'object') {\n throw new jsonld_context_parser_1.ErrorCoded(`The value of an '@value' can not be an object, got '${JSON.stringify(val)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_VALUE_OBJECT_VALUE);\n }\n // Validate @index\n if (this.parsingContext.validateValueIndexes && valueIndex && typeof valueIndex !== 'string') {\n throw new jsonld_context_parser_1.ErrorCoded(`The value of an '@index' must be a string, got '${JSON.stringify(valueIndex)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_INDEX_VALUE);\n }\n // Validate @language and @direction\n if (valueLanguage) {\n if (typeof val !== 'string') {\n throw new jsonld_context_parser_1.ErrorCoded(`When an '@language' is set, the value of '@value' must be a string, got '${JSON.stringify(val)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_LANGUAGE_TAGGED_VALUE);\n }\n if (!jsonld_context_parser_1.ContextParser.validateLanguage(valueLanguage, this.parsingContext.strictValues, jsonld_context_parser_1.ERROR_CODES.INVALID_LANGUAGE_TAGGED_STRING)) {\n return [];\n }\n // Language tags are always normalized to lowercase in 1.0.\n if (this.parsingContext.normalizeLanguageTags || this.parsingContext.activeProcessingMode === 1.0) {\n valueLanguage = valueLanguage.toLowerCase();\n }\n }\n if (valueDirection) {\n if (typeof val !== 'string') {\n throw new Error(`When an '@direction' is set, the value of '@value' must be a string, got '${JSON.stringify(val)}'`);\n }\n if (!jsonld_context_parser_1.ContextParser.validateDirection(valueDirection, this.parsingContext.strictValues)) {\n return [];\n }\n }\n // Check @language and @direction\n if (valueLanguage && valueDirection && this.parsingContext.rdfDirection) {\n if (valueType) {\n throw new jsonld_context_parser_1.ErrorCoded(`Can not have '@language', '@direction' and '@type' in a value: '${JSON\n .stringify(value)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_VALUE_OBJECT);\n }\n return this.nullableTermToArray(this\n .createLanguageDirectionLiteral(depth, val, valueLanguage, valueDirection));\n }\n else if (valueLanguage) { // Check @language\n if (valueType) {\n throw new jsonld_context_parser_1.ErrorCoded(`Can not have both '@language' and '@type' in a value: '${JSON.stringify(value)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_VALUE_OBJECT);\n }\n return [this.dataFactory.literal(val, valueLanguage)];\n }\n else if (valueDirection && this.parsingContext.rdfDirection) { // Check @direction\n if (valueType) {\n throw new jsonld_context_parser_1.ErrorCoded(`Can not have both '@direction' and '@type' in a value: '${JSON.stringify(value)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_VALUE_OBJECT);\n }\n return this.nullableTermToArray(this\n .createLanguageDirectionLiteral(depth, val, valueLanguage, valueDirection));\n }\n else if (valueType) { // Validate @type\n if (typeof valueType !== 'string') {\n throw new jsonld_context_parser_1.ErrorCoded(`The value of an '@type' must be a string, got '${JSON.stringify(valueType)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_TYPED_VALUE);\n }\n const typeTerm = this.createVocabOrBaseTerm(context, valueType);\n if (!typeTerm) {\n throw new jsonld_context_parser_1.ErrorCoded(`Invalid '@type' value, got '${JSON.stringify(valueType)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_TYPED_VALUE);\n }\n if (typeTerm.termType !== 'NamedNode') {\n throw new jsonld_context_parser_1.ErrorCoded(`Illegal value type (${typeTerm.termType}): ${valueType}`, jsonld_context_parser_1.ERROR_CODES.INVALID_TYPED_VALUE);\n }\n return [this.dataFactory.literal(val, typeTerm)];\n }\n // We don't pass the context, because context-based things like @language should be ignored\n return await this.valueToTerm(new jsonld_context_parser_1.JsonLdContextNormalized({}), key, val, depth, keys);\n }\n else if ('@set' in value) {\n // No other entries are allow in this value\n if (Object.keys(value).length > 1) {\n throw new jsonld_context_parser_1.ErrorCoded(`Found illegal neighbouring entries next to @set for key: '${key}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);\n }\n // No need to do anything here, this is handled at the deeper level.\n return [];\n }\n else if ('@list' in value) {\n // No other entries are allowed in this value\n if (Object.keys(value).length > 1) {\n throw new jsonld_context_parser_1.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${key}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);\n }\n const listValue = value[\"@list\"];\n // We handle lists at value level so we can emit earlier, so this is handled already when we get here.\n // Empty anonymous lists are emitted at this place, because our streaming algorithm doesn't detect those.\n if (Array.isArray(listValue)) {\n if (listValue.length === 0) {\n return [this.rdfNil];\n }\n else {\n return this.parsingContext.idStack[depth + 1] || [];\n }\n }\n else {\n // We only have a single list element here, so emit this directly as single element\n return await this.valueToTerm(await this.parsingContext.getContext(keys), key, listValue, depth - 1, keys.slice(0, -1));\n }\n }\n else if ('@reverse' in value && typeof value['@reverse'] === 'boolean') {\n // We handle reverse properties at value level so we can emit earlier,\n // so this is handled already when we get here.\n return [];\n }\n else if ('@graph' in Util.getContextValueContainer(await this.parsingContext.getContext(keys), key)) {\n // We are processing a graph container\n const graphContainerEntries = this.parsingContext.graphContainerTermStack[depth + 1];\n return graphContainerEntries ? Object.values(graphContainerEntries) : [this.dataFactory.blankNode()];\n }\n else if (\"@id\" in value) {\n // Use deeper context if the value node contains other properties next to @id.\n if (Object.keys(value).length > 1) {\n context = await this.parsingContext.getContext(keys, 0);\n }\n // Handle local context in the value\n if ('@context' in value) {\n context = await this.parsingContext.parseContext(value['@context'], context.getContextRaw());\n }\n if (value[\"@type\"] === '@vocab') {\n return this.nullableTermToArray(this.createVocabOrBaseTerm(context, value[\"@id\"]));\n }\n else {\n const valueId = value[\"@id\"];\n let valueTerm;\n if (typeof valueId === 'object') {\n if (this.parsingContext.rdfstar) {\n valueTerm = this.parsingContext.idStack[depth + 1][0];\n }\n else {\n throw new jsonld_context_parser_1.ErrorCoded(`Found illegal @id '${value}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_ID_VALUE);\n }\n }\n else {\n valueTerm = this.resourceToTerm(context, valueId);\n }\n return this.nullableTermToArray(valueTerm);\n }\n }\n else {\n // Only make a blank node if at least one triple was emitted at the value's level.\n if (this.parsingContext.emittedStack[depth + 1]\n || (value && typeof value === 'object' && Object.keys(value).length === 0)) {\n return (this.parsingContext.idStack[depth + 1]\n || (this.parsingContext.idStack[depth + 1] = [this.dataFactory.blankNode()]));\n }\n else {\n return [];\n }\n }\n case 'string':\n return this.nullableTermToArray(this.stringValueToTerm(depth, await this.getContextSelfOrPropertyScoped(context, key), key, value, null));\n case 'boolean':\n return this.nullableTermToArray(this.stringValueToTerm(depth, await this.getContextSelfOrPropertyScoped(context, key), key, Boolean(value).toString(), this.dataFactory.namedNode(Util.XSD_BOOLEAN)));\n case 'number':\n return this.nullableTermToArray(this.stringValueToTerm(depth, await this.getContextSelfOrPropertyScoped(context, key), key, value, this.dataFactory.namedNode(value % 1 === 0 && value < 1e21 ? Util.XSD_INTEGER : Util.XSD_DOUBLE)));\n default:\n this.parsingContext.emitError(new Error(`Could not determine the RDF type of a ${type}`));\n return [];\n }\n }\n /**\n * If the context defines a property-scoped context for the given key,\n * that context will be returned.\n * Otherwise, the given context will be returned as-is.\n *\n * This should be used for valueToTerm cases that are not objects.\n * @param context A context.\n * @param key A JSON key.\n */\n async getContextSelfOrPropertyScoped(context, key) {\n const contextKeyEntry = context.getContextRaw()[key];\n if (contextKeyEntry && typeof contextKeyEntry === 'object' && '@context' in contextKeyEntry) {\n context = await this.parsingContext.parseContext(contextKeyEntry, context.getContextRaw(), true);\n }\n return context;\n }\n /**\n * If the given term is null, return an empty array, otherwise return an array with the single given term.\n * @param term A term.\n */\n nullableTermToArray(term) {\n return term ? [term] : [];\n }\n /**\n * Convert a given JSON key to an RDF predicate term,\n * based on @vocab.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param key A JSON key.\n * @return {RDF.NamedNode} An RDF named node.\n */\n predicateToTerm(context, key) {\n const expanded = context.expandTerm(key, true, this.parsingContext.getExpandOptions());\n // Immediately return if the predicate was disabled in the context\n if (!expanded) {\n return null;\n }\n // Check if the predicate is a blank node\n if (expanded[0] === '_' && expanded[1] === ':') {\n if (this.parsingContext.produceGeneralizedRdf) {\n return this.dataFactory.blankNode(expanded.substr(2));\n }\n else {\n return null;\n }\n }\n // Check if the predicate is a valid IRI\n if (Util.isValidIri(expanded)) {\n return this.dataFactory.namedNode(expanded);\n }\n else {\n if (expanded && this.parsingContext.strictValues) {\n this.parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Invalid predicate IRI: ${expanded}`, jsonld_context_parser_1.ERROR_CODES.INVALID_IRI_MAPPING));\n }\n else {\n return null;\n }\n }\n return null;\n }\n /**\n * Convert a given JSON key to an RDF resource term or blank node,\n * based on @base.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param key A JSON key.\n * @return {RDF.NamedNode} An RDF named node or null.\n */\n resourceToTerm(context, key) {\n if (key.startsWith('_:')) {\n return this.dataFactory.blankNode(key.substr(2));\n }\n const iri = context.expandTerm(key, false, this.parsingContext.getExpandOptions());\n if (!Util.isValidIri(iri)) {\n if (iri && this.parsingContext.strictValues) {\n this.parsingContext.emitError(new Error(`Invalid resource IRI: ${iri}`));\n }\n else {\n return null;\n }\n }\n return this.dataFactory.namedNode(iri);\n }\n /**\n * Convert a given JSON key to an RDF resource term.\n * It will do this based on the @vocab,\n * and fallback to @base.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param key A JSON key.\n * @return {RDF.NamedNode} An RDF named node or null.\n */\n createVocabOrBaseTerm(context, key) {\n if (key.startsWith('_:')) {\n return this.dataFactory.blankNode(key.substr(2));\n }\n const expandOptions = this.parsingContext.getExpandOptions();\n let expanded = context.expandTerm(key, true, expandOptions);\n if (expanded === key) {\n expanded = context.expandTerm(key, false, expandOptions);\n }\n if (!Util.isValidIri(expanded)) {\n if (expanded && this.parsingContext.strictValues && !expanded.startsWith('@')) {\n this.parsingContext.emitError(new Error(`Invalid term IRI: ${expanded}`));\n }\n else {\n return null;\n }\n }\n return this.dataFactory.namedNode(expanded);\n }\n /**\n * Ensure that the given value becomes a string.\n * @param {string | number} value A string or number.\n * @param {NamedNode} datatype The intended datatype.\n * @return {string} The returned string.\n */\n intToString(value, datatype) {\n if (typeof value === 'number') {\n if (Number.isFinite(value)) {\n const isInteger = value % 1 === 0;\n if (isInteger && (!datatype || datatype.value !== Util.XSD_DOUBLE)) {\n return Number(value).toString();\n }\n else {\n return value.toExponential(15).replace(/(\\d)0*e\\+?/, '$1E');\n }\n }\n else {\n return value > 0 ? 'INF' : '-INF';\n }\n }\n else {\n return value;\n }\n }\n /**\n * Convert a given JSON string value to an RDF term.\n * @param {number} depth The current stack depth.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key The current JSON key.\n * @param {string} value A JSON value.\n * @param {NamedNode} defaultDatatype The default datatype for the given value.\n * @return {RDF.Term} An RDF term or null.\n */\n stringValueToTerm(depth, context, key, value, defaultDatatype) {\n // Check the datatype from the context\n const contextType = Util.getContextValueType(context, key);\n if (contextType) {\n if (contextType === '@id') {\n if (!defaultDatatype) {\n return this.resourceToTerm(context, this.intToString(value, defaultDatatype));\n }\n }\n else if (contextType === '@vocab') {\n if (!defaultDatatype) {\n return this.createVocabOrBaseTerm(context, this.intToString(value, defaultDatatype));\n }\n }\n else {\n defaultDatatype = this.dataFactory.namedNode(contextType);\n }\n }\n // If we don't find such a datatype, check the language from the context\n if (!defaultDatatype) {\n const contextLanguage = Util.getContextValueLanguage(context, key);\n const contextDirection = Util.getContextValueDirection(context, key);\n if (contextDirection && this.parsingContext.rdfDirection) {\n return this.createLanguageDirectionLiteral(depth, this.intToString(value, defaultDatatype), contextLanguage, contextDirection);\n }\n else {\n return this.dataFactory.literal(this.intToString(value, defaultDatatype), contextLanguage);\n }\n }\n // If all else fails, make a literal based on the default content type\n return this.dataFactory.literal(this.intToString(value, defaultDatatype), defaultDatatype);\n }\n /**\n * Create a literal for the given value with the given language and direction.\n * Auxiliary quads may be emitted.\n * @param {number} depth The current stack depth.\n * @param {string} value A string value.\n * @param {string} language A language tag.\n * @param {string} direction A direction.\n * @return {Term} An RDF term.\n */\n createLanguageDirectionLiteral(depth, value, language, direction) {\n if (this.parsingContext.rdfDirection === 'i18n-datatype') {\n // Create a datatyped literal, by encoding the language and direction into https://www.w3.org/ns/i18n#.\n if (!language) {\n language = '';\n }\n return this.dataFactory.literal(value, this.dataFactory.namedNode(`https://www.w3.org/ns/i18n#${language}_${direction}`));\n }\n else {\n // Reify the literal.\n const valueNode = this.dataFactory.blankNode();\n const graph = this.getDefaultGraph();\n this.parsingContext.emitQuad(depth, this.dataFactory.quad(valueNode, this.dataFactory.namedNode(Util.RDF + 'value'), this.dataFactory.literal(value), graph));\n if (language) {\n this.parsingContext.emitQuad(depth, this.dataFactory.quad(valueNode, this.dataFactory.namedNode(Util.RDF + 'language'), this.dataFactory.literal(language), graph));\n }\n this.parsingContext.emitQuad(depth, this.dataFactory.quad(valueNode, this.dataFactory.namedNode(Util.RDF + 'direction'), this.dataFactory.literal(direction), graph));\n return valueNode;\n }\n }\n /**\n * Stringify the given JSON object to a canonical JSON string.\n * @param value Any valid JSON value.\n * @return {string} A canonical JSON string.\n */\n valueToJsonString(value) {\n return canonicalizeJson(value);\n }\n /**\n * If the key is not a keyword, try to check if it is an alias for a keyword,\n * and if so, un-alias it.\n * @param {string} key A key, can be falsy.\n * @param {string[]} keys The path of keys.\n * @param {number} depth The depth to\n * @param {boolean} disableCache If the cache should be disabled\n * @param {JsonLdContextNormalized} context A context to unalias with,\n * will fallback to retrieving the context for the given keys.\n * @return {Promise} A promise resolving to the key itself, or another key.\n */\n async unaliasKeyword(key, keys, depth, disableCache, context) {\n // Numbers can not be an alias\n if (Number.isInteger(key)) {\n return key;\n }\n // Try to grab from cache if it was already un-aliased before.\n if (!disableCache) {\n const cachedUnaliasedKeyword = this.parsingContext.unaliasedKeywordCacheStack[depth];\n if (cachedUnaliasedKeyword) {\n return cachedUnaliasedKeyword;\n }\n }\n if (!jsonld_context_parser_1.Util.isPotentialKeyword(key)) {\n context = context || await this.parsingContext.getContext(keys);\n let unliased = context.getContextRaw()[key];\n if (unliased && typeof unliased === 'object') {\n unliased = unliased['@id'];\n }\n if (jsonld_context_parser_1.Util.isValidKeyword(unliased)) {\n key = unliased;\n }\n }\n return disableCache ? key : (this.parsingContext.unaliasedKeywordCacheStack[depth] = key);\n }\n /**\n * Unalias the keyword of the parent.\n * This adds a safety check if no parent exist.\n * @param {any[]} keys A stack of keys.\n * @param {number} depth The current depth.\n * @return {Promise} A promise resolving to the parent key, or another key.\n */\n async unaliasKeywordParent(keys, depth) {\n return await this.unaliasKeyword(depth > 0 && keys[depth - 1], keys, depth - 1);\n }\n /**\n * Un-alias all keywords in the given hash.\n * @param {{[p: string]: any}} hash A hash object.\n * @param {string[]} keys The path of keys.\n * @param {number} depth The depth.\n * @param {JsonLdContextNormalized} context A context to unalias with,\n * will fallback to retrieving the context for the given keys.\n * @return {Promise<{[p: string]: any}>} A promise resolving to the new hash.\n */\n async unaliasKeywords(hash, keys, depth, context) {\n const newHash = {};\n for (const key in hash) {\n newHash[await this.unaliasKeyword(key, keys, depth + 1, true, context)] = hash[key];\n }\n return newHash;\n }\n /**\n * Check if we are processing a literal (including JSON literals) at the given depth.\n * This will also check higher levels,\n * because if a parent is a literal,\n * then the deeper levels are definitely a literal as well.\n * @param {any[]} keys The keys.\n * @param {number} depth The depth.\n * @return {boolean} If we are processing a literal.\n */\n async isLiteral(keys, depth) {\n for (let i = depth; i >= 0; i--) {\n if (await this.unaliasKeyword(keys[i], keys, i) === '@annotation') {\n // Literals may have annotations, which require processing of inner nodes.\n return false;\n }\n if (this.parsingContext.literalStack[i] || this.parsingContext.jsonLiteralStack[i]) {\n return true;\n }\n }\n return false;\n }\n /**\n * Check how many parents should be skipped for checking the @graph for the given node.\n *\n * @param {number} depth The depth of the node.\n * @param {any[]} keys An array of keys.\n * @return {number} The graph depth offset.\n */\n async getDepthOffsetGraph(depth, keys) {\n for (let i = depth - 1; i > 0; i--) {\n if (await this.unaliasKeyword(keys[i], keys, i) === '@graph') {\n // Skip further processing if we are already in an @graph-@id or @graph-@index container\n const containers = (await EntryHandlerContainer_1.EntryHandlerContainer.getContainerHandler(this.parsingContext, keys, i)).containers;\n if (EntryHandlerContainer_1.EntryHandlerContainer.isComplexGraphContainer(containers)) {\n return -1;\n }\n return depth - i - 1;\n }\n }\n return -1;\n }\n /**\n * Check if the given subject is of a valid type.\n * This should be called when applying @reverse'd properties.\n * @param {Term} subject A subject.\n */\n validateReverseSubject(subject) {\n if (subject.termType === 'Literal') {\n throw new jsonld_context_parser_1.ErrorCoded(`Found illegal literal in subject position: ${subject.value}`, jsonld_context_parser_1.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE);\n }\n }\n /**\n * Get the default graph.\n * @return {Term} An RDF term.\n */\n getDefaultGraph() {\n return this.parsingContext.defaultGraph || this.dataFactory.defaultGraph();\n }\n /**\n * Get the current graph, while taking into account a graph that can be defined via @container: @graph.\n * If not within a graph container, the default graph will be returned.\n * @param keys The current keys.\n * @param depth The current depth.\n */\n async getGraphContainerValue(keys, depth) {\n // Default to default graph\n let graph = this.getDefaultGraph();\n // Check if we are in an @container: @graph.\n const { containers, depth: depthContainer } = await EntryHandlerContainer_1.EntryHandlerContainer\n .getContainerHandler(this.parsingContext, keys, depth);\n if ('@graph' in containers) {\n // Get the graph from the stack.\n const graphContainerIndex = EntryHandlerContainer_1.EntryHandlerContainer.getContainerGraphIndex(containers, depthContainer, keys);\n const entry = this.parsingContext.graphContainerTermStack[depthContainer];\n graph = entry ? entry[graphContainerIndex] : null;\n // Set the graph in the stack if none has been set yet.\n if (!graph) {\n let graphId = null;\n if ('@id' in containers) {\n const keyUnaliased = await this.getContainerKey(keys[depthContainer], keys, depthContainer);\n if (keyUnaliased !== null) {\n graphId = await this.resourceToTerm(await this.parsingContext.getContext(keys), keyUnaliased);\n }\n }\n if (!graphId) {\n graphId = this.dataFactory.blankNode();\n }\n if (!this.parsingContext.graphContainerTermStack[depthContainer]) {\n this.parsingContext.graphContainerTermStack[depthContainer] = {};\n }\n graph = this.parsingContext.graphContainerTermStack[depthContainer][graphContainerIndex] = graphId;\n }\n }\n return graph;\n }\n /**\n * Get the properties depth for retrieving properties.\n *\n * Typically, the properties depth will be identical to the given depth.\n *\n * The following exceptions apply:\n * * When the parent is @reverse, the depth is decremented by one.\n * * When @nest parents are found, the depth is decremented by the number of @nest parents.\n * If in combination with the exceptions above an intermediary array is discovered,\n * the depth is also decremented by this number of arrays.\n *\n * @param keys The current key chain.\n * @param depth The current depth.\n */\n async getPropertiesDepth(keys, depth) {\n let lastValidDepth = depth;\n for (let i = depth - 1; i > 0; i--) {\n if (typeof keys[i] !== 'number') { // Skip array keys\n const parentKey = await this.unaliasKeyword(keys[i], keys, i);\n if (parentKey === '@reverse') {\n return i;\n }\n else if (parentKey === '@nest') {\n lastValidDepth = i;\n }\n else {\n return lastValidDepth;\n }\n }\n }\n return lastValidDepth;\n }\n /**\n * Get the key for the current container entry.\n * @param key A key, can be falsy.\n * @param keys The key chain.\n * @param depth The current depth to get the key from.\n * @return Promise resolving to the key.\n * Null will be returned for @none entries, with aliasing taken into account.\n */\n async getContainerKey(key, keys, depth) {\n const keyUnaliased = await this.unaliasKeyword(key, keys, depth);\n return keyUnaliased === '@none' ? null : keyUnaliased;\n }\n /**\n * Check if no reverse properties are present in embedded nodes.\n * @param key The current key.\n * @param reverse If a reverse property is active.\n * @param isEmbedded If we're in an embedded node.\n */\n validateReverseInEmbeddedNode(key, reverse, isEmbedded) {\n if (isEmbedded && reverse && !this.parsingContext.rdfstarReverseInEmbedded) {\n throw new jsonld_context_parser_1.ErrorCoded(`Illegal reverse property in embedded node in ${key}`, jsonld_context_parser_1.ERROR_CODES.INVALID_EMBEDDED_NODE);\n }\n }\n /**\n * Emit a quad, with checks.\n * @param depth The current depth.\n * @param subject S\n * @param predicate P\n * @param object O\n * @param graph G\n * @param reverse If a reverse property is active.\n * @param isEmbedded If we're in an embedded node.\n */\n emitQuadChecked(depth, subject, predicate, object, graph, reverse, isEmbedded) {\n // Create a quad\n let quad;\n if (reverse) {\n this.validateReverseSubject(object);\n quad = this.dataFactory.quad(object, predicate, subject, graph);\n }\n else {\n quad = this.dataFactory.quad(subject, predicate, object, graph);\n }\n // Emit the quad, unless it was created in an embedded node\n if (isEmbedded) {\n // Embedded nodes don't inherit the active graph\n if (quad.graph.termType !== 'DefaultGraph') {\n quad = this.dataFactory.quad(quad.subject, quad.predicate, quad.object);\n }\n // Multiple embedded nodes are not allowed\n if (this.parsingContext.idStack[depth - 1]) {\n throw new jsonld_context_parser_1.ErrorCoded(`Illegal multiple properties in an embedded node`, jsonld_context_parser_1.ERROR_CODES.INVALID_EMBEDDED_NODE);\n }\n this.parsingContext.idStack[depth - 1] = [quad];\n }\n else {\n this.parsingContext.emitQuad(depth, quad);\n }\n // Flush annotations\n const annotationsBuffer = this.parsingContext.annotationsBuffer[depth];\n if (annotationsBuffer) {\n for (const annotation of annotationsBuffer) {\n this.emitAnnotation(depth, quad, annotation);\n }\n delete this.parsingContext.annotationsBuffer[depth];\n }\n }\n // This is a separate function to enable recursion\n emitAnnotation(depth, quad, annotation) {\n // Construct annotation quad\n let annotationQuad;\n if (annotation.reverse) {\n this.validateReverseSubject(annotation.object);\n annotationQuad = this.dataFactory.quad(annotation.object, annotation.predicate, quad);\n }\n else {\n annotationQuad = this.dataFactory.quad(quad, annotation.predicate, annotation.object);\n }\n // Emit annotated quad\n this.parsingContext.emitQuad(depth, annotationQuad);\n // Also emit nested annotations\n for (const nestedAnnotation of annotation.nestedAnnotations) {\n this.emitAnnotation(depth, annotationQuad, nestedAnnotation);\n }\n }\n}\nUtil.XSD = 'http://www.w3.org/2001/XMLSchema#';\nUtil.XSD_BOOLEAN = Util.XSD + 'boolean';\nUtil.XSD_INTEGER = Util.XSD + 'integer';\nUtil.XSD_DOUBLE = Util.XSD + 'double';\nUtil.RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';\nexports.Util = Util;\n//# sourceMappingURL=Util.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContainerHandlerIdentifier = void 0;\n/**\n * Container handler for @id.\n *\n * It assumes that the current key is the identifier of the current value.\n * This will add this value to the parent node.\n */\nclass ContainerHandlerIdentifier {\n canCombineWithGraph() {\n return true;\n }\n async handle(containers, parsingContext, util, keys, value, depth) {\n let id;\n // First check if the child node already has a defined id.\n if (parsingContext.emittedStack[depth + 1] && parsingContext.idStack[depth + 1]) {\n // Use the existing identifier\n id = parsingContext.idStack[depth + 1][0];\n }\n else {\n // Create the identifier\n const keyUnaliased = await util.getContainerKey(keys[depth], keys, depth);\n const maybeId = keyUnaliased !== null\n ? await util.resourceToTerm(await parsingContext.getContext(keys), keys[depth])\n : util.dataFactory.blankNode();\n // Do nothing if the id is invalid\n if (!maybeId) {\n parsingContext.emittedStack[depth] = false; // Don't emit the predicate owning this container.\n return;\n }\n id = maybeId;\n // Insert the id into the stack so that buffered children can make us of it.\n parsingContext.idStack[depth + 1] = [id];\n }\n // Insert the id into the stack so that parents can make use of it.\n // Insert it as an array because multiple id container entries may exist\n let ids = parsingContext.idStack[depth];\n if (!ids) {\n ids = parsingContext.idStack[depth] = [];\n }\n // Only insert the term if it does not exist yet in the array.\n if (!ids.some((term) => term.equals(id))) {\n ids.push(id);\n }\n // Flush any pending flush buffers\n if (!await parsingContext.handlePendingContainerFlushBuffers()) {\n parsingContext.emittedStack[depth] = false; // Don't emit the predicate owning this container.\n }\n }\n}\nexports.ContainerHandlerIdentifier = ContainerHandlerIdentifier;\n//# sourceMappingURL=ContainerHandlerIdentifier.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContainerHandlerIndex = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst EntryHandlerPredicate_1 = require(\"../entryhandler/EntryHandlerPredicate\");\nconst Util_1 = require(\"../Util\");\n/**\n * Container handler for @index.\n *\n * This will ignore the current key and add this entry to the parent node.\n */\nclass ContainerHandlerIndex {\n canCombineWithGraph() {\n return true;\n }\n async handle(containers, parsingContext, util, keys, value, depth) {\n if (!Array.isArray(value)) {\n const graphContainer = '@graph' in containers;\n // Check if the container is a property-based container by checking if there is a valid @index.\n const context = await parsingContext.getContext(keys);\n const indexKey = keys[depth - 1];\n const indexPropertyRaw = Util_1.Util.getContextValueIndex(context, indexKey);\n if (indexPropertyRaw) {\n // Validate the @index value\n if (jsonld_context_parser_1.Util.isPotentialKeyword(indexPropertyRaw)) {\n throw new jsonld_context_parser_1.ErrorCoded(`Keywords can not be used as @index value, got: ${indexPropertyRaw}`, jsonld_context_parser_1.ERROR_CODES.INVALID_TERM_DEFINITION);\n }\n if (typeof indexPropertyRaw !== 'string') {\n throw new jsonld_context_parser_1.ErrorCoded(`@index values must be strings, got: ${indexPropertyRaw}`, jsonld_context_parser_1.ERROR_CODES.INVALID_TERM_DEFINITION);\n }\n // When @index is used, values must be node values, unless @type: @id is defined in the context\n if (typeof value !== 'object') {\n // Error if we don't have @type: @id\n if (Util_1.Util.getContextValueType(context, indexKey) !== '@id') {\n throw new jsonld_context_parser_1.ErrorCoded(`Property-based index containers require nodes as values or strings with @type: @id, but got: ${value}`, jsonld_context_parser_1.ERROR_CODES.INVALID_VALUE_OBJECT);\n }\n // Add an @id to the stack, so our expanded @index value can make use of it\n const id = util.resourceToTerm(context, value);\n if (id) {\n parsingContext.idStack[depth + 1] = [id];\n }\n }\n // Expand the @index value\n const indexProperty = util.createVocabOrBaseTerm(context, indexPropertyRaw);\n if (indexProperty) {\n const indexValues = await util.valueToTerm(context, indexPropertyRaw, await util.getContainerKey(keys[depth], keys, depth), depth, keys);\n if (graphContainer) {\n // When we're in a graph container, attach the index to the graph identifier\n const graphId = await util.getGraphContainerValue(keys, depth + 1);\n for (const indexValue of indexValues) {\n parsingContext.emitQuad(depth, util.dataFactory.quad(graphId, indexProperty, indexValue, util.getDefaultGraph()));\n }\n }\n else {\n // Otherwise, attach the index to the node identifier\n for (const indexValue of indexValues) {\n await EntryHandlerPredicate_1.EntryHandlerPredicate.handlePredicateObject(parsingContext, util, keys, depth + 1, indexProperty, indexValue, false, false, false);\n }\n }\n }\n }\n const depthOffset = graphContainer ? 2 : 1;\n await parsingContext.newOnValueJob(keys.slice(0, keys.length - depthOffset), value, depth - depthOffset, true);\n // Flush any pending flush buffers\n await parsingContext.handlePendingContainerFlushBuffers();\n }\n parsingContext.emittedStack[depth] = false; // We have emitted a level higher\n }\n}\nexports.ContainerHandlerIndex = ContainerHandlerIndex;\n//# sourceMappingURL=ContainerHandlerIndex.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContainerHandlerLanguage = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\n/**\n * Container handler for @language.\n *\n * It assumes that the current key is the language of the current value.\n * This will add this value to the parent node.\n */\nclass ContainerHandlerLanguage {\n canCombineWithGraph() {\n return false;\n }\n async handle(containers, parsingContext, util, keys, value, depth) {\n const language = await util.getContainerKey(keys[depth], keys, depth);\n if (Array.isArray(value)) {\n // No type-checking needed, will be handled on each value when this handler is called recursively.\n value = value.map((subValue) => ({ '@value': subValue, '@language': language }));\n }\n else {\n if (typeof value !== 'string') {\n throw new jsonld_context_parser_1.ErrorCoded(`Got invalid language map value, got '${JSON.stringify(value)}', but expected string`, jsonld_context_parser_1.ERROR_CODES.INVALID_LANGUAGE_MAP_VALUE);\n }\n value = { '@value': value, '@language': language };\n }\n await parsingContext.newOnValueJob(keys.slice(0, keys.length - 1), value, depth - 1, true);\n parsingContext.emittedStack[depth] = false; // We have emitted a level higher\n }\n}\nexports.ContainerHandlerLanguage = ContainerHandlerLanguage;\n//# sourceMappingURL=ContainerHandlerLanguage.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContainerHandlerType = void 0;\nconst EntryHandlerPredicate_1 = require(\"../entryhandler/EntryHandlerPredicate\");\nconst Util_1 = require(\"../Util\");\n/**\n * Container handler for @type.\n *\n * This will add this entry to the parent node, and use the current key as an rdf:type value.\n */\nclass ContainerHandlerType {\n canCombineWithGraph() {\n return false;\n }\n async handle(containers, parsingContext, util, keys, value, depth) {\n if (!Array.isArray(value)) {\n if (typeof value === 'string') {\n // Determine the @type of the container\n const context = await parsingContext.getContext(keys);\n const containerTypeType = Util_1.Util.getContextValueType(context, keys[depth - 1]);\n // String values refer to node references\n const id = containerTypeType === '@vocab'\n ? await util.createVocabOrBaseTerm(context, value)\n : await util.resourceToTerm(context, value);\n if (id) {\n // Handle the value of this node as @id, which will also cause the predicate from above to be emitted.\n const subValue = { '@id': id.termType === 'NamedNode' ? id.value : value };\n await parsingContext.newOnValueJob(keys.slice(0, keys.length - 1), subValue, depth - 1, true);\n // Set the id in the stack so it can be used for the rdf:type handling later on\n parsingContext.idStack[depth + 1] = [id];\n }\n }\n else {\n // Other values are handled by handling them as a proper job\n // Check needed for cases where entries don't have an explicit @id\n const entryHasIdentifier = !!parsingContext.idStack[depth + 1];\n // Handle the value of this node, which will also cause the predicate from above to be emitted.\n if (!entryHasIdentifier) {\n delete parsingContext.idStack[depth]; // Force new (blank node) identifier\n }\n await parsingContext.newOnValueJob(keys.slice(0, keys.length - 1), value, depth - 1, true);\n if (!entryHasIdentifier) {\n parsingContext.idStack[depth + 1] = parsingContext.idStack[depth]; // Copy the id to the child node, for @type\n }\n }\n // Identify the type to emit.\n const keyOriginal = await util.getContainerKey(keys[depth], keys, depth);\n const type = keyOriginal !== null\n ? util.createVocabOrBaseTerm(await parsingContext.getContext(keys), keyOriginal)\n : null;\n if (type) {\n // Push the type to the stack using the rdf:type predicate\n await EntryHandlerPredicate_1.EntryHandlerPredicate.handlePredicateObject(parsingContext, util, keys, depth + 1, util.rdfType, type, false, false, false);\n }\n // Flush any pending flush buffers\n await parsingContext.handlePendingContainerFlushBuffers();\n }\n parsingContext.emittedStack[depth] = false; // Don't emit the predicate owning this container.\n }\n}\nexports.ContainerHandlerType = ContainerHandlerType;\n//# sourceMappingURL=ContainerHandlerType.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerArrayValue = void 0;\nconst Util_1 = require(\"../Util\");\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\n/**\n * Handles values that are part of an array.\n */\nclass EntryHandlerArrayValue {\n isPropertyHandler() {\n return false;\n }\n isStackProcessor() {\n return true;\n }\n async validate(parsingContext, util, keys, depth, inProperty) {\n return this.test(parsingContext, util, null, keys, depth);\n }\n async test(parsingContext, util, key, keys, depth) {\n return typeof keys[depth] === 'number';\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n let parentKey = await util.unaliasKeywordParent(keys, depth);\n // Check if we have an anonymous list\n if (parentKey === '@list') {\n // Our value is part of an array\n // Determine the list root key\n let listRootKey = null;\n let listRootDepth = 0;\n for (let i = depth - 2; i > 0; i--) {\n const keyOption = keys[i];\n if (typeof keyOption === 'string' || typeof keyOption === 'number') {\n listRootDepth = i;\n listRootKey = keyOption;\n break;\n }\n }\n if (listRootKey !== null) {\n // Emit the given objects as list elements\n const values = await util.valueToTerm(await parsingContext.getContext(keys), listRootKey, value, depth, keys);\n for (const object of values) {\n await this.handleListElement(parsingContext, util, object, value, depth, keys.slice(0, listRootDepth), listRootDepth);\n }\n // If no values were found, emit a falsy list element to force an empty RDF list to be emitted.\n if (values.length === 0) {\n await this.handleListElement(parsingContext, util, null, value, depth, keys.slice(0, listRootDepth), listRootDepth);\n }\n }\n }\n else if (parentKey === '@set') {\n // Our value is part of a set, so we just add it to the parent-parent\n await parsingContext.newOnValueJob(keys.slice(0, -2), value, depth - 2, false);\n }\n else if (parentKey !== undefined && parentKey !== '@type') {\n // Buffer our value using the parent key as predicate\n // Determine the first parent key that is *not* an array key\n // This is needed in case we have an @list container with nested arrays,\n // where each of them should produce nested RDF lists.\n for (let i = depth - 1; i > 0; i--) {\n if (typeof keys[i] !== 'number') {\n parentKey = await util.unaliasKeyword(keys[i], keys, i);\n break;\n }\n }\n // Check if the predicate is marked as an @list in the context\n const parentContext = await parsingContext.getContext(keys.slice(0, -1));\n if ('@list' in Util_1.Util.getContextValueContainer(parentContext, parentKey)) {\n // Our value is part of an array\n // Emit the given objects as list elements\n parsingContext.emittedStack[depth + 1] = true; // Ensure the creation of bnodes for empty nodes\n const values = await util.valueToTerm(await parsingContext.getContext(keys), parentKey, value, depth, keys);\n for (const object of values) {\n await this.handleListElement(parsingContext, util, object, value, depth, keys.slice(0, -1), depth - 1);\n }\n // If no values were found, emit a falsy list element to force an empty RDF list to be emitted.\n if (values.length === 0) {\n await this.handleListElement(parsingContext, util, null, value, depth, keys.slice(0, -1), depth - 1);\n }\n }\n else {\n // Copy the stack values up one level so that the next job can access them.\n parsingContext.shiftStack(depth, 1);\n // Execute the job one level higher\n await parsingContext.newOnValueJob(keys.slice(0, -1), value, depth - 1, false);\n // Remove any defined contexts at this level to avoid it to propagate to the next array element.\n parsingContext.contextTree.removeContext(keys.slice(0, -1));\n }\n }\n }\n async handleListElement(parsingContext, util, value, valueOriginal, depth, listRootKeys, listRootDepth) {\n // Buffer our value as an RDF list using the listRootKey as predicate\n let listPointer = parsingContext.listPointerStack[depth];\n if (valueOriginal !== null && (await util.unaliasKeywords(valueOriginal, listRootKeys, depth))['@value'] !== null) {\n if (!listPointer || !listPointer.value) {\n const linkTerm = util.dataFactory.blankNode();\n listPointer = { value: linkTerm, listRootDepth, listId: linkTerm };\n }\n else {\n // rdf:rest links are always emitted before the next element,\n // as the blank node identifier is only created at that point.\n // Because of this reason, the final rdf:nil is emitted when the stack depth is decreased.\n const newLinkTerm = util.dataFactory.blankNode();\n parsingContext.emitQuad(depth, util.dataFactory.quad(listPointer.value, util.rdfRest, newLinkTerm, util.getDefaultGraph()));\n // Update the list pointer for the next element\n listPointer.value = newLinkTerm;\n }\n // Emit a list element for the current value\n // Omit rdf:first if the value is invalid\n if (value) {\n parsingContext.emitQuad(depth, util.dataFactory.quad(listPointer.value, util.rdfFirst, value, util.getDefaultGraph()));\n }\n }\n else {\n // A falsy list element if found.\n // Mark it as an rdf:nil list until another valid list element comes in\n if (!listPointer) {\n listPointer = { listRootDepth, listId: util.rdfNil };\n }\n }\n parsingContext.listPointerStack[depth] = listPointer;\n // Error if an annotation was defined\n if (parsingContext.rdfstar && parsingContext.annotationsBuffer[depth]) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found an illegal annotation inside a list`, jsonld_context_parser_1.ERROR_CODES.INVALID_ANNOTATION));\n }\n }\n}\nexports.EntryHandlerArrayValue = EntryHandlerArrayValue;\n//# sourceMappingURL=EntryHandlerArrayValue.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerContainer = void 0;\nconst ContainerHandlerIdentifier_1 = require(\"../containerhandler/ContainerHandlerIdentifier\");\nconst ContainerHandlerIndex_1 = require(\"../containerhandler/ContainerHandlerIndex\");\nconst ContainerHandlerLanguage_1 = require(\"../containerhandler/ContainerHandlerLanguage\");\nconst ContainerHandlerType_1 = require(\"../containerhandler/ContainerHandlerType\");\nconst Util_1 = require(\"../Util\");\n/**\n * Handles values that are part of a container type (like @index),\n * as specified by {@link IContainerHandler}.\n */\nclass EntryHandlerContainer {\n /**\n * Check fit the given container is a simple @graph container.\n * Concretely, it will check if no @index or @id is active as well.\n * @param containers A container hash.\n */\n static isSimpleGraphContainer(containers) {\n return '@graph' in containers\n && (('@set' in containers && Object.keys(containers).length === 2) || Object.keys(containers).length === 1);\n }\n /**\n * Check fit the given container is a complex @graph container.\n * Concretely, it will check if @index or @id is active as well next to @graph.\n * @param containers A container hash.\n */\n static isComplexGraphContainer(containers) {\n return '@graph' in containers\n && (('@set' in containers && Object.keys(containers).length > 2)\n || (!('@set' in containers) && Object.keys(containers).length > 1));\n }\n /**\n * Create an graph container index that can be used for identifying a graph term inside the graphContainerTermStack.\n * @param containers The applicable containers.\n * @param depth The container depth.\n * @param keys The array of keys.\n * @return The graph index.\n */\n static getContainerGraphIndex(containers, depth, keys) {\n let isSimpleGraphContainer = EntryHandlerContainer.isSimpleGraphContainer(containers);\n let index = '';\n for (let i = depth; i < keys.length; i++) {\n if (!isSimpleGraphContainer || typeof keys[i] === 'number') {\n index += ':' + keys[i];\n }\n // Only allow a second 'real' key if in a non-simple graph container.\n if (!isSimpleGraphContainer && typeof keys[i] !== 'number') {\n isSimpleGraphContainer = true;\n }\n }\n return index;\n }\n /**\n * Return the applicable container type at the given depth.\n *\n * This will ignore any arrays in the key chain.\n *\n * @param {ParsingContext} parsingContext A parsing context.\n * @param {any[]} keys The array of keys.\n * @param {number} depth The current depth.\n * @return {Promise<{ containers: {[typeName: string]: boolean}, depth: number, fallback: boolean }>}\n * All applicable containers for the given depth,\n * the `depth` of the container root (can change when arrays are in the key chain),\n * and the `fallback` flag that indicates if the default container type was returned\n * (i.e., no dedicated container type is defined).\n */\n static async getContainerHandler(parsingContext, keys, depth) {\n const fallback = {\n containers: { '@set': true },\n depth,\n fallback: true,\n };\n // A flag that is enabled when @graph container should be tested in next iteration\n let checkGraphContainer = false;\n // Iterate from deeper to higher\n const context = await parsingContext.getContext(keys, 2);\n for (let i = depth - 1; i >= 0; i--) {\n if (typeof keys[i] !== 'number') { // Skip array keys\n // @graph containers without any other types are one level less deep, and require special handling\n const containersSelf = Util_1.Util.getContextValue(context, '@container', keys[i], false);\n if (containersSelf && EntryHandlerContainer.isSimpleGraphContainer(containersSelf)) {\n return {\n containers: containersSelf,\n depth: i + 1,\n fallback: false,\n };\n }\n const containersParent = Util_1.Util.getContextValue(context, '@container', keys[i - 1], false);\n if (!containersParent) { // If we have the fallback container value\n if (checkGraphContainer) {\n // Return false if we were already expecting a @graph-@id of @graph-@index container\n return fallback;\n }\n // Check parent-parent, we may be in a @graph-@id of @graph-@index container, which have two levels\n checkGraphContainer = true;\n }\n else {\n // We had an invalid container next iteration, so we now have to check if we were in an @graph container\n const graphContainer = '@graph' in containersParent;\n // We're in a regular container\n for (const containerHandleName in EntryHandlerContainer.CONTAINER_HANDLERS) {\n if (containersParent[containerHandleName]) {\n if (graphContainer) {\n // Only accept graph containers if their combined handlers can handle them.\n if (EntryHandlerContainer.CONTAINER_HANDLERS[containerHandleName].canCombineWithGraph()) {\n return {\n containers: containersParent,\n depth: i,\n fallback: false,\n };\n }\n else {\n return fallback;\n }\n }\n else {\n // Only accept if we were not expecting a @graph-@id of @graph-@index container\n if (checkGraphContainer) {\n return fallback;\n }\n else {\n return {\n containers: containersParent,\n depth: i,\n fallback: false,\n };\n }\n }\n }\n }\n // Fail if no valid container handlers were found\n return fallback;\n }\n }\n }\n return fallback;\n }\n /**\n * Check if we are handling a value at the given depth\n * that is part of something that should be handled as a container,\n * AND if this container should be buffered, so that it can be handled by a dedicated container handler.\n *\n * For instance, any container with @graph will NOT be buffered.\n *\n * This will ignore any arrays in the key chain.\n *\n * @param {ParsingContext} parsingContext A parsing context.\n * @param {any[]} keys The array of keys.\n * @param {number} depth The current depth.\n * @return {Promise} If we are in the scope of a container handler.\n */\n static async isBufferableContainerHandler(parsingContext, keys, depth) {\n const handler = await EntryHandlerContainer.getContainerHandler(parsingContext, keys, depth);\n return !handler.fallback && !('@graph' in handler.containers);\n }\n isPropertyHandler() {\n return false;\n }\n isStackProcessor() {\n return true;\n }\n async validate(parsingContext, util, keys, depth, inProperty) {\n return !!await this.test(parsingContext, util, null, keys, depth);\n }\n async test(parsingContext, util, key, keys, depth) {\n const containers = Util_1.Util.getContextValueContainer(await parsingContext.getContext(keys, 2), keys[depth - 1]);\n for (const containerName in EntryHandlerContainer.CONTAINER_HANDLERS) {\n if (containers[containerName]) {\n return {\n containers,\n handler: EntryHandlerContainer.CONTAINER_HANDLERS[containerName],\n };\n }\n }\n return null;\n }\n async handle(parsingContext, util, key, keys, value, depth, testResult) {\n return testResult.handler.handle(testResult.containers, parsingContext, util, keys, value, depth);\n }\n}\nEntryHandlerContainer.CONTAINER_HANDLERS = {\n '@id': new ContainerHandlerIdentifier_1.ContainerHandlerIdentifier(),\n '@index': new ContainerHandlerIndex_1.ContainerHandlerIndex(),\n '@language': new ContainerHandlerLanguage_1.ContainerHandlerLanguage(),\n '@type': new ContainerHandlerType_1.ContainerHandlerType(),\n};\nexports.EntryHandlerContainer = EntryHandlerContainer;\n//# sourceMappingURL=EntryHandlerContainer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerInvalidFallback = void 0;\n/**\n * A catch-all for properties, that will either emit an error or ignore,\n * depending on whether or not the `strictValues` property is set.\n */\nclass EntryHandlerInvalidFallback {\n isPropertyHandler() {\n return false;\n }\n isStackProcessor() {\n return true;\n }\n async validate(parsingContext, util, keys, depth, inProperty) {\n return false;\n }\n async test(parsingContext, util, key, keys, depth) {\n return true;\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n parsingContext.emittedStack[depth] = false;\n }\n}\nexports.EntryHandlerInvalidFallback = EntryHandlerInvalidFallback;\n//# sourceMappingURL=EntryHandlerInvalidFallback.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerPredicate = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst Util_1 = require(\"../Util\");\n/**\n * Interprets keys as predicates.\n * The most common case in JSON-LD processing.\n */\nclass EntryHandlerPredicate {\n /**\n * Handle the given predicate-object by either emitting it,\n * or by placing it in the appropriate stack for later emission when no @graph and/or @id has been defined.\n * @param {ParsingContext} parsingContext A parsing context.\n * @param {Util} util A utility instance.\n * @param {any[]} keys A stack of keys.\n * @param {number} depth The current depth.\n * @param {Term} predicate The predicate.\n * @param {Term} object The object.\n * @param {boolean} reverse If the property is reversed.\n * @param {boolean} isEmbedded If the property exists in an embedded node as direct child.\n * @param {boolean} isAnnotation If the property exists in an annotation object.\n * @return {Promise} A promise resolving when handling is done.\n */\n static async handlePredicateObject(parsingContext, util, keys, depth, predicate, object, reverse, isEmbedded, isAnnotation) {\n const depthProperties = await util.getPropertiesDepth(keys, depth);\n const depthOffsetGraph = await util.getDepthOffsetGraph(depth, keys);\n const depthPropertiesGraph = depth - depthOffsetGraph;\n const subjects = parsingContext.idStack[depthProperties];\n if (subjects && !isAnnotation) {\n // Emit directly if the @id was already defined\n for (const subject of subjects) {\n // Check if we're in a @graph context\n const atGraph = depthOffsetGraph >= 0;\n if (atGraph) {\n const graphs = parsingContext.idStack[depthPropertiesGraph - 1];\n if (graphs) {\n for (const graph of graphs) {\n // Emit our quad if graph @id is known\n util.emitQuadChecked(depth, subject, predicate, object, graph, reverse, isEmbedded);\n }\n }\n else {\n // Buffer our triple if graph @id is not known yet.\n if (reverse) {\n util.validateReverseSubject(object);\n parsingContext.getUnidentifiedGraphBufferSafe(depthPropertiesGraph - 1).push({ subject: object, predicate, object: subject, isEmbedded });\n }\n else {\n parsingContext.getUnidentifiedGraphBufferSafe(depthPropertiesGraph - 1)\n .push({ subject, predicate, object, isEmbedded });\n }\n }\n }\n else {\n // Emit if no @graph was applicable\n const graph = await util.getGraphContainerValue(keys, depthProperties);\n util.emitQuadChecked(depth, subject, predicate, object, graph, reverse, isEmbedded);\n }\n }\n }\n else {\n // Buffer until our @id becomes known, or we go up the stack\n if (reverse) {\n util.validateReverseSubject(object);\n }\n // Either push to the annotations or the actual value buffer\n if (isAnnotation) {\n // Only add to buffer if rdfstar is enabled\n if (parsingContext.rdfstar) {\n // Error if an @id was defined\n if (parsingContext.idStack[depth]) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found an illegal @id inside an annotation: ${parsingContext.idStack[depth][0].value}`, jsonld_context_parser_1.ERROR_CODES.INVALID_ANNOTATION));\n }\n // Error if we're in an embedded node\n for (let i = 0; i < depth; i++) {\n if (await util.unaliasKeyword(keys[i], keys, i) === '@id') {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found an illegal annotation inside an embedded node`, jsonld_context_parser_1.ERROR_CODES.INVALID_ANNOTATION));\n }\n }\n // Store new annotation in the buffer\n const annotationsBuffer = parsingContext.getAnnotationsBufferSafe(depthProperties);\n const newAnnotation = { predicate, object, reverse, nestedAnnotations: [], depth: depthProperties };\n annotationsBuffer.push(newAnnotation);\n // Check in the buffer if any annotations were defined at a deeper depth,\n // if so, they are considered nested annotations.\n for (let i = annotationsBuffer.length - 2; i >= 0; i--) {\n // We iterate in reverse order, to enable easy item removal from the back.\n const existingAnnotation = annotationsBuffer[i];\n if (existingAnnotation.depth > depthProperties) {\n newAnnotation.nestedAnnotations.push(existingAnnotation);\n annotationsBuffer.splice(i, 1);\n }\n }\n }\n }\n else {\n parsingContext.getUnidentifiedValueBufferSafe(depthProperties).push({ predicate, object, reverse, isEmbedded });\n }\n }\n }\n isPropertyHandler() {\n return true;\n }\n isStackProcessor() {\n return true;\n }\n async validate(parsingContext, util, keys, depth, inProperty) {\n const key = keys[depth];\n if (key) {\n const context = await parsingContext.getContext(keys);\n if (!parsingContext.jsonLiteralStack[depth] && await util.predicateToTerm(context, keys[depth])) {\n // If this valid predicate is of type @json, mark it so in the stack so that no deeper handling of nodes occurs.\n if (Util_1.Util.getContextValueType(context, key) === '@json') {\n parsingContext.jsonLiteralStack[depth + 1] = true;\n }\n return true;\n }\n }\n return false;\n }\n async test(parsingContext, util, key, keys, depth) {\n return keys[depth];\n }\n async handle(parsingContext, util, key, keys, value, depth, testResult) {\n const keyOriginal = keys[depth];\n const context = await parsingContext.getContext(keys);\n const predicate = await util.predicateToTerm(context, key);\n if (predicate) {\n const objects = await util.valueToTerm(context, key, value, depth, keys);\n if (objects.length) {\n for (let object of objects) {\n // Based on parent key, check if reverse, embedded, and annotation.\n let parentKey = await util.unaliasKeywordParent(keys, depth);\n const reverse = Util_1.Util.isPropertyReverse(context, keyOriginal, parentKey);\n let parentDepthOffset = 0;\n while (parentKey === '@reverse' || typeof parentKey === 'number') {\n // Check parent of parent when checking while we're in an array or in @reverse\n if (typeof parentKey === 'number') {\n parentDepthOffset++;\n }\n else {\n depth--;\n }\n parentKey = await util.unaliasKeywordParent(keys, depth - parentDepthOffset);\n }\n const isEmbedded = Util_1.Util.isPropertyInEmbeddedNode(parentKey);\n util.validateReverseInEmbeddedNode(key, reverse, isEmbedded);\n const isAnnotation = Util_1.Util.isPropertyInAnnotationObject(parentKey);\n if (value) {\n // Special case if our term was defined as an @list, but does not occur in an array,\n // In that case we just emit it as an RDF list with a single element.\n const listValueContainer = '@list' in Util_1.Util.getContextValueContainer(context, key);\n if (listValueContainer || value['@list']) {\n if (((listValueContainer && !Array.isArray(value) && !value['@list'])\n || (value['@list'] && !Array.isArray(value['@list'])))\n && object !== util.rdfNil) {\n const listPointer = util.dataFactory.blankNode();\n parsingContext.emitQuad(depth, util.dataFactory.quad(listPointer, util.rdfRest, util.rdfNil, util.getDefaultGraph()));\n parsingContext.emitQuad(depth, util.dataFactory.quad(listPointer, util.rdfFirst, object, util.getDefaultGraph()));\n object = listPointer;\n }\n // Lists are not allowed in @reverse'd properties\n if (reverse && !parsingContext.allowSubjectList) {\n throw new jsonld_context_parser_1.ErrorCoded(`Found illegal list value in subject position at ${key}`, jsonld_context_parser_1.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE);\n }\n }\n }\n await EntryHandlerPredicate.handlePredicateObject(parsingContext, util, keys, depth, predicate, object, reverse, isEmbedded, isAnnotation);\n }\n }\n }\n }\n}\nexports.EntryHandlerPredicate = EntryHandlerPredicate;\n//# sourceMappingURL=EntryHandlerPredicate.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeyword = void 0;\n/**\n * An abstract keyword entry handler.\n */\nclass EntryHandlerKeyword {\n constructor(keyword) {\n this.keyword = keyword;\n }\n isPropertyHandler() {\n return false;\n }\n isStackProcessor() {\n return true;\n }\n async validate(parsingContext, util, keys, depth, inProperty) {\n return false;\n }\n async test(parsingContext, util, key, keys, depth) {\n return key === this.keyword;\n }\n}\nexports.EntryHandlerKeyword = EntryHandlerKeyword;\n//# sourceMappingURL=EntryHandlerKeyword.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordAnnotation = void 0;\nconst EntryHandlerKeyword_1 = require(\"./EntryHandlerKeyword\");\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\n/**\n * Handles @annotation entries.\n */\nclass EntryHandlerKeywordAnnotation extends EntryHandlerKeyword_1.EntryHandlerKeyword {\n constructor() {\n super('@annotation');\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n // Validate value\n if (typeof value === 'string' || (typeof value === 'object' && value['@value'])) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found illegal annotation value: ${JSON.stringify(value)}`, jsonld_context_parser_1.ERROR_CODES.INVALID_ANNOTATION));\n }\n // Rest of the processing is done as regular nodes\n }\n}\nexports.EntryHandlerKeywordAnnotation = EntryHandlerKeywordAnnotation;\n//# sourceMappingURL=EntryHandlerKeywordAnnotation.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordContext = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst EntryHandlerKeyword_1 = require(\"./EntryHandlerKeyword\");\n/**\n * Handles @context entries.\n */\nclass EntryHandlerKeywordContext extends EntryHandlerKeyword_1.EntryHandlerKeyword {\n constructor() {\n super('@context');\n }\n isStackProcessor() {\n return false;\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n // Error if an out-of-order context was found when support is not enabled.\n if (parsingContext.streamingProfile\n && (parsingContext.processingStack[depth]\n || parsingContext.processingType[depth]\n || parsingContext.idStack[depth] !== undefined)) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded('Found an out-of-order context, while streaming is enabled.' +\n '(disable `streamingProfile`)', jsonld_context_parser_1.ERROR_CODES.INVALID_STREAMING_KEY_ORDER));\n }\n // Find the parent context to inherit from.\n // We actually request a context for the current depth (with fallback to parent)\n // because we want to take into account any property-scoped contexts that are defined for this depth.\n const parentContext = parsingContext.getContext(keys);\n // Set the context for this scope\n const context = parsingContext.parseContext(value, (await parentContext).getContextRaw());\n parsingContext.contextTree.setContext(keys.slice(0, -1), context);\n parsingContext.emitContext(value);\n await parsingContext.validateContext(await context);\n }\n}\nexports.EntryHandlerKeywordContext = EntryHandlerKeywordContext;\n//# sourceMappingURL=EntryHandlerKeywordContext.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordGraph = void 0;\nconst EntryHandlerKeyword_1 = require(\"./EntryHandlerKeyword\");\n/**\n * Handles @graph entries.\n */\nclass EntryHandlerKeywordGraph extends EntryHandlerKeyword_1.EntryHandlerKeyword {\n constructor() {\n super('@graph');\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n // The current identifier identifies a graph for the deeper level.\n parsingContext.graphStack[depth + 1] = true;\n }\n}\nexports.EntryHandlerKeywordGraph = EntryHandlerKeywordGraph;\n//# sourceMappingURL=EntryHandlerKeywordGraph.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordId = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst EntryHandlerKeyword_1 = require(\"./EntryHandlerKeyword\");\n/**\n * Handles @id entries.\n */\nclass EntryHandlerKeywordId extends EntryHandlerKeyword_1.EntryHandlerKeyword {\n constructor() {\n super('@id');\n }\n isStackProcessor() {\n return false;\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n if (typeof value !== 'string') {\n // JSON-LD-star allows @id object values\n if (parsingContext.rdfstar && typeof value === 'object') {\n const valueKeys = Object.keys(value);\n if (valueKeys.length === 1 && valueKeys[0] === '@id') {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Invalid embedded node without property with @id ${value['@id']}`, jsonld_context_parser_1.ERROR_CODES.INVALID_EMBEDDED_NODE));\n }\n }\n else {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found illegal @id '${value}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_ID_VALUE));\n }\n return;\n }\n // Determine the canonical place for this id.\n // For example, @nest parents should be ignored.\n const depthProperties = await util.getPropertiesDepth(keys, depth);\n // Error if an @id for this node already existed.\n if (parsingContext.idStack[depthProperties] !== undefined) {\n if (parsingContext.idStack[depthProperties][0].listHead) {\n // Error if an @list was already defined for this node\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${keys[depth - 1]}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT));\n }\n else {\n // Otherwise, the previous id was just because of an @id entry.\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found duplicate @ids '${parsingContext\n .idStack[depthProperties][0].value}' and '${value}'`, jsonld_context_parser_1.ERROR_CODES.COLLIDING_KEYWORDS));\n }\n }\n // Error if an annotation was defined\n if (parsingContext.rdfstar && parsingContext.annotationsBuffer[depth]) {\n for (const annotation of parsingContext.annotationsBuffer[depth]) {\n if (annotation.depth === depth) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found an illegal @id inside an annotation: ${value}`, jsonld_context_parser_1.ERROR_CODES.INVALID_ANNOTATION));\n }\n }\n }\n // Save our @id on the stack\n parsingContext.idStack[depthProperties] = util.nullableTermToArray(await util.resourceToTerm(await parsingContext.getContext(keys), value));\n }\n}\nexports.EntryHandlerKeywordId = EntryHandlerKeywordId;\n//# sourceMappingURL=EntryHandlerKeywordId.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordIncluded = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst EntryHandlerKeyword_1 = require(\"./EntryHandlerKeyword\");\n/**\n * Handles @included entries.\n */\nclass EntryHandlerKeywordIncluded extends EntryHandlerKeyword_1.EntryHandlerKeyword {\n constructor() {\n super('@included');\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n if (typeof value !== 'object') {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found illegal @included '${value}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_INCLUDED_VALUE));\n }\n const valueUnliased = await util.unaliasKeywords(value, keys, depth, await parsingContext.getContext(keys));\n if ('@value' in valueUnliased) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found an illegal @included @value node '${JSON.stringify(value)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_INCLUDED_VALUE));\n }\n if ('@list' in valueUnliased) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found an illegal @included @list node '${JSON.stringify(value)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_INCLUDED_VALUE));\n }\n parsingContext.emittedStack[depth] = false;\n }\n}\nexports.EntryHandlerKeywordIncluded = EntryHandlerKeywordIncluded;\n//# sourceMappingURL=EntryHandlerKeywordIncluded.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordNest = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst EntryHandlerKeyword_1 = require(\"./EntryHandlerKeyword\");\n/**\n * Handles @nest entries.\n */\nclass EntryHandlerKeywordNest extends EntryHandlerKeyword_1.EntryHandlerKeyword {\n constructor() {\n super('@nest');\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n if (typeof value !== 'object') {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found invalid @nest entry for '${key}': '${value}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_NEST_VALUE));\n }\n if ('@value' in await util.unaliasKeywords(value, keys, depth, await parsingContext.getContext(keys))) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found an invalid @value node for '${key}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_NEST_VALUE));\n }\n parsingContext.emittedStack[depth] = false;\n }\n}\nexports.EntryHandlerKeywordNest = EntryHandlerKeywordNest;\n//# sourceMappingURL=EntryHandlerKeywordNest.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordType = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst Util_1 = require(\"../../Util\");\nconst EntryHandlerPredicate_1 = require(\"../EntryHandlerPredicate\");\nconst EntryHandlerKeyword_1 = require(\"./EntryHandlerKeyword\");\n/**\n * Handles @graph entries.\n */\nclass EntryHandlerKeywordType extends EntryHandlerKeyword_1.EntryHandlerKeyword {\n constructor() {\n super('@type');\n }\n isStackProcessor() {\n return false;\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n const keyOriginal = keys[depth];\n // The current identifier identifies an rdf:type predicate.\n // But we only emit it once the node closes,\n // as it's possible that the @type is used to identify the datatype of a literal, which we ignore here.\n const context = await parsingContext.getContext(keys);\n const predicate = util.rdfType;\n const parentKey = await util.unaliasKeywordParent(keys, depth);\n const reverse = Util_1.Util.isPropertyReverse(context, keyOriginal, parentKey);\n const isEmbedded = Util_1.Util.isPropertyInEmbeddedNode(parentKey);\n util.validateReverseInEmbeddedNode(key, reverse, isEmbedded);\n const isAnnotation = Util_1.Util.isPropertyInAnnotationObject(parentKey);\n // Handle multiple values if the value is an array\n const elements = Array.isArray(value) ? value : [value];\n for (const element of elements) {\n if (typeof element !== 'string') {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found illegal @type '${element}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_TYPE_VALUE));\n }\n const type = util.createVocabOrBaseTerm(context, element);\n if (type) {\n await EntryHandlerPredicate_1.EntryHandlerPredicate.handlePredicateObject(parsingContext, util, keys, depth, predicate, type, reverse, isEmbedded, isAnnotation);\n }\n }\n // Collect type-scoped contexts if they exist\n let scopedContext = Promise.resolve(context);\n let hasTypedScopedContext = false;\n for (const element of elements.sort()) { // Spec requires lexicographical ordering\n const typeContext = Util_1.Util.getContextValue(context, '@context', element, null);\n if (typeContext) {\n hasTypedScopedContext = true;\n scopedContext = scopedContext.then((c) => parsingContext.parseContext(typeContext, c.getContextRaw()));\n }\n }\n // Error if an out-of-order type-scoped context was found when support is not enabled.\n if (parsingContext.streamingProfile\n && (hasTypedScopedContext || !parsingContext.streamingProfileAllowOutOfOrderPlainType)\n && (parsingContext.processingStack[depth] || parsingContext.idStack[depth])) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded('Found an out-of-order type-scoped context, while streaming is enabled.' +\n '(disable `streamingProfile`)', jsonld_context_parser_1.ERROR_CODES.INVALID_STREAMING_KEY_ORDER));\n }\n // If at least least one type-scoped context applies, set them in the tree.\n if (hasTypedScopedContext) {\n // Do not propagate by default\n scopedContext = scopedContext.then((c) => {\n // Set the original context at this depth as a fallback\n // This is needed when a context was already defined at the given depth,\n // and this context needs to remain accessible from child nodes when propagation is disabled.\n if (c.getContextRaw()['@propagate'] !== true) {\n return new jsonld_context_parser_1.JsonLdContextNormalized(Object.assign(Object.assign({}, c.getContextRaw()), { '@propagate': false, '@__propagateFallback': context.getContextRaw() }));\n }\n return c;\n });\n // Set the new context in the context tree\n parsingContext.contextTree.setContext(keys.slice(0, keys.length - 1), scopedContext);\n }\n // Flag that type has been processed at this depth\n parsingContext.processingType[depth] = true;\n }\n}\nexports.EntryHandlerKeywordType = EntryHandlerKeywordType;\n//# sourceMappingURL=EntryHandlerKeywordType.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordUnknownFallback = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\n/**\n * A catch-all for keywords, that will either emit an error or ignore,\n * depending on whether or not the `strictValues` property is set.\n */\nclass EntryHandlerKeywordUnknownFallback {\n isPropertyHandler() {\n return false;\n }\n isStackProcessor() {\n return true;\n }\n async validate(parsingContext, util, keys, depth, inProperty) {\n const key = await util.unaliasKeyword(keys[depth], keys, depth);\n if (jsonld_context_parser_1.Util.isPotentialKeyword(key)) {\n // Don't emit anything inside free-floating lists\n if (!inProperty) {\n if (key === '@list') {\n return false;\n }\n }\n return true;\n }\n return false;\n }\n async test(parsingContext, util, key, keys, depth) {\n return jsonld_context_parser_1.Util.isPotentialKeyword(key);\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n const keywordType = EntryHandlerKeywordUnknownFallback.VALID_KEYWORDS_TYPES[key];\n if (keywordType !== undefined) {\n if (keywordType && typeof value !== keywordType.type) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Invalid value type for '${key}' with value '${value}'`, keywordType.errorCode));\n }\n }\n else if (parsingContext.strictValues) {\n parsingContext.emitError(new Error(`Unknown keyword '${key}' with value '${value}'`));\n }\n parsingContext.emittedStack[depth] = false;\n }\n}\nEntryHandlerKeywordUnknownFallback.VALID_KEYWORDS_TYPES = {\n '@index': { type: 'string', errorCode: jsonld_context_parser_1.ERROR_CODES.INVALID_INDEX_VALUE },\n '@list': null,\n '@reverse': { type: 'object', errorCode: jsonld_context_parser_1.ERROR_CODES.INVALID_REVERSE_VALUE },\n '@set': null,\n '@value': null,\n};\nexports.EntryHandlerKeywordUnknownFallback = EntryHandlerKeywordUnknownFallback;\n//# sourceMappingURL=EntryHandlerKeywordUnknownFallback.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordValue = void 0;\nconst EntryHandlerKeyword_1 = require(\"./EntryHandlerKeyword\");\n/**\n * Handles @value entries.\n */\nclass EntryHandlerKeywordValue extends EntryHandlerKeyword_1.EntryHandlerKeyword {\n constructor() {\n super('@value');\n }\n async validate(parsingContext, util, keys, depth, inProperty) {\n // If this is @value, mark it so in the stack so that no deeper handling of nodes occurs.\n const key = keys[depth];\n if (key && !parsingContext.literalStack[depth] && await this.test(parsingContext, util, key, keys, depth)) {\n parsingContext.literalStack[depth] = true;\n }\n return super.validate(parsingContext, util, keys, depth, inProperty);\n }\n async test(parsingContext, util, key, keys, depth) {\n return await util.unaliasKeyword(keys[depth], keys.slice(0, keys.length - 1), depth - 1, true) === '@value';\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n // If the value is valid, indicate that we are processing a literal.\n // The actual value will be determined at the parent level when the @value is part of an object,\n // because we may want to take into account additional entries such as @language.\n // See {@link Util.valueToTerm}\n // Indicate that we are processing a literal, and that no later predicates should be parsed at this depth.\n parsingContext.literalStack[depth] = true;\n // Void any buffers that we may have accumulated up until now\n delete parsingContext.unidentifiedValuesBuffer[depth];\n delete parsingContext.unidentifiedGraphsBuffer[depth];\n // Indicate that we have not emitted at this depth\n parsingContext.emittedStack[depth] = false;\n }\n}\nexports.EntryHandlerKeywordValue = EntryHandlerKeywordValue;\n//# sourceMappingURL=EntryHandlerKeywordValue.js.map","/* jshint esversion: 6 */\n/* jslint node: true */\n'use strict';\n\nmodule.exports = function serialize (object) {\n if (object === null || typeof object !== 'object' || object.toJSON != null) {\n return JSON.stringify(object);\n }\n\n if (Array.isArray(object)) {\n return '[' + object.reduce((t, cv, ci) => {\n const comma = ci === 0 ? '' : ',';\n const value = cv === undefined || typeof cv === 'symbol' ? null : cv;\n return t + comma + serialize(value);\n }, '') + ']';\n }\n\n return '{' + Object.keys(object).sort().reduce((t, cv, ci) => {\n if (object[cv] === undefined ||\n typeof object[cv] === 'symbol') {\n return t;\n }\n const comma = t.length === 0 ? '' : ',';\n return t + comma + serialize(cv) + ':' + serialize(object[cv]);\n }, '') + '}';\n};\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/JsonLdSerializer\"), exports);\n__exportStar(require(\"./lib/Util\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JsonLdSerializer = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst SeparatorType_1 = require(\"./SeparatorType\");\nconst Util_1 = require(\"./Util\");\nconst readable_stream_1 = require(\"readable-stream\");\n/**\n * A stream transformer that transforms an {@link RDF.Stream} into a JSON-LD (text) stream.\n */\nclass JsonLdSerializer extends readable_stream_1.Transform {\n constructor(options = {}) {\n super({ objectMode: true });\n this.indentation = 0;\n this.options = options;\n // Parse the context\n if (this.options.baseIRI && !this.options.context) {\n this.options.context = { '@base': this.options.baseIRI };\n }\n if (this.options.context) {\n this.originalContext = this.options.context;\n this.context = new jsonld_context_parser_1.ContextParser().parse(this.options.context, { baseIRI: this.options.baseIRI });\n }\n else {\n this.context = Promise.resolve(new jsonld_context_parser_1.JsonLdContextNormalized({}));\n }\n }\n /**\n * Parses the given text stream into a quad stream.\n * @param {NodeJS.EventEmitter} stream A text stream.\n * @return {NodeJS.EventEmitter} A quad stream.\n */\n import(stream) {\n const output = new readable_stream_1.PassThrough({ objectMode: true });\n stream.on('error', (error) => parsed.emit('error', error));\n stream.on('data', (data) => output.push(data));\n stream.on('end', () => output.push(null));\n const parsed = output.pipe(new JsonLdSerializer(this.options));\n return parsed;\n }\n /**\n * Transforms a quad into the text stream.\n * @param {Quad} quad An RDF quad.\n * @param {string} encoding An (ignored) encoding.\n * @param {module:stream.internal.TransformCallback} callback Callback that is invoked when the transformation is done\n * @private\n */\n _transform(quad, encoding, callback) {\n this.context.then((context) => {\n this.transformQuad(quad, context);\n callback();\n }).catch(callback);\n }\n /**\n * Construct a list in an RDF.Term object that can be used\n * inside a quad's object to write into the serializer\n * as a list using the @list keyword.\n * @param {RDF.Quad_Object[]} values A list of values, can be empty.\n * @return {RDF.Quad_Object} A term that should be used in the object position of the quad that is written to the serializer.\n */\n async list(values) {\n const context = await this.context;\n return {\n '@list': values.map((value) => Util_1.Util.termToValue(value, context, this.options)),\n };\n }\n /**\n * Called when the incoming stream is closed.\n * @param {module:stream.internal.TransformCallback} callback Callback that is invoked when the flushing is done.\n * @private\n */\n _flush(callback) {\n // If the stream was empty, ensure that we push the opening array\n if (!this.opened) {\n this.pushDocumentStart();\n }\n if (this.lastPredicate) {\n this.endPredicate();\n }\n if (this.lastSubject) {\n this.endSubject();\n }\n if (this.lastGraph && this.lastGraph.termType !== 'DefaultGraph') {\n this.endGraph();\n }\n this.endDocument();\n return callback(null, null);\n }\n /**\n * Transforms a quad into the text stream.\n * @param {Quad} quad An RDF quad.\n * @param {JsonLdContextNormalized} context A context for compacting.\n */\n transformQuad(quad, context) {\n // Open the array before the first quad\n if (!this.opened) {\n this.pushDocumentStart();\n }\n // Check if the subject equals the last named graph\n // In that case, we can reuse the already-existing @id node\n const lastGraphMatchesSubject = this.lastGraph && this.lastGraph.termType !== 'DefaultGraph'\n && this.lastGraph.equals(quad.subject);\n // Write graph\n if (!lastGraphMatchesSubject && (!this.lastGraph || !quad.graph.equals(this.lastGraph))) {\n // Check if the named graph equals the last subject\n // In that case, we can reuse the already-existing @id node\n let lastSubjectMatchesGraph = quad.graph.termType !== 'DefaultGraph'\n && this.lastSubject && this.lastSubject.equals(quad.graph);\n if (this.lastGraph) {\n if (this.lastGraph.termType !== 'DefaultGraph') {\n // The last graph was named\n this.endPredicate();\n this.endSubject();\n this.endGraph(true);\n lastSubjectMatchesGraph = false; // Special-case to avoid deeper nesting\n }\n else {\n // The last graph was default\n if (!lastSubjectMatchesGraph) {\n this.endPredicate();\n this.endSubject(true);\n }\n else {\n this.endPredicate(true);\n this.lastSubject = null;\n }\n }\n }\n // Push the graph\n if (quad.graph.termType !== 'DefaultGraph') {\n if (!lastSubjectMatchesGraph) {\n this.pushId(quad.graph, true, context);\n }\n this.pushSeparator(this.options.space\n ? SeparatorType_1.SeparatorType.GRAPH_FIELD_NONCOMPACT : SeparatorType_1.SeparatorType.GRAPH_FIELD_COMPACT);\n this.indentation++;\n }\n this.lastGraph = quad.graph;\n }\n // Write subject\n if (!this.lastSubject || !quad.subject.equals(this.lastSubject)) {\n if (lastGraphMatchesSubject) {\n this.endPredicate();\n this.endSubject();\n this.indentation--;\n this.pushSeparator(SeparatorType_1.SeparatorType.ARRAY_END_COMMA);\n this.lastGraph = quad.graph;\n }\n else {\n if (this.lastSubject) {\n this.endPredicate();\n this.endSubject(true);\n }\n // Open a new node for the new subject\n this.pushId(quad.subject, true, context);\n }\n this.lastSubject = quad.subject;\n }\n // Write predicate\n if (!this.lastPredicate || !quad.predicate.equals(this.lastPredicate)) {\n if (this.lastPredicate) {\n this.endPredicate(true);\n }\n // Open a new array for the new predicate\n this.pushPredicate(quad.predicate, context);\n }\n // Write the object value\n this.pushObject(quad.object, context);\n }\n pushDocumentStart() {\n this.opened = true;\n if (this.originalContext && !this.options.excludeContext) {\n this.pushSeparator(SeparatorType_1.SeparatorType.OBJECT_START);\n this.indentation++;\n this.pushSeparator(SeparatorType_1.SeparatorType.CONTEXT_FIELD);\n this.pushIndented(JSON.stringify(this.originalContext, null, this.options.space) + ',');\n this.pushSeparator(this.options.space\n ? SeparatorType_1.SeparatorType.GRAPH_FIELD_NONCOMPACT : SeparatorType_1.SeparatorType.GRAPH_FIELD_COMPACT);\n this.indentation++;\n }\n else {\n this.pushSeparator(SeparatorType_1.SeparatorType.ARRAY_START);\n this.indentation++;\n }\n }\n /**\n * Push the given term as an @id field.\n * @param {Term} term An RDF term.\n * @param startOnNewLine If `{` should start on a new line\n * @param {JsonLdContextNormalized} context The context.\n */\n pushId(term, startOnNewLine, context) {\n if (term.termType === 'Quad') {\n this.pushNestedQuad(term, true, context);\n }\n else {\n const subjectValue = term.termType === 'BlankNode'\n ? '_:' + term.value : context.compactIri(term.value, false);\n if (startOnNewLine) {\n this.pushSeparator(SeparatorType_1.SeparatorType.OBJECT_START);\n }\n else {\n this.push(SeparatorType_1.SeparatorType.OBJECT_START.label);\n if (this.options.space) {\n this.push('\\n');\n }\n }\n this.indentation++;\n this.pushIndented(this.options.space ? `\"@id\": \"${subjectValue}\",` : `\"@id\":\"${subjectValue}\",`);\n }\n }\n /**\n * Push the given predicate field.\n * @param {Term} predicate An RDF term.\n * @param {JsonLdContextNormalized} context The context.\n */\n pushPredicate(predicate, context) {\n let property = predicate.value;\n // Convert rdf:type into @type if not disabled.\n if (!this.options.useRdfType && property === Util_1.Util.RDF_TYPE) {\n property = '@type';\n this.objectOptions = Object.assign(Object.assign({}, this.options), { compactIds: true, vocab: true });\n }\n // Open array for following objects\n const compactedProperty = context.compactIri(property, true);\n this.pushIndented(this.options.space ? `\"${compactedProperty}\": [` : `\"${compactedProperty}\":[`);\n this.indentation++;\n this.lastPredicate = predicate;\n }\n /**\n * Push the given object value.\n * @param {Term} object An RDF term.\n * @param {JsonLdContextNormalized} context The context.\n */\n pushObject(object, context) {\n // Add a comma if we already had an object for this predicate\n if (!this.hadObjectForPredicate) {\n this.hadObjectForPredicate = true;\n }\n else {\n this.pushSeparator(SeparatorType_1.SeparatorType.COMMA);\n }\n // Handle nested quad\n if (object.termType === 'Quad') {\n const lastLastSubject = this.lastSubject;\n const lastLastPredicate = this.lastPredicate;\n this.hadObjectForPredicate = false;\n this.pushNestedQuad(object, false, context);\n this.endSubject(false); // Terminate identifier node of nested quad again, since we won't attach additional information to it.\n this.hadObjectForPredicate = true;\n this.lastPredicate = lastLastPredicate;\n this.lastSubject = lastLastSubject;\n return;\n }\n // Convert the object into a value and push it\n let value;\n try {\n if (object['@list']) {\n value = object;\n }\n else {\n value = Util_1.Util.termToValue(object, context, this.objectOptions || this.options);\n }\n }\n catch (e) {\n return this.emit('error', e);\n }\n this.pushIndented(JSON.stringify(value, null, this.options.space));\n }\n pushNestedQuad(nestedQuad, commaAfterSubject, context) {\n // Start a nested quad\n this.pushSeparator(SeparatorType_1.SeparatorType.OBJECT_START);\n this.indentation++;\n this.pushIndented(this.options.space ? `\"@id\": ` : `\"@id\":`, false);\n // Print the nested quad\n if (nestedQuad.graph.termType !== 'DefaultGraph') {\n this.emit('error', new Error(`Found a nested quad with the non-default graph: ${nestedQuad.graph.value}`));\n }\n this.pushId(nestedQuad.subject, false, context);\n this.pushPredicate(nestedQuad.predicate, context);\n this.pushObject(nestedQuad.object, context);\n this.endPredicate(false);\n this.endSubject(commaAfterSubject);\n }\n endDocument() {\n this.opened = false;\n if (this.originalContext && !this.options.excludeContext) {\n this.indentation--;\n this.pushSeparator(SeparatorType_1.SeparatorType.ARRAY_END);\n this.indentation--;\n this.pushSeparator(SeparatorType_1.SeparatorType.OBJECT_END);\n }\n else {\n this.indentation--;\n this.pushSeparator(SeparatorType_1.SeparatorType.ARRAY_END);\n }\n }\n /**\n * Push the end of a predicate and reset the buffers.\n * @param {boolean} comma If a comma should be appended.\n */\n endPredicate(comma) {\n // Close the predicate array\n this.indentation--;\n this.pushSeparator(comma ? SeparatorType_1.SeparatorType.ARRAY_END_COMMA : SeparatorType_1.SeparatorType.ARRAY_END);\n // Reset object buffer\n this.hadObjectForPredicate = false;\n this.objectOptions = null;\n // Reset predicate buffer\n this.lastPredicate = null;\n }\n /**\n * Push the end of a subject and reset the buffers.\n * @param {boolean} comma If a comma should be appended.\n */\n endSubject(comma) {\n // Close the last subject's node;\n this.indentation--;\n this.pushSeparator(comma ? SeparatorType_1.SeparatorType.OBJECT_END_COMMA : SeparatorType_1.SeparatorType.OBJECT_END);\n // Reset subject buffer\n this.lastSubject = null;\n }\n /**\n * Push the end of a graph and reset the buffers.\n * @param {boolean} comma If a comma should be appended.\n */\n endGraph(comma) {\n // Close the graph array\n this.indentation--;\n this.pushSeparator(SeparatorType_1.SeparatorType.ARRAY_END);\n // Close the graph id node\n this.indentation--;\n this.pushSeparator(comma ? SeparatorType_1.SeparatorType.OBJECT_END_COMMA : SeparatorType_1.SeparatorType.OBJECT_END);\n // Reset graph buffer\n this.lastGraph = null;\n }\n /**\n * Puh the given separator.\n * @param {SeparatorType} type A type of separator.\n */\n pushSeparator(type) {\n this.pushIndented(type.label);\n }\n /**\n * An indentation-aware variant of {@link #push}.\n * All strings that are pushed here will be prefixed by {@link #indentation} amount of spaces.\n * @param {string} data A string.\n * @param pushNewLine If a newline should be pushed afterwards.\n */\n pushIndented(data, pushNewLine = true) {\n const prefix = this.getIndentPrefix();\n const lines = data.split('\\n').map((line) => prefix + line).join('\\n');\n this.push(lines);\n if (this.options.space && pushNewLine) {\n this.push('\\n');\n }\n }\n /**\n * @return {string} Get the current indentation prefix based on {@link #indentation}.\n */\n getIndentPrefix() {\n return this.options.space ? this.options.space.repeat(this.indentation) : '';\n }\n}\nexports.JsonLdSerializer = JsonLdSerializer;\n//# sourceMappingURL=JsonLdSerializer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SeparatorType = void 0;\n/**\n * A type of JSON separator.\n */\nclass SeparatorType {\n constructor(label) {\n this.label = label;\n }\n}\nexports.SeparatorType = SeparatorType;\nSeparatorType.COMMA = new SeparatorType(',');\nSeparatorType.OBJECT_START = new SeparatorType('{');\nSeparatorType.OBJECT_END = new SeparatorType('}');\nSeparatorType.OBJECT_END_COMMA = new SeparatorType('},');\nSeparatorType.ARRAY_START = new SeparatorType('[');\nSeparatorType.ARRAY_END = new SeparatorType(']');\nSeparatorType.ARRAY_END_COMMA = new SeparatorType('],');\nSeparatorType.GRAPH_FIELD_NONCOMPACT = new SeparatorType('\"@graph\": [');\nSeparatorType.GRAPH_FIELD_COMPACT = new SeparatorType('\"@graph\":[');\nSeparatorType.CONTEXT_FIELD = new SeparatorType('\"@context\":');\n//# sourceMappingURL=SeparatorType.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Util = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\n/**\n * Utility functions and methods.\n */\nclass Util {\n /**\n * Convert an RDF term to a JSON value.\n * @param {Term} term An RDF term.\n * @param {JsonLdContextNormalized} context The context.\n * @param {ITermToValueOptions} options Conversion options.\n * @return {any} A JSON value.\n */\n static termToValue(term, context, options = {\n compactIds: false,\n useNativeTypes: false,\n }) {\n switch (term.termType) {\n case 'NamedNode':\n const compacted = context.compactIri(term.value, options.vocab);\n return options.compactIds ? compacted : { '@id': compacted };\n case 'DefaultGraph':\n return options.compactIds ? term.value : { '@id': term.value };\n case 'BlankNode':\n const id = `_:${term.value}`;\n return options.compactIds ? id : { '@id': id };\n case 'Literal':\n // Handle JSON datatype\n if (term.datatype.value === Util.RDF_JSON) {\n let parsedJson;\n try {\n parsedJson = JSON.parse(term.value);\n }\n catch (e) {\n throw new jsonld_context_parser_1.ErrorCoded('Invalid JSON literal: ' + e.message, jsonld_context_parser_1.ERROR_CODES.INVALID_JSON_LITERAL);\n }\n return {\n '@value': parsedJson,\n '@type': '@json',\n };\n }\n // Handle rdfDirection: i18n-datatype\n if (options.rdfDirection === 'i18n-datatype' && term.datatype.value.startsWith(Util.I18N)) {\n const [language, direction] = term.datatype.value\n .substr(Util.I18N.length, term.datatype.value.length)\n .split('_');\n return Object.assign(Object.assign({ '@value': term.value }, language ? { '@language': language } : {}), direction ? { '@direction': direction } : {});\n }\n const stringType = term.datatype.value === Util.XSD_STRING;\n const rawValue = {\n '@value': !stringType && options.useNativeTypes\n ? Util.stringToNativeType(term.value, term.datatype.value) : term.value,\n };\n if (term.language) {\n return Object.assign(Object.assign({}, rawValue), { '@language': term.language });\n }\n else if (!stringType && typeof rawValue['@value'] === 'string') {\n return Object.assign(Object.assign({}, rawValue), { '@type': term.datatype.value });\n }\n else {\n return rawValue;\n }\n }\n }\n /**\n * Convert a string term to a native type.\n * If no conversion is possible, the original string will be returned.\n * @param {string} value An RDF term's string value.\n * @param {string} type\n * @return {any}\n */\n static stringToNativeType(value, type) {\n if (type.startsWith(Util.XSD)) {\n const xsdType = type.substr(Util.XSD.length);\n switch (xsdType) {\n case 'boolean':\n if (value === 'true') {\n return true;\n }\n else if (value === 'false') {\n return false;\n }\n throw new Error(`Invalid xsd:boolean value '${value}'`);\n case 'integer':\n case 'number':\n case 'int':\n case 'byte':\n case 'long':\n const parsedInt = parseInt(value, 10);\n if (isNaN(parsedInt)) {\n throw new Error(`Invalid xsd:integer value '${value}'`);\n }\n return parsedInt;\n case 'float':\n case 'double':\n const parsedFloat = parseFloat(value);\n if (isNaN(parsedFloat)) {\n throw new Error(`Invalid xsd:float value '${value}'`);\n }\n return parsedFloat;\n }\n }\n return value;\n }\n}\nexports.Util = Util;\nUtil.XSD = 'http://www.w3.org/2001/XMLSchema#';\nUtil.XSD_STRING = Util.XSD + 'string';\nUtil.RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';\nUtil.RDF_TYPE = Util.RDF + 'type';\nUtil.RDF_JSON = Util.RDF + 'JSON';\nUtil.I18N = 'https://www.w3.org/ns/i18n#';\n//# sourceMappingURL=Util.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/propertyhandler/IItemPropertyHandler\"), exports);\n__exportStar(require(\"./lib/propertyhandler/ItemPropertyHandlerContent\"), exports);\n__exportStar(require(\"./lib/propertyhandler/ItemPropertyHandlerNumber\"), exports);\n__exportStar(require(\"./lib/propertyhandler/ItemPropertyHandlerTime\"), exports);\n__exportStar(require(\"./lib/propertyhandler/ItemPropertyHandlerUrl\"), exports);\n__exportStar(require(\"./lib/IHtmlParseListener\"), exports);\n__exportStar(require(\"./lib/IItemScope\"), exports);\n__exportStar(require(\"./lib/IVocabRegistry\"), exports);\n__exportStar(require(\"./lib/MicrodataRdfParser\"), exports);\n__exportStar(require(\"./lib/Util\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IHtmlParseListener.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IItemScope.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IVocabRegistry.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MicrodataRdfParser = void 0;\nconst htmlparser2_1 = require(\"htmlparser2\");\nconst readable_stream_1 = require(\"readable-stream\");\nconst ItemPropertyHandlerContent_1 = require(\"./propertyhandler/ItemPropertyHandlerContent\");\nconst ItemPropertyHandlerNumber_1 = require(\"./propertyhandler/ItemPropertyHandlerNumber\");\nconst ItemPropertyHandlerTime_1 = require(\"./propertyhandler/ItemPropertyHandlerTime\");\nconst ItemPropertyHandlerUrl_1 = require(\"./propertyhandler/ItemPropertyHandlerUrl\");\nconst Util_1 = require(\"./Util\");\nconst VOCAB_REGISTRY_DEFAULT = require(\"./vocab-registry-default.json\");\n/**\n * A stream transformer that parses Microdata (text) streams to an {@link RDF.Stream}.\n */\nclass MicrodataRdfParser extends readable_stream_1.Transform {\n constructor(options) {\n super({ readableObjectMode: true });\n // Stacks, where the key is the current depth.\n this.itemScopeStack = [];\n this.textBufferStack = [];\n // Variables for managing itemrefs.\n this.isEmittingReferences = false;\n this.pendingItemRefsDomain = {};\n this.pendingItemRefsRangeFinalized = {};\n // eslint-disable-next-line lines-between-class-members\n this.pendingItemRefsRangeCollecting = {};\n options = options || {};\n this.options = options;\n this.util = new Util_1.Util(options.dataFactory, options.baseIRI);\n this.defaultGraph = options.defaultGraph || this.util.dataFactory.defaultGraph();\n this.htmlParseListener = options.htmlParseListener;\n this.vocabRegistry = options.vocabRegistry || VOCAB_REGISTRY_DEFAULT;\n this.parser = this.initializeParser(!!options.xmlMode);\n }\n /**\n * Parses the given text stream into a quad stream.\n * @param {NodeJS.EventEmitter} stream A text stream.\n * @return {RDF.Stream} A quad stream.\n */\n import(stream) {\n const output = new readable_stream_1.PassThrough({ readableObjectMode: true });\n stream.on('error', (error) => parsed.emit('error', error));\n stream.on('data', (data) => output.push(data));\n stream.on('end', () => output.push(null));\n const parsed = output.pipe(new MicrodataRdfParser(this.options));\n return parsed;\n }\n _transform(chunk, encoding, callback) {\n this.parser.write(chunk.toString());\n callback();\n }\n _flush(callback) {\n this.parser.end();\n callback();\n }\n /**\n * Get the current item scope for the current depth.\n * This will skip all undefined item scopes.\n * @param parent If we should start looking one level higher in the stack.\n */\n getItemScope(parent) {\n let parentTagI = this.itemScopeStack.length - (parent ? 2 : 1);\n while (parentTagI > 0 && !this.itemScopeStack[parentTagI]) {\n parentTagI--;\n }\n return this.itemScopeStack[parentTagI];\n }\n /**\n * Get the current stack depth.\n */\n getDepth() {\n return this.itemScopeStack.length;\n }\n onTagOpen(name, attributes) {\n if (!this.isEmittingReferences) {\n // If the tag has an 'id', start collecting the whole stack in the item reference buffer\n if ('id' in attributes) {\n const id = attributes.id;\n this.pendingItemRefsRangeCollecting[id] = {\n events: [],\n counter: 0,\n ids: [],\n };\n }\n // Store this event in all collecting item reference buffers\n for (const buffer of Object.values(this.pendingItemRefsRangeCollecting)) {\n buffer.counter++;\n buffer.events.push({ type: 'open', name, attributes });\n }\n }\n // Ensure the text buffer stack is in line with the stack depth\n this.textBufferStack.push(undefined);\n // Processing steps based on https://w3c.github.io/microdata-rdf/#rdf-conversion-algorithm\n // 1. Determine the current item scope\n let itemScope;\n if ('itemscope' in attributes) {\n // Create a new item scope\n let subject;\n if (this.emittingReferencesItemScopeIdGenerator) {\n subject = this.emittingReferencesItemScopeIdGenerator();\n }\n else {\n subject = 'itemid' in attributes && this.util.createSubject(attributes.itemid) ||\n this.util.dataFactory.blankNode();\n // Store the genererated id in all collecting item reference buffers\n for (const buffer of Object.values(this.pendingItemRefsRangeCollecting)) {\n buffer.ids.push(subject);\n }\n }\n itemScope = { subject };\n // If the id was reused from a reference, block any new triples to be generated from it\n if (this.isEmittingReferences) {\n itemScope.blockEmission = true;\n }\n // Inherit vocab from parent item scope\n const parentItemScope = this.getItemScope();\n if (parentItemScope && parentItemScope.vocab) {\n itemScope.vocab = parentItemScope.vocab;\n }\n // 2. Push any changes to the item scope to the stack\n this.itemScopeStack.push(itemScope);\n }\n else {\n // Determine the parent item scope\n itemScope = this.getItemScope();\n // 2. Push any changes to the item scope to the stack\n this.itemScopeStack.push(undefined);\n }\n // If we have a valid item scope, process the current node\n if (itemScope) {\n // 3. Handle item types\n if ('itemtype' in attributes) {\n for (const type of this.util.createVocabIris(attributes.itemtype, itemScope, false)) {\n // 4. Vocab identifier is the first valid item\n if (!itemScope.vocab) {\n // 5. Modify vocab based on registry\n itemScope.vocab = this.util.deriveVocab(type.value, this.vocabRegistry);\n }\n // Emit item type\n if (!itemScope.blockEmission) {\n this.emitTriple(itemScope.subject, this.util.dataFactory.namedNode(`${Util_1.Util.RDF}type`), type);\n }\n }\n }\n // Save language in item scope\n if ('lang' in attributes) {\n itemScope.language = attributes.lang;\n }\n if ('xml:lang' in attributes) {\n itemScope.language = attributes['xml:lang'];\n }\n // Handle itemrefs (only if we also had an itemscope)\n // If we have an itemref, store it in our domain buffer.\n if ('itemscope' in attributes &&\n !this.isEmittingReferences && 'itemref' in attributes) {\n for (const reference of attributes.itemref.split(/\\s+/u)) {\n if (!(reference in this.pendingItemRefsDomain)) {\n this.pendingItemRefsDomain[reference] = [];\n }\n this.pendingItemRefsDomain[reference].push(itemScope);\n this.tryToEmitReferences(reference, itemScope);\n }\n }\n }\n // 6. Handle item properties\n if ('itemprop' in attributes) {\n this.handleItemProperties(attributes.itemprop, false, itemScope, name, attributes);\n }\n // Handle reverse item properties\n // https://w3c.github.io/microdata-rdf/#reverse-itemprop\n if ('itemprop-reverse' in attributes) {\n this.handleItemProperties(attributes['itemprop-reverse'], true, itemScope, name, attributes);\n }\n }\n onText(data) {\n // Store this event in all collecting item reference buffers\n if (!this.isEmittingReferences) {\n for (const buffer of Object.values(this.pendingItemRefsRangeCollecting)) {\n buffer.events.push({ type: 'text', data });\n }\n }\n // Save the text inside all item scopes that need to collect text\n for (const textBuffer of this.textBufferStack) {\n if (textBuffer) {\n textBuffer.push(data);\n }\n }\n }\n onTagClose() {\n // Store this event in all collecting item reference buffers\n if (!this.isEmittingReferences) {\n for (const [reference, buffer] of Object.entries(this.pendingItemRefsRangeCollecting)) {\n buffer.counter--;\n buffer.events.push({ type: 'close' });\n // Once the counter becomes zero, the tag is fully buffered, so we finalize it.\n if (buffer.counter === 0) {\n this.pendingItemRefsRangeFinalized[reference] = buffer;\n delete this.pendingItemRefsRangeCollecting[reference];\n // Try to emit this reference with buffered domain items\n this.tryToEmitReferences(reference);\n }\n }\n }\n // Emit all triples that were determined in the active tag\n const itemScope = this.getItemScope(true);\n if (itemScope) {\n const depth = this.getDepth();\n if (itemScope.predicates && depth in itemScope.predicates) {\n for (const [predicateKey, predicates] of Object.entries(itemScope.predicates[depth])) {\n // First check if we have a child item scope, otherwise get the text content\n // Safely cast textBufferStack, as it is always defined when itemScope.predicates is defined.\n const object = this.util.createLiteral(this.textBufferStack[depth].join(''), itemScope);\n this.emitPredicateTriples(itemScope, predicates, object, predicateKey === 'reverse');\n delete itemScope.predicates[depth][predicateKey];\n }\n }\n }\n // Remove the active tag from the stack\n this.itemScopeStack.pop();\n this.textBufferStack.pop();\n }\n onEnd() {\n // Nothing important should happen here.\n }\n /**\n * Initialize a new HtmlParser.\n * @param xmlMode If the parser should be setup in strict mode.\n */\n initializeParser(xmlMode) {\n return new htmlparser2_1.Parser({\n onclosetag: () => {\n try {\n this.onTagClose();\n if (this.htmlParseListener) {\n this.htmlParseListener.onTagClose();\n }\n }\n catch (error) {\n this.emit('error', error);\n }\n },\n onend: () => {\n try {\n this.onEnd();\n if (this.htmlParseListener) {\n this.htmlParseListener.onEnd();\n }\n }\n catch (error) {\n this.emit('error', error);\n }\n },\n onopentag: (name, attributes) => {\n try {\n this.onTagOpen(name, attributes);\n if (this.htmlParseListener) {\n this.htmlParseListener.onTagOpen(name, attributes);\n }\n }\n catch (error) {\n this.emit('error', error);\n }\n },\n ontext: (data) => {\n try {\n this.onText(data);\n if (this.htmlParseListener) {\n this.htmlParseListener.onText(data);\n }\n }\n catch (error) {\n this.emit('error', error);\n }\n },\n }, {\n decodeEntities: true,\n recognizeSelfClosing: true,\n xmlMode,\n });\n }\n /**\n * Handle the given item properties.\n * @param itempropValue The value of itemprop or itemprop-reverse.\n * @param reverse If the item properties are reversed (itemprop-reverse).\n * @param itemScope The current item scope.\n * @param tagName The current tag name.\n * @param tagAttributes The current tag attributes.\n */\n handleItemProperties(itempropValue, reverse, itemScope, tagName, tagAttributes) {\n const parentItemScope = this.getItemScope(true);\n if (parentItemScope) {\n // Set predicates in the scope, and handle them on tag close.\n const depth = this.getDepth();\n const predicates = this.util.createVocabIris(itempropValue, parentItemScope, true);\n if (!parentItemScope.predicates) {\n parentItemScope.predicates = {};\n }\n if (!parentItemScope.predicates[depth]) {\n parentItemScope.predicates[depth] = {};\n }\n const predicatesKey = reverse ? 'reverse' : 'forward';\n parentItemScope.predicates[depth][predicatesKey] = predicates;\n // Append rdf:type predicate if vocabulary expansion applies\n for (const vocabularyExpansionType of this.util.getVocabularyExpansionType(itempropValue, parentItemScope, this.vocabRegistry)) {\n predicates.push(vocabularyExpansionType);\n }\n // Check if a property handler that applies, forcefully use that as predicate value.\n // But DON'T call handlers in this prop is a direct (nested) itemscope.\n if (itemScope && 'itemscope' in tagAttributes) {\n this.emitPredicateTriples(parentItemScope, predicates, itemScope.subject, reverse);\n // Finalize the predicates, so text values do not apply to them.\n delete parentItemScope.predicates[depth][predicatesKey];\n }\n else {\n for (const handler of MicrodataRdfParser.ITEM_PROPERTY_HANDLERS) {\n if (handler.canHandle(tagName, tagAttributes)) {\n const object = handler.getObject(tagAttributes, this.util, parentItemScope);\n this.emitPredicateTriples(parentItemScope, predicates, object, reverse);\n // Finalize the predicates, so text values do not apply to them.\n delete parentItemScope.predicates[depth][predicatesKey];\n }\n }\n }\n // If no valid handler was found, indicate that we should collect text at this depth.\n if (parentItemScope.predicates[depth][predicatesKey]) {\n this.textBufferStack[depth] = [];\n }\n }\n }\n /**\n * Emit the given object for the given predicates.\n * @param itemScope The current item scope.\n * @param predicates An array of predicates.\n * @param object An object.\n * @param reverse If the triples should be reversed.\n */\n emitPredicateTriples(itemScope, predicates, object, reverse) {\n if (!itemScope.blockEmission) {\n for (const predicate of predicates) {\n if (reverse) {\n // Literals can not exist in subject position, so they must be ignored.\n if (object.termType !== 'Literal') {\n this.emitTriple(object, predicate, itemScope.subject);\n }\n }\n else {\n this.emitTriple(itemScope.subject, predicate, object);\n }\n }\n }\n }\n /**\n * Emit the given triple to the stream.\n * @param {Quad_Subject} subject A subject term.\n * @param {Quad_Predicate} predicate A predicate term.\n * @param {Quad_Object} object An object term.\n */\n emitTriple(subject, predicate, object) {\n this.push(this.util.dataFactory.quad(subject, predicate, object, this.defaultGraph));\n }\n /**\n * Attempt to emit all pending itemrefs for the given reference.\n * @param reference An item reference id.\n * @param itemScopeDomain An optional item scope. If defined, only refs from this scope will be emitted.\n */\n tryToEmitReferences(reference, itemScopeDomain) {\n const range = this.pendingItemRefsRangeFinalized[reference];\n if (range) {\n // Determine the item scope domains to emit\n let applicableItemScopes;\n if (itemScopeDomain) {\n applicableItemScopes = [itemScopeDomain];\n // Remove the item from the pending array\n // Element is guaranteed to exist in buffer\n const itemScopeDomainIndex = this.pendingItemRefsDomain[reference].indexOf(itemScopeDomain);\n this.pendingItemRefsDomain[reference].splice(itemScopeDomainIndex, 1);\n }\n else {\n applicableItemScopes = this.pendingItemRefsDomain[reference];\n // Remove all items from the pending array\n delete this.pendingItemRefsDomain[reference];\n }\n if (applicableItemScopes) {\n // Save the stack state\n const itemScopeStackOld = this.itemScopeStack;\n const textBufferStackOld = this.textBufferStack;\n this.isEmittingReferences = true;\n // For all applicable item scopes, emit the buffered events.\n for (const itemScope of applicableItemScopes) {\n this.itemScopeStack = [itemScope];\n this.textBufferStack = [undefined];\n const pendingIds = [...range.ids];\n this.emittingReferencesItemScopeIdGenerator = () => pendingIds.shift();\n for (const event of range.events) {\n switch (event.type) {\n case 'open':\n this.onTagOpen(event.name, event.attributes);\n break;\n case 'text':\n this.onText(event.data);\n break;\n case 'close':\n this.onTagClose();\n break;\n }\n }\n }\n // Restore the stack state\n this.emittingReferencesItemScopeIdGenerator = undefined;\n this.itemScopeStack = itemScopeStackOld;\n this.textBufferStack = textBufferStackOld;\n this.isEmittingReferences = false;\n }\n }\n }\n}\nexports.MicrodataRdfParser = MicrodataRdfParser;\nMicrodataRdfParser.ITEM_PROPERTY_HANDLERS = [\n new ItemPropertyHandlerContent_1.ItemPropertyHandlerContent(),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('a', 'href'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('area', 'href'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('audio', 'src'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('embed', 'src'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('iframe', 'src'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('img', 'src'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('link', 'href'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('object', 'data'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('source', 'src'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('track', 'src'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('video', 'src'),\n new ItemPropertyHandlerNumber_1.ItemPropertyHandlerNumber('data', 'value'),\n new ItemPropertyHandlerNumber_1.ItemPropertyHandlerNumber('meter', 'value'),\n new ItemPropertyHandlerTime_1.ItemPropertyHandlerTime(),\n];\n//# sourceMappingURL=MicrodataRdfParser.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Util = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst relative_to_absolute_iri_1 = require(\"relative-to-absolute-iri\");\n/**\n * A collection of utility functions.\n */\nclass Util {\n constructor(dataFactory, baseIRI) {\n this.dataFactory = dataFactory || new rdf_data_factory_1.DataFactory();\n this.baseIRI = baseIRI || '';\n }\n /**\n * Check if the given IRI is valid.\n * @param {string} iri A potential IRI.\n * @return {boolean} If the given IRI is valid.\n */\n static isValidIri(iri) {\n return Util.IRI_REGEX.test(iri);\n }\n /**\n * Create vocab terms for the given terms attribute.\n *\n * Relative IRIs will be based on the active vocab or baseIRI if `allowRelativeIris` is true.\n *\n * @param {string} terms An attribute value.\n * @param {IItemScope} itemScope The active item scope.\n * @param {boolean} allowRelativeIris If relative IRIs are allowed.\n * @return {Term[]} The IRI terms.\n */\n createVocabIris(terms, itemScope, allowRelativeIris) {\n return terms.split(/\\s+/u)\n .filter(term => !!term)\n .map(property => {\n if (!Util.isValidIri(property)) {\n if (!allowRelativeIris) {\n return;\n }\n property = `${itemScope.vocab || `${this.baseIRI}#`}${property}`;\n }\n return this.dataFactory.namedNode(property);\n })\n .filter(term => !!term);\n }\n /**\n * Get the predicates for which the given itemprop value should cause vocabulary expansion.\n * @param terms An attribute value.\n * @param itemScope The active item scope.\n * @param vocabRegistry The active vocabulary registry.\n */\n getVocabularyExpansionType(terms, itemScope, vocabRegistry) {\n // Check the presence of subPropertyOf or equivalentProperty\n const parts = terms.split(/\\s+/u);\n if (parts.includes('subPropertyOf') || parts.includes('equivalentProperty')) {\n return [this.dataFactory.namedNode(`${Util.RDF}type`)];\n }\n // Check in the item scope's vocab\n if (itemScope.vocab && itemScope.vocab in vocabRegistry && vocabRegistry[itemScope.vocab].properties) {\n let predicates = [];\n for (const [property, expansions] of Object\n .entries(vocabRegistry[itemScope.vocab].properties)) {\n if (parts.includes(property)) {\n predicates = [...Object.values(expansions).map(iri => this.dataFactory.namedNode(iri))];\n }\n }\n return predicates;\n }\n return [];\n }\n /**\n * Create a named node for the given term, which can be relative to the document base.\n * @param {string} iri A term string.\n * @return {Term} An RDF term, or undefined if invalid.\n */\n createSubject(iri) {\n if (!Util.isValidIri(iri)) {\n try {\n iri = (0, relative_to_absolute_iri_1.resolve)(iri, this.baseIRI);\n }\n catch (_a) {\n return;\n }\n }\n return this.dataFactory.namedNode(iri);\n }\n /**\n * Create a new literal node.\n * @param {string} literal The literal value.\n * @param {IActiveTag} activeTag The current active tag.\n * @return {Literal} A new literal node.\n */\n createLiteral(literal, activeTag) {\n return this.dataFactory.literal(literal, activeTag.language);\n }\n /**\n * Determine the vocab IRI from a given type IRI.\n * @link https://w3c.github.io/microdata-rdf/#property-uri-generation\n * @param typeIri A type IRI.\n * @param vocabRegistry The active vocabulary registry.\n */\n deriveVocab(typeIri, vocabRegistry) {\n let vocab;\n // First check if we find a prefix in the vocab registry\n for (const uriPrefix in vocabRegistry) {\n if (typeIri.startsWith(uriPrefix)) {\n vocab = uriPrefix;\n // Append fragment if prefix does not end with a slash\n if (!vocab.endsWith('/')) {\n vocab += '#';\n }\n break;\n }\n }\n // If no match was found, remove the last path segment from the URI\n if (!vocab) {\n const hashPos = typeIri.indexOf('#');\n if (hashPos > 0) {\n vocab = typeIri.slice(0, hashPos + 1);\n }\n else {\n vocab = (0, relative_to_absolute_iri_1.resolve)('.', typeIri);\n }\n }\n return vocab;\n }\n}\nexports.Util = Util;\nUtil.RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';\nUtil.XSD = 'http://www.w3.org/2001/XMLSchema#';\nUtil.RDFA = 'http://www.w3.org/ns/rdfa#';\nUtil.IRI_REGEX = /^([A-Za-z][\\d+-.A-Za-z]*|_):[^ \"<>[\\\\\\]`{|}]*$/u;\n//# sourceMappingURL=Util.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IItemPropertyHandler.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ItemPropertyHandlerContent = void 0;\n/**\n * Handler for an item property with the 'content' attribute.\n */\nclass ItemPropertyHandlerContent {\n canHandle(tagName, attributes) {\n return 'content' in attributes;\n }\n getObject(attributes, util, itemScope) {\n return util.createLiteral(attributes.content, itemScope);\n }\n}\nexports.ItemPropertyHandlerContent = ItemPropertyHandlerContent;\n//# sourceMappingURL=ItemPropertyHandlerContent.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ItemPropertyHandlerNumber = void 0;\nconst Util_1 = require(\"../Util\");\n/**\n * Handler for an item property with a number attribute.\n */\nclass ItemPropertyHandlerNumber {\n constructor(tagName, attributeName) {\n this.tagName = tagName;\n this.attributeName = attributeName;\n }\n canHandle(tagName, attributes) {\n return this.tagName === tagName && this.attributeName in attributes;\n }\n getObject(attributes, util, itemScope) {\n const value = attributes[this.attributeName];\n let datatype;\n if (!Number.isNaN(Number.parseInt(value, 10)) && !value.includes('.')) {\n datatype = `${Util_1.Util.XSD}integer`;\n }\n else if (!Number.isNaN(Number.parseFloat(value))) {\n datatype = `${Util_1.Util.XSD}double`;\n }\n return util.dataFactory.literal(value, datatype && util.dataFactory.namedNode(datatype));\n }\n}\nexports.ItemPropertyHandlerNumber = ItemPropertyHandlerNumber;\n//# sourceMappingURL=ItemPropertyHandlerNumber.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ItemPropertyHandlerTime = void 0;\nconst Util_1 = require(\"../Util\");\n/**\n * Handler for an item property for time tags.\n */\nclass ItemPropertyHandlerTime {\n canHandle(tagName, attributes) {\n return tagName === 'time' && 'datetime' in attributes;\n }\n getObject(attributes, util, itemScope) {\n const value = attributes.datetime;\n let datatype;\n for (const entry of ItemPropertyHandlerTime.TIME_REGEXES) {\n if (entry.regex.test(value)) {\n datatype = util.dataFactory.namedNode(Util_1.Util.XSD + entry.type);\n break;\n }\n }\n return util.dataFactory.literal(value, datatype);\n }\n}\nexports.ItemPropertyHandlerTime = ItemPropertyHandlerTime;\nItemPropertyHandlerTime.TIME_REGEXES = [\n {\n regex: /^-?P(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(\\.\\d)?S)?)?$/u,\n type: 'duration',\n },\n {\n regex: /^\\d+-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d((Z?)|([+-]\\d\\d:\\d\\d))$/u,\n type: 'dateTime',\n },\n { regex: /^\\d+-\\d\\d-\\d\\dZ?$/u, type: 'date' },\n { regex: /^\\d\\d:\\d\\d:\\d\\d((Z?)|([+-]\\d\\d:\\d\\d))$/u, type: 'time' },\n { regex: /^\\d+-\\d\\d$/u, type: 'gYearMonth' },\n { regex: /^\\d+$/u, type: 'gYear' },\n];\n//# sourceMappingURL=ItemPropertyHandlerTime.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ItemPropertyHandlerUrl = void 0;\nconst relative_to_absolute_iri_1 = require(\"relative-to-absolute-iri\");\n/**\n * Handler for an item property with a URL attribute.\n */\nclass ItemPropertyHandlerUrl {\n constructor(tagName, attributeName) {\n this.tagName = tagName;\n this.attributeName = attributeName;\n }\n canHandle(tagName, attributes) {\n return this.tagName === tagName && this.attributeName in attributes;\n }\n getObject(attributes, util, itemScope) {\n return util.dataFactory.namedNode((0, relative_to_absolute_iri_1.resolve)(attributes[this.attributeName], util.baseIRI));\n }\n}\nexports.ItemPropertyHandlerUrl = ItemPropertyHandlerUrl;\n//# sourceMappingURL=ItemPropertyHandlerUrl.js.map","module.exports = assert;\n\nfunction assert(val, msg) {\n if (!val)\n throw new Error(msg || 'Assertion failed');\n}\n\nassert.equal = function assertEqual(l, r, msg) {\n if (l != r)\n throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));\n};\n","const RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',\n XSD = 'http://www.w3.org/2001/XMLSchema#',\n SWAP = 'http://www.w3.org/2000/10/swap/';\n\nexport default {\n xsd: {\n decimal: `${XSD}decimal`,\n boolean: `${XSD}boolean`,\n double: `${XSD}double`,\n integer: `${XSD}integer`,\n string: `${XSD}string`,\n },\n rdf: {\n type: `${RDF}type`,\n nil: `${RDF}nil`,\n first: `${RDF}first`,\n rest: `${RDF}rest`,\n langString: `${RDF}langString`,\n },\n owl: {\n sameAs: 'http://www.w3.org/2002/07/owl#sameAs',\n },\n r: {\n forSome: `${SWAP}reify#forSome`,\n forAll: `${SWAP}reify#forAll`,\n },\n log: {\n implies: `${SWAP}log#implies`,\n },\n};\n","// **N3Lexer** tokenizes N3 documents.\nimport queueMicrotask from 'queue-microtask';\nimport namespaces from './IRIs';\n\nconst { xsd } = namespaces;\n\n// Regular expression and replacement string to escape N3 strings\nconst escapeSequence = /\\\\u([a-fA-F0-9]{4})|\\\\U([a-fA-F0-9]{8})|\\\\([^])/g;\nconst escapeReplacements = {\n '\\\\': '\\\\', \"'\": \"'\", '\"': '\"',\n 'n': '\\n', 'r': '\\r', 't': '\\t', 'f': '\\f', 'b': '\\b',\n '_': '_', '~': '~', '.': '.', '-': '-', '!': '!', '$': '$', '&': '&',\n '(': '(', ')': ')', '*': '*', '+': '+', ',': ',', ';': ';', '=': '=',\n '/': '/', '?': '?', '#': '#', '@': '@', '%': '%',\n};\nconst illegalIriChars = /[\\x00-\\x20<>\\\\\"\\{\\}\\|\\^\\`]/;\n\nconst lineModeRegExps = {\n _iri: true,\n _unescapedIri: true,\n _simpleQuotedString: true,\n _langcode: true,\n _blank: true,\n _newline: true,\n _comment: true,\n _whitespace: true,\n _endOfFile: true,\n};\nconst invalidRegExp = /$0^/;\n\n// ## Constructor\nexport default class N3Lexer {\n constructor(options) {\n // ## Regular expressions\n // It's slightly faster to have these as properties than as in-scope variables\n this._iri = /^<((?:[^ <>{}\\\\]|\\\\[uU])+)>[ \\t]*/; // IRI with escape sequences; needs sanity check after unescaping\n this._unescapedIri = /^<([^\\x00-\\x20<>\\\\\"\\{\\}\\|\\^\\`]*)>[ \\t]*/; // IRI without escape sequences; no unescaping\n this._simpleQuotedString = /^\"([^\"\\\\\\r\\n]*)\"(?=[^\"])/; // string without escape sequences\n this._simpleApostropheString = /^'([^'\\\\\\r\\n]*)'(?=[^'])/;\n this._langcode = /^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\\-])/i;\n this._prefix = /^((?:[A-Za-z\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02ff\\u0370-\\u037d\\u037f-\\u1fff\\u200c\\u200d\\u2070-\\u218f\\u2c00-\\u2fef\\u3001-\\ud7ff\\uf900-\\ufdcf\\ufdf0-\\ufffd]|[\\ud800-\\udb7f][\\udc00-\\udfff])(?:\\.?[\\-0-9A-Z_a-z\\xb7\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u037d\\u037f-\\u1fff\\u200c\\u200d\\u203f\\u2040\\u2070-\\u218f\\u2c00-\\u2fef\\u3001-\\ud7ff\\uf900-\\ufdcf\\ufdf0-\\ufffd]|[\\ud800-\\udb7f][\\udc00-\\udfff])*)?:(?=[#\\s<])/;\n this._prefixed = /^((?:[A-Za-z\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02ff\\u0370-\\u037d\\u037f-\\u1fff\\u200c\\u200d\\u2070-\\u218f\\u2c00-\\u2fef\\u3001-\\ud7ff\\uf900-\\ufdcf\\ufdf0-\\ufffd]|[\\ud800-\\udb7f][\\udc00-\\udfff])(?:\\.?[\\-0-9A-Z_a-z\\xb7\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u037d\\u037f-\\u1fff\\u200c\\u200d\\u203f\\u2040\\u2070-\\u218f\\u2c00-\\u2fef\\u3001-\\ud7ff\\uf900-\\ufdcf\\ufdf0-\\ufffd]|[\\ud800-\\udb7f][\\udc00-\\udfff])*)?:((?:(?:[0-:A-Z_a-z\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02ff\\u0370-\\u037d\\u037f-\\u1fff\\u200c\\u200d\\u2070-\\u218f\\u2c00-\\u2fef\\u3001-\\ud7ff\\uf900-\\ufdcf\\ufdf0-\\ufffd]|[\\ud800-\\udb7f][\\udc00-\\udfff]|%[0-9a-fA-F]{2}|\\\\[!#-\\/;=?\\-@_~])(?:(?:[\\.\\-0-:A-Z_a-z\\xb7\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u037d\\u037f-\\u1fff\\u200c\\u200d\\u203f\\u2040\\u2070-\\u218f\\u2c00-\\u2fef\\u3001-\\ud7ff\\uf900-\\ufdcf\\ufdf0-\\ufffd]|[\\ud800-\\udb7f][\\udc00-\\udfff]|%[0-9a-fA-F]{2}|\\\\[!#-\\/;=?\\-@_~])*(?:[\\-0-:A-Z_a-z\\xb7\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u037d\\u037f-\\u1fff\\u200c\\u200d\\u203f\\u2040\\u2070-\\u218f\\u2c00-\\u2fef\\u3001-\\ud7ff\\uf900-\\ufdcf\\ufdf0-\\ufffd]|[\\ud800-\\udb7f][\\udc00-\\udfff]|%[0-9a-fA-F]{2}|\\\\[!#-\\/;=?\\-@_~]))?)?)(?:[ \\t]+|(?=\\.?[,;!\\^\\s#()\\[\\]\\{\\}\"'<>]))/;\n this._variable = /^\\?(?:(?:[A-Z_a-z\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02ff\\u0370-\\u037d\\u037f-\\u1fff\\u200c\\u200d\\u2070-\\u218f\\u2c00-\\u2fef\\u3001-\\ud7ff\\uf900-\\ufdcf\\ufdf0-\\ufffd]|[\\ud800-\\udb7f][\\udc00-\\udfff])(?:[\\-0-:A-Z_a-z\\xb7\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u037d\\u037f-\\u1fff\\u200c\\u200d\\u203f\\u2040\\u2070-\\u218f\\u2c00-\\u2fef\\u3001-\\ud7ff\\uf900-\\ufdcf\\ufdf0-\\ufffd]|[\\ud800-\\udb7f][\\udc00-\\udfff])*)(?=[.,;!\\^\\s#()\\[\\]\\{\\}\"'<>])/;\n this._blank = /^_:((?:[0-9A-Z_a-z\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02ff\\u0370-\\u037d\\u037f-\\u1fff\\u200c\\u200d\\u2070-\\u218f\\u2c00-\\u2fef\\u3001-\\ud7ff\\uf900-\\ufdcf\\ufdf0-\\ufffd]|[\\ud800-\\udb7f][\\udc00-\\udfff])(?:\\.?[\\-0-9A-Z_a-z\\xb7\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u037d\\u037f-\\u1fff\\u200c\\u200d\\u203f\\u2040\\u2070-\\u218f\\u2c00-\\u2fef\\u3001-\\ud7ff\\uf900-\\ufdcf\\ufdf0-\\ufffd]|[\\ud800-\\udb7f][\\udc00-\\udfff])*)(?:[ \\t]+|(?=\\.?[,;:\\s#()\\[\\]\\{\\}\"'<>]))/;\n this._number = /^[\\-+]?(?:(\\d+\\.\\d*|\\.?\\d+)[eE][\\-+]?|\\d*(\\.)?)\\d+(?=\\.?[,;:\\s#()\\[\\]\\{\\}\"'<>])/;\n this._boolean = /^(?:true|false)(?=[.,;\\s#()\\[\\]\\{\\}\"'<>])/;\n this._keyword = /^@[a-z]+(?=[\\s#<:])/i;\n this._sparqlKeyword = /^(?:PREFIX|BASE|GRAPH)(?=[\\s#<])/i;\n this._shortPredicates = /^a(?=[\\s#()\\[\\]\\{\\}\"'<>])/;\n this._newline = /^[ \\t]*(?:#[^\\n\\r]*)?(?:\\r\\n|\\n|\\r)[ \\t]*/;\n this._comment = /#([^\\n\\r]*)/;\n this._whitespace = /^[ \\t]+/;\n this._endOfFile = /^(?:#[^\\n\\r]*)?$/;\n options = options || {};\n\n // In line mode (N-Triples or N-Quads), only simple features may be parsed\n if (this._lineMode = !!options.lineMode) {\n this._n3Mode = false;\n // Don't tokenize special literals\n for (const key in this) {\n if (!(key in lineModeRegExps) && this[key] instanceof RegExp)\n this[key] = invalidRegExp;\n }\n }\n // When not in line mode, enable N3 functionality by default\n else {\n this._n3Mode = options.n3 !== false;\n }\n // Don't output comment tokens by default\n this._comments = !!options.comments;\n // Cache the last tested closing position of long literals\n this._literalClosingPos = 0;\n }\n\n // ## Private methods\n\n // ### `_tokenizeToEnd` tokenizes as for as possible, emitting tokens through the callback\n _tokenizeToEnd(callback, inputFinished) {\n // Continue parsing as far as possible; the loop will return eventually\n let input = this._input;\n let currentLineLength = input.length;\n while (true) {\n // Count and skip whitespace lines\n let whiteSpaceMatch, comment;\n while (whiteSpaceMatch = this._newline.exec(input)) {\n // Try to find a comment\n if (this._comments && (comment = this._comment.exec(whiteSpaceMatch[0])))\n emitToken('comment', comment[1], '', this._line, whiteSpaceMatch[0].length);\n // Advance the input\n input = input.substr(whiteSpaceMatch[0].length, input.length);\n currentLineLength = input.length;\n this._line++;\n }\n // Skip whitespace on current line\n if (!whiteSpaceMatch && (whiteSpaceMatch = this._whitespace.exec(input)))\n input = input.substr(whiteSpaceMatch[0].length, input.length);\n\n // Stop for now if we're at the end\n if (this._endOfFile.test(input)) {\n // If the input is finished, emit EOF\n if (inputFinished) {\n // Try to find a final comment\n if (this._comments && (comment = this._comment.exec(input)))\n emitToken('comment', comment[1], '', this._line, input.length);\n input = null;\n emitToken('eof', '', '', this._line, 0);\n }\n return this._input = input;\n }\n\n // Look for specific token types based on the first character\n const line = this._line, firstChar = input[0];\n let type = '', value = '', prefix = '',\n match = null, matchLength = 0, inconclusive = false;\n switch (firstChar) {\n case '^':\n // We need at least 3 tokens lookahead to distinguish ^^ and ^^pre:fixed\n if (input.length < 3)\n break;\n // Try to match a type\n else if (input[1] === '^') {\n this._previousMarker = '^^';\n // Move to type IRI or prefixed name\n input = input.substr(2);\n if (input[0] !== '<') {\n inconclusive = true;\n break;\n }\n }\n // If no type, it must be a path expression\n else {\n if (this._n3Mode) {\n matchLength = 1;\n type = '^';\n }\n break;\n }\n // Fall through in case the type is an IRI\n case '<':\n // Try to find a full IRI without escape sequences\n if (match = this._unescapedIri.exec(input))\n type = 'IRI', value = match[1];\n // Try to find a full IRI with escape sequences\n else if (match = this._iri.exec(input)) {\n value = this._unescape(match[1]);\n if (value === null || illegalIriChars.test(value))\n return reportSyntaxError(this);\n type = 'IRI';\n }\n // Try to find a nested triple\n else if (input.length > 1 && input[1] === '<')\n type = '<<', matchLength = 2;\n // Try to find a backwards implication arrow\n else if (this._n3Mode && input.length > 1 && input[1] === '=')\n type = 'inverse', matchLength = 2, value = '>';\n break;\n\n case '>':\n if (input.length > 1 && input[1] === '>')\n type = '>>', matchLength = 2;\n break;\n\n case '_':\n // Try to find a blank node. Since it can contain (but not end with) a dot,\n // we always need a non-dot character before deciding it is a blank node.\n // Therefore, try inserting a space if we're at the end of the input.\n if ((match = this._blank.exec(input)) ||\n inputFinished && (match = this._blank.exec(`${input} `)))\n type = 'blank', prefix = '_', value = match[1];\n break;\n\n case '\"':\n // Try to find a literal without escape sequences\n if (match = this._simpleQuotedString.exec(input))\n value = match[1];\n // Try to find a literal wrapped in three pairs of quotes\n else {\n ({ value, matchLength } = this._parseLiteral(input));\n if (value === null)\n return reportSyntaxError(this);\n }\n if (match !== null || matchLength !== 0) {\n type = 'literal';\n this._literalClosingPos = 0;\n }\n break;\n\n case \"'\":\n if (!this._lineMode) {\n // Try to find a literal without escape sequences\n if (match = this._simpleApostropheString.exec(input))\n value = match[1];\n // Try to find a literal wrapped in three pairs of quotes\n else {\n ({ value, matchLength } = this._parseLiteral(input));\n if (value === null)\n return reportSyntaxError(this);\n }\n if (match !== null || matchLength !== 0) {\n type = 'literal';\n this._literalClosingPos = 0;\n }\n }\n break;\n\n case '?':\n // Try to find a variable\n if (this._n3Mode && (match = this._variable.exec(input)))\n type = 'var', value = match[0];\n break;\n\n case '@':\n // Try to find a language code\n if (this._previousMarker === 'literal' && (match = this._langcode.exec(input)))\n type = 'langcode', value = match[1];\n // Try to find a keyword\n else if (match = this._keyword.exec(input))\n type = match[0];\n break;\n\n case '.':\n // Try to find a dot as punctuation\n if (input.length === 1 ? inputFinished : (input[1] < '0' || input[1] > '9')) {\n type = '.';\n matchLength = 1;\n break;\n }\n // Fall through to numerical case (could be a decimal dot)\n\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n case '+':\n case '-':\n // Try to find a number. Since it can contain (but not end with) a dot,\n // we always need a non-dot character before deciding it is a number.\n // Therefore, try inserting a space if we're at the end of the input.\n if (match = this._number.exec(input) ||\n inputFinished && (match = this._number.exec(`${input} `))) {\n type = 'literal', value = match[0];\n prefix = (typeof match[1] === 'string' ? xsd.double :\n (typeof match[2] === 'string' ? xsd.decimal : xsd.integer));\n }\n break;\n\n case 'B':\n case 'b':\n case 'p':\n case 'P':\n case 'G':\n case 'g':\n // Try to find a SPARQL-style keyword\n if (match = this._sparqlKeyword.exec(input))\n type = match[0].toUpperCase();\n else\n inconclusive = true;\n break;\n\n case 'f':\n case 't':\n // Try to match a boolean\n if (match = this._boolean.exec(input))\n type = 'literal', value = match[0], prefix = xsd.boolean;\n else\n inconclusive = true;\n break;\n\n case 'a':\n // Try to find an abbreviated predicate\n if (match = this._shortPredicates.exec(input))\n type = 'abbreviation', value = 'a';\n else\n inconclusive = true;\n break;\n\n case '=':\n // Try to find an implication arrow or equals sign\n if (this._n3Mode && input.length > 1) {\n type = 'abbreviation';\n if (input[1] !== '>')\n matchLength = 1, value = '=';\n else\n matchLength = 2, value = '>';\n }\n break;\n\n case '!':\n if (!this._n3Mode)\n break;\n case ',':\n case ';':\n case '[':\n case ']':\n case '(':\n case ')':\n case '}':\n if (!this._lineMode) {\n matchLength = 1;\n type = firstChar;\n }\n break;\n case '{':\n // We need at least 2 tokens lookahead to distinguish \"{|\" and \"{ \"\n if (!this._lineMode && input.length >= 2) {\n // Try to find a quoted triple annotation start\n if (input[1] === '|')\n type = '{|', matchLength = 2;\n else\n type = firstChar, matchLength = 1;\n }\n break;\n case '|':\n // We need 2 tokens lookahead to parse \"|}\"\n // Try to find a quoted triple annotation end\n if (input.length >= 2 && input[1] === '}')\n type = '|}', matchLength = 2;\n break;\n\n default:\n inconclusive = true;\n }\n\n // Some first characters do not allow an immediate decision, so inspect more\n if (inconclusive) {\n // Try to find a prefix\n if ((this._previousMarker === '@prefix' || this._previousMarker === 'PREFIX') &&\n (match = this._prefix.exec(input)))\n type = 'prefix', value = match[1] || '';\n // Try to find a prefixed name. Since it can contain (but not end with) a dot,\n // we always need a non-dot character before deciding it is a prefixed name.\n // Therefore, try inserting a space if we're at the end of the input.\n else if ((match = this._prefixed.exec(input)) ||\n inputFinished && (match = this._prefixed.exec(`${input} `)))\n type = 'prefixed', prefix = match[1] || '', value = this._unescape(match[2]);\n }\n\n // A type token is special: it can only be emitted after an IRI or prefixed name is read\n if (this._previousMarker === '^^') {\n switch (type) {\n case 'prefixed': type = 'type'; break;\n case 'IRI': type = 'typeIRI'; break;\n default: type = '';\n }\n }\n\n // What if nothing of the above was found?\n if (!type) {\n // We could be in streaming mode, and then we just wait for more input to arrive.\n // Otherwise, a syntax error has occurred in the input.\n // One exception: error on an unaccounted linebreak (= not inside a triple-quoted literal).\n if (inputFinished || (!/^'''|^\"\"\"/.test(input) && /\\n|\\r/.test(input)))\n return reportSyntaxError(this);\n else\n return this._input = input;\n }\n\n // Emit the parsed token\n const length = matchLength || match[0].length;\n const token = emitToken(type, value, prefix, line, length);\n this.previousToken = token;\n this._previousMarker = type;\n\n // Advance to next part to tokenize\n input = input.substr(length, input.length);\n }\n\n // Emits the token through the callback\n function emitToken(type, value, prefix, line, length) {\n const start = input ? currentLineLength - input.length : currentLineLength;\n const end = start + length;\n const token = { type, value, prefix, line, start, end };\n callback(null, token);\n return token;\n }\n // Signals the syntax error through the callback\n function reportSyntaxError(self) { callback(self._syntaxError(/^\\S*/.exec(input)[0])); }\n }\n\n // ### `_unescape` replaces N3 escape codes by their corresponding characters\n _unescape(item) {\n let invalid = false;\n const replaced = item.replace(escapeSequence, (sequence, unicode4, unicode8, escapedChar) => {\n // 4-digit unicode character\n if (typeof unicode4 === 'string')\n return String.fromCharCode(Number.parseInt(unicode4, 16));\n // 8-digit unicode character\n if (typeof unicode8 === 'string') {\n let charCode = Number.parseInt(unicode8, 16);\n return charCode <= 0xFFFF ? String.fromCharCode(Number.parseInt(unicode8, 16)) :\n String.fromCharCode(0xD800 + ((charCode -= 0x10000) >> 10), 0xDC00 + (charCode & 0x3FF));\n }\n // fixed escape sequence\n if (escapedChar in escapeReplacements)\n return escapeReplacements[escapedChar];\n // invalid escape sequence\n invalid = true;\n return '';\n });\n return invalid ? null : replaced;\n }\n\n // ### `_parseLiteral` parses a literal into an unescaped value\n _parseLiteral(input) {\n // Ensure we have enough lookahead to identify triple-quoted strings\n if (input.length >= 3) {\n // Identify the opening quote(s)\n const opening = input.match(/^(?:\"\"\"|\"|'''|'|)/)[0];\n const openingLength = opening.length;\n\n // Find the next candidate closing quotes\n let closingPos = Math.max(this._literalClosingPos, openingLength);\n while ((closingPos = input.indexOf(opening, closingPos)) > 0) {\n // Count backslashes right before the closing quotes\n let backslashCount = 0;\n while (input[closingPos - backslashCount - 1] === '\\\\')\n backslashCount++;\n\n // An even number of backslashes (in particular 0)\n // means these are actual, non-escaped closing quotes\n if (backslashCount % 2 === 0) {\n // Extract and unescape the value\n const raw = input.substring(openingLength, closingPos);\n const lines = raw.split(/\\r\\n|\\r|\\n/).length - 1;\n const matchLength = closingPos + openingLength;\n // Only triple-quoted strings can be multi-line\n if (openingLength === 1 && lines !== 0 ||\n openingLength === 3 && this._lineMode)\n break;\n this._line += lines;\n return { value: this._unescape(raw), matchLength };\n }\n closingPos++;\n }\n this._literalClosingPos = input.length - openingLength + 1;\n }\n return { value: '', matchLength: 0 };\n }\n\n // ### `_syntaxError` creates a syntax error for the given issue\n _syntaxError(issue) {\n this._input = null;\n const err = new Error(`Unexpected \"${issue}\" on line ${this._line}.`);\n err.context = {\n token: undefined,\n line: this._line,\n previousToken: this.previousToken,\n };\n return err;\n }\n\n // ### Strips off any starting UTF BOM mark.\n _readStartingBom(input) {\n return input.startsWith('\\ufeff') ? input.substr(1) : input;\n }\n\n // ## Public methods\n\n // ### `tokenize` starts the transformation of an N3 document into an array of tokens.\n // The input can be a string or a stream.\n tokenize(input, callback) {\n this._line = 1;\n\n // If the input is a string, continuously emit tokens through the callback until the end\n if (typeof input === 'string') {\n this._input = this._readStartingBom(input);\n // If a callback was passed, asynchronously call it\n if (typeof callback === 'function')\n queueMicrotask(() => this._tokenizeToEnd(callback, true));\n // If no callback was passed, tokenize synchronously and return\n else {\n const tokens = [];\n let error;\n this._tokenizeToEnd((e, t) => e ? (error = e) : tokens.push(t), true);\n if (error) throw error;\n return tokens;\n }\n }\n // Otherwise, the input must be a stream\n else {\n this._pendingBuffer = null;\n if (typeof input.setEncoding === 'function')\n input.setEncoding('utf8');\n // Adds the data chunk to the buffer and parses as far as possible\n input.on('data', data => {\n if (this._input !== null && data.length !== 0) {\n // Prepend any previous pending writes\n if (this._pendingBuffer) {\n data = Buffer.concat([this._pendingBuffer, data]);\n this._pendingBuffer = null;\n }\n // Hold if the buffer ends in an incomplete unicode sequence\n if (data[data.length - 1] & 0x80) {\n this._pendingBuffer = data;\n }\n // Otherwise, tokenize as far as possible\n else {\n // Only read a BOM at the start\n if (typeof this._input === 'undefined')\n this._input = this._readStartingBom(typeof data === 'string' ? data : data.toString());\n else\n this._input += data;\n this._tokenizeToEnd(callback, false);\n }\n }\n });\n // Parses until the end\n input.on('end', () => {\n if (typeof this._input === 'string')\n this._tokenizeToEnd(callback, true);\n });\n input.on('error', callback);\n }\n }\n}\n","// N3.js implementations of the RDF/JS core data types\n// See https://github.com/rdfjs/representation-task-force/blob/master/interface-spec.md\n\nimport namespaces from './IRIs';\n\nconst { rdf, xsd } = namespaces;\n\n// eslint-disable-next-line prefer-const\nlet DEFAULTGRAPH;\nlet _blankNodeCounter = 0;\n\nconst escapedLiteral = /^\"(.*\".*)(?=\"[^\"]*$)/;\n\n// ## DataFactory singleton\nconst DataFactory = {\n namedNode,\n blankNode,\n variable,\n literal,\n defaultGraph,\n quad,\n triple: quad,\n};\nexport default DataFactory;\n\n// ## Term constructor\nexport class Term {\n constructor(id) {\n this.id = id;\n }\n\n // ### The value of this term\n get value() {\n return this.id;\n }\n\n // ### Returns whether this object represents the same term as the other\n equals(other) {\n // If both terms were created by this library,\n // equality can be computed through ids\n if (other instanceof Term)\n return this.id === other.id;\n // Otherwise, compare term type and value\n return !!other && this.termType === other.termType &&\n this.value === other.value;\n }\n\n // ### Implement hashCode for Immutable.js, since we implement `equals`\n // https://immutable-js.com/docs/v4.0.0/ValueObject/#hashCode()\n hashCode() {\n return 0;\n }\n\n // ### Returns a plain object representation of this term\n toJSON() {\n return {\n termType: this.termType,\n value: this.value,\n };\n }\n}\n\n\n// ## NamedNode constructor\nexport class NamedNode extends Term {\n // ### The term type of this term\n get termType() {\n return 'NamedNode';\n }\n}\n\n// ## Literal constructor\nexport class Literal extends Term {\n // ### The term type of this term\n get termType() {\n return 'Literal';\n }\n\n // ### The text value of this literal\n get value() {\n return this.id.substring(1, this.id.lastIndexOf('\"'));\n }\n\n // ### The language of this literal\n get language() {\n // Find the last quotation mark (e.g., '\"abc\"@en-us')\n const id = this.id;\n let atPos = id.lastIndexOf('\"') + 1;\n // If \"@\" it follows, return the remaining substring; empty otherwise\n return atPos < id.length && id[atPos++] === '@' ? id.substr(atPos).toLowerCase() : '';\n }\n\n // ### The datatype IRI of this literal\n get datatype() {\n return new NamedNode(this.datatypeString);\n }\n\n // ### The datatype string of this literal\n get datatypeString() {\n // Find the last quotation mark (e.g., '\"abc\"^^http://ex.org/types#t')\n const id = this.id, dtPos = id.lastIndexOf('\"') + 1;\n const char = dtPos < id.length ? id[dtPos] : '';\n // If \"^\" it follows, return the remaining substring\n return char === '^' ? id.substr(dtPos + 2) :\n // If \"@\" follows, return rdf:langString; xsd:string otherwise\n (char !== '@' ? xsd.string : rdf.langString);\n }\n\n // ### Returns whether this object represents the same term as the other\n equals(other) {\n // If both literals were created by this library,\n // equality can be computed through ids\n if (other instanceof Literal)\n return this.id === other.id;\n // Otherwise, compare term type, value, language, and datatype\n return !!other && !!other.datatype &&\n this.termType === other.termType &&\n this.value === other.value &&\n this.language === other.language &&\n this.datatype.value === other.datatype.value;\n }\n\n toJSON() {\n return {\n termType: this.termType,\n value: this.value,\n language: this.language,\n datatype: { termType: 'NamedNode', value: this.datatypeString },\n };\n }\n}\n\n// ## BlankNode constructor\nexport class BlankNode extends Term {\n constructor(name) {\n super(`_:${name}`);\n }\n\n // ### The term type of this term\n get termType() {\n return 'BlankNode';\n }\n\n // ### The name of this blank node\n get value() {\n return this.id.substr(2);\n }\n}\n\nexport class Variable extends Term {\n constructor(name) {\n super(`?${name}`);\n }\n\n // ### The term type of this term\n get termType() {\n return 'Variable';\n }\n\n // ### The name of this variable\n get value() {\n return this.id.substr(1);\n }\n}\n\n// ## DefaultGraph constructor\nexport class DefaultGraph extends Term {\n constructor() {\n super('');\n return DEFAULTGRAPH || this;\n }\n\n // ### The term type of this term\n get termType() {\n return 'DefaultGraph';\n }\n\n // ### Returns whether this object represents the same term as the other\n equals(other) {\n // If both terms were created by this library,\n // equality can be computed through strict equality;\n // otherwise, compare term types.\n return (this === other) || (!!other && (this.termType === other.termType));\n }\n}\n\n// ## DefaultGraph singleton\nDEFAULTGRAPH = new DefaultGraph();\n\n// ### Constructs a term from the given internal string ID\n// The third 'nested' parameter of this function is to aid\n// with recursion over nested terms. It should not be used\n// by consumers of this library.\n// See https://github.com/rdfjs/N3.js/pull/311#discussion_r1061042725\nexport function termFromId(id, factory, nested) {\n factory = factory || DataFactory;\n\n // Falsy value or empty string indicate the default graph\n if (!id)\n return factory.defaultGraph();\n\n // Identify the term type based on the first character\n switch (id[0]) {\n case '?':\n return factory.variable(id.substr(1));\n case '_':\n return factory.blankNode(id.substr(2));\n case '\"':\n // Shortcut for internal literals\n if (factory === DataFactory)\n return new Literal(id);\n // Literal without datatype or language\n if (id[id.length - 1] === '\"')\n return factory.literal(id.substr(1, id.length - 2));\n // Literal with datatype or language\n const endPos = id.lastIndexOf('\"', id.length - 1);\n return factory.literal(id.substr(1, endPos - 1),\n id[endPos + 1] === '@' ? id.substr(endPos + 2)\n : factory.namedNode(id.substr(endPos + 3)));\n case '[':\n id = JSON.parse(id);\n break;\n default:\n if (!nested || !Array.isArray(id)) {\n return factory.namedNode(id);\n }\n }\n return factory.quad(\n termFromId(id[0], factory, true),\n termFromId(id[1], factory, true),\n termFromId(id[2], factory, true),\n id[3] && termFromId(id[3], factory, true)\n );\n}\n\n// ### Constructs an internal string ID from the given term or ID string\n// The third 'nested' parameter of this function is to aid\n// with recursion over nested terms. It should not be used\n// by consumers of this library.\n// See https://github.com/rdfjs/N3.js/pull/311#discussion_r1061042725\nexport function termToId(term, nested) {\n if (typeof term === 'string')\n return term;\n if (term instanceof Term && term.termType !== 'Quad')\n return term.id;\n if (!term)\n return DEFAULTGRAPH.id;\n\n // Term instantiated with another library\n switch (term.termType) {\n case 'NamedNode': return term.value;\n case 'BlankNode': return `_:${term.value}`;\n case 'Variable': return `?${term.value}`;\n case 'DefaultGraph': return '';\n case 'Literal': return `\"${term.value}\"${\n term.language ? `@${term.language}` :\n (term.datatype && term.datatype.value !== xsd.string ? `^^${term.datatype.value}` : '')}`;\n case 'Quad':\n const res = [\n termToId(term.subject, true),\n termToId(term.predicate, true),\n termToId(term.object, true),\n ];\n if (term.graph && term.graph.termType !== 'DefaultGraph') {\n res.push(termToId(term.graph, true));\n }\n return nested ? res : JSON.stringify(res);\n default: throw new Error(`Unexpected termType: ${term.termType}`);\n }\n}\n\n\n// ## Quad constructor\nexport class Quad extends Term {\n constructor(subject, predicate, object, graph) {\n super('');\n this._subject = subject;\n this._predicate = predicate;\n this._object = object;\n this._graph = graph || DEFAULTGRAPH;\n }\n\n // ### The term type of this term\n get termType() {\n return 'Quad';\n }\n\n get subject() {\n return this._subject;\n }\n\n get predicate() {\n return this._predicate;\n }\n\n get object() {\n return this._object;\n }\n\n get graph() {\n return this._graph;\n }\n\n // ### Returns a plain object representation of this quad\n toJSON() {\n return {\n termType: this.termType,\n subject: this._subject.toJSON(),\n predicate: this._predicate.toJSON(),\n object: this._object.toJSON(),\n graph: this._graph.toJSON(),\n };\n }\n\n // ### Returns whether this object represents the same quad as the other\n equals(other) {\n return !!other && this._subject.equals(other.subject) &&\n this._predicate.equals(other.predicate) &&\n this._object.equals(other.object) &&\n this._graph.equals(other.graph);\n }\n}\nexport { Quad as Triple };\n\n// ### Escapes the quotes within the given literal\nexport function escapeQuotes(id) {\n return id.replace(escapedLiteral, (_, quoted) => `\"${quoted.replace(/\"/g, '\"\"')}`);\n}\n\n// ### Unescapes the quotes within the given literal\nexport function unescapeQuotes(id) {\n return id.replace(escapedLiteral, (_, quoted) => `\"${quoted.replace(/\"\"/g, '\"')}`);\n}\n\n// ### Creates an IRI\nfunction namedNode(iri) {\n return new NamedNode(iri);\n}\n\n// ### Creates a blank node\nfunction blankNode(name) {\n return new BlankNode(name || `n3-${_blankNodeCounter++}`);\n}\n\n// ### Creates a literal\nfunction literal(value, languageOrDataType) {\n // Create a language-tagged string\n if (typeof languageOrDataType === 'string')\n return new Literal(`\"${value}\"@${languageOrDataType.toLowerCase()}`);\n\n // Automatically determine datatype for booleans and numbers\n let datatype = languageOrDataType ? languageOrDataType.value : '';\n if (datatype === '') {\n // Convert a boolean\n if (typeof value === 'boolean')\n datatype = xsd.boolean;\n // Convert an integer or double\n else if (typeof value === 'number') {\n if (Number.isFinite(value))\n datatype = Number.isInteger(value) ? xsd.integer : xsd.double;\n else {\n datatype = xsd.double;\n if (!Number.isNaN(value))\n value = value > 0 ? 'INF' : '-INF';\n }\n }\n }\n\n // Create a datatyped literal\n return (datatype === '' || datatype === xsd.string) ?\n new Literal(`\"${value}\"`) :\n new Literal(`\"${value}\"^^${datatype}`);\n}\n\n// ### Creates a variable\nfunction variable(name) {\n return new Variable(name);\n}\n\n// ### Returns the default graph\nfunction defaultGraph() {\n return DEFAULTGRAPH;\n}\n\n// ### Creates a quad\nfunction quad(subject, predicate, object, graph) {\n return new Quad(subject, predicate, object, graph);\n}\n","// **N3Parser** parses N3 documents.\nimport N3Lexer from './N3Lexer';\nimport N3DataFactory from './N3DataFactory';\nimport namespaces from './IRIs';\n\nlet blankNodePrefix = 0;\n\n// ## Constructor\nexport default class N3Parser {\n constructor(options) {\n this._contextStack = [];\n this._graph = null;\n\n // Set the document IRI\n options = options || {};\n this._setBase(options.baseIRI);\n options.factory && initDataFactory(this, options.factory);\n\n // Set supported features depending on the format\n const format = (typeof options.format === 'string') ?\n options.format.match(/\\w*$/)[0].toLowerCase() : '',\n isTurtle = /turtle/.test(format), isTriG = /trig/.test(format),\n isNTriples = /triple/.test(format), isNQuads = /quad/.test(format),\n isN3 = this._n3Mode = /n3/.test(format),\n isLineMode = isNTriples || isNQuads;\n if (!(this._supportsNamedGraphs = !(isTurtle || isN3)))\n this._readPredicateOrNamedGraph = this._readPredicate;\n // Support triples in other graphs\n this._supportsQuads = !(isTurtle || isTriG || isNTriples || isN3);\n // Support nesting of triples\n this._supportsRDFStar = format === '' || /star|\\*$/.test(format);\n // Disable relative IRIs in N-Triples or N-Quads mode\n if (isLineMode)\n this._resolveRelativeIRI = iri => { return null; };\n this._blankNodePrefix = typeof options.blankNodePrefix !== 'string' ? '' :\n options.blankNodePrefix.replace(/^(?!_:)/, '_:');\n this._lexer = options.lexer || new N3Lexer({ lineMode: isLineMode, n3: isN3 });\n // Disable explicit quantifiers by default\n this._explicitQuantifiers = !!options.explicitQuantifiers;\n }\n\n // ## Static class methods\n\n // ### `_resetBlankNodePrefix` restarts blank node prefix identification\n static _resetBlankNodePrefix() {\n blankNodePrefix = 0;\n }\n\n // ## Private methods\n\n // ### `_setBase` sets the base IRI to resolve relative IRIs\n _setBase(baseIRI) {\n if (!baseIRI) {\n this._base = '';\n this._basePath = '';\n }\n else {\n // Remove fragment if present\n const fragmentPos = baseIRI.indexOf('#');\n if (fragmentPos >= 0)\n baseIRI = baseIRI.substr(0, fragmentPos);\n // Set base IRI and its components\n this._base = baseIRI;\n this._basePath = baseIRI.indexOf('/') < 0 ? baseIRI :\n baseIRI.replace(/[^\\/?]*(?:\\?.*)?$/, '');\n baseIRI = baseIRI.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\\/\\/[^\\/]*)?/i);\n this._baseRoot = baseIRI[0];\n this._baseScheme = baseIRI[1];\n }\n }\n\n // ### `_saveContext` stores the current parsing context\n // when entering a new scope (list, blank node, formula)\n _saveContext(type, graph, subject, predicate, object) {\n const n3Mode = this._n3Mode;\n this._contextStack.push({\n type,\n subject, predicate, object, graph,\n inverse: n3Mode ? this._inversePredicate : false,\n blankPrefix: n3Mode ? this._prefixes._ : '',\n quantified: n3Mode ? this._quantified : null,\n });\n // The settings below only apply to N3 streams\n if (n3Mode) {\n // Every new scope resets the predicate direction\n this._inversePredicate = false;\n // In N3, blank nodes are scoped to a formula\n // (using a dot as separator, as a blank node label cannot start with it)\n this._prefixes._ = (this._graph ? `${this._graph.value}.` : '.');\n // Quantifiers are scoped to a formula\n this._quantified = Object.create(this._quantified);\n }\n }\n\n // ### `_restoreContext` restores the parent context\n // when leaving a scope (list, blank node, formula)\n _restoreContext(type, token) {\n // Obtain the previous context\n const context = this._contextStack.pop();\n if (!context || context.type !== type)\n return this._error(`Unexpected ${token.type}`, token);\n\n // Restore the quad of the previous context\n this._subject = context.subject;\n this._predicate = context.predicate;\n this._object = context.object;\n this._graph = context.graph;\n\n // Restore N3 context settings\n if (this._n3Mode) {\n this._inversePredicate = context.inverse;\n this._prefixes._ = context.blankPrefix;\n this._quantified = context.quantified;\n }\n }\n\n // ### `_readInTopContext` reads a token when in the top context\n _readInTopContext(token) {\n switch (token.type) {\n // If an EOF token arrives in the top context, signal that we're done\n case 'eof':\n if (this._graph !== null)\n return this._error('Unclosed graph', token);\n delete this._prefixes._;\n return this._callback(null, null, this._prefixes);\n // It could be a prefix declaration\n case 'PREFIX':\n this._sparqlStyle = true;\n case '@prefix':\n return this._readPrefix;\n // It could be a base declaration\n case 'BASE':\n this._sparqlStyle = true;\n case '@base':\n return this._readBaseIRI;\n // It could be a graph\n case '{':\n if (this._supportsNamedGraphs) {\n this._graph = '';\n this._subject = null;\n return this._readSubject;\n }\n case 'GRAPH':\n if (this._supportsNamedGraphs)\n return this._readNamedGraphLabel;\n // Otherwise, the next token must be a subject\n default:\n return this._readSubject(token);\n }\n }\n\n // ### `_readEntity` reads an IRI, prefixed name, blank node, or variable\n _readEntity(token, quantifier) {\n let value;\n switch (token.type) {\n // Read a relative or absolute IRI\n case 'IRI':\n case 'typeIRI':\n const iri = this._resolveIRI(token.value);\n if (iri === null)\n return this._error('Invalid IRI', token);\n value = this._namedNode(iri);\n break;\n // Read a prefixed name\n case 'type':\n case 'prefixed':\n const prefix = this._prefixes[token.prefix];\n if (prefix === undefined)\n return this._error(`Undefined prefix \"${token.prefix}:\"`, token);\n value = this._namedNode(prefix + token.value);\n break;\n // Read a blank node\n case 'blank':\n value = this._blankNode(this._prefixes[token.prefix] + token.value);\n break;\n // Read a variable\n case 'var':\n value = this._variable(token.value.substr(1));\n break;\n // Everything else is not an entity\n default:\n return this._error(`Expected entity but got ${token.type}`, token);\n }\n // In N3 mode, replace the entity if it is quantified\n if (!quantifier && this._n3Mode && (value.id in this._quantified))\n value = this._quantified[value.id];\n return value;\n }\n\n // ### `_readSubject` reads a quad's subject\n _readSubject(token) {\n this._predicate = null;\n switch (token.type) {\n case '[':\n // Start a new quad with a new blank node as subject\n this._saveContext('blank', this._graph,\n this._subject = this._blankNode(), null, null);\n return this._readBlankNodeHead;\n case '(':\n // Start a new list\n this._saveContext('list', this._graph, this.RDF_NIL, null, null);\n this._subject = null;\n return this._readListItem;\n case '{':\n // Start a new formula\n if (!this._n3Mode)\n return this._error('Unexpected graph', token);\n this._saveContext('formula', this._graph,\n this._graph = this._blankNode(), null, null);\n return this._readSubject;\n case '}':\n // No subject; the graph in which we are reading is closed instead\n return this._readPunctuation(token);\n case '@forSome':\n if (!this._n3Mode)\n return this._error('Unexpected \"@forSome\"', token);\n this._subject = null;\n this._predicate = this.N3_FORSOME;\n this._quantifier = this._blankNode;\n return this._readQuantifierList;\n case '@forAll':\n if (!this._n3Mode)\n return this._error('Unexpected \"@forAll\"', token);\n this._subject = null;\n this._predicate = this.N3_FORALL;\n this._quantifier = this._variable;\n return this._readQuantifierList;\n case 'literal':\n if (!this._n3Mode)\n return this._error('Unexpected literal', token);\n\n if (token.prefix.length === 0) {\n this._literalValue = token.value;\n return this._completeSubjectLiteral;\n }\n else\n this._subject = this._literal(token.value, this._namedNode(token.prefix));\n\n break;\n case '<<':\n if (!this._supportsRDFStar)\n return this._error('Unexpected RDF* syntax', token);\n this._saveContext('<<', this._graph, null, null, null);\n this._graph = null;\n return this._readSubject;\n default:\n // Read the subject entity\n if ((this._subject = this._readEntity(token)) === undefined)\n return;\n // In N3 mode, the subject might be a path\n if (this._n3Mode)\n return this._getPathReader(this._readPredicateOrNamedGraph);\n }\n\n // The next token must be a predicate,\n // or, if the subject was actually a graph IRI, a named graph\n return this._readPredicateOrNamedGraph;\n }\n\n // ### `_readPredicate` reads a quad's predicate\n _readPredicate(token) {\n const type = token.type;\n switch (type) {\n case 'inverse':\n this._inversePredicate = true;\n case 'abbreviation':\n this._predicate = this.ABBREVIATIONS[token.value];\n break;\n case '.':\n case ']':\n case '}':\n // Expected predicate didn't come, must have been trailing semicolon\n if (this._predicate === null)\n return this._error(`Unexpected ${type}`, token);\n this._subject = null;\n return type === ']' ? this._readBlankNodeTail(token) : this._readPunctuation(token);\n case ';':\n // Additional semicolons can be safely ignored\n return this._predicate !== null ? this._readPredicate :\n this._error('Expected predicate but got ;', token);\n case '[':\n if (this._n3Mode) {\n // Start a new quad with a new blank node as subject\n this._saveContext('blank', this._graph, this._subject,\n this._subject = this._blankNode(), null);\n return this._readBlankNodeHead;\n }\n case 'blank':\n if (!this._n3Mode)\n return this._error('Disallowed blank node as predicate', token);\n default:\n if ((this._predicate = this._readEntity(token)) === undefined)\n return;\n }\n // The next token must be an object\n return this._readObject;\n }\n\n // ### `_readObject` reads a quad's object\n _readObject(token) {\n switch (token.type) {\n case 'literal':\n // Regular literal, can still get a datatype or language\n if (token.prefix.length === 0) {\n this._literalValue = token.value;\n return this._readDataTypeOrLang;\n }\n // Pre-datatyped string literal (prefix stores the datatype)\n else\n this._object = this._literal(token.value, this._namedNode(token.prefix));\n break;\n case '[':\n // Start a new quad with a new blank node as subject\n this._saveContext('blank', this._graph, this._subject, this._predicate,\n this._subject = this._blankNode());\n return this._readBlankNodeHead;\n case '(':\n // Start a new list\n this._saveContext('list', this._graph, this._subject, this._predicate, this.RDF_NIL);\n this._subject = null;\n return this._readListItem;\n case '{':\n // Start a new formula\n if (!this._n3Mode)\n return this._error('Unexpected graph', token);\n this._saveContext('formula', this._graph, this._subject, this._predicate,\n this._graph = this._blankNode());\n return this._readSubject;\n case '<<':\n if (!this._supportsRDFStar)\n return this._error('Unexpected RDF* syntax', token);\n this._saveContext('<<', this._graph, this._subject, this._predicate, null);\n this._graph = null;\n return this._readSubject;\n default:\n // Read the object entity\n if ((this._object = this._readEntity(token)) === undefined)\n return;\n // In N3 mode, the object might be a path\n if (this._n3Mode)\n return this._getPathReader(this._getContextEndReader());\n }\n return this._getContextEndReader();\n }\n\n // ### `_readPredicateOrNamedGraph` reads a quad's predicate, or a named graph\n _readPredicateOrNamedGraph(token) {\n return token.type === '{' ? this._readGraph(token) : this._readPredicate(token);\n }\n\n // ### `_readGraph` reads a graph\n _readGraph(token) {\n if (token.type !== '{')\n return this._error(`Expected graph but got ${token.type}`, token);\n // The \"subject\" we read is actually the GRAPH's label\n this._graph = this._subject, this._subject = null;\n return this._readSubject;\n }\n\n // ### `_readBlankNodeHead` reads the head of a blank node\n _readBlankNodeHead(token) {\n if (token.type === ']') {\n this._subject = null;\n return this._readBlankNodeTail(token);\n }\n else {\n this._predicate = null;\n return this._readPredicate(token);\n }\n }\n\n // ### `_readBlankNodeTail` reads the end of a blank node\n _readBlankNodeTail(token) {\n if (token.type !== ']')\n return this._readBlankNodePunctuation(token);\n\n // Store blank node quad\n if (this._subject !== null)\n this._emit(this._subject, this._predicate, this._object, this._graph);\n\n // Restore the parent context containing this blank node\n const empty = this._predicate === null;\n this._restoreContext('blank', token);\n // If the blank node was the object, restore previous context and read punctuation\n if (this._object !== null)\n return this._getContextEndReader();\n // If the blank node was the predicate, continue reading the object\n else if (this._predicate !== null)\n return this._readObject;\n // If the blank node was the subject, continue reading the predicate\n else\n // If the blank node was empty, it could be a named graph label\n return empty ? this._readPredicateOrNamedGraph : this._readPredicateAfterBlank;\n }\n\n // ### `_readPredicateAfterBlank` reads a predicate after an anonymous blank node\n _readPredicateAfterBlank(token) {\n switch (token.type) {\n case '.':\n case '}':\n // No predicate is coming if the triple is terminated here\n this._subject = null;\n return this._readPunctuation(token);\n default:\n return this._readPredicate(token);\n }\n }\n\n // ### `_readListItem` reads items from a list\n _readListItem(token) {\n let item = null, // The item of the list\n list = null, // The list itself\n next = this._readListItem; // The next function to execute\n const previousList = this._subject, // The previous list that contains this list\n stack = this._contextStack, // The stack of parent contexts\n parent = stack[stack.length - 1]; // The parent containing the current list\n\n switch (token.type) {\n case '[':\n // Stack the current list quad and start a new quad with a blank node as subject\n this._saveContext('blank', this._graph,\n list = this._blankNode(), this.RDF_FIRST,\n this._subject = item = this._blankNode());\n next = this._readBlankNodeHead;\n break;\n case '(':\n // Stack the current list quad and start a new list\n this._saveContext('list', this._graph,\n list = this._blankNode(), this.RDF_FIRST, this.RDF_NIL);\n this._subject = null;\n break;\n case ')':\n // Closing the list; restore the parent context\n this._restoreContext('list', token);\n // If this list is contained within a parent list, return the membership quad here.\n // This will be ` rdf:first .`.\n if (stack.length !== 0 && stack[stack.length - 1].type === 'list')\n this._emit(this._subject, this._predicate, this._object, this._graph);\n // Was this list the parent's subject?\n if (this._predicate === null) {\n // The next token is the predicate\n next = this._readPredicate;\n // No list tail if this was an empty list\n if (this._subject === this.RDF_NIL)\n return next;\n }\n // The list was in the parent context's object\n else {\n next = this._getContextEndReader();\n // No list tail if this was an empty list\n if (this._object === this.RDF_NIL)\n return next;\n }\n // Close the list by making the head nil\n list = this.RDF_NIL;\n break;\n case 'literal':\n // Regular literal, can still get a datatype or language\n if (token.prefix.length === 0) {\n this._literalValue = token.value;\n next = this._readListItemDataTypeOrLang;\n }\n // Pre-datatyped string literal (prefix stores the datatype)\n else {\n item = this._literal(token.value, this._namedNode(token.prefix));\n next = this._getContextEndReader();\n }\n break;\n case '{':\n // Start a new formula\n if (!this._n3Mode)\n return this._error('Unexpected graph', token);\n this._saveContext('formula', this._graph, this._subject, this._predicate,\n this._graph = this._blankNode());\n return this._readSubject;\n default:\n if ((item = this._readEntity(token)) === undefined)\n return;\n }\n\n // Create a new blank node if no item head was assigned yet\n if (list === null)\n this._subject = list = this._blankNode();\n\n // Is this the first element of the list?\n if (previousList === null) {\n // This list is either the subject or the object of its parent\n if (parent.predicate === null)\n parent.subject = list;\n else\n parent.object = list;\n }\n else {\n // Continue the previous list with the current list\n this._emit(previousList, this.RDF_REST, list, this._graph);\n }\n // If an item was read, add it to the list\n if (item !== null) {\n // In N3 mode, the item might be a path\n if (this._n3Mode && (token.type === 'IRI' || token.type === 'prefixed')) {\n // Create a new context to add the item's path\n this._saveContext('item', this._graph, list, this.RDF_FIRST, item);\n this._subject = item, this._predicate = null;\n // _readPath will restore the context and output the item\n return this._getPathReader(this._readListItem);\n }\n // Output the item\n this._emit(list, this.RDF_FIRST, item, this._graph);\n }\n return next;\n }\n\n // ### `_readDataTypeOrLang` reads an _optional_ datatype or language\n _readDataTypeOrLang(token) {\n return this._completeObjectLiteral(token, false);\n }\n\n\n // ### `_readListItemDataTypeOrLang` reads an _optional_ datatype or language in a list\n _readListItemDataTypeOrLang(token) {\n return this._completeObjectLiteral(token, true);\n }\n\n // ### `_completeLiteral` completes a literal with an optional datatype or language\n _completeLiteral(token) {\n // Create a simple string literal by default\n let literal = this._literal(this._literalValue);\n\n switch (token.type) {\n // Create a datatyped literal\n case 'type':\n case 'typeIRI':\n const datatype = this._readEntity(token);\n if (datatype === undefined) return; // No datatype means an error occurred\n literal = this._literal(this._literalValue, datatype);\n token = null;\n break;\n // Create a language-tagged string\n case 'langcode':\n literal = this._literal(this._literalValue, token.value);\n token = null;\n break;\n }\n\n return { token, literal };\n }\n\n // Completes a literal in subject position\n _completeSubjectLiteral(token) {\n this._subject = this._completeLiteral(token).literal;\n return this._readPredicateOrNamedGraph;\n }\n\n // Completes a literal in object position\n _completeObjectLiteral(token, listItem) {\n const completed = this._completeLiteral(token);\n if (!completed)\n return;\n this._object = completed.literal;\n\n // If this literal was part of a list, write the item\n // (we could also check the context stack, but passing in a flag is faster)\n if (listItem)\n this._emit(this._subject, this.RDF_FIRST, this._object, this._graph);\n // If the token was consumed, continue with the rest of the input\n if (completed.token === null)\n return this._getContextEndReader();\n // Otherwise, consume the token now\n else {\n this._readCallback = this._getContextEndReader();\n return this._readCallback(completed.token);\n }\n }\n\n // ### `_readFormulaTail` reads the end of a formula\n _readFormulaTail(token) {\n if (token.type !== '}')\n return this._readPunctuation(token);\n\n // Store the last quad of the formula\n if (this._subject !== null)\n this._emit(this._subject, this._predicate, this._object, this._graph);\n\n // Restore the parent context containing this formula\n this._restoreContext('formula', token);\n // If the formula was the subject, continue reading the predicate.\n // If the formula was the object, read punctuation.\n return this._object === null ? this._readPredicate : this._getContextEndReader();\n }\n\n // ### `_readPunctuation` reads punctuation between quads or quad parts\n _readPunctuation(token) {\n let next, graph = this._graph;\n const subject = this._subject, inversePredicate = this._inversePredicate;\n switch (token.type) {\n // A closing brace ends a graph\n case '}':\n if (this._graph === null)\n return this._error('Unexpected graph closing', token);\n if (this._n3Mode)\n return this._readFormulaTail(token);\n this._graph = null;\n // A dot just ends the statement, without sharing anything with the next\n case '.':\n this._subject = null;\n next = this._contextStack.length ? this._readSubject : this._readInTopContext;\n if (inversePredicate) this._inversePredicate = false;\n break;\n // Semicolon means the subject is shared; predicate and object are different\n case ';':\n next = this._readPredicate;\n break;\n // Comma means both the subject and predicate are shared; the object is different\n case ',':\n next = this._readObject;\n break;\n // {| means that the current triple is annotated with predicate-object pairs.\n case '{|':\n if (!this._supportsRDFStar)\n return this._error('Unexpected RDF* syntax', token);\n // Continue using the last triple as quoted triple subject for the predicate-object pairs.\n const predicate = this._predicate, object = this._object;\n this._subject = this._quad(subject, predicate, object, this.DEFAULTGRAPH);\n next = this._readPredicate;\n break;\n // |} means that the current quoted triple in annotation syntax is finalized.\n case '|}':\n if (this._subject.termType !== 'Quad')\n return this._error('Unexpected asserted triple closing', token);\n this._subject = null;\n next = this._readPunctuation;\n break;\n default:\n // An entity means this is a quad (only allowed if not already inside a graph)\n if (this._supportsQuads && this._graph === null && (graph = this._readEntity(token)) !== undefined) {\n next = this._readQuadPunctuation;\n break;\n }\n return this._error(`Expected punctuation to follow \"${this._object.id}\"`, token);\n }\n // A quad has been completed now, so return it\n if (subject !== null) {\n const predicate = this._predicate, object = this._object;\n if (!inversePredicate)\n this._emit(subject, predicate, object, graph);\n else\n this._emit(object, predicate, subject, graph);\n }\n return next;\n }\n\n // ### `_readBlankNodePunctuation` reads punctuation in a blank node\n _readBlankNodePunctuation(token) {\n let next;\n switch (token.type) {\n // Semicolon means the subject is shared; predicate and object are different\n case ';':\n next = this._readPredicate;\n break;\n // Comma means both the subject and predicate are shared; the object is different\n case ',':\n next = this._readObject;\n break;\n default:\n return this._error(`Expected punctuation to follow \"${this._object.id}\"`, token);\n }\n // A quad has been completed now, so return it\n this._emit(this._subject, this._predicate, this._object, this._graph);\n return next;\n }\n\n // ### `_readQuadPunctuation` reads punctuation after a quad\n _readQuadPunctuation(token) {\n if (token.type !== '.')\n return this._error('Expected dot to follow quad', token);\n return this._readInTopContext;\n }\n\n // ### `_readPrefix` reads the prefix of a prefix declaration\n _readPrefix(token) {\n if (token.type !== 'prefix')\n return this._error('Expected prefix to follow @prefix', token);\n this._prefix = token.value;\n return this._readPrefixIRI;\n }\n\n // ### `_readPrefixIRI` reads the IRI of a prefix declaration\n _readPrefixIRI(token) {\n if (token.type !== 'IRI')\n return this._error(`Expected IRI to follow prefix \"${this._prefix}:\"`, token);\n const prefixNode = this._readEntity(token);\n this._prefixes[this._prefix] = prefixNode.value;\n this._prefixCallback(this._prefix, prefixNode);\n return this._readDeclarationPunctuation;\n }\n\n // ### `_readBaseIRI` reads the IRI of a base declaration\n _readBaseIRI(token) {\n const iri = token.type === 'IRI' && this._resolveIRI(token.value);\n if (!iri)\n return this._error('Expected valid IRI to follow base declaration', token);\n this._setBase(iri);\n return this._readDeclarationPunctuation;\n }\n\n // ### `_readNamedGraphLabel` reads the label of a named graph\n _readNamedGraphLabel(token) {\n switch (token.type) {\n case 'IRI':\n case 'blank':\n case 'prefixed':\n return this._readSubject(token), this._readGraph;\n case '[':\n return this._readNamedGraphBlankLabel;\n default:\n return this._error('Invalid graph label', token);\n }\n }\n\n // ### `_readNamedGraphLabel` reads a blank node label of a named graph\n _readNamedGraphBlankLabel(token) {\n if (token.type !== ']')\n return this._error('Invalid graph label', token);\n this._subject = this._blankNode();\n return this._readGraph;\n }\n\n // ### `_readDeclarationPunctuation` reads the punctuation of a declaration\n _readDeclarationPunctuation(token) {\n // SPARQL-style declarations don't have punctuation\n if (this._sparqlStyle) {\n this._sparqlStyle = false;\n return this._readInTopContext(token);\n }\n\n if (token.type !== '.')\n return this._error('Expected declaration to end with a dot', token);\n return this._readInTopContext;\n }\n\n // Reads a list of quantified symbols from a @forSome or @forAll statement\n _readQuantifierList(token) {\n let entity;\n switch (token.type) {\n case 'IRI':\n case 'prefixed':\n if ((entity = this._readEntity(token, true)) !== undefined)\n break;\n default:\n return this._error(`Unexpected ${token.type}`, token);\n }\n // Without explicit quantifiers, map entities to a quantified entity\n if (!this._explicitQuantifiers)\n this._quantified[entity.id] = this._quantifier(this._blankNode().value);\n // With explicit quantifiers, output the reified quantifier\n else {\n // If this is the first item, start a new quantifier list\n if (this._subject === null)\n this._emit(this._graph || this.DEFAULTGRAPH, this._predicate,\n this._subject = this._blankNode(), this.QUANTIFIERS_GRAPH);\n // Otherwise, continue the previous list\n else\n this._emit(this._subject, this.RDF_REST,\n this._subject = this._blankNode(), this.QUANTIFIERS_GRAPH);\n // Output the list item\n this._emit(this._subject, this.RDF_FIRST, entity, this.QUANTIFIERS_GRAPH);\n }\n return this._readQuantifierPunctuation;\n }\n\n // Reads punctuation from a @forSome or @forAll statement\n _readQuantifierPunctuation(token) {\n // Read more quantifiers\n if (token.type === ',')\n return this._readQuantifierList;\n // End of the quantifier list\n else {\n // With explicit quantifiers, close the quantifier list\n if (this._explicitQuantifiers) {\n this._emit(this._subject, this.RDF_REST, this.RDF_NIL, this.QUANTIFIERS_GRAPH);\n this._subject = null;\n }\n // Read a dot\n this._readCallback = this._getContextEndReader();\n return this._readCallback(token);\n }\n }\n\n // ### `_getPathReader` reads a potential path and then resumes with the given function\n _getPathReader(afterPath) {\n this._afterPath = afterPath;\n return this._readPath;\n }\n\n // ### `_readPath` reads a potential path\n _readPath(token) {\n switch (token.type) {\n // Forward path\n case '!': return this._readForwardPath;\n // Backward path\n case '^': return this._readBackwardPath;\n // Not a path; resume reading where we left off\n default:\n const stack = this._contextStack, parent = stack.length && stack[stack.length - 1];\n // If we were reading a list item, we still need to output it\n if (parent && parent.type === 'item') {\n // The list item is the remaining subejct after reading the path\n const item = this._subject;\n // Switch back to the context of the list\n this._restoreContext('item', token);\n // Output the list item\n this._emit(this._subject, this.RDF_FIRST, item, this._graph);\n }\n return this._afterPath(token);\n }\n }\n\n // ### `_readForwardPath` reads a '!' path\n _readForwardPath(token) {\n let subject, predicate;\n const object = this._blankNode();\n // The next token is the predicate\n if ((predicate = this._readEntity(token)) === undefined)\n return;\n // If we were reading a subject, replace the subject by the path's object\n if (this._predicate === null)\n subject = this._subject, this._subject = object;\n // If we were reading an object, replace the subject by the path's object\n else\n subject = this._object, this._object = object;\n // Emit the path's current quad and read its next section\n this._emit(subject, predicate, object, this._graph);\n return this._readPath;\n }\n\n // ### `_readBackwardPath` reads a '^' path\n _readBackwardPath(token) {\n const subject = this._blankNode();\n let predicate, object;\n // The next token is the predicate\n if ((predicate = this._readEntity(token)) === undefined)\n return;\n // If we were reading a subject, replace the subject by the path's subject\n if (this._predicate === null)\n object = this._subject, this._subject = subject;\n // If we were reading an object, replace the subject by the path's subject\n else\n object = this._object, this._object = subject;\n // Emit the path's current quad and read its next section\n this._emit(subject, predicate, object, this._graph);\n return this._readPath;\n }\n\n // ### `_readRDFStarTailOrGraph` reads the graph of a nested RDF* quad or the end of a nested RDF* triple\n _readRDFStarTailOrGraph(token) {\n if (token.type !== '>>') {\n // An entity means this is a quad (only allowed if not already inside a graph)\n if (this._supportsQuads && this._graph === null && (this._graph = this._readEntity(token)) !== undefined)\n return this._readRDFStarTail;\n return this._error(`Expected >> to follow \"${this._object.id}\"`, token);\n }\n return this._readRDFStarTail(token);\n }\n\n // ### `_readRDFStarTail` reads the end of a nested RDF* triple\n _readRDFStarTail(token) {\n if (token.type !== '>>')\n return this._error(`Expected >> but got ${token.type}`, token);\n // Read the quad and restore the previous context\n const quad = this._quad(this._subject, this._predicate, this._object,\n this._graph || this.DEFAULTGRAPH);\n this._restoreContext('<<', token);\n // If the triple was the subject, continue by reading the predicate.\n if (this._subject === null) {\n this._subject = quad;\n return this._readPredicate;\n }\n // If the triple was the object, read context end.\n else {\n this._object = quad;\n return this._getContextEndReader();\n }\n }\n\n // ### `_getContextEndReader` gets the next reader function at the end of a context\n _getContextEndReader() {\n const contextStack = this._contextStack;\n if (!contextStack.length)\n return this._readPunctuation;\n\n switch (contextStack[contextStack.length - 1].type) {\n case 'blank':\n return this._readBlankNodeTail;\n case 'list':\n return this._readListItem;\n case 'formula':\n return this._readFormulaTail;\n case '<<':\n return this._readRDFStarTailOrGraph;\n }\n }\n\n // ### `_emit` sends a quad through the callback\n _emit(subject, predicate, object, graph) {\n this._callback(null, this._quad(subject, predicate, object, graph || this.DEFAULTGRAPH));\n }\n\n // ### `_error` emits an error message through the callback\n _error(message, token) {\n const err = new Error(`${message} on line ${token.line}.`);\n err.context = {\n token: token,\n line: token.line,\n previousToken: this._lexer.previousToken,\n };\n this._callback(err);\n this._callback = noop;\n }\n\n // ### `_resolveIRI` resolves an IRI against the base path\n _resolveIRI(iri) {\n return /^[a-z][a-z0-9+.-]*:/i.test(iri) ? iri : this._resolveRelativeIRI(iri);\n }\n\n // ### `_resolveRelativeIRI` resolves an IRI against the base path,\n // assuming that a base path has been set and that the IRI is indeed relative\n _resolveRelativeIRI(iri) {\n // An empty relative IRI indicates the base IRI\n if (!iri.length)\n return this._base;\n // Decide resolving strategy based in the first character\n switch (iri[0]) {\n // Resolve relative fragment IRIs against the base IRI\n case '#': return this._base + iri;\n // Resolve relative query string IRIs by replacing the query string\n case '?': return this._base.replace(/(?:\\?.*)?$/, iri);\n // Resolve root-relative IRIs at the root of the base IRI\n case '/':\n // Resolve scheme-relative IRIs to the scheme\n return (iri[1] === '/' ? this._baseScheme : this._baseRoot) + this._removeDotSegments(iri);\n // Resolve all other IRIs at the base IRI's path\n default:\n // Relative IRIs cannot contain a colon in the first path segment\n return (/^[^/:]*:/.test(iri)) ? null : this._removeDotSegments(this._basePath + iri);\n }\n }\n\n // ### `_removeDotSegments` resolves './' and '../' path segments in an IRI as per RFC3986\n _removeDotSegments(iri) {\n // Don't modify the IRI if it does not contain any dot segments\n if (!/(^|\\/)\\.\\.?($|[/#?])/.test(iri))\n return iri;\n\n // Start with an imaginary slash before the IRI in order to resolve trailing './' and '../'\n const length = iri.length;\n let result = '', i = -1, pathStart = -1, segmentStart = 0, next = '/';\n\n while (i < length) {\n switch (next) {\n // The path starts with the first slash after the authority\n case ':':\n if (pathStart < 0) {\n // Skip two slashes before the authority\n if (iri[++i] === '/' && iri[++i] === '/')\n // Skip to slash after the authority\n while ((pathStart = i + 1) < length && iri[pathStart] !== '/')\n i = pathStart;\n }\n break;\n // Don't modify a query string or fragment\n case '?':\n case '#':\n i = length;\n break;\n // Handle '/.' or '/..' path segments\n case '/':\n if (iri[i + 1] === '.') {\n next = iri[++i + 1];\n switch (next) {\n // Remove a '/.' segment\n case '/':\n result += iri.substring(segmentStart, i - 1);\n segmentStart = i + 1;\n break;\n // Remove a trailing '/.' segment\n case undefined:\n case '?':\n case '#':\n return result + iri.substring(segmentStart, i) + iri.substr(i + 1);\n // Remove a '/..' segment\n case '.':\n next = iri[++i + 1];\n if (next === undefined || next === '/' || next === '?' || next === '#') {\n result += iri.substring(segmentStart, i - 2);\n // Try to remove the parent path from result\n if ((segmentStart = result.lastIndexOf('/')) >= pathStart)\n result = result.substr(0, segmentStart);\n // Remove a trailing '/..' segment\n if (next !== '/')\n return `${result}/${iri.substr(i + 1)}`;\n segmentStart = i + 1;\n }\n }\n }\n }\n next = iri[++i];\n }\n return result + iri.substring(segmentStart);\n }\n\n // ## Public methods\n\n // ### `parse` parses the N3 input and emits each parsed quad through the callback\n parse(input, quadCallback, prefixCallback) {\n // The read callback is the next function to be executed when a token arrives.\n // We start reading in the top context.\n this._readCallback = this._readInTopContext;\n this._sparqlStyle = false;\n this._prefixes = Object.create(null);\n this._prefixes._ = this._blankNodePrefix ? this._blankNodePrefix.substr(2)\n : `b${blankNodePrefix++}_`;\n this._prefixCallback = prefixCallback || noop;\n this._inversePredicate = false;\n this._quantified = Object.create(null);\n\n // Parse synchronously if no quad callback is given\n if (!quadCallback) {\n const quads = [];\n let error;\n this._callback = (e, t) => { e ? (error = e) : t && quads.push(t); };\n this._lexer.tokenize(input).every(token => {\n return this._readCallback = this._readCallback(token);\n });\n if (error) throw error;\n return quads;\n }\n\n // Parse asynchronously otherwise, executing the read callback when a token arrives\n this._callback = quadCallback;\n this._lexer.tokenize(input, (error, token) => {\n if (error !== null)\n this._callback(error), this._callback = noop;\n else if (this._readCallback)\n this._readCallback = this._readCallback(token);\n });\n }\n}\n\n// The empty function\nfunction noop() {}\n\n// Initializes the parser with the given data factory\nfunction initDataFactory(parser, factory) {\n // Set factory methods\n const namedNode = factory.namedNode;\n parser._namedNode = namedNode;\n parser._blankNode = factory.blankNode;\n parser._literal = factory.literal;\n parser._variable = factory.variable;\n parser._quad = factory.quad;\n parser.DEFAULTGRAPH = factory.defaultGraph();\n\n // Set common named nodes\n parser.RDF_FIRST = namedNode(namespaces.rdf.first);\n parser.RDF_REST = namedNode(namespaces.rdf.rest);\n parser.RDF_NIL = namedNode(namespaces.rdf.nil);\n parser.N3_FORALL = namedNode(namespaces.r.forAll);\n parser.N3_FORSOME = namedNode(namespaces.r.forSome);\n parser.ABBREVIATIONS = {\n 'a': namedNode(namespaces.rdf.type),\n '=': namedNode(namespaces.owl.sameAs),\n '>': namedNode(namespaces.log.implies),\n };\n parser.QUANTIFIERS_GRAPH = namedNode('urn:n3:quantifiers');\n}\ninitDataFactory(N3Parser.prototype, N3DataFactory);\n","// **N3Util** provides N3 utility functions.\n\nimport N3DataFactory from './N3DataFactory';\n\n// Tests whether the given term represents an IRI\nexport function isNamedNode(term) {\n return !!term && term.termType === 'NamedNode';\n}\n\n// Tests whether the given term represents a blank node\nexport function isBlankNode(term) {\n return !!term && term.termType === 'BlankNode';\n}\n\n// Tests whether the given term represents a literal\nexport function isLiteral(term) {\n return !!term && term.termType === 'Literal';\n}\n\n// Tests whether the given term represents a variable\nexport function isVariable(term) {\n return !!term && term.termType === 'Variable';\n}\n\n// Tests whether the given term represents the default graph\nexport function isDefaultGraph(term) {\n return !!term && term.termType === 'DefaultGraph';\n}\n\n// Tests whether the given quad is in the default graph\nexport function inDefaultGraph(quad) {\n return isDefaultGraph(quad.graph);\n}\n\n// Creates a function that prepends the given IRI to a local name\nexport function prefix(iri, factory) {\n return prefixes({ '': iri.value || iri }, factory)('');\n}\n\n// Creates a function that allows registering and expanding prefixes\nexport function prefixes(defaultPrefixes, factory) {\n // Add all of the default prefixes\n const prefixes = Object.create(null);\n for (const prefix in defaultPrefixes)\n processPrefix(prefix, defaultPrefixes[prefix]);\n // Set the default factory if none was specified\n factory = factory || N3DataFactory;\n\n // Registers a new prefix (if an IRI was specified)\n // or retrieves a function that expands an existing prefix (if no IRI was specified)\n function processPrefix(prefix, iri) {\n // Create a new prefix if an IRI is specified or the prefix doesn't exist\n if (typeof iri === 'string') {\n // Create a function that expands the prefix\n const cache = Object.create(null);\n prefixes[prefix] = local => {\n return cache[local] || (cache[local] = factory.namedNode(iri + local));\n };\n }\n else if (!(prefix in prefixes)) {\n throw new Error(`Unknown prefix: ${prefix}`);\n }\n return prefixes[prefix];\n }\n return processPrefix;\n}\n","// **N3Writer** writes N3 documents.\nimport namespaces from './IRIs';\nimport { default as N3DataFactory, Term } from './N3DataFactory';\nimport { isDefaultGraph } from './N3Util';\n\nconst DEFAULTGRAPH = N3DataFactory.defaultGraph();\n\nconst { rdf, xsd } = namespaces;\n\n// Characters in literals that require escaping\nconst escape = /[\"\\\\\\t\\n\\r\\b\\f\\u0000-\\u0019\\ud800-\\udbff]/,\n escapeAll = /[\"\\\\\\t\\n\\r\\b\\f\\u0000-\\u0019]|[\\ud800-\\udbff][\\udc00-\\udfff]/g,\n escapedCharacters = {\n '\\\\': '\\\\\\\\', '\"': '\\\\\"', '\\t': '\\\\t',\n '\\n': '\\\\n', '\\r': '\\\\r', '\\b': '\\\\b', '\\f': '\\\\f',\n };\n\n// ## Placeholder class to represent already pretty-printed terms\nclass SerializedTerm extends Term {\n // Pretty-printed nodes are not equal to any other node\n // (e.g., [] does not equal [])\n equals(other) {\n return other === this;\n }\n}\n\n// ## Constructor\nexport default class N3Writer {\n constructor(outputStream, options) {\n // ### `_prefixRegex` matches a prefixed name or IRI that begins with one of the added prefixes\n this._prefixRegex = /$0^/;\n\n // Shift arguments if the first argument is not a stream\n if (outputStream && typeof outputStream.write !== 'function')\n options = outputStream, outputStream = null;\n options = options || {};\n this._lists = options.lists;\n\n // If no output stream given, send the output as string through the end callback\n if (!outputStream) {\n let output = '';\n this._outputStream = {\n write(chunk, encoding, done) { output += chunk; done && done(); },\n end: done => { done && done(null, output); },\n };\n this._endStream = true;\n }\n else {\n this._outputStream = outputStream;\n this._endStream = options.end === undefined ? true : !!options.end;\n }\n\n // Initialize writer, depending on the format\n this._subject = null;\n if (!(/triple|quad/i).test(options.format)) {\n this._lineMode = false;\n this._graph = DEFAULTGRAPH;\n this._prefixIRIs = Object.create(null);\n options.prefixes && this.addPrefixes(options.prefixes);\n if (options.baseIRI) {\n this._baseMatcher = new RegExp(`^${escapeRegex(options.baseIRI)\n }${options.baseIRI.endsWith('/') ? '' : '[#?]'}`);\n this._baseLength = options.baseIRI.length;\n }\n }\n else {\n this._lineMode = true;\n this._writeQuad = this._writeQuadLine;\n }\n }\n\n // ## Private methods\n\n // ### Whether the current graph is the default graph\n get _inDefaultGraph() {\n return DEFAULTGRAPH.equals(this._graph);\n }\n\n // ### `_write` writes the argument to the output stream\n _write(string, callback) {\n this._outputStream.write(string, 'utf8', callback);\n }\n\n // ### `_writeQuad` writes the quad to the output stream\n _writeQuad(subject, predicate, object, graph, done) {\n try {\n // Write the graph's label if it has changed\n if (!graph.equals(this._graph)) {\n // Close the previous graph and start the new one\n this._write((this._subject === null ? '' : (this._inDefaultGraph ? '.\\n' : '\\n}\\n')) +\n (DEFAULTGRAPH.equals(graph) ? '' : `${this._encodeIriOrBlank(graph)} {\\n`));\n this._graph = graph;\n this._subject = null;\n }\n // Don't repeat the subject if it's the same\n if (subject.equals(this._subject)) {\n // Don't repeat the predicate if it's the same\n if (predicate.equals(this._predicate))\n this._write(`, ${this._encodeObject(object)}`, done);\n // Same subject, different predicate\n else\n this._write(`;\\n ${\n this._encodePredicate(this._predicate = predicate)} ${\n this._encodeObject(object)}`, done);\n }\n // Different subject; write the whole quad\n else\n this._write(`${(this._subject === null ? '' : '.\\n') +\n this._encodeSubject(this._subject = subject)} ${\n this._encodePredicate(this._predicate = predicate)} ${\n this._encodeObject(object)}`, done);\n }\n catch (error) { done && done(error); }\n }\n\n // ### `_writeQuadLine` writes the quad to the output stream as a single line\n _writeQuadLine(subject, predicate, object, graph, done) {\n // Write the quad without prefixes\n delete this._prefixMatch;\n this._write(this.quadToString(subject, predicate, object, graph), done);\n }\n\n // ### `quadToString` serializes a quad as a string\n quadToString(subject, predicate, object, graph) {\n return `${this._encodeSubject(subject)} ${\n this._encodeIriOrBlank(predicate)} ${\n this._encodeObject(object)\n }${graph && graph.value ? ` ${this._encodeIriOrBlank(graph)} .\\n` : ' .\\n'}`;\n }\n\n // ### `quadsToString` serializes an array of quads as a string\n quadsToString(quads) {\n return quads.map(t => {\n return this.quadToString(t.subject, t.predicate, t.object, t.graph);\n }).join('');\n }\n\n // ### `_encodeSubject` represents a subject\n _encodeSubject(entity) {\n return entity.termType === 'Quad' ?\n this._encodeQuad(entity) : this._encodeIriOrBlank(entity);\n }\n\n // ### `_encodeIriOrBlank` represents an IRI or blank node\n _encodeIriOrBlank(entity) {\n // A blank node or list is represented as-is\n if (entity.termType !== 'NamedNode') {\n // If it is a list head, pretty-print it\n if (this._lists && (entity.value in this._lists))\n entity = this.list(this._lists[entity.value]);\n return 'id' in entity ? entity.id : `_:${entity.value}`;\n }\n let iri = entity.value;\n // Use relative IRIs if requested and possible\n if (this._baseMatcher && this._baseMatcher.test(iri))\n iri = iri.substr(this._baseLength);\n // Escape special characters\n if (escape.test(iri))\n iri = iri.replace(escapeAll, characterReplacer);\n // Try to represent the IRI as prefixed name\n const prefixMatch = this._prefixRegex.exec(iri);\n return !prefixMatch ? `<${iri}>` :\n (!prefixMatch[1] ? iri : this._prefixIRIs[prefixMatch[1]] + prefixMatch[2]);\n }\n\n // ### `_encodeLiteral` represents a literal\n _encodeLiteral(literal) {\n // Escape special characters\n let value = literal.value;\n if (escape.test(value))\n value = value.replace(escapeAll, characterReplacer);\n\n // Write a language-tagged literal\n if (literal.language)\n return `\"${value}\"@${literal.language}`;\n\n // Write dedicated literals per data type\n if (this._lineMode) {\n // Only abbreviate strings in N-Triples or N-Quads\n if (literal.datatype.value === xsd.string)\n return `\"${value}\"`;\n }\n else {\n // Use common datatype abbreviations in Turtle or TriG\n switch (literal.datatype.value) {\n case xsd.string:\n return `\"${value}\"`;\n case xsd.boolean:\n if (value === 'true' || value === 'false')\n return value;\n break;\n case xsd.integer:\n if (/^[+-]?\\d+$/.test(value))\n return value;\n break;\n case xsd.decimal:\n if (/^[+-]?\\d*\\.\\d+$/.test(value))\n return value;\n break;\n case xsd.double:\n if (/^[+-]?(?:\\d+\\.\\d*|\\.?\\d+)[eE][+-]?\\d+$/.test(value))\n return value;\n break;\n }\n }\n\n // Write a regular datatyped literal\n return `\"${value}\"^^${this._encodeIriOrBlank(literal.datatype)}`;\n }\n\n // ### `_encodePredicate` represents a predicate\n _encodePredicate(predicate) {\n return predicate.value === rdf.type ? 'a' : this._encodeIriOrBlank(predicate);\n }\n\n // ### `_encodeObject` represents an object\n _encodeObject(object) {\n switch (object.termType) {\n case 'Quad':\n return this._encodeQuad(object);\n case 'Literal':\n return this._encodeLiteral(object);\n default:\n return this._encodeIriOrBlank(object);\n }\n }\n\n // ### `_encodeQuad` encodes an RDF* quad\n _encodeQuad({ subject, predicate, object, graph }) {\n return `<<${\n this._encodeSubject(subject)} ${\n this._encodePredicate(predicate)} ${\n this._encodeObject(object)}${\n isDefaultGraph(graph) ? '' : ` ${this._encodeIriOrBlank(graph)}`}>>`;\n }\n\n // ### `_blockedWrite` replaces `_write` after the writer has been closed\n _blockedWrite() {\n throw new Error('Cannot write because the writer has been closed.');\n }\n\n // ### `addQuad` adds the quad to the output stream\n addQuad(subject, predicate, object, graph, done) {\n // The quad was given as an object, so shift parameters\n if (object === undefined)\n this._writeQuad(subject.subject, subject.predicate, subject.object, subject.graph, predicate);\n // The optional `graph` parameter was not provided\n else if (typeof graph === 'function')\n this._writeQuad(subject, predicate, object, DEFAULTGRAPH, graph);\n // The `graph` parameter was provided\n else\n this._writeQuad(subject, predicate, object, graph || DEFAULTGRAPH, done);\n }\n\n // ### `addQuads` adds the quads to the output stream\n addQuads(quads) {\n for (let i = 0; i < quads.length; i++)\n this.addQuad(quads[i]);\n }\n\n // ### `addPrefix` adds the prefix to the output stream\n addPrefix(prefix, iri, done) {\n const prefixes = {};\n prefixes[prefix] = iri;\n this.addPrefixes(prefixes, done);\n }\n\n // ### `addPrefixes` adds the prefixes to the output stream\n addPrefixes(prefixes, done) {\n // Ignore prefixes if not supported by the serialization\n if (!this._prefixIRIs)\n return done && done();\n\n // Write all new prefixes\n let hasPrefixes = false;\n for (let prefix in prefixes) {\n let iri = prefixes[prefix];\n if (typeof iri !== 'string')\n iri = iri.value;\n hasPrefixes = true;\n // Finish a possible pending quad\n if (this._subject !== null) {\n this._write(this._inDefaultGraph ? '.\\n' : '\\n}\\n');\n this._subject = null, this._graph = '';\n }\n // Store and write the prefix\n this._prefixIRIs[iri] = (prefix += ':');\n this._write(`@prefix ${prefix} <${iri}>.\\n`);\n }\n // Recreate the prefix matcher\n if (hasPrefixes) {\n let IRIlist = '', prefixList = '';\n for (const prefixIRI in this._prefixIRIs) {\n IRIlist += IRIlist ? `|${prefixIRI}` : prefixIRI;\n prefixList += (prefixList ? '|' : '') + this._prefixIRIs[prefixIRI];\n }\n IRIlist = escapeRegex(IRIlist, /[\\]\\/\\(\\)\\*\\+\\?\\.\\\\\\$]/g, '\\\\$&');\n this._prefixRegex = new RegExp(`^(?:${prefixList})[^\\/]*$|` +\n `^(${IRIlist})([_a-zA-Z][\\\\-_a-zA-Z0-9]*)$`);\n }\n // End a prefix block with a newline\n this._write(hasPrefixes ? '\\n' : '', done);\n }\n\n // ### `blank` creates a blank node with the given content\n blank(predicate, object) {\n let children = predicate, child, length;\n // Empty blank node\n if (predicate === undefined)\n children = [];\n // Blank node passed as blank(Term(\"predicate\"), Term(\"object\"))\n else if (predicate.termType)\n children = [{ predicate: predicate, object: object }];\n // Blank node passed as blank({ predicate: predicate, object: object })\n else if (!('length' in predicate))\n children = [predicate];\n\n switch (length = children.length) {\n // Generate an empty blank node\n case 0:\n return new SerializedTerm('[]');\n // Generate a non-nested one-triple blank node\n case 1:\n child = children[0];\n if (!(child.object instanceof SerializedTerm))\n return new SerializedTerm(`[ ${this._encodePredicate(child.predicate)} ${\n this._encodeObject(child.object)} ]`);\n // Generate a multi-triple or nested blank node\n default:\n let contents = '[';\n // Write all triples in order\n for (let i = 0; i < length; i++) {\n child = children[i];\n // Write only the object is the predicate is the same as the previous\n if (child.predicate.equals(predicate))\n contents += `, ${this._encodeObject(child.object)}`;\n // Otherwise, write the predicate and the object\n else {\n contents += `${(i ? ';\\n ' : '\\n ') +\n this._encodePredicate(child.predicate)} ${\n this._encodeObject(child.object)}`;\n predicate = child.predicate;\n }\n }\n return new SerializedTerm(`${contents}\\n]`);\n }\n }\n\n // ### `list` creates a list node with the given content\n list(elements) {\n const length = elements && elements.length || 0, contents = new Array(length);\n for (let i = 0; i < length; i++)\n contents[i] = this._encodeObject(elements[i]);\n return new SerializedTerm(`(${contents.join(' ')})`);\n }\n\n // ### `end` signals the end of the output stream\n end(done) {\n // Finish a possible pending quad\n if (this._subject !== null) {\n this._write(this._inDefaultGraph ? '.\\n' : '\\n}\\n');\n this._subject = null;\n }\n // Disallow further writing\n this._write = this._blockedWrite;\n\n // Try to end the underlying stream, ensuring done is called exactly one time\n let singleDone = done && ((error, result) => { singleDone = null, done(error, result); });\n if (this._endStream) {\n try { return this._outputStream.end(singleDone); }\n catch (error) { /* error closing stream */ }\n }\n singleDone && singleDone();\n }\n}\n\n// Replaces a character by its escaped version\nfunction characterReplacer(character) {\n // Replace a single character by its escaped version\n let result = escapedCharacters[character];\n if (result === undefined) {\n // Replace a single character with its 4-bit unicode escape sequence\n if (character.length === 1) {\n result = character.charCodeAt(0).toString(16);\n result = '\\\\u0000'.substr(0, 6 - result.length) + result;\n }\n // Replace a surrogate pair with its 8-bit unicode escape sequence\n else {\n result = ((character.charCodeAt(0) - 0xD800) * 0x400 +\n character.charCodeAt(1) + 0x2400).toString(16);\n result = '\\\\U00000000'.substr(0, 10 - result.length) + result;\n }\n }\n return result;\n}\n\nfunction escapeRegex(regex) {\n return regex.replace(/[\\]\\/\\(\\)\\*\\+\\?\\.\\\\\\$]/g, '\\\\$&');\n}\n","// **N3Store** objects store N3 quads by graph in memory.\nimport { Readable } from 'readable-stream';\nimport { default as N3DataFactory, termToId, termFromId } from './N3DataFactory';\nimport namespaces from './IRIs';\nimport { isDefaultGraph } from './N3Util';\n\n// ## Constructor\nexport default class N3Store {\n constructor(quads, options) {\n // The number of quads is initially zero\n this._size = 0;\n // `_graphs` contains subject, predicate, and object indexes per graph\n this._graphs = Object.create(null);\n // `_ids` maps entities such as `http://xmlns.com/foaf/0.1/name` to numbers,\n // saving memory by using only numbers as keys in `_graphs`\n this._id = 0;\n this._ids = Object.create(null);\n this._entities = Object.create(null); // inverse of `_ids`\n // `_blankNodeIndex` is the index of the last automatically named blank node\n this._blankNodeIndex = 0;\n\n // Shift parameters if `quads` is not given\n if (!options && quads && !quads[0])\n options = quads, quads = null;\n options = options || {};\n this._factory = options.factory || N3DataFactory;\n\n // Add quads if passed\n if (quads)\n this.addQuads(quads);\n }\n\n _termFromId(id, factory) {\n if (id[0] === '.') {\n const entities = this._entities;\n const terms = id.split('.');\n const q = this._factory.quad(\n this._termFromId(entities[terms[1]]),\n this._termFromId(entities[terms[2]]),\n this._termFromId(entities[terms[3]]),\n terms[4] && this._termFromId(entities[terms[4]])\n );\n return q;\n }\n return termFromId(id, factory);\n }\n\n _termToNumericId(term) {\n if (term.termType === 'Quad') {\n const s = this._termToNumericId(term.subject),\n p = this._termToNumericId(term.predicate),\n o = this._termToNumericId(term.object);\n let g;\n\n return s && p && o && (isDefaultGraph(term.graph) || (g = this._termToNumericId(term.graph))) &&\n this._ids[g ? `.${s}.${p}.${o}.${g}` : `.${s}.${p}.${o}`];\n }\n return this._ids[termToId(term)];\n }\n\n _termToNewNumericId(term) {\n // This assumes that no graph term is present - we may wish to error if there is one\n const str = term && term.termType === 'Quad' ?\n `.${this._termToNewNumericId(term.subject)}.${this._termToNewNumericId(term.predicate)}.${this._termToNewNumericId(term.object)}${\n isDefaultGraph(term.graph) ? '' : `.${this._termToNewNumericId(term.graph)}`\n }`\n : termToId(term);\n\n return this._ids[str] || (this._ids[this._entities[++this._id] = str] = this._id);\n }\n\n // ## Public properties\n\n // ### `size` returns the number of quads in the store\n get size() {\n // Return the quad count if if was cached\n let size = this._size;\n if (size !== null)\n return size;\n\n // Calculate the number of quads by counting to the deepest level\n size = 0;\n const graphs = this._graphs;\n let subjects, subject;\n for (const graphKey in graphs)\n for (const subjectKey in (subjects = graphs[graphKey].subjects))\n for (const predicateKey in (subject = subjects[subjectKey]))\n size += Object.keys(subject[predicateKey]).length;\n return this._size = size;\n }\n\n // ## Private methods\n\n // ### `_addToIndex` adds a quad to a three-layered index.\n // Returns if the index has changed, if the entry did not already exist.\n _addToIndex(index0, key0, key1, key2) {\n // Create layers as necessary\n const index1 = index0[key0] || (index0[key0] = {});\n const index2 = index1[key1] || (index1[key1] = {});\n // Setting the key to _any_ value signals the presence of the quad\n const existed = key2 in index2;\n if (!existed)\n index2[key2] = null;\n return !existed;\n }\n\n // ### `_removeFromIndex` removes a quad from a three-layered index\n _removeFromIndex(index0, key0, key1, key2) {\n // Remove the quad from the index\n const index1 = index0[key0], index2 = index1[key1];\n delete index2[key2];\n\n // Remove intermediary index layers if they are empty\n for (const key in index2) return;\n delete index1[key1];\n for (const key in index1) return;\n delete index0[key0];\n }\n\n // ### `_findInIndex` finds a set of quads in a three-layered index.\n // The index base is `index0` and the keys at each level are `key0`, `key1`, and `key2`.\n // Any of these keys can be undefined, which is interpreted as a wildcard.\n // `name0`, `name1`, and `name2` are the names of the keys at each level,\n // used when reconstructing the resulting quad\n // (for instance: _subject_, _predicate_, and _object_).\n // Finally, `graphId` will be the graph of the created quads.\n *_findInIndex(index0, key0, key1, key2, name0, name1, name2, graphId) {\n let tmp, index1, index2;\n const entityKeys = this._entities;\n const graph = this._termFromId(graphId, this._factory);\n const parts = { subject: null, predicate: null, object: null };\n\n // If a key is specified, use only that part of index 0.\n if (key0) (tmp = index0, index0 = {})[key0] = tmp[key0];\n for (const value0 in index0) {\n if (index1 = index0[value0]) {\n parts[name0] = this._termFromId(entityKeys[value0], this._factory);\n // If a key is specified, use only that part of index 1.\n if (key1) (tmp = index1, index1 = {})[key1] = tmp[key1];\n for (const value1 in index1) {\n if (index2 = index1[value1]) {\n parts[name1] = this._termFromId(entityKeys[value1], this._factory);\n // If a key is specified, use only that part of index 2, if it exists.\n const values = key2 ? (key2 in index2 ? [key2] : []) : Object.keys(index2);\n // Create quads for all items found in index 2.\n for (let l = 0; l < values.length; l++) {\n parts[name2] = this._termFromId(entityKeys[values[l]], this._factory);\n yield this._factory.quad(parts.subject, parts.predicate, parts.object, graph);\n }\n }\n }\n }\n }\n }\n\n // ### `_loop` executes the callback on all keys of index 0\n _loop(index0, callback) {\n for (const key0 in index0)\n callback(key0);\n }\n\n // ### `_loopByKey0` executes the callback on all keys of a certain entry in index 0\n _loopByKey0(index0, key0, callback) {\n let index1, key1;\n if (index1 = index0[key0]) {\n for (key1 in index1)\n callback(key1);\n }\n }\n\n // ### `_loopByKey1` executes the callback on given keys of all entries in index 0\n _loopByKey1(index0, key1, callback) {\n let key0, index1;\n for (key0 in index0) {\n index1 = index0[key0];\n if (index1[key1])\n callback(key0);\n }\n }\n\n // ### `_loopBy2Keys` executes the callback on given keys of certain entries in index 2\n _loopBy2Keys(index0, key0, key1, callback) {\n let index1, index2, key2;\n if ((index1 = index0[key0]) && (index2 = index1[key1])) {\n for (key2 in index2)\n callback(key2);\n }\n }\n\n // ### `_countInIndex` counts matching quads in a three-layered index.\n // The index base is `index0` and the keys at each level are `key0`, `key1`, and `key2`.\n // Any of these keys can be undefined, which is interpreted as a wildcard.\n _countInIndex(index0, key0, key1, key2) {\n let count = 0, tmp, index1, index2;\n\n // If a key is specified, count only that part of index 0\n if (key0) (tmp = index0, index0 = {})[key0] = tmp[key0];\n for (const value0 in index0) {\n if (index1 = index0[value0]) {\n // If a key is specified, count only that part of index 1\n if (key1) (tmp = index1, index1 = {})[key1] = tmp[key1];\n for (const value1 in index1) {\n if (index2 = index1[value1]) {\n // If a key is specified, count the quad if it exists\n if (key2) (key2 in index2) && count++;\n // Otherwise, count all quads\n else count += Object.keys(index2).length;\n }\n }\n }\n }\n return count;\n }\n\n // ### `_getGraphs` returns an array with the given graph,\n // or all graphs if the argument is null or undefined.\n _getGraphs(graph) {\n if (!isString(graph))\n return this._graphs;\n const graphs = {};\n graphs[graph] = this._graphs[graph];\n return graphs;\n }\n\n // ### `_uniqueEntities` returns a function that accepts an entity ID\n // and passes the corresponding entity to callback if it hasn't occurred before.\n _uniqueEntities(callback) {\n const uniqueIds = Object.create(null);\n return id => {\n if (!(id in uniqueIds)) {\n uniqueIds[id] = true;\n callback(this._termFromId(this._entities[id], this._factory));\n }\n };\n }\n\n // ## Public methods\n\n // ### `add` adds the specified quad to the dataset.\n // Returns the dataset instance it was called on.\n // Existing quads, as defined in Quad.equals, will be ignored.\n add(quad) {\n this.addQuad(quad);\n return this;\n }\n\n // ### `addQuad` adds a new quad to the store.\n // Returns if the quad index has changed, if the quad did not already exist.\n addQuad(subject, predicate, object, graph) {\n // Shift arguments if a quad object is given instead of components\n if (!predicate)\n graph = subject.graph, object = subject.object,\n predicate = subject.predicate, subject = subject.subject;\n\n // Convert terms to internal string representation\n graph = termToId(graph);\n\n // Find the graph that will contain the triple\n let graphItem = this._graphs[graph];\n // Create the graph if it doesn't exist yet\n if (!graphItem) {\n graphItem = this._graphs[graph] = { subjects: {}, predicates: {}, objects: {} };\n // Freezing a graph helps subsequent `add` performance,\n // and properties will never be modified anyway\n Object.freeze(graphItem);\n }\n\n // Since entities can often be long IRIs, we avoid storing them in every index.\n // Instead, we have a separate index that maps entities to numbers,\n // which are then used as keys in the other indexes.\n subject = this._termToNewNumericId(subject);\n predicate = this._termToNewNumericId(predicate);\n object = this._termToNewNumericId(object);\n\n const changed = this._addToIndex(graphItem.subjects, subject, predicate, object);\n this._addToIndex(graphItem.predicates, predicate, object, subject);\n this._addToIndex(graphItem.objects, object, subject, predicate);\n\n // The cached quad count is now invalid\n this._size = null;\n return changed;\n }\n\n // ### `addQuads` adds multiple quads to the store\n addQuads(quads) {\n for (let i = 0; i < quads.length; i++)\n this.addQuad(quads[i]);\n }\n\n // ### `delete` removes the specified quad from the dataset.\n // Returns the dataset instance it was called on.\n delete(quad) {\n this.removeQuad(quad);\n return this;\n }\n\n // ### `has` determines whether a dataset includes a certain quad or quad pattern.\n has(subjectOrQuad, predicate, object, graph) {\n if (subjectOrQuad && subjectOrQuad.subject)\n ({ subject: subjectOrQuad, predicate, object, graph } = subjectOrQuad);\n return !this.readQuads(subjectOrQuad, predicate, object, graph).next().done;\n }\n\n // ### `import` adds a stream of quads to the store\n import(stream) {\n stream.on('data', quad => { this.addQuad(quad); });\n return stream;\n }\n\n // ### `removeQuad` removes a quad from the store if it exists\n removeQuad(subject, predicate, object, graph) {\n // Shift arguments if a quad object is given instead of components\n if (!predicate)\n graph = subject.graph, object = subject.object,\n predicate = subject.predicate, subject = subject.subject;\n\n // Convert terms to internal string representation\n graph = termToId(graph);\n\n // Find internal identifiers for all components\n // and verify the quad exists.\n const graphs = this._graphs;\n let graphItem, subjects, predicates;\n if (!(subject = subject && this._termToNumericId(subject)) || !(predicate = predicate && this._termToNumericId(predicate)) ||\n !(object = object && this._termToNumericId(object)) || !(graphItem = graphs[graph]) ||\n !(subjects = graphItem.subjects[subject]) ||\n !(predicates = subjects[predicate]) ||\n !(object in predicates))\n return false;\n\n // Remove it from all indexes\n this._removeFromIndex(graphItem.subjects, subject, predicate, object);\n this._removeFromIndex(graphItem.predicates, predicate, object, subject);\n this._removeFromIndex(graphItem.objects, object, subject, predicate);\n if (this._size !== null) this._size--;\n\n // Remove the graph if it is empty\n for (subject in graphItem.subjects) return true;\n delete graphs[graph];\n return true;\n }\n\n // ### `removeQuads` removes multiple quads from the store\n removeQuads(quads) {\n for (let i = 0; i < quads.length; i++)\n this.removeQuad(quads[i]);\n }\n\n // ### `remove` removes a stream of quads from the store\n remove(stream) {\n stream.on('data', quad => { this.removeQuad(quad); });\n return stream;\n }\n\n // ### `removeMatches` removes all matching quads from the store\n // Setting any field to `undefined` or `null` indicates a wildcard.\n removeMatches(subject, predicate, object, graph) {\n const stream = new Readable({ objectMode: true });\n\n stream._read = () => {\n for (const quad of this.readQuads(subject, predicate, object, graph))\n stream.push(quad);\n stream.push(null);\n };\n\n return this.remove(stream);\n }\n\n // ### `deleteGraph` removes all triples with the given graph from the store\n deleteGraph(graph) {\n return this.removeMatches(null, null, null, graph);\n }\n\n // ### `getQuads` returns an array of quads matching a pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n getQuads(subject, predicate, object, graph) {\n return [...this.readQuads(subject, predicate, object, graph)];\n }\n\n // ### `readQuads` returns an generator of quads matching a pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n *readQuads(subject, predicate, object, graph) {\n // Convert terms to internal string representation\n graph = graph && termToId(graph);\n\n const graphs = this._getGraphs(graph);\n let content, subjectId, predicateId, objectId;\n\n // Translate IRIs to internal index keys.\n if (subject && !(subjectId = this._termToNumericId(subject)) ||\n predicate && !(predicateId = this._termToNumericId(predicate)) ||\n object && !(objectId = this._termToNumericId(object)))\n return;\n\n for (const graphId in graphs) {\n // Only if the specified graph contains triples, there can be results\n if (content = graphs[graphId]) {\n // Choose the optimal index, based on what fields are present\n if (subjectId) {\n if (objectId)\n // If subject and object are given, the object index will be the fastest\n yield* this._findInIndex(content.objects, objectId, subjectId, predicateId,\n 'object', 'subject', 'predicate', graphId);\n else\n // If only subject and possibly predicate are given, the subject index will be the fastest\n yield* this._findInIndex(content.subjects, subjectId, predicateId, null,\n 'subject', 'predicate', 'object', graphId);\n }\n else if (predicateId)\n // If only predicate and possibly object are given, the predicate index will be the fastest\n yield* this._findInIndex(content.predicates, predicateId, objectId, null,\n 'predicate', 'object', 'subject', graphId);\n else if (objectId)\n // If only object is given, the object index will be the fastest\n yield* this._findInIndex(content.objects, objectId, null, null,\n 'object', 'subject', 'predicate', graphId);\n else\n // If nothing is given, iterate subjects and predicates first\n yield* this._findInIndex(content.subjects, null, null, null,\n 'subject', 'predicate', 'object', graphId);\n }\n }\n }\n\n // ### `match` returns a new dataset that is comprised of all quads in the current instance matching the given arguments.\n // The logic described in Quad Matching is applied for each quad in this dataset to check if it should be included in the output dataset.\n // Note: This method always returns a new DatasetCore, even if that dataset contains no quads.\n // Note: Since a DatasetCore is an unordered set, the order of the quads within the returned sequence is arbitrary.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n // For backwards compatibility, the object return also implements the Readable stream interface.\n match(subject, predicate, object, graph) {\n return new DatasetCoreAndReadableStream(this, subject, predicate, object, graph);\n }\n\n // ### `countQuads` returns the number of quads matching a pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n countQuads(subject, predicate, object, graph) {\n // Convert terms to internal string representation\n graph = graph && termToId(graph);\n\n const graphs = this._getGraphs(graph);\n let count = 0, content, subjectId, predicateId, objectId;\n\n // Translate IRIs to internal index keys.\n if (subject && !(subjectId = this._termToNumericId(subject)) ||\n predicate && !(predicateId = this._termToNumericId(predicate)) ||\n object && !(objectId = this._termToNumericId(object)))\n return 0;\n\n for (const graphId in graphs) {\n // Only if the specified graph contains triples, there can be results\n if (content = graphs[graphId]) {\n // Choose the optimal index, based on what fields are present\n if (subject) {\n if (object)\n // If subject and object are given, the object index will be the fastest\n count += this._countInIndex(content.objects, objectId, subjectId, predicateId);\n else\n // If only subject and possibly predicate are given, the subject index will be the fastest\n count += this._countInIndex(content.subjects, subjectId, predicateId, objectId);\n }\n else if (predicate) {\n // If only predicate and possibly object are given, the predicate index will be the fastest\n count += this._countInIndex(content.predicates, predicateId, objectId, subjectId);\n }\n else {\n // If only object is possibly given, the object index will be the fastest\n count += this._countInIndex(content.objects, objectId, subjectId, predicateId);\n }\n }\n }\n return count;\n }\n\n // ### `forEach` executes the callback on all quads.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n forEach(callback, subject, predicate, object, graph) {\n this.some(quad => {\n callback(quad);\n return false;\n }, subject, predicate, object, graph);\n }\n\n // ### `every` executes the callback on all quads,\n // and returns `true` if it returns truthy for all them.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n every(callback, subject, predicate, object, graph) {\n let some = false;\n const every = !this.some(quad => {\n some = true;\n return !callback(quad);\n }, subject, predicate, object, graph);\n return some && every;\n }\n\n // ### `some` executes the callback on all quads,\n // and returns `true` if it returns truthy for any of them.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n some(callback, subject, predicate, object, graph) {\n for (const quad of this.readQuads(subject, predicate, object, graph))\n if (callback(quad))\n return true;\n return false;\n }\n\n // ### `getSubjects` returns all subjects that match the pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n getSubjects(predicate, object, graph) {\n const results = [];\n this.forSubjects(s => { results.push(s); }, predicate, object, graph);\n return results;\n }\n\n // ### `forSubjects` executes the callback on all subjects that match the pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n forSubjects(callback, predicate, object, graph) {\n // Convert terms to internal string representation\n graph = graph && termToId(graph);\n\n const graphs = this._getGraphs(graph);\n let content, predicateId, objectId;\n callback = this._uniqueEntities(callback);\n\n // Translate IRIs to internal index keys.\n if (predicate && !(predicateId = this._termToNumericId(predicate)) ||\n object && !(objectId = this._termToNumericId(object)))\n return;\n\n for (graph in graphs) {\n // Only if the specified graph contains triples, there can be results\n if (content = graphs[graph]) {\n // Choose optimal index based on which fields are wildcards\n if (predicateId) {\n if (objectId)\n // If predicate and object are given, the POS index is best.\n this._loopBy2Keys(content.predicates, predicateId, objectId, callback);\n else\n // If only predicate is given, the SPO index is best.\n this._loopByKey1(content.subjects, predicateId, callback);\n }\n else if (objectId)\n // If only object is given, the OSP index is best.\n this._loopByKey0(content.objects, objectId, callback);\n else\n // If no params given, iterate all the subjects\n this._loop(content.subjects, callback);\n }\n }\n }\n\n // ### `getPredicates` returns all predicates that match the pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n getPredicates(subject, object, graph) {\n const results = [];\n this.forPredicates(p => { results.push(p); }, subject, object, graph);\n return results;\n }\n\n // ### `forPredicates` executes the callback on all predicates that match the pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n forPredicates(callback, subject, object, graph) {\n // Convert terms to internal string representation\n graph = graph && termToId(graph);\n\n const graphs = this._getGraphs(graph);\n let content, subjectId, objectId;\n callback = this._uniqueEntities(callback);\n\n // Translate IRIs to internal index keys.\n if (subject && !(subjectId = this._termToNumericId(subject)) ||\n object && !(objectId = this._termToNumericId(object)))\n return;\n\n for (graph in graphs) {\n // Only if the specified graph contains triples, there can be results\n if (content = graphs[graph]) {\n // Choose optimal index based on which fields are wildcards\n if (subjectId) {\n if (objectId)\n // If subject and object are given, the OSP index is best.\n this._loopBy2Keys(content.objects, objectId, subjectId, callback);\n else\n // If only subject is given, the SPO index is best.\n this._loopByKey0(content.subjects, subjectId, callback);\n }\n else if (objectId)\n // If only object is given, the POS index is best.\n this._loopByKey1(content.predicates, objectId, callback);\n else\n // If no params given, iterate all the predicates.\n this._loop(content.predicates, callback);\n }\n }\n }\n\n // ### `getObjects` returns all objects that match the pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n getObjects(subject, predicate, graph) {\n const results = [];\n this.forObjects(o => { results.push(o); }, subject, predicate, graph);\n return results;\n }\n\n // ### `forObjects` executes the callback on all objects that match the pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n forObjects(callback, subject, predicate, graph) {\n // Convert terms to internal string representation\n graph = graph && termToId(graph);\n\n const graphs = this._getGraphs(graph);\n let content, subjectId, predicateId;\n callback = this._uniqueEntities(callback);\n\n // Translate IRIs to internal index keys.\n if (subject && !(subjectId = this._termToNumericId(subject)) ||\n predicate && !(predicateId = this._termToNumericId(predicate)))\n return;\n\n for (graph in graphs) {\n // Only if the specified graph contains triples, there can be results\n if (content = graphs[graph]) {\n // Choose optimal index based on which fields are wildcards\n if (subjectId) {\n if (predicateId)\n // If subject and predicate are given, the SPO index is best.\n this._loopBy2Keys(content.subjects, subjectId, predicateId, callback);\n else\n // If only subject is given, the OSP index is best.\n this._loopByKey1(content.objects, subjectId, callback);\n }\n else if (predicateId)\n // If only predicate is given, the POS index is best.\n this._loopByKey0(content.predicates, predicateId, callback);\n else\n // If no params given, iterate all the objects.\n this._loop(content.objects, callback);\n }\n }\n }\n\n // ### `getGraphs` returns all graphs that match the pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n getGraphs(subject, predicate, object) {\n const results = [];\n this.forGraphs(g => { results.push(g); }, subject, predicate, object);\n return results;\n }\n\n // ### `forGraphs` executes the callback on all graphs that match the pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n forGraphs(callback, subject, predicate, object) {\n for (const graph in this._graphs) {\n this.some(quad => {\n callback(quad.graph);\n return true; // Halt iteration of some()\n }, subject, predicate, object, graph);\n }\n }\n\n // ### `createBlankNode` creates a new blank node, returning its name\n createBlankNode(suggestedName) {\n let name, index;\n // Generate a name based on the suggested name\n if (suggestedName) {\n name = suggestedName = `_:${suggestedName}`, index = 1;\n while (this._ids[name])\n name = suggestedName + index++;\n }\n // Generate a generic blank node name\n else {\n do { name = `_:b${this._blankNodeIndex++}`; }\n while (this._ids[name]);\n }\n // Add the blank node to the entities, avoiding the generation of duplicates\n this._ids[name] = ++this._id;\n this._entities[this._id] = name;\n return this._factory.blankNode(name.substr(2));\n }\n\n // ### `extractLists` finds and removes all list triples\n // and returns the items per list.\n extractLists({ remove = false, ignoreErrors = false } = {}) {\n const lists = {}; // has scalar keys so could be a simple Object\n const onError = ignoreErrors ? (() => true) :\n ((node, message) => { throw new Error(`${node.value} ${message}`); });\n\n // Traverse each list from its tail\n const tails = this.getQuads(null, namespaces.rdf.rest, namespaces.rdf.nil, null);\n const toRemove = remove ? [...tails] : [];\n tails.forEach(tailQuad => {\n const items = []; // the members found as objects of rdf:first quads\n let malformed = false; // signals whether the current list is malformed\n let head; // the head of the list (_:b1 in above example)\n let headPos; // set to subject or object when head is set\n const graph = tailQuad.graph; // make sure list is in exactly one graph\n\n // Traverse the list from tail to end\n let current = tailQuad.subject;\n while (current && !malformed) {\n const objectQuads = this.getQuads(null, null, current, null);\n const subjectQuads = this.getQuads(current, null, null, null);\n let quad, first = null, rest = null, parent = null;\n\n // Find the first and rest of this list node\n for (let i = 0; i < subjectQuads.length && !malformed; i++) {\n quad = subjectQuads[i];\n if (!quad.graph.equals(graph))\n malformed = onError(current, 'not confined to single graph');\n else if (head)\n malformed = onError(current, 'has non-list arcs out');\n\n // one rdf:first\n else if (quad.predicate.value === namespaces.rdf.first) {\n if (first)\n malformed = onError(current, 'has multiple rdf:first arcs');\n else\n toRemove.push(first = quad);\n }\n\n // one rdf:rest\n else if (quad.predicate.value === namespaces.rdf.rest) {\n if (rest)\n malformed = onError(current, 'has multiple rdf:rest arcs');\n else\n toRemove.push(rest = quad);\n }\n\n // alien triple\n else if (objectQuads.length)\n malformed = onError(current, 'can\\'t be subject and object');\n else {\n head = quad; // e.g. { (1 2 3) :p :o }\n headPos = 'subject';\n }\n }\n\n // { :s :p (1 2) } arrives here with no head\n // { (1 2) :p :o } arrives here with head set to the list.\n for (let i = 0; i < objectQuads.length && !malformed; ++i) {\n quad = objectQuads[i];\n if (head)\n malformed = onError(current, 'can\\'t have coreferences');\n // one rdf:rest\n else if (quad.predicate.value === namespaces.rdf.rest) {\n if (parent)\n malformed = onError(current, 'has incoming rdf:rest arcs');\n else\n parent = quad;\n }\n else {\n head = quad; // e.g. { :s :p (1 2) }\n headPos = 'object';\n }\n }\n\n // Store the list item and continue with parent\n if (!first)\n malformed = onError(current, 'has no list head');\n else\n items.unshift(first.object);\n current = parent && parent.subject;\n }\n\n // Don't remove any quads if the list is malformed\n if (malformed)\n remove = false;\n // Store the list under the value of its head\n else if (head)\n lists[head[headPos].value] = items;\n });\n\n // Remove list quads if requested\n if (remove)\n this.removeQuads(toRemove);\n return lists;\n }\n\n // ### Store is an iterable.\n // Can be used where iterables are expected: for...of loops, array spread operator,\n // `yield*`, and destructuring assignment (order is not guaranteed).\n *[Symbol.iterator]() {\n yield* this.readQuads();\n }\n}\n\n// Determines whether the argument is a string\nfunction isString(s) {\n return typeof s === 'string' || s instanceof String;\n}\n\n/**\n * A class that implements both DatasetCore and Readable.\n */\nclass DatasetCoreAndReadableStream extends Readable {\n constructor(n3Store, subject, predicate, object, graph) {\n super({ objectMode: true });\n Object.assign(this, { n3Store, subject, predicate, object, graph });\n }\n\n get filtered() {\n if (!this._filtered) {\n const { n3Store, graph, object, predicate, subject } = this;\n const newStore = this._filtered = new N3Store({ factory: n3Store._factory });\n for (const quad of n3Store.readQuads(subject, predicate, object, graph))\n newStore.addQuad(quad);\n }\n return this._filtered;\n }\n\n get size() {\n return this.filtered.size;\n }\n\n _read() {\n for (const quad of this)\n this.push(quad);\n this.push(null);\n }\n\n add(quad) {\n return this.filtered.add(quad);\n }\n\n delete(quad) {\n return this.filtered.delete(quad);\n }\n\n has(quad) {\n return this.filtered.has(quad);\n }\n\n match(subject, predicate, object, graph) {\n return new DatasetCoreAndReadableStream(this.filtered, subject, predicate, object, graph);\n }\n\n *[Symbol.iterator]() {\n yield* this._filtered || this.n3Store.readQuads(this.subject, this.predicate, this.object, this.graph);\n }\n}\n","// **N3StreamParser** parses a text stream into a quad stream.\nimport { Transform } from 'readable-stream';\nimport N3Parser from './N3Parser';\n\n// ## Constructor\nexport default class N3StreamParser extends Transform {\n constructor(options) {\n super({ decodeStrings: true });\n this._readableState.objectMode = true;\n\n // Set up parser with dummy stream to obtain `data` and `end` callbacks\n const parser = new N3Parser(options);\n let onData, onEnd;\n parser.parse({\n on: (event, callback) => {\n switch (event) {\n case 'data': onData = callback; break;\n case 'end': onEnd = callback; break;\n }\n },\n },\n // Handle quads by pushing them down the pipeline\n (error, quad) => { error && this.emit('error', error) || quad && this.push(quad); },\n // Emit prefixes through the `prefix` event\n (prefix, uri) => { this.emit('prefix', prefix, uri); }\n );\n\n // Implement Transform methods through parser callbacks\n this._transform = (chunk, encoding, done) => { onData(chunk); done(); };\n this._flush = done => { onEnd(); done(); };\n }\n\n // ### Parses a stream of strings\n import(stream) {\n stream.on('data', chunk => { this.write(chunk); });\n stream.on('end', () => { this.end(); });\n stream.on('error', error => { this.emit('error', error); });\n return this;\n }\n}\n","// **N3StreamWriter** serializes a quad stream into a text stream.\nimport { Transform } from 'readable-stream';\nimport N3Writer from './N3Writer';\n\n// ## Constructor\nexport default class N3StreamWriter extends Transform {\n constructor(options) {\n super({ encoding: 'utf8', writableObjectMode: true });\n\n // Set up writer with a dummy stream object\n const writer = this._writer = new N3Writer({\n write: (quad, encoding, callback) => { this.push(quad); callback && callback(); },\n end: callback => { this.push(null); callback && callback(); },\n }, options);\n\n // Implement Transform methods on top of writer\n this._transform = (quad, encoding, done) => { writer.addQuad(quad, done); };\n this._flush = done => { writer.end(done); };\n }\n\n// ### Serializes a stream of quads\n import(stream) {\n stream.on('data', quad => { this.write(quad); });\n stream.on('end', () => { this.end(); });\n stream.on('error', error => { this.emit('error', error); });\n stream.on('prefix', (prefix, iri) => { this._writer.addPrefix(prefix, iri); });\n return this;\n }\n}\n","import Lexer from './N3Lexer';\nimport Parser from './N3Parser';\nimport Writer from './N3Writer';\nimport Store from './N3Store';\nimport StreamParser from './N3StreamParser';\nimport StreamWriter from './N3StreamWriter';\nimport * as Util from './N3Util';\n\nimport {\n default as DataFactory,\n\n Term,\n NamedNode,\n Literal,\n BlankNode,\n Variable,\n DefaultGraph,\n Quad,\n Triple,\n\n termFromId,\n termToId,\n} from './N3DataFactory';\n\n// Named exports\nexport {\n Lexer,\n Parser,\n Writer,\n Store,\n StreamParser,\n StreamWriter,\n Util,\n\n DataFactory,\n\n Term,\n NamedNode,\n Literal,\n BlankNode,\n Variable,\n DefaultGraph,\n Quad,\n Triple,\n\n termFromId,\n termToId,\n};\n\n// Export all named exports as a default object for backward compatibility\nexport default {\n Lexer,\n Parser,\n Writer,\n Store,\n StreamParser,\n StreamWriter,\n Util,\n\n DataFactory,\n\n Term,\n NamedNode,\n Literal,\n BlankNode,\n Variable,\n DefaultGraph,\n Quad,\n Triple,\n\n termFromId,\n termToId,\n};\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","(function() {\n var root;\n\n\tif (typeof window === 'object' && window) {\n\t\troot = window;\n\t} else {\n\t\troot = global;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = root.Promise ? root.Promise : Promise;\n\t} else if (!root.Promise) {\n\t\troot.Promise = Promise;\n\t}\n\n\t// Use polyfill for setImmediate for performance gains\n\tvar asap = root.setImmediate || function(fn) { setTimeout(fn, 1); };\n\n\t// Polyfill for Function.prototype.bind\n\tfunction bind(fn, thisArg) {\n\t\treturn function() {\n\t\t\tfn.apply(thisArg, arguments);\n\t\t}\n\t}\n\n\tvar isArray = Array.isArray || function(value) { return Object.prototype.toString.call(value) === \"[object Array]\" };\n\n\tfunction Promise(fn) {\n\t\tif (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');\n\t\tif (typeof fn !== 'function') throw new TypeError('not a function');\n\t\tthis._state = null;\n\t\tthis._value = null;\n\t\tthis._deferreds = []\n\n\t\tdoResolve(fn, bind(resolve, this), bind(reject, this))\n\t}\n\n\tfunction handle(deferred) {\n\t\tvar me = this;\n\t\tif (this._state === null) {\n\t\t\tthis._deferreds.push(deferred);\n\t\t\treturn\n\t\t}\n\t\tasap(function() {\n\t\t\tvar cb = me._state ? deferred.onFulfilled : deferred.onRejected\n\t\t\tif (cb === null) {\n\t\t\t\t(me._state ? deferred.resolve : deferred.reject)(me._value);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar ret;\n\t\t\ttry {\n\t\t\t\tret = cb(me._value);\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\tdeferred.reject(e);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdeferred.resolve(ret);\n\t\t})\n\t}\n\n\tfunction resolve(newValue) {\n\t\ttry { //Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n\t\t\tif (newValue === this) throw new TypeError('A promise cannot be resolved with itself.');\n\t\t\tif (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {\n\t\t\t\tvar then = newValue.then;\n\t\t\t\tif (typeof then === 'function') {\n\t\t\t\t\tdoResolve(bind(then, newValue), bind(resolve, this), bind(reject, this));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._state = true;\n\t\t\tthis._value = newValue;\n\t\t\tfinale.call(this);\n\t\t} catch (e) { reject.call(this, e); }\n\t}\n\n\tfunction reject(newValue) {\n\t\tthis._state = false;\n\t\tthis._value = newValue;\n\t\tfinale.call(this);\n\t}\n\n\tfunction finale() {\n\t\tfor (var i = 0, len = this._deferreds.length; i < len; i++) {\n\t\t\thandle.call(this, this._deferreds[i]);\n\t\t}\n\t\tthis._deferreds = null;\n\t}\n\n\tfunction Handler(onFulfilled, onRejected, resolve, reject){\n\t\tthis.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n\t\tthis.onRejected = typeof onRejected === 'function' ? onRejected : null;\n\t\tthis.resolve = resolve;\n\t\tthis.reject = reject;\n\t}\n\n\t/**\n\t * Take a potentially misbehaving resolver function and make sure\n\t * onFulfilled and onRejected are only called once.\n\t *\n\t * Makes no guarantees about asynchrony.\n\t */\n\tfunction doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t})\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}\n\n\tPromise.prototype['catch'] = function (onRejected) {\n\t\treturn this.then(null, onRejected);\n\t};\n\n\tPromise.prototype.then = function(onFulfilled, onRejected) {\n\t\tvar me = this;\n\t\treturn new Promise(function(resolve, reject) {\n\t\t\thandle.call(me, new Handler(onFulfilled, onRejected, resolve, reject));\n\t\t})\n\t};\n\n\tPromise.all = function () {\n\t\tvar args = Array.prototype.slice.call(arguments.length === 1 && isArray(arguments[0]) ? arguments[0] : arguments);\n\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\tif (args.length === 0) return resolve([]);\n\t\t\tvar remaining = args.length;\n\t\t\tfunction res(i, val) {\n\t\t\t\ttry {\n\t\t\t\t\tif (val && (typeof val === 'object' || typeof val === 'function')) {\n\t\t\t\t\t\tvar then = val.then;\n\t\t\t\t\t\tif (typeof then === 'function') {\n\t\t\t\t\t\t\tthen.call(val, function (val) { res(i, val) }, reject);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\targs[i] = val;\n\t\t\t\t\tif (--remaining === 0) {\n\t\t\t\t\t\tresolve(args);\n\t\t\t\t\t}\n\t\t\t\t} catch (ex) {\n\t\t\t\t\treject(ex);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var i = 0; i < args.length; i++) {\n\t\t\t\tres(i, args[i]);\n\t\t\t}\n\t\t});\n\t};\n\n\tPromise.resolve = function (value) {\n\t\tif (value && typeof value === 'object' && value.constructor === Promise) {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn new Promise(function (resolve) {\n\t\t\tresolve(value);\n\t\t});\n\t};\n\n\tPromise.reject = function (value) {\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\treject(value);\n\t\t});\n\t};\n\n\tPromise.race = function (values) {\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\tfor(var i = 0, len = values.length; i < len; i++) {\n\t\t\t\tvalues[i].then(resolve, reject);\n\t\t\t}\n\t\t});\n\t};\n})();","/*! queue-microtask. MIT License. Feross Aboukhadijeh */\nlet promise\n\nmodule.exports = typeof queueMicrotask === 'function'\n ? queueMicrotask.bind(typeof window !== 'undefined' ? window : global)\n // reuse resolved promise, and allocate it lazily\n : cb => (promise || (promise = Promise.resolve()))\n .then(cb)\n .catch(err => setTimeout(() => { throw err }, 0))\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/BlankNode\"), exports);\n__exportStar(require(\"./lib/DataFactory\"), exports);\n__exportStar(require(\"./lib/DefaultGraph\"), exports);\n__exportStar(require(\"./lib/Literal\"), exports);\n__exportStar(require(\"./lib/NamedNode\"), exports);\n__exportStar(require(\"./lib/Quad\"), exports);\n__exportStar(require(\"./lib/Variable\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BlankNode = void 0;\n/**\n * A term that represents an RDF blank node with a label.\n */\nclass BlankNode {\n constructor(value) {\n this.termType = 'BlankNode';\n this.value = value;\n }\n equals(other) {\n return !!other && other.termType === 'BlankNode' && other.value === this.value;\n }\n}\nexports.BlankNode = BlankNode;\n//# sourceMappingURL=BlankNode.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DataFactory = void 0;\nconst BlankNode_1 = require(\"./BlankNode\");\nconst DefaultGraph_1 = require(\"./DefaultGraph\");\nconst Literal_1 = require(\"./Literal\");\nconst NamedNode_1 = require(\"./NamedNode\");\nconst Quad_1 = require(\"./Quad\");\nconst Variable_1 = require(\"./Variable\");\nlet dataFactoryCounter = 0;\n/**\n * A factory for instantiating RDF terms and quads.\n */\nclass DataFactory {\n constructor(options) {\n this.blankNodeCounter = 0;\n options = options || {};\n this.blankNodePrefix = options.blankNodePrefix || `df_${dataFactoryCounter++}_`;\n }\n /**\n * @param value The IRI for the named node.\n * @return A new instance of NamedNode.\n * @see NamedNode\n */\n namedNode(value) {\n return new NamedNode_1.NamedNode(value);\n }\n /**\n * @param value The optional blank node identifier.\n * @return A new instance of BlankNode.\n * If the `value` parameter is undefined a new identifier\n * for the blank node is generated for each call.\n * @see BlankNode\n */\n blankNode(value) {\n return new BlankNode_1.BlankNode(value || `${this.blankNodePrefix}${this.blankNodeCounter++}`);\n }\n /**\n * @param value The literal value.\n * @param languageOrDatatype The optional language or datatype.\n * If `languageOrDatatype` is a NamedNode,\n * then it is used for the value of `NamedNode.datatype`.\n * Otherwise `languageOrDatatype` is used for the value\n * of `NamedNode.language`.\n * @return A new instance of Literal.\n * @see Literal\n */\n literal(value, languageOrDatatype) {\n return new Literal_1.Literal(value, languageOrDatatype);\n }\n /**\n * This method is optional.\n * @param value The variable name\n * @return A new instance of Variable.\n * @see Variable\n */\n variable(value) {\n return new Variable_1.Variable(value);\n }\n /**\n * @return An instance of DefaultGraph.\n */\n defaultGraph() {\n return DefaultGraph_1.DefaultGraph.INSTANCE;\n }\n /**\n * @param subject The quad subject term.\n * @param predicate The quad predicate term.\n * @param object The quad object term.\n * @param graph The quad graph term.\n * @return A new instance of Quad.\n * @see Quad\n */\n quad(subject, predicate, object, graph) {\n return new Quad_1.Quad(subject, predicate, object, graph || this.defaultGraph());\n }\n /**\n * Create a deep copy of the given term using this data factory.\n * @param original An RDF term.\n * @return A deep copy of the given term.\n */\n fromTerm(original) {\n // TODO: remove nasty any casts when this TS bug has been fixed:\n // https://github.com/microsoft/TypeScript/issues/26933\n switch (original.termType) {\n case 'NamedNode':\n return this.namedNode(original.value);\n case 'BlankNode':\n return this.blankNode(original.value);\n case 'Literal':\n if (original.language) {\n return this.literal(original.value, original.language);\n }\n if (!original.datatype.equals(Literal_1.Literal.XSD_STRING)) {\n return this.literal(original.value, this.fromTerm(original.datatype));\n }\n return this.literal(original.value);\n case 'Variable':\n return this.variable(original.value);\n case 'DefaultGraph':\n return this.defaultGraph();\n case 'Quad':\n return this.quad(this.fromTerm(original.subject), this.fromTerm(original.predicate), this.fromTerm(original.object), this.fromTerm(original.graph));\n }\n }\n /**\n * Create a deep copy of the given quad using this data factory.\n * @param original An RDF quad.\n * @return A deep copy of the given quad.\n */\n fromQuad(original) {\n return this.fromTerm(original);\n }\n /**\n * Reset the internal blank node counter.\n */\n resetBlankNodeCounter() {\n this.blankNodeCounter = 0;\n }\n}\nexports.DataFactory = DataFactory;\n//# sourceMappingURL=DataFactory.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DefaultGraph = void 0;\n/**\n * A singleton term instance that represents the default graph.\n * It's only allowed to assign a DefaultGraph to the .graph property of a Quad.\n */\nclass DefaultGraph {\n constructor() {\n this.termType = 'DefaultGraph';\n this.value = '';\n // Private constructor\n }\n equals(other) {\n return !!other && other.termType === 'DefaultGraph';\n }\n}\nexports.DefaultGraph = DefaultGraph;\nDefaultGraph.INSTANCE = new DefaultGraph();\n//# sourceMappingURL=DefaultGraph.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Literal = void 0;\nconst NamedNode_1 = require(\"./NamedNode\");\n/**\n * A term that represents an RDF literal, containing a string with an optional language tag or datatype.\n */\nclass Literal {\n constructor(value, languageOrDatatype) {\n this.termType = 'Literal';\n this.value = value;\n if (typeof languageOrDatatype === 'string') {\n this.language = languageOrDatatype;\n this.datatype = Literal.RDF_LANGUAGE_STRING;\n }\n else if (languageOrDatatype) {\n this.language = '';\n this.datatype = languageOrDatatype;\n }\n else {\n this.language = '';\n this.datatype = Literal.XSD_STRING;\n }\n }\n equals(other) {\n return !!other && other.termType === 'Literal' && other.value === this.value &&\n other.language === this.language && this.datatype.equals(other.datatype);\n }\n}\nexports.Literal = Literal;\nLiteral.RDF_LANGUAGE_STRING = new NamedNode_1.NamedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#langString');\nLiteral.XSD_STRING = new NamedNode_1.NamedNode('http://www.w3.org/2001/XMLSchema#string');\n//# sourceMappingURL=Literal.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NamedNode = void 0;\n/**\n * A term that contains an IRI.\n */\nclass NamedNode {\n constructor(value) {\n this.termType = 'NamedNode';\n this.value = value;\n }\n equals(other) {\n return !!other && other.termType === 'NamedNode' && other.value === this.value;\n }\n}\nexports.NamedNode = NamedNode;\n//# sourceMappingURL=NamedNode.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Quad = void 0;\n/**\n * An instance of DefaultGraph represents the default graph.\n * It's only allowed to assign a DefaultGraph to the .graph property of a Quad.\n */\nclass Quad {\n constructor(subject, predicate, object, graph) {\n this.termType = 'Quad';\n this.value = '';\n this.subject = subject;\n this.predicate = predicate;\n this.object = object;\n this.graph = graph;\n }\n equals(other) {\n // `|| !other.termType` is for backwards-compatibility with old factories without RDF* support.\n return !!other && (other.termType === 'Quad' || !other.termType) &&\n this.subject.equals(other.subject) &&\n this.predicate.equals(other.predicate) &&\n this.object.equals(other.object) &&\n this.graph.equals(other.graph);\n }\n}\nexports.Quad = Quad;\n//# sourceMappingURL=Quad.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Variable = void 0;\n/**\n * A term that represents a variable.\n */\nclass Variable {\n constructor(value) {\n this.termType = 'Variable';\n this.value = value;\n }\n equals(other) {\n return !!other && other.termType === 'Variable' && other.value === this.value;\n }\n}\nexports.Variable = Variable;\n//# sourceMappingURL=Variable.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/RdfIsomorphic\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTermGrounded = exports.termToSignature = exports.quadToSignature = exports.sha1hex = exports.hashTerm = exports.hashTerms = exports.getGraphBlankNodes = exports.uniqGraph = exports.deindexGraph = exports.indexGraph = exports.getQuadsWithoutBlankNodes = exports.getQuadsWithBlankNodes = exports.hasValue = exports.hashValues = exports.getBijectionInner = exports.getBijection = exports.isomorphic = void 0;\nconst hash_js_1 = require(\"hash.js\");\nconst rdf_string_1 = require(\"rdf-string\");\nconst rdf_terms_1 = require(\"rdf-terms\");\n/**\n * Determines if the two given graphs are isomorphic.\n *\n * @param {Quad[]} graphA An array of quads, order is not important.\n * @param {Quad[]} graphB An array of quads, order is not important.\n * @return {boolean} If the two given graphs are isomorphic.\n */\nfunction isomorphic(graphA, graphB) {\n return !!getBijection(graphA, graphB);\n}\nexports.isomorphic = isomorphic;\n/**\n * Calculate a hash of graphA blank nodes to graphB blank nodes.\n * This represents a bijection from graphA's blank nodes to graphB's blank nodes.\n *\n * @param {Quad[]} graphA An array of quads, order is not important.\n * @param {Quad[]} graphB An array of quads, order is not important.\n * @return {IBijection} A hash representing a bijection, or null if none could be found.\n */\nfunction getBijection(graphA, graphB) {\n // Check if all (non-blanknode-containing) quads in the two graphs are equal.\n // We do this by creating a hash-based index for both graphs.\n const nonBlankIndexA = indexGraph(getQuadsWithoutBlankNodes(graphA));\n const nonBlankIndexB = indexGraph(getQuadsWithoutBlankNodes(graphB));\n if (Object.keys(nonBlankIndexA).length !== Object.keys(nonBlankIndexB).length) {\n return null;\n }\n for (const key in nonBlankIndexA) {\n if (nonBlankIndexA[key] !== nonBlankIndexB[key]) {\n return null;\n }\n }\n // Pre-process data that needs to be present in each iteration of getBijectionInner.\n const blankQuadsA = uniqGraph(getQuadsWithBlankNodes(graphA));\n const blankQuadsB = uniqGraph(getQuadsWithBlankNodes(graphB));\n const blankNodesA = getGraphBlankNodes(graphA);\n const blankNodesB = getGraphBlankNodes(graphB);\n return getBijectionInner(blankQuadsA, blankQuadsB, blankNodesA, blankNodesB);\n}\nexports.getBijection = getBijection;\nfunction getBijectionInner(blankQuadsA, blankQuadsB, blankNodesA, blankNodesB, groundedHashesA, groundedHashesB) {\n if (!groundedHashesA) {\n groundedHashesA = {};\n }\n if (!groundedHashesB) {\n groundedHashesB = {};\n }\n // Hash every term based on the signature of the quads if appears in.\n const [hashesA, ungroundedHashesA] = hashTerms(blankQuadsA, blankNodesA, groundedHashesA);\n const [hashesB, ungroundedHashesB] = hashTerms(blankQuadsB, blankNodesB, groundedHashesB);\n // Break quickly if a graph contains a grounded node that is not contained in the other graph.\n if (Object.keys(hashesA).length !== Object.keys(hashesB).length) {\n return null;\n }\n for (const hashKeyA in hashesA) {\n if (!hasValue(hashesB, hashesA[hashKeyA])) {\n return null;\n }\n }\n // Map the blank nodes from graph A to the blank nodes of graph B using the created hashes.\n // Grounded hashes will also be equal, but not needed here, we will need them in the next recursion\n // (as we only recurse on grounded nodes).\n let bijection = {};\n for (const blankNodeA of blankNodesA) {\n const blankNodeAString = rdf_string_1.termToString(blankNodeA);\n const blankNodeAHash = ungroundedHashesA[blankNodeAString];\n for (const blankNodeBString in ungroundedHashesB) {\n if (ungroundedHashesB[blankNodeBString] === blankNodeAHash) {\n bijection[blankNodeAString] = blankNodeBString;\n delete ungroundedHashesB[blankNodeBString];\n break;\n }\n }\n }\n // Check if all nodes from graph A and B are present in the bijection,\n // if not, speculatively mark pairs with matching ungrounded hashes as bijected, and recurse.\n if (!arraysEqual(Object.keys(bijection).sort(), blankNodesA.map(rdf_string_1.termToString).sort())\n || !arraysEqual(hashValues(bijection).sort(), blankNodesB.map(rdf_string_1.termToString).sort())) {\n // I have not yet been able to find any pathological cases where this code is reached.\n // This may be removable, but let's wait until someone proves that.\n bijection = null;\n for (const blankNodeA of blankNodesA) {\n // Only replace ungrounded node hashes\n const blankNodeAString = rdf_string_1.termToString(blankNodeA);\n if (!hashesA[blankNodeAString]) {\n for (const blankNodeB of blankNodesB) {\n // Only replace ungrounded node hashes\n const blankNodeBString = rdf_string_1.termToString(blankNodeB);\n if (!hashesB[blankNodeBString]) {\n if (ungroundedHashesA[blankNodeAString] === ungroundedHashesB[blankNodeBString]) {\n const hash = sha1hex(blankNodeAString);\n bijection = getBijectionInner(blankQuadsA, blankQuadsB, blankNodesA, blankNodesB, Object.assign(Object.assign({}, hashesA), { [blankNodeAString]: hash }), Object.assign(Object.assign({}, hashesB), { [blankNodeBString]: hash }));\n }\n }\n }\n }\n }\n }\n return bijection;\n}\nexports.getBijectionInner = getBijectionInner;\nfunction arraysEqual(array1, array2) {\n if (array1.length !== array2.length) {\n return false;\n }\n for (let i = array1.length; i--;) {\n if (array1[i] !== array2[i]) {\n return false;\n }\n }\n return true;\n}\n/**\n * Get all values from the given hash\n * @param hash A hash.\n * @return {any[]} The array of values.\n */\nfunction hashValues(hash) {\n const arr = [];\n for (const e in hash) {\n arr.push(hash[e]);\n }\n return arr;\n}\nexports.hashValues = hashValues;\n/**\n * Check if the given hash contains the given value.\n * @param hash A hash.\n * @param {string} value A value.\n * @return {boolean} If it contains the value.\n */\nfunction hasValue(hash, value) {\n for (const hashValue in hash) {\n if (hash[hashValue] === value) {\n return true;\n }\n }\n return false;\n}\nexports.hasValue = hasValue;\n/**\n * Get all quads with blank nodes.\n * @param {Quad[]} graph An array of quads.\n * @return {Quad[]} An array of quads with blank nodes\n */\nfunction getQuadsWithBlankNodes(graph) {\n return graph.filter((quad) => rdf_terms_1.someTerms(quad, (value) => {\n return value.termType === 'BlankNode'\n || (value.termType === 'Quad' && rdf_terms_1.getTermsNested(value).some(term => term.termType === 'BlankNode'));\n }));\n}\nexports.getQuadsWithBlankNodes = getQuadsWithBlankNodes;\n/**\n * Get all quads without blank nodes.\n * @param {Quad[]} graph An array of quads.\n * @return {Quad[]} An array of quads without blank nodes\n */\nfunction getQuadsWithoutBlankNodes(graph) {\n return graph.filter((quad) => rdf_terms_1.everyTerms(quad, (value) => {\n return value.termType !== 'BlankNode'\n && !(value.termType === 'Quad' && rdf_terms_1.getTermsNested(value).some(term => term.termType === 'BlankNode'));\n }));\n}\nexports.getQuadsWithoutBlankNodes = getQuadsWithoutBlankNodes;\n/**\n * Create a hash-based index of the given graph.\n * @param {Quad[]} graph An array of quads, the order does not matter.\n * @return {{[p: string]: boolean}} A hash-based datastructure representing the graph.\n */\nfunction indexGraph(graph) {\n const index = {};\n for (const quad of graph) {\n index[JSON.stringify(rdf_string_1.quadToStringQuad(quad))] = true;\n }\n return index;\n}\nexports.indexGraph = indexGraph;\n/**\n * Create a graph from the given hash-based index.\n * @param {{[p: string]: boolean}} indexedGraph A hash-based datastructure representing the graph.\n * @return {Quad[]} An array of quads, the order does not matter.\n */\nfunction deindexGraph(indexedGraph) {\n return Object.keys(indexedGraph).map((str) => rdf_string_1.stringQuadToQuad(JSON.parse(str)));\n}\nexports.deindexGraph = deindexGraph;\n/**\n * Unique-ify the given RDF graph based on strict equality.\n * The output graph will consist of new quad and term instances.\n * @param {Quad[]} graph An input graph.\n * @return {Quad[]} The input graph without duplicates.\n */\nfunction uniqGraph(graph) {\n return deindexGraph(indexGraph(graph));\n}\nexports.uniqGraph = uniqGraph;\n/**\n * Find all blank nodes in the given graph.\n * @param {Quad[]} graph An array of quads.\n * @return {BlankNode[]} A list of (unique) blank nodes.\n */\nfunction getGraphBlankNodes(graph) {\n return rdf_terms_1.uniqTerms(graph.map((quad) => rdf_terms_1.getBlankNodes(rdf_terms_1.getTermsNested(quad)))\n .reduce((acc, val) => acc.concat(val), []));\n}\nexports.getGraphBlankNodes = getGraphBlankNodes;\n/**\n * Create term hashes for the given set of quads and blank node terms.\n *\n * @param {Quad[]} quads A set of quads.\n * @param {Term[]} terms Blank node terms.\n * @param {ITermHash} groundedHashes Grounded term hashes that are used to create more specific signatures\n * of other terms, because they are based on non-blank nodes and grounded blank nodes.\n * @return {[ITermHash]} A tuple of grounded and ungrounded hashes.\n */\nfunction hashTerms(quads, terms, groundedHashes) {\n const hashes = Object.assign({}, groundedHashes);\n const ungroundedHashes = {};\n let hashNeeded = true;\n // Iteratively mark nodes as grounded.\n // If a node is marked as grounded, then the next iteration can lead to new grounded states\n while (hashNeeded) {\n const initialGroundedNodesCount = Object.keys(hashes).length;\n for (const term of terms) {\n const termString = rdf_string_1.termToString(term);\n if (!hashes[termString]) {\n const [grounded, hash] = hashTerm(term, quads, hashes);\n if (grounded) {\n hashes[termString] = hash;\n }\n ungroundedHashes[termString] = hash;\n }\n }\n // All terms that have a unique hash at this point can be marked as grounded\n const uniques = {};\n for (const termKey in ungroundedHashes) {\n const hash = ungroundedHashes[termKey];\n if (uniques[hash] === undefined) {\n uniques[hash] = termKey;\n }\n else {\n uniques[hash] = false;\n }\n }\n for (const hash in uniques) {\n const value = uniques[hash];\n if (value) {\n hashes[value] = hash;\n }\n }\n // Check if the loop needs to terminate\n hashNeeded = initialGroundedNodesCount !== Object.keys(hashes).length;\n }\n return [hashes, ungroundedHashes];\n}\nexports.hashTerms = hashTerms;\n/**\n * Generate a hash for the given term based on the signature of the quads it appears in.\n *\n * Signatures are made up of grounded terms in quads that are associated with a term,\n * i.e., everything except for ungrounded blank nodes.\n * The hash is created by hashing a sorted list of each quad's signature,\n * where each quad signature is a concatenation of the signature of all grounded terms.\n *\n * Terms are considered grounded if they are a member in the given hash AND if they are not the given term.\n *\n * @param {Term} term The term to get the hash around.\n * @param {Quad[]} quads The quads to include in the hashing.\n * @param {ITermHash} hashes A grounded term hash object.\n * @return {[boolean , string]} A tuple indicating if the given term is grounded in all the given quads, and the hash.\n */\nfunction hashTerm(term, quads, hashes) {\n const quadSignatures = [];\n let grounded = true;\n for (const quad of quads) {\n const terms = rdf_terms_1.getTermsNested(quad);\n if (terms.some((quadTerm) => quadTerm.equals(term))) {\n quadSignatures.push(quadToSignature(quad, hashes, term));\n for (const quadTerm of terms) {\n if (!isTermGrounded(quadTerm, hashes) && !quadTerm.equals(term)) {\n grounded = false;\n }\n }\n }\n }\n const hash = sha1hex(quadSignatures.sort().join(''));\n return [grounded, hash];\n}\nexports.hashTerm = hashTerm;\n/**\n * Create a hash using sha1 as a hex digest.\n * @param {string | Buffer | NodeJS.TypedArray | DataView} data Something to hash.\n * @return {string} A hash string.\n */\nfunction sha1hex(data) {\n return hash_js_1.sha1().update(data).digest('hex');\n}\nexports.sha1hex = sha1hex;\n/**\n * Convert the given quad to a string signature so that it can be used in the hash structure.\n * @param {Quad} quad A quad.\n * @param {ITermHash} hashes A grounded term hash object.\n * @param {Term} term A target term to compare with.\n * @return {string} A string signature.\n */\nfunction quadToSignature(quad, hashes, term) {\n return rdf_terms_1.getTerms(quad).map((quadTerm) => termToSignature(quadTerm, hashes, term)).join('|');\n}\nexports.quadToSignature = quadToSignature;\n/**\n * Convert the given term to a string signature so that it can be used in the hash structure.\n * @param {Term} term A term.\n * @param {ITermHash} hashes A grounded term hash object.\n * @param {Term} target A target term to compare with.\n * @return {string} A string signature.\n */\nfunction termToSignature(term, hashes, target) {\n if (term.equals(target)) {\n return '@self';\n }\n else if (term.termType === 'BlankNode') {\n return hashes[rdf_string_1.termToString(term)] || '@blank';\n }\n else if (term.termType === 'Quad') {\n return `<${quadToSignature(term, hashes, target)}>`;\n }\n else {\n return rdf_string_1.termToString(term);\n }\n}\nexports.termToSignature = termToSignature;\n/**\n * Check if a term is grounded.\n *\n * A term is grounded if it is not a blank node\n * or if it included in the given hash of grounded nodes.\n *\n * @param {Term} term A term.\n * @param {ITermHash} hashes A grounded term hash object.\n * @return {boolean} If the given term is grounded.\n */\nfunction isTermGrounded(term, hashes) {\n return (term.termType !== 'BlankNode'\n && !(term.termType === 'Quad' && rdf_terms_1.getTermsNested(term).some(subTerm => !isTermGrounded(subTerm, hashes)))) || !!hashes[rdf_string_1.termToString(term)];\n}\nexports.isTermGrounded = isTermGrounded;\n//# sourceMappingURL=RdfIsomorphic.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSupportedJavaScriptPrimitives = exports.getSupportedRdfDatatypes = exports.getTermRaw = exports.toRdf = exports.fromRdf = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst handler_1 = require(\"./lib/handler\");\nconst Translator_1 = require(\"./lib/Translator\");\n__exportStar(require(\"./lib/handler\"), exports);\n__exportStar(require(\"./lib/ITypeHandler\"), exports);\n__exportStar(require(\"./lib/Translator\"), exports);\nconst DF = new rdf_data_factory_1.DataFactory();\n// Construct translator with built-in handlers\nconst translator = new Translator_1.Translator();\ntranslator.registerHandler(new handler_1.TypeHandlerString(), handler_1.TypeHandlerString.TYPES.map(t => DF.namedNode(t)), ['string']);\ntranslator.registerHandler(new handler_1.TypeHandlerBoolean(), [handler_1.TypeHandlerBoolean.TYPE].map(t => DF.namedNode(t)), ['boolean']);\ntranslator.registerHandler(new handler_1.TypeHandlerNumberDouble(), handler_1.TypeHandlerNumberDouble.TYPES.map(t => DF.namedNode(t)), ['number']);\ntranslator.registerHandler(new handler_1.TypeHandlerNumberInteger(), handler_1.TypeHandlerNumberInteger.TYPES.map(t => DF.namedNode(t)), ['number']);\ntranslator.registerHandler(new handler_1.TypeHandlerDate(), handler_1.TypeHandlerDate.TYPES.map(t => DF.namedNode(t)), ['object']);\n/**\n * Convert the given RDF literal to an JavaScript primitive.\n * @param {Literal} literal An RDF literal value.\n * @param {boolean} validate If the literal value should be validated against the datatype.\n * @return {any} A JavaScript primitive value.\n */\nfunction fromRdf(literal, validate) {\n return translator.fromRdf(literal, validate);\n}\nexports.fromRdf = fromRdf;\n/**\n * Convert the given JavaScript primitive to an RDF literal.\n * @param value A JavaScript primitive value.\n * @param options Options for RDF conversion. May also be a data factory.\n * @return {Literal} An RDF literal value.\n */\nfunction toRdf(value, options) {\n // Backwards-compatibility to accept data factory as option arg.\n if (options && 'namedNode' in options) {\n options = { dataFactory: options };\n }\n // Set default data factory\n options = options || {};\n if (options && !options.dataFactory) {\n options.dataFactory = DF;\n }\n return translator.toRdf(value, options);\n}\nexports.toRdf = toRdf;\n/**\n * Get the raw value of the given term.\n * If it is a literal, {@link fromRdf} will be called.\n * Otherwise {@link .value} will be returned.\n * @param {Term} term Any RDF term.\n * @param {boolean} validate If the literal value should be validated against the datatype.\n * @return {any} A JavaScript primitive value.\n */\nfunction getTermRaw(term, validate) {\n if (term.termType === 'Literal') {\n return fromRdf(term, validate);\n }\n return term.value;\n}\nexports.getTermRaw = getTermRaw;\n/**\n * @return {NamedNode[]} An array of all supported RDF datatypes.\n */\nfunction getSupportedRdfDatatypes() {\n return translator.getSupportedRdfDatatypes();\n}\nexports.getSupportedRdfDatatypes = getSupportedRdfDatatypes;\n/**\n * @return {string[]} An array of all supported JavaScript types.\n */\nfunction getSupportedJavaScriptPrimitives() {\n return translator.getSupportedJavaScriptPrimitives();\n}\nexports.getSupportedJavaScriptPrimitives = getSupportedJavaScriptPrimitives;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=ITypeHandler.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Translator = void 0;\n/**\n * Translates between an RDF literal and a JavaScript primitive.\n */\nclass Translator {\n constructor() {\n this.supportedRdfDatatypes = [];\n this.fromRdfHandlers = {};\n this.toRdfHandlers = {};\n }\n static incorrectRdfDataType(literal) {\n throw new Error(`Invalid RDF ${literal.datatype.value} value: '${literal.value}'`);\n }\n registerHandler(handler, rdfDatatypes, javaScriptDataTypes) {\n for (const rdfDatatype of rdfDatatypes) {\n this.supportedRdfDatatypes.push(rdfDatatype);\n this.fromRdfHandlers[rdfDatatype.value] = handler;\n }\n for (const javaScriptDataType of javaScriptDataTypes) {\n let existingToRdfHandlers = this.toRdfHandlers[javaScriptDataType];\n if (!existingToRdfHandlers) {\n this.toRdfHandlers[javaScriptDataType] = existingToRdfHandlers = [];\n }\n existingToRdfHandlers.push(handler);\n }\n }\n fromRdf(literal, validate) {\n const handler = this.fromRdfHandlers[literal.datatype.value];\n if (handler) {\n return handler.fromRdf(literal, validate);\n }\n else {\n return literal.value;\n }\n }\n toRdf(value, options) {\n const handlers = this.toRdfHandlers[typeof value];\n if (handlers) {\n for (const handler of handlers) {\n const ret = handler.toRdf(value, options);\n if (ret) {\n return ret;\n }\n }\n }\n throw new Error(`Invalid JavaScript value: '${value}'`);\n }\n /**\n * @return {NamedNode[]} An array of all supported RDF datatypes.\n */\n getSupportedRdfDatatypes() {\n return this.supportedRdfDatatypes;\n }\n /**\n * @return {string[]} An array of all supported JavaScript types.\n */\n getSupportedJavaScriptPrimitives() {\n return Object.keys(this.toRdfHandlers);\n }\n}\nexports.Translator = Translator;\n//# sourceMappingURL=Translator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TypeHandlerBoolean = void 0;\nconst Translator_1 = require(\"../Translator\");\n/**\n * Translates booleans.\n */\nclass TypeHandlerBoolean {\n fromRdf(literal, validate) {\n switch (literal.value) {\n case 'true':\n return true;\n case 'false':\n return false;\n case '1':\n return true;\n case '0':\n return false;\n }\n if (validate) {\n Translator_1.Translator.incorrectRdfDataType(literal);\n }\n return false;\n }\n toRdf(value, { datatype, dataFactory }) {\n return dataFactory.literal(value ? 'true' : 'false', datatype || dataFactory.namedNode(TypeHandlerBoolean.TYPE));\n }\n}\nTypeHandlerBoolean.TYPE = 'http://www.w3.org/2001/XMLSchema#boolean';\nexports.TypeHandlerBoolean = TypeHandlerBoolean;\n//# sourceMappingURL=TypeHandlerBoolean.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TypeHandlerDate = void 0;\nconst Translator_1 = require(\"../Translator\");\n/**\n * Translates dates.\n */\nclass TypeHandlerDate {\n fromRdf(literal, validate) {\n if (validate && !literal.value.match(TypeHandlerDate\n .VALIDATORS[literal.datatype.value.substr(33, literal.datatype.value.length)])) {\n Translator_1.Translator.incorrectRdfDataType(literal);\n }\n switch (literal.datatype.value) {\n case 'http://www.w3.org/2001/XMLSchema#gDay':\n return new Date(0, 0, parseInt(literal.value, 10));\n case 'http://www.w3.org/2001/XMLSchema#gMonthDay':\n const partsMonthDay = literal.value.split('-');\n return new Date(0, parseInt(partsMonthDay[0], 10) - 1, parseInt(partsMonthDay[1], 10));\n case 'http://www.w3.org/2001/XMLSchema#gYear':\n return new Date(literal.value + '-01-01');\n case 'http://www.w3.org/2001/XMLSchema#gYearMonth':\n return new Date(literal.value + '-01');\n default:\n return new Date(literal.value);\n }\n }\n toRdf(value, { datatype, dataFactory }) {\n datatype = datatype || dataFactory.namedNode(TypeHandlerDate.TYPES[0]);\n // Assume date values\n if (!(value instanceof Date)) {\n return null;\n }\n const date = value;\n let valueString;\n switch (datatype.value) {\n case 'http://www.w3.org/2001/XMLSchema#gDay':\n valueString = String(date.getUTCDate());\n break;\n case 'http://www.w3.org/2001/XMLSchema#gMonthDay':\n valueString = (date.getUTCMonth() + 1) + '-' + date.getUTCDate();\n break;\n case 'http://www.w3.org/2001/XMLSchema#gYear':\n valueString = String(date.getUTCFullYear());\n break;\n case 'http://www.w3.org/2001/XMLSchema#gYearMonth':\n valueString = date.getUTCFullYear() + '-' + (date.getUTCMonth() + 1);\n break;\n case 'http://www.w3.org/2001/XMLSchema#date':\n valueString = date.toISOString().replace(/T.*$/, '');\n break;\n default:\n valueString = date.toISOString();\n }\n return dataFactory.literal(valueString, datatype);\n }\n}\nTypeHandlerDate.TYPES = [\n 'http://www.w3.org/2001/XMLSchema#dateTime',\n 'http://www.w3.org/2001/XMLSchema#date',\n 'http://www.w3.org/2001/XMLSchema#gDay',\n 'http://www.w3.org/2001/XMLSchema#gMonthDay',\n 'http://www.w3.org/2001/XMLSchema#gYear',\n 'http://www.w3.org/2001/XMLSchema#gYearMonth',\n];\nTypeHandlerDate.VALIDATORS = {\n date: /^[0-9]+-[0-9][0-9]-[0-9][0-9]Z?$/,\n dateTime: /^[0-9]+-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9](\\.[0-9][0-9][0-9])?((Z?)|([\\+-][0-9][0-9]:[0-9][0-9]))$/,\n gDay: /^[0-9]+$/,\n gMonthDay: /^[0-9]+-[0-9][0-9]$/,\n gYear: /^[0-9]+$/,\n gYearMonth: /^[0-9]+-[0-9][0-9]$/,\n};\nexports.TypeHandlerDate = TypeHandlerDate;\n//# sourceMappingURL=TypeHandlerDate.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TypeHandlerNumberDouble = void 0;\nconst Translator_1 = require(\"../Translator\");\n/**\n * Translates double numbers.\n */\nclass TypeHandlerNumberDouble {\n fromRdf(literal, validate) {\n const parsed = parseFloat(literal.value);\n if (validate) {\n if (isNaN(parsed)) {\n Translator_1.Translator.incorrectRdfDataType(literal);\n }\n // TODO: validate more\n }\n return parsed;\n }\n toRdf(value, { datatype, dataFactory }) {\n datatype = datatype || dataFactory.namedNode(TypeHandlerNumberDouble.TYPES[0]);\n if (isNaN(value)) {\n return dataFactory.literal('NaN', datatype);\n }\n if (!isFinite(value)) {\n return dataFactory.literal(value > 0 ? 'INF' : '-INF', datatype);\n }\n if (value % 1 === 0) {\n return null;\n }\n return dataFactory.literal(value.toExponential(15).replace(/(\\d)0*e\\+?/, '$1E'), datatype);\n }\n}\nTypeHandlerNumberDouble.TYPES = [\n 'http://www.w3.org/2001/XMLSchema#double',\n 'http://www.w3.org/2001/XMLSchema#decimal',\n 'http://www.w3.org/2001/XMLSchema#float',\n];\nexports.TypeHandlerNumberDouble = TypeHandlerNumberDouble;\n//# sourceMappingURL=TypeHandlerNumberDouble.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TypeHandlerNumberInteger = void 0;\nconst Translator_1 = require(\"../Translator\");\n/**\n * Translates integer numbers.\n */\nclass TypeHandlerNumberInteger {\n fromRdf(literal, validate) {\n const parsed = parseInt(literal.value, 10);\n if (validate) {\n if (isNaN(parsed) || literal.value.indexOf('.') >= 0) {\n Translator_1.Translator.incorrectRdfDataType(literal);\n }\n // TODO: validate more\n }\n return parsed;\n }\n toRdf(value, { datatype, dataFactory }) {\n return dataFactory.literal(String(value), datatype\n || (value <= TypeHandlerNumberInteger.MAX_INT && value >= TypeHandlerNumberInteger.MIN_INT\n ? dataFactory.namedNode(TypeHandlerNumberInteger.TYPES[0])\n : dataFactory.namedNode(TypeHandlerNumberInteger.TYPES[1])));\n }\n}\nTypeHandlerNumberInteger.TYPES = [\n 'http://www.w3.org/2001/XMLSchema#integer',\n 'http://www.w3.org/2001/XMLSchema#long',\n 'http://www.w3.org/2001/XMLSchema#int',\n 'http://www.w3.org/2001/XMLSchema#byte',\n 'http://www.w3.org/2001/XMLSchema#short',\n 'http://www.w3.org/2001/XMLSchema#negativeInteger',\n 'http://www.w3.org/2001/XMLSchema#nonNegativeInteger',\n 'http://www.w3.org/2001/XMLSchema#nonPositiveInteger',\n 'http://www.w3.org/2001/XMLSchema#positiveInteger',\n 'http://www.w3.org/2001/XMLSchema#unsignedByte',\n 'http://www.w3.org/2001/XMLSchema#unsignedInt',\n 'http://www.w3.org/2001/XMLSchema#unsignedLong',\n 'http://www.w3.org/2001/XMLSchema#unsignedShort',\n];\nTypeHandlerNumberInteger.MAX_INT = 2147483647;\nTypeHandlerNumberInteger.MIN_INT = -2147483648;\nexports.TypeHandlerNumberInteger = TypeHandlerNumberInteger;\n//# sourceMappingURL=TypeHandlerNumberInteger.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TypeHandlerString = void 0;\n/**\n * Translates strings.\n */\nclass TypeHandlerString {\n fromRdf(literal) {\n return literal.value;\n }\n toRdf(value, { datatype, dataFactory }) {\n return dataFactory.literal(value, datatype);\n }\n}\nTypeHandlerString.TYPES = [\n 'http://www.w3.org/2001/XMLSchema#string',\n 'http://www.w3.org/2001/XMLSchema#normalizedString',\n 'http://www.w3.org/2001/XMLSchema#anyURI',\n 'http://www.w3.org/2001/XMLSchema#base64Binary',\n 'http://www.w3.org/2001/XMLSchema#language',\n 'http://www.w3.org/2001/XMLSchema#Name',\n 'http://www.w3.org/2001/XMLSchema#NCName',\n 'http://www.w3.org/2001/XMLSchema#NMTOKEN',\n 'http://www.w3.org/2001/XMLSchema#token',\n 'http://www.w3.org/2001/XMLSchema#hexBinary',\n 'http://www.w3.org/1999/02/22-rdf-syntax-ns#langString',\n 'http://www.w3.org/2001/XMLSchema#time',\n 'http://www.w3.org/2001/XMLSchema#duration',\n];\nexports.TypeHandlerString = TypeHandlerString;\n//# sourceMappingURL=TypeHandlerString.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./TypeHandlerBoolean\"), exports);\n__exportStar(require(\"./TypeHandlerDate\"), exports);\n__exportStar(require(\"./TypeHandlerNumberDouble\"), exports);\n__exportStar(require(\"./TypeHandlerNumberInteger\"), exports);\n__exportStar(require(\"./TypeHandlerString\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.storeStream = void 0;\nconst rdf_stores_1 = require(\"rdf-stores\");\n/**\n * Import all quads in the given stream into a new RDF store.\n *\n * The whole stream will be consumed for this,\n * and the promise will resolve once the stream's end event is emitted.\n *\n * @param {Stream} stream An RDF stream containing the quads to import into the store.\n * @return {Promise>} A promise resolving to an RDF store.\n */\nfunction storeStream(stream) {\n const store = rdf_stores_1.RdfStore.createDefault();\n return new Promise((resolve, reject) => store.import(stream)\n .on('error', reject)\n .once('end', () => resolve(store)));\n}\nexports.storeStream = storeStream;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/dataset/DatasetCoreWrapper\"), exports);\n__exportStar(require(\"./lib/dictionary/ITermDictionary\"), exports);\n__exportStar(require(\"./lib/dictionary/TermDictionaryNumberMap\"), exports);\n__exportStar(require(\"./lib/dictionary/TermDictionaryNumberRecord\"), exports);\n__exportStar(require(\"./lib/dictionary/TermDictionaryNumberRecordFullTerms\"), exports);\n__exportStar(require(\"./lib/dictionary/TermDictionaryQuoted\"), exports);\n__exportStar(require(\"./lib/dictionary/TermDictionaryQuotedIndexed\"), exports);\n__exportStar(require(\"./lib/dictionary/TermDictionaryQuotedReferential\"), exports);\n__exportStar(require(\"./lib/dictionary/TermDictionarySymbol\"), exports);\n__exportStar(require(\"./lib/index/IRdfStoreIndex\"), exports);\n__exportStar(require(\"./lib/index/RdfStoreIndexNestedMap\"), exports);\n__exportStar(require(\"./lib/index/RdfStoreIndexNestedMapQuoted\"), exports);\n__exportStar(require(\"./lib/index/RdfStoreIndexNestedMapRecursive\"), exports);\n__exportStar(require(\"./lib/index/RdfStoreIndexNestedMapRecursiveQuoted\"), exports);\n__exportStar(require(\"./lib/index/RdfStoreIndexNestedRecord\"), exports);\n__exportStar(require(\"./lib/index/RdfStoreIndexNestedRecordQuoted\"), exports);\n__exportStar(require(\"./lib/IRdfStoreOptions\"), exports);\n__exportStar(require(\"./lib/OrderUtils\"), exports);\n__exportStar(require(\"./lib/PatternTerm\"), exports);\n__exportStar(require(\"./lib/RdfStore\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IRdfStoreOptions.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.arePatternsQuoted = exports.quadHasVariables = exports.quadToPattern = exports.encodeOptionalTerms = exports.orderQuadComponents = exports.getComponentOrderScore = exports.getBestIndex = exports.QUAD_TERM_NAMES_INVERSE = void 0;\nconst rdf_terms_1 = require(\"rdf-terms\");\nexports.QUAD_TERM_NAMES_INVERSE = Object.fromEntries(rdf_terms_1.QUAD_TERM_NAMES.map((value, key) => [value, key]));\n/**\n * Determine the best suitable order's index among the given orders for the given quad pattern.\n * @param componentOrders Possible orders of quad components.\n * @param quadPattern A quad pattern.\n */\nfunction getBestIndex(componentOrders, quadPattern) {\n if (componentOrders.length === 1 || quadPattern.every(term => term !== undefined)) {\n return 0;\n }\n // Determine the quad component names for which we require a defined lookup\n const definedQuadComponentNames = [];\n for (let quadComponentId = 0; quadComponentId < rdf_terms_1.QUAD_TERM_NAMES.length; quadComponentId++) {\n if (quadPattern[quadComponentId]) {\n definedQuadComponentNames.push(rdf_terms_1.QUAD_TERM_NAMES[quadComponentId]);\n }\n }\n // Score indexes by how well they match to the index\n const scoredIndexes = componentOrders.map((componentOrder, index) => {\n const score = getComponentOrderScore(componentOrder, definedQuadComponentNames);\n return { score, index };\n });\n // Sort the indexes, and pick the first one\n return scoredIndexes.sort((scoredLeft, scoredRight) => scoredRight.score - scoredLeft.score)[0].index;\n}\nexports.getBestIndex = getBestIndex;\n/**\n * Determine the score of the given partial component order in the given component order.\n * @param componentOrder A quad component order.\n * @param partialComponentOrder A partial quad component order that originates from a quad pattern.\n */\nfunction getComponentOrderScore(componentOrder, partialComponentOrder) {\n return componentOrder\n .map((order, i) => partialComponentOrder.includes(order) ? componentOrder.length - i : 0)\n .reduce((acc, add) => acc + add, 0);\n}\nexports.getComponentOrderScore = getComponentOrderScore;\n/**\n * Order a quad pattern's terms based on the given component order.\n * @param desiredComponentOrder The desired order of components.\n * @param quadPattern A quad pattern.\n */\nfunction orderQuadComponents(desiredComponentOrder, quadPattern) {\n return desiredComponentOrder.map(desiredComponent => {\n const desiredComponentIndex = exports.QUAD_TERM_NAMES_INVERSE[desiredComponent];\n return quadPattern[desiredComponentIndex];\n });\n}\nexports.orderQuadComponents = orderQuadComponents;\n/**\n * Encode the given array of quad terms.\n * @param terms Non-encoded quad terms.\n * @param dictionary A dictionary\n * @return array An array of encoded terms.\n * The array will be undefined if at least one of the patterns does not occur within the dictionary.\n */\nfunction encodeOptionalTerms(terms, dictionary) {\n const encodedTerms = terms.map(term => {\n if (term) {\n if (term.termType === 'Quad' && quadHasVariables(term)) {\n return;\n }\n const encodedTerm = dictionary.encodeOptional(term);\n if (encodedTerm === undefined) {\n return 'none';\n }\n return encodedTerm;\n }\n return term;\n });\n if (encodedTerms.includes('none')) {\n return undefined;\n }\n return encodedTerms;\n}\nexports.encodeOptionalTerms = encodeOptionalTerms;\n/**\n * Convert a quad patter to a `QuadPatternTerms` type.\n * @param subject The subject.\n * @param predicate The predicate.\n * @param object The object.\n * @param graph The graph.\n * @param quotedPatterns If the index supports quoted triple filtering.\n * @return Tuple A tuple of QuadPatternTerms\n * and a boolean indicating if post-filtering will be needed on quoted triples.\n * This boolean can only be true if `quotedPatterns` is false, and a quoted triple pattern was present.\n */\nfunction quadToPattern(subject, predicate, object, graph, quotedPatterns) {\n let requireQuotedTripleFiltering = false;\n const quadPatternTerms = [subject || undefined, predicate || undefined, object || undefined, graph || undefined]\n .map(term => {\n if (term) {\n if (term.termType === 'Variable') {\n return;\n }\n if (term.termType === 'Quad') {\n if (quotedPatterns) {\n return term;\n }\n requireQuotedTripleFiltering = true;\n return;\n }\n }\n return term;\n });\n return [quadPatternTerms, requireQuotedTripleFiltering];\n}\nexports.quadToPattern = quadToPattern;\n/**\n * Check if the given quad contains variables, even in deeply nested quoted triples.\n * @param currentTerm The quad pattern term.\n */\nfunction quadHasVariables(currentTerm) {\n for (const component of rdf_terms_1.QUAD_TERM_NAMES) {\n const subTerm = currentTerm[component];\n if (subTerm.termType === 'Variable' || (subTerm.termType === 'Quad' && quadHasVariables(subTerm))) {\n return true;\n }\n }\n return false;\n}\nexports.quadHasVariables = quadHasVariables;\n/**\n * Create a boolean array indicating which terms are quoted triple patterns.\n * @param terms An array of terms.\n */\nfunction arePatternsQuoted(terms) {\n return terms.map(term => (term === null || term === void 0 ? void 0 : term.termType) === 'Quad' && quadHasVariables(term));\n}\nexports.arePatternsQuoted = arePatternsQuoted;\n//# sourceMappingURL=OrderUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=PatternTerm.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RdfStore = void 0;\nconst asynciterator_1 = require(\"asynciterator\");\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst rdf_terms_1 = require(\"rdf-terms\");\nconst DatasetCoreWrapper_1 = require(\"./dataset/DatasetCoreWrapper\");\nconst TermDictionaryNumberRecordFullTerms_1 = require(\"./dictionary/TermDictionaryNumberRecordFullTerms\");\nconst TermDictionaryQuotedIndexed_1 = require(\"./dictionary/TermDictionaryQuotedIndexed\");\nconst RdfStoreIndexNestedMapQuoted_1 = require(\"./index/RdfStoreIndexNestedMapQuoted\");\nconst OrderUtils_1 = require(\"./OrderUtils\");\n/**\n * An RDF store allows quads to be stored and fetched, based on one or more customizable indexes.\n */\nclass RdfStore {\n constructor(options) {\n this.features = { quotedTripleFiltering: true };\n this._size = 0;\n this.options = options;\n this.dataFactory = options.dataFactory;\n this.dictionary = options.dictionary;\n this.indexesWrapped = RdfStore.constructIndexesWrapped(options);\n this.indexesWrappedComponentOrders = this.indexesWrapped.map(indexThis => indexThis.componentOrder);\n }\n /**\n * Create an RDF store with default settings.\n * Concretely, this store stores triples in GSPO, GPOS, and GOSP order,\n * and makes use of in-memory number dictionary encoding.\n */\n static createDefault() {\n return new RdfStore({\n indexCombinations: RdfStore.DEFAULT_INDEX_COMBINATIONS,\n indexConstructor: subOptions => new RdfStoreIndexNestedMapQuoted_1.RdfStoreIndexNestedMapQuoted(subOptions),\n dictionary: new TermDictionaryQuotedIndexed_1.TermDictionaryQuotedIndexed(new TermDictionaryNumberRecordFullTerms_1.TermDictionaryNumberRecordFullTerms()),\n dataFactory: new rdf_data_factory_1.DataFactory(),\n });\n }\n /**\n * Internal helper to create index objects.\n * @param options The RDF store options object.\n */\n static constructIndexesWrapped(options) {\n const indexes = [];\n if (options.indexCombinations.length === 0) {\n throw new Error('At least one index combination is required');\n }\n for (const componentOrder of options.indexCombinations) {\n if (!RdfStore.isCombinationValid(componentOrder)) {\n throw new Error(`Invalid index combination: ${componentOrder}`);\n }\n indexes.push({\n index: options.indexConstructor(options),\n componentOrder,\n componentOrderInverse: Object.fromEntries(componentOrder.map((value, key) => [value, key])),\n });\n }\n return indexes;\n }\n /**\n * Check if a given quad term order is valid.\n * @param combination A quad term order.\n */\n static isCombinationValid(combination) {\n for (const quadTermName of rdf_terms_1.QUAD_TERM_NAMES) {\n if (!combination.includes(quadTermName)) {\n return false;\n }\n }\n return combination.length === 4;\n }\n /**\n * The number of quads in this store.\n */\n get size() {\n return this._size;\n }\n /**\n * Add a quad to the store.\n * @param quad An RDF quad.\n * @return boolean If the quad was not yet present in the index.\n */\n addQuad(quad) {\n const quadEncoded = [\n this.dictionary.encode(quad.subject),\n this.dictionary.encode(quad.predicate),\n this.dictionary.encode(quad.object),\n this.dictionary.encode(quad.graph),\n ];\n let newQuad = false;\n for (const indexWrapped of this.indexesWrapped) {\n // Before sending the quad to the index, make sure its components are ordered corresponding to the index's order.\n newQuad = indexWrapped.index\n .set((0, OrderUtils_1.orderQuadComponents)(indexWrapped.componentOrder, quadEncoded), true);\n }\n if (newQuad) {\n this._size++;\n return true;\n }\n return false;\n }\n /**\n * Remove a quad from the store.\n * @param quad An RDF quad.\n * @return boolean If the quad was present in the index.\n */\n removeQuad(quad) {\n const quadEncoded = [\n this.dictionary.encodeOptional(quad.subject),\n this.dictionary.encodeOptional(quad.predicate),\n this.dictionary.encodeOptional(quad.object),\n this.dictionary.encodeOptional(quad.graph),\n ];\n // We can quickly return false if the quad is not present in the dictionary\n // eslint-disable-next-line unicorn/no-useless-undefined\n if (quadEncoded.includes(undefined)) {\n return false;\n }\n let wasPresent = false;\n for (const indexWrapped of this.indexesWrapped) {\n // Before sending the quad to the index, make sure its components are ordered corresponding to the index's order.\n wasPresent = indexWrapped.index\n .remove((0, OrderUtils_1.orderQuadComponents)(indexWrapped.componentOrder, quadEncoded));\n if (!wasPresent) {\n break;\n }\n }\n if (wasPresent) {\n this._size--;\n return true;\n }\n return false;\n }\n /**\n * Removes all streamed quads.\n * @param stream A stream of quads\n */\n remove(stream) {\n stream.on('data', quad => this.removeQuad(quad));\n return stream;\n }\n /**\n * All quads matching the pattern will be removed.\n * @param subject The optional subject.\n * @param predicate The optional predicate.\n * @param object The optional object.\n * @param graph The optional graph.\n */\n removeMatches(subject, predicate, object, graph) {\n return this.remove(this.match(subject, predicate, object, graph));\n }\n /**\n * Deletes the given named graph.\n * @param graph The graph term or string to match.\n */\n deleteGraph(graph) {\n if (typeof graph === 'string') {\n graph = this.dataFactory.namedNode(graph);\n }\n return this.removeMatches(undefined, undefined, undefined, graph);\n }\n /**\n * Import the given stream of quads into the store.\n * @param stream A stream of RDF quads.\n */\n import(stream) {\n stream.on('data', (quad) => this.addQuad(quad));\n return stream;\n }\n /**\n * Returns a generator producing all quads matching the pattern.\n * @param subject The optional subject.\n * @param predicate The optional predicate.\n * @param object The optional object.\n * @param graph The optional graph.\n */\n *readQuads(subject, predicate, object, graph) {\n // Check if our dictionary and our indexes have quoted pattern support\n const indexesSupportQuotedPatterns = Boolean(this.dictionary.features.quotedTriples) &&\n Object.values(this.indexesWrapped).every(wrapped => wrapped.index.features.quotedTripleFiltering);\n // Construct a quad pattern array\n const [quadComponents, requireQuotedTripleFiltering] = (0, OrderUtils_1.quadToPattern)(subject, predicate, object, graph, indexesSupportQuotedPatterns);\n // Determine the best index for this pattern\n const indexWrapped = this.indexesWrapped[(0, OrderUtils_1.getBestIndex)(this.indexesWrappedComponentOrders, quadComponents)];\n // Re-order the quad pattern based on this best index's component order\n const quadComponentsOrdered = (0, OrderUtils_1.orderQuadComponents)(indexWrapped.componentOrder, quadComponents);\n // Call the best index's find method.\n // eslint-disable-next-line unicorn/no-array-callback-reference\n for (const decomposedQuad of indexWrapped.index.find(quadComponentsOrdered)) {\n // De-order the resulting quad components into the normal SPOG order for quad creation.\n const quad = this.dataFactory.quad(decomposedQuad[indexWrapped.componentOrderInverse.subject], decomposedQuad[indexWrapped.componentOrderInverse.predicate], decomposedQuad[indexWrapped.componentOrderInverse.object], decomposedQuad[indexWrapped.componentOrderInverse.graph]);\n if (requireQuotedTripleFiltering) {\n if ((0, rdf_terms_1.matchPattern)(quad, subject, predicate, object, graph)) {\n yield quad;\n }\n }\n else {\n yield quad;\n }\n }\n }\n /**\n * Returns an array containing all quads matching the pattern.\n * @param subject The optional subject.\n * @param predicate The optional predicate.\n * @param object The optional object.\n * @param graph The optional graph.\n */\n getQuads(subject, predicate, object, graph) {\n return [...this.readQuads(subject, predicate, object, graph)];\n }\n /**\n * Returns a stream that produces all quads matching the pattern.\n * @param subject The optional subject.\n * @param predicate The optional predicate.\n * @param object The optional object.\n * @param graph The optional graph.\n */\n match(subject, predicate, object, graph) {\n return (0, asynciterator_1.wrap)(this.readQuads(subject, predicate, object, graph));\n }\n /**\n * Returns the exact cardinality of the quads matching the pattern.\n * @param subject The optional subject.\n * @param predicate The optional predicate.\n * @param object The optional object.\n * @param graph The optional graph.\n */\n countQuads(subject, predicate, object, graph) {\n // Check if our dictionary and our indexes have quoted pattern support\n const indexesSupportQuotedPatterns = Boolean(this.dictionary.features.quotedTriples) &&\n Object.values(this.indexesWrapped).every(wrapped => wrapped.index.features.quotedTripleFiltering);\n // Construct a quad pattern array\n const [quadComponents] = (0, OrderUtils_1.quadToPattern)(subject, predicate, object, graph, indexesSupportQuotedPatterns);\n // Optimize all-variables pattern\n if (quadComponents.every(quadComponent => quadComponent === undefined)) {\n return this.size;\n }\n // Determine the best index for this pattern\n const indexWrapped = this.indexesWrapped[(0, OrderUtils_1.getBestIndex)(this.indexesWrappedComponentOrders, quadComponents)];\n // Re-order the quad pattern based on this best index's component order\n const quadComponentsOrdered = (0, OrderUtils_1.orderQuadComponents)(indexWrapped.componentOrder, quadComponents);\n // Call the best index's count method.\n return indexWrapped.index.count(quadComponentsOrdered);\n }\n /**\n * Wrap this store inside a DatasetCore interface.\n * Any mutations in either this store or the wrapper will propagate to each other.\n */\n asDataset() {\n return new DatasetCoreWrapper_1.DatasetCoreWrapper(this);\n }\n}\nRdfStore.DEFAULT_INDEX_COMBINATIONS = [\n ['graph', 'subject', 'predicate', 'object'],\n ['graph', 'predicate', 'object', 'subject'],\n ['graph', 'object', 'subject', 'predicate'],\n];\nexports.RdfStore = RdfStore;\n//# sourceMappingURL=RdfStore.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DatasetCoreWrapper = void 0;\nconst RdfStore_1 = require(\"../RdfStore\");\n/**\n * A DatasetCoreWrapper exposes an RdfStore inside an RDF.DatasetCore.\n */\nclass DatasetCoreWrapper {\n constructor(store) {\n this.store = store;\n }\n get size() {\n return this.store.size;\n }\n add(quad) {\n this.store.addQuad(quad);\n return this;\n }\n delete(quad) {\n this.store.removeQuad(quad);\n return this;\n }\n has(quad) {\n // eslint-disable-next-line no-unreachable-loop\n for (const result of this.store.readQuads(quad.subject, quad.predicate, quad.object, quad.graph)) {\n return true;\n }\n return false;\n }\n match(subject, predicate, object, graph) {\n const newStore = new RdfStore_1.RdfStore(this.store.options);\n for (const quad of this.store.readQuads(subject, predicate, object, graph)) {\n newStore.addQuad(quad);\n }\n return new DatasetCoreWrapper(newStore);\n }\n [Symbol.iterator]() {\n return this.store.readQuads();\n }\n}\nexports.DatasetCoreWrapper = DatasetCoreWrapper;\n//# sourceMappingURL=DatasetCoreWrapper.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=ITermDictionary.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TermDictionaryNumberMap = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst rdf_string_1 = require(\"rdf-string\");\n/**\n * A term dictionary that encodes to numbers, and stores the dictionary in memory in a Map.\n */\nclass TermDictionaryNumberMap {\n constructor(dataFactory = new rdf_data_factory_1.DataFactory()) {\n this.lastId = 0;\n this.dictionary = new Map();\n this.reverseDictionary = new Map();\n this.features = { quotedTriples: false };\n this.dataFactory = dataFactory;\n }\n encode(term) {\n const key = (0, rdf_string_1.termToString)(term);\n let encoded = this.dictionary.get(key);\n if (encoded === undefined) {\n encoded = this.lastId++;\n this.dictionary.set(key, encoded);\n this.reverseDictionary.set(encoded, key);\n }\n return encoded;\n }\n encodeOptional(term) {\n const key = (0, rdf_string_1.termToString)(term);\n return this.dictionary.get(key);\n }\n decode(encoding) {\n const string = this.reverseDictionary.get(encoding);\n if (string === undefined) {\n throw new Error(`The value ${encoding} is not present in this dictionary`);\n }\n return (0, rdf_string_1.stringToTerm)(string, this.dataFactory);\n }\n encodings() {\n return this.reverseDictionary.keys();\n }\n findQuotedTriples(quotedTriplePattern) {\n throw new Error('findQuotedTriples is not supported');\n }\n findQuotedTriplesEncoded(quotedTriplePattern) {\n throw new Error('findQuotedTriplesEncoded is not supported');\n }\n}\nexports.TermDictionaryNumberMap = TermDictionaryNumberMap;\n//# sourceMappingURL=TermDictionaryNumberMap.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TermDictionaryNumberRecord = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst rdf_string_1 = require(\"rdf-string\");\n/**\n * A term dictionary that encodes to numbers, and stores the dictionary in memory in a Record.\n */\nclass TermDictionaryNumberRecord {\n constructor(dataFactory = new rdf_data_factory_1.DataFactory()) {\n this.lastId = 0;\n this.dictionary = {};\n this.reverseDictionary = {};\n this.features = { quotedTriples: false };\n this.dataFactory = dataFactory;\n }\n encode(term) {\n const key = (0, rdf_string_1.termToString)(term);\n let encoded = this.dictionary[key];\n if (encoded === undefined) {\n encoded = this.lastId++;\n this.dictionary[key] = encoded;\n this.reverseDictionary[encoded] = key;\n }\n return encoded;\n }\n encodeOptional(term) {\n const key = (0, rdf_string_1.termToString)(term);\n return this.dictionary[key];\n }\n decode(encoding) {\n const string = this.reverseDictionary[encoding];\n if (string === undefined) {\n throw new Error(`The value ${encoding} is not present in this dictionary`);\n }\n return (0, rdf_string_1.stringToTerm)(string, this.dataFactory);\n }\n *encodings() {\n for (const key of Object.keys(this.reverseDictionary)) {\n yield Number.parseInt(key, 10);\n }\n }\n findQuotedTriples(quotedTriplePattern) {\n throw new Error('findQuotedTriples is not supported');\n }\n findQuotedTriplesEncoded(quotedTriplePattern) {\n throw new Error('findQuotedTriplesEncoded is not supported');\n }\n}\nexports.TermDictionaryNumberRecord = TermDictionaryNumberRecord;\n//# sourceMappingURL=TermDictionaryNumberRecord.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TermDictionaryNumberRecordFullTerms = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst rdf_string_1 = require(\"rdf-string\");\n/**\n * A term dictionary that encodes to numbers, and stores the dictionary in memory in a Record.\n * The reverse dictionary will store full RDF term objects,\n * resulting in slightly better query performance at the cost of slightly higher memory usage.\n */\nclass TermDictionaryNumberRecordFullTerms {\n constructor(dataFactory = new rdf_data_factory_1.DataFactory()) {\n this.lastId = 0;\n this.dictionary = {};\n this.reverseDictionary = {};\n this.features = { quotedTriples: false };\n this.dataFactory = dataFactory;\n }\n encode(term) {\n const key = (0, rdf_string_1.termToString)(term);\n let encoded = this.dictionary[key];\n if (encoded === undefined) {\n encoded = this.lastId++;\n this.dictionary[key] = encoded;\n this.reverseDictionary[encoded] = term;\n }\n return encoded;\n }\n encodeOptional(term) {\n const key = (0, rdf_string_1.termToString)(term);\n return this.dictionary[key];\n }\n decode(encoding) {\n const string = this.reverseDictionary[encoding];\n if (string === undefined) {\n throw new Error(`The value ${encoding} is not present in this dictionary`);\n }\n return string;\n }\n *encodings() {\n for (const key of Object.keys(this.reverseDictionary)) {\n yield Number.parseInt(key, 10);\n }\n }\n findQuotedTriples(quotedTriplePattern) {\n throw new Error('findQuotedTriples is not supported');\n }\n findQuotedTriplesEncoded(quotedTriplePattern) {\n throw new Error('findQuotedTriplesEncoded is not supported');\n }\n}\nexports.TermDictionaryNumberRecordFullTerms = TermDictionaryNumberRecordFullTerms;\n//# sourceMappingURL=TermDictionaryNumberRecordFullTerms.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TermDictionaryQuoted = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst rdf_terms_1 = require(\"rdf-terms\");\n/**\n * A term dictionary for quoted triples.\n *\n * Plain terms and quoted triples are stored in separate dictionaries.\n *\n * Finding quoted triples is done by iterating over all quoted triples, and filtering by the matching ones.\n */\nclass TermDictionaryQuoted {\n constructor(plainTermDictionary, quotedTriplesDictionary, dataFactory = new rdf_data_factory_1.DataFactory()) {\n this.features = { quotedTriples: true };\n this.plainTermDictionary = plainTermDictionary;\n this.quotedTriplesDictionary = quotedTriplesDictionary;\n this.dataFactory = dataFactory;\n }\n encode(term) {\n if (term.termType === 'Quad') {\n // Mask MSB to indicate that the encoding should refer to the quoted triples dictionary.\n return TermDictionaryQuoted.BITMASK | (1 + this.quotedTriplesDictionary.encode(term));\n }\n return this.plainTermDictionary.encode(term);\n }\n encodeOptional(term) {\n if (term.termType === 'Quad') {\n const encoding = this.quotedTriplesDictionary.encodeOptional(term);\n if (encoding === undefined) {\n return encoding;\n }\n // Mask MSB to indicate that the encoding should refer to the quoted triples dictionary.\n return TermDictionaryQuoted.BITMASK | (1 + encoding);\n }\n return this.plainTermDictionary.encodeOptional(term);\n }\n decode(encoding) {\n if (TermDictionaryQuoted.BITMASK & encoding) {\n // Term comes from the quoted triples dictionary\n const encodingBase = (~TermDictionaryQuoted.BITMASK & encoding) - 1;\n return this.quotedTriplesDictionary.decode(encodingBase);\n }\n // Term comes from the plain terms dictionary\n return this.plainTermDictionary.decode(encoding);\n }\n *encodings() {\n for (const encoding of this.plainTermDictionary.encodings()) {\n yield encoding;\n }\n for (const encoding of this.quotedTriplesDictionary.encodings()) {\n yield TermDictionaryQuoted.BITMASK | (1 + encoding);\n }\n }\n *findQuotedTriples(quotedTriplePattern) {\n for (const termEncoded of this.findQuotedTriplesEncoded(quotedTriplePattern)) {\n yield this.decode(termEncoded);\n }\n }\n *findQuotedTriplesEncoded(quotedTriplePattern) {\n for (let encodedQuotedTriple of this.quotedTriplesDictionary.encodings()) {\n encodedQuotedTriple = TermDictionaryQuoted.BITMASK | (1 + encodedQuotedTriple);\n const quotedTriple = this.decode(encodedQuotedTriple);\n if ((0, rdf_terms_1.matchPattern)(quotedTriple, quotedTriplePattern.subject, quotedTriplePattern.predicate, quotedTriplePattern.object, quotedTriplePattern.graph)) {\n yield encodedQuotedTriple;\n }\n }\n }\n}\nTermDictionaryQuoted.BITMASK = 1 << 31;\nexports.TermDictionaryQuoted = TermDictionaryQuoted;\n//# sourceMappingURL=TermDictionaryQuoted.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TermDictionaryQuotedIndexed = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst RdfStoreIndexNestedMap_1 = require(\"../index/RdfStoreIndexNestedMap\");\nconst OrderUtils_1 = require(\"../OrderUtils\");\n/**\n * A term dictionary for quoted triples.\n *\n * Plain terms are stored in a regular dictionary.\n * Quoted triples are stored separately using an index, which is backed the same dictionary.\n *\n * Finding quoted triples is done through indexed lookups.\n */\nclass TermDictionaryQuotedIndexed {\n constructor(rawTermDictionary, dataFactory = new rdf_data_factory_1.DataFactory()) {\n this.quotedTriplesDictionary = [];\n this.features = { quotedTriples: true };\n this.plainTermDictionary = rawTermDictionary;\n const subIndexOpts = {\n // Not required\n indexCombinations: [],\n // Not required\n indexConstructor: undefined,\n dictionary: this,\n dataFactory,\n };\n this.quotedTriplesReverseDictionaries = [\n new RdfStoreIndexNestedMap_1.RdfStoreIndexNestedMap(subIndexOpts),\n new RdfStoreIndexNestedMap_1.RdfStoreIndexNestedMap(subIndexOpts),\n new RdfStoreIndexNestedMap_1.RdfStoreIndexNestedMap(subIndexOpts),\n ];\n this.dataFactory = dataFactory;\n }\n encode(term) {\n if (term.termType === 'Quad') {\n return this.encodeQuotedTriple(term, false);\n }\n return this.plainTermDictionary.encode(term);\n }\n encodeQuotedTriple(quad, optional) {\n // Only quoted triples are supported\n if (quad.graph.termType !== 'DefaultGraph') {\n throw new Error('Encoding of quoted quads outside of the default graph is not allowed');\n }\n // Check if the quad was already encoded\n const encodedTripleOptional = (0, OrderUtils_1.encodeOptionalTerms)([quad.subject, quad.predicate, quad.object, quad.graph], this);\n const id = encodedTripleOptional && encodedTripleOptional.every(encoded => encoded !== undefined) ?\n this.quotedTriplesReverseDictionaries[0].getEncoded(encodedTripleOptional) :\n undefined;\n // Return the encoding if we found one\n if (id !== undefined || optional) {\n // Mask MSB to indicate that the encoding should refer to the quoted triples dictionary.\n return (id === undefined ? undefined : TermDictionaryQuotedIndexed.BITMASK | id);\n }\n // If the quad was not encoded yet, add a new entry for it in the dictionary.\n const encodedTriple = [\n this.encode(quad.subject),\n this.encode(quad.predicate),\n this.encode(quad.object),\n ];\n const encodingBase = this.quotedTriplesDictionary.length + 1;\n this.quotedTriplesDictionary.push(encodedTriple);\n const encodedGraph = this.encode(this.dataFactory.defaultGraph());\n this.quotedTriplesReverseDictionaries[0].set([\n encodedTriple[0],\n encodedTriple[1],\n encodedTriple[2],\n encodedGraph,\n ], encodingBase);\n this.quotedTriplesReverseDictionaries[1].set([\n encodedTriple[1],\n encodedTriple[2],\n encodedTriple[0],\n encodedGraph,\n ], encodingBase);\n this.quotedTriplesReverseDictionaries[2].set([\n encodedTriple[2],\n encodedTriple[0],\n encodedTriple[1],\n encodedGraph,\n ], encodingBase);\n // Mask MSB to indicate that the encoding should refer to the quoted triples dictionary.\n return TermDictionaryQuotedIndexed.BITMASK | encodingBase;\n }\n encodeOptional(term) {\n if (term.termType === 'Quad') {\n return this.encodeQuotedTriple(term, true);\n }\n return this.plainTermDictionary.encodeOptional(term);\n }\n decode(encoding) {\n if (TermDictionaryQuotedIndexed.BITMASK & encoding) {\n // Term comes from the quoted triples dictionary\n const encodingBase = (~TermDictionaryQuotedIndexed.BITMASK & encoding) - 1;\n if (encodingBase >= this.quotedTriplesDictionary.length) {\n throw new Error(`The value ${encoding} is not present in the quoted triples range of the dictionary`);\n }\n const encodedTerms = this.quotedTriplesDictionary[encodingBase];\n return this.dataFactory.quad(this.decode(encodedTerms[0]), this.decode(encodedTerms[1]), this.decode(encodedTerms[2]));\n }\n // Term comes from the plain terms dictionary\n return this.plainTermDictionary.decode(encoding);\n }\n *encodings() {\n for (const encoding of this.plainTermDictionary.encodings()) {\n yield encoding;\n }\n for (const encoding of this.quotedTriplesDictionary.keys()) {\n yield TermDictionaryQuotedIndexed.BITMASK | (1 + encoding);\n }\n }\n *findQuotedTriples(quotedTriplePattern) {\n for (const termEncoded of this.findQuotedTriplesEncoded(quotedTriplePattern)) {\n yield this.decode(termEncoded);\n }\n }\n *findQuotedTriplesEncoded(quotedTriplePattern) {\n const [patternIn, requireQuotedTripleFiltering] = (0, OrderUtils_1.quadToPattern)(quotedTriplePattern.subject, quotedTriplePattern.predicate, quotedTriplePattern.object, quotedTriplePattern.graph, true);\n // Find all matching terms iteratively\n for (const termS of this.patternToIterable(patternIn[0])) {\n for (const termP of this.patternToIterable(patternIn[1])) {\n for (const termO of this.patternToIterable(patternIn[2])) {\n for (const termG of this.patternToIterable(patternIn[3])) {\n // Find all terms matching the pattern from the reverse indexes\n // We select the reverse index according to the current triple pattern\n if ((termS && termP) || (!termP && !termO)) {\n // SPO\n const pattern = [termS, termP, termO, termG];\n for (const termEncoded of this.quotedTriplesReverseDictionaries[0].findEncoded(pattern, patternIn)) {\n yield TermDictionaryQuotedIndexed.BITMASK |\n this.quotedTriplesReverseDictionaries[0].getEncoded(termEncoded);\n }\n }\n else if (!termS && termP) {\n // POS\n const pattern = [termP, termO, termS, termG];\n for (const termEncoded of this.quotedTriplesReverseDictionaries[1].findEncoded(pattern, patternIn)) {\n yield TermDictionaryQuotedIndexed.BITMASK |\n this.quotedTriplesReverseDictionaries[1].getEncoded(termEncoded);\n }\n }\n else {\n // OSP\n const pattern = [termO, termS, termP, termG];\n for (const termEncoded of this.quotedTriplesReverseDictionaries[2].findEncoded(pattern, patternIn)) {\n yield TermDictionaryQuotedIndexed.BITMASK |\n this.quotedTriplesReverseDictionaries[2].getEncoded(termEncoded);\n }\n }\n }\n }\n }\n }\n }\n /**\n * Helper function to convert a term to an iterator over encoded terms.\n * @param patternTerm A term.\n * @protected\n */\n *patternToIterable(patternTerm) {\n // If the term is another quoted quad, recursively find other quoted triples\n if ((patternTerm === null || patternTerm === void 0 ? void 0 : patternTerm.termType) === 'Quad') {\n yield* this.findQuotedTriplesEncoded(patternTerm);\n return;\n }\n // Undefined terms indicate a variable\n if (patternTerm === undefined) {\n // eslint-disable-next-line unicorn/no-useless-undefined\n yield undefined;\n return;\n }\n // Defined terms indicate a precise match\n const enc = this.encodeOptional(patternTerm);\n if (enc === undefined) {\n return;\n }\n yield enc;\n }\n}\nTermDictionaryQuotedIndexed.BITMASK = 1 << 31;\nexports.TermDictionaryQuotedIndexed = TermDictionaryQuotedIndexed;\n//# sourceMappingURL=TermDictionaryQuotedIndexed.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TermDictionaryQuotedReferential = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst rdf_terms_1 = require(\"rdf-terms\");\nconst OrderUtils_1 = require(\"../OrderUtils\");\n/**\n * A term dictionary for quoted triples.\n *\n * Plain terms and quoted triples are stored in separate dictionaries,\n * but quoted triples are encoded using encodings from the plain term dictionary.\n *\n * Finding quoted triples is done by iterating over all quoted triples, and filtering by the matching ones.\n */\nclass TermDictionaryQuotedReferential {\n constructor(plainTermDictionary, dataFactory = new rdf_data_factory_1.DataFactory()) {\n this.quotedTriplesDictionary = [];\n this.quotedTriplesReverseDictionary = {};\n this.features = { quotedTriples: true };\n this.plainTermDictionary = plainTermDictionary;\n this.dataFactory = dataFactory;\n }\n encode(term) {\n if (term.termType === 'Quad') {\n return this.encodeQuotedTriple(term, false);\n }\n return this.plainTermDictionary.encode(term);\n }\n encodeQuotedTriple(quad, optional) {\n var _a;\n // Only quoted triples are supported\n if (quad.graph.termType !== 'DefaultGraph') {\n throw new Error('Encoding of quoted quads outside of the default graph is not allowed');\n }\n // Check if the quad was already encoded\n const encodedTripleOptional = (_a = (0, OrderUtils_1.encodeOptionalTerms)([quad.subject, quad.predicate, quad.object, undefined], this)) === null || _a === void 0 ? void 0 : _a.slice(0, 3);\n const id = encodedTripleOptional && encodedTripleOptional.every(encoded => encoded !== undefined) ?\n this.quotedTriplesReverseDictionary[encodedTripleOptional.join(TermDictionaryQuotedReferential.SEPARATOR)] :\n undefined;\n // Return the encoding if we found one\n if (id !== undefined || optional) {\n // Mask MSB to indicate that the encoding should refer to the quoted triples dictionary.\n return (id === undefined ? undefined : TermDictionaryQuotedReferential.BITMASK | id);\n }\n // If the quad was not encoded yet, add a new entry for it in the dictionary.\n const encodedTriple = [\n this.encode(quad.subject),\n this.encode(quad.predicate),\n this.encode(quad.object),\n ];\n const encodingBase = this.quotedTriplesDictionary.length + 1;\n this.quotedTriplesDictionary.push(encodedTriple);\n this.quotedTriplesReverseDictionary[encodedTriple.join(TermDictionaryQuotedReferential.SEPARATOR)] = encodingBase;\n // Mask MSB to indicate that the encoding should refer to the quoted triples dictionary.\n return TermDictionaryQuotedReferential.BITMASK | encodingBase;\n }\n encodeOptional(term) {\n if (term.termType === 'Quad') {\n return this.encodeQuotedTriple(term, true);\n }\n return this.plainTermDictionary.encodeOptional(term);\n }\n decode(encoding) {\n if (TermDictionaryQuotedReferential.BITMASK & encoding) {\n // Term comes from the quoted triples dictionary\n const encodingBase = (~TermDictionaryQuotedReferential.BITMASK & encoding) - 1;\n if (encodingBase >= this.quotedTriplesDictionary.length) {\n throw new Error(`The value ${encoding} is not present in the quoted triples range of the dictionary`);\n }\n const encodedTerms = this.quotedTriplesDictionary[encodingBase];\n return this.dataFactory.quad(this.decode(encodedTerms[0]), this.decode(encodedTerms[1]), this.decode(encodedTerms[2]));\n }\n // Term comes from the plain terms dictionary\n return this.plainTermDictionary.decode(encoding);\n }\n *encodings() {\n for (const encoding of this.plainTermDictionary.encodings()) {\n yield encoding;\n }\n for (const encoding of this.quotedTriplesDictionary.keys()) {\n yield TermDictionaryQuotedReferential.BITMASK | (1 + encoding);\n }\n }\n *findQuotedTriples(quotedTriplePattern) {\n for (const termEncoded of this.findQuotedTriplesEncoded(quotedTriplePattern)) {\n yield this.decode(termEncoded);\n }\n }\n *findQuotedTriplesEncoded(quotedTriplePattern) {\n for (let encodedQuotedTriple of this.quotedTriplesDictionary.keys()) {\n encodedQuotedTriple = TermDictionaryQuotedReferential.BITMASK | (1 + encodedQuotedTriple);\n const quotedTriple = this.decode(encodedQuotedTriple);\n if ((0, rdf_terms_1.matchPattern)(quotedTriple, quotedTriplePattern.subject, quotedTriplePattern.predicate, quotedTriplePattern.object, quotedTriplePattern.graph)) {\n yield encodedQuotedTriple;\n }\n }\n }\n}\nTermDictionaryQuotedReferential.BITMASK = 1 << 31;\nTermDictionaryQuotedReferential.SEPARATOR = '_';\nexports.TermDictionaryQuotedReferential = TermDictionaryQuotedReferential;\n//# sourceMappingURL=TermDictionaryQuotedReferential.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TermDictionarySymbol = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst rdf_string_1 = require(\"rdf-string\");\n/**\n * A term dictionary that encodes and decodes using symbols.\n */\nclass TermDictionarySymbol {\n constructor(dataFactory = new rdf_data_factory_1.DataFactory()) {\n this.features = { quotedTriples: false };\n this.dataFactory = dataFactory;\n }\n encode(term) {\n return Symbol.for(`rdf::${(0, rdf_string_1.termToString)(term)}`);\n }\n encodeOptional(term) {\n return this.encode(term);\n }\n decode(encoding) {\n const string = Symbol.keyFor(encoding);\n if (string === undefined) {\n throw new Error(`The value ${String(encoding)} is not present in this dictionary`);\n }\n return (0, rdf_string_1.stringToTerm)(string.slice(5), this.dataFactory);\n }\n encodings() {\n throw new Error('encodings is not supported');\n }\n findQuotedTriples(quotedTriplePattern) {\n throw new Error('findQuotedTriples is not supported');\n }\n findQuotedTriplesEncoded(quotedTriplePattern) {\n throw new Error('findQuotedTriplesEncoded is not supported');\n }\n}\nexports.TermDictionarySymbol = TermDictionarySymbol;\n//# sourceMappingURL=TermDictionarySymbol.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IRdfStoreIndex.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RdfStoreIndexNestedMap = void 0;\nconst OrderUtils_1 = require(\"../OrderUtils\");\n/**\n * An RDF store index that is implemented using nested Maps.\n */\nclass RdfStoreIndexNestedMap {\n constructor(options) {\n this.features = {\n quotedTripleFiltering: false,\n };\n this.dictionary = options.dictionary;\n this.nestedMap = new Map();\n }\n set(terms, value) {\n const map0 = this.nestedMap;\n let map1 = map0.get(terms[0]);\n if (!map1) {\n map1 = new Map();\n map0.set(terms[0], map1);\n }\n let map2 = map1.get(terms[1]);\n if (!map2) {\n map2 = new Map();\n map1.set(terms[1], map2);\n }\n let map3 = map2.get(terms[2]);\n if (!map3) {\n map3 = new Map();\n map2.set(terms[2], map3);\n }\n const contained = map3.has(terms[3]);\n if (!contained) {\n map3.set(terms[3], value);\n }\n return !contained;\n }\n remove(terms) {\n const map0 = this.nestedMap;\n const map1 = map0.get(terms[0]);\n if (!map1) {\n return false;\n }\n const map2 = map1.get(terms[1]);\n if (!map2) {\n return false;\n }\n const map3 = map2.get(terms[2]);\n if (!map3) {\n return false;\n }\n const ret = map3.delete(terms[3]);\n // Clean up intermediate maps\n if (ret && map3.size === 0) {\n map2.delete(terms[2]);\n if (map2.size === 0) {\n map1.delete(terms[1]);\n if (map1.size === 0) {\n map0.delete(terms[0]);\n }\n }\n }\n return ret;\n }\n get(key) {\n const encoded = (0, OrderUtils_1.encodeOptionalTerms)(key, this.dictionary);\n // eslint-disable-next-line unicorn/no-useless-undefined\n if (!encoded || encoded.includes(undefined)) {\n return undefined;\n }\n return this.getEncoded(encoded);\n }\n getEncoded(ids) {\n const map1 = this.nestedMap.get(ids[0]);\n if (!map1) {\n return undefined;\n }\n const map2 = map1.get(ids[1]);\n if (!map2) {\n return undefined;\n }\n const map3 = map2.get(ids[2]);\n if (!map3) {\n return undefined;\n }\n return map3.get(ids[3]);\n }\n *find(terms) {\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return;\n }\n const [id0, id1, id2, id3] = ids;\n const [term0, term1, term2, term3] = terms;\n let partialQuad0;\n let partialQuad1;\n let partialQuad2;\n let partialQuad3;\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedMap;\n const map0Keys = id0 !== undefined ? (map0.has(id0) ? [id0] : []) : map0.keys();\n for (const key1 of map0Keys) {\n map1 = map0.get(key1);\n partialQuad0 = term0 || this.dictionary.decode(key1);\n const map1Keys = id1 !== undefined ? (map1.has(id1) ? [id1] : []) : map1.keys();\n for (const key2 of map1Keys) {\n map2 = map1.get(key2);\n partialQuad1 = term1 || this.dictionary.decode(key2);\n const map2Keys = id2 !== undefined ? (map2.has(id2) ? [id2] : []) : map2.keys();\n for (const key3 of map2Keys) {\n map3 = map2.get(key3);\n partialQuad2 = term2 || this.dictionary.decode(key3);\n const map3Keys = id3 !== undefined ? (map3.has(id3) ? [id3] : []) : map3.keys();\n for (const key4 of map3Keys) {\n partialQuad3 = term3 || this.dictionary.decode(key4);\n yield [partialQuad0, partialQuad1, partialQuad2, partialQuad3];\n }\n }\n }\n }\n }\n // The code below is nearly identical. We duplicate because abstraction would result in a significant performance hit.\n *findEncoded(ids, terms) {\n const [id0, id1, id2, id3] = ids;\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedMap;\n const map0Keys = id0 !== undefined ? (map0.has(id0) ? [id0] : []) : map0.keys();\n for (const key1 of map0Keys) {\n map1 = map0.get(key1);\n const map1Keys = id1 !== undefined ? (map1.has(id1) ? [id1] : []) : map1.keys();\n for (const key2 of map1Keys) {\n map2 = map1.get(key2);\n const map2Keys = id2 !== undefined ? (map2.has(id2) ? [id2] : []) : map2.keys();\n for (const key3 of map2Keys) {\n map3 = map2.get(key3);\n const map3Keys = id3 !== undefined ? (map3.has(id3) ? [id3] : []) : map3.keys();\n for (const key4 of map3Keys) {\n yield [key1, key2, key3, key4];\n }\n }\n }\n }\n }\n count(terms) {\n let count = 0;\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return 0;\n }\n const id0 = ids[0];\n const id1 = ids[1];\n const id2 = ids[2];\n const id3 = ids[3];\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedMap;\n const map0Keys = id0 !== undefined ? (map0.has(id0) ? [id0] : []) : map0.keys();\n for (const key1 of map0Keys) {\n map1 = map0.get(key1);\n const map1Keys = id1 !== undefined ? (map1.has(id1) ? [id1] : []) : map1.keys();\n for (const key2 of map1Keys) {\n map2 = map1.get(key2);\n const map2Keys = id2 !== undefined ? (map2.has(id2) ? [id2] : []) : map2.keys();\n for (const key3 of map2Keys) {\n map3 = map2.get(key3);\n if (id3 !== undefined) {\n if (map3.has(id3)) {\n count++;\n }\n }\n else {\n count += map3.size;\n }\n }\n }\n }\n return count;\n }\n}\nexports.RdfStoreIndexNestedMap = RdfStoreIndexNestedMap;\n//# sourceMappingURL=RdfStoreIndexNestedMap.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RdfStoreIndexNestedMapQuoted = void 0;\nconst OrderUtils_1 = require(\"../OrderUtils\");\nconst RdfStoreIndexNestedMap_1 = require(\"./RdfStoreIndexNestedMap\");\n/**\n * An RDF store index that is implemented using nested Maps with optimized quoted triple support.\n */\nclass RdfStoreIndexNestedMapQuoted extends RdfStoreIndexNestedMap_1.RdfStoreIndexNestedMap {\n constructor(options) {\n super(options);\n this.features = {\n quotedTripleFiltering: true,\n };\n }\n *getQuotedPatternKeys(map, term) {\n for (const quotedTripleEncoded of this.dictionary.findQuotedTriplesEncoded(term)) {\n if (map.has(quotedTripleEncoded)) {\n yield quotedTripleEncoded;\n }\n }\n }\n *find(terms) {\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return;\n }\n const [id0, id1, id2, id3] = ids;\n const [term0, term1, term2, term3] = terms;\n const [quotedTerm0, quotedTerm1, quotedTerm2, quotedTerm3] = (0, OrderUtils_1.arePatternsQuoted)(terms);\n let partialQuad0;\n let partialQuad1;\n let partialQuad2;\n let partialQuad3;\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedMap;\n const map0Keys = (term0 !== undefined ?\n (quotedTerm0 ? this.getQuotedPatternKeys(map0, term0) : (map0.has(id0) ? [id0] : [])) :\n map0.keys());\n for (const key1 of map0Keys) {\n map1 = map0.get(key1);\n partialQuad0 = !quotedTerm0 && term0 ? term0 : this.dictionary.decode(key1);\n const map1Keys = (term1 !== undefined ?\n (quotedTerm1 ? this.getQuotedPatternKeys(map1, term1) : (map1.has(id1) ? [id1] : [])) :\n map1.keys());\n for (const key2 of map1Keys) {\n map2 = map1.get(key2);\n partialQuad1 = !quotedTerm1 && term1 ? term1 : this.dictionary.decode(key2);\n const map2Keys = (term2 !== undefined ?\n (quotedTerm2 ? this.getQuotedPatternKeys(map2, term2) : (map2.has(id2) ? [id2] : [])) :\n map2.keys());\n for (const key3 of map2Keys) {\n map3 = map2.get(key3);\n partialQuad2 = !quotedTerm2 && term2 ? term2 : this.dictionary.decode(key3);\n const map3Keys = (term3 !== undefined ?\n (quotedTerm3 ? this.getQuotedPatternKeys(map3, term3) : (map3.has(id3) ? [id3] : [])) :\n map3.keys());\n for (const key4 of map3Keys) {\n partialQuad3 = !quotedTerm3 && term3 ? term3 : this.dictionary.decode(key4);\n yield [partialQuad0, partialQuad1, partialQuad2, partialQuad3];\n }\n }\n }\n }\n }\n // The code below is nearly identical. We duplicate because abstraction would result in a significant performance hit.\n *findEncoded(ids, terms) {\n const [id0, id1, id2, id3] = ids;\n const [term0, term1, term2, term3] = terms;\n const [quotedTerm0, quotedTerm1, quotedTerm2, quotedTerm3] = (0, OrderUtils_1.arePatternsQuoted)(terms);\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedMap;\n const map0Keys = (term0 !== undefined ?\n (quotedTerm0 ? this.getQuotedPatternKeys(map0, term0) : (map0.has(id0) ? [id0] : [])) :\n map0.keys());\n for (const key1 of map0Keys) {\n map1 = map0.get(key1);\n const map1Keys = (term1 !== undefined ?\n (quotedTerm1 ? this.getQuotedPatternKeys(map1, term1) : (map1.has(id1) ? [id1] : [])) :\n map1.keys());\n for (const key2 of map1Keys) {\n map2 = map1.get(key2);\n const map2Keys = (term2 !== undefined ?\n (quotedTerm2 ? this.getQuotedPatternKeys(map2, term2) : (map2.has(id2) ? [id2] : [])) :\n map2.keys());\n for (const key3 of map2Keys) {\n map3 = map2.get(key3);\n const map3Keys = (term3 !== undefined ?\n (quotedTerm3 ? this.getQuotedPatternKeys(map3, term3) : (map3.has(id3) ? [id3] : [])) :\n map3.keys());\n for (const key4 of map3Keys) {\n yield [\n Number.parseInt(key1, 10),\n Number.parseInt(key2, 10),\n Number.parseInt(key3, 10),\n Number.parseInt(key4, 10),\n ];\n }\n }\n }\n }\n }\n count(terms) {\n let count = 0;\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return 0;\n }\n const [id0, id1, id2, id3] = ids;\n const [term0, term1, term2, term3] = terms;\n const [quotedTerm0, quotedTerm1, quotedTerm2, quotedTerm3] = (0, OrderUtils_1.arePatternsQuoted)(terms);\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedMap;\n const map0Keys = (term0 !== undefined ?\n (quotedTerm0 ? this.getQuotedPatternKeys(map0, term0) : (map0.has(id0) ? [id0] : [])) :\n map0.keys());\n for (const key1 of map0Keys) {\n map1 = map0.get(key1);\n const map1Keys = (term1 !== undefined ?\n (quotedTerm1 ? this.getQuotedPatternKeys(map1, term1) : (map1.has(id1) ? [id1] : [])) :\n map1.keys());\n for (const key2 of map1Keys) {\n map2 = map1.get(key2);\n const map2Keys = (term2 !== undefined ?\n (quotedTerm2 ? this.getQuotedPatternKeys(map2, term2) : (map2.has(id2) ? [id2] : [])) :\n map2.keys());\n for (const key3 of map2Keys) {\n map3 = map2.get(key3);\n if (term3 !== undefined) {\n if (quotedTerm3) {\n count += [...this.getQuotedPatternKeys(map3, term3)].length;\n }\n else if (map3.has(id3)) {\n count++;\n }\n }\n else {\n count += map3.size;\n }\n }\n }\n }\n return count;\n }\n}\nexports.RdfStoreIndexNestedMapQuoted = RdfStoreIndexNestedMapQuoted;\n//# sourceMappingURL=RdfStoreIndexNestedMapQuoted.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RdfStoreIndexNestedMapRecursive = void 0;\nconst OrderUtils_1 = require(\"../OrderUtils\");\n/**\n * An RDF store index that is implemented using nested Maps,\n * and finds quads components via recursive methods calls.\n */\nclass RdfStoreIndexNestedMapRecursive {\n constructor(options) {\n this.features = {\n quotedTripleFiltering: false,\n };\n this.dictionary = options.dictionary;\n this.nestedMap = new Map();\n }\n set(terms, value) {\n let map = this.nestedMap;\n let contained = false;\n for (const [i, term] of terms.entries()) {\n const mapActual = map;\n let nextMap = mapActual.get(term);\n if (!nextMap) {\n nextMap = i === terms.length - 1 ? value : new Map();\n mapActual.set(term, nextMap);\n }\n else if (i === terms.length - 1) {\n contained = true;\n }\n map = nextMap;\n }\n return !contained;\n }\n remove(terms) {\n const map0 = this.nestedMap;\n const map1 = map0.get(terms[0]);\n if (!map1) {\n return false;\n }\n const map2 = map1.get(terms[1]);\n if (!map2) {\n return false;\n }\n const map3 = map2.get(terms[2]);\n if (!map3) {\n return false;\n }\n const ret = map3.delete(terms[3]);\n // Clean up intermediate maps\n if (ret && map3.size === 0) {\n map2.delete(terms[2]);\n if (map2.size === 0) {\n map1.delete(terms[1]);\n if (map1.size === 0) {\n map0.delete(terms[0]);\n }\n }\n }\n return ret;\n }\n get(key) {\n const encoded = (0, OrderUtils_1.encodeOptionalTerms)(key, this.dictionary);\n // eslint-disable-next-line unicorn/no-useless-undefined\n if (!encoded || encoded.includes(undefined)) {\n return undefined;\n }\n return this.getEncoded(encoded);\n }\n getEncoded(ids) {\n const map1 = this.nestedMap.get(ids[0]);\n if (!map1) {\n return undefined;\n }\n const map2 = map1.get(ids[1]);\n if (!map2) {\n return undefined;\n }\n const map3 = map2.get(ids[2]);\n if (!map3) {\n return undefined;\n }\n return map3.get(ids[3]);\n }\n *find(terms) {\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return;\n }\n for (const termsEncoded of this.findEncoded(ids, terms)) {\n yield [\n ids[0] !== undefined ? terms[0] : this.dictionary.decode(termsEncoded[0]),\n ids[1] !== undefined ? terms[1] : this.dictionary.decode(termsEncoded[1]),\n ids[2] !== undefined ? terms[2] : this.dictionary.decode(termsEncoded[2]),\n ids[3] !== undefined ? terms[3] : this.dictionary.decode(termsEncoded[3]),\n ];\n }\n }\n *findEncoded(ids, terms) {\n return yield* this\n .findEncodedInner(0, ids, terms, this.nestedMap, []);\n }\n *findEncodedInner(index, ids, terms, map, partialQuad) {\n if (index === ids.length) {\n yield [...partialQuad];\n }\n else {\n const id = ids[index];\n const currentTerm = terms[index];\n // If current term is undefined, iterate over all terms at this level.\n if (!currentTerm) {\n for (const [key, subMap] of map.entries()) {\n partialQuad[index] = key;\n yield* this\n .findEncodedInner(index + 1, ids, terms, subMap, partialQuad);\n }\n }\n else {\n // If the current term is defined, find one matching map for the current term.\n const encodedTerm = id;\n if (encodedTerm !== undefined) {\n const subMap = map.get(encodedTerm);\n if (subMap) {\n partialQuad[index] = id;\n yield* this\n .findEncodedInner(index + 1, ids, terms, subMap, partialQuad);\n }\n }\n }\n }\n }\n count(terms) {\n return this.countInner(0, terms, this.nestedMap);\n }\n countInner(index, terms, map) {\n const currentTerm = terms[index];\n let count = 0;\n // If current term is undefined, iterate over all terms at this level.\n if (!currentTerm) {\n if (index === terms.length - 1) {\n return map.size;\n }\n for (const subMap of map.values()) {\n count += this.countInner(index + 1, terms, subMap);\n }\n }\n else {\n // If the current term is defined, find one matching map for the current term.\n const encodedTerm = this.dictionary.encodeOptional(currentTerm);\n if (encodedTerm !== undefined) {\n if (index === terms.length - 1) {\n if (map.has(encodedTerm)) {\n return 1;\n }\n return 0;\n }\n const subMap = map.get(encodedTerm);\n if (subMap) {\n count += this.countInner(index + 1, terms, subMap);\n }\n }\n }\n return count;\n }\n}\nexports.RdfStoreIndexNestedMapRecursive = RdfStoreIndexNestedMapRecursive;\n//# sourceMappingURL=RdfStoreIndexNestedMapRecursive.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RdfStoreIndexNestedMapRecursiveQuoted = void 0;\nconst OrderUtils_1 = require(\"../OrderUtils\");\nconst RdfStoreIndexNestedMapRecursive_1 = require(\"./RdfStoreIndexNestedMapRecursive\");\n/**\n * An RDF store index that is implemented using nested Maps,\n * and finds quads components via recursive methods calls\n * with optimized quoted triple support.\n */\nclass RdfStoreIndexNestedMapRecursiveQuoted extends RdfStoreIndexNestedMapRecursive_1.RdfStoreIndexNestedMapRecursive {\n constructor(options) {\n super(options);\n this.features = {\n quotedTripleFiltering: true,\n };\n }\n *findEncoded(ids, terms) {\n return yield* this\n .findEncodedInnerQuoted(0, ids, terms, (0, OrderUtils_1.arePatternsQuoted)(terms), this.nestedMap, []);\n }\n *findEncodedInnerQuoted(index, ids, terms, isQuotedPattern, map, partialQuad) {\n if (index === ids.length) {\n yield [...partialQuad];\n }\n else {\n const id = ids[index];\n const currentTerm = terms[index];\n // If current term is undefined, iterate over all terms at this level.\n if (!currentTerm) {\n for (const [key, subMap] of map.entries()) {\n partialQuad[index] = key;\n yield* this\n .findEncodedInnerQuoted(index + 1, ids, terms, isQuotedPattern, subMap, partialQuad);\n }\n }\n else if (isQuotedPattern[index]) {\n const quotedTriplesEncoded = this\n .dictionary.findQuotedTriplesEncoded(currentTerm);\n // Below, we perform a type of inner (hash) join between quotedTriplesEncoded and map (with hash on map)\n for (const quotedTripleEncoded of quotedTriplesEncoded) {\n const subMap = map.get(quotedTripleEncoded);\n if (subMap) {\n partialQuad[index] = quotedTripleEncoded;\n yield* this.findEncodedInnerQuoted(index + 1, ids, terms, isQuotedPattern, subMap, partialQuad);\n }\n }\n }\n else {\n // If the current term is defined, find one matching map for the current term.\n const encodedTerm = id;\n if (encodedTerm !== undefined) {\n const subMap = map.get(encodedTerm);\n if (subMap) {\n partialQuad[index] = id;\n yield* this.findEncodedInnerQuoted(index + 1, ids, terms, isQuotedPattern, subMap, partialQuad);\n }\n }\n }\n }\n }\n countInner(index, terms, map) {\n const currentTerm = terms[index];\n let count = 0;\n // If current term is undefined, iterate over all terms at this level.\n if (!currentTerm) {\n if (index === terms.length - 1) {\n return map.size;\n }\n for (const subMap of map.values()) {\n count += this.countInner(index + 1, terms, subMap);\n }\n }\n else if (currentTerm.termType === 'Quad' && (0, OrderUtils_1.quadHasVariables)(currentTerm)) {\n const quotedTriplesEncoded = this.dictionary.findQuotedTriplesEncoded(currentTerm);\n // Below, we perform a type of inner (hash) join between quotedTriplesEncoded and map (with hash on map)\n for (const quotedTripleEncoded of quotedTriplesEncoded) {\n if (index === terms.length - 1) {\n if (map.has(quotedTripleEncoded)) {\n count++;\n }\n }\n else {\n const subMap = map.get(quotedTripleEncoded);\n if (subMap) {\n count += this.countInner(index + 1, terms, subMap);\n }\n }\n }\n }\n else {\n // If the current term is defined, find one matching map for the current term.\n const encodedTerm = this.dictionary.encodeOptional(currentTerm);\n if (encodedTerm !== undefined) {\n if (index === terms.length - 1) {\n if (map.has(encodedTerm)) {\n return 1;\n }\n return 0;\n }\n const subMap = map.get(encodedTerm);\n if (subMap) {\n count += this.countInner(index + 1, terms, subMap);\n }\n }\n }\n return count;\n }\n}\nexports.RdfStoreIndexNestedMapRecursiveQuoted = RdfStoreIndexNestedMapRecursiveQuoted;\n//# sourceMappingURL=RdfStoreIndexNestedMapRecursiveQuoted.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RdfStoreIndexNestedRecord = void 0;\nconst OrderUtils_1 = require(\"../OrderUtils\");\n/**\n * An RDF store index that is implemented using nested records.\n */\nclass RdfStoreIndexNestedRecord {\n constructor(options) {\n this.features = {\n quotedTripleFiltering: false,\n };\n this.dictionary = options.dictionary;\n this.nestedRecords = {};\n }\n set(terms, value) {\n const map0 = this.nestedRecords;\n const map1 = map0[terms[0]] || (map0[terms[0]] = {});\n const map2 = map1[terms[1]] || (map1[terms[1]] = {});\n const map3 = map2[terms[2]] || (map2[terms[2]] = {});\n if (map3[terms[3]]) {\n return false;\n }\n map3[terms[3]] = value;\n return true;\n }\n remove(terms) {\n const map0 = this.nestedRecords;\n const map1 = map0[terms[0]];\n if (!map1) {\n return false;\n }\n const map2 = map1[terms[1]];\n if (!map2) {\n return false;\n }\n const map3 = map2[terms[2]];\n if (!map3) {\n return false;\n }\n if (!map3[terms[3]]) {\n return false;\n }\n delete map3[terms[3]];\n // Clean up intermediate maps\n if (Object.keys(map3).length === 0) {\n delete map2[terms[2]];\n if (Object.keys(map2).length === 0) {\n delete map1[terms[1]];\n if (Object.keys(map1).length === 0) {\n delete map0[terms[0]];\n }\n }\n }\n return true;\n }\n get(key) {\n const encoded = (0, OrderUtils_1.encodeOptionalTerms)(key, this.dictionary);\n // eslint-disable-next-line unicorn/no-useless-undefined\n if (!encoded || encoded.includes(undefined)) {\n return undefined;\n }\n return this.getEncoded(encoded);\n }\n getEncoded(ids) {\n var _a, _b, _c;\n return (_c = (_b = (_a = this.nestedRecords[ids[0]]) === null || _a === void 0 ? void 0 : _a[ids[1]]) === null || _b === void 0 ? void 0 : _b[ids[2]]) === null || _c === void 0 ? void 0 : _c[ids[3]];\n }\n *find(terms) {\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return;\n }\n const [id0, id1, id2, id3] = ids;\n const [term0, term1, term2, term3] = terms;\n let partialQuad0;\n let partialQuad1;\n let partialQuad2;\n let partialQuad3;\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedRecords;\n const map0Keys = id0 !== undefined ? (id0 in map0 ? [id0] : []) : Object.keys(map0);\n for (const key1 of map0Keys) {\n map1 = map0[key1];\n partialQuad0 = term0 || this.dictionary.decode(Number.parseInt(key1, 10));\n const map1Keys = id1 !== undefined ? (id1 in map1 ? [id1] : []) : Object.keys(map1);\n for (const key2 of map1Keys) {\n map2 = map1[key2];\n partialQuad1 = term1 || this.dictionary.decode(Number.parseInt(key2, 10));\n const map2Keys = id2 !== undefined ? (id2 in map2 ? [id2] : []) : Object.keys(map2);\n for (const key3 of map2Keys) {\n map3 = map2[key3];\n partialQuad2 = term2 || this.dictionary.decode(Number.parseInt(key3, 10));\n const map3Keys = id3 !== undefined ? (id3 in map3 ? [id3] : []) : Object.keys(map3);\n for (const key4 of map3Keys) {\n partialQuad3 = term3 || this.dictionary.decode(Number.parseInt(key4, 10));\n yield [partialQuad0, partialQuad1, partialQuad2, partialQuad3];\n }\n }\n }\n }\n }\n // The code below is nearly identical. We duplicate because abstraction would result in a significant performance hit.\n *findEncoded(ids, terms) {\n const [id0, id1, id2, id3] = ids;\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedRecords;\n const map0Keys = id0 !== undefined ? (id0 in map0 ? [id0] : []) : Object.keys(map0);\n for (const key1 of map0Keys) {\n map1 = map0[key1];\n const map1Keys = id1 !== undefined ? (id1 in map1 ? [id1] : []) : Object.keys(map1);\n for (const key2 of map1Keys) {\n map2 = map1[key2];\n const map2Keys = id2 !== undefined ? (id2 in map2 ? [id2] : []) : Object.keys(map2);\n for (const key3 of map2Keys) {\n map3 = map2[key3];\n const map3Keys = id3 !== undefined ? (id3 in map3 ? [id3] : []) : Object.keys(map3);\n for (const key4 of map3Keys) {\n yield [\n Number.parseInt(key1, 10),\n Number.parseInt(key2, 10),\n Number.parseInt(key3, 10),\n Number.parseInt(key4, 10),\n ];\n }\n }\n }\n }\n }\n count(terms) {\n let count = 0;\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return 0;\n }\n const id0 = ids[0];\n const id1 = ids[1];\n const id2 = ids[2];\n const id3 = ids[3];\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedRecords;\n const map0Keys = id0 !== undefined ? (id0 in map0 ? [id0] : []) : Object.keys(map0);\n for (const key1 of map0Keys) {\n map1 = map0[key1];\n const map1Keys = id1 !== undefined ? (id1 in map1 ? [id1] : []) : Object.keys(map1);\n for (const key2 of map1Keys) {\n map2 = map1[key2];\n const map2Keys = id2 !== undefined ? (id2 in map2 ? [id2] : []) : Object.keys(map2);\n for (const key3 of map2Keys) {\n map3 = map2[key3];\n if (id3 !== undefined) {\n if (id3 in map3) {\n count++;\n }\n }\n else {\n count += Object.keys(map3).length;\n }\n }\n }\n }\n return count;\n }\n}\nexports.RdfStoreIndexNestedRecord = RdfStoreIndexNestedRecord;\n//# sourceMappingURL=RdfStoreIndexNestedRecord.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RdfStoreIndexNestedRecordQuoted = void 0;\nconst OrderUtils_1 = require(\"../OrderUtils\");\nconst RdfStoreIndexNestedRecord_1 = require(\"./RdfStoreIndexNestedRecord\");\n/**\n * An RDF store index that is implemented using nested records with optimized quoted triple support.\n */\nclass RdfStoreIndexNestedRecordQuoted extends RdfStoreIndexNestedRecord_1.RdfStoreIndexNestedRecord {\n constructor(options) {\n super(options);\n this.features = {\n quotedTripleFiltering: true,\n };\n }\n *getQuotedPatternKeys(map, term) {\n for (const quotedTripleEncoded of this.dictionary.findQuotedTriplesEncoded(term)) {\n if (quotedTripleEncoded in map) {\n yield quotedTripleEncoded;\n }\n }\n }\n *find(terms) {\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return;\n }\n const [id0, id1, id2, id3] = ids;\n const [term0, term1, term2, term3] = terms;\n const [quotedTerm0, quotedTerm1, quotedTerm2, quotedTerm3] = (0, OrderUtils_1.arePatternsQuoted)(terms);\n let partialQuad0;\n let partialQuad1;\n let partialQuad2;\n let partialQuad3;\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedRecords;\n const map0Keys = (term0 !== undefined ?\n (quotedTerm0 ? this.getQuotedPatternKeys(map0, term0) : (id0 in map0 ? [id0] : [])) :\n Object.keys(map0));\n for (const key1 of map0Keys) {\n map1 = map0[key1];\n partialQuad0 = !quotedTerm0 && term0 ? term0 : this.dictionary.decode(Number.parseInt(key1, 10));\n const map1Keys = (term1 !== undefined ?\n (quotedTerm1 ? this.getQuotedPatternKeys(map1, term1) : (id1 in map1 ? [id1] : [])) :\n Object.keys(map1));\n for (const key2 of map1Keys) {\n map2 = map1[key2];\n partialQuad1 = !quotedTerm1 && term1 ? term1 : this.dictionary.decode(Number.parseInt(key2, 10));\n const map2Keys = (term2 !== undefined ?\n (quotedTerm2 ? this.getQuotedPatternKeys(map2, term2) : (id2 in map2 ? [id2] : [])) :\n Object.keys(map2));\n for (const key3 of map2Keys) {\n map3 = map2[key3];\n partialQuad2 = !quotedTerm2 && term2 ? term2 : this.dictionary.decode(Number.parseInt(key3, 10));\n const map3Keys = (term3 !== undefined ?\n (quotedTerm3 ? this.getQuotedPatternKeys(map3, term3) : (id3 in map3 ? [id3] : [])) :\n Object.keys(map3));\n for (const key4 of map3Keys) {\n partialQuad3 = !quotedTerm3 && term3 ? term3 : this.dictionary.decode(Number.parseInt(key4, 10));\n yield [partialQuad0, partialQuad1, partialQuad2, partialQuad3];\n }\n }\n }\n }\n }\n // The code below is nearly identical. We duplicate because abstraction would result in a significant performance hit.\n *findEncoded(ids, terms) {\n const [id0, id1, id2, id3] = ids;\n const [term0, term1, term2, term3] = terms;\n const [quotedTerm0, quotedTerm1, quotedTerm2, quotedTerm3] = (0, OrderUtils_1.arePatternsQuoted)(terms);\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedRecords;\n const map0Keys = (term0 !== undefined ?\n (quotedTerm0 ? this.getQuotedPatternKeys(map0, term0) : (id0 in map0 ? [id0] : [])) :\n Object.keys(map0));\n for (const key1 of map0Keys) {\n map1 = map0[key1];\n const map1Keys = (term1 !== undefined ?\n (quotedTerm1 ? this.getQuotedPatternKeys(map1, term1) : (id1 in map1 ? [id1] : [])) :\n Object.keys(map1));\n for (const key2 of map1Keys) {\n map2 = map1[key2];\n const map2Keys = (term2 !== undefined ?\n (quotedTerm2 ? this.getQuotedPatternKeys(map2, term2) : (id2 in map2 ? [id2] : [])) :\n Object.keys(map2));\n for (const key3 of map2Keys) {\n map3 = map2[key3];\n const map3Keys = (term3 !== undefined ?\n (quotedTerm3 ? this.getQuotedPatternKeys(map3, term3) : (id3 in map3 ? [id3] : [])) :\n Object.keys(map3));\n for (const key4 of map3Keys) {\n yield [\n Number.parseInt(key1, 10),\n Number.parseInt(key2, 10),\n Number.parseInt(key3, 10),\n Number.parseInt(key4, 10),\n ];\n }\n }\n }\n }\n }\n count(terms) {\n let count = 0;\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return 0;\n }\n const [id0, id1, id2, id3] = ids;\n const [term0, term1, term2, term3] = terms;\n const [quotedTerm0, quotedTerm1, quotedTerm2, quotedTerm3] = (0, OrderUtils_1.arePatternsQuoted)(terms);\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedRecords;\n const map0Keys = (term0 !== undefined ?\n (quotedTerm0 ? this.getQuotedPatternKeys(map0, term0) : (id0 in map0 ? [id0] : [])) :\n Object.keys(map0));\n for (const key1 of map0Keys) {\n map1 = map0[key1];\n const map1Keys = (term1 !== undefined ?\n (quotedTerm1 ? this.getQuotedPatternKeys(map1, term1) : (id1 in map1 ? [id1] : [])) :\n Object.keys(map1));\n for (const key2 of map1Keys) {\n map2 = map1[key2];\n const map2Keys = (term2 !== undefined ?\n (quotedTerm2 ? this.getQuotedPatternKeys(map2, term2) : (id2 in map2 ? [id2] : [])) :\n Object.keys(map2));\n for (const key3 of map2Keys) {\n map3 = map2[key3];\n if (term3 !== undefined) {\n if (quotedTerm3) {\n count += [...this.getQuotedPatternKeys(map3, term3)].length;\n }\n else if (id3 in map3) {\n count++;\n }\n }\n else {\n count += Object.keys(map3).length;\n }\n }\n }\n }\n return count;\n }\n}\nexports.RdfStoreIndexNestedRecordQuoted = RdfStoreIndexNestedRecordQuoted;\n//# sourceMappingURL=RdfStoreIndexNestedRecordQuoted.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/PendingStreamsIndex\"), exports);\n__exportStar(require(\"./lib/StreamingStore\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PendingStreamsIndex = void 0;\nconst rdf_string_1 = require(\"rdf-string\");\nconst rdf_terms_1 = require(\"rdf-terms\");\n/**\n * A PendingStreamsIndex stores pending streams indexed by the quad pattern they have been created for.\n */\nclass PendingStreamsIndex {\n constructor() {\n this.indexedStreams = new Map();\n this.allStreams = [];\n }\n termToString(term) {\n return term && term.termType !== 'Variable' ? (0, rdf_string_1.termToString)(term) : PendingStreamsIndex.ID_VARIABLE;\n }\n /**\n * Add a new pending stream for the given quad pattern.\n * @param pendingStream A pending stream.\n * @param subject A term.\n * @param predicate A term.\n * @param object A term.\n * @param graph A term.\n */\n addPatternListener(pendingStream, subject, predicate, object, graph) {\n // Append to list of pendingStreams\n this.allStreams.push(pendingStream);\n // Append to index of pendingStreams\n const key = `${this.termToString(subject)}${PendingStreamsIndex.ID_SEPARATOR}${this.termToString(predicate)}${PendingStreamsIndex.ID_SEPARATOR}${this.termToString(object)}${PendingStreamsIndex.ID_SEPARATOR}${this.termToString(graph)}`;\n let existingListeners = this.indexedStreams.get(key);\n if (!existingListeners) {\n existingListeners = [];\n this.indexedStreams.set(key, existingListeners);\n }\n existingListeners.push(pendingStream);\n }\n /**\n * Find all the pending streams from which their quad pattern match the given quad.\n * @param quad The quad to match patterns to.\n */\n getPendingStreamsForQuad(quad) {\n // Determine the combinations of quad patterns to look up\n let keys = [(0, rdf_terms_1.getTerms)(quad).map(term => (0, rdf_string_1.termToString)(term))];\n for (let i = 0; i < rdf_terms_1.QUAD_TERM_NAMES.length; i++) {\n const keysOld = keys;\n keys = [];\n for (const key of keysOld) {\n keys.push(key);\n const keyModified = [...key];\n keyModified[i] = PendingStreamsIndex.ID_VARIABLE;\n keys.push(keyModified);\n }\n }\n // Fetch the pendingStreams for the quad pattern combinations\n const pendingStreams = [];\n for (const key of keys) {\n const found = this.indexedStreams.get(key.join(PendingStreamsIndex.ID_SEPARATOR));\n if (found) {\n pendingStreams.push(...found);\n }\n }\n return pendingStreams;\n }\n}\nPendingStreamsIndex.ID_VARIABLE = '?';\nPendingStreamsIndex.ID_SEPARATOR = ':';\nexports.PendingStreamsIndex = PendingStreamsIndex;\n//# sourceMappingURL=PendingStreamsIndex.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StreamingStore = void 0;\nconst n3_1 = require(\"n3\");\nconst readable_stream_1 = require(\"readable-stream\");\nconst PendingStreamsIndex_1 = require(\"./PendingStreamsIndex\");\n/**\n * A StreamingStore allows data lookup and insertion to happen in parallel.\n * Concretely, this means that `match()` calls happening before `import()` calls, will still consider those triples that\n * are inserted later, which is done by keeping the response streams of `match()` open.\n * Only when the `end()` method is invoked, all response streams will close, and the StreamingStore will be considered\n * immutable.\n *\n * WARNING: `end()` MUST be called at some point, otherwise all `match` streams will remain unended.\n */\nclass StreamingStore {\n constructor(store = new n3_1.Store()) {\n this.pendingStreams = new PendingStreamsIndex_1.PendingStreamsIndex();\n this.ended = false;\n this.store = store;\n }\n /**\n * Mark this store as ended.\n *\n * This will make sure that all running and future `match` calls will end,\n * and all next `import` calls to this store will throw an error.\n */\n end() {\n this.ended = true;\n // Mark all pendingStreams as ended.\n for (const pendingStream of this.pendingStreams.allStreams) {\n pendingStream.push(null);\n pendingStream._pipeSource.unpipe();\n }\n }\n importToListeners(stream) {\n stream.on('data', (quad) => {\n if (!this.ended && !this.store.countQuads(quad.subject, quad.predicate, quad.object, quad.graph)) {\n for (const pendingStream of this.pendingStreams.getPendingStreamsForQuad(quad)) {\n if (pendingStream.isInitialized) {\n pendingStream.push(quad);\n pendingStream.emit('quad', quad);\n }\n }\n }\n });\n }\n import(stream) {\n if (this.ended) {\n throw new Error('Attempted to import into an ended StreamingStore');\n }\n this.importToListeners(stream);\n return this.store.import(stream);\n }\n match(subject, predicate, object, graph) {\n const storeResult = this.store.match(subject, predicate, object, graph);\n let stream = storeResult;\n // If the store hasn't ended yet, also create a new pendingStream\n if (!this.ended) {\n // The new pendingStream remains open, until the store is ended.\n const pendingStream = new readable_stream_1.PassThrough({ objectMode: true });\n this.pendingStreams.addPatternListener(pendingStream, subject, predicate, object, graph);\n stream = storeResult.pipe(pendingStream, { end: false });\n stream._pipeSource = storeResult;\n // This is an ugly hack to annotate pendingStream with the isInitialized once the store stream started being read.\n // This is necessary to avoid duplicate quads cases where match() is called but not yet read, an import is done,\n // and only then the match() stream is read.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const readOld = storeResult._read;\n storeResult._read = (size) => {\n pendingStream.isInitialized = true;\n readOld.call(storeResult, size);\n };\n }\n return stream;\n }\n /**\n * The internal store with all imported quads.\n */\n getStore() {\n return this.store;\n }\n}\nexports.StreamingStore = StreamingStore;\n//# sourceMappingURL=StreamingStore.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.termToString = exports.stringToTerm = exports.stringQuadToQuad = exports.quadToStringQuad = exports.getLiteralValue = exports.getLiteralType = exports.getLiteralLanguage = void 0;\nconst TermUtil_1 = require(\"./lib/TermUtil\");\nObject.defineProperty(exports, \"getLiteralLanguage\", { enumerable: true, get: function () { return TermUtil_1.getLiteralLanguage; } });\nObject.defineProperty(exports, \"getLiteralType\", { enumerable: true, get: function () { return TermUtil_1.getLiteralType; } });\nObject.defineProperty(exports, \"getLiteralValue\", { enumerable: true, get: function () { return TermUtil_1.getLiteralValue; } });\nObject.defineProperty(exports, \"quadToStringQuad\", { enumerable: true, get: function () { return TermUtil_1.quadToStringQuad; } });\nObject.defineProperty(exports, \"stringQuadToQuad\", { enumerable: true, get: function () { return TermUtil_1.stringQuadToQuad; } });\nObject.defineProperty(exports, \"stringToTerm\", { enumerable: true, get: function () { return TermUtil_1.stringToTerm; } });\nObject.defineProperty(exports, \"termToString\", { enumerable: true, get: function () { return TermUtil_1.termToString; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.stringQuadToQuad = exports.quadToStringQuad = exports.stringToTerm = exports.getLiteralLanguage = exports.getLiteralType = exports.getLiteralValue = exports.termToString = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst FACTORY = new rdf_data_factory_1.DataFactory();\n/**\n * Utility methods for converting between string-based RDF representations and RDFJS objects.\n *\n * RDF Terms are represented as follows:\n * * Blank nodes: '_:myBlankNode'\n * * Variables: '_myVariable'\n * * Literals: '\"myString\"', '\"myLanguageString\"@en-us', '\"

e

\"^^'\n * * URIs: ''\n *\n * Quads/triples are represented as hashes with 'subject', 'predicate', 'object' and 'graph' (optional)\n * as keys, and string-based RDF terms as values.\n */\n/**\n * Convert an RDFJS term to a string-based representation.\n * @param {RDF.Term} term An RDFJS term.\n * @return {string} A string-based term representation.\n */\nfunction termToString(term) {\n // TODO: remove nasty any casts when this TS bug has been fixed: https://github.com/microsoft/TypeScript/issues/26933\n if (!term) {\n return undefined;\n }\n switch (term.termType) {\n case 'NamedNode': return (`<${escapeIRI(term.value)}>`);\n case 'BlankNode': return (`_:${term.value}`);\n case 'Literal': {\n const literalValue = term;\n return (`\"${escapeStringRDF(literalValue.value)}\"${literalValue.datatype &&\n literalValue.datatype.value !== 'http://www.w3.org/2001/XMLSchema#string' &&\n literalValue.datatype.value !== 'http://www.w3.org/1999/02/22-rdf-syntax-ns#langString' ?\n `^^<${literalValue.datatype.value}>` :\n ''}${literalValue.language ? `@${literalValue.language}` : ''}`);\n }\n case 'Quad': return (`<<${termToString(term.subject)} ${termToString(term.predicate)} ${termToString(term.object)}${term.graph.termType === 'DefaultGraph' ? '' : ` ${termToString(term.graph)}`}>>`);\n case 'Variable': return (`?${term.value}`);\n case 'DefaultGraph': return term.value;\n }\n}\nexports.termToString = termToString;\n/**\n * Get the string value of a literal.\n * @param {string} literalValue An RDF literal enclosed by '\"'.\n * @return {string} The literal value inside the '\"'.\n */\nfunction getLiteralValue(literalValue) {\n const match = /^\"([^]*)\"((\\^\\^.*)|(@.*))?$/u.exec(literalValue);\n if (!match) {\n throw new Error(`${literalValue} is not a literal`);\n }\n return match[1].replace(/\\\\\"/ug, '\"');\n}\nexports.getLiteralValue = getLiteralValue;\n/**\n * Get the datatype of the given literal.\n * @param {string} literalValue An RDF literal.\n * @return {string} The datatype of the literal.\n */\nfunction getLiteralType(literalValue) {\n const match = /^\"[^]*\"(?:\\^\\^<([^\"]+)>|(@)[^@\"]+)?$/u.exec(literalValue);\n if (!match) {\n throw new Error(`${literalValue} is not a literal`);\n }\n return match[1] || (match[2] ?\n 'http://www.w3.org/1999/02/22-rdf-syntax-ns#langString' :\n 'http://www.w3.org/2001/XMLSchema#string');\n}\nexports.getLiteralType = getLiteralType;\n/**\n * Get the language of the given literal.\n * @param {string} literalValue An RDF literal.\n * @return {string} The language of the literal.\n */\nfunction getLiteralLanguage(literalValue) {\n const match = /^\"[^]*\"(?:@([^@\"]+)|\\^\\^[^\"]+)?$/u.exec(literalValue);\n if (!match) {\n throw new Error(`${literalValue} is not a literal`);\n }\n return match[1] ? match[1].toLowerCase() : '';\n}\nexports.getLiteralLanguage = getLiteralLanguage;\n/**\n * Transform a string-based RDF term to an RDFJS term.\n * @param {string} value A string-based RDF-term.\n * @param {RDF.DataFactory} dataFactory An optional datafactory to create terms with.\n * @return {RDF.Term} An RDF-JS term.\n */\nfunction stringToTerm(value, dataFactory) {\n dataFactory = dataFactory || FACTORY;\n if (!value || (value.length === 0)) {\n return dataFactory.defaultGraph();\n }\n switch (value[0]) {\n case '_': return dataFactory.blankNode(value.slice(2));\n case '?':\n if (!dataFactory.variable) {\n throw new Error(`Missing 'variable()' method on the given DataFactory`);\n }\n return dataFactory.variable(value.slice(1));\n case '\"': {\n const language = getLiteralLanguage(value);\n const type = dataFactory.namedNode(getLiteralType(value));\n return dataFactory.literal(getLiteralValue(value), language || type);\n }\n case '<':\n default:\n if (value.startsWith('<<') && value.endsWith('>>')) {\n // Iterate character-by-character to detect spaces that are *not* wrapped in <<>>\n const terms = value.slice(2, -2);\n const stringTerms = [];\n let ignoreTags = 0;\n let lastIndex = 0;\n for (let i = 0; i < terms.length; i++) {\n const char = terms[i];\n if (char === '<') {\n ignoreTags++;\n }\n if (char === '>') {\n if (ignoreTags === 0) {\n throw new Error(`Found closing tag without opening tag in ${value}`);\n }\n else {\n ignoreTags--;\n }\n }\n if (char === ' ' && ignoreTags === 0) {\n stringTerms.push(terms.slice(lastIndex, i));\n lastIndex = i + 1;\n }\n }\n if (ignoreTags !== 0) {\n throw new Error(`Found opening tag without closing tag in ${value}`);\n }\n stringTerms.push(terms.slice(lastIndex, terms.length));\n // We require 3 or 4 components\n if (stringTerms.length !== 3 && stringTerms.length !== 4) {\n throw new Error(`Nested quad syntax error ${value}`);\n }\n return dataFactory.quad(stringToTerm(stringTerms[0]), stringToTerm(stringTerms[1]), stringToTerm(stringTerms[2]), stringTerms[3] ? stringToTerm(stringTerms[3]) : undefined);\n }\n if (!value.startsWith('<') || !value.endsWith('>')) {\n throw new Error(`Detected invalid iri for named node (must be wrapped in <>): ${value}`);\n }\n return dataFactory.namedNode(value.slice(1, -1));\n }\n}\nexports.stringToTerm = stringToTerm;\n/**\n * Convert an RDFJS quad to a string-based quad representation.\n * @param {Quad} q An RDFJS quad.\n * @return {IStringQuad} A hash with string-based quad terms.\n * @template Q The type of quad, defaults to RDF.Quad.\n */\nfunction quadToStringQuad(quad) {\n return {\n subject: termToString(quad.subject),\n predicate: termToString(quad.predicate),\n object: termToString(quad.object),\n graph: termToString(quad.graph),\n };\n}\nexports.quadToStringQuad = quadToStringQuad;\n/**\n * Convert a string-based quad representation to an RDFJS quad.\n * @param {IStringQuad} stringQuad A hash with string-based quad terms.\n * @param {RDF.DataFactory} dataFactory An optional datafactory to create terms with.\n * @return {Q} An RDFJS quad.\n * @template Q The type of quad, defaults to RDF.Quad.\n */\nfunction stringQuadToQuad(stringQuad, dataFactory) {\n dataFactory = dataFactory || FACTORY;\n return dataFactory.quad(stringToTerm(stringQuad.subject, dataFactory), stringToTerm(stringQuad.predicate, dataFactory), stringToTerm(stringQuad.object, dataFactory), stringToTerm(stringQuad.graph, dataFactory));\n}\nexports.stringQuadToQuad = stringQuadToQuad;\nfunction escapeIRI(iriValue) {\n return iriValue.replace(escapePattern, replaceEscapedCharacter);\n}\nfunction escapeStringRDF(stringValue) {\n if (escapePattern.test(stringValue)) {\n stringValue = stringValue.replace(escapePattern, replaceEscapedCharacter);\n }\n return stringValue;\n}\n// Characters in literals and IRIs that require escaping\n// Also containing potential surrogate pairs\n/* eslint-disable require-unicode-regexp */ /* eslint-disable unicorn/better-regex */\nconst escapePattern = /[\"\\\\\\t\\n\\r\\b\\f\\u0000-\\u0019]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n/* eslint-enable require-unicode-regexp */ /* eslint-enable unicorn/better-regex */\nconst escapes = new Map([\n ['\\\\', '\\\\\\\\'],\n ['\"', '\\\\\"'],\n ['\\t', '\\\\t'],\n ['\\n', '\\\\n'],\n ['\\r', '\\\\r'],\n ['\\b', '\\\\b'],\n ['\\f', '\\\\f'],\n]);\nfunction replaceEscapedCharacter(character) {\n // Try simplest case first, get replacement for character\n const result = escapes.get(character);\n if (!result) {\n if (character.length === 1) {\n // Single unicode charachters, i.e. not a surrogate pair\n const code = character.charCodeAt(0).toString(16);\n return `${'\\\\u0000'.slice(0, -code.length)}${code}`;\n }\n // Surrogate pairs\n const code = ((character.charCodeAt(0) - 55296) * 1024 + character.charCodeAt(1) + 9216).toString(16);\n return `${'\\\\U00000000'.slice(0, -code.length)}${code}`;\n }\n return result;\n}\n//# sourceMappingURL=TermUtil.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.termToString = exports.stringToTerm = exports.stringQuadToQuad = exports.quadToStringQuad = exports.getLiteralValue = exports.getLiteralType = exports.getLiteralLanguage = void 0;\nconst TermUtil_1 = require(\"./lib/TermUtil\");\nObject.defineProperty(exports, \"getLiteralLanguage\", { enumerable: true, get: function () { return TermUtil_1.getLiteralLanguage; } });\nObject.defineProperty(exports, \"getLiteralType\", { enumerable: true, get: function () { return TermUtil_1.getLiteralType; } });\nObject.defineProperty(exports, \"getLiteralValue\", { enumerable: true, get: function () { return TermUtil_1.getLiteralValue; } });\nObject.defineProperty(exports, \"quadToStringQuad\", { enumerable: true, get: function () { return TermUtil_1.quadToStringQuad; } });\nObject.defineProperty(exports, \"stringQuadToQuad\", { enumerable: true, get: function () { return TermUtil_1.stringQuadToQuad; } });\nObject.defineProperty(exports, \"stringToTerm\", { enumerable: true, get: function () { return TermUtil_1.stringToTerm; } });\nObject.defineProperty(exports, \"termToString\", { enumerable: true, get: function () { return TermUtil_1.termToString; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.stringQuadToQuad = exports.quadToStringQuad = exports.stringToTerm = exports.getLiteralLanguage = exports.getLiteralType = exports.getLiteralValue = exports.termToString = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst FACTORY = new rdf_data_factory_1.DataFactory();\n/**\n * Utility methods for converting between string-based RDF representations and RDFJS objects.\n *\n * RDF Terms are represented as follows:\n * * Blank nodes: '_:myBlankNode'\n * * Variables: '?myVariable'\n * * Literals: '\"myString\"', '\"myLanguageString\"@en-us', '\"3\"^^xsd:number'\n * * URIs: 'http://example.org'\n *\n * Quads/triples are represented as hashes with 'subject', 'predicate', 'object' and 'graph' (optional)\n * as keys, and string-based RDF terms as values.\n */\n/**\n * Convert an RDFJS term to a string-based representation.\n * @param {RDF.Term} term An RDFJS term.\n * @return {string} A string-based term representation.\n */\nfunction termToString(term) {\n // TODO: remove nasty any casts when this TS bug has been fixed: https://github.com/microsoft/TypeScript/issues/26933\n if (!term) {\n return undefined;\n }\n switch (term.termType) {\n case 'NamedNode': return term.value;\n case 'BlankNode': return ('_:' + term.value);\n case 'Literal':\n const literalValue = term;\n return ('\"' + literalValue.value + '\"' +\n (literalValue.datatype &&\n literalValue.datatype.value !== 'http://www.w3.org/2001/XMLSchema#string' &&\n literalValue.datatype.value !== 'http://www.w3.org/1999/02/22-rdf-syntax-ns#langString' ?\n '^^' + literalValue.datatype.value : '') +\n (literalValue.language ? '@' + literalValue.language : ''));\n case 'Quad': return `<<${termToString(term.subject)} ${termToString(term.predicate)} ${termToString(term.object)}${term.graph.termType === 'DefaultGraph' ? '' : ' ' + termToString(term.graph)}>>`;\n case 'Variable': return ('?' + term.value);\n case 'DefaultGraph': return term.value;\n }\n}\nexports.termToString = termToString;\n/**\n * Get the string value of a literal.\n * @param {string} literalValue An RDF literal enclosed by '\"'.\n * @return {string} The literal value inside the '\"'.\n */\nfunction getLiteralValue(literalValue) {\n const match = /^\"([^]*)\"/.exec(literalValue);\n if (!match) {\n throw new Error(literalValue + ' is not a literal');\n }\n return match[1];\n}\nexports.getLiteralValue = getLiteralValue;\n/**\n * Get the datatype of the given literal.\n * @param {string} literalValue An RDF literal.\n * @return {string} The datatype of the literal.\n */\nfunction getLiteralType(literalValue) {\n const match = /^\"[^]*\"(?:\\^\\^([^\"]+)|(@)[^@\"]+)?$/.exec(literalValue);\n if (!match) {\n throw new Error(literalValue + ' is not a literal');\n }\n return match[1] || (match[2]\n ? 'http://www.w3.org/1999/02/22-rdf-syntax-ns#langString' : 'http://www.w3.org/2001/XMLSchema#string');\n}\nexports.getLiteralType = getLiteralType;\n/**\n * Get the language of the given literal.\n * @param {string} literalValue An RDF literal.\n * @return {string} The language of the literal.\n */\nfunction getLiteralLanguage(literalValue) {\n const match = /^\"[^]*\"(?:@([^@\"]+)|\\^\\^[^\"]+)?$/.exec(literalValue);\n if (!match) {\n throw new Error(literalValue + ' is not a literal');\n }\n return match[1] ? match[1].toLowerCase() : '';\n}\nexports.getLiteralLanguage = getLiteralLanguage;\n/**\n * Transform a string-based RDF term to an RDFJS term.\n * @param {string} value A string-based RDF-term.\n * @param {RDF.DataFactory} dataFactory An optional datafactory to create terms with.\n * @return {RDF.Term} An RDF-JS term.\n */\nfunction stringToTerm(value, dataFactory) {\n dataFactory = dataFactory || FACTORY;\n if (!value || !value.length) {\n return dataFactory.defaultGraph();\n }\n switch (value[0]) {\n case '_': return dataFactory.blankNode(value.substr(2));\n case '?':\n if (!dataFactory.variable) {\n throw new Error(`Missing 'variable()' method on the given DataFactory`);\n }\n return dataFactory.variable(value.substr(1));\n case '\"':\n const language = getLiteralLanguage(value);\n const type = dataFactory.namedNode(getLiteralType(value));\n return dataFactory.literal(getLiteralValue(value), language || type);\n case '<':\n default:\n if (value[0] === '<' && value.length > 4 && value[1] === '<' && value[value.length - 1] === '>' && value[value.length - 2] === '>') {\n // Iterate character-by-character to detect spaces that are *not* wrapped in <<>>\n const terms = value.slice(2, -2).trim();\n let stringTerms = [];\n let ignoreTags = 0;\n let lastIndex = 0;\n let inQuote = false;\n for (let i = 0; i < terms.length; i++) {\n const char = terms[i];\n if (char === '<')\n ignoreTags++;\n if (char === '>') {\n if (ignoreTags === 0) {\n throw new Error('Found closing tag without opening tag in ' + value);\n }\n else {\n ignoreTags--;\n }\n }\n if (char === '\"') {\n let escaped = false;\n let j = i;\n while (j-- > 0 && terms[j] === '\\\\') {\n escaped = !escaped;\n }\n if (!escaped) {\n // We have reached an unescaped quote\n inQuote = !inQuote;\n }\n }\n if (char === ' ' && !inQuote && ignoreTags === 0) {\n stringTerms.push(terms.slice(lastIndex, i));\n while (terms[i + 1] === ' ') {\n i += 1;\n }\n lastIndex = i + 1;\n }\n }\n if (ignoreTags !== 0) {\n throw new Error('Found opening tag without closing tag in ' + value);\n }\n stringTerms.push(terms.slice(lastIndex, terms.length));\n // We require 3 or 4 components\n if (stringTerms.length !== 3 && stringTerms.length !== 4) {\n throw new Error('Nested quad syntax error ' + value);\n }\n stringTerms = stringTerms.map(term => term.startsWith('<') && !term.includes(' ') ? term.slice(1, -1) : term);\n return dataFactory.quad(stringToTerm(stringTerms[0]), stringToTerm(stringTerms[1]), stringToTerm(stringTerms[2]), stringTerms[3] ? stringToTerm(stringTerms[3]) : undefined);\n }\n return dataFactory.namedNode(value);\n }\n}\nexports.stringToTerm = stringToTerm;\n/**\n * Convert an RDFJS quad to a string-based quad representation.\n * @param {Quad} q An RDFJS quad.\n * @return {IStringQuad} A hash with string-based quad terms.\n * @template Q The type of quad, defaults to RDF.Quad.\n */\nfunction quadToStringQuad(q) {\n // tslint:disable:object-literal-sort-keys\n return {\n subject: termToString(q.subject),\n predicate: termToString(q.predicate),\n object: termToString(q.object),\n graph: termToString(q.graph),\n };\n // tslint:enable:object-literal-sort-keys\n}\nexports.quadToStringQuad = quadToStringQuad;\n/**\n * Convert a string-based quad representation to an RDFJS quad.\n * @param {IStringQuad} stringQuad A hash with string-based quad terms.\n * @param {RDF.DataFactory} dataFactory An optional datafactory to create terms with.\n * @return {Q} An RDFJS quad.\n * @template Q The type of quad, defaults to RDF.Quad.\n */\nfunction stringQuadToQuad(stringQuad, dataFactory) {\n dataFactory = dataFactory || FACTORY;\n return dataFactory.quad(stringToTerm(stringQuad.subject, dataFactory), stringToTerm(stringQuad.predicate, dataFactory), stringToTerm(stringQuad.object, dataFactory), stringToTerm(stringQuad.graph, dataFactory));\n}\nexports.stringQuadToQuad = stringQuadToQuad;\n//# sourceMappingURL=TermUtil.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/QuadTermUtil\"), exports);\n__exportStar(require(\"./lib/TermUtil\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.matchPatternMappings = exports.matchPatternComplete = exports.matchPattern = exports.matchTerm = exports.getValueNestedPath = exports.someTermsNested = exports.someTerms = exports.everyTermsNested = exports.everyTerms = exports.reduceTermsNested = exports.reduceTerms = exports.mapTermsNested = exports.mapTerms = exports.filterQuadTermNamesNested = exports.filterQuadTermNames = exports.filterTermsNested = exports.filterTerms = exports.forEachTermsNested = exports.forEachTerms = exports.collectNamedTerms = exports.getNamedTerms = exports.getTermsNested = exports.getTerms = exports.TRIPLE_TERM_NAMES = exports.QUAD_TERM_NAMES = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst DF = new rdf_data_factory_1.DataFactory();\n/**\n * All available quad term names.\n * @type {[string , string , string , string]}\n */\nexports.QUAD_TERM_NAMES = ['subject', 'predicate', 'object', 'graph'];\n/**\n * All available triple term names.\n * @type {[string , string , string]}\n */\nexports.TRIPLE_TERM_NAMES = ['subject', 'predicate', 'object'];\n/**\n * Get all terms in the given quad.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {boolean} ignoreDefaultGraph If true and the quad has the default graph as graph,\n * this term will not be returned in the array.\n * (default: false)\n * @return {Term[]} The available terms in the quad.\n */\nfunction getTerms(quad, ignoreDefaultGraph) {\n if (ignoreDefaultGraph && quad.graph.termType === 'DefaultGraph') {\n return [quad.subject, quad.predicate, quad.object];\n }\n return [quad.subject, quad.predicate, quad.object, quad.graph];\n}\nexports.getTerms = getTerms;\n/**\n * Get all terms in the given quad, including nested quads.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {boolean} ignoreDefaultGraph If true and the quad has the default graph as graph,\n * this term will not be returned in the array.\n * (default: false)\n * @return {Term[]} The available terms in the nested quad, excluding quad terms.\n */\nfunction getTermsNested(quad, ignoreDefaultGraph) {\n const terms = [];\n for (const term of getTerms(quad, ignoreDefaultGraph)) {\n if (term.termType === 'Quad') {\n getTermsNested(term, ignoreDefaultGraph).forEach(subTerm => terms.push(subTerm));\n }\n else {\n terms.push(term);\n }\n }\n return terms;\n}\nexports.getTermsNested = getTermsNested;\n/**\n * Convert the given quad to an array of named terms.\n * This is the reverse operation of {@link collectNamedTerms}.\n * @param {BaseQuad} quad An RDFJS quad.\n * @return {INamedTerm[]} An array of named terms.\n */\nfunction getNamedTerms(quad) {\n return [\n { key: 'subject', value: quad.subject },\n { key: 'predicate', value: quad.predicate },\n { key: 'object', value: quad.object },\n { key: 'graph', value: quad.graph },\n ];\n}\nexports.getNamedTerms = getNamedTerms;\n/**\n * Convert an array of named terms to an RDFJS quad.\n * This is the reverse operation of {@link getNamedTerms}.\n * @param {INamedTerm[]} namedTerms An array of named terms.\n * @param {(termName: QuadTermName) => Term} defaultCb An optional callback for when\n * certain terms are not available in the array.\n * @param {RDF.DataFactory} dataFactory A custom data factory to create quads.\n * @return {Q} The resulting RDFJS quad.\n * @template Q The type of quad to output, defaults to RDF.Quad.\n */\nfunction collectNamedTerms(namedTerms, defaultCb, dataFactory) {\n const elements = {};\n namedTerms.forEach((namedTerm) => elements[namedTerm.key] = namedTerm.value);\n if (defaultCb) {\n elements.subject = elements.subject || defaultCb('subject');\n elements.predicate = elements.predicate || defaultCb('predicate');\n elements.object = elements.object || defaultCb('object');\n elements.graph = elements.graph || defaultCb('graph');\n }\n return (dataFactory || DF).quad(elements.subject, elements.predicate, elements.object, elements.graph);\n}\nexports.collectNamedTerms = collectNamedTerms;\n/**\n * Iterates over each term.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {(value: Term, key: QuadTermName} cb A callback function.\n */\nfunction forEachTerms(quad, cb) {\n cb(quad.subject, 'subject');\n cb(quad.predicate, 'predicate');\n cb(quad.object, 'object');\n cb(quad.graph, 'graph');\n}\nexports.forEachTerms = forEachTerms;\n/**\n * Iterates over each leaf term, while recursing into quoted triples.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {(value: Term, key: QuadTermName} cb A callback function.\n * @param QuadTermName[] keys The current key path.\n */\nfunction forEachTermsNested(quad, cb, keys = []) {\n if (quad.subject.termType === 'Quad') {\n forEachTermsNested(quad.subject, cb, [...keys, 'subject']);\n }\n else {\n cb(quad.subject, [...keys, 'subject']);\n }\n if (quad.predicate.termType === 'Quad') {\n forEachTermsNested(quad.predicate, cb, [...keys, 'predicate']);\n }\n else {\n cb(quad.predicate, [...keys, 'predicate']);\n }\n if (quad.object.termType === 'Quad') {\n forEachTermsNested(quad.object, cb, [...keys, 'object']);\n }\n else {\n cb(quad.object, [...keys, 'object']);\n }\n if (quad.graph.termType === 'Quad') {\n forEachTermsNested(quad.graph, cb, [...keys, 'graph']);\n }\n else {\n cb(quad.graph, [...keys, 'graph']);\n }\n}\nexports.forEachTermsNested = forEachTermsNested;\n/**\n * Get all terms in the given quad that return true on the given filter function.\n * @param {BaseQuad} quad A quad.\n * @param {(value: Term, key: QuadTermName) => boolean} filter A filter callback.\n * @return {Term[]} The list of matching terms.\n */\nfunction filterTerms(quad, filter) {\n const terms = [];\n if (filter(quad.subject, 'subject')) {\n terms.push(quad.subject);\n }\n if (filter(quad.predicate, 'predicate')) {\n terms.push(quad.predicate);\n }\n if (filter(quad.object, 'object')) {\n terms.push(quad.object);\n }\n if (filter(quad.graph, 'graph')) {\n terms.push(quad.graph);\n }\n return terms;\n}\nexports.filterTerms = filterTerms;\n/**\n * Get all terms in the given quad that return true on the given filter function, while recursing into quoted triples.\n * @param {BaseQuad} quad A quad.\n * @param {(value: Term, key: QuadTermName) => boolean} filter A filter callback.\n * @param QuadTermName[] keys The current key path.\n * @return {Term[]} The list of matching terms.\n */\nfunction filterTermsNested(quad, filter, keys = []) {\n let terms = [];\n if (quad.subject.termType === 'Quad') {\n terms = [...terms, ...filterTermsNested(quad.subject, filter, [...keys, 'subject'])];\n }\n else {\n if (filter(quad.subject, [...keys, 'subject'])) {\n terms.push(quad.subject);\n }\n }\n if (quad.predicate.termType === 'Quad') {\n terms = [...terms, ...filterTermsNested(quad.predicate, filter, [...keys, 'predicate'])];\n }\n else {\n if (filter(quad.predicate, [...keys, 'predicate'])) {\n terms.push(quad.predicate);\n }\n }\n if (quad.object.termType === 'Quad') {\n terms = [...terms, ...filterTermsNested(quad.object, filter, [...keys, 'object'])];\n }\n else {\n if (filter(quad.object, [...keys, 'object'])) {\n terms.push(quad.object);\n }\n }\n if (quad.graph.termType === 'Quad') {\n terms = [...terms, ...filterTermsNested(quad.graph, filter, [...keys, 'graph'])];\n }\n else {\n if (filter(quad.graph, [...keys, 'graph'])) {\n terms.push(quad.graph);\n }\n }\n return terms;\n}\nexports.filterTermsNested = filterTermsNested;\n/**\n * Get all quad term names in the given quad that return true on the given filter function.\n * @param {BaseQuad} quad A quad.\n * @param {(value: Term, key: QuadTermName, all: INamedTerm[]) => boolean} filter A filter callback.\n * @return {QuadTermName[]} The list of matching quad term names.\n */\nfunction filterQuadTermNames(quad, filter) {\n const names = [];\n if (filter(quad.subject, 'subject')) {\n names.push('subject');\n }\n if (filter(quad.predicate, 'predicate')) {\n names.push('predicate');\n }\n if (filter(quad.object, 'object')) {\n names.push('object');\n }\n if (filter(quad.graph, 'graph')) {\n names.push('graph');\n }\n return names;\n}\nexports.filterQuadTermNames = filterQuadTermNames;\n/**\n * Get all quad term names in the given quad that return true on the given filter function, while recursing into quoted triples.\n * @param {BaseQuad} quad A quad.\n * @param {(value: Term, key: QuadTermName, all: INamedTerm[]) => boolean} filter A filter callback.\n * @param QuadTermName[] keys The current key path.\n * @return {QuadTermName[]} The list of matching quad term names.\n */\nfunction filterQuadTermNamesNested(quad, filter, keys = []) {\n let names = [];\n const keysS = [...keys, 'subject'];\n if (quad.subject.termType === 'Quad') {\n names = [...names, ...filterQuadTermNamesNested(quad.subject, filter, keysS)];\n }\n else {\n if (filter(quad.subject, keysS)) {\n names.push(keysS);\n }\n }\n const keysP = [...keys, 'predicate'];\n if (quad.predicate.termType === 'Quad') {\n names = [...names, ...filterQuadTermNamesNested(quad.predicate, filter, keysP)];\n }\n else {\n if (filter(quad.predicate, keysP)) {\n names.push(keysP);\n }\n }\n const keysO = [...keys, 'object'];\n if (quad.object.termType === 'Quad') {\n names = [...names, ...filterQuadTermNamesNested(quad.object, filter, keysO)];\n }\n else {\n if (filter(quad.object, keysO)) {\n names.push(keysO);\n }\n }\n const keysG = [...keys, 'graph'];\n if (quad.graph.termType === 'Quad') {\n names = [...names, ...filterQuadTermNamesNested(quad.graph, filter, keysG)];\n }\n else {\n if (filter(quad.graph, keysG)) {\n names.push(keysG);\n }\n }\n return names;\n}\nexports.filterQuadTermNamesNested = filterQuadTermNamesNested;\n/**\n * Map all terms of a quad.\n * @param {Quad} quad An RDFJS quad.\n * @param {(value: Term, key: QuadTermName) => Term} mapper A mapper function.\n * @param {RDF.DataFactory} dataFactory A custom data factory to create quads.\n * @return {Quad} A new RDFJS quad.\n * @template Q The type of quad, defaults to RDF.Quad.\n */\nfunction mapTerms(quad, mapper, dataFactory) {\n return (dataFactory || DF).quad(mapper(quad.subject, 'subject'), mapper(quad.predicate, 'predicate'), mapper(quad.object, 'object'), mapper(quad.graph, 'graph'));\n}\nexports.mapTerms = mapTerms;\n/**\n * Map all terms of a quad, while recursing into quoted triples.\n * @param {Quad} quad An RDFJS quad.\n * @param {(value: Term, key: QuadTermName) => Term} mapper A mapper function.\n * @param {RDF.DataFactory} dataFactory A custom data factory to create quads.\n * @param QuadTermName[] keys The current key path.\n * @return {Quad} A new RDFJS quad.\n * @template Q The type of quad, defaults to RDF.Quad.\n */\nfunction mapTermsNested(quad, mapper, dataFactory, keys = []) {\n return (dataFactory || DF).quad(quad.subject.termType === 'Quad' ?\n mapTermsNested(quad.subject, mapper, dataFactory, [...keys, 'subject']) :\n mapper(quad.subject, [...keys, 'subject']), quad.predicate.termType === 'Quad' ?\n mapTermsNested(quad.predicate, mapper, dataFactory, [...keys, 'predicate']) :\n mapper(quad.predicate, [...keys, 'predicate']), quad.object.termType === 'Quad' ?\n mapTermsNested(quad.object, mapper, dataFactory, [...keys, 'object']) :\n mapper(quad.object, [...keys, 'object']), quad.graph.termType === 'Quad' ?\n mapTermsNested(quad.graph, mapper, dataFactory, [...keys, 'graph']) :\n mapper(quad.graph, [...keys, 'graph']));\n}\nexports.mapTermsNested = mapTermsNested;\n/**\n * Reduce all terms of a quad.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {(previousValue: U, currentValue: Term, key: QuadTermName) => U} reducer A reduce function.\n * @param {U} initialValue The initial value.\n * @return {U} The final value.\n */\nfunction reduceTerms(quad, reducer, initialValue) {\n let value = initialValue;\n value = reducer(value, quad.subject, 'subject');\n value = reducer(value, quad.predicate, 'predicate');\n value = reducer(value, quad.object, 'object');\n return reducer(value, quad.graph, 'graph');\n}\nexports.reduceTerms = reduceTerms;\n/**\n * Reduce all terms of a quad, while recursing into quoted triples.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {(previousValue: U, currentValue: Term, key: QuadTermName) => U} reducer A reduce function.\n * @param {U} initialValue The initial value.\n * @param QuadTermName[] keys The current key path.\n * @return {U} The final value.\n */\nfunction reduceTermsNested(quad, reducer, initialValue, keys = []) {\n let value = initialValue;\n if (quad.subject.termType === 'Quad') {\n value = reduceTermsNested(quad.subject, reducer, value, [...keys, 'subject']);\n }\n else {\n value = reducer(value, quad.subject, [...keys, 'subject']);\n }\n if (quad.predicate.termType === 'Quad') {\n value = reduceTermsNested(quad.predicate, reducer, value, [...keys, 'predicate']);\n }\n else {\n value = reducer(value, quad.predicate, [...keys, 'predicate']);\n }\n if (quad.object.termType === 'Quad') {\n value = reduceTermsNested(quad.object, reducer, value, [...keys, 'object']);\n }\n else {\n value = reducer(value, quad.object, [...keys, 'object']);\n }\n if (quad.graph.termType === 'Quad') {\n value = reduceTermsNested(quad.graph, reducer, value, [...keys, 'graph']);\n }\n else {\n value = reducer(value, quad.graph, [...keys, 'graph']);\n }\n return value;\n}\nexports.reduceTermsNested = reduceTermsNested;\n/**\n * Determines whether all terms satisfy the specified test.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {(value: Term, key: QuadTermName} checker A checker function.\n * @return {boolean} If all terms satisfy the specified test.\n */\nfunction everyTerms(quad, checker) {\n return checker(quad.subject, 'subject')\n && checker(quad.predicate, 'predicate')\n && checker(quad.object, 'object')\n && checker(quad.graph, 'graph');\n}\nexports.everyTerms = everyTerms;\n/**\n * Determines whether all terms satisfy the specified test, while recursing into quoted triples.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {(value: Term, key: QuadTermName} checker A checker function.\n * @param QuadTermName[] keys The current key path.\n * @return {boolean} If all terms satisfy the specified test.\n */\nfunction everyTermsNested(quad, checker, keys = []) {\n return (quad.subject.termType === 'Quad' ?\n everyTermsNested(quad.subject, checker, [...keys, 'subject']) :\n checker(quad.subject, [...keys, 'subject']))\n && (quad.predicate.termType === 'Quad' ?\n everyTermsNested(quad.predicate, checker, [...keys, 'predicate']) :\n checker(quad.predicate, [...keys, 'predicate']))\n && (quad.object.termType === 'Quad' ?\n everyTermsNested(quad.object, checker, [...keys, 'object']) :\n checker(quad.object, [...keys, 'object']))\n && (quad.graph.termType === 'Quad' ?\n everyTermsNested(quad.graph, checker, [...keys, 'graph']) :\n checker(quad.graph, [...keys, 'graph']));\n}\nexports.everyTermsNested = everyTermsNested;\n/**\n * Determines whether at least one term satisfies the specified test.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {(value: Term, key: QuadTermName} checker A checker function.\n * @return {boolean} If at least one term satisfies the specified test.\n */\nfunction someTerms(quad, checker) {\n return checker(quad.subject, 'subject')\n || checker(quad.predicate, 'predicate')\n || checker(quad.object, 'object')\n || checker(quad.graph, 'graph');\n}\nexports.someTerms = someTerms;\n/**\n * Determines whether at least one term satisfies the specified test, while recursing into quoted triples.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {(value: Term, key: QuadTermName} checker A checker function.\n * @param QuadTermName[] keys The current key path.\n * @return {boolean} If at least one term satisfies the specified test.\n */\nfunction someTermsNested(quad, checker, keys = []) {\n return (quad.subject.termType === 'Quad' ?\n someTermsNested(quad.subject, checker, [...keys, 'subject']) :\n checker(quad.subject, [...keys, 'subject']))\n || (quad.predicate.termType === 'Quad' ?\n someTermsNested(quad.predicate, checker, [...keys, 'predicate']) :\n checker(quad.predicate, [...keys, 'predicate']))\n || (quad.object.termType === 'Quad' ?\n someTermsNested(quad.object, checker, [...keys, 'object']) :\n checker(quad.object, [...keys, 'object']))\n || (quad.graph.termType === 'Quad' ?\n someTermsNested(quad.graph, checker, [...keys, 'graph']) :\n checker(quad.graph, [...keys, 'graph']));\n}\nexports.someTermsNested = someTermsNested;\n/**\n * Get the nested value inside a quoted triple by the given path of quad keys.\n * @param term A term, that can be a quoted triple.\n * @param keys A path of quad term names.\n */\nfunction getValueNestedPath(term, keys) {\n if (keys.length === 0) {\n return term;\n }\n if (term.termType === 'Quad') {\n return getValueNestedPath(term[keys[0]], keys.slice(1));\n }\n throw new Error(`Tried to get ${keys[0]} from term of type ${term.termType}`);\n}\nexports.getValueNestedPath = getValueNestedPath;\n/**\n * Check if the given terms match.\n *\n * At least one of the following must be true:\n * * Term B is undefined.\n * * Term B is a variable.\n * * Term A and B are quads, and return true for `matchPatternComplete`.\n * * Quad term and term are equal (`termB.equals(termA)` return true)\n *\n * @param termA A term.\n * @param termB An optional term.\n */\nfunction matchTerm(termA, termB) {\n return !termB\n || termB.termType === 'Variable'\n || (termB.termType === 'Quad' && termA.termType === 'Quad' && matchPatternComplete(termA, termB))\n || termB.equals(termA);\n}\nexports.matchTerm = matchTerm;\n/**\n * Check if the given quad matches with the given quad terms.\n *\n * Each term must match at least one of the following:\n * * Term is undefined.\n * * Term is a variable.\n * * Quad term and term are both quads, and return true for `matchPatternComplete`.\n * * Quad term and term are equal (`quadTerm.equals(term)` return true)\n *\n * @param {BaseQuad} quad A quad to match with (can not contain variables).\n * @param {Term} subject An optional subject.\n * @param {Term} predicate An optional predicate.\n * @param {Term} object An optional object.\n * @param {Term} graph An optional graph.\n * @return {boolean} If the quad matches with the quad terms.\n */\nfunction matchPattern(quad, subject, predicate, object, graph) {\n return matchTerm(quad.subject, subject)\n && matchTerm(quad.predicate, predicate)\n && matchTerm(quad.object, object)\n && matchTerm(quad.graph, graph);\n}\nexports.matchPattern = matchPattern;\n/**\n * Check if the first quad matches with all terms from the second quad.\n *\n * Each term must match at least one of the following:\n * * Quad2 term is a variable.\n * * Quad1 term and Quad2 term are equal (`term1.equals(term2)` return true)\n *\n * @param {BaseQuad} quad A quad (can not contain variables).\n * @param {BaseQuad} pattern A quad pattern (can contain variables).\n * @return {boolean} If the quad terms match.\n */\nfunction matchPatternComplete(quad, pattern) {\n return matchPattern(quad, pattern.subject, pattern.predicate, pattern.object, pattern.graph);\n}\nexports.matchPatternComplete = matchPatternComplete;\nfunction matchPatternMappings(quad, pattern, opt = {}) {\n const map = {};\n function match(_pattern, _quad) {\n return everyTerms(_pattern, (t1, key) => {\n var _a, _b;\n const t2 = _quad[key];\n switch (t1.termType) {\n case 'Variable':\n return (opt.skipVarMapping && t2.termType === 'Variable')\n || ((_b = (_a = map[t1.value]) === null || _a === void 0 ? void 0 : _a.equals(t2)) !== null && _b !== void 0 ? _b : (map[t1.value] = t2, true));\n case 'Quad':\n return t2.termType === 'Quad' && match(t1, t2);\n default:\n return t1.equals(t2);\n }\n });\n }\n return match(pattern, quad) && (opt.returnMappings ? map : true);\n}\nexports.matchPatternMappings = matchPatternMappings;\n//# sourceMappingURL=QuadTermUtil.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getQuads = exports.getDefaultGraphs = exports.getVariables = exports.getLiterals = exports.getBlankNodes = exports.getNamedNodes = exports.getTermsOfType = exports.uniqTerms = exports.TERM_TYPES = void 0;\nconst rdf_string_1 = require(\"rdf-string\");\n/**\n * All known term types.\n * @see RDF.Term\n * @type {[string , string , string , string , string, string]}\n */\nexports.TERM_TYPES = ['NamedNode', 'BlankNode', 'Literal', 'Variable', 'DefaultGraph', 'Quad'];\n/*\n * Utility methods for handling RDFJS terms.\n */\n/**\n * Create an array of unique terms from the given array.\n * @param {T[]} terms An array of RDFJS terms.\n * @return {T[]} A new array of unique RDFJS terms.\n */\nfunction uniqTerms(terms) {\n const hash = {};\n return terms.filter(term => {\n const termString = (0, rdf_string_1.termToString)(term);\n return !(termString in hash) && (hash[termString] = true);\n });\n}\nexports.uniqTerms = uniqTerms;\n/**\n * Find all terms of the given type in the given array.\n * @param {Term[]} terms An array of RDFJS terms.\n * @param {\"NamedNode\" | \"BlankNode\" | \"Literal\" | \"Variable\" | \"DefaultGraph\" | \"Quad\"} termType A term type.\n * @return {Term[]} A new array with elements from the given array only containing elements of the given type.\n */\nfunction getTermsOfType(terms, termType) {\n return terms.filter((term) => term.termType === termType);\n}\nexports.getTermsOfType = getTermsOfType;\n/**\n * Find all named nodes in the given array.\n * @param {Term[]} terms An array of RDFJS terms.\n * @return {NamedNode[]} A new array with elements from the given array only containing named nodes.\n */\nfunction getNamedNodes(terms) {\n return getTermsOfType(terms, 'NamedNode');\n}\nexports.getNamedNodes = getNamedNodes;\n/**\n * Find all blank nodes in the given array.\n * @param {Term[]} terms An array of RDFJS terms.\n * @return {BlankNode[]} A new array with elements from the given array only containing blank nodes.\n */\nfunction getBlankNodes(terms) {\n return getTermsOfType(terms, 'BlankNode');\n}\nexports.getBlankNodes = getBlankNodes;\n/**\n * Find all literals in the given array.\n * @param {Term[]} terms An array of RDFJS terms.\n * @return {Literal[]} A new array with elements from the given array only containing literals.\n */\nfunction getLiterals(terms) {\n return getTermsOfType(terms, 'Literal');\n}\nexports.getLiterals = getLiterals;\n/**\n * Find all variables in the given array.\n * @param {Term[]} terms An array of RDFJS terms.\n * @return {Variable[]} A new array with elements from the given array only containing variables.\n */\nfunction getVariables(terms) {\n return getTermsOfType(terms, 'Variable');\n}\nexports.getVariables = getVariables;\n/**\n * Find all default graphs in the given array.\n * @param {Term[]} terms An array of RDFJS terms.\n * @return {DefaultGraph[]} A new array with elements from the given array only containing default graphs.\n */\nfunction getDefaultGraphs(terms) {\n return getTermsOfType(terms, 'DefaultGraph');\n}\nexports.getDefaultGraphs = getDefaultGraphs;\n/**\n * Find all quads in the given array.\n * @param {Term[]} terms An array of RDFJS terms.\n * @return {BaseQuad[]} A new array with elements from the given array only containing quads.\n */\nfunction getQuads(terms) {\n return getTermsOfType(terms, 'Quad');\n}\nexports.getQuads = getQuads;\n//# sourceMappingURL=TermUtil.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/IActiveTag\"), exports);\n__exportStar(require(\"./lib/IHtmlParseListener\"), exports);\n__exportStar(require(\"./lib/IRdfaPattern\"), exports);\n__exportStar(require(\"./lib/RdfaParser\"), exports);\n__exportStar(require(\"./lib/RdfaProfile\"), exports);\n__exportStar(require(\"./lib/Util\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IActiveTag.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IHtmlParseListener.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IRdfaPattern.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RdfaParser = void 0;\nconst htmlparser2_1 = require(\"htmlparser2\");\nconst readable_stream_1 = require(\"readable-stream\");\nconst INITIAL_CONTEXT_XHTML = require(\"./initial-context-xhtml.json\");\nconst INITIAL_CONTEXT = require(\"./initial-context.json\");\nconst RdfaProfile_1 = require(\"./RdfaProfile\");\nconst Util_1 = require(\"./Util\");\n/**\n * A stream transformer that parses RDFa (text) streams to an {@link RDF.Stream}.\n */\nclass RdfaParser extends readable_stream_1.Transform {\n constructor(options) {\n super({ readableObjectMode: true });\n this.activeTagStack = [];\n options = options || {};\n this.options = options;\n this.util = new Util_1.Util(options.dataFactory, options.baseIRI);\n this.defaultGraph = options.defaultGraph || this.util.dataFactory.defaultGraph();\n const profile = options.contentType ? Util_1.Util.contentTypeToProfile(options.contentType) : options.profile || '';\n this.features = options.features || RdfaProfile_1.RDFA_FEATURES[profile];\n this.htmlParseListener = options.htmlParseListener;\n this.rdfaPatterns = this.features.copyRdfaPatterns ? {} : null;\n this.pendingRdfaPatternCopies = this.features.copyRdfaPatterns ? {} : null;\n this.parser = this.initializeParser(profile === 'xml');\n this.activeTagStack.push({\n incompleteTriples: [],\n inlist: false,\n language: options.language,\n listMapping: {},\n listMappingLocal: {},\n name: '',\n prefixesAll: Object.assign(Object.assign({}, INITIAL_CONTEXT['@context']), this.features.xhtmlInitialContext ? INITIAL_CONTEXT_XHTML['@context'] : {}),\n prefixesCustom: {},\n skipElement: false,\n vocab: options.vocab,\n });\n }\n /**\n * Parses the given text stream into a quad stream.\n * @param {NodeJS.EventEmitter} stream A text stream.\n * @return {RDF.Stream} A quad stream.\n */\n import(stream) {\n const output = new readable_stream_1.PassThrough({ readableObjectMode: true });\n stream.on('error', (error) => parsed.emit('error', error));\n stream.on('data', (data) => output.push(data));\n stream.on('end', () => output.push(null));\n const parsed = output.pipe(new RdfaParser(this.options));\n return parsed;\n }\n _transform(chunk, encoding, callback) {\n this.parser.write(chunk.toString());\n callback();\n }\n _flush(callback) {\n this.parser.end();\n callback();\n }\n onTagOpen(name, attributes) {\n // Determine the parent tag (ignore skipped tags)\n let parentTagI = this.activeTagStack.length - 1;\n while (parentTagI > 0 && this.activeTagStack[parentTagI].skipElement) {\n parentTagI--;\n }\n let parentTag = this.activeTagStack[parentTagI];\n // If we skipped a tag, make sure we DO use the lang, prefixes and vocab of the skipped tag\n if (parentTagI !== this.activeTagStack.length - 1) {\n parentTag = Object.assign(Object.assign({}, parentTag), { language: this.activeTagStack[this.activeTagStack.length - 1].language, prefixesAll: this.activeTagStack[this.activeTagStack.length - 1].prefixesAll, prefixesCustom: this.activeTagStack[this.activeTagStack.length - 1].prefixesCustom, vocab: this.activeTagStack[this.activeTagStack.length - 1].vocab });\n }\n // Create a new active tag and inherit language scope and baseIRI from parent\n const activeTag = {\n collectChildTags: parentTag.collectChildTags,\n incompleteTriples: [],\n inlist: 'inlist' in attributes,\n listMapping: [],\n listMappingLocal: parentTag.listMapping,\n localBaseIRI: parentTag.localBaseIRI,\n name,\n prefixesAll: null,\n prefixesCustom: null,\n skipElement: false,\n };\n this.activeTagStack.push(activeTag);\n // Save the tag contents if needed\n if (activeTag.collectChildTags) {\n // Add explicitly defined xmlns, xmlns:* and prefixes to attributes, as required by the spec (Step 11, note)\n // Sort prefixes alphabetically for deterministic namespace declaration order\n for (const prefix of Object.keys(parentTag.prefixesCustom).sort()) {\n const suffix = parentTag.prefixesCustom[prefix];\n const attributeKey = prefix === '' ? 'xmlns' : 'xmlns:' + prefix;\n if (!(attributeKey in attributes)) {\n attributes[attributeKey] = suffix;\n }\n }\n const attributesSerialized = Object.keys(attributes).map((key) => `${key}=\"${attributes[key]}\"`).join(' ');\n activeTag.text = [`<${name}${attributesSerialized ? ' ' + attributesSerialized : ''}>`];\n if (this.features.skipHandlingXmlLiteralChildren) {\n return;\n }\n }\n let allowTermsInRelPredicates = true;\n let allowTermsInRevPredicates = true;\n if (this.features.onlyAllowUriRelRevIfProperty) {\n // Ignore illegal rel/rev values when property is present\n if ('property' in attributes && 'rel' in attributes) {\n allowTermsInRelPredicates = false;\n if (attributes.rel.indexOf(':') < 0) {\n delete attributes.rel;\n }\n }\n if ('property' in attributes && 'rev' in attributes) {\n allowTermsInRevPredicates = false;\n if (attributes.rev.indexOf(':') < 0) {\n delete attributes.rev;\n }\n }\n }\n if (this.features.copyRdfaPatterns) {\n // Save the tag if needed\n if (parentTag.collectedPatternTag) {\n const patternTag = {\n attributes,\n children: [],\n name,\n referenced: false,\n rootPattern: false,\n text: [],\n };\n parentTag.collectedPatternTag.children.push(patternTag);\n activeTag.collectedPatternTag = patternTag;\n return;\n }\n // Store tags with type rdfa:Pattern as patterns\n if (attributes.typeof === 'rdfa:Pattern') {\n activeTag.collectedPatternTag = {\n attributes,\n children: [],\n name,\n parentTag,\n referenced: false,\n rootPattern: true,\n text: [],\n };\n return;\n }\n // Instantiate patterns on rdfa:copy\n if (attributes.property === 'rdfa:copy') {\n const copyTargetPatternId = attributes.resource || attributes.href || attributes.src;\n if (this.rdfaPatterns[copyTargetPatternId]) {\n this.emitPatternCopy(parentTag, this.rdfaPatterns[copyTargetPatternId], copyTargetPatternId);\n }\n else {\n if (!this.pendingRdfaPatternCopies[copyTargetPatternId]) {\n this.pendingRdfaPatternCopies[copyTargetPatternId] = [];\n }\n this.pendingRdfaPatternCopies[copyTargetPatternId].push(parentTag);\n }\n return;\n }\n }\n // tags override the baseIRI of the whole document\n if (this.features.baseTag && name === 'base' && attributes.href) {\n this.util.baseIRI = this.util.getBaseIRI(attributes.href);\n }\n // xml:base attributes override the baseIRI of the current tag and children\n if (this.features.xmlBase && attributes['xml:base']) {\n activeTag.localBaseIRI = this.util.getBaseIRI(attributes['xml:base']);\n }\n //