text: /*! For license information please see quadstore.bundle.js.LICENSE.txt */
  !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.quadstore=t():e.quadstore=t()}(self,(function(){return(()=>{var __webpack_modules__={8508:(e,t,r)=>{"use strict";const n=Object.freeze({});function i(e){if("object"!=typeof e||null===e)throw new TypeError("First argument must be an abstract-leveldown compliant store");this.db=e,this._operations=[],this._written=!1}i.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},i.prototype.put=function(e,t,r){this._checkWritten();const i=this.db._checkKey(e)||this.db._checkValue(t);if(i)throw i;return e=this.db._serializeKey(e),t=this.db._serializeValue(t),this._put(e,t,null!=r?r:n),this},i.prototype._put=function(e,t,r){this._operations.push({...r,type:"put",key:e,value:t})},i.prototype.del=function(e,t){this._checkWritten();const r=this.db._checkKey(e);if(r)throw r;return e=this.db._serializeKey(e),this._del(e,null!=t?t:n),this},i.prototype._del=function(e,t){this._operations.push({...t,type:"del",key:e})},i.prototype.clear=function(){return this._checkWritten(),this._clear(),this},i.prototype._clear=function(){this._operations=[]},i.prototype.write=function(e,t){if(this._checkWritten(),"function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("write() requires a callback argument");"object"==typeof e&&null!==e||(e={}),this._written=!0,this._write(e,t)},i.prototype._write=function(e,t){this.db._batch(this._operations,e,t)},i.prototype._nextTick=r(7212),e.exports=i},3538:(e,t,r)=>{"use strict";function n(e){if("object"!=typeof e||null===e)throw new TypeError("First argument must be an abstract-leveldown compliant store");this.db=e,this._ended=!1,this._nexting=!1}n.prototype.next=function(e){let t=this;if(void 0===e)t=new Promise((function(t,r){e=function(e,n,i){e?r(e):void 0===n&&void 0===i?t():t([n,i])}}));else if("function"!=typeof e)throw new Error("next() requires a callback argument");return this._ended?(this._nextTick(e,new Error("cannot call next() after end()")),t):this._nexting?(this._nextTick(e,new Error("cannot call next() before previous next() has completed")),t):(this._nexting=!0,this._next(((t,...r)=>{this._nexting=!1,e(t,...r)})),t)},n.prototype._next=function(e){this._nextTick(e)},n.prototype.seek=function(e){if(this._ended)throw new Error("cannot call seek() after end()");if(this._nexting)throw new Error("cannot call seek() before next() has completed");e=this.db._serializeKey(e),this._seek(e)},n.prototype._seek=function(e){},n.prototype.end=function(e){let t;if(void 0===e)t=new Promise((function(t,r){e=function(e){e?r(e):t()}}));else if("function"!=typeof e)throw new Error("end() requires a callback argument");return this._ended?(this._nextTick(e,new Error("end() already called on iterator")),t):(this._ended=!0,this._end(e),t)},n.prototype._end=function(e){this._nextTick(e)},n.prototype[Symbol.asyncIterator]=async function*(){try{let e;for(;void 0!==(e=await this.next());)yield e}finally{this._ended||await this.end()}},n.prototype._nextTick=r(7212),e.exports=n},2554:(e,t,r)=>{"use strict";const n=r(1675),i=r(5214),o=r(6957),s=r(3538),a=r(8508),u=r(70).R,c=r(70).F,l=Object.prototype.hasOwnProperty,d=["lt","lte","gt","gte"];function p(e){this.status="new",this.supports=n(e,{status:!0})}function h(e,t){const r={};for(const n in t){if(!l.call(t,n))continue;if("start"===n||"end"===n)throw new Error('Legacy range options ("start" and "end") have been removed');let i=t[n];f(n)&&(i=e._serializeKey(i)),r[n]=i}return r}function f(e){return-1!==d.indexOf(e)}p.prototype.open=function(e,t){const r=this.status;if("function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("open() requires a callback argument");"object"==typeof e&&null!==e||(e={}),e.createIfMissing=!1!==e.createIfMissing,e.errorIfExists=!!e.errorIfExists,this.status="opening",this._open(e,(e=>{if(e)return this.status=r,t(e);this.status="open",t()}))},p.prototype._open=function(e,t){this._nextTick(t)},p.prototype.close=function(e){const t=this.status;if("function"!=typeof e)throw new Error("close() requires a callback argument");this.status="closing",this._close((r=>{if(r)return this.status=t,e(r);this.status="closed",e()}))},p.prototype._close=function(e){this._nextTick(e)},p.prototype.get=function(e,t,r){if("function"==typeof t&&(r=t),"function"!=typeof r)throw new Error("get() requires a callback argument");const n=this._checkKey(e);if(n)return this._nextTick(r,n);e=this._serializeKey(e),"object"==typeof t&&null!==t||(t={}),t.asBuffer=!1!==t.asBuffer,this._get(e,t,r)},p.prototype._get=function(e,t,r){this._nextTick((function(){r(new Error("NotFound"))}))},p.prototype.getMany=function(e,t,r){if(r=u(t,r),r=o.fromCallback(r),t=c(t),function(e,t){return!e.isOperational()&&(e._nextTick(t,new Error("Database is not open")),!0)}(this,r))return r.promise;if(!Array.isArray(e))return this._nextTick(r,new Error("getMany() requires an array argument")),r.promise;if(0===e.length)return this._nextTick(r,null,[]),r.promise;"boolean"!=typeof t.asBuffer&&(t={...t,asBuffer:!0});const n=new Array(e.length);for(let t=0;t<e.length;t++){const i=e[t],o=this._checkKey(i);if(o)return this._nextTick(r,o),r.promise;n[t]=this._serializeKey(i)}return this._getMany(n,t,r),r.promise},p.prototype._getMany=function(e,t,r){this._nextTick(r,null,new Array(e.length).fill(void 0))},p.prototype.put=function(e,t,r,n){if("function"==typeof r&&(n=r),"function"!=typeof n)throw new Error("put() requires a callback argument");const i=this._checkKey(e)||this._checkValue(t);if(i)return this._nextTick(n,i);e=this._serializeKey(e),t=this._serializeValue(t),"object"==typeof r&&null!==r||(r={}),this._put(e,t,r,n)},p.prototype._put=function(e,t,r,n){this._nextTick(n)},p.prototype.del=function(e,t,r){if("function"==typeof t&&(r=t),"function"!=typeof r)throw new Error("del() requires a callback argument");const n=this._checkKey(e);if(n)return this._nextTick(r,n);e=this._serializeKey(e),"object"==typeof t&&null!==t||(t={}),this._del(e,t,r)},p.prototype._del=function(e,t,r){this._nextTick(r)},p.prototype.batch=function(e,t,r){if(!arguments.length)return this._chainedBatch();if("function"==typeof t&&(r=t),"function"==typeof e&&(r=e),"function"!=typeof r)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(e))return this._nextTick(r,new Error("batch(array) requires an array argument"));if(0===e.length)return this._nextTick(r);"object"==typeof t&&null!==t||(t={});const n=new Array(e.length);for(let t=0;t<e.length;t++){if("object"!=typeof e[t]||null===e[t])return this._nextTick(r,new Error("batch(array) element must be an object and not `null`"));const i=Object.assign({},e[t]);if("put"!==i.type&&"del"!==i.type)return this._nextTick(r,new Error("`type` must be 'put' or 'del'"));const o=this._checkKey(i.key);if(o)return this._nextTick(r,o);if(i.key=this._serializeKey(i.key),"put"===i.type){const e=this._checkValue(i.value);if(e)return this._nextTick(r,e);i.value=this._serializeValue(i.value)}n[t]=i}this._batch(n,t,r)},p.prototype._batch=function(e,t,r){this._nextTick(r)},p.prototype.clear=function(e,t){if("function"==typeof e)t=e;else if("function"!=typeof t)throw new Error("clear() requires a callback argument");(e=h(this,e)).reverse=!!e.reverse,e.limit="limit"in e?e.limit:-1,this._clear(e,t)},p.prototype._clear=function(e,t){e.keys=!0,e.values=!1,e.keyAsBuffer=!0,e.valueAsBuffer=!0;const r=this._iterator(e),n={},i=e=>{if(e)return r.end((function(){t(e)}));r.next(((e,o)=>e?i(e):void 0===o?r.end(t):void this._del(o,n,i)))};i()},p.prototype._setupIteratorOptions=function(e){return(e=h(this,e)).reverse=!!e.reverse,e.keys=!1!==e.keys,e.values=!1!==e.values,e.limit="limit"in e?e.limit:-1,e.keyAsBuffer=!1!==e.keyAsBuffer,e.valueAsBuffer=!1!==e.valueAsBuffer,e},p.prototype.iterator=function(e){return"object"==typeof e&&null!==e||(e={}),e=this._setupIteratorOptions(e),this._iterator(e)},p.prototype._iterator=function(e){return new s(this)},p.prototype._chainedBatch=function(){return new a(this)},p.prototype._serializeKey=function(e){return e},p.prototype._serializeValue=function(e){return e},p.prototype._checkKey=function(e){return null==e?new Error("key cannot be `null` or `undefined`"):i(e)&&0===e.length?new Error("key cannot be an empty Buffer"):""===e?new Error("key cannot be an empty String"):Array.isArray(e)&&0===e.length?new Error("key cannot be an empty Array"):void 0},p.prototype._checkValue=function(e){if(null==e)return new Error("value cannot be `null` or `undefined`")},p.prototype.isOperational=function(){return"open"===this.status||this._isOperational()},p.prototype._isOperational=function(){return!1},p.prototype._nextTick=r(7212),e.exports=p},4012:(e,t,r)=>{"use strict";t.AbstractLevelDOWN=r(2554),t.AbstractIterator=r(3538),r(8508)},70:(e,t)=>{"use strict";t.R=function(e,t){return"function"==typeof e?e:t},t.F=function(e){return"object"==typeof e&&null!==e?e:{}}},7212:(e,t,r)=>{"use strict";const n=r(4375);e.exports=function(e,...t){0===t.length?n(e):n((()=>e(...t)))}},5214:e=>{e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=u(e),s=o[0],a=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),l=0,d=a>0?s-4:s;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(c(e,a,a+s>u?u:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function u(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,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(e,t,r)=>{"use strict";const n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(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 c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=a(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(z(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(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(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(z(e,SharedArrayBuffer)||e&&z(e.buffer,SharedArrayBuffer)))return h(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 u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||K(e.length)?a(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.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),a(e<0?0:0|f(e))}function p(e){const t=e.length<0?0:0|f(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function f(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(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 $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return J(e).length;default:if(i)return n?-1:$(e).length;t=(""+t).toLowerCase(),i=!0}}function m(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 N(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return A(this,t,r);case"latin1":case"binary":return R(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function g(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),K(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=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:_(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):_(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,i){let o,s=1,a=e.length,u=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;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(c(e,o+n)!==c(t,n)){r=!1;break}if(r)return o}return-1}function v(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(K(n))return s;e[r+s]=n}return s}function O(e,t,r,n){return H($(t,e.length-r),e,r,n)}function j(e,t,r,n){return H(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function T(e,t,r,n){return H(J(t),e,r,n)}function w(e,t,r,n){return H(function(e,t){let r,n,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function S(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(;i<r;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=E));return r}(n)}t.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return d(e)},u.allocUnsafeSlow=function(e){return d(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),z(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(z(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.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;t<e;t+=2)b(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?x(this,0,e):m.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.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 o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),c=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<a;++e)if(c[e]!==l[e]){o=c[e],s=l[e];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=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 o=!1;for(;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return O(this,e,t,r);case"ascii":case"latin1":case"binary":return j(this,e,t,r);case"base64":return T(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const E=4096;function A(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function R(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function N(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=W[e[n]];return i}function P(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function I(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function D(e,t,r,n,i){Q(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function M(e,t,r,n,i){Q(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function C(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,n,o){return t=+t,r>>>=0,o||C(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function q(e,t,r,n,o){return t=+t,r>>>=0,o||C(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.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<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Y((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(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)<<BigInt(32))})),u.prototype.readBigUInt64BE=Y((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(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)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Y((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=Y((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||L(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||L(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(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},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(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},u.prototype.writeBigUInt64LE=Y((function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Y((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(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},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(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},u.prototype.writeBigInt64LE=Y((function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Y((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return q(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return q(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.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<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};const F={};function U(e,t,r){F[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function k(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 Q(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||V(t,e.length-(r+1))}(n,i,o)}function G(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,r){if(Math.floor(e)!==e)throw G(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.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=k(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=k(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const X=/[^+/0-9A-Za-z-_]/g;function $(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.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;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function J(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(X,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(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")}},6957:(e,t,r)=>{"use strict";var n=r(3527);t.fromCallback=function(e,t){if(void 0===e){var r=new Promise((function(t,r){e=function(e,n){e?r(e):t(n)}}));e[void 0!==t?t:"promise"]=r}else if("function"!=typeof e)throw new TypeError("Callback must be a function");return e},t.fromPromise=function(e,t){if(void 0===t)return e;e.then((function(e){n((()=>t(null,e)))})).catch((function(e){n((()=>t(e)))}))}},7187: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 o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}y(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&y(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var i,o,s,c;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,c=l,console&&console.warn&&console.warn(c)}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 p(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;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):f(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function f(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function y(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var c=u.length,l=f(u,c);for(r=0;r<c;++r)n(l[r],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return p(this,e,!0)},o.prototype.rawListeners=function(e){return p(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},645:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,d=r?i-1:0,p=r?-1:1,h=e[t+d];for(d+=p,o=h&(1<<-l)-1,h>>=-l,l+=a;l>0;o=256*o+e[t+d],d+=p,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+d],d+=p,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),o-=c}return(h?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,d=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-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?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+d>=1?p/u:p*Math.pow(2,1-d))*u>=2&&(s++,u/=2),s+d>=l?(a=0,s=l):s+d>=1?(a=(t*u-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=255&a,h+=f,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+h]=255&s,h+=f,s/=256,c-=8);e[r+h-f]|=128*y}},5717: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}}},5502:function(e){e.exports=function(){"use strict";class e{constructor(e,t){this.priv=e,this.index=t,this.data=this.priv.data}hasNext(){return this.index<this.data.length}hasPrevious(){return this.index>0}value(){return this.index<this.data.length?this.data[this.index]:null}setValue(e){if(!this.priv.options.allowSetValue)throw"Must set options.allowSetValue";if(!this.hasNext())throw"Cannot set value at end of set";return this.data[this.index]=e}next(){return this.index>=this.data.length?null:new e(this.priv,this.index+1)}previous(){return this.index<=0?null:new e(this.priv,this.index-1)}}const t=(e,t,r)=>{let n=0,i=e.length;for(;n<i;){const o=n+i>>>1;r(e[o],t)<0?n=o+1:i=o}return n};const r=(e,t)=>{for(;null!==t[e];){const r=t;(t=t[e])._iteratorParentNode=r}return t},n=(e,t)=>{let n,i;if(null!==t[e])n=t,(t=t[e])._iteratorParentNode=n,i="left"===e?"right":"left",t=r(i,t);else{for(;null!==(n=t._iteratorParentNode)&&n[e]===t;)t=n;t=n}return t};class i{constructor(e,t){this.tree=e,this.node=t}next(){if(null===this.node)return null;{const e=n("right",this.node);return new i(this.tree,e)}}previous(){if(null===this.node){if(null===this.tree.root)return null;{this.tree.root._iteratorParentNode=null;const e=r("right",this.tree.root);return new i(this.tree,e)}}{const e=n("left",this.node);return null===e?null:new i(this.tree,e)}}hasNext(){return null!==this.node}hasPrevious(){return null!==this.previous()}value(){return null===this.node?null:this.node.value}setValue(e){if(!this.tree.options.allowSetValue)throw"Must set options.allowSetValue";if(!this.hasNext())throw"Cannot set value at end of set";return this.node.value=e}}i.find=function(e,t,r){const n=e.root;null!=n&&(n._iteratorParentNode=null);let o=n,s=null;for(;null!==o;){const e=r(t,o.value);if(0===e)break;if(e<0){if(null===o.left)break;s=o,o.left._iteratorParentNode=o,o=o.left}else{if(null===o.right){o=s;break}o.right._iteratorParentNode=o,o=o.right}}return new i(e,o)},i.left=e=>{if(null===e.root)return new i(e,null);{e.root._iteratorParentNode=null;const t=r("left",e.root);return new i(e,t)}},i.right=e=>new i(e,null);const o=(e,t)=>{null!==e&&(o(e.left,t),t(e.value),o(e.right,t))};class s{toArray(){const e=[];return o(this.root,(function(t){return e.push(t)})),e}clear(){return this.root=null}forEachImpl(e,t,r){let n=0;o(this.root,(function(i){e.call(r,i,n,t),n+=1}))}contains(e){const t=this.comparator;let r=this.root;for(;null!==r;){const n=t(e,r.value);if(0===n)break;r=n<0?r.left:r.right}return null!==r&&0===t(r.value,e)}findIterator(e){return i.find(this,e,this.comparator)}beginIterator(){return i.left(this)}endIterator(){return i.right(this)}}class a{constructor(e){this.value=e,this.left=null,this.right=null}}const u=(e,t,r)=>{if(null===e)throw"Value not in set";const n=r(t,e.value);if(n<0)e.left=u(e.left,t,r);else if(n>0)e.right=u(e.right,t,r);else if(null===e.left&&null===e.right)e=null;else if(null===e.right)e=e.left;else if(null===e.left)e=e.right;else{const t=((e,t)=>{for(;null!==e[t];)e=e[t];return e})(e.right,"left");e.value=t.value,e.right=u(e.right,t.value,r)}return e};class c{constructor(e){this.value=e,this.left=null,this.right=null,this.isRed=!0}}const l=e=>{const t=e.right;return e.right=t.left,t.left=e,t.isRed=e.isRed,e.isRed=!0,t},d=e=>{const t=e.left;return e.left=t.right,t.right=e,t.isRed=e.isRed,e.isRed=!0,t},p=e=>{e.isRed=!e.isRed,e.left.isRed=!e.left.isRed,e.right.isRed=!e.right.isRed},h=e=>(p(e),null!==e.right&&null!==e.right.left&&e.right.left.isRed&&(e.right=d(e.right),e=l(e),p(e)),e),f=(e,t,r,n)=>{if(null===e)return new c(t);const i=r(t,e.value);return 0===i?e.value=n(e.value,t):i<0?e.left=f(e.left,t,r,n):e.right=f(e.right,t,r,n),null===e.right||!e.right.isRed||null!==e.left&&e.left.isRed||(e=l(e)),null!==e.left&&e.left.isRed&&null!==e.left.left&&e.left.left.isRed&&(e=d(e)),null!==e.left&&e.left.isRed&&null!==e.right&&e.right.isRed&&p(e),e},y=e=>(null!==e.right&&e.right.isRed&&(e=l(e)),null!==e.left&&e.left.isRed&&null!==e.left.left&&e.left.left.isRed&&(e=d(e)),null!==e.left&&e.left.isRed&&null!==e.right&&e.right.isRed&&p(e),e),m=e=>null===e.left?null:(e.left.isRed||null!==e.left.left&&e.left.left.isRed||(e=h(e)),e.left=m(e.left),y(e)),b=(e,t,r)=>{if(null===e)throw"Value not in set";if(r(t,e.value)<0){if(null===e.left)throw"Value not in set";e.left.isRed||null!==e.left.left&&e.left.left.isRed||(e=h(e)),e.left=b(e.left,t,r)}else{if(null!==e.left&&e.left.isRed&&(e=d(e)),null===e.right){if(0===r(t,e.value))return null;throw"Value not in set"}e.right.isRed||null!==e.right.left&&e.right.left.isRed||(e=(e=>(p(e),null!==e.left&&null!==e.left.left&&e.left.left.isRed&&(e=d(e),p(e)),e))(e)),0===r(t,e.value)?(e.value=(e=>{for(;null!==e.left;)e=e.left;return e})(e.right).value,e.right=m(e.right)):e.right=b(e.right,t,r)}return null!==e&&(e=y(e)),e};class g extends s{constructor(e){super(),this.options=e,this.comparator=this.options.comparator,this.onInsertConflict=this.options.onInsertConflict,this.root=null}insert(e){this.root=f(this.root,e,this.comparator,this.onInsertConflict),this.root.isRed=!1}remove(e){this.root=b(this.root,e,this.comparator),null!==this.root&&(this.root.isRed=!1)}}const _={OnInsertConflictThrow:(e,t)=>{throw new Error("Value already in set")},OnInsertConflictReplace:(e,t)=>t,OnInsertConflictIgnore:(e,t)=>e};class v extends class{constructor(e){if(null==(null!=e?e.strategy:void 0))throw"Must pass options.strategy, a strategy";if(null==(null!=e?e.comparator:void 0))throw"Must pass options.comparator, a comparator";if(null==(null!=e?e.onInsertConflict:void 0))throw"Must pass options.onInsertConflict, a function";this.priv=new e.strategy(e),this.length=0}insert(e){return this.priv.insert(e),this.length+=1,this}remove(e){return this.priv.remove(e),this.length-=1,this}clear(){return this.priv.clear(),this.length=0,this}contains(e){return this.priv.contains(e)}toArray(){return this.priv.toArray()}forEach(e,t){return this.priv.forEachImpl(e,this,t),this}map(e,t){const r=[];return this.forEach((function(n,i,o){return r.push(e.call(t,n,i,o))})),r}filter(e,t){const r=[];return this.forEach((function(n,i,o){if(e.call(t,n,i,o))return r.push(n)})),r}every(e,t){let r=!0;return this.forEach((function(n,i,o){r&&!e.call(t,n,i,o)&&(r=!1)})),r}some(e,t){let r=!1;return this.forEach((function(n,i,o){!r&&e.call(t,n,i,o)&&(r=!0)})),r}findIterator(e){return this.priv.findIterator(e)}beginIterator(){return this.priv.beginIterator()}endIterator(){return this.priv.endIterator()}}{constructor(e){e||(e={}),e.strategy||(e.strategy=g),e.comparator||(e.comparator=function(e,t){return(e||0)-(t||0)}),e.onInsertConflict||(e.onInsertConflict=_.OnInsertConflictThrow),super(e)}}return v.ArrayStrategy=class{constructor(e){this.options=e,this.onInsertConflict=this.options.onInsertConflict,this.comparator=this.options.comparator,this.data=[]}toArray(){return this.data}insert(e){const r=t(this.data,e,this.comparator);return void 0!==this.data[r]&&0===this.comparator(this.data[r],e)?this.data.splice(r,1,this.onInsertConflict(this.data[r],e)):this.data.splice(r,0,e)}remove(e){const r=t(this.data,e,this.comparator);if(0!==this.comparator(this.data[r],e))throw"Value not in set";return this.data.splice(r,1)}clear(){return this.data.length=0}contains(e){const r=t(this.data,e,this.comparator);return this.index!==this.data.length&&0===this.comparator(this.data[r],e)}forEachImpl(e,t,r){const n=this.data,i=n.length;for(let o=0;o<i;o++)e.call(r,n[o],o,t)}findIterator(r){const n=t(this.data,r,this.comparator);return new e(this,n)}beginIterator(){return new e(this,0)}endIterator(){return new e(this,this.data.length)}},v.BinaryTreeStrategy=class extends s{constructor(e){super(),this.options=e,this.comparator=this.options.comparator,this.onInsertConflict=this.options.onInsertConflict,this.root=null}insert(e){const t=this.comparator;if(null!==this.root){let r=this.root,n=null;for(;;){const i=t(e,r.value);if(0===i)return void(r.value=this.onInsertConflict(r.value,e));if(n=i<0?"left":"right",null===r[n])break;r=r[n]}return r[n]=new a(e)}return this.root=new a(e)}remove(e){return this.root=u(this.root,e,this.comparator)}},v.RedBlackTreeStrategy=g,Object.assign(v,_),v}()},9558:(e,t,r)=>{"use strict";e.exports=h;const n=r(4012).AbstractLevelDOWN,i=r(5717),o=r(9967),s=r(3016),a=r(5568),u=r(8450),c=r(1228),l=r(2854),d=r(8950),p="level-js-";function h(e,t){if(!(this instanceof h))return new h(e,t);if(n.call(this,{bufferKeys:c.bufferKeys(indexedDB),snapshots:!0,permanence:!0,clear:!0,getMany:!0}),t=t||{},"string"!=typeof e)throw new Error("constructor requires a location string argument");this.location=e,this.prefix=null==t.prefix?p:t.prefix,this.version=parseInt(t.version||1,10)}i(h,n),h.prototype.type="level-js",h.prototype._open=function(e,t){const r=indexedDB.open(this.prefix+this.location,this.version);r.onerror=function(){t(r.error||new Error("unknown error"))},r.onsuccess=()=>{this.db=r.result,t()},r.onupgradeneeded=e=>{const t=e.target.result;t.objectStoreNames.contains(this.location)||t.createObjectStore(this.location)}},h.prototype.store=function(e){return this.db.transaction([this.location],e).objectStore(this.location)},h.prototype.await=function(e,t){const r=e.transaction;r.onabort=function(){t(r.error||new Error("aborted by user"))},r.oncomplete=function(){t(null,e.result)}},h.prototype._get=function(e,t,r){const n=this.store("readonly");let i;try{i=n.get(e)}catch(e){return this._nextTick(r,e)}this.await(i,(function(e,n){return e?r(e):void 0===n?r(new Error("NotFound")):void r(null,u(n,t.asBuffer))}))},h.prototype._getMany=function(e,t,r){const n=t.asBuffer,i=this.store("readonly"),s=e.map((e=>t=>{let r;try{r=i.get(e)}catch(e){return t(e)}r.onsuccess=()=>{const e=r.result;t(null,void 0===e?e:u(e,n))},r.onerror=e=>{e.stopPropagation(),t(r.error)}}));o(s,16,r)},h.prototype._del=function(e,t,r){const n=this.store("readwrite");let i;try{i=n.delete(e)}catch(e){return this._nextTick(r,e)}this.await(i,r)},h.prototype._put=function(e,t,r,n){const i=this.store("readwrite");let o;try{o=i.put(t,e)}catch(e){return this._nextTick(n,e)}this.await(o,n)},h.prototype._serializeKey=function(e){return a(e,this.supports.bufferKeys)},h.prototype._serializeValue=function(e){return a(e,!0)},h.prototype._iterator=function(e){return new s(this,this.location,e)},h.prototype._batch=function(e,t,r){if(0===e.length)return this._nextTick(r);const n=this.store("readwrite"),i=n.transaction;let o,s=0;i.onabort=function(){r(o||i.error||new Error("aborted by user"))},i.oncomplete=function(){r()},function t(){const r=e[s++],a=r.key;let u;try{u="del"===r.type?n.delete(a):n.put(r.value,a)}catch(e){return o=e,void i.abort()}s<e.length&&(u.onsuccess=t)}()},h.prototype._clear=function(e,t){let r,n;try{r=d(e)}catch(e){return this._nextTick(t)}if(e.limit>=0)return l(this,this.location,r,e,t);try{const e=this.store("readwrite");n=r?e.delete(r):e.clear()}catch(e){return this._nextTick(t,e)}this.await(n,t)},h.prototype._close=function(e){this.db.close(),this._nextTick(e)},h.prototype.upgrade=function(e){if("open"!==this.status)return this._nextTick(e,new Error("cannot upgrade() before open()"));const t=this.iterator(),r={},n=this;function i(e){if(e)return s(e);t.next(o)}function o(e,t,o){if(e||void 0===t)return s(e);const a=n._serializeKey(u(t,!0)),c=n._serializeValue(u(o,!0));n._batch([{type:"del",key:t},{type:"put",key:a,value:c}],r,i)}function s(r){t.end((function(t){e(r||t)}))}t._deserializeKey=t._deserializeValue=function(e){return e},i()},h.destroy=function(e,t,r){"function"==typeof t&&(r=t,t=p);const n=indexedDB.deleteDatabase(t+e);n.onsuccess=function(){r()},n.onerror=function(e){r(e)}}},3016:(e,t,r)=>{"use strict";const n=r(5717),i=r(4012).AbstractIterator,o=r(8950),s=r(8450),a=function(){};function u(e,t,r){if(i.call(this,e),this._limit=r.limit,this._count=0,this._callback=null,this._cache=[],this._completed=!1,this._aborted=!1,this._error=null,this._transaction=null,this._keys=r.keys,this._values=r.values,this._keyAsBuffer=r.keyAsBuffer,this._valueAsBuffer=r.valueAsBuffer,0===this._limit)return void(this._completed=!0);let n;try{n=o(r)}catch(e){return void(this._completed=!0)}this.createIterator(t,n,r.reverse)}e.exports=u,n(u,i),u.prototype.createIterator=function(e,t,r){const n=this.db.db.transaction([e],"readonly");n.objectStore(e).openCursor(t,r?"prev":"next").onsuccess=e=>{const t=e.target.result;t&&this.onItem(t)},this._transaction=n,n.onabort=()=>{this.onAbort(this._transaction.error||new Error("aborted by user"))},n.oncomplete=()=>{this.onComplete()}},u.prototype.onItem=function(e){this._cache.push(e.key,e.value),(this._limit<=0||++this._count<this._limit)&&e.continue(),this.maybeNext()},u.prototype.onAbort=function(e){this._aborted=!0,this._error=e,this.maybeNext()},u.prototype.onComplete=function(){this._completed=!0,this.maybeNext()},u.prototype.maybeNext=function(){this._callback&&(this._next(this._callback),this._callback=null)},u.prototype._next=function(e){if(this._aborted){const t=this._error;this._error=null,this._nextTick(e,t)}else if(this._cache.length>0){let t=this._cache.shift(),r=this._cache.shift();t=this._keys&&void 0!==t?this._deserializeKey(t,this._keyAsBuffer):void 0,r=this._values&&void 0!==r?this._deserializeValue(r,this._valueAsBuffer):void 0,this._nextTick(e,null,t,r)}else this._completed?this._nextTick(e):this._callback=e},u.prototype._deserializeKey=s,u.prototype._deserializeValue=s,u.prototype._end=function(e){if(this._aborted||this._completed)return this._nextTick(e,this._error);this.onItem=a,this.onAbort=e,this.onComplete=e}},2854:e=>{"use strict";e.exports=function(e,t,r,n,i){if(0===n.limit)return e._nextTick(i);const o=e.db.transaction([t],"readwrite"),s=o.objectStore(t);let a=0;o.oncomplete=function(){i()},o.onabort=function(){i(o.error||new Error("aborted by user"))};const u=s.openKeyCursor?"openKeyCursor":"openCursor",c=n.reverse?"prev":"next";s[u](r,c).onsuccess=function(e){const t=e.target.result;t&&(s.delete(t.key).onsuccess=function(){(n.limit<=0||++a<n.limit)&&t.continue()})}}},8450:(e,t,r)=>{"use strict";const n=r(8764).Buffer,i=function(){if(r.g.TextDecoder){const e=new TextDecoder("utf-8");return e.decode.bind(e)}return function(e){return s(e).toString()}}(),o=function(){if(r.g.TextDecoder){const e=new TextDecoder("utf-8");return e.decode.bind(e)}return function(e){return n.from(e).toString()}}();function s(e){const t=n.from(e.buffer);return e.byteLength===e.buffer.byteLength?t:t.slice(e.byteOffset,e.byteOffset+e.byteLength)}e.exports=function(e,t){return e instanceof Uint8Array?t?s(e):i(e):e instanceof ArrayBuffer?t?n.from(e):o(e):t?n.from(String(e)):String(e)}},8950:(e,t,r)=>{"use strict";const n=r(2303),i=Symbol("none");e.exports=function(e){const t=n.lowerBound(e,i),r=n.upperBound(e,i),o=n.lowerBoundExclusive(e,i),s=n.upperBoundExclusive(e,i);return t!==i&&r!==i?IDBKeyRange.bound(t,r,o,s):t!==i?IDBKeyRange.lowerBound(t,o):r!==i?IDBKeyRange.upperBound(r,s):null}},5568:(e,t,r)=>{"use strict";const n=r(8764).Buffer,i=function(){if(r.g.TextEncoder){const e=new TextEncoder("utf-8");return e.encode.bind(e)}return n.from}();e.exports=function(e,t){return t?n.isBuffer(e)?e:i(String(e)):String(e)}},1228:(e,t,r)=>{"use strict";const n=r(8764).Buffer;t.test=function(e){return function(t){try{return t.cmp(e,0),!0}catch(e){return!1}}},t.bufferKeys=t.test(n.alloc(0))},1675:e=>{"use strict";e.exports=function(...e){const t=e.reduce(((e,t)=>Object.assign(e,t)),{});return Object.assign(t,{bufferKeys:t.bufferKeys||!1,snapshots:t.snapshots||!1,permanence:t.permanence||!1,seek:t.seek||!1,clear:t.clear||!1,getMany:t.getMany||!1,keyIterator:t.keyIterator||!1,valueIterator:t.valueIterator||!1,iteratorNextv:t.iteratorNextv||!1,iteratorAll:t.iteratorAll||!1,status:t.status||!1,createIfMissing:t.createIfMissing||!1,errorIfExists:t.errorIfExists||!1,deferredOpen:t.deferredOpen||!1,openCallback:t.openCallback||!1,promises:t.promises||!1,streams:t.streams||!1,encodings:t.encodings||!1,additionalMethods:Object.assign({},t.additionalMethods)})}},2303:(e,t,r)=>{var n=r(8764).Buffer;function i(e){return void 0!==e&&""!==e}function o(e,t){return Object.hasOwnProperty.call(e,t)}function s(e,t){return Object.hasOwnProperty.call(e,t)&&t}t.compare=function(e,t){if(n.isBuffer(e)){for(var r=Math.min(e.length,t.length),i=0;i<r;i++){var o=e[i]-t[i];if(o)return o}return e.length-t.length}return e<t?-1:e>t?1:0};var a=t.lowerBoundKey=function(e){return s(e,"gt")||s(e,"gte")||s(e,"min")||(e.reverse?s(e,"end"):s(e,"start"))||void 0},u=t.lowerBound=function(e,t){var r=a(e);return r?e[r]:t},c=t.lowerBoundInclusive=function(e){return!o(e,"gt")},l=t.upperBoundInclusive=function(e){return!o(e,"lt")},d=t.lowerBoundExclusive=function(e){return!c(e)},p=t.upperBoundExclusive=function(e){return!l(e)},h=t.upperBoundKey=function(e){return s(e,"lt")||s(e,"lte")||s(e,"max")||(e.reverse?s(e,"start"):s(e,"end"))||void 0},f=t.upperBound=function(e,t){var r=h(e);return r?e[r]:t};function y(e){return e}t.start=function(e,t){return e.reverse?f(e,t):u(e,t)},t.end=function(e,t){return e.reverse?u(e,t):f(e,t)},t.startInclusive=function(e){return e.reverse?l(e):c(e)},t.endInclusive=function(e){return e.reverse?c(e):l(e)},t.toLtgt=function(e,r,n,i,s){r=r||{},n=n||y;var a=arguments.length>3,u=t.lowerBoundKey(e),c=t.upperBoundKey(e);return u?"gt"===u?r.gt=n(e.gt,!1):r.gte=n(e[u],!1):a&&(r.gte=n(i,!1)),c?"lt"===c?r.lt=n(e.lt,!0):r.lte=n(e[c],!0):a&&(r.lte=n(s,!0)),null!=e.reverse&&(r.reverse=!!e.reverse),o(r,"max")&&delete r.max,o(r,"min")&&delete r.min,o(r,"start")&&delete r.start,o(r,"end")&&delete r.end,r},t.contains=function(e,r,n){n=n||t.compare;var o=u(e);if(i(o)&&((s=n(r,o))<0||0===s&&d(e)))return!1;var s,a=f(e);return!i(a)||!((s=n(r,a))>0||0===s&&p(e))},t.filter=function(e,r){return function(n){return t.contains(e,n,r)}}},4951:(module,__unused_webpack_exports,__webpack_require__)=>{(()=>{var __cmncwpk_modules__={"./engine.js":(e,t,r)=>{const n=new(r("../node_modules/@comunica/logger-void/lib/index.js").LoggerVoid),i=new(r("../node_modules/@comunica/core/lib/index.js").Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-init/^2.0.0/components/ActorInit.jsonld#ActorInit_default_bus"}),o=new(r("../node_modules/@comunica/core/lib/index.js").Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-hash-bindings/^2.0.0/components/ActorHashBindings.jsonld#ActorHashBindings_default_bus"}),s=new(r("../node_modules/@comunica/core/lib/index.js").Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-context-preprocess/^2.0.0/components/ActorContextPreprocess.jsonld#ActorContextPreprocess_default_bus"}),a=new(r("../node_modules/@comunica/core/lib/index.js").Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-optimize-query-operation/^2.0.0/components/ActorOptimizeQueryOperation.jsonld#ActorOptimizeQueryOperation_default_bus"}),u=new(r("../node_modules/@comunica/bus-query-operation/lib/index.js").BusQueryOperation)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^2.0.0/components/ActorQueryOperation.jsonld#ActorQueryOperation_default_bus"}),c=new(r("../node_modules/@comunica/core/lib/index.js").Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-parse/^2.0.0/components/ActorQueryParse.jsonld#ActorQueryParse_default_bus"}),l=new(r("../node_modules/@comunica/core/lib/index.js").Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-result-serialize/^2.0.0/components/ActorQueryResultSerialize.jsonld#ActorQueryResultSerialize_default_bus"}),d=new(r("../node_modules/@comunica/core/lib/index.js").Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http-invalidate/^2.0.0/components/ActorHttpInvalidate.jsonld#ActorHttpInvalidate_default_bus"}),p=new(r("../node_modules/@comunica/core/lib/index.js").Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-entries-sort/^2.0.0/components/ActorRdfJoinEntriesSort.jsonld#ActorRdfJoinEntriesSort_default_bus"}),h=new(r("../node_modules/@comunica/core/lib/index.js").Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-selectivity/^2.0.0/components/ActorRdfJoinSelectivity.jsonld#ActorRdfJoinSelectivity_default_bus"}),f=new(r("../node_modules/@comunica/core/lib/index.js").Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-quads/^2.0.0/components/ActorRdfUpdateQuads.jsonld#ActorRdfUpdateQuads_default_bus"}),y=new(r("../node_modules/@comunica/core/lib/index.js").Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^2.0.0/components/ActorRdfJoin.jsonld#ActorRdfJoin_default_bus"}),m=new(r("../node_modules/@comunica/core/lib/index.js").Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-quad-pattern/^2.0.0/components/ActorRdfResolveQuadPattern.jsonld#ActorRdfResolveQuadPattern_default_bus"}),b=(new(r("../node_modules/@comunica/actor-hash-bindings-sha1/lib/index.js").ActorHashBindingsSha1)({name:"urn:comunica:default:hash-bindings/actors#sha1",bus:o}),new(r("../node_modules/@comunica/mediator-race/lib/index.js").MediatorRace)({name:"urn:comunica:default:hash-bindings/mediators#main",bus:o})),g=(new(r("../node_modules/@comunica/actor-context-preprocess-source-to-destination/lib/index.js").ActorContextPreprocessSourceToDestination)({name:"urn:comunica:default:context-preprocess/actors#source-to-destination",bus:s}),new(r("../node_modules/@comunica/mediator-combine-pipeline/lib/index.js").MediatorCombinePipeline)({name:"urn:comunica:default:context-preprocess/mediators#main",bus:s})),_=(new(r("../node_modules/@comunica/actor-optimize-query-operation-join-bgp/lib/index.js").ActorOptimizeQueryOperationJoinBgp)({name:"urn:comunica:default:optimize-query-operation/actors#join-bgp",bus:a}),new(r("../node_modules/@comunica/actor-optimize-query-operation-bgp-to-join/lib/index.js").ActorOptimizeQueryOperationBgpToJoin)({name:"urn:comunica:default:optimize-query-operation/actors#bgp-to-join",bus:a}),new(r("../node_modules/@comunica/actor-optimize-query-operation-join-connected/lib/index.js").ActorOptimizeQueryOperationJoinConnected)({name:"urn:comunica:default:optimize-query-operation/actors#join-connected",bus:a}),new(r("../node_modules/@comunica/mediator-combine-pipeline/lib/index.js").MediatorCombinePipeline)({name:"urn:comunica:default:optimize-query-operation/mediators#main",bus:a})),v=new(r("../node_modules/@comunica/mediator-number/lib/index.js").MediatorNumber)({field:"httpRequests",type:"min",ignoreErrors:!0,name:"urn:comunica:default:query-operation/mediators#main",bus:u}),O=(new(r("../node_modules/@comunica/actor-query-operation-values/lib/index.js").ActorQueryOperationValues)({name:"urn:comunica:default:query-operation/actors#values",bus:u}),new(r("../node_modules/@comunica/mediator-race/lib/index.js").MediatorRace)({name:"urn:comunica:default:query-parse/mediators#main",bus:c})),j=(new(r("../node_modules/@comunica/actor-query-parse-sparql/lib/index.js").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:c}),new(r("../node_modules/@comunica/mediator-race/lib/index.js").MediatorRace)({name:"urn:comunica:default:query-result-serialize/mediators#serialize",bus:l})),T=new(r("../node_modules/@comunica/mediator-combine-union/lib/index.js").MediatorCombineUnion)({field:"mediaTypes",name:"urn:comunica:default:query-result-serialize/mediators#mediaType",bus:l}),w=new(r("../node_modules/@comunica/mediator-combine-union/lib/index.js").MediatorCombineUnion)({field:"mediaTypeFormats",name:"urn:comunica:default:query-result-serialize/mediators#mediaTypeFormat",bus:l}),S=new(r("../node_modules/@comunica/mediator-all/lib/index.js").MediatorAll)({name:"urn:comunica:default:http-invalidate/mediators#main",bus:d}),x=(new(r("../node_modules/@comunica/actor-rdf-join-entries-sort-cardinality/lib/index.js").ActorRdfJoinEntriesSortCardinality)({name:"urn:comunica:default:rdf-join-entries-sort/actors#cardinality",bus:p}),new(r("../node_modules/@comunica/mediator-race/lib/index.js").MediatorRace)({name:"urn:comunica:default:rdf-join-entries-sort/mediators#main",bus:p})),E=(new(r("../node_modules/@comunica/actor-rdf-join-selectivity-variable-counting/lib/index.js").ActorRdfJoinSelectivityVariableCounting)({name:"urn:comunica:default:rdf-join-selectivity/actors#variable-counting",bus:h}),new(r("../node_modules/@comunica/mediator-number/lib/index.js").MediatorNumber)({field:"accuracy",type:"max",ignoreErrors:!0,name:"urn:comunica:default:rdf-join-selectivity/mediators#main",bus:h})),A=(new(r("../node_modules/@comunica/actor-rdf-update-quads-rdfjs-store/lib/index.js").ActorRdfUpdateQuadsRdfJsStore)({name:"urn:comunica:default:rdf-update-quads/actors#rdfjs-store",bus:f}),new(r("../node_modules/@comunica/mediator-race/lib/index.js").MediatorRace)({name:"urn:comunica:default:rdf-update-quads/mediators#main",bus:f})),R=new(r("../node_modules/@comunica/mediator-join-coefficients-fixed/lib/index.js").MediatorJoinCoefficientsFixed)({cpuWeight:1,memoryWeight:1,timeWeight:10,ioWeight:100,name:"urn:comunica:default:rdf-join/mediators#main",bus:y}),N=new(r("../node_modules/@comunica/mediator-race/lib/index.js").MediatorRace)({name:"urn:comunica:default:rdf-resolve-quad-pattern/mediators#main",bus:m}),P=(new(r("../node_modules/@comunica/actor-rdf-resolve-quad-pattern-rdfjs-source/lib/index.js").ActorRdfResolveQuadPatternRdfJsSource)({name:"urn:comunica:default:rdf-resolve-quad-pattern/actors#rdfjs-source",bus:m}),new(r("../node_modules/@comunica/actor-query-operation-describe-subject/lib/index.js").ActorQueryOperationDescribeSubject)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#describe",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-construct/lib/index.js").ActorQueryOperationConstruct)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#construct",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-bgp-join/lib/index.js").ActorQueryOperationBgpJoin)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#bgp",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-ask/lib/index.js").ActorQueryOperationAsk)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#ask",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-filter-sparqlee/lib/index.js").ActorQueryOperationFilterSparqlee)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#filter",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-distinct-hash/lib/index.js").ActorQueryOperationDistinctHash)({mediatorHashBindings:b,mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#distinct",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-from-quad/lib/index.js").ActorQueryOperationFromQuad)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#from",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-group/lib/index.js").ActorQueryOperationGroup)({mediatorHashBindings:b,mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#group",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-extend/lib/index.js").ActorQueryOperationExtend)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#extend",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-orderby-sparqlee/lib/index.js").ActorQueryOperationOrderBySparqlee)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#orderby",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-nop/lib/index.js").ActorQueryOperationNop)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#nop",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-project/lib/index.js").ActorQueryOperationProject)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#project",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-reduced-hash/lib/index.js").ActorQueryOperationReducedHash)({mediatorHashBindings:b,cacheSize:100,mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#reduced",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-service/lib/index.js").ActorQueryOperationService)({forceSparqlEndpoint:!1,mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#service",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-slice/lib/index.js").ActorQueryOperationSlice)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#slice",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-union/lib/index.js").ActorQueryOperationUnion)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#union",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-path-alt/lib/index.js").ActorQueryOperationPathAlt)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#path-alt",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-path-link/lib/index.js").ActorQueryOperationPathLink)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#path-link",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-path-inv/lib/index.js").ActorQueryOperationPathInv)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#path-inv",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-path-nps/lib/index.js").ActorQueryOperationPathNps)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#path-nps",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-path-one-or-more/lib/index.js").ActorQueryOperationPathOneOrMore)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#path-one-or-more",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-path-zero-or-more/lib/index.js").ActorQueryOperationPathZeroOrMore)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#path-zero-or-more",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-update-add-rewrite/lib/index.js").ActorQueryOperationAddRewrite)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#update-add",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-update-compositeupdate/lib/index.js").ActorQueryOperationUpdateCompositeUpdate)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#update-composite",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-path-zero-or-one/lib/index.js").ActorQueryOperationPathZeroOrOne)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#path-zero-or-one",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-update-copy-rewrite/lib/index.js").ActorQueryOperationCopyRewrite)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#update-copy",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-update-move-rewrite/lib/index.js").ActorQueryOperationMoveRewrite)({mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#update-move",bus:u}),new(r("../node_modules/@comunica/actor-init-query/lib/index-browser.js").ActorInitQuery)({mediatorOptimizeQueryOperation:_,mediatorQueryOperation:v,mediatorQueryParse:O,mediatorQueryResultSerialize:j,mediatorQueryResultSerializeMediaTypeCombiner:T,mediatorQueryResultSerializeMediaTypeFormatCombiner:w,mediatorContextPreprocess:g,mediatorHttpInvalidate:S,logger:n,defaultQueryInputFormat:"sparql",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",httpAuth:"@comunica/bus-http:auth",httpIncludeCredentials:"@comunica/bus-http:include-credentials",httpProxyHandler:"@comunica/actor-http-proxy:httpProxyHandler",initialBindings:"@comunica/actor-init-query:initialBindings",lenient:"@comunica/actor-init-query:lenient",log:"@comunica/core:log",queryFormat:"@comunica/actor-init-query:queryFormat",queryTimestamp:"@comunica/actor-init-query:queryTimestamp",readOnly:"@comunica/bus-query-operation:readOnly",source:"@comunica/bus-rdf-resolve-quad-pattern:source",sources:"@comunica/bus-rdf-resolve-quad-pattern:sources"},name:"urn:comunica:default:init/actors#query",bus:i}));new(r("../node_modules/@comunica/actor-rdf-join-optional-bind/lib/index.js").ActorRdfJoinOptionalBind)({bindOrder:"depth-first",selectivityModifier:1e-4,mediatorQueryOperation:v,mediatorJoinSelectivity:E,name:"urn:comunica:default:rdf-join/actors#optional-bind",bus:y}),new(r("../node_modules/@comunica/actor-rdf-join-optional-nestedloop/lib/index.js").ActorRdfJoinOptionalNestedLoop)({mediatorJoinSelectivity:E,name:"urn:comunica:default:rdf-join/actors#optional-nested-loop",bus:y}),new(r("../node_modules/@comunica/actor-rdf-join-minus-hash/lib/index.js").ActorRdfJoinMinusHash)({mediatorJoinSelectivity:E,name:"urn:comunica:default:rdf-join/actors#minus-hash",bus:y}),new(r("../node_modules/@comunica/actor-rdf-join-minus-hash-undef/lib/index.js").ActorRdfJoinMinusHashUndef)({mediatorJoinSelectivity:E,name:"urn:comunica:default:rdf-join/actors#minus-hash-undef",bus:y}),new(r("../node_modules/@comunica/actor-rdf-join-inner-none/lib/index.js").ActorRdfJoinNone)({mediatorJoinSelectivity:E,name:"urn:comunica:default:rdf-join/actors#inner-none",bus:y}),new(r("../node_modules/@comunica/actor-rdf-join-inner-single/lib/index.js").ActorRdfJoinSingle)({mediatorJoinSelectivity:E,name:"urn:comunica:default:rdf-join/actors#inner-single",bus:y}),new(r("../node_modules/@comunica/actor-rdf-join-inner-multi-empty/lib/index.js").ActorRdfJoinMultiEmpty)({mediatorJoinSelectivity:E,name:"urn:comunica:default:rdf-join/actors#inner-multi-empty",bus:y}),new(r("../node_modules/@comunica/actor-rdf-join-inner-multi-bind/lib/index.js").ActorRdfJoinMultiBind)({bindOrder:"depth-first",selectivityModifier:1e-4,mediatorJoinEntriesSort:x,mediatorQueryOperation:v,mediatorJoinSelectivity:E,name:"urn:comunica:default:rdf-join/actors#inner-multi-bind",bus:y}),new(r("../node_modules/@comunica/actor-rdf-join-inner-hash/lib/index.js").ActorRdfJoinHash)({mediatorJoinSelectivity:E,name:"urn:comunica:default:rdf-join/actors#inner-hash",bus:y}),new(r("../node_modules/@comunica/actor-rdf-join-inner-symmetrichash/lib/index.js").ActorRdfJoinSymmetricHash)({mediatorJoinSelectivity:E,name:"urn:comunica:default:rdf-join/actors#inner-symmetric-hash",bus:y}),new(r("../node_modules/@comunica/actor-rdf-join-inner-nestedloop/lib/index.js").ActorRdfJoinNestedLoop)({mediatorJoinSelectivity:E,name:"urn:comunica:default:rdf-join/actors#inner-nested-loop",bus:y}),new(r("../node_modules/@comunica/actor-query-operation-update-clear/lib/index.js").ActorQueryOperationClear)({mediatorUpdateQuads:A,mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#update-clear",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-update-create/lib/index.js").ActorQueryOperationCreate)({mediatorUpdateQuads:A,mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#update-create",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-update-load/lib/index.js").ActorQueryOperationLoad)({mediatorUpdateQuads:A,mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#update-load",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-update-drop/lib/index.js").ActorQueryOperationDrop)({mediatorUpdateQuads:A,mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#update-drop",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-update-deleteinsert/lib/index.js").ActorQueryOperationUpdateDeleteInsert)({mediatorUpdateQuads:A,mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#update-delete-insert",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-leftjoin/lib/index.js").ActorQueryOperationLeftJoin)({mediatorJoin:R,mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#leftjoin",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-minus/lib/index.js").ActorQueryOperationMinus)({mediatorJoin:R,mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#minus",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-join/lib/index.js").ActorQueryOperationJoin)({mediatorJoin:R,mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#join",bus:u}),new(r("../node_modules/@comunica/actor-query-operation-path-seq/lib/index.js").ActorQueryOperationPathSeq)({mediatorJoin:R,mediatorQueryOperation:v,name:"urn:comunica:default:query-operation/actors#path-seq",bus:u}),new(r("../node_modules/@comunica/actor-rdf-join-inner-multi-smallest/lib/index.js").ActorRdfJoinMultiSmallest)({mediatorJoinEntriesSort:x,mediatorJoin:R,mediatorJoinSelectivity:E,name:"urn:comunica:default:rdf-join/actors#inner-multi-smallest",bus:y});new(r("../node_modules/@comunica/actor-query-operation-quadpattern/lib/index.js").ActorQueryOperationQuadpattern)({mediatorResolveQuadPattern:N,name:"urn:comunica:default:query-operation/actors#quadpattern",bus:u}),new(r("../node_modules/@comunica/actor-rdf-resolve-quad-pattern-federated/lib/index.js").ActorRdfResolveQuadPatternFederated)({mediatorResolveQuadPattern:N,skipEmptyPatterns:!1,name:"urn:comunica:default:rdf-resolve-quad-pattern/actors#federated",bus:m}),e.exports=P},"./index.js":(module,__unused_webpack_exports,__cmncwpk_require__)=>{(()=>{const isNode="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;if(isNode&&"undefined"==typeof crypto){const crypto=eval("require('crypto')");__cmncwpk_require__.g.crypto={},__cmncwpk_require__.g.crypto.getRandomValues=e=>(crypto.randomFillSync(e),e)}})();const empty=Object.create(null),{QueryEngineBase}=__cmncwpk_require__("../node_modules/@comunica/actor-init-query/lib/index-browser.js"),engine=new QueryEngineBase(__cmncwpk_require__("./engine.js"));class Engine{constructor(e){this.store=e,this.engine=engine}getContext(e){return{...e,source:this.store,destination:this.store}}query(e,t=empty){return engine.query(e,this.getContext(t))}queryVoid(e,t=empty){return engine.queryVoid(e,this.getContext(t))}queryBindings(e,t=empty){return engine.queryBindings(e,this.getContext(t))}queryQuads(e,t=empty){return engine.queryQuads(e,this.getContext(t))}queryBoolean(e,t=empty){return engine.queryBoolean(e,this.getContext(t))}}module.exports.Engine=Engine,module.exports.__engine=engine},"./require-empty.js":()=>{},"../node_modules/@comunica/actor-abstract-path/lib/ActorAbstractPath.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorAbstractPath=void 0;const n=r("../node_modules/@comunica/bindings-factory/lib/index.js"),i=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),o=r("../node_modules/@comunica/context-entries/lib/index.js"),s=r("asynciterator"),a=r("../node_modules/rdf-data-factory/index.js"),u=r("../node_modules/rdf-string/index.js"),c=r("../node_modules/sparqlalgebrajs/index.js"),l=new a.DataFactory,d=new n.BindingsFactory;class p extends i.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(o.KeysQueryOperation.isPathArbitraryLengthDistinctKey)?{context:e=e.set(o.KeysQueryOperation.isPathArbitraryLengthDistinctKey,!1),operation:void 0}:{context:e=e.set(o.KeysQueryOperation.isPathArbitraryLengthDistinctKey,!0),operation:i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:p.FACTORY.createDistinct(t),context:e}))}}async predicateStarGraphVariable(e,t,r,n,o){const a=this.generateVariable(p.FACTORY.createPath(e,r,t,n)),u=p.FACTORY.createUnion([p.FACTORY.createPattern(e,a,t,n),p.FACTORY.createPattern(t,a,e,n)]),c=i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:o,operation:u})),l=new Set;return{bindingsStream:new s.MultiTransformIterator(c.bindingsStream,{multiTransform:i=>{const a=i.get(n);return l.has(a.value)?new s.EmptyIterator:(l.add(a.value),new s.TransformIterator((async()=>{const i=new s.BufferedIterator;return await this.getObjectsPredicateStar(e,r,a,o,{},i,{count:0}),i.transform({transform(e,r,i){i(d.bindings([[t,e],[n,a]])),r()}})}),{maxBufferSize:128}))},autoStart:!1}),metadata:c.metadata}}async getObjectsPredicateStarEval(e,t,r,n,i){if("Variable"===n.termType)return this.predicateStarGraphVariable(e,t,r,n,i);const o=new s.BufferedIterator,a=await this.getObjectsPredicateStar(e,r,n,i,{},o,{count:0});return{bindingsStream:o.transform({transform(e,r,n){n(d.bindings([[t,e]])),r()}}),metadata:a}}async getObjectsPredicateStar(e,t,r,n,o,s,a){const c=(0,u.termToString)(e);if(o[c])return;s._push(e),o[c]=e,a.count++;const l=this.generateVariable(),d=p.FACTORY.createPath(e,t,l,r),h=i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:d,context:n}));return h.bindingsStream.on("data",(async e=>{const i=e.get(l);await this.getObjectsPredicateStar(i,t,r,n,o,s,a)})),h.bindingsStream.on("end",(()=>{0==--a.count&&s.close()})),h.metadata}async getSubjectAndObjectBindingsPredicateStar(e,t,r,n,o,s,a,c,l,h,f){const y=(0,u.termToString)(n)+(0,u.termToString)(s);if(l[y])return;if(f.count++,l[y]=!0,h._push(d.bindings([[e,r],[t,n]])),y in c){const n=await c[y];for(const i of n)await this.getSubjectAndObjectBindingsPredicateStar(e,t,r,i,o,s,a,c,l,h,f);return void(0==--f.count&&h.close())}const m=new Promise((async(u,d)=>{const y=[],m=this.generateVariable(),b=p.FACTORY.createPath(n,o,m,s),g=i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:b,context:a}));g.bindingsStream.on("data",(async n=>{const i=n.get(m);y.push(i),await this.getSubjectAndObjectBindingsPredicateStar(e,t,r,i,o,s,a,c,l,h,f)})),g.bindingsStream.on("error",d),g.bindingsStream.on("end",(()=>{0==--f.count&&h.close(),u(y)}))}));c[y]=m}}t.ActorAbstractPath=p,p.FACTORY=new c.Factory},"../node_modules/@comunica/actor-abstract-path/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-abstract-path/lib/ActorAbstractPath.js"),t)},"../node_modules/@comunica/actor-context-preprocess-source-to-destination/lib/ActorContextPreprocessSourceToDestination.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessSourceToDestination=void 0;const n=r("../node_modules/@comunica/bus-context-preprocess/lib/index.js"),i=r("../node_modules/@comunica/context-entries/lib/index.js");class o extends n.ActorContextPreprocess{constructor(e){super(e)}async test(e){return!0}async run(e){if(e.context.get(i.KeysRdfResolveQuadPattern.sources)&&!e.context.get(i.KeysRdfUpdateQuads.destination)){const t=e.context.get(i.KeysRdfResolveQuadPattern.sources);if(1===t.length)return{context:e.context.set(i.KeysRdfUpdateQuads.destination,t[0])}}return e}}t.ActorContextPreprocessSourceToDestination=o},"../node_modules/@comunica/actor-context-preprocess-source-to-destination/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-context-preprocess-source-to-destination/lib/ActorContextPreprocessSourceToDestination.js"),t)},"../node_modules/@comunica/actor-hash-bindings-sha1/lib/ActorHashBindingsSha1.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHashBindingsSha1=void 0;const n=r("../node_modules/@comunica/bus-hash-bindings/lib/index.js"),i=r("../node_modules/hash.js/lib/hash.js"),o=r("../node_modules/rdf-string/index.js"),s=r("../node_modules/canonicalize/lib/canonicalize.js");class a 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(s(Object.fromEntries([...e].map((([e,t])=>[(0,o.termToString)(e),(0,o.termToString)(t)]))))).digest("hex"),hashCollisions:!0}}}t.ActorHashBindingsSha1=a},"../node_modules/@comunica/actor-hash-bindings-sha1/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-hash-bindings-sha1/lib/ActorHashBindingsSha1.js"),t)},"../node_modules/@comunica/actor-init-query/lib/ActorInitQuery-browser.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorInitQuery=void 0;const n=r("../node_modules/@comunica/actor-init-query/lib/ActorInitQueryBase.js");class i extends n.ActorInitQueryBase{}t.ActorInitQuery=i},"../node_modules/@comunica/actor-init-query/lib/ActorInitQueryBase.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorInitQueryBase=void 0;const n=r("../node_modules/@comunica/bus-init/lib/index.js");class i extends n.ActorInit{constructor(e){super(e)}async test(e){return!0}async run(e){throw new Error("ActorInitSparql#run is not supported in the browser.")}}t.ActorInitQueryBase=i},"../node_modules/@comunica/actor-init-query/lib/MemoryPhysicalQueryPlanLogger.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryPhysicalQueryPlanLogger=void 0;const n=r("../node_modules/rdf-string/index.js");t.MemoryPhysicalQueryPlanLogger=class{constructor(){this.children=new Map}logOperation(e,t,r,n,i,o){const s={actor:i,logicalOperator:e,physicalOperator:t,rawNode:r,children:[],metadata:o};if(this.children.set(r,s.children),this.rootNode){if(!n)throw new Error("Detected more than one parent-less node");const e=this.children.get(n);if(!e)throw new Error("Could not find parent node");e.push(s)}else{if(n)throw new Error("No root node has been set yet, while a parent is being referenced");this.rootNode=s}}toJson(){return this.rootNode?this.planNodeToJson(this.rootNode):{}}planNodeToJson(e){return{logical:e.logicalOperator,physical:e.physicalOperator,...this.getLogicalMetadata(e.rawNode),...e.metadata,...e.children.length>0?{children:e.children.map((e=>this.planNodeToJson(e)))}:{}}}getLogicalMetadata(e){if("type"in e){const t=e;switch(t.type){case"pattern":return{pattern:this.quadToString(t)};case"project":return{variables:t.variables.map((e=>e.value))}}}return{}}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)}`}`}}},"../node_modules/@comunica/actor-init-query/lib/QueryEngineBase.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryEngineBase=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("../node_modules/@comunica/context-entries/lib/index.js"),o=r("../node_modules/@comunica/core/lib/index.js"),s=r("../node_modules/@comunica/actor-init-query/lib/MemoryPhysicalQueryPlanLogger.js");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 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){t=t||{};for(const e in t)this.actorInitQuery.contextKeyShortcuts[e]&&(t[this.actorInitQuery.contextKeyShortcuts[e]]=t[e],delete t[e]);let r=new o.ActionContext(t),u={language:"sparql",version:"1.1"};r.has(i.KeysInitQuery.queryFormat)&&(u=r.get(i.KeysInitQuery.queryFormat),r=r.delete(i.KeysInitQuery.queryFormat),"graphql"===u.language&&(r=r.setDefault(i.KeysInitQuery.graphqlSingularizeVariables,{})));const c=r.get(i.KeysInitQuery.baseIRI);r=r.setDefault(i.KeysInitQuery.queryTimestamp,new Date).setDefault(i.KeysRdfResolveQuadPattern.sourceIds,new Map).setDefault(i.KeysCore.log,this.actorInitQuery.logger),r=(await this.actorInitQuery.mediatorContextPreprocess.mediate({context:r})).context;const l=r.get(i.KeysInitQuery.explain);let d;if("string"==typeof e){r=r.set(i.KeysInitQuery.queryString,e);const t=await this.actorInitQuery.mediatorQueryParse.mediate({context:r,query:e,queryFormat:u,baseIRI:c});d=t.operation,t.baseIRI&&(r=r.set(i.KeysInitQuery.baseIRI,t.baseIRI))}else d=e;if("parsed"===l)return{explain:!0,type:l,data:d};r.has(i.KeysInitQuery.initialBindings)&&(d=(0,n.materializeOperation)(d,r.get(i.KeysInitQuery.initialBindings)),r=r.delete(i.KeysInitQuery.queryString));const p=await this.actorInitQuery.mediatorOptimizeQueryOperation.mediate({context:r,operation:d});if(d=p.operation,r=p.context||r,"logical"===l)return{explain:!0,type:l,data:d};let h;r=r.set(i.KeysInitQuery.query,d),"physical"===l&&(h=new s.MemoryPhysicalQueryPlanLogger,r=r.set(i.KeysInitQuery.physicalQueryPlanLogger,h));const f=await this.actorInitQuery.mediatorQueryOperation.mediate({context:r,operation:d});f.context=r;const y=a.internalToFinalResult(f);if(h){switch(y.resultType){case"bindings":case"quads":await(await y.execute()).toArray();break;case"boolean":case"void":await y.execute()}return{explain:!0,type:l,data:h.toJson()}}return y}async getResultMediaTypes(e){return e=o.ActionContext.ensureActionContext(e),(await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeCombiner.mediate({context:e,mediaTypes:!0})).mediaTypes}async getResultMediaTypeFormats(e){return e=o.ActionContext.ensureActionContext(e),(await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeFormatCombiner.mediate({context:e,mediaTypeFormats:!0})).mediaTypeFormats}async resultToString(e,t,r){if(r=o.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=o.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},"../node_modules/@comunica/actor-init-query/lib/index-browser.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,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("../node_modules/@comunica/actor-init-query/lib/ActorInitQueryBase.js"),t),i(r("../node_modules/@comunica/actor-init-query/lib/ActorInitQuery-browser.js"),t);var o=r("../node_modules/@comunica/actor-init-query/lib/QueryEngineBase.js");Object.defineProperty(t,"QueryEngineBase",{enumerable:!0,get:function(){return o.QueryEngineBase}})},"../node_modules/@comunica/actor-optimize-query-operation-bgp-to-join/lib/ActorOptimizeQueryOperationBgpToJoin.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationBgpToJoin=void 0;const n=r("../node_modules/@comunica/bus-optimize-query-operation/lib/index.js"),i=r("../node_modules/sparqlalgebrajs/index.js");class o 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=o},"../node_modules/@comunica/actor-optimize-query-operation-bgp-to-join/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-optimize-query-operation-bgp-to-join/lib/ActorOptimizeQueryOperationBgpToJoin.js"),t)},"../node_modules/@comunica/actor-optimize-query-operation-join-bgp/lib/ActorOptimizeQueryOperationJoinBgp.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationJoinBgp=void 0;const n=r("../node_modules/@comunica/bus-optimize-query-operation/lib/index.js"),i=r("../node_modules/sparqlalgebrajs/index.js");class o 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=o},"../node_modules/@comunica/actor-optimize-query-operation-join-bgp/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-optimize-query-operation-join-bgp/lib/ActorOptimizeQueryOperationJoinBgp.js"),t)},"../node_modules/@comunica/actor-optimize-query-operation-join-connected/lib/ActorOptimizeQueryOperationJoinConnected.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationJoinConnected=void 0;const n=r("../node_modules/@comunica/bus-optimize-query-operation/lib/index.js"),i=r("../node_modules/sparqlalgebrajs/index.js");class o extends n.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{join:(e,t)=>({recurse:!1,result:o.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=o.clusterIteration(r)}while(r.length!==n.length);const s=n.map((e=>t.createJoin(e.entries)));return 1===s.length?s[0]:t.createJoin(s,!1)}static clusterIteration(e){const t=[];for(const r of e){let e=!1;for(const n of t)if(o.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=o},"../node_modules/@comunica/actor-optimize-query-operation-join-connected/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-optimize-query-operation-join-connected/lib/ActorOptimizeQueryOperationJoinConnected.js"),t)},"../node_modules/@comunica/actor-query-operation-ask/lib/ActorQueryOperationAsk.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationAsk=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js");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}),i=n.ActorQueryOperation.getSafeBindings(r);return{type:"boolean",execute:()=>new Promise(((e,t)=>{i.bindingsStream.once("data",(()=>{e(!0),i.bindingsStream.close()})),i.bindingsStream.on("end",(()=>e(!1))),i.bindingsStream.on("error",t)}))}}}t.ActorQueryOperationAsk=i},"../node_modules/@comunica/actor-query-operation-ask/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-ask/lib/ActorQueryOperationAsk.js"),t)},"../node_modules/@comunica/actor-query-operation-bgp-join/lib/ActorQueryOperationBgpJoin.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationBgpJoin=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("../node_modules/sparqlalgebrajs/index.js");class o extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"bgp")}async testOperation(e,t){return!0}async runOperation(e,t){return this.mediatorQueryOperation.mediate({operation:o.FACTORY.createJoin(e.patterns),context:t})}}t.ActorQueryOperationBgpJoin=o,o.FACTORY=new i.Factory},"../node_modules/@comunica/actor-query-operation-bgp-join/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-bgp-join/lib/ActorQueryOperationBgpJoin.js"),t)},"../node_modules/@comunica/actor-query-operation-construct/lib/ActorQueryOperationConstruct.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationConstruct=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("../node_modules/rdf-terms/index.js"),o=r("../node_modules/sparqlalgebrajs/index.js"),s=r("../node_modules/@comunica/actor-query-operation-construct/lib/BindingsToQuadsIterator.js");class a 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.getTerms)(e))))))}async testOperation(e,t){return!0}async runOperation(e,t){const r=a.getVariables(e.template),i={type:o.Algebra.types.PROJECT,input:e.input,variables:r},u=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:i,context:t}));return{metadata:()=>u.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 s.BindingsToQuadsIterator(e.template,u.bindingsStream),type:"quads"}}}t.ActorQueryOperationConstruct=a},"../node_modules/@comunica/actor-query-operation-construct/lib/BindingsToQuadsIterator.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsToQuadsIterator=void 0;const n=r("asynciterator"),i=r("../node_modules/rdf-data-factory/index.js"),o=r("../node_modules/rdf-terms/index.js"),s=new i.DataFactory;class a extends n.MultiTransformIterator{constructor(e,t,r=!0){super(t,{autoStart:!1}),this.template=e,this.localizeBlankNodes=r,this.blankNodeCounter=0}static bindTerm(e,t){return"Variable"===t.termType?e.get(t):t}static bindQuad(e,t){try{return(0,o.mapTerms)(t,(t=>{const r=a.bindTerm(e,t);if(!r)throw new Error("Unbound term");return r}))}catch{}}static localizeBlankNode(e,t){return"BlankNode"===t.termType?s.blankNode(`${t.value}${e}`):t}static localizeQuad(e,t){return(0,o.mapTerms)(t,(t=>a.localizeBlankNode(e,t)))}bindTemplate(e,t,r){let n=t.map((t=>a.bindQuad.bind(null,e)(t))).filter(Boolean);return this.localizeBlankNodes&&(n=n.map(a.localizeQuad.bind(null,r))),n}_createTransformer(e){return new n.ArrayIterator(this.bindTemplate(e,this.template,this.blankNodeCounter++))}}t.BindingsToQuadsIterator=a},"../node_modules/@comunica/actor-query-operation-construct/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-construct/lib/ActorQueryOperationConstruct.js"),t),i(r("../node_modules/@comunica/actor-query-operation-construct/lib/BindingsToQuadsIterator.js"),t)},"../node_modules/@comunica/actor-query-operation-describe-subject/lib/ActorQueryOperationDescribeSubject.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationDescribeSubject=void 0;const n=r("../node_modules/@comunica/actor-query-operation-union/lib/index.js"),i=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),o=r("asynciterator"),s=r("../node_modules/rdf-data-factory/index.js"),a=r("../node_modules/sparqlalgebrajs/index.js"),u=new s.DataFactory;class c extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"describe")}async testOperation(e,t){return!0}async runOperation(e,t){const r=e.terms.filter((e=>"Variable"!==e.termType)).map((e=>{const t=[u.quad(e,u.variable("__predicate"),u.variable("__object"))];return t.forEach((e=>e.type="pattern")),{input:{type:a.Algebra.types.BGP,patterns:t},template:t,type:"construct"}}));if(r.length!==e.terms.length){let t=[];e.terms.filter((e=>"Variable"===e.termType)).forEach(((e,r)=>{const n=[u.quad(e,u.variable(`__predicate${r}`),u.variable(`__object${r}`))];n.forEach((e=>e.type="pattern")),t=[...t,...n]})),r.push({input:{type:a.Algebra.types.JOIN,input:[e.input,{type:a.Algebra.types.BGP,patterns:t}]},template:t,type:a.Algebra.types.CONSTRUCT})}const s=(await Promise.all(r.map((e=>this.mediatorQueryOperation.mediate({operation:e,context:t}))))).map(i.ActorQueryOperation.getSafeQuads);return{type:"quads",quadStream:new o.UnionIterator(s.map((e=>e.quadStream)),{autoStart:!1}),metadata:()=>Promise.all(s.map((e=>e.metadata()))).then((e=>n.ActorQueryOperationUnion.unionMetadata(e,!1)))}}}t.ActorQueryOperationDescribeSubject=c},"../node_modules/@comunica/actor-query-operation-describe-subject/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-describe-subject/lib/ActorQueryOperationDescribeSubject.js"),t)},"../node_modules/@comunica/actor-query-operation-distinct-hash/lib/ActorQueryOperationDistinctHash.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationDistinctHash=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js");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},"../node_modules/@comunica/actor-query-operation-distinct-hash/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-distinct-hash/lib/ActorQueryOperationDistinctHash.js"),t)},"../node_modules/@comunica/actor-query-operation-extend/lib/ActorQueryOperationExtend.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationExtend=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("../node_modules/sparqlee/dist/index.js");class o extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"extend")}async testOperation(e,t){return Boolean(new i.AsyncEvaluator(e.expression,n.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation))),!0}async runOperation(e,t){const{expression:r,input:o,variable:s}=e,a=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:o,context:t})),u={...n.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation)},c=new i.AsyncEvaluator(r,u),l=a.bindingsStream.transform({transform:async(e,r,n)=>{try{const t=await c.evaluate(e);n(e.set(s,t))}catch(r){(0,i.isExpressionError)(r)?(n(e),this.logWarn(t,`Expression error for extend operation with bindings '${JSON.stringify(e)}'`)):l.emit("error",r)}r()}});return{type:"bindings",bindingsStream:l,async metadata(){const e=await a.metadata();return{...e,variables:[...e.variables,s]}}}}}t.ActorQueryOperationExtend=o},"../node_modules/@comunica/actor-query-operation-extend/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-extend/lib/ActorQueryOperationExtend.js"),t)},"../node_modules/@comunica/actor-query-operation-filter-sparqlee/lib/ActorQueryOperationFilterSparqlee.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationFilterSparqlee=void 0;const n=r("../node_modules/@comunica/bindings-factory/lib/index.js"),i=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),o=r("../node_modules/sparqlee/dist/index.js");class s extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"filter")}async testOperation(e,t){const r={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation)};return new o.AsyncEvaluator(e.expression,r),!0}async runOperation(e,t){const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t}),s=i.ActorQueryOperation.getSafeBindings(r);i.ActorQueryOperation.validateQueryOutput(s,"bindings");const a={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation)},u=new o.AsyncEvaluator(e.expression,a),c=s.bindingsStream.transform({transform:async(e,r,i)=>{try{await u.evaluateAsEBV(e)&&i(e)}catch(r){(0,o.isExpressionError)(r)?this.logWarn(t,"Error occurred while filtering.",(()=>({error:r,bindings:(0,n.bindingsToString)(e)}))):c.emit("error",r)}r()}});return{type:"bindings",bindingsStream:c,metadata:s.metadata}}}t.ActorQueryOperationFilterSparqlee=s},"../node_modules/@comunica/actor-query-operation-filter-sparqlee/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-filter-sparqlee/lib/ActorQueryOperationFilterSparqlee.js"),t)},"../node_modules/@comunica/actor-query-operation-from-quad/lib/ActorQueryOperationFromQuad.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationFromQuad=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("../node_modules/sparqlalgebrajs/index.js");class o 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):o.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 o.joinOperations(e.patterns.map((e=>{if("DefaultGraph"!==e.graph.termType)return o.FACTORY.createBgp([e]);const r=t.map((t=>o.FACTORY.createBgp([o.FACTORY.createPattern(e.subject,e.predicate,e.object,t)])));return o.unionOperations(r)})));if("DefaultGraph"!==e.graph.termType)return e;const r=t.map((t=>"path"===e.type?o.FACTORY.createPath(e.subject,e.predicate,e.object,t):o.FACTORY.createPattern(e.subject,e.predicate,e.object,t)));return o.unionOperations(r)}return o.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 s=o.FACTORY.createValues([n],[i]);let a;return a="bgp"===e.type?o.FACTORY.createBgp(e.patterns.map((e=>o.FACTORY.createPattern(e.subject,e.predicate,e.object,r)))):"path"===e.type?o.FACTORY.createPath(e.subject,e.predicate,e.object,r):o.FACTORY.createPattern(e.subject,e.predicate,e.object,r),o.FACTORY.createJoin([s,a])}return o.unionOperations(t.map((t=>o.applyOperationNamedGraph(e,[t],r))))}return[...t,...r].some((e=>e.equals(n)))?e:{type:i.Algebra.types.BGP,patterns:[]}}return o.copyOperation(e,(e=>this.applyOperationNamedGraph(e,t,r)))}static joinOperations(e){if(1===e.length)return e[0];if(e.length>1)return o.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 o.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=o.applyOperationDefaultGraph(t,e.default)),(e.named.length>0||e.default.length>0)&&(t=o.applyOperationNamedGraph(t,e.named,e.default)),t}async testOperation(e,t){return!0}async runOperation(e,t){const r=o.createOperation(e);return this.mediatorQueryOperation.mediate({operation:r,context:t})}}t.ActorQueryOperationFromQuad=o,o.FACTORY=new i.Factory,o.ALGEBRA_TYPES=Object.keys(i.Algebra.types).map((e=>i.Algebra.types[e]))},"../node_modules/@comunica/actor-query-operation-from-quad/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-from-quad/lib/ActorQueryOperationFromQuad.js"),t)},"../node_modules/@comunica/actor-query-operation-group/lib/ActorQueryOperationGroup.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationGroup=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("asynciterator"),o=r("../node_modules/sparqlee/dist/index.js"),s=r("../node_modules/@comunica/actor-query-operation-group/lib/GroupsState.js");class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"group")}async testOperation(e,t){for(const r of e.aggregates)new o.AsyncEvaluator(r.expression,n.ActorQueryOperation.getAsyncExpressionContext(t));return!0}async runOperation(e,t){const{hashFunction:r}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:t}),{input:o,aggregates:a}=e,u=await this.mediatorQueryOperation.mediate({operation:o,context:t}),c=n.ActorQueryOperation.getSafeBindings(u),l=[...e.variables,...a.map((e=>e.variable))],d=n.ActorQueryOperation.getAsyncExpressionContext(t);return new Promise(((t,n)=>{const o=new s.GroupsState(r,e,d);c.bindingsStream.on("end",(async()=>{try{const e=new i.ArrayIterator(await o.collectResults(),{autoStart:!1});t({type:"bindings",bindingsStream:e,metadata:async()=>({...await c.metadata(),variables:l})})}catch(e){n(e)}})),c.bindingsStream.on("error",n),c.bindingsStream.on("data",(e=>{o.consumeBindings(e).catch(n)}))}))}}t.ActorQueryOperationGroup=a},"../node_modules/@comunica/actor-query-operation-group/lib/GroupsState.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupsState=void 0;const n=r("../node_modules/@comunica/bindings-factory/lib/index.js"),i=r("../node_modules/rdf-data-factory/index.js"),o=r("../node_modules/sparqlee/dist/index.js"),s=new i.DataFactory,a=new n.BindingsFactory;t.GroupsState=class{constructor(e,t,r){this.hashFunction=e,this.pattern=t,this.sparqleeConfig=r,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))),n=this.hashBindings(r);let i,s=this.groupsInitializer.get(n);if(s){const t=s;i=(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(n).has(t))return;this.distinctHashes.get(n).add(t)}const i=t.variable.value;await r.aggregators[i].put(e)})))})().then((()=>{this.subtractWaitCounterAndCollect()}))}else s=(async()=>{const t={};if(await Promise.all(this.pattern.aggregates.map((async r=>{const n=r.variable.value;t[n]=new o.AsyncAggregateEvaluator(r,this.sparqleeConfig),await t[n].put(e)}))),this.distinctHashes){const t=this.hashBindings(e);this.distinctHashes.set(n,new Set([t]))}const i={aggregators:t,bindings:r};return this.groups.set(n,i),this.subtractWaitCounterAndCollect(),i})(),this.groupsInitializer.set(n,s),i=s;return i}subtractWaitCounterAndCollect(){0==--this.waitCounter&&this.handleResultCollection()}handleResultCollection(){let e=[...this.groups].map((([e,t])=>{const{bindings:r,aggregators:n}=t;let i=r;for(const e in n){const t=n[e].result();t&&(i=i.set(s.variable(e),t))}return i}));if(0===e.length&&0===this.groupVariables.size){const t=[];for(const e of this.pattern.aggregates){const r=e.variable,n=o.AsyncAggregateEvaluator.emptyValue(e);void 0!==n&&t.push([r,n])}e=[a.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)}}},"../node_modules/@comunica/actor-query-operation-group/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-group/lib/ActorQueryOperationGroup.js"),t)},"../node_modules/@comunica/actor-query-operation-join/lib/ActorQueryOperationJoin.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationJoin=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js");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},"../node_modules/@comunica/actor-query-operation-join/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-join/lib/ActorQueryOperationJoin.js"),t)},"../node_modules/@comunica/actor-query-operation-leftjoin/lib/ActorQueryOperationLeftJoin.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationLeftJoin=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("../node_modules/sparqlee/dist/index.js");class o extends n.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:n.ActorQueryOperation.getSafeBindings(e),operation:t}))),o=await this.mediatorJoin.mediate({type:"optional",entries:r,context:t});if(e.expression){const r={...n.ActorQueryOperation.getAsyncExpressionContext(t)},s=new i.AsyncEvaluator(e.expression,r),a=o.bindingsStream.transform({autoStart:!1,transform:async(e,r,n)=>{try{await s.evaluateAsEBV(e)&&n(e)}catch(r){(0,i.isExpressionError)(r)?this.logWarn(t,"Error occurred while filtering.",(()=>({error:r,bindings:e}))):a.emit("error",r)}r()}});o.bindingsStream=a}return o}}t.ActorQueryOperationLeftJoin=o},"../node_modules/@comunica/actor-query-operation-leftjoin/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-leftjoin/lib/ActorQueryOperationLeftJoin.js"),t)},"../node_modules/@comunica/actor-query-operation-minus/lib/ActorQueryOperationMinus.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationMinus=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js");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},"../node_modules/@comunica/actor-query-operation-minus/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-minus/lib/ActorQueryOperationMinus.js"),t)},"../node_modules/@comunica/actor-query-operation-nop/lib/ActorQueryOperationNop.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationNop=void 0;const n=r("../node_modules/@comunica/bindings-factory/lib/index.js"),i=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),o=r("asynciterator"),s=new n.BindingsFactory;class a extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"nop")}async testOperation(e,t){return!0}async runOperation(e,t){return{bindingsStream:new o.SingletonIterator(s.bindings()),metadata:()=>Promise.resolve({cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]}),type:"bindings"}}}t.ActorQueryOperationNop=a},"../node_modules/@comunica/actor-query-operation-nop/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-nop/lib/ActorQueryOperationNop.js"),t)},"../node_modules/@comunica/actor-query-operation-orderby-sparqlee/lib/ActorQueryOperationOrderBySparqlee.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationOrderBySparqlee=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("../node_modules/sparqlalgebrajs/index.js"),o=r("../node_modules/sparqlee/dist/index.js"),s=r("../node_modules/@comunica/actor-query-operation-orderby-sparqlee/lib/SortIterator.js");class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"orderby"),this.window=e.window??Number.POSITIVE_INFINITY}async testOperation(e,t){for(let r of e.expressions)r=this.extractSortExpression(r),new o.AsyncEvaluator(r,n.ActorQueryOperation.getAsyncExpressionContext(t));return!0}async runOperation(e,t){const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t}),i=n.ActorQueryOperation.getSafeBindings(r),a={window:this.window},u={...n.ActorQueryOperation.getAsyncExpressionContext(t)};let{bindingsStream:c}=i;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 o.AsyncEvaluator(r,u),l=async(e,t,r)=>{try{r({bindings:e,result:await i.evaluate(e)})}catch(t){(0,o.isExpressionError)(t)||c.emit("error",t),r({bindings:e,result:void 0})}t()},d=c.transform({transform:l}),p=new s.SortIterator(d,((e,t)=>(0,o.orderTypes)(e.result,t.result,n)),a);c=p.map((({bindings:e,result:t})=>e))}return{type:"bindings",bindingsStream:c,metadata:i.metadata}}extractSortExpression(e){const{expressionType:t,operator:r}=e;return t!==i.Algebra.expressionTypes.OPERATOR?e:"desc"===r?e.args[0]:e}isAscending(e){const{expressionType:t,operator:r}=e;return t!==i.Algebra.expressionTypes.OPERATOR||"desc"!==r}}t.ActorQueryOperationOrderBySparqlee=a},"../node_modules/@comunica/actor-query-operation-orderby-sparqlee/lib/SortIterator.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SortIterator=void 0;const n=r("asynciterator");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,o=n-1;for(;i<=o;)e=Math.trunc((i+o)/2),t=this.sort(r,this.sorted[e]),t<0?i=e+1:t>0?o=e-1:(i=e,o=-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},"../node_modules/@comunica/actor-query-operation-orderby-sparqlee/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-orderby-sparqlee/lib/ActorQueryOperationOrderBySparqlee.js"),t)},"../node_modules/@comunica/actor-query-operation-path-alt/lib/ActorQueryOperationPathAlt.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathAlt=void 0;const n=r("../node_modules/@comunica/actor-abstract-path/lib/index.js"),i=r("../node_modules/@comunica/actor-query-operation-union/lib/index.js"),o=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),s=r("asynciterator"),a=r("../node_modules/sparqlalgebrajs/index.js");class u extends n.ActorAbstractPath{constructor(e){super(e,a.Algebra.types.ALT)}async runOperation(e,t){const r=e.predicate,a=(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(o.ActorQueryOperation.getSafeBindings);return{type:"bindings",bindingsStream:new s.UnionIterator(a.map((e=>e.bindingsStream)),{autoStart:!1}),metadata:()=>Promise.all(a.map((e=>e.metadata()))).then((e=>i.ActorQueryOperationUnion.unionMetadata(e,!0)))}}}t.ActorQueryOperationPathAlt=u},"../node_modules/@comunica/actor-query-operation-path-alt/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-path-alt/lib/ActorQueryOperationPathAlt.js"),t)},"../node_modules/@comunica/actor-query-operation-path-inv/lib/ActorQueryOperationPathInv.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathInv=void 0;const n=r("../node_modules/@comunica/actor-abstract-path/lib/index.js"),i=r("../node_modules/sparqlalgebrajs/index.js");class o 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=o},"../node_modules/@comunica/actor-query-operation-path-inv/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-path-inv/lib/ActorQueryOperationPathInv.js"),t)},"../node_modules/@comunica/actor-query-operation-path-link/lib/ActorQueryOperationPathLink.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathLink=void 0;const n=r("../node_modules/@comunica/actor-abstract-path/lib/index.js"),i=r("../node_modules/sparqlalgebrajs/index.js");class o extends n.ActorAbstractPath{constructor(e){super(e,i.Algebra.types.LINK)}async runOperation(e,t){const r=e.predicate,i=n.ActorAbstractPath.FACTORY.createPattern(e.subject,r.iri,e.object,e.graph);return this.mediatorQueryOperation.mediate({operation:i,context:t})}}t.ActorQueryOperationPathLink=o},"../node_modules/@comunica/actor-query-operation-path-link/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-path-link/lib/ActorQueryOperationPathLink.js"),t)},"../node_modules/@comunica/actor-query-operation-path-nps/lib/ActorQueryOperationPathNps.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathNps=void 0;const n=r("../node_modules/@comunica/actor-abstract-path/lib/index.js"),i=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),o=r("../node_modules/sparqlalgebrajs/index.js");class s extends n.ActorAbstractPath{constructor(e){super(e,o.Algebra.types.NPS)}async runOperation(e,t){const r=e.predicate,o=this.generateVariable(e),s=n.ActorAbstractPath.FACTORY.createPattern(e.subject,o,e.object,e.graph),a=i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:s,context:t}));return{type:"bindings",bindingsStream:a.bindingsStream.transform({filter:e=>!r.iris.some((t=>t.equals(e.get(o)))),transform(e,t,r){r(e.delete(o)),t()}}),metadata:a.metadata}}}t.ActorQueryOperationPathNps=s},"../node_modules/@comunica/actor-query-operation-path-nps/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-path-nps/lib/ActorQueryOperationPathNps.js"),t)},"../node_modules/@comunica/actor-query-operation-path-one-or-more/lib/ActorQueryOperationPathOneOrMore.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathOneOrMore=void 0;const n=r("../node_modules/@comunica/actor-abstract-path/lib/index.js"),i=r("../node_modules/@comunica/bindings-factory/lib/index.js"),o=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),s=r("asynciterator"),a=r("../node_modules/sparqlalgebrajs/index.js"),u=new i.BindingsFactory;class c extends n.ActorAbstractPath{constructor(e){super(e,a.Algebra.types.ONE_OR_MORE_PATH)}async runOperation(e,t){const r=await this.isPathArbitraryLengthDistinct(t,e);if(r.operation)return r.operation;t=r.context;const i=e.predicate;if("Variable"!==e.subject.termType&&"Variable"===e.object.termType){const r=n.ActorAbstractPath.FACTORY.createDistinct(n.ActorAbstractPath.FACTORY.createPath(e.subject,i.path,e.object,e.graph)),a=o.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:r})),c=e.object,l={},d=new s.MultiTransformIterator(a.bindingsStream,{multiTransform:r=>{const n=r.get(c),o="Variable"===e.graph.termType?r.get(e.graph):e.graph;return new s.TransformIterator((async()=>{const r=new s.BufferedIterator;return await this.getObjectsPredicateStar(n,i.path,e.graph,t,l,r,{count:0}),r.transform({transform(t,r,n){let i=u.bindings([[c,t]]);"Variable"===e.graph.termType&&(i=i.set(e.graph,o)),n(i),r()}})}),{maxBufferSize:128})},autoStart:!1}),p="Variable"===e.graph.termType?[c,e.graph]:[c];return{type:"bindings",bindingsStream:d,metadata:async()=>({...await a.metadata(),variables:p})}}if("Variable"===e.subject.termType&&"Variable"===e.object.termType){const r=n.ActorAbstractPath.FACTORY.createDistinct(n.ActorAbstractPath.FACTORY.createPath(e.subject,e.predicate.path,e.object,e.graph)),a=o.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:r})),u=e.subject,c=e.object,l={},d=new s.MultiTransformIterator(a.bindingsStream,{multiTransform:r=>{const n=r.get(u),o=r.get(c),a="Variable"===e.graph.termType?r.get(e.graph):e.graph;return new s.TransformIterator((async()=>{const r=new s.BufferedIterator;return await this.getSubjectAndObjectBindingsPredicateStar(u,c,n,o,i.path,a,t,l,{},r,{count:0}),r.transform({transform(t,r,n){"Variable"===e.graph.termType&&(t=t.set(e.graph,a)),n(t),r()}})}),{maxBufferSize:128})},autoStart:!1}),p="Variable"===e.graph.termType?[u,c,e.graph]:[u,c];return{type:"bindings",bindingsStream:d,metadata:async()=>({...await a.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(i.path)),e.subject,e.graph)});const a=this.generateVariable(),c=o.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.subject,i,a,e.graph)}));return{type:"bindings",bindingsStream:c.bindingsStream.transform({filter:t=>e.object.equals(t.get(a)),transform(t,r,n){n("Variable"===e.graph.termType?u.bindings([[e.graph,t.get(e.graph)]]):u.bindings()),r()}}),metadata:async()=>({...await c.metadata(),variables:"Variable"===e.graph.termType?[e.graph]:[]})}}}t.ActorQueryOperationPathOneOrMore=c},"../node_modules/@comunica/actor-query-operation-path-one-or-more/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-path-one-or-more/lib/ActorQueryOperationPathOneOrMore.js"),t)},"../node_modules/@comunica/actor-query-operation-path-seq/lib/ActorQueryOperationPathSeq.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathSeq=void 0;const n=r("../node_modules/@comunica/actor-abstract-path/lib/index.js"),i=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),o=r("../node_modules/sparqlalgebrajs/index.js");class s extends n.ActorAbstractPath{constructor(e){super(e,o.Algebra.types.SEQ)}async runOperation(e,t){const r=e.predicate;let o=e.subject;const s=[],a=await Promise.all(r.input.map(((i,a)=>{const u=a===r.input.length-1?e.object:this.generateVariable(e,`b${a}`),c=n.ActorAbstractPath.FACTORY.createPath(o,i,u,e.graph),l=this.mediatorQueryOperation.mediate({context:t,operation:c});return o=u,a<r.input.length-1&&s.push(u),{output:l,operation:c}})).map((async({output:e,operation:t})=>({output:i.ActorQueryOperation.getSafeBindings(await e),operation:t})))),u=i.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:"inner",entries:a,context:t}));return{type:"bindings",bindingsStream:u.bindingsStream.transform({transform(e,t,r){for(const t of s)e=e.delete(t);r(e),t()}}),async metadata(){const e=await u.metadata(),t=e.variables.filter((e=>!s.some((t=>t.value===e.value))));return{...e,variables:t}}}}}t.ActorQueryOperationPathSeq=s},"../node_modules/@comunica/actor-query-operation-path-seq/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-path-seq/lib/ActorQueryOperationPathSeq.js"),t)},"../node_modules/@comunica/actor-query-operation-path-zero-or-more/lib/ActorQueryOperationPathZeroOrMore.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathZeroOrMore=void 0;const n=r("../node_modules/@comunica/actor-abstract-path/lib/index.js"),i=r("../node_modules/@comunica/bindings-factory/lib/index.js"),o=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),s=r("asynciterator"),a=r("../node_modules/rdf-string/index.js"),u=r("../node_modules/sparqlalgebrajs/index.js"),c=new i.BindingsFactory;class l extends n.ActorAbstractPath{constructor(e){super(e,u.Algebra.types.ZERO_OR_MORE_PATH)}async runOperation(e,t){const r=await this.isPathArbitraryLengthDistinct(t,e);if(r.operation)return r.operation;t=r.context;const i=e.predicate,u="Variable"===e.subject.termType,l="Variable"===e.object.termType;if("Variable"===e.subject.termType&&"Variable"===e.object.termType){const r=this.generateVariable(e),u=n.ActorAbstractPath.FACTORY.createPattern(e.subject,r,e.object,e.graph),c=o.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:u})),l=e.subject,d=e.object,p=new Set,h={},f=new s.MultiTransformIterator(c.bindingsStream,{multiTransform:r=>{const n=r.get(l),o=r.get(d),u="Variable"===e.graph.termType?r.get(e.graph):e.graph,c=(0,a.termToString)(n)+(0,a.termToString)(u),f=(0,a.termToString)(o)+(0,a.termToString)(u);return new s.TransformIterator((async()=>{if(p.has(c)&&p.has(f))return new s.EmptyIterator;const r=new s.BufferedIterator,a={count:0};return p.has(c)||(p.add(c),await this.getSubjectAndObjectBindingsPredicateStar(l,d,n,n,i.path,u,t,h,{},r,a)),p.has(f)||(p.add(f),await this.getSubjectAndObjectBindingsPredicateStar(l,d,o,o,i.path,u,t,h,{},r,a)),r.transform({transform(t,r,n){"Variable"===e.graph.termType&&(t=t.set(e.graph,u)),n(t),r()}})}))}}),y="Variable"===e.graph.termType?[l,e.object,e.graph]:[l,e.object];return{type:"bindings",bindingsStream:f,metadata:async()=>({...await c.metadata(),variables:y})}}if(!u&&!l){const r=this.generateVariable(),n=await this.getObjectsPredicateStarEval(e.subject,r,i.path,e.graph,t);return{type:"bindings",bindingsStream:n.bindingsStream.transform({filter:t=>e.object.equals(t.get(r)),transform(t,r,n){n("Variable"===e.graph.termType?c.bindings([[e.graph,t.get(e.graph)]]):c.bindings()),r()}}),metadata:async()=>({...await n.metadata(),variables:"Variable"===e.graph.termType?[e.graph]:[]})}}const d=u?e.object:e.subject,p=u?e.subject:e.object,h=u?n.ActorAbstractPath.FACTORY.createInv(i.path):i.path,f=await this.getObjectsPredicateStarEval(d,p,h,e.graph,t),y=f.bindingsStream.transform({transform(e,t,r){r(e),t()}}),m="Variable"===e.graph.termType?[p,e.graph]:[p];return{type:"bindings",bindingsStream:y,metadata:async()=>({...await f.metadata(),variables:m})}}}t.ActorQueryOperationPathZeroOrMore=l},"../node_modules/@comunica/actor-query-operation-path-zero-or-more/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-path-zero-or-more/lib/ActorQueryOperationPathZeroOrMore.js"),t)},"../node_modules/@comunica/actor-query-operation-path-zero-or-one/lib/ActorQueryOperationPathZeroOrOne.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathZeroOrOne=void 0;const n=r("../node_modules/@comunica/actor-abstract-path/lib/index.js"),i=r("../node_modules/@comunica/bindings-factory/lib/index.js"),o=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),s=r("asynciterator"),a=r("../node_modules/sparqlalgebrajs/index.js"),u=new i.BindingsFactory;class c extends n.ActorAbstractPath{constructor(e){super(e,a.Algebra.types.ZERO_OR_ONE_PATH)}async runOperation(e,t){const r=e.predicate,i="Variable"===e.subject.termType,a="Variable"===e.object.termType,c=[];if(!i&&!a&&e.subject.equals(e.object))return{type:"bindings",bindingsStream:new s.SingletonIterator(u.bindings()),metadata:()=>Promise.resolve({cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]})};if(i&&a)throw new Error("ZeroOrOne path expressions with 2 variables not supported yet");const l=await this.isPathArbitraryLengthDistinct(t,e);if(l.operation)return l.operation;t=l.context,"Variable"===e.subject.termType&&c.push(u.bindings([[e.subject,e.object]])),"Variable"===e.object.termType&&c.push(u.bindings([[e.object,e.subject]]));const d=o.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.subject,r.path,e.object,e.graph)}));return{type:"bindings",bindingsStream:d.bindingsStream.prepend(c),metadata:d.metadata}}}t.ActorQueryOperationPathZeroOrOne=c},"../node_modules/@comunica/actor-query-operation-path-zero-or-one/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-path-zero-or-one/lib/ActorQueryOperationPathZeroOrOne.js"),t)},"../node_modules/@comunica/actor-query-operation-project/lib/ActorQueryOperationProject.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationProject=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("../node_modules/@comunica/data-factory/lib/index.js"),o=new(r("../node_modules/rdf-data-factory/index.js").DataFactory);class s 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})),s=await r.metadata(),a=e.variables,u=s.variables.filter((e=>!a.some((t=>e.value===t.value)))),c=a.filter((e=>!s.variables.some((t=>e.value===t.value))));if(c.length>0)throw new Error(`Variables '${c.map((e=>`?${e.value}`))}' are used in the projection result, but are not assigned.`);let l=0===u.length?r.bindingsStream:r.bindingsStream.transform({map(e){for(const t of u)e=e.delete(t);return e},autoStart:!1}),d=0;return l=l.transform({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=o.blankNode(`${e.value}${d}`),t.set(e.value,r)),r}return e}))},autoStart:!1}),{type:"bindings",bindingsStream:l,metadata:async()=>({...s,variables:a})}}}t.ActorQueryOperationProject=s},"../node_modules/@comunica/actor-query-operation-project/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-project/lib/ActorQueryOperationProject.js"),t)},"../node_modules/@comunica/actor-query-operation-quadpattern/lib/ActorQueryOperationQuadpattern.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationQuadpattern=void 0;const n=r("../node_modules/@comunica/bindings-factory/lib/index.js"),i=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),o=r("asynciterator"),s=r("../node_modules/rdf-data-factory/index.js"),a=r("../node_modules/rdf-terms/index.js"),u=new n.BindingsFactory,c=new s.DataFactory;class l extends i.ActorQueryOperationTyped{constructor(e){super(e,"pattern")}static isTermVariable(e){return"Variable"===e.termType}static getVariables(e){return(0,a.uniqTerms)((0,a.getTerms)(e).filter(l.isTermVariable))}static getDuplicateElementLinks(e){const t={};let r=!1;for(const n of a.QUAD_TERM_NAMES)if("Variable"===e[n].termType){const i=e[n].value,o=(t[i]||(t[i]=[])).push(n);r=r||o>1}if(!r)return;const n={};for(const e in t){const r=t[e],i=r.slice(1);i.length>0&&(n[r[0]]=i)}return n}static validateMetadata(e){for(const t of["cardinality","canContainUndefs"])if(!(t in e))throw new Error(`Invalid metadata: missing ${t} in ${JSON.stringify(e)}`);return e}static getMetadata(e,t,r){return()=>new Promise(((t,r)=>{e.getProperty("metadata",(e=>t(e))),e.on("error",r)})).then((e=>("canContainUndefs"in e||(e.canContainUndefs=!1),l.quadsMetadataToBindingsMetadata(l.validateMetadata(e),t,r))))}static quadsMetadataToBindingsMetadata(e,t,r){return{...e,order:e.order?l.quadsOrderToBindingsOrder(e.order,t):void 0,availableOrders:e.availableOrders?e.availableOrders.map((e=>({cost:e.cost,terms:l.quadsOrderToBindingsOrder(e.terms,t)}))):void 0,variables:r}}static quadsOrderToBindingsOrder(e,t){const r={};return e.map((e=>{const n=t[e.term];if(n&&!r[n])return r[n]=!0,{term:c.variable(n),direction:e.direction}})).filter((e=>Boolean(e)))}async testOperation(e,t){return!0}async runOperation(e,t){e.context&&(t=t.merge(e.context));const r=await this.mediatorResolveQuadPattern.mediate({pattern:e,context:t}),n=l.getVariables(e),i=(0,a.reduceTerms)(e,((e,t,r)=>("Variable"===t.termType&&(e[r]=t.value),e)),{}),s=(e,t,r)=>{const n=i[r];return n&&e.push([c.variable(n),t]),e},d=l.getMetadata(r.data,i,n);return{type:"bindings",bindingsStream:new o.TransformIterator((async()=>{let t=r.data;const n=l.getDuplicateElementLinks(e);return n&&(t=t.filter((e=>{for(const t of a.TRIPLE_TERM_NAMES)for(const r of n[t]||[])if(!e[t].equals(e[r]))return!1;return!0}))),t.map((e=>u.bindings((0,a.reduceTerms)(e,s,[]))))}),{autoStart:!1}),metadata:d}}}t.ActorQueryOperationQuadpattern=l},"../node_modules/@comunica/actor-query-operation-quadpattern/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-quadpattern/lib/ActorQueryOperationQuadpattern.js"),t)},"../node_modules/@comunica/actor-query-operation-reduced-hash/lib/ActorQueryOperationReducedHash.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationReducedHash=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("../node_modules/lru-cache/index.js");class o 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({max:this.cacheSize});return e=>{const n=t(e);return!r.has(n)&&r.set(n,!0)}}}t.ActorQueryOperationReducedHash=o},"../node_modules/@comunica/actor-query-operation-reduced-hash/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-reduced-hash/lib/ActorQueryOperationReducedHash.js"),t)},"../node_modules/@comunica/actor-query-operation-service/lib/ActorQueryOperationService.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationService=void 0;const n=r("../node_modules/@comunica/bindings-factory/lib/index.js"),i=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),o=r("../node_modules/@comunica/context-entries/lib/index.js"),s=r("asynciterator"),a=new n.BindingsFactory;class u 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 r=e.name.value;let n=t.delete(o.KeysRdfResolveQuadPattern.source).delete(o.KeysRdfResolveQuadPattern.sources).delete(o.KeysInitQuery.queryString);const u=this.forceSparqlEndpoint?"sparql":void 0;let c;n=n.set(o.KeysRdfResolveQuadPattern.sources,[{type:u,value:r}]);try{c=i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:n}))}catch(t){if(!e.silent)throw t;c={bindingsStream:new s.SingletonIterator(a.bindings()),type:"bindings",metadata:async()=>({cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]})}}return c}}t.ActorQueryOperationService=u},"../node_modules/@comunica/actor-query-operation-service/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-service/lib/ActorQueryOperationService.js"),t)},"../node_modules/@comunica/actor-query-operation-slice/lib/ActorQueryOperationSlice.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationSlice=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("../node_modules/@comunica/context-entries/lib/index.js");class o 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=o},"../node_modules/@comunica/actor-query-operation-slice/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-slice/lib/ActorQueryOperationSlice.js"),t)},"../node_modules/@comunica/actor-query-operation-union/lib/ActorQueryOperationUnion.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationUnion=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("asynciterator"),o=r("../node_modules/rdf-terms/index.js");class s extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"union")}static unionVariables(e){return(0,o.uniqTerms)(e.flat())}static unionMetadata(e,t){const r={type:"exact",value:0};for(const t of e){if(!(t.cardinality.value&&Number.isFinite(t.cardinality.value)||0===t.cardinality.value)){r.type="estimate",r.value=Number.POSITIVE_INFINITY;break}"estimate"===t.cardinality.type&&(r.type="estimate"),r.value+=t.cardinality.value}const n={cardinality:r,canContainUndefs:e.some((e=>e.canContainUndefs))};return t?(n.variables=s.unionVariables(e.map((e=>e.variables))),n):n}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}))))).map(n.ActorQueryOperation.getSafeBindings);return{type:"bindings",bindingsStream:new i.UnionIterator(r.map((e=>e.bindingsStream)),{autoStart:!1}),metadata:()=>Promise.all(r.map((e=>e.metadata()))).then((e=>s.unionMetadata(e,!0)))}}}t.ActorQueryOperationUnion=s},"../node_modules/@comunica/actor-query-operation-union/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-union/lib/ActorQueryOperationUnion.js"),t)},"../node_modules/@comunica/actor-query-operation-update-add-rewrite/lib/ActorQueryOperationAddRewrite.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationAddRewrite=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("../node_modules/rdf-data-factory/index.js"),o=r("../node_modules/sparqlalgebrajs/index.js"),s=new i.DataFactory;class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"add"),this.factory=new o.Factory}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}runOperation(e,t){const r="DEFAULT"===e.destination?s.defaultGraph():e.destination,n="DEFAULT"===e.source?s.defaultGraph():e.source,i=this.factory.createDeleteInsert(void 0,[this.factory.createPattern(s.variable("s"),s.variable("p"),s.variable("o"),r)],this.factory.createPattern(s.variable("s"),s.variable("p"),s.variable("o"),n));return this.mediatorQueryOperation.mediate({operation:i,context:t})}}t.ActorQueryOperationAddRewrite=a},"../node_modules/@comunica/actor-query-operation-update-add-rewrite/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-update-add-rewrite/lib/ActorQueryOperationAddRewrite.js"),t)},"../node_modules/@comunica/actor-query-operation-update-clear/lib/ActorQueryOperationClear.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationClear=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=new(r("../node_modules/rdf-data-factory/index.js").DataFactory);class o 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=o},"../node_modules/@comunica/actor-query-operation-update-clear/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-update-clear/lib/ActorQueryOperationClear.js"),t)},"../node_modules/@comunica/actor-query-operation-update-compositeupdate/lib/ActorQueryOperationUpdateCompositeUpdate.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationUpdateCompositeUpdate=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js");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},"../node_modules/@comunica/actor-query-operation-update-compositeupdate/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-update-compositeupdate/lib/ActorQueryOperationUpdateCompositeUpdate.js"),t)},"../node_modules/@comunica/actor-query-operation-update-copy-rewrite/lib/ActorQueryOperationCopyRewrite.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationCopyRewrite=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("../node_modules/sparqlalgebrajs/index.js");class o extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"copy"),this.factory=new i.Factory}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}runOperation(e,t){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))return Promise.resolve({type:"void",execute:()=>Promise.resolve()});const r=this.factory.createCompositeUpdate([this.factory.createDrop(e.destination,!0),this.factory.createAdd(e.source,e.destination,e.silent)]);return this.mediatorQueryOperation.mediate({operation:r,context:t})}}t.ActorQueryOperationCopyRewrite=o},"../node_modules/@comunica/actor-query-operation-update-copy-rewrite/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-update-copy-rewrite/lib/ActorQueryOperationCopyRewrite.js"),t)},"../node_modules/@comunica/actor-query-operation-update-create/lib/ActorQueryOperationCreate.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationCreate=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js");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},"../node_modules/@comunica/actor-query-operation-update-create/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-update-create/lib/ActorQueryOperationCreate.js"),t)},"../node_modules/@comunica/actor-query-operation-update-deleteinsert/lib/ActorQueryOperationUpdateDeleteInsert.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationUpdateDeleteInsert=void 0;const n=r("../node_modules/@comunica/actor-query-operation-construct/lib/index.js"),i=r("../node_modules/@comunica/bindings-factory/lib/index.js"),o=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),s=r("asynciterator"),a=new i.BindingsFactory;class u extends o.ActorQueryOperationTypedMediated{constructor(e){super(e,"deleteinsert"),this.blankNodeCounter=0}async testOperation(e,t){return o.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){const r=e.where?o.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.where,context:t})).bindingsStream:new s.ArrayIterator([a.bindings()],{autoStart:!1});let i,u;e.insert&&(i=new n.BindingsToQuadsIterator(e.insert.map(n.BindingsToQuadsIterator.localizeQuad.bind(null,this.blankNodeCounter)),r.clone(),!1),this.blankNodeCounter++),e.delete&&(u=new n.BindingsToQuadsIterator(e.delete.map(n.BindingsToQuadsIterator.localizeQuad.bind(null,this.blankNodeCounter)),r.clone(),!1),this.blankNodeCounter++);const{execute:c}=await this.mediatorUpdateQuads.mediate({quadStreamInsert:i,quadStreamDelete:u,context:t});return{type:"void",execute:c}}}t.ActorQueryOperationUpdateDeleteInsert=u},"../node_modules/@comunica/actor-query-operation-update-deleteinsert/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-update-deleteinsert/lib/ActorQueryOperationUpdateDeleteInsert.js"),t)},"../node_modules/@comunica/actor-query-operation-update-drop/lib/ActorQueryOperationDrop.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationDrop=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=new(r("../node_modules/rdf-data-factory/index.js").DataFactory);class o 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=o},"../node_modules/@comunica/actor-query-operation-update-drop/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-update-drop/lib/ActorQueryOperationDrop.js"),t)},"../node_modules/@comunica/actor-query-operation-update-load/lib/ActorQueryOperationLoad.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationLoad=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("../node_modules/@comunica/context-entries/lib/index.js"),o=r("../node_modules/rdf-data-factory/index.js"),s=r("../node_modules/sparqlalgebrajs/index.js"),a=new o.DataFactory;class u extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"load"),this.factory=new s.Factory,this.constructOperation=this.factory.createConstruct(this.factory.createPattern(a.variable("s"),a.variable("p"),a.variable("o")),[this.factory.createPattern(a.variable("s"),a.variable("p"),a.variable("o"))])}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){let r=t.set(i.KeysRdfResolveQuadPattern.sources,[e.source.value]);e.silent&&(r=r.set(i.KeysInitQuery.lenient,!0));let n=u.getSafeQuads(await this.mediatorQueryOperation.mediate({operation:this.constructOperation,context:r})).quadStream;e.destination&&(n=n.map((t=>a.quad(t.subject,t.predicate,t.object,e.destination))));const{execute:o}=await this.mediatorUpdateQuads.mediate({quadStreamInsert:n,context:t});return{type:"void",execute:o}}}t.ActorQueryOperationLoad=u},"../node_modules/@comunica/actor-query-operation-update-load/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-update-load/lib/ActorQueryOperationLoad.js"),t)},"../node_modules/@comunica/actor-query-operation-update-move-rewrite/lib/ActorQueryOperationMoveRewrite.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationMoveRewrite=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("../node_modules/sparqlalgebrajs/index.js");class o extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"move"),this.factory=new i.Factory}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}runOperation(e,t){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))return Promise.resolve({type:"void",execute:()=>Promise.resolve()});const r=[this.factory.createDrop(e.destination,!0),this.factory.createAdd(e.source,e.destination,e.silent),this.factory.createDrop(e.source)],n=this.factory.createCompositeUpdate(r);return this.mediatorQueryOperation.mediate({operation:n,context:t})}}t.ActorQueryOperationMoveRewrite=o},"../node_modules/@comunica/actor-query-operation-update-move-rewrite/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-update-move-rewrite/lib/ActorQueryOperationMoveRewrite.js"),t)},"../node_modules/@comunica/actor-query-operation-values/lib/ActorQueryOperationValues.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationValues=void 0;const n=r("../node_modules/@comunica/bindings-factory/lib/index.js"),i=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),o=r("asynciterator"),s=r("../node_modules/rdf-data-factory/index.js"),a=new n.BindingsFactory,u=new s.DataFactory;class c extends i.ActorQueryOperationTyped{constructor(e){super(e,"values")}async testOperation(e,t){return!0}async runOperation(e,t){const r=new o.ArrayIterator(e.bindings.map((e=>a.bindings(Object.entries(e).map((([e,t])=>[u.variable(e.slice(1)),t])))))),n=e.variables;return{type:"bindings",bindingsStream:r,metadata:()=>Promise.resolve({cardinality:{type:"exact",value:e.bindings.length},canContainUndefs:e.bindings.some((e=>n.some((t=>!(`?${t.value}`in e))))),variables:n})}}}t.ActorQueryOperationValues=c},"../node_modules/@comunica/actor-query-operation-values/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-operation-values/lib/ActorQueryOperationValues.js"),t)},"../node_modules/@comunica/actor-query-parse-sparql/lib/ActorQueryParseSparql.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryParseSparql=void 0;const n=r("../node_modules/@comunica/bus-query-parse/lib/index.js"),i=r("../node_modules/sparqlalgebrajs/index.js"),o=r("../node_modules/sparqljs/sparql.js");class s 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 o.Parser({prefixes:this.prefixes,baseIRI:e.baseIRI}).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=s},"../node_modules/@comunica/actor-query-parse-sparql/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-query-parse-sparql/lib/ActorQueryParseSparql.js"),t)},"../node_modules/@comunica/actor-rdf-join-entries-sort-cardinality/lib/ActorRdfJoinEntriesSortCardinality.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinEntriesSortCardinality=void 0;const n=r("../node_modules/@comunica/bus-rdf-join-entries-sort/lib/index.js");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},"../node_modules/@comunica/actor-rdf-join-entries-sort-cardinality/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-rdf-join-entries-sort-cardinality/lib/ActorRdfJoinEntriesSortCardinality.js"),t)},"../node_modules/@comunica/actor-rdf-join-inner-hash/lib/ActorRdfJoinHash.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinHash=void 0;const n=r("../node_modules/@comunica/bus-rdf-join/lib/index.js"),i=r("../node_modules/asyncjoin/index.js");class o 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=o},"../node_modules/@comunica/actor-rdf-join-inner-hash/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-rdf-join-inner-hash/lib/ActorRdfJoinHash.js"),t)},"../node_modules/@comunica/actor-rdf-join-inner-multi-bind/lib/ActorRdfJoinMultiBind.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiBind=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("../node_modules/@comunica/bus-rdf-join/lib/index.js"),o=r("../node_modules/@comunica/context-entries/lib/index.js"),s=r("asynciterator"),a=r("../node_modules/sparqlalgebrajs/index.js");class u extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"bind",canHandleUndefs:!0})}static createBindStream(e,t,r,i,o){const a=e=>{const t=r.map((t=>(0,n.materializeOperation)(t,e,{bindFilter:!1}))),o=t=>t.merge(e);return new s.TransformIterator((async()=>(await i(t,e)).transform({map:o})),{maxBufferSize:128})};switch(e){case"depth-first":return new s.MultiTransformIterator(t,{autoStart:!1,multiTransform:a,optional:o});case"breadth-first":return new s.UnionIterator(t.transform({map:a,optional:o}),{autoStart:!1});default:throw new Error(`Received request for unknown bind order: ${e}`)}}async sortJoinEntries(e,t){if(e.some((e=>e.metadata.canContainUndefs)))return e;const r={};for(const t of e)for(const e of t.metadata.variables){let t=r[e.value];t||(t=0),r[e.value]=++t}const n=[];for(const[e,t]of Object.entries(r))t>=2&&n.push(e);if(0===n.length)throw new Error("Bind join can only join entries with at least one common variable");const i=[];for(const t of e){let e=!1;for(const r of t.metadata.variables)if(n.includes(r.value)){e=!0;break}e||i.push(t)}return(await this.mediatorJoinEntriesSort.mediate({entries:e,context:t})).entries.sort(((e,t)=>{const r=i.includes(e);return r===i.includes(t)?0:r?1:-1}))}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: ",(()=>({entry:r[0].operation,metadata:r[0].metadata})));for(const[e,t]of r.entries())0!==e&&t.output.bindingsStream.close();const s=r[0].output,a=[...r];a.splice(0,1);const c=e.context.set(o.KeysQueryOperation.joinLeftMetadata,r[0].metadata).set(o.KeysQueryOperation.joinRightMetadatas,a.map((e=>e.metadata)));return{result:{type:"bindings",bindingsStream:u.createBindStream(this.bindOrder,s.bindingsStream,a.map((e=>e.operation)),(async(e,t)=>{const r=1===e.length?e[0]:u.FACTORY.createJoin(e);return n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:r,context:c?.set(o.KeysQueryOperation.joinBindings,t)})).bindingsStream}),!1),metadata:()=>this.constructResultMetadata(r,r.map((e=>e.metadata)),e.context)},physicalPlanMetadata:{bindIndex:t.indexOf(r[0]),bindOrder:this.bindOrder}}}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 n=i.ActorRdfJoin.getRequestInitialTimes(t),o=i.ActorRdfJoin.getRequestItemTimes(t),s=[...r],u=[...n],c=[...o];if(s.splice(0,1),u.splice(0,1),c.splice(0,1),s.some((e=>e.operation.type===a.Algebra.types.EXTEND||e.operation.type===a.Algebra.types.GROUP)))throw new Error(`Actor ${this.name} can not bind on Extend and Group operations`);const l=await Promise.all(s.map((async t=>(await this.mediatorJoinSelectivity.mediate({entries:[r[0],t],context:e.context})).selectivity*this.selectivityModifier))),d=s.map(((e,t)=>e.metadata.cardinality.value*l[t])).reduce(((e,t)=>e+t),0),p=u.reduce(((e,t,r)=>e+t*l[r]),0),h=c.reduce(((e,t,r)=>e+t*l[r]),0);return{iterations:t[0].cardinality.value*d,persistedItems:0,blockingItems:0,requestTime:n[0]+t[0].cardinality.value*(o[0]+p+d*h)}}}t.ActorRdfJoinMultiBind=u,u.FACTORY=new a.Factory},"../node_modules/@comunica/actor-rdf-join-inner-multi-bind/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-rdf-join-inner-multi-bind/lib/ActorRdfJoinMultiBind.js"),t)},"../node_modules/@comunica/actor-rdf-join-inner-multi-empty/lib/ActorRdfJoinMultiEmpty.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiEmpty=void 0;const n=r("../node_modules/@comunica/bus-rdf-join/lib/index.js"),i=r("asynciterator");class o extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-empty"})}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 i.ArrayIterator([],{autoStart:!1}),metadata:async()=>({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},"../node_modules/@comunica/actor-rdf-join-inner-multi-empty/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-rdf-join-inner-multi-empty/lib/ActorRdfJoinMultiEmpty.js"),t)},"../node_modules/@comunica/actor-rdf-join-inner-multi-smallest/lib/ActorRdfJoinMultiSmallest.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiSmallest=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("../node_modules/@comunica/bus-rdf-join/lib/index.js"),o=r("../node_modules/sparqlalgebrajs/index.js");class s extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-smallest",limitEntries:3,limitEntriesMin:!0})}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],o=t[1];t.splice(0,2);const a={output:n.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:e.type,entries:[r,o],context:e.context})),operation:s.FACTORY.createJoin([r.operation,o.operation],!1)};return t.push(a),{result:await this.mediatorJoin.mediate({type:e.type,entries:t,context:e.context}),physicalPlanMetadata:{smallest:[r,o]}}}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),o=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*o[0]+n[1]+t[1].cardinality.value*o[1]+t.slice(2).reduce(((e,t,r)=>e+n.slice(2)[r]+t.cardinality.value*o.slice(2)[r]),0)}}}t.ActorRdfJoinMultiSmallest=s,s.FACTORY=new o.Factory},"../node_modules/@comunica/actor-rdf-join-inner-multi-smallest/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-rdf-join-inner-multi-smallest/lib/ActorRdfJoinMultiSmallest.js"),t)},"../node_modules/@comunica/actor-rdf-join-inner-nestedloop/lib/ActorRdfJoinNestedLoop.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinNestedLoop=void 0;const n=r("../node_modules/@comunica/bus-rdf-join/lib/index.js"),i=r("../node_modules/asyncjoin/index.js");class o 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=o},"../node_modules/@comunica/actor-rdf-join-inner-nestedloop/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-rdf-join-inner-nestedloop/lib/ActorRdfJoinNestedLoop.js"),t)},"../node_modules/@comunica/actor-rdf-join-inner-none/lib/ActorRdfJoinNone.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinNone=void 0;const n=r("../node_modules/@comunica/bindings-factory/lib/index.js"),i=r("../node_modules/@comunica/bus-rdf-join/lib/index.js"),o=r("asynciterator"),s=new n.BindingsFactory;class a 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){return{result:{bindingsStream:new o.ArrayIterator([s.bindings()],{autoStart:!1}),metadata:()=>Promise.resolve({cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]}),type:"bindings"}}}async getJoinCoefficients(){return{iterations:0,persistedItems:0,blockingItems:0,requestTime:0}}}t.ActorRdfJoinNone=a},"../node_modules/@comunica/actor-rdf-join-inner-none/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-rdf-join-inner-none/lib/ActorRdfJoinNone.js"),t)},"../node_modules/@comunica/actor-rdf-join-inner-single/lib/ActorRdfJoinSingle.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinSingle=void 0;const n=r("../node_modules/@comunica/bus-rdf-join/lib/index.js");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},"../node_modules/@comunica/actor-rdf-join-inner-single/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-rdf-join-inner-single/lib/ActorRdfJoinSingle.js"),t)},"../node_modules/@comunica/actor-rdf-join-inner-symmetrichash/lib/ActorRdfJoinSymmetricHash.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinSymmetricHash=void 0;const n=r("../node_modules/@comunica/bus-rdf-join/lib/index.js"),i=r("../node_modules/asyncjoin/index.js");class o 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=>o.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=o},"../node_modules/@comunica/actor-rdf-join-inner-symmetrichash/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-rdf-join-inner-symmetrichash/lib/ActorRdfJoinSymmetricHash.js"),t)},"../node_modules/@comunica/actor-rdf-join-minus-hash-undef/lib/ActorRdfJoinMinusHashUndef.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMinusHashUndef=void 0;const n=r("../node_modules/@comunica/bus-rdf-join/lib/index.js"),i=r("asynciterator"),o=r("../node_modules/@comunica/actor-rdf-join-minus-hash-undef/lib/BindingsIndex.js");class s extends n.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,s=await n.ActorRdfJoin.getMetadatas(e.entries),a=n.ActorRdfJoin.overlappingVariables(s);if(a.length>0){const e=new o.BindingsIndex(a);return{result:{type:"bindings",bindingsStream:new i.TransformIterator((async()=>(await new Promise((r=>{t.bindingsStream.on("data",(t=>e.add(t))),t.bindingsStream.on("end",r)})),r.bindingsStream.filter((t=>!e.contains(t))))),{autoStart:!1}),async metadata(){const e=await r.metadata(),t=await r.metadata();return{...t,canContainUndefs:e.canContainUndefs||t.canContainUndefs}}}}}return{result:r}}async getJoinCoefficients(e,t){const r=n.ActorRdfJoin.getRequestInitialTimes(t),i=n.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*i[0]+r[1]+t[1].cardinality.value*i[1]}}}t.ActorRdfJoinMinusHashUndef=s},"../node_modules/@comunica/actor-rdf-join-minus-hash-undef/lib/BindingsIndex.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsIndex=void 0;const n=r("../node_modules/rdf-string/index.js");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 o=t[n];o||(o=t[n]={}),t=o}}}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 o of r){const r=i.hashTerm(e.get(n));if(r){const n=[o[r],o[""]].filter(Boolean);if(0===n.length)continue;if(this.containsRecursive(e,t,n))return!0}else{let r=Object.keys(o).map((e=>o[e]));if(0===r.length&&(r=[{}]),this.containsRecursive(e,t,r))return!0}}return!1}}t.BindingsIndex=i},"../node_modules/@comunica/actor-rdf-join-minus-hash-undef/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-rdf-join-minus-hash-undef/lib/ActorRdfJoinMinusHashUndef.js"),t)},"../node_modules/@comunica/actor-rdf-join-minus-hash/lib/ActorRdfJoinMinusHash.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMinusHash=void 0;const n=r("../node_modules/@comunica/bus-rdf-join/lib/index.js"),i=r("asynciterator");class o extends n.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,o=await n.ActorRdfJoin.getMetadatas(e.entries),s=n.ActorRdfJoin.overlappingVariables(o);if(s.length>0){const e={};return{result:{type:"bindings",bindingsStream:new i.TransformIterator((async()=>(await new Promise((r=>{t.bindingsStream.on("data",(t=>{e[n.ActorRdfJoin.hash(t,s)]=!0})),t.bindingsStream.on("end",r)})),r.bindingsStream.filter((t=>!e[n.ActorRdfJoin.hash(t,s)])))),{autoStart:!1}),metadata:r.metadata}}}return{result:r}}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.ActorRdfJoinMinusHash=o},"../node_modules/@comunica/actor-rdf-join-minus-hash/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-rdf-join-minus-hash/lib/ActorRdfJoinMinusHash.js"),t)},"../node_modules/@comunica/actor-rdf-join-optional-bind/lib/ActorRdfJoinOptionalBind.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinOptionalBind=void 0;const n=r("../node_modules/@comunica/actor-rdf-join-inner-multi-bind/lib/index.js"),i=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),o=r("../node_modules/@comunica/bus-rdf-join/lib/index.js"),s=r("../node_modules/@comunica/context-entries/lib/index.js"),a=r("../node_modules/sparqlalgebrajs/index.js");class u extends o.ActorRdfJoin{constructor(e){super(e,{logicalType:"optional",physicalName:"bind",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){e.entries[1].output.bindingsStream.close();const t=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,r)=>{const n=e[0];return i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:n,context:t?.set(s.KeysQueryOperation.joinBindings,r)})).bindingsStream}),!0),metadata:async()=>await this.constructResultMetadata(e.entries,await o.ActorRdfJoin.getMetadatas(e.entries),e.context,{canContainUndefs:!0})}}}async getJoinCoefficients(e,t){const r=o.ActorRdfJoin.getRequestInitialTimes(t),n=o.ActorRdfJoin.getRequestItemTimes(t);if(e.entries[1].operation.type===a.Algebra.types.EXTEND||e.entries[1].operation.type===a.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*i*(n[0]+r[1]+t[1].cardinality.value*n[1])}}}t.ActorRdfJoinOptionalBind=u},"../node_modules/@comunica/actor-rdf-join-optional-bind/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-rdf-join-optional-bind/lib/ActorRdfJoinOptionalBind.js"),t)},"../node_modules/@comunica/actor-rdf-join-optional-nestedloop/lib/ActorRdfJoinOptionalNestedLoop.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinOptionalNestedLoop=void 0;const n=r("../node_modules/@comunica/bus-rdf-join/lib/index.js"),i=r("../node_modules/asyncjoin/index.js");class o 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=o},"../node_modules/@comunica/actor-rdf-join-optional-nestedloop/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-rdf-join-optional-nestedloop/lib/ActorRdfJoinOptionalNestedLoop.js"),t)},"../node_modules/@comunica/actor-rdf-join-selectivity-variable-counting/lib/ActorRdfJoinSelectivityVariableCounting.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JoinTypes=t.ActorRdfJoinSelectivityVariableCounting=void 0;const n=r("../node_modules/@comunica/bus-rdf-join-selectivity/lib/index.js"),i=r("../node_modules/sparqlalgebrajs/index.js");class o 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(s.unboundSS),"pattern"===t.type&&e.subject.equals(t.predicate)&&r.push(s.unboundSP),e.subject.equals(t.object)&&r.push(s.unboundSO),e.subject.equals(t.graph)&&r.push(s.unboundSG)):(e.subject.equals(t.subject)&&r.push(s.boundSS),"pattern"===t.type&&e.subject.equals(t.predicate)&&r.push(s.boundSP),e.subject.equals(t.object)&&r.push(s.boundSO),e.subject.equals(t.graph)&&r.push(s.boundSG)),"pattern"===e.type&&("Variable"===e.predicate.termType?(e.predicate.equals(t.subject)&&r.push(s.unboundPS),"pattern"===t.type&&e.predicate.equals(t.predicate)&&r.push(s.unboundPP),e.predicate.equals(t.object)&&r.push(s.unboundPO),e.predicate.equals(t.graph)&&r.push(s.unboundPG)):(e.predicate.equals(t.subject)&&r.push(s.boundPS),"pattern"===t.type&&e.predicate.equals(t.predicate)&&r.push(s.boundPP),e.predicate.equals(t.object)&&r.push(s.boundPO),e.predicate.equals(t.graph)&&r.push(s.boundPG))),"Variable"===e.object.termType?(e.object.equals(t.subject)&&r.push(s.unboundOS),"pattern"===t.type&&e.object.equals(t.predicate)&&r.push(s.unboundOP),e.object.equals(t.object)&&r.push(s.unboundOO),e.object.equals(t.graph)&&r.push(s.unboundOG)):(e.object.equals(t.subject)&&r.push(s.boundOS),"pattern"===t.type&&e.object.equals(t.predicate)&&r.push(s.boundOP),e.object.equals(t.object)&&r.push(s.boundOO),e.object.equals(t.graph)&&r.push(s.boundOG)),"Variable"===e.graph.termType?(e.graph.equals(t.subject)&&r.push(s.unboundGS),"pattern"===t.type&&e.graph.equals(t.predicate)&&r.push(s.unboundGP),e.graph.equals(t.object)&&r.push(s.unboundGO),e.graph.equals(t.graph)&&r.push(s.unboundGG)):(e.graph.equals(t.subject)&&r.push(s.boundGS),"pattern"===t.type&&e.graph.equals(t.predicate)&&r.push(s.boundGP),e.graph.equals(t.object)&&r.push(s.boundGO),e.graph.equals(t.graph)&&r.push(s.boundGG)),r}static getOperationsPairwiseJoinCost(e,t){let r=o.MAX_PAIRWISE_COST;for(const n of o.getJoinTypes(e,t))switch(n){case s.boundSS:r-=4;break;case s.boundSP:r-=6;break;case s.boundSO:r-=2;break;case s.boundSG:case s.boundPS:r-=6;break;case s.boundPP:return 1;case s.boundPO:case s.boundPG:r-=6;break;case s.boundOS:r-=2;break;case s.boundOP:r-=6;break;case s.boundOO:r-=2;break;case s.boundOG:case s.boundGS:case s.boundGP:case s.boundGO:case s.boundGG:r-=6;break;case s.unboundSS:r-=2;break;case s.unboundSP:r-=3;break;case s.unboundSO:r-=1;break;case s.unboundSG:case s.unboundPS:case s.unboundPP:case s.unboundPO:case s.unboundPG:r-=3;break;case s.unboundOS:r-=1;break;case s.unboundOP:r-=3;break;case s.unboundOO:r-=1;break;case s.unboundOG:case s.unboundGS:case s.unboundGP:case s.unboundGO:case s.unboundGG:r-=3}return r/o.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+=o.getOperationsPairwiseJoinCost(e,i),n++);return r/n*t.reduce(((e,t)=>e*o.getPatternCost(t)),1)}async run(e){return e.entries.length<=1?{selectivity:1}:{selectivity:o.getOperationsJoinCost(e.entries.map((e=>e.operation)))}}}var s;t.ActorRdfJoinSelectivityVariableCounting=o,o.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"}(s=t.JoinTypes||(t.JoinTypes={}))},"../node_modules/@comunica/actor-rdf-join-selectivity-variable-counting/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-rdf-join-selectivity-variable-counting/lib/ActorRdfJoinSelectivityVariableCounting.js"),t)},"../node_modules/@comunica/actor-rdf-resolve-quad-pattern-federated/lib/ActorRdfResolveQuadPatternFederated.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveQuadPatternFederated=void 0;const n=r("../node_modules/@comunica/bus-rdf-resolve-quad-pattern/lib/index.js"),i=r("../node_modules/@comunica/actor-rdf-resolve-quad-pattern-federated/lib/FederatedQuadSource.js");class o extends n.ActorRdfResolveQuadPatternSource{constructor(e){super(e),this.emptyPatterns=new Map}async test(e){if(!(0,n.getContextSources)(e.context))throw new Error(`Actor ${this.name} can only resolve quad pattern queries against a sources array.`);return!0}async getSource(e){return new i.FederatedQuadSource(this.mediatorResolveQuadPattern,e,this.emptyPatterns,this.skipEmptyPatterns)}}t.ActorRdfResolveQuadPatternFederated=o},"../node_modules/@comunica/actor-rdf-resolve-quad-pattern-federated/lib/FederatedQuadSource.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FederatedQuadSource=void 0;const n=r("../node_modules/@comunica/bus-rdf-resolve-quad-pattern/lib/index.js"),i=r("../node_modules/@comunica/context-entries/lib/index.js"),o=r("../node_modules/@comunica/data-factory/lib/index.js"),s=r("asynciterator"),a=r("../node_modules/rdf-data-factory/index.js"),u=r("../node_modules/rdf-terms/index.js"),c=r("../node_modules/sparqlalgebrajs/index.js"),l=new a.DataFactory;class d{constructor(e,t,r,n){if(this.mediatorResolveQuadPattern=e,this.sources=t.get(i.KeysRdfResolveQuadPattern.sources),this.contextDefault=t.delete(i.KeysRdfResolveQuadPattern.sources),this.emptyPatterns=r,this.sourceIds=t.get(i.KeysRdfResolveQuadPattern.sourceIds)??new Map,this.skipEmptyPatterns=n,this.algebraFactory=new c.Factory,this.skipEmptyPatterns)for(const e of this.sources)this.emptyPatterns.has(e)||this.emptyPatterns.set(e,[])}static isTermBound(e){return"Variable"!==e.termType}static isSubPatternOf(e,t){return(!d.isTermBound(t.subject)||t.subject.equals(e.subject))&&(!d.isTermBound(t.predicate)||t.predicate.equals(e.predicate))&&(!d.isTermBound(t.object)||t.object.equals(e.object))&&(!d.isTermBound(t.graph)||t.graph.equals(e.graph))}static skolemizeTerm(e,t){return"BlankNode"===e.termType?new o.BlankNodeScoped(`bc_${t}_${e.value}`,l.namedNode(`${d.SKOLEM_PREFIX}${t}:${e.value}`)):e}static skolemizeQuad(e,t){return(0,u.mapTerms)(e,(e=>d.skolemizeTerm(e,t)))}static deskolemizeTerm(e,t){if("BlankNode"===e.termType&&"skolemized"in e&&(e=e.skolemized),"NamedNode"===e.termType&&e.value.startsWith(d.SKOLEM_PREFIX)){const r=e.value.indexOf(":",d.SKOLEM_PREFIX.length);if(e.value.slice(d.SKOLEM_PREFIX.length,r)===t){const t=e.value.slice(r+1,e.value.length);return l.blankNode(t)}return null}return e}static deskolemizeQuad(e,t){return(0,u.mapTerms)(e,(e=>d.deskolemizeTerm(e,t)||e))}isSourceEmpty(e,t){if(!this.skipEmptyPatterns)return!1;const r=this.emptyPatterns.get(e);if(r)for(const e of r)if(d.isSubPatternOf(t,e))return!0;return!1}getSourceId(e){let t=this.sourceIds.get(e);return void 0===t&&(t=`${this.sourceIds.size}`,this.sourceIds.set(e,t)),t}match(e,t,r,o){const a={cardinality:{type:"exact",value:0},canContainUndefs:!1};let u=this.sources.length;const c=(e,t,r,n)=>{this.skipEmptyPatterns&&!e&&r&&!this.isSourceEmpty(t,r)&&this.emptyPatterns.get(t).push(r),u||(n&&1===this.sources.length?p.setProperty("metadata",n):p.setProperty("metadata",a))},l=Promise.all(this.sources.map((async l=>{const h=this.getSourceId(l),f=d.deskolemizeTerm(e,h),y=d.deskolemizeTerm(t,h),m=d.deskolemizeTerm(r,h),b=d.deskolemizeTerm(o,h);let g,_,v=(0,n.getDataSourceContext)(l,this.contextDefault);v=v.set(i.KeysRdfResolveQuadPattern.source,{type:(0,n.getDataSourceType)(l),value:(0,n.getDataSourceValue)(l)}),f&&y&&m&&b&&!this.isSourceEmpty(l,g=this.algebraFactory.createPattern(f,y,m,b))?_=await this.mediatorResolveQuadPattern.mediate({pattern:g,context:v}):(_={data:new s.ArrayIterator([],{autoStart:!1})},_.data.setProperty("metadata",{cardinality:0,canContainUndefs:!1})),_.data.getProperty("metadata",(e=>{e.cardinality&&Number.isFinite(e.cardinality.value)?("estimate"===e.cardinality.type&&(a.cardinality.type="estimate"),a.cardinality.value+=e.cardinality.value,u--):(a.cardinality.type="estimate",a.cardinality.value=Number.POSITIVE_INFINITY,u=0),(a.requestTime||e.requestTime)&&(a.requestTime=a.requestTime||0,e.requestTime=e.requestTime||0,a.requestTime+=e.requestTime),(a.pageSize||e.pageSize)&&(a.pageSize=a.pageSize||0,e.pageSize=e.pageSize||0,a.pageSize+=e.pageSize),e.canContainUndefs&&(a.canContainUndefs=!0),c(a.cardinality.value,l,g,e)}));let O=_.data.map((e=>d.skolemizeQuad(e,h)));return"Variable"===o.termType&&(O=O.filter((e=>"DefaultGraph"!==e.graph.termType))),O.on("error",(e=>p.emit("error",e))),O}))),p=new s.TransformIterator((async()=>new s.UnionIterator(await l)),{autoStart:!1});return 0===this.sources.length&&p.setProperty("metadata",a),p}}t.FederatedQuadSource=d,d.SKOLEM_PREFIX="urn:comunica_skolem:source_"},"../node_modules/@comunica/actor-rdf-resolve-quad-pattern-federated/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-rdf-resolve-quad-pattern-federated/lib/ActorRdfResolveQuadPatternFederated.js"),t),i(r("../node_modules/@comunica/actor-rdf-resolve-quad-pattern-federated/lib/FederatedQuadSource.js"),t)},"../node_modules/@comunica/actor-rdf-resolve-quad-pattern-rdfjs-source/lib/ActorRdfResolveQuadPatternRdfJsSource.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveQuadPatternRdfJsSource=void 0;const n=r("../node_modules/@comunica/bus-rdf-resolve-quad-pattern/lib/index.js"),i=r("../node_modules/@comunica/actor-rdf-resolve-quad-pattern-rdfjs-source/lib/RdfJsQuadSource.js");class o extends n.ActorRdfResolveQuadPatternSource{constructor(e){super(e)}async test(e){if(!(0,n.hasContextSingleSourceOfType)("rdfjsSource",e.context))throw new Error(`${this.name} requires a single source with an rdfjsSource to be present in the context.`);const t=(0,n.getContextSource)(e.context);if(!t||"string"==typeof t||!("match"in t)&&!t.value.match)throw new Error(`${this.name} received an invalid rdfjsSource.`);return!0}async getSource(e){const t=(0,n.getContextSource)(e);return new i.RdfJsQuadSource("match"in t?t:t.value)}}t.ActorRdfResolveQuadPatternRdfJsSource=o},"../node_modules/@comunica/actor-rdf-resolve-quad-pattern-rdfjs-source/lib/IRdfJsSourceExtended.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"../node_modules/@comunica/actor-rdf-resolve-quad-pattern-rdfjs-source/lib/RdfJsQuadSource.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfJsQuadSource=void 0;const n=r("asynciterator");class i{constructor(e){this.source=e}static nullifyVariables(e){return e&&"Variable"!==e.termType?e:void 0}match(e,t,r,o){const s=this.source.match(i.nullifyVariables(e),i.nullifyVariables(t),i.nullifyVariables(r),i.nullifyVariables(o)),a=(0,n.wrap)(s,{autoStart:!1});return this.setMetadata(a,e,t,r,o).catch((e=>a.destroy(e))),a}async setMetadata(e,t,r,n,o){let s;if(this.source.countQuads)s=await this.source.countQuads(i.nullifyVariables(t),i.nullifyVariables(r),i.nullifyVariables(n),i.nullifyVariables(o));else{let e=0;s=await new Promise(((s,a)=>{const u=this.source.match(i.nullifyVariables(t),i.nullifyVariables(r),i.nullifyVariables(n),i.nullifyVariables(o));u.on("error",a),u.on("end",(()=>s(e))),u.on("data",(()=>e++))}))}e.setProperty("metadata",{cardinality:{type:"exact",value:s},canContainUndefs:!1})}}t.RdfJsQuadSource=i},"../node_modules/@comunica/actor-rdf-resolve-quad-pattern-rdfjs-source/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-rdf-resolve-quad-pattern-rdfjs-source/lib/ActorRdfResolveQuadPatternRdfJsSource.js"),t),i(r("../node_modules/@comunica/actor-rdf-resolve-quad-pattern-rdfjs-source/lib/IRdfJsSourceExtended.js"),t),i(r("../node_modules/@comunica/actor-rdf-resolve-quad-pattern-rdfjs-source/lib/RdfJsQuadSource.js"),t)},"../node_modules/@comunica/actor-rdf-update-quads-rdfjs-store/lib/ActorRdfUpdateQuadsRdfJsStore.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuadsRdfJsStore=void 0;const n=r("../node_modules/@comunica/bus-rdf-update-quads/lib/index.js"),i=r("../node_modules/@comunica/actor-rdf-update-quads-rdfjs-store/lib/RdfJsQuadDestination.js");class o 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=o},"../node_modules/@comunica/actor-rdf-update-quads-rdfjs-store/lib/RdfJsQuadDestination.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfJsQuadDestination=void 0;const n=r("../node_modules/rdf-data-factory/index.js"),i=r("../node_modules/rdf-string/index.js"),o=new n.DataFactory;t.RdfJsQuadDestination=class{constructor(e){this.store=e}promisifyEventEmitter(e){return new Promise(((t,r)=>{e.on("end",t),e.on("error",r)}))}delete(e){return this.promisifyEventEmitter(this.store.remove(e))}insert(e){return this.promisifyEventEmitter(this.store.import(e))}async deleteGraphs(e,t,r){switch(e){case"ALL":await this.promisifyEventEmitter(this.store.deleteGraph(o.defaultGraph()));case"NAMED":const t=this.store.match(),r={};t.on("data",(e=>{"DefaultGraph"!==e.graph.termType&&(r[(0,i.termToString)(e.graph)]=!0)})),await this.promisifyEventEmitter(t),await Promise.all(Object.keys(r).map((e=>this.promisifyEventEmitter(this.store.deleteGraph((0,i.stringToTerm)(e))))));break;default:for(const t of Array.isArray(e)?e:[e])await this.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)}))}}}},"../node_modules/@comunica/actor-rdf-update-quads-rdfjs-store/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/actor-rdf-update-quads-rdfjs-store/lib/ActorRdfUpdateQuadsRdfJsStore.js"),t)},"../node_modules/@comunica/bindings-factory/lib/Bindings.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bindings=void 0;const n=r("../packages/immutable/index.js"),i=r("../node_modules/@comunica/bindings-factory/lib/bindingsToString.js");class o{constructor(e,t){this.type="bindings",this.dataFactory=e,this.entries=t}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))}delete(e){return new o(this.dataFactory,this.entries.delete("string"==typeof e?e:e.value))}keys(){return this.mapIterable(this.iteratorToIterable(this.entries.keys()),(e=>this.dataFactory.variable(e)))}values(){return this.iteratorToIterable(this.entries.values())}forEach(e){this.entries.forEach(((t,r)=>e(t,this.dataFactory.variable(r))))}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,n.Map)(this.entries.filter(((t,r)=>e(t,this.dataFactory.variable(r))))))}map(e){return new o(this.dataFactory,(0,n.Map)(this.entries.map(((t,r)=>e(t,this.dataFactory.variable(r))))))}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 o=t||i;r.push([n,o])}return new o(this.dataFactory,(0,n.Map)(r))}mergeWith(e,t){const r=new Set([...this.iteratorToIterable(this.entries.keys()),...[...t.keys()].map((e=>e.value))]),i=[];for(const n of r){const r=this.dataFactory.variable(n),o=this.entries.get(n),s=t.get(r);let a;a=o&&s&&!o.equals(s)?e(o,s,r):o||s,i.push([n,a])}return new o(this.dataFactory,(0,n.Map)(i))}toString(){return(0,i.bindingsToString)(this)}*mapIterable(e,t){for(const r of e)yield t(r)}iteratorToIterable(e){return{[Symbol.iterator]:()=>e}}}t.Bindings=o},"../node_modules/@comunica/bindings-factory/lib/BindingsFactory.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsFactory=void 0;const n=r("../packages/immutable/index.js"),i=r("../node_modules/rdf-data-factory/index.js"),o=r("../node_modules/@comunica/bindings-factory/lib/Bindings.js");t.BindingsFactory=class{constructor(e=new i.DataFactory){this.dataFactory=e}bindings(e=[]){return new o.Bindings(this.dataFactory,(0,n.Map)(e.map((([e,t])=>[e.value,t]))))}fromBindings(e){return this.bindings([...e])}fromRecord(e){return this.bindings(Object.entries(e).map((([e,t])=>[this.dataFactory.variable(e),t])))}}},"../node_modules/@comunica/bindings-factory/lib/bindingsToString.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindingsToString=void 0;const n=r("../node_modules/rdf-string/index.js");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,"  ")}},"../node_modules/@comunica/bindings-factory/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/bindings-factory/lib/Bindings.js"),t),i(r("../node_modules/@comunica/bindings-factory/lib/BindingsFactory.js"),t),i(r("../node_modules/@comunica/bindings-factory/lib/bindingsToString.js"),t)},"../node_modules/@comunica/bus-context-preprocess/lib/ActorContextPreprocess.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocess=void 0;const n=r("../node_modules/@comunica/core/lib/index.js");class i extends n.Actor{constructor(e){super(e)}}t.ActorContextPreprocess=i},"../node_modules/@comunica/bus-context-preprocess/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/bus-context-preprocess/lib/ActorContextPreprocess.js"),t)},"../node_modules/@comunica/bus-hash-bindings/lib/ActorHashBindings.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHashBindings=void 0;const n=r("../node_modules/@comunica/core/lib/index.js");class i extends n.Actor{constructor(e){super(e)}}t.ActorHashBindings=i},"../node_modules/@comunica/bus-hash-bindings/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/bus-hash-bindings/lib/ActorHashBindings.js"),t)},"../node_modules/@comunica/bus-http/lib/ActorHttp.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttp=void 0;const n=r("../node_modules/@comunica/core/lib/index.js"),i=r("./require-empty.js"),o=r("../node_modules/is-stream/index.js"),s=r("./require-empty.js").toWebReadableStream;class a extends n.Actor{constructor(e){super(e)}static toNodeReadable(e){return o(e)||null===e?e:new i.ReadableWebToNodeStream(e)}static toWebReadableStream(e){return s(e)}static headersToHash(e){const t={};return e.forEach(((e,r)=>{t[r]=e})),t}}t.ActorHttp=a},"../node_modules/@comunica/bus-http/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/bus-http/lib/ActorHttp.js"),t)},"../node_modules/@comunica/bus-init/lib/ActorInit.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorInit=void 0;const n=r("../node_modules/@comunica/core/lib/index.js");class i extends n.Actor{constructor(e){super(e)}}t.ActorInit=i},"../node_modules/@comunica/bus-init/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/bus-init/lib/ActorInit.js"),t)},"../node_modules/@comunica/bus-optimize-query-operation/lib/ActorOptimizeQueryOperation.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperation=void 0;const n=r("../node_modules/@comunica/core/lib/index.js");class i extends n.Actor{constructor(e){super(e)}}t.ActorOptimizeQueryOperation=i},"../node_modules/@comunica/bus-optimize-query-operation/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/bus-optimize-query-operation/lib/ActorOptimizeQueryOperation.js"),t)},"../node_modules/@comunica/bus-query-operation/lib/ActorQueryOperation.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperation=void 0;const n=r("../node_modules/@comunica/context-entries/lib/index.js"),i=r("../node_modules/@comunica/core/lib/index.js"),o=r("../node_modules/@comunica/data-factory/lib/index.js"),s=r("../node_modules/@comunica/bus-query-operation/lib/Bindings.js");let a=0;class u extends i.Actor{constructor(e){super(e)}static getSafeBindings(e){return u.validateQueryOutput(e,"bindings"),e}static getSafeQuads(e){return u.validateQueryOutput(e,"quads"),e}static getSafeBoolean(e){return u.validateQueryOutput(e,"boolean"),e}static getSafeVoid(e){return u.validateQueryOutput(e,"void"),e}static cachifyMetadata(e){let t;return()=>t||(t=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);if(e.has(n.KeysInitQuery.extensionFunctionCreator)&&e.has(n.KeysInitQuery.extensionFunctions))throw new Error("Illegal simultaneous usage of extensionFunctionCreator and extensionFunctions in context");let i=e.get(n.KeysInitQuery.extensionFunctionCreator);const o=e.get(n.KeysInitQuery.extensionFunctions);return o&&(i=e=>o[e.value]),{now:t,baseIRI:r,extensionFunctionCreator:i}}static getExpressionContext(e,t){return{...this.getBaseExpressionContext(e),bnode:e=>new o.BlankNodeBindingsScoped(e||"BNODE_"+a++)}}static getAsyncExpressionContext(e,t){const r={...this.getBaseExpressionContext(e),bnode:e=>Promise.resolve(new o.BlankNodeBindingsScoped(e||"BNODE_"+a++))};return t&&(r.exists=u.createExistenceResolver(e,t)),r}static createExistenceResolver(e,t){return async(r,n)=>{const i=(0,s.materializeOperation)(r.input,n),o=await t.mediate({operation:i,context:e}),a=u.getSafeBindings(o);return new Promise(((e,t)=>{a.bindingsStream.on("end",(()=>{e(!1)})),a.bindingsStream.on("error",t),a.bindingsStream.on("data",(()=>{a.bindingsStream.close(),e(!0)}))})).then((e=>r.not?!e:e))}}static throwOnReadOnly(e){if(e.get(n.KeysQueryOperation.readOnly))throw new Error("Attempted a write operation in read-only mode")}}t.ActorQueryOperation=u},"../node_modules/@comunica/bus-query-operation/lib/ActorQueryOperationTyped.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationTyped=void 0;const n=r("../node_modules/@comunica/context-entries/lib/index.js"),i=r("../node_modules/@comunica/bus-query-operation/lib/ActorQueryOperation.js");class o extends i.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,o=e.context.set(n.KeysQueryOperation.operation,r),s=await this.runOperation(r,o);return"metadata"in s&&(s.metadata=i.ActorQueryOperation.cachifyMetadata(s.metadata)),s}}t.ActorQueryOperationTyped=o},"../node_modules/@comunica/bus-query-operation/lib/ActorQueryOperationTypedMediated.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationTypedMediated=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/ActorQueryOperationTyped.js");class i extends n.ActorQueryOperationTyped{constructor(e,t){super(e,t)}}t.ActorQueryOperationTypedMediated=i},"../node_modules/@comunica/bus-query-operation/lib/Bindings.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.materializeOperation=t.materializeTerm=void 0;const n=r("../node_modules/@comunica/bindings-factory/lib/index.js"),i=r("../node_modules/rdf-string/index.js"),o=r("../node_modules/sparqlalgebrajs/index.js"),s=new n.BindingsFactory;function a(e,t){if("Variable"===e.termType){const r=t.get(e);if(r)return r}return e}t.materializeTerm=a,t.materializeOperation=function e(t,r,n={}){return n={strictTargetVariables:"strictTargetVariables"in n&&n.strictTargetVariables,bindFilter:!("bindFilter"in n)||n.bindFilter},o.Util.mapOperation(t,{path:(e,t)=>({recurse:!1,result:t.createPath(a(e.subject,r),e.predicate,a(e.object,r),a(e.graph,r))}),pattern:(e,t)=>({recurse:!1,result:t.createPattern(a(e.subject,r),a(e.predicate,r),a(e.object,r),a(e.graph,r))}),extend(t){if(r.has(t.variable)){if(n.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)}}return{recurse:!0,result:t}},group(e,t){if(n.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 o=e.variables.filter((e=>!r.has(e)));return{recurse:!0,result:t.createGroup(e.input,o,e.aggregates)}},project(t,o){if(n.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 a=t.variables.filter((e=>!r.has(e))),u=s.bindings(t.variables.map((e=>{const t=r.get(e);if(t)return[e,t]})).filter((e=>Boolean(e))));return{recurse:!1,result:o.createProject(e(t.input,u,n),a)}},values(e,t){if(!n.strictTargetVariables){const n=e.variables.filter((e=>!r.has(e))),o=e.bindings.map((e=>{const t={...e};let n=!0;return r.forEach(((e,r)=>{const o=(0,i.termToString)(r);o in t&&(e.equals(t[o])||(n=!1),delete t[o])})),n?t:void 0})).filter(Boolean);return{recurse:!0,result:t.createValues(n,o)}}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(!n.bindFilter)return{recurse:!1,result:e};if("term"===e.expressionType)return{recurse:!1,result:t.createTermExpression(a(e.term,r))};if("aggregate"===e.expressionType&&"variable"in e&&r.has(e.variable)){if(n.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}}})}},"../node_modules/@comunica/bus-query-operation/lib/BusQueryOperation.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BusQueryOperation=void 0;const n=r("../node_modules/@comunica/core/lib/index.js");class i extends n.BusIndexed{constructor(e){super({...e,actorIdentifierFields:["operationName"],actionIdentifierFields:["operation","type"]})}}t.BusQueryOperation=i},"../node_modules/@comunica/bus-query-operation/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/bus-query-operation/lib/ActorQueryOperation.js"),t),i(r("../node_modules/@comunica/bus-query-operation/lib/ActorQueryOperationTyped.js"),t),i(r("../node_modules/@comunica/bus-query-operation/lib/ActorQueryOperationTypedMediated.js"),t),i(r("../node_modules/@comunica/bus-query-operation/lib/Bindings.js"),t),i(r("../node_modules/@comunica/bus-query-operation/lib/BusQueryOperation.js"),t)},"../node_modules/@comunica/bus-query-parse/lib/ActorQueryParse.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryParse=void 0;const n=r("../node_modules/@comunica/core/lib/index.js");class i extends n.Actor{constructor(e){super(e)}}t.ActorQueryParse=i},"../node_modules/@comunica/bus-query-parse/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/bus-query-parse/lib/ActorQueryParse.js"),t)},"../node_modules/@comunica/bus-rdf-join-entries-sort/lib/ActorRdfJoinEntriesSort.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinEntriesSort=void 0;const n=r("../node_modules/@comunica/core/lib/index.js");class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfJoinEntriesSort=i},"../node_modules/@comunica/bus-rdf-join-entries-sort/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/bus-rdf-join-entries-sort/lib/ActorRdfJoinEntriesSort.js"),t)},"../node_modules/@comunica/bus-rdf-join-selectivity/lib/ActorRdfJoinSelectivity.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinSelectivity=void 0;const n=r("../node_modules/@comunica/core/lib/index.js");class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfJoinSelectivity=i},"../node_modules/@comunica/bus-rdf-join-selectivity/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/bus-rdf-join-selectivity/lib/ActorRdfJoinSelectivity.js"),t)},"../node_modules/@comunica/bus-rdf-join/lib/ActorRdfJoin.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoin=void 0;const n=r("../node_modules/@comunica/bus-query-operation/lib/index.js"),i=r("../node_modules/@comunica/context-entries/lib/index.js"),o=r("../node_modules/@comunica/core/lib/index.js"),s=r("../node_modules/rdf-data-factory/index.js"),a=r("../node_modules/rdf-string/index.js"),u=new s.DataFactory;class c extends o.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}static hash(e,t){return t.filter((t=>e.has(t))).map((t=>(0,a.termToString)(e.get(t)))).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 c.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))}async constructResultMetadata(e,t,r,n={}){let i;return n.cardinality?i=n.cardinality:(i=t.reduce(((e,t)=>{const r=c.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),{...n,cardinality:{type:i.type,value:i.value},canContainUndefs:n.canContainUndefs??t.some((e=>e.canContainUndefs)),variables:c.joinVariables(t)}}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.length<this.limitEntries:e.entries.length>this.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 c.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(i.KeysInitQuery.physicalQueryPlanLogger)&&(t=e.context.get(i.KeysInitQuery.physicalQueryPlanNode),e.context=e.context.set(i.KeysInitQuery.physicalQueryPlanNode,e));const{result:r,physicalPlanMetadata:o}=await this.getOutput(e),s=await c.getMetadatas(e.entries),a=e.context.get(i.KeysInitQuery.physicalQueryPlanLogger);return this.includeInLogs&&a&&a.logOperation(`join-${this.logicalType}`,this.physicalName,e,t,this.name,{...o,cardinalities:s.map(c.getCardinality),joinCoefficients:await this.getJoinCoefficients(e,s)}),r.metadata=n.ActorQueryOperation.cachifyMetadata(r.metadata),r}}t.ActorRdfJoin=c},"../node_modules/@comunica/bus-rdf-join/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/bus-rdf-join/lib/ActorRdfJoin.js"),t)},"../node_modules/@comunica/bus-rdf-resolve-quad-pattern/lib/ActorRdfResolveQuadPattern.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveQuadPattern=void 0;const n=r("../node_modules/@comunica/core/lib/index.js");class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfResolveQuadPattern=i},"../node_modules/@comunica/bus-rdf-resolve-quad-pattern/lib/ActorRdfResolveQuadPatternSource.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveQuadPatternSource=void 0;const n=r("../node_modules/@comunica/bus-rdf-resolve-quad-pattern/lib/ActorRdfResolveQuadPattern.js");class i extends n.ActorRdfResolveQuadPattern{constructor(e){super(e)}async test(e){return!0}async run(e){const t=await this.getSource(e.context,e.pattern);return await this.getOutput(t,e.pattern,e.context)}async getOutput(e,t,r){return{data:e.match(t.subject,t.predicate,t.object,t.graph)}}}t.ActorRdfResolveQuadPatternSource=i},"../node_modules/@comunica/bus-rdf-resolve-quad-pattern/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/bus-rdf-resolve-quad-pattern/lib/ActorRdfResolveQuadPattern.js"),t),i(r("../node_modules/@comunica/bus-rdf-resolve-quad-pattern/lib/ActorRdfResolveQuadPatternSource.js"),t),i(r("../node_modules/@comunica/bus-rdf-resolve-quad-pattern/lib/utils.js"),t)},"../node_modules/@comunica/bus-rdf-resolve-quad-pattern/lib/utils.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasContextSingleSourceOfType=t.hasContextSingleSource=t.getContextSourceUrl=t.getContextSourceFirst=t.getContextSource=t.getContextSources=t.getDataSourceContext=t.getDataSourceValue=t.getDataSourceType=t.isDataSourceRawType=void 0;const n=r("../node_modules/@comunica/context-entries/lib/index.js");function i(e){return"string"==typeof e||"match"in e}function o(e){return"string"==typeof e?"":"match"in e?"rdfjsSource":e.type}function s(e){return i(e)?e:e.value}function a(e){return e.get(n.KeysRdfResolveQuadPattern.source)}t.isDataSourceRawType=i,t.getDataSourceType=o,t.getDataSourceValue=s,t.getDataSourceContext=function(e,t){return"string"==typeof e||"match"in e||!e.context?t:t.merge(e.context)},t.getContextSources=function(e){return e.get(n.KeysRdfResolveQuadPattern.sources)},t.getContextSource=a,t.getContextSourceFirst=function(e){if(e.has(n.KeysRdfResolveQuadPattern.source))return e.get(n.KeysRdfResolveQuadPattern.source);const t=e.get(n.KeysRdfResolveQuadPattern.sources);return 1===t?.length?t[0]:void 0},t.getContextSourceUrl=function(e){if(e){let t=s(e);if("string"==typeof t){const e=t.indexOf("#");return e>=0&&(t=t.slice(0,e)),t}}},t.hasContextSingleSource=function(e){const t=a(e);return Boolean(t&&(i(t)||t.value))},t.hasContextSingleSourceOfType=function(e,t){const r=a(t);return Boolean(r&&o(r)===e&&s(r))}},"../node_modules/@comunica/bus-rdf-update-quads/lib/ActorRdfUpdateQuads.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuads=void 0;const n=r("../node_modules/@comunica/core/lib/index.js");class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfUpdateQuads=i},"../node_modules/@comunica/bus-rdf-update-quads/lib/ActorRdfUpdateQuadsDestination.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuadsDestination=void 0;const n=r("../node_modules/@comunica/actor-rdf-resolve-quad-pattern-federated/lib/index.js"),i=r("../node_modules/@comunica/context-entries/lib/index.js"),o=r("../node_modules/@comunica/bus-rdf-update-quads/lib/ActorRdfUpdateQuads.js");function s(e,t){return e?.map((e=>n.FederatedQuadSource.deskolemizeQuad(e,t)))}class a extends o.ActorRdfUpdateQuads{async test(e){return!0}async run(e){const t=await this.getDestination(e.context);return await this.getOutput(t,function(e){const t=e.context.get(i.KeysRdfUpdateQuads.destination),r=e.context.get(i.KeysRdfResolveQuadPattern.sourceIds)?.get(t);return r?{...e,quadStreamInsert:s(e.quadStreamInsert,r),quadStreamDelete:s(e.quadStreamDelete,r)}:e}(e),e.context)}async getOutput(e,t,r){return{execute:()=>Promise.all([t.quadStreamInsert?e.insert(t.quadStreamInsert):Promise.resolve(),t.quadStreamDelete?e.delete(t.quadStreamDelete):Promise.resolve(),t.deleteGraphs?e.deleteGraphs(t.deleteGraphs.graphs,t.deleteGraphs.requireExistence,t.deleteGraphs.dropGraphs):Promise.resolve(),t.createGraphs?e.createGraphs(t.createGraphs.graphs,t.createGraphs.requireNonExistence):Promise.resolve()]).then((()=>{}))}}}t.ActorRdfUpdateQuadsDestination=a},"../node_modules/@comunica/bus-rdf-update-quads/lib/IQuadDestination.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateHttpResponse=void 0;const n=r("../node_modules/@comunica/bus-http/lib/index.js"),i=r("../node_modules/stream-to-string/index.js");t.validateHttpResponse=async function(e,t){if(t.status>=400){let r="empty response";if(t.body){const e=n.ActorHttp.toNodeReadable(t.body);r=await i(e)}throw new Error(`Could not update ${e} (HTTP status ${t.status}):\n${r}`)}await(t.body?.cancel())}},"../node_modules/@comunica/bus-rdf-update-quads/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/bus-rdf-update-quads/lib/ActorRdfUpdateQuads.js"),t),i(r("../node_modules/@comunica/bus-rdf-update-quads/lib/ActorRdfUpdateQuadsDestination.js"),t),i(r("../node_modules/@comunica/bus-rdf-update-quads/lib/IQuadDestination.js"),t),i(r("../node_modules/@comunica/bus-rdf-update-quads/lib/utils.js"),t)},"../node_modules/@comunica/bus-rdf-update-quads/lib/utils.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContextDestinationUrl=t.getContextDestinationFirst=t.getContextDestination=t.getDataDestinationContext=t.getDataDestinationValue=t.getDataDestinationType=t.isDataDestinationRawType=void 0;const n=r("../node_modules/@comunica/context-entries/lib/index.js");function i(e){return"string"==typeof e||"remove"in e}function o(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=o,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.getContextDestinationFirst=function(e){if(e.has(n.KeysRdfUpdateQuads.destination))return e.get(n.KeysRdfUpdateQuads.destination)},t.getContextDestinationUrl=function(e){if(e){let t=o(e);if("string"==typeof t){const e=t.indexOf("#");return e>=0&&(t=t.slice(0,e)),t}}}},"../node_modules/@comunica/context-entries/lib/Keys.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeysRdfUpdateQuads=t.KeysRdfResolveQuadPattern=t.KeysRdfParseHtmlScript=t.KeysRdfParseJsonLd=t.KeysQueryOperation=t.KeysInitQuery=t.KeysHttpProxy=t.KeysHttpMemento=t.KeysHttp=t.KeysCore=void 0;const n=r("../node_modules/@comunica/core/lib/index.js");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")},t.KeysHttpMemento={datetime:new n.ActionContextKey("@comunica/actor-http-memento:datetime")},t.KeysHttpProxy={httpProxyHandler:new n.ActionContextKey("@comunica/actor-http-proxy:httpProxyHandler")},t.KeysInitQuery={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"),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")},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")},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.KeysRdfResolveQuadPattern={sources:new n.ActionContextKey("@comunica/bus-rdf-resolve-quad-pattern:sources"),source:new n.ActionContextKey("@comunica/bus-rdf-resolve-quad-pattern:source"),sourceIds:new n.ActionContextKey("@comunica/bus-rdf-resolve-quad-pattern:sourceIds")},t.KeysRdfUpdateQuads={destination:new n.ActionContextKey("@comunica/bus-rdf-update-quads:destination")}},"../node_modules/@comunica/context-entries/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/context-entries/lib/Keys.js"),t)},"../node_modules/@comunica/core/lib/ActionContext.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionContextKey=t.ActionContext=void 0;const n=r("../packages/immutable/index.js");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)}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 o(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 o{constructor(e){this.name=e}}t.ActionContextKey=o},"../node_modules/@comunica/core/lib/ActionObserver.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionObserver=void 0,t.ActionObserver=class{constructor(e){Object.assign(this,e)}}},"../node_modules/@comunica/core/lib/Actor.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Actor=void 0;const n=r("../node_modules/@comunica/core/lib/ContextEntries.js");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},"../node_modules/@comunica/core/lib/Bus.js":(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<e.length;r++){let n=!0;for(const t of this.dependencyLinks.get(e[r]))if(!this.actors.includes(t)&&e.includes(t)){n=!1;break}if(n){t=r;break}}if(t<0)throw new Error(`Cyclic dependency links detected in bus ${this.name}`);const r=e.splice(t,1)[0];this.actors.push(r)}}}}},"../node_modules/@comunica/core/lib/BusIndexed.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BusIndexed=void 0;const n=r("../node_modules/@comunica/core/lib/Bus.js");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},"../node_modules/@comunica/core/lib/ContextEntries.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_KEY_LOGGER=void 0;const n=r("../node_modules/@comunica/core/lib/ActionContext.js");t.CONTEXT_KEY_LOGGER=new n.ActionContextKey("@comunica/core:log")},"../node_modules/@comunica/core/lib/Logger.js":(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}},"../node_modules/@comunica/core/lib/Mediator.js":(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)}}},"../node_modules/@comunica/core/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/core/lib/ActionContext.js"),t),i(r("../node_modules/@comunica/core/lib/Bus.js"),t),i(r("../node_modules/@comunica/core/lib/BusIndexed.js"),t),i(r("../node_modules/@comunica/core/lib/ContextEntries.js"),t),i(r("../node_modules/@comunica/core/lib/ActionObserver.js"),t),i(r("../node_modules/@comunica/core/lib/Actor.js"),t),i(r("../node_modules/@comunica/core/lib/Logger.js"),t),i(r("../node_modules/@comunica/core/lib/Mediator.js"),t)},"../node_modules/@comunica/data-factory/lib/BlankNodeBindingsScoped.js":(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}}},"../node_modules/@comunica/data-factory/lib/BlankNodeScoped.js":(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}}},"../node_modules/@comunica/data-factory/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/data-factory/lib/BlankNodeScoped.js"),t),i(r("../node_modules/@comunica/data-factory/lib/BlankNodeBindingsScoped.js"),t)},"../node_modules/@comunica/logger-void/lib/LoggerVoid.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerVoid=void 0;const n=r("../node_modules/@comunica/core/lib/index.js");class i extends n.Logger{debug(){}error(){}fatal(){}info(){}trace(){}warn(){}}t.LoggerVoid=i},"../node_modules/@comunica/logger-void/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/logger-void/lib/LoggerVoid.js"),t)},"../node_modules/@comunica/mediator-all/lib/MediatorAll.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorAll=void 0;const n=r("../node_modules/@comunica/core/lib/index.js");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},"../node_modules/@comunica/mediator-all/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/mediator-all/lib/MediatorAll.js"),t)},"../node_modules/@comunica/mediator-combine-pipeline/lib/MediatorCombinePipeline.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorCombinePipeline=void 0;const n=r("../node_modules/@comunica/core/lib/index.js");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 Error("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},"../node_modules/@comunica/mediator-combine-pipeline/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/mediator-combine-pipeline/lib/MediatorCombinePipeline.js"),t)},"../node_modules/@comunica/mediator-combine-union/lib/MediatorCombineUnion.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorCombineUnion=void 0;const n=r("../node_modules/@comunica/core/lib/index.js");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=[]}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,r,n)=>{t[this.field]={...e,...t[this.field]}})),t}}}t.MediatorCombineUnion=i},"../node_modules/@comunica/mediator-combine-union/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/mediator-combine-union/lib/MediatorCombineUnion.js"),t)},"../node_modules/@comunica/mediator-join-coefficients-fixed/lib/MediatorJoinCoefficientsFixed.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorJoinCoefficientsFixed=void 0;const n=r("../node_modules/@comunica/context-entries/lib/index.js"),i=r("../node_modules/@comunica/core/lib/index.js");class o extends i.Mediator{constructor(e){super(e)}async mediateWith(e,t){const r=[],o=t.map((({reply:e})=>e)).map((e=>e.catch((e=>{r.push(e)})))),s=await Promise.all(o),a=e.context.get(n.KeysQueryOperation.limitIndicator),u=s.map((e=>{if(e&&(!a||e.iterations<a||0===e.persistedItems))return e.iterations*this.cpuWeight+e.persistedItems*this.memoryWeight+e.blockingItems*this.timeWeight+e.requestTime*this.ioWeight}));let c=-1,l=Number.POSITIVE_INFINITY;for(const[e,t]of u.entries())void 0!==t&&(-1===c||t<l)&&(c=e,l=t);if(c<0)throw new Error(`All actors rejected their test in ${this.name}\n${r.map((e=>e.message)).join("\n")}`);const d=t[c].actor;return d.includeInLogs&&i.Actor.getContextLogger(e.context)?.debug(`Determined physical join operator '${d.logicalType}-${d.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(u.map(((e,r)=>[`${t[r].actor.logicalType}-${t[r].actor.physicalName}`,e]))),coefficients:Object.fromEntries(s.map(((e,r)=>[`${t[r].actor.logicalType}-${t[r].actor.physicalName}`,e])))}),d}}t.MediatorJoinCoefficientsFixed=o},"../node_modules/@comunica/mediator-join-coefficients-fixed/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/mediator-join-coefficients-fixed/lib/MediatorJoinCoefficientsFixed.js"),t)},"../node_modules/@comunica/mediator-number/lib/MediatorNumber.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorNumber=void 0;const n=r("../node_modules/@comunica/core/lib/index.js");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]<n)?[n,r]:e}),[Number.NaN,-1])[1];default:throw new Error(`No valid "type" value was given, must be either 'min' or 'max', but got: ${this.type}`)}}getOrDefault(e,t){return void 0===e?t:e}async mediateWith(e,t){let r=t.map((({reply:e})=>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),o=this.indexPicker(i);if(o<0)throw new Error(`All actors rejected their test in ${this.name}\n${n.map((e=>e.message)).join("\n")}`);return t[o].actor}}t.MediatorNumber=i},"../node_modules/@comunica/mediator-number/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/mediator-number/lib/MediatorNumber.js"),t)},"../node_modules/@comunica/mediator-race/lib/MediatorRace.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorRace=void 0;const n=r("../node_modules/@comunica/core/lib/index.js");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},"../node_modules/@comunica/mediator-race/lib/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/@comunica/mediator-race/lib/MediatorRace.js"),t)},"../node_modules/asyncjoin/index.js":(e,t,r)=>{const n=r("../node_modules/asyncjoin/join/DynamicNestedLoopJoin.js"),i=r("../node_modules/asyncjoin/join/HashJoin.js"),o=r("../node_modules/asyncjoin/join/NestedLoopJoin.js"),s=r("../node_modules/asyncjoin/join/SymmetricHashJoin.js"),a=r("../node_modules/asyncjoin/util/MergeIterator.js");e.exports={DynamicNestedLoopJoin:n,HashJoin:i,NestedLoopJoin:o,SymmetricHashJoin:s,MergeStream:a}},"../node_modules/asyncjoin/join/DynamicNestedLoopJoin.js":(e,t,r)=>{let n=r("asynciterator"),i=n.MultiTransformIterator,o=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 o(this.funRight(e),{transform:(t,r,n)=>{let i=this.funJoin(e,t);null!==i&&n(i),r()}})}}},"../node_modules/asyncjoin/join/HashJoin.js":(e,t,r)=>{let n=r("asynciterator").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(){if(this.leftMap.size<=0)return this.close();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.addedDataListener||(this.addedDataListener=!0,this._addDataListener())}))}hasResults(){return!this.right.ended||this.matchIdx<this.matches.length}close(){super.close(),this.left.close(),this.right.close()}read(){if(this.addedDataListener||(this.addedDataListener=!0,this._addDataListener()),this.ended||!this.readable)return null;for(;this.matchIdx<this.matches.length;){let e=this.matches[this.matchIdx++],t=this.funJoin(e,this.match);if(null!==t)return t}if(this.hasResults()||this._end(),this.match=this.right.read(),null===this.match)return this.readable=!1,null;let e=this.funHash(this.match);return this.matches=this.leftMap.get(e)||[],this.matchIdx=0,this.read()}_addDataListener(){this.left.on("data",function(e){let t=this.funHash(e);this.leftMap.has(t)||this.leftMap.set(t,[]),this.leftMap.get(t).push(e)}.bind(this))}}},"../node_modules/asyncjoin/join/NestedLoopJoin.js":(e,t,r)=>{const{MultiTransformIterator:n,SimpleTransformIterator:i,scheduleTask:o}=r("asynciterator");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()))}close(){super.close(),o((()=>this.right.close()))}_createTransformer(e){return new i(this.right.clone(),{transform:(t,r,n)=>{let i=this.funJoin(e,t);null!==i&&n(i),r()}})}}},"../node_modules/asyncjoin/join/SymmetricHashJoin.js":(e,t,r)=>{let n=r("asynciterator").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<this.matches.length}_cleanup(){this.leftMap=null,this.rightMap=null,this.matches=null}close(){super.close(),this.left.close(),this.right.close()}read(){if(this.ended)return null;for(;this.matchIdx<this.matches.length;){let e=this.matches[this.matchIdx++],t=this.usedLeft?this.funJoin(this.match,e):this.funJoin(e,this.match);if(null!==t)return t}this.hasResults()||this._end();let e=null;for(let t=0;t<2&&(e=this.usedLeft?this.right.read():this.left.read(),this.usedLeft=!this.usedLeft,null===e);++t);if(null===e)return this.readable=!1,null;let t=this.funHash(e),r=this.usedLeft?this.leftMap:this.rightMap;return r.has(t)||r.set(t,[]),r.get(t).push(e),this.match=e,this.matches=(this.usedLeft?this.rightMap:this.leftMap).get(t)||[],this.matchIdx=0,this.read()}}},"../node_modules/asyncjoin/util/MergeIterator.js":(e,t,r)=>{let n=r("asynciterator").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<this.streams.length;++e){this.idx=(this.idx+1)%this.streams.length;let e=this.streams[this.idx].read();if(null!==e)return e}return null}}},"../node_modules/bignumber.js/bignumber.js":function(e,t,r){var n;!function(i){"use strict";var o,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,u=Math.floor,c="[BigNumber Error] ",l=c+"Number primitive has more than 15 significant digits: ",d=1e14,p=14,h=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],y=1e7,m=1e9;function b(e){var t=0|e;return e>0||e===t?t:t-1}function g(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=p-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function _(e,t){var r,n,i=e.c,o=t.c,s=e.s,a=t.s,u=e.e,c=t.e;if(!s||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=u==c,!i||!o)return n?0:!i^r?1:-1;if(!n)return u>c^r?1:-1;for(a=(u=i.length)<(c=o.length)?u:c,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return u==c?0:u>c^r?1:-1}function v(e,t,r,n){if(e<t||e>r||e!==u(e))throw Error(c+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function O(e){var t=e.c.length-1;return b(e.e/p)==t&&e.c[t]%2!=0}function j(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function T(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 t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}o=function e(t){var r,n,i,o,w,S,x,E,A,R,N=V.prototype={constructor:V,toString:null,valueOf:null},P=new V(1),I=20,L=4,D=-7,M=21,C=-1e7,B=1e7,q=!1,F=1,U=0,k={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},Q="0123456789abcdefghijklmnopqrstuvwxyz",G=!0;function V(e,t){var r,o,a,c,d,f,y,m,b=this;if(!(b instanceof V))return new V(e,t);if(null==t){if(e&&!0===e._isBigNumber)return b.s=e.s,void(!e.c||e.e>B?b.c=b.e=null:e.e<C?b.c=[b.e=0]:(b.e=e.e,b.c=e.c.slice()));if((f="number"==typeof e)&&0*e==0){if(b.s=1/e<0?(e=-e,-1):1,e===~~e){for(c=0,d=e;d>=10;d/=10,c++);return void(c>B?b.c=b.e=null:(b.e=c,b.c=[e]))}m=String(e)}else{if(!s.test(m=String(e)))return i(b,m,f);b.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(c=m.indexOf("."))>-1&&(m=m.replace(".","")),(d=m.search(/e/i))>0?(c<0&&(c=d),c+=+m.slice(d+1),m=m.substring(0,d)):c<0&&(c=m.length)}else{if(v(t,2,Q.length,"Base"),10==t&&G)return H(b=new V(e),I+b.e+1,L);if(m=String(e),f="number"==typeof e){if(0*e!=0)return i(b,m,f,t);if(b.s=1/e<0?(m=m.slice(1),-1):1,V.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else b.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(r=Q.slice(0,t),c=d=0,y=m.length;d<y;d++)if(r.indexOf(o=m.charAt(d))<0){if("."==o){if(d>c){c=y;continue}}else if(!a&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){a=!0,d=-1,c=0;continue}return i(b,String(e),f,t)}f=!1,(c=(m=n(m,t,10,b.s)).indexOf("."))>-1?m=m.replace(".",""):c=m.length}for(d=0;48===m.charCodeAt(d);d++);for(y=m.length;48===m.charCodeAt(--y););if(m=m.slice(d,++y)){if(y-=d,f&&V.DEBUG&&y>15&&(e>h||e!==u(e)))throw Error(l+b.s*e);if((c=c-d-1)>B)b.c=b.e=null;else if(c<C)b.c=[b.e=0];else{if(b.e=c,b.c=[],d=(c+1)%p,c<0&&(d+=p),d<y){for(d&&b.c.push(+m.slice(0,d)),y-=p;d<y;)b.c.push(+m.slice(d,d+=p));d=p-(m=m.slice(d)).length}else d-=y;for(;d--;m+="0");b.c.push(+m)}}else b.c=[b.e=0]}function X(e,t,r,n){var i,o,s,a,u;if(null==r?r=L:v(r,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)u=g(e.c),u=1==n||2==n&&(s<=D||s>=M)?j(u,s):T(u,s,"0");else if(o=(e=H(new V(e),t,r)).e,a=(u=g(e.c)).length,1==n||2==n&&(t<=o||o<=D)){for(;a<t;u+="0",a++);u=j(u,o)}else if(t-=s,u=T(u,o,"0"),o+1>a){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-a)>0)for(o+1==a&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function $(e,t){for(var r,n=1,i=new V(e[0]);n<e.length;n++){if(!(r=new V(e[n])).s){i=r;break}t.call(i,r)&&(i=r)}return i}function J(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*p-1)>B?e.c=e.e=null:r<C?e.c=[e.e=0]:(e.e=r,e.c=t),e}function H(e,t,r,n){var i,o,s,c,l,h,y,m=e.c,b=f;if(m){e:{for(i=1,c=m[0];c>=10;c/=10,i++);if((o=t-i)<0)o+=p,s=t,y=(l=m[h=0])/b[i-s-1]%10|0;else if((h=a((o+1)/p))>=m.length){if(!n)break e;for(;m.length<=h;m.push(0));l=y=0,i=1,s=(o%=p)-p+1}else{for(l=c=m[h],i=1;c>=10;c/=10,i++);y=(s=(o%=p)-p+i)<0?0:l/b[i-s-1]%10|0}if(n=n||t<0||null!=m[h+1]||(s<0?l:l%b[i-s-1]),n=r<4?(y||n)&&(0==r||r==(e.s<0?3:2)):y>5||5==y&&(4==r||n||6==r&&(o>0?s>0?l/b[i-s]:0:m[h-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=b[(p-t%p)%p],e.e=-t||0):m[0]=e.e=0,e;if(0==o?(m.length=h,c=1,h--):(m.length=h+1,c=b[p-o],m[h]=s>0?u(l/b[i-s]%b[s])*c:0),n)for(;;){if(0==h){for(o=1,s=m[0];s>=10;s/=10,o++);for(s=m[0]+=c,c=1;s>=10;s/=10,c++);o!=c&&(e.e++,m[0]==d&&(m[0]=1));break}if(m[h]+=c,m[h]!=d)break;m[h--]=0,c=1}for(o=m.length;0===m[--o];m.pop());}e.e>B?e.c=e.e=null:e.e<C&&(e.c=[e.e=0])}return e}function z(e){var t,r=e.e;return null===r?e.toString():(t=g(e.c),t=r<=D||r>=M?j(t,r):T(t,r,"0"),e.s<0?"-"+t:t)}return V.clone=e,V.ROUND_UP=0,V.ROUND_DOWN=1,V.ROUND_CEIL=2,V.ROUND_FLOOR=3,V.ROUND_HALF_UP=4,V.ROUND_HALF_DOWN=5,V.ROUND_HALF_EVEN=6,V.ROUND_HALF_CEIL=7,V.ROUND_HALF_FLOOR=8,V.EUCLID=9,V.config=V.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(v(r=e[t],0,m,t),I=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(v(r=e[t],0,8,t),L=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(v(r[0],-m,0,t),v(r[1],0,m,t),D=r[0],M=r[1]):(v(r,-m,m,t),D=-(M=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)v(r[0],-m,-1,t),v(r[1],1,m,t),C=r[0],B=r[1];else{if(v(r,-m,m,t),!r)throw Error(c+t+" cannot be zero: "+r);C=-(B=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(c+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw q=!r,Error(c+"crypto unavailable");q=r}else q=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(v(r=e[t],0,9,t),F=r),e.hasOwnProperty(t="POW_PRECISION")&&(v(r=e[t],0,m,t),U=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(c+t+" not an object: "+r);k=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(c+t+" invalid: "+r);G="0123456789"==r.slice(0,10),Q=r}}return{DECIMAL_PLACES:I,ROUNDING_MODE:L,EXPONENTIAL_AT:[D,M],RANGE:[C,B],CRYPTO:q,MODULO_MODE:F,POW_PRECISION:U,FORMAT:k,ALPHABET:Q}},V.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!V.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-m&&i<=m&&i===u(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%p)<1&&(t+=p),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=d||r!==u(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+e)},V.maximum=V.max=function(){return $(arguments,N.lt)},V.minimum=V.min=function(){return $(arguments,N.gt)},V.random=(o=9007199254740992,w=Math.random()*o&2097151?function(){return u(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,o,s=0,l=[],d=new V(P);if(null==e?e=I:v(e,0,m),i=a(e/p),q)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));s<i;)(o=131072*t[s]+(t[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(l.push(o%1e14),s+=2);s=i/2}else{if(!crypto.randomBytes)throw q=!1,Error(c+"crypto unavailable");for(t=crypto.randomBytes(i*=7);s<i;)(o=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(l.push(o%1e14),s+=7);s=i/7}if(!q)for(;s<i;)(o=w())<9e15&&(l[s++]=o%1e14);for(i=l[--s],e%=p,i&&e&&(o=f[p-e],l[s]=u(i/o)*o);0===l[s];l.pop(),s--);if(s<0)l=[n=0];else{for(n=-1;0===l[0];l.splice(0,1),n-=p);for(s=1,o=l[0];o>=10;o/=10,s++);s<p&&(n-=p-s)}return d.e=n,d.c=l,d}),V.sum=function(){for(var e=1,t=arguments,r=new V(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var i,o,s=[0],a=0,u=e.length;a<u;){for(o=s.length;o--;s[o]*=t);for(s[0]+=n.indexOf(e.charAt(a++)),i=0;i<s.length;i++)s[i]>r-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(n,i,o,s,a){var u,c,l,d,p,h,f,y,m=n.indexOf("."),b=I,_=L;for(m>=0&&(d=U,U=0,n=n.replace(".",""),h=(y=new V(i)).pow(n.length-m),U=d,y.c=t(T(g(h.c),h.e,"0"),10,o,e),y.e=y.c.length),l=d=(f=t(n,i,o,a?(u=Q,e):(u=e,Q))).length;0==f[--d];f.pop());if(!f[0])return u.charAt(0);if(m<0?--l:(h.c=f,h.e=l,h.s=s,f=(h=r(h,y,b,_,o)).c,p=h.r,l=h.e),m=f[c=l+b+1],d=o/2,p=p||c<0||null!=f[c+1],p=_<4?(null!=m||p)&&(0==_||_==(h.s<0?3:2)):m>d||m==d&&(4==_||p||6==_&&1&f[c-1]||_==(h.s<0?8:7)),c<1||!f[0])n=p?T(u.charAt(1),-b,u.charAt(0)):u.charAt(0);else{if(f.length=c,p)for(--o;++f[--c]>o;)f[c]=0,c||(++l,f=[1].concat(f));for(d=f.length;!f[--d];);for(m=0,n="";m<=d;n+=u.charAt(f[m++]));n=T(n,l,u.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,o,s,a=0,u=e.length,c=t%y,l=t/y|0;for(e=e.slice();u--;)a=((i=c*(o=e[u]%y)+(n=l*o+(s=e[u]/y|0)*c)%y*y+a)/r|0)+(n/y|0)+l*s,e[u]=i%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,o,s,a){var c,l,h,f,y,m,g,_,v,O,j,T,w,S,x,E,A,R=n.s==i.s?1:-1,N=n.c,P=i.c;if(!(N&&N[0]&&P&&P[0]))return new V(n.s&&i.s&&(N?!P||N[0]!=P[0]:P)?N&&0==N[0]||!P?0*R:R/0:NaN);for(v=(_=new V(R)).c=[],R=o+(l=n.e-i.e)+1,a||(a=d,l=b(n.e/p)-b(i.e/p),R=R/p|0),h=0;P[h]==(N[h]||0);h++);if(P[h]>(N[h]||0)&&l--,R<0)v.push(1),f=!0;else{for(S=N.length,E=P.length,h=0,R+=2,(y=u(a/(P[0]+1)))>1&&(P=e(P,y,a),N=e(N,y,a),E=P.length,S=N.length),w=E,j=(O=N.slice(0,E)).length;j<E;O[j++]=0);A=P.slice(),A=[0].concat(A),x=P[0],P[1]>=a/2&&x++;do{if(y=0,(c=t(P,O,E,j))<0){if(T=O[0],E!=j&&(T=T*a+(O[1]||0)),(y=u(T/x))>1)for(y>=a&&(y=a-1),g=(m=e(P,y,a)).length,j=O.length;1==t(m,O,g,j);)y--,r(m,E<g?A:P,g,a),g=m.length,c=1;else 0==y&&(c=y=1),g=(m=P.slice()).length;if(g<j&&(m=[0].concat(m)),r(O,m,j,a),j=O.length,-1==c)for(;t(P,O,E,j)<1;)y++,r(O,E<j?A:P,j,a),j=O.length}else 0===c&&(y++,O=[0]);v[h++]=y,O[0]?O[j++]=N[w]||0:(O=[N[w]],j=1)}while((w++<S||null!=O[0])&&R--);f=null!=O[0],v[0]||v.splice(0,1)}if(a==d){for(h=1,R=v[0];R>=10;R/=10,h++);H(_,o+(_.e=h+l*p-1)+1,s,f)}else _.e=l,_.r=+f;return _}}(),S=/^(-?)0([xbo])(?=\w[\w.]*$)/i,x=/^([^.]+)\.$/,E=/^\.([^.]+)$/,A=/^-?(Infinity|NaN)$/,R=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,o=r?t:t.replace(R,"");if(A.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(S,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,o=o.replace(x,"$1").replace(E,"0.$1")),t!=o))return new V(o,i);if(V.DEBUG)throw Error(c+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},N.absoluteValue=N.abs=function(){var e=new V(this);return e.s<0&&(e.s=1),e},N.comparedTo=function(e,t){return _(this,new V(e,t))},N.decimalPlaces=N.dp=function(e,t){var r,n,i,o=this;if(null!=e)return v(e,0,m),null==t?t=L:v(t,0,8),H(new V(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-b(this.e/p))*p,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},N.dividedBy=N.div=function(e,t){return r(this,new V(e,t),I,L)},N.dividedToIntegerBy=N.idiv=function(e,t){return r(this,new V(e,t),0,1)},N.exponentiatedBy=N.pow=function(e,t){var r,n,i,o,s,l,d,h,f=this;if((e=new V(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+z(e));if(null!=t&&(t=new V(t)),s=e.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return h=new V(Math.pow(+z(f),s?2-O(e):+z(e))),t?h.mod(t):h;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new V(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||s&&f.c[1]>=24e7:f.c[0]<8e13||s&&f.c[0]<=9999975e7)))return o=f.s<0&&O(e)?-0:0,f.e>-1&&(o=1/o),new V(l?1/o:o);U&&(o=a(U/p+2))}for(s?(r=new V(.5),l&&(e.s=1),d=O(e)):d=(i=Math.abs(+z(e)))%2,h=new V(P);;){if(d){if(!(h=h.times(f)).c)break;o?h.c.length>o&&(h.c.length=o):n&&(h=h.mod(t))}if(i){if(0===(i=u(i/2)))break;d=i%2}else if(H(e=e.times(r),e.e+1,1),e.e>14)d=O(e);else{if(0==(i=+z(e)))break;d=i%2}f=f.times(f),o?f.c&&f.c.length>o&&(f.c.length=o):n&&(f=f.mod(t))}return n?h:(l&&(h=P.div(h)),t?h.mod(t):o?H(h,U,L,void 0):h)},N.integerValue=function(e){var t=new V(this);return null==e?e=L:v(e,0,8),H(t,t.e+1,e)},N.isEqualTo=N.eq=function(e,t){return 0===_(this,new V(e,t))},N.isFinite=function(){return!!this.c},N.isGreaterThan=N.gt=function(e,t){return _(this,new V(e,t))>0},N.isGreaterThanOrEqualTo=N.gte=function(e,t){return 1===(t=_(this,new V(e,t)))||0===t},N.isInteger=function(){return!!this.c&&b(this.e/p)>this.c.length-2},N.isLessThan=N.lt=function(e,t){return _(this,new V(e,t))<0},N.isLessThanOrEqualTo=N.lte=function(e,t){return-1===(t=_(this,new V(e,t)))||0===t},N.isNaN=function(){return!this.s},N.isNegative=function(){return this.s<0},N.isPositive=function(){return this.s>0},N.isZero=function(){return!!this.c&&0==this.c[0]},N.minus=function(e,t){var r,n,i,o,s=this,a=s.s;if(t=(e=new V(e,t)).s,!a||!t)return new V(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/p,c=e.e/p,l=s.c,h=e.c;if(!u||!c){if(!l||!h)return l?(e.s=-t,e):new V(h?s:NaN);if(!l[0]||!h[0])return h[0]?(e.s=-t,e):new V(l[0]?s:3==L?-0:0)}if(u=b(u),c=b(c),l=l.slice(),a=u-c){for((o=a<0)?(a=-a,i=l):(c=u,i=h),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(n=(o=(a=l.length)<(t=h.length))?a:t,a=t=0;t<n;t++)if(l[t]!=h[t]){o=l[t]<h[t];break}if(o&&(i=l,l=h,h=i,e.s=-e.s),(t=(n=h.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=d-1;n>a;){if(l[--n]<h[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=d}l[n]-=h[n]}for(;0==l[0];l.splice(0,1),--c);return l[0]?J(e,l,c):(e.s=3==L?-1:1,e.c=[e.e=0],e)},N.modulo=N.mod=function(e,t){var n,i,o=this;return e=new V(e,t),!o.c||!e.s||e.c&&!e.c[0]?new V(NaN):!e.c||o.c&&!o.c[0]?new V(o):(9==F?(i=e.s,e.s=1,n=r(o,e,0,3),e.s=i,n.s*=i):n=r(o,e,0,F),(e=o.minus(n.times(e))).c[0]||1!=F||(e.s=o.s),e)},N.multipliedBy=N.times=function(e,t){var r,n,i,o,s,a,u,c,l,h,f,m,g,_,v,O=this,j=O.c,T=(e=new V(e,t)).c;if(!(j&&T&&j[0]&&T[0]))return!O.s||!e.s||j&&!j[0]&&!T||T&&!T[0]&&!j?e.c=e.e=e.s=null:(e.s*=O.s,j&&T?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=b(O.e/p)+b(e.e/p),e.s*=O.s,(u=j.length)<(h=T.length)&&(g=j,j=T,T=g,i=u,u=h,h=i),i=u+h,g=[];i--;g.push(0));for(_=d,v=y,i=h;--i>=0;){for(r=0,f=T[i]%v,m=T[i]/v|0,o=i+(s=u);o>i;)r=((c=f*(c=j[--s]%v)+(a=m*c+(l=j[s]/v|0)*f)%v*v+g[o]+r)/_|0)+(a/v|0)+m*l,g[o--]=c%_;g[o]=r}return r?++n:g.splice(0,1),J(e,g,n)},N.negated=function(){var e=new V(this);return e.s=-e.s||null,e},N.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new V(e,t)).s,!i||!t)return new V(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/p,s=e.e/p,a=n.c,u=e.c;if(!o||!s){if(!a||!u)return new V(i/0);if(!a[0]||!u[0])return u[0]?e:new V(a[0]?n:0*i)}if(o=b(o),s=b(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=u):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(t=u.length)<0&&(r=u,u=a,a=r,t=i),i=0;t;)i=(a[--t]=a[t]+u[t]+i)/d|0,a[t]=d===a[t]?0:a[t]%d;return i&&(a=[i].concat(a),++s),J(e,a,s)},N.precision=N.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return v(e,1,m),null==t?t=L:v(t,0,8),H(new V(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*p+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},N.shiftedBy=function(e){return v(e,-9007199254740991,h),this.times("1e"+e)},N.squareRoot=N.sqrt=function(){var e,t,n,i,o,s=this,a=s.c,u=s.s,c=s.e,l=I+4,d=new V("0.5");if(1!==u||!a||!a[0])return new V(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+z(s)))||u==1/0?(((t=g(a)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=b((c+1)/2)-(c<0||c%2),n=new V(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new V(u+""),n.c[0])for((u=(c=n.e)+l)<3&&(u=0);;)if(o=n,n=d.times(o.plus(r(s,o,l,1))),g(o.c).slice(0,u)===(t=g(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(H(n,n.e+I+2,1),e=!n.times(n).eq(s));break}if(!i&&(H(o,o.e+I+2,0),o.times(o).eq(s))){n=o;break}l+=4,u+=4,i=1}return H(n,n.e+I+1,L,e)},N.toExponential=function(e,t){return null!=e&&(v(e,0,m),e++),X(this,e,t,1)},N.toFixed=function(e,t){return null!=e&&(v(e,0,m),e=e+this.e+1),X(this,e,t)},N.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=k;else if("object"!=typeof r)throw Error(c+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var o,s=n.split("."),a=+r.groupSize,u=+r.secondaryGroupSize,l=r.groupSeparator||"",d=s[0],p=s[1],h=i.s<0,f=h?d.slice(1):d,y=f.length;if(u&&(o=a,a=u,u=o,y-=o),a>0&&y>0){for(o=y%a||a,d=f.substr(0,o);o<y;o+=a)d+=l+f.substr(o,a);u>0&&(d+=l+f.slice(o)),h&&(d="-"+d)}n=p?d+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?p.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):p):d}return(r.prefix||"")+n+(r.suffix||"")},N.toFraction=function(e){var t,n,i,o,s,a,u,l,d,h,y,m,b=this,_=b.c;if(null!=e&&(!(u=new V(e)).isInteger()&&(u.c||1!==u.s)||u.lt(P)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+z(u));if(!_)return new V(b);for(t=new V(P),d=n=new V(P),i=l=new V(P),m=g(_),s=t.e=m.length-b.e-1,t.c[0]=f[(a=s%p)<0?p+a:a],e=!e||u.comparedTo(t)>0?s>0?t:d:u,a=B,B=1/0,u=new V(m),l.c[0]=0;h=r(u,t,0,1),1!=(o=n.plus(h.times(i))).comparedTo(e);)n=i,i=o,d=l.plus(h.times(o=d)),l=o,t=u.minus(h.times(o=t)),u=o;return o=r(e.minus(n),i,0,1),l=l.plus(o.times(d)),n=n.plus(o.times(i)),l.s=d.s=b.s,y=r(d,i,s*=2,L).minus(b).abs().comparedTo(r(l,n,s,L).minus(b).abs())<1?[d,i]:[l,n],B=a,y},N.toNumber=function(){return+z(this)},N.toPrecision=function(e,t){return null!=e&&v(e,1,m),X(this,e,t,2)},N.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=D||o>=M?j(g(r.c),o):T(g(r.c),o,"0"):10===e&&G?t=T(g((r=H(new V(r),I+o+1,L)).c),r.e,"0"):(v(e,2,Q.length,"Base"),t=n(T(g(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},N.valueOf=N.toJSON=function(){return z(this)},N._isBigNumber=!0,null!=t&&V.set(t),V}(),o.default=o.BigNumber=o,void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},"../node_modules/canonicalize/lib/canonicalize.js":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])),"")+"}"}},"../node_modules/fast-deep-equal/es6/index.js":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,o;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=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var s=o[i];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},"../node_modules/hash.js/lib/hash.js":(e,t,r)=>{var n=t;n.utils=r("../node_modules/hash.js/lib/hash/utils.js"),n.common=r("../node_modules/hash.js/lib/hash/common.js"),n.sha=r("../node_modules/hash.js/lib/hash/sha.js"),n.ripemd=r("../node_modules/hash.js/lib/hash/ripemd.js"),n.hmac=r("../node_modules/hash.js/lib/hash/hmac.js"),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},"../node_modules/hash.js/lib/hash/common.js":(e,t,r)=>{"use strict";var n=r("../node_modules/hash.js/lib/hash/utils.js"),i=r("../node_modules/minimalistic-assert/index.js");function o(){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=o,o.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<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>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,o=8;o<this.padLength;o++)n[i++]=0;return n}},"../node_modules/hash.js/lib/hash/hmac.js":(e,t,r)=>{"use strict";var n=r("../node_modules/hash.js/lib/hash/utils.js"),i=r("../node_modules/minimalistic-assert/index.js");function o(e,t,r){if(!(this instanceof o))return new o(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=o,o.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<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},"../node_modules/hash.js/lib/hash/ripemd.js":(e,t,r)=>{"use strict";var n=r("../node_modules/hash.js/lib/hash/utils.js"),i=r("../node_modules/hash.js/lib/hash/common.js"),o=n.rotl32,s=n.sum32,a=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function l(){if(!(this instanceof l))return new l;c.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 p(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(l,c),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],c=this.h[3],l=this.h[4],g=r,_=n,v=i,O=c,j=l,T=0;T<80;T++){var w=s(o(u(r,d(T,n,i,c),e[f[T]+t],p(T)),m[T]),l);r=l,l=c,c=o(i,10),i=n,n=w,w=s(o(u(g,d(79-T,_,v,O),e[y[T]+t],h(T)),b[T]),j),g=j,j=O,O=o(v,10),v=_,_=w}w=a(this.h[1],i,O),this.h[1]=a(this.h[2],c,j),this.h[2]=a(this.h[3],l,g),this.h[3]=a(this.h[4],r,_),this.h[4]=a(this.h[0],n,v),this.h[0]=w},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],m=[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],b=[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]},"../node_modules/hash.js/lib/hash/sha.js":(e,t,r)=>{"use strict";t.sha1=r("../node_modules/hash.js/lib/hash/sha/1.js"),t.sha224=r("../node_modules/hash.js/lib/hash/sha/224.js"),t.sha256=r("../node_modules/hash.js/lib/hash/sha/256.js"),t.sha384=r("../node_modules/hash.js/lib/hash/sha/384.js"),t.sha512=r("../node_modules/hash.js/lib/hash/sha/512.js")},"../node_modules/hash.js/lib/hash/sha/1.js":(e,t,r)=>{"use strict";var n=r("../node_modules/hash.js/lib/hash/utils.js"),i=r("../node_modules/hash.js/lib/hash/common.js"),o=r("../node_modules/hash.js/lib/hash/sha/common.js"),s=n.rotl32,a=n.sum32,u=n.sum32_5,c=o.ft_1,l=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function p(){if(!(this instanceof p))return new p;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(p,l),e.exports=p,p.blockSize=512,p.outSize=160,p.hmacStrength=80,p.padLength=64,p.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],l=this.h[2],p=this.h[3],h=this.h[4];for(n=0;n<r.length;n++){var f=~~(n/20),y=u(s(i,5),c(f,o,l,p),h,r[n],d[f]);h=p,p=l,l=s(o,30),o=i,i=y}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],l),this.h[3]=a(this.h[3],p),this.h[4]=a(this.h[4],h)},p.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},"../node_modules/hash.js/lib/hash/sha/224.js":(e,t,r)=>{"use strict";var n=r("../node_modules/hash.js/lib/hash/utils.js"),i=r("../node_modules/hash.js/lib/hash/sha/256.js");function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},"../node_modules/hash.js/lib/hash/sha/256.js":(e,t,r)=>{"use strict";var n=r("../node_modules/hash.js/lib/hash/utils.js"),i=r("../node_modules/hash.js/lib/hash/common.js"),o=r("../node_modules/hash.js/lib/hash/sha/common.js"),s=r("../node_modules/minimalistic-assert/index.js"),a=n.sum32,u=n.sum32_4,c=n.sum32_5,l=o.ch32,d=o.maj32,p=o.s0_256,h=o.s1_256,f=o.g0_256,y=o.g1_256,m=i.BlockHash,b=[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 g(){if(!(this instanceof g))return new g;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}n.inherits(g,m),e.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=u(y(r[n-2]),r[n-7],f(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],m=this.h[2],b=this.h[3],g=this.h[4],_=this.h[5],v=this.h[6],O=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var j=c(O,h(g),l(g,_,v),this.k[n],r[n]),T=a(p(i),d(i,o,m));O=v,v=_,_=g,g=a(b,j),b=m,m=o,o=i,i=a(j,T)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],m),this.h[3]=a(this.h[3],b),this.h[4]=a(this.h[4],g),this.h[5]=a(this.h[5],_),this.h[6]=a(this.h[6],v),this.h[7]=a(this.h[7],O)},g.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},"../node_modules/hash.js/lib/hash/sha/384.js":(e,t,r)=>{"use strict";var n=r("../node_modules/hash.js/lib/hash/utils.js"),i=r("../node_modules/hash.js/lib/hash/sha/512.js");function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},"../node_modules/hash.js/lib/hash/sha/512.js":(e,t,r)=>{"use strict";var n=r("../node_modules/hash.js/lib/hash/utils.js"),i=r("../node_modules/hash.js/lib/hash/common.js"),o=r("../node_modules/minimalistic-assert/index.js"),s=n.rotr64_hi,a=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,l=n.sum64,d=n.sum64_hi,p=n.sum64_lo,h=n.sum64_4_hi,f=n.sum64_4_lo,y=n.sum64_5_hi,m=n.sum64_5_lo,b=i.BlockHash,g=[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 _(){if(!(this instanceof _))return new _;b.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function v(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function O(e,t,r,n,i,o){var s=t&n^~t&o;return s<0&&(s+=4294967296),s}function j(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function T(e,t,r,n,i,o){var s=t&n^t&o^n&o;return s<0&&(s+=4294967296),s}function w(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function S(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function E(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=a(e,t,1)^a(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function R(e,t){var r=a(e,t,19)^a(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(_,b),e.exports=_,_.blockSize=1024,_.outSize=512,_.hmacStrength=192,_.padLength=128,_.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=(m=r[n-4],b=r[n-3],g=void 0,(g=s(m,b,19)^s(b,m,29)^u(m,b,6))<0&&(g+=4294967296),g),o=R(r[n-4],r[n-3]),a=r[n-14],c=r[n-13],l=E(r[n-30],r[n-29]),d=A(r[n-30],r[n-29]),p=r[n-32],y=r[n-31];r[n]=h(i,o,a,c,l,d,p,y),r[n+1]=f(i,o,a,c,l,d,p,y)}var m,b,g},_.prototype._update=function(e,t){this._prepareBlock(e,t);var r,n,i,a=this.W,u=this.h[0],c=this.h[1],h=this.h[2],f=this.h[3],b=this.h[4],g=this.h[5],_=this.h[6],E=this.h[7],A=this.h[8],R=this.h[9],N=this.h[10],P=this.h[11],I=this.h[12],L=this.h[13],D=this.h[14],M=this.h[15];o(this.k.length===a.length);for(var C=0;C<a.length;C+=2){var B=D,q=M,F=(i=void 0,(i=s(r=A,n=R,14)^s(r,n,18)^s(n,r,9))<0&&(i+=4294967296),i),U=x(A,R),k=v(A,0,N,0,I),Q=O(0,R,0,P,0,L),G=this.k[C],V=this.k[C+1],X=a[C],$=a[C+1],J=y(B,q,F,U,k,Q,G,V,X,$),H=m(B,q,F,U,k,Q,G,V,X,$);B=w(u,c),q=S(u,c),F=j(u,0,h,0,b),U=T(0,c,0,f,0,g);var z=d(B,q,F,U),K=p(B,q,F,U);D=I,M=L,I=N,L=P,N=A,P=R,A=d(_,E,J,H),R=p(E,E,J,H),_=b,E=g,b=h,g=f,h=u,f=c,u=d(J,H,z,K),c=p(J,H,z,K)}l(this.h,0,u,c),l(this.h,2,h,f),l(this.h,4,b,g),l(this.h,6,_,E),l(this.h,8,A,R),l(this.h,10,N,P),l(this.h,12,I,L),l(this.h,14,D,M)},_.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},"../node_modules/hash.js/lib/hash/sha/common.js":(e,t,r)=>{"use strict";var n=r("../node_modules/hash.js/lib/hash/utils.js").rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function s(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?s(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=s,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}},"../node_modules/hash.js/lib/hash/utils.js":(e,t,r)=>{"use strict";var n=r("../node_modules/minimalistic-assert/index.js"),i=r("../node_modules/inherits/inherits_browser.js");function o(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function u(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<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var s=e.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=a(e[r].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=s(i)),r+=u(i.toString(16))}return r},t.zero2=a,t.zero8=u,t.join32=function(e,t,r,i){var o=r-t;n(o%4==0);for(var s=new Array(o/4),a=0,u=t;a<s.length;a++,u+=4){var c;c="big"===i?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],s[a]=c>>>0}return s},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|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],o=n+e[t+1]>>>0,s=(o<n?1:0)+r+i;e[t]=s>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,s,a){var u=0,c=t;return u+=(c=c+n>>>0)<t?1:0,u+=(c=c+o>>>0)<o?1:0,e+r+i+s+(u+=(c=c+a>>>0)<a?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,s,a){return t+n+o+a>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,s,a,u,c){var l=0,d=t;return l+=(d=d+n>>>0)<t?1:0,l+=(d=d+o>>>0)<o?1:0,l+=(d=d+a>>>0)<a?1:0,e+r+i+s+u+(l+=(d=d+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,s,a,u,c){return t+n+o+a+c>>>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}},"../node_modules/inherits/inherits_browser.js":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}}},"../node_modules/is-stream/index.js":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},"../node_modules/lru-cache/index.js":(e,t,r)=>{"use strict";const n=r("../node_modules/yallist/yallist.js"),i=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),u=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),d=Symbol("lruList"),p=Symbol("cache"),h=Symbol("updateAgeOnGet"),f=()=>1,y=(e,t,r)=>{const n=e[p].get(t);if(n){const t=n.value;if(m(e,t)){if(g(e,n),!e[a])return}else r&&(e[h]&&(n.value.now=Date.now()),e[d].unshiftNode(n));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[u])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[u]&&r>e[u]},b=e=>{if(e[o]>e[i])for(let t=e[d].tail;e[o]>e[i]&&null!==t;){const r=t.prev;g(e,t),t=r}},g=(e,t)=>{if(t){const r=t.value;e[c]&&e[c](r.key,r.value),e[o]-=r.length,e[p].delete(r.key),e[d].removeNode(t)}};class _{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const v=(e,t,r,n)=>{let i=r.value;m(e,i)&&(g(e,r),e[a]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||f;if(this[s]="function"!=typeof t?f:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0,this[c]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[h]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,b(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,b(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[s]&&(this[s]=e,this[o]=0,this[d].forEach((e=>{e.length=this[s](e.value,e.key),this[o]+=e.length}))),b(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let r=this[d].tail;null!==r;){const n=r.prev;v(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[d].head;null!==r;){const n=r.next;v(this,e,r,t),r=n}}keys(){return this[d].toArray().map((e=>e.key))}values(){return this[d].toArray().map((e=>e.value))}reset(){this[c]&&this[d]&&this[d].length&&this[d].forEach((e=>this[c](e.key,e.value))),this[p]=new Map,this[d]=new n,this[o]=0}dump(){return this[d].map((e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[d]}set(e,t,r){if((r=r||this[u])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[s](t,e);if(this[p].has(e)){if(a>this[i])return g(this,this[p].get(e)),!1;const s=this[p].get(e).value;return this[c]&&(this[l]||this[c](e,s.value)),s.now=n,s.maxAge=r,s.value=t,this[o]+=a-s.length,s.length=a,this.get(e),b(this),!0}const h=new _(e,t,a,n,r);return h.length>this[i]?(this[c]&&this[c](e,t),!1):(this[o]+=h.length,this[d].unshift(h),this[p].set(e,this[d].head),b(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!m(this,t)}get(e){return y(this,e,!0)}peek(e){return y(this,e,!1)}pop(){const e=this[d].tail;return e?(g(this,e),e.value):null}del(e){g(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[p].forEach(((e,t)=>y(this,t,!1)))}}},"../node_modules/minimalistic-assert/index.js":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)}},"../node_modules/rdf-data-factory/index.js":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("../node_modules/rdf-data-factory/lib/BlankNode.js"),t),i(r("../node_modules/rdf-data-factory/lib/DataFactory.js"),t),i(r("../node_modules/rdf-data-factory/lib/DefaultGraph.js"),t),i(r("../node_modules/rdf-data-factory/lib/Literal.js"),t),i(r("../node_modules/rdf-data-factory/lib/NamedNode.js"),t),i(r("../node_modules/rdf-data-factory/lib/Quad.js"),t),i(r("../node_modules/rdf-data-factory/lib/Variable.js"),t)},"../node_modules/rdf-data-factory/lib/BlankNode.js":(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}}},"../node_modules/rdf-data-factory/lib/DataFactory.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataFactory=void 0;const n=r("../node_modules/rdf-data-factory/lib/BlankNode.js"),i=r("../node_modules/rdf-data-factory/lib/DefaultGraph.js"),o=r("../node_modules/rdf-data-factory/lib/Literal.js"),s=r("../node_modules/rdf-data-factory/lib/NamedNode.js"),a=r("../node_modules/rdf-data-factory/lib/Quad.js"),u=r("../node_modules/rdf-data-factory/lib/Variable.js");let c=0;t.DataFactory=class{constructor(e){this.blankNodeCounter=0,e=e||{},this.blankNodePrefix=e.blankNodePrefix||`df_${c++}_`}namedNode(e){return new s.NamedNode(e)}blankNode(e){return new n.BlankNode(e||`${this.blankNodePrefix}${this.blankNodeCounter++}`)}literal(e,t){return new o.Literal(e,t)}variable(e){return new u.Variable(e)}defaultGraph(){return i.DefaultGraph.INSTANCE}quad(e,t,r,n){return new a.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(o.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}}},"../node_modules/rdf-data-factory/lib/DefaultGraph.js":(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},"../node_modules/rdf-data-factory/lib/Literal.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Literal=void 0;const n=r("../node_modules/rdf-data-factory/lib/NamedNode.js");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&&e.datatype.equals(this.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")},"../node_modules/rdf-data-factory/lib/NamedNode.js":(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}}},"../node_modules/rdf-data-factory/lib/Quad.js":(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)}}},"../node_modules/rdf-data-factory/lib/Variable.js":(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}}},"../node_modules/rdf-isomorphic/index.js":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("../node_modules/rdf-isomorphic/lib/RdfIsomorphic.js"),t)},"../node_modules/rdf-isomorphic/lib/RdfIsomorphic.js":(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("../node_modules/hash.js/lib/hash.js"),i=r("../node_modules/rdf-string/index.js"),o=r("../node_modules/rdf-terms/index.js");function s(e,t){const r=h(p(e)),n=h(p(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 a(y(d(e)),y(d(t)),m(e),m(t))}function a(e,t,r,n,o,s){o||(o={}),s||(s={});const[d,p]=b(e,r,o),[h,f]=b(t,n,s);if(Object.keys(d).length!==Object.keys(h).length)return null;for(const e in d)if(!l(h,d[e]))return null;let y={};for(const e of r){const t=i.termToString(e),r=p[t];for(const e in f)if(f[e]===r){y[t]=e,delete f[e];break}}if(!u(Object.keys(y).sort(),r.map(i.termToString).sort())||!u(c(y).sort(),n.map(i.termToString).sort())){y=null;for(const o of r){const s=i.termToString(o);if(!d[s])for(const o of n){const u=i.termToString(o);if(!h[u]&&p[s]===f[u]){const i=_(s);y=a(e,t,r,n,Object.assign(Object.assign({},d),{[s]:i}),Object.assign(Object.assign({},h),{[u]:i}))}}}}return y}function u(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 c(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=>o.someTerms(e,(e=>"BlankNode"===e.termType||"Quad"===e.termType&&o.getTermsNested(e).some((e=>"BlankNode"===e.termType))))))}function p(e){return e.filter((e=>o.everyTerms(e,(e=>"BlankNode"!==e.termType&&!("Quad"===e.termType&&o.getTermsNested(e).some((e=>"BlankNode"===e.termType)))))))}function h(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(h(e))}function m(e){return o.uniqTerms(e.map((e=>o.getBlankNodes(o.getTermsNested(e)))).reduce(((e,t)=>e.concat(t)),[]))}function b(e,t,r){const n=Object.assign({},r),o={};let s=!0;for(;s;){const r=Object.keys(n).length;for(const r of t){const t=i.termToString(r);if(!n[t]){const[i,s]=g(r,e,n);i&&(n[t]=s),o[t]=s}}const a={};for(const e in o){const t=o[e];void 0===a[t]?a[t]=e:a[t]=!1}for(const e in a){const t=a[e];t&&(n[t]=e)}s=r!==Object.keys(n).length}return[n,o]}function g(e,t,r){const n=[];let i=!0;for(const s of t){const t=o.getTermsNested(s);if(t.some((t=>t.equals(e)))){n.push(v(s,r,e));for(const n of t)j(n,r)||n.equals(e)||(i=!1)}}return[i,_(n.sort().join(""))]}function _(e){return n.sha1().update(e).digest("hex")}function v(e,t,r){return o.getTerms(e).map((e=>O(e,t,r))).join("|")}function O(e,t,r){return e.equals(r)?"@self":"BlankNode"===e.termType?t[i.termToString(e)]||"@blank":"Quad"===e.termType?`<${v(e,t,r)}>`:i.termToString(e)}function j(e,t){return"BlankNode"!==e.termType&&!("Quad"===e.termType&&o.getTermsNested(e).some((e=>!j(e,t))))||!!t[i.termToString(e)]}t.isomorphic=function(e,t){return!!s(e,t)},t.getBijection=s,t.getBijectionInner=a,t.hashValues=c,t.hasValue=l,t.getQuadsWithBlankNodes=d,t.getQuadsWithoutBlankNodes=p,t.indexGraph=h,t.deindexGraph=f,t.uniqGraph=y,t.getGraphBlankNodes=m,t.hashTerms=b,t.hashTerm=g,t.sha1hex=_,t.quadToSignature=v,t.termToSignature=O,t.isTermGrounded=j},"../node_modules/rdf-string/index.js":(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("../node_modules/rdf-string/lib/TermUtil.js");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}})},"../node_modules/rdf-string/lib/TermUtil.js":(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("../node_modules/rdf-data-factory/index.js").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 o(e){const t=/^"([^]*)"/.exec(e);if(!t)throw new Error(e+" is not a literal");return t[1]}function s(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 a(e){const t=/^"[^]*"(?:@([^@"]+)|\^\^[^"]+)?$/.exec(e);if(!t)throw new Error(e+" is not a literal");return t[1]?t[1].toLowerCase():""}function u(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=a(e),n=t.namedNode(s(e));return t.literal(o(e),r||n);default:if(e.startsWith("<<")&&e.endsWith(">>")){const r=e.slice(2,-2),n=[];let i=0,o=0;for(let t=0;t<r.length;t++){const s=r[t];if("<"===s&&i++,">"===s){if(0===i)throw new Error("Found closing tag without opening tag in "+e);i--}" "===s&&0===i&&(n.push(r.slice(o,t)),o=t+1)}if(0!==i)throw new Error("Found opening tag without closing tag in "+e);if(n.push(r.slice(o,r.length)),3!==n.length&&4!==n.length)throw new Error("Nested quad syntax error "+e);return t.quad(u(n[0]),u(n[1]),u(n[2]),n[3]?u(n[3]):void 0)}return t.namedNode(e)}}t.termToString=i,t.getLiteralValue=o,t.getLiteralType=s,t.getLiteralLanguage=a,t.stringToTerm=u,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(u(e.subject,t),u(e.predicate,t),u(e.object,t),u(e.graph,t))}},"../node_modules/rdf-terms/index.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TRIPLE_TERM_NAMES=t.someTerms=t.everyTerms=t.reduceTerms=t.mapTerms=t.filterQuadTermNames=t.filterTerms=t.forEachTerms=t.collectNamedTerms=t.getNamedTerms=t.getTermsNested=t.getTerms=t.QUAD_TERM_NAMES=t.matchPatternComplete=t.matchPattern=t.getDefaultGraphs=t.getVariables=t.getLiterals=t.getBlankNodes=t.getNamedNodes=t.getTermsOfType=t.uniqTerms=t.TERM_TYPES=void 0;const n=r("../node_modules/rdf-terms/lib/QuadTermUtil.js");Object.defineProperty(t,"collectNamedTerms",{enumerable:!0,get:function(){return n.collectNamedTerms}}),Object.defineProperty(t,"everyTerms",{enumerable:!0,get:function(){return n.everyTerms}}),Object.defineProperty(t,"filterQuadTermNames",{enumerable:!0,get:function(){return n.filterQuadTermNames}}),Object.defineProperty(t,"filterTerms",{enumerable:!0,get:function(){return n.filterTerms}}),Object.defineProperty(t,"forEachTerms",{enumerable:!0,get:function(){return n.forEachTerms}}),Object.defineProperty(t,"getNamedTerms",{enumerable:!0,get:function(){return n.getNamedTerms}}),Object.defineProperty(t,"getTerms",{enumerable:!0,get:function(){return n.getTerms}}),Object.defineProperty(t,"getTermsNested",{enumerable:!0,get:function(){return n.getTermsNested}}),Object.defineProperty(t,"mapTerms",{enumerable:!0,get:function(){return n.mapTerms}}),Object.defineProperty(t,"matchPattern",{enumerable:!0,get:function(){return n.matchPattern}}),Object.defineProperty(t,"matchPatternComplete",{enumerable:!0,get:function(){return n.matchPatternComplete}}),Object.defineProperty(t,"QUAD_TERM_NAMES",{enumerable:!0,get:function(){return n.QUAD_TERM_NAMES}}),Object.defineProperty(t,"reduceTerms",{enumerable:!0,get:function(){return n.reduceTerms}}),Object.defineProperty(t,"someTerms",{enumerable:!0,get:function(){return n.someTerms}}),Object.defineProperty(t,"TRIPLE_TERM_NAMES",{enumerable:!0,get:function(){return n.TRIPLE_TERM_NAMES}});const i=r("../node_modules/rdf-terms/lib/TermUtil.js");Object.defineProperty(t,"getBlankNodes",{enumerable:!0,get:function(){return i.getBlankNodes}}),Object.defineProperty(t,"getDefaultGraphs",{enumerable:!0,get:function(){return i.getDefaultGraphs}}),Object.defineProperty(t,"getLiterals",{enumerable:!0,get:function(){return i.getLiterals}}),Object.defineProperty(t,"getNamedNodes",{enumerable:!0,get:function(){return i.getNamedNodes}}),Object.defineProperty(t,"getTermsOfType",{enumerable:!0,get:function(){return i.getTermsOfType}}),Object.defineProperty(t,"getVariables",{enumerable:!0,get:function(){return i.getVariables}}),Object.defineProperty(t,"TERM_TYPES",{enumerable:!0,get:function(){return i.TERM_TYPES}}),Object.defineProperty(t,"uniqTerms",{enumerable:!0,get:function(){return i.uniqTerms}})},"../node_modules/rdf-terms/lib/QuadTermUtil.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchPatternComplete=t.matchPattern=t.matchTerm=t.someTerms=t.everyTerms=t.reduceTerms=t.mapTerms=t.filterQuadTermNames=t.filterTerms=t.forEachTerms=t.collectNamedTerms=t.getNamedTerms=t.getTermsNested=t.getTerms=t.TRIPLE_TERM_NAMES=t.QUAD_TERM_NAMES=void 0;const n=new(r("../node_modules/rdf-data-factory/index.js").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 o(e,t){return!t||"Variable"===t.termType||"Quad"===t.termType&&"Quad"===e.termType&&a(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 a(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 o of i(t,r))"Quad"===o.termType?e(o,r).forEach((e=>n.push(e))):n.push(o);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.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.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.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.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.everyTerms=function(e,t){return t(e.subject,"subject")&&t(e.predicate,"predicate")&&t(e.object,"object")&&t(e.graph,"graph")},t.someTerms=function(e,t){return t(e.subject,"subject")||t(e.predicate,"predicate")||t(e.object,"object")||t(e.graph,"graph")},t.matchTerm=o,t.matchPattern=s,t.matchPatternComplete=a},"../node_modules/rdf-terms/lib/TermUtil.js":(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("../node_modules/rdf-string/index.js");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=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")}},"../node_modules/relative-to-absolute-iri/index.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r("../node_modules/relative-to-absolute-iri/lib/Resolve.js"))},"../node_modules/relative-to-absolute-iri/lib/Resolve.js":(e,t)=>{"use strict";function r(e){const t=[];let r=0;for(;r<e.length;)switch(e[r]){case"/":if("."===e[r+1])if("."===e[r+2]){if(!i(e[r+3])){t.push([]),r++;break}t.pop(),e[r+3]||t.push([]),r+=3}else{if(!i(e[r+2])){t.push([]),r++;break}e[r+2]||t.push([]),r+=2}else t.push([]),r++;break;case"#":case"?":t.length||t.push([]),t[t.length-1].push(e.substr(r)),r=e.length;break;default:t.length||t.push([]),t[t.length-1].push(e[r]),r++}return"/"+t.map((e=>e.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.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 o=e.indexOf(":");if(o>=0)return n(e,o);const s=t.indexOf(":");if(s<0)throw new Error(`Found invalid baseIRI '${t}' for value '${e}'`);const a=t.substr(0,s+1);if(0===e.indexOf("//"))return a+n(e,o);let u;if(t.indexOf("//",s)===s+1){if(u=t.indexOf("/",s+3),u<0)return t.length>s+3?t+"/"+n(e,o):a+n(e,o)}else if(u=t.indexOf("/",s+1),u<0)return a+n(e,o);if(0===e.indexOf("/"))return t.substr(0,u)+r(e);let c=t.substr(u);const l=c.lastIndexOf("/");return l>=0&&l<c.length-1&&(c=c.substr(0,l+1),"."===e[0]&&"."!==e[1]&&"/"!==e[1]&&e[2]&&(e=e.substr(1))),e=r(e=c+e),t.substr(0,u)+e},t.removeDotSegments=r,t.removeDotSegmentsOfPath=n},"../node_modules/spark-md5/spark-md5.js":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],o=e[3];n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[0]-680876936|0)<<7|r>>>25)+n|0)&n|~r&i)+t[1]-389564586|0)<<12|o>>>20)+r|0)&r|~o&n)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&r)+t[3]-1044525330|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[4]-176418897|0)<<7|r>>>25)+n|0)&n|~r&i)+t[5]+1200080426|0)<<12|o>>>20)+r|0)&r|~o&n)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&r)+t[7]-45705983|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[8]+1770035416|0)<<7|r>>>25)+n|0)&n|~r&i)+t[9]-1958414417|0)<<12|o>>>20)+r|0)&r|~o&n)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&r)+t[11]-1990404162|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[12]+1804603682|0)<<7|r>>>25)+n|0)&n|~r&i)+t[13]-40341101|0)<<12|o>>>20)+r|0)&r|~o&n)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&r)+t[15]+1236535329|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[1]-165796510|0)<<5|r>>>27)+n|0)&i|n&~i)+t[6]-1069501632|0)<<9|o>>>23)+r|0)&n|r&~n)+t[11]+643717713|0)<<14|i>>>18)+o|0)&r|o&~r)+t[0]-373897302|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[5]-701558691|0)<<5|r>>>27)+n|0)&i|n&~i)+t[10]+38016083|0)<<9|o>>>23)+r|0)&n|r&~n)+t[15]-660478335|0)<<14|i>>>18)+o|0)&r|o&~r)+t[4]-405537848|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[9]+568446438|0)<<5|r>>>27)+n|0)&i|n&~i)+t[14]-1019803690|0)<<9|o>>>23)+r|0)&n|r&~n)+t[3]-187363961|0)<<14|i>>>18)+o|0)&r|o&~r)+t[8]+1163531501|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[13]-1444681467|0)<<5|r>>>27)+n|0)&i|n&~i)+t[2]-51403784|0)<<9|o>>>23)+r|0)&n|r&~n)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&r|o&~r)+t[12]-1926607734|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[5]-378558|0)<<4|r>>>28)+n|0)^n^i)+t[8]-2022574463|0)<<11|o>>>21)+r|0)^r^n)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^r)+t[14]-35309556|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[1]-1530992060|0)<<4|r>>>28)+n|0)^n^i)+t[4]+1272893353|0)<<11|o>>>21)+r|0)^r^n)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^r)+t[10]-1094730640|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[13]+681279174|0)<<4|r>>>28)+n|0)^n^i)+t[0]-358537222|0)<<11|o>>>21)+r|0)^r^n)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^r)+t[6]+76029189|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[9]-640364487|0)<<4|r>>>28)+n|0)^n^i)+t[12]-421815835|0)<<11|o>>>21)+r|0)^r^n)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^r)+t[2]-995338651|0)<<23|n>>>9)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[0]-198630844|0)<<6|r>>>26)+n|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~r))+t[5]-57434055|0)<<21|n>>>11)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[12]+1700485571|0)<<6|r>>>26)+n|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~r))+t[1]-2054922799|0)<<21|n>>>11)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[8]+1873313359|0)<<6|r>>>26)+n|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~r))+t[13]+1309151649|0)<<21|n>>>11)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[4]-145523070|0)<<6|r>>>26)+n|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[2]+718787259|0)<<15|i>>>17)+o|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]=o+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 o(e){var t,i,o,s,a,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)r(l,n(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(r(l,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,r(l,o),l}function s(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 a(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join("")}function u(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function c(e){var t,r=[],n=e.length;for(t=0;t<n-1;t+=2)r.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,r)}function l(){this.reset()}return a(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(t,r){var n,i,o,s,a=this.byteLength,u=e(t,a),c=a;return undefined!==r&&(c=e(r,a)),u>c?new ArrayBuffer(0):(n=c-u,i=new ArrayBuffer(n),o=new Uint8Array(i),s=new Uint8Array(this,u,n),o.set(s),i)}}(),l.prototype.append=function(e){return this.appendBinary(u(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,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=n.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),r=a(this._hash),e&&(r=c(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,o,s=t;if(e[s>>2]|=128<<(s%4<<3),s>55)for(r(this._hash,e),s=0;s<16;s+=1)e[s]=0;n=(n=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(n[2],16),o=parseInt(n[1],16)||0,e[14]=i,e[15]=o,r(this._hash,e)},l.hash=function(e,t){return l.hashBinary(u(e),t)},l.hashBinary=function(e,t){var r=a(o(e));return t?c(r):r},l.ArrayBuffer=function(){this.reset()},l.ArrayBuffer.prototype.append=function(e){var t,n,o,s,a,u=(n=this._buff.buffer,o=e,s=!0,(a=new Uint8Array(n.byteLength+o.byteLength)).set(new Uint8Array(n)),a.set(new Uint8Array(o),n.byteLength),s?a:a.buffer),c=u.length;for(this._length+=e.byteLength,t=64;t<=c;t+=64)r(this._hash,i(u.subarray(t-64,t)));return this._buff=t-64<c?new Uint8Array(u.buffer.slice(t-64)):new Uint8Array(0),this},l.ArrayBuffer.prototype.end=function(e){var t,r,n=this._buff,i=n.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=n[t]<<(t%4<<3);return this._finish(o,i),r=a(this._hash),e&&(r=c(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),o=new Uint8Array(i);for(r=0;r<n;r+=1)o[r]=e.charCodeAt(r);return t?o:i}(e.buff,!0),l.prototype.setState.call(this,e)},l.ArrayBuffer.prototype.destroy=l.prototype.destroy,l.ArrayBuffer.prototype._finish=l.prototype._finish,l.ArrayBuffer.hash=function(e,t){var n=a(function(e){var t,n,o,s,a,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)r(l,i(e.subarray(t-64,t)));for(n=(e=t-64<c?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<n;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(r(l,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,r(l,o),l}(new Uint8Array(e)));return t?c(n):n},l}()},"../node_modules/sparqlalgebrajs/index.js":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.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=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},s=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 a=s(r("../node_modules/sparqlalgebrajs/lib/sparqlAlgebra.js"));t.translate=a.default;const u=o(r("../node_modules/sparqlalgebrajs/lib/algebra.js"));t.Algebra=u;const c=s(r("../node_modules/sparqlalgebrajs/lib/factory.js"));t.Factory=c.default;const l=r("../node_modules/sparqlalgebrajs/lib/sparql.js");Object.defineProperty(t,"toSparql",{enumerable:!0,get:function(){return l.toSparql}}),Object.defineProperty(t,"toSparqlJs",{enumerable:!0,get:function(){return l.toSparqlJs}});const d=s(r("../node_modules/sparqlalgebrajs/lib/util.js"));t.Util=d.default},"../node_modules/sparqlalgebrajs/lib/algebra.js":(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"},"../node_modules/sparqlalgebrajs/lib/factory.js":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.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=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 s=o(r("../node_modules/sparqlalgebrajs/lib/algebra.js")),a=r("../node_modules/rdf-data-factory/index.js"),u=r("../node_modules/rdf-string/index.js"),c=r("../node_modules/sparqljs/sparql.js");t.default=class{constructor(e){this.dataFactory=e||new a.DataFactory,this.stringType=this.createTerm("http://www.w3.org/2001/XMLSchema#string")}createAlt(e,t=!0){return this.flattenMulti({type:s.types.ALT,input:e},t)}createAsk(e){return{type:s.types.ASK,input:e}}createBoundAggregate(e,t,r,n,i){const o=this.createAggregateExpression(t,r,n,i);return o.variable=e,o}createBgp(e){return{type:s.types.BGP,patterns:e}}createConstruct(e,t){return{type:s.types.CONSTRUCT,input:e,template:t}}createDescribe(e,t){return{type:s.types.DESCRIBE,input:e,terms:t}}createDistinct(e){return{type:s.types.DISTINCT,input:e}}createExtend(e,t,r){return{type:s.types.EXTEND,input:e,variable:t,expression:r}}createFrom(e,t,r){return{type:s.types.FROM,input:e,default:t,named:r}}createFilter(e,t){return{type:s.types.FILTER,input:e,expression:t}}createGraph(e,t){return{type:s.types.GRAPH,input:e,name:t}}createGroup(e,t,r){return{type:s.types.GROUP,input:e,variables:t,aggregates:r}}createInv(e){return{type:s.types.INV,path:e}}createJoin(e,t=!0){return this.flattenMulti({type:s.types.JOIN,input:e},t)}createLeftJoin(e,t,r){return r?{type:s.types.LEFT_JOIN,input:[e,t],expression:r}:{type:s.types.LEFT_JOIN,input:[e,t]}}createLink(e){return{type:s.types.LINK,iri:e}}createMinus(e,t){return{type:s.types.MINUS,input:[e,t]}}createNop(){return{type:s.types.NOP}}createNps(e){return{type:s.types.NPS,iris:e}}createOneOrMorePath(e){return{type:s.types.ONE_OR_MORE_PATH,path:e}}createOrderBy(e,t){return{type:s.types.ORDER_BY,input:e,expressions:t}}createPath(e,t,r,n){return n?{type:s.types.PATH,subject:e,predicate:t,object:r,graph:n}:{type:s.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=s.types.PATTERN,i}createProject(e,t){return{type:s.types.PROJECT,input:e,variables:t}}createReduced(e){return{type:s.types.REDUCED,input:e}}createSeq(e,t=!0){return this.flattenMulti({type:s.types.SEQ,input:e},t)}createService(e,t,r){return{type:s.types.SERVICE,input:e,name:t,silent:Boolean(r)}}createSlice(e,t,r){return t=t||0,void 0!==r?{type:s.types.SLICE,input:e,start:t,length:r}:{type:s.types.SLICE,input:e,start:t}}createUnion(e,t=!0){return this.flattenMulti({type:s.types.UNION,input:e},t)}createValues(e,t){return{type:s.types.VALUES,variables:e,bindings:t}}createZeroOrMorePath(e){return{type:s.types.ZERO_OR_MORE_PATH,path:e}}createZeroOrOnePath(e){return{type:s.types.ZERO_OR_ONE_PATH,path:e}}createAggregateExpression(e,t,r,n){return n?{type:s.types.EXPRESSION,expressionType:s.expressionTypes.AGGREGATE,aggregator:e,expression:t,separator:n,distinct:r}:{type:s.types.EXPRESSION,expressionType:s.expressionTypes.AGGREGATE,aggregator:e,expression:t,distinct:r}}createExistenceExpression(e,t){return{type:s.types.EXPRESSION,expressionType:s.expressionTypes.EXISTENCE,not:e,input:t}}createNamedExpression(e,t){return{type:s.types.EXPRESSION,expressionType:s.expressionTypes.NAMED,name:e,args:t}}createOperatorExpression(e,t){return{type:s.types.EXPRESSION,expressionType:s.expressionTypes.OPERATOR,operator:e,args:t}}createTermExpression(e){return{type:s.types.EXPRESSION,expressionType:s.expressionTypes.TERM,term:e}}createWildcardExpression(){return{type:s.types.EXPRESSION,expressionType:s.expressionTypes.WILDCARD,wildcard:new c.Wildcard}}createTerm(e){return(0,u.stringToTerm)(e,this.dataFactory)}createCompositeUpdate(e){return{type:s.types.COMPOSITE_UPDATE,updates:e}}createDeleteInsert(e,t,r){const n={type:s.types.DELETE_INSERT};return e&&(n.delete=e),t&&(n.insert=t),r&&(n.where=r),n}createLoad(e,t,r){const n={type:s.types.LOAD,source:e};return t&&(n.destination=t),this.addSilent(n,Boolean(r))}createClear(e,t){return this.addSilent({type:s.types.CLEAR,source:e},Boolean(t))}createCreate(e,t){return this.addSilent({type:s.types.CREATE,source:e},Boolean(t))}createDrop(e,t){return this.addSilent({type:s.types.DROP,source:e},Boolean(t))}createAdd(e,t,r){return this.addSilent({type:s.types.ADD,source:e,destination:t},Boolean(r))}createMove(e,t,r){return this.addSilent({type:s.types.MOVE,source:e,destination:t},Boolean(r))}createCopy(e,t,r){return this.addSilent({type:s.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}}},"../node_modules/sparqlalgebrajs/lib/sparql.js":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.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=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},s=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 a=r("../node_modules/rdf-isomorphic/index.js"),u=r("../node_modules/rdf-string/index.js"),c=r("../node_modules/sparqljs/sparql.js"),l=o(r("../node_modules/sparqlalgebrajs/lib/algebra.js")),d=s(r("../node_modules/sparqlalgebrajs/lib/factory.js")),p=s(r("../node_modules/sparqlalgebrajs/lib/util.js")),h=l.types,f=l.expressionTypes;let y;const m=new d.default;function b(e){g();let t=_(e=function(e){return P(e,{})}(e));return"group"===t.type?t.patterns[0]:t}function g(){y={project:!1,extend:[],group:[],aggregates:[],order:[]}}function _(e){switch(e.type!==h.EXTEND&&e.type!==h.ORDER_BY&&e.type!==h.GRAPH&&(y.project=!1),e.type){case h.EXPRESSION:return v(e);case h.ASK:return x(e,h.ASK);case h.BGP:return function(e){let t=e.patterns.map(w);return 0===t.length?null:{type:"bgp",triples:t}}(e);case h.CONSTRUCT:return function(e){return{type:"query",prefixes:{},queryType:"CONSTRUCT",template:e.template.map(w),where:p.default.flatten([_(e.input)])}}(e);case h.DESCRIBE:return x(e,h.DESCRIBE);case h.DISTINCT:return function(e){let t=_(e.input);return t.patterns[0].distinct=!0,t}(e);case h.EXTEND:return function(e){return y.project?(y.extend.push(e),_(e.input)):p.default.flatten([_(e.input),{type:"bind",variable:e.variable,expression:v(e.expression)}])}(e);case h.FROM:return function(e){const t=_(e.input);return t.patterns[0].from={default:e.default,named:e.named},t}(e);case h.FILTER:return function(e){return{type:"group",patterns:p.default.flatten([_(e.input),{type:"filter",expression:v(e.expression)}])}}(e);case h.GRAPH:return function(e){return{type:"graph",patterns:p.default.flatten([_(e.input)]),name:e.name}}(e);case h.GROUP:return function(e){const t=_(e.input),r=e.aggregates.map(T);return y.aggregates.push(...r),y.group.push(...e.variables),t}(e);case h.JOIN:return function(e){return p.default.flatten(e.input.map(_)).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 h.LEFT_JOIN:return function(e){const t={type:"optional",patterns:[_(e.input[1])]};return e.expression&&t.patterns.push({type:"filter",expression:v(e.expression)}),t.patterns=p.default.flatten(t.patterns),p.default.flatten([_(e.input[0]),t])}(e);case h.MINUS:return function(e){let t=_(e.input[1]);return"group"===t.type&&(t=t.patterns),Array.isArray(t)||(t=[t]),p.default.flatten([_(e.input[0]),{type:"minus",patterns:t}])}(e);case h.NOP:return{};case h.ORDER_BY:return function(e){return y.order.push(...e.expressions),_(e.input)}(e);case h.PATH:return function(e){return{type:"bgp",triples:[{subject:e.subject,predicate:O(e.predicate),object:e.object}]}}(e);case h.PATTERN:return w(e);case h.PROJECT:return x(e,h.PROJECT);case h.REDUCED:return function(e){let t=_(e.input);return t.patterns[0].reduced=!0,t}(e);case h.SERVICE:return function(e){let t=_(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 h.SLICE:return function(e){let t=_(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 h.UNION:return function(e){return{type:"union",patterns:p.default.flatten(e.input.map(_))}}(e);case h.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 h.COMPOSITE_UPDATE:return function(e){return{prefixes:{},type:"update",updates:e.updates.map((e=>_(e).updates[0]))}}(e);case h.DELETE_INSERT:return function(e){var t;let r,n=e.where;if(n&&n.type===h.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===h.BGP&&0===n.patterns.length)i[0].where=[];else{const e={};let r=_(P(n,e));"group"===r.type?i[0].where=r.patterns:i[0].where=[r];const o=Object.keys(e);if(o.length>0){if(1!==o.length)throw new Error("This is unexpected and might indicate an error in graph handling for updates.");const r=null===(t=e[o[0]])||void 0===t?void 0:t.graph;r&&""!==r.value&&(i[0].where=[{type:"graph",patterns:i[0].where,name:r}])}}return e.delete||e.where?e.insert||e.where?!e.insert&&e.where&&"bgp"===e.where.type&&(0,a.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 h.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 h.CLEAR:return function(e){return A(e,"clear")}(e);case h.CREATE:return function(e){return A(e,"create")}(e);case h.DROP:return function(e){return A(e,"drop")}(e);case h.ADD:return function(e){return R(e,"add")}(e);case h.MOVE:return function(e){return R(e,"move")}(e);case h.COPY:return function(e){return R(e,"copy")}(e)}throw new Error(`Unknown Operation type ${e.type}`)}function v(e){switch(e.expressionType){case f.AGGREGATE:return function(e){const t={expression:v(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:p.default.flatten([_(e.input)])}}(e);case f.NAMED:return function(e){return{type:"functionCall",function:e.name,args:e.args.map(v)}}(e);case f.OPERATOR:return function(e){if("desc"===e.operator){return{expression:v(e.args[0]),descending:!0}}const t={type:"operation",operator:e.operator,args:e.args.map(v)};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 O(e){switch(e.type){case h.ALT:return function(e){const t=e.input.map(O);return t.every((e=>"pathType"in e&&"!"===e.pathType))?{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:p.default.flatten(t.map((e=>e.items)))}]}:{type:"path",pathType:"|",items:t}}(e);case h.INV:return function(e){if(e.path.type===h.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:[O(e.path)]}}(e);case h.LINK:return function(e){return e.iri}(e);case h.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 h.ONE_OR_MORE_PATH:return function(e){return{type:"path",pathType:"+",items:[O(e.path)]}}(e);case h.SEQ:return function(e){return{type:"path",pathType:"/",items:e.input.map(O)}}(e);case h.ZERO_OR_MORE_PATH:return function(e){return{type:"path",pathType:"*",items:[O(e.path)]}}(e);case h.ZERO_OR_ONE_PATH:return function(e){return{type:"path",pathType:"?",items:[O(e.path)]}}(e)}throw new Error(`Unknown Path type ${e.type}`)}function j(e){return(0,u.termToString)(e)}function T(e){return e}function w(e){return{subject:e.subject,predicate:e.predicate,object:e.object}}function S(e,t){let r=p.default.isSimpleTerm(e)?j(e):e;if("string"==typeof r){if(t[r])return t[r]}else if(Array.isArray(e))e=e.map((e=>S(e,t)));else for(let r of Object.keys(e))e[r]=S(e[r],t);return e}function x(e,t){const r={type:"query",prefixes:{}},n=r;let i;t===h.PROJECT?(r.queryType="SELECT",i=e.variables):t===h.ASK?r.queryType="ASK":t===h.DESCRIBE&&(r.queryType="DESCRIBE",i=e.terms);const o=y.extend,s=y.group,a=y.aggregates,u=y.order;g(),y.project=!0;let l=p.default.flatten([_(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[j(e.variable)]=v(e);let f={};for(let e=y.extend.length-1;e>=0;--e){let t=y.extend[e];f[j(t.variable)]=S(v(t.expression),d)}if(y.group.length>0&&(n.group=y.group.map((e=>{let t=j(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(_).map((e=>e.descending?e:{expression:e}))),i&&(n.variables=i.map((e=>{let t=j(e);return f[t]?{variable:e,expression:f[t]}:e})),0===n.variables.length&&(n.variables=[new c.Wildcard])),r.where.length>0&&"filter"===r.where[r.where.length-1].type){const e=r.where[r.where.length-1];E(e,Object.keys(d))&&(n.having=p.default.flatten([S(e.expression,d)]),r.where.splice(-1))}return y.extend=o,y.group=s,y.aggregates=a,y.order=u,{type:"group",patterns:[n]}}function E(e,t){return p.default.isSimpleTerm(e)?t.indexOf(j(e))>=0:Array.isArray(e)?e.some((e=>E(e,t))):e===Object(e)?Object.keys(e).some((r=>E(e[r],t))):t.indexOf(e)>=0}function A(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 R(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(w)}:{type:"graph",triples:t[e].map(w),name:t[e][0].graph}))}function P(e,t){if(Array.isArray(e))return e.map((e=>P(e,t)));if(!e.type)return e;if(e.type===h.DELETE_INSERT)return e;if((e.type===h.PATTERN||e.type===h.PATH)&&e.graph)return t[e.graph.value]||(t[e.graph.value]={graph:e.graph,values:[]}),t[e.graph.value].values.push(e),e;const r={},n={},i={};for(let t of Object.keys(e)){const o={};r[t]=P(e[t],o);const s=Object.keys(o);if(s.length>1){let e=I(o[s[0]].values);for(let t=1;t<s.length;++t){const r=I(o[s[t]].values);e=m.createJoin([e,r])}return s.map((e=>delete o[e])),e}if(1===s.length){const e=o[s[0]].graph;n[t]=e,i[e.value]=e}}const o=Object.keys(i);if(o.length>0)if(1===o.length&&e.type!==h.PROJECT)t[o[0]]={graph:i[o[0]],values:[r]};else for(let e of Object.keys(n))n[e].value.length>0&&(r[e]=m.createGraph(r[e],n[e]));return r}function I(e){const t=m.createBgp(e),r=e[0].graph;return 0===r.value.length?t:m.createGraph(t,r)}t.toSparql=function(e,t={}){return new c.Generator(t).stringify(b(e))},t.toSparqlJs=b},"../node_modules/sparqlalgebrajs/lib/sparqlAlgebra.js":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.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=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},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=r("../node_modules/fast-deep-equal/es6/index.js"),u=r("../node_modules/rdf-string/index.js"),c=o(r("../node_modules/sparqlalgebrajs/lib/algebra.js")),l=s(r("../node_modules/sparqlalgebrajs/lib/factory.js")),d=s(r("../node_modules/sparqlalgebrajs/lib/util.js")),p=r("../node_modules/sparqljs/sparql.js").Parser,h=c.types;let f,y=new Set,m=0,b=!1;function g(e,t,r){if(y=new Set,m=0,b=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 O(e),"query"===e.type?(n=T({type:"group",patterns:e.where||[]}),n=function(e,t){const r=e,n=[],i={};if(r.variables=r.variables&&r.variables.map((e=>D(e,i))),r.having=r.having&&r.having.map((e=>D(e,i))),r.order=r.order&&r.order.map((e=>D(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=w(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:E();t=f.createExtend(t,r,w(e.expression)),n.push(r)}t=f.createGroup(t,n,e)}if(r.having)for(let e of r.having)t=f.createFilter(t,w(e));e.values&&(t=f.createJoin([t,L(e)]));let o=[];if("SELECT"===e.queryType||"DESCRIBE"===e.queryType)if(e.variables.some((e=>e&&d.default.isWildcard(e))))o=Object.values(j(e)).sort(((e,t)=>e.value.localeCompare(t.value)));else for(let t of e.variables)v(t)||!("variable"in t)?o.push(t):t.variable&&(o.push(t.variable),n.push(t));for(let e of n)t=f.createExtend(t,e.variable,w(e.expression));return r.order&&(t=f.createOrderBy(t,r.order.map((e=>{let t=w(e.expression);return e.descending&&(t=f.createOperatorExpression("desc",[t])),t})))),"SELECT"===e.queryType&&(t=f.createProject(t,o)),r.distinct&&(t=f.createDistinct(t)),r.reduced&&(t=f.createReduced(t)),"CONSTRUCT"===e.queryType?t=f.createConstruct(t,(e.template||[]).map(A)):"ASK"===e.queryType?t=f.createAsk(t):"DESCRIBE"===e.queryType&&(t=f.createDescribe(t,o)),(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=B(n)),n}function _(e){return Boolean(null==e?void 0:e.termType)}function v(e){return"Variable"===(null==e?void 0:e.termType)}function O(e){if(_(e))v(e)&&y.add(`?${e.value}`);else if(Array.isArray(e))for(const t of e)O(t);else if(e&&"object"==typeof e)for(let t of Object.keys(e))t.startsWith("?")&&y.add(t),O(e[t])}function j(e){let t={};if((r=e).subject&&r.predicate&&r.object){const r=[j(e.subject),j(e.predicate),j(e.object),e.graph?j(e.graph):{}];Object.assign(t,...r)}else if(_(e))v(e)&&(t[e.value]=e);else if("bgp"===e.type){const r=e.triples;Object.assign(t,...r.map(j))}else if("path"===e.type)Object.assign(t,...e.items.map(j));else if("group"===e.type||"union"===e.type||"optional"===e.type)Object.assign(t,...e.patterns.map(j));else if("service"===e.type||"graph"===e.type)Object.assign(t,j(e.name)),Object.assign(t,...e.patterns.map(j));else if("bind"===e.type)Object.assign(t,j(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(j))}}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(j));for(const r of e.variables)v(r)?Object.assign(t,j(r)):r.variable&&Object.assign(t,j(r.variable));if("SELECT"===e.queryType){if(e.group)for(const r of e.group)r.variable&&Object.assign(t,j(r.variable));if(e.values){const r={type:"values",values:e.values};Object.assign(t,j(r))}}}var r;return t}function T(e){let t,r=[],n=[];if("patterns"in e)for(let t of e.patterns)("filter"===t.type?r:n).push(t);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,S(n.predicate),n.object);for(let n of e)n.type===h.PATH?(t.length>0&&r.push(f.createBgp(t)),t=[],r.push(n)):t.push(n)}else t.push(A(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)t=f.createUnion(n.map((e=>("group"!==e.type&&(e={type:"group",patterns:[e]}),T(e)))));else{if("graph"===e.type)return function(e){let t=T({type:"group",patterns:e.patterns});return t=b?N(t,e.name):f.createGraph(t,e.name),t}(e);if("group"===e.type)t=n.reduce(P,f.createBgp([]));else if("values"===e.type)t=L(e);else{if("query"!==e.type)throw new Error(`Unexpected type: ${e.type}`);t=g(e,b,!1)}}if(r.length>0){let e=r.map((e=>w(e.expression)));e.length>0&&(t=f.createFilter(t,e.reduce(((e,t)=>f.createOperatorExpression("&&",[e,t])))))}return t}function w(e){if(d.default.isSimpleTerm(e)||d.default.isQuad(e))return f.createTermExpression(e);if(d.default.isWildcard(e))return f.createWildcardExpression();if("aggregation"in e)return f.createAggregateExpression(e.aggregation,w(e.expression),Boolean(e.distinct),e.separator);if("function"in e)return f.createNamedExpression(e.function,e.args.map(w));if("operator"in e)return"exists"===e.operator||"notexists"===e.operator?f.createExistenceExpression("notexists"===e.operator,T(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(w)));throw new Error(`Unknown expression: ${JSON.stringify(e)}`)}function S(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(S(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),o=f.createInv(f.createNps(n));return 0===n.length?i:0===r.length?o:f.createAlt([i,o])}if("/"===e.pathType)return f.createSeq(e.items.map(S));if("|"===e.pathType)return f.createAlt(e.items.map(S));if("*"===e.pathType)return f.createZeroOrMorePath(S(e.items[0]));if("+"===e.pathType)return f.createOneOrMorePath(S(e.items[0]));if("?"===e.pathType)return f.createZeroOrOnePath(S(e.items[0]));throw new Error(`Unable to translate path expression ${JSON.stringify(e)}`)}function x(e,t,r){if(t.type===h.LINK)return[f.createPattern(e,t.iri,r)];if(t.type===h.INV)return x(r,t.path,e);if(t.type===h.SEQ){let n=e;return d.default.flatten(t.input.map(((e,i)=>{const o=i===t.input.length-1?r:E(),s=x(n,e,o);return"Variable"===o.termType&&(n=o),s})))}return[f.createPath(e,t,r)]}function E(){let e="?var"+m++;return y.has(e)?E():(y.add(e),f.createTerm(e))}function A(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 p(t);n._resetBlanks(),r=n.parse(e)}else r=e;return g(r,t.quads,t.blankToVariable)};let R=Object.values(h);function N(e,t,r){if(e.type===h.GRAPH){if(r)throw new Error("Recursing through nested GRAPH statements with a replacement is impossible.");e=N(e.input,e.name)}else if(e.type===h.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===h.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!==h.PROJECT||r)if(e.type!==h.EXTEND||r)for(let n of Object.keys(e))Array.isArray(e[n])?e[n]=e[n].map((e=>N(e,t,r))):R.indexOf(e[n].type)>=0?e[n]=N(e[n],t,r):r&&v(e[n])&&e[n].equals(t)&&(e[n]=r);else e.variable.equals(t)&&(r=E()),e.input=N(e.input,t,r);else e.variables.some((e=>e.equals(t)))||(r=E()),e.input=N(e.input,t,r);return e}function P(e,t){if("optional"===t.type){const r=T({type:"group",patterns:t.patterns});e=r.type===h.FILTER?f.createLeftJoin(e,r.input,r.expression):f.createLeftJoin(e,r)}else if("minus"===t.type){const r=T({type:"group",patterns:t.patterns});e=f.createMinus(e,r)}else if("bind"===t.type)e=f.createExtend(e,t.variable,w(t.expression));else if("service"===t.type){const r={type:"group",patterns:t.patterns};e=I(e,f.createService(T(r),t.name,t.silent))}else e=I(e,T(t));return e}function I(e,t){return e.type===h.BGP&&t.type===h.BGP?e=f.createBgp([...e.patterns,...t.patterns]):e.type===h.BGP&&0===e.patterns.length?e=t:t.type===h.BGP&&0===t.patterns.length||(e=f.createJoin([e,t])),e}function L(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 D(e,t){if("type"in e&&"aggregate"===e.type){let r,n=!1;for(let i of Object.keys(t))if(a(t[i],e)){r=f.createTerm(i),n=!0;break}return n||(r=E(),t[(0,u.termToString)(r)]=e),r}return"expression"in e&&e.expression?{...e,expression:D(e.expression,t)}:"args"in e&&e.args?{...e,args:e.args.map((e=>D(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(!b)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=>C(t,e.graph))))),e.insert&&(n=d.default.flatten(e.insert.map((t=>C(t,e.graph))))),e.where&&e.where.length>0){t=T({type:"group",patterns:e.where});const r=e.using;r?t=f.createFrom(t,r.default,r.named):e.graph&&(t=N(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 C(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(A)}function B(e){const t={},r=Array.from(y).reduce(((e,t)=>(e[t]=!0,e)),{});return d.default.mapOperation(e,{[c.types.DELETE_INSERT]:e=>({result:e,recurse:!1}),[c.types.PATH]:(e,t)=>({result:t.createPath(n(e.subject),e.predicate,n(e.object),n(e.graph)),recurse:!1}),[c.types.PATTERN]:(e,t)=>({result:t.createPattern(n(e.subject),n(e.predicate),n(e.object),n(e.graph)),recurse:!1}),[c.types.CONSTRUCT]:e=>({result:f.createConstruct(B(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}}},"../node_modules/sparqlalgebrajs/lib/util.js":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("../node_modules/sparqlalgebrajs/lib/algebra.js"),o=n(r("../node_modules/sparqlalgebrajs/lib/factory.js"));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 o=t[e.type];if(o&&(n=o(e)),!n)return;let a=e=>s.recurseOperation(e,t);switch(r.type){case i.types.ALT:r.input.map(a);break;case i.types.ASK:a(r.input);break;case i.types.BGP:r.patterns.forEach(a);break;case i.types.CONSTRUCT:a(r.input),r.template.map(a);break;case i.types.DESCRIBE:case i.types.DISTINCT:a(r.input);break;case i.types.EXPRESSION:r.expressionType===i.expressionTypes.EXISTENCE&&a(r.input);break;case i.types.EXTEND:case i.types.FILTER:a(r.input),a(r.expression);break;case i.types.FROM:case i.types.GRAPH:a(r.input);break;case i.types.GROUP:a(r.input),r.aggregates.forEach(a);break;case i.types.INV:a(r.path);break;case i.types.JOIN:r.input.map(a);break;case i.types.LEFT_JOIN:r.input.map(a),r.expression&&a(r.expression);break;case i.types.LINK:break;case i.types.MINUS:r.input.map(a);break;case i.types.NOP:case i.types.NPS:break;case i.types.ONE_OR_MORE_PATH:a(r.path);break;case i.types.ORDER_BY:a(r.input),r.expressions.forEach(a);break;case i.types.PATH:a(r.predicate);break;case i.types.PATTERN:break;case i.types.PROJECT:case i.types.REDUCED:a(r.input);break;case i.types.SEQ:r.input.map(a);break;case i.types.SERVICE:case i.types.SLICE:a(r.input);break;case i.types.UNION:r.input.map(a);break;case i.types.VALUES:break;case i.types.ZERO_OR_MORE_PATH:case i.types.ZERO_OR_ONE_PATH:a(r.path);break;case i.types.COMPOSITE_UPDATE:r.updates.forEach((e=>a(e)));break;case i.types.DELETE_INSERT:r.delete&&r.delete.forEach((e=>a(e))),r.insert&&r.insert.forEach((e=>a(e))),r.where&&a(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,a=!0;r=r||new o.default;const u=t[e.type];if(u&&({result:n,recurse:a}=u(e,r)),!a)return n;let c=e=>s.mapOperation(e,t,r);switch(n.type){case i.types.ALT:return r.createAlt(n.input.map(c));case i.types.ASK:return r.createAsk(c(n.input));case i.types.BGP:return r.createBgp(n.patterns.map(c));case i.types.CONSTRUCT:return r.createConstruct(c(n.input),n.template.map(c));case i.types.DESCRIBE:return r.createDescribe(c(n.input),n.terms);case i.types.DISTINCT:return r.createDistinct(c(n.input));case i.types.EXPRESSION:return s.mapExpression(n,t,r);case i.types.EXTEND:return r.createExtend(c(n.input),n.variable,c(n.expression));case i.types.FILTER:return r.createFilter(c(n.input),c(n.expression));case i.types.FROM:return r.createFrom(c(n.input),[...n.default],[...n.named]);case i.types.GRAPH:return r.createGraph(c(n.input),n.name);case i.types.GROUP:return r.createGroup(c(n.input),[].concat(n.variables),n.aggregates.map(c));case i.types.INV:return r.createInv(c(n.path));case i.types.JOIN:return r.createJoin(n.input.map(c));case i.types.LEFT_JOIN:return r.createLeftJoin(c(n.input[0]),c(n.input[1]),n.expression?c(n.expression):void 0);case i.types.LINK:return r.createLink(n.iri);case i.types.MINUS:return r.createMinus(c(n.input[0]),c(n.input[1]));case i.types.NOP:return r.createNop();case i.types.NPS:return r.createNps([].concat(n.iris));case i.types.ONE_OR_MORE_PATH:return r.createOneOrMorePath(c(n.path));case i.types.ORDER_BY:return r.createOrderBy(c(n.input),n.expressions.map(c));case i.types.PATH:return r.createPath(n.subject,c(n.predicate),n.object,n.graph);case i.types.PATTERN:return r.createPattern(n.subject,n.predicate,n.object,n.graph);case i.types.PROJECT:return r.createProject(c(n.input),[...n.variables]);case i.types.REDUCED:return r.createReduced(c(n.input));case i.types.SEQ:return r.createSeq(n.input.map(c));case i.types.SERVICE:return r.createService(c(n.input),n.name,n.silent);case i.types.SLICE:return r.createSlice(c(n.input),n.start,n.length);case i.types.UNION:return r.createUnion(n.input.map(c));case i.types.VALUES:return r.createValues([].concat(n.variables),n.bindings.map((e=>Object.assign({},e))));case i.types.ZERO_OR_MORE_PATH:return r.createZeroOrMorePath(c(n.path));case i.types.ZERO_OR_ONE_PATH:return r.createZeroOrOnePath(c(n.path));case i.types.COMPOSITE_UPDATE:return r.createCompositeUpdate(n.updates.map(c));case i.types.DELETE_INSERT:return r.createDeleteInsert(n.delete?n.delete.map(c):void 0,n.insert?n.insert.map(c):void 0,n.where?c(n.where):void 0);case i.types.LOAD:return r.createLoad(n.source,n.destination,n.silent);case i.types.CLEAR:return r.createClear(n.source,n.silent);case i.types.CREATE:return r.createCreate(n.source,n.silent);case i.types.DROP:return r.createDrop(n.source,n.silent);case i.types.ADD:return r.createAdd(n.source,n.destination);case i.types.MOVE:return r.createMove(n.source,n.destination);case i.types.COPY:return r.createCopy(n.source,n.destination);default:throw new Error(`Unknown Operation type ${n.type}`)}}static mapExpression(e,t,r){let n=e=>s.mapOperation(e,t,r);switch(e.expressionType){case i.expressionTypes.AGGREGATE:return e.variable?r.createBoundAggregate(e.variable,e.aggregator,n(e.expression),e.distinct,e.separator):r.createAggregateExpression(e.aggregator,n(e.expression),e.distinct,e.separator);case i.expressionTypes.EXISTENCE:return r.createExistenceExpression(e.not,n(e.input));case i.expressionTypes.NAMED:return r.createNamedExpression(e.name,e.args.map(n));case i.expressionTypes.OPERATOR:return r.createOperatorExpression(e.operator,e.args.map(n));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 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 isWildcard(e){return"Wildcard"===e.termType}}t.default=s},"../node_modules/sparqlee/dist/index.js":(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("../node_modules/sparqlee/dist/lib/evaluators/AsyncEvaluator.js");Object.defineProperty(t,"AsyncEvaluator",{enumerable:!0,get:function(){return n.AsyncEvaluator}});var i=r("../node_modules/sparqlee/dist/lib/evaluators/SyncEvaluator.js");Object.defineProperty(t,"SyncEvaluator",{enumerable:!0,get:function(){return i.SyncEvaluator}});var o=r("../node_modules/sparqlee/dist/lib/evaluators/AggregateEvaluator.js");Object.defineProperty(t,"AggregateEvaluator",{enumerable:!0,get:function(){return o.AggregateEvaluator}});var s=r("../node_modules/sparqlee/dist/lib/util/Errors.js");Object.defineProperty(t,"ExpressionError",{enumerable:!0,get:function(){return s.ExpressionError}}),Object.defineProperty(t,"isExpressionError",{enumerable:!0,get:function(){return s.isExpressionError}});var a=r("../node_modules/sparqlee/dist/lib/util/Ordering.js");Object.defineProperty(t,"orderTypes",{enumerable:!0,get:function(){return a.orderTypes}});var u=r("../node_modules/sparqlee/dist/lib/evaluators/AsyncAggregateEvaluator.js");Object.defineProperty(t,"AsyncAggregateEvaluator",{enumerable:!0,get:function(){return u.AsyncAggregateEvaluator}})},"../node_modules/sparqlee/dist/lib/aggregators/Average.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Average=void 0;const n=r("../node_modules/sparqlee/dist/lib/expressions/index.js"),i=r("../node_modules/sparqlee/dist/lib/functions/index.js"),o=r("../node_modules/sparqlee/dist/lib/functions/Helpers.js"),s=r("../node_modules/sparqlee/dist/lib/util/Consts.js"),a=r("../node_modules/sparqlee/dist/lib/aggregators/BaseAggregator.js");class u extends a.BaseAggregator{constructor(){super(...arguments),this.summer=i.regularFunctions[s.RegularOperator.ADDITION],this.divider=i.regularFunctions[s.RegularOperator.DIVISION]}static emptyValue(){return(0,o.integer)(0).toRDF()}init(e){return{sum:this.termToNumericOrError(e),count:1}}put(e,t){const r=this.termToNumericOrError(t);return{sum:this.summer.apply([e.sum,r],this.sharedContext),count:e.count+1}}result(e){const t=new n.IntegerLiteral(e.count);return this.divider.apply([e.sum,t],this.sharedContext).toRDF()}}t.Average=u},"../node_modules/sparqlee/dist/lib/aggregators/BaseAggregator.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseAggregator=void 0;const n=r("../node_modules/sparqlee/dist/lib/transformers/TermTransformer.js"),i=r("../node_modules/sparqlee/dist/lib/util/Consts.js"),o=r("../node_modules/sparqlee/dist/lib/util/TypeHandling.js");t.BaseAggregator=class{constructor(e,t){this.sharedContext=t,this.distinct=e.distinct,this.separator=e.separator||" ",this.termTransformer=new n.TermTransformer(t.superTypeProvider,t.enableExtendedXsdTypes)}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,i.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)}extractValue(e){if("Literal"!==e.termType)throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a literal`);const t=this.termTransformer.transformLiteral(e);return{type:t.dataType,value:t.typedValue}}static emptyValue(){}}},"../node_modules/sparqlee/dist/lib/aggregators/Count.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Count=void 0;const n=r("../node_modules/sparqlee/dist/lib/functions/Helpers.js"),i=r("../node_modules/sparqlee/dist/lib/aggregators/BaseAggregator.js");class o extends i.BaseAggregator{static emptyValue(){return(0,n.integer)(0).toRDF()}init(e){return 1}put(e,t){return e+1}result(e){return(0,n.integer)(e).toRDF()}}t.Count=o},"../node_modules/sparqlee/dist/lib/aggregators/GroupConcat.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupConcat=void 0;const n=r("../node_modules/sparqlee/dist/lib/functions/Helpers.js"),i=r("../node_modules/sparqlee/dist/lib/aggregators/BaseAggregator.js");class o extends i.BaseAggregator{static emptyValue(){return(0,n.string)("").toRDF()}init(e){return e.value}put(e,t){return e+this.separator+t.value}result(e){return(0,n.string)(e).toRDF()}}t.GroupConcat=o},"../node_modules/sparqlee/dist/lib/aggregators/Max.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Max=void 0;const n=r("../node_modules/sparqlee/dist/lib/aggregators/BaseAggregator.js");class i extends n.BaseAggregator{init(e){const{value:t}=this.extractValue(e);if("Literal"===e.termType)return{extremeValue:t,term:e};throw new Error("Term should be a literal")}put(e,t){const r=this.extractValue(t);return r.value>e.extremeValue&&"Literal"===t.termType?{extremeValue:r.value,term:t}:e}result(e){return e.term}}t.Max=i},"../node_modules/sparqlee/dist/lib/aggregators/Min.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Min=void 0;const n=r("../node_modules/sparqlee/dist/lib/aggregators/BaseAggregator.js");class i extends n.BaseAggregator{init(e){const{value:t}=this.extractValue(e);if("Literal"===e.termType)return{extremeValue:t,term:e};throw new Error("Term should be a literal")}put(e,t){const r=this.extractValue(t);return r.value<e.extremeValue&&"Literal"===t.termType?{extremeValue:r.value,term:t}:e}result(e){return e.term}}t.Min=i},"../node_modules/sparqlee/dist/lib/aggregators/Sample.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sample=void 0;const n=r("../node_modules/sparqlee/dist/lib/aggregators/BaseAggregator.js");class i extends n.BaseAggregator{init(e){return e}put(e,t){return e}result(e){return e}}t.Sample=i},"../node_modules/sparqlee/dist/lib/aggregators/Sum.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sum=void 0;const n=r("../node_modules/sparqlee/dist/lib/functions/index.js"),i=r("../node_modules/sparqlee/dist/lib/functions/Helpers.js"),o=r("../node_modules/sparqlee/dist/lib/util/Consts.js"),s=r("../node_modules/sparqlee/dist/lib/aggregators/BaseAggregator.js");class a extends s.BaseAggregator{constructor(){super(...arguments),this.summer=n.regularFunctions[o.RegularOperator.ADDITION]}static emptyValue(){return(0,i.integer)(0).toRDF()}init(e){return this.termToNumericOrError(e)}put(e,t){const r=this.termToNumericOrError(t);return this.summer.apply([e,r],this.sharedContext)}result(e){return e.toRDF()}}t.Sum=a},"../node_modules/sparqlee/dist/lib/aggregators/index.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aggregators=void 0;const n=r("../node_modules/sparqlee/dist/lib/aggregators/Average.js"),i=r("../node_modules/sparqlee/dist/lib/aggregators/Count.js"),o=r("../node_modules/sparqlee/dist/lib/aggregators/GroupConcat.js"),s=r("../node_modules/sparqlee/dist/lib/aggregators/Max.js"),a=r("../node_modules/sparqlee/dist/lib/aggregators/Min.js"),u=r("../node_modules/sparqlee/dist/lib/aggregators/Sample.js"),c=r("../node_modules/sparqlee/dist/lib/aggregators/Sum.js");t.aggregators={count:i.Count,sum:c.Sum,min:a.Min,max:s.Max,avg:n.Average,group_concat:o.GroupConcat,sample:u.Sample}},"../node_modules/sparqlee/dist/lib/evaluators/AggregateEvaluator.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AggregateEvaluator=void 0;const n=r("../node_modules/sparqlee/dist/lib/evaluators/evaluatorHelpers/BaseAggregateEvaluator.js"),i=r("../node_modules/sparqlee/dist/lib/evaluators/SyncEvaluator.js");class o extends n.BaseAggregateEvaluator{constructor(e,t,r){super(e,i.SyncEvaluator.completeContext(t||{}),r),this.evaluator=new i.SyncEvaluator(e.expression,t)}put(e){this.init(e)}__put(e){try{const t=this.evaluator.evaluate(e);this.state=this.aggregator.put(this.state,t)}catch(e){this.safeThrow(e)}}safeThrow(e){if(this.throwError)throw e;this.put=()=>{},this.result=()=>{}}init(e){try{const t=this.evaluator.evaluate(e);this.state=this.aggregator.init(t),this.state&&(this.put=this.__put.bind(this),this.result=this.__result.bind(this))}catch(e){this.safeThrow(e)}}}t.AggregateEvaluator=o},"../node_modules/sparqlee/dist/lib/evaluators/AsyncAggregateEvaluator.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAggregateEvaluator=void 0;const n=r("../node_modules/sparqlee/dist/lib/evaluators/AsyncEvaluator.js"),i=r("../node_modules/sparqlee/dist/lib/evaluators/evaluatorHelpers/BaseAggregateEvaluator.js");class o 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}put(e){return this.init(e)}async __put(e){try{const t=await this.evaluator.evaluate(e);this.state=this.aggregator.put(this.state,t)}catch(e){this.safeThrow(e)}}safeThrow(e){if(this.throwError)throw e;this.put=async()=>{},this.result=()=>{},this.errorOccurred=!0}async init(e){try{const t=await this.evaluator.evaluate(e);if(!t||this.errorOccurred)return;if(this.state)return void(this.state=this.aggregator.put(this.state,t));this.state=this.aggregator.init(t),this.state&&(this.put=this.__put.bind(this),this.result=this.__result.bind(this))}catch(e){this.safeThrow(e)}}}t.AsyncAggregateEvaluator=o},"../node_modules/sparqlee/dist/lib/evaluators/AsyncEvaluator.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncEvaluator=void 0;const n=r("../node_modules/lru-cache/index.js"),i=r("../node_modules/sparqlee/dist/lib/transformers/AlgebraTransformer.js"),o=r("../node_modules/sparqlee/dist/lib/evaluators/evaluatorHelpers/AsyncRecursiveEvaluator.js");class s{constructor(e,t={}){this.algExpr=e;const r=t.extensionFunctionCreator||(()=>{}),n=s.completeContext(t),a=new i.AlgebraTransformer(Object.assign({type:"async",creator:r},n));this.expr=a.transformAlgebra(e),this.evaluator=new o.AsyncRecursiveEvaluator(n,a)}static completeContext(e){return{now:e.now||new Date(Date.now()),baseIRI:e.baseIRI||void 0,overloadCache:e.overloadCache||new n,superTypeProvider:{cache:e.typeCache||new n,discoverer:e.getSuperType||(()=>"term")},extensionFunctionCreator:e.extensionFunctionCreator,exists:e.exists,aggregate:e.aggregate,bnode:e.bnode,enableExtendedXsdTypes:e.enableExtendedXsdTypes||!1}}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},"../node_modules/sparqlee/dist/lib/evaluators/SyncEvaluator.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncEvaluator=void 0;const n=r("../node_modules/lru-cache/index.js"),i=r("../node_modules/sparqlee/dist/lib/transformers/AlgebraTransformer.js"),o=r("../node_modules/sparqlee/dist/lib/evaluators/evaluatorHelpers/SyncRecursiveEvaluator.js");class s{constructor(e,t={}){this.algExpr=e,this.context=t;const r=t.extensionFunctionCreator||(()=>{}),n=s.completeContext(t),a=new i.AlgebraTransformer(Object.assign({type:"sync",creator:r},n));this.expr=a.transformAlgebra(e),this.evaluator=new o.SyncRecursiveEvaluator(n,a)}static completeContext(e){return{now:e.now||new Date(Date.now()),baseIRI:e.baseIRI||void 0,overloadCache:e.overloadCache||new n,superTypeProvider:{cache:e.typeCache||new n,discoverer:e.getSuperType||(()=>"term")},extensionFunctionCreator:e.extensionFunctionCreator,exists:e.exists,aggregate:e.aggregate,bnode:e.bnode,enableExtendedXsdTypes:e.enableExtendedXsdTypes||!1}}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},"../node_modules/sparqlee/dist/lib/evaluators/evaluatorHelpers/AsyncRecursiveEvaluator.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncRecursiveEvaluator=void 0;const n=r("../node_modules/sparqlee/dist/lib/expressions/index.js"),i=r("../node_modules/sparqlee/dist/lib/transformers/TermTransformer.js"),o=r("../node_modules/sparqlee/dist/lib/util/Errors.js"),s=r("../node_modules/sparqlee/dist/lib/evaluators/evaluatorHelpers/BaseExpressionEvaluator.js");class a extends s.BaseExpressionEvaluator{constructor(e,t){super(t||new i.TermTransformer(e.superTypeProvider,e.enableExtendedXsdTypes)),this.context=e,this.subEvaluators={[n.ExpressionType.Term]:this.term.bind(this),[n.ExpressionType.Variable]:this.variable.bind(this),[n.ExpressionType.Operator]:this.evalOperator.bind(this),[n.ExpressionType.SpecialOperator]:this.evalSpecialOperator.bind(this),[n.ExpressionType.Named]:this.evalNamed.bind(this),[n.ExpressionType.Existence]:this.evalExistence.bind(this),[n.ExpressionType.Aggregate]:this.evalAggregate.bind(this),[n.ExpressionType.AsyncExtension]:this.evalAsyncExtension.bind(this)}}async evaluate(e,t){const r=this.subEvaluators[e.expressionType];if(!r)throw new o.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,overloadCache:this.context.overloadCache,evaluate:r,bnode:this.context.bnode,enableExtendedXsdTypes:this.context.enableExtendedXsdTypes};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 o.NoExistenceHook;return new n.BooleanLiteral(await this.context.exists(e.expression,t))}async evalAggregate(e,t){if(!this.context.aggregate)throw new o.NoExistenceHook;return this.termTransformer.transformRDFTermUnsafe(await this.context.aggregate(e.expression))}}t.AsyncRecursiveEvaluator=a},"../node_modules/sparqlee/dist/lib/evaluators/evaluatorHelpers/BaseAggregateEvaluator.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseAggregateEvaluator=void 0;const n=r("../node_modules/sparqlee/dist/lib/aggregators/index.js"),i=r("../node_modules/sparqlee/dist/lib/util/Errors.js");t.BaseAggregateEvaluator=class{constructor(e,t,r){this.throwError=!1,this.expression=e,this.aggregator=new n.aggregators[e.aggregator](e,t),this.throwError=r||!1}static emptyValue(e,t=!1){const r=n.aggregators[e.aggregator].emptyValue();if(void 0===r&&t)throw new i.EmptyAggregateError;return r}result(){return this.aggregator.constructor.emptyValue()}__result(){return this.aggregator.result(this.state)}}},"../node_modules/sparqlee/dist/lib/evaluators/evaluatorHelpers/BaseExpressionEvaluator.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseExpressionEvaluator=void 0;const n=r("../node_modules/sparqlee/dist/lib/functions/Helpers.js"),i=r("../node_modules/sparqlee/dist/lib/util/Errors.js");t.BaseExpressionEvaluator=class{constructor(e){this.termTransformer=e}term(e,t){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)}}},"../node_modules/sparqlee/dist/lib/evaluators/evaluatorHelpers/SyncRecursiveEvaluator.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncRecursiveEvaluator=void 0;const n=r("../node_modules/sparqlee/dist/lib/expressions/index.js"),i=r("../node_modules/sparqlee/dist/lib/transformers/TermTransformer.js"),o=r("../node_modules/sparqlee/dist/lib/util/Errors.js"),s=r("../node_modules/sparqlee/dist/lib/evaluators/evaluatorHelpers/BaseExpressionEvaluator.js");class a extends s.BaseExpressionEvaluator{constructor(e,t){super(t||new i.TermTransformer(e.superTypeProvider,e.enableExtendedXsdTypes)),this.context=e,this.subEvaluators={[n.ExpressionType.Term]:this.term.bind(this),[n.ExpressionType.Variable]:this.variable.bind(this),[n.ExpressionType.Operator]:this.evalOperator.bind(this),[n.ExpressionType.SpecialOperator]:this.evalSpecialOperator.bind(this),[n.ExpressionType.Named]:this.evalNamed.bind(this),[n.ExpressionType.Existence]:this.evalExistence.bind(this),[n.ExpressionType.Aggregate]:this.evalAggregate.bind(this),[n.ExpressionType.SyncExtension]:this.evalSyncExtension.bind(this)}}evaluate(e,t){const r=this.subEvaluators[e.expressionType];if(!r)throw new o.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,overloadCache:this.context.overloadCache,evaluate:r,bnode:this.context.bnode,enableExtendedXsdTypes:this.context.enableExtendedXsdTypes};return e.applySync(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 o.NoExistenceHook;return new n.BooleanLiteral(this.context.exists(e.expression,t))}evalAggregate(e,t){if(!this.context.aggregate)throw new o.NoAggregator;return this.termTransformer.transformRDFTermUnsafe(this.context.aggregate(e.expression))}}t.SyncRecursiveEvaluator=a},"../node_modules/sparqlee/dist/lib/expressions/Aggregate.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Aggregate=void 0;const n=r("../node_modules/sparqlee/dist/lib/expressions/Expressions.js");t.Aggregate=class{constructor(e,t){this.name=e,this.expression=t,this.expressionType=n.ExpressionType.Aggregate}}},"../node_modules/sparqlee/dist/lib/expressions/AsyncExtension.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncExtension=void 0;const n=r("../node_modules/sparqlee/dist/lib/expressions/Expressions.js");t.AsyncExtension=class{constructor(e,t,r){this.name=e,this.args=t,this.apply=r,this.expressionType=n.ExpressionType.AsyncExtension}}},"../node_modules/sparqlee/dist/lib/expressions/Existence.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Existence=void 0;const n=r("../node_modules/sparqlee/dist/lib/expressions/Expressions.js");t.Existence=class{constructor(e){this.expression=e,this.expressionType=n.ExpressionType.Existence}}},"../node_modules/sparqlee/dist/lib/expressions/Expressions.js":(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.asTermType=t.ExpressionType=void 0,(r=t.ExpressionType||(t.ExpressionType={})).Aggregate="aggregate",r.Existence="existence",r.Named="named",r.Operator="operator",r.SpecialOperator="specialOperator",r.Term="term",r.Variable="variable",r.AsyncExtension="asyncExtension",r.SyncExtension="syncExtension",t.asTermType=function(e){if("namedNode"===e||"literal"===e||"blankNode"===e)return e}},"../node_modules/sparqlee/dist/lib/expressions/Named.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Named=void 0;const n=r("../node_modules/sparqlee/dist/lib/expressions/Expressions.js");t.Named=class{constructor(e,t,r){this.name=e,this.args=t,this.apply=r,this.expressionType=n.ExpressionType.Named}}},"../node_modules/sparqlee/dist/lib/expressions/Operator.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operator=void 0;const n=r("../node_modules/sparqlee/dist/lib/expressions/Expressions.js");t.Operator=class{constructor(e,t){this.args=e,this.apply=t,this.expressionType=n.ExpressionType.Operator}}},"../node_modules/sparqlee/dist/lib/expressions/SpecialOperator.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpecialOperator=void 0;const n=r("../node_modules/sparqlee/dist/lib/expressions/Expressions.js");t.SpecialOperator=class{constructor(e,t,r){this.args=e,this.applyAsync=t,this.applySync=r,this.expressionType=n.ExpressionType.SpecialOperator}}},"../node_modules/sparqlee/dist/lib/expressions/SyncExtension.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncExtension=void 0;const n=r("../node_modules/sparqlee/dist/lib/expressions/Expressions.js");t.SyncExtension=class{constructor(e,t,r){this.name=e,this.args=t,this.apply=r,this.expressionType=n.ExpressionType.SyncExtension}}},"../node_modules/sparqlee/dist/lib/expressions/Term.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNonLexicalLiteral=t.NonLexicalLiteral=t.StringLiteral=t.LangStringLiteral=t.DateTimeLiteral=t.BooleanLiteral=t.DoubleLiteral=t.FloatLiteral=t.DecimalLiteral=t.IntegerLiteral=t.NumericLiteral=t.Literal=t.isLiteralTermExpression=t.BlankNode=t.NamedNode=t.Term=void 0;const n=r("../node_modules/rdf-data-factory/index.js"),i=r("../node_modules/sparqlee/dist/lib/util/Consts.js"),o=r("../node_modules/sparqlee/dist/lib/util/Consts.js"),s=r("../node_modules/sparqlee/dist/lib/util/Errors.js"),a=r("../node_modules/sparqlee/dist/lib/util/TypeHandling.js"),u=r("../node_modules/sparqlee/dist/lib/expressions/Expressions.js"),c=new n.DataFactory;class l{constructor(){this.expressionType=u.ExpressionType.Term}str(){throw new s.InvalidArgumentTypes([this],i.RegularOperator.STR)}coerceEBV(){throw new s.EBVCoercionError(this)}}t.Term=l,t.NamedNode=class extends l{constructor(e){super(),this.value=e,this.termType="namedNode"}toRDF(){return c.namedNode(this.value)}str(){return this.value}};class d extends l{constructor(e){super(),this.termType="blankNode",this.value="string"==typeof e?c.blankNode(e):e}static nextID(){return d._nextID+=1,d.nextID.toString()}toRDF(){return this.value}}t.BlankNode=d,d._nextID=0,t.isLiteralTermExpression=function(e){if("literal"===e.termType)return e};class p extends l{constructor(e,t,r,n,i){super(),this.typedValue=e,this.dataType=t,this.strValue=r,this.language=n,this.termType="literal",this.mainSparqlType=i||"other"}toRDF(){return c.literal(this.strValue||this.str(),this.language||c.namedNode(this.dataType))}str(){return this.strValue||this.typedValue.toString()}}t.Literal=p;class h extends p{constructor(e,t,r,n,i){super(e,t,r,n,i),this.typedValue=e,this.strValue=r,this.language=n}coerceEBV(){return!!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=h,t.IntegerLiteral=class extends h{constructor(e,t,r,n){super(e,t||o.TypeURL.XSD_INTEGER,r,n,"integer"),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){return e.toFixed(0)}},t.DecimalLiteral=class extends h{constructor(e,t,r,n){super(e,t||o.TypeURL.XSD_DECIMAL,r,n,"decimal"),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){return e.toString()}},t.FloatLiteral=class extends h{constructor(e,t,r,n){super(e,t||o.TypeURL.XSD_FLOAT,r,n,"float"),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){return e.toString()}},t.DoubleLiteral=class extends h{constructor(e,t,r,n){super(e,t||o.TypeURL.XSD_DOUBLE,r,n,"double"),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){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,void 0,"boolean"),this.typedValue=e,this.strValue=t}coerceEBV(){return!!this.typedValue}},t.DateTimeLiteral=class extends p{constructor(e,t,r){super(e,r||o.TypeURL.XSD_DATE_TIME,t,void 0,"dateTime"),this.typedValue=e,this.strValue=t}},t.LangStringLiteral=class extends p{constructor(e,t,r){super(e,r||o.TypeURL.RDF_LANG_STRING,e,t,"langString"),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,void 0,"string"),this.typedValue=e}coerceEBV(){return this.str().length>0}},t.NonLexicalLiteral=class extends p{constructor(e,t,r,n,i){super({toString:()=>"undefined"},t,n,i,"nonlexical"),this.typeURL=t,this.openWorldType=r,this.typedValue={toString:()=>"undefined"},this.dataType=o.TypeAlias.SPARQL_NON_LEXICAL}coerceEBV(){if((0,a.isSubTypeOf)(this.typeURL,o.TypeURL.XSD_BOOLEAN,this.openWorldType)||(0,a.isSubTypeOf)(this.typeURL,o.TypeAlias.SPARQL_NUMERIC,this.openWorldType))return!1;throw new s.EBVCoercionError(this)}toRDF(){return c.literal(this.str(),this.language||c.namedNode(this.typeURL))}str(){return this.strValue||""}},t.isNonLexicalLiteral=function(e){if(e.dataType===o.TypeAlias.SPARQL_NON_LEXICAL)return e}},"../node_modules/sparqlee/dist/lib/expressions/Variable.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Variable=void 0;const n=r("../node_modules/sparqlee/dist/lib/expressions/Expressions.js");t.Variable=class{constructor(e){this.expressionType=n.ExpressionType.Variable,this.name=e}}},"../node_modules/sparqlee/dist/lib/expressions/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("../node_modules/sparqlee/dist/lib/expressions/Expressions.js"),t),i(r("../node_modules/sparqlee/dist/lib/expressions/Variable.js"),t),i(r("../node_modules/sparqlee/dist/lib/expressions/Term.js"),t),i(r("../node_modules/sparqlee/dist/lib/expressions/Operator.js"),t),i(r("../node_modules/sparqlee/dist/lib/expressions/SpecialOperator.js"),t),i(r("../node_modules/sparqlee/dist/lib/expressions/Named.js"),t),i(r("../node_modules/sparqlee/dist/lib/expressions/Aggregate.js"),t),i(r("../node_modules/sparqlee/dist/lib/expressions/Existence.js"),t),i(r("../node_modules/sparqlee/dist/lib/expressions/AsyncExtension.js"),t),i(r("../node_modules/sparqlee/dist/lib/expressions/SyncExtension.js"),t)},"../node_modules/sparqlee/dist/lib/functions/Core.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpecialFunction=t.NamedFunction=t.RegularFunction=t.BaseFunction=void 0;const n=r("../node_modules/sparqlee/dist/lib/util/Errors.js");class i{constructor(e,t){this.operator=e,this.apply=(e,t)=>(this.monomorph(e,t.superTypeProvider,t.overloadCache,t.enableExtendedXsdTypes)||this.handleInvalidTypes(e))(t)(e),this.arity=t.arity,this.overloads=t.overloads}monomorph(e,t,r,n){return n?this.overloads.experimentalTree.search(e,t,r):this.overloads.tree.search(e)}}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.applySync=t.applySync,this.applyAsync=t.applyAsync,this.checkArity=t.checkArity||(r=this.arity,e=>r===Number.POSITIVE_INFINITY||(Array.isArray(r)?r.includes(e.length):e.length===r))}}},"../node_modules/sparqlee/dist/lib/functions/Helpers.js":(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("../node_modules/rdf-data-factory/index.js"),i=r("../node_modules/sparqlee/dist/lib/expressions/index.js"),o=r("../node_modules/sparqlee/dist/lib/expressions/index.js"),s=r("../node_modules/sparqlee/dist/lib/util/Consts.js"),a=r("../node_modules/sparqlee/dist/lib/util/Consts.js"),u=r("../node_modules/sparqlee/dist/lib/util/Errors.js"),c=r("../node_modules/sparqlee/dist/lib/util/TypeHandling.js"),l=r("../node_modules/sparqlee/dist/lib/functions/LegacyTree.js"),d=r("../node_modules/sparqlee/dist/lib/functions/OverloadTree.js"),p=new n.DataFactory;t.declare=function(e){return new h(e)};class h{constructor(e){this.overloadTree=new d.OverloadTree(e),this.legacyTree=new l.LegacyTree,this.collected=!1}collect(){if(this.collected)throw new Error("Builders can only be collected once!");return this.collected=!0,{experimentalTree:this.overloadTree,tree:this.legacyTree}}set(e,t){return this.overloadTree.addOverload(e,t),this.legacyTree.addOverload(e,t),this}setLegacy(e,t){return this.legacyTree.addLegacyOverload(e,t),this}copy({from:e,to:t}){const r=this.overloadTree.getImplementationExact(e);if(!r)throw new u.UnexpectedError("Tried to copy implementation, but types not found",{from:e,to:t});return this.set(t,r)}onUnary(e,t){return this.set([e],(e=>([r])=>t(e)(r)))}onUnaryTyped(e,t){return this.set([e],(e=>([r])=>t(e)(r.typedValue)))}onBinary(e,t){return this.set(e,(e=>([r,n])=>t(e)(r,n)))}onBinaryTyped(e,t){return this.set(e,(e=>([r,n])=>t(e)(r.typedValue,n.typedValue)))}onTernaryTyped(e,t){return this.set(e,(e=>([r,n,i])=>t(e)(r.typedValue,n.typedValue,i.typedValue)))}onTernary(e,t){return this.set(e,(e=>([r,n,i])=>t(e)(r,n,i)))}onQuaternaryTyped(e,t){return this.set(e,(e=>([r,n,i,o])=>t(e)(r.typedValue,n.typedValue,i.typedValue,o.typedValue)))}onTerm1(e){return this.set(["term"],(t=>([r])=>e(t)(r)))}onLiteral1(e){return this.set(["literal"],(t=>([r])=>e(t)(r)))}onBoolean1(e){return this.set([s.TypeURL.XSD_BOOLEAN],(t=>([r])=>e(t)(r)))}onBoolean1Typed(e){return this.set([s.TypeURL.XSD_BOOLEAN],(t=>([r])=>e(t)(r.typedValue)))}onString1(e){return this.set([s.TypeURL.XSD_STRING],(t=>([r])=>e(t)(r)))}onString1Typed(e){return this.set([s.TypeURL.XSD_STRING],(t=>([r])=>e(t)(r.typedValue)))}onLangString1(e){return this.set([s.TypeURL.RDF_LANG_STRING],(t=>([r])=>e(t)(r)))}onStringly1(e){return this.set([s.TypeAlias.SPARQL_STRINGLY],(t=>([r])=>e(t)(r)))}onStringly1Typed(e){return this.set([s.TypeAlias.SPARQL_STRINGLY],(t=>([r])=>e(t)(r.typedValue)))}onNumeric1(e){return this.set([s.TypeAlias.SPARQL_NUMERIC],(t=>([r])=>e(t)(r))).invalidLexicalForm([s.TypeAlias.SPARQL_NON_LEXICAL],1)}onDateTime1(e){return this.set([s.TypeURL.XSD_DATE_TIME],(t=>([r])=>e(t)(r))).invalidLexicalForm([s.TypeAlias.SPARQL_NON_LEXICAL],1)}numericConverter(e){const t=t=>r=>e(t)(r.typedValue);return this.onBinary([a.TypeURL.XSD_INTEGER],(e=>r=>y(t(e)(r)))).onBinary([a.TypeURL.XSD_DECIMAL],(e=>r=>m(t(e)(r)))).onBinary([a.TypeURL.XSD_FLOAT],(e=>r=>b(t(e)(r)))).onBinary([a.TypeURL.XSD_DOUBLE],(e=>r=>g(t(e)(r)))).invalidLexicalForm([s.TypeAlias.SPARQL_NON_LEXICAL],1)}arithmetic(e){const t=t=>(r,n)=>e(t)(r.typedValue,n.typedValue);return this.onBinary([a.TypeURL.XSD_INTEGER,a.TypeURL.XSD_INTEGER],(e=>(r,n)=>y(t(e)(r,n)))).onBinary([a.TypeURL.XSD_DECIMAL,a.TypeURL.XSD_DECIMAL],(e=>(r,n)=>m(t(e)(r,n)))).onBinary([a.TypeURL.XSD_FLOAT,a.TypeURL.XSD_FLOAT],(e=>(r,n)=>b(t(e)(r,n)))).onBinary([a.TypeURL.XSD_DOUBLE,a.TypeURL.XSD_DOUBLE],(e=>(r,n)=>g(t(e)(r,n)))).setLegacy([a.TypeAlias.SPARQL_NUMERIC,a.TypeAlias.SPARQL_NUMERIC],(t=>([r,n])=>h.legacyArithmeticPromotion[r.mainSparqlType][n.mainSparqlType](e(t)(r.typedValue,n.typedValue))))}numberTest(e){return this.numeric((t=>([r,n])=>f(e(t)(r.typedValue,n.typedValue))))}stringTest(e){return this.set([s.TypeURL.XSD_STRING,s.TypeURL.XSD_STRING],(t=>([r,n])=>f(e(t)(r.typedValue,n.typedValue)))).invalidLexicalForm([s.TypeAlias.SPARQL_NON_LEXICAL,s.TypeURL.XSD_STRING],1).invalidLexicalForm([s.TypeURL.XSD_STRING,s.TypeAlias.SPARQL_NON_LEXICAL],2)}booleanTest(e){return this.set([s.TypeURL.XSD_BOOLEAN,s.TypeURL.XSD_BOOLEAN],(t=>([r,n])=>f(e(t)(r.typedValue,n.typedValue)))).invalidLexicalForm([s.TypeAlias.SPARQL_NON_LEXICAL,s.TypeURL.XSD_BOOLEAN],1).invalidLexicalForm([s.TypeURL.XSD_BOOLEAN,s.TypeAlias.SPARQL_NON_LEXICAL],2)}dateTimeTest(e){return this.set([s.TypeURL.XSD_DATE_TIME,s.TypeURL.XSD_DATE_TIME],(t=>([r,n])=>f(e(t)(r.typedValue,n.typedValue)))).invalidLexicalForm([s.TypeAlias.SPARQL_NON_LEXICAL,s.TypeURL.XSD_DATE_TIME],1).invalidLexicalForm([s.TypeURL.XSD_DATE_TIME,s.TypeAlias.SPARQL_NON_LEXICAL],2)}numeric(e){return this.set([s.TypeAlias.SPARQL_NUMERIC,s.TypeAlias.SPARQL_NUMERIC],e).invalidLexicalForm([s.TypeAlias.SPARQL_NUMERIC,s.TypeAlias.SPARQL_NON_LEXICAL],2).invalidLexicalForm([s.TypeAlias.SPARQL_NON_LEXICAL,s.TypeAlias.SPARQL_NUMERIC],1)}invalidLexicalForm(e,t){return this.set(e,(()=>e=>{throw new u.InvalidLexicalForm(e[t-1].toRDF())}))}}function f(e){return new i.BooleanLiteral(e)}function y(e,t){if(t&&!(0,c.isInternalSubType)(t,a.TypeURL.XSD_INTEGER))throw new Error("apple");return new i.IntegerLiteral(e,t)}function m(e,t){if(t&&!(0,c.isInternalSubType)(t,a.TypeURL.XSD_DECIMAL))throw new Error("apple");return new i.DecimalLiteral(e,t)}function b(e,t){if(t&&!(0,c.isInternalSubType)(t,a.TypeURL.XSD_FLOAT))throw new Error("apple");return new i.FloatLiteral(e,t)}function g(e,t){if(t&&!(0,c.isInternalSubType)(t,a.TypeURL.XSD_DOUBLE))throw new Error("apple");return new i.DoubleLiteral(e,t)}t.Builder=h,h.legacyArithmeticPromotion={integer:{integer:e=>new o.IntegerLiteral(e),decimal:e=>new o.DecimalLiteral(e),float:e=>new o.FloatLiteral(e),double:e=>new o.DoubleLiteral(e)},decimal:{integer:e=>new o.DecimalLiteral(e),decimal:e=>new o.DecimalLiteral(e),float:e=>new o.FloatLiteral(e),double:e=>new o.DoubleLiteral(e)},float:{integer:e=>new o.FloatLiteral(e),decimal:e=>new o.FloatLiteral(e),float:e=>new o.FloatLiteral(e),double:e=>new o.DoubleLiteral(e)},double:{integer:e=>new o.DoubleLiteral(e),decimal:e=>new o.DoubleLiteral(e),float:e=>new o.DoubleLiteral(e),double:e=>new o.DoubleLiteral(e)}},t.bool=f,t.integer=y,t.decimal=m,t.float=b,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 p.variable(e.name.slice(1))}},"../node_modules/sparqlee/dist/lib/functions/LegacyTree.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LegacyTree=void 0;const n=r("../node_modules/sparqlee/dist/lib/expressions/index.js"),i=r("../node_modules/sparqlee/dist/lib/util/TypeHandling.js");class o{constructor(e){this.implementation=void 0,this.subTrees=Object.create(null),this.legacyImportance=e||0}search(e){const t=[];if(0===e.length)return this.implementation;for(t.push(...this.getSubTreeWithArg(e[0]).map((e=>({node:e,index:1}))));t.length>0;){const{index:r,node:n}=t.pop();if(r===e.length)return n.implementation;t.push(...n.getSubTreeWithArg(e[r]).map((e=>({node:e,index:r+1}))))}return this.implementation}addOverload(e,t){this._addOverload([...e],t,!1,0)}addLegacyOverload(e,t){this._addOverload([...e],t,!0,0)}_addOverload(e,t,r,n){const[s,...a]=e;if(!s)return void((r||this.legacyImportance<=n)&&(this.implementation=t));const u=(0,i.mainSparqlType)(s);for(const e of u.types)!r&&this.subTrees[e]||(this.subTrees[e]=new o(u.prio)),this.subTrees[e]._addOverload(a,t,r,u.prio)}getSubTreeWithArg(e){const t=(0,n.isLiteralTermExpression)(e),r=[];return this.subTrees.term&&r.push(this.subTrees.term),this.subTrees[e.termType]&&r.push(this.subTrees[e.termType]),t&&this.subTrees[t.mainSparqlType]&&r.push(this.subTrees[t.mainSparqlType]),r}}t.LegacyTree=o},"../node_modules/sparqlee/dist/lib/functions/NamedFunctions.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.namedDefinitions=void 0;const n=r("../node_modules/sparqlee/dist/lib/util/Consts.js"),i=r("../node_modules/sparqlee/dist/lib/util/Errors.js"),o=r("../node_modules/sparqlee/dist/lib/util/Parsing.js"),s=r("../node_modules/sparqlee/dist/lib/functions/Helpers.js"),a={arity:1,overloads:(0,s.declare)(n.TypeURL.XSD_STRING).onNumeric1((()=>e=>(0,s.string)((0,s.float)(e.typedValue).str()))).onBoolean1Typed((()=>e=>(0,s.string)((0,s.bool)(e).str()))).onTerm1((()=>e=>(0,s.string)(e.str()))).collect()},u={arity:1,overloads:(0,s.declare)(n.TypeURL.XSD_FLOAT).onNumeric1((()=>e=>(0,s.float)(e.typedValue))).onBoolean1Typed((()=>e=>(0,s.float)(e?1:0))).onUnary(n.TypeURL.XSD_STRING,(()=>e=>{const t=(0,o.parseXSDFloat)(e.str());if(void 0===t)throw new i.CastError(e,n.TypeURL.XSD_FLOAT);return(0,s.float)(t)})).copy({from:[n.TypeURL.XSD_STRING],to:[n.TypeAlias.SPARQL_NON_LEXICAL]}).collect()},c={arity:1,overloads:(0,s.declare)(n.TypeURL.XSD_DOUBLE).onNumeric1((()=>e=>(0,s.double)(e.typedValue))).onBoolean1Typed((()=>e=>(0,s.double)(e?1:0))).onUnary(n.TypeURL.XSD_STRING,(()=>e=>{const t=(0,o.parseXSDFloat)(e.str());if(void 0===t)throw new i.CastError(e,n.TypeURL.XSD_DOUBLE);return(0,s.double)(t)})).copy({from:[n.TypeURL.XSD_STRING],to:[n.TypeAlias.SPARQL_NON_LEXICAL]}).collect()},l={arity:1,overloads:(0,s.declare)(n.TypeURL.XSD_DECIMAL).onNumeric1((()=>e=>{const t=(0,o.parseXSDDecimal)(e.str());if(void 0===t)throw new i.CastError(e,n.TypeURL.XSD_DECIMAL);return(0,s.decimal)(t)})).onString1((()=>e=>{const t=e.str(),r=/^([+-])?(\d+(\.\d+)?)$/u.test(t)?(0,o.parseXSDDecimal)(t):void 0;if(void 0===r)throw new i.CastError(e,n.TypeURL.XSD_DECIMAL);return(0,s.decimal)(r)})).copy({from:[n.TypeURL.XSD_STRING],to:[n.TypeAlias.SPARQL_NON_LEXICAL]}).onBoolean1Typed((()=>e=>(0,s.decimal)(e?1:0))).collect()},d={arity:1,overloads:(0,s.declare)(n.TypeURL.XSD_INTEGER).onBoolean1Typed((()=>e=>(0,s.integer)(e?1:0))).onNumeric1((()=>e=>{const t=(0,o.parseXSDInteger)(e.str());if(void 0===t)throw new i.CastError(e,n.TypeURL.XSD_INTEGER);return(0,s.integer)(t)})).onString1((()=>e=>{const t=e.str(),r=/^\d+$/u.test(t)?(0,o.parseXSDInteger)(t):void 0;if(void 0===r)throw new i.CastError(e,n.TypeURL.XSD_INTEGER);return(0,s.integer)(r)})).copy({from:[n.TypeAlias.SPARQL_NUMERIC],to:[n.TypeAlias.SPARQL_NON_LEXICAL]}).collect()},p={arity:1,overloads:(0,s.declare)(n.TypeURL.XSD_DATE_TIME).onUnary(n.TypeURL.XSD_DATE_TIME,(()=>e=>e)).onUnary(n.TypeURL.XSD_STRING,(()=>e=>{const t=new Date(e.str());if(Number.isNaN(t.getTime()))throw new i.CastError(e,n.TypeURL.XSD_DATE_TIME);return(0,s.dateTime)(t,e.str())})).copy({from:[n.TypeURL.XSD_STRING],to:[n.TypeAlias.SPARQL_NON_LEXICAL]}).collect()},h={arity:1,overloads:(0,s.declare)(n.TypeURL.XSD_BOOLEAN).onNumeric1((()=>e=>(0,s.bool)(e.coerceEBV()))).onUnary(n.TypeURL.XSD_BOOLEAN,(()=>e=>(0,s.bool)(e.coerceEBV()))).onUnary(n.TypeURL.XSD_STRING,(()=>e=>{switch(e.str()){case"true":case"1":return(0,s.bool)(!0);case"false":case"0":return(0,s.bool)(!1);default:throw new i.CastError(e,n.TypeURL.XSD_BOOLEAN)}})).copy({from:[n.TypeURL.XSD_STRING],to:[n.TypeAlias.SPARQL_NON_LEXICAL]}).collect()};t.namedDefinitions={[n.TypeURL.XSD_STRING]:a,[n.TypeURL.XSD_FLOAT]:u,[n.TypeURL.XSD_DOUBLE]:c,[n.TypeURL.XSD_DECIMAL]:l,[n.TypeURL.XSD_INTEGER]:d,[n.TypeURL.XSD_DATE_TIME]:p,[n.TypeURL.XSD_DATE]:p,[n.TypeURL.XSD_BOOLEAN]:h}},"../node_modules/sparqlee/dist/lib/functions/OverloadTree.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OverloadTree=void 0;const n=r("../node_modules/sparqlee/dist/lib/expressions/index.js"),i=r("../node_modules/sparqlee/dist/lib/util/Consts.js"),o=r("../node_modules/sparqlee/dist/lib/util/TypeHandling.js"),s=r("../node_modules/sparqlee/dist/lib/functions/Helpers.js");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,o.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}getOverloadCacheIdentifier(e){return this.identifier+e.map((e=>{const t=(0,n.isLiteralTermExpression)(e);return t?t.dataType:e.termType})).join("")}search(e,t,r){const n=this.getOverloadCacheIdentifier(e);if(r.has(n))return r.get(n);const i=[];if(0===e.length)return this.implementation;for(i.push(...this.getSubTreeWithArg(e[0],t).map((e=>({node:e,index:1}))));i.length>0;){const{index:o,node:s}=i.pop();if(o===e.length&&s.implementation)return r.set(n,s.implementation),s.implementation;i.push(...s.getSubTreeWithArg(e[o],t).map((e=>({node:e,index:o+1}))))}r.set(n,void 0)}addOverload(e,t){this._addOverload([...e],t,0)}_addOverload(e,t,r){const[n,...u]=e;if(!n)return void((void 0===this.promotionCount||r<=this.promotionCount)&&(this.promotionCount=r,this.implementation=t));let c=this.getSubtree(n);if(!c){const e=new a(this.identifier,this.depth+1),t=(0,o.asGeneralType)(n);t&&(this.generalOverloads[t]=e);const r=(0,o.asOverrideType)(n);r&&this.literalOverLoads.push([r,e]),c=e}c._addOverload(u,t,r),n===i.TypeURL.XSD_STRING&&this.addPromotedOverload(i.TypeURL.XSD_ANY_URI,t,(e=>(0,s.string)(e.str())),u,r),n===i.TypeURL.XSD_DOUBLE&&(this.addPromotedOverload(i.TypeURL.XSD_FLOAT,t,(e=>(0,s.double)(e.typedValue)),u,r),this.addPromotedOverload(i.TypeURL.XSD_DECIMAL,t,(e=>(0,s.double)(e.typedValue)),u,r)),n===i.TypeURL.XSD_FLOAT&&this.addPromotedOverload(i.TypeURL.XSD_DECIMAL,t,(e=>(0,s.float)(e.typedValue)),u,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=[],i=(0,n.isLiteralTermExpression)(e);if(this.generalOverloads.term&&r.push(this.generalOverloads.term),this.generalOverloads[e.termType]&&r.push(this.generalOverloads[e.termType]),i){const e=(0,o.asKnownLiteralType)(i.dataType);let n;n=e?o.superTypeDictTable[e]:(0,o.getSuperTypes)(i.dataType,t);const s=this.literalOverLoads.filter((([e,t])=>e in n)).map((([e,t])=>[n[e],t]));s.sort((([e,t],[r,n])=>e-r)),r.push(...s.map((([e,t])=>t)))}return r}}t.OverloadTree=a},"../node_modules/sparqlee/dist/lib/functions/RegularFunctions.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.definitions=void 0;const n=r("../node_modules/bignumber.js/bignumber.js"),i=r("../node_modules/hash.js/lib/hash.js"),o=r("../node_modules/rdf-data-factory/index.js"),s=r("../node_modules/relative-to-absolute-iri/index.js"),a=r("../node_modules/spark-md5/spark-md5.js"),u=r("../packages/uuid/index.js"),c=r("../node_modules/sparqlee/dist/lib/expressions/index.js"),l=r("../node_modules/sparqlee/dist/lib/transformers/TermTransformer.js"),d=r("../node_modules/sparqlee/dist/lib/util/Consts.js"),p=r("../node_modules/sparqlee/dist/lib/util/Consts.js"),h=r("../node_modules/sparqlee/dist/lib/util/Errors.js"),f=r("../node_modules/sparqlee/dist/lib/util/Parsing.js"),y=r("../node_modules/sparqlee/dist/lib/functions/Helpers.js"),m=r("../node_modules/sparqlee/dist/lib/functions/XPathFunctions.js"),b=new o.DataFactory,g={arity:1,overloads:(0,y.declare)(d.RegularOperator.NOT).onTerm1((()=>e=>(0,y.bool)(!e.coerceEBV()))).collect()},_={arity:1,overloads:(0,y.declare)(d.RegularOperator.UPLUS).numericConverter((()=>e=>e)).collect()},v={arity:1,overloads:(0,y.declare)(d.RegularOperator.UMINUS).numericConverter((()=>e=>-e)).collect()},O={arity:2,overloads:(0,y.declare)(d.RegularOperator.MULTIPLICATION).arithmetic((()=>(e,t)=>new n.BigNumber(e).times(t).toNumber())).collect()},j={arity:2,overloads:(0,y.declare)(d.RegularOperator.DIVISION).arithmetic((()=>(e,t)=>new n.BigNumber(e).div(t).toNumber())).onBinaryTyped([p.TypeURL.XSD_INTEGER,p.TypeURL.XSD_INTEGER],(()=>(e,t)=>{if(0===t)throw new h.ExpressionError("Integer division by 0");return(0,y.decimal)(new n.BigNumber(e).div(t).toNumber())})).collect()},T={arity:2,overloads:(0,y.declare)(d.RegularOperator.ADDITION).arithmetic((()=>(e,t)=>new n.BigNumber(e).plus(t).toNumber())).collect()},w={arity:2,overloads:(0,y.declare)(d.RegularOperator.SUBTRACTION).arithmetic((()=>(e,t)=>new n.BigNumber(e).minus(t).toNumber())).collect()},S={arity:2,overloads:(0,y.declare)(d.RegularOperator.EQUAL).numberTest((()=>(e,t)=>e===t)).stringTest((()=>(e,t)=>0===e.localeCompare(t))).booleanTest((()=>(e,t)=>e===t)).dateTimeTest((()=>(e,t)=>e.getTime()===t.getTime())).set(["term","term"],(()=>([e,t])=>(0,y.bool)(x(e,t)))).collect()};function x(e,t){const r=e.toRDF(),n=t.toRDF(),i=r.equals(n);if("Literal"===r.termType&&"Literal"===n.termType)throw new h.RDFEqualTypeError([e,t]);return i}const E={arity:2,overloads:(0,y.declare)(d.RegularOperator.NOT_EQUAL).numberTest((()=>(e,t)=>e!==t)).stringTest((()=>(e,t)=>0!==e.localeCompare(t))).booleanTest((()=>(e,t)=>e!==t)).dateTimeTest((()=>(e,t)=>e.getTime()!==t.getTime())).set(["term","term"],(()=>([e,t])=>(0,y.bool)(!x(e,t)))).collect()},A={arity:2,overloads:(0,y.declare)(d.RegularOperator.LT).numberTest((()=>(e,t)=>e<t)).stringTest((()=>(e,t)=>-1===e.localeCompare(t))).booleanTest((()=>(e,t)=>e<t)).dateTimeTest((()=>(e,t)=>e.getTime()<t.getTime())).collect()},R={arity:2,overloads:(0,y.declare)(d.RegularOperator.GT).numberTest((()=>(e,t)=>e>t)).stringTest((()=>(e,t)=>1===e.localeCompare(t))).booleanTest((()=>(e,t)=>e>t)).dateTimeTest((()=>(e,t)=>e.getTime()>t.getTime())).collect()},N={arity:2,overloads:(0,y.declare)(d.RegularOperator.LTE).numberTest((()=>(e,t)=>e<=t)).stringTest((()=>(e,t)=>1!==e.localeCompare(t))).booleanTest((()=>(e,t)=>e<=t)).dateTimeTest((()=>(e,t)=>e.getTime()<=t.getTime())).collect()},P={arity:2,overloads:(0,y.declare)(d.RegularOperator.GTE).numberTest((()=>(e,t)=>e>=t)).stringTest((()=>(e,t)=>-1!==e.localeCompare(t))).booleanTest((()=>(e,t)=>e>=t)).dateTimeTest((()=>(e,t)=>e.getTime()>=t.getTime())).collect()},I={arity:1,overloads:(0,y.declare)(d.RegularOperator.IS_IRI).onTerm1((()=>e=>(0,y.bool)("namedNode"===e.termType))).collect()},L={arity:1,overloads:(0,y.declare)(d.RegularOperator.IS_BLANK).onTerm1((()=>e=>(0,y.bool)("blankNode"===e.termType))).collect()},D={arity:1,overloads:(0,y.declare)(d.RegularOperator.IS_LITERAL).onTerm1((()=>e=>(0,y.bool)("literal"===e.termType))).collect()},M={arity:1,overloads:(0,y.declare)(d.RegularOperator.IS_NUMERIC).onNumeric1((()=>e=>(0,y.bool)(!0))).onTerm1((()=>e=>(0,y.bool)(!1))).collect()},C={arity:1,overloads:(0,y.declare)(d.RegularOperator.STR).onTerm1((()=>e=>(0,y.string)(e.str()))).collect()},B={arity:1,overloads:(0,y.declare)(d.RegularOperator.LANG).onLiteral1((()=>e=>(0,y.string)(e.language||""))).collect()},q={arity:1,overloads:(0,y.declare)(d.RegularOperator.DATATYPE).onLiteral1((()=>e=>new c.NamedNode(e.dataType))).collect()},F={arity:1,overloads:(0,y.declare)(d.RegularOperator.IRI).set(["namedNode"],(e=>t=>{const r=t[0],n=(0,s.resolve)(r.str(),e.baseIRI||"");return new c.NamedNode(n)})).onString1((e=>t=>{const r=(0,s.resolve)(t.str(),e.baseIRI||"");return new c.NamedNode(r)})).collect()},U={arity:2,overloads:(0,y.declare)(d.RegularOperator.STRDT).set([p.TypeURL.XSD_STRING,"namedNode"],(({superTypeProvider:e,enableExtendedXsdTypes:t})=>([r,n])=>{const i=b.literal(r.typedValue,b.namedNode(n.value));return new l.TermTransformer(e,t).transformLiteral(i)})).collect()},k={arity:2,overloads:(0,y.declare)(d.RegularOperator.STRLANG).onBinaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t)=>new c.LangStringLiteral(e,t.toLowerCase()))).collect()},Q={arity:0,overloads:(0,y.declare)(d.RegularOperator.UUID).set([],(()=>()=>new c.NamedNode(`urn:uuid:${u.v4()}`))).collect()},G={arity:0,overloads:(0,y.declare)(d.RegularOperator.STRUUID).set([],(()=>()=>(0,y.string)(u.v4()))).collect()},V={arity:1,overloads:(0,y.declare)(d.RegularOperator.STRLEN).onStringly1((()=>e=>(0,y.integer)([...e.typedValue].length))).collect()},X={arity:[2,3],overloads:(0,y.declare)(d.RegularOperator.SUBSTR).onBinaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_INTEGER],(()=>(e,t)=>(0,y.string)([...e].slice(t-1).join("")))).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.XSD_INTEGER],(()=>(e,t)=>{const r=[...e.typedValue].slice(t.typedValue-1).join("");return(0,y.langString)(r,e.language)})).onTernaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_INTEGER,p.TypeURL.XSD_INTEGER],(()=>(e,t,r)=>(0,y.string)([...e].slice(t-1,r+t-1).join("")))).onTernary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.XSD_INTEGER,p.TypeURL.XSD_INTEGER],(()=>(e,t,r)=>{const n=[...e.typedValue].slice(t.typedValue-1,r.typedValue+t.typedValue-1).join("");return(0,y.langString)(n,e.language)})).collect()},$={arity:1,overloads:(0,y.declare)(d.RegularOperator.UCASE).onString1Typed((()=>e=>(0,y.string)(e.toUpperCase()))).onLangString1((()=>e=>(0,y.langString)(e.typedValue.toUpperCase(),e.language))).collect()},J={arity:1,overloads:(0,y.declare)(d.RegularOperator.LCASE).onString1Typed((()=>e=>(0,y.string)(e.toLowerCase()))).onLangString1((()=>e=>(0,y.langString)(e.typedValue.toLowerCase(),e.language))).collect()},H={arity:2,overloads:(0,y.declare)(d.RegularOperator.STRSTARTS).onBinaryTyped([p.TypeAlias.SPARQL_STRINGLY,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,y.bool)(e.startsWith(t)))).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new h.IncompatibleLanguageOperation(e,t);return(0,y.bool)(e.typedValue.startsWith(t.typedValue))})).collect()},z={arity:2,overloads:(0,y.declare)(d.RegularOperator.STRENDS).onBinaryTyped([p.TypeAlias.SPARQL_STRINGLY,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,y.bool)(e.endsWith(t)))).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new h.IncompatibleLanguageOperation(e,t);return(0,y.bool)(e.typedValue.endsWith(t.typedValue))})).collect()},K={arity:2,overloads:(0,y.declare)(d.RegularOperator.CONTAINS).onBinaryTyped([p.TypeAlias.SPARQL_STRINGLY,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,y.bool)(e.includes(t)))).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new h.IncompatibleLanguageOperation(e,t);return(0,y.bool)(e.typedValue.includes(t.typedValue))})).collect()},W={arity:2,overloads:(0,y.declare)(d.RegularOperator.STRBEFORE).onBinaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,y.string)(e.slice(0,Math.max(0,e.indexOf(t)))))).onBinary([p.TypeURL.RDF_LANG_STRING,p.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,y.langString)(i,e.language):(0,y.string)(i)})).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new h.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,y.langString)(i,e.language):(0,y.string)(i)})).collect()},Y={arity:2,overloads:(0,y.declare)(d.RegularOperator.STRAFTER).onBinaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,y.string)(e.slice(e.indexOf(t)).slice(t.length)))).onBinary([p.TypeURL.RDF_LANG_STRING,p.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,y.langString)(i,e.language):(0,y.string)(i)})).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new h.IncompatibleLanguageOperation(e,t);const[r,n]=[e.typedValue,t.typedValue],i=r.slice(r.indexOf(n)).slice(n.length);return i||!n?(0,y.langString)(i,e.language):(0,y.string)(i)})).collect()},Z={arity:1,overloads:(0,y.declare)(d.RegularOperator.ENCODE_FOR_URI).onStringly1Typed((()=>e=>(0,y.string)(encodeURI(e)))).collect()},ee={arity:2,overloads:(0,y.declare)(d.RegularOperator.LANG_MATCHES).onBinaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,y.bool)(m.langMatches(e,t)))).collect()},te={arity:[2,3],overloads:(0,y.declare)(d.RegularOperator.REGEX).onBinaryTyped([p.TypeAlias.SPARQL_STRINGLY,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,y.bool)(m.matches(e,t)))).onTernaryTyped([p.TypeAlias.SPARQL_STRINGLY,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t,r)=>(0,y.bool)(m.matches(e,t,r)))).collect()},re={arity:[3,4],overloads:(0,y.declare)(d.RegularOperator.REPLACE).onTernaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t,r)=>(0,y.string)(m.replace(e,t,r)))).set([p.TypeURL.RDF_LANG_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>([e,t,r])=>{const n=m.replace(e.typedValue,t.typedValue,r.typedValue);return(0,y.langString)(n,e.language)})).onQuaternaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t,r,n)=>(0,y.string)(m.replace(e,t,r,n)))).set([p.TypeURL.RDF_LANG_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>([e,t,r,n])=>{const i=m.replace(e.typedValue,t.typedValue,r.typedValue,n.typedValue);return(0,y.langString)(i,e.language)})).collect()},ne={arity:1,overloads:(0,y.declare)(d.RegularOperator.ABS).numericConverter((()=>e=>Math.abs(e))).collect()},ie={arity:1,overloads:(0,y.declare)(d.RegularOperator.ROUND).numericConverter((()=>e=>Math.round(e))).collect()},oe={arity:1,overloads:(0,y.declare)(d.RegularOperator.CEIL).numericConverter((()=>e=>Math.ceil(e))).collect()},se={arity:1,overloads:(0,y.declare)(d.RegularOperator.FLOOR).numericConverter((()=>e=>Math.floor(e))).collect()},ae={arity:0,overloads:(0,y.declare)(d.RegularOperator.RAND).set([],(()=>()=>(0,y.double)(Math.random()))).collect()};function ue(e){return f.parseXSDDateTime(e.str())}const ce={arity:0,overloads:(0,y.declare)(d.RegularOperator.NOW).set([],(e=>()=>new c.DateTimeLiteral(e.now,e.now.toISOString()))).collect()},le={arity:1,overloads:(0,y.declare)(d.RegularOperator.YEAR).onDateTime1((()=>e=>(0,y.integer)(Number(ue(e).year)))).collect()},de={arity:1,overloads:(0,y.declare)(d.RegularOperator.MONTH).onDateTime1((()=>e=>(0,y.integer)(Number(ue(e).month)))).collect()},pe={arity:1,overloads:(0,y.declare)(d.RegularOperator.DAY).onDateTime1((()=>e=>(0,y.integer)(Number(ue(e).day)))).collect()},he={arity:1,overloads:(0,y.declare)(d.RegularOperator.HOURS).onDateTime1((()=>e=>(0,y.integer)(Number(ue(e).hours)))).collect()},fe={arity:1,overloads:(0,y.declare)(d.RegularOperator.MINUTES).onDateTime1((()=>e=>(0,y.integer)(Number(ue(e).minutes)))).collect()},ye={arity:1,overloads:(0,y.declare)(d.RegularOperator.SECONDS).onDateTime1((()=>e=>(0,y.decimal)(Number(ue(e).seconds)))).collect()},me={arity:1,overloads:(0,y.declare)(d.RegularOperator.TIMEZONE).onDateTime1((()=>e=>{const t=m.formatDayTimeDuration(ue(e).timezone);if(!t)throw new h.InvalidTimezoneCall(e.strValue);return new c.Literal(t,p.TypeURL.XSD_DAYTIME_DURATION,t)})).collect()},be={arity:1,overloads:(0,y.declare)(d.RegularOperator.TZ).onDateTime1((()=>e=>(0,y.string)(ue(e).timezone))).collect()},ge={arity:1,overloads:(0,y.declare)(d.RegularOperator.MD5).onString1Typed((()=>e=>(0,y.string)((0,a.hash)(e)))).collect()},_e={arity:1,overloads:(0,y.declare)(d.RegularOperator.SHA1).onString1Typed((()=>e=>(0,y.string)((0,i.sha1)().update(e).digest("hex")))).collect()},ve={arity:1,overloads:(0,y.declare)(d.RegularOperator.SHA256).onString1Typed((()=>e=>(0,y.string)((0,i.sha256)().update(e).digest("hex")))).collect()},Oe={arity:1,overloads:(0,y.declare)(d.RegularOperator.SHA384).onString1Typed((()=>e=>(0,y.string)((0,i.sha384)().update(e).digest("hex")))).collect()},je={arity:1,overloads:(0,y.declare)(d.RegularOperator.SHA512).onString1Typed((()=>e=>(0,y.string)((0,i.sha512)().update(e).digest("hex")))).collect()};t.definitions={"!":g,UPLUS:_,UMINUS:v,"*":O,"/":j,"+":T,"-":w,"=":S,"!=":E,"<":A,">":R,"<=":N,">=":P,isiri:I,isblank:L,isliteral:D,isnumeric:M,str:C,lang:B,datatype:q,iri:F,uri:F,strdt:U,strlang:k,uuid:Q,struuid:G,strlen:V,substr:X,ucase:$,lcase:J,strstarts:H,strends:z,contains:K,strbefore:W,strafter:Y,encode_for_uri:Z,langmatches:ee,regex:te,replace:re,abs:ne,round:ie,ceil:oe,floor:se,rand:ae,now:ce,year:le,month:de,day:pe,hours:he,minutes:fe,seconds:ye,timezone:me,tz:be,md5:ge,sha1:_e,sha256:ve,sha384:Oe,sha512:je}},"../node_modules/sparqlee/dist/lib/functions/SpecialFunctions.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.specialDefinitions=void 0;const n=r("../packages/uuid/index.js"),i=r("../node_modules/sparqlee/dist/lib/expressions/index.js"),o=r("../node_modules/sparqlee/dist/lib/util/Consts.js"),s=r("../node_modules/sparqlee/dist/lib/util/Errors.js"),a=r("../node_modules/sparqlee/dist/lib/functions/Helpers.js"),u=r("../node_modules/sparqlee/dist/lib/functions/index.js"),c={arity:1,applyAsync:async({args:e,mapping:t})=>l({args:e,mapping:t}),applySync:({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 s.InvalidArgumentTypes(e,o.SpecialOperator.BOUND);const n=t.has((0,a.expressionToVar)(r));return(0,a.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)},applySync({args:e,mapping:t,evaluate:r}){const n=r(e[0],t);return r(n.coerceEBV()?e[1]:e[2],t)}},p={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 s.CoalesceError(n)},applySync({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 s.CoalesceError(n)}},h={arity:2,async applyAsync({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if((await r(n,t)).coerceEBV())return(0,a.bool)(!0);const e=(await r(i,t)).coerceEBV();return(0,a.bool)(e)}catch(e){if(!(await r(i,t)).coerceEBV())throw e;return(0,a.bool)(!0)}},applySync({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if(r(n,t).coerceEBV())return(0,a.bool)(!0);const e=r(i,t).coerceEBV();return(0,a.bool)(e)}catch(e){if(!r(i,t).coerceEBV())throw e;return(0,a.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,a.bool)(!1);const e=(await r(i,t)).coerceEBV();return(0,a.bool)(e)}catch(e){if((await r(i,t)).coerceEBV())throw e;return(0,a.bool)(!1)}},applySync({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if(!r(n,t).coerceEBV())return(0,a.bool)(!1);const e=r(i,t).coerceEBV();return(0,a.bool)(e)}catch(e){if(r(i,t).coerceEBV())throw e;return(0,a.bool)(!1)}}},y={arity:2,async applyAsync({args:e,mapping:t,evaluate:r}){const[n,i]=e.map((e=>r(e,t))),[o,s]=await Promise.all([n,i]);return(0,a.bool)(o.toRDF().equals(s.toRDF()))},applySync({args:e,mapping:t,evaluate:r}){const[n,i]=e.map((e=>r(e,t)));return(0,a.bool)(n.toRDF().equals(i.toRDF()))}},m={arity:Number.POSITIVE_INFINITY,checkArity:e=>e.length>0,async applyAsync(e){const{args:t,mapping:r,evaluate:n}=e,[i,...o]=t;return b(await n(i,r),Object.assign(Object.assign({},e),{args:o}),[])},applySync(e){const{args:t,mapping:r,evaluate:n}=e,[i,...o]=t;return g(n(i,r),Object.assign(Object.assign({},e),{args:o}),[])}};async function b(e,t,r){const{args:n,mapping:i,evaluate:c,overloadCache:l}=t;if(0===n.length)return r.every((e=>!e))?(0,a.bool)(!1):Promise.reject(new s.InError(r));try{const s=n.shift(),l=await c(s,i);return u.regularFunctions[o.RegularOperator.EQUAL].apply([e,l],t).typedValue?(0,a.bool)(!0):b(e,t,[...r,!1])}catch(n){return b(e,t,[...r,n])}}function g(e,t,r){const{args:n,mapping:i,evaluate:c,overloadCache:l}=t;if(0===n.length){if(r.every((e=>!e)))return(0,a.bool)(!1);throw new s.InError(r)}try{const s=c(n.shift(),i);return u.regularFunctions[o.RegularOperator.EQUAL].apply([e,s],t).typedValue?(0,a.bool)(!0):g(e,t,[...r,!1])}catch(n){return g(e,t,[...r,n])}}const _={arity:Number.POSITIVE_INFINITY,checkArity:e=>e.length>0,async applyAsync(e){const t=u.specialFunctions[o.SpecialOperator.IN],r=await t.applyAsync(e);return(0,a.bool)(!r.typedValue)},applySync(e){const t=u.specialFunctions[o.SpecialOperator.IN].applySync(e);return(0,a.bool)(!t.typedValue)}},v=(0,a.declare)(o.SpecialOperator.CONCAT).onStringly1((()=>e=>e)).collect().experimentalTree,O={arity:Number.POSITIVE_INFINITY,async applyAsync(e){const{args:t,mapping:r,evaluate:n,overloadCache:i,superTypeProvider:u}=e,c=t.map((async e=>n(e,r))).map((async r=>{const n=v.search([await r],u,i);if(!n)throw new s.InvalidArgumentTypes(t,o.SpecialOperator.CONCAT);return n(e)([await r])})),l=await Promise.all(c),d=l.map((e=>e.typedValue)).join(""),p=j(l)?l[0].language:void 0;return p?(0,a.langString)(d,p):(0,a.string)(d)},applySync(e){const{args:t,mapping:r,evaluate:n,superTypeProvider:i,overloadCache:u}=e,c=t.map((e=>n(e,r))).map((r=>{const n=v.search([r],i,u);if(!n)throw new s.InvalidArgumentTypes(t,o.SpecialOperator.CONCAT);return n(e)([r])})),l=c.map((e=>e.typedValue)).join(""),d=j(c)?c[0].language:void 0;return d?(0,a.langString)(l,d):(0,a.string)(l)}};function j(e){return e.length>0&&e.every((t=>t.language===e[0].language))}const T=(0,a.declare)(o.SpecialOperator.BNODE).onString1((()=>e=>e)).collect().experimentalTree,w={arity:Number.POSITIVE_INFINITY,checkArity:e=>0===e.length||1===e.length,async applyAsync(e){const{args:t,mapping:r,evaluate:n,superTypeProvider:a,overloadCache:u}=e,c=1===t.length?await n(t[0],r):void 0;let l;if(c){const r=T.search([c],a,u);if(!r)throw new s.InvalidArgumentTypes(t,o.SpecialOperator.BNODE);l=r(e)([c]).str()}if(e.bnode){const t=await e.bnode(l);return new i.BlankNode(t)}return S(l)},applySync(e){const{args:t,mapping:r,evaluate:n,superTypeProvider:a,overloadCache:u}=e,c=1===t.length?n(t[0],r):void 0;let l;if(c){const r=T.search([c],a,u);if(!r)throw new s.InvalidArgumentTypes(t,o.SpecialOperator.BNODE);l=r(e)([c]).str()}if(e.bnode){const t=e.bnode(l);return new i.BlankNode(t)}return S(l)}};function S(e){return new i.BlankNode(e||n.v4())}t.specialDefinitions={bound:c,if:d,coalesce:p,"&&":f,"||":h,sameterm:y,in:m,notin:_,concat:O,BNODE:w}},"../node_modules/sparqlee/dist/lib/functions/XPathFunctions.js":(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.formatDayTimeDuration=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("-"),o=t.split("-");if(!n(o[0],i[0])&&!r(i[0]))return!1;let s=1,a=1;for(;a<o.length;)if(r(o[a]))a++;else{if(s===i.length)return!1;if(n(o[a],i[s]))s++,a++;else{if(1===i[s].length)return!1;s++}}return!0},t.formatDayTimeDuration=function(e){if(!e)return;if(e.startsWith("Z"))return"PT0S";const[t,r,n,i,o,s]=e,a="0"!==r?r:"",u=a||"0"!==n?n:"",c="0"!==o?o:"",l=c||"0"!==s?s:"";return`${"-"===t?"-":""}PT${a+u?`${a+u}H`:""}${c+l?`${c+l}M`:""}`}},"../node_modules/sparqlee/dist/lib/functions/index.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,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.OverloadTree=t.namedFunctions=t.specialFunctions=t.regularFunctions=void 0;const o=r("../node_modules/sparqlee/dist/lib/functions/Core.js"),s=r("../node_modules/sparqlee/dist/lib/functions/NamedFunctions.js"),a=r("../node_modules/sparqlee/dist/lib/functions/RegularFunctions.js"),u=r("../node_modules/sparqlee/dist/lib/functions/SpecialFunctions.js");i(r("../node_modules/sparqlee/dist/lib/functions/Core.js"),t),t.regularFunctions=Object.fromEntries(Object.entries(a.definitions).map((([e,t])=>[e,new o.RegularFunction(e,t)]))),t.specialFunctions=Object.fromEntries(Object.entries(u.specialDefinitions).map((([e,t])=>[e,new o.SpecialFunction(e,t)]))),t.namedFunctions=Object.fromEntries(Object.entries(s.namedDefinitions).map((([e,t])=>[e,new o.NamedFunction(e,t)])));var c=r("../node_modules/sparqlee/dist/lib/functions/OverloadTree.js");Object.defineProperty(t,"OverloadTree",{enumerable:!0,get:function(){return c.OverloadTree}})},"../node_modules/sparqlee/dist/lib/transformers/AlgebraTransformer.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlgebraTransformer=void 0;const n=r("../node_modules/sparqlalgebrajs/index.js"),i=r("../node_modules/sparqlee/dist/lib/expressions/index.js"),o=r("../node_modules/sparqlee/dist/lib/functions/index.js"),s=r("../node_modules/sparqlee/dist/lib/util/Consts.js"),a=r("../node_modules/sparqlee/dist/lib/util/Errors.js"),u=r("../node_modules/sparqlee/dist/lib/util/Errors.js"),c=r("../node_modules/sparqlee/dist/lib/transformers/TermTransformer.js");class l extends c.TermTransformer{constructor(e){super(e.superTypeProvider,e.enableExtendedXsdTypes),this.algebraConfig=e,this.creatorConfig={type:e.type,creator:e.creator}}transformAlgebra(e){if(!e)throw new a.InvalidExpression(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);default:throw new a.InvalidExpressionType(e)}}static transformWildcard(e){if(!e.wildcard)throw new a.InvalidExpression(e);return new i.NamedNode(e.wildcard.value)}transformOperator(e){if(s.SpecialOperators.has(e.operator)){const t=e.operator,r=e.args.map((e=>this.transformAlgebra(e))),n=o.specialFunctions[t];if(!n.checkArity(r))throw new a.InvalidArity(r,t);return new i.SpecialOperator(r,n.applyAsync,n.applySync)}if(!s.Operators.has(e.operator))throw new a.UnknownOperator(e.operator);const t=e.operator,r=e.args.map((e=>this.transformAlgebra(e))),n=o.regularFunctions[t];if(!l.hasCorrectArity(r,n.arity))throw new a.InvalidArity(r,t);return new i.Operator(r,(e=>n.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 u.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 u.ExtensionFunctionError(t,e)}}}transformNamed(e){const t=e.name.value,r=e.args.map((e=>this.transformAlgebra(e)));if(s.NamedOperators.has(t)){const t=e.name.value,n=o.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 a.UnknownNamedOperator(e.name.value)}static hasCorrectArity(e,t){return t===Number.POSITIVE_INFINITY||(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},"../node_modules/sparqlee/dist/lib/transformers/TermTransformer.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermTransformer=void 0;const n=r("../node_modules/rdf-string/index.js"),i=r("../node_modules/sparqlalgebrajs/index.js"),o=r("../node_modules/sparqlee/dist/lib/expressions/index.js"),s=r("../node_modules/sparqlee/dist/lib/util/Consts.js"),a=r("../node_modules/sparqlee/dist/lib/util/Errors.js"),u=r("../node_modules/sparqlee/dist/lib/util/Parsing.js"),c=r("../node_modules/sparqlee/dist/lib/util/TypeHandling.js");t.TermTransformer=class{constructor(e,t){this.superTypeProvider=e,this.enableExtendedXSDTypes=t}transformRDFTermUnsafe(e){return this.transformTerm({term:e,type:i.Algebra.types.EXPRESSION,expressionType:i.Algebra.expressionTypes.TERM})}transformTerm(e){if(!e.term)throw new a.InvalidExpression(e);switch(e.term.termType){case"Variable":return new o.Variable(n.termToString(e.term));case"Literal":return this.transformLiteral(e.term);case"NamedNode":return new o.NamedNode(e.term.value);case"BlankNode":return new o.BlankNode(e.term.value);default:throw new a.InvalidTermType(e)}}legacyTransformLiteral(e){if(!e.datatype)return e.language?new o.LangStringLiteral(e.value,e.language):new o.StringLiteral(e.value);const t=e.datatype.value;switch(t){case null:case void 0:case"":return e.language?new o.LangStringLiteral(e.value,e.language):new o.StringLiteral(e.value);case s.TypeURL.XSD_ANY_URI:case s.TypeURL.XSD_NORMALIZED_STRING:case s.TypeURL.XSD_TOKEN:case s.TypeURL.XSD_LANGUAGE:case s.TypeURL.XSD_NM_TOKEN:case s.TypeURL.XSD_NAME:case s.TypeURL.XSD_ENTITY:case s.TypeURL.XSD_ID:case s.TypeURL.XSD_ID_REF:case s.TypeURL.XSD_STRING:return new o.StringLiteral(e.value,t);case s.TypeURL.RDF_LANG_STRING:return new o.LangStringLiteral(e.value,e.language);case s.TypeURL.XSD_DATE_TIME_STAMP:case s.TypeURL.XSD_DATE_TIME:{const r=new Date(e.value);return Number.isNaN(r.getTime())?new o.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):new o.DateTimeLiteral(new Date(e.value),e.value,t)}case s.TypeURL.XSD_BOOLEAN:return"true"!==e.value&&"false"!==e.value&&"1"!==e.value&&"0"!==e.value?new o.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):new o.BooleanLiteral("true"===e.value||"1"===e.value,e.value,t);case s.TypeURL.XSD_DECIMAL:{const r=u.parseXSDDecimal(e.value);return void 0===r?new o.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):new o.DecimalLiteral(r,t,e.value)}case s.TypeURL.XSD_FLOAT:{const r=u.parseXSDFloat(e.value);return void 0===r?new o.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):new o.FloatLiteral(r,t,e.value)}case s.TypeURL.XSD_DOUBLE:{const r=u.parseXSDFloat(e.value);return void 0===r?new o.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):new o.DoubleLiteral(r,t,e.value)}case s.TypeURL.XSD_NON_POSITIVE_INTEGER:case s.TypeURL.XSD_NEGATIVE_INTEGER:case s.TypeURL.XSD_LONG:case s.TypeURL.XSD_INT:case s.TypeURL.XSD_SHORT:case s.TypeURL.XSD_BYTE:case s.TypeURL.XSD_NON_NEGATIVE_INTEGER:case s.TypeURL.XSD_POSITIVE_INTEGER:case s.TypeURL.XSD_UNSIGNED_LONG:case s.TypeURL.XSD_UNSIGNED_INT:case s.TypeURL.XSD_UNSIGNED_SHORT:case s.TypeURL.XSD_UNSIGNED_BYTE:case s.TypeURL.XSD_INTEGER:{const r=u.parseXSDDecimal(e.value);return void 0===r?new o.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):new o.IntegerLiteral(r,t,e.value)}default:return new o.Literal(e.value,t,e.value)}}transformLiteral(e){return this.enableExtendedXSDTypes?this.experimentalTransformLiteral(e):this.legacyTransformLiteral(e)}experimentalTransformLiteral(e){if(!e.datatype||[null,void 0,""].includes(e.datatype.value))return e.language?new o.LangStringLiteral(e.value,e.language):new o.StringLiteral(e.value);const t=e.datatype.value,r=(0,c.getSuperTypeDict)(t,this.superTypeProvider);if(s.TypeURL.XSD_STRING in r)return new o.StringLiteral(e.value,t);if(s.TypeURL.RDF_LANG_STRING in r)return new o.LangStringLiteral(e.value,e.language);if(s.TypeURL.XSD_DATE_TIME in r){const r=new Date(e.value);return Number.isNaN(r.getTime())?new o.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):new o.DateTimeLiteral(new Date(e.value),e.value,t)}if(s.TypeURL.XSD_BOOLEAN in r)return"true"!==e.value&&"false"!==e.value&&"1"!==e.value&&"0"!==e.value?new o.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):new o.BooleanLiteral("true"===e.value||"1"===e.value,e.value);if(s.TypeURL.XSD_DECIMAL in r){const n=u.parseXSDDecimal(e.value);return void 0===n?new o.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):s.TypeURL.XSD_INTEGER in r?new o.IntegerLiteral(n,t,e.value):new o.DecimalLiteral(n,t,e.value)}const n=s.TypeURL.XSD_FLOAT in r,i=s.TypeURL.XSD_DOUBLE in r;if(n||i){const r=u.parseXSDFloat(e.value);return void 0===r?new o.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):n?new o.FloatLiteral(r,t,e.value):new o.DoubleLiteral(r,t,e.value)}return new o.Literal(e.value,t,e.value)}}},"../node_modules/sparqlee/dist/lib/util/Consts.js":(e,t)=>{"use strict";var r,n,i,o,s;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,(s=t.TypeAlias||(t.TypeAlias={})).SPARQL_NUMERIC="SPARQL_NUMERIC",s.SPARQL_STRINGLY="SPARQL_STRINGLY",s.SPARQL_NON_LEXICAL="SPARQL_NON_LEXICAL",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_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_DAYTIME_DURATION="http://www.w3.org/2001/XMLSchema#dayTimeDuration"}(r=t.TypeURL||(t.TypeURL={})),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_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"}(n=t.RegularOperator||(t.RegularOperator={})),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"}(i=t.SpecialOperator||(t.SpecialOperator={})),t.RegularOperators=new Set(Object.values(n)),t.SpecialOperators=new Set(Object.values(i)),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||(t.SetFunction={})),t.SetFunctions=new Set(Object.values(o)),t.NamedOperators=new Set([r.XSD_STRING,r.XSD_FLOAT,r.XSD_DOUBLE,r.XSD_DECIMAL,r.XSD_INTEGER,r.XSD_DATE_TIME,r.XSD_DATE,r.XSD_BOOLEAN])},"../node_modules/sparqlee/dist/lib/util/Errors.js":(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.UnimplementedError=t.UnexpectedError=t.EmptyAggregateError=t.IncompatibleLanguageOperation=t.InvalidTimezoneCall=t.CastError=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 '${f(e)}'`),this.arg=e}},t.UnboundVariableError=class extends r{constructor(e,t){super(`Unbound variable '${f(e)}'`),this.variable=e,this.bindings=t}},t.EBVCoercionError=class extends r{constructor(e){super(`Cannot coerce term to EBV '${f(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: '${f(t)}' with '${f(e)}`),this.args=e,this.op=t}},t.CastError=class extends r{constructor(e,t){super(`Invalid cast: '${f(e)}' to '${f(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 '${f(e)}' and '${f(t)}'`),this.arg1=e,this.arg2=t}},t.EmptyAggregateError=class extends r{constructor(){super("Empty aggregate expression")}};class n extends Error{constructor(e,t){super(`Programmer Error '${e}'`),this.payload=t}}t.UnexpectedError=n;class i extends Error{constructor(e){super(`Unimplemented feature '${e}!'`)}}t.UnimplementedError=i;class o extends Error{constructor(e,t){super(`The number of args does not match the arity of the operator '${f(t)}'.`),this.args=e,this.op=t}}t.InvalidArity=o;class s extends Error{constructor(e){super(`Invalid SPARQL Expression '${f(e)}'`)}}t.InvalidExpression=s;class a extends Error{constructor(e){super(`Invalid expression type for SPARQL Expression '${f(e)}'`),this.expr=e}}t.InvalidExpressionType=a;class u extends Error{constructor(e){super(`Invalid term type for term '${f(e)}'`),this.term=e}}t.InvalidTermType=u;class c extends Error{constructor(e){super(`Unknown operator: '${f(e)}`)}}t.UnknownOperator=c;class l extends Error{constructor(e){super(`Unknown named operator: '${f(e)}'`)}}t.UnknownNamedOperator=l;class d 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=d;class p extends Error{constructor(e){super(`Aggregate expression ${f(e)} found, but no aggregate hook provided.`)}}t.NoAggregator=p;class h extends Error{constructor(){super("EXISTS found, but no existence hook provided.")}}function f(e){return JSON.stringify(e)}t.NoExistenceHook=h},"../node_modules/sparqlee/dist/lib/util/Ordering.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.order=t.orderTypes=void 0;const n=r("../node_modules/lru-cache/index.js"),i=r("../node_modules/sparqlee/dist/lib/transformers/TermTransformer.js");function o(e,t,r){return e.typedValue===t.typedValue?0:e.typedValue>t.typedValue===r?1:-1}t.orderTypes=function(e,t,r,s,a,u){const c={discoverer:s||(()=>"term"),cache:a||new n},l=new i.TermTransformer(c,u||!1);return e&&"Literal"===e.termType&&t&&"Literal"===t.termType?o(l.transformLiteral(e),l.transformLiteral(t),r):0},t.order=o},"../node_modules/sparqlee/dist/lib/util/Parsing.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseXSDDateTime=t.parseXSDInteger=t.parseXSDDecimal=t.parseXSDFloat=void 0,t.parseXSDFloat=function(e){const t=Number(e);return Number.isNaN(t)?"NaN"===e?Number.NaN:"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.parseXSDDateTime=function(e){const t=e.indexOf("T"),r=t>=0?e.slice(0,Math.max(0,t)):e,[n,i,o]=r.split("-");let s="",a="",u="",c="";if(t>=0){const r=e.slice(t+1),[n,i]=r.split(/[+Z-]/u);[s,a,u]=n.split(":");const o=/([+Z-].*)/u.exec(r);c=o?o[0]:""}else s="00",a="00",u="00",c="";return{year:n,month:i,day:o,hours:s,minutes:a,seconds:u,timezone:c}}},"../node_modules/sparqlee/dist/lib/util/TypeHandling.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSubTypeOf=t.getSuperTypeDict=t.isInternalSubType=t.asGeneralType=t.asOverrideType=t.asKnownLiteralType=t.asTypeAlias=t.typeAliasCheck=t.extensionTableInit=t.getSuperTypes=t.superTypeDictTable=t.extensionTableInput=t.mainSparqlType=void 0;const n=r("../node_modules/sparqlee/dist/lib/expressions/index.js"),i=r("../node_modules/sparqlee/dist/lib/util/Consts.js");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 s;const a=u(i);return s=a?Object.assign({},t.superTypeDictTable[a]):Object.assign({},o(i,r)),s.__depth++,s[e]=s.__depth,r.cache.set(e,s),s}function s(){const e=Object.create(null);for(const[r,n]of Object.entries(t.extensionTableInput)){const t=r;e[t]||a(t,n,e)}t.superTypeDictTable=e}function a(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]||a(r,t.extensionTableInput[r],n),n[e]=Object.assign(Object.assign({},n[r]),{[e]:n[r].__depth+1,__depth:n[r].__depth+1})}function u(e){if(e in t.superTypeDictTable)return e}function c(e,r){const n=u(e);return n?t.superTypeDictTable[n]:o(e,r)}t.mainSparqlType=function(e){switch(e){case"term":return{types:["term"],prio:0};case"namedNode":return{types:["namedNode"],prio:1};case"literal":return{types:["literal"],prio:1};case"blankNode":return{types:["blankNode"],prio:1};case i.TypeAlias.SPARQL_NON_LEXICAL:return{types:["nonlexical"],prio:2};case null:case void 0:case"":case i.TypeURL.XSD_ANY_URI:case i.TypeURL.XSD_NORMALIZED_STRING:case i.TypeURL.XSD_TOKEN:case i.TypeURL.XSD_LANGUAGE:case i.TypeURL.XSD_NM_TOKEN:case i.TypeURL.XSD_NAME:case i.TypeURL.XSD_ENTITY:case i.TypeURL.XSD_ID:case i.TypeURL.XSD_ID_REF:case i.TypeURL.XSD_STRING:return{types:["string"],prio:t.superTypeDictTable[i.TypeURL.XSD_STRING].__depth+2};case i.TypeURL.RDF_LANG_STRING:return{types:["langString"],prio:t.superTypeDictTable[i.TypeURL.RDF_LANG_STRING].__depth+2};case i.TypeURL.XSD_DATE_TIME_STAMP:case i.TypeURL.XSD_DATE_TIME:return{types:["dateTime"],prio:t.superTypeDictTable[i.TypeURL.XSD_DATE_TIME].__depth+2};case i.TypeURL.XSD_BOOLEAN:return{types:["boolean"],prio:t.superTypeDictTable[i.TypeURL.XSD_BOOLEAN].__depth+2};case i.TypeURL.XSD_DECIMAL:return{types:["decimal","integer"],prio:t.superTypeDictTable[i.TypeURL.XSD_DECIMAL].__depth+2};case i.TypeURL.XSD_FLOAT:return{types:["float"],prio:t.superTypeDictTable[i.TypeURL.XSD_FLOAT].__depth+2};case i.TypeURL.XSD_DOUBLE:return{types:["double"],prio:t.superTypeDictTable[i.TypeURL.XSD_DOUBLE].__depth+2};case i.TypeURL.XSD_NON_POSITIVE_INTEGER:case i.TypeURL.XSD_NEGATIVE_INTEGER:case i.TypeURL.XSD_LONG:case i.TypeURL.XSD_INT:case i.TypeURL.XSD_SHORT:case i.TypeURL.XSD_BYTE:case i.TypeURL.XSD_NON_NEGATIVE_INTEGER:case i.TypeURL.XSD_POSITIVE_INTEGER:case i.TypeURL.XSD_UNSIGNED_LONG:case i.TypeURL.XSD_UNSIGNED_INT:case i.TypeURL.XSD_UNSIGNED_SHORT:case i.TypeURL.XSD_UNSIGNED_BYTE:case i.TypeURL.XSD_INTEGER:return{types:["integer"],prio:t.superTypeDictTable[i.TypeURL.XSD_INTEGER].__depth+2};case i.TypeAlias.SPARQL_STRINGLY:return{types:["string","langString"],prio:t.superTypeDictTable[i.TypeAlias.SPARQL_STRINGLY].__depth+2};case i.TypeAlias.SPARQL_NUMERIC:return{types:["decimal","float","integer","double"],prio:t.superTypeDictTable[i.TypeAlias.SPARQL_NUMERIC].__depth+2};default:return{types:["other"],prio:2}}},t.extensionTableInput={[i.TypeURL.XSD_DATE_TIME_STAMP]:i.TypeURL.XSD_DATE_TIME,[i.TypeURL.XSD_DAYTIME_DURATION]:i.TypeURL.XSD_DURATION,[i.TypeURL.XSD_YEAR_MONTH_DURATION]:i.TypeURL.XSD_DURATION,[i.TypeURL.RDF_LANG_STRING]:i.TypeAlias.SPARQL_STRINGLY,[i.TypeURL.XSD_STRING]:i.TypeAlias.SPARQL_STRINGLY,[i.TypeURL.XSD_NORMALIZED_STRING]:i.TypeURL.XSD_STRING,[i.TypeURL.XSD_TOKEN]:i.TypeURL.XSD_NORMALIZED_STRING,[i.TypeURL.XSD_LANGUAGE]:i.TypeURL.XSD_TOKEN,[i.TypeURL.XSD_NM_TOKEN]:i.TypeURL.XSD_TOKEN,[i.TypeURL.XSD_NAME]:i.TypeURL.XSD_TOKEN,[i.TypeURL.XSD_NC_NAME]:i.TypeURL.XSD_NAME,[i.TypeURL.XSD_ENTITY]:i.TypeURL.XSD_NC_NAME,[i.TypeURL.XSD_ID]:i.TypeURL.XSD_NC_NAME,[i.TypeURL.XSD_ID_REF]:i.TypeURL.XSD_NC_NAME,[i.TypeURL.XSD_DOUBLE]:i.TypeAlias.SPARQL_NUMERIC,[i.TypeURL.XSD_FLOAT]:i.TypeAlias.SPARQL_NUMERIC,[i.TypeURL.XSD_DECIMAL]:i.TypeAlias.SPARQL_NUMERIC,[i.TypeURL.XSD_INTEGER]:i.TypeURL.XSD_DECIMAL,[i.TypeURL.XSD_NON_POSITIVE_INTEGER]:i.TypeURL.XSD_INTEGER,[i.TypeURL.XSD_NEGATIVE_INTEGER]:i.TypeURL.XSD_NON_POSITIVE_INTEGER,[i.TypeURL.XSD_LONG]:i.TypeURL.XSD_INTEGER,[i.TypeURL.XSD_INT]:i.TypeURL.XSD_LONG,[i.TypeURL.XSD_SHORT]:i.TypeURL.XSD_INT,[i.TypeURL.XSD_BYTE]:i.TypeURL.XSD_SHORT,[i.TypeURL.XSD_NON_NEGATIVE_INTEGER]:i.TypeURL.XSD_INTEGER,[i.TypeURL.XSD_POSITIVE_INTEGER]:i.TypeURL.XSD_NON_NEGATIVE_INTEGER,[i.TypeURL.XSD_UNSIGNED_LONG]:i.TypeURL.XSD_NON_NEGATIVE_INTEGER,[i.TypeURL.XSD_UNSIGNED_INT]:i.TypeURL.XSD_UNSIGNED_LONG,[i.TypeURL.XSD_UNSIGNED_SHORT]:i.TypeURL.XSD_UNSIGNED_INT,[i.TypeURL.XSD_UNSIGNED_BYTE]:i.TypeURL.XSD_UNSIGNED_SHORT,[i.TypeURL.XSD_DATE_TIME]:"term",[i.TypeURL.XSD_BOOLEAN]:"term",[i.TypeURL.XSD_DATE]:"term",[i.TypeURL.XSD_DURATION]:"term",[i.TypeAlias.SPARQL_NUMERIC]:"term",[i.TypeAlias.SPARQL_STRINGLY]:"term",[i.TypeAlias.SPARQL_NON_LEXICAL]:"term",[i.TypeURL.XSD_ANY_URI]:"term"},t.getSuperTypes=o,t.extensionTableInit=s,s(),function(){t.typeAliasCheck=Object.create(null);for(const e of Object.values(i.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=c,t.isSubTypeOf=function(e,t,r){return"term"!==e&&void 0!==c(e,r)[t]}},"../node_modules/sparqljs/lib/SparqlGenerator.js":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];s(i)&&(this._prefixByIri[i]=n,r.push(i))}var o=r.join("|").replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&");this._prefixRegex=new RegExp("^("+o+")([a-zA-Z][\\-_a-zA-Z0-9]*)$"),this._usedPrefixes={},this._sparqlStar=e.sparqlStar,this._indent=s(e.indent)?e.indent:"  ",this._newline=s(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+=c(e.variables,void 0,(function(e){return a(e)?this.toEntity(e):"("+this.toExpression(e.expression)+" AS "+o(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+=c(e.updates,";"+this._newline,this.toUpdate,this)),e.group&&(t+="GROUP BY "+c(e.group,void 0,(function(e){var t=a(e.expression)?this.toEntity(e.expression):"("+this.toExpression(e.expression)+")";return e.variable?"("+t+" AS "+o(e.variable)+")":t}),this)+this._newline),e.having&&(t+="HAVING ("+c(e.having,void 0,this.toExpression,this)+")"+this._newline),e.order&&(t+="ORDER BY "+c(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 c(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<e.length;i++){var o=e[i];u(o.subject,r)?u(o.predicate,n)?t.push(","):(n=o.predicate,t.push(";"+this._newline,this._indent,this.toEntity(n))):(r&&t.push("."+this._newline),r=o.subject,n=o.predicate,t.push(this.toEntity(r)," ",this.toEntity(n))),t.push(" ",this.toEntity(o.object))}return t.push("."),t.join("")},t.prototype.graph=function(e){return"GRAPH "+this.toEntity(e.name)+" "+this.group(e)},t.prototype.graphs=function(e,t){return t&&0!==t.length?c(t,"",(function(t){return e+this.toEntity(t)+this._newline}),this):""},t.prototype.group=function(e,t){return-1===(e=!0!==t?this.array(e.patterns||e.triples):this.toPattern("group"!==e.type?e:e.patterns)).indexOf(this._newline)?"{ "+e+" }":"{"+this._newline+this.indent(e)+this._newline+"}"},t.prototype.query=function(e){return this.toQuery(e)},t.prototype.filter=function(e){return"FILTER("+this.toExpression(e.expression)+")"},t.prototype.bind=function(e){return"BIND("+this.toExpression(e.expression)+" AS "+o(e.variable)+")"},t.prototype.optional=function(e){return"OPTIONAL "+this.group(e)},t.prototype.union=function(e){return c(e.patterns,this._newline+"UNION"+this._newline,(function(e){return this.group(e,!0)}),this)},t.prototype.minus=function(e){return"MINUS "+this.group(e)},t.prototype.values=function(e){var t,r,n=Object.keys(e.values.reduce((function(e,t){for(var r in t)e[r]=!0;return e}),{}));return 1===n.length?t=r="":(t="(",r=")"),"VALUES "+t+n.join(" ")+r+" {"+this._newline+c(e.values,this._newline,(function(e){return"  "+t+c(n,void 0,(function(t){return e[t]?this.toEntity(e[t]):"UNDEF"}),this)+r}),this)+this._newline+"}"},t.prototype.service=function(e){return"SERVICE "+(e.silent?"SILENT ":"")+this.toEntity(e.name)+" "+this.group(e)},t.prototype.toExpression=function(e){if(a(e))return this.toEntity(e);switch(e.type.toLowerCase()){case"aggregate":return e.aggregation.toUpperCase()+"("+(e.distinct?"DISTINCT ":"")+this.toExpression(e.expression)+(e.separator?'; SEPARATOR = "'+e.separator.replace(r,n)+'"':"")+")";case"functioncall":return this.toEntity(e.function)+"("+c(e.args,", ",this.toExpression,this)+")";case"operation":var t=e.operator.toUpperCase(),i=e.args||[];switch(e.operator.toLowerCase()){case"<":case">":case">=":case"<=":case"&&":case"||":case"=":case"!=":case"+":case"-":case"*":case"/":return(a(i[0])?this.toEntity(i[0]):"("+this.toExpression(i[0])+")")+" "+t+" "+(a(i[1])?this.toEntity(i[1]):"("+this.toExpression(i[1])+")");case"!":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+"("+(s(i[1])?i[1]:c(i[1],", ",this.toExpression,this))+")";case"notexists":t="NOT EXISTS";case"exists":return t+" "+this.group(i[0],!0);default:return t+"("+c(i,", ",this.toExpression,this)+")"}default:throw new Error("Unknown expression type: "+e.type)}},t.prototype.toEntity=function(e){if(a(e))switch(e.termType){case"Wildcard":return"*";case"Variable":return o(e);case"BlankNode":return"_:"+e.value;case"Literal":var t=e.value||"",i=e.language||"",s=e.datatype;if(e='"'+t.replace(r,n)+'"',i)e+="@"+i;else if(s){if(!this._explicitDatatype)switch(s.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(s.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 u=e.items.map(this.toEntity,this),c=e.pathType;switch(c){case"^":case"!":return c+u[0];case"*":case"+":case"?":return"("+u[0]+c+")";default:return"("+u.join(c)+")"}}};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 o(e){return"?"+e.value}function s(e){return"string"==typeof e}function a(e){return"string"==typeof e.termType}function u(e,t){if(!e||!a(e))return!1;if(!t||!a(t))return!1;if(e.termType!==t.termType)return!1;switch(e.termType){case"Literal":return e.value===t.value&&e.language===t.language&&u(e.datatype,t.datatype);case"Quad":return u(e.subject,t.subject)&&u(e.predicate,t.predicate)&&u(e.object,t.object)&&u(e.graph,t.graph);default:return e.value===t.value}}function c(e,t,r,n){return e.map(r,n).join(s(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.source.default?" DEFAULT ":" ")+"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)}}}},"../node_modules/sparqljs/lib/SparqlParser.js":(e,t,r)=>{e=r.nmd(e);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,15,28,41,50,55,107,117,120,122,123,132,133,138,322,323,324,325,326],n=[2,209],i=[107,117,120,122,123,132,133,138,322,323,324,325,326],o=[1,20],s=[1,29],a=[6,90],u=[45,46,58],c=[45,58],l=[1,58],d=[1,60],p=[1,56],h=[1,59],f=[1,65],y=[1,66],m=[26,34,35],b=[13,16,312],g=[119,141,320,327],_=[13,16,119,141,312],v=[1,88],O=[1,92],j=[1,94],T=[119,141,320,321,327],w=[13,16,119,141,312,321],S=[1,100],x=[2,251],E=[1,99],A=[13,16,34,35,87,93,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312],R=[6,45,46,58,68,75,78,86,88,90],N=[6,13,16,34,45,46,58,68,75,78,86,88,90,312],P=[6,13,16,26,34,35,37,38,45,46,48,58,68,75,78,86,87,88,90,93,100,116,119,132,133,135,140,167,168,170,173,174,191,195,219,224,226,227,231,235,245,246,250,254,258,273,278,295,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,330,331,333,334,335,336,337,338,339,340],I=[34,35,45,46,58],L=[13,16,34,35,87,275,276,277,279,281,282,284,285,288,290,299,300,301,302,303,304,305,306,307,308,309,310,311,312,340,341,342,343,344,345],D=[2,454],M=[1,123],C=[1,117],B=[1,124],q=[1,125],F=[6,13,16,34,35,46,48,87,90,93,119,167,168,170,173,174,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],U=[2,310],k=[1,142],Q=[1,140],G=[6,191],V=[2,327],X=[2,315],$=[45,135],J=[6,48,78,86,88,90],H=[2,255],z=[1,156],K=[1,158],W=[6,48,75,78,86,88,90],Y=[2,253],Z=[1,164],ee=[1,176],te=[1,174],re=[1,184],ne=[1,182],ie=[1,175],oe=[1,180],se=[1,181],ae=[1,185],ue=[1,186],ce=[1,189],le=[1,190],de=[1,191],pe=[1,192],he=[1,193],fe=[1,194],ye=[1,195],me=[1,196],be=[1,197],ge=[1,198],_e=[1,199],ve=[6,68,75,78,86,88,90],Oe=[37,38,191,250,278],je=[37,38,191,250,254,278],Te=[37,38,191,250,254,258,273,278,295,306,307,308,309,310,311,334,335,336,337,338,339,340],we=[26,37,38,191,250,254,258,273,278,295,306,307,308,309,310,311,331,334,335,336,337,338,339,340],Se=[1,229],xe=[1,230],Ee=[1,232],Ae=[1,233],Re=[1,234],Ne=[1,235],Pe=[1,237],Ie=[1,238],Le=[2,461],De=[1,240],Me=[1,241],Ce=[1,242],Be=[1,248],qe=[1,243],Fe=[1,244],Ue=[1,245],ke=[1,246],Qe=[1,247],Ge=[13,16,48,87,100,231,299,300,301,302,303,304,305,306,307,308,309,310,311,312],Ve=[48,93],Xe=[34,38],$e=[6,116,191],Je=[48,119],He=[6,48,86,88,90],ze=[2,339],Ke=[2,331],We=[1,293],Ye=[1,295],Ze=[48,119,328],et=[13,16,34,195,312],tt=[13,16,34,35,38,46,48,87,90,93,119,167,168,170,173,174,191,195,219,224,226,227,231,235,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],rt=[13,16,26,34,35,37,38,46,48,87,90,93,100,119,167,168,170,173,174,191,195,219,224,226,227,231,235,245,246,250,254,258,273,278,295,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,331,334,335,336,337,338,339,340],nt=[13,16,26,34,35,37,38,46,48,87,90,93,100,119,167,168,170,173,174,191,195,219,224,226,227,231,235,245,246,250,254,258,273,278,295,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,331,334,335,336,337,338,339,340],it=[13,16,34,35,87,219,273,275,276,277,279,281,282,284,285,288,290,299,300,301,302,303,304,305,306,307,308,309,310,311,312,334,340,341,342,343,344,345],ot=[1,329],st=[1,330],at=[1,332],ut=[1,331],ct=[6,13,16,26,34,35,37,38,46,48,75,78,81,83,86,87,88,90,93,119,167,168,170,173,174,191,226,231,245,246,250,254,258,273,275,276,277,278,279,281,282,284,285,288,290,295,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,331,334,335,336,337,338,339,340,341,342,343,344,345],lt=[1,340],dt=[1,339],pt=[35,93],ht=[1,353],ft=[1,354],yt=[1,367],mt=[6,48,90],bt=[6,13,16,35,48,78,86,88,90,275,276,277,279,281,282,284,285,288,290,312,340,341,342,343,344,345],gt=[6,13,16,34,35,46,48,78,81,83,86,87,88,90,93,119,167,168,170,173,174,226,231,245,246,275,276,277,279,281,282,284,285,288,290,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,340,341,342,343,344,345],_t=[46,48,90,119,167,168,170,173,174],vt=[1,386],Ot=[1,387],jt=[1,393],Tt=[1,392],wt=[48,119,191,227,328],St=[13,16,34,35,38,87,93,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312],xt=[13,16,34,35,38,48,87,93,119,191,226,227,231,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],Et=[13,16,26,34,35,87,219,273,275,276,277,279,281,282,284,285,288,290,299,300,301,302,303,304,305,306,307,308,309,310,311,312,334,340,341,342,343,344,345],At=[13,16,38,48,87,100,231,299,300,301,302,303,304,305,306,307,308,309,310,311,312],Rt=[35,48],Nt=[2,330],Pt=[1,451],It=[1,448],Lt=[1,449],Dt=[6,13,16,26,34,35,37,38,46,48,68,75,78,81,83,86,87,88,90,93,119,167,168,170,173,174,191,226,231,245,246,250,254,258,273,275,276,277,278,279,281,282,284,285,288,290,295,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,329,331,334,335,336,337,338,339,340,341,342,343,344,345],Mt=[13,16,35,195,219,224,312],Ct=[2,387],Bt=[1,469],qt=[46,48,90,119,167,168,170,173,174,328],Ft=[13,16,34,35,195,219,224,312],Ut=[6,13,16,34,35,48,75,78,86,88,90,275,276,277,279,281,282,284,285,288,290,312,340,341,342,343,344,345],kt=[13,16,34,35,38,48,87,93,119,191,195,226,227,231,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],Qt=[6,13,16,34,35,48,81,83,86,88,90,275,276,277,279,281,282,284,285,288,290,312,340,341,342,343,344,345],Gt=[13,16,34,35,46,48,87,90,93,119,167,168,170,173,174,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312],Vt=[13,16,34,312],Xt=[13,16,34,35,46,48,87,90,93,119,167,168,170,173,174,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],$t=[2,342],Jt=[13,16,34,35,38,46,48,87,90,93,119,167,168,170,173,174,191,226,227,231,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],Ht=[13,16,34,35,37,38,46,48,87,90,93,119,167,168,170,173,174,191,195,219,224,226,227,231,235,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],zt=[2,337],Kt=[13,16,35,195,219,312],Wt=[13,16,34,35,38,46,48,87,90,93,119,167,168,170,173,174,191,195,219,224,226,227,231,245,246,278,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328],Yt=[13,16,38,87,100,231,299,300,301,302,303,304,305,306,307,308,309,310,311,312],Zt=[46,48,90,119,167,168,170,173,174,191,227,328],er=[13,16,34,38,48,87,100,195,231,235,299,300,301,302,303,304,305,306,307,308,309,310,311,312],tr=[13,16,34,35,48,87,93,119,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312],rr=[13,16,34,35,38,87,93,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312,330,331],nr=[13,16,26,34,35,38,87,93,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312,330,331,333,334],ir=[1,630],or=[1,631],sr=[2,325],ar=[13,16,38,195,224,312],ur={trace:function(){},yy:{},symbols_:{error:2,QueryOrUpdate:3,Prologue:4,QueryOrUpdate_group0:5,EOF:6,Prologue_repetition0:7,Query:8,Query_group0:9,Query_option0:10,BaseDecl:11,BASE:12,IRIREF:13,PrefixDecl:14,PREFIX:15,PNAME_NS:16,SelectQuery:17,SelectClauseWildcard:18,SelectQuery_repetition0:19,WhereClause:20,SolutionModifierNoGroup:21,SelectClauseVars:22,SelectQuery_repetition1:23,SolutionModifier:24,SelectClauseBase:25,"*":26,SelectClauseVars_repetition_plus0:27,SELECT:28,SelectClauseBase_option0:29,SubSelect:30,SubSelect_option0:31,SubSelect_option1:32,SelectClauseItem:33,VAR:34,"(":35,Expression:36,AS:37,")":38,VarTriple:39,ConstructQuery:40,CONSTRUCT:41,ConstructTemplate:42,ConstructQuery_repetition0:43,ConstructQuery_repetition1:44,WHERE:45,"{":46,ConstructQuery_option0:47,"}":48,DescribeQuery:49,DESCRIBE:50,DescribeQuery_group0:51,DescribeQuery_repetition0:52,DescribeQuery_option0:53,AskQuery:54,ASK:55,AskQuery_repetition0:56,DatasetClause:57,FROM:58,DatasetClause_option0:59,iri:60,WhereClause_option0:61,GroupGraphPattern:62,SolutionModifier_option0:63,SolutionModifierNoGroup_option0:64,SolutionModifierNoGroup_option1:65,SolutionModifierNoGroup_option2:66,GroupClause:67,GROUP:68,BY:69,GroupClause_repetition_plus0:70,GroupCondition:71,BuiltInCall:72,FunctionCall:73,HavingClause:74,HAVING:75,HavingClause_repetition_plus0:76,OrderClause:77,ORDER:78,OrderClause_repetition_plus0:79,OrderCondition:80,ASC:81,BrackettedExpression:82,DESC:83,Constraint:84,LimitOffsetClauses:85,LIMIT:86,INTEGER:87,OFFSET:88,ValuesClause:89,VALUES:90,InlineData:91,InlineData_repetition0:92,NIL:93,InlineData_repetition1:94,InlineData_repetition_plus2:95,InlineData_repetition3:96,DataBlockValue:97,Literal:98,ConstTriple:99,UNDEF:100,DataBlockValueList:101,DataBlockValueList_repetition_plus0:102,Update:103,Update_repetition0:104,Update1:105,Update_option0:106,LOAD:107,Update1_option0:108,Update1_option1:109,Update1_group0:110,Update1_option2:111,GraphRefAll:112,Update1_group1:113,Update1_option3:114,GraphOrDefault:115,TO:116,CREATE:117,Update1_option4:118,GRAPH:119,INSERTDATA:120,QuadPattern:121,DELETEDATA:122,DELETEWHERE:123,Update1_option5:124,InsertClause:125,Update1_option6:126,Update1_repetition0:127,Update1_option7:128,DeleteClause:129,Update1_option8:130,Update1_repetition1:131,DELETE:132,INSERT:133,UsingClause:134,USING:135,UsingClause_option0:136,WithClause:137,WITH:138,IntoGraphClause:139,INTO:140,DEFAULT:141,GraphOrDefault_option0:142,GraphRefAll_group0:143,QuadPattern_option0:144,QuadPattern_repetition0:145,QuadsNotTriples:146,QuadsNotTriples_group0:147,QuadsNotTriples_option0:148,QuadsNotTriples_option1:149,QuadsNotTriples_option2:150,TriplesTemplate:151,TriplesTemplate_repetition0:152,TriplesSameSubject:153,TriplesTemplate_option0:154,GroupGraphPatternSub:155,GroupGraphPatternSub_option0:156,GroupGraphPatternSub_repetition0:157,GroupGraphPatternSubTail:158,GraphPatternNotTriples:159,GroupGraphPatternSubTail_option0:160,GroupGraphPatternSubTail_option1:161,TriplesBlock:162,TriplesBlock_repetition0:163,TriplesSameSubjectPath:164,TriplesBlock_option0:165,GraphPatternNotTriples_repetition0:166,OPTIONAL:167,MINUS:168,GraphPatternNotTriples_group0:169,SERVICE:170,GraphPatternNotTriples_option0:171,GraphPatternNotTriples_group1:172,FILTER:173,BIND:174,FunctionCall_option0:175,FunctionCall_repetition0:176,ExpressionList:177,ExpressionList_repetition0:178,ConstructTemplate_option0:179,ConstructTriples:180,ConstructTriples_repetition0:181,ConstructTriples_option0:182,TriplesSameSubject_group0:183,PropertyListNotEmpty:184,TriplesNode:185,PropertyList:186,PropertyList_option0:187,VerbObjectList:188,PropertyListNotEmpty_repetition0:189,SemiOptionalVerbObjectList:190,";":191,SemiOptionalVerbObjectList_option0:192,Verb:193,ObjectList:194,a:195,ObjectList_repetition0:196,GraphNode:197,ObjectListPath:198,ObjectListPath_repetition0:199,GraphNodePath:200,TriplesSameSubjectPath_group0:201,PropertyListPathNotEmpty:202,TriplesNodePath:203,TriplesSameSubjectPath_option0:204,PropertyListPathNotEmpty_group0:205,PropertyListPathNotEmpty_repetition0:206,PropertyListPathNotEmpty_repetition1:207,PropertyListPathNotEmptyTail:208,PropertyListPathNotEmptyTail_group0:209,Path:210,Path_repetition0:211,PathSequence:212,PathSequence_repetition0:213,PathEltOrInverse:214,PathElt:215,PathPrimary:216,PathElt_option0:217,PathEltOrInverse_option0:218,"!":219,PathNegatedPropertySet:220,PathOneInPropertySet:221,PathNegatedPropertySet_repetition0:222,PathNegatedPropertySet_option0:223,"^":224,TriplesNode_repetition_plus0:225,"[":226,"]":227,TriplesNodePath_repetition_plus0:228,GraphNode_group0:229,GraphNodePath_group0:230,"<<":231,VarTriple_group0:232,VarTriple_group1:233,VarTriple_group2:234,">>":235,VarTriple_group3:236,VarTriple_group4:237,ConstTriple_group0:238,ConstTriple_group1:239,ConstTriple_group2:240,ConstTriple_group3:241,ConstTriple_group4:242,VarOrTerm:243,Term:244,BLANK_NODE_LABEL:245,ANON:246,ConditionalAndExpression:247,Expression_repetition0:248,ExpressionTail:249,"||":250,RelationalExpression:251,ConditionalAndExpression_repetition0:252,ConditionalAndExpressionTail:253,"&&":254,AdditiveExpression:255,RelationalExpression_group0:256,RelationalExpression_option0:257,IN:258,MultiplicativeExpression:259,AdditiveExpression_repetition0:260,AdditiveExpressionTail:261,AdditiveExpressionTail_group0:262,NumericLiteralPositive:263,AdditiveExpressionTail_repetition0:264,NumericLiteralNegative:265,AdditiveExpressionTail_repetition1:266,UnaryExpression:267,MultiplicativeExpression_repetition0:268,MultiplicativeExpressionTail:269,MultiplicativeExpressionTail_group0:270,UnaryExpression_option0:271,PrimaryExpression:272,"-":273,Aggregate:274,FUNC_ARITY0:275,FUNC_ARITY1:276,FUNC_ARITY2:277,",":278,IF:279,BuiltInCall_group0:280,BOUND:281,BNODE:282,BuiltInCall_option0:283,EXISTS:284,COUNT:285,Aggregate_option0:286,Aggregate_group0:287,FUNC_AGGREGATE:288,Aggregate_option1:289,GROUP_CONCAT:290,Aggregate_option2:291,Aggregate_option3:292,GroupConcatSeparator:293,SEPARATOR:294,"=":295,String:296,LANGTAG:297,"^^":298,DECIMAL:299,DOUBLE:300,BOOLEAN:301,STRING_LITERAL1:302,STRING_LITERAL2:303,STRING_LITERAL_LONG1:304,STRING_LITERAL_LONG2:305,INTEGER_POSITIVE:306,DECIMAL_POSITIVE:307,DOUBLE_POSITIVE:308,INTEGER_NEGATIVE:309,DECIMAL_NEGATIVE:310,DOUBLE_NEGATIVE:311,PNAME_LN:312,QueryOrUpdate_group0_option0:313,Prologue_repetition0_group0:314,SelectClauseBase_option0_group0:315,DISTINCT:316,REDUCED:317,DescribeQuery_group0_repetition_plus0_group0:318,DescribeQuery_group0_repetition_plus0:319,NAMED:320,SILENT:321,CLEAR:322,DROP:323,ADD:324,MOVE:325,COPY:326,ALL:327,".":328,UNION:329,"|":330,"/":331,PathElt_option0_group0:332,"?":333,"+":334,"!=":335,"<":336,">":337,"<=":338,">=":339,NOT:340,CONCAT:341,COALESCE:342,SUBSTR:343,REGEX:344,REPLACE:345,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",12:"BASE",13:"IRIREF",15:"PREFIX",16:"PNAME_NS",26:"*",28:"SELECT",34:"VAR",35:"(",37:"AS",38:")",41:"CONSTRUCT",45:"WHERE",46:"{",48:"}",50:"DESCRIBE",55:"ASK",58:"FROM",68:"GROUP",69:"BY",75:"HAVING",78:"ORDER",81:"ASC",83:"DESC",86:"LIMIT",87:"INTEGER",88:"OFFSET",90:"VALUES",93:"NIL",100:"UNDEF",107:"LOAD",116:"TO",117:"CREATE",119:"GRAPH",120:"INSERTDATA",122:"DELETEDATA",123:"DELETEWHERE",132:"DELETE",133:"INSERT",135:"USING",138:"WITH",140:"INTO",141:"DEFAULT",167:"OPTIONAL",168:"MINUS",170:"SERVICE",173:"FILTER",174:"BIND",191:";",195:"a",219:"!",224:"^",226:"[",227:"]",231:"<<",235:">>",245:"BLANK_NODE_LABEL",246:"ANON",250:"||",254:"&&",258:"IN",273:"-",275:"FUNC_ARITY0",276:"FUNC_ARITY1",277:"FUNC_ARITY2",278:",",279:"IF",281:"BOUND",282:"BNODE",284:"EXISTS",285:"COUNT",288:"FUNC_AGGREGATE",290:"GROUP_CONCAT",294:"SEPARATOR",295:"=",297:"LANGTAG",298:"^^",299:"DECIMAL",300:"DOUBLE",301:"BOOLEAN",302:"STRING_LITERAL1",303:"STRING_LITERAL2",304:"STRING_LITERAL_LONG1",305:"STRING_LITERAL_LONG2",306:"INTEGER_POSITIVE",307:"DECIMAL_POSITIVE",308:"DOUBLE_POSITIVE",309:"INTEGER_NEGATIVE",310:"DECIMAL_NEGATIVE",311:"DOUBLE_NEGATIVE",312:"PNAME_LN",316:"DISTINCT",317:"REDUCED",320:"NAMED",321:"SILENT",322:"CLEAR",323:"DROP",324:"ADD",325:"MOVE",326:"COPY",327:"ALL",328:".",329:"UNION",330:"|",331:"/",333:"?",334:"+",335:"!=",336:"<",337:">",338:"<=",339:">=",340:"NOT",341:"CONCAT",342:"COALESCE",343:"SUBSTR",344:"REGEX",345:"REPLACE"},productions_:[0,[3,3],[4,1],[8,2],[11,2],[14,3],[17,4],[17,4],[18,2],[22,2],[25,2],[30,4],[30,4],[33,1],[33,5],[33,5],[40,5],[40,7],[49,5],[54,4],[57,3],[20,2],[24,2],[21,3],[67,3],[71,1],[71,1],[71,3],[71,5],[71,1],[74,2],[77,3],[80,2],[80,2],[80,1],[80,1],[85,2],[85,2],[85,4],[85,4],[89,2],[91,4],[91,4],[91,6],[97,1],[97,1],[97,1],[97,1],[101,3],[103,3],[105,4],[105,3],[105,5],[105,4],[105,2],[105,2],[105,2],[105,6],[105,6],[129,2],[125,2],[134,3],[137,2],[139,3],[115,1],[115,2],[112,2],[112,1],[121,4],[146,7],[151,3],[62,3],[62,3],[155,2],[158,3],[162,3],[159,2],[159,2],[159,2],[159,3],[159,4],[159,2],[159,6],[159,6],[159,1],[84,1],[84,1],[84,1],[73,2],[73,6],[177,1],[177,4],[42,3],[180,3],[153,2],[153,2],[186,1],[184,2],[190,2],[188,2],[193,1],[193,1],[193,1],[194,2],[198,2],[164,2],[164,2],[202,4],[208,1],[208,3],[210,2],[212,2],[215,2],[214,2],[216,1],[216,1],[216,2],[216,3],[220,1],[220,1],[220,4],[221,1],[221,1],[221,2],[221,2],[185,3],[185,3],[203,3],[203,3],[197,1],[197,1],[200,1],[200,1],[39,9],[39,5],[99,9],[99,5],[243,1],[243,1],[244,1],[244,1],[244,1],[244,1],[244,1],[36,2],[249,2],[247,2],[253,2],[251,1],[251,3],[251,4],[255,2],[261,2],[261,2],[261,2],[259,2],[269,2],[267,2],[267,2],[267,2],[272,1],[272,1],[272,1],[272,1],[272,1],[272,1],[82,3],[72,1],[72,2],[72,4],[72,6],[72,8],[72,2],[72,4],[72,2],[72,4],[72,3],[274,5],[274,5],[274,6],[293,4],[98,1],[98,2],[98,3],[98,1],[98,1],[98,1],[98,1],[98,1],[98,1],[296,1],[296,1],[296,1],[296,1],[263,1],[263,1],[263,1],[265,1],[265,1],[265,1],[60,1],[60,1],[60,1],[313,0],[313,1],[5,1],[5,1],[314,1],[314,1],[7,0],[7,2],[9,1],[9,1],[9,1],[9,1],[10,0],[10,1],[19,0],[19,2],[23,0],[23,2],[27,1],[27,2],[315,1],[315,1],[29,0],[29,1],[31,0],[31,1],[32,0],[32,1],[43,0],[43,2],[44,0],[44,2],[47,0],[47,1],[318,1],[318,1],[319,1],[319,2],[51,1],[51,1],[52,0],[52,2],[53,0],[53,1],[56,0],[56,2],[59,0],[59,1],[61,0],[61,1],[63,0],[63,1],[64,0],[64,1],[65,0],[65,1],[66,0],[66,1],[70,1],[70,2],[76,1],[76,2],[79,1],[79,2],[92,0],[92,2],[94,0],[94,2],[95,1],[95,2],[96,0],[96,2],[102,1],[102,2],[104,0],[104,4],[106,0],[106,2],[108,0],[108,1],[109,0],[109,1],[110,1],[110,1],[111,0],[111,1],[113,1],[113,1],[113,1],[114,0],[114,1],[118,0],[118,1],[124,0],[124,1],[126,0],[126,1],[127,0],[127,2],[128,0],[128,1],[130,0],[130,1],[131,0],[131,2],[136,0],[136,1],[142,0],[142,1],[143,1],[143,1],[143,1],[144,0],[144,1],[145,0],[145,2],[147,1],[147,1],[148,0],[148,1],[149,0],[149,1],[150,0],[150,1],[152,0],[152,3],[154,0],[154,1],[156,0],[156,1],[157,0],[157,2],[160,0],[160,1],[161,0],[161,1],[163,0],[163,3],[165,0],[165,1],[166,0],[166,3],[169,1],[169,1],[171,0],[171,1],[172,1],[172,1],[175,0],[175,1],[176,0],[176,3],[178,0],[178,3],[179,0],[179,1],[181,0],[181,3],[182,0],[182,1],[183,1],[183,1],[187,0],[187,1],[189,0],[189,2],[192,0],[192,1],[196,0],[196,3],[199,0],[199,3],[201,1],[201,1],[204,0],[204,1],[205,1],[205,1],[206,0],[206,3],[207,0],[207,2],[209,1],[209,1],[211,0],[211,3],[213,0],[213,3],[332,1],[332,1],[332,1],[217,0],[217,1],[218,0],[218,1],[222,0],[222,3],[223,0],[223,1],[225,1],[225,2],[228,1],[228,2],[229,1],[229,1],[230,1],[230,1],[232,1],[232,1],[233,1],[233,1],[234,1],[234,1],[236,1],[236,1],[237,1],[237,1],[238,1],[238,1],[239,1],[239,1],[240,1],[240,1],[241,1],[241,1],[242,1],[242,1],[248,0],[248,2],[252,0],[252,2],[256,1],[256,1],[256,1],[256,1],[256,1],[256,1],[257,0],[257,1],[260,0],[260,2],[262,1],[262,1],[264,0],[264,2],[266,0],[266,2],[268,0],[268,2],[270,1],[270,1],[271,0],[271,1],[280,1],[280,1],[280,1],[280,1],[280,1],[283,0],[283,1],[286,0],[286,1],[287,1],[287,1],[289,0],[289,1],[291,0],[291,1],[292,0],[292,1]],performAction:function(e,t,r,n,i,o,s){var a,u,c,l,d=o.length-1;switch(i){case 1:if(o[d-1]=o[d-1]||{},nn.base&&(o[d-1].base=nn.base),nn.base="",o[d-1].prefixes=nn.prefixes,nn.prefixes=null,"update"===o[d-1].type){const e={};for(const t of o[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 o[d-1];case 3:this.$=xr(o[d-1],o[d],{type:"query"});break;case 4:nn.base=Ar(o[d]);break;case 5:nn.prefixes||(nn.prefixes={}),o[d-1]=o[d-1].substr(0,o[d-1].length-1),o[d]=Ar(o[d]),nn.prefixes[o[d-1]]=o[d];break;case 6:this.$=xr(o[d-3],Dr(o[d-2]),o[d-1],o[d]);break;case 7:if(!nn.skipValidation&&(Kr(o[d-3].variables.map((e=>Hr(e.expression)))).some((e=>"count"===e.aggregation&&!(e.expression instanceof cr)))||o[d].group))for(const e of o[d-3].variables)if("Variable"===e.termType){if(!o[d].group||!o[d].group.map((e=>Jr(e))).includes(Jr(e)))throw Error("Projection of ungrouped variable (?"+Jr(e)+")")}else if(0===Hr(e.expression).length){const t=zr(e.expression);for(const e of t)if(!o[d].group||!o[d].group.map||!o[d].group.map((e=>Jr(e))).includes(Jr(e)))throw Error("Use of ungrouped variable in projection of operation (?"+Jr(e)+")")}const e=o[d-1].where.filter((e=>"query"===e.type));if(e.length>0){const t=o[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.$=xr(o[d-3],Dr(o[d-2]),o[d-1],o[d]);break;case 8:this.$=xr(o[d-1],{variables:[new cr]});break;case 9:const t=function(e){const t=e.slice().sort(),r=[];for(let e=0;e<t.length-1;e++)t[e+1]==t[e]&&r.push(t[e]);return r}(o[d].map((e=>e.value||e.variable.value)));if(t.length>0)throw Error("Two or more of the resulting columns have the same name (?"+t[0]+")");this.$=xr(o[d-1],{variables:o[d]});break;case 10:this.$=xr({queryType:"SELECT"},o[d]&&(o[d-1]=Tr(o[d]),o[d]={},o[d][o[d-1]]=!0,o[d]));break;case 11:case 12:this.$=xr(o[d-3],o[d-2],o[d-1],o[d],{type:"query"});break;case 13:case 100:case 137:case 165:this.$=Rr(o[d]);break;case 14:case 28:this.$=Pr(o[d-3],{variable:Rr(o[d-1])});break;case 15:this.$=Zr(Pr(o[d-3],{variable:Rr(o[d-1])}));break;case 16:this.$=xr({queryType:"CONSTRUCT",template:o[d-3]},Dr(o[d-2]),o[d-1],o[d]);break;case 17:this.$=xr({queryType:"CONSTRUCT",template:o[d-2]=o[d-2]?o[d-2].triples:[]},Dr(o[d-5]),{where:[{type:"bgp",triples:Sr([],o[d-2])}]},o[d]);break;case 18:this.$=xr({queryType:"DESCRIBE",variables:"*"===o[d-3]?[new cr]:o[d-3].map(Rr)},Dr(o[d-2]),o[d-1],o[d]);break;case 19:this.$=xr({queryType:"ASK"},Dr(o[d-2]),o[d-1],o[d]);break;case 20:case 61:this.$={iri:o[d],named:!!o[d-1]};break;case 21:this.$={where:o[d].patterns};break;case 22:this.$=xr(o[d-1],o[d]);break;case 23:this.$=xr(o[d-2],o[d-1],o[d]);break;case 24:this.$={group:o[d]};break;case 25:case 26:case 32:case 34:this.$=Pr(o[d]);break;case 27:this.$=Pr(o[d-1]);break;case 29:case 35:this.$=Pr(Rr(o[d]));break;case 30:this.$={having:o[d]};break;case 31:this.$={order:o[d]};break;case 33:this.$=Pr(o[d],{descending:!0});break;case 36:this.$={limit:Mr(o[d])};break;case 37:this.$={offset:Mr(o[d])};break;case 38:this.$={limit:Mr(o[d-2]),offset:Mr(o[d])};break;case 39:this.$={limit:Mr(o[d]),offset:Mr(o[d-2])};break;case 40:this.$={type:"values",values:o[d]};break;case 41:this.$=o[d-1].map((function(e){var t={};return t[o[d-3]]=e,t}));break;case 42:this.$=o[d-1].map((function(){return{}}));break;case 43:var p=o[d-4].length;o[d-4]=o[d-4].map(Rr),this.$=o[d-1].map((function(e){if(e.length!==p)throw Error("Inconsistent VALUES length");for(var t={},r=0;r<p;r++)t["?"+o[d-4][r].value]=e[r];return t}));break;case 46:this.$=Zr(o[d]);break;case 47:this.$=void 0;break;case 48:case 92:case 117:case 166:this.$=o[d-1];break;case 49:this.$={type:"update",updates:wr(o[d-2],o[d-1])};break;case 50:this.$=xr({type:"load",silent:!!o[d-2],source:o[d-1]},o[d]&&{destination:o[d]});break;case 51:this.$={type:Tr(o[d-2]),silent:!!o[d-1],graph:o[d]};break;case 52:this.$={type:Tr(o[d-4]),silent:!!o[d-3],source:o[d-2],destination:o[d]};break;case 53:this.$={type:"create",silent:!!o[d-2],graph:{type:"graph",name:o[d]}};break;case 54:this.$={updateType:"insert",insert:en(o[d])};break;case 55:this.$={updateType:"delete",delete:tn(en(o[d]))};break;case 56:this.$={updateType:"deletewhere",delete:tn(o[d])};break;case 57:this.$=xr({updateType:"insertdelete"},o[d-5],{insert:o[d-4]||[]},{delete:o[d-3]||[]},Dr(o[d-2],"using"),{where:o[d].patterns});break;case 58:this.$=xr({updateType:"insertdelete"},o[d-5],{delete:o[d-4]||[]},{insert:o[d-3]||[]},Dr(o[d-2],"using"),{where:o[d].patterns});break;case 59:this.$=tn(o[d]);break;case 60:case 63:case 157:case 180:this.$=o[d];break;case 62:this.$={graph:o[d]};break;case 64:this.$={type:"graph",default:!0};break;case 65:case 66:this.$={type:"graph",name:o[d]};break;case 67:this.$={},this.$[Tr(o[d])]=!0;break;case 68:this.$=o[d-2]?Er(o[d-1],[o[d-2]]):Er(o[d-1]);break;case 69:var h=xr(o[d-3]||{triples:[]},{type:"graph",name:Rr(o[d-5])});this.$=o[d]?[h,o[d]]:[h];break;case 70:case 75:this.$={type:"bgp",triples:Er(o[d-2],[o[d-1]])};break;case 71:this.$={type:"group",patterns:[o[d-1]]};break;case 72:for(const e of o[d-1].filter((e=>"bind"===e.type))){const t=o[d-1].indexOf(e),r=new Set;for(const e of o[d-1].slice(0,t))"group"!==e.type&&"bgp"!==e.type||Yr(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:o[d-1]};break;case 73:this.$=o[d-1]?Er([o[d-1]],o[d]):Er(o[d]);break;case 74:this.$=o[d]?[o[d-2],o[d]]:o[d-2];break;case 76:o[d-1].length?this.$={type:"union",patterns:Er(o[d-1].map(Cr),[Cr(o[d])])}:this.$=o[d];break;case 77:this.$=xr(o[d],{type:"optional"});break;case 78:this.$=xr(o[d],{type:"minus"});break;case 79:this.$=xr(o[d],{type:"graph",name:Rr(o[d-1])});break;case 80:this.$=xr(o[d],{type:"service",name:Rr(o[d-1]),silent:!!o[d-2]});break;case 81:this.$={type:"filter",expression:o[d]};break;case 82:this.$={type:"bind",variable:Rr(o[d-1]),expression:o[d-3]};break;case 83:this.$=Zr({type:"bind",variable:Rr(o[d-1]),expression:o[d-3]});break;case 88:this.$={type:"functionCall",function:o[d-1],args:[]};break;case 89:this.$={type:"functionCall",function:o[d-5],args:wr(o[d-2],o[d-1]),distinct:!!o[d-3]};break;case 90:case 108:case 119:case 209:case 217:case 219:case 231:case 233:case 243:case 247:case 267:case 269:case 273:case 277:case 300:case 306:case 317:case 327:case 333:case 339:case 343:case 353:case 355:case 359:case 367:case 371:case 373:case 381:case 383:case 387:case 389:case 398:case 430:case 432:case 442:case 446:case 448:case 450:this.$=[];break;case 91:this.$=wr(o[d-2],o[d-1]);break;case 93:this.$=Er(o[d-2],[o[d-1]]);break;case 94:case 105:this.$=o[d].map((function(e){return xr(qr(o[d-1]),e)}));break;case 95:this.$=Sr(o[d].map((function(e){return xr(qr(o[d-1].entity),e)})),o[d-1].triples);break;case 97:this.$=Er([o[d-1]],o[d]);break;case 98:this.$=Er(o[d]);break;case 99:this.$=$r(o[d-1],o[d]);break;case 102:case 115:case 122:this.$=nn.factory.namedNode(dr);break;case 103:case 104:this.$=wr(o[d-1],o[d]);break;case 106:this.$=o[d]?Sr(o[d].map((function(e){return xr(qr(o[d-1].entity),e)})),o[d-1].triples):o[d-1].triples;break;case 107:this.$=$r(Rr(o[d-3]),wr(o[d-2],o[d-1]),o[d]);break;case 109:this.$=$r(Rr(o[d-1]),o[d]);break;case 110:this.$=o[d-1].length?Ir("|",wr(o[d-1],o[d])):o[d];break;case 111:this.$=o[d-1].length?Ir("/",wr(o[d-1],o[d])):o[d];break;case 112:this.$=o[d]?Ir(o[d],[o[d-1]]):o[d-1];break;case 113:this.$=o[d-1]?Ir(o[d-1],[o[d]]):o[d];break;case 116:case 123:this.$=Ir(o[d-1],[o[d]]);break;case 120:this.$=Ir("|",wr(o[d-2],o[d-1]));break;case 124:this.$=Ir(o[d-1],[nn.factory.namedNode(dr)]);break;case 125:case 127:this.$=function(e){var t=Fr(),r=t,n=[],i=[];e.forEach((function(e){n.push(e.entity),Sr(i,e.triples)}));for(var o=0,s=0,a=n.length,u=Array(2*a);o<a;)u[s++]=qr(r,nn.factory.namedNode(pr),n[o]),u[s++]=qr(r,nn.factory.namedNode(hr),r=++o<a?Fr():nn.factory.namedNode(fr));return{entity:t,triples:Sr(u,i)}}(o[d-1]);break;case 126:case 128:this.$=(c=o[d-1],{entity:l=Fr(),triples:c.map((function(e){return xr(qr(l),e)}))});break;case 129:case 131:this.$={entity:o[d],triples:[]};break;case 133:case 135:this.$=Zr(nn.factory.quad(o[d-4],o[d-3],o[d-2],Rr(o[d-6])));break;case 134:case 136:this.$=Zr(nn.factory.quad(o[d-3],o[d-2],o[d-1]));break;case 141:this.$=Fr(o[d].replace(/^(_:)/,""));break;case 142:this.$=Fr();break;case 143:this.$=nn.factory.namedNode(fr);break;case 144:case 146:case 151:case 155:this.$=Lr(o[d-1],o[d]);break;case 145:this.$=["||",o[d]];break;case 147:this.$=["&&",o[d]];break;case 149:this.$=Nr(o[d-1],[o[d-2],o[d]]);break;case 150:this.$=Nr(o[d-2]?"notin":"in",[o[d-3],o[d]]);break;case 152:case 156:this.$=[o[d-1],o[d]];break;case 153:this.$=["+",Lr(o[d-1],o[d])];break;case 154:var f=Br(o[d-1].value.replace("-",""),o[d-1].datatype);this.$=["-",Lr(f,o[d])];break;case 158:this.$=Nr(o[d-1],[o[d]]);break;case 159:this.$=Nr("UMINUS",[o[d]]);break;case 168:this.$=Nr(Tr(o[d-1]));break;case 169:this.$=Nr(Tr(o[d-3]),[o[d-1]]);break;case 170:this.$=Nr(Tr(o[d-5]),[o[d-3],o[d-1]]);break;case 171:this.$=Nr(Tr(o[d-7]),[o[d-5],o[d-3],o[d-1]]);break;case 172:this.$=Nr(Tr(o[d-1]),o[d]);break;case 173:this.$=Nr("bound",[Rr(o[d-1])]);break;case 174:this.$=Nr(o[d-1],[]);break;case 175:this.$=Nr(o[d-3],[o[d-1]]);break;case 176:this.$=Nr(o[d-2]?"notexists":"exists",[Cr(o[d])]);break;case 177:case 178:this.$=Pr(o[d-1],{type:"aggregate",aggregation:Tr(o[d-4]),distinct:!!o[d-2]});break;case 179:this.$=Pr(o[d-2],{type:"aggregate",aggregation:Tr(o[d-5]),distinct:!!o[d-3],separator:o[d-1]||" "});break;case 181:this.$=Br(o[d]);break;case 182:this.$=(a=o[d-1],u=Tr(o[d].substr(1)),nn.factory.literal(a,u));break;case 183:this.$=Br(o[d-2],o[d]);break;case 184:case 197:this.$=Br(o[d],mr);break;case 185:case 198:this.$=Br(o[d],br);break;case 186:case 199:this.$=Br(Tr(o[d]),gr);break;case 189:this.$=Br(o[d].toLowerCase(),_r);break;case 190:case 191:this.$=Xr(o[d],1);break;case 192:case 193:this.$=Xr(o[d],3);break;case 194:this.$=Br(o[d].substr(1),mr);break;case 195:this.$=Br(o[d].substr(1),br);break;case 196:this.$=Br(o[d].substr(1).toLowerCase(),gr);break;case 200:this.$=nn.factory.namedNode(Ar(o[d]));break;case 201:var y=o[d].indexOf(":"),m=o[d].substr(0,y),b=nn.prefixes[m];if(!b)throw new Error("Unknown prefix: "+m);var g=Ar(b+o[d].substr(y+1));this.$=nn.factory.namedNode(g);break;case 202:if(o[d]=o[d].substr(0,o[d].length-1),!(o[d]in nn.prefixes))throw new Error("Unknown prefix: "+o[d]);g=Ar(nn.prefixes[o[d]]),this.$=nn.factory.namedNode(g);break;case 210:case 218:case 220:case 222:case 232:case 234:case 240:case 244:case 248:case 262:case 264:case 266:case 268:case 270:case 272:case 274:case 276:case 301:case 307:case 318:case 334:case 368:case 384:case 403:case 405:case 431:case 433:case 443:case 447:case 449:case 451:o[d-1].push(o[d]);break;case 221:case 239:case 261:case 263:case 265:case 271:case 275:case 402:case 404:this.$=[o[d]];break;case 278:o[d-3].push(o[d-2]);break;case 328:case 340:case 344:case 354:case 356:case 360:case 372:case 374:case 382:case 388:case 390:case 399:o[d-2].push(o[d-1])}},table:[e(t,n,{3:1,4:2,7:3}),{1:[3]},e(i,[2,277],{5:4,8:5,313:6,9:7,103:8,17:9,40:10,49:11,54:12,104:13,18:14,22:15,25:19,6:[2,203],28:o,41:[1,16],50:[1,17],55:[1,18]}),e([6,28,41,50,55,107,117,120,122,123,132,133,138,322,323,324,325,326],[2,2],{314:21,11:22,14:23,12:[1,24],15:[1,25]}),{6:[1,26]},{6:[2,205]},{6:[2,206]},{6:[2,215],10:27,89:28,90:s},{6:[2,204]},e(a,[2,211]),e(a,[2,212]),e(a,[2,213]),e(a,[2,214]),{105:30,107:[1,31],110:32,113:33,117:[1,34],120:[1,35],122:[1,36],123:[1,37],124:38,128:39,132:[2,302],133:[2,296],137:45,138:[1,46],322:[1,40],323:[1,41],324:[1,42],325:[1,43],326:[1,44]},e(u,[2,217],{19:47}),e(u,[2,219],{23:48}),e(c,[2,233],{42:49,44:50,46:[1,51]}),{13:l,16:d,26:[1,54],34:p,51:52,60:57,312:h,318:55,319:53},e(u,[2,247],{56:61}),{26:[1,62],27:63,33:64,34:f,35:y},e(m,[2,225],{29:67,315:68,316:[1,69],317:[1,70]}),e(t,[2,210]),e(t,[2,207]),e(t,[2,208]),{13:[1,71]},{16:[1,72]},{1:[2,1]},{6:[2,3]},{6:[2,216]},{34:[1,74],35:[1,76],91:73,93:[1,75]},{6:[2,279],106:77,191:[1,78]},e(b,[2,281],{108:79,321:[1,80]}),e(g,[2,287],{111:81,321:[1,82]}),e(_,[2,292],{114:83,321:[1,84]}),{118:85,119:[2,294],321:[1,86]},{46:v,121:87},{46:v,121:89},{46:v,121:90},{125:91,133:O},{129:93,132:j},e(T,[2,285]),e(T,[2,286]),e(w,[2,289]),e(w,[2,290]),e(w,[2,291]),{132:[2,303],133:[2,297]},{13:l,16:d,60:95,312:h},{20:96,45:S,46:x,57:97,58:E,61:98},{20:101,45:S,46:x,57:102,58:E,61:98},e(u,[2,231],{43:103}),{45:[1,104],57:105,58:E},e(A,[2,359],{179:106,180:107,181:108,48:[2,357]}),e(R,[2,243],{52:109}),e(R,[2,241],{60:57,318:110,13:l,16:d,34:p,312:h}),e(R,[2,242]),e(N,[2,239]),e(N,[2,237]),e(N,[2,238]),e(P,[2,200]),e(P,[2,201]),e(P,[2,202]),{20:111,45:S,46:x,57:112,58:E,61:98},e(u,[2,8]),e(u,[2,9],{33:113,34:f,35:y}),e(I,[2,221]),e(I,[2,13]),e(L,D,{36:114,39:115,247:116,251:118,255:119,259:120,267:121,271:122,219:M,231:C,273:B,334:q}),e(m,[2,10]),e(m,[2,226]),e(m,[2,223]),e(m,[2,224]),e(t,[2,4]),{13:[1,126]},e(F,[2,40]),{46:[1,127]},{46:[1,128]},{34:[1,130],95:129},{6:[2,49]},e(t,n,{7:3,4:131}),{13:l,16:d,60:132,312:h},e(b,[2,282]),{112:133,119:[1,134],141:[1,136],143:135,320:[1,137],327:[1,138]},e(g,[2,288]),e(b,U,{115:139,142:141,119:k,141:Q}),e(_,[2,293]),{119:[1,143]},{119:[2,295]},e(G,[2,54]),e(A,V,{144:144,151:145,152:146,48:X,119:X}),e(G,[2,55]),e(G,[2,56]),e($,[2,298],{126:147,129:148,132:j}),{46:v,121:149},e($,[2,304],{130:150,125:151,133:O}),{46:v,121:152},e([132,133],[2,62]),e(J,H,{21:153,64:154,74:155,75:z}),e(u,[2,218]),{46:K,62:157},e(b,[2,249],{59:159,320:[1,160]}),{46:[2,252]},e(W,Y,{24:161,63:162,67:163,68:Z}),e(u,[2,220]),{20:165,45:S,46:x,57:166,58:E,61:98},{46:[1,167]},e(c,[2,234]),{48:[1,168]},{48:[2,358]},{13:l,16:d,34:ee,35:te,39:173,60:178,87:re,93:ne,98:179,153:169,183:170,185:171,226:ie,231:C,243:172,244:177,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},e(ve,[2,245],{61:98,53:200,57:201,20:202,45:S,46:x,58:E}),e(N,[2,240]),e(W,Y,{63:162,67:163,24:203,68:Z}),e(u,[2,248]),e(I,[2,222]),{37:[1,204]},{37:[1,205]},e(Oe,[2,430],{248:206}),{13:l,16:d,34:ee,39:209,60:178,87:re,93:ne,98:179,119:[1,207],231:C,236:208,243:210,244:177,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},e(je,[2,432],{252:211}),e(je,[2,148],{256:212,257:213,258:[2,440],295:[1,214],335:[1,215],336:[1,216],337:[1,217],338:[1,218],339:[1,219],340:[1,220]}),e(Te,[2,442],{260:221}),e(we,[2,450],{268:222}),{13:l,16:d,34:Se,35:xe,60:226,72:225,73:227,82:224,87:re,98:228,263:187,265:188,272:223,274:231,275:Ee,276:Ae,277:Re,279:Ne,280:236,281:Pe,282:Ie,283:239,284:Le,285:De,288:Me,290:Ce,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h,340:Be,341:qe,342:Fe,343:Ue,344:ke,345:Qe},{13:l,16:d,34:Se,35:xe,60:226,72:225,73:227,82:224,87:re,98:228,263:187,265:188,272:249,274:231,275:Ee,276:Ae,277:Re,279:Ne,280:236,281:Pe,282:Ie,283:239,284:Le,285:De,288:Me,290:Ce,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h,340:Be,341:qe,342:Fe,343:Ue,344:ke,345:Qe},{13:l,16:d,34:Se,35:xe,60:226,72:225,73:227,82:224,87:re,98:228,263:187,265:188,272:250,274:231,275:Ee,276:Ae,277:Re,279:Ne,280:236,281:Pe,282:Ie,283:239,284:Le,285:De,288:Me,290:Ce,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h,340:Be,341:qe,342:Fe,343:Ue,344:ke,345:Qe},e(L,[2,455]),e(t,[2,5]),e(Ge,[2,267],{92:251}),e(Ve,[2,269],{94:252}),{34:[1,254],38:[1,253]},e(Xe,[2,271]),e(i,[2,278],{6:[2,280]}),e(G,[2,283],{109:255,139:256,140:[1,257]}),e(G,[2,51]),{13:l,16:d,60:258,312:h},e(G,[2,67]),e(G,[2,312]),e(G,[2,313]),e(G,[2,314]),{116:[1,259]},e($e,[2,64]),{13:l,16:d,60:260,312:h},e(b,[2,311]),{13:l,16:d,60:261,312:h},e(Je,[2,317],{145:262}),e(Je,[2,316]),{13:l,16:d,34:ee,35:te,39:173,60:178,87:re,93:ne,98:179,153:263,183:170,185:171,226:ie,231:C,243:172,244:177,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},e($,[2,300],{127:264}),e($,[2,299]),e([45,132,135],[2,60]),e($,[2,306],{131:265}),e($,[2,305]),e([45,133,135],[2,59]),e(a,[2,6]),e(He,[2,257],{65:266,77:267,78:[1,268]}),e(J,[2,256]),{13:l,16:d,35:xe,60:274,72:272,73:273,76:269,82:271,84:270,274:231,275:Ee,276:Ae,277:Re,279:Ne,280:236,281:Pe,282:Ie,283:239,284:Le,285:De,288:Me,290:Ce,312:h,340:Be,341:qe,342:Fe,343:Ue,344:ke,345:Qe},e([6,48,68,75,78,86,88,90],[2,21]),e(A,ze,{25:19,30:275,155:276,18:277,22:278,156:279,162:280,163:281,28:o,46:Ke,48:Ke,90:Ke,119:Ke,167:Ke,168:Ke,170:Ke,173:Ke,174:Ke}),{13:l,16:d,60:282,312:h},e(b,[2,250]),e(a,[2,7]),e(J,H,{64:154,74:155,21:283,75:z}),e(W,[2,254]),{69:[1,284]},e(W,Y,{63:162,67:163,24:285,68:Z}),e(u,[2,232]),e(A,V,{152:146,47:286,151:287,48:[2,235]}),e(u,[2,92]),{48:[2,361],182:288,328:[1,289]},{13:l,16:d,34:We,60:294,184:290,188:291,193:292,195:Ye,312:h},e(Ze,[2,365],{188:291,193:292,60:294,186:296,187:297,184:298,13:l,16:d,34:We,195:Ye,312:h}),e(et,[2,363]),e(et,[2,364]),{13:l,16:d,34:ee,35:te,39:304,60:178,87:re,93:ne,98:179,185:302,197:300,225:299,226:ie,229:301,231:C,243:303,244:177,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},{13:l,16:d,34:We,60:294,184:305,188:291,193:292,195:Ye,312:h},e(tt,[2,137]),e(tt,[2,138]),e(tt,[2,139]),e(tt,[2,140]),e(tt,[2,141]),e(tt,[2,142]),e(tt,[2,143]),e(rt,[2,181],{297:[1,306],298:[1,307]}),e(rt,[2,184]),e(rt,[2,185]),e(rt,[2,186]),e(rt,[2,187]),e(rt,[2,188]),e(rt,[2,189]),e(nt,[2,190]),e(nt,[2,191]),e(nt,[2,192]),e(nt,[2,193]),e(rt,[2,194]),e(rt,[2,195]),e(rt,[2,196]),e(rt,[2,197]),e(rt,[2,198]),e(rt,[2,199]),e(W,Y,{63:162,67:163,24:308,68:Z}),e(R,[2,244]),e(ve,[2,246]),e(a,[2,19]),{34:[1,309]},{34:[1,310]},e([37,38,191,278],[2,144],{249:311,250:[1,312]}),{13:l,16:d,34:[1,314],60:315,232:313,312:h},{13:l,16:d,34:We,60:294,193:316,195:Ye,312:h},e(et,[2,416]),e(et,[2,417]),e(Oe,[2,146],{253:317,254:[1,318]}),e(L,D,{259:120,267:121,271:122,255:319,219:M,273:B,334:q}),{258:[1,320]},e(it,[2,434]),e(it,[2,435]),e(it,[2,436]),e(it,[2,437]),e(it,[2,438]),e(it,[2,439]),{258:[2,441]},e([37,38,191,250,254,258,278,295,335,336,337,338,339,340],[2,151],{261:321,262:322,263:323,265:324,273:[1,326],306:fe,307:ye,308:me,309:be,310:ge,311:_e,334:[1,325]}),e(Te,[2,155],{269:327,270:328,26:ot,331:st}),e(we,[2,157]),e(we,[2,160]),e(we,[2,161]),e(we,[2,162],{35:at,93:ut}),e(we,[2,163]),e(we,[2,164]),e(we,[2,165]),e(L,D,{247:116,251:118,255:119,259:120,267:121,271:122,36:333,219:M,273:B,334:q}),e(ct,[2,167]),{93:[1,334]},{35:[1,335]},{35:[1,336]},{35:[1,337]},{35:lt,93:dt,177:338},{35:[1,341]},{35:[1,343],93:[1,342]},{284:[1,344]},{35:[1,345]},{35:[1,346]},{35:[1,347]},e(pt,[2,456]),e(pt,[2,457]),e(pt,[2,458]),e(pt,[2,459]),e(pt,[2,460]),{284:[2,462]},e(we,[2,158]),e(we,[2,159]),{13:l,16:d,48:[1,348],60:350,87:re,97:349,98:351,99:352,100:ht,231:ft,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},{48:[1,355],93:[1,356]},{46:[1,357]},e(Xe,[2,272]),e(G,[2,50]),e(G,[2,284]),{119:[1,358]},e(G,[2,66]),e(b,U,{142:141,115:359,119:k,141:Q}),e($e,[2,65]),e(G,[2,53]),{48:[1,360],119:[1,362],146:361},e(Je,[2,329],{154:363,328:[1,364]}),{45:[1,365],134:366,135:yt},{45:[1,368],134:369,135:yt},e(mt,[2,259],{66:370,85:371,86:[1,372],88:[1,373]}),e(He,[2,258]),{69:[1,374]},e(J,[2,30],{274:231,280:236,283:239,82:271,72:272,73:273,60:274,84:375,13:l,16:d,35:xe,275:Ee,276:Ae,277:Re,279:Ne,281:Pe,282:Ie,284:Le,285:De,288:Me,290:Ce,312:h,340:Be,341:qe,342:Fe,343:Ue,344:ke,345:Qe}),e(bt,[2,263]),e(gt,[2,85]),e(gt,[2,86]),e(gt,[2,87]),{35:at,93:ut},{48:[1,376]},{48:[1,377]},{20:378,45:S,46:x,61:98},{20:379,45:S,46:x,61:98},e(_t,[2,333],{157:380}),e(_t,[2,332]),{13:l,16:d,34:ee,35:vt,39:385,60:178,87:re,93:ne,98:179,164:381,201:382,203:383,226:Ot,231:C,243:384,244:177,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},e(R,[2,20]),e(mt,[2,22]),{13:l,16:d,34:jt,35:Tt,60:274,70:388,71:389,72:390,73:391,274:231,275:Ee,276:Ae,277:Re,279:Ne,280:236,281:Pe,282:Ie,283:239,284:Le,285:De,288:Me,290:Ce,312:h,340:Be,341:qe,342:Fe,343:Ue,344:ke,345:Qe},e(a,[2,16]),{48:[1,394]},{48:[2,236]},{48:[2,93]},e(A,[2,360],{48:[2,362]}),e(Ze,[2,94]),e(wt,[2,367],{189:395}),e(A,[2,371],{194:396,196:397}),e(A,[2,100]),e(A,[2,101]),e(A,[2,102]),e(Ze,[2,95]),e(Ze,[2,96]),e(Ze,[2,366]),{13:l,16:d,34:ee,35:te,38:[1,398],39:304,60:178,87:re,93:ne,98:179,185:302,197:399,226:ie,229:301,231:C,243:303,244:177,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},e(St,[2,402]),e(xt,[2,129]),e(xt,[2,130]),e(xt,[2,406]),e(xt,[2,407]),{227:[1,400]},e(rt,[2,182]),{13:l,16:d,60:401,312:h},e(a,[2,18]),{38:[1,402]},{38:[1,403]},e(Oe,[2,431]),e(L,D,{251:118,255:119,259:120,267:121,271:122,247:404,219:M,273:B,334:q}),{46:[1,405]},{46:[2,410]},{46:[2,411]},{13:l,16:d,34:ee,39:407,60:178,87:re,93:ne,98:179,231:C,237:406,243:408,244:177,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},e(je,[2,433]),e(L,D,{255:119,259:120,267:121,271:122,251:409,219:M,273:B,334:q}),e(je,[2,149]),{35:lt,93:dt,177:410},e(Te,[2,443]),e(L,D,{267:121,271:122,259:411,219:M,273:B,334:q}),e(we,[2,446],{264:412}),e(we,[2,448],{266:413}),e(it,[2,444]),e(it,[2,445]),e(we,[2,451]),e(L,D,{271:122,267:414,219:M,273:B,334:q}),e(it,[2,452]),e(it,[2,453]),e(ct,[2,88]),e(it,[2,351],{175:415,316:[1,416]}),{38:[1,417]},e(ct,[2,168]),e(L,D,{247:116,251:118,255:119,259:120,267:121,271:122,36:418,219:M,273:B,334:q}),e(L,D,{247:116,251:118,255:119,259:120,267:121,271:122,36:419,219:M,273:B,334:q}),e(L,D,{247:116,251:118,255:119,259:120,267:121,271:122,36:420,219:M,273:B,334:q}),e(ct,[2,172]),e(ct,[2,90]),e(it,[2,355],{178:421}),{34:[1,422]},e(ct,[2,174]),e(L,D,{247:116,251:118,255:119,259:120,267:121,271:122,36:423,219:M,273:B,334:q}),{46:K,62:424},e(Et,[2,463],{286:425,316:[1,426]}),e(it,[2,467],{289:427,316:[1,428]}),e(it,[2,469],{291:429,316:[1,430]}),e(F,[2,41]),e(Ge,[2,268]),e(At,[2,44]),e(At,[2,45]),e(At,[2,46]),e(At,[2,47]),{13:l,16:d,60:178,87:re,93:ne,98:179,99:433,119:[1,431],231:ft,241:432,244:434,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},e(F,[2,42]),e(Ve,[2,270]),e(Rt,[2,273],{96:435}),{13:l,16:d,60:436,312:h},e(G,[2,52]),e([6,45,132,133,135,191],[2,68]),e(Je,[2,318]),{13:l,16:d,34:[1,438],60:439,147:437,312:h},e(Je,[2,70]),e(A,[2,328],{48:Nt,119:Nt}),{46:K,62:440},e($,[2,301]),e(b,[2,308],{136:441,320:[1,442]}),{46:K,62:443},e($,[2,307]),e(mt,[2,23]),e(mt,[2,260]),{87:[1,444]},{87:[1,445]},{13:l,16:d,34:Pt,35:xe,60:274,72:272,73:273,79:446,80:447,81:It,82:271,83:Lt,84:450,274:231,275:Ee,276:Ae,277:Re,279:Ne,280:236,281:Pe,282:Ie,283:239,284:Le,285:De,288:Me,290:Ce,312:h,340:Be,341:qe,342:Fe,343:Ue,344:ke,345:Qe},e(bt,[2,264]),e(Dt,[2,71]),e(Dt,[2,72]),e(J,H,{64:154,74:155,21:452,75:z}),e(W,Y,{63:162,67:163,24:453,68:Z}),{46:[2,343],48:[2,73],89:463,90:s,119:[1,459],158:454,159:455,166:456,167:[1,457],168:[1,458],170:[1,460],173:[1,461],174:[1,462]},e(_t,[2,341],{165:464,328:[1,465]}),e(Mt,Ct,{202:466,205:467,210:468,211:470,34:Bt}),e(qt,[2,377],{205:467,210:468,211:470,204:471,202:472,13:Ct,16:Ct,35:Ct,195:Ct,219:Ct,224:Ct,312:Ct,34:Bt}),e(Ft,[2,375]),e(Ft,[2,376]),{13:l,16:d,34:ee,35:vt,39:478,60:178,87:re,93:ne,98:179,200:474,203:476,226:Ot,228:473,230:475,231:C,243:477,244:177,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},e(Mt,Ct,{205:467,210:468,211:470,202:479,34:Bt}),e(W,[2,24],{274:231,280:236,283:239,60:274,72:390,73:391,71:480,13:l,16:d,34:jt,35:Tt,275:Ee,276:Ae,277:Re,279:Ne,281:Pe,282:Ie,284:Le,285:De,288:Me,290:Ce,312:h,340:Be,341:qe,342:Fe,343:Ue,344:ke,345:Qe}),e(Ut,[2,261]),e(Ut,[2,25]),e(Ut,[2,26]),e(L,D,{247:116,251:118,255:119,259:120,267:121,271:122,36:481,219:M,273:B,334:q}),e(Ut,[2,29]),e(W,Y,{63:162,67:163,24:482,68:Z}),e([48,119,227,328],[2,97],{190:483,191:[1,484]}),e(wt,[2,99]),{13:l,16:d,34:ee,35:te,39:304,60:178,87:re,93:ne,98:179,185:302,197:485,226:ie,229:301,231:C,243:303,244:177,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},e(kt,[2,125]),e(St,[2,403]),e(kt,[2,126]),e(rt,[2,183]),e(I,[2,14]),e(I,[2,15]),e(Oe,[2,145]),{13:l,16:d,34:ee,39:487,60:178,87:re,93:ne,98:179,231:C,233:486,243:488,244:177,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},{235:[1,489]},{235:[2,418]},{235:[2,419]},e(je,[2,147]),e(je,[2,150]),e(Te,[2,152]),e(Te,[2,153],{270:328,269:490,26:ot,331:st}),e(Te,[2,154],{270:328,269:491,26:ot,331:st}),e(we,[2,156]),e(it,[2,353],{176:492}),e(it,[2,352]),e([6,13,16,26,34,35,37,38,46,48,78,81,83,86,87,88,90,93,119,167,168,170,173,174,191,226,231,245,246,250,254,258,273,275,276,277,278,279,281,282,284,285,288,290,295,299,300,301,302,303,304,305,306,307,308,309,310,311,312,328,331,334,335,336,337,338,339,340,341,342,343,344,345],[2,166]),{38:[1,493]},{278:[1,494]},{278:[1,495]},e(L,D,{247:116,251:118,255:119,259:120,267:121,271:122,36:496,219:M,273:B,334:q}),{38:[1,497]},{38:[1,498]},e(ct,[2,176]),e(L,D,{247:116,251:118,255:119,259:120,267:121,271:122,287:499,36:501,26:[1,500],219:M,273:B,334:q}),e(Et,[2,464]),e(L,D,{247:116,251:118,255:119,259:120,267:121,271:122,36:502,219:M,273:B,334:q}),e(it,[2,468]),e(L,D,{247:116,251:118,255:119,259:120,267:121,271:122,36:503,219:M,273:B,334:q}),e(it,[2,470]),{13:l,16:d,34:[1,505],60:506,238:504,312:h},{13:l,16:d,34:We,60:294,193:507,195:Ye,312:h},e(et,[2,426]),e(et,[2,427]),{35:[1,510],48:[1,508],101:509},e(G,[2,63]),{46:[1,511]},{46:[2,319]},{46:[2,320]},e(G,[2,57]),{13:l,16:d,60:512,312:h},e(b,[2,309]),e(G,[2,58]),e(mt,[2,36],{88:[1,513]}),e(mt,[2,37],{86:[1,514]}),e(He,[2,31],{274:231,280:236,283:239,82:271,72:272,73:273,60:274,84:450,80:515,13:l,16:d,34:Pt,35:xe,81:It,83:Lt,275:Ee,276:Ae,277:Re,279:Ne,281:Pe,282:Ie,284:Le,285:De,288:Me,290:Ce,312:h,340:Be,341:qe,342:Fe,343:Ue,344:ke,345:Qe}),e(Qt,[2,265]),{35:xe,82:516},{35:xe,82:517},e(Qt,[2,34]),e(Qt,[2,35]),{31:518,48:[2,227],89:519,90:s},{32:520,48:[2,229],89:521,90:s},e(_t,[2,334]),e(Gt,[2,335],{160:522,328:[1,523]}),{46:K,62:524},{46:K,62:525},{46:K,62:526},{13:l,16:d,34:[1,528],60:529,169:527,312:h},e(Vt,[2,347],{171:530,321:[1,531]}),{13:l,16:d,35:xe,60:274,72:272,73:273,82:271,84:532,274:231,275:Ee,276:Ae,277:Re,279:Ne,280:236,281:Pe,282:Ie,283:239,284:Le,285:De,288:Me,290:Ce,312:h,340:Be,341:qe,342:Fe,343:Ue,344:ke,345:Qe},{35:[1,533]},e(Xt,[2,84]),e(_t,[2,75]),e(A,[2,340],{46:$t,48:$t,90:$t,119:$t,167:$t,168:$t,170:$t,173:$t,174:$t}),e(qt,[2,105]),e(A,[2,381],{206:534}),e(A,[2,379]),e(A,[2,380]),e(Mt,[2,389],{212:535,213:536}),e(qt,[2,106]),e(qt,[2,378]),{13:l,16:d,34:ee,35:vt,38:[1,537],39:478,60:178,87:re,93:ne,98:179,200:538,203:476,226:Ot,230:475,231:C,243:477,244:177,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},e(St,[2,404]),e(Jt,[2,131]),e(Jt,[2,132]),e(Jt,[2,408]),e(Jt,[2,409]),{227:[1,539]},e(Ut,[2,262]),{37:[1,541],38:[1,540]},e(a,[2,17]),e(wt,[2,368]),e(wt,[2,369],{193:292,60:294,192:542,188:543,13:l,16:d,34:We,195:Ye,312:h}),e(wt,[2,103],{278:[1,544]}),{13:l,16:d,34:We,60:294,193:545,195:Ye,312:h},e(et,[2,412]),e(et,[2,413]),e(Ht,[2,134]),e(we,[2,447]),e(we,[2,449]),e(L,D,{247:116,251:118,255:119,259:120,267:121,271:122,36:546,219:M,273:B,334:q}),e(ct,[2,169]),e(L,D,{247:116,251:118,255:119,259:120,267:121,271:122,36:547,219:M,273:B,334:q}),e(L,D,{247:116,251:118,255:119,259:120,267:121,271:122,36:548,219:M,273:B,334:q}),{38:[1,549],278:[1,550]},e(ct,[2,173]),e(ct,[2,175]),{38:[1,551]},{38:[2,465]},{38:[2,466]},{38:[1,552]},{38:[2,471],191:[1,555],292:553,293:554},{46:[1,556]},{46:[2,420]},{46:[2,421]},{13:l,16:d,60:178,87:re,93:ne,98:179,99:558,231:ft,242:557,244:559,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},e(F,[2,43]),e(Rt,[2,274]),{13:l,16:d,60:350,87:re,97:561,98:351,99:352,100:ht,102:560,231:ft,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},e(A,V,{152:146,148:562,151:563,48:[2,321]}),e($,[2,61]),{87:[1,564]},{87:[1,565]},e(Qt,[2,266]),e(Qt,[2,32]),e(Qt,[2,33]),{48:[2,11]},{48:[2,228]},{48:[2,12]},{48:[2,230]},e(A,ze,{163:281,161:566,162:567,46:zt,48:zt,90:zt,119:zt,167:zt,168:zt,170:zt,173:zt,174:zt}),e(Gt,[2,336]),e(Xt,[2,76],{329:[1,568]}),e(Xt,[2,77]),e(Xt,[2,78]),{46:K,62:569},{46:[2,345]},{46:[2,346]},{13:l,16:d,34:[1,571],60:572,172:570,312:h},e(Vt,[2,348]),e(Xt,[2,81]),e(L,D,{247:116,251:118,255:119,259:120,267:121,271:122,36:573,39:574,219:M,231:C,273:B,334:q}),{13:l,16:d,34:ee,35:vt,39:478,60:178,87:re,93:ne,98:179,200:575,203:476,226:Ot,230:475,231:C,243:477,244:177,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},e(St,[2,110],{330:[1,576]}),e(Kt,[2,396],{214:577,218:578,224:[1,579]}),e(Wt,[2,127]),e(St,[2,405]),e(Wt,[2,128]),e(Ut,[2,27]),{34:[1,580]},e(wt,[2,98]),e(wt,[2,370]),e(A,[2,372]),{13:l,16:d,34:ee,39:582,60:178,87:re,93:ne,98:179,231:C,234:581,243:583,244:177,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},{38:[1,584],278:[1,585]},{38:[1,586]},{278:[1,587]},e(ct,[2,91]),e(it,[2,356]),e(ct,[2,177]),e(ct,[2,178]),{38:[1,588]},{38:[2,472]},{294:[1,589]},{13:l,16:d,60:178,87:re,93:ne,98:179,99:591,231:ft,239:590,244:592,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},{235:[1,593]},{235:[2,428]},{235:[2,429]},{13:l,16:d,38:[1,594],60:350,87:re,97:595,98:351,99:352,100:ht,231:ft,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},e(Yt,[2,275]),{48:[1,596]},{48:[2,322]},e(mt,[2,38]),e(mt,[2,39]),e(_t,[2,74]),e(_t,[2,338]),{46:[2,344]},e(Xt,[2,79]),{46:K,62:597},{46:[2,349]},{46:[2,350]},{37:[1,598]},{37:[1,599]},e(Zt,[2,383],{207:600,278:[1,601]}),e(Mt,[2,388]),e([13,16,34,35,38,87,93,226,231,245,246,299,300,301,302,303,304,305,306,307,308,309,310,311,312,330],[2,111],{331:[1,602]}),{13:l,16:d,35:[1,608],60:605,195:[1,606],215:603,216:604,219:[1,607],312:h},e(Kt,[2,397]),{38:[1,609]},{48:[1,610]},{48:[2,414]},{48:[2,415]},e(ct,[2,89]),e(it,[2,354]),e(ct,[2,170]),e(L,D,{247:116,251:118,255:119,259:120,267:121,271:122,36:611,219:M,273:B,334:q}),e(ct,[2,179]),{295:[1,612]},{13:l,16:d,34:We,60:294,193:613,195:Ye,312:h},e(et,[2,422]),e(et,[2,423]),e(er,[2,136]),e(Rt,[2,48]),e(Yt,[2,276]),e(tr,[2,323],{149:614,328:[1,615]}),e(Xt,[2,80]),{34:[1,616]},{34:[1,617]},e([46,48,90,119,167,168,170,173,174,227,328],[2,107],{208:618,191:[1,619]}),e(A,[2,382]),e(Mt,[2,390]),e(rr,[2,113]),e(rr,[2,394],{217:620,332:621,26:[1,623],333:[1,622],334:[1,624]}),e(nr,[2,114]),e(nr,[2,115]),{13:l,16:d,35:[1,628],60:629,93:[1,627],195:ir,220:625,221:626,224:or,312:h},e(Mt,Ct,{211:470,210:632}),e(Ut,[2,28]),{235:[1,633]},{38:[1,634]},{296:635,302:le,303:de,304:pe,305:he},{13:l,16:d,60:178,87:re,93:ne,98:179,99:637,231:ft,240:636,244:638,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},e(A,V,{152:146,150:639,151:640,48:sr,119:sr}),e(tr,[2,324]),{38:[1,641]},{38:[1,642]},e(Zt,[2,384]),e(Zt,[2,108],{211:470,209:643,210:644,13:Ct,16:Ct,35:Ct,195:Ct,219:Ct,224:Ct,312:Ct,34:[1,645]}),e(rr,[2,112]),e(rr,[2,395]),e(rr,[2,391]),e(rr,[2,392]),e(rr,[2,393]),e(nr,[2,116]),e(nr,[2,118]),e(nr,[2,119]),e(ar,[2,398],{222:646}),e(nr,[2,121]),e(nr,[2,122]),{13:l,16:d,60:647,195:[1,648],312:h},{38:[1,649]},e(Ht,[2,133]),e(ct,[2,171]),{38:[2,180]},{48:[1,650]},{48:[2,424]},{48:[2,425]},e(Je,[2,69]),e(Je,[2,326]),e(Xt,[2,82]),e(Xt,[2,83]),e(A,[2,373],{198:651,199:652}),e(A,[2,385]),e(A,[2,386]),{13:l,16:d,38:[2,400],60:629,195:ir,221:654,223:653,224:or,312:h},e(nr,[2,123]),e(nr,[2,124]),e(nr,[2,117]),{235:[1,655]},e(Zt,[2,109]),{13:l,16:d,34:ee,35:vt,39:478,60:178,87:re,93:ne,98:179,200:656,203:476,226:Ot,230:475,231:C,243:477,244:177,245:oe,246:se,263:187,265:188,296:183,299:ae,300:ue,301:ce,302:le,303:de,304:pe,305:he,306:fe,307:ye,308:me,309:be,310:ge,311:_e,312:h},{38:[1,657]},{38:[2,401],330:[1,658]},e(er,[2,135]),e(Zt,[2,104],{278:[1,659]}),e(nr,[2,120]),e(ar,[2,399]),e(A,[2,374])],defaultActions:{5:[2,205],6:[2,206],8:[2,204],26:[2,1],27:[2,3],28:[2,216],77:[2,49],86:[2,295],100:[2,252],107:[2,358],220:[2,441],248:[2,462],287:[2,236],288:[2,93],314:[2,410],315:[2,411],407:[2,418],408:[2,419],438:[2,319],439:[2,320],500:[2,465],501:[2,466],505:[2,420],506:[2,421],518:[2,11],519:[2,228],520:[2,12],521:[2,230],528:[2,345],529:[2,346],554:[2,472],558:[2,428],559:[2,429],563:[2,322],568:[2,344],571:[2,349],572:[2,350],582:[2,414],583:[2,415],635:[2,180],637:[2,424],638:[2,425]},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=[],o=this.table,s="",a=0,u=0,c=0,l=2,d=1,p=i.slice.call(arguments,1),h=Object.create(this.lexer),f={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(f.yy[y]=this.yy[y]);h.setInput(e,f.yy),f.yy.lexer=h,f.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var m=h.yylloc;i.push(m);var b=h.options&&h.options.ranges;"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,_,v,O,j,T,w,S,x,E=function(){var e;return"number"!=typeof(e=h.lex()||d)&&(e=t.symbols_[e]||e),e},A={};;){if(v=r[r.length-1],this.defaultActions[v]?O=this.defaultActions[v]:(null==g&&(g=E()),O=o[v]&&o[v][g]),void 0===O||!O.length||!O[0]){var R="";for(T in x=[],o[v])this.terminals_[T]&&T>l&&x.push("'"+this.terminals_[T]+"'");R=h.showPosition?"Parse error on line "+(a+1)+":\n"+h.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(a+1)+": Unexpected "+(g==d?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(R,{text:h.match,token:this.terminals_[g]||g,line:h.yylineno,loc:m,expected:x})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+g);switch(O[0]){case 1:r.push(g),n.push(h.yytext),i.push(h.yylloc),r.push(O[1]),g=null,_?(g=_,_=null):(u=h.yyleng,s=h.yytext,a=h.yylineno,m=h.yylloc,c>0&&c--);break;case 2:if(w=this.productions_[O[1]][1],A.$=n[n.length-w],A._$={first_line:i[i.length-(w||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(w||1)].first_column,last_column:i[i.length-1].last_column},b&&(A._$.range=[i[i.length-(w||1)].range[0],i[i.length-1].range[1]]),void 0!==(j=this.performAction.apply(A,[s,u,a,f.yy,O[1],n,i].concat(p))))return j;w&&(r=r.slice(0,-1*w*2),n=n.slice(0,-1*w),i=i.slice(0,-1*w)),r.push(this.productions_[O[1]][0]),n.push(A.$),i.push(A._$),S=o[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0}},cr=r("../node_modules/sparqljs/lib/Wildcard.js").R,lr="http://www.w3.org/1999/02/22-rdf-syntax-ns#",dr=lr+"type",pr=lr+"first",hr=lr+"rest",fr=lr+"nil",yr="http://www.w3.org/2001/XMLSchema#",mr=yr+"integer",br=yr+"decimal",gr=yr+"double",_r=yr+"boolean",vr="",Or="",jr="";function Tr(e){return e.toLowerCase()}function wr(e,t){return e.push(t),e}function Sr(e,t){return e.push.apply(e,t),e}function xr(e){e||(e={});for(var t,r=1,n=arguments.length;r<n&&(t=arguments[r]||{});r++)for(var i in t)e[i]=t[i];return e}function Er(){for(var e=[],t=0,r=arguments.length;t<r;t++)e=e.concat.apply(e,arguments[t]);return e}function Ar(e){if("<"===e[0]&&(e=e.substring(1,e.length-1)),/^[a-z]+:/i.test(e))return e;if(!nn.base)throw new Error("Cannot resolve relative IRI "+e+" because no base IRI was set.");switch(vr!==nn.base&&(vr=nn.base,Or=vr.replace(/[^\/:]*$/,""),jr=vr.match(/^(?:[a-z]+:\/*)?[^\/]*/)[0]),e[0]){case void 0:return vr;case"#":return vr+e;case"?":return vr.replace(/(?:\?.*)?$/,e);case"/":return jr+e;default:return Or+e}}function Rr(e){if(e){var t=e[0];if("?"===t||"$"===t)return nn.factory.variable(e.substr(1))}return e}function Nr(e,t){return{type:"operation",operator:e,args:t||[]}}function Pr(e,t){var r={expression:"*"===e?new cr:e};if(t)for(var n in t)r[n]=t[n];return r}function Ir(e,t){return{type:"path",pathType:e,items:t}}function Lr(e,t){for(var r,n=0,i=t.length;n<i&&(r=t[n]);n++)e=Nr(r[0],[e,r[1]]);return e}function Dr(e,t){var r,n=[],i=[],o=e.length,s={};if(!o)return null;for(var a=0;a<o&&(r=e[a]);a++)(r.named?i:n).push(r.iri);return s[t||"from"]={default:n,named:i},s}function Mr(e){return parseInt(e,10)}function Cr(e){return"group"===e.type&&1===e.patterns.length?e.patterns[0]:e}function Br(e,t){return t&&"NamedNode"!==t.termType&&(t=nn.factory.namedNode(t)),nn.factory.literal(e,t)}function qr(e,t,r){var n={};return null!=e&&(n.subject=e),null!=t&&(n.predicate=t),null!=r&&(n.object=r),n}function Fr(e){return"string"==typeof e?e.startsWith("e_")?nn.factory.blankNode(e):nn.factory.blankNode("e_"+e):nn.factory.blankNode("g_"+Ur++)}var Ur=0;nn._resetBlanks=function(){Ur=0};var kr=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\(.)/g,Qr={"\\":"\\","'":"'",'"':'"',t:"\t",b:"\b",n:"\n",r:"\r",f:"\f"},Gr=/[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/,Vr=String.fromCharCode;function Xr(e,t){e=e.substring(t,e.length-t);try{e=e.replace(kr,(function(e,t,r,n){var i;if(t){if(i=parseInt(t,16),isNaN(i))throw new Error;return Vr(i)}if(r){if(i=parseInt(r,16),isNaN(i))throw new Error;return i<65535?Vr(i):Vr(55296+((i-=65536)>>10),56320+(1023&i))}var o=Qr[n];if(!o)throw new Error;return o}))}catch(e){return""}if(Gr.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){n.push(qr(null,e,t.entity)),Sr(i,t.triples)})),Er(n,r||[],i)}function Jr(e){return e.variable?e.variable.value:e.value||e.expression.value}function Hr(e){if(!e)return[];if("aggregate"===e.type)return[e];if("operation"===e.type){const t=[];for(const r of e.args)t.push(...Hr(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 Wr(e){return"Variable"===e.termType}function Yr(e){if(e.triples){const t=[];for(const r of e.triples)Wr(r.subject)&&t.push(r.subject.value),Wr(r.predicate)&&t.push(r.predicate.value),Wr(r.object)&&t.push(r.object.value);return t}if(e.patterns){const t=[];for(const r of e.patterns)t.push(...Yr(r));return t}return[]}function Zr(e){if(!nn.sparqlStar)throw new Error("SPARQL* support is not enabled");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 o in i)this[o]=i[o];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(),o=0;o<i.length;o++)if((r=this._input.match(this.rules[i[o]]))&&(!t||r[0].length>t[0].length)){if(t=r,n=o,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[o])))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 28;case 4:return 316;case 5:return 317;case 6:return 35;case 7:return 37;case 8:return 38;case 9:return 26;case 10:return 41;case 11:return 45;case 12:return 46;case 13:return 48;case 14:return 50;case 15:return 55;case 16:return 58;case 17:return 320;case 18:return 68;case 19:return 69;case 20:return 75;case 21:return 78;case 22:return 81;case 23:return 83;case 24:return 86;case 25:return 88;case 26:return 90;case 27:return 191;case 28:return 107;case 29:return 321;case 30:return 140;case 31:return 322;case 32:return 323;case 33:return 117;case 34:return 324;case 35:return 116;case 36:return 325;case 37:return 326;case 38:return 120;case 39:return 122;case 40:return 123;case 41:return 138;case 42:return 132;case 43:return 133;case 44:return 135;case 45:return 141;case 46:return 119;case 47:return 327;case 48:return 328;case 49:return 167;case 50:return 170;case 51:return 174;case 52:return 100;case 53:return 168;case 54:return 329;case 55:return 173;case 56:return 231;case 57:return 235;case 58:return 278;case 59:return 195;case 60:return 330;case 61:return 331;case 62:return 224;case 63:return 333;case 64:return 334;case 65:return 219;case 66:return 226;case 67:return 227;case 68:return 250;case 69:return 254;case 70:return 295;case 71:return 335;case 72:return 336;case 73:return 337;case 74:return 338;case 75:return 339;case 76:return 258;case 77:return 340;case 78:return 273;case 79:return 281;case 80:return 282;case 81:return 275;case 82:return 276;case 83:return 277;case 84:return 341;case 85:return 342;case 86:return 279;case 87:return 344;case 88:return 343;case 89:return 345;case 90:return 284;case 91:return 285;case 92:return 288;case 93:return 290;case 94:return 294;case 95:return 298;case 96:return 301;case 97:return 13;case 98:return 16;case 99:return 312;case 100:return 245;case 101:return 34;case 102:return 297;case 103:return 87;case 104:return 299;case 105:return 300;case 106:return 306;case 107:return 307;case 108:return 308;case 109:return 309;case 110:return 310;case 111:return 311;case 112:return"EXPONENT";case 113:return 302;case 114:return 303;case 115:return 304;case 116:return 305;case 117:return 93;case 118:return 246;case 119:return 6;case 120:return"INVALID";case 121: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,/^(?: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,/^(?:(LANGMATCHES|CONTAINS|STRSTARTS|STRENDS|STRBEFORE|STRAFTER|STRLANG|STRDT|sameTerm))/i,/^(?:CONCAT)/i,/^(?:COALESCE)/i,/^(?:IF)/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],inclusive:!0}}};function nn(){this.yy={}}return ur.lexer=rn,nn.prototype=ur,ur.Parser=nn,new nn}();t.parser=n,t.Parser=n.Parser,t.parse=function(){return n.parse.apply(n,arguments)},t.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),process.exit(1));var n=r("?75e2").readFileSync(r("?ebbd").normalize(e[1]),"utf8");return t.parser.parse(n)},r.c[r.s]===e&&t.main(process.argv.slice(1))},"../node_modules/sparqljs/lib/Wildcard.js":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.R=t},"../node_modules/sparqljs/sparql.js":(e,t,r)=>{var n=r("../node_modules/sparqljs/lib/SparqlParser.js").Parser,i=r("../node_modules/sparqljs/lib/SparqlGenerator.js"),o=r("../node_modules/sparqljs/lib/Wildcard.js").R,{DataFactory:s}=r("../node_modules/rdf-data-factory/index.js");e.exports={Parser:function({prefixes:e,baseIRI:t,factory:r,sparqlStar:i,skipValidation:o,skipUngroupedVariableCheck:a}={}){var u={};for(var c in e||{})u[c]=e[c];var l=new n;return l.parse=function(){return n.base=t||"",n.prefixes=Object.create(u),n.factory=r||new s,n.sparqlStar=Boolean(i),n.skipValidation=Boolean(o)||Boolean(a),n.prototype.parse.apply(l,arguments)},l._resetBlanks=n._resetBlanks,l},Generator:i,Wildcard:o}},"../node_modules/stream-to-string/index.js":(e,t,r)=>{var n=r("./require-empty.js");e.exports=function(e,t,r){"function"==typeof t&&(r=t,t=null),r=r||function(){};var i="";return new n((function(n,o){e.on("data",(function(e){i+="string"==typeof t?e.toString(t):e.toString()})),e.on("end",(function(){n(i),r(null,i)})),e.on("error",(function(e){o(e),r(e)}))}))}},"../node_modules/typed-immutable-map/dist/HashMap/empty.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=void 0;const n={node:r("../node_modules/typed-immutable-map/dist/nodes/index.js").EMPTY,size:0};t.empty=function(){return n}},"../node_modules/typed-immutable-map/dist/HashMap/entries.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.entries=void 0;const n=r("../node_modules/typed-immutable-map/dist/HashMap/primitives/index.js");function i(e){return[e.key,e.value]}t.entries=function(e){return(0,n.iterator)((0,n.getNode)(e),i)}},"../node_modules/typed-immutable-map/dist/HashMap/filter.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filter=void 0;const n=r("../node_modules/typed-immutable-map/dist/HashMap/empty.js"),i=r("../node_modules/typed-immutable-map/dist/HashMap/reduce.js"),o=r("../node_modules/typed-immutable-map/dist/HashMap/set.js");t.filter=function(e,t){return(0,i.reduce)((function(t,r,n){return e(r,n)?(0,o.set)(n,r,t):t}),(0,n.empty)(),t)}},"../node_modules/typed-immutable-map/dist/HashMap/forEach.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forEach=void 0;const n=r("../node_modules/typed-immutable-map/dist/HashMap/reduce.js");t.forEach=function(e,t){return(0,n.reduce)(((t,r,n)=>e(r,n)),null,t),t}},"../node_modules/typed-immutable-map/dist/HashMap/from.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromObject=t.fromIterable=void 0;const n=r("../node_modules/typed-immutable-map/dist/HashMap/empty.js"),i=r("../node_modules/typed-immutable-map/dist/HashMap/set.js");t.fromIterable=function(e){let t=(0,n.empty)();for(const[r,n]of e)t=(0,i.set)(r,n,t);return t},t.fromObject=function(e){let t=(0,n.empty)();for(let r in e)e.hasOwnProperty(r)&&(t=(0,i.set)(r,e[r],t));return t}},"../node_modules/typed-immutable-map/dist/HashMap/get.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.get=void 0;const n=r("../node_modules/typed-immutable-map/dist/HashMap/primitives/index.js");t.get=function(e,t,r){const i=(0,n.findHash)(e);return(0,n.getHash)(void 0,i,e,t,r)}},"../node_modules/typed-immutable-map/dist/HashMap/has.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.has=void 0;const n=r("../node_modules/typed-immutable-map/dist/HashMap/primitives/index.js"),i=r("../node_modules/typed-immutable-map/dist/nodes/index.js");t.has=function(e,t,r){const o=(0,n.findHash)(e);return(0,n.getHash)(i.NOTHING,o,e,t,r)!==i.NOTHING}},"../node_modules/typed-immutable-map/dist/HashMap/keys.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keys=void 0;const n=r("../node_modules/typed-immutable-map/dist/HashMap/primitives/index.js");function i(e){return e.key}t.keys=function(e){return(0,n.iterator)((0,n.getNode)(e),i)}},"../node_modules/typed-immutable-map/dist/HashMap/map.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.map=void 0;const n=r("../node_modules/typed-immutable-map/dist/HashMap/empty.js"),i=r("../node_modules/typed-immutable-map/dist/HashMap/reduce.js"),o=r("../node_modules/typed-immutable-map/dist/HashMap/set.js");t.map=function(e,t){return(0,i.reduce)((function(t,r,n){return(0,o.set)(n,e(r,n),t)}),(0,n.empty)(),t)}},"../node_modules/typed-immutable-map/dist/HashMap/primitives/findHash.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findHash=void 0;const n=r("../node_modules/typed-immutable-map/dist/common/index.js");t.findHash=function(e){return"number"==typeof e?e:"string"==typeof e?(0,n.stringHash)(e):Math.abs((0,n.stringHash)(JSON.stringify(e)))}},"../node_modules/typed-immutable-map/dist/HashMap/primitives/fold.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fold=void 0;const n=r("../node_modules/typed-immutable-map/dist/HashMap/primitives/getNode.js");t.fold=function(e,t,r){const i=(0,n.getNode)(r);if(0===i.type)return t;if(1===i.type)return e(t,i.value,i.key);const o=[i.children];let s;for(;s=o.shift();)for(let r=0;r<s.length;++r){const n=s[r];n&&0!==n.type&&(1===n.type?t=e(t,n.value,n.key):o.push(n.children))}return t}},"../node_modules/typed-immutable-map/dist/HashMap/primitives/getHash.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHash=void 0;const n=r("../node_modules/typed-immutable-map/dist/common/index.js"),i=r("../node_modules/typed-immutable-map/dist/HashMap/primitives/getNode.js"),o=r("../node_modules/typed-immutable-map/dist/HashMap/primitives/keyEquals.js");t.getHash=function(e,t,r,s,a=o.defaultKeyEquals){let u=(0,i.getNode)(s),c=0;for(;;)switch(u.type){case 1:return a(r,u.key)?u.value:e;case 2:if(t===u.hash){const t=u.children;for(let e=0;e<t.length;++e){const n=t[e];if(a(r,n.key))return n.value}return e}case 3:{const r=(0,n.hashFragment)(c,t),i=(0,n.toBitmap)(r);if(u.mask&i){const e=(0,n.bitmapToIndex)(u.mask,i);u=u.children[e],c+=n.SIZE;break}return e}case 4:if(u=u.children[(0,n.hashFragment)(c,t)],u){c+=n.SIZE;break}return e;default:return e}}},"../node_modules/typed-immutable-map/dist/HashMap/primitives/getNode.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNode=void 0,t.getNode=function(e){return e.node}},"../node_modules/typed-immutable-map/dist/HashMap/primitives/getSize.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSize=void 0,t.getSize=function(e){return e.size}},"../node_modules/typed-immutable-map/dist/HashMap/primitives/index.js":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("../node_modules/typed-immutable-map/dist/HashMap/primitives/getHash.js"),t),i(r("../node_modules/typed-immutable-map/dist/HashMap/primitives/getNode.js"),t),i(r("../node_modules/typed-immutable-map/dist/HashMap/primitives/setTree.js"),t),i(r("../node_modules/typed-immutable-map/dist/HashMap/primitives/setKeyValue.js"),t),i(r("../node_modules/typed-immutable-map/dist/HashMap/primitives/findHash.js"),t),i(r("../node_modules/typed-immutable-map/dist/HashMap/primitives/iterateMap.js"),t),i(r("../node_modules/typed-immutable-map/dist/HashMap/primitives/fold.js"),t),i(r("../node_modules/typed-immutable-map/dist/HashMap/primitives/keyEquals.js"),t)},"../node_modules/typed-immutable-map/dist/HashMap/primitives/iterateMap.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=void 0,t.iterator=function(e,t){return new r(i(e,t,[]))};class r{_iterate;constructor(e){this._iterate=e}next(){if(!this._iterate)return{done:!0,value:null};const{value:e,rest:t}=this._iterate;return this._iterate=n(t),{done:!1,value:e}}[Symbol.iterator](){return this}}const n=e=>e&&o(e[0],e[1],e[2],e[3],e[4]);function i(e,t,r){switch(e.type){case 1:return{value:t(e),rest:r};case 2:case 4:case 3:const i=e.children;return o(i.length,i,0,t,r);default:return n(r)}}function o(e,t,r,o,s){for(;r<e;){const n=t[r++];if(n&&(a=n)&&0!==a.type)return i(n,o,[e,t,r,o,s])}var a;return n(s)}},"../node_modules/typed-immutable-map/dist/HashMap/primitives/keyEquals.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultKeyEquals=void 0,t.defaultKeyEquals=(e,t)=>e===t},"../node_modules/typed-immutable-map/dist/HashMap/primitives/setKeyValue.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setKeyValue=void 0;const n=r("../node_modules/typed-immutable-map/dist/nodes/index.js"),i=r("../node_modules/typed-immutable-map/dist/HashMap/primitives/findHash.js"),o=r("../node_modules/typed-immutable-map/dist/HashMap/primitives/getNode.js"),s=r("../node_modules/typed-immutable-map/dist/HashMap/primitives/getSize.js"),a=r("../node_modules/typed-immutable-map/dist/HashMap/primitives/setTree.js");t.setKeyValue=function(e,t,r){const u=(0,i.findHash)(e),c={value:(0,s.getSize)(r)},l=(0,n.modify)((0,o.getNode)(r),0,(d=t,()=>d),u,e,c);var d;return(0,a.setTree)(l,c.value,r)}},"../node_modules/typed-immutable-map/dist/HashMap/primitives/setTree.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setTree=void 0;const n=r("../node_modules/typed-immutable-map/dist/HashMap/primitives/getNode.js");t.setTree=function(e,t,r){return e===(0,n.getNode)(r)?r:{node:e,size:t}}},"../node_modules/typed-immutable-map/dist/HashMap/reduce.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduce=void 0;const n=r("../node_modules/typed-immutable-map/dist/HashMap/primitives/index.js");t.reduce=n.fold},"../node_modules/typed-immutable-map/dist/HashMap/remove.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.remove=void 0;const n=r("../node_modules/typed-immutable-map/dist/HashMap/primitives/index.js"),i=r("../node_modules/typed-immutable-map/dist/nodes/constants.js");t.remove=function(e,t){return(0,n.setKeyValue)(e,i.NOTHING,t)}},"../node_modules/typed-immutable-map/dist/HashMap/set.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.set=void 0;const n=r("../node_modules/typed-immutable-map/dist/HashMap/primitives/index.js");t.set=n.setKeyValue},"../node_modules/typed-immutable-map/dist/HashMap/size.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.size=void 0;const n=r("../node_modules/typed-immutable-map/dist/HashMap/primitives/getSize.js");t.size=function(e){return(0,n.getSize)(e)}},"../node_modules/typed-immutable-map/dist/HashMap/values.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.values=void 0;const n=r("../node_modules/typed-immutable-map/dist/HashMap/primitives/index.js");function i(e){return e.value}t.values=function(e){return(0,n.iterator)((0,n.getNode)(e),i)}},"../node_modules/typed-immutable-map/dist/common/array-operations.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insert=t.remove=t.replace=void 0,t.replace=function(e,t,r){const n=r.length,i=Array(n);for(let e=0;e<n;++e)i[e]=r[e];return i[e]=t,i},t.remove=function(e,t){const r=t.length;if(0===r||e>=r)return t;if(1===r)return[];const n=Array(r-1);let i=0;for(;i<e;++i)n[i]=t[i];for(i+=1;i<r;++i)n[i-1]=t[i];return n},t.insert=function(e,t,r){const n=r.length,i=Array(n+1);let o=0;for(;o<e;++o)i[o]=r[o];for(i[o++]=t;o<n+1;++o)i[o]=r[o-1];return i}},"../node_modules/typed-immutable-map/dist/common/bitwise-operations.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bitmapToIndex=t.toBitmap=t.hashFragment=t.hammingWeight=void 0;const n=r("../node_modules/typed-immutable-map/dist/common/constants.js");function i(e){return 16843009*((e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135)>>24}t.hammingWeight=i,t.hashFragment=function(e,t){return t>>>e&n.MASK},t.toBitmap=function(e){return 1<<e},t.bitmapToIndex=function(e,t){return i(e&t-1)}},"../node_modules/typed-immutable-map/dist/common/constants.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MIN_ARRAY_NODE=t.MAX_INDEX_NODE=t.MASK=t.BUCKET_SIZE=t.SIZE=void 0,t.SIZE=5,t.BUCKET_SIZE=Math.pow(2,t.SIZE),t.MASK=t.BUCKET_SIZE-1,t.MAX_INDEX_NODE=t.BUCKET_SIZE/2,t.MIN_ARRAY_NODE=t.BUCKET_SIZE/4},"../node_modules/typed-immutable-map/dist/common/index.js":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("../node_modules/typed-immutable-map/dist/common/array-operations.js"),t),i(r("../node_modules/typed-immutable-map/dist/common/bitwise-operations.js"),t),i(r("../node_modules/typed-immutable-map/dist/common/constants.js"),t),i(r("../node_modules/typed-immutable-map/dist/common/stringHash.js"),t)},"../node_modules/typed-immutable-map/dist/common/stringHash.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringHash=void 0,t.stringHash=function(e){let t=0;for(let r=0;r<e.length;++r)t=(t<<5)-t+e.charCodeAt(r)|0;return t}},"../node_modules/typed-immutable-map/dist/nodes/ArrayNode/ArrayNode.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.modifyListNode=void 0;const n=r("../node_modules/typed-immutable-map/dist/nodes/EmptyNode.js"),i=r("../node_modules/typed-immutable-map/dist/nodes/modify.js"),o=r("../node_modules/typed-immutable-map/dist/common/index.js"),s=r("../node_modules/typed-immutable-map/dist/nodes/ArrayNode/toIndexNode.js");function a(e){return e&&0===e.type}t.modifyListNode=function(e,t,r,u,c,l){const{size:d,children:p}=e,h=(0,o.hashFragment)(t,u),f=p[h],y=(0,i.modify)(f||(0,n.empty)(),t+o.SIZE,r,u,c,l);return f===y?e:a(f)&&!a(y)?{type:4,size:d+1,children:(0,o.replace)(h,y,p)}:!a(f)&&a(y)?d-1<=o.MIN_ARRAY_NODE?(0,s.toIndexNode)(d,h,p):{type:4,size:d-1,children:(0,o.replace)(h,(0,n.empty)(),p)}:{type:4,size:d,children:(0,o.replace)(h,y,p)}}},"../node_modules/typed-immutable-map/dist/nodes/ArrayNode/index.js":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("../node_modules/typed-immutable-map/dist/nodes/ArrayNode/ArrayNode.js"),t)},"../node_modules/typed-immutable-map/dist/nodes/ArrayNode/toIndexNode.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toIndexNode=void 0,t.toIndexNode=function(e,t,r){const n=new Array(e-1);let i=0,o=0;for(let e=0;e<r.length;++e)if(e!==t){const t=r[e];t&&t.type>0&&(n[i++]=t,o|=1<<e)}return{type:3,mask:o,children:n}}},"../node_modules/typed-immutable-map/dist/nodes/CollisionNode/CollisionNode.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.modifyCollisionNode=void 0;const n=r("../node_modules/typed-immutable-map/dist/nodes/constants.js"),i=r("../node_modules/typed-immutable-map/dist/nodes/LeafNode/index.js"),o=r("../node_modules/typed-immutable-map/dist/nodes/CollisionNode/newCollisionList.js");t.modifyCollisionNode=function(e,t,r,s,a,u){if(s===e.hash){const t=(0,o.newCollisionList)(e.hash,e.children,r,a,u);return t===e.children?e:t.length>1?{type:2,hash:e.hash,children:t}:t[0]}const c=r();return c===n.NOTHING?e:(++u.value,(0,i.combineLeafNodes)(t,e.hash,e,s,{type:1,hash:s,key:a,value:c}))}},"../node_modules/typed-immutable-map/dist/nodes/CollisionNode/index.js":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("../node_modules/typed-immutable-map/dist/nodes/CollisionNode/CollisionNode.js"),t)},"../node_modules/typed-immutable-map/dist/nodes/CollisionNode/newCollisionList.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.newCollisionList=void 0;const n=r("../node_modules/typed-immutable-map/dist/nodes/constants.js"),i=r("../node_modules/typed-immutable-map/dist/common/index.js");t.newCollisionList=function(e,t,r,o,s){const a=t.length;for(let u=0;u<a;++u){const a=t[u];if(a.key===o){const c=a.value,l=r(c);return l===c?t:l===n.NOTHING?(--s.value,(0,i.remove)(u,t)):(0,i.insert)(u,{type:1,hash:e,key:o,value:l},t)}}const u=r();return u===n.NOTHING?t:(++s.value,(0,i.insert)(a,{type:1,hash:e,key:o,value:u},t))}},"../node_modules/typed-immutable-map/dist/nodes/EmptyNode.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=t.EMPTY=t.modifyEmpty=void 0;const n=r("../node_modules/typed-immutable-map/dist/nodes/constants.js");t.modifyEmpty=function(e,t,r,i,o,s){const a=r(void 0);return a===n.NOTHING?e:(++s.value,{type:1,hash:i,key:o,value:a})},t.EMPTY={type:0},t.empty=function(){return t.EMPTY}},"../node_modules/typed-immutable-map/dist/nodes/IndexedNode/IndexedNode.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.modifyIndexedNode=void 0;const n=r("../node_modules/typed-immutable-map/dist/nodes/EmptyNode.js"),i=r("../node_modules/typed-immutable-map/dist/common/index.js"),o=r("../node_modules/typed-immutable-map/dist/nodes/modify.js"),s=r("../node_modules/typed-immutable-map/dist/nodes/IndexedNode/toArrayNode.js");t.modifyIndexedNode=function(e,t,r,a,u,c){const{mask:l,children:d}=e,p=(0,i.hashFragment)(t,a),h=(0,i.toBitmap)(p),f=(0,i.bitmapToIndex)(l,h),y=Boolean(l&h),m=y?d[f]:(0,n.empty)(),b=(0,o.modify)(m,t+i.SIZE,r,a,u,c);if(m===b)return e;if(y&&0===b.type){const e=l&~h;return e?d.length<=2&&function(e){const t=e.type;return 0===t||1===t||2===t}(d[1^f])?d[1^f]:{type:3,mask:e,children:(0,i.remove)(f,d)}:(0,n.empty)()}return y||0===b.type?{type:3,mask:l,children:(0,i.replace)(f,b,d)}:d.length>=i.MAX_INDEX_NODE?(0,s.toArrayNode)(p,b,l,d):{type:3,mask:l|h,children:(0,i.insert)(f,b,d)}}},"../node_modules/typed-immutable-map/dist/nodes/IndexedNode/index.js":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("../node_modules/typed-immutable-map/dist/nodes/IndexedNode/IndexedNode.js"),t)},"../node_modules/typed-immutable-map/dist/nodes/IndexedNode/toArrayNode.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toArrayNode=void 0,t.toArrayNode=function(e,t,r,n){const i=[];let o=r,s=0;for(let e=0;o;++e)1&o&&(i[e]=n[s++]),o>>>=1;return i[e]=t,{type:4,size:s+1,children:i}}},"../node_modules/typed-immutable-map/dist/nodes/LeafNode/LeafNode.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.modifyLeaf=void 0;const n=r("../node_modules/typed-immutable-map/dist/nodes/constants.js"),i=r("../node_modules/typed-immutable-map/dist/nodes/EmptyNode.js"),o=r("../node_modules/typed-immutable-map/dist/nodes/LeafNode/combineLeafNodes.js");t.modifyLeaf=function(e,t,r,s,a,u){if(a===e.key){const t=r(e.value);return t===e.value?e:t===n.NOTHING?(--u.value,(0,i.empty)()):{type:1,hash:s,key:a,value:t}}const c=r();return c===n.NOTHING?e:(++u.value,(0,o.combineLeafNodes)(t,e.hash,e,s,{type:1,hash:s,key:a,value:c}))}},"../node_modules/typed-immutable-map/dist/nodes/LeafNode/combineLeafNodes.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLeafNodes=void 0;const n=r("../node_modules/typed-immutable-map/dist/common/index.js");t.combineLeafNodes=function e(t,r,i,o,s){if(r===o)return{type:2,hash:r,children:[s,i]};const a=(0,n.hashFragment)(t,r),u=(0,n.hashFragment)(t,o);return{type:3,mask:(0,n.toBitmap)(a)|(0,n.toBitmap)(u),children:a===u?[e(t+n.SIZE,r,i,o,s)]:a<u?[i,s]:[s,i]}}},"../node_modules/typed-immutable-map/dist/nodes/LeafNode/index.js":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("../node_modules/typed-immutable-map/dist/nodes/LeafNode/LeafNode.js"),t),i(r("../node_modules/typed-immutable-map/dist/nodes/LeafNode/combineLeafNodes.js"),t)},"../node_modules/typed-immutable-map/dist/nodes/constants.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NOTHING=void 0,t.NOTHING=Object.create(null)},"../node_modules/typed-immutable-map/dist/nodes/index.js":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("../node_modules/typed-immutable-map/dist/nodes/types.js"),t),i(r("../node_modules/typed-immutable-map/dist/nodes/constants.js"),t),i(r("../node_modules/typed-immutable-map/dist/nodes/EmptyNode.js"),t),i(r("../node_modules/typed-immutable-map/dist/nodes/ArrayNode/index.js"),t),i(r("../node_modules/typed-immutable-map/dist/nodes/CollisionNode/index.js"),t),i(r("../node_modules/typed-immutable-map/dist/nodes/IndexedNode/index.js"),t),i(r("../node_modules/typed-immutable-map/dist/nodes/LeafNode/index.js"),t),i(r("../node_modules/typed-immutable-map/dist/nodes/modify.js"),t)},"../node_modules/typed-immutable-map/dist/nodes/modify.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.modify=void 0;const n=r("../node_modules/typed-immutable-map/dist/nodes/LeafNode/index.js"),i=r("../node_modules/typed-immutable-map/dist/nodes/EmptyNode.js"),o=r("../node_modules/typed-immutable-map/dist/nodes/ArrayNode/index.js"),s=r("../node_modules/typed-immutable-map/dist/nodes/IndexedNode/index.js"),a=r("../node_modules/typed-immutable-map/dist/nodes/CollisionNode/index.js");t.modify=function(e,t,r,u,c,l){switch(e.type){case 1:return(0,n.modifyLeaf)(e,t,r,u,c,l);case 0:return(0,i.modifyEmpty)(e,t,r,u,c,l);case 4:return(0,o.modifyListNode)(e,t,r,u,c,l);case 3:return(0,s.modifyIndexedNode)(e,t,r,u,c,l);case 2:return(0,a.modifyCollisionNode)(e,t,r,u,c,l);default:throw new Error("never")}}},"../node_modules/typed-immutable-map/dist/nodes/types.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"../node_modules/uuid-random/index.js":(e,t,r)=>{"use strict";!function(){var t,n,i,o=0,s=[];for(n=0;n<256;n++)s[n]=(n+256).toString(16).substr(1);function a(){var e=(16,(!t||o+16>u.BUFFER_SIZE)&&(o=0,t=u.randomBytes(u.BUFFER_SIZE)),t.slice(o,o+=16));return e[6]=15&e[6]|64,e[8]=63&e[8]|128,e}function u(){var e=a();return s[e[0]]+s[e[1]]+s[e[2]]+s[e[3]]+"-"+s[e[4]]+s[e[5]]+"-"+s[e[6]]+s[e[7]]+"-"+s[e[8]]+s[e[9]]+"-"+s[e[10]]+s[e[11]]+s[e[12]]+s[e[13]]+s[e[14]]+s[e[15]]}u.BUFFER_SIZE=4096,u.bin=a,u.clearBuffer=function(){t=null,o=0},u.test=function(e){return"string"==typeof e&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)},"undefined"!=typeof crypto?i=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(i=window.msCrypto),i=i||r("?699d"),e.exports=u,u.randomBytes=function(){if(i){if(i.randomBytes)return i.randomBytes;if(i.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(e){var t=new Uint8Array(e);return i.getRandomValues(t),Array.from(t)}:function(e){var t=new Uint8Array(e);return i.getRandomValues(t),t}}return function(e){var t,r=[];for(t=0;t<e;t++)r.push(Math.floor(256*Math.random()));return r}}()}()},"../node_modules/yallist/iterator.js":e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},"../node_modules/yallist/yallist.js":(e,t,r)=>{"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function s(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,o=this.head;null!==o&&n<e;n++)o=o.next;var s=[];for(n=0;o&&n<t;n++)s.push(o.value),o=this.removeNode(o);for(null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev),n=0;n<r.length;n++)o=i(this,o,r[n]);return s},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r("../node_modules/yallist/iterator.js")(n)}catch(e){}},"../packages/immutable/index.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Map=void 0;const n=r("../node_modules/typed-immutable-map/dist/HashMap/empty.js"),i=r("../node_modules/typed-immutable-map/dist/HashMap/from.js"),o=r("../packages/immutable/lib/Map.js");t.Map=function(e){return e?(t=e,Symbol.iterator in t?new o.Map((0,i.fromIterable)(e)):new o.Map((0,i.fromObject)(e))):new o.Map((0,n.empty)());var t}},"../packages/immutable/lib/Map.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Map=void 0;const n=r("../node_modules/typed-immutable-map/dist/HashMap/has.js"),i=r("../node_modules/typed-immutable-map/dist/HashMap/get.js"),o=r("../node_modules/typed-immutable-map/dist/HashMap/set.js"),s=r("../node_modules/typed-immutable-map/dist/HashMap/forEach.js"),a=r("../node_modules/typed-immutable-map/dist/HashMap/map.js"),u=r("../node_modules/typed-immutable-map/dist/HashMap/filter.js"),c=r("../node_modules/typed-immutable-map/dist/HashMap/remove.js"),l=r("../node_modules/typed-immutable-map/dist/HashMap/entries.js"),d=r("../node_modules/typed-immutable-map/dist/HashMap/values.js"),p=r("../node_modules/typed-immutable-map/dist/HashMap/keys.js"),h=r("../node_modules/typed-immutable-map/dist/HashMap/size.js");class f{hashmap;constructor(e){this.hashmap=e}get size(){return(0,h.size)(this.hashmap)}set(e,t){return new f((0,o.set)(e,t,this.hashmap))}delete(e){return new f((0,c.remove)(e,this.hashmap))}get(e){return(0,i.get)(e,this.hashmap)}has(e){return(0,n.has)(e,this.hashmap)}forEach(e){(0,s.forEach)(e,this.hashmap)}map(e){return new f((0,a.map)(e,this.hashmap))}filter(e){return new f((0,u.filter)(e,this.hashmap))}toJS(){return Object.fromEntries(this)}toJSON(){return this.toJS()}keys(){return(0,p.keys)(this.hashmap)}values(){return(0,d.values)(this.hashmap)}entries(){return(0,l.entries)(this.hashmap)}[Symbol.iterator](){return this.entries()}}t.Map=f},"../packages/uuid/index.js":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.v4=void 0;const i=n(r("../node_modules/uuid-random/index.js"));t.v4=i.default},asynciterator:e=>{"use strict";e.exports=__webpack_require__(5505)},"?75e2":()=>{},"?ebbd":()=>{},"?699d":()=>{}},__cmncwpk_module_cache__={};function __cmncwpk_require__(e){var t=__cmncwpk_module_cache__[e];if(void 0!==t)return t.exports;var r=__cmncwpk_module_cache__[e]={id:e,loaded:!1,exports:{}};return __cmncwpk_modules__[e].call(r.exports,r,r.exports,__cmncwpk_require__),r.loaded=!0,r.exports}__cmncwpk_require__.c=__cmncwpk_module_cache__,__cmncwpk_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__cmncwpk_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __cmncwpk_exports__=__cmncwpk_require__(__cmncwpk_require__.s="./index.js");module.exports=__cmncwpk_exports__})()},4375:(e,t,r)=>{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)))},3527:e=>{e.exports="function"==typeof queueMicrotask?queueMicrotask:e=>Promise.resolve().then(e)},1640: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(7970),t),i(r(7498),t),i(r(6381),t),i(r(2808),t),i(r(2016),t),i(r(3387),t),i(r(1573),t)},7970:(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}}},7498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataFactory=void 0;const n=r(7970),i=r(6381),o=r(2808),s=r(2016),a=r(3387),u=r(1573);let c=0;t.DataFactory=class{constructor(e){this.blankNodeCounter=0,e=e||{},this.blankNodePrefix=e.blankNodePrefix||`df_${c++}_`}namedNode(e){return new s.NamedNode(e)}blankNode(e){return new n.BlankNode(e||`${this.blankNodePrefix}${this.blankNodeCounter++}`)}literal(e,t){return new o.Literal(e,t)}variable(e){return new u.Variable(e)}defaultGraph(){return i.DefaultGraph.INSTANCE}quad(e,t,r,n){return new a.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(o.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}}},6381:(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},2808:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Literal=void 0;const n=r(2016);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&&e.datatype.equals(this.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")},2016:(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}}},3387:(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)}}},1573:(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}}},9967:(e,t,r)=>{e.exports=function(e,t,r){if("number"!=typeof t)throw new Error("second argument must be a Number");let i,o,s,a,u,c,l=!0;function d(e){function t(){r&&r(e,i),r=null}l?n(t):t()}function p(t,r,n){if(i[t]=n,r&&(u=!0),0==--s||r)d(r);else if(!u&&c<o){let t;a?(t=a[c],c+=1,e[t]((function(e,r){p(t,e,r)}))):(t=c,c+=1,e[t]((function(e,r){p(t,e,r)})))}}Array.isArray(e)?(i=[],s=o=e.length):(a=Object.keys(e),i={},s=o=a.length),c=t,s?a?a.some((function(r,n){return e[r]((function(e,t){p(r,e,t)})),n===t-1})):e.some((function(e,r){return e((function(e,t){p(r,e,t)})),r===t-1})):d(null),l=!1};const n=r(4375)},5505: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.range=t.union=t.fromArray=t.single=t.empty=t.wrap=t.ClonedIterator=t.UnionIterator=t.MultiTransformIterator=t.SimpleTransformIterator=t.TransformIterator=t.BufferedIterator=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=void 0;const i=r(7187);let o=n(r(1291)).default();t.scheduleTask=function(e){o(e)},t.getTaskScheduler=function(){return o},t.setTaskScheduler=function(e){o=e},t.INIT=1,t.OPEN=2,t.CLOSING=4,t.CLOSED=8,t.ENDED=16,t.DESTROYED=32;class s extends i.EventEmitter{constructor(e=t.OPEN){super(),this._readable=!1,this._state=e,this.on("newListener",a)}_changeState(e,r=!1){const n=e>this._state&&this._state<t.ENDED;return n&&(this._state=e,e===t.ENDED&&(r?o((()=>this.emit("end"))):this.emit("end"))),n}read(){return null}forEach(e,t){this.on("data",t?e.bind(t):e)}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(){o((()=>this._end()))}get readable(){return this._readable}set readable(e){e=Boolean(e)&&!this.done,this._readable!==e&&(this._readable=e,e&&o((()=>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 r<=0?Promise.resolve(t):new Promise(((e,n)=>{const i=()=>e(t),o=s=>{t.push(s),t.length>=r&&(this.removeListener("error",n),this.removeListener("data",o),this.removeListener("end",i),e(t))};this.on("error",n),this.on("data",o),this.on("end",i)}))}getProperty(e,t){const r=this._properties;if(!t)return r&&r[e];if(r&&e in r)o((()=>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],o((()=>{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 _(this,e)}map(e,t){return this.transform({map:t?e.bind(t):e})}filter(e,t){return this.transform({filter:t?e.bind(t):e})}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.transform({offset:e})}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 j(this)}}function a(e){"data"===e&&(this.removeListener("newListener",a),c(this,"readable",u),this.readable&&o((()=>u.call(this))))}function u(){let e;for(;0!==this.listenerCount("data")&&null!==(e=this.read());)this.emit("data",e);0!==this.listenerCount("data")||this.done||(this.removeListener("readable",u),c(this,"newListener",a))}function c(e,t,r){e.listeners(t).includes(r)||e.on(t,r)}t.AsyncIterator=s;class l extends s{constructor(){super(),this._changeState(t.ENDED,!0)}}t.EmptyIterator=l;class d extends s{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 p extends s{constructor(e,{autoStart:t=!0}={}){super();const r=e?[...e]:[];this._sourceStarted=!1!==t,this._sourceStarted&&0===r.length?this.close():this._buffer=r,this.readable=!0}read(){this._sourceStarted||(this._sourceStarted=!0);let e=null;const t=this._buffer;return t&&(0!==t.length&&(e=t.shift()),0===t.length&&(delete this._buffer,this.close())),e}_toStringDetails(){return`(${this._buffer&&this._buffer.length||0})`}_destroy(e,t){delete this._buffer,t()}}t.ArrayIterator=p;class h extends s{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<r)?this.close():this.readable=!0}read(){if(this.closed)return null;const e=this._next,t=this._step,r=this._last,n=this._next+=t;return(t>=0?n>r:n<r)&&this.close(),e}_toStringDetails(){return`(${this._next}...${this._last})`}}t.IntegerIterator=h;class f extends s{constructor({maxBufferSize:e=4,autoStart:r=!0}={}){super(t.INIT),this._buffer=[],this._maxBufferSize=4,this._reading=!0,this._pushedCount=0,this.maxBufferSize=e,o((()=>this._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 0!==e.length?t=e.shift():(t=null,this.readable=!1),!this._reading&&e.length<this._maxBufferSize&&(this.closed?e.length||this._endAsync():this._fillBufferAsync()),t}_read(e,t){t()}_push(e){this.done||(this._pushedCount++,this._buffer.push(e),this.readable=!0)}_fillBuffer(){let e;this._reading||(this.closed?this._completeClose():(e=Math.min(this._maxBufferSize-this._buffer.length,128))>0&&(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._maxBufferSize/2&&this._fillBufferAsync())}))))}_fillBufferAsync(){this._reading||(this._reading=!0,o((()=>{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.length||this._endAsync()})))}_destroy(e,t){this._buffer=[],t()}_flush(e){e()}_toStringDetails(){const e=this._buffer,{length:t}=e;return`{${t?`next: ${e[0]}, `:""}buffer: ${t}}`}}t.BufferedIterator=f;class y extends f{constructor(e,t=e||{}){super(t),this._boundPush=e=>this._push(e),A(e)||(e=t.source),x(e)?this.source=e:e&&(this._createSource=E(e)?()=>e:e,this._sourceStarted&&this._loadSourceAsync()),this._optional=Boolean(t.optional),this._destroySource=!1!==t.destroySource}get source(){return S(this._createSource)&&this._loadSourceAsync(),this._source}set source(e){const t=this._source=this._validateSource(e);t._destination=this,t.done?this.close():(t.on("end",b),t.on("readable",g),t.on("error",m))}_loadSourceAsync(){S(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");if(!e||!S(e.read)||!S(e.on))throw new Error(`Invalid source: ${e}`);if(!t&&e._destination)throw new Error("The source already has a destination");return e}_read(e,t){const r=()=>{this._pushedCount<e&&!this.closed?o((()=>this._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 t=this._source;t&&(t.removeListener("end",b),t.removeListener("error",m),t.removeListener("readable",g),delete t._destination,this._destroySource&&t.destroy()),super._end(e)}}function m(e){this._destination.emit("error",e)}function b(){this._destination._closeWhenDone()}function g(){!1!==this._destination._sourceStarted&&this._destination._fillBuffer()}t.TransformIterator=y;class _ extends y{constructor(e,t){if(super(e,t),this._offset=0,this._limit=1/0,this._filter=e=>!0,t=t||(A(e)?null:e)){const e=S(t)?t:t.transform,{limit:r,offset:n,filter:i,map:o,prepend:s,append:a}=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)),S(i)&&(this._filter=i),S(o)&&(this._map=o),this._transform=S(e)?e:null),s&&(this._prepender=x(s)?s:w(s)),a&&(this._appender=x(a)?a:w(a))}}_read(e,t){const r=()=>this._readAndTransformSimple(e,n,t);function n(){o(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._pushedCount<e&&null!==(n=i.read());){if(!this._filter(n)||0!==this._offset&&this._offset--)continue;const e=void 0===this._map?n:this._map(n);if(null===e)this._optional&&this._push(n);else{if(S(this._transform))return void(this._optional?this._optionalTransform(e,t):this._transform(e,t,this._boundPush));this._push(e)}0==--this._limit&&this.close()}r()}else r()}_begin(e){this._insert(this._prepender,e),delete this._prepender}_flush(e){this._insert(this._appender,e),delete this._appender}_insert(e,t){const r=e=>this._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=_,t.MultiTransformIterator=class extends y{constructor(e,t){if(super(e,t),this._transformerQueue=[],t){const e=S(t)?t:t.multiTransform;e&&(this._createTransformer=e)}}_read(e,t){const r=this._transformerQueue,n=this._optional;let i,o;for(;(i=r[0])&&i.transformer.done;){n&&null!==i.item&&(e--,this._push(i.item)),r.shift();const{transformer:t}=i;t.removeListener("end",g),t.removeListener("readable",g),t.removeListener("error",m)}const{source:s}=this;for(;s&&!s.done&&r.length<this.maxBufferSize&&(o=s.read(),null!==o);){const e=this._createTransformer(o)||new l;e._destination=this,e.on("end",g),e.on("readable",g),e.on("error",m),r.push({transformer:e,item:o})}if(i=r[0],i){const{transformer:t}=i;for(;e-- >0&&null!==(o=t.read());)this._push(o),n&&(i.item=null)}else s&&s.done&&this.close();t()}_createTransformer(e){return new d(e)}_closeWhenDone(){this._transformerQueue.length||this.close()}};class v extends f{constructor(e,t={}){super(t),this._sources=[],this._currentSource=-1;const r=!1!==t.autoStart;if(x(e))e.on("error",(e=>this.emit("error",e))),this._pending={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()}_loadSources(){const e=this._pending.sources;delete this._pending.sources,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){e.done||(this._sources.push(e),e._destination=this,e.on("error",m),e.on("readable",g),e.on("end",O))}_removeEmptySources(){this._sources=this._sources.filter(((e,t)=>(e.done&&t<=this._currentSource&&this._currentSource--,!e.done))),this._fillBuffer()}_read(e,t){var r;(null===(r=this._pending)||void 0===r?void 0:r.sources)&&this._loadSources();let n,i=0;for(;i!==(i=e);)for(let t=0;t<this._sources.length&&e>0;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()}}function O(){this._destination._removeEmptySources()}t.UnionIterator=v;class j extends y{constructor(e){super(e,{autoStart:!1}),this._readPosition=0,this._reading=!1}_init(){}close(){s.prototype.close.call(this)}get source(){return super.source}set source(e){const t=this._source=this._validateSource(e),r=t&&t._destination||(t._destination=new T(t));r.endsAt(0)?this.close():(r.register(this),!1!==t._sourceStarted&&null===r.readAt(0)||(this.readable=!0));const n=this._propertyCallbacks;for(const e in n){const t=n[e];for(const r of t)this._getSourceProperty(e,r)}}_validateSource(e,t=!1){const r=e&&e._destination;return super._validateSource(e,!r||r instanceof T)}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 t=null;if(!this.done&&e){const r=e._destination;null!==(t=r.readAt(this._readPosition))?this._readPosition++:this.readable=!1,r.endsAt(this._readPosition)&&this.close()}return t}_end(e){const t=this.source,r=null==t?void 0:t._destination;r&&r.unregister(this),f.prototype._end.call(this,e)}}t.ClonedIterator=j;class T{constructor(e){if(this._clones=null,this._history=[],this._source=e,!e.done){const t=()=>{for(const e of this._clones)e.readable=!0},r=e=>{for(const t of this._clones)t.emit("error",e)},n=()=>{for(const e of this._clones)!1!==e._sourceStarted&&e._readPosition===this._history.length&&e.close();this._clones=null,e.removeListener("end",n),e.removeListener("error",r),e.removeListener("readable",t)};this._clones=[],e.on("end",n),e.on("error",r),e.on("readable",t)}}register(e){null!==this._clones&&this._clones.push(e)}unregister(e){null!==this._clones&&(this._clones=this._clones.filter((t=>t!==e)))}readAt(e){let t=null;return e<this._history.length?t=this._history[e]:this._source.done||null===(t=this._source.read())||(this._history[e]=t),t}endsAt(e){return this._source.done&&this._history.length===e}}function w(e){return new p(e)}function S(e){return"function"==typeof e}function x(e){return e&&"function"==typeof e.on}function E(e){return e&&"function"==typeof e.then}function A(e){return e&&(x(e)||E(e)||S(e))}t.wrap=function(e,t){return new y(e,t)},t.empty=function(){return new l},t.single=function(e){return new d(e)},t.fromArray=w,t.union=function(e){return new v(e)},t.range=function(e,t,r){return new h({start:e,end:t,step:r})}},1291:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=Promise.resolve(void 0);t.default=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})))}}},6649:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,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.getQuadComparator=t.getBindingComparator=t.getTermComparator=t.Quadstore=void 0,i(r(9729),t);var o=r(2453);Object.defineProperty(t,"Quadstore",{enumerable:!0,get:function(){return o.Quadstore}});var s=r(8129);Object.defineProperty(t,"getTermComparator",{enumerable:!0,get:function(){return s.getTermComparator}}),Object.defineProperty(t,"getBindingComparator",{enumerable:!0,get:function(){return s.getBindingComparator}}),Object.defineProperty(t,"getQuadComparator",{enumerable:!0,get:function(){return s.getQuadComparator}})},8202:(e,t,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.getApproximateSize=t.getStream=void 0;const i=r(9729),o=r(8129),s=r(6603),a=r(1244),u=r(5978),c=n.alloc(32),l=(e,t,r,n)=>{const i=(0,a.writePattern)(e,t,r);if(null===i)return null;const o={[i.gte?"gte":"gt"]:i.gt,[i.lte?"lte":"lt"]:i.lt,keys:!0,values:!0,keyAsBuffer:!1,valueAsBuffer:!0};return"number"==typeof n.limit&&(o.limit=n.limit),"boolean"==typeof n.reverse&&(o.reverse=n.reverse),{level:o,order:i.order,index:i.index}},d=(e,t,r,n)=>{for(let i,s=0;s<t.length;s+=1){i=t[s];const a=l(e,i,r,n);if(null!==a&&(!n.order||(0,o.arrStartsWith)(a.order,n.order)))return a}return null};t.getStream=async(e,t,r)=>{const{dataFactory:n,prefixes:l,indexes:p}=e,h=d(t,p,l,r);if(null!==h){const{index:t,level:r,order:o}=h;let u=new s.LevelIterator(e.db.iterator(r),((e,r)=>a.quadReader.read(e,t.prefix.length,r,0,t.terms,n,l)));return{type:i.ResultType.QUADS,order:o,iterator:u,index:t.terms,resorted:!1}}const f=d(t,p,l,o.emptyObject);if(null!==f){const{index:t,level:d,order:p}=f;let h=new s.LevelIterator(e.db.iterator(d),((e,r)=>a.quadReader.read(e,t.prefix.length,r,0,t.terms,n,l)));if(void 0!==r.order&&!(0,o.arrStartsWith)(r.order,p)){const e=!0===r.reverse?(e,t)=>e[1]>t[1]?-1:1:(e,t)=>e[1]>t[1]?1:-1,t=e=>[e,a.quadWriter.write("",c,e,r.order,l)+o.separator],n=e=>e[0];h=new u.SortingIterator(h,e,t,n),void 0!==r.limit&&(h=h.take(r.limit))}return{type:i.ResultType.QUADS,order:r.order||p,iterator:h,index:t.terms,resorted:!0}}throw new Error(`No index compatible with pattern ${JSON.stringify(t)} and options ${JSON.stringify(r)}`)},t.getApproximateSize=async(e,t,r)=>{if(!e.db.approximateSize)return{type:i.ResultType.APPROXIMATE_SIZE,approximateSize:1/0};const{indexes:n,prefixes:o}=e,s=d(t,n,o,r);if(null===s)throw new Error(`No index compatible with pattern ${JSON.stringify(t)} and options ${JSON.stringify(r)}`);const{level:a}=s,u=a.gte||a.gt,c=a.lte||a.lt;return new Promise(((t,r)=>{e.db.approximateSize(u,c,((e,n)=>{e?r(e):t({type:i.ResultType.APPROXIMATE_SIZE,approximateSize:Math.max(1,n)})}))}))}},6603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LevelIterator=void 0;const n=r(5505);class i extends n.BufferedIterator{level;mapFn;levelEnded;constructor(e,t){super(),this.mapFn=t,this.level=e,this.levelEnded=!1}_read(e,t){const r=e=>{0!==e?this.level.next(((n,i,o)=>{this.onNextValue(n,i,o,e,r,t)})):t()};r(e)}onNextValue(e,t,r,n,i,o){if(e)o(e);else{if(void 0===t&&void 0===r)return this.close(),this.levelEnded=!0,void o();this._push(this.mapFn(t,r)),i(n-1)}}endLevel(e){this.levelEnded?e():this.level.end((t=>{t||(this.levelEnded=!0),e(t)}))}_end(e){this.ended||(super._end(e),this.endLevel((e=>{e&&this.emit("error",e)})))}_destroy(e,t){this.destroyed?t():this.endLevel((r=>{r?t(r):super._destroy(e,t)}))}}t.LevelIterator=i},5978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SortingIterator=void 0;const n=r(5505),i=r(5502);class o extends n.BufferedIterator{publish;iterator;constructor(e,t,r,n,o){super(o),this.publish=n,this._read=(n,o)=>{const s=new i({comparator:t}),a=e=>{s.insert(r(e))};e.on("data",a),e.once("end",(()=>{e.removeListener("data",a),this.iterator=s.beginIterator(),delete this._read,this._read(n,o)}))}}_read(e,t){let r,n=this.iterator,i=this.publish;for(;e>=0;){if(null===(r=n.value()))return t(),void this.close();this._push(i(r)),n=n.next(),e-=1}this.iterator=n,t()}}t.SortingIterator=o},2453:(e,t,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Quadstore=void 0;const i=r(9729),o=r(7187),s=r(5505),a=r(8129),u=r(8202),c=r(5113),l=r(1244),d=n.alloc(32);t.Quadstore=class{db;indexes;id;prefixes;dataFactory;constructor(e){(0,a.ensureAbstractLevelDOWN)(e.backend,'"opts.backend"'),this.dataFactory=e.dataFactory,this.db=e.backend,this.indexes=[],this.id=(0,a.nanoid)(),(e.indexes||a.defaultIndexes).forEach((e=>this._addIndex(e))),this.prefixes=e.prefixes||{expandTerm:e=>e,compactIri:e=>e}}ensureReady(){if("open"!==this.db.status)throw new Error(`Store is not ready (status: "${this.db.status}"). Did you call store.open()?`)}waitForStatus(e,t=200){return new Promise(((r,n)=>{const i=setTimeout((()=>{clearInterval(o),clearTimeout(i),n(new Error(`Timeout while waiting for status "${e}"`))}),t),o=setInterval((()=>{this.db.status===e&&(clearInterval(o),clearTimeout(i),r())}),10)}))}async open(){switch(this.db.status){case"closing":await this.waitForStatus("closed");case"new":case"closed":await(0,a.pFromCallback)((e=>{this.db.open(e)}));break;case"opening":await this.waitForStatus("open")}}async close(){switch(this.db.status){case"opening":await this.waitForStatus("open");case"open":case"new":await(0,a.pFromCallback)((e=>{this.db.close(e)}));break;case"closing":await this.waitForStatus("closed")}}toString(){return this.toJSON()}toJSON(){return`[object ${this.constructor.name}::${this.id}]`}_addIndex(e){const t=e.map((e=>e.charAt(0).toUpperCase())).join("");this.indexes.push({terms:e,prefix:t+a.separator})}async clear(){if("function"==typeof this.db.clear)return new Promise(((e,t)=>{this.db.clear((r=>{r?t(r):e()}))}));await this.delStream((await this.getStream({})).iterator,{batchSize:20})}match(e,t,r,n,i=a.emptyObject){if(e&&"Literal"===e.termType)return new s.EmptyIterator;const o={subject:e,predicate:t,object:r,graph:n};return new s.TransformIterator(this.getStream(o,i).then((e=>e.iterator)))}async countQuads(e,t,r,n,i=a.emptyObject){if(e&&"Literal"===e.termType)return 0;const o={subject:e,predicate:t,object:r,graph:n};return(await this.getApproximateSize(o,i)).approximateSize}import(e){const t=new o.EventEmitter;return this.putStream(e,{}).then((()=>{t.emit("end")})).catch((e=>{t.emit("error",e)})),t}remove(e){const t=new o.EventEmitter;return this.delStream(e,{}).then((()=>t.emit("end"))).catch((e=>t.emit("error",e))),t}removeMatches(e,t,r,n,i=a.emptyObject){const o=this.match(e,t,r,n,i);return this.remove(o)}deleteGraph(e){return this.removeMatches(void 0,void 0,void 0,e)}async getApproximateSize(e,t=a.emptyObject){return await this.ensureReady(),await(0,u.getApproximateSize)(this,e,t)}async put(e,t=a.emptyObject){this.ensureReady();let r=this.db.batch();return t.scope&&(e=t.scope.parseQuad(e,r)),r=this.indexes.reduce(((t,r)=>{const n=l.quadWriter.write(r.prefix,d,e,r.terms,this.prefixes);return t.put(n,(0,l.copyBuffer)(d,0,l.quadWriter.writtenValueBytes))}),r),await this.writeBatch(r,t),{type:i.ResultType.VOID}}async multiPut(e,t=a.emptyObject){this.ensureReady();let r=this.db.batch();return r=e.reduce(((e,n)=>(t.scope&&(n=t.scope.parseQuad(n,r)),this.indexes.reduce(((e,t)=>{const r=l.quadWriter.write(t.prefix,d,n,t.terms,this.prefixes);return e.put(r,(0,l.copyBuffer)(d,0,l.quadWriter.writtenValueBytes))}),e))),r),await this.writeBatch(r,t),{type:i.ResultType.VOID}}async del(e,t=a.emptyObject){this.ensureReady();const r=this.indexes.reduce(((t,r)=>{const n=l.quadWriter.write(r.prefix,d,e,r.terms,this.prefixes);return t.del(n)}),this.db.batch());return await this.writeBatch(r,t),{type:i.ResultType.VOID}}async multiDel(e,t=a.emptyObject){this.ensureReady();const r=e.reduce(((e,t)=>this.indexes.reduce(((e,r)=>{const n=l.quadWriter.write(r.prefix,d,t,r.terms,this.prefixes);return e.del(n)}),e)),this.db.batch());return await this.writeBatch(r,t),{type:i.ResultType.VOID}}async patch(e,t,r=a.emptyObject){this.ensureReady();const n=this.indexes.reduce(((r,n)=>{const i=l.quadWriter.write(n.prefix,d,e,n.terms,this.prefixes);r.del(i);const o=l.quadWriter.write(n.prefix,d,t,n.terms,this.prefixes);return r.put(o,(0,l.copyBuffer)(d,0,l.quadWriter.writtenValueBytes))}),this.db.batch());return await this.writeBatch(n,r),{type:i.ResultType.VOID}}async multiPatch(e,t,r=a.emptyObject){this.ensureReady();let n=this.db.batch();return n=e.reduce(((e,t)=>this.indexes.reduce(((e,r)=>{const n=l.quadWriter.write(r.prefix,d,t,r.terms,this.prefixes);return e.del(n)}),e)),n),n=t.reduce(((e,t)=>this.indexes.reduce(((e,r)=>{const n=l.quadWriter.write(r.prefix,d,t,r.terms,this.prefixes);return e.put(n,(0,l.copyBuffer)(d,0,l.quadWriter.writtenValueBytes))}),e)),n),await this.writeBatch(n,r),{type:i.ResultType.VOID}}async writeBatch(e,t){t.preWrite&&await t.preWrite(e),await(0,a.pFromCallback)((t=>{e.write(t)}))}async get(e,t=a.emptyObject){this.ensureReady();const r=await this.getStream(e,t);return{items:await(0,a.streamToArray)(r.iterator),type:r.type,order:r.order,index:r.index,resorted:r.resorted}}async getStream(e,t=a.emptyObject){return this.ensureReady(),await(0,u.getStream)(this,e,t)}async putStream(e,t=a.emptyObject){this.ensureReady();const r=t.batchSize||1;return 1===r?await(0,a.consumeOneByOne)(e,(e=>this.put(e,t))):await(0,a.consumeInBatches)(e,r,(e=>this.multiPut(e,t))),{type:i.ResultType.VOID}}async delStream(e,t=a.emptyObject){this.ensureReady();const r=t.batchSize||1;return 1===r?await(0,a.consumeOneByOne)(e,(e=>this.del(e))):await(0,a.consumeInBatches)(e,r,(e=>this.multiDel(e))),{type:i.ResultType.VOID}}async initScope(){return await this.ensureReady(),await c.Scope.init(this)}async loadScope(e){return await this.ensureReady(),await c.Scope.load(this,e)}async deleteScope(e){await this.ensureReady(),await c.Scope.delete(this,e)}async deleteAllScopes(){await this.ensureReady(),await c.Scope.delete(this)}}},5113:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scope=void 0;const n=r(6603),i=r(8129);class o{id;blankNodes;factory;static async init(e){return new o(e.dataFactory,(0,i.nanoid)(),new Map)}static async load(e,t){const r=o.getLevelIteratorOpts(!1,!0,t),s=new n.LevelIterator(e.db.iterator(r),((e,t)=>t)),a=new Map,{dataFactory:u}=e;return await(0,i.consumeOneByOne)(s,(e=>{const{originalLabel:t,randomLabel:r}=JSON.parse(e);a.set(t,u.blankNode(r))})),new o(u,t,a)}static async delete(e,t){const r=e.db.batch(),s=o.getLevelIteratorOpts(!0,!1,t),a=new n.LevelIterator(e.db.iterator(s),((e,t)=>e));await(0,i.consumeOneByOne)(a,(e=>{r.del(e)})),await(0,i.pFromCallback)((e=>{r.write(e)}))}static getLevelIteratorOpts(e,t,r){const n=r?`SCOPE${i.separator}${r}${i.separator}`:`SCOPE${i.separator}`;return{keys:e,values:t,keyAsBuffer:!1,valueAsBuffer:!1,gte:n,lte:`${n}${i.boundary}`}}static addMappingToLevelBatch(e,t,r,n){t.put(`SCOPE${i.separator}${e}${i.separator}${r}`,JSON.stringify({originalLabel:r,randomLabel:n}))}constructor(e,t,r){this.blankNodes=r,this.factory=e,this.id=t}parseBlankNode(e,t){let r=this.blankNodes.get(e.value);return r||(r=this.factory.blankNode((0,i.nanoid)()),this.blankNodes.set(e.value,r),o.addMappingToLevelBatch(this.id,t,e.value,r.value)),r}parseSubject(e,t){return"BlankNode"===e.termType?this.parseBlankNode(e,t):e}parseObject(e,t){return"BlankNode"===e.termType?this.parseBlankNode(e,t):e}parseGraph(e,t){return"BlankNode"===e.termType?this.parseBlankNode(e,t):e}parseQuad(e,t){return this.factory.quad(this.parseSubject(e.subject,t),e.predicate,this.parseObject(e.object,t),this.parseGraph(e.graph,t))}}t.Scope=o},2771:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encode=void 0;const r=(e,t,r)=>`${e}${t}${r.charAt(0)}${r.slice(2)}`,n=e=>(999-parseInt(e)).toString().padStart(3,"0"),i=e=>(10-parseFloat(e)).toPrecision(17).slice(0,18);t.encode=e=>{const t="number"!=typeof e?parseFloat(e):e;if(0===t)return r(3,"000","0.0000000000000000");const o=(t>0?"+":"")+t.toExponential(16),s=o.charAt(0),a=o.slice(1,19),u=o.charAt(20),c=o.slice(21).padStart(3,"0");switch(`${u}${s}`){case"+-":return r(1,n(c),i(a));case"--":return r(2,c,i(a));case"-+":return r(4,n(c),a);case"++":return r(5,c,a);default:throw new Error(`should not be here - "${u}${s}" "${e}"`)}}},1244:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.copyBuffer=t.sliceBuffer=t.copyBufferIntoBuffer=t.writePattern=t.quadReader=t.quadWriter=void 0;var n=r(4843);Object.defineProperty(t,"quadWriter",{enumerable:!0,get:function(){return n.quadWriter}}),Object.defineProperty(t,"quadReader",{enumerable:!0,get:function(){return n.quadReader}});var i=r(101);Object.defineProperty(t,"writePattern",{enumerable:!0,get:function(){return i.writePattern}});var o=r(7395);Object.defineProperty(t,"copyBufferIntoBuffer",{enumerable:!0,get:function(){return o.copyBufferIntoBuffer}}),Object.defineProperty(t,"sliceBuffer",{enumerable:!0,get:function(){return o.sliceBuffer}}),Object.defineProperty(t,"copyBuffer",{enumerable:!0,get:function(){return o.copyBuffer}})},101:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return 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}),o=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.writePattern=void 0;const s=o(r(6541)),a=r(2771),u=r(8129),c=r(3680),l={write(e){if(e.language)return c.langStringLiteralWriter.write(void 0,void 0,e,u.separator);if(e.datatype)switch(e.datatype.value){case s.string:return c.stringLiteralWriter.write(void 0,void 0,e);case s.integer:case s.double:case s.decimal:case s.nonPositiveInteger:case s.negativeInteger:case s.long:case s.int:case s.short:case s.byte:case s.nonNegativeInteger:case s.unsignedLong:case s.unsignedInt:case s.unsignedShort:case s.unsignedByte:case s.positiveInteger:return c.numericLiteralWriter.write(void 0,void 0,e,u.separator,(0,a.encode)(e.value),!0);case s.dateTime:return c.numericLiteralWriter.write(void 0,void 0,e,u.separator,(0,a.encode)(new Date(e.value).valueOf()),!0);default:return c.genericLiteralWriter.write(void 0,void 0,e,u.separator)}return c.stringLiteralWriter.write(void 0,void 0,e)}};t.writePattern=(e,t,r)=>{let n=t.prefix,i=t.prefix,o=!0,s=!0,a=!1,d=!1,p=Object.entries(e).filter((([e,t])=>t)).length;if(0===p)return i+=u.boundary,{gt:n,lt:i,gte:o,lte:s,order:t.terms,index:t};let h=0;for(;h<t.terms.length&&p>0;h+=1){const f=e[t.terms[h]];if(!f)return null;if(a||d)return null;switch(f.termType){case"Range":a=!0,f.gt?(n+=l.write(f.gt),o=!1):f.gte&&(n+=l.write(f.gte),o=!0),f.lt?(i+=l.write(f.lt),s=!1):f.lte&&(i+=l.write(f.lte),s=!0);break;case"Literal":d=!0,n+=l.write(f),o=!0,i+=l.write(f),s=!0;break;case"NamedNode":n+=c.namedNodeWriter.write(void 0,void 0,f,r),o=!0,i+=c.namedNodeWriter.write(void 0,void 0,f,r),s=!0;break;case"BlankNode":n+=c.blankNodeWriter.write(void 0,void 0,f),o=!0,i+=c.blankNodeWriter.write(void 0,void 0,f),s=!0;break;case"DefaultGraph":n+=c.defaultGraphWriter.write(void 0,void 0,f),o=!0,i+=c.defaultGraphWriter.write(void 0,void 0,f),s=!0}p-=1,p>0&&h<t.terms.length-1&&(n+=u.separator,i+=u.separator)}return i+=s?a||d?u.boundary:u.separator+u.boundary:u.separator,o?a||d||(n+=u.separator):n+=a||d?u.boundary:u.separator+u.boundary,{gt:n,lt:i,gte:o,lte:s,order:t.terms.slice(a?h-1:1),index:t}}},4843:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return 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}),o=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.quadReader=t.quadWriter=void 0;const s=o(r(6541)),a=r(2771),u=r(8129),c=r(3680);t.quadWriter={writtenValueBytes:0,write(e,t,r,n,i){let o=e,l=0;for(let e,d=0;d<n.length;d+=1){switch(e=r[n[d]],e.termType){case"NamedNode":t.writeUInt16LE(0,l),l+=2,o+=c.namedNodeWriter.write(t,l,e,i),l+=c.namedNodeWriter.writtenValueBytes;break;case"BlankNode":t.writeUInt16LE(1,l),l+=2,o+=c.blankNodeWriter.write(t,l,e),l+=c.blankNodeWriter.writtenValueBytes;break;case"DefaultGraph":t.writeUInt16LE(6,l),l+=2,o+=c.defaultGraphWriter.write(t,l,e),l+=c.defaultGraphWriter.writtenValueBytes;break;case"Literal":if(e.language)t.writeUInt16LE(4,l),l+=2,o+=c.langStringLiteralWriter.write(t,l,e,u.separator),l+=c.langStringLiteralWriter.writtenValueBytes;else if(e.datatype)switch(e.datatype.value){case s.string:t.writeUInt16LE(3,l),l+=2,o+=c.stringLiteralWriter.write(t,l,e),l+=c.stringLiteralWriter.writtenValueBytes;break;case s.integer:case s.double:case s.decimal:case s.nonPositiveInteger:case s.negativeInteger:case s.long:case s.int:case s.short:case s.byte:case s.nonNegativeInteger:case s.unsignedLong:case s.unsignedInt:case s.unsignedShort:case s.unsignedByte:case s.positiveInteger:t.writeUInt16LE(5,l),l+=2,o+=c.numericLiteralWriter.write(t,l,e,u.separator,(0,a.encode)(e.value),!1),l+=c.numericLiteralWriter.writtenValueBytes;break;case s.dateTime:t.writeUInt16LE(5,l),l+=2,o+=c.numericLiteralWriter.write(t,l,e,u.separator,(0,a.encode)(new Date(e.value).valueOf()),!1),l+=c.numericLiteralWriter.writtenValueBytes;break;default:t.writeUInt16LE(2,l),l+=2,o+=c.genericLiteralWriter.write(t,l,e,u.separator),l+=c.genericLiteralWriter.writtenValueBytes}else t.writeUInt16LE(3,l),l+=2,o+=c.stringLiteralWriter.write(t,l,e),l+=c.stringLiteralWriter.writtenValueBytes}o+=u.separator}return this.writtenValueBytes=l,o}},t.quadReader={subject:null,predicate:null,object:null,graph:null,read(e,t,r,n,i,o,s){for(let a,l,d=0;d<i.length;d+=1){a=i[d];const p=r.readUInt16LE(n);switch(n+=2,p){case 0:l=c.namedNodeReader.read(e,t,r,n,o,s),t+=c.namedNodeReader.readKeyChars,n+=c.namedNodeReader.readValueBytes;break;case 1:l=c.blankNodeReader.read(e,t,r,n,o),t+=c.blankNodeReader.readKeyChars,n+=c.blankNodeReader.readValueBytes;break;case 2:l=c.genericLiteralReader.read(e,t,r,n,o,u.separator),t+=c.genericLiteralReader.readKeyChars,n+=c.genericLiteralReader.readValueBytes;break;case 3:l=c.stringLiteralReader.read(e,t,r,n,o),t+=c.stringLiteralReader.readKeyChars,n+=c.stringLiteralReader.readValueBytes;break;case 4:l=c.langStringLiteralReader.read(e,t,r,n,o,u.separator),t+=c.langStringLiteralReader.readKeyChars,n+=c.langStringLiteralReader.readValueBytes;break;case 5:l=c.numericLiteralReader.read(e,t,r,n,o,u.separator),t+=c.numericLiteralReader.readKeyChars,n+=c.numericLiteralReader.readValueBytes;break;case 6:l=c.defaultGraphReader.read(e,t,r,n,o),t+=c.defaultGraphReader.readKeyChars,n+=c.defaultGraphReader.readValueBytes;break;default:throw new Error(`Unexpected encoded term type "${p}"`)}this[a]=l,t+=u.separator.length}return o.quad(this.subject,this.predicate,this.object,this.graph)}}},3680:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultGraphReader=t.defaultGraphWriter=t.numericLiteralReader=t.numericLiteralWriter=t.langStringLiteralReader=t.langStringLiteralWriter=t.stringLiteralReader=t.stringLiteralWriter=t.genericLiteralReader=t.genericLiteralWriter=t.blankNodeReader=t.blankNodeWriter=t.namedNodeReader=t.namedNodeWriter=void 0;const n=r(7395);t.namedNodeWriter={writtenValueBytes:2,write(e,t,r,n){const i=n.compactIri(r.value);return e&&e.writeUInt16LE(i.length,t),i}},t.namedNodeReader={readValueBytes:2,readKeyChars:0,read(e,t,r,i,o,s){const a=r.readUInt16LE(i);return this.readKeyChars=a,o.namedNode(s.expandTerm((0,n.sliceString)(e,t,a)))}},t.blankNodeWriter={writtenValueBytes:2,write:(e,t,r)=>(e&&e.writeUInt16LE(r.value.length,t),r.value)},t.blankNodeReader={readValueBytes:2,readKeyChars:0,read(e,t,r,i,o){const s=r.readUInt16LE(i);return this.readKeyChars=s,o.blankNode((0,n.sliceString)(e,t,s))}},t.genericLiteralWriter={writtenValueBytes:4,write:(e,t,r,n)=>(e&&(e.writeUInt16LE(r.value.length,t),e.writeUInt16LE(r.datatype.value.length,t+2)),r.datatype.value+n+r.value)},t.genericLiteralReader={readValueBytes:4,readKeyChars:0,read(e,t,r,i,o,s){const a=r.readUInt16LE(i),u=r.readUInt16LE(i+2);return this.readKeyChars=a+u+s.length,o.literal((0,n.sliceString)(e,t+u+s.length,a),o.namedNode((0,n.sliceString)(e,t,u)))}},t.stringLiteralWriter={writtenValueBytes:2,write:(e,t,r)=>(e&&e.writeUInt16LE(r.value.length,t),r.value)},t.stringLiteralReader={readValueBytes:2,readKeyChars:0,read(e,t,r,i,o){const s=r.readUInt16LE(i);return this.readKeyChars=s,o.literal((0,n.sliceString)(e,t,s))}},t.langStringLiteralWriter={writtenValueBytes:4,write:(e,t,r,n)=>(e&&(e.writeUInt16LE(r.value.length,t),e.writeUInt16LE(r.language.length,t+2)),r.language+n+r.value)},t.langStringLiteralReader={readValueBytes:4,readKeyChars:0,read(e,t,r,i,o,s){const a=r.readUInt16LE(i),u=r.readUInt16LE(i+2);return this.readKeyChars=a+u+s.length,o.literal((0,n.sliceString)(e,t+u+s.length,a),(0,n.sliceString)(e,t,u))}},t.numericLiteralWriter={writtenValueBytes:6,write(e,t,r,n,i,o){e&&(e.writeUInt16LE(r.value.length,t),e.writeUInt16LE(r.datatype.value.length,t+2),e.writeUInt16LE(i.length,t+4));let s=i;return o||(s+=n+r.datatype.value+n+r.value),s}},t.numericLiteralReader={readValueBytes:6,readKeyChars:0,read(e,t,r,i,o,s){const a=r.readUInt16LE(i),u=r.readUInt16LE(i+2),c=r.readUInt16LE(i+4);return this.readKeyChars=c+u+a+2*s.length,o.literal((0,n.sliceString)(e,t+c+s.length+u+s.length,a),o.namedNode((0,n.sliceString)(e,t+c+s.length,u)))}},t.defaultGraphWriter={writtenValueBytes:2,write:(e,t,r)=>(e&&e.writeUInt16LE(2,t),"dg")},t.defaultGraphReader={readValueBytes:2,readKeyChars:2,read:(e,t,r,n,i)=>i.defaultGraph()}},7395:(e,t,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.copyBuffer=t.sliceString=t.sliceBuffer=t.copyBufferIntoBuffer=void 0,t.copyBufferIntoBuffer=(e,t,r)=>{e.copy(t,r,0,e.byteLength)},t.sliceBuffer=(e,t,r)=>e.subarray(t,t+r),t.sliceString=(e,t,r)=>e.slice(t,t+r),t.copyBuffer=(e,t,r)=>n.from(e.subarray(t,t+r))},6541:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.positiveInteger=t.unsignedByte=t.unsignedShort=t.unsignedInt=t.unsignedLong=t.nonNegativeInteger=t.byte=t.short=t.int=t.long=t.negativeInteger=t.nonPositiveInteger=t.double=t.decimal=t.integer=t.boolean=t.dateTime=t.string=t.langString=t.rdf=t.xsd=void 0,t.xsd="http://www.w3.org/2001/XMLSchema#",t.rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#",t.langString=`${t.rdf}langString`,t.string=`${t.xsd}string`,t.dateTime=`${t.xsd}dateTime`,t.boolean=`${t.xsd}boolean`,t.integer=`${t.xsd}integer`,t.decimal=`${t.xsd}decimal`,t.double=`${t.xsd}double`,t.nonPositiveInteger=`${t.xsd}nonPositiveInteger`,t.negativeInteger=`${t.xsd}negativeInteger`,t.long=`${t.xsd}long`,t.int=`${t.xsd}int`,t.short=`${t.xsd}short`,t.byte=`${t.xsd}byte`,t.nonNegativeInteger=`${t.xsd}nonNegativeInteger`,t.unsignedLong=`${t.xsd}unsignedLong`,t.unsignedInt=`${t.xsd}unsignedInt`,t.unsignedShort=`${t.xsd}unsignedShort`,t.unsignedByte=`${t.xsd}unsignedByte`,t.positiveInteger=`${t.xsd}positiveInteger`},9729:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ResultType=void 0,(r=t.ResultType||(t.ResultType={})).VOID="void",r.QUADS="quads",r.BOOLEAN="boolean",r.BINDINGS="bindings",r.APPROXIMATE_SIZE="approximate_size"},6572:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=void 0,t.flatMap=(e,t)=>e.length<1?[]:(e=>e.reduce(((e,t)=>e.concat(t))))(e.map(t))},8129:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrStartsWith=t.getBindingComparator=t.getQuadComparator=t.getTermComparator=t.separator=t.boundary=t.emptyObject=t.emptyArray=t.pFromCallback=t.consumeOneByOne=t.consumeInBatches=t.defaultIndexes=t.waitForEvent=t.resolveOnEvent=t.streamToArray=t.ensureAbstractLevelDOWN=t.isAbstractLevelDOWN=t.isObject=t.termNames=t.nanoid=t.pReduce=t.flatMap=void 0;const n=r(5505);var i=r(6572);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return i.flatMap}});var o=r(1775);Object.defineProperty(t,"pReduce",{enumerable:!0,get:function(){return o.pReduce}});var s=r(6363);Object.defineProperty(t,"nanoid",{enumerable:!0,get:function(){return s.nanoid}}),t.termNames=["subject","predicate","object","graph"],t.isObject=e=>"object"==typeof e&&null!==e,t.isAbstractLevelDOWN=e=>(0,t.isObject)(e)&&"function"==typeof e.open&&"function"==typeof e.batch,t.ensureAbstractLevelDOWN=(e,r)=>{if(!(0,t.isAbstractLevelDOWN)(e))throw new Error(`${r} is not an AbstractLevelDOWN instance`)},t.streamToArray=e=>new Promise(((t,r)=>{const n=[],i=e=>{n.push(e)},o=()=>{e.removeListener("data",i),e.removeListener("error",s),t(n)},s=t=>{e.removeListener("data",i),e.removeListener("end",o),e.destroy(),r(t)};e.once("error",s),e.once("end",o),e.on("data",i)})),t.resolveOnEvent=(e,t,r)=>new Promise(((n,i)=>{const o=t=>{e.removeListener("error",s),n(t)},s=r=>{e.removeListener(t,o),i(r)};e.once(t,o),r&&e.once("error",s)})),t.waitForEvent=t.resolveOnEvent,t.defaultIndexes=[["subject","predicate","object","graph"],["object","graph","subject","predicate"],["graph","subject","predicate","object"],["subject","object","predicate","graph"],["predicate","object","graph","subject"],["graph","predicate","object","subject"]];class a extends n.TransformIterator{constructor(e,t,r){super(e);let n=0;const i=new Array(t);this._transform=(e,o)=>{i[n++]=e,n<t?o():(n=0,r(i).then(o.bind(null,null)).catch(o))},this._flush=e=>{0!==n?r(i.slice(0,n)).then(e.bind(null,null)).catch(e):e()}}}t.consumeInBatches=async(e,t,r)=>new Promise(((n,i)=>{new a(e,t,r).on("end",n).on("error",i)})),t.consumeOneByOne=async(e,t)=>new Promise(((r,n)=>{let i=!1,o=!1,s=!1;const a=()=>{s=!1,o=!1;const u=e.read();null!==u?(s=!0,Promise.resolve(t(u)).then(a).catch(n)):i?r():(o=!0,e.once("readable",a))};e.once("end",(()=>{i=!0,o&&(e.removeListener("readable",a),r()),s||r()})),a()})),t.pFromCallback=e=>new Promise(((t,r)=>{e(((e,n)=>{e?r(e):t(n)}))})),t.emptyArray=[],t.emptyObject={},t.boundary="􏿿",t.separator="\0\0",t.getTermComparator=()=>(e,t)=>{if(e.termType!==t.termType)return e.termType<t.termType?-1:1;if("Literal"!==e.termType||"Literal"!==t.termType)return e.value<t.value?-1:e.value===t.value?0:1;if(e.language||t.language)return e.language?t.language?e.language<t.language?-1:e.language===t.language?0:1:1:-1;if(e.datatype||t.datatype){if(!e.datatype)return-1;if(!t.datatype)return 1;if(e.datatype.value!==t.datatype.value)return e.datatype.value<t.datatype.value?-1:1}return e.value<t.value?-1:e.value===t.value?0:1},t.getQuadComparator=(e=t.termNames)=>{const r=(0,t.getTermComparator)();return(t,n)=>{for(let i,o=0,s=e.length;o<s;o+=1)if(i=r(t[e[o]],n[e[o]]),0!==i)return i;return 0}},t.getBindingComparator=(e=t.termNames)=>{const r=(0,t.getTermComparator)();return(t,n)=>{for(let i,o=0,s=e.length;o<s;o+=1)if(i=r(t[e[o]],n[e[o]]),0!==i)return i;return 0}},t.arrStartsWith=(e,t)=>{for(let r=0;r<t.length;r+=1)if(t[r]!==e[r])return!1;return!0}},6363:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nanoid=void 0,t.nanoid=(e=10)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}},1775:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pReduce=void 0,t.pReduce=(e,t,r)=>new Promise(((n,i)=>{const o=e[Symbol.iterator]();let s=0;const a=async e=>{const r=o.next();if(r.done)n(e);else try{const n=await Promise.all([e,r.value]);a(t(n[0],n[1],s++))}catch(e){i(e)}};a(r)}))},4945:(e,t,r)=>{const{Quadstore:n}=r(6649),{DataFactory:i}=r(1640),{Engine:o}=r(4951),s=r(9558);e.exports={leveljs:s,Quadstore:n,DataFactory:i,Engine:o}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var __webpack_exports__=__webpack_require__(4945);return __webpack_exports__})()}));