mashlib 2.1.3-54ca86bb → 2.1.3-65d8af17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mash.css +17 -0
- package/dist/mash.css.map +1 -1
- package/dist/mashlib.js +345 -93
- package/dist/mashlib.js.map +1 -1
- package/dist/mashlib.min.js +3 -3
- package/dist/mashlib.min.js.map +1 -1
- package/package.json +2 -2
package/dist/mashlib.min.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
13
13
|
* @license MIT
|
|
14
14
|
*/var r=n(7526),i=n(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50;var o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|m(e,t),r=s(n),i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(z(e,Uint8Array)){var t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return d(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 f(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(z(e,SharedArrayBuffer)||e&&z(e.buffer,SharedArrayBuffer)))return f(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);var i=function(e){if(c.isBuffer(e)){var t=0|h(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||H(e.length)?s(0):d(e);if("Buffer"===e.type&&Array.isArray(e.data))return d(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(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 p(e){return u(e),s(e<0?0:0|h(e))}function d(e){for(var t=e.length<0?0:0|h(e.length),n=s(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function f(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,c.prototype),r}function h(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function m(e,t){if(c.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);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(i)return r?-1:D(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),H(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var a,o=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(a=n;a<s;a++)if(l(e,a)===l(t,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===c)return u*o}else-1!==u&&(a-=a-u),u=-1}else for(n+c>s&&(n=s-c),a=n;a>=0;a--){for(var p=!0,d=0;d<c;d++)if(l(e,a+d)!==l(t,d)){p=!1;break}if(p)return a}return-1}function w(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(H(s))return o;e[n+o]=s}return o}function x(e,t,n,r){return B(D(t,e.length-n),e,n,r)}function k(e,t,n,r){return B(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return B(U(t),e,n,r)}function E(e,t,n,r){return B(function(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,o,s,c,l=e[i],u=null,p=l>239?4:l>223?3:l>191?2:1;if(i+p<=n)switch(p){case 1:l<128&&(u=l);break;case 2:128==(192&(a=e[i+1]))&&(c=(31&l)<<6|63&a)>127&&(u=c);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(c=(15&l)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(u=c)}null===u?(u=65533,p=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=p}return function(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=A));return n}(r)}t.kMaxLength=o,c.TYPED_ARRAY_SUPPORT=function(){try{var 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}}(),!c.TYPED_ARRAY_SUPPORT&&"undefined"!=typeof console&&console.error,Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,n){return function(e,t,n){return u(e),e<=0?s(e):void 0!==t?"string"==typeof n?s(e).fill(t,n):s(e).fill(t):s(e)}(e,t,n)},c.allocUnsafe=function(e){return p(e)},c.allocUnsafeSlow=function(e){return p(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),z(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},c.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}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(z(a,Uint8Array))i+a.length>r.length?c.from(a).copy(r,i):Uint8Array.prototype.set.call(r,a,i);else{if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i)}i+=a.length}return r},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?S(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,i){if(z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),l=this.slice(r,i),u=e.slice(t,n),p=0;p<s;++p)if(l[p]!==u[p]){a=l[p],o=u[p];break}return a<o?-1:o<a?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":case"latin1":case"binary":return k(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function R(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=q[e[a]];return i}function I(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length-1;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function F(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,i,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function O(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,a){return t=+t,n>>>=0,a||O(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function j(e,t,n,r,a){return t=+t,n>>>=0,a||O(e,0,n,8),i.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,c.prototype),r},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||F(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||F(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||F(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||F(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var o=c.isBuffer(e)?e:c.from(e,r),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-t;++a)this[a+t]=o[a%s]}return this};var M=/[^+/0-9A-Za-z-_]/g;function D(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function U(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(M,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=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 H(e){return e!=e}var q=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}()},701(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findChat=s,t.getChat=async function(e,t=!0){const{me:n,chatContainer:c,exists:l}=await s(e);if(l)return new a.NamedNode(c.value+o.longChatPane.CHAT_LOCATION_IN_CONTAINER);if(t){const t=await async function(e,t){const n=await o.longChatPane.mintNew({session:{store:i.store}},{me:t,newBase:e.value});return n.newInstance}(c,n);return await async function(e,t){await i.store.fetcher.load(e.doc());const n=i.store.any(e,r.ns.ldp("inbox"),void 0,e.doc());if(!n)throw new Error(`Invitee inbox not found! ${e.value}`);const a=`\n<> a <http://www.w3.org/ns/pim/meeting#LongChatInvite> ;\n${r.ns.rdf("seeAlso")} <${t.value}> . \n `,o=await i.store.fetcher.webOperation("POST",n.value,{data:a,contentType:"text/turtle"});if(!o.headers.get("location"))throw new Error(`Invite sending returned a ${o.status}`)}(e,t),await async function(e,t,n){await i.store.fetcher.load(e);const r=i.store.any(e,new a.NamedNode("http://www.iana.org/assignments/link-relations/acl"));if(!r)throw new Error("Chat ACL doc not found!");const o=`\n@prefix acl: <http://www.w3.org/ns/auth/acl#>.\n<#owner>\n a acl:Authorization;\n acl:agent <${t.value}>;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Write, acl:Control.\n<#invitee>\n a acl:Authorization;\n acl:agent <${n.value}>;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Append.\n`;await i.store.fetcher.webOperation("PUT",r.value,{data:o,contentType:"text/turtle"})}(c,n,e),await async function(e,t){const n=i.store.any(t,r.ns.solid("privateTypeIndex"));if(!n)throw new Error("Private type index not found!");await i.store.fetcher.load(n);const o=r.widgets.newThing(n),s=[(0,a.st)(o,r.ns.rdf("type"),r.ns.solid("TypeRegistration"),n.doc()),(0,a.st)(o,r.ns.solid("forClass"),r.ns.meeting("LongChat"),n.doc()),(0,a.st)(o,r.ns.solid("instance"),e,n.doc())];await new Promise((e,t)=>{i.store.updater.update([],s,function(n,r,i){r?e():t(new Error(i))})})}(t,n),t}throw new Error("Chat does not exist and createIfMissing is false")};var r=n(500),i=n(9332),a=n(8230),o=n(8055);async function s(e){const t=await async function(){const e=i.authn.currentUser();if(null===e)throw new Error("Current user not found! Not logged in?");return await i.store.fetcher.load(e.doc()),e}(),n=await async function(e){const t=i.store.any(e,r.ns.space("storage"),void 0,e.doc());if(!t)throw new Error("Current user pod root not found!");return t}(t),s=function(e,t){const n=new URL(`IndividualChats/${new URL(e.value).host}/`,t.value).toString();return new a.NamedNode(n)}(e,n);let c=!0;try{await i.store.fetcher.load(new a.NamedNode(s.value+o.longChatPane.CHAT_LOCATION_IN_CONTAINER))}catch(e){c=!1}return{me:t,chatContainer:s,exists:c}}},8055(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.longChatPane=void 0;var r=n(9332),i=o(n(500)),a=o(n(8230));function o(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return(o=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}const s=i.ns,c=s.meeting("LongChat"),l="index.ttl#this",u=i.style.sidebarComponentStyle||" padding: 0.5em; width: 100%;",p=i.style.sidebarStyle||"overflow-x: auto; overflow-y: auto; border-radius: 1em; border: 0.1em solid white;";t.longChatPane={CHAT_LOCATION_IN_CONTAINER:l,icon:i.icons.iconBase+"noun_1689339.svg",name:"long chat",label:function(e,t){const n=t.session.store;return n.holds(e,s.rdf("type"),s.meeting("LongChat"))?"Chat channnel":n.holds(e,s.rdf("type"),s.sioc("Thread"))?"Thread":n.any(e,s.sioc("content"))&&n.any(e,s.dct("created"))?"message":null},mintClass:c,mintNew:function(e,t){const n=e.session.store,r=n.updater;if(t.me&&!t.me.uri)throw new Error("chat mintNew: Invalid userid "+t.me);const i=t.newInstance=t.newInstance||n.sym(t.newBase+l),a=i.doc();n.add(i,s.rdf("type"),s.meeting("LongChat"),a),n.add(i,s.dc("title"),"Chat channel",a),n.add(i,s.dc("created"),new Date,a),t.me&&n.add(i,s.dc("author"),t.me,a);const o=(e,t,n)=>`\n @prefix : <#>.\n @prefix acl: <http://www.w3.org/ns/auth/acl#>.\n @prefix foaf: <http://xmlns.com/foaf/0.1/>.\n @prefix lon: <./${t}>.\n\n :ControlReadWrite\n a acl:Authorization;\n acl:accessTo lon:;\n acl:agent <${e.uri}>;\n acl:default lon:;\n acl:mode acl:Control, acl:Read, acl:Write.\n :Read\n a acl:Authorization;\n acl:accessTo lon:;\n acl:agentClass foaf:Agent;\n acl:default lon:;\n acl:mode acl:Read.\n :Read${n}\n a acl:Authorization;\n acl:accessTo lon:;\n acl:agentClass acl:AuthenticatedAgent;\n acl:default lon:;\n acl:mode acl:Read, acl:${n}.`;return new Promise(function(e,i){r.put(a,n.statementsMatching(void 0,void 0,void 0,a),"text/turtle",function(n,r,a){r?e(t):i(new Error("FAILED to save new chat channel at: "+n+" : "+a))}).then(e=>new Promise((e,r)=>{t.me&&(n.fetcher.webOperation("PUT",t.newBase+".acl",{data:o(t.me,"","Append"),contentType:"text/turtle"}),n.fetcher.webOperation("PUT",t.newBase+"index.ttl.acl",{data:o(t.me,"index.ttl","Write"),contentType:"text/turtle"})),e(t)}))})},render:function(e,t,n){const o=t.dom,l=t.session.store,d=l.sym("https://solid.github.io/solid-panes/longCharPane/preferencesForm.ttl#this"),f=d.doc();l.holds(void 0,void 0,void 0,f)||a.parse('\n @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n @prefix solid: <http://www.w3.org/ns/solid/terms#>.\n @prefix ui: <http://www.w3.org/ns/ui#>.\n @prefix : <#>.\n\n :this\n <http://purl.org/dc/elements/1.1/title> "Chat preferences" ;\n a ui:Form ;\n ui:parts ( :colorizeByAuthor :expandImagesInline :newestFirst :inlineImageHeightEms\n :shiftEnterSendsMessage :authorDateOnLeft :showDeletedMessages).\n\n :colorizeByAuthor a ui:TristateField; ui:property solid:colorizeByAuthor;\n ui:label "Color user input by user".\n\n :expandImagesInline a ui:TristateField; ui:property solid:expandImagesInline;\n ui:label "Expand image URLs inline".\n\n :newestFirst a ui:TristateField; ui:property solid:newestFirst;\n ui:label "Newest messages at the top".\n\n :inlineImageHeightEms a ui:IntegerField; ui:property solid:inlineImageHeightEms;\n ui:label "Inline image height (lines)".\n\n :shiftEnterSendsMessage a ui:TristateField; ui:property solid:shiftEnterSendsMessage;\n ui:label "Shift-Enter sends message".\n\n :authorDateOnLeft a ui:TristateField; ui:property solid:authorDateOnLeft;\n ui:label "Author & date of message on left".\n\n :showDeletedMessages a ui:TristateField; ui:property solid:showDeletedMessages;\n ui:label "Show placeholders for deleted messages".\n',l,f.uri,"text/turtle");const h=l.statementsMatching(null,s.ui.property,null,f).map(e=>e.object);function m(e){const n=i.widgets.button(t.dom,i.icons.iconBase+"noun_1180156.svg","close",function(){e.parentNode.removeChild(e)});return n.style.float="right",n.style.margin="0.7em",delete n.style.backgroundColor,n}function g(e,n){const a=o.createElement("div"),s=r.authn.currentUser(),c={div:a,dom:o,noun:n,statusArea:a,me:s,refreshTarget:e},l=[t.session.paneRegistry.byName("chat")];return i.create.newThingUI(c,t,l),a}let v,b=null;let y=e,w=null,x=null;if(l.holds(e,s.rdf("type"),s.meeting("LongChat")));else if(l.holds(e,s.rdf("type"),s.sioc("Thread"))){x=e;const t=l.the(null,s.sioc("has_reply"),x,x.doc());if(!t)throw new Error("Thread has no root message "+x);if(y=l.any(null,s.wf("message"),t),!y)throw new Error("Thread root has no link to chatChannel")}else if(l.any(e,s.sioc("content"))&&l.any(e,s.dct("created"))&&(w=e,y=l.any(null,s.wf("message"),w),!y))throw new Error("Message has no link to chatChannel");const k=o.createElement("div"),_="20cm",E=k.appendChild(o.createElement("table"));E.style.maxHeight='12"';const C=E.appendChild(o.createElement("tr")),S=C.appendChild(o.createElement("td")),A=C.appendChild(o.createElement("td")),T=C.appendChild(o.createElement("td")),P=C.appendChild(o.createElement("td")),R=E.appendChild(o.createElement("tr"));S.style=p,S.style.paddingRight="1em",T.style=p,T.style.paddingLeft="1em",P.style=p,P.style.paddingLeft="1em",R.appendChild(o.createElement("td"));const I=R.appendChild(o.createElement("td"));R.appendChild(o.createElement("td"));const F=i.widgets.button(o,i.icons.iconBase+"noun_339237.svg","participants ...");I.appendChild(F),F.addEventListener("click",function(e){if(!v){v=o.createElement("div"),v.style=u,v.style.maxHeight=_,v.appendChild(m(v));const e=r.authn.currentUser();e||alert("Should be logeed in for partipants panel"),i.pad.manageParticipation(o,v,y.doc(),y,e,{})}S.contains(v)?(v.parentNode.removeChild(v),v=null):S.appendChild(v)});const N=i.widgets.button(o,i.icons.iconBase+"noun_1689339.svg","List of other chats ...");I.appendChild(N),N.addEventListener("click",async function(e){b||(b=o.createElement("div"),b.style=u,b.style.maxHeight=_,b.appendChild(m(b)),b.appendChild(await async function(e,t){const n=o.createElement("div"),r={dom:o,div:n,noun:t};return await i.login.registrationList(r,{public:!0,private:!0,type:e}),n.appendChild(g(n,t)),n}(s.meeting("LongChat"),"chat"))),S.contains(b)?b.parentNode.removeChild(b):S.appendChild(b)});let O=null;const L=i.widgets.button(o,i.icons.iconBase+"noun_344563.svg","Setting ...");I.appendChild(L),L.style.float="right",L.addEventListener("click",async function(e){O||(O=await async function(e){const{dom:t,noun:n}=e,a=t.createElement("div");a.appendChild(m(a)),a.style=u,a.style.minWidth="25em",a.style.maxHeight=_;const o=a.appendChild(t.createElement("table")),s=o.appendChild(t.createElement("tr")),p=o.appendChild(t.createElement("tr")),f=r.authn.currentUser();return f&&(await i.login.registrationControl({noun:n,me:f,statusArea:p,dom:t,div:s},y,c),a.appendChild(i.preferences.renderPreferencesForm(y,c,d,{noun:n,me:f,statusArea:p,div:a,dom:t,kb:l}))),a}({dom:o,noun:"chat room"})),P.contains(O)?(O.parentNode.removeChild(O),O=null):P.appendChild(O)}),k.setAttribute("class","chatPane");const j={infinite:!0},M={noun:"chat room",div:k,dom:o};async function D(e,t){const n={};n.thread=e,n.includeRemoveButton=!0,n.authorDateOnLeft=t.authorDateOnLeft,n.newestFirst=t.newestFirst,T.innerHTML="";const r=await i.infiniteMessageArea(o,l,y,n);r.style.resize="both",r.style.overflow="auto",r.style.maxHeight=_,T.appendChild(r)}return M.me=r.authn.currentUser(),async function(){let e;try{e=await i.preferences.getPreferencesForClass(y,c,h,M)}catch(e){i.widgets.complain(M,e)}for(const t in e)j[t.split("#")[1]]=e[t];w&&(j.selectedMessage=w),n.solo&&(j.solo=!0),x?j.thread=x:j.showThread=D;const t=await i.infiniteMessageArea(o,l,y,j);t.style.resize="both",t.style.overflow="auto",t.style.maxHeight=_,A.appendChild(t)}().then(void 0),k}}},7052(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getChat",{enumerable:!0,get:function(){return a.getChat}}),Object.defineProperty(t,"longChatPane",{enumerable:!0,get:function(){return i.longChatPane}}),Object.defineProperty(t,"shortChatPane",{enumerable:!0,get:function(){return r.shortChatPane}});var r=n(6303),i=n(8055),a=n(701)},6303(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shortChatPane=void 0;var r=n(9332),i=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o}(e,t)}(n(500));const a=i.ns;t.shortChatPane={icon:i.icons.iconBase+"noun_346319.svg",name:"chat",audience:[a.solid("PowerUser")],label:function(e,t){const n=t.session.store,r=n.each(e,a.wf("message")).length;return r>0?"Chat ("+r+")":n.holds(e,a.rdf("type"),a.meeting("Chat"))?"Meeting chat":n.holds(void 0,a.rdf("type"),a.foaf("ChatChannel"),e)?"IRC log":null},mintClass:a.meeting("Chat"),mintNew:function(e,t){if(!confirm("short Chat is deprecated in favor of long Chat.\nEmbedded chat for comments and existing short Chats will work.\nYou can report any issues at https://github.com/SolidOS/chat-pane ?\n\nDo you really want to create a new deprecated short Chat?"))return;const n=e.session.store,r=n.updater;if(t.me&&!t.me.uri)throw new Error("chat mintNew: Invalid userid "+t.me);const i=t.newInstance=t.newInstance||n.sym(t.newBase+"index.ttl#this"),o=i.doc();return n.add(i,a.rdf("type"),a.meeting("Chat"),o),n.add(i,a.dc("title"),"Chat",o),n.add(i,a.dc("created"),new Date,o),t.me&&n.add(i,a.dc("author"),t.me,o),new Promise(function(e,i){r.put(o,n.statementsMatching(void 0,void 0,void 0,o),"text/turtle",function(n,r,a){r?e(t):i(new Error("FAILED to save new tool at: "+n+" : "+a))})})},render:function(e,t){const n=t.session.store,o=t.dom,s=o.createElement("div");s.setAttribute("class","chatPane");const c={};let l;if(n.holds(e,a.rdf("type"),a.meeting("Chat")))l=e.doc();else if(n.any(e,i.ns.wf("message")))l=r.store.any(e,i.ns.wf("message")).doc();else if(n.holds(void 0,a.rdf("type"),a.foaf("ChatChannel"),e)||n.holds(e,a.rdf("type"),a.foaf("ChatChannel"))){const t=function(){const e=new $rdf.Query("IRC log entries"),t=[];return["chan","msg","date","list","pred","creator","content"].forEach(function(n){e.vars.push(t[n]=$rdf.variable(n))}),e.pat.add(t.chan,a.foaf("chatEventList"),t.list),e.pat.add(t.list,t.pred,t.msg),e.pat.add(t.msg,a.dc("date"),t.date),e.pat.add(t.msg,a.dc("creator"),t.creator),e.pat.add(t.msg,a.dc("description"),t.content),e};l=e.doc(),c.query=t()}else!function(e,t){const n=o.createElement("pre");n.setAttribute("style","background-color: "+t||0),s.appendChild(n),n.appendChild(o.createTextNode(e))}("Unknown chat type");return s.appendChild(i.messageArea(o,n,e,l,c)),n.updater.addDownstreamChangeListener(l,function(){i.widgets.refreshTree(s)}),s}}},3311(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderAutocompleteControl=async function(e,t,n,u){async function p(e,n){const r=e.uri;return d(),u(t,r)}function d(){b&&(y.removeChild(b),b=null)}const f=n.queryParameters||o.wikidataParameters,h=i.widgets.continueButton(e),m=i.widgets.cancelButton(e,d),g=n.class,v={queryParams:f,class:g,acceptButton:h,cancelButton:m};var b=null;(n=n||{}).editable=s.updater.editable(t.doc().uri,s);const y=e.createElement("div");if(y.setAttribute("style","display: flex; flex-flow: wrap;"),n.editable){y.style.width="100%";const o=y.appendChild(i.widgets.button(e,c,n.idNoun,async function(n){const a=await i.widgets.askName(e,r.store,y,i.ns.vcard("url"),null,"Solid ID");if(a)return u(t,a)}));i.widgets.makeDropTarget(o,async function(e){for(const n of e)await u(t,n)},null),n.dbLookup&&y.appendChild(i.widgets.button(e,l,n.idNoun,async function(t){b?(y.removeChild(b),b=null):((b=e.createElement("div")).setAttribute("style","display: flex; flex-flow: wrap;"),b.appendChild(await(0,a.renderAutoComplete)(e,v,p)),b.appendChild(h),b.appendChild(m),y.appendChild(b))}))}return y};var r=n(9332),i=n(500),a=n(1830),o=n(3705);const s=r.store,c=i.icons.iconBase+"noun_34653_green.svg",l=i.icons.iconBase+"noun_Search_875351.svg"},1830(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderAutoComplete=async function(e,t,n){function o(e,t){n(e,t)}async function s(e,n){if(t.acceptButton)return t.acceptButton.disabled=!1,E.value=n,w=n,void(x=e);o(e,n)}async function c(e){E.value===w?o(x,w):t.acceptButton.disabled=!0}function l(e,t){const n=e.split(" ");for(let e=0;e<n.length;e++){const r=n[e];if(t.toLowerCase().indexOf(r)<0)return!1}return!0}function u(){for(;k.children.length>1&&k.lastChild;)k.removeChild(k.lastChild)}async function p(){if(m)return;m=!0;const n=await(0,a.getPreferredLanguages)(),o=E.value.trim().toLowerCase();if(o.length<4)u(),f=!1,b=20;else{if(g&&v&&o.startsWith(v))return function(e){let t=0,n=null,i="";for(let r=k.children.length-1;r>0;r--){const a=k.children[r];l(e,a.textContent)?(t+=1,n=a.getAttribute("subject"),i=a.textContent,a.style.display="",a.style.color="blue"):a.style.display="none"}1===t&&n&&s(r.store.sym(n),i)}(o),void(m=!1);let c;try{c=await(0,a.queryPublicDataByName)(o,d,t.queryParams)}catch(t){return function(t){const n=k.appendChild(e.createElement("tr"));n.appendChild(i.widgets.errorMessageBlock(e,t,"pink")),i.style.setStyle(n,"autocompleteRowStyle"),n.style.padding="1em"}("Error querying db of organizations: "+t),void(m=!1)}f=!0;const p=c.length<a.AUTOCOMPLETE_LIMIT;v=p?o:null,u();const h=(0,a.filterByLanguage)(c,n);p&&h.length<=40&&(b=h.length),g=p&&h.length<=b,h.slice(0,b).forEach(t=>{const n=k.appendChild(e.createElement("tr"));i.style.setStyle(n,"autocompleteRowStyle");const a=t.subject.value,o=t.name?.value;n.setAttribute("style","padding: 0.3em;"),n.setAttribute("subject",a),n.style.color=g?"#080":"#000",n.textContent=o||"",n.addEventListener("click",async e=>{s(r.store.sym(a),o||"")})})}m=!1}const d=t.class;t.acceptButton&&t.acceptButton.addEventListener("click",c,!1);t.cancelButton;let f=!1;const h=null;let m=!1,g=!1;var v=null,b=20;const y=e.createElement("div");var w=null,x=null,k=y.appendChild(e.createElement("table"));k.setAttribute("style","max-width: 30em; margin: 0.5em;");const _=k.appendChild(e.createElement("tr"));i.style.setStyle(_,"autocompleteRowStyle");const E=_.appendChild(e.createElement("td")).appendChild(e.createElement("input"));E.setAttribute("type","text");const C=i.style.searchInputStyle||"border: 0.1em solid #444; border-radius: 0.5em; width: 100%; font-size: 100%; padding: 0.1em 0.6em";return E.setAttribute("style",C),E.addEventListener("keyup",function(e){13===e.keyCode&&c(e)},!1),E.addEventListener("input",async function(e){h&&clearTimeout(h);setTimeout(p,300)}),y};var r=n(9332),i=n(500),a=n(3705)},466(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPersonToGroup=async function(e,t){const n=[e.doc(),t.doc()];try{await u.fetcher.load(n)}catch(e){throw new Error("addPersonToGroup: "+e)}const r=u.findTypeURIs(e);if(!(c.vcard("Individual").uri in r)&&!(c.vcard("Organization").uri in r))return alert(`Can't add ${e} to a group: it has to be an individual or another group.`);const a=u.any(e,c.vcard("fn")),s=u.any(t,c.vcard("fn"));if(!a)return alert("No vcard name known for "+e);if(u.holds(e,c.vcard("fn"),null,t.doc()))return alert("ALREADY added "+a+" to group "+s);if(!confirm("Add "+a+" to group "+s+"?"))return;const l=[i.st(e,c.vcard("fn"),a,t.doc())],d=(0,o.getPersonas)(u,e).map(e=>e.value);d.length?d.forEach(n=>{l.push(i.st(u.sym(n),c.owl("sameAs"),e,t.doc())),l.push(i.st(t,c.vcard("hasMember"),u.sym(n),t.doc()))}):l.push(i.st(t,c.vcard("hasMember"),e,t.doc()));try{await p.update([],l),u.fetcher.unload(t.doc()),await u.fetcher.load(t.doc())}catch(e){throw new Error(`Error adding ${a} to group ${s}:`+e)}return e},t.getDataModelIssues=async function(e){const t=[],n=[];return e.forEach(e=>{u.each(e,c.vcard("hasMember"),null,e.doc()).forEach(r=>{const a=h(u,r,e.doc());if(a.length&&f(e,r))for(const o of a)if(!f(e,o)){t.push(i.st(e,c.vcard("hasMember"),r,e.doc())),n.push(i.st(e,c.vcard("hasMember"),o,e.doc()));break}})}),{del:t,ins:n}},t.getSameAs=h,t.groupMembers=function(e,t){const n=e.each(t,c.vcard("hasMember"),null,t.doc());let r=[];n.forEach(n=>{r=e.any(n,c.vcard("fn"),null,t.doc())?r.concat(n):r.concat(e.each(n,c.owl("sameAs"),null,t.doc()))});const i=new Set(r.map(e=>e.uri));return r=[...i].map(t=>e.sym(t)),r},t.isLocal=f,t.sanitizeToAlpha=d,t.saveNewContact=async function(e,t,n,r){await u.fetcher.load(e.doc());const a=u.any(e,c.vcard("nameEmailIndex")),o=l.genUuid(),s=u.sym(e.dir().uri+"Person/"+o+"/index.ttl#this"),d=s.doc(),f=[i.st(s,c.vcard("inAddressBook"),e,a),i.st(s,c.vcard("fn"),t,a),i.st(s,c.vcard("fn"),t,d),i.st(s,c.rdf("type"),r,d),i.st(d,c.dct("created"),new Date,d)];for(const e in n){const n=u.sym(e),r=n.doc();f.push(i.st(n,c.vcard("hasMember"),s,r),i.st(s,c.vcard("fn"),t,r))}try{await p.updateMany([],f)}catch(e){throw new Error("Updating new contact: "+e)}return s},t.saveNewGroup=async function(e,t){await u.fetcher.load(e.doc());const n=u.any(e,c.vcard("groupIndex")),r=d(t),a=u.sym(e.dir().uri+"Group/"+r+".ttl#this"),o=a.doc();try{await u.fetcher.load(n)}catch(e){throw new Error("Error loading group index!"+n.uri+": "+e)}if(u.holds(e,c.vcard("includesGroup"),a,n))return a;const s=[i.st(e,c.vcard("includesGroup"),a,n),i.st(a,c.rdf("type"),c.vcard("Group"),n),i.st(a,c.vcard("fn"),t,n)];try{await p.update([],s)}catch(e){throw new Error("Could not update group index "+e)}const l=[i.st(e,c.vcard("includesGroup"),a,o),i.st(a,c.rdf("type"),c.vcard("Group"),o),i.st(a,c.vcard("fn"),t,o)];try{await p.update([],l)}catch(e){throw new Error("Could not update group file: "+e)}return a},t.updateMany=async function(e,t=[]){const n=e.concat(t).map(e=>e.why),r=[];n.forEach(e=>{r.find(t=>t.equals(e))||r.push(e)});const i=r.map(n=>u.updater.update(e.filter(e=>e.why.sameTerm(n)),t.filter(e=>e.why.sameTerm(n))));return Promise.all(i)};var r=s(n(500)),i=s(n(8230)),a=n(9332),o=n(4416);function s(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return(s=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}const c=r.ns,l=r.utils,u=a.store,p=u.updater;function d(e){return e.replace(/\W/gu,"_").replace(/_+/g,"_")}function f(e,t){const n=e.dir().dir().dir();return t.uri&&t.uri.startsWith(n.uri)}function h(e,t,n){return e.each(t,c.owl("sameAs"),null,n).concat(e.each(null,c.owl("sameAs"),t,n))}},3955(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.getSameAs=f;var r=n(9332),i=n(466),a=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o}(e,t)}(n(500)),o=n(7587),s=n(547),c=n(4195),l=n(9208);const u=a.ns,p=a.utils,d=a.style;t.default={icon:a.icons.iconBase+"noun_99101.svg",name:"contact",label:function(e,t){const n=t.session.store.findTypeURIs(e);return n[u.vcard("Individual").uri]?"Contact":n[u.vcard("Organization").uri]?"contact":n[u.foaf("Person").uri]||n[u.schema("Person").uri]?"Person":n[u.vcard("Group").uri]?"Group":n[u.vcard("AddressBook").uri]?"Address book":null},mintClass:a.ns.vcard("AddressBook"),mintNew:o.mintNewAddressBook,render:function(e,t,n={}){const o=this;function h(e){y.appendChild(a.widgets.errorMessageBlock(v,e,"pink"))}function m(e,t){e||h("Error: "+t)}function g(e){return a.login.newAppInstance(v,{noun:"address book",appPathSegment:"contactorator.timbl.com"},function(t,n){o.clone(e,n,{me:w,div:y,dom:v})})}const v=t.dom,b=t.session.store,y=v.createElement("div"),w=r.authn.currentUser();return a.aclControl.preventBrowserDropEvents(v),y.setAttribute("class","contactPane"),async function(){a.aclControl.preventBrowserDropEvents(v);const o=b.findTypeURIs(e);let w=r.authn.currentUser();const x={target:e,me:w,noun:"address book",div:y,dom:v};function k(e,o,s){b.fetcher.load(e).then(function(o){!function(e,o,s){const x=p.label(u.vcard("AddressBook"));let k=e[0];const _=b.any(k,u.vcard("groupIndex"));let E={},C={};const S=s.foreignGroup||k;let A=b.any(S,u.dc("title"))||b.any(S,u.vcard("fn"));n.solo&&A&&"undefined"!=typeof document&&(document.title=A.value);function T(e){if(e)return e;let t;for(const e in E){t=b.sym(e);const n=b.any(void 0,u.vcard("includesGroup"),t);if(n)return n}throw new Error("findBookFromGroups: Cant find address book which this group is part of")}function P(e){const t=b.any(e,u.vcard("fn"))||b.any(e,u.foaf("name"))||b.any(e,u.vcard("organization-name"));return t?t.value:"???"}function R(e){const t=ce.value.trim().toLowerCase();if(0===t.length)return!0;const n=t.split(" ");for(let t=0;t<n.length;t++){const r=n[t];if(e.toLowerCase().indexOf(r)<0)return!1}return!0}function I(e){le.innerHTML="loading...",C={},C[e.uri]=!0,F();const t=k?B(e):e;b.fetcher.nowOrWhenFetched(t.doc(),void 0,function(n,r){if(le.innerHTML="",!n)return m(n,"Can't load card: "+t+": "+r);le.appendChild(j(v,t,"contact")),le.appendChild(v.createElement("br")),le.appendChild(a.widgets.linkIcon(v,t));const i=a.widgets.deleteButtonWithCheck(v,le,"contact",async function(){const t=e.dir(),n=b.any(e,u.vcard("fn"));if(confirm("Delete contact "+n+" completely?? "+t)){await O();const n=b.any(k,u.vcard("nameEmailIndex"));await b.fetcher.load(n);const r=(0,l.groupMembership)(e);let i=[];r.forEach(t=>{f(b,e,t.doc()).forEach(e=>{1===f(b,e,t.doc()).length&&(i=i.concat(b.statementsMatching(t,u.vcard("hasMember"),e,t.doc())))})}),await b.updater.updateMany(i),await D(e),await U(b,t),z(),le.innerHTML="Contact Data Deleted."}});i.style="height: 2em;"})}function F(e){let t=0,n=null;for(let e=0;e<ie.children.length;e++){const r=ie.children[e],i=R(P(r.subject));i&&(t++,n=r),r.setAttribute("style",i?C[r.subject.uri]?"background-color: #cce;":"":"display: none;")}if(1===t&&e){I(n.subject)}}function N(e,t,n){function r(t,r){r.setAttribute("style","background-color: #ffe;"),b.fetcher.nowOrWhenFetched(t.doc(),void 0,function(o,s){if(!o){const e="Can't load group file: "+t+": "+s;return a.push(e),m(o,e)}r.setAttribute("style","background-color: #cce;"),e[t.uri]=!0,q(),z(),i-=1,i||n&&n(0===a.length,a)})}let i=t.children.length;var a=[];for(let e=0;e<t.children.length;e++){const n=t.children[e];r(n.subject,n)}}async function O(){await b.fetcher.load(_);const e=k?b.each(k,u.vcard("includesGroup"),null,_):[];return await b.fetcher.load(e),e}function L(){let t=[];return s.foreignGroup&&t.push(["",b.any(s.foreignGroup,u.vcard("fn")),s.foreignGroup]),k&&(e.forEach(function(e){const n=(e?b.each(e,u.vcard("includesGroup"),null,_):[]).map(function(t){return[e,b.any(t,u.vcard("fn")),t]});t=t.concat(n)}),t.sort()),t.map(e=>e[2])}function j(e,n,r){const i=t.session.paneRegistry.byName(r).render(n,t);return i.setAttribute("style","border: 0.1em solid #444; border-radius: 0.5em"),i}function M(e,t){let n=P(e),r=P(t);if(n&&r){if(n=n.toLowerCase(),r=r.toLowerCase(),n>r)return 1;if(n<r)return-1}return e.uri>t.uri?1:e.uri<t.uri?-1:0}async function D(e){const t=b.statementsMatching(e).concat(b.statementsMatching(void 0,void 0,e));try{await b.updater.updateMany(t),await b.fetcher.delete(e.doc())}catch(t){h("Error deleting thing "+e+": "+t)}}function U(e,t){return new Promise(function(n){e.fetcher.load(t).then(function(){const r=e.each(t,u.ldp("contains")).map(t=>{if(e.holds(t,u.rdf("type"),u.ldp("BasicContainer")))return U(e,t);if(!confirm(" Really DELETE File "+t))throw new Error("User aborted delete file");return e.fetcher.webOperation("DELETE",t.uri)});if(!confirm(" Really DELETE folder "+t))throw new Error("User aborted delete file");r.push(e.fetcher.webOperation("DELETE",t.uri)),Promise.all(r).then(e=>{n()})})})}function B(e,t){const n=b.allAliases(e),r=k.dir().uri;for(let e=0;e<n.length;e++)if(n[e].uri.slice(0,r.length)===r)return n[e];throw new Error("No local URI for "+e)}function z(){function e(e,t){e.addEventListener("click",function(e){e.preventDefault(),I(t)})}let t=[];Object.keys(E).map(e=>b.sym(e)).forEach(e=>{E[e.value]&&(t=t.concat((0,i.groupMembers)(b,e)))}),t.sort(M);for(let e=0;e<t.length-1;)t[e].uri===t[e+1].uri?t.splice(e,1):e++;function n(t){const n=v.createElement("tr"),r=n.appendChild(v.createElement("td"));r.setAttribute("style",ue),n.subject=t;const i=P(t);return r.textContent=i,n.subject=t,a.widgets.makeDraggable(n,t),e(n,t),n}Z.textContent=t.length>5?t.length+" contacts":"contact",p.syncTableToArrayReOrdered(ie,t,n),F()}function H(e,t){for(let n=0;n<e.children.length;n++){const r=e.children[n];r.subject&&r.setAttribute("style",t[r.subject.uri]?"background-color: #cce;":"")}}function q(){return H(ne,E)}function $(){function e(e){async function n(t){t.forEach(function(t){const n=b.sym(t);try{(0,i.addPersonToGroup)(n,e)}catch(e){h(e)}z()})}function r(n){n.preventDefault();const r=b.sym(e.uri.split("#")[0]);n.metaKey||(E={}),E[e.uri]=!E[e.uri],q(),ie.innerHTML="",b.fetcher.nowOrWhenFetched(r.uri,void 0,function(i,o){if(!i)return m(i,"Can't load group file: "+r+": "+o);if(z(),!n.metaKey){le.innerHTML="";let n=!1;const r=a.aclControl.ACLControlBox5(e,t,"group",b,function(e,t,n){e||(n&&n.status&&403===n.status?le.innerHTML="No control access.":le.innerHTML="Failed to load access control: "+t)}),i=le.appendChild(v.createElement("button"));i.style.cssText="padding: 1em; margin: 1em";const o=i.appendChild(v.createElement("img"));o.style.cssText="width: 1.5em; height: 1.5em",o.setAttribute("src",a.icons.iconBase+"noun_123691.svg"),i.addEventListener("click",function(){n=!n,n?le.appendChild(r):le.removeChild(r)})}})}const o=b.any(e,u.vcard("fn")),s=v.createElement("tr");return s.subject=e,a.widgets.makeDraggable(s,e),s.setAttribute("style",ue),s.textContent=o,a.widgets.makeDropTarget(s,n),a.widgets.deleteButtonWithCheck(v,s,"group "+o,async function(){await D(e),$()}),s.addEventListener("click",r,!0),s}const n=L();p.syncTableToArrayReOrdered(ne,n,e),q()}async function W(){const e=await O(),{del:t,ins:n}=await(0,i.getDataModelIssues)(e);t.length&&confirm(`Groups data model need to be updated? (${t.length})`)&&(await b.updater.updateMany(t,n),alert("Update done"))}async function V(e){le.innerHTML="";const n=b.any(k,u.vcard("groupIndex"));try{await b.fetcher.load(n)}catch(e){}const r=await a.widgets.askName(v,b,le,a.ns.foaf("name"),u.vcard("Group"),"group");if(!r)return;let o;try{o=await(0,i.saveNewGroup)(k,r)}catch(e){return void(le.innerHTML="Failed to save group"+e)}E={},E[o.uri]=!0,$(),le.innerHTML="",le.appendChild(a.aclControl.ACLControlBox5(o.doc(),t,"group",b,function(e,t){e||(le.innerHTML="Group sharing setup failed: "+t)}))}async function G(e){le.innerHTML="";const t=T(k);try{await b.fetcher.load(t)}catch(e){throw new Error("Book won't load:"+t)}const n=b.any(t,u.vcard("nameEmailIndex"));if(!n)throw new Error("Wot no nameEmailIndex?");await b.fetcher.load(n);const r=await a.widgets.askName(v,b,le,a.ns.foaf("name"),e);if(!r)return;let o;le.innerHTML="indexing...",k=T(k);try{o=await(0,i.saveNewContact)(k,r,E,e)}catch(e){alert("Error: can't save new contact: "+e)}C={},C[o.uri]=!0,z(),le.innerHTML="",le.appendChild(j(v,o,"contact"))}A=A?A.value:x;const K=v.createElement("table");K.setAttribute("style","border-collapse: collapse; margin-right: 0; max-height: 9in;"),y.appendChild(K);const J=K.appendChild(v.createElement("tr")),Q=K.appendChild(v.createElement("tr")),Y=K.appendChild(v.createElement("tr")),X=J.appendChild(v.createElement("td")),Z=J.appendChild(v.createElement("td")),ee=J.appendChild(v.createElement("td")),te=Q.appendChild(v.createElement("td")),ne=te.appendChild(v.createElement("table")),re=Q.appendChild(v.createElement("td")),ie=re.appendChild(v.createElement("table")),ae=Y.appendChild(v.createElement("td")),oe=Y.appendChild(v.createElement("td")),se=Y.appendChild(v.createElement("td"));ee.appendChild(v.createElement("div"));const ce=ee.appendChild(v.createElement("input"));ce.setAttribute("type","text"),ce.style=d.searchInputStyle||"border: 0.1em solid #444; border-radius: 0.5em; width: 100%; font-size: 100%; padding: 0.1em 0.6em",ce.addEventListener("input",function(e){F(!0)});const le=Q.appendChild(v.createElement("td"));le.setAttribute("style","margin: 0;");const ue="padding: 0.1em;";function pe(e){const t=e?"":"display: none;";X.setAttribute("style","min-width: 10em; padding-bottom 0.2em;"+t);const n="padding: 0.1em;";te.setAttribute("style",n+t),ae.setAttribute("style",n+t)}X.textContent="groups",X.setAttribute("style","min-width: 10em; padding-bottom 0.2em;"),pe(!0),s.foreignGroup&&(E[s.foreignGroup.uri]=!0);if(k){const e=X.appendChild(v.createElement("button"));e.textContent="All";const t="margin-left: 1em; font-size: 100%;";e.setAttribute("style",t),e.addEventListener("click",function(n){e.state=e.state?0:1,ie.innerHTML="",e.state?(e.setAttribute("style",t+"background-color: #ff8;"),N(E,ne,function(n,r){if(!n)return h(r);e.setAttribute("style",t+"background-color: black; color: white"),q()})):(e.setAttribute("style",t+"background-color: #cfc;"),E={},q())}),b.fetcher.nowOrWhenFetched(_.uri,k,function(e,t){e&&($(),z())})}else $(),z(),pe(!1);Z.textContent="name",Z.setAttribute("style","min-width: 18em;"),re.setAttribute("style","overflow:scroll;");const de=v.createElement("button"),fe=v.createElement("div");de.setAttribute("type","button"),w||de.setAttribute("disabled","true");r.authn.checkUser().then(e=>{e&&(w=e,de.removeAttribute("disabled"))}),fe.appendChild(de),de.innerHTML="New Contact",oe.appendChild(fe),de.addEventListener("click",async e=>G(u.vcard("Individual")),!1);const he=v.createElement("button"),me=v.createElement("div");he.setAttribute("type","button"),w||he.setAttribute("disabled","true");if(r.authn.checkUser().then(e=>{e&&(w=e,he.removeAttribute("disabled"))}),me.appendChild(he),he.innerHTML="New Organization",oe.appendChild(me),he.addEventListener("click",async e=>G(u.vcard("Organization")),!1),k){const e=ae.appendChild(v.createElement("button"));e.setAttribute("type","button"),e.innerHTML="New Group",e.addEventListener("click",V,!1);const n=se.appendChild(v.createElement("button"));n.setAttribute("type","button"),n.innerHTML="Tools",n.addEventListener("click",function(e){le.innerHTML="",le.appendChild((0,c.toolsPane)(N,E,ne,k,t,w))})}se.appendChild(g(k)),y.appendChild(v.createElement("hr")),W().then(()=>{})}(e,0,s)}).catch(function(e){h(e)})}o[u.vcard("Individual").uri]||o[u.foaf("Person").uri]||o[u.schema("Person").uri]||o[u.vcard("Organization").uri]||o[u.schema("Organization").uri]?(0,s.renderIndividual)(v,y,e,t).then(()=>{}):o[u.vcard("Group").uri]?a.login.findAppInstances(x,u.vcard("AddressBook")).then(function(t){const n=t.instances,r={foreignGroup:e};n.length>0?k(n,0,r):k([],0,r)}).catch(function(e){a.widgets.complain(x,e)}):o[u.vcard("AddressBook").uri]&&k([e],0,{});w=r.authn.currentUser(),w||a.login.ensureLoadedProfile(x).then(e=>{w=e.me},e=>{y.appendChild(a.widgets.errorMessageBlock(e))});"undefined"!=typeof document&&document.location&&"http://localhost"===(""+document.location).slice(0,16)&&(w=b.any(e,a.ns.acl("owner")));return y}().then(()=>{},e=>h(""+e)),y}};function f(e,t,n){return e.each(t,u.owl("sameAs"),null,n).concat(e.each(null,u.owl("sameAs"),t,n))}},9208(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupMembership=c,t.renderGroupMemberships=async function(e,t){function n(t){const n={deleteFunction:function(){!async function(t,n){const o=u.any(t,a.vcard("fn")),s=u.any(n,a.vcard("fn")),c=u.each(null,a.owl("sameAs"),t,n.doc());let d=[];c.forEach(e=>{u.statementsMatching(e,a.owl("sameAs"),t,n.doc())&&(d=d.concat(e))});let f=t;if(d.length>0&&(f=d[0]),u.each(null,a.vcard("hasMember"),f).length<2)return void alert("Must be a member of at least one group. Add to another group first.");if(confirm("Remove "+o+" from group "+s+"?")){let t=u.statementsMatching(e,void 0,void 0,n.doc()).concat(u.statementsMatching(void 0,void 0,e,n.doc()));d.forEach(e=>{u.statementsMatching(e,a.owl("sameAs"),void 0,n.doc()).length<2&&(t=t.concat(u.statementsMatching(void 0,void 0,e,n.doc())))}),u.updater.update(t,[],function(e,t,i){if(!t){const e="Error removing member from group "+n+": "+i;p.parentNode.appendChild(r.widgets.errorMessageBlock(l,e,"pink"))}}),u.fetcher.unload(n.doc()),await u.fetcher.load(n.doc()),i()}}(e,t)},noun:"membership"};return r.widgets.personTR(l,null,t,n)}function i(){o.syncTableToArray(p,c(e),n)}async function s(e=null){if(!e&&!(e=u.any(void 0,a.vcard("includesGroup"))))return;const t=u.any(e,a.vcard("groupIndex")),n=e?u.each(e,a.vcard("includesGroup"),null,t):[];await u.fetcher.load(n)}const{dom:l}=t,u=t.session.store,p=l.createElement("table");return await s(),p.refresh=i,i(),p};var r=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o}(e,t)}(n(500)),i=n(9332);const a=r.ns,o=r.utils,s=i.store;function c(e){let t=s.statementsMatching(null,a.owl("sameAs"),e).map(e=>e.why).concat(s.each(null,a.vcard("hasMember"),e));const n=new Set(t.map(e=>e.uri));return t=[...n].map(e=>s.sym(e)),t}},547(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadTurtleText=f,t.renderIndividual=async function(e,t,n,l){function h(n){t.appendChild(r.widgets.errorMessageBlock(e,n,"pink"))}function m(){t.appendChild(e.createElement("div")).setAttribute("style","height: 1em")}const g=p.findTypeURIs(n),v=!(!g[u.vcard("Organization").uri]&&!g[u.schema("Organization").uri]),b=p.updater.editable(n.doc().uri,p),y=p.sym("https://solid.github.io/solid-panes/contact/individualForm.ttl#form1");f(p,y,'# This turtle file defined the forms usied in the contacts management\n#\n# Indivduals and orgs are in one file as they both\n# share some forms (address etc) and also interact (roles)\n\n# Now hand-edited, was originally made using form editor.\n# Forms documentaion: https://solid.github.io/solid-ui/Documentation/forms-intro.html\n\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix dct: <http://purl.org/dc/terms/>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix prov: <http://www.w3.org/ns/prov#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix schema: <http://schema.org/>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n@prefix : <#>.\n\n# Ontology additions or interpretations needed for the form to work well\n\n# The ontology file doesn\'t make them disjoint. This makes the selector be a choice.\nvcard:TelephoneType owl:disjointUnionOf ( vcard:Cell vcard:Home vcard:Work) .\nvcard:Type owl:disjointUnionOf (vcard:Home vcard:Work) . # for email\n\n# Better field labels\nvcard:Cell ui:label "mobile"@en . # app will imake nitial caps if nec\nvcard:hasAddress ui:label "address"@en .\nvcard:bday ui:label "born"@en.\nvcard:hasEmail ui:label "email"@en .\nvcard:hasTelephone ui:label "phone"@en .\nvcard:note ui:label "notes"@en .\n\n\n\n# Ontology data to drive a top classifier\n\nfoaf:Agent owl:disjointUnionOf (\n vcard:Individual\n # @@ schema:robot @@ schem:SoftwareApplication, n0:Agent, n0:Person,\n prov:SoftwareAgent\n # vcard:Group a group of agents is not (currently) an agent itself.\n # You can\'t get a decision out of it so it can\'t own a bank account\n vcard:Organization\n).\n\n\n# Ontology data to drive the classifier\n\nsolid:InterestingOrganization owl:disjointUnionOf (\n# Airline - a Corpration\n# Consortium - a Corporation or a NGO\n schema:Corporation\n schema:EducationalOrganization\n schema:ResearchOrganization\n# FundingScheme - eh?\n schema:GovernmentOrganization\n# LibrarySystem\n# LocalBusiness - Corporation\n schema:MedicalOrganization\n schema:NGO\n # NewsMediaOrganization - a Corporation or a NGO\n schema:MusicGroup # e.g. a band\n schema:Project # like Solid\n schema:SportsOrganization # a Team\n ) .\n\n#########################################################\n# The forms themselves\n\nfoaf:Agent ui:creationForm :AgentForm .\n\n:AgentForm a ui:Form; schema:name "Form for editing a agent" ;\n ui:parts ( :AgentClassifier :AgentOptions ) .\n\n :AgentClassifier a ui:Classifier; ui:label "What sort of agent?"@en;\n ui:category foaf:Agent .\n\n:AgentOptions a ui:Options; ui:dependingon rdf:type;\n ui:case [ ui:for vcard:Individual; ui:use :form1 ],\n [ ui:for vcard:Organization; ui:use :orgDetailsForm ],\n [ ui:for prov:SoftwareAgent; ui:use :robotDetailsForm ] .\n\n# Robots\n\n:robotDetailsForm a ui:Form; ui:parts ( ) . # @@@@\n\n# Individual-specific form\n\nvcard:Individual\n ui:creationForm :form1 .\n\n# The addressComment, etc., fields with a comment before each type of field\n# were originally partly because the labels on the fields were clumsy like "hasAddress".\n# This is fixed by adding the ui:label to the properties above, so let\'s try\n# removing the little micro-headings\n\n# For org:\n:orgDetailsForm a ui:Form ; dct:title "Contact details for an organozation";\n ui:parts (\n :OrgClassifier\n\n :fullNameField\n :addresses\n :eMails\n :telephones\n :noteField ) .\n# For individual:\n:form1\n dct:title "Contact Details for a person" ;\n a ui:Form ;\n ui:part\n :fullNameField, :roleField, :orgNameField,\n # :addressesComment,\n :addresses,\n # :emailComment,\n :eMails,\n# :telephoneComment,\n :telephones,\n# :noteComment,\n :noteField ;\n ui:parts (\n :fullNameField :roleField :orgNameField\n # :addressesComment\n :addresses\n # :emailComment\n :eMails\n # :telephoneComment\n :telephones :birthdayField\n # :noteComment\n :noteField ) .\n\n :fullNameField\n a ui:SingleLineTextField ;\n ui:label "Name";\n ui:maxLength "128" ;\n ui:property vcard:fn ;\n ui:size "40" .\n\n :roleField\n a ui:SingleLineTextField ;\n ui:suppressEmptyUneditable true;\n ui:maxLength "128" ;\n ui:property vcard:role ;\n ui:size "40" .\n\n :orgNameField\n a ui:SingleLineTextField ;\n ui:suppressEmptyUneditable true;\n ui:maxLength "128" ;\n ui:property vcard:organization-name ;\n ui:size "40" .\n\n\n:addressesComment\n a ui:Comment ;\n ui:suppressIfUneditable true;\n ui:contents "Address" .\n\n\n:addresses\n dct:title "Address details" ;\n a ui:Multiple ;\n ui:part :oneAddress ;\n ui:property vcard:hasAddress .\n\n:oneAddress\n a ui:Group ;\n ui:parts ( :id1409437207443 :id1409437292400 :id1409437421996 :id1409437467649 :id1409437569420 ). # :id1409437646712\n\n:id1409437207443\n a ui:SingleLineTextField ;\n ui:maxLength "128" ;\n ui:property vcard:street-address ;\n ui:size "40" .\n\n:id1409437292400\n a ui:SingleLineTextField ;\n ui:maxLength "128" ;\n ui:property vcard:locality ;\n ui:size "40" .\n\n:id1409437421996\n a ui:SingleLineTextField ;\n ui:maxLength "25" ;\n ui:property vcard:postal-code ;\n ui:size "25" .\n\n:id1409437467649\n a ui:SingleLineTextField ;\n ui:maxLength "128" ;\n ui:property vcard:region ;\n ui:size "40" .\n\n:id1409437569420\n a ui:SingleLineTextField ;\n ui:maxLength "128" ;\n ui:property vcard:country-name ;\n ui:size "40" .\n\n:id1409437646712\n a ui:Classifier ;\n ui:from rdf:Class ;\n ui:property rdf:type .\n\n\n##############################\n\n:emailComment\n a ui:Comment ;\n ui:suppressIfUneditable true;\n\n ui:contents "Email" .\n\n\n:eMails\n a ui:Multiple ;\n ui:part :oneEMail ;\n ui:property vcard:hasEmail .\n\n:oneEMail\n a ui:Group ; # hint: side by side is good\n ui:part :emailValue, :emailType ;\n ui:parts ( :emailType :emailValue ).\n\n:emailValue\n a ui:EmailField ; ui:label "email";\n ui:property vcard:value ;\n ui:size "50" .\n\n:emailType\n a ui:Classifier ;\n ui:canMintNew "0" ;\n ui:category vcard:Type ;\n ui:from vcard:Type ;\n ui:property rdf:type .\n\n\n##############################\n\n:telephoneComment\n a ui:Comment ;\n ui:suppressIfUneditable true;\n ui:contents "Phones" .\n\n\n:telephones\n a ui:Multiple ;\n ui:part :onetelephone ;\n ui:property vcard:hasTelephone .\n\n:onetelephone\n a ui:Group ;\n ui:part :telephoneValue, :telephoneType ;\n ui:parts ( :telephoneType :telephoneValue ).\n\n:telephoneValue\n a ui:PhoneField ;\n ui:property vcard:value ;\n ui:size "50" .\n\n:telephoneType\n a ui:Classifier ;\n ui:canMintNew "0" ;\n ui:category vcard:TelephoneType ;\n ui:from vcard:Type ;\n ui:property rdf:type .\n\n##############################\n\n:birthdayField\n a ui:DateField;\n ui:label "Born";\n ui:suppressEmptyUneditable true;\n ui:property vcard:bday .\n\n##############################\n\n:noteComment\n a ui:Comment ;\n ui:suppressIfUneditable true;\n ui:contents "General Notes" .\n\n:noteField\n a ui:MultiLineTextField ;\n ui:suppressEmptyUneditable true;\n\n ui:property vcard:note .\n\n\n############ organization forms\n\n:OrganinizatioCreationForm a ui:Form; schema:name "Form for editing contact details of an organization" ;\n ui:parts ( :OrgClassifier :homePageURIField ) .\n\n\n:OrgClassifier a ui:Classifier; ui:label "What sort of organization?"@en;\n ui:category solid:InterestingOrganization .\n\n\n:instituteNameField\n a ui:SingleLineTextField ;\n ui:label "Intitute Name";\n ui:maxLength "200" ;\n ui:property schema:name ;\n ui:size "80" .\n\n :homePageURIField a ui:NamedNodeURIField;\n ui:property schema:url . # @@ ??\n\n :initituteTypeField a ui:Classifier;\n ui:label "What sort of organization";\n ui:category solid:InterestingOrganization .\n');const w=p.sym("https://solid.github.io/solid-panes/contact/individualForm.ttl#orgDetailsForm"),x=r.ns.vcard("Type").doc();p.holds(void 0,void 0,void 0,x)||c.parse('@prefix : <http://www.w3.org/2006/vcard/ns#> .\n@prefix owl: <http://www.w3.org/2002/07/owl#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n@prefix xml: <http://www.w3.org/XML/1998/namespace> .\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n\n:Acquaintance a owl:Class ;\n rdfs:label "Acquaintance"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Agent a owl:Class ;\n rdfs:label "Agent"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:BBS a owl:Class ;\n rdfs:label "BBS"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType ;\n owl:deprecated true .\n\n:Car a owl:Class ;\n rdfs:label "Car"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType ;\n owl:deprecated true .\n\n:Cell a owl:Class ;\n rdfs:label "Cell"@en ;\n rdfs:comment "Also called mobile telephone"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType .\n\n:Child a owl:Class ;\n rdfs:label "Child"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Colleague a owl:Class ;\n rdfs:label "Colleague"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Contact a owl:Class ;\n rdfs:label "Contact"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Coresident a owl:Class ;\n rdfs:label "Coresident"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Coworker a owl:Class ;\n rdfs:label "Coworker"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Crush a owl:Class ;\n rdfs:label "Crush"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Date a owl:Class ;\n rdfs:label "Date"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Dom a owl:Class ;\n rdfs:label "Dom"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:Emergency a owl:Class ;\n rdfs:label "Emergency"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Fax a owl:Class ;\n rdfs:label "Fax"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType .\n\n:Female a owl:Class ;\n rdfs:label "Female"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Gender .\n\n:Friend a owl:Class ;\n rdfs:label "Friend"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Home a owl:Class ;\n rdfs:label "Home"@en ;\n rdfs:comment "This implies that the property is related to an individual\'s personal life"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type .\n\n:ISDN a owl:Class ;\n rdfs:label "ISDN"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:Internet a owl:Class ;\n rdfs:label "Internet"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:Intl a owl:Class ;\n rdfs:label "Intl"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:Kin a owl:Class ;\n rdfs:label "Kin"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Label a owl:Class ;\n rdfs:label "Label"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:Male a owl:Class ;\n rdfs:label "Male"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Gender .\n\n:Me a owl:Class ;\n rdfs:label "Me"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Met a owl:Class ;\n rdfs:label "Met"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Modem a owl:Class ;\n rdfs:label "Modem"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType ;\n owl:deprecated true .\n\n:Msg a owl:Class ;\n rdfs:label "Msg"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType ;\n owl:deprecated true .\n\n:Muse a owl:Class ;\n rdfs:label "Muse"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Neighbor a owl:Class ;\n rdfs:label "Neighbor"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:None a owl:Class ;\n rdfs:label "None"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Gender .\n\n:Other a owl:Class ;\n rdfs:label "Other"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Gender .\n\n:PCS a owl:Class ;\n rdfs:label "PCS"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType ;\n owl:deprecated true .\n\n:Pager a owl:Class ;\n rdfs:label "Pager"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType .\n\n:Parcel a owl:Class ;\n rdfs:label "Parcel"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:Parent a owl:Class ;\n rdfs:label "Parent"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Postal a owl:Class ;\n rdfs:label "Postal"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:Pref a owl:Class ;\n rdfs:label "Pref"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:Sibling a owl:Class ;\n rdfs:label "Sibling"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Spouse a owl:Class ;\n rdfs:label "Spouse"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Sweetheart a owl:Class ;\n rdfs:label "Sweetheart"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Tel a owl:Class ;\n rdfs:label "Tel"@en ;\n rdfs:comment "This class is deprecated. Use the hasTelephone object property."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:Text a owl:Class ;\n rdfs:label "Text"@en ;\n rdfs:comment "Also called sms telephone"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType .\n\n:TextPhone a owl:Class ;\n rdfs:label "Text phone"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType .\n\n:Unknown a owl:Class ;\n rdfs:label "Unknown"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Gender .\n\n:Video a owl:Class ;\n rdfs:label "Video"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType .\n\n:Voice a owl:Class ;\n rdfs:label "Voice"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType .\n\n:Work a owl:Class ;\n rdfs:label "Work"@en ;\n rdfs:comment "This implies that the property is related to an individual\'s work place"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type .\n\n:X400 a owl:Class ;\n rdfs:label "X400"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:adr a owl:ObjectProperty ;\n rdfs:label "address"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasAddress .\n\n:agent a owl:ObjectProperty ;\n rdfs:label "agent"@en ;\n rdfs:comment "This object property has been deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:anniversary a owl:DatatypeProperty ;\n rdfs:label "anniversary"@en ;\n rdfs:comment "The date of marriage, or equivalent, of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range [ a rdfs:Datatype ;\n owl:unionOf ( xsd:dateTime xsd:gYear ) ] .\n\n:bday a owl:DatatypeProperty ;\n rdfs:label "birth date"@en ;\n rdfs:comment "To specify the birth date of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range [ a rdfs:Datatype ;\n owl:unionOf ( xsd:dateTime xsd:dateTimeStamp xsd:gYear ) ] .\n\n:category a owl:DatatypeProperty ;\n rdfs:label "category"@en ;\n rdfs:comment "The category information about the object, also known as tags"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:class a owl:DatatypeProperty ;\n rdfs:label "class"@en ;\n rdfs:comment "This data property has been deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:email a owl:ObjectProperty ;\n rdfs:label "email"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasEmail .\n\n:extended-address a owl:DatatypeProperty ;\n rdfs:label "extended address"@en ;\n rdfs:comment "This data property has been deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:geo a owl:ObjectProperty ;\n rdfs:label "geo"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasGeo .\n\n:hasAdditionalName a owl:ObjectProperty ;\n rdfs:label "has additional name"@en ;\n rdfs:comment "Used to support property parameters for the additional name data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasCalendarBusy a owl:ObjectProperty ;\n rdfs:label "has calendar busy"@en ;\n rdfs:comment "To specify the busy time associated with the object. (Was called FBURL in RFC6350)"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasCalendarLink a owl:ObjectProperty ;\n rdfs:label "has calendar link"@en ;\n rdfs:comment "To specify the calendar associated with the object. (Was called CALURI in RFC6350)"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasCalendarRequest a owl:ObjectProperty ;\n rdfs:label "has calendar request"@en ;\n rdfs:comment "To specify the calendar user address to which a scheduling request be sent for the object. (Was called CALADRURI in RFC6350)"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasCategory a owl:ObjectProperty ;\n rdfs:label "has category"@en ;\n rdfs:comment "Used to support property parameters for the category data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasCountryName a owl:ObjectProperty ;\n rdfs:label "has country name"@en ;\n rdfs:comment "Used to support property parameters for the country name data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasFN a owl:ObjectProperty ;\n rdfs:label "has formatted name"@en ;\n rdfs:comment "Used to support property parameters for the formatted name data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasFamilyName a owl:ObjectProperty ;\n rdfs:label "has family name"@en ;\n rdfs:comment "Used to support property parameters for the family name data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasGender a owl:ObjectProperty ;\n rdfs:label "has gender"@en ;\n rdfs:comment "To specify the sex or gender identity of the object. URIs are recommended to enable interoperable sex and gender codes to be used."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasGivenName a owl:ObjectProperty ;\n rdfs:label "has given name"@en ;\n rdfs:comment "Used to support property parameters for the given name data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasHonorificPrefix a owl:ObjectProperty ;\n rdfs:label "has honorific prefix"@en ;\n rdfs:comment "Used to support property parameters for the honorific prefix data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasHonorificSuffix a owl:ObjectProperty ;\n rdfs:label "has honorific suffix"@en ;\n rdfs:comment "Used to support property parameters for the honorific suffix data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasInstantMessage a owl:ObjectProperty ;\n rdfs:label "has messaging"@en ;\n rdfs:comment "To specify the instant messaging and presence protocol communications with the object. (Was called IMPP in RFC6350)"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasLanguage a owl:ObjectProperty ;\n rdfs:label "has language"@en ;\n rdfs:comment "Used to support property parameters for the language data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasLocality a owl:ObjectProperty ;\n rdfs:label "has locality"@en ;\n rdfs:comment "Used to support property parameters for the locality data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasNickname a owl:ObjectProperty ;\n rdfs:label "has nickname"@en ;\n rdfs:comment "Used to support property parameters for the nickname data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:seeAlso :nickname .\n\n:hasNote a owl:ObjectProperty ;\n rdfs:label "has note"@en ;\n rdfs:comment "Used to support property parameters for the note data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasOrganizationName a owl:ObjectProperty ;\n rdfs:label "has organization name"@en ;\n rdfs:comment "Used to support property parameters for the organization name data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasOrganizationUnit a owl:ObjectProperty ;\n rdfs:label "has organization unit name"@en ;\n rdfs:comment "Used to support property parameters for the organization unit name data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasPostalCode a owl:ObjectProperty ;\n rdfs:label "has postal code"@en ;\n rdfs:comment "Used to support property parameters for the postal code data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasRegion a owl:ObjectProperty ;\n rdfs:label "has region"@en ;\n rdfs:comment "Used to support property parameters for the region data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasRelated a owl:ObjectProperty ;\n rdfs:label "has related"@en ;\n rdfs:comment "To specify a relationship between another entity and the entity represented by this object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasRole a owl:ObjectProperty ;\n rdfs:label "has role"@en ;\n rdfs:comment "Used to support property parameters for the role data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasSource a owl:ObjectProperty ;\n rdfs:label "has source"@en ;\n rdfs:comment "To identify the source of directory information of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasStreetAddress a owl:ObjectProperty ;\n rdfs:label "has street address"@en ;\n rdfs:comment "Used to support property parameters for the street address data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasTitle a owl:ObjectProperty ;\n rdfs:label "has title"@en ;\n rdfs:comment "Used to support property parameters for the title data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasUID a owl:ObjectProperty ;\n rdfs:label "has uid"@en ;\n rdfs:comment "To specify a value that represents a globally unique identifier corresponding to the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasValue a owl:ObjectProperty ;\n rdfs:label "has value"@en ;\n rdfs:comment "Used to indicate the resource value of an object property that requires property parameters"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:label a owl:DatatypeProperty ;\n rdfs:label "label"@en ;\n rdfs:comment "This data property has been deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:language a owl:DatatypeProperty ;\n rdfs:label "language"@en ;\n rdfs:comment "To specify the language that may be used for contacting the object. May also be used as a property parameter."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:latitude a owl:DatatypeProperty ;\n rdfs:label "latitude"@en ;\n rdfs:comment "This data property has been deprecated. See hasGeo"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:longitude a owl:DatatypeProperty ;\n rdfs:label "longitude"@en ;\n rdfs:comment "This data property has been deprecated. See hasGeo"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:mailer a owl:DatatypeProperty ;\n rdfs:label "mailer"@en ;\n rdfs:comment "This data property has been deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:note a owl:DatatypeProperty ;\n rdfs:label "note"@en ;\n rdfs:comment "A note associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:org a owl:ObjectProperty ;\n rdfs:label "organization"@en ;\n rdfs:comment "This object property has been mapped. Use the organization-name data property."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :organization-name .\n\n:organization-unit a owl:DatatypeProperty ;\n rdfs:label "organizational unit name"@en ;\n rdfs:comment "To specify the organizational unit name associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string ;\n rdfs:subPropertyOf :organization-name .\n\n:post-office-box a owl:DatatypeProperty ;\n rdfs:label "post office box"@en ;\n rdfs:comment "This data property has been deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:prodid a owl:DatatypeProperty ;\n rdfs:label "product id"@en ;\n rdfs:comment "To specify the identifier for the product that created the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:rev a owl:DatatypeProperty ;\n rdfs:label "revision"@en ;\n rdfs:comment "To specify revision information about the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:dateTime .\n\n:role a owl:DatatypeProperty ;\n rdfs:label "role"@en ;\n rdfs:comment "To specify the function or part played in a particular situation by the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:sort-string a owl:DatatypeProperty ;\n rdfs:label "sort as"@en ;\n rdfs:comment "To specify the string to be used for national-language-specific sorting. Used as a property parameter only."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:title a owl:DatatypeProperty ;\n rdfs:label "title"@en ;\n rdfs:comment "To specify the position or job of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:tz a owl:DatatypeProperty ;\n rdfs:label "time zone"@en ;\n rdfs:comment "To indicate time zone information that is specific to the object. May also be used as a property parameter."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:value a owl:DatatypeProperty ;\n rdfs:label "value"@en ;\n rdfs:comment "Used to indicate the literal value of a data property that requires property parameters"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:Address a owl:Class ;\n rdfs:label "Address"@en ;\n rdfs:comment "To specify the components of the delivery address for the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentClass [ a owl:Class ;\n owl:unionOf ( [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :country-name ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:maxCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onProperty :country-name ] ) ] [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :locality ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:maxCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onProperty :locality ] ) ] [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :postal-code ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:maxCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onProperty :postal-code ] ) ] [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :region ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:maxCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onProperty :region ] ) ] [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :street-address ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:maxCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onProperty :street-address ] ) ] ) ] .\n\n:Email a owl:Class ;\n rdfs:label "Email"@en ;\n rdfs:comment "To specify the electronic mail address for communication with the object the vCard represents. Use the hasEmail object property."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:Group a owl:Class ;\n rdfs:label "Group"@en ;\n rdfs:comment "Object representing a group of persons or entities. A group object will usually contain hasMember properties to specify the members of the group."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Kind ;\n owl:disjointWith :Individual,\n :Location,\n :Organization ;\n owl:equivalentClass [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :hasMember ;\n owl:someValuesFrom :Kind ] [ a owl:Restriction ;\n owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onClass :Kind ;\n owl:onProperty :hasMember ] ) ] .\n\n:Individual a owl:Class ;\n rdfs:label "Individual"@en ;\n rdfs:comment "An object representing a single person or entity"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Kind ;\n owl:disjointWith :Location,\n :Organization .\n\n:Name a owl:Class ;\n rdfs:label "Name"@en ;\n rdfs:comment "To specify the components of the name of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentClass [ a owl:Class ;\n owl:unionOf ( [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :additional-name ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:minCardinality "0"^^xsd:nonNegativeInteger ;\n owl:onProperty :additional-name ] ) ] [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :family-name ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:maxCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onProperty :family-name ] ) ] [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :given-name ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:maxCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onProperty :given-name ] ) ] [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :honorific-prefix ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:minCardinality "0"^^xsd:nonNegativeInteger ;\n owl:onProperty :honorific-prefix ] ) ] [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :honorific-suffix ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:minCardinality "0"^^xsd:nonNegativeInteger ;\n owl:onProperty :honorific-suffix ] ) ] ) ] .\n\n:VCard a owl:Class ;\n rdfs:label "VCard"@en ;\n rdfs:comment "The vCard class is equivalent to the new Kind class, which is the parent for the four explicit types of vCards (Individual, Organization, Location, Group)"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentClass :Kind .\n\n:fn a owl:DatatypeProperty ;\n rdfs:label "formatted name"@en ;\n rdfs:comment "The formatted text corresponding to the name of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:hasAddress a owl:ObjectProperty ;\n rdfs:label "has address"@en ;\n rdfs:comment "To specify the components of the delivery address for the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range :Address .\n\n:hasEmail a owl:ObjectProperty ;\n rdfs:label "has email"@en ;\n rdfs:comment "To specify the electronic mail address for communication with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range :Email .\n\n:hasGeo a owl:ObjectProperty ;\n rdfs:label "has geo"@en ;\n rdfs:comment "To specify information related to the global positioning of the object. May also be used as a property parameter."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasKey a owl:ObjectProperty ;\n rdfs:label "has key"@en ;\n rdfs:comment "To specify a public key or authentication certificate associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :key .\n\n:hasLogo a owl:ObjectProperty ;\n rdfs:label "has logo"@en ;\n rdfs:comment "To specify a graphic image of a logo associated with the object "@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :logo .\n\n:hasName a owl:ObjectProperty ;\n rdfs:label "has name"@en ;\n rdfs:comment "To specify the components of the name of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range :Name ;\n owl:equivalentProperty :n .\n\n:hasPhoto a owl:ObjectProperty ;\n rdfs:label "has photo"@en ;\n rdfs:comment "To specify an image or photograph information that annotates some aspect of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :photo .\n\n:hasSound a owl:ObjectProperty ;\n rdfs:label "has sound"@en ;\n rdfs:comment "To specify a digital sound content information that annotates some aspect of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :sound .\n\n:hasTelephone a owl:ObjectProperty ;\n rdfs:label "has telephone"@en ;\n rdfs:comment "To specify the telephone number for telephony communication with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :tel .\n\n:hasURL a owl:ObjectProperty ;\n rdfs:label "has url"@en ;\n rdfs:comment "To specify a uniform resource locator associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :url .\n\n:key a owl:ObjectProperty ;\n rdfs:label "key"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasKey .\n\n:logo a owl:ObjectProperty ;\n rdfs:label "logo"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasLogo .\n\n:n a owl:ObjectProperty ;\n rdfs:label "name"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasName .\n\n:nickname a owl:DatatypeProperty ;\n rdfs:label "nickname"@en ;\n rdfs:comment "The nick name associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:photo a owl:ObjectProperty ;\n rdfs:label "photo"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasPhoto .\n\n:sound a owl:ObjectProperty ;\n rdfs:label "sound"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasSound .\n\n:tel a owl:ObjectProperty ;\n rdfs:label "telephone"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasTelephone .\n\n:url a owl:ObjectProperty ;\n rdfs:label "url"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasURL .\n\n:Location a owl:Class ;\n rdfs:label "Location"@en ;\n rdfs:comment "An object representing a named geographical place"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Kind ;\n owl:disjointWith :Organization .\n\n:additional-name a owl:DatatypeProperty ;\n rdfs:label "additional name"@en ;\n rdfs:comment "The additional name associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:country-name a owl:DatatypeProperty ;\n rdfs:label "country name"@en ;\n rdfs:comment "The country name associated with the address of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:family-name a owl:DatatypeProperty ;\n rdfs:label "family name"@en ;\n rdfs:comment "The family name associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:given-name a owl:DatatypeProperty ;\n rdfs:label "given name"@en ;\n rdfs:comment "The given name associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:hasMember a owl:ObjectProperty ;\n rdfs:label "has member"@en ;\n rdfs:comment "To include a member in the group this object represents. (This property can only be used by Group individuals)"@en ;\n rdfs:domain :Group ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range :Kind .\n\n:honorific-prefix a owl:DatatypeProperty ;\n rdfs:label "honorific prefix"@en ;\n rdfs:comment "The honorific prefix of the name associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:honorific-suffix a owl:DatatypeProperty ;\n rdfs:label "honorific suffix"@en ;\n rdfs:comment "The honorific suffix of the name associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:locality a owl:DatatypeProperty ;\n rdfs:label "locality"@en ;\n rdfs:comment "The locality (e.g. city or town) associated with the address of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:organization-name a owl:DatatypeProperty ;\n rdfs:label "organization name"@en ;\n rdfs:comment "To specify the organizational name associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:postal-code a owl:DatatypeProperty ;\n rdfs:label "postal code"@en ;\n rdfs:comment "The postal code associated with the address of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:region a owl:DatatypeProperty ;\n rdfs:label "region"@en ;\n rdfs:comment "The region (e.g. state or province) associated with the address of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:street-address a owl:DatatypeProperty ;\n rdfs:label "street address"@en ;\n rdfs:comment "The street address associated with the address of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:Organization a owl:Class ;\n rdfs:label "Organization"@en ;\n rdfs:comment """An object representing an organization. An organization is a single entity, and might represent a business or government, a department or division within a business or government, a club, an association, or the like.\n"""@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Kind .\n\n:Gender a owl:Class ;\n rdfs:label "Gender"@en ;\n rdfs:comment "Used for gender codes. The URI of the gender code must be used as the value for Gender."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:Kind a owl:Class ;\n rdfs:label "Kind"@en ;\n rdfs:comment "The parent class for all objects"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentClass [ a owl:Restriction ;\n owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onDataRange xsd:string ;\n owl:onProperty :fn ],\n :VCard .\n\n:Type a owl:Class ;\n rdfs:label "Type"@en ;\n rdfs:comment "Used for type codes. The URI of the type code must be used as the value for Type."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:TelephoneType a owl:Class ;\n rdfs:label "Phone"@en ;\n rdfs:comment "Used for telephone type codes. The URI of the telephone type code must be used as the value for the Telephone Type."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:RelatedType a owl:Class ;\n rdfs:label "Relation Type"@en ;\n rdfs:comment "Used for relation type codes. The URI of the relation type code must be used as the value for the Relation Type."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n<http://www.w3.org/2006/vcard/ns> a owl:Ontology ;\n rdfs:label "Ontology for vCard"@en ;\n rdfs:comment "Ontology for vCard based on RFC6350"@en ;\n owl:versionInfo "Final"@en .\n\n\n',p,x.uri,"text/turtle");try{await p.fetcher.load(n.doc())}catch(e){h("Error: Failed to load contact card: "+e)}t.style=d.paneDivStyle||"padding: 0.5em 1.5em 1em 1.5em;",i.authn.checkUser(),t.appendChild((0,a.renderMugshotGallery)(e,n));const k=v?w:y;r.widgets.appendForm(e,t,{},n,k,n.doc(),function(e,t){e||h("Error: "+t)}),m(),t.appendChild(await(0,s.renderGroupMemberships)(n,l)),m(),r.widgets.attachmentList(e,n,t,{modify:b}),m(),v?t.appendChild(await(0,o.renderPublicIdControl)(n,l)):t.appendChild(await(0,o.renderWebIdControl)(n,l))};var r=l(n(500)),i=n(9332),a=n(8223),o=n(4416),s=n(9208),c=l(n(8230));function l(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return(l=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}const u=r.ns,p=i.store,d=r.style;function f(e,t,n){const r=t.doc();e.holds(void 0,void 0,void 0,r)||c.parse(n,e,r.uri,"text/turtle")}},7587(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mintNewAddressBook=function(e,t){return new Promise(function(n,i){r.login.ensureLoadedProfile(t).then(t=>{const o=t.me,c=t.dom,l=t.div,u=e.session.store,p=r.ns,d=t.newBase||t.newInstance.dir().uri;if((t.instanceClass||p.vcard("AddressBook")).sameTerm(p.vcard("Group"))){const e=t.newInstance||u.sym(t.newBase+"index.ttl#this"),r=e.doc();return u.add(e,p.rdf("type"),p.vcard("Group"),r),u.add(e,p.vcard("fn"),t.instanceName||"untitled group",r),void u.fetcher.putBack(r,{contentType:"text/turtle"}).then(function(e){n(t)}).catch(function(e){i(new Error("Error creating document for new group "+e))})}function f(e){l.appendChild(r.widgets.errorMessageBlock(c,e,"pink"))}let h='@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n @prefix ab: <http://www.w3.org/ns/pim/ab#>.\n @prefix dc: <http://purl.org/dc/elements/1.1/>.\n @prefix xsd: <http://www.w3.org/2001/XMLSchema#>.\n\n <#this> a vcard:AddressBook;\n dc:title "New address Book";\n vcard:nameEmailIndex <people.ttl>;\n vcard:groupIndex <groups.ttl>.\n';h+="<#this> <http://www.w3.org/ns/auth/acl#owner> <"+o.uri+">.\n\n";const m=u.sym(d+"index.ttl#this"),g=[{to:"index.ttl",content:h,contentType:"text/turtle"},{to:"groups.ttl",content:"",contentType:"text/turtle"},{to:"people.ttl",content:"",contentType:"text/turtle"},{to:"",existing:!0,aclOptions:{defaultForNew:!0}}];!function e(){function r(t,n){if(!n)return f("Error writing new file "+p.to),i(new Error("Error writing new file "+p.to));s(h,o,v).then(()=>e()).catch(e=>{const t="Error setting access permissions for "+p.to+" : "+e.message;return f(t),i(new Error(t))})}if(0===g.length)!function(e,r){const i=l.appendChild(c.createElement("p"));i.setAttribute("style","font-size: 140%;"),i.innerHTML="Your <a href='"+e.uri+"'><b>new "+r+"</b></a> is ready. <br/><br/><a href='"+e.uri+"'>Go to new "+r+"</a>";const a=Object.assign({newInstance:e},t);n(a)}(m,"address book");else{var p=g.shift(),h=a.uri.join(p.to,d),v=p.aclOptions||{};"content"in p?u.fetcher.webOperation("PUT",h,{data:p.content,saveMetadata:!0,contentType:p.contentType}).then(()=>r(0,!0)):"existing"in p?r(0,!0):i(new Error("copy not expected buiding new app!!"))}}()},e=>{t.div.appendChild(r.widgets.errorMessageBlock(e))})})};var r=o(n(500)),i=n(9332),a=o(n(8230));function o(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return(o=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}const{setACLUserPublic:s}=i.solidLogicSingleton.acl},8223(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderMugshotGallery=function(e,t){function n(t){w.appendChild(i.widgets.errorMessageBlock(e,t,"pink"))}async function r(e,t,n){const r=[s.st(e,l.vcard("hasPhoto"),t,e.doc())];try{n?await p.updater.update(r,[]):await p.updater.update([],r)}catch(e){alert(" Write back image link FAIL "+t+", Error: "+e)}}function c(e){p.fetcher.nowOrWhenFetched(e.doc(),function(n,r){if(n){const n=p.findTypeURIs(e);for(const e in n);p.add(t,l.wf("attachment"),e,t.doc())}else;})}function d(e,r,i){const a=o.default.extension(r);let s,c;r!==o.default.lookup(e)&&(e+="_."+a);const u=r.startsWith("image");let d,f;for(u?(s="image_",c=l.vcard("hasPhoto")):(s="attachment_",c=l.wf("attachment")),d=0;f=p.sym(t.dir().uri+e),p.holds(t,l.vcard("hasPhoto"),f);d++)e=s+d+"."+a;p.fetcher.webOperation("PUT",f.uri,{data:i,contentType:r}).then(function(e){e.ok?(p.add(t,c,f,t.doc()),p.fetcher.putBack(t.doc(),{contentType:"text/turtle"}).then(function(e){u&&x.refresh()},function(e){})):n("Error uploading "+f+":"+e.status)})}async function f(e){for(const t of e){let e=s.sym(t);if(t.startsWith("http")&&t.indexOf("#")<0){t.startsWith("http:")&&(e=s.sym("https:"+t.slice(5)));const r={withCredentials:!1,credentials:"omit"};let i;try{i=await p.fetcher.webOperation("GET",e.uri,r)}catch(t){return n(`Gallery: fetch error trying to read picture ${e} data: ${t}`),void c(e)}const a=i.headers.get("Content-Type");let o=e.uri.split("/").slice(-1)[0];o=o.split("?")[0];const l=await i.arrayBuffer();return i.ok?void d(o,a,l):(alert("Cant download, so will link image. "+e+":"+i.status),void c(e))}alert("Not a web document URI, cannot copy as picture: "+e),c(e)}}function h(e){for(let t=0;t<e.length;t++){const n=e[t],r=new FileReader;r.onload=function(e){return function(t){const n=t.target.result;d(encodeURIComponent(e.name),e.type,n)}}(n),r.readAsArrayBuffer(n)}}function m(t){const n=e.createElement("img");return n.setAttribute("style","max-height: 10em; border-radius: 1em; margin: 0.7em;"),i.widgets.makeDropTarget(n,f,h),t&&(a.store.fetcher._fetch(t.uri).then(function(e){return e.blob()}).then(function(e){const t=URL.createObjectURL(e);n.setAttribute("src",t)}),i.widgets.makeDraggable(n,t)),n}function g(){let e=p.each(t,l.vcard("hasPhoto"));e.sort(),e=e.slice(0,5),0===e.length?(x.innerHTML="",y&&x.appendChild(k)):u.syncTableToArray(x,e,m)}function v(){return p.sym(t.dir().uri+"Image_"+Date.now()+".png")}async function b(e){e&&(await r(t,e),g())}const y=p.updater.editable(t.doc().uri,p),w=e.createElement("div"),x=w.appendChild(e.createElement("div")),k=m();i.widgets.setImage(k,t),g(),x.refresh=g,y&&w.appendChild(function(){const n=e.createElement("table"),a=n.appendChild(e.createElement("tr")),o=a.appendChild(e.createElement("td")),s=a.appendChild(e.createElement("td")),c=a.appendChild(e.createElement("td"));o.appendChild(i.media.cameraButton(e,p,v,b));try{s.appendChild(i.widgets.fileUploadButtonDiv(e,h))}catch(e){}return c.appendChild(function(){const n=i.widgets.button(e,i.icons.iconBase+"noun_925021.svg","Drag here to delete");return i.widgets.makeDropTarget(n,async function(e){const n=p.each(t,l.vcard("hasPhoto")).map(e=>e.uri);for(const i of e){if(!n.includes(i))return void alert("Only drop images in this contact onto this trash can.");if(confirm(`Permanently DELETE image ${i} completely?`)){await r(t,p.sym(i),!0);try{await p.fetcher.webOperation("DELETE",i)}catch(e){alert("Unable to delete picture! "+e)}}}g()},null),n}()),n}());return w};var r,i=c(n(500)),a=n(9332),o=(r=n(6049))&&r.__esModule?r:{default:r},s=c(n(8230));function c(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return(c=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}const l=i.ns,u=i.utils,p=a.store},3705(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escoParameters=t.dbpediaParameters=t.AUTOCOMPLETE_LIMIT=void 0,t.filterByLanguage=function(e,t){const n={};e.forEach(e=>{const t=e.subject.value;n[t]=n[t]||[],n[t].push(e)});const r=t;r.reverse();const i=[];for(const e in n){const t=n[e].map(e=>[r.indexOf(e.name?.["xml:lang"]||""),e]);t.sort(),t.reverse(),i.push(t[0][1])}return i},t.getDbpediaDetails=g,t.getPreferredLanguages=async function(){return["fr","en","de","it"]},t.getWikidataDetails=m,t.getWikidataDetailsOld=async function(e,t,n){const r='select distinct * where {\n optional { $(subject) wdt:P31 ?class } # instance of\n optional { $(subject) wdt:P154 ?logo }\n optional { $(subject) wdt:P158 ?sealImage }\n# optional { $(subject) wdt:P159 ?headquartersLocation }\n\noptional { $(subject) wdt:P17 ?country }\noptional { $(subject) wdt:P18 ?image }\noptional { $(subject) wdt:P1813 ?shortName }\n\noptional { $(subject) wdt:P355 ?subsidiary }\n# SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en,de,it" }\n}'.replace(s,n.uri),i=await f(r,l);d(e,n,i,n.doc())},t.getWikidataLocation=async function(e,t,n){const r='select distinct * where {\n\n $(subject) wdt:P276 ?location .\n\n optional { ?location wdt:P2044 ?elevation }\n optional { ?location wdt:P131 ?region }\n optional { ?location wdt:P625 ?coordinates }\noptional { ?location wdt:P17 ?country }\n\n# SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en,de,it" }\n}'.replace(s,n.uri);const i=await f(r,l);d(e,n,i,n.doc())},t.loadFromBindings=d,t.loadPublicDataThing=async function(e,t,n){if(n.uri.startsWith("https://dbpedia.org/resource/"))return g(e,t,n);if(!n.uri.match(/^https?:\/\/www\.wikidata\.org\/entity\/.*/)){const t=n.uri.startsWith("http:")?e.sym("https:"+n.uri.slice(5)):n;return e.fetcher.load(t,{credentials:"omit",headers:{Accept:"text/turtle"}})}await m(e,t,n)},t.predMap=void 0,t.queryESCODataByName=async function(e,t,n){if(!n.searchByNameURI)throw new Error("Query target searchByNameURI is required for ESCO queries");const r=n.searchByNameURI.replace("$(name)",e).replace("$(limit)",""+o).replace("$(class)",t.uri);const a=(await i.store.fetcher.webOperation("GET",r,{credentials:"omit",headers:{Accept:"application/json"}})).responseText;if(!a)throw new Error("No response text from ESCO query "+r);if(0===a.length)throw new Error("Wot no text back from ESCO query "+r);const s=JSON.parse(a)._embedded.results;return s.map(e=>({name:{value:e.title,type:"literal"},uri:{type:"IRI",value:e.uri}}))},t.queryPublicDataByName=async function(e,t,n){return f(n.searchByNameQuery.replace("$(name)",e).replace("$(limit)",""+o).replace("$(class)",t.uri),n)},t.queryPublicDataConstruct=h,t.queryPublicDataSelect=f,t.wikidataParameters=t.wikidataClasses=t.wikidataClassMap=void 0;var r=n(8230),i=n(9332),a=n(500);const o=t.AUTOCOMPLETE_LIMIT=3e3,s=/\$\(subject\)/g;t.wikidataClasses={Corporation:"http://www.wikidata.org/entity/Q6881511",EducationalOrganization:"http://www.wikidata.org/entity/Q178706",GovernmentOrganization:"http://www.wikidata.org/entity/Q327333",MedicalOrganization:"http://www.wikidata.org/entity/Q4287745",MusicGroup:"http://www.wikidata.org/entity/Q32178211",NGO:"http://www.wikidata.org/entity/Q163740",Occupation:"http://www.wikidata.org/entity/Q28640",Project:"http://www.wikidata.org/entity/Q170584",SportsOrganization:"http://www.wikidata.org/entity/Q4438121"};t.escoParameters={label:"ESCO",logo:"https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif",searchByNameQuery:void 0,searchByNameURI:"https://ec.europa.eu/esco/api/search?language=$(language)&type=occupation&text=$(name)",endpoint:void 0,class:{}};const c=t.dbpediaParameters={label:"DBPedia",logo:"https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/DBpediaLogo.svg/263px-DBpediaLogo.svg.png",searchByNameQuery:'select distinct ?subject, ?name where {\n ?subject a $(class); rdfs:label ?name\n FILTER regex(?name, "$(name)", "i")\n } LIMIT $(limit)',endpoint:"https://dbpedia.org/sparql/",class:{AcademicInsitution:"http://umbel.org/umbel/rc/EducationalOrganization"}},l=t.wikidataParameters={label:"WikiData",logo:"https://www.wikimedia.org/static/images/project-logos/wikidatawiki.png",endpoint:"https://query.wikidata.org/sparql",class:{AcademicInsitution:"http://www.wikidata.org/entity/Q4671277",Enterprise:"http://www.wikidata.org/entity/Q6881511",Business:"http://www.wikidata.org/entity/Q4830453",NGO:"http://www.wikidata.org/entity/Q79913",CharitableOrganization:"http://www.wikidata.org/entity/Q708676",Insitute:"http://www.wikidata.org/entity/Q1664720"},searchByNameQuery:'SELECT ?subject ?name\n WHERE {\n ?klass wdt:P279* $(class) .\n ?subject wdt:P31 ?klass .\n ?subject rdfs:label ?name.\n FILTER regex(?name, "$(name)", "i")\n } LIMIT $(limit) ',insitituteDetailsQuery:'CONSTRUCT\n{ wd:Q49108 schema:name ?itemLabel;\n schema:logo ?logo;\n schema:logo ?sealImage;\n schema:subOrganization ?subsidiary .\n ?subsidiary schema:name ?subsidiaryLabel .\n}\nWHERE\n{\n wd:Q49108 # rdfs:label ?itemLabel ;\n wdt:P154 ?logo;\n wdt:P158 ?sealImage ;\n wdt:P355 ?subsidiary .\n # ?subsidiary rdfs:label ?subsidiaryLabel .\n\n SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], fr". }\n}'};var u=t.wikidataClassMap={"http://www.wikidata.org/entity/Q15936437":a.ns.schema("CollegeOrUniversity"),"http://www.wikidata.org/entity/Q1664720":a.ns.schema("EducationalOrganization"),"http://www.wikidata.org/entity/Q43229":a.ns.schema("Organization"),"http://www.wikidata.org/entity/Q3918":a.ns.schema("CollegeOrUniversity"),"http://www.wikidata.org/entity/Q170584":a.ns.schema("Project"),"http://www.wikidata.org/entity/Q327333":a.ns.schema("GovernmentOrganization"),"http://www.wikidata.org/entity/Q2221906":a.ns.schema("Place")},p=t.predMap={class:a.ns.rdf("type"),sealImage:a.ns.schema("logo"),shortName:a.ns.foaf("nick"),subsidiary:a.ns.schema("subOrganization")};function d(e,t,n,i){const o={};n.forEach(e=>{for(const t in e){const n=e[t],r=JSON.stringify(n);o[t]=o[t]||new Set,o[t].add(r)}});for(const n in o){o[n].forEach(o=>{const s=JSON.parse(o),{type:c,value:l}=s;let d;if("uri"===c)d=e.sym(l);else{if("literal"!==c)throw new Error(`loadFromBindings: unexpected type: ${c}`);d=new r.Literal(l,s.language,s.datatype)}if("type"===n)u[l]&&(d=u[l]);else if("coordinates"===n){const n=/.*\(([-0-9\.-]*) ([-0-9\.-]*)\)/.exec(l);if(n){const o=a.ns.xsd("float"),s=new r.Literal(n[1],null,o),c=new r.Literal(n[2],null,o);e.add(t,a.ns.schema("longitude"),c,i),e.add(t,a.ns.schema("latitude"),s,i)}}else if(p[n]){const r=p[n]||a.ns.schema(n);e.add(t,r,d,i)}})}}async function f(e,t){if(!t.endpoint)throw new Error("Query target endpoint is required");const n=new URL(t.endpoint);n.searchParams.append("query",e);const r=n.href,a=(await i.store.fetcher.webOperation("GET",r,{credentials:"omit",headers:{Accept:"application/json"}})).responseText;if(a&&0!==a.length){return JSON.parse(a).results.bindings}throw new Error("Wot no text back from query "+r)}async function h(e,t,n){if(!n.endpoint)throw new Error("Query target endpoint is required");const a=new URL(n.endpoint);a.searchParams.append("query",e);const o=a.href,s=(await i.store.fetcher.webOperation("GET",o,{credentials:"omit",headers:{Accept:"text/turtle"}})).responseText;s&&s.length>500&&(s.slice(0,200),s.slice(-200));if(!s||0===s.length)throw new Error("queryPublicDataConstruct: No text back from construct query:"+o);(0,r.parse)(s,i.store,t.uri,"text/turtle")}async function m(e,t,n){const r='prefix vcard: <http://www.w3.org/2006/vcard/ns#>\nCONSTRUCT\n{ wd:Q49108 vcard:fn ?itemLabel.\nwd:Q49108 rdf:type ?klass. ?klass rdfs:label ?klassLabel; rdfs:comment ?klassDescription .\nwd:Q49108 schema:logo ?logo;\n schema:image ?image;\n schema:logo ?sealImage;\n schema:subOrganization ?subsidiary .\n ?subsidiary rdfs:label ?subsidiaryLabel .\n ?supersidiary schema:subOrganization wd:Q49108 .\n ?supersidiary rdfs:label ?supersidiaryLabel .\n wd:Q49108 schema:location ?location .\n ?location schema:elevation ?elevation .\n ?location wdt:P131 ?region . ?region rdfs:label ?regionLabel .\n ?location wdt:P625 ?coordinates .\n ?location schema:country ?country . ?country rdfs:label ?countryLabel .\n}\nWHERE\n{ optional {wd:Q49108 rdfs:label ?itemLabel} .\n optional {wd:Q49108 wdt:P154 ?logo .}\n optional {wd:Q49108 wdt:P31 ?klass .}\n optional {wd:Q49108 wdt:P158 ?sealImage .}\n optional {wd:Q49108 wdt:P18 ?image .}\n\n optional { wd:Q49108 wdt:P355 ?subsidiary . }\n optional { ?supersidiary wdt:P355 wd:Q49108. }\n\n optional { wd:Q49108 wdt:P276 ?location .\n\n optional { ?location schema:eleveation ?elevation }\n optional { ?location wdt:P131 ?region }\n optional { ?location wdt:P625 ?coordinates }\n optional { ?location wdt:P17 ?country }\n }\n SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en,de,it". }\n}\n'.replace(/wd:Q49108/g,n.value);await h(r,n,l)}async function g(e,t,n){const r=`select distinct ?city, ?state, ?country, ?homepage, ?logo, ?lat, ?long, WHERE {\n OPTIONAL { <${n}> <http://dbpedia.org/ontology/city> ?city }\n OPTIONAL { ${n} <http://dbpedia.org/ontology/state> ?state }\n OPTIONAL { ${n} <http://dbpedia.org/ontology/country> ?country }\n OPTIONAL { ${n} foaf:homepage ?homepage }\n OPTIONAL { ${n} foaf:lat ?lat; foaf:long ?long }\n OPTIONAL { ${n} <http://dbpedia.org/ontology/country> ?country }\n }`;return(await f(r,c)).map(e=>{const t=e.subject.value,n=e.name?.value;return{uri:t,name:n}})}},4195(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toolsPane=function(e,t,n,o,s,c){const l=s.dom,u=i.store,p=r.ns,d=p.vcard,f="font-size: 100%; margin: 0.8em; padding:0.5em;",h=l.createElement("div"),m=h.appendChild(l.createElement("table"));m.setAttribute("style","font-size:120%; margin: 1em; border: 0.1em #ccc ;");const g=m.appendChild(l.createElement("tr"));g.textContent=r.utils.label(o)+" - tools",g.setAttribute("style","min-width: 20em; padding: 1em; font-size: 150%; border-bottom: 0.1em solid red; margin-bottom: 2em;");const v=m.appendChild(l.createElement("tr")).appendChild(l.createElement("div"));v.setAttribute("style","padding: 2em;");const b=m.appendChild(l.createElement("tr")),y=b.appendChild(l.createElement("table"));m.appendChild(l.createElement("tr"));const w={target:o,me:c,noun:"address book",div:h,dom:l,statusRegion:v};function x(e){v.appendChild(r.widgets.errorMessageBlock(l,e,"pink"))}return async function(){y.appendChild(r.aclControl.ACLControlBox5(o.dir(),s,"book",u,function(e,t){e||(y.innerHTML="ACL control box Failed: "+t)}));try{await r.login.registrationControl(w,o,p.vcard("AddressBook"))}catch(e){r.widgets.complain(w,"registrationControl: "+e)}const c=b.appendChild(l.createElement("pre"));function m(e){c.textContent+=e+"\n"}function g(){m(u.each(void 0,d("inAddressBook"),o).length+" cards loaded. ");let e=u.each(o,d("includesGroup"));const n=new Set(e.map(e=>e.uri));e=[...n].map(e=>u.sym(e)),m(e.length+" total groups. ");const r=[];for(const e in t)r.push(e);m(r.length+" selected groups. ")}async function v(e){k.setAttribute("style","background-color: #ffc;");const t=u.any(o,p.vcard("nameEmailIndex"));try{await u.fetcher.load(t)}catch(e){k.setAttribute("style","background-color: #fcc;"),m("Error: People index has NOT been loaded"+e+"\n")}k.setAttribute("style","background-color: #cfc;"),m(" People index has been loaded\n")}const k=h.appendChild(l.createElement("button"));k.textContent="Load main index",k.style.cssText=f,k.addEventListener("click",v);const _=h.appendChild(l.createElement("button"));_.textContent="Statistics",_.style.cssText=f,_.addEventListener("click",g);const E=h.appendChild(l.createElement("button"));async function C(e){function n(e){r.acl.fixIndividualCardACL(e,m,function(t,n){m(t?"Success for "+r.utils.label(e):"Failure for "+r.utils.label(e)+": "+n)})}const i=[];for(const e in t)i.push(e);for(let e=0;e<i.length;e++){const t=u.sym(i[e]),o=(0,a.groupMembers)(u,t);m(r.utils.label(t)+": "+o.length+" members");for(let e=0;e<o.length;e++){const t=o[e];m(r.utils.label(t)),n(t)}}}E.textContent="Check individual card access of selected groups",E.style.cssText=f,E.addEventListener("click",C);const S=h.appendChild(l.createElement("button"));async function A(e){const t=await T(e);if(0===t.length)return void m("No groupless cards found.");const n=await(0,a.saveNewGroup)(e,"ZSortThese");if(confirm(`Add the ${t.length} cards without groups to a ZSortThese group?`))for(const e of t)m(" adding "+e),await(0,a.addPersonToGroup)(e,n);m("People moved to group.")}async function T(e){const t=u.any(e,p.vcard("groupIndex")),n=u.any(e,p.vcard("nameEmailIndex"));try{await u.fetcher.load([n,t]);const r=u.each(e,p.vcard("includesGroup"));await u.fetcher.load(r)}catch(e){x("Error loading stuff:"+e)}const i={},o=[];let s=u.each(e,d("includesGroup"));const c=new Set(s.map(e=>e.uri));s=[...c].map(e=>u.sym(e)),m(s.length+" total groups. ");for(let e=0;e<s.length;e++){const t=s[e],n=(0,a.groupMembers)(u,t);m(r.utils.label(t)+": "+n.length+" members");for(let e=0;e<n.length;e++)u.allAliases(n[e]).forEach(function(e){i[e.uri]=t})}const l=u.each(void 0,d("inAddressBook"),e);m(l.length+" total cards");for(let e=0;e<l.length;e++)i[l[e].uri]||(o.push(l[e]),m(" groupless "+r.utils.label(l[e])));return m(o.length+" groupless cards."),o}S.textContent="Find duplicate cards",S.style.cssText=f,S.addEventListener("click",function(e){const t={};t.book=o,t.nameEmailIndex=u.any(o,p.vcard("nameEmailIndex")),m("Loading name index..."),i.store.fetcher.nowOrWhenFetched(t.nameEmailIndex,void 0,function(e,n){function r(e){return new Promise(function(n){u.fetcher.load(e).then(function(r){m(" Nameless check "+e);const i={};function a(e){return u.statementsMatching(null,null,null,e.doc()).filter(function(e){return!i[e.predicate.uri]})}i[p.vcard("hasUID").uri]=!0,i[p.dc("created").uri]=!0,i[p.dc("modified").uri]=!0;const o=a(e);if(!o.length)return m(" Zero length "+e),t.nameLessZeroData.push(e),n(!1);const s=new $rdf.Serializer(u).setBase(e.doc().uri).statementsToN3(o),c=t.nameLessIndex[s];if(c){m(" Matches with "+c);const r=u.each(null,p.vcard("hasMember"),e),i=u.each(null,p.vcard("hasMember"),c);for(let a=0;a<r.length;a++){let o=!1;for(let e=0;e<i.length;e++)i[e].sameTerm(r[a])&&(o=!0);if(!o)return m("This one groups: "+r),m("Other one groups: "+i),m("Cant skip this one because it has a group, "+r[a]+", which the other does not."),t.nameOnlyDuplicatesGroupDiff.push(e),n(!1)}}else m("First nameless like: "+e.doc()),m("___________________________________________"),m(s),m("___________________________________________"),t.nameLessIndex[s]=e,t.namelessUniques.push(e);n(!0)}).catch(function(r){m("Cant load a nameless card!: "+r),t.nameOnlyErrors.push(e),n(!1)})})}function i(){return t.namelessToCheck=t.namelessToCheck||t.nameless.slice(),m("Nameless check left: "+t.namelessToCheck.length),new Promise(function(e){const n=t.namelessToCheck.shift();if(!n){if(m("namelessUniques: "+t.namelessUniques.length),m("namelessUniques: "+t.namelessUniques),t.namelessUniques.length>0&&confirm("Add all "+t.namelessUniques.length+" nameless cards to the rescued set?")){t.uniques=t.uniques.concat(t.namelessUniques);for(let e=0;e<t.namelessUniques.length;e++)t.uniqueSet[t.namelessUniques[e].uri]=!0}return e(!0)}r(n).then(function(e){m(" Nameless check returns "+e),i()})})}function s(){return new Promise(function(e){m("Groups loaded");for(let e=0;e<t.uniques.length;e++)t.uniquesSet[t.uniques[e].uri]=!0;t.groupMembers=[],u.each(null,p.vcard("hasMember")).forEach(e=>{t.groupMembers=t.groupMembers.concat((0,a.groupMembers)(u,e))}),m(" Naive group members "+t.groupMembers.length),t.groupMemberSet=[];for(let e=0;e<t.groupMembers.length;e++)t.groupMemberSet[t.groupMembers[e].uri]=t.groupMembers[e];t.groupMembers2=[];for(const e in t.groupMemberSet)t.groupMembers2.push(t.groupMemberSet[e]);if(m(" Compact group members "+t.groupMembers2.length),$rdf.keepThisCodeForLaterButDisableFerossConstantConditionPolice){for(let e=0;e<t.groupMembers.length;e++){const n=t.groupMembers[e];t.uniquesSet[n.uri]||(m(" Not in uniques: "+n),t.groupProblems.push(n),t.duplicateSet[n.uri]?m(" ** IN duplicates alas:"+n):m(" **** WTF?"))}m("Problem cards: "+t.groupProblems.length)}e(!0)})}function c(){return new Promise(function(e){let n,r,i;for(t.cards=u.each(void 0,d("inAddressBook"),t.book),m(t.cards.length+" total cards"),n=0;n<t.cards.length;n++)if(r=t.cards[n],i=u.anyValue(r,p.vcard("fn")),i)if(t.definitive[i]===r);else if(t.definitive[i]){t.duplicates.length;t.duplicates.push(r)}else t.definitive[i]=r;else t.nameless.push(r);t.duplicateSet=[];for(let e=0;e<t.duplicates.length;e++)t.duplicateSet[t.duplicates[e].uri]=t.duplicates[e];t.namelessSet=[];for(let e=0;e<t.nameless.length;e++)t.namelessSet[t.nameless[e].uri]=t.nameless[e];t.uniques=[],t.uniqueSet=[];for(let e=0;e<t.cards.length;e++){const n=t.cards[e].uri;t.duplicateSet[n]||t.namelessSet[n]||(t.uniques.push(t.cards[e]),t.uniqueSet[n]=t.cards[e])}m("Uniques: "+t.uniques.length),m(t.nameless.length+" nameless cards."),m(t.duplicates.length+" name-duplicate cards, leaving "+(t.cards.length-t.duplicates.length)),e(!0)})}function l(){let e;return Promise.resolve().then(()=>{e=u.sym(t.book.dir().uri+"clean-people.ttl");let n=[];for(let e=0;e<t.uniques.length;e++)n=n.concat(u.connectedStatements(t.uniques[e],t.nameEmailIndex));const r=new $rdf.Serializer(u).setBase(t.nameEmailIndex.uri);m("Serializing index of uniques...");const i=r.statementsToN3(n);return u.fetcher.webOperation("PUT",e,{data:i,contentType:"text/turtle"})}).then(function(){return m("Done uniques log "+e),!0}).catch(function(e){m("Error saving uniques: "+e)})}function f(e){let n;return Promise.resolve().then(()=>{const r=e.uri.replace("/Group/","/NewGroup/");n=u.sym(r);let i=[];for(let n=0;n<t.uniques.length;n++)i=i.concat(u.connectedStatements(t.uniques[n],e.doc()));const a=new $rdf.Serializer(u).setBase(e.uri);m(" Regenerating group of uniques..."+n);const o=a.statementsToN3(i);return u.fetcher.webOperation("PUT",n,{data:o,contentType:"text/turtle"})}).then(()=>(m(" Done uniques group "+n),!0)).catch(e=>{m("Error saving : "+e)})}function h(){return m("Saving ALL GROUPS"),Promise.all(t.groupObjects.map(f))}m("Loaded name index."),t.cards=[],t.duplicates=[],t.definitive=[],t.nameless=[],t.exactDuplicates=[],t.nameOnlyDuplicates=[],t.uniquesSet=[],t.groupProblems=[],t.nameDupLog=u.sym(o.dir().uri+"dedup-nameDupLog.ttl"),t.exactDupLog=u.sym(o.dir().uri+"dedup-exactDupLog.ttl"),t.nameOnlyErrors=[],t.nameLessZeroData=[],t.nameLessIndex=[],t.namelessUniques=[],t.nameOnlyDuplicatesGroupDiff=[];const g=function(){let e=[];if(t.book){[t.book].forEach(function(t){const n=(t?u.each(t,p.vcard("includesGroup")):[]).map(function(e){return[t,u.any(e,p.vcard("fn")),e]});e=e.concat(n)}),e.sort()}return e},v=g();t.groupObjects=v.map(e=>e[2]),m("Loading "+t.groupObjects.length+" groups... "),u.fetcher.load(t.groupObjects).then(c).then(s).then(i).then(()=>new Promise(function(e,t){confirm("Write new clean versions?")?e(!0):t(new Error("User cancelled writing clean versions"))})).then(l).then(h).then(function(){m("Done!")})})});const P=h.appendChild(l.createElement("button"));P.style.cssText=f,P.textContent="Find individuals with no group",P.addEventListener("click",function(r){m("Loading groups..."),e(t,n,async function(e,t){if(!e)return void m("Load all groups: failed: "+t);const n=u.any(o,p.vcard("nameEmailIndex"));try{await u.fetcher.load(n)}catch(e){x(e)}m("Loaded groups and name index."),T(o),m("Groupless list finished..")})});const R=h.appendChild(l.createElement("button"));async function I(e){async function t(e){let t=[],n=[];e.forEach(e=>{let r=u.statementsMatching(null,p.owl("sameAs"),null,e.doc()).map(e=>e.subject);const i=new Set(r.map(e=>e.uri));r=[...i].map(e=>u.sym(e)),r.forEach(r=>{if(!u.each(r,p.vcard("fn"),null,e.doc()).length){t=t.concat(u.statementsMatching(r,p.owl("sameAs"),null,e.doc()).concat(u.statementsMatching(void 0,void 0,r,e.doc())));u.each(r,p.owl("sameAs"),null,e.doc()).forEach(t=>{n=n.concat($rdf.st(t,p.owl("sameAs"),r,e.doc())).concat($rdf.st(e,p.vcard("hasMember"),t,e.doc()))})}})}),t.length&&confirm("Groups can be updated to old data model ?")?(await u.updater.updateMany(t,n),alert("Update done")):t.length||alert("Nothing to update.\nAll Groups already use the old data model.")}let n=u.each(e,d("includesGroup"));const r=new Set(n.map(e=>e.uri));n=[...r].map(e=>u.sym(e)),t(n)}R.style.cssText=f,R.textContent="Put all individuals with no group in a new group",R.addEventListener("click",e=>A(o));const F=h.appendChild(l.createElement("button"));F.style.cssText=f,F.textContent="Revert groups to old data model",F.addEventListener("click",e=>I(o))}(),h};var r=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o}(e,t)}(n(500)),i=n(9332),a=n(466)},4416(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addWebIDToContacts=w,t.getPersonas=_,t.getSameAs=k,t.isOrganization=C,t.removeWebIDFromContacts=x,t.renderIdControl=A,t.renderNamedPane=S,t.renderPublicIdControl=async function(e,t){let n=d.sym("http://www.wikidata.org/wiki/Q43229"),r="Organization";for(const t in h)d.holds(e,l.rdf("type"),l.schema(t),e.doc())&&(n=d.sym(h[t]),r=t);const i={longPrompt:`If you know the ${v} of this ${r}, you can do more stuff with it.\n To record its ${v}, drag it onto the plus, or click the magnifyinng glass\n to search for it in WikiData.`,idNoun:v,urlType:l.vcard("PublicId"),dbLookup:!0,class:n,queryParams:m};return A(e,t,i)},t.renderWebIdControl=async function(e,t){const n={longPrompt:`If you know someone's ${g}, you can do more stuff with them.\n To record their ${g}, drag it onto the plus, or click the plus\n to enter it by hand.`,idNoun:g,urlType:l.vcard("WebID")};return A(e,t,n)},t.vcardWebIDs=E;var r=c(n(500)),i=n(9332),a=n(466),o=n(3311),s=c(n(8230));function c(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return(c=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}const l=r.ns,u=r.widgets,p=r.utils,d=i.store,f=r.style,h=u.publicData.wikidataClasses,m=u.publicData.wikidataParameters,g="Solid ID",v="In public data",b=r.icons.iconBase+"noun_1369241.svg",y=r.icons.iconBase+"noun_1369237.svg";async function w(e,t,n,r){try{new URL(t)}catch(e){throw new Error(`${g}: ${t} is not a valid url.`)}const i=r.bnode(),o=[s.st(e,l.vcard("url"),i,e.doc()),s.st(i,l.rdf("type"),n,e.doc()),s.st(i,l.vcard("value"),t,e.doc())],c=r.each(null,l.vcard("hasMember"),e);let u=[];c.forEach(n=>{u=u.concat(r.statementsMatching(n,l.vcard("hasMember"),e,n.doc())),o.push(s.st(n,l.vcard("hasMember"),r.sym(t),n.doc())),o.push(s.st(r.sym(t),l.owl("sameAs"),e,n.doc()))});try{await(0,a.updateMany)(u,o)}catch(e){throw new Error(`Could not create webId ${g}: ${t}.`)}}async function x(e,t,n,r){const i=r.each(e,l.vcard("url"),null,e.doc()).filter(t=>r.holds(t,l.rdf("type"),n,e.doc())).filter(n=>r.holds(n,l.vcard("value"),t,e.doc()));if(!i.length)throw new Error(`Person ${e} does not have ${g} ${t}.`);const o=i[0],c=[s.st(e,l.vcard("url"),o,e.doc()),s.st(o,l.rdf("type"),n,e.doc()),s.st(o,l.vcard("value"),t,e.doc())];await r.updater.update(c,[]);const u=r.each(null,l.vcard("hasMember"),r.sym(t));let p=[];const d=[];u.forEach(async n=>{p=p.concat(r.statementsMatching(r.sym(t),l.owl("sameAs"),e,n.doc())),d.push(s.st(n,l.vcard("hasMember"),e,n.doc())),r.statementsMatching(r.sym(t),l.owl("sameAs"),null,n.doc()).length<2&&(p=p.concat(r.statementsMatching(n,l.vcard("hasMember"),r.sym(t),n.doc())))}),await(0,a.updateMany)(p,d)}function k(e,t,n){const r=new Set,i=new Set([t.uri]);for(;i.size;){const t=Array.from(i)[0];if(i.delete(t),r.has(t))continue;r.add(t);const a=e.sym(t);e.each(a,l.owl("sameAs"),null,n).concat(e.each(null,l.owl("sameAs"),a,n)).forEach(e=>{i.add(e.uri)}),e.each(a,l.schema("sameAs"),null,n).concat(e.each(null,l.schema("sameAs"),a,n)).forEach(e=>{i.add(e.uri)})}return r.delete(t.uri),Array.from(r).map(t=>e.sym(t))}function _(e,t){const n=E(e,t).concat(k(e,t,t.doc())),r=[...new Set(n.map(e=>e.value))].map(t=>e.sym(t));return r.sort(),r.filter(e=>!e.sameTerm(t)),r}function E(e,t,n){return e.each(t,l.vcard("url"),null,t.doc()).filter(r=>e.holds(r,l.rdf("type"),n,t.doc())).map(n=>e.any(n,l.vcard("value"),null,t.doc())).filter(e=>!!e)}function C(e){const t=e.doc();return d.holds(e,l.rdf("type"),l.vcard("Organization"),t)||d.holds(e,l.rdf("type"),l.schema("Organization"),t)}function S(e,t,n,r){const i=r.session.paneRegistry.byName(n).render(t,r);return i.setAttribute("style","border: 0.1em solid #444; border-radius: 0.5em"),i}async function A(e,t,n){async function i(){const o=_(d,e);g.style.display=o.length?"none":"",p.syncTableToArrayReOrdered(v,o,o=>function(a,o,c){const p=a.createElement("div");p.style.width="100%";const d=p.appendChild(a.createElement("table"));d.style.width="100%";const f=d.appendChild(function(t){const o=new s.Literal(t.uri),d=n.urlType.sameTerm(l.vcard("WebID")),f={deleteFunction:n.editable?async function(){try{await x(e,o,n.urlType,c)}catch(t){p.appendChild(u.errorMessageBlock(a,`Error removing Id ${o} from ${e}: ${t}`))}await i()}:null,draggable:!0};d&&(f.title=t.uri.split("/")[2],f.image=u.faviconOrDefault(a,t.site()));const h=u.personTR(a,r.ns.foaf("knows"),t,f);return d&&(h.children[1].textConent=f.title,h.style.backgroundColor="#ffe6ff"),h.style.padding="0.2em",h}(o));f.style.width="100%";const h=d.appendChild(a.createElement("tr")).appendChild(a.createElement("td"));let m;h.setAttribute("colspan",3);let g=!0;const v=f.children[2].appendChild(u.button(a,b,"View",function(e){g=!g,m.style.visibility=g?"visible":"collapse",v.children[0].src=g?y:b}));v.style.float="right",delete v.style.backgroundColor,delete v.style.border;const w=(C(e)||C(o),"profile");return u.publicData.loadPublicDataThing(c,e,o).then(e=>{try{m=S(0,o,w,t),m.style.width="100%",h.appendChild(m)}catch(e){m=u.errorMessageBlock(a,`Problem displaying persona ${o}: ${e}`),h.appendChild(m)}},e=>{m=u.errorMessageBlock(a,`Error loading persona ${o}: ${e}`),h.appendChild(m)}),p}(a,o,d))}const{dom:a}=t;(n=n||{}).editable=d.updater.editable(e.doc().uri,d);const c=a.createElement("div");if(c.style="border-radius:0.3em; border: 0.1em solid #888;",0===_(d,e).length&&!n.editable)return c.style.display="none",c;const h=c.appendChild(a.createElement("h4"));h.textContent=n.idNoun,h.style=f.formHeadingStyle,h.style.color=f.highlightColor;const g=c.appendChild(a.createElement("p"));g.style=f.commentStyle,g.textContent=n.longPrompt;c.appendChild(a.createElement("table")).style.width="100%",n.editable&&(n.manualURIEntry=!0,n.queryParams=n.queryParams||m,c.appendChild(await(0,o.renderAutocompleteControl)(a,e,n,async function(e,t){try{await w(e,t,n.urlType,d)}catch(n){c.appendChild(u.errorMessageBlock(a,`Error adding Id ${t} to ${e}: ${n}`))}await i()})));const v=c.appendChild(a.createElement("div"));return await i(),c}},4945(e,t,n){var r="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==n.g&&n.g,i=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var r=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==n.g&&n.g||{},i="URLSearchParams"in r,a="Symbol"in r&&"iterator"in Symbol,o="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in r,c="ArrayBuffer"in r;if(c)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&l.indexOf(Object.prototype.toString.call(e))>-1};function p(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return a&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function m(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function g(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function v(e){var t=new FileReader,n=g(t);return t.readAsArrayBuffer(e),n}function b(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:i&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():c&&o&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=b(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=b(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=m(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=m(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(o)return this.blob().then(v);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,n,r,i,a=m(this);if(a)return a;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=g(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=r?r[1]:"utf-8",t.readAsText(e,i),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(k)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=p(e),t=d(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[p(e)]},h.prototype.get=function(e){return e=p(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(p(e))},h.prototype.set=function(e,t){this.map[p(e)]=d(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),f(e)},h.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),f(e)},h.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),f(e)},a&&(h.prototype[Symbol.iterator]=h.prototype.entries);var w=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function x(e,t){if(!(this instanceof x))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,i,a=(t=t||{}).body;if(e instanceof x){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(n=t.method||this.method||"GET",i=n.toUpperCase(),w.indexOf(i)>-1?i:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in r)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;if(o.test(this.url))this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function k(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function _(e,t){if(!(this instanceof _))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}x.prototype.clone=function(){return new x(this,{body:this._bodyInit})},y.call(x.prototype),y.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var E=[301,302,303,307,308];_.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function C(e,n){return new Promise(function(i,a){var s=new x(e,n);if(s.signal&&s.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function u(){l.abort()}if(l.onload=function(){var e,t,n={statusText:l.statusText,headers:(e=l.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();try{t.append(r,i)}catch(e){}}}),t)};0===s.url.indexOf("file://")&&(l.status<200||l.status>599)?n.status=200:n.status=l.status,n.url="responseURL"in l?l.responseURL:n.headers.get("X-Request-URL");var r="response"in l?l.response:l.responseText;setTimeout(function(){i(new _(r,n))},0)},l.onerror=function(){setTimeout(function(){a(new TypeError("Network request failed"))},0)},l.ontimeout=function(){setTimeout(function(){a(new TypeError("Network request timed out"))},0)},l.onabort=function(){setTimeout(function(){a(new t.DOMException("Aborted","AbortError"))},0)},l.open(s.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(s.url),!0),"include"===s.credentials?l.withCredentials=!0:"omit"===s.credentials&&(l.withCredentials=!1),"responseType"in l&&(o?l.responseType="blob":c&&(l.responseType="arraybuffer")),n&&"object"==typeof n.headers&&!(n.headers instanceof h||r.Headers&&n.headers instanceof r.Headers)){var f=[];Object.getOwnPropertyNames(n.headers).forEach(function(e){f.push(p(e)),l.setRequestHeader(e,d(n.headers[e]))}),s.headers.forEach(function(e,t){-1===f.indexOf(t)&&l.setRequestHeader(t,e)})}else s.headers.forEach(function(e,t){l.setRequestHeader(t,e)});s.signal&&(s.signal.addEventListener("abort",u),l.onreadystatechange=function(){4===l.readyState&&s.signal.removeEventListener("abort",u)}),l.send(void 0===s._bodyInit?null:s._bodyInit)})}C.polyfill=!0,r.fetch||(r.fetch=C,r.Headers=h,r.Request=x,r.Response=_),t.Headers=h,t.Request=x,t.Response=_,t.fetch=C}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var a=r.fetch?r:i;(t=a.fetch).default=a.fetch,t.fetch=a.fetch,t.Headers=a.Headers,t.Request=a.Request,t.Response=a.Response,e.exports=t},6320(e){"use strict";var t={single_source_shortest_paths:function(e,n,r){var i={},a={};a[n]=0;var o,s,c,l,u,p,d,f=t.PriorityQueue.make();for(f.push(n,0);!f.empty();)for(c in s=(o=f.pop()).value,l=o.cost,u=e[s]||{})u.hasOwnProperty(c)&&(p=l+u[c],d=a[c],(void 0===a[c]||d>p)&&(a[c]=p,f.push(c,p),i[c]=s));if(void 0!==r&&void 0===a[r]){var h=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(h)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,n,r){var i=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,i={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(i[n]=r[n]);return i.queue=[],i.sorter=e.sorter||r.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},5454(e){"use strict";
|
|
15
|
-
/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:t,setPrototypeOf:n,isFrozen:r,getPrototypeOf:i,getOwnPropertyDescriptor:a}=Object;let{freeze:o,seal:s,create:c}=Object,{apply:l,construct:u}="undefined"!=typeof Reflect&&Reflect;o||(o=function(e){return e}),s||(s=function(e){return e}),l||(l=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)}),u||(u=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const p=S(Array.prototype.forEach),d=S(Array.prototype.lastIndexOf),f=S(Array.prototype.pop),h=S(Array.prototype.push),m=S(Array.prototype.splice),g=S(String.prototype.toLowerCase),v=S(String.prototype.toString),b=S(String.prototype.match),y=S(String.prototype.replace),w=S(String.prototype.indexOf),x=S(String.prototype.trim),k=S(Object.prototype.hasOwnProperty),_=S(RegExp.prototype.test),E=(C=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(C,t)});var C;function S(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return l(e,t,r)}}function A(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;n&&n(e,null);let a=t.length;for(;a--;){let n=t[a];if("string"==typeof n){const e=i(n);e!==n&&(r(t)||(t[a]=e),n=e)}e[n]=!0}return e}function T(e){for(let t=0;t<e.length;t++){k(e,t)||(e[t]=null)}return e}function P(e){const n=c(null);for(const[r,i]of t(e)){k(e,r)&&(Array.isArray(i)?n[r]=T(i):i&&"object"==typeof i&&i.constructor===Object?n[r]=P(i):n[r]=i)}return n}function R(e,t){for(;null!==e;){const n=a(e,t);if(n){if(n.get)return S(n.get);if("function"==typeof n.value)return S(n.value)}e=i(e)}return function(){return null}}const I=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),F=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),N=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),O=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),j=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),M=o(["#text"]),D=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),U=o(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),B=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),z=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),q=s(/<%[\w\W]*|[\w\W]*%>/gm),$=s(/\$\{[\w\W]*/gm),W=s(/^data-[\-\w.\u00B7-\uFFFF]+$/),V=s(/^aria-[\-\w]+$/),G=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=s(/^(?:\w+script|data):/i),J=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Q=s(/^html$/i),Y=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var X=Object.freeze({__proto__:null,ARIA_ATTR:V,ATTR_WHITESPACE:J,CUSTOM_ELEMENT:Y,DATA_ATTR:W,DOCTYPE_NAME:Q,ERB_EXPR:q,IS_ALLOWED_URI:G,IS_SCRIPT_OR_DATA:K,MUSTACHE_EXPR:H,TMPLIT_EXPR:$});const Z=1,ee=3,te=7,ne=8,re=9,ie=function(){return"undefined"==typeof window?null:window};var ae=function e(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ie();const r=t=>e(t);if(r.version="3.3.1",r.removed=[],!n||!n.document||n.document.nodeType!==re||!n.Element)return r.isSupported=!1,r;let{document:i}=n;const a=i,s=a.currentScript,{DocumentFragment:l,HTMLTemplateElement:u,Node:C,Element:S,NodeFilter:T,NamedNodeMap:H=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:q,DOMParser:$,trustedTypes:W}=n,V=S.prototype,K=R(V,"cloneNode"),J=R(V,"remove"),Y=R(V,"nextSibling"),ae=R(V,"childNodes"),oe=R(V,"parentNode");if("function"==typeof u){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let se,ce="";const{implementation:le,createNodeIterator:ue,createDocumentFragment:pe,getElementsByTagName:de}=i,{importNode:fe}=a;let he={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof t&&"function"==typeof oe&&le&&void 0!==le.createHTMLDocument;const{MUSTACHE_EXPR:me,ERB_EXPR:ge,TMPLIT_EXPR:ve,DATA_ATTR:be,ARIA_ATTR:ye,IS_SCRIPT_OR_DATA:we,ATTR_WHITESPACE:xe,CUSTOM_ELEMENT:ke}=X;let{IS_ALLOWED_URI:_e}=X,Ee=null;const Ce=A({},[...I,...F,...N,...L,...M]);let Se=null;const Ae=A({},[...D,...U,...B,...z]);let Te=Object.seal(c(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Pe=null,Re=null;const Ie=Object.seal(c(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Fe=!0,Ne=!0,Oe=!1,Le=!0,je=!1,Me=!0,De=!1,Ue=!1,Be=!1,ze=!1,He=!1,qe=!1,$e=!0,We=!1,Ve=!0,Ge=!1,Ke={},Je=null;const Qe=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ye=null;const Xe=A({},["audio","video","img","source","image","track"]);let Ze=null;const et=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tt="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",rt="http://www.w3.org/1999/xhtml";let it=rt,at=!1,ot=null;const st=A({},[tt,nt,rt],v);let ct=A({},["mi","mo","mn","ms","mtext"]),lt=A({},["annotation-xml"]);const ut=A({},["title","style","font","a","script"]);let pt=null;const dt=["application/xhtml+xml","text/html"];let ft=null,ht=null;const mt=i.createElement("form"),gt=function(e){return e instanceof RegExp||e instanceof Function},vt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ht||ht!==e){if(e&&"object"==typeof e||(e={}),e=P(e),pt=-1===dt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ft="application/xhtml+xml"===pt?v:g,Ee=k(e,"ALLOWED_TAGS")?A({},e.ALLOWED_TAGS,ft):Ce,Se=k(e,"ALLOWED_ATTR")?A({},e.ALLOWED_ATTR,ft):Ae,ot=k(e,"ALLOWED_NAMESPACES")?A({},e.ALLOWED_NAMESPACES,v):st,Ze=k(e,"ADD_URI_SAFE_ATTR")?A(P(et),e.ADD_URI_SAFE_ATTR,ft):et,Ye=k(e,"ADD_DATA_URI_TAGS")?A(P(Xe),e.ADD_DATA_URI_TAGS,ft):Xe,Je=k(e,"FORBID_CONTENTS")?A({},e.FORBID_CONTENTS,ft):Qe,Pe=k(e,"FORBID_TAGS")?A({},e.FORBID_TAGS,ft):P({}),Re=k(e,"FORBID_ATTR")?A({},e.FORBID_ATTR,ft):P({}),Ke=!!k(e,"USE_PROFILES")&&e.USE_PROFILES,Fe=!1!==e.ALLOW_ARIA_ATTR,Ne=!1!==e.ALLOW_DATA_ATTR,Oe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Le=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,je=e.SAFE_FOR_TEMPLATES||!1,Me=!1!==e.SAFE_FOR_XML,De=e.WHOLE_DOCUMENT||!1,ze=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,qe=e.RETURN_TRUSTED_TYPE||!1,Be=e.FORCE_BODY||!1,$e=!1!==e.SANITIZE_DOM,We=e.SANITIZE_NAMED_PROPS||!1,Ve=!1!==e.KEEP_CONTENT,Ge=e.IN_PLACE||!1,_e=e.ALLOWED_URI_REGEXP||G,it=e.NAMESPACE||rt,ct=e.MATHML_TEXT_INTEGRATION_POINTS||ct,lt=e.HTML_INTEGRATION_POINTS||lt,Te=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&>(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Te.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&>(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Te.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Te.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),je&&(Ne=!1),He&&(ze=!0),Ke&&(Ee=A({},M),Se=[],!0===Ke.html&&(A(Ee,I),A(Se,D)),!0===Ke.svg&&(A(Ee,F),A(Se,U),A(Se,z)),!0===Ke.svgFilters&&(A(Ee,N),A(Se,U),A(Se,z)),!0===Ke.mathMl&&(A(Ee,L),A(Se,B),A(Se,z))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Ie.tagCheck=e.ADD_TAGS:(Ee===Ce&&(Ee=P(Ee)),A(Ee,e.ADD_TAGS,ft))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Ie.attributeCheck=e.ADD_ATTR:(Se===Ae&&(Se=P(Se)),A(Se,e.ADD_ATTR,ft))),e.ADD_URI_SAFE_ATTR&&A(Ze,e.ADD_URI_SAFE_ATTR,ft),e.FORBID_CONTENTS&&(Je===Qe&&(Je=P(Je)),A(Je,e.FORBID_CONTENTS,ft)),e.ADD_FORBID_CONTENTS&&(Je===Qe&&(Je=P(Je)),A(Je,e.ADD_FORBID_CONTENTS,ft)),Ve&&(Ee["#text"]=!0),De&&A(Ee,["html","head","body"]),Ee.table&&(A(Ee,["tbody"]),delete Pe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');se=e.TRUSTED_TYPES_POLICY,ce=se.createHTML("")}else void 0===se&&(se=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return null}}(W,s)),null!==se&&"string"==typeof ce&&(ce=se.createHTML(""));o&&o(e),ht=e}},bt=A({},[...F,...N,...O]),yt=A({},[...L,...j]),wt=function(e){h(r.removed,{element:e});try{oe(e).removeChild(e)}catch(t){J(e)}},xt=function(e,t){try{h(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ze||He)try{wt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},kt=function(e){let t=null,n=null;if(Be)e="<remove></remove>"+e;else{const t=b(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===pt&&it===rt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=se?se.createHTML(e):e;if(it===rt)try{t=(new $).parseFromString(r,pt)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(it,"template",null);try{t.documentElement.innerHTML=at?ce:r}catch(e){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),it===rt?de.call(t,De?"html":"body")[0]:De?t.documentElement:a},_t=function(e){return ue.call(e.ownerDocument||e,e,T.SHOW_ELEMENT|T.SHOW_COMMENT|T.SHOW_TEXT|T.SHOW_PROCESSING_INSTRUCTION|T.SHOW_CDATA_SECTION,null)},Et=function(e){return e instanceof q&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof H)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Ct=function(e){return"function"==typeof C&&e instanceof C};function St(e,t,n){p(e,e=>{e.call(r,t,n,ht)})}const At=function(e){let t=null;if(St(he.beforeSanitizeElements,e,null),Et(e))return wt(e),!0;const n=ft(e.nodeName);if(St(he.uponSanitizeElement,e,{tagName:n,allowedTags:Ee}),Me&&e.hasChildNodes()&&!Ct(e.firstElementChild)&&_(/<[/\w!]/g,e.innerHTML)&&_(/<[/\w!]/g,e.textContent))return wt(e),!0;if(e.nodeType===te)return wt(e),!0;if(Me&&e.nodeType===ne&&_(/<[/\w]/g,e.data))return wt(e),!0;if(!(Ie.tagCheck instanceof Function&&Ie.tagCheck(n))&&(!Ee[n]||Pe[n])){if(!Pe[n]&&Pt(n)){if(Te.tagNameCheck instanceof RegExp&&_(Te.tagNameCheck,n))return!1;if(Te.tagNameCheck instanceof Function&&Te.tagNameCheck(n))return!1}if(Ve&&!Je[n]){const t=oe(e)||e.parentNode,n=ae(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const i=K(n[r],!0);i.__removalCount=(e.__removalCount||0)+1,t.insertBefore(i,Y(e))}}}return wt(e),!0}return e instanceof S&&!function(e){let t=oe(e);t&&t.tagName||(t={namespaceURI:it,tagName:"template"});const n=g(e.tagName),r=g(t.tagName);return!!ot[e.namespaceURI]&&(e.namespaceURI===nt?t.namespaceURI===rt?"svg"===n:t.namespaceURI===tt?"svg"===n&&("annotation-xml"===r||ct[r]):Boolean(bt[n]):e.namespaceURI===tt?t.namespaceURI===rt?"math"===n:t.namespaceURI===nt?"math"===n&<[r]:Boolean(yt[n]):e.namespaceURI===rt?!(t.namespaceURI===nt&&!lt[r])&&!(t.namespaceURI===tt&&!ct[r])&&!yt[n]&&(ut[n]||!bt[n]):!("application/xhtml+xml"!==pt||!ot[e.namespaceURI]))}(e)?(wt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!_(/<\/no(script|embed|frames)/i,e.innerHTML)?(je&&e.nodeType===ee&&(t=e.textContent,p([me,ge,ve],e=>{t=y(t,e," ")}),e.textContent!==t&&(h(r.removed,{element:e.cloneNode()}),e.textContent=t)),St(he.afterSanitizeElements,e,null),!1):(wt(e),!0)},Tt=function(e,t,n){if($e&&("id"===t||"name"===t)&&(n in i||n in mt))return!1;if(Ne&&!Re[t]&&_(be,t));else if(Fe&&_(ye,t));else if(Ie.attributeCheck instanceof Function&&Ie.attributeCheck(t,e));else if(!Se[t]||Re[t]){if(!(Pt(e)&&(Te.tagNameCheck instanceof RegExp&&_(Te.tagNameCheck,e)||Te.tagNameCheck instanceof Function&&Te.tagNameCheck(e))&&(Te.attributeNameCheck instanceof RegExp&&_(Te.attributeNameCheck,t)||Te.attributeNameCheck instanceof Function&&Te.attributeNameCheck(t,e))||"is"===t&&Te.allowCustomizedBuiltInElements&&(Te.tagNameCheck instanceof RegExp&&_(Te.tagNameCheck,n)||Te.tagNameCheck instanceof Function&&Te.tagNameCheck(n))))return!1}else if(Ze[t]);else if(_(_e,y(n,xe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==w(n,"data:")||!Ye[e]){if(Oe&&!_(we,y(n,xe,"")));else if(n)return!1}else;return!0},Pt=function(e){return"annotation-xml"!==e&&b(e,ke)},Rt=function(e){St(he.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Et(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Se,forceKeepAttr:void 0};let i=t.length;for(;i--;){const a=t[i],{name:o,namespaceURI:s,value:c}=a,l=ft(o),u=c;let d="value"===o?u:x(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,St(he.uponSanitizeAttribute,e,n),d=n.attrValue,!We||"id"!==l&&"name"!==l||(xt(o,e),d="user-content-"+d),Me&&_(/((--!?|])>)|<\/(style|title|textarea)/i,d)){xt(o,e);continue}if("attributename"===l&&b(d,"href")){xt(o,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){xt(o,e);continue}if(!Le&&_(/\/>/i,d)){xt(o,e);continue}je&&p([me,ge,ve],e=>{d=y(d,e," ")});const h=ft(e.nodeName);if(Tt(h,l,d)){if(se&&"object"==typeof W&&"function"==typeof W.getAttributeType)if(s);else switch(W.getAttributeType(h,l)){case"TrustedHTML":d=se.createHTML(d);break;case"TrustedScriptURL":d=se.createScriptURL(d)}if(d!==u)try{s?e.setAttributeNS(s,o,d):e.setAttribute(o,d),Et(e)?wt(e):f(r.removed)}catch(t){xt(o,e)}}else xt(o,e)}St(he.afterSanitizeAttributes,e,null)},It=function e(t){let n=null;const r=_t(t);for(St(he.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)St(he.uponSanitizeShadowNode,n,null),At(n),Rt(n),n.content instanceof l&&e(n.content);St(he.afterSanitizeShadowDOM,t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,i=null,o=null,s=null;if(at=!e,at&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ct(e)){if("function"!=typeof e.toString)throw E("toString is not a function");if("string"!=typeof(e=e.toString()))throw E("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Ue||vt(t),r.removed=[],"string"==typeof e&&(Ge=!1),Ge){if(e.nodeName){const t=ft(e.nodeName);if(!Ee[t]||Pe[t])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof C)n=kt("\x3c!----\x3e"),i=n.ownerDocument.importNode(e,!0),i.nodeType===Z&&"BODY"===i.nodeName||"HTML"===i.nodeName?n=i:n.appendChild(i);else{if(!ze&&!je&&!De&&-1===e.indexOf("<"))return se&&qe?se.createHTML(e):e;if(n=kt(e),!n)return ze?null:qe?ce:""}n&&Be&&wt(n.firstChild);const c=_t(Ge?e:n);for(;o=c.nextNode();)At(o),Rt(o),o.content instanceof l&&It(o.content);if(Ge)return e;if(ze){if(He)for(s=pe.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(Se.shadowroot||Se.shadowrootmode)&&(s=fe.call(a,s,!0)),s}let u=De?n.outerHTML:n.innerHTML;return De&&Ee["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&_(Q,n.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+u),je&&p([me,ge,ve],e=>{u=y(u,e," ")}),se&&qe?se.createHTML(u):u},r.setConfig=function(){vt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},r.clearConfig=function(){ht=null,Ue=!1},r.isValidAttribute=function(e,t,n){ht||vt({});const r=ft(e),i=ft(t);return Tt(r,i,n)},r.addHook=function(e,t){"function"==typeof t&&h(he[e],t)},r.removeHook=function(e,t){if(void 0!==t){const n=d(he[e],t);return-1===n?void 0:m(he[e],n,1)[0]}return f(he[e])},r.removeHooks=function(e){he[e]=[]},r.removeAllHooks=function(){he={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}();e.exports=ae},7007(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}m(e,t,a,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,n)}(e,i,{once:!0})})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,a,o;if(s(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),void 0===o)o=a[t]=n,++e._eventsCount;else if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,console&&console.warn}return e}function u(){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 p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):h(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);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(a){r.once&&e.removeEventListener(t,i),n(a)})}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},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+".");o=e}}),a.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},a.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},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var c=a[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var l=c.length,u=h(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,o;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},a.prototype.listenerCount=f,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},1838(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(9332),i=n(500);const a={icon:i.icons.iconBase+"noun_973694_expanded.svg",name:"folder",mintNew:function(e,t){const n=e.session.store,r=t.newInstance||n.sym(t.newBase);let i=r.uri;return i.endsWith("/")&&(i=i.slice(0,-1)),t.newInstance=n.sym(i+"/"),n.fetcher.webOperation("PUT",r.uri).then(function(){return t})},label:function(e,t){const n=t.session.store,r=n.each(e,i.ns.ldp("contains")).length;return r>0?"Contents ("+r+")":n.holds(e,i.ns.rdf("type"),i.ns.ldp("Container"))?"Container (0)":null},render:function(e,t){function n(e){const t=e.uri.slice(e.dir().uri.length);return!(t.startsWith(".")||t.endsWith(".acl")||t.endsWith("~"))}function a(){let t=c.each(e,i.ns.ldp("contains")).filter(n);t=t.map(e=>[i.utils.label(e).toLowerCase(),e]),t.sort(),t=t.map(e=>e[1]),i.utils.syncTableToArray(l,t,function(t){const n=c.statementsMatching(e,i.ns.ldp("contains"),t)[0],r=s.VIEWAS_boring_default,a=s.propertyTR(o,n,!1);return a.firstChild.textContent="",a.firstChild.style.cssText+="min-width: 3em;",a.appendChild(s.outlineObjectTD(t,r,void 0,n)),a})}const o=t.dom,s=t.getOutliner(o),c=t.session.store;let l;const u=o.createElement("div");u.setAttribute("class","instancePane");const p=i.style.folderPaneStyle||"border-top: solid 1px #777; border-bottom: solid 1px #777; margin-top: 0.5em; margin-bottom: 0.5em;";u.setAttribute("style",p);const d=e.uri.endsWith("/")?e.uri:e.uri+"/",f=c.sym(d+"index.ttl#this");if(c.holds(e,i.ns.ldp("contains"),f.doc())){const e=u.appendChild(o.createElement("div"));return e.style.cssText="border-top: 0.2em solid #ccc;",c.fetcher.load(f.doc()).then(function(){l=e.appendChild(o.createElement("table")),t.getOutliner(o).GotoSubject(f,!0,void 0,!1,void 0,l)}),u}l=u.appendChild(o.createElement("table")),l.refresh=a,a(),c.updater.addDownstreamChangeListener(e,a);const h=u.appendChild(o.createElement("div")),m=r.authn.currentUser();if(!m)return u;const g={folder:e,div:h,dom:o,statusArea:h,me:m};return g.refreshTarget=l,i.login.filterAvailablePanes(t.session.paneRegistry.list).then(function(e){i.create.newThingUI(g,t,e),i.aclControl.preventBrowserDropEvents(o);let n;n=h.firstChild,i.widgets.makeDropTarget(n,null,v)}),u;function v(t){i.widgets.uploadFiles(c.fetcher,t,e.uri,e.uri,function(t,n){const r=c.sym(n);c.add(e,i.ns.ldp("contains"),r,e.doc()),l.refresh()})}}}},4146(e,t,n){"use strict";var r=n(4363),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var l=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var i=f(n);i&&i!==h&&e(t,i,r)}var o=u(n);p&&(o=o.concat(p(n)));for(var s=c(t),m=c(n),g=0;g<o.length;++g){var v=o[g];if(!(a[v]||r&&r[v]||m&&m[v]||s&&s[v])){var b=d(n,v);try{l(t,v,b)}catch(e){}}}}return t}},251(e,t){
|
|
15
|
+
/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:t,setPrototypeOf:n,isFrozen:r,getPrototypeOf:i,getOwnPropertyDescriptor:a}=Object;let{freeze:o,seal:s,create:c}=Object,{apply:l,construct:u}="undefined"!=typeof Reflect&&Reflect;o||(o=function(e){return e}),s||(s=function(e){return e}),l||(l=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)}),u||(u=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const p=S(Array.prototype.forEach),d=S(Array.prototype.lastIndexOf),f=S(Array.prototype.pop),h=S(Array.prototype.push),m=S(Array.prototype.splice),g=S(String.prototype.toLowerCase),v=S(String.prototype.toString),b=S(String.prototype.match),y=S(String.prototype.replace),w=S(String.prototype.indexOf),x=S(String.prototype.trim),k=S(Object.prototype.hasOwnProperty),_=S(RegExp.prototype.test),E=(C=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(C,t)});var C;function S(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return l(e,t,r)}}function A(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;n&&n(e,null);let a=t.length;for(;a--;){let n=t[a];if("string"==typeof n){const e=i(n);e!==n&&(r(t)||(t[a]=e),n=e)}e[n]=!0}return e}function T(e){for(let t=0;t<e.length;t++){k(e,t)||(e[t]=null)}return e}function P(e){const n=c(null);for(const[r,i]of t(e)){k(e,r)&&(Array.isArray(i)?n[r]=T(i):i&&"object"==typeof i&&i.constructor===Object?n[r]=P(i):n[r]=i)}return n}function R(e,t){for(;null!==e;){const n=a(e,t);if(n){if(n.get)return S(n.get);if("function"==typeof n.value)return S(n.value)}e=i(e)}return function(){return null}}const I=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),F=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),N=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),O=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),j=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),M=o(["#text"]),D=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),U=o(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),B=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),z=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),q=s(/<%[\w\W]*|[\w\W]*%>/gm),$=s(/\$\{[\w\W]*/gm),W=s(/^data-[\-\w.\u00B7-\uFFFF]+$/),V=s(/^aria-[\-\w]+$/),G=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=s(/^(?:\w+script|data):/i),J=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Q=s(/^html$/i),Y=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var X=Object.freeze({__proto__:null,ARIA_ATTR:V,ATTR_WHITESPACE:J,CUSTOM_ELEMENT:Y,DATA_ATTR:W,DOCTYPE_NAME:Q,ERB_EXPR:q,IS_ALLOWED_URI:G,IS_SCRIPT_OR_DATA:K,MUSTACHE_EXPR:H,TMPLIT_EXPR:$});const Z=1,ee=3,te=7,ne=8,re=9,ie=function(){return"undefined"==typeof window?null:window};var ae=function e(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ie();const r=t=>e(t);if(r.version="3.3.3",r.removed=[],!n||!n.document||n.document.nodeType!==re||!n.Element)return r.isSupported=!1,r;let{document:i}=n;const a=i,s=a.currentScript,{DocumentFragment:l,HTMLTemplateElement:u,Node:C,Element:S,NodeFilter:T,NamedNodeMap:H=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:q,DOMParser:$,trustedTypes:W}=n,V=S.prototype,K=R(V,"cloneNode"),J=R(V,"remove"),Y=R(V,"nextSibling"),ae=R(V,"childNodes"),oe=R(V,"parentNode");if("function"==typeof u){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let se,ce="";const{implementation:le,createNodeIterator:ue,createDocumentFragment:pe,getElementsByTagName:de}=i,{importNode:fe}=a;let he={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof t&&"function"==typeof oe&&le&&void 0!==le.createHTMLDocument;const{MUSTACHE_EXPR:me,ERB_EXPR:ge,TMPLIT_EXPR:ve,DATA_ATTR:be,ARIA_ATTR:ye,IS_SCRIPT_OR_DATA:we,ATTR_WHITESPACE:xe,CUSTOM_ELEMENT:ke}=X;let{IS_ALLOWED_URI:_e}=X,Ee=null;const Ce=A({},[...I,...F,...N,...L,...M]);let Se=null;const Ae=A({},[...D,...U,...B,...z]);let Te=Object.seal(c(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Pe=null,Re=null;const Ie=Object.seal(c(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Fe=!0,Ne=!0,Oe=!1,Le=!0,je=!1,Me=!0,De=!1,Ue=!1,Be=!1,ze=!1,He=!1,qe=!1,$e=!0,We=!1,Ve=!0,Ge=!1,Ke={},Je=null;const Qe=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ye=null;const Xe=A({},["audio","video","img","source","image","track"]);let Ze=null;const et=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tt="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",rt="http://www.w3.org/1999/xhtml";let it=rt,at=!1,ot=null;const st=A({},[tt,nt,rt],v);let ct=A({},["mi","mo","mn","ms","mtext"]),lt=A({},["annotation-xml"]);const ut=A({},["title","style","font","a","script"]);let pt=null;const dt=["application/xhtml+xml","text/html"];let ft=null,ht=null;const mt=i.createElement("form"),gt=function(e){return e instanceof RegExp||e instanceof Function},vt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ht||ht!==e){if(e&&"object"==typeof e||(e={}),e=P(e),pt=-1===dt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ft="application/xhtml+xml"===pt?v:g,Ee=k(e,"ALLOWED_TAGS")?A({},e.ALLOWED_TAGS,ft):Ce,Se=k(e,"ALLOWED_ATTR")?A({},e.ALLOWED_ATTR,ft):Ae,ot=k(e,"ALLOWED_NAMESPACES")?A({},e.ALLOWED_NAMESPACES,v):st,Ze=k(e,"ADD_URI_SAFE_ATTR")?A(P(et),e.ADD_URI_SAFE_ATTR,ft):et,Ye=k(e,"ADD_DATA_URI_TAGS")?A(P(Xe),e.ADD_DATA_URI_TAGS,ft):Xe,Je=k(e,"FORBID_CONTENTS")?A({},e.FORBID_CONTENTS,ft):Qe,Pe=k(e,"FORBID_TAGS")?A({},e.FORBID_TAGS,ft):P({}),Re=k(e,"FORBID_ATTR")?A({},e.FORBID_ATTR,ft):P({}),Ke=!!k(e,"USE_PROFILES")&&e.USE_PROFILES,Fe=!1!==e.ALLOW_ARIA_ATTR,Ne=!1!==e.ALLOW_DATA_ATTR,Oe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Le=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,je=e.SAFE_FOR_TEMPLATES||!1,Me=!1!==e.SAFE_FOR_XML,De=e.WHOLE_DOCUMENT||!1,ze=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,qe=e.RETURN_TRUSTED_TYPE||!1,Be=e.FORCE_BODY||!1,$e=!1!==e.SANITIZE_DOM,We=e.SANITIZE_NAMED_PROPS||!1,Ve=!1!==e.KEEP_CONTENT,Ge=e.IN_PLACE||!1,_e=e.ALLOWED_URI_REGEXP||G,it=e.NAMESPACE||rt,ct=e.MATHML_TEXT_INTEGRATION_POINTS||ct,lt=e.HTML_INTEGRATION_POINTS||lt,Te=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&>(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Te.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&>(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Te.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Te.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),je&&(Ne=!1),He&&(ze=!0),Ke&&(Ee=A({},M),Se=c(null),!0===Ke.html&&(A(Ee,I),A(Se,D)),!0===Ke.svg&&(A(Ee,F),A(Se,U),A(Se,z)),!0===Ke.svgFilters&&(A(Ee,N),A(Se,U),A(Se,z)),!0===Ke.mathMl&&(A(Ee,L),A(Se,B),A(Se,z))),k(e,"ADD_TAGS")||(Ie.tagCheck=null),k(e,"ADD_ATTR")||(Ie.attributeCheck=null),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Ie.tagCheck=e.ADD_TAGS:(Ee===Ce&&(Ee=P(Ee)),A(Ee,e.ADD_TAGS,ft))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Ie.attributeCheck=e.ADD_ATTR:(Se===Ae&&(Se=P(Se)),A(Se,e.ADD_ATTR,ft))),e.ADD_URI_SAFE_ATTR&&A(Ze,e.ADD_URI_SAFE_ATTR,ft),e.FORBID_CONTENTS&&(Je===Qe&&(Je=P(Je)),A(Je,e.FORBID_CONTENTS,ft)),e.ADD_FORBID_CONTENTS&&(Je===Qe&&(Je=P(Je)),A(Je,e.ADD_FORBID_CONTENTS,ft)),Ve&&(Ee["#text"]=!0),De&&A(Ee,["html","head","body"]),Ee.table&&(A(Ee,["tbody"]),delete Pe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');se=e.TRUSTED_TYPES_POLICY,ce=se.createHTML("")}else void 0===se&&(se=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return null}}(W,s)),null!==se&&"string"==typeof ce&&(ce=se.createHTML(""));o&&o(e),ht=e}},bt=A({},[...F,...N,...O]),yt=A({},[...L,...j]),wt=function(e){h(r.removed,{element:e});try{oe(e).removeChild(e)}catch(t){J(e)}},xt=function(e,t){try{h(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ze||He)try{wt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},kt=function(e){let t=null,n=null;if(Be)e="<remove></remove>"+e;else{const t=b(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===pt&&it===rt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=se?se.createHTML(e):e;if(it===rt)try{t=(new $).parseFromString(r,pt)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(it,"template",null);try{t.documentElement.innerHTML=at?ce:r}catch(e){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),it===rt?de.call(t,De?"html":"body")[0]:De?t.documentElement:a},_t=function(e){return ue.call(e.ownerDocument||e,e,T.SHOW_ELEMENT|T.SHOW_COMMENT|T.SHOW_TEXT|T.SHOW_PROCESSING_INSTRUCTION|T.SHOW_CDATA_SECTION,null)},Et=function(e){return e instanceof q&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof H)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Ct=function(e){return"function"==typeof C&&e instanceof C};function St(e,t,n){p(e,e=>{e.call(r,t,n,ht)})}const At=function(e){let t=null;if(St(he.beforeSanitizeElements,e,null),Et(e))return wt(e),!0;const n=ft(e.nodeName);if(St(he.uponSanitizeElement,e,{tagName:n,allowedTags:Ee}),Me&&e.hasChildNodes()&&!Ct(e.firstElementChild)&&_(/<[/\w!]/g,e.innerHTML)&&_(/<[/\w!]/g,e.textContent))return wt(e),!0;if(e.nodeType===te)return wt(e),!0;if(Me&&e.nodeType===ne&&_(/<[/\w]/g,e.data))return wt(e),!0;if(!(Ie.tagCheck instanceof Function&&Ie.tagCheck(n))&&(!Ee[n]||Pe[n])){if(!Pe[n]&&Pt(n)){if(Te.tagNameCheck instanceof RegExp&&_(Te.tagNameCheck,n))return!1;if(Te.tagNameCheck instanceof Function&&Te.tagNameCheck(n))return!1}if(Ve&&!Je[n]){const t=oe(e)||e.parentNode,n=ae(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const i=K(n[r],!0);i.__removalCount=(e.__removalCount||0)+1,t.insertBefore(i,Y(e))}}}return wt(e),!0}return e instanceof S&&!function(e){let t=oe(e);t&&t.tagName||(t={namespaceURI:it,tagName:"template"});const n=g(e.tagName),r=g(t.tagName);return!!ot[e.namespaceURI]&&(e.namespaceURI===nt?t.namespaceURI===rt?"svg"===n:t.namespaceURI===tt?"svg"===n&&("annotation-xml"===r||ct[r]):Boolean(bt[n]):e.namespaceURI===tt?t.namespaceURI===rt?"math"===n:t.namespaceURI===nt?"math"===n&<[r]:Boolean(yt[n]):e.namespaceURI===rt?!(t.namespaceURI===nt&&!lt[r])&&!(t.namespaceURI===tt&&!ct[r])&&!yt[n]&&(ut[n]||!bt[n]):!("application/xhtml+xml"!==pt||!ot[e.namespaceURI]))}(e)?(wt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!_(/<\/no(script|embed|frames)/i,e.innerHTML)?(je&&e.nodeType===ee&&(t=e.textContent,p([me,ge,ve],e=>{t=y(t,e," ")}),e.textContent!==t&&(h(r.removed,{element:e.cloneNode()}),e.textContent=t)),St(he.afterSanitizeElements,e,null),!1):(wt(e),!0)},Tt=function(e,t,n){if(Re[t])return!1;if($e&&("id"===t||"name"===t)&&(n in i||n in mt))return!1;if(Ne&&!Re[t]&&_(be,t));else if(Fe&&_(ye,t));else if(Ie.attributeCheck instanceof Function&&Ie.attributeCheck(t,e));else if(!Se[t]||Re[t]){if(!(Pt(e)&&(Te.tagNameCheck instanceof RegExp&&_(Te.tagNameCheck,e)||Te.tagNameCheck instanceof Function&&Te.tagNameCheck(e))&&(Te.attributeNameCheck instanceof RegExp&&_(Te.attributeNameCheck,t)||Te.attributeNameCheck instanceof Function&&Te.attributeNameCheck(t,e))||"is"===t&&Te.allowCustomizedBuiltInElements&&(Te.tagNameCheck instanceof RegExp&&_(Te.tagNameCheck,n)||Te.tagNameCheck instanceof Function&&Te.tagNameCheck(n))))return!1}else if(Ze[t]);else if(_(_e,y(n,xe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==w(n,"data:")||!Ye[e]){if(Oe&&!_(we,y(n,xe,"")));else if(n)return!1}else;return!0},Pt=function(e){return"annotation-xml"!==e&&b(e,ke)},Rt=function(e){St(he.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Et(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Se,forceKeepAttr:void 0};let i=t.length;for(;i--;){const a=t[i],{name:o,namespaceURI:s,value:c}=a,l=ft(o),u=c;let d="value"===o?u:x(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,St(he.uponSanitizeAttribute,e,n),d=n.attrValue,!We||"id"!==l&&"name"!==l||(xt(o,e),d="user-content-"+d),Me&&_(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){xt(o,e);continue}if("attributename"===l&&b(d,"href")){xt(o,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){xt(o,e);continue}if(!Le&&_(/\/>/i,d)){xt(o,e);continue}je&&p([me,ge,ve],e=>{d=y(d,e," ")});const h=ft(e.nodeName);if(Tt(h,l,d)){if(se&&"object"==typeof W&&"function"==typeof W.getAttributeType)if(s);else switch(W.getAttributeType(h,l)){case"TrustedHTML":d=se.createHTML(d);break;case"TrustedScriptURL":d=se.createScriptURL(d)}if(d!==u)try{s?e.setAttributeNS(s,o,d):e.setAttribute(o,d),Et(e)?wt(e):f(r.removed)}catch(t){xt(o,e)}}else xt(o,e)}St(he.afterSanitizeAttributes,e,null)},It=function e(t){let n=null;const r=_t(t);for(St(he.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)St(he.uponSanitizeShadowNode,n,null),At(n),Rt(n),n.content instanceof l&&e(n.content);St(he.afterSanitizeShadowDOM,t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,i=null,o=null,s=null;if(at=!e,at&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ct(e)){if("function"!=typeof e.toString)throw E("toString is not a function");if("string"!=typeof(e=e.toString()))throw E("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Ue||vt(t),r.removed=[],"string"==typeof e&&(Ge=!1),Ge){if(e.nodeName){const t=ft(e.nodeName);if(!Ee[t]||Pe[t])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof C)n=kt("\x3c!----\x3e"),i=n.ownerDocument.importNode(e,!0),i.nodeType===Z&&"BODY"===i.nodeName||"HTML"===i.nodeName?n=i:n.appendChild(i);else{if(!ze&&!je&&!De&&-1===e.indexOf("<"))return se&&qe?se.createHTML(e):e;if(n=kt(e),!n)return ze?null:qe?ce:""}n&&Be&&wt(n.firstChild);const c=_t(Ge?e:n);for(;o=c.nextNode();)At(o),Rt(o),o.content instanceof l&&It(o.content);if(Ge)return e;if(ze){if(He)for(s=pe.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(Se.shadowroot||Se.shadowrootmode)&&(s=fe.call(a,s,!0)),s}let u=De?n.outerHTML:n.innerHTML;return De&&Ee["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&_(Q,n.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+u),je&&p([me,ge,ve],e=>{u=y(u,e," ")}),se&&qe?se.createHTML(u):u},r.setConfig=function(){vt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},r.clearConfig=function(){ht=null,Ue=!1},r.isValidAttribute=function(e,t,n){ht||vt({});const r=ft(e),i=ft(t);return Tt(r,i,n)},r.addHook=function(e,t){"function"==typeof t&&h(he[e],t)},r.removeHook=function(e,t){if(void 0!==t){const n=d(he[e],t);return-1===n?void 0:m(he[e],n,1)[0]}return f(he[e])},r.removeHooks=function(e){he[e]=[]},r.removeAllHooks=function(){he={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}();e.exports=ae},7007(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}m(e,t,a,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,n)}(e,i,{once:!0})})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,a,o;if(s(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),void 0===o)o=a[t]=n,++e._eventsCount;else if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,console&&console.warn}return e}function u(){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 p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):h(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);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(a){r.once&&e.removeEventListener(t,i),n(a)})}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},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+".");o=e}}),a.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},a.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},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var c=a[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var l=c.length,u=h(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,o;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},a.prototype.listenerCount=f,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},1838(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(9332),i=n(500);const a={icon:i.icons.iconBase+"noun_973694_expanded.svg",name:"folder",mintNew:function(e,t){const n=e.session.store,r=t.newInstance||n.sym(t.newBase);let i=r.uri;return i.endsWith("/")&&(i=i.slice(0,-1)),t.newInstance=n.sym(i+"/"),n.fetcher.webOperation("PUT",r.uri).then(function(){return t})},label:function(e,t){const n=t.session.store,r=n.each(e,i.ns.ldp("contains")).length;return r>0?"Contents ("+r+")":n.holds(e,i.ns.rdf("type"),i.ns.ldp("Container"))?"Container (0)":null},render:function(e,t){function n(e){const t=e.uri.slice(e.dir().uri.length);return!(t.startsWith(".")||t.endsWith(".acl")||t.endsWith("~"))}function a(){let t=c.each(e,i.ns.ldp("contains")).filter(n);t=t.map(e=>[i.utils.label(e).toLowerCase(),e]),t.sort(),t=t.map(e=>e[1]),i.utils.syncTableToArray(l,t,function(t){const n=c.statementsMatching(e,i.ns.ldp("contains"),t)[0],r=s.VIEWAS_boring_default,a=s.propertyTR(o,n,!1);return a.firstChild.textContent="",a.firstChild.style.cssText+="min-width: 3em;",a.appendChild(s.outlineObjectTD(t,r,void 0,n)),a})}const o=t.dom,s=t.getOutliner(o),c=t.session.store;let l;const u=o.createElement("div");u.setAttribute("class","instancePane");const p=i.style.folderPaneStyle||"border-top: solid 1px #777; border-bottom: solid 1px #777; margin-top: 0.5em; margin-bottom: 0.5em;";u.setAttribute("style",p);const d=e.uri.endsWith("/")?e.uri:e.uri+"/",f=c.sym(d+"index.ttl#this");if(c.holds(e,i.ns.ldp("contains"),f.doc())){const e=u.appendChild(o.createElement("div"));return e.style.cssText="border-top: 0.2em solid #ccc;",c.fetcher.load(f.doc()).then(function(){l=e.appendChild(o.createElement("table")),t.getOutliner(o).GotoSubject(f,!0,void 0,!1,void 0,l)}),u}l=u.appendChild(o.createElement("table")),l.refresh=a,a(),c.updater.addDownstreamChangeListener(e,a);const h=u.appendChild(o.createElement("div")),m=r.authn.currentUser();if(!m)return u;const g={folder:e,div:h,dom:o,statusArea:h,me:m};return g.refreshTarget=l,i.login.filterAvailablePanes(t.session.paneRegistry.list).then(function(e){i.create.newThingUI(g,t,e),i.aclControl.preventBrowserDropEvents(o);let n;n=h.firstChild,i.widgets.makeDropTarget(n,null,v)}),u;function v(t){i.widgets.uploadFiles(c.fetcher,t,e.uri,e.uri,function(t,n){const r=c.sym(n);c.add(e,i.ns.ldp("contains"),r,e.doc()),l.refresh()})}}}},4146(e,t,n){"use strict";var r=n(4363),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var l=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var i=f(n);i&&i!==h&&e(t,i,r)}var o=u(n);p&&(o=o.concat(p(n)));for(var s=c(t),m=c(n),g=0;g<o.length;++g){var v=o[g];if(!(a[v]||r&&r[v]||m&&m[v]||s&&s[v])){var b=d(n,v);try{l(t,v,b)}catch(e){}}}}return t}},251(e,t){
|
|
16
16
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
17
17
|
t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,c=(1<<s)-1,l=c>>1,u=-7,p=n?i-1:0,d=n?-1:1,f=e[t+p];for(p+=d,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+p],p+=d,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=256*o+e[t+p],p+=d,u-=8);if(0===a)a=1-l;else{if(a===c)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),a-=l}return(f?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,c,l=8*a-i-1,u=(1<<l)-1,p=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+p>=1?d/c:d*Math.pow(2,1-p))*c>=2&&(o++,c/=2),o+p>=u?(s=0,o=u):o+p>=1?(s=(t*c-1)*Math.pow(2,i),o+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&s,f+=h,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+f]=255&o,f+=h,o/=256,l-=8);e[n+f-h]|=128*m}},3931(e,t,n){var r,i,a;e.exports=(r=n(500),i=n(9332),a=n(8230),(()=>{"use strict";var e={85:(e,t,n)=>{n.d(t,{board:()=>o});var r=n(426),i=n(663),a=n(264);function o(e,t,n,o){const s=e.createElement("div");s.style="width: 100%;",s.style.margin="1em";const c=s.appendChild(e.createElement("table"));c.style="width: 100%;",c.style.borderCollapse="collapse";const l=c.appendChild(e.createElement("tr")),u=c.appendChild(e.createElement("tr"));function p(t,n){const a=e.createElement("div"),o=a.appendChild(e.createElement("table")),s=i.store.each(t,r.ns.rdf("type")).map(e=>i.store.any(e,r.ns.ui("backgroundColor"))).filter(e=>e);o.appendChild(r.widgets.personTR(e,null,t)),o.subject=t,o.style="margin: 1em;";const c=s[0]||i.store.any(n,r.ns.ui("backgroundColor"));return a.style.backgroundColor=c?c.value:"#fff",a}function d(e,t,n,r){const a=e.map(e=>[i.store.any(e,t)||n,e]);return a.sort(),r&&a.reverse(),a.map(e=>e[1])}return t.forEach(t=>{const n=l.appendChild(e.createElement("th"));n.textContent=r.utils.label(t,!0),n.subject=t,n.style="margin: 0.3em; padding: 0.5em 1em; font-treatment: bold; font-size: 120%;";const a=u.appendChild(e.createElement("td"));a.subject=t,a.style="border: 0.01em solid white; padding: 0.1em;",o.columnDropHandler&&r.widgets.makeDropTarget(a,function(e){e.forEach(function(e){const n=i.store.sym(e);o.columnDropHandler(n,t)})})}),s.refresh=function(){const e=new a.Literal(new Date),t=n||o.renderItem||p;function s(e){const n=t(e);return r.widgets.makeDraggable(n,e),n.subject=e,n}for(let t=u.firstChild;t;t=t.nextSibling){const n=t.subject;let a=i.store.each(null,r.ns.rdf("type"),n);const c=o.sortBy||r.ns.dct("created");o.filter&&(a=a.filter(o.filter));const l=d(a,c,e,!0);r.utils.syncTableToArrayReOrdered(t,l,s)}},s.refresh(),s}},178:(e,t,n)=>{n.d(t,{exposeOverlay:()=>h,getState:()=>p,renderIssue:()=>g,renderIssueCard:()=>f});var r=n(426),i=n(663),a=n(324),o=n(264);const s=i.store,c=!1,l=r.icons.iconBase+"noun_17020_gray-tick.svg",u=(r.icons.iconBase,r.icons.iconBase+"noun_17020.svg");function p(e,t){const n=s.the(e,r.ns.wf("tracker"),null,e.doc()),i=s.any(n,r.ns.wf("issueClass"));t=t||i;const a=s.each(e,r.ns.rdf("type")).filter(e=>s.holds(e,r.ns.rdfs("subClassOf"),t));if(1!==a.length)throw new Error("Issue must have one type as state: "+a.length);return a[0]}function d(e){const t=s.each(e,r.ns.rdf("type")).map(e=>s.any(e,r.ns.ui("backgroundColor"))).filter(e=>!!e);return t.length?t[0].value:null}function f(e,t){function n(){const t=d(e)||"white";o.style.backgroundColor=t,u.style.backgroundColor=t}const i=t.dom,a=!d(e),o=i.createElement("div"),c=o.appendChild(i.createElement("table"));c.style.width="100%",c.appendChild(r.widgets.personTR(i,null,e,{draggable:!1})),c.subject=e,o.style="border-radius: 0.4em; border: 0.05em solid grey; margin: 0.3em;",o.firstChild.firstChild.firstChild.firstChild.setAttribute("src",r.icons.iconBase+"noun_Danger_1259514.svg");const l=o.firstChild.firstChild.children[2],u=r.widgets.button(i,r.icons.iconBase+"noun_253504.svg","edit",async n=>{h(e,t)}),p=u.firstChild;if(p.style.width=p.style.height="1.5em",l.appendChild(u),a){const n=r.widgets.deleteButtonWithCheck(i,l,"issue",async function(){try{await s.updater.update(s.connectedStatements(e))}catch(e){!function(e,t){t.paneDiv.appendChild(r.widgets.errorMessageBlock(t.dom,e))}(`Unable to delete issue: ${e}`,t)}o.parentNode.removeChild(o),r.widgets.refreshTree(t.paneDiv)});l.appendChild(n)}return o.style.maxWidth="24em",o.refresh=n,n(),o}function h(e,t){const n=t.overlay;n.innerHTML="";const i=n.appendChild(r.widgets.button(t.dom,r.icons.iconBase+"noun_1180156.svg","close",function(){n.innerHTML="",n.style.visibility="hidden"}));i.style.float="right",i.style.margin="0.7em",delete i.style.backgroundColor,n.style.visibility="visible",n.appendChild(g(e,t)),n.firstChild.style.overflow="auto"}function m(e,t){const n=e.createElement("div");return n.setAttribute("style","height: 1em; margin: 0.5em;"),n.style.backgroundColor=t,n}function g(e,t){function n(t,n,i){if(c){if(!g(b,"trackLastModified"))return;const t=n.statementsMatching(e,r.ns.dct("modified")).concat(n.statementsMatching(e,r.ns.wf("modifiedBy"))),a=[o.st(e,r.ns.dct("modified"),new Date,i)];k&&a.push(o.st(e,r.ns.wf("modifiedBy"),k,i)),n.updater.update(t,a,function(e,t,n){})}}function p(e,t){const n=v.createElement("pre");return n.setAttribute("style",t||"color: grey"),x.appendChild(n),n.appendChild(v.createTextNode(e)),n}function f(e){x.appendChild(r.widgets.errorMessageBlock(v,e))}function h(e,t){e||f("Sorry, failed to save your change:\n"+t)}function g(e,t){const n=s.any(e,r.ns.ui(t));return!(!n||!n.value)}const v=t.dom,b=s.the(e,r.ns.wf("tracker"),null,e.doc());if(!b)throw new Error("No tracker");const y=s.any(b,r.ns.wf("stateStore")),w=e.doc(),x=v.createElement("div"),k=i.authn.currentUser(),_=d(e)||"white";!function(){const t="padding: 0.5em 1.5em 1em 1.5em; border: 0.7em;border-color: "+(d(e)||"#eee")+"; ";x.setAttribute("style",t),x.style.backgroundColor="white"}(),i.authn.checkUser();const E=x.appendChild(r.widgets.button(v,function(e){return function(e){return!!s.findTypeURIs(e)[r.ns.wf("Open").uri]}(e)?l:u}(e)));r.widgets.makeDraggable(E,e);const C=s.any(b,r.ns.wf("issueClass"));if(!C)throw new Error("This tracker "+b+" has no issueClass");const S=r.widgets.makeSelectForCategory(v,s,e,C,y,function(e,t){e&&(n(0,s,w),r.widgets.refreshTree(x))});x.appendChild(S);const A=s.each(b,r.ns.wf("issueCategory"));for(const t of A)x.appendChild(r.widgets.makeSelectForCategory(v,s,e,t,y,function(e,t){e&&(n(0,s,w),r.widgets.refreshTree(x))}));const T=v.createElement("a");T.setAttribute("href",b.uri),T.setAttribute("style","float:right"),x.appendChild(T).textContent=r.utils.label(b),T.addEventListener("click",r.widgets.openHrefInOutlineMode,!0);const P=r.ns.wf("coreIsueForm");o.parse('\n @prefix : <http://www.w3.org/ns/ui#> .\n @prefix core: <http://www.w3.org/2005/01/wf/flow#>.\n @prefix dc: <http://purl.org/dc/elements/1.1/>.\n @prefix wf: <http://www.w3.org/2005/01/wf/flow#> .\n\n core:coreIsueForm a :Form;\n <http://purl.org/dc/elements/1.1/title> "Core issue data";\n :parts (\n core:titleField\n core:descriptionField ) .\n\n core:descriptionField a :MultiLineTextField;\n :label "Description";\n :property wf:description;\n :size "40" .\n\n core:titleField a :SingleLineTextField;\n :label "Title";\n :maxLength "128";\n :property dc:title; # @@ Should move to dct or schema\n :size "40" .\n\n wf:Task :creationForm core:coreIsueForm .\n',s,P.doc().uri,"text/turtle");const R=r.widgets.appendForm(v,null,{},e,P,y,h);x.appendChild(R),R.style.backgroundColor=_;const I=s.statementsMatching(e,r.ns.wf("assignee"));if(I.length>1){p("Weird, was assigned to more than one person. Fixing ..");const e=I.slice(1);s.updater.update(e,[],function(e,t,n){t?p("Now fixed."):f("Fixed failed: "+n)})}function F(e){return r.widgets.personTR(v,r.ns.wf("dependent"),e,{link:!1})}function N(e,t){t=t||[];const n=s.any(null,r.ns.wf("dependent"),e,e.doc());return n?N(n,[n].concat(t)):t}if(async function(){const t=s.each(e,r.ns.wf("assigneeGroup"));await s.fetcher.load(t);const n=t.map(e=>s.each(e,r.ns.vcard("member"),null,e.doc())).flat(),i=s.any(null,r.ns.doap("bug-database"),b);i&&await s.fetcher.load(i);const a=i?s.each(i,r.ns.doap("developer")):[];return n.concat(a)}().then(t=>{if(t.length){t.forEach(function(e){s.fetcher.lookUpThing(e)});const i={nullLabel:"(unassigned)"};x.appendChild(r.widgets.makeSelectForOptions(v,s,e,r.ns.wf("assignee"),t,i,w,function(e,t){e&&n(0,s,w)}))}}),g(b,"allowSubIssues")){const t=x.appendChild(v.createElement("div"));t.style="margin: 1em; padding: 1em;",t.appendChild(v.createElement("h4")).textContent="Super Issues";const n=t.appendChild(v.createElement("div"));n.style.display="flex",n.refresh=function(){const t=N(e);r.utils.syncTableToArrayReOrdered(n,t,F)},n.refresh(),t.appendChild(v.createElement("h4")).textContent="Sub Issues";const i=t.appendChild(v.createElement("div"));i.style.display="flex",i.style.flexDirection="reverse",i.refresh=function(){const t=s.each(e,r.ns.wf("dependent"),null,e.doc());r.utils.syncTableToArrayReOrdered(i,t,F)},i.refresh();const o=v.createElement("button");o.setAttribute("type","button"),t.appendChild(o);const c=r.utils.label(C);o.innerHTML="New sub "+c,o.setAttribute("style","float: right; margin: 0.5em 1em;"),o.addEventListener("click",function(n){t.insertBefore((0,a.newIssueForm)(v,s,b,e,i.refresh),o.nextSibling)},!1)}x.appendChild(v.createElement("br"));const O=s.any(b,r.ns.wf("extrasEntryForm"));O&&r.widgets.appendForm(v,x,{},e,O,y,h);const L=x.appendChild(m(v,_));let j;s.anyValue(b,r.ns.wf("issueURITemplate"))?j=e.doc():(j=s.any(b,r.ns.wf("messageStore")),j||(j=s.any(b,r.ns.wf("stateStore"))),s.sym(j.uri+"#Chat"+(new Date).getTime())),s.fetcher.nowOrWhenFetched(j,function(t,n,i){if(t){const t=(0,r.messageArea)(v,s,e,j);x.insertBefore(t,L),x.insertBefore(m(v,_),t)}else{const e=v.createElement("p");e.textContent=n,x.insertBefore(e,L)}}),x.appendChild(v.createElement("div")).innerHTML="<h4>Attachments</h4>\n <p>Drag files, emails,\n web pages onto the paper clip, or click the file upload button.</p>";const M=e.uri.endsWith("/index.ttl#this")?e.uri.slice(0,14)+"Files/":e.dir().uri+"Files/"+e.uri.split("#")[1]+"/";r.widgets.attachmentList(v,e,x,{doc:y,promptIcon:r.icons.iconBase+"noun_25830.svg",uploadFolder:s.sym(M),predicate:r.ns.wf("attachment")}),r.widgets.deleteButtonWithCheck(v,x,"issue",async function(){try{await s.updater.update(s.connectedStatements(e))}catch(e){f(`Unable to delete issue: ${e}`)}f("DELETED OK"),x.style.backgroundColor="#eee",x.style.fontColor="orange"}).style.float="right";const D=v.createElement("button");return D.textContent="refresh messages",D.addEventListener("click",async function(e){try{await s.fetcher.load(j,{force:!0,clearPreviousData:!0})}catch(e){return void alert(e)}r.widgets.refreshTree(x)},!1),D.setAttribute("style",r.style.button),x.appendChild(D),x}},197:e=>{e.exports='# Ontology for user interface hints and forms\n#\n# See also related: the Fresnel language\n#\n@prefix contact: <http://www.w3.org/2000/10/swap/pim/contact#>.\n@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix doc: <http://www.w3.org/2000/10/swap/pim/doc#>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix r: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix s: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix tt: <http://dig.csail.mit.edu/2010/issues/track#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix : <http://www.w3.org/ns/ui#>.\n@prefix wf: <http://www.w3.org/2005/01/wf/flow#>.\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.\n\n@keywords is, of, a.\n\n<> dc:title "An ontology for User Interface description, Hints and Forms.";\n dc:description """The User Interface ontology allows the definition\n of forms for processing RDF model data, and include a bootstrap form for\n editing forms. It allows user interface hints such as background colors,\n can be associated with objects and classes.\n """;\n dc:created 2010-08-07;\n dc:license <https://creativecommons.org/publicdomain/zero/1.0/>;\n dc:modified """$Date: 2020/03/22 16:53:21 $""";\n dc:author <https://www.w3.org/People/Berners-Lee/card#i>.\n\nstyle a r:Property, owl:DatatypeProperty;\n s:label "style";\n prompt "CSS style";\n s:comment """Must be a valid CSS style string such as one could put in\n an HTML style attribute. Depending on the user interface system, this can\n by given to individuals, classes or properties. It is up to a user interface\n which wants to draw on them to pick how it uses styles from which parts\n of the data it has. For example, the style of a class may be picked\n to distinguish information about things in that class.""".\n\nbackgroundColor a r:Property, owl:DatatypeProperty;\n s:label "background color"@en;\n s:range ui:Color;\n s:comment """Must be a valid CSS color string such as one could put in\n an HTML style attribute. This should be in the #xxxxxx form,\n (with 6 digits of hex) so that it\n can work with Graphviz.""".\n\nbackgroundImage a r:Property, owl:DatatypeProperty;\n s:label "background image"@en;\n s:comment """URI or base64 representation of an image""".\n\ncolor a r:Property, owl:DatatypeProperty;\n s:label "color"@en;\n s:range ui:Color;\n s:comment """Must be a valid CSS color string such as one could put in\n an HTML style attribute. This should be in the #xxxxxx form,\n (with 6 digits of hex) so that it\n can work with Graphviz.""".\n\n\n\nsortPriority a r:Property, owl:DatatypeProperty;\n s:label "sort priority";\n s:range xsd:integer;\n s:comment """When individuals or classes must be sorted, then\n if they are given different values of sortPriority a user agent can\n use this as a hint to how to present information.""".\n\nsortBy a r:Property;\n s:label "sort by";\n s:domain s:Class;\n s:range r:Property;\n s:comment """A property which typically is used to sort\n members of a given class.""".\n\nseqeunce a r:Property;\n s:label "sequence number";\n s:range xsd:integer;\n s:comment """The sequence in which this item is arranged with repect to other parts.""".\n\ninitialProperties a r:Property;\n s:label "initial properties";\n s:domain s:Class;\n s:range r:List; # List of r:Property\n s:comment """A really simple way of enabling user interfaces to\n create new information about a class of things is to make a define of properties\n to be specified when a information about a new item\n ("New item" here means an item which the system\n does not have prvious information about yet,\n not an items which has just been created,\n like new friend as opposed to new baby)""";\n prompt "Properties to be specified for new ones".\n\ntableProperties a r:Property;\n s:domain s:Class;\n s:label "table properties";\n s:range r:List; # List of r:Property\n s:comment """This is a crude way of specifying a table-based\n view for objects of this class.""";\n prompt "Properties to be given in a default table view".\n\nprompt a r:Property;\n s:label "user prompt";\n s:comment """A string for the UI to use if the user needs a longer\n prompts than just a field name, the rdfs:label. """;\n ui:prompt "A longer prompt for a user inputting this property".\n\n\n# A Taxonomy of Field types\n\nui:Form owl:disjointUnionOf ( ui:ValueField ui:Group ui:Choice ui:Classifier ui:Options ui:Multiple ui:Heading ui:Comment);\n s:comment """A form can be any type of single field, or typically a Group of several fields,\n including interspersed headings and comments. """.\nui:Single owl:disjointUnionOf ( ui:ValueField ui:Group ui:Choice ui:Classifier ui:Options ui:Heading ui:Comment).\nui:ValueField owl:disjointUnionOf ( ui:TextField ui:NumericField ui:ColorField ui:DateField ui:DateTimeField ui:PhoneField ui:EmailField).\nui:NumericField owl:disjointUnionOf (ui:BooleanField ui:TriStateField ui:IntegerField ui:DecimalField ui:FloatField).\n# ui:Multiple owl:disjointUnionOf ( ui:ZeroOrMore ui:OneOrMore ).\nui:TextField owl:disjointUnionOf (ui:SingleLineTextField ui:MultiLineTextField).\n\nui:Form a s:Class; is s:subClassOf of ui:ValueField, ui:Group, ui:Choice, ui:Heading, ui:Comment, ui:Classifier, ui:Options, ui:Multiple.\nui:Single a s:Class; is s:subClassOf of ui:ValueField, ui:Group, ui:Choice, ui:Heading, ui:Comment, ui:Classifier, ui:Options.\nui:ValueField a s:Class; is s:subClassOf of ui:TextField, ui:NumericField, ui:ColorField, ui:DateField, ui:DateTimeField, ui:PhoneField, ui:EmailField.\nui:NumericField a s:Class; is s:subClassOf of ui:BooleanField, ui:TriStateField, ui:IntegerField, ui:DecimalField, ui:FloatField.\nui:TextField a s:Class; is s:subClassOf of ui:SingleLineTextField, ui:MultiLineTextField.\n\nui:Classifier a s:Class; s:label "classifier";\n s:comment """A classifier allows the user to select the type of an object.\n The possible types must be subclasses of some overall class, the "category".\n (Ideally, the superclass is also set up as the disjoint union of the subclasses,\n if they are disjoint.)\n\n The form normally stores the resulting classes using an rdf:type triple,\n but a different predicate can be used if required, so the classifier field\n needs is \'property\' defined too.\n\n If the subclass selected itself is has subclasses defined, the user can\n recursively select from them in turn, as many levels as needed.""".\n\nui:property a r:Property; s:domain ui:Form; s:range r:Property;\n s:label "property to be stored"@en;\n s:comment """Many fields prompt for information about a given property of the subject.\n When field is filled in, this gives which property is written into the data.""".\n\nui:category a r:Property; s:domain ui:Classifier; s:range s:Class;\n s:label "overall superclass"@en;\n s:comment """The superclass subclasses of which will be selected.""".\n\nui:dependingOn a r:Property; s:domain ui:Options; s:range r:Property;\n s:label "depending on"@en;\n s:comment """Many fields prompt for information about a given property of the subject""".\n\nui:for a r:Property; s:label "for"@en; s:comment "The value for which this case is selected.".\nui:use a r:Property; s:range ui:Form.\n\nui:part a r:Property; s:label "part"@en ; s:domain ui:Form; s:range ui:Form. # Used for Multiple field - the subform for each item\nui:parts a r:Property; s:label "parts"@en ; s:domain ui:Form; s:range r:Collection. # (of Forms) The ordered set of fields in a group\nui:ordered e r:Property; s:label "ordered"; s:range xsd:Boolean . # Could be useful for all kinds of things in future so not restricted to Multiple\n\nui:from a r:Property; s:domain ui:Choice; s:range r:Class;\n s:label "from"; ui:prompt "from what class".\n\nui:size a r:Property; s:domain ui:ValueField; s:range xsd:integer;\n s:label "size of field";\n ui:prompt "size of field in characters".\n\nui:maxLength a r:Property; s:domain ui:TextField; s:range xsd:integer;\n s:label "max length of value".\n\nui:minValue a r:Property; s:domain ui:ValueField; s:label "min". # @@ range?\nui:maxValue a r:Property; s:domain ui:ValueField; s:label "max".\n\n ui:creationForm a r:Property; s:domain s:Class; s:range ui:Form;\n s:label "creation form";\n s:comment """A form which may be used to collect information about a\n hitherto locally undocumented instance instance of this class.""".\n\n ui:annotationForm a r:Property; s:domain s:Class; s:range ui:Form;\n s:label "annotation form";\n s:comment """A form which may be used to add more infromation to an\ninstance of this class which we know something about. Anything from\nadding just add one more fact, to adding a whole lot of information about a specific\nfacet of the thing.\n""".\n\n\n#############################################\n#\n# Form for editing Forms\n#\n\nFormForm a ui:Form;\n dc:title "Form for editing Forms";\n is ui:creationForm of Form;\n a ui:Group; ui:parts (FF1 FF2 FF3 FieldList) .\n\n FF1 ui:sequence 1; a ui:Heading; ui:contents "Edit Form"@en .\n FF2 ui:sequence 2; a ui:SingleLineTextField; ui:property dc:title; ui:size 60 .\n FF3 ui:sequence 3; a ui:Comment; ui:contents\n """To add a field to the form, press the plus at the bottom,\n and then select what sort of field you want."""@en; ui:style "background-color: #ffe;" .\n\n FieldList ui:sequence 10; a ui:Multiple; ui:ordered true; ui:property ui:parts; ui:part FieldForm .\n\nFieldForm a ui:Group;\n dc:title "Form for selecting a type of field";\n ui:parts (\n\n [ ui:sequence 1; a ui:Classifier; ui:property r:type; ui:category ui:Form]\n\n [ a ui:Options; ui:sequence 2; ui:dependingOn r:type;\n\n ui:case [ ui:for ui:TextField; ui:use [a ui:Group; ui:parts (\n [ a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:DatatypeProperty] # @@@ Needs inference on current web\n [ a ui:IntegerField; ui:property ui:size; ui:label "field size"; ui:min 1; ui:max 4096]\n [ a ui:IntegerField; ui:property ui:maxLength; ui:label "Max. length of string"; ui:min 1]\n )]];\n\n ui:case [ ui:for ui:IntegerField; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:DatatypeProperty]\n [ ui:sequence 2; a ui:IntegerField; ui:property ui:min; ui:label "minimum value"]\n [ ui:sequence 3; a ui:IntegerField; ui:property ui:max; ui:label "maximum value"] ) ]];\n\n ui:case [ ui:for ui:DecimalField; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:DatatypeProperty]\n [ ui:sequence 2; a ui:DecimalField; ui:property ui:min; ui:label "minimum value"]\n [ ui:sequence 3; a ui:DecimalField; ui:property ui:max; ui:label "maximum value"] ) ]];\n\n ui:case [ ui:for ui:FloatField; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:DatatypeProperty]\n [ ui:sequence 2; a ui:FloatField; ui:property ui:min; ui:label "minimum value"]\n [ ui:sequence 3; a ui:FloatField; ui:property ui:max; ui:label "maximum value"] ) ]];\n\n ui:case [ ui:for ui:ColorField; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:DatatypeProperty] )\n ]];\n\n ui:case [ ui:for ui:DateField; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:DatatypeProperty]\n [ ui:sequence 2; a ui:DateField; ui:property ui:min; ui:label "min"]\n [ ui:sequence 3; a ui:DateField; ui:property ui:max ; ui:label "max"]\n ) ]];\n\n ui:case [ ui:for ui:DateTimeField; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:DatatypeProperty]\n [ ui:sequence 2; a ui:DateTimeField; ui:property ui:min; ui:label "min"]\n [ ui:sequence 3; a ui:DateTimeField; ui:property ui:max ; ui:label "max"]\n ) ]];\n\n ui:case [ ui:for ui:EmailField; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:ObjectProperty]\n ) ]];\n\n ui:case [ ui:for ui:PhoneField; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from owl:ObjectProperty]\n )]];\n\n ui:case [ ui:for ui:Group; ui:use FieldList];\n\n ui:case [ ui:for ui:Options; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:dependingOn; ui:label "depending on"; ui:from r:Property; ui:default r:type]\n [ ui:sequence 2; a ui:Multiple; ui:property ui:case; ui:part CaseForm]\n ) ]];\n\n ui:case [ ui:for ui:Choice; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property";\n ui:canMintNew true; ui:from owl:ObjectProperty]\n [ ui:sequence 2; a ui:Choice; ui:canMintNew true; ui:property ui:from; ui:label "destination class";\n ui:from s:Class; ui:canMintNew true; ]\n [ ui:sequence 3; a ui:BooleanField; ui:property ui:canMintNew; # No class form yet\n ui:label "user can add new"]\n [ ui:sequence 4; a ui:Choice; ui:canMintNew true; ui:property ui:use; ui:label "Nested Form (if any)";\n ui:from ui:Form; ui:optional true; ui:use FormForm] # @@ optional\n\n ) ]];\n\n ui:case [ ui:for ui:Classifier; ui:use [a ui:Group; ui:parts (\n [ ui:sequence 2; a ui:Comment; ui:contents """A classifier allows the user to which classes the item belongs to, given a common superclass of the allowed classes. Give the superclass here:""" ]\n\n [ ui:sequence 4; a ui:Choice; ui:canMintNew true; ui:property ui:category; ui:label "superclass"; ui:from s:Class]\n\n [ ui:sequence 6; a ui:Comment; ui:contents """(When the choice is made normally the item is given a rdf:type. Set this to rdf:type unless you want the form to set a different property.)""" ]\n\n [ ui:sequence 8; a ui:Choice; ui:canMintNew true; ui:property ui:property;\n ui:label "property"; ui:from owl:ObjectProperty; ui:default r:type] # @@ restriction\n\n ) ]];\n\n ui:case [ ui:for ui:Multiple; ui:use [a ui:Group; ui:parts (\n [ui:sequence 0; a ui:BooleanField; ui:property ui:ordered; ui:label "ordered"] # If this an ordered array or an unordered set?\n [ui:sequence 0; a ui:IntegerField; ui:property ui:min; ui:label "minimum number"] # If this an ordered array or an unordered set?\n [ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:property; ui:label "property"; ui:from r:Property]\n [ui:sequence 2; a ui:Choice; ui:canMintNew true; ui:property ui:part; ui:from ui:Form; ui:use FieldForm] # Form for details of the field part of the multiple\n ) ]];\n\n ui:case [ ui:for ui:Heading; ui:use [a ui:SingleLineTextField; ui:property ui:contents]];\n\n ui:case [ ui:for ui:Comment; ui:use [a ui:MultiLineTextField; ui:property ui:contents]]\n ]).\n\n\nCaseForm a ui:Group;\n dc:title "Form for a conditional case in a form";\n ui:parts (\n [ ui:sequence 1; a ui:Choice; ui:canMintNew true; ui:property ui:for; ui:label "when it is"; ui:canMintNew true; ui:from s:Class]\n [ui:sequence 2; a ui:Choice; ui:canMintNew true; ui:property ui:use; ui:from ui:Form; ui:canMintNew true; ui:use FieldForm] ). # Form for details of the field part of the multiple\n\n# ENDS\n'},240:e=>{e.exports='# Issue tracking - Workflow application definition ontology\n#\n# Finite state automaton ontology\n#\n# See requirements for tracking tools http://www.w3.org/2005/01/06-tool-req.html\n#\n@keywords a, is, of.\n\n@prefix : <http://www.w3.org/2005/01/wf/flow#>.\n@prefix wf: <http://www.w3.org/2005/01/wf/flow#>.\n\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix s: <http://www.w3.org/2000/01/rdf-schema#> .\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.\n\n@prefix doc: <http://www.w3.org/2000/10/swap/pim/doc#> .\n@prefix log: <http://www.w3.org/2000/10/swap/log#> .\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix contact: <http://www.w3.org/2000/10/swap/pim/contact#> .\n@prefix doap: <http://usefulinc.com/ns/doap#>.\n@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix dct: <http://purl.org/dc/terms/>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n\n<> dc:title "Issue Tracking Ontology";\n\n dct:creator <http://www.w3.org/People/Berners-Lee/card#i>;\n\n s:comment """This ontology defines a very general class (Task)\n which can used for any kind of bug tracking, issue tracking,\n to-do-list management, action items, goal dependency, and so on.\n It captures the state of a task as a subclass, so that\n subsumption can be used.\n It captures a discussion thread about a task.\n It captures subtasks structure if necessary.\n A "Tracker" defines actual set of states, categories, etc.,\n which a task can be in. The data about the tracker\n guides the software managing the task.\n\n There is some workflow modeling finite state machine\n terms which are optional for more complex definition\n of the transitions allowed.\n """.\n\nTask a s:Class;\n s:label "task"@en; owl:disjointUnionOf (Open Closed);\n s:comment """Something to be done in a wide sense,\n an agenda item at a meeting is one example, but any\n issue, task, action item, goal, product, deliverable, milestone, can such a thing.\n The requirement for this framework was that it would allow\n one to customize ontologies for things such as agenda items,\n action items, working group issues with a spec, w3c Last Call issues,\n software bugs and administrative requests.\n In π-calculus, a process.\n Make your type of issue a subclass of Task.\n """.\n\nOpen a s:Class; s:subClassOf Task;\n s:label "open"@en, "ouvert"@fr;\n ui:backgroundColor "#d6f5d6"; # green like github for some reason\n s:comment """A task which needs attention. The very crude states of Open and Closed all\n interoperability between different systems if the states for a given\n application are made subclasses of either Open or Closed. This allows\n tasks from different systems to be mixed and treated together with\n limited but valuable functionality.\n """.\n\nClosed a s:Class; s:subClassOf Task;\n s:label "closed"@en, "fermé"@fr;\n ui:backgroundColor "#f5d6d6"; # pink\n s:comment """A task which does not need attention. It may be closed because\n has been abandoned or completed, for example.\n """.\n\n\n ActionItem a s:Class;\n s:subClassOf Task;\n s:label "action item"@en; owl:disjointUnionOf (Open Closed);\n s:comment """An obligation taken on by a person, typically at a meeting.\n """.\n\n\ndescription a rdf:Property;\n s:label "description";\n s:comment """The description, definition,\n or abstract. Information explaining what this is.\n Not arbitrary comment about anything, only about the subject.\n (Use this property for anything. There is no domain restriction.).""".\n\ndependent a rdf:Property;\n s:label "how"; owl:inverseOf [ s:label "why"];\n s:domain Task; s:range Task;\n s:comment """Another task upon which this depends, in the sense that\n this task cannot be completed without that task being done.\n You can\'t use this for dependencies on anything other than other tasks.\n (Note the US spelling of the URI. In the UK, a dependant is a something\n which is dependent on somehing else.)""".\n\nassignee a rdf:Property;\n s:label "assigned to"; owl:inverseOf [s:label "assignment"];\n# s:domain Task;\n s:range foaf:Agent;\n s:comment """The person or group to whom this has been assigned.""".\n\n# use dct:modified\n#modified a rdf:Property;\n# s:label "last changed".\n\nmodifiedBy a rdf:Property;\n s:range foaf:Agent;\n s:label "changed by".\n\n# use dct:created instead\n#created a rdf:Property;\n# s:range xsd:dateTime;\n#\n# Use foaf:maker instead\n#creator a rdf:Property;\n# s:range foaf:Agent;\n# s:label "changed by".\n\nsubscriber a rdf:Property;\n s:label "subscriber";\n s:range foaf:Agent.\n\n\n################## Products\n#\n#\n# History: The Tracker system included a cocept of a product,\n# such that an action could be associated with *either* an issue *or* a product.\n# Noah Mendelsohn for the TAG needed to be able make\n# and to give products: Goals, scuuess criteria,\n# deliverables with dates, schedules, TAG members assigned, related issues.\n#\n\n\nProduct a s:Class; s:subClassOf Task;\n s:label "product";\n s:comment """A product is a task which monitors something\n which must be produced.""".\n\ndeliverable a rdf:Property; s:subPropertyOf dependent;\n s:range Product;\n s:label "deliverable"@en;\n s:comment """Something which must be delivered to accomplish this""".\n\ngoalDescription a rdf:Property, owl:DatatypeProperty;\n s:domain Task; s:range xsd:string;\n s:label "goals";\n s:comment """A textual description of the goals of this product, etc.""".\n\nsuccessCriteria a rdf:Property, owl:DatatypeProperty;\n s:domain Task; s:range xsd:string;\n s:label "success criteria";\n s:comment """A textual description of the successs critera.\n How when we know this is done?""".\n\ndateDue a rdf:Property, owl:DatatypeProperty;\n s:domain Task; s:range xsd:date;\n s:label "due"@en;\n s:comment """The date this task is due.\n """.\n\n################## Attachments\n\nattachment a rdf:Property;\n s:label "attachment";\n s:comment """Something related is attached for information.""".\n\nscreenShot a rdf:Property; s:subPropertyOf attachment;\n s:label "screen shot"@en;\n s:comment """An image taken by capturing the state of a\n computer screen, for example to demonstrate a problem""".\n\ntestData a rdf:Property; s:subPropertyOf attachment;\n s:label "test data"@en;\n s:comment """A file which can be used as inpiut to a test\n or to demonstrate a problem. """.\n\n\nterminalOutput a rdf:Property; s:subPropertyOf attachment;\n s:label "terminal output"@en;\n s:comment """A file showing user interaction from a\n text terminal or console etc. """.\n\n\nmessage a rdf:Property; s:subPropertyOf attachment;\n s:label "message"@en;\n s:comment """A message about this. Attached for information.""".\n\n\nMessage a s:Class; s:label "message"@en.\nrecipent a rdf:Property; s:label "to"; s:domain Message; s:range foaf:Agent.\nsender a rdf:Property; s:label "from"; s:domain Message; s:range foaf:Agent.\n\n############################# A Tracker connects and manages issues\n\ntracker a rdf:Property;\n s:label "tracker";\n owl:inverseOf [ s:label "issue"];\n s:domain Task;\n s:range Tracker.\n\nTracker a s:Class;\n s:label "tracker";\n s:comment """A set of issues and\n the constraints on how they evolve.\n To use this ontology, craete a new tracker.\n Copy an existing one or make up your own.""".\n\nissueClass a rdf:Property;\n s:label "all issues must be in";\n s:domain Tracker;\n s:range s:Class, State;\n s:comment """The class of issues which are allowed in this tracker.\n This is essemtial to the operation of the tracker,\n as it defines which states an issue can be in.\n (The issueClass must be a disjointUnionOf the state classes)""".\n\nissueCategory a rdf:Property;\n s:label "issue category";\n s:domain Tracker;\n s:range s:Class;\n s:comment """Issues may be categorized according to the\n subclasses of this class""".\n\nstateStore a rdf:Property;\n s:label "state store";\n s:domain Tracker;\n s:range doc:Document;\n s:comment """A read-write document.\n The state of the issues is modified here.\n When you set up a trcaker, thgis must be set to point\n to a writeble data resource on the web.""".\n\ntransactionStore\n a rdf:Property;\n s:label "transaction store";\n s:domain Tracker;\n s:range doc:Document;\n s:comment """An appendable document. Transactions and messsages\n can be written into here""".\n\nasigneeClass\n a rdf:Property;\n s:label "assignees must be";\n s:domain Tracker;\n s:range s:Class; # Subclass of foaf:Agent\n s:comment """When an issue is assigned, the assignee must be from this class""".\n\ninitialState\n a rdf:Property;\n s:label "initial state"@en;\n s:label "état initial"@fr;\n s:domain Tracker;\n s:range State;\n s:comment """The initial state for a new issue""".\n\n# Use this to link a project to a tracker\ndoap:bug-database owl:inverseOf [ s:label "project"@en ].\n\n\n\n\n############################################################\n#\n# Finite state machines\n#\nChange a s:Class;\n s:label "change";\n s:comment """The universal class of things which\nchange the state of a task.\nIncluded now: Creation, Transition. (Maybe in the future\nmore π-calculus constructions such as splitting & merging tasks,\nand import/export of obligations to a foreign opaque system.)\n""".\n\nTransition a s:Class; s:subClassOf Change;\n s:label "transition";\n s:comment """A transition is a change of state of\na task. Typical properties include date and/or source\n(a document causing the transition), and a final state.""".\n\nCreation a s:Class; s:subClassOf Change;\n s:label "creation";\n s:comment """A creation is a change from existence\nto non-existence\na task. Typical properties include date and/or source\n(a document causing the transition), and a final state.""".\n\n\ndate s:range DateTime.\n\nfinal a rdf:Property;\n s:label "to";\n s:domain Transition;\n s:range State.\n\ntask a rdf:Property;\n s:range Task;\n s:label "task".\n\nrequires a rdf:Property;\n s:label "requires";\n s:domain Transition;\n s:range rdf:List; # Of properties for validation\n s:comment """To be a valid transition,\n a necessary (but not necessarily sufficuent) condition\n is that there be recorded these properties for the record""".\n\naffects a rdf:Property;\n s:label "affects";\n s:domain doc:Work;\n s:range Task.\n\n\n# { ?x a Transition; task ?t; source ?doc } => { ?doc affects ?t }.\n\n\ncreates a rdf:Property;\n s:label "creates";\n s:domain doc:Work;\n s:range Task.\n\n\nallowedTransitions a rdf:Property;\n s:domain State;\n s:range rdf:List; # @@@ of Action\n s:label "allowed transitions";\n s:comment """The state machine is defined\n by these lists of transition allowed for each issue.\n (An interesting option in the Web is to make an allowed transition\n to a state in soemone else\'s ontology, which in turn allows\n transitions into many ontologies. So a finite state maxchine\n may become very large. In practice this means that a task handed\n off to another organization may be processed on all kinds of ways.)""".\n\n# { ?x a TerminalState} => { ?x allowedTransitions () }.\n\nfinal a rdf:Property;\n s:label "to";\n s:range State.\n\nissue a rdf:Property;\n s:label "issue";\n s:comment\n """A transition changes the state of the given issue.""".\n\nsource a rdf:Property;\n s:label "source";\n s:comment """The source of a transition is\n the document by which it happened""";\n s:range doc:Work.\nTerminalState a s:Class;\n s:subClassOf State;\n s:label "terminal state";\n s:comment """A state from which there are no transitions.""".\n\nNonTerminalState a s:Class;\n s:label "non-terminal state";\n owl:disjointWith TerminalState;\n s:comment """A state from which there are transitions.""".\n\n######################################################\n\n#ends\n'},264:e=>{e.exports=a},324:(e,t,n)=>{n.d(t,{newIssueForm:()=>a});var r=n(426),i=n(264);function a(e,t,n,a,o){const s=e.createElement("div"),c=t.any(n,r.ns.wf("stateStore")),l=t.any(n,r.ns.wf("issueClass")),u=r.utils.label(l);s.innerHTML="<h2>Add new "+(a?"sub ":"")+u+"</h2><p>Title of new "+u+":</p>";const p=e.createElement("input");return p.setAttribute("type","text"),p.setAttribute("style","margin: 0.5em; font-size: 100%; padding: 0.3em;"),p.setAttribute("size","100"),p.setAttribute("maxLength","2048"),p.select(),p.addEventListener("keyup",function(e){13===e.keyCode&&function(){p.setAttribute("class","pendingedit"),p.disabled=!0;const e=[],l=t.anyValue(n,r.ns.wf("issueURITemplate")),u=l?t.sym(function(e){const t=new i.Literal(new Date),n=""+(new Date).getTime(),r=t.value.slice(0,4),a=t.value.slice(5,7),o=t.value.slice(8,10);return e.replace("{N}",n).replace("{YYYY}",r).replace("{MM}",a).replace("{DD}",o)}(i.uri.join(l,c.uri))):t.sym(c.uri+"#Iss"+(new Date).getTime()),d=u.doc(),f=t.literal(p.value);e.push(new i.Statement(u,r.ns.wf("tracker"),n,c)),e.push(new i.Statement(u,r.ns.dc("title"),f,c)),e.push(new i.Statement(u,r.ns.dct("created"),new Date,c));const h=a?t.each(a,r.ns.rdf("type"),null,a.doc()):t.each(n,r.ns.wf("initialState"));for(const t of h)e.push(new i.Statement(u,r.ns.rdf("type"),t,c));a&&e.push(new i.Statement(a,r.ns.wf("dependent"),u,c)),l&&(e.push(new i.Statement(u,r.ns.wf("tracker"),n,d)),e.push(new i.Statement(u,r.ns.rdfs("seeAlso"),c,d))),t.updater.update([],e,function(e,t,n){t&&(s.parentNode.removeChild(s),o(u))})}()},!1),s.appendChild(p),p.focus(),s}},426:e=>{e.exports=r},663:e=>{e.exports=i},685:(e,t,n)=>{n.d(t,{csvButton:()=>o});var r=n(426),i=n(663);function a(e){const t=e.replaceAll("\n"," ");if(!t.includes(","))return t;const n='"'+t.replaceAll('"','""')+'"';if(n.slice(1,-1).replaceAll('""',"").includes('"'))throw new Error("CSV inconsistecy");return n}function o(e,t){const n=e.createElement("div"),o=r.widgets.button(e,r.icons.iconBase+"noun_Document_998605.svg","Copy as CSV",async e=>{o.parentNode.parentNode.addEventListener("copy",e=>{const n=function(e,t){const n=e.any(t,r.ns.wf("stateStore")),i=e.each(null,r.ns.wf("tracker"),t,n),o=[{label:"Name",predicate:r.ns.dc("title")}],s={label:"State",category:e.any(t,r.ns.wf("issueClass"))};o.push(s);const c=e.each(t,r.ns.wf("issueCategory"));for(const e of c){const t={label:r.utils.label(e),category:e};o.push(t)}const l=e.any(t,r.ns.wf("extrasEntryForm"),null,null);if(l){const t=e.any(l,r.ns.ui("parts"),null,l.doc()).elements;for(const n of t){const t=e.any(n,r.ns.ui("property"));if(t){const e={label:r.utils.label(t),predicate:t};o.push(e)}}}o.push({label:"Description",predicate:r.ns.wf("description")});const u=o.map(e=>e.label).join(",")+"\n";return u+i.map(function(t){return o.map(n=>function(t,n){let i;if(n.predicate)return i=e.any(t,n.predicate),i?i.value:"--";if(!n.category)throw new Error("wot no pred or cat",n);{const a=e.each(t,r.ns.rdf("type"));for(const t of a)e.holds(t,r.ns.rdfs("subClassOf"),n.category)&&(i=t);if(!i)return"?"+r.utils.label(n.category)}return r.utils.label(i)}(t,n)).map(a).join(",")+"\n"}).join("")}(i.store,t);e.clipboardData.setData("text/plain",n),e.clipboardData.setData("text/csv",n),alert("Copy data: "+n),e.preventDefault()})});return n.appendChild(o),n}},719:(e,t,n)=>{n.d(t,{newTrackerButton:()=>c});var r=n(426),i=n(264),a=n(663);const o=r.ns,s=a.store.updater;function c(e,t){const n=r.login.newAppInstance(t.dom,{noun:"tracker"},function(n,a){function c(e){if(void 0!==e.elements)return e.elements.map(c);if(void 0===e.uri)return e;let t=e.uri;return t===d.uri?f:(t.slice(0,m.length)===m&&(t=a+t.slice(m.length)),p.sym(t))}const l="issuetracker.w3.org",u=r.ns.space,p=t.session.store;if(!a&&("/"!==(a=p.any(n,u("uriPrefix")).value).slice(-1)&&(i.log.error(l+": No / at end of uriPrefix "+a),a+="/"),a+=l+"/"+(new Date).getTime()+"/",!confirm("Make new tracker at "+a+"?")))return;const d=p.any(e,o.wf("stateStore")),f=p.sym(a+"store.ttl"),h=e.doc(),m=h.uri.slice(0,h.uri.lastIndexOf("/")+1),g=c(h),v=c(e),b=p.statementsMatching(void 0,void 0,void 0,h);for(let e=0;e<b.length;e++){const t=b[e];p.add(c(t.subject),c(t.predicate),c(t.object),g)}p.add(v,r.ns.space("inspiration"),e,d),p.add(v,r.ns.space("inspiration"),e,g),s.put(g,p.statementsMatching(void 0,void 0,void 0,g),"text/turtle",function(e,t,n){t&&s.put(f,[],"text/turtle",function(e,t,n){})})});return n.setAttribute("style","margin: 0.5em 1em;"),n}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};n.r(o),n.d(o,{default:()=>g});var s=n(426),c=n(663),l=n(85),u=n(178),p=n(719),d=n(324),f=n(685),h=n(264);const m=c.store,g={icon:s.icons.iconBase+"noun_122196.svg",name:"issue",audience:[],label:function(e,t){const n=m.findTypeURIs(e);return n["http://www.w3.org/2005/01/wf/flow#Task"]||m.holds(e,s.ns.wf("tracker"))?"issue":n["http://www.w3.org/2005/01/wf/flow#Tracker"]?"tracker":null},mintClass:s.ns.wf("Tracker"),mintNew:async function(e,t){const n=e.session.store;let r;t.newInstance?r=n.sym(t.newInstance.doc().uri+"_state.ttl"):(t.newInstance=n.sym(t.newBase+"index.ttl#this"),r=n.sym(t.newBase+"state.ttl"));const i=t.newInstance,a=i.doc(),o=c.authn.currentUser();o&&n.add(i,s.ns.dc("author"),o,a),n.add(i,s.ns.rdf("type"),s.ns.wf("Tracker"),a),n.add(i,s.ns.dc("created"),new Date,a),n.add(i,s.ns.wf("issueClass"),s.ns.wf("Task"),a),n.add(i,s.ns.wf("initialState"),s.ns.wf("Open"),a),n.add(i,s.ns.wf("stateStore"),r,a),n.add(i,s.ns.wf("assigneeClass"),s.ns.foaf("Person"),a),n.add(i,s.ns.wf("stateStore"),r,r);const l=n.statementsMatching(void 0,void 0,void 0,a).concat(n.statementsMatching(void 0,void 0,void 0,r));try{await async function(e,t){const r=e.concat(t).map(e=>e.why),i=Array.from(new Set(r)).map(r=>n.updater.update(e.filter(e=>e.why.sameTerm(r)),t.filter(e=>e.why.sameTerm(r))));return Promise.all(i)}([],l)}catch(t){return s.widgets.complain(e,"Error writing tracker configuration: "+t)}const u=e.dom;return t.div.appendChild(u.createElement("div")).innerHTML=`<h4>Success</h4>\n <p>Your <a href="${i.uri}">new tracker</a> has been made.\n Use the settings tab to configure it.\n </p>\n `,t},render:function(e,t){const r=t.dom,i=r.createElement("div");function a(e){i.appendChild(s.widgets.errorMessageBlock(r,e))}function o(e,t){e||a(t)}function g(e,n){const i=m.any(e,s.ns.wf("issueClass")),o=(n=n||i).sameTerm(i),c=m.any(n,s.ns.owl("disjointUnionOf"));if(!c)return a(`Configuration error: state ${i} does not have substates`);let p=c.elements;o&&p.length>2&&(p=p.filter(e=>m.holds(e,s.ns.rdfs("subClassOf"),s.ns.wf("Open"))||e.sameTerm(s.ns.wf("Open"))));const d={columnDropHandler:async function(e,r){const i=(0,u.getState)(e,n),a=m.the(e,s.ns.wf("tracker"),null,e.doc()),o=m.any(a,s.ns.wf("stateStore"));if(!r.sameTerm(i)){try{await m.updater.update([h.st(e,s.ns.rdf("type"),i,o)],[h.st(e,s.ns.rdf("type"),r,o)])}catch(e){s.widgets.complain(t,"Unable to change issue state: "+e)}f.refresh()}},filter:o?null:function(e){return!!m.findTypeURIs(e)[s.ns.wf("Open").uri]}};d.sortBy=s.ns.dct("created"),d.sortReverse=!0;const f=(0,l.board)(r,p,function(e){return(0,u.renderIssueCard)(e,t)},d);return f}function v(e){const n=r.createElement("div"),i=c.authn.currentUser(),a={div:n,dom:r,noun:"tracker",statusArea:n,me:i,refreshTarget:e},o=[t.session.paneRegistry.byName("issue")];return s.create.newThingUI(a,t,o),n}function b(){const n=m.any(C,s.ns.wf("issueClass")),i=[k,w,n].concat(m.each(C,s.ns.wf("issueCategory")));i.push(x);const a={renderMain:function(n,i){if(n.innerHTML="",i.sameTerm(y))n.appendChild(g(C));else if(i.sameTerm(w))n.appendChild(function(n){function i(){const e=new h.IndexedFormula;return l.pat.optional.push(e),e}const a=m.any(e,s.ns.wf("issueClass")),o=m.each(n,s.ns.wf("issueCategory")),c=["issue","state","created"],l=new h.Query(s.utils.label(e));for(let e=0;e<o.length;e++)c.push("_cat_"+e);const p={};c.forEach(function(e){l.vars.push(p[e]=h.variable(e))}),l.pat.add(p.issue,s.ns.wf("tracker"),n),l.pat.add(p.issue,s.ns.dct("created"),p.created),l.pat.add(p.issue,s.ns.rdf("type"),p.state),l.pat.add(p.state,s.ns.rdfs("subClassOf"),a),l.pat.optional=[];for(let e=0;e<o.length;e++){const t=i();t.add(p.issue,s.ns.rdf("type"),p["_cat_"+e]),t.add(p["_cat_"+e],s.ns.rdfs("subClassOf"),o[e])}const d=m.any(n,s.ns.wf("propertyList"));if(d){const e=d.elements;for(let t=0;t<e.length;t++){const n=e[t];let r="_prop_"+t;n.uri.indexOf("#")>=0&&(r=n.uri.split("#")[1]);const a=i();l.vars.push(p[r]=h.variable(r)),a.add(p.issue,n,p[r])}}const f={};m.each(void 0,s.ns.rdfs("subClassOf"),a).forEach(function(e){(m.holds(e,s.ns.rdfs("subClassOf"),s.ns.wf("Open"))||e.sameTerm(s.ns.wf("Open")))&&(f[e.uri]=!0)});const g=(0,s.table)(r,{query:l,keyVariable:"?issue",sortBy:"?created",sortReverse:!0,hints:{"?issue":{linkFunction:function(e){const n=h.sym(e);(0,u.exposeOverlay)(n,t)},label:"Title"},"?created":{cellFormat:"shortDate"},"?state":{initialSelection:f,label:"Status"}}}),v=m.any(e,s.ns.wf("stateStore"));return g.appendChild(function(e,t){return s.widgets.button(r,s.icons.iconBase+"noun_479395.svg","refresh table",async n=>{try{await m.fetcher.load(e,{force:!0,clearPreviousData:!0})}catch(e){return void alert(e)}s.widgets.refreshTree(t)})}(v,g)),g}(C));else if(i.sameTerm(x))n.appendChild(function(e){const t=r.createElement("div");t.appendChild((0,f.csvButton)(r,e));const n=m.any(e,s.ns.wf("issueClass")),i=[w,n].concat(m.each(e,s.ns.wf("issueCategory"))),a=t.appendChild(r.createElement("div"));s.widgets.renderNameValuePair(r,m,a,null,"Default view").appendChild(s.widgets.makeSelectForOptions(r,m,e,s.ns.wf("defaultView"),i,{},e.doc()));const c={dom:r,div:t,noun:"tracker"};return s.login.registrationControl(c,e,s.ns.wf("Tracker")).then(n=>{const i=s.ns.wf("TrackerSettingsForm");h.parse('@prefix : <http://www.w3.org/ns/ui#> .\n@prefix core: <http://www.w3.org/2005/01/wf/flow#>.\n@prefix dct: <http://purl.org/dc/terms/>.\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix ui: <http://www.w3.org/ns/ui#> .\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n@prefix wf: <http://www.w3.org/2005/01/wf/flow#> .\n\n core:TrackerSettingsForm a :Form;\n <http://purl.org/dc/elements/1.1/title> "Tracker Configuration Form";\n :parts (\n\n [ a ui:Heading; ui:contents "About the tracker"@en ]\n\n [ a :SingleLineTextField;\n :label "Title of issue tracker";\n :maxLength "128";\n :property dct:title;\n :size "40" ]\n\n [ a :MultiLineTextField; :label "Description"; :property wf:description; :size "40" ]\n\n [ a ui:Choice; ui:canMintNew true; ui:use core:SuperClassForm; ui:follow true;\n ui:property wf:issueClass;\n ui:label "What states can an issue be in?";\n ui:from rdfs:Class;\n ui:default wf:Task ]\n\n [ a ui:Comment; ui:contents """You can optionally sort issues using (one or more) classification systems"""@en ]\n\n\n [ a ui:Multiple; ui:canMintNew true; ui:part core:ClassificationForm;\n ui:property wf:issueCategory; ui:label "Sort them into which category?"; ui:from rdfs:Class ]\n\n [ a :BooleanField;\n :label "Allow issues to have sub-issues";\n :property wf:allowSubIssues;\n :default false ]\n\n [ a ui:Heading; ui:contents "Table view:"@en ]\n\n [ a ui:Comment; ui:contents "Any extra properties to include?"@en ]\n\n\n [a ui:Multiple; ui:property wf:propertyList; ui:ordered true; ui:part core:PropertyForm; ui:follow true ]\n\n [ a ui:Heading; ui:contents "Details of issues"@en ]\n\n # Use a people picker ideally\n [ a ui:Choice; ui:canMintNew true; ui:use core:GroupForm;\n ui:property wf:assigneeGroup;\n ui:label "Assign issues to people from which group?";\n ui:from vcard:Group;\n ]\n\n # Optionally one form for extras\n\n [ a ui:Choice; ui:canMintNew true; ui:use ui:FormForm;\n ui:property wf:extrasEntryForm;\n ui:label "Other things to save about each issue?";\n ui:from ui:Form;\n ]\n\n\n ) .\n\n # Form for the superclass of all states\n # @@ also We must require each state class to be stated to be a subclass of EITHER Open OR Closed.\n core:SuperClassForm a ui:Form; dct:title "Form for managing states";\n ui:parts (\n [ a :SingleLineTextField;\n :label "Name of set of states";\n :defualt "States";\n :maxLength "128";\n :property rdfs:label;\n :size "40" ]\n [a ui:Multiple; ui:property owl:disjointUnionOf; ui:ordered true; ui:part core:StateForm ]\n # [ a ui:Multiple; ui:property rdfs:subClassOf; ui:reverse true; ui:part core:StateForm ]\n ) .\n\n core:StateForm a ui:Form; dct:title "Form for one state";\n ui:parts (\n [ a :SingleLineTextField;\n :label "Name of state";\n :maxLength "128";\n :property rdfs:label;\n :size "40" ]\n [ a :ColorField; :label "Background color"; :property :backgroundColor ]\n # @@ add icon for state\n\n ).\n\n\n # Form for Classification\n\n core:ClassificationForm a ui:Form; dct:title "Form for a classification by categpry";\n ui:parts (\n [ a :SingleLineTextField;\n :label "Name of classification:";\n :maxLength "128";\n :property rdfs:label;\n :size "40" ]\n [a ui:Multiple; ui:property owl:disjointUnionOf; ui:ordered true; ui:part core:CategoryForm ]\n ) .\n\n core:CategoryForm a ui:Form; dct:title "Form for a category";\n ui:parts (\n [ a :SingleLineTextField;\n :label "Name of category";\n :maxLength "128";\n :property rdfs:label;\n :size "40" ]\n [ a :ColorField; :label "Background color"; :property :backgroundColor ]\n\n ).\n\n core:PropertyForm a ui:Form; ui:parts ( # Internded for raed only only marking the\n [ a :SingleLineTextField;\n :label "(property name)";\n :maxLength "128";\n :property rdfs:label;\n :size "40" ]\n ).\n\n\n # Other ontology stuff we are otherwis missing\n\n # we can usde ui:label to give a decent abel when the ontology uses a really bad one\n rdfs:subClassOf ui:label "super class" .\n # We can also add a specific nice label for the inverse\n [] owl:inverse rdfs:subClassOf; rdfs:label "sub class" .\n owl:disjointUnionOf ui:label "option" .\n\n # Form for new group\n\n\n core:GroupForm a ui:Form; dct:title "Form for new contacts group"; ui:parts (\n [ a :SingleLineTextField;\n :label "Name of new group";\n :maxLength "128";\n :property vcard:fn;\n :size "60" ]\n\n [ a ui:Heading; ui:contents "Members of group"@en ]\n\n [ a ui:Multiple; ui:label "contacts in group"; ui:property vcard:member; ui:part core:PersonForm ]\n\n ).\n\n core:PersonForm a ui:Form; dct:title "New contact details form"; ui:parts (\n\n [ a :NamedNodeURIField; ui:label "Solid ID"; ui:property owl:sameAs; ui:size 60 ]\n\n [ a :SingleLineTextField;\n :label "Name of contact";\n :maxLength "128";\n :property vcard:fn;\n :size "60" ]\n\n [ a ui:PhoneField; :label "Phone"; :property vcard:phone; ] # @@ check property]\n\n [ a :EmailField; :label "Email"; :property vcard:email ] # @@ check property\n\n ).\n\n# classificattion owl:disjointUnionOf ()\n wf:Tracker :creationForm core:SettingsForm .\n',m,i.doc().uri,"text/turtle"),s.widgets.appendForm(r,t,{},e,i,e.doc(),o)}),t}(C));else if(i.sameTerm(k))n.appendChild(function(e){const t=r.createElement("div"),n={dom:r,div:t,noun:"tracker"};return s.login.registrationList(n,{public:!0,private:!0,type:e}).then(e=>{t.appendChild(v(t))}),t}(s.ns.wf("Tracker")));else{if(!m.holds(C,s.ns.wf("issueCategory"),i)&&!m.holds(C,s.ns.wf("issueClass"),i))throw new Error("Unexpected tab type: "+i);n.appendChild(g(C,i))}},items:i,selectedTab:m.any(C,s.ns.wf("defaultView"),null,C.doc())||w},c=k.doc();return m.add(k,s.ns.rdfs("label"),"My Trackers",c),m.add(x,s.ns.rdfs("label"),"Settings",c),m.add(n,s.ns.rdfs("label"),"By State",c),s.tabs.tabWidget(a)}t.paneDiv=i,i.setAttribute("class","issuePane");const y=s.ns.wf("BoardView"),w=s.ns.wf("TableView"),x=s.ns.wf("SettingsView"),k=s.ns.wf("InstancesView"),_=m.updater,E=m.findTypeURIs(e);let C;const S=s.ns.wf("").doc();m.holds(void 0,void 0,void 0,S)||h.parse(n(240),m,S.uri,"text/turtle");const A=s.ns.ui("").doc();let T;m.holds(void 0,void 0,void 0,A)||h.parse(n(197),m,A.uri,"text/turtle"),E["http://www.w3.org/2005/01/wf/flow#Task"]||m.holds(e,s.ns.wf("tracker"))?async function(){if(C=m.any(e,s.ns.wf("tracker")),!C)throw new Error("This issue "+e+"has no tracker");try{await t.session.store.fetcher.load(C.doc())}catch(e){return a("Failed to load tracker config "+C.doc()+": "+e)}const n=m.any(C,s.ns.wf("stateStore"));if(!n)return a("Tracker has no state store: "+C);try{await t.session.store.fetcher.load(e)}catch(e){return a("Failed to load issue state "+n+": "+e)}i.appendChild((0,u.renderIssue)(e,t)),_.addDownstreamChangeListener(n,function(){s.widgets.refreshTree(i)})}().then(()=>{}):E["http://www.w3.org/2005/01/wf/flow#Tracker"]&&async function(){function n(e){s.widgets.refreshTree(i),(0,u.exposeOverlay)(e,t),f.disabled=!1}C=e;try{await async function(e,t){async function n(t){const n=e.any(t,s.ns.owl("disjointUnionOf"),null,r);if(!n)throw new Error(`Classification ${t} has no disjointUnionOf`);if(!n.elements)throw new Error(`Classification ${t} has no array`);const i=new Set(n.elements.map(e=>e.uri)),a=new Set(e.each(null,s.ns.rdfs("subClassOf"),t,r).map(e=>e.uri)),o=[...a].filter(e=>!i.has(e)).map(n=>({action:"delete",st:h.st(e.sym(n),s.ns.rdfs("subClassOf"),t,r)})),c=[...i].filter(e=>!a.has(e)).map(n=>({action:"insert",st:h.st(e.sym(n),s.ns.rdfs("subClassOf"),t,r)}));return o.concat(c)}const r=t.doc(),i=e.any(t,s.ns.wf("issueClass")),a=e.each(t,s.ns.wf("issueCategory")).concat([i]);let o=[];for(const e of a)o=o.concat(await n(e));if(o.length){const t=o.filter(e=>"insert"===e.action).map(e=>e.st),n=o.filter(e=>"delete"===e.action).map(e=>e.st);confirm(`Fix ${o} inconsistent subclasses in tracker config?`)&&await e.updater.update(n,t)}}(m,C)}catch(e){}const a=m.any(e,s.ns.wf("issueClass"));if(!a)throw new Error("This tracker has no issueClass");const o=m.any(e,s.ns.wf("stateStore"));if(!o)throw new Error("This tracker has no stateStore");const c=r.createElement("h2");c.setAttribute("style","font-size: 150%"),i.appendChild(c);const l=s.utils.label(a);c.appendChild(r.createTextNode(l+" list"));const f=r.createElement("button"),g=r.createElement("div");f.setAttribute("type","button"),f.setAttribute("style","padding: 0.3em; font-size: 100%; margin: 0.5em;"),g.appendChild(f),i.appendChild(g);const v=r.createElement("img");v.setAttribute("src",s.icons.iconBase+"noun_19460_green.svg"),v.setAttribute("style","width: 1em; height: 1em; margin: 0.2em;"),f.appendChild(v);const y=r.createElement("span");y.innerHTML="New "+l,f.appendChild(y),f.addEventListener("click",function(e){f.disabled=!0,g.appendChild((0,d.newIssueForm)(r,m,C,null,n))},!1),t.session.store.fetcher.load([o]).then(function(n){const r=b();i.appendChild(r),r.refresh,i.appendChild((0,p.newTrackerButton)(e,t)),_.addDownstreamChangeListener(o,r.refresh)}).catch(function(e){})}().then(()=>{});const P=i.appendChild(r.createElement("div"));return t.overlay=P,P.style="position: fixed; z-index: 100; top: 1.51em; right: 2em; left: 2em; bottom:1.5em; border: 0.1em grey; overflow: scroll;",P.style.visibility="hidden",c.authn.checkUser().then(e=>{e?t.me=e:(T=s.login.loginStatusBox(r,e=>{e?(t.me=m.sym(e),i.removeChild(T)):t.me=null}),T.setAttribute("style","margin: 0.5em 1em;"),i.appendChild(T),t.statusArea||(t.statusArea=i.appendChild(r.createElement("div"))))}),i}};return o})())},1927(e,t,n){var r;r=(e,t,n)=>(()=>{"use strict";var r={264(e){e.exports=t},426(t){t.exports=e},663(e){e.exports=n}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={exports:{}};return r[e](n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};a.r(o),a.d(o,{default:()=>f});var s=a(426),c=a(264),l=a(663);const{typeIndex:u}=l.solidLogicSingleton,{loadTypeIndexesFor:p}=u,d=s.ns,f={icon:s.icons.iconBase+"noun_66617.svg",name:"meeting",audience:[d.solid("PowerUser")],label:function(e,t){const n=t.session.store,r=s.ns;return n.holds(e,r.rdf("type"),r.meeting("Meeting"))?"Meeting":null},mintClass:s.ns.meeting("Meeting"),mintNew:function(e,t){return new Promise(function(n,r){const i=e.session.store,a=s.ns;t.newInstance=t.newInstance||i.sym(t.newBase+"index.ttl#this");const o=t.newInstance,u=o.doc(),p=l.authn.currentUser();p&&i.add(o,a.dc("author"),p,u),i.add(o,a.rdf("type"),a.meeting("Meeting"),u),i.add(o,a.dc("created"),new Date,u),i.add(o,a.ui("backgroundColor"),new c.Literal("#ddddcc",void 0,a.xsd("color")),u);const d=new c.Collection;i.add(o,a.meeting("toolList"),d,u),d.elements.push(o),i.updater.put(u,i.statementsMatching(void 0,void 0,void 0,u),"text/turtle",function(e,i,a){i?n(t):r(new Error("Error writing meeting configuration: "+a))})})},render:function(e,t){const n=t.dom,r=t.session.store,i=s.ns,a=r.updater,o=this,u=function(e,t){const r=n.createElement("pre");r.setAttribute("style","background-color: "+t||0),g.appendChild(r),r.appendChild(n.createTextNode(e))},d=function(e,t){e||u(t)},f=e,h=e.doc(),m=e.dir().uri,g=n.createElement("div"),v=g.appendChild(n.createElement("table"));v.style="width: 100%; height: 100%; margin:0;";const b=v.appendChild(n.createElement("tr"));b.appendChild(n.createElement("div"));const y=v.appendChild(n.createElement("tr")),w=v.appendChild(n.createElement("td")).appendChild(n.createElement("table")).appendChild(n.createElement("tr"));b.setAttribute("style","height: 2em;");let x=null;const k=function(){a.put(h,r.statementsMatching(void 0,void 0,void 0,h),"text/turtle",function(e,t,n){t?(G.refresh(),$()):u(n="FAILED to save new thing at: "+h+" : "+n)})},_=function(e,t,n){const o=t.doc();n&&r.add(f,n,t,o),r.add(t,i.meeting("parentMeeting"),f,o),a.put(o,r.statementsMatching(void 0,void 0,void 0,o),"text/turtle",function(e,n,r){n?k():u("FAILED to save new tool at: "+t+" : "+r)})},E=function(e,t,n,a){t&&r.add(f,t,e,h);const o=s.widgets.newThing(h);return n&&r.add(o,i.rdfs("label"),n,h),a&&r.add(o,i.meeting("icon"),r.sym(a),h),r.add(o,i.rdf("type"),i.meeting("Tool"),h),r.add(o,i.meeting("target"),e,h),r.the(f,i.meeting("toolList")).elements.push(o),o};function C(e){const t=/https:\/\/www\.google\..*\/maps\//,n="https://www.google.com/maps/embed/v1/",r=e.uri;if(!r.match(t))return e;if(r.startsWith(n))return e;const i=r.replace(t,n)+"&key=AIzaSyB8aaT6bY9tcLCmc2oPCkdUYLmTOWM8R54";return c.sym(i)}const S=function(n){Promise.all(n.map(function(n){return function(n){return new Promise(function(a){const o=n.uri;if(o.startsWith("http:")&&o.indexOf("#")<0)return function(n){const a=i.wf("attachment");r.add(e,a,n,e.doc()),I({icon:"noun_160581.svg",limit:1,shareTab:!0},{newInstance:e,pane:t.session.paneRegistry.byName("link"),predicate:i.meeting("attachmentTool"),tabTitle:"Links",view:"link",noIndexHTML:!0})}(n),a(n);r.fetcher.nowOrWhenFetched(n,function(e,t){function l(e){e=C(e);const t=E(e,s.ns.wf("attachment"),s.utils.label(e),null);return r.add(t,s.ns.meeting("view"),"iframe",h),a(e)}if(e){const e=n,t=r.findTypeURIs(e);for(const e in t);if(i.vcard("Individual").uri in t||i.foaf("Person").uri in t||i.foaf("Agent").uri in t)return function(e){const t=r.any(e,i.foaf("preferredURI")),n=t?r.sym(t):e,a=r.any(f,i.meeting("attendeeGroup")),o=function(e,t){const n=[c.st(t,s.ns.vcard("hasMember"),e,t.doc())],a=r.any(e,i.vcard("fn"))||r.any(e,i.foaf("name"));a&&n.push(c.st(e,s.ns.vcard("fn"),a,t.doc())),r.fetcher.nowOrWhenFetched(t.doc(),void 0,function(e,i){e?r.updater.update([],n,function(e,t,n){d(t,n)}):u("Can't read group to add person"+t)})};a?o(n,a):R().then(function(e){const t=e.newInstance;o(n,t),r.fetcher.putBack(h,{contentType:"text/turtle"}).then(function(e){})}).catch(function(e){u(e)})}(n),a(n);if(o.startsWith("https:")&&o.indexOf("#")<0){const e=r.fetcher.getHeader(n,"x-frame-options");let t=!0;if(e)for(let n=0;n<e.length;n++)e[n].indexOf("sameorigin")<0&&(t=!1),e[n].indexOf("deny")<0&&(t=!1);if(t)return function(e){const t=E(e,s.ns.wf("attachment"),s.utils.label(e),null);r.add(t,s.ns.meeting("view"),"iframe",h)}(n=C(n)),a(n)}return l(n)}return l(n)})})}(c.sym(n))})).then(function(e){k()})},A=function(e){s.widgets.uploadFiles(r.fetcher,e,f.dir().uri+"Files",f.dir().uri+"Pictures",function(e,t){e.type.startsWith("image/")?T("Files"):P("Pictures")})},T=function(e){return I({icon:"noun_598334.svg",limit:1,shareTab:!0},{newInstance:r.sym(f.dir().uri+e+"/"),pane:t.session.paneRegistry.byName("folder"),predicate:i.meeting("pictures"),shareTab:!0,tabTitle:e,view:"slideshow",noIndexHTML:!0})},P=function(e){return I({icon:"noun_681601.svg",limit:1,shareTab:!0},{newInstance:r.sym(f.dir().uri+"Files/"),pane:t.session.paneRegistry.byName("folder"),predicate:i.meeting("materialsFolder"),tabTitle:"Materials",noIndexHTML:!0})},R=function(){return I({icon:"noun_339237.svg",limit:1,shareTab:!0},{newInstance:r.sym(f.dir().uri+"Attendees/index.ttl#this"),pane:t.session.paneRegistry.byName("contact"),predicate:i.meeting("attendeeGroup"),tabTitle:"Attendees",instanceClass:i.vcard("Group"),instanceName:s.utils.label(e)+" attendees",noIndexHTML:!0})};function I(e,n){return new Promise(function(r,i){const a=t.session.store;if(!n.useExisting){const t=a.any(f,n.predicate);if(t){if(e.limit&&1===e.limit&&!e.shareTab)return u("Already have "+t+" as "+s.utils.label(n.predicate)),u("Cant have two"),r(null);if(e.shareTab)return r({me:x,newInstance:t,instanceClass:n.instanceClass})}}x||n.me||i(new Error("Username not defined for new tool")),n.me=n.me||x,n.newInstance=n.useExisting||n.newInstance||a.sym(n.newBase+"index.ttl#this"),n.pane.mintNew(t,n).then(function(e){const t=E(e.newInstance,e.predicate,e.tabTitle,e.pane.icon);e.view&&a.add(t,s.ns.meeting("view"),e.view,h),k(),a.fetcher.putBack(h,{contentType:"text/turtle"}).then(function(t){r(e)}).catch(function(e){i(e)})}).catch(function(e){u(e),i(e)})})}const F=function(){const e=s.login.selectWorkspace(n,{noun:"meeting"},function(r,i){o.mintNew(t,{newBase:i}).then(function(t){const r=t.newInstance;M.removeChild(e);const i=M.appendChild(n.createElement("p"));i.setAttribute("style","font-size: 140%;"),i.innerHTML="Your <a target='_blank' href='"+r.uri+"'><b>new meeting</b></a> is ready to be set up. <br/><br/><a target='_blank' href='"+r.uri+"'>Go to your new meeting.</a>"}).catch(function(t){M.removeChild(e),M.appendChild(s.widgets.errorMessageBlock(n,t))})});M.appendChild(e)},N=[{icon:"noun_339237.svg",maker:function(e){const n=m+"Group/",r=t.session.store;let a=r.any(f,i.meeting("particpants"));a||(a=c.sym(n+"index.ttl#this"));const o=E(a,i.meeting("particpants"),"Particpants",s.icons.iconBase+"noun_339237.svg");r.add(o,s.ns.meeting("view"),"peoplePicker",h),k()},hint:"Make a group of people",limit:1},{icon:"noun_346777.svg",maker:function(e){return I(e,{useExisting:f,pane:t.session.paneRegistry.byName("schedule"),view:"schedule",tabTitle:"Schedule poll",noIndexHTML:!0})},hint:"Make a poll to schedule the meeting"},{icon:"noun_48218.svg",maker:function(e){},limit:1,hint:"Add an agenda list",disabled:!0},{icon:"noun_79217.svg",maker:function(e){return I(e,{newBase:m+"SharedNotes/",predicate:s.ns.meeting("sharedNotes"),tabTitle:"Shared Notes",pane:t.session.paneRegistry.byName("pad")})},hint:"Add a shared notepad"},{icon:"noun_346319.svg",maker:function(e){const n=m+"Chat/",r=t.session.store;if(r.holds(f,i.meeting("chat")))return;const a=r.sym(n+"chat.ttl");r.add(a,i.rdf("type"),i.meeting("Chat"),a),E(a,i.meeting("chat"),"Chat",s.icons.iconBase+"noun_346319.svg"),_(0,a,i.meeting("chat"))},limit:1,hint:"Add a chat channel for the meeting"},{icon:"noun_17020.svg",maker:function(e){const n=m+"Actions/",r=t.session.store;if(r.holds(f,i.meeting("actions")))return;const a=r.sym(n+"config.ttl"),o=r.sym(n+"config.ttl#this"),c=r.sym(n+"state.ttl");r.add(o,i.dc("title"),(r.anyValue(f,i.cal("summary"))||"Meeting ")+" actions",a),r.add(o,i.wf("issueClass"),i.wf("Task"),a),r.add(o,i.wf("initialState"),i.wf("Open"),a),r.add(o,i.wf("stateStore"),c,a),r.add(o,i.wf("assigneeClass"),i.foaf("Person"),a),r.add(o,i.rdf("type"),i.wf("Tracker"),a),r.add(o,i.rdf("type"),i.wf("Tracker"),a),E(o,i.meeting("actions"),"Actions",s.icons.iconBase+"noun_17020.svg"),_(0,o,i.meeting("actions"))},limit:1,hint:"Add a list of action items"},{icon:"noun_260227.svg",maker:function(e){const n=t.session.store,r=c.sym("https://meet.jit.si/"+s.utils.genUuid());if(n.holds(f,i.meeting("videoCallPage")))return;n.add(r,i.rdf("type"),i.meeting("VideoCallPage"),h);const a=E(r,i.meeting("videoCallPage"),"Video call",s.icons.iconBase+"noun_260227.svg");n.add(a,i.meeting("view"),"iframe",h),k()},limit:1,hint:"Add a video call for the meeting"},{icon:"noun_25830.svg",maker:function(e){s.widgets.askName(n,r,M,i.log("uri"),s.ns.rdf("Resource")).then(function(e){if(!e)return $();const n=t.session.store,r=s.ns,i=n.sym(e),a=E(i,r.wf("attachment"),s.utils.label(i),null);n.add(a,r.meeting("view"),"iframe",h),k()}).catch(function(e){u("Error making new sub-meeting: "+e)})},hint:"Attach meeting materials",disabled:!1},{icon:"noun_123691.svg",maker:function(e){const n=t.session.store,r=s.ns,i=f.dir();if(e.limit&&1===e.limit&&n.holds(f,r.wf("sharingControl")))return void u("Ignored - already have "+s.utils.label(V.predicate));const a=E(i,r.wf("sharingControl"),"Sharing",s.icons.iconBase+"noun_123691.svg");n.add(a,r.meeting("view"),"sharing",h),k()},limit:1,hint:"Control Sharing",disabled:!1},{icon:"noun_66617.svg",maker:function(e){s.widgets.askName(n,r,M,i.foaf("name"),s.ns.meeting("Meeting")).then(function(n){if(!n)return $();const r=encodeURIComponent(n),i={newBase:m+r+"/",predicate:s.ns.meeting("subMeeting"),tabTitle:n,pane:t.session.paneRegistry.byName("meeting")};return I(e,i)}).catch(function(e){u("Error making new sub-meeting: "+e)})},hint:"Make a sub meeting",disabled:!1}],O=c.sym("https://solid.github.io/solid-panes/meeting/meetingDetailsForm.ttl#settings");c.parse('@prefix : <http://www.w3.org/ns/ui#> .\n@prefix f: <#> .\n@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix cal: <http://www.w3.org/2002/12/cal/ical#>.\n@prefix meeting: <http://www.w3.org/ns/pim/meeting#>.\n@prefix ns: <http://www.w3.org/2006/vcard/ns#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix te: <http://purl.org/dc/terms/> .\n@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n\n f:main a :Form;\n cal:summary "Meeting Details";\n :part f:titleField, f:locationField, f:startField,\n f:endField, f:eventComment, f:colorField .\n\n f:titleField a :SingleLineTextField;\n :maxLength 256;\n :property cal:summary;\n :label "Name of meeting";\n :size 80 .\n\n f:locationField a :SingleLineTextField;\n :maxLength 128;\n :property cal:location;\n :size 40 .\n\n f:startField a :DateField;\n :label "Start";\n :property cal:dtstart .\n\n f:endField a :DateField;\n :label "End";\n :property cal:dtend .\n\n f:colorField a :ColorField;\n :label "Tab color";\n # :default "#ddddcc"^^xsd:color;\n :property ui:backgroundColor .\n\n f:eventComment\n a ui:MultiLineTextField;\n # ui:maxLength\n # "1048";\n # ui:size\n # "40".\n ui:property\n cal:comment.\n\n###################################################\n\nf:settings a :Form;\n dc:title "Tab settings";\n :part f:labelField, f:targetField, f:viewField.\n\n f:labelField a :SingleLineTextField;\n :maxLength 128;\n :property rdfs:label;\n :label "Label on tab";\n :size 40 .\n\n f:targetField a :NamedNodeURIField;\n :maxLength 1024; # Longer?\n :property meeting:target;\n :label "URL of resource";\n :size 80 .\n\n f:colorField2 a :ColorField;\n :label "Tab color";\n # :default "#ddddcc"^^xsd:color;\n :property ui:backgroundColor .\n\n f:viewField a :SingleLineTextField;\n :maxLength 128;\n :property meeting:view;\n :label "View mode (experts only)";\n :size 40 .\n\n#\n',r,O.doc().uri,"text/turtle");const L="padding: 1em; width: 3em; height: 3em;",j=w.appendChild(n.createElement("td")),M=w.appendChild(n.createElement("td")),D=j.appendChild(n.createElement("img"));let U=!1;D.setAttribute("src",s.icons.iconBase+"noun_19460_green.svg"),D.setAttribute("style",L+"opacity: 50%;"),D.setAttribute("title","Add another tool to the meeting");const B=function(e){U=!U,D.setAttribute("style",L+(U?"background-color: yellow;":"")),q(U?"":"display: none;")};let z;l.authn.checkUser().then(e=>{if(e)return x=e,D.addEventListener("click",B),void D.setAttribute("style",L);z=s.login.loginStatusBox(n,e=>{e?(x=r.sym(e),M.removeChild(z),D.addEventListener("click",B),D.setAttribute("style",L)):x=null}),z.setAttribute("style","margin: 0.5em 1em;"),M.appendChild(z)});const H=[];for(let e=0;e<N.length;e++)(function(){const t=N[e],r=j.appendChild(n.createElement("img"));r.setAttribute("src",s.icons.iconBase+t.icon),r.setAttribute("style",L+"display: none;"),H.push(r),r.tool=t;const i=t.maker;t.disabled||r.addEventListener("click",function(e){W(r),i(t)})})();const q=function(e){for(let t=0;t<H.length;t++){let n=L+e;N[t].disabled&&(n+="opacity: 0.3;"),H[t].setAttribute("style",n)}},$=function(){q("display: none;"),D.setAttribute("style",L)},W=function(e){q("display: none;"),e.setAttribute("style",L+"background-color: yellow;")},V={dom:n};V.predicate=i.meeting("toolList"),V.subject=e,V.ordered=!0,V.orientation=1,V.renderMain=function(e,a){let o,d=null,m=null;e.innerHTML="";const g=function(t,n){t||(e.textContent=""+n)},v=function(){e.appendChild(n.createElement("h3")).textContent="Details of meeting";const t=c.sym("https://solid.github.io/solid-panes/meeting/meetingDetailsForm.ttl#main");s.widgets.appendForm(document,e,{},f,t,f.doc(),g),e.appendChild(function(){const e=n.createElement("div"),t=e.appendChild(n.createElement("p"));return t.setAttribute("style","margin: 0em; padding:3em; color: #888;"),t.textContent="Tip: Drag URL-bar icons of web pages into the tab bar on the left to add new meeting materials.",e}()),x=l.authn.currentUser(),x&&r.add(f,i.dc("author"),x,h);const a={noun:"meeting",me:x,statusArea:e,div:e,dom:n};s.login.registrationControl(a,f,i.meeting("Meeting")).then(function(e){}),s.pad.manageParticipation(n,e,h,f,x,{});const o="height: 2em; width: 2em; margin:0.5em;",u=e.appendChild(n.createElement("div")),p=u.appendChild(n.createElement("img"));p.setAttribute("src",s.icons.iconBase+"noun_145978.svg"),p.setAttribute("title","Make a fresh new meeting"),p.addEventListener("click",F),p.setAttribute("style",o);const d=u.appendChild(n.createElement("a"));d.setAttribute("href","https://github.com/solid/solid-panes"),d.setAttribute("target","_blank");const m=d.appendChild(n.createElement("img"));m.setAttribute("src",s.icons.iconBase+"noun_368567.svg"),m.setAttribute("title","Fork me on github"),m.setAttribute("style",o+"opacity: 50%;")};if(r.holds(a,i.rdf("type"),i.meeting("Tool"))){const h=r.any(a,i.meeting("target"));if(h.sameTerm(f)&&!r.any(a,i.meeting("view")))v();else{let g=r.any(a,i.meeting("view"));g=g?g.value:null,"details"===g?v():"peoplePicker"===g?function(){const t={div:e,dom:n};e.appendChild(n.createElement("h4")).textContent="Meeting Participants";const a=function(e){const t=[c.st(f,i.meeting("particpantGroup"),e,f.doc())];r.updater.update([],t,function(t,n,r){n?m=e:u("Cant save participants group: "+r)})};m=r.any(f,i.meeting("particpantGroup")),l.authn.checkUser().then(e=>{e&&p(r.sym(e)).then(function(){const e={defaultNewGroupName:"Meeting Participants",selectedGroup:m};new s.widgets.PeoplePicker(t.div,t.index.private[0],a,e).render()})})}():"iframe"===g?function(t){const r=e.appendChild(n.createElement("iframe"));r.setAttribute("src",t.uri),r.setAttribute("style","border: none; margin: 0; padding: 0; height: 100%; width: 100%;"),r.setAttribute("allow","microphone camera"),r.setAttribute("name","disable-x-frame-options"),e.style.padding=0}(h):(d=g?t.session.paneRegistry.byName(g):null,o=e.appendChild(n.createElement("table")),o.style.width="100%",t.getOutliner(n).GotoSubject(h,!0,d,!1,void 0,o))}}else a.sameTerm(f)?v():(!a.sameTerm(a.doc())||r.holds(a,s.ns.rdf("type"),s.ns.meeting("Chat"))||r.holds(a,s.ns.rdf("type"),s.ns.meeting("PaneView")))&&(o=e.appendChild(n.createElement("table")),t.getOutliner(n).GotoSubject(a,!0,void 0,!1,void 0,o))},V.renderTab=function(e,t){if(r.holds(t,i.rdf("type"),i.meeting("Tool"))){const a=r.any(t,i.meeting("target"));let o=r.any(t,i.rdfs("label"));o=o?o.value:s.utils.label(a);const c=e.appendChild(n.createElement("div"));c.textContent=o,c.setAttribute("style","margin-left: 0.7em");const l=r.any(t,i.meeting("icon"));if(l){const t=e.appendChild(n.createElement("table")).appendChild(n.createElement("tr")),r=t.appendChild(n.createElement("td")),i=t.appendChild(n.createElement("td")),a=r.appendChild(n.createElement("img"));a.setAttribute("src",l.uri),a.setAttribute("style","width: 1.5em; height: 1.5em;"),a.setAttribute("title",o),i.appendChild(c)}else e.appendChild(c)}else e.textContent=s.utils.label(t)},V.renderTabSettings=function(e,t){if(e.innerHTML="",e.style+="border-color: #eed;",e.appendChild(n.createElement("h3")).textContent="Adjust this tab",r.holds(t,i.rdf("type"),i.meeting("Tool"))){const a=c.sym("https://solid.github.io/solid-panes/meeting/meetingDetailsForm.ttl#settings");s.widgets.appendForm(document,e,{},t,a,f.doc(),d),s.widgets.deleteButtonWithCheck(n,e,"tab",function(){const e=r.the(f,i.meeting("toolList"));for(let n=0;n<e.elements.length;n++)if(e.elements[n].sameTerm(t)){e.elements.splice(n,1);break}const n=r.any(t,i.meeting("target")),a=r.statementsMatching(t).concat(r.statementsMatching(void 0,void 0,t)).concat(r.statementsMatching(f,void 0,n));r.remove(a),k()}).setAttribute("style","width: 1.5em; height: 1.5em;")}else e.appendChild(n.createElement("h4")).textContent="(No adjustments available)"},V.backgroundColor=r.anyValue(e,i.ui("backgroundColor"))||"#ddddcc";const G=y.appendChild(s.tabs.tabWidget(V));return s.aclControl.preventBrowserDropEvents(n),s.widgets.makeDropTarget(G.tabContainer,S,A),s.widgets.makeDropTarget(j,S,A),g}};return o})(),e.exports=r(n(500),n(8230),n(9332))},7598(e,t,n){
|
|
18
18
|
/*!
|
|
@@ -321,7 +321,7 @@ e.exports=n(1813)},6049(e,t,n){"use strict";
|
|
|
321
321
|
</table>
|
|
322
322
|
</div>
|
|
323
323
|
</section>
|
|
324
|
-
`}},2865(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIconForClass=u,t.iconForClassMap=void 0,t.presentStuff=async function(e){const t=await c(null,e);return{stuff:t.map(e=>{const t=u(e.type||i.ns.rdf("Resource"));return{href:e.instance.uri,name:i.utils.label(e.instance),icon:t,instance:e.instance}})}};var r=n(8230),i=n(500),a=n(9332);const{iconForClass:o}=i.widgets,{typeIndex:s}=a.solidLogicSingleton,{getScopedAppInstances:c}=s,l=t.iconForClassMap={};for(const e in o){const t=e.split(":")[0],n=e.split(":")[1],a=i.ns[t](n);l[a.uri]=r.uri.join(o[e],i.icons.iconBase)}function u(e){return l[e.uri]||i.icons.iconBase+"noun_10636.svg"}},4695(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addMeToYourFriendsDiv=void 0,t.checkIfFriendExists=f,t.createAddMeToYourFriendsButton=void 0,t.saveNewFriend=p;var r=n(6752),i=n(9332),a=n(8230),o=n(500),s=n(4198),c=n(1363);n(1594);let l=document.createElement("section");t.addMeToYourFriendsDiv=(e,t)=>{l=t.dom.createElement("section"),l.setAttribute("class","buttonSubSection text-truncate text-center section-centered"),l.setAttribute("aria-labelledby","add-me-to-your-friends-button-section"),l.setAttribute("data-testid","button");const n=t.dom.createElement("h3");n.setAttribute("id","add-me-to-your-friends-button-section"),n.setAttribute("class","sr-only"),n.textContent="Add me to your friends actions",l.appendChild(n);const i=u(e,t);return i.classList.add("actionButton","btn-primary","action-button-focus"),l.appendChild(i),r.html`${l}`};const u=(e,t)=>{let n=d(i.authn.currentUser())?c.addMeToYourFriendsButtonText.toUpperCase():c.logInAddMeToYourFriendsButtonText.toUpperCase();const r=o.widgets.button(t.dom,void 0,n,function(n){n.preventDefault(),p(e,t).then(()=>{(0,s.clearPreviousMessage)(l),(0,s.mention)(l,c.friendWasAddedSuccesMessage),a()}).catch(e=>{(0,s.clearPreviousMessage)(l),(0,s.complain)(l,t,e)})},{needsBorder:!0});function a(){const n=i.authn.currentUser(),a=t.session.store;d(n)?f(a,n,e).then(e=>{r.innerHTML=e?c.friendExistsAlreadyButtonText.toUpperCase():c.addMeToYourFriendsButtonText.toUpperCase()}):r.innerHTML=c.logInAddMeToYourFriendsButtonText.toUpperCase()}return r.refresh=a(),r};async function p(e,t){const n=i.authn.currentUser(),r=t.session.store;if(!d(n))throw new Error(c.userNotLoggedInErrorMessage);if(await f(r,n,e))throw new Error(c.friendExistsMessage);{await r.fetcher.load(n);const t=r.updater,i=[(0,a.st)(n,o.ns.foaf("knows"),e,n.doc())];try{await t.update([],i)}catch(e){let t=e;throw t.toString().includes("Unauthenticated")&&(t=c.userNotLoggedInErrorMessage),new Error(t)}}}function d(e){return!!e}async function f(e,t,n){return await e.fetcher.load(t),0!==e.whether(t,o.ns.foaf("knows"),n,t.doc())}t.createAddMeToYourFriendsButton=u},4198(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkIfAnyUserLoggedIn=function(e){return!!e},t.clearPreviousMessage=function(e){for(;e.childNodes.length>2;)e.removeChild(e.lastChild)},t.complain=function(e,t,n){const i=r.widgets.errorMessageBlock(t.dom,n);i.setAttribute("role","alert"),i.setAttribute("aria-live","assertive"),i.setAttribute("tabindex","0"),setTimeout(()=>{i.focus()},100),e.appendChild(i)},t.mention=function(e,t){const n=document.createElement("div");n.setAttribute("role","status"),n.setAttribute("aria-live","polite"),n.setAttribute("tabindex","0"),n.classList.add("actionButton","licOkay"),n.innerHTML=t,setTimeout(()=>{n.focus()},100),e.appendChild(n)};var r=n(500)},6016(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditCVSection=function(e,t,n,r){const o=e.dom.createElement("section");o.setAttribute("data-testid","edit-cv-section"),o.setAttribute("aria-labelledby","edit-profile-cv-heading"),o.classList.add("profileSection","section-bg","profile-form");const s=e.dom.createElement("header");s.classList.add("text-center","mb-md");const c=e.dom.createElement("h2");if(c.id="edit-profile-cv-heading",c.classList.add("section-title"),c.textContent=a.resumeHeadingText,s.appendChild(c),o.appendChild(s),n){const t=e.dom.createElement("p");t.classList.add("p-md"),t.textContent="Edit your resume. These will be publicly visible on your profile.",o.appendChild(t)}else{const t=e.dom.createElement("p");t.classList.add("p-md"),t.textContent="Login to add resume information to your profile.",o.appendChild(t)}return(0,i.default)(o,t,'@prefix os: <http://www.w3.org/2000/10/swap/os#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix schema: <http://schema.org/>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n@prefix org: <http://www.w3.org/ns/org#>.\n@prefix esco: <http://data.europa.eu/esco/model#>.\n@prefix wd: <http://www.wikidata.org/entity/>.\n@prefix wdt: <http://www.wikidata.org/prop/direct/>.\n\n@prefix : <#>.\n\n:this\n <http://purl.org/dc/elements/1.1/title> "Resume form" ;\n a ui:Form ;\n ui:parts (\n :CVGroup\n :SkillsHeading :SkillsForm\n :LanguagesHeading :LanguagesForm\n ).\n\n# Curriculum Vitae: membership of organizations\n\n:CVGroup a ui:Group; \n ui:weight 1; \n ui:parts ( \n :CVPrompt \n :involvementWithOrganizationsForm \n ).\n\n:CVPrompt a ui:Comment; ui:contents "What organizations have you been involved with?" .\n\n:involvementWithOrganizationsForm a ui:Multiple;\n ui:label "Involvement with organization";\n ui:property org:member; \n ui:reverse true; # link back from role to member\n ui:ordered false; # Allow user to order CV secions rather than force date order? No.\n ui:part :RoleMembershipForm.\n\norg:member owl:inverse [ ui:label "Involvement with organization" ]. # timelimited involvement\n\n# This is a big important form for one of a series of roles in the list.\n\n:RoleMembershipForm a ui:Group; \n ui:weight 3; \n ui:parts ( \n :MembershipFormHeading \n :roleNameField\n :escoOccupationField \n :orgField \n :RoleClassifier \n :RoleDatesForm \n :RoleDescriptionForm).\n\n:MembershipFormHeading a ui:Heading; \n ui:contents "Details of the role"@en, "Détailes de ce rôle"@fr .\n\n:roleNameField a ui:SingleLineTextField; \n ui:property vcard:role .\n\n:escoOccupationField a ui:AutocompleteField;\n ui:label "Occupation";\n ui:property org:role;\n ui:dataSource :ESCO_Occupation_DataSource;\n ui:targetClass schema:Occupation .\n\n :ESCO_Occupation_DataSource a ui:DataSource;\n schema:name "ESCO";\n ui:targetClass schema:Occupation ;\n schema:logo <https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif>;\n ui:searchByNameURI "https://ec.europa.eu/esco/api/search?language=$(language)&type=occupation&text=$(name)".\n\n:orgField a ui:Choice; \n ui:label "Organization"@en, "Organization"@fr;\n ui:canMintNew true; \n ui:use :OrganizationCreationForm ;\n ui:property org:organization;\n ui:from vcard:Organization .\n\nvcard:Organization ui:creationForm :OrganizationCreationForm .\n\n###### eposodes in one\'s career - Roles\n\n:RoleClassifier a ui:Classifier; \n ui:label "What sort of role?"@en;\n ui:category solid:Role .\n\n:RoleDatesForm a ui:Options; \n ui:dependingOn rdf:type; \n ui:case\n [ ui:for solid:PastRole; ui:use :TwoDateForm ],\n [ ui:for solid:CurrentRole; ui:use :StartDateForm ],\n [ ui:for solid:FutureRole; ui:use :StartDateForm ].\n\n :TwoDateForm a ui:Group; \n ui:weight 0; \n ui:parts ( :StartDateForm :EndDateForm ) .\n :StartDateForm a ui:DateField; \n ui:label "Start"@en,"Début"@fr;\n ui:property schema:startDate .\n :EndDateForm a ui:DateField; \n ui:label "End"@en,"Fin"@fr;\n ui:property schema:endDate .\n\nsolid:Role a rdfs:Class;\n owl:disjointUnionOf ( solid:PastRole solid:CurrentRole solid:FutureRole ) ;\n owl:oneOf ( solid:CurrentRole solid:PastRole solid:FutureRole ). # Future Role too?\n\nsolid:PastRole a rdfs:Class; rdfs:label "Former role"@en, "Ancien rôle"@fr, "Vergangene Rolle"@de, "Rol anterior"@es .\nsolid:CurrentRole a rdfs:Class; rdfs:label "Current role"@en, "Rôle actuel"@fr, "Momentane Rolle"@de , "Rol actual"@es .\nsolid:FutureRole a rdfs:Class; rdfs:label "Future role"@en, "Rôle à venir"@fr, "Zukünftige Rolle"@de, "Rol futuro"@es .\n\n:RoleDescriptionForm a ui:MultiLineTextField; \n ui:property schema:description;\n ui:label "Describe your role" .\n\n###### Organizations\n\n:OrganizationCreationForm a ui:Form; \n schema:name "Form for editing an organization using public data" ;\n ui:parts ( \n :OrgClassifier \n :OrgSwitch \n :OrganizationNameField \n :homePageURIField ) .\n\n:OrgClassifier a ui:Classifier; \n ui:label "Type of organization?"@en;\n ui:category solid:InterestingOrganization .\n\n:OrgSwitch a ui:Options; \n ui:dependingOn rdf:type;\n ui:case\n [ ui:for schema:Corporation; ui:use :CorporationForm ],\n [ ui:for schema:GovernmentOrganization; ui:use :GovernmentOrganizationForm ],\n [ ui:for schema:PerformingGroup; ui:use :PerformingGroupForm ],\n [ ui:for schema:Project; ui:use :ProjectForm ],\n [ ui:for schema:NGO; ui:use :NGOForm ],\n [ ui:for schema:EducationalOrganization; ui:use :EducationalOrganizationForm ],\n [ ui:for schema:ResearchOrganization; ui:use :ResearchOrganizationForm ],\n [ ui:for schema:SportsOrganization; ui:use :SportsOrganizationForm ].\n\n:OrganizationNameField\n a ui:SingleLineTextField ;\n ui:label "Name";\n ui:maxLength "200" ;\n ui:property schema:name .\n\n:homePageURIField a ui:NamedNodeURIField;\n ui:label "Homepage"@en;\n ui:property schema:uri .\n\n# Ontology data to drive the :OrgClassifier classifier\nsolid:InterestingOrganization owl:disjointUnionOf (\n # Airline - a Corporation\n # Consortium - a Corporation or a NGO\n schema:Corporation\n schema:EducationalOrganization\n schema:ResearchOrganization # Proposed. https://github.com/schemaorg/schemaorg/issues/2877\n # FundingScheme - eh?\n schema:GovernmentOrganization\n # LibrarySystem\n # LocalBusiness - Corporation\n # MedicalOrganization - a Corporation or a NGO\n schema:NGO\n # NewsMediaOrganization - a Corporation or a NGO\n schema:PerformingGroup # a band\n schema:Project # like Solid\n schema:SportsOrganization) .\n\n# This until the schema.org ontology adopts it\nschema:ResearchOrganization a rdfs:Class; \n rdfs:label "Research Organization"@en, "Organization de Recherche"@fr ,"organización de investigación"@es, \n "منظمة البحث"@ar, "अनुसंधान संगठन"@hi, "Forschungsorganisation"@de, "shirika la utafiti"@sw .\n\n##### Depending on the type of org, chose a different form\n\n#### Corporation\n:CorporationForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :CorporationPrompt \n :CorporationAutocomplete ) .\n\n :CorporationPrompt a ui:Comment; ui:contents "Corporation details".\n\n :CorporationAutocomplete a ui:AutocompleteField; \n ui:label "Find in wikidata";\n ui:targetClass <http://www.wikidata.org/entity/Q6881511>; # Enterprise\n ui:property solid:publicId; \n ui:dataSource :WikidataInstancesByName.\n\n :WikidataInstancesByName a ui:DataSource ;\n schema:name "Wikidata instances by name";\n ui:endpoint "https://query.wikidata.org/sparql" ;\n ui:searchByNameQuery """SELECT ?subject ?name\n WHERE {\n ?klass wdt:P279* $(targetClass) .\n ?subject wdt:P31 ?klass .\n ?subject rdfs:label ?name.\n FILTER regex(?name, "$(name)", "i")\n } LIMIT $(limit) """ ;\n\n # Note this form of the query is very experimental\n ui:searchByName [ ui:construct { ?subject schema:name ?name } ;\n ui:where { ?klass wdt:P279 ?targetClass .\n ?subject wdt:P31 ?klass; rdfs:label ?name .\n };\n ].\n\n#### Gouvernment\n:GovernmentOrganizationForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :GovernmentOrganizationPrompt \n :GovernmentOrganizationAutocomplete ) .\n\n :GovernmentOrganizationPrompt a ui:Comment; ui:contents "Government organization details".\n\n :GovernmentOrganizationAutocomplete\n a ui:AutocompleteField; ui:label "Find in wikidata";\n ui:targetClass <http://www.wikidata.org/entity/Q327333>; # GovernmentOrganization\n ui:property solid:publicId; \n ui:dataSource :WikidataInstancesByName.\n\n#### Educational\n:EducationalOrganizationForm a ui:Group; \n ui:weight 1; \n ui:parts ( \n :EducationalOrganizationPrompt \n :EducationalOrganizationAutocomplete ) .\n\n :EducationalOrganizationPrompt a ui:Comment; ui:contents "Educational organization details".\n\n :EducationalOrganizationAutocomplete\n a ui:AutocompleteField; ui:label "Find in wikidata";\n ui:targetClass <http://www.wikidata.org/entity/Q2385804>; # EducationalOrganization\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### Research Group\n:ResearchOrganizationForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :ResearchOrganizationPrompt \n :ResearchOrganizationAutocomplete ) .\n\n :ResearchOrganizationPrompt a ui:Comment; ui:contents "Research organizationd details".\n\n :ResearchOrganizationAutocomplete\n a ui:AutocompleteField; ui:label "Find in wikidata";\n ui:targetClass <http://www.wikidata.org/entity/Q31855>; # research institute\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### NGO\n:NGOForm a ui:Group; ui:weight 0; \n ui:parts ( \n :NGOPrompt \n :NGOAutocomplete ) .\n\n :NGOPrompt a ui:Comment; ui:contents "NGO details".\n\n :NGOAutocomplete\n a ui:AutocompleteField; ui:label "Find in wikidata";\n ui:targetClass <http://www.wikidata.org/entity/Q163740>; # Non-profit org\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### Performing group\n:PerformingGroupForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :PerformingGroupPrompt \n :PerformingGroupAutocomplete ) .\n\n :PerformingGroupPrompt a ui:Comment; ui:contents "Performing group details".\n\n :PerformingGroupAutocomplete\n a ui:AutocompleteField; ui:label "Find in wikidata";\n ui:targetClass <http://www.wikidata.org/entity/Q32178211>; # Music Org\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### Project\n:ProjectForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :ProjectPrompt \n :ProjectAutocomplete ) . # :ProjectAutocomplete - no: supress, as not in WD\n\n :ProjectPrompt a ui:Comment; ui:contents "Project details".\n\n :ProjectAutocomplete\n a ui:AutocompleteField; ui:label "Find in wikidata";\n ui:targetClass <http://www.wikidata.org/entity/Q170584>; # Project\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### Sports Organization\n:SportsOrganizationForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :SportsOrganizationPrompt \n :SportsOrganizationAutocomplete ) .\n\n:SportsOrganizationPrompt a ui:Comment; ui:contents "Sports organization details".\n\n:SportsOrganizationAutocomplete\n a ui:AutocompleteField; ui:label "Find in wikidata";\n ui:targetClass <http://www.wikidata.org/entity/Q4438121>; # SportsOrganization\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#################### Skills\n\n:SkillsHeading a ui:Heading; \n ui:contents "Add your skills" .\n\n:SkillsForm a ui:Multiple;\n ui:label "Skills";\n ui:property schema:skills;\n ui:ordered false; # Allow reader to order skills\n ui:part :SkillForm.\n\n:SkillForm a ui:Group; ui:weight 1; ui:parts ( :escoSkillField ).\n\n :escoSkillField a ui:AutocompleteField;\n ui:label "Find in ESCO";\n ui:property solid:publicId;\n ui:dataSource :ESCO_Skill_DataSource;\n ui:targetClass schema:Skill .\n\n :ESCO_Skill_DataSource a ui:DataSource;\n schema:name "ESCO skill";\n ui:targetClass esco:Skill ;\n schema:logo <https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif>;\n ui:searchByNameURI "https://ec.europa.eu/esco/api/search?language=$(language)&limit=$(limit)&type=skill&text=$(name)".\n\n#################### Languages\n\n:LanguagesHeading a ui:Heading; ui:contents "Add your languages" .\n\n:LanguagesForm a ui:Multiple;\n ui:label "Languages";\n ui:property schema:knowsLanguage; \n ui:ordered true; # Allow user to order languages most important first.\n ui:part :LanguageForm.\n\n:LanguageForm a ui:Group; ui:weight 1; ui:parts ( :WikidataLanguageField ).\n\n :WikidataLanguageField a ui:AutocompleteField;\n ui:label "Language";\n ui:property solid:publicId; \n ui:dataSource :WikidataLanguageDataSource;\n ui:targetClass schema:Language .\n\n :WikidataLanguageDataSource\n schema:name "Find in wikidata";\n ui:endpoint "https://query.wikidata.org/sparql" ;\n ui:objectURIBase <https://www.w3.org/ns/iana/language-code/>;\n # Add this to any literal string returned as ?subject\n ui:searchByNameQuery """SELECT ?item ?subject ?name\n WHERE\n { ?item wdt:P305 ?subject .\n OPTIONAL {?item rdfs:label ?name}\n OPTIONAL {?item wdt:P1705 ?name}\n FILTER regex(?name, "$(name)", "i")\n FILTER regex(?subject, "^..$", "i")\n }""" .\n # Note we restrict code to two-letter codes with the second regex, so as to limit the deluge of languages\n # Hope there are not any important ones which have three-letter codes.\n # Omitted: SERVICE wikibase:label { bd:serviceParam wikibase:language "$(languages)". }',"resumeForm.ttl",r,e.dom,n),o};var r,i=(r=n(7824))&&r.__esModule?r:{default:r},a=n(1363)},8188(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditProfileCommunitiesSection=function(e,t,n,a){const o=e.dom.createElement("section");o.setAttribute("aria-labelledby","edit-profile-communities-heading"),o.classList.add("profileSection","section-bg");const s=e.dom.createElement("header");s.classList.add("text-center","mb-md");const c=e.dom.createElement("h2");c.id="edit-profile-communities-heading",c.classList.add("section-title"),c.textContent=i.communitiesHeadingText,s.appendChild(c),o.appendChild(s);const l=e.dom.createElement("p");l.id="edit-profile-communities-description",l.classList.add("p-md"),l.textContent="These are organizations and projects whose stuff you share",o.appendChild(l);let u=null;n&&(u=e.dom.createElement("p"),u.id="edit-profile-communities-help",u.classList.add("p-md"),u.textContent="Drag organizations onto the target below to add organizations.",o.appendChild(u));const p=r.widgets.attachmentList(e.dom,t,o,{doc:a,modify:!!n,predicate:r.ns.solid("community"),noun:"community"}),d=[l.id];u?.id&&d.push(u.id);return p.setAttribute("aria-describedby",d.join(" ")),o.appendChild(p),o};var r=n(500),i=n(1363)},1344(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditContactsSection=function(e,t){const n=e.dom.createElement("section");n.setAttribute("aria-labelledby","edit-profile-contact-heading"),n.classList.add("profileSection","section-bg","profile-form");const i=e.dom.createElement("header");i.classList.add("text-center","mb-md");const a=e.dom.createElement("h2");return a.id="edit-profile-contact-heading",a.classList.add("section-title"),a.textContent=r.yourContactInformationHeading,i.appendChild(a),n.appendChild(i),n.appendChild(function(e,t,n){const r=e.session.paneRegistry.byName(n);if(!r){const t=e.dom.createElement("div");return t.innerText=`Unable to load view: ${n}`,t}const i=r.render(t,e);let a;i&&"function"==typeof i.setAttribute?a=i:i&&i.nodeType===Node.TEXT_NODE?(a=e.dom.createElement("section"),a.appendChild(i)):(a=e.dom.createElement("section"),a.innerText=`View render did not return a valid Node for: ${n}`);return a.setAttribute("role","region"),a.setAttribute("aria-label",`${n} section`),a}(e,t,"contact")),n};var r=n(1363)},8308(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditFriendsSection=function(e,t,n,a){const o=e.dom.createElement("section");o.setAttribute("aria-labelledby","edit-profile-friends-heading"),o.classList.add("profileSection","section-bg");const s=e.dom.createElement("header");s.classList.add("text-center","mb-md");const c=e.dom.createElement("h2");c.id="edit-profile-friends-heading",c.classList.add("section-title"),c.textContent=i.friendsHeadingText,s.appendChild(c),o.appendChild(s);const l=e.dom.createElement("p");l.id="edit-profile-friends-description",l.classList.add("p-md"),l.textContent="This is your public social network. Only put people here to whom you are happy to be publicly connected. (You can always keep private track of friends and family in your contacts.)",o.appendChild(l);let u=null;n&&(u=e.dom.createElement("p"),u.id="edit-profile-friends-help",u.classList.add("p-md"),u.textContent="Drag people onto the target below to add people.",o.appendChild(u));const p=r.widgets.attachmentList(e.dom,t,o,{doc:a,modify:!!n,predicate:r.ns.foaf("knows"),noun:"friend"}),d=[l.id];u?.id&&d.push(u.id);return p.setAttribute("aria-describedby",d.join(" ")),o.appendChild(p),o};var r=n(500),i=n(1363)},7643(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditOtherPreferencesSection=function(e,t,n,r){const o=e.dom.createElement("section");o.setAttribute("data-testid","edit-other-preferences-section"),o.setAttribute("aria-labelledby","edit-profile-other-preferences-heading"),o.classList.add("profileSection","section-bg","profile-form");const s=e.dom.createElement("header");s.classList.add("text-center","mb-md");const c=e.dom.createElement("h2");return c.id="edit-profile-other-preferences-heading",c.classList.add("section-title"),c.textContent=a.otherPreferencesHeadingText,s.appendChild(c),o.appendChild(s),(0,i.default)(o,t,'@prefix os: <http://www.w3.org/2000/10/swap/os#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix schema: <http://schema.org/>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n@prefix wd: <http://www.wikidata.org/entity/>.\n@prefix wdt: <http://www.wikidata.org/prop/direct/>.\n\n@prefix : <#>.\n\n\n:this\n <http://purl.org/dc/elements/1.1/title> "Other preferences form" ;\n a ui:Form ;\n ui:parts (\n :styleGroup\n :nicknameGroup\n :pronounsGroup\n ).\n\n:styleGroup a ui:Group; ui:weight 0; \n ui:parts ( :styleHeading :backgroundColor :highlightColor ).\n\n:styleHeading a ui:Heading; ui:contents "The style of your public profile.".\n\n:backgroundColor a ui:ColorField; ui:property solid:profileBackgroundColor;\n ui:label "Background color"; ui:default "#ffffff".\n:highlightColor a ui:ColorField; ui:property solid:profileHighlightColor;\n ui:label "Highlight color"; ui:default "#000000".\n\n# Nickname\n\n:nicknameGroup a ui:Group; ui:weight 0; \n ui:parts ( :nicknameHeading :nicknameField) .\n\n:nicknameHeading a ui:Heading; ui:contents "What is your nickname?" .\n\n:nicknameField a ui:SingleLineTextField; \n ui:property foaf:nick;\n ui:label "Nickname"@en, "Nom court"@fr.\n\n# Pronouns\n\n:pronounsGroup a ui:Group; ui:weight 0; \n ui:parts ( :pronounsHeading :subjectPronounForm :objectPronounForm :relativePronounForm) .\n\n:pronounsHeading a ui:Heading; ui:contents "What are your pronouns?" .\n\n:subjectPronounForm a ui:SingleLineTextField; ui:property solid:preferredSubjectPronoun;\n ui:size 10; ui:label "he/she/they..." .\n:objectPronounForm a ui:SingleLineTextField; ui:property solid:preferredObjectPronoun;\n ui:size 10; ui:label "him/her/them..." .\n:relativePronounForm a ui:SingleLineTextField; ui:property solid:preferredRelativePronoun;\n ui:size 10; ui:label "his/hers/theirs..." .',"otherPreferencesForm.ttl",r,e.dom,n),o};var r,i=(r=n(7824))&&r.__esModule?r:{default:r},a=n(1363)},5011(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(500),i=n(1344),a=n(8308),o=n(9410),s=n(8188);n(1295),n(7436);var c=n(6016),l=n(7643);const u={global:!0,icon:r.icons.iconBase+"noun_492246.svg",name:"editProfile",label:()=>null,render:function(e,t){const n=t.dom,u=t.session.store,p=n.createElement("section");let d;p.setAttribute("data-testid","profile-editor"),p.setAttribute("role","region"),p.setAttribute("aria-label","Edit your profile");const f=n.createElement("main");f.setAttribute("id","profile-edit-main-content"),f.setAttribute("aria-busy","true"),f.setAttribute("tabindex","-1"),f.classList.add("profile-grid","no-focus-ring");const h=n.createElement("h1");h.classList.add("visually-hidden"),h.textContent="Edit Profile",f.appendChild(h),p.appendChild(f);const m=n.createElement("aside");m.classList.add("p-sm"),m.setAttribute("role","status"),m.setAttribute("aria-live","polite"),m.setAttribute("aria-atomic","true");const g=()=>{m.isConnected||p.appendChild(m)},v={dom:n,div:f,statusArea:m,me:null};return r.login.ensureLoadedProfile(v).then(e=>{const p=e.me,h=p.doc();if(!u.updater)throw new Error("Store has no updater");if(u.any(p,r.ns.solid("editableProfile")))d=u.any(p,r.ns.solid("editableProfile"));else{if(!u.updater.editable(h.uri,u))return g(),void m.appendChild(r.widgets.errorMessageBlock(n,`⚠️ Your profile ${h} is not editable, so we cannot do much here.`,"straw"));d=h}f.appendChild((0,i.EditContactsSection)(t,p)),f.appendChild((0,c.EditCVSection)(t,p,d,u)),f.appendChild((0,o.EditSocialSection)(t,p,d,u)),f.appendChild((0,l.EditOtherPreferencesSection)(t,p,d,u)),f.appendChild((0,a.EditFriendsSection)(t,p,d,h)),f.appendChild((0,s.EditProfileCommunitiesSection)(t,p,d,h)),f.setAttribute("aria-busy","false"),f.focus()}).catch(e=>{g(),m.appendChild(r.widgets.errorMessageBlock(n,e,"#fee")),f.setAttribute("aria-busy","false")}),p}};t.default=u},9410(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditSocialSection=function(e,t,n,r){const o=e.dom.createElement("section");o.setAttribute("data-testid","edit-social-section"),o.setAttribute("aria-labelledby","edit-profile-social-heading"),o.classList.add("profileSection","section-bg","profile-form");const s=e.dom.createElement("header");s.classList.add("text-center","mb-md");const c=e.dom.createElement("h2");if(c.id="edit-profile-social-heading",c.classList.add("section-title"),c.textContent=a.socialAccountsHeadingText,s.appendChild(c),o.appendChild(s),n){const t=e.dom.createElement("p");t.classList.add("p-md"),t.textContent="Add links to your social media accounts here. These will be publicly visible on your profile.",o.appendChild(t)}else{const t=e.dom.createElement("p");t.classList.add("p-md"),t.textContent="Login to add social media accounts to your profile.",o.appendChild(t)}return(0,i.default)(o,t,'@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix schema: <http://schema.org/>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n@prefix org: <http://www.w3.org/ns/org#>.\n@prefix : <#>.\n\n########### ATTENTION - we cannot rename this ontology file name without migrating existing data on existing accounts\n\n########### Social Media - other accounts\n#\n# Twitter, linked In, Orkid, Mastodon, Matrix, Bluesky, Instagram, Facebook, Github,\n# Snapchat, TikTok, etc\n\n:this\n <http://purl.org/dc/elements/1.1/title> "Social media form" ;\n a ui:Form ;\n ui:parts (\n :SocialsForm\n ).\n\n:SocialsForm a ui:Multiple;\n ui:label "online account";\n ui:property foaf:account; # the triple is created with the foaf:acccounts predicate\n ui:ordered true; # Allow user to order occounts most important first.\n ui:part :AccountsForm.\n\n:AccountsForm a ui:Group; \n ui:weight 1; \n ui:parts ( \n :AccountField \n :AccountIdField ).\n\n:AccountField a ui:Classifier; \n ui:label "Choose account"@en;\n ui:multiple false ; \n ui:category foaf:Account. # the accounts are described by the foaf:Account predicate\n\n# this is what is needed to make a dropdown box\nfoaf:Account a rdfs:Class;\n rdfs:label "Online Account Provider";\n owl:disjointUnionOf ( \n :BlueSkyAccount :DiggAccount :FacebookAccount :GithubAccount :InstagramAccount\n :LinkedInAccount :MastodonAccount :MatrixAccount :MediumAccount :NostrAccount \n :OrcidAccount :PinterestAccount :RedditAccount :SnapchatAccount :StravaAccount \n :TiktokAccount :TumblrAccount :TwitterAccount :OtherAccount) .\n\n:AccountIdField a ui:Options; \n ui:dependingOn rdf:type; \n ui:case\n [ ui:for :BlueSkyAccount; ui:use :BlueSkyIdField ],\n [ ui:for :DiggAccount; ui:use :DiggIdField],\n [ ui:for :FacebookAccount; ui:use :FacebookIdField ],\n [ ui:for :GithubAccount; ui:use :GithubIdField ],\n [ ui:for :InstagramAccount; ui:use :InstagramIdField ],\n [ ui:for :LinkedInAccount; ui:use :LinkedInIdField ],\n [ ui:for :MastodonAccount; ui:use :MastodonIdField ],\n [ ui:for :MatrixAccount; ui:use :MatrixIdField ],\n [ ui:for :MediumAccount; ui:use :MediumIdField ],\n [ ui:for :NostrAccount; ui:use :NostrIdField ],\n [ ui:for :OrcidAccount; ui:use :OrcidIdField ],\n [ ui:for :PinterestAccount; ui:use :PinterestIdField ],\n [ ui:for :RedditAccount; ui:use :RedditIdField ],\n [ ui:for :StravaAccount; ui:use :StravaIdField ],\n [ ui:for :SnapchatAccount; ui:use :SnapchatIdField ],\n [ ui:for :TiktokAccount; ui:use :TiktokIdField ],\n [ ui:for :TumblrAccount; ui:use :TumblrIdField ],\n [ ui:for :TwitterAccount; ui:use :TwitterIdField ],\n [ ui:for :OtherAccount; ui:use :OtherIdForm ] .\n\n:BlueSkyAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Bluesky";\n foaf:userProfilePrefix "https://bsky.app/profile/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/bluesky-1.svg>;\n foaf:homepage <https://bsky.app/> .\n\n:DiggAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Digg";\n foaf:userProfilePrefix "https://www.digg.com/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/digg-icon.svg>;\n foaf:homepage <https://www.digg.com/> .\n\n:FacebookAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Facebook";\n foaf:userProfilePrefix "https://www.facebook.com/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/facebook-2020-2-1.svg>;\n foaf:homepage <https://www.facebook.com/> .\n\n:GithubAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Github";\n foaf:userProfilePrefix "https://www.github.com/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/github-icon.svg>;\n foaf:homepage <https://github.com/> .\n\n:InstagramAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Instagram";\n foaf:userProfilePrefix "https://www.instagram.com/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/instagram-2016-5.svg>;\n foaf:homepage <https://www.instagram.com/> .\n\n:LinkedInAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "LinkedIn";\n foaf:userProfilePrefix "https://www.linkedin.com/in/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/linkedin-icon.svg>;\n foaf:homepage <https://linkedin.com/> .\n\n:MastodonAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Mastodon" ;\n foaf:userProfilePrefix "https://mastodon.social/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/mastodon-2.svg>;\n foaf:homepage <https://joinmastodon.org/> .\n\n:MatrixAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Matrix" ;\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/matrix-logo-black.svg> ;\n foaf:userProfilePrefix "https://matrix.to/#/" ;\n foaf:homepage <https://matrix.org/> .\n\n:MediumAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Medium";\n foaf:userProfilePrefix "https://medium.com/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/medium-logo-wordmark-black.svg>;\n foaf:homepage <https://medium.com/> .\n\n:NostrAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Nostr";\n foaf:userProfilePrefix "https://primal.net/p/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/nostr-icon-purple-on-white.svg>;\n foaf:homepage <https://nostr.net/> .\n\n:OrcidAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "ORCiD";\n foaf:userProfilePrefix "https://orcid.org/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/ORCID-1.svg>;\n foaf:homepage <https://orcid.org/> .\n\n:PinterestAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Pinterest";\n foaf:userProfilePrefix "https://pin.it/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/pinterest-2-1.svg>;\n foaf:homepage <https://pinterest.com/> .\n\n:RedditAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Reddit";\n foaf:userProfilePrefix "https://www.reddit.com/user/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/reddit-4.svg>;\n foaf:homepage <https://reddit.com/> .\n\n:SnapchatAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Snapchat";\n foaf:userProfilePrefix "https://www.snapchat.com/add/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/snapchat-1.svg>;\n foaf:homepage <https://www.snapchat.com/> .\n\n:StravaAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Strava";\n foaf:userProfilePrefix "https://www.strava.com/athletes/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/strava-2.svg>;\n foaf:homepage <https://strava.com/> .\n\n:TiktokAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "TikTok";\n foaf:userProfilePrefix "https://www.tiktok.com/@";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/tiktok-icon-2.svg>;\n foaf:homepage <https://www.tiktok.com/> .\n\n:TumblrAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Tumblr";\n foaf:userProfilePrefix "https://www.tumblr.com/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/tumblr-icon.svg>;\n foaf:homepage <https://www.tumblr.com/> .\n\n:TwitterAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "X";\n foaf:userProfilePrefix "https://x.com/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/x-2.svg>;\n foaf:homepage <https://x.com/> .\n\n:OtherAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Other" ;\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/noun_1689339.svg> .\n\n:BlueSkyIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-](.[a-z0-9A-Z_-])*".\n\n:DiggIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-](.[a-z0-9A-Z_-])*".\n\n:FacebookIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*".\n\n:GithubIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*".\n\n:InstagramIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*".\n\n:LinkedInIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*".\n\n:MastodonIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*".\n\n:MatrixIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*".\n\n:MediumIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*".\n\n:NostrIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*".\n\n:OrcidIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*".\n\n:PinterestIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*".\n\n:RedditIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*".\n\n:StravaIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*".\n\n:SnapchatIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-]*".\n\n:TiktokIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-]*".\n\n:TumblrIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-]*".\n\n:TwitterIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-]*".\n\n# an unknown online account needs more info\n\n:OtherIdForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :OtherIdField \n :OtherIconField \n :OtherLabelField ).\n\n:OtherIdField\n a ui:NamedNodeURIField ;\n ui:label "Account link";\n ui:maxLength "200" ;\n ui:property foaf:homepage.\n\n:OtherIconField\n a ui:NamedNodeURIField ;\n ui:label "Icon link";\n ui:maxLength "200" ;\n ui:property foaf:icon.\n\n:OtherLabelField\n a ui:SingleLineTextField ;\n ui:label "Name";\n ui:maxLength "200" ;\n ui:property rdfs:label.\n\n# ends\n',"socialMedia.ttl",r,e.dom,n),o};var r,i=(r=n(7824))&&r.__esModule?r:{default:r},a=n(1363)},2643(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(9970),n(1275),n(4675),n(1594),n(8235),n(2195),n(8428),n(5755),n(1295);var r,i=n(6752),a=n(3447),o=(r=n(5011))&&r.__esModule?r:{default:r},s=n(500),c=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o}(e,t)}(n(7583));const l={global:!1,icon:s.icons.iconBase+"noun_15059.svg",name:"profile",label:function(e,t){const n=t.session.store.findTypeURIs(e);return n[s.ns.vcard("Individual").uri]||n[s.ns.foaf("Person").uri]||n[s.ns.schema("Person").uri]?"Profile":null},editor:o.default,render:(e,t)=>{const n=t.dom.createElement("div");return async function(e,t){const n=e.each(t,s.ns.rdfs("seeAlso"),null,t.doc());n.length>0&&await e.fetcher.load(n)}(t.session.store,e).then(async()=>{(0,i.render)(await(0,a.ProfileView)(e,t),n);const r=Array.from(n.getElementsByClassName("QRCode"));if(r.length)for(const e of r){const t=e.getAttribute("data-value");if(!t)return;const n={type:"svg",color:{dark:e.getAttribute("highlightColor")||"#000000",light:e.getAttribute("backgroundColor")||"#ffffff"}};c.toString(t,n,function(t,n){t||(e.innerHTML=n,e.style.width="80%",e.style.height="80%",e.style.margin="10%")})}}),n}};t.default=l},4887(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.presentProfile=void 0,t.pronounsAsText=o;var r=n(500),i=n(9332),a=n(6077);function o(e){let t=i.store.anyJS(e,r.ns.solid("preferredSubjectPronoun"))||"";if(t){const n=i.store.anyJS(e,r.ns.solid("preferredObjectPronoun"));if(n){t+="/"+n;const a=i.store.anyJS(e,r.ns.solid("preferredRelativePronoun"));a&&(t+="/"+a)}t=" ("+t+") "}return t||""}function s(e,t){return e&&t?`${t}, ${e}`:e||t||null}function c(e,t){return e&&t?`${e} at ${t}`:t||e||null}function l(e,t){return e&&(0,a.validateHTMLColorHex)(e)?e:t}t.presentProfile=(e,t)=>{const n=r.utils.label(e),i=r.widgets.findImage(e),a=t.anyValue(e,r.ns.vcard("role")),u=t.anyValue(e,r.ns.vcard("organization-name")),p=t.any(e,r.ns.vcard("hasAddress")),d=null!=p?t.anyValue(p,r.ns.vcard("country-name")):null,f=null!=p?t.anyValue(p,r.ns.vcard("locality")):null,{backgroundColor:h,highlightColor:m}=function(e,t){const n=t.anyValue(e,r.ns.solid("profileBackgroundColor"),null,e.doc()),i=t.anyValue(e,r.ns.solid("profileHighlightColor"),null,e.doc());return{backgroundColor:l(n,""),highlightColor:l(i,"")}}(e,t),g=o(e);return{name:n,imageSrc:i,introduction:c(a,u),location:s(d,f),backgroundColor:h,pronouns:g,highlightColor:m}}},7824(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,s,c,l,u,p){const d=a+s,f=p||"this",h=(0,r.Namespace)(d+"#")(f);o(c,n,s,d),i.widgets.appendForm(l,e,{},t,h,u,(e,t)=>{e||i.widgets.errorMessageBlock(l,t)})},t.loadDocument=o;var r=n(8230),i=n(500);const a="https://solidos.github.io/profile-pane/src/ontology/";function o(e,t,n,i){const o=i||a+n,s=(0,r.sym)(o);e.holds(void 0,void 0,void 0,s)||(0,r.parse)(t,e,o,"text/turtle",()=>null)}},1363(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.yourContactInformationHeading=t.userNotLoggedInErrorMessage=t.socialAccountsHeadingText=t.sharedItemsHeadingText=t.scanQrToConnectText=t.resumeHeadingText=t.otherPreferencesHeadingText=t.logInToChatWithMeButtonText=t.logInAddMeToYourFriendsButtonText=t.loadingMessage=t.internalErrorMessage=t.friendsHeadingText=t.friendWasAddedSuccesMessage=t.friendExistsMessage=t.friendExistsAlreadyButtonText=t.contactHeadingText=t.communitiesHeadingText=t.chatWithMeButtonText=t.addMeToYourFriendsButtonText=void 0;t.scanQrToConnectText="Scan the QR code to connect with me",t.userNotLoggedInErrorMessage="Current user not found! Not logged in?",t.internalErrorMessage="An internal error occured!",t.friendWasAddedSuccesMessage="Friend was added!",t.friendExistsMessage="Friend already exists",t.loadingMessage="Loading...",t.addMeToYourFriendsButtonText="Add me to your friends",t.logInAddMeToYourFriendsButtonText="Login to add me to your friends",t.logInToChatWithMeButtonText="Login to chat with me",t.friendExistsAlreadyButtonText="Already part of friends",t.chatWithMeButtonText="Chat with me",t.yourContactInformationHeading="Contact Information",t.otherPreferencesHeadingText="Other Preferences",t.communitiesHeadingText="Communities You Participate In",t.resumeHeadingText="Resume",t.socialAccountsHeadingText="Social Accounts",t.sharedItemsHeadingText="Shared Items",t.friendsHeadingText="Friends",t.contactHeadingText="Contact"},2694(e,t,n){"use strict";var r=n(6925);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7583(e,t,n){const r=n(1333),i=n(157),a=n(7899),o=n(6756);function s(e,t,n,a,o){const s=[].slice.call(arguments,1),c=s.length,l="function"==typeof s[c-1];if(!l&&!r())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(n=t,t=a=void 0):2!==c||t.getContext||(a=n,n=t,t=void 0),new Promise(function(r,o){try{const o=i.create(n,a);r(e(o,t,a))}catch(e){o(e)}})}if(c<2)throw new Error("Too few arguments provided");2===c?(o=n,n=t,t=a=void 0):3===c&&(t.getContext&&void 0===o?(o=a,a=void 0):(o=a,a=n,n=t,t=void 0));try{const r=i.create(n,a);o(null,e(r,t,a))}catch(e){o(e)}}t.create=i.create,t.toCanvas=s.bind(null,a.render),t.toDataURL=s.bind(null,a.renderToDataURL),t.toString=s.bind(null,function(e,t,n){return o.render(e,n)})},1333(e){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},6421(e,t,n){const r=n(6886).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,n=r(e),i=145===n?26:2*Math.ceil((n-13)/(2*t-2)),a=[n-7];for(let e=1;e<t-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)0===e&&0===t||0===e&&t===i-1||e===i-1&&0===t||n.push([r[e],r[t]]);return n}},1433(e,t,n){const r=n(208),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function a(e){this.mode=r.ALPHANUMERIC,this.data=e}a.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=45*i.indexOf(this.data[t]);n+=i.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=a},9899(e){function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},8820(e){function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,n,r){const i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},5822(e,t,n){const r=n(208);function i(e){this.mode=r.BYTE,this.data="string"==typeof e?(new TextEncoder).encode(e):new Uint8Array(e)}i.getBitsLength=function(e){return 8*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},e.exports=i},7518(e,t,n){const r=n(9953),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],a=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case r.L:return i[4*(e-1)+0];case r.M:return i[4*(e-1)+1];case r.Q:return i[4*(e-1)+2];case r.H:return i[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return a[4*(e-1)+0];case r.M:return a[4*(e-1)+1];case r.Q:return a[4*(e-1)+2];case r.H:return a[4*(e-1)+3];default:return}}},9953(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return n}}},7756(e,t,n){const r=n(6886).getSymbolSize;t.getPositions=function(e){const t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},4565(e,t,n){const r=n(6886),i=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){const n=e.bit<<3|t;let a=n<<10;for(;r.getBCHDigit(a)-i>=0;)a^=1335<<r.getBCHDigit(a)-i;return 21522^(n<<10|a)}},2731(e,t){const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)n[t]=e,r[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)n[e]=n[e-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return r[e]},t.exp=function(e){return n[e]},t.mul=function(e,t){return 0===e||0===t?0:n[r[e]+r[t]]}},4861(e,t,n){const r=n(208),i=n(6886);function a(e){this.mode=r.KANJI,this.data=e}a.getBitsLength=function(e){return 13*e},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=i.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}},e.exports=a},1332(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n=3,r=3,i=40,a=10;function o(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let r=0,i=0,a=0,o=null,s=null;for(let c=0;c<t;c++){i=a=0,o=s=null;for(let l=0;l<t;l++){let t=e.get(c,l);t===o?i++:(i>=5&&(r+=n+(i-5)),o=t,i=1),t=e.get(l,c),t===s?a++:(a>=5&&(r+=n+(a-5)),s=t,a=1)}i>=5&&(r+=n+(i-5)),a>=5&&(r+=n+(a-5))}return r},t.getPenaltyN2=function(e){const t=e.size;let n=0;for(let r=0;r<t-1;r++)for(let i=0;i<t-1;i++){const t=e.get(r,i)+e.get(r,i+1)+e.get(r+1,i)+e.get(r+1,i+1);4!==t&&0!==t||n++}return n*r},t.getPenaltyN3=function(e){const t=e.size;let n=0,r=0,a=0;for(let i=0;i<t;i++){r=a=0;for(let o=0;o<t;o++)r=r<<1&2047|e.get(i,o),o>=10&&(1488===r||93===r)&&n++,a=a<<1&2047|e.get(o,i),o>=10&&(1488===a||93===a)&&n++}return n*i},t.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return Math.abs(Math.ceil(100*t/n/5)-10)*a},t.applyMask=function(e,t){const n=t.size;for(let r=0;r<n;r++)for(let i=0;i<n;i++)t.isReserved(i,r)||t.xor(i,r,o(e,i,r))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let i=0,a=1/0;for(let o=0;o<r;o++){n(o),t.applyMask(o,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(o,e),r<a&&(a=r,i=o)}return i}},208(e,t,n){const r=n(1878),i=n(7044);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!r.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return n}}},4357(e,t,n){const r=n(208);function i(e){this.mode=r.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);const i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*i+1))},e.exports=i},4713(e,t,n){const r=n(2731);t.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<t.length;a++)n[i+a]^=r.mul(e[i],t[a]);return n},t.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){const e=n[0];for(let i=0;i<t.length;i++)n[i]^=r.mul(t[i],e);let i=0;for(;i<n.length&&0===n[i];)i++;n=n.slice(i)}return n},t.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let i=0;i<e;i++)n=t.mul(n,new Uint8Array([1,r.exp(i)]));return n}},157(e,t,n){const r=n(6886),i=n(9953),a=n(9899),o=n(8820),s=n(6421),c=n(7756),l=n(1332),u=n(7518),p=n(4764),d=n(1427),f=n(4565),h=n(208),m=n(9801);function g(e,t,n){const r=e.size,i=f.getEncodedBits(t,n);let a,o;for(a=0;a<15;a++)o=1==(i>>a&1),a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function v(e,t,n){const i=new a;n.forEach(function(t){i.put(t.mode.bit,4),i.put(t.getLength(),h.getCharCountIndicator(t.mode,e)),t.write(i)});const o=8*(r.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,t));for(i.getLengthInBits()+4<=o&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const s=(o-i.getLengthInBits())/8;for(let e=0;e<s;e++)i.put(e%2?17:236,8);return function(e,t,n){const i=r.getSymbolTotalCodewords(t),a=u.getTotalCodewordsCount(t,n),o=i-a,s=u.getBlocksCount(t,n),c=i%s,l=s-c,d=Math.floor(i/s),f=Math.floor(o/s),h=f+1,m=d-f,g=new p(m);let v=0;const b=new Array(s),y=new Array(s);let w=0;const x=new Uint8Array(e.buffer);for(let e=0;e<s;e++){const t=e<l?f:h;b[e]=x.slice(v,v+t),y[e]=g.encode(b[e]),v+=t,w=Math.max(w,t)}const k=new Uint8Array(i);let _,E,C=0;for(_=0;_<w;_++)for(E=0;E<s;E++)_<b[E].length&&(k[C++]=b[E][_]);for(_=0;_<m;_++)for(E=0;E<s;E++)k[C++]=y[E][_];return k}(i,e,t)}function b(e,t,n,i){let a;if(Array.isArray(e))a=m.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let r=t;if(!r){const t=m.rawSplit(e);r=d.getBestVersionForData(t,n)}a=m.fromString(e,r||40)}}const u=d.getBestVersionForData(a,n);if(!u)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<u)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+u+".\n")}else t=u;const p=v(t,n,a),f=r.getSymbolSize(t),h=new o(f);return function(e,t){const n=e.size,r=c.getPositions(t);for(let t=0;t<r.length;t++){const i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===t||6===t)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}(h,t),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(h),function(e,t){const n=s.getPositions(t);for(let t=0;t<n.length;t++){const r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}(h,t),g(h,n,0),t>=7&&function(e,t){const n=e.size,r=d.getEncodedBits(t);let i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=1==(r>>t&1),e.set(i,a,o,!0),e.set(a,i,o,!0)}(h,t),function(e,t){const n=e.size;let r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=1==(t[o]>>>a&1)),e.set(i,s-n,r),a--,-1===a&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}(h,p),isNaN(i)&&(i=l.getBestMask(h,g.bind(null,h,n))),l.applyMask(i,h),g(h,n,i),{modules:h,version:t,errorCorrectionLevel:n,maskPattern:i,segments:a}}t.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let n,a,o=i.M;return void 0!==t&&(o=i.from(t.errorCorrectionLevel,i.M),n=d.from(t.version),a=l.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),b(e,n,o,a)}},4764(e,t,n){const r=n(4713);function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=r.mod(t,this.genPoly),i=this.degree-n.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(n,i),e}return n},e.exports=i},7044(e,t){const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";t.KANJI=new RegExp(r,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(i,"g"),t.NUMERIC=new RegExp(n,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const a=new RegExp("^"+r+"$"),o=new RegExp("^"+n+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return a.test(e)},t.testNumeric=function(e){return o.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},9801(e,t,n){const r=n(208),i=n(4357),a=n(1433),o=n(5822),s=n(4861),c=n(7044),l=n(6886),u=n(6320);function p(e){return unescape(encodeURIComponent(e)).length}function d(e,t,n){const r=[];let i;for(;null!==(i=e.exec(n));)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function f(e){const t=d(c.NUMERIC,r.NUMERIC,e),n=d(c.ALPHANUMERIC,r.ALPHANUMERIC,e);let i,a;l.isKanjiModeEnabled()?(i=d(c.BYTE,r.BYTE,e),a=d(c.KANJI,r.KANJI,e)):(i=d(c.BYTE_KANJI,r.BYTE,e),a=[]);return t.concat(n,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function h(e,t){switch(t){case r.NUMERIC:return i.getBitsLength(e);case r.ALPHANUMERIC:return a.getBitsLength(e);case r.KANJI:return s.getBitsLength(e);case r.BYTE:return o.getBitsLength(e)}}function m(e,t){let n;const c=r.getBestModeForData(e);if(n=r.from(t,c),n!==r.BYTE&&n.bit<c.bit)throw new Error('"'+e+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(c));switch(n!==r.KANJI||l.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new i(e);case r.ALPHANUMERIC:return new a(e);case r.KANJI:return new s(e);case r.BYTE:return new o(e)}}t.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e},[])},t.fromString=function(e,n){const i=function(e){const t=[];for(let n=0;n<e.length;n++){const i=e[n];switch(i.mode){case r.NUMERIC:t.push([i,{data:i.data,mode:r.ALPHANUMERIC,length:i.length},{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.ALPHANUMERIC:t.push([i,{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.KANJI:t.push([i,{data:i.data,mode:r.BYTE,length:p(i.data)}]);break;case r.BYTE:t.push([{data:i.data,mode:r.BYTE,length:p(i.data)}])}}return t}(f(e,l.isKanjiModeEnabled())),a=function(e,t){const n={},i={start:{}};let a=["start"];for(let o=0;o<e.length;o++){const s=e[o],c=[];for(let e=0;e<s.length;e++){const l=s[e],u=""+o+e;c.push(u),n[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){const o=a[e];n[o]&&n[o].node.mode===l.mode?(i[o][u]=h(n[o].lastCount+l.length,l.mode)-h(n[o].lastCount,l.mode),n[o].lastCount+=l.length):(n[o]&&(n[o].lastCount=l.length),i[o][u]=h(l.length,l.mode)+4+r.getCharCountIndicator(l.mode,t))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:n}}(i,n),o=u.find_path(a.map,"start","end"),s=[];for(let e=1;e<o.length-1;e++)s.push(a.table[o[e]].node);return t.fromArray(function(e){return e.reduce(function(e,t){const n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}(s))},t.rawSplit=function(e){return t.fromArray(f(e,l.isKanjiModeEnabled()))}},6886(e,t){let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return void 0!==n},t.toSJIS=function(e){return n(e)}},1878(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},1427(e,t,n){const r=n(6886),i=n(7518),a=n(9953),o=n(208),s=n(1878),c=r.getBCHDigit(7973);function l(e,t){return o.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){const r=l(e.mode,t);n+=r+e.getBitsLength()}),n}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!s.isValid(e))throw new Error("Invalid QR Code version");void 0===n&&(n=o.BYTE);const a=8*(r.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t));if(n===o.MIXED)return a;const c=a-l(n,e);switch(n){case o.NUMERIC:return Math.floor(c/10*3);case o.ALPHANUMERIC:return Math.floor(c/11*2);case o.KANJI:return Math.floor(c/13);case o.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){let r;const i=a.from(n,a.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(u(e,r)<=t.getCapacity(r,n,o.MIXED))return r}(e,i);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let i=1;i<=40;i++)if(n<=t.getCapacity(i,r,e))return i}(r.mode,r.getLength(),i)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-c>=0;)t^=7973<<r.getBCHDigit(t)-c;return e<<12|t}},7899(e,t,n){const r=n(2726);t.render=function(e,t,n){let i=n,a=t;void 0!==i||t&&t.getContext||(i=t,t=void 0),t||(a=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=r.getOptions(i);const o=r.getImageWidth(e.modules.size,i),s=a.getContext("2d"),c=s.createImageData(o,o);return r.qrToImageData(c.data,e,i),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(s,a,o),s.putImageData(c,0,0),a},t.renderToDataURL=function(e,n,r){let i=r;void 0!==i||n&&n.getContext||(i=n,n=void 0),i||(i={});const a=t.render(e,n,i),o=i.type||"image/png",s=i.rendererOpts||{};return a.toDataURL(o,s.quality)}},6756(e,t,n){const r=n(2726);function i(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function a(e,t,n){let r=e+t;return void 0!==n&&(r+=" "+n),r}t.render=function(e,t,n){const o=r.getOptions(t),s=e.modules.size,c=e.modules.data,l=s+2*o.margin,u=o.color.light.a?"<path "+i(o.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",p="<path "+i(o.color.dark,"stroke")+' d="'+function(e,t,n){let r="",i=0,o=!1,s=0;for(let c=0;c<e.length;c++){const l=Math.floor(c%t),u=Math.floor(c/t);l||o||(o=!0),e[c]?(s++,c>0&&l>0&&e[c-1]||(r+=o?a("M",l+n,.5+u+n):a("m",i,0),i=0,o=!1),l+1<t&&e[c+1]||(r+=a("h",s),s=0)):i++}return r}(c,s,o.margin)+'"/>',d='viewBox="0 0 '+l+" "+l+'"',f='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+d+' shape-rendering="crispEdges">'+u+p+"</svg>\n";return"function"==typeof n&&n(null,f),f}},2726(e,t){function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const i=n.modules.size,a=n.modules.data,o=t.getScale(i,r),s=Math.floor((i+2*r.margin)*o),c=r.margin*o,l=[r.color.light,r.color.dark];for(let t=0;t<s;t++)for(let n=0;n<s;n++){let u=4*(t*s+n),p=r.color.light;if(t>=c&&n>=c&&t<s-c&&n<s-c){p=l[a[Math.floor((t-c)/o)*i+Math.floor((n-c)/o)]?1:0]}e[u++]=p.r,e[u++]=p.g,e[u++]=p.b,e[u]=p.a}}},1059(e,t,n){"use strict";n.d(t,{A:()=>r});const r={Literal:1,Collection:3,Graph:4,NamedNode:5,BlankNode:6,Variable:7}},8230(e,t,n){"use strict";n.r(t),n.d(t,{BlankNode:()=>c,Collection:()=>h,ConnectedStore:()=>_n,DataFactory:()=>rn,Empty:()=>m,Fetcher:()=>Yt,Formula:()=>q,IndexedFormula:()=>X,Literal:()=>d,LiveStore:()=>En,N3Parser:()=>_e,NamedNode:()=>l.A,Namespace:()=>T,NextId:()=>kn,Node:()=>$,Query:()=>V,RDFParser:()=>It,RDFaProcessor:()=>Pt,SPARQLToQuery:()=>en,Serializer:()=>O,Statement:()=>w,Store:()=>X,UpdateManager:()=>tn,UpdatesSocket:()=>an,UpdatesVia:()=>on,Util:()=>F,Variable:()=>k,blankNode:()=>hn,defaultGraph:()=>mn,fetcher:()=>cn,fromNT:()=>wn,graph:()=>ln,isBlankNode:()=>u.jt,isCollection:()=>u.P3,isGraph:()=>u.RN,isLiteral:()=>u.c$,isNamedNode:()=>u.Y2,isPredicate:()=>u.YC,isQuad:()=>u.aF,isRDFObject:()=>u.GE,isRDFlibObject:()=>u.DJ,isRDFlibPredicate:()=>u.fY,isRDFlibSubject:()=>u.CZ,isStatement:()=>u.SH,isStore:()=>u.ok,isSubject:()=>u.hr,isTerm:()=>u.D0,isVariable:()=>u.DZ,jsonParser:()=>Xt,lit:()=>un,literal:()=>gn,log:()=>A.A,namedNode:()=>dn,parse:()=>Nt,quad:()=>vn,queryToSPARQL:()=>Zt,serialize:()=>j,sparqlUpdateParser:()=>Ft,st:()=>pn,sym:()=>dn,term:()=>xn,termValue:()=>jt.E,triple:()=>bn,uri:()=>x,variable:()=>fn});var r={};n.r(r),n.d(r,{inDefaultGraph:()=>kt,isBlankNode:()=>vt,isDefaultGraph:()=>xt,isLiteral:()=>bt,isNamedNode:()=>gt,isQuad:()=>wt,isVariable:()=>yt,prefix:()=>_t,prefixes:()=>Et});var i=n(4467),a=n(1059),o=n(8936),s=n(9403);class c extends o.A{static getId(e){if(e){if("string"!=typeof e)throw new Error("Bad id argument to new blank node: "+e);if(e.includes("#")){let t=e.split("#");return t[t.length-1]}return e}return"n"+c.nextId++}constructor(e){super(c.getId(e)),(0,i.A)(this,"termType",s.$Q),(0,i.A)(this,"classOrder",a.A.BlankNode),(0,i.A)(this,"isBlank",1),(0,i.A)(this,"isVar",1)}get id(){return this.value}set id(e){this.value=e}compareTerm(e){return this.classOrder<e.classOrder?-1:this.classOrder>e.classOrder?1:this.id<e.id?-1:this.id>e.id?1:0}copy(e){var t=new c;return e.copyTo(this,t),t}toCanonical(){return c.NTAnonymousNodePrefix+this.value}toString(){return c.NTAnonymousNodePrefix+this.id}}(0,i.A)(c,"nextId",0),(0,i.A)(c,"NTAnonymousNodePrefix","_:");var l=n(5108),u=n(2915);const p={boolean:new l.A("http://www.w3.org/2001/XMLSchema#boolean"),dateTime:new l.A("http://www.w3.org/2001/XMLSchema#dateTime"),decimal:new l.A("http://www.w3.org/2001/XMLSchema#decimal"),double:new l.A("http://www.w3.org/2001/XMLSchema#double"),integer:new l.A("http://www.w3.org/2001/XMLSchema#integer"),langString:new l.A("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),string:new l.A("http://www.w3.org/2001/XMLSchema#string")};class d extends o.A{constructor(e,t,n){super(e),(0,i.A)(this,"termType",s.QW),(0,i.A)(this,"classOrder",a.A.Literal),(0,i.A)(this,"datatype",p.string),(0,i.A)(this,"isVar",0),(0,i.A)(this,"language",""),t?(this.language=t,this.datatype=p.langString):this.datatype=n?l.A.fromValue(n):p.string}copy(){return new d(this.value,this.lang,this.datatype)}equals(e){return!!e&&(this.termType===e.termType&&this.value===e.value&&this.language===e.language&&(!this.datatype&&!e.datatype||this.datatype&&this.datatype.equals(e.datatype)))}get lang(){return this.language}set lang(e){this.language=e||""}toNT(){return d.toNT(this)}static toNT(e){if("number"==typeof e.value)return""+e.value;if("string"!=typeof e.value)throw new Error("Value of RDF literal is not string or number: "+e.value);var t=e.value;return t='"'+(t=(t=(t=(t=t.replace(/\\/g,"\\\\")).replace(/\"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r"))+'"',e.language?t+="@"+e.language:e.datatype.equals(p.string)||(t+="^^"+e.datatype.toCanonical()),t}toString(){return""+this.value}static fromBoolean(e){return new d(e?"1":"0",null,p.boolean)}static fromDate(e){if(!(e instanceof Date))throw new TypeError("Invalid argument to Literal.fromDate()");let t=function(e){return(""+(100+e)).slice(1,3)},n=e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"Z";return new d(n,null,p.dateTime)}static fromNumber(e){if("number"!=typeof e)throw new TypeError("Invalid argument to Literal.fromNumber()");let t;const n=e.toString();return t=n.indexOf("e")<0&&Math.abs(e)<=Number.MAX_SAFE_INTEGER?Number.isInteger(e)?p.integer:p.decimal:p.double,new d(n,null,t)}static fromValue(e){if((0,u.c$)(e))return e;switch(typeof e){case"object":if(e instanceof Date)return d.fromDate(e);case"boolean":return d.fromBoolean(e);case"number":return d.fromNumber(e);case"string":return new d(e)}throw new Error("Can't make literal from "+e+" of type "+typeof e)}}function f(e){return null==e||(0,u.D0)(e)?e:Array.isArray(e)?new h(e):d.fromValue(e)}class h extends o.A{constructor(e){super((c.nextId++).toString()),(0,i.A)(this,"termType",s.r0),(0,i.A)(this,"classOrder",a.A.Collection),(0,i.A)(this,"closed",!1),(0,i.A)(this,"compareTerm",c.prototype.compareTerm),(0,i.A)(this,"elements",[]),(0,i.A)(this,"isVar",0),e&&e.length>0&&e.forEach(e=>{this.elements.push(f(e))})}get id(){return this.value}set id(e){this.value=e}append(e){return this.elements.push(e)}close(){return this.closed=!0,this.closed}shift(){return this.elements.shift()}substitute(e){const t=this.elements.map(t=>t.substitute(e));return new h(t)}toNT(){return h.toNT(this)}static toNT(e){return c.NTAnonymousNodePrefix+e.id}toString(){return"("+this.elements.join(" ")+")"}unshift(e){return this.elements.unshift(e)}}(0,i.A)(h,"termType",s.r0);class m extends o.A{constructor(){super(""),(0,i.A)(this,"termType",s.S)}toString(){return"()"}}const g="chrome:theSession";new l.A(g);class v extends o.A{constructor(){super(""),(0,i.A)(this,"value",""),(0,i.A)(this,"termType",s.ic),(0,i.A)(this,"uri",g)}toCanonical(){return this.value}toString(){return"DefaultGraph"}}function b(e){return!!e&&e.termType===s.ic}const y=new v;class w{constructor(e,t,n,r){(0,i.A)(this,"subject",void 0),(0,i.A)(this,"predicate",void 0),(0,i.A)(this,"object",void 0),(0,i.A)(this,"graph",void 0),this.subject=o.A.fromValue(e),this.predicate=o.A.fromValue(t),this.object=o.A.fromValue(n),this.graph=null==r?y:o.A.fromValue(r)}get why(){return this.graph}set why(e){this.graph=e}equals(e){return e.subject.equals(this.subject)&&e.predicate.equals(this.predicate)&&e.object.equals(this.object)&&e.graph.equals(this.graph)}substitute(e){return new w(this.subject.substitute(e),this.predicate.substitute(e),this.object.substitute(e),b(this.graph)?this.graph:this.graph.substitute(e))}toCanonical(){let e=[this.subject.toCanonical(),this.predicate.toCanonical(),this.object.toCanonical()];return this.graph&&this.graph.termType!==s.ic&&e.push(this.graph.toCanonical()),e.join(" ")+" ."}toNT(){return[this.subject.toNT(),this.predicate.toNT(),this.object.toNT()].join(" ")+" ."}toNQ(){return[this.subject.toNT(),this.predicate.toNT(),this.object.toNT(),b(this.graph)?"":this.graph.toNT()].join(" ")+" ."}toString(){return this.toNT()}}var x=n(2727);class k extends o.A{constructor(e=""){super(e),(0,i.A)(this,"termType",s.P2),(0,i.A)(this,"base","varid:"),(0,i.A)(this,"classOrder",a.A.Variable),(0,i.A)(this,"isVar",1),(0,i.A)(this,"uri",void 0),this.base="varid:",this.uri=x.join(e,this.base)}equals(e){return!!e&&(this.termType===e.termType&&this.value===e.value)}hashString(){return this.toString()}substitute(e){var t;return null!=(t=e[this.toNT()])?t:this}toString(){return k.toString(this)}static toString(e){return e.uri.slice(0,e.base.length)===e.base?`?${e.uri.slice(e.base.length)}`:`?${e.uri}`}}let _=function(e){return e.collections="COLLECTIONS",e.defaultGraphType="DEFAULT_GRAPH_TYPE",e.equalsMethod="EQUALS_METHOD",e.id="ID",e.identity="IDENTITY",e.reversibleId="REVERSIBLE_ID",e.variableType="VARIABLE_TYPE",e}({});const E=new v,C={supports:{[_.collections]:!1,[_.defaultGraphType]:!1,[_.equalsMethod]:!0,[_.identity]:!1,[_.id]:!0,[_.reversibleId]:!1,[_.variableType]:!0},blankNode:e=>new c(e),defaultGraph:()=>E,equals(e,t){return e===t||!e||!t||((0,u.aF)(e)||(0,u.aF)(t)?!(!(0,u.aF)(e)||!(0,u.aF)(t))&&(this.equals(e.subject,t.subject)&&this.equals(e.predicate,t.predicate)&&this.equals(e.object,t.object)&&this.equals(e.graph,t.graph)):!(!(0,u.D0)(e)||!(0,u.D0)(t))&&this.id(e)===this.id(t))},id(e){if(!e)return"undefined";if((0,u.aF)(e))return this.quadToNQ(e);switch(e.termType){case s.ic:return"defaultGraph";case s.P2:return k.toString(e);default:const t=this.termToNQ(e);if(t)return t;throw new Error(`Can't id term with type '${e.termType}'`)}},isQuad:e=>e instanceof w,literal(e,t){if("string"!=typeof e&&!t)return d.fromValue(e);const n="string"==typeof e?e:""+e;return"string"==typeof t?-1===t.indexOf(":")?new d(n,t):new d(n,null,this.namedNode(t)):new d(n,null,t)},namedNode:e=>new l.A(e),quad:(e,t,n,r)=>new w(e,t,n,r||E),triple(e,t,n,r){return this.quad(e,t,n,r)},quadToNQ(e){return`${this.termToNQ(e.subject)} ${this.termToNQ(e.predicate)} ${this.termToNQ(e.object)} ${this.termToNQ(e.graph)} .`},termToNQ(e){switch(e.termType){case s.$Q:return"_:"+e.value;case s.ic:return"";case s.S:return"<http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>";case s.QW:return d.toNT(e);case s.bD:case s.Kk:return"<"+e.value+">";case s.r0:return"("+e.elements.map(e=>this.termToNQ(e)).join(" ")+")";default:throw new Error(`Can't serialize nonstandard term type (was '${e.termType}')`)}},toNQ(e){return this.isQuad(e)?this.quadToNQ(e):this.termToNQ(e)},variable:e=>new k(e)},S=C;var A=n(4940);function T(e,t){const n=t||{namedNode:e=>new l.A(e)};return function(t){return n.namedNode(e+(t||""))}}var P=n(5306),R=n(5386),I=n.n(R),F=n(4011);function N(e=S){return{boolean:e.namedNode("http://www.w3.org/2001/XMLSchema#boolean"),dateTime:e.namedNode("http://www.w3.org/2001/XMLSchema#dateTime"),decimal:e.namedNode("http://www.w3.org/2001/XMLSchema#decimal"),double:e.namedNode("http://www.w3.org/2001/XMLSchema#double"),integer:e.namedNode("http://www.w3.org/2001/XMLSchema#integer"),langString:e.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),string:e.namedNode("http://www.w3.org/2001/XMLSchema#string")}}N(S);function O(e){return new L(e)}class L{constructor(e){(0,i.A)(this,"_notQNameChars","\t\r\n !\"#$%&'()*,+/;<=>?@[\\]^`{|}~"),(0,i.A)(this,"_notNameChars",this._notQNameChars+":"),(0,i.A)(this,"validPrefix",new RegExp(/^[a-zA-Z][a-zA-Z0-9]*$/)),(0,i.A)(this,"forbidden1",new RegExp(/[\\"\b\f\r\v\t\n\u0080-\uffff]/gm)),(0,i.A)(this,"forbidden3",new RegExp(/[\\"\b\f\r\v\u0080-\uffff]/gm)),this.flags="",this.base=null,this.prefixes=[],this.namespaces=[];const t=Object.keys(I()());for(const e in t){const n=I()()[t[e]](""),r=t[e];this.prefixes[n]=r,this.namespaces[r]=n}this.suggestPrefix("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#"),this.suggestPrefix("xml","reserved:reservedForFutureUse"),this.namespacesUsed=[],this.keywords=["a"],this.prefixchars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",this.incoming=null,this.formulas=[],this.store=e,this.rdfFactory=e.rdfFactory||S,this.xsd=N(this.rdfFactory)}setBase(e){return this.base=e,this}setFlags(e){return this.flags=e||"",this}toStr(e){var t=e.toNT();return"Graph"===e.termType&&(this.formulas[t]=e),t}fromStr(e){if("{"===e[0]){var t=this.formulas[e];return t}return this.store.fromNT(e)}setNamespaces(e){for(var t in e)this.setPrefix(t,e[t]);return this}setPrefix(e,t){if("default"!==e.slice(0,7)&&"ns"!==e.slice(0,2)&&e&&t){for(let t in this.prefixes)this.prefixes[t]==e&&delete this.prefixes[t];this.prefixes[t]=e,this.namespaces[e]=t}}suggestPrefix(e,t){"default"!==e.slice(0,7)&&"ns"!==e.slice(0,2)&&e&&t&&(e in this.namespaces||t in this.prefixes||(this.prefixes[t]=e,this.namespaces[e]=t))}suggestNamespaces(e){for(var t in e)this.suggestPrefix(t,e[t]);return this}checkIntegrity(){var e,t;for(e in this.namespaces)if(this.prefixes[this.namespaces[e]]!==e)throw new Error("Serializer integity error 1: "+e+", "+this.namespaces[e]+", "+this.prefixes[this.namespaces[e]]+"!");for(t in this.prefixes)if(this.namespaces[this.prefixes[t]]!==t)throw new Error("Serializer integity error 2: "+t+", "+this.prefixs[t]+", "+this.namespaces[this.prefixes[t]]+"!")}makeUpPrefix(e){var t=e;var n=function(t){return!!this.validPrefix.test(t)&&("ns"!==t&&(!(t in this.namespaces)&&(this.prefixes[e]=t,this.namespaces[t]=e,t)))}.bind(this);"#/".indexOf(t[t.length-1])>=0&&(t=t.slice(0,-1));var r=t.lastIndexOf("/");r>=0&&(t=t.slice(r+1));for(var i=0;i<t.length&&this.prefixchars.indexOf(t[i])>=0;)i++;if((t=t.slice(0,i)).length<6&&n(t))return t;if(n(t.slice(0,3)))return t.slice(0,3);if(n(t.slice(0,2)))return t.slice(0,2);if(n(t.slice(0,4)))return t.slice(0,4);if(n(t.slice(0,1)))return t.slice(0,1);if(n(t.slice(0,5)))return t.slice(0,5);this.validPrefix.test(t)||(t="n");for(var a=0;;a++)if(n(t.slice(0,3)+a))return t.slice(0,3)+a}rootSubjects(e){for(var t={},n={},r={},i=0;i<e.length;i++){var a=e[i],o=function(e){t.hasOwnProperty(e)||(t[e]=[]),t[e].push(a.subject)};[a.subject,a.predicate,a.object].map(function(e){"BlankNode"===e.termType?r[e.toNT()]=!0:"Collection"===e.termType&&e.elements.forEach(function(e){o(e)})}),o(e[i].object);var s=n[this.toStr(a.subject)];s||(s=[]),s.push(a),n[this.toStr(a.subject)]=s}var c=[];for(var l in n)if(n.hasOwnProperty(l)){var u=this.fromStr(l);"BlankNode"===u.termType&&t[u]&&1===t[u].length||c.push(u)}this.incoming=t;for(var p={},d=0;d<c.length;d++)p[c[d].toNT()]=!0;return{roots:c,subjects:n,rootsHash:p,incoming:t}}toN3(e){return this.statementsToN3(e.statements)}isValidPNLocal(e){if(0===e.length)return!0;if("."===e[e.length-1])return!1;for(var t=0;t<e.length;t++){var n=e[t];if("."!==n&&this._notNameChars.indexOf(n)>=0)return!1}return!0}explicitURI(e){var t;return this.flags.indexOf("r")<0&&this.base?e=x.refTo(this.base,e):this.flags.indexOf("u")>=0?e=function(e){for(var t,n="",r=0;r<e.length;r++)n+=(t=e.charCodeAt(r))>65535?"\\U"+("00000000"+t.toString(16)).slice(-8):t>126?"\\u"+("0000"+t.toString(16)).slice(-4):e[r];return n}(e):(t=decodeURI(e),e=encodeURI(t)),"<"+e+">"}statementsToNTriples(e){var t=e.slice();t.sort();for(var n="",r="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i=this,a=this.store,o=this.rdfFactory,s=function(e){if("Collection"!==e.termType)return i.atomicTermToN3(e);for(var t=e.elements,c=a.sym(r+"nill"),l=t.length-1;l>=0;l--){var u=o.blankNode();n+=s(u)+" "+s(a.sym(r+"first"))+" "+s(t[l])+".\n",n+=s(u)+" "+s(a.sym(r+"rest"))+" "+s(c)+".\n",c=u}return i.atomicTermToN3(c)},c=0;c<t.length;c++){var l=t[c],u="";u+=s(l.subject)+" ",u+=s(l.predicate)+" ",u+=s(l.object)+" ",this.flags.indexOf("q")>=0&&(u+=s(l.why)+" "),n+=u+=".\n"}return n}statementsToN3(e){var t=this.store,n={"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":"aaa:00"};e.sort(function(e,r){return F.heavyCompareSPO(e,r,t,n)}),this.base&&!this.defaultNamespace&&(this.defaultNamespace=this.base+"#");var r={};this.flags.indexOf("s")<0&&(r["http://www.w3.org/2002/07/owl#sameAs"]="="),this.flags.indexOf("t")<0&&(r["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"]="a"),this.flags.indexOf("i")<0&&(r["http://www.w3.org/2000/10/swap/log#implies"]="=>");var i=function(e){for(var t="",n=0;n<e;n++)t+=" ";return t},a=function(e){for(var t="",n=0;n<e.length;n++){var r=e[n],i="string"==typeof r?r:a(r);if(0!==n){var o=t.slice(-1)||" ";","===i||";"===i||("."!==i||"0123456789.:".includes(o))&&(t+=" ")}t+=i}return t},o=function(e,t){var n="",r=1e5;void 0===t&&(t=-1);for(var s=0;s<e.length;s++){var c=e[s];if("string"!=typeof c){var l=o(c,t+1);if(l.length<10*(80-4*t)&&l.indexOf('"""')<0){var u=a(c);u.length<80-4*t&&(c=u,l="")}l&&(r=1e4),n+=l}if("string"==typeof c){if(1===c.length&&"\n"===n.slice(-1)&&",.;".indexOf(c)>=0){n=n.slice(0,-1),"."==c&&"0123456789.:".includes(n.charAt(n.length-1))&&(n+=" ",r+=1),n+=c+"\n",r+=1;continue}if(r<4*t+4||r+c.length+1<80&&";.".indexOf(n[n.length-2])<0)n=n.slice(0,-1)+" "+c+"\n",r+=c.length+1;else{let e=i(4*t)+c;n+=e+"\n",r=e.length,t<0&&(n+="\n",r=1e5)}}}return n};var s=function(e){for(var t=this.rootSubjects(e),n=t.roots,r=[],i=0;i<n.length;i++){var a=n[i];r.push(c(a,t))}return r}.bind(this);function c(e,t){return"BlankNode"!==e.termType||t.incoming[e]?[p(e,t)].concat([l(e,t)]).concat(["."]):u(e,t,!0).concat(["."])}var l=function(e,t){var n=[],i=null,a=t.subjects[this.toStr(e)]||[];if(void 0===a)throw new Error("Cant find statements for "+e);for(var o=[],s=0;s<a.length;s++){var c=a[s];c.predicate.uri===i?o.push(","):(i&&(n=n.concat([o]).concat([";"]),o=[]),n.push(r[c.predicate.uri]?r[c.predicate.uri]:p(c.predicate,t))),i=c.predicate.uri,o.push(u(c.object,t))}return n=n.concat([o])}.bind(this);var u=function(e,t,n){return"BlankNode"!==e.termType||!n&&void 0!==t.rootsHash[e.toNT()]?p(e,t):t.subjects[this.toStr(e)]?["[",l(e,t),"]"]:"[]"}.bind(this);L.prototype.termToN3=p;var p=function(e,t){var n,r;switch(e.termType){case"Graph":return(r=(r=["{"]).concat(s(e.statements))).concat(["}"]);case"Collection":for(r=["("],n=0;n<e.elements.length;n++)r.push([u(e.elements[n],t)]);return r.push(")"),r;default:return this.atomicTermToN3(e)}}.bind(this);var d=function(){var e="";for(var t in this.flags.indexOf("d")<0&&this.defaultNamespace&&(e+="@prefix : "+this.explicitURI(this.defaultNamespace)+".\n"),this.prefixes)this.prefixes.hasOwnProperty(t)&&this.namespacesUsed[t]&&(e+="@prefix "+this.prefixes[t]+": "+this.explicitURI(t)+".\n");return e+"\n"}.bind(this),f=s(e);return d()+o(f)}atomicTermToN3(e,t){switch(e.termType){case"BlankNode":case"Variable":return e.toNT();case"Literal":var n=e.value;if("string"!=typeof n)throw new TypeError("Value of RDF literal node must be a string");if(e.datatype&&this.flags.indexOf("x")<0)switch(e.datatype.uri){case"http://www.w3.org/2001/XMLSchema#integer":return n;case"http://www.w3.org/2001/XMLSchema#decimal":return n.indexOf(".")<0&&(n+=".0"),n;case"http://www.w3.org/2001/XMLSchema#double":{const e=n.toLowerCase().indexOf("e")>0;return n.indexOf(".")<0&&!e&&(n+=".0"),e||(n+="e0"),n}case"http://www.w3.org/2001/XMLSchema#boolean":return"1"===e.value?"true":"false"}var r=this.stringToN3(e.value,this.flags);return e.language?r+="@"+e.language:e.datatype.equals(this.xsd.string)||(r+="^^"+this.atomicTermToN3(e.datatype,t)),r;case"NamedNode":return this.symbolToN3(e);case"DefaultGraph":return"";default:throw new Error("Internal: atomicTermToN3 cannot handle "+e+" of termType: "+e.termType)}}stringToN3(e,t){t||(t="e");var n,r,i,a,o,s="";for(e.length>20&&'"'!==e.slice(-1)&&t.indexOf("n")<0&&(e.indexOf("\n")>0||e.indexOf('"')>0)?(a='"""',o=this.forbidden3):(a='"',o=this.forbidden1),n=0;n<e.length;){if(o.lastIndex=0,null==o.exec(e.slice(n)))break;r=n+o.lastIndex-1,s+=e.slice(n,r);var c=e[r];'"'===c&&'"""'===a&&'"""'!==e.slice(r,r+3)?s+=c:(i='\b\f\r\t\v\n\\"'.indexOf(c))>=0?s+="\\"+'bfrtvn\\"'[i]:t.indexOf("e")>=0?s+="\\u"+("000"+c.charCodeAt(0).toString(16).toLowerCase()).slice(-4):s+=c,n=r+1}return a+s+e.slice(n)+a}symbolToN3(e){var t=e.uri,n=t.indexOf("#");if(n<0&&this.flags.indexOf("/")<0&&(n=t.lastIndexOf("/")),n>=0&&this.flags.indexOf("p")<0&&(0===t.indexOf("http")||0===t.indexOf("ws")||0===t.indexOf("file"))){var r=t.slice(n+1),i=t.slice(0,n+1),a=t.indexOf("://")+4,o=this.base?this.base.slice(0,Math.max(this.base.lastIndexOf("/"),this.base.lastIndexOf("#"))+1):null,s=o&&i===o,c=this.flags.indexOf("o")>=0&&r.indexOf(".")>=0;if(!s&&!c&&i.length>a&&this.isValidPNLocal(r)){if(this.defaultNamespace&&this.defaultNamespace===i&&this.flags.indexOf("d")<0)return this.flags.indexOf("k")>=0&&this.keyords.indexOf(r)<0?r:":"+r;var l=this.prefixes[i];if(l||(l=this.makeUpPrefix(i)),l)return this.namespacesUsed[i]=!0,l+":"+r}}return this.explicitURI(t)}writeStore(e){var t=this.store,n=t.fetcher,r=n&&n.appNode,i=this.store.index[3];for(var a in i){var o=t.fromNT(a);r&&o.equals(r)||e("\n"+this.atomicTermToN3(o)+" "+this.atomicTermToN3(t.sym("http://www.w3.org/2000/10/swap/log#semantics"))+" { "+this.statementsToN3(t.statementsMatching(void 0,void 0,void 0,o))+" }.\n")}t.statementsMatching(void 0,t.sym("http://www.w3.org/2007/ont/link#requestedURI")).map(function(n){e("\n<"+n.object.value+"> log:metadata {\n");var r=t.statementsMatching(void 0,void 0,void 0,n.subject);e(this.statementsToN3(this.statementsToN3(r))),e("}.\n")});var s=[];r&&s.push(r);var c=[];s.map(function(e){c=c.concat(t.statementsMatching(void 0,void 0,void 0,e))}),e(this.statementsToN3(c))}statementsToXML(e){var t=[];t["http://www.w3.org/1999/02/22-rdf-syntax-ns#"]=!0;var n="http://www.w3.org/1999/02/22-rdf-syntax-ns#_",r=function(e){for(var t="",n=0;n<e;n++)t+=" ";return t},i=function(e){for(var t="",n=0;n<e.length;n++){var r=e[n];t+="string"==typeof r?r:i(r)}return t},a=function(e,t){var n,o="",s=1e5;t||(t=0);for(var c=0;c<e.length;c++){var l=e[c];if("string"!=typeof l){var u=a(l,t+1);u.length<10*(80-4*t)&&u.indexOf('"""')<0&&(n=i(l)).length<80-4*t&&(l=" "+n,u=""),u&&(s=1e4),o+=u}"string"==typeof l&&(s<4*t+4?(o=o.slice(0,-1)+" "+l+"\n",s+=l.length+1):(o+=(n=r(4*t)+l)+"\n",s=n.length))}return o};var o=function(e){this.suggestPrefix("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#");for(var t=this.rootSubjects(e),n=t.roots,r=[],i=0;i<n.length;i++){var a=n[i];r.push(l(a,t))}return r}.bind(this);function s(e){return void 0===e?"@@@undefined@@@@":e.replace(/[&<"]/g,function(e){switch(e[0]){case"&":return"&";case"<":return"<";case'"':return"""}})}var c=function(e){return s(this.base?F.uri.refTo(this.base,e.uri):e.uri)}.bind(this);var l=function(e,t){var r,i,a,o,f=[],h=t.subjects[this.toStr(e)];if(void 0===h)return p(e,t);h.sort(function(e,t){var r=e.predicate.uri,i=t.predicate.uri;if(r.substring(0,44)===n||i.substring(0,44)===n)return r.localeCompare(i);var a=r.substring(44),o=i.substring(44),s=parseInt(a,10),c=parseInt(o,10);return isNaN(s)||isNaN(c)||s!==a||c!==o?r.localeCompare(i):s-c});for(var m=0;m<h.length;m++)if("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"!==(a=h[m]).predicate.uri||r||"NamedNode"!==a.object.termType){if((o=a.predicate).uri.substr(0,44)===n){var g=o.uri.substr(44);g===parseInt(g,10).toString()&&(o=this.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#li"))}switch(i=d(o),a.object.termType){case"BlankNode":f=1===t.incoming[a.object].length?f.concat(["<"+i+' rdf:parseType="Resource">',l(a.object,t),"</"+i+">"]):f.concat(["<"+i+' rdf:nodeID="'+a.object.toNT().slice(2)+'"/>']);break;case"NamedNode":f=f.concat(["<"+i+' rdf:resource="'+c(a.object)+'"/>']);break;case"Literal":f=f.concat(["<"+i+(a.object.language?' xml:lang="'+a.object.language+'"':a.object.datatype.equals(this.xsd.string)?"":' rdf:datatype="'+s(a.object.datatype.uri)+'"')+">"+s(a.object.value)+"</"+i+">"]);break;case"Collection":f=f.concat(["<"+i+' rdf:parseType="Collection">',u(a.object,t),"</"+i+">"]);break;default:throw new Error("Can't serialize object of type "+a.object.termType+" into XML")}}else r=a.object;var v=r?d(r):"rdf:Description",b="";return"BlankNode"===e.termType?t.incoming[e]&&1===t.incoming[e].length||(b=' rdf:nodeID="'+e.toNT().slice(2)+'"'):b=' rdf:about="'+c(e)+'"',["<"+v+b+">"].concat([f]).concat(["</"+v+">"])}.bind(this);function u(e,t){for(var n=[],r=0;r<e.elements.length;r++)n.push(l(e.elements[r],t));return n}var p=function(e,t){var n=[],r=t.subjects[this.toStr(e)];if(!r)return n;r.sort();for(var i=0;i<r.length;i++){var a=r[i];switch(a.object.termType){case"BlankNode":n=t.rootsHash[a.object.toNT()]?n.concat(["<"+d(a.predicate)+' rdf:nodeID="'+a.object.toNT().slice(2)+'">',"</"+d(a.predicate)+">"]):n.concat(["<"+d(a.predicate)+' rdf:parseType="Resource">',p(a.object,t),"</"+d(a.predicate)+">"]);break;case"NamedNode":n=n.concat(["<"+d(a.predicate)+' rdf:resource="'+c(a.object)+'"/>']);break;case"Literal":n=n.concat(["<"+d(a.predicate)+(a.object.language?' xml:lang="'+a.object.language+'"':a.object.datatype.equals(this.xsd.string)?"":' rdf:datatype="'+s(a.object.datatype.value)+'"')+">"+s(a.object.value)+"</"+d(a.predicate)+">"]);break;case"Collection":n=n.concat(["<"+d(a.predicate)+' rdf:parseType="Collection">',u(a.object,t),"</"+d(a.predicate)+">"]);break;default:throw new Error("Can't serialize object of type "+a.object.termType+" into XML")}}return n}.bind(this);var d=function(e){var n=e.uri,r=n.indexOf("#");if(r<0&&this.flags.indexOf("/")<0&&(r=n.lastIndexOf("/")),r<0)throw new Error("Cannot make qname out of <"+n+">");for(var i=r+1;i<n.length;i++)if(this._notNameChars.indexOf(n[i])>=0)throw new Error('Invalid character "'+n[i]+'" cannot be in XML qname for URI: '+n);var a=n.slice(r+1),o=n.slice(0,r+1);if(this.defaultNamespace&&this.defaultNamespace===o&&this.flags.indexOf("d")<0)return a;var s=this.prefixes[o];return s||(s=this.makeUpPrefix(o)),t[o]=!0,s+":"+a}.bind(this),f=o(e),h="<rdf:RDF";for(var m in this.defaultNamespace&&(h+=' xmlns="'+s(this.defaultNamespace)+'"'),t)if(t.hasOwnProperty(m)){var g=this.base&&this.flags.includes("z")?F.uri.refTo(this.base,m):m;h+="\n xmlns:"+this.prefixes[m]+'="'+s(g)+'"'}return a([h+=">",f,"</rdf:RDF>"],-1)}statementsToJsonld(e){const t=this.statementsToN3(e),n=P.parse(t);return JSON.stringify(n,null,2)}}function j(e,t,n,r,i,a){n=n||e?.value;const o=a||{};r=r||s.sT;try{var c=O(t);o.flags&&c.setFlags(o.flags);var l=t.statementsMatching(void 0,void 0,void 0,e);switch("namespaces"in t&&c.suggestNamespaces(t.namespaces),o.namespaces&&c.setNamespaces(o.namespaces),c.setBase(n),r){case s.JG:return u(null,c.statementsToXML(l));case s.ny:case s.MG:return u(null,c.statementsToN3(l));case s.sT:case s.hu:return c.setFlags("si"+(o.flags?" "+o.flags:"")),u(null,c.statementsToN3(l));case s.bM:return c.setFlags("deinprstux"),u(null,c.statementsToNTriples(l));case s.i2:return c.setFlags("si dr"+(o.flags?" "+o.flags:"")),u(null,c.statementsToJsonld(l));case s._0:case s.BR:return c.setFlags("deinprstux q"),u(null,c.statementsToNTriples(l));default:throw new Error("Serialize: Content-type "+r+" not supported for data write.")}}catch(e){if(i)return i(e,void 0);throw e}function u(e,t){return i?void i(e,t):t}}const M=["blankNode","defaultGraph","literal","namedNode","quad","variable","supports"],D="http://www.w3.org/1999/02/22-rdf-syntax-ns#first",U="http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",B="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil";function z(e,t,n){const r=[];return n.reduce((t,n,i,a)=>{let o;return r.push(e.quad(t,e.namedNode(D),a[i])),i<a.length-1?(o=e.blankNode(),r.push(e.quad(t,e.namedNode(U),o))):r.push(e.quad(t,e.namedNode(U),e.namedNode(B))),o},t),r}function H(e,t,n=0){var r=e.length;for(n<0&&(n=r+n);n<r;n++)if(e[n]===t)return n;return-1}class q extends o.A{constructor(e=[],t=[],n=[],r=[],o={}){super(""),this.statements=e,this.constraints=t,this.initBindings=n,this.optional=r,(0,i.A)(this,"termType",s.bD),(0,i.A)(this,"classOrder",a.A.Graph),(0,i.A)(this,"fetcher",void 0),(0,i.A)(this,"isVar",0),(0,i.A)(this,"ns",T),(0,i.A)(this,"rdfFactory",void 0),this.rdfFactory=o&&o.rdfFactory||S;for(const e of M)this[e]=(...t)=>this.rdfFactory[e](...t)}add(e,t,n,r){return 1===arguments.length&&e.forEach(e=>this.add(e.subject,e.predicate,e.object,e.graph)),this.statements.push(this.rdfFactory.quad(e,t,n,r))}addStatement(e){return this.add(e)}bnode(e){return this.rdfFactory.blankNode(e)}addAll(e){e.forEach(e=>{this.add(e.subject,e.predicate,e.object,e.graph)})}any(e,t,n,r){const i=this.anyStatementMatching(e,t,n,r);return null==i?null:null==e?i.subject:null==t?i.predicate:null==n?i.object:null}anyValue(e,t,n,r){const i=this.any(e,t,n,r);return i?i.value:void 0}anyJS(e,t,n,r){const i=this.any(e,t,n,r);return i?o.A.toJS(i):void 0}anyStatementMatching(e,t,n,r){let i=this.statementsMatching(e,t,n,r,!0);if(i&&0!==i.length)return i[0]}id(e){return this.rdfFactory.id(e)}statementsMatching(e,t,n,r,i){const a=this.statements.filter(i=>(!e||e.equals(i.subject))&&(!t||t.equals(i.predicate))&&(!n||n.equals(i.object))&&(!r||r.equals(i.graph)));return i?0===a.length?[]:[a[0]]:a}bottomTypeURIs(e){let t,n,r,i,a,o,s,c;t=[];for(let l in e)if(e.hasOwnProperty(l)){for(c=e[l],s=this.each(void 0,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"),this.rdfFactory.namedNode(l)),n=!0,i=0,a=s.length;i<a;i++)if(r=s[i],o=r.uri,o in e){n=!1;break}n&&(t[l]=c)}return t}collection(){return new h}each(e,t,n,r){const i=[];let a=this.statementsMatching(e,t,n,r,!1);if(null==e)for(let e=0,t=a.length;e<t;e++)i.push(a[e].subject);else if(null==t)for(let e=0,t=a.length;e<t;e++)i.push(a[e].predicate);else if(null==n)for(let e=0,t=a.length;e<t;e++)i.push(a[e].object);else if(null==r)for(let e=0,t=a.length;e<t;e++)i.push(new l.A(a[e].graph.value));return i}equals(e){return!!e&&this.hashString()===e.hashString()}findMembersNT(e){let t,n,r,i,a,o,s,c,l,u,p,d,f,h;d={},d[e.toNT()]=!0,i={},o=this.transitiveClosure(d,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"),!0);for(let e in o)if(o.hasOwnProperty(e)){s=this.statementsMatching(void 0,this.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),this.fromNT(e));for(let e=0,t=s.length;e<t;e++)f=s[e],i[f.subject.toNT()]=f;c=this.each(void 0,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#domain"),this.fromNT(e));for(let e=0,n=c.length;e<n;e++)for(a=c[e],l=this.statementsMatching(void 0,a),r=0,t=l.length;r<t;r++)f=l[r],i[f.subject.toNT()]=f;u=this.each(void 0,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#range"),this.fromNT(e));for(let e=0,t=u.length;e<t;e++)for(a=u[e],p=this.statementsMatching(void 0,a),h=0,n=p.length;h<n;h++)f=p[h],i[f.object.toNT()]=f}return i}findMemberURIs(e){return this.NTtoURI(this.findMembersNT(e))}findSubClassesNT(e){let t={};return t[e.toNT()]=!0,this.transitiveClosure(t,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"),!0)}findSuperClassesNT(e){let t={};return t[e.toNT()]=!0,this.transitiveClosure(t,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"),!1)}findTypesNT(e){let t,n,r,i,a,o,s,c,l;r="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",l=[],i=this.statementsMatching(e,void 0,void 0);for(let e=0,t=i.length;e<t;e++)if(c=i[e],"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"===c.predicate.uri)l[c.object.toNT()]=c;else{a=this.each(c.predicate,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#domain"));for(let e=0,t=a.length;e<t;e++)n=a[e],l[n.toNT()]=c}o=this.statementsMatching(void 0,void 0,e);for(let e=0,n=o.length;e<n;e++){c=o[e],s=this.each(c.predicate,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#range"));for(let e=0,n=s.length;e<n;e++)t=s[e],l[t.toNT()]=c}return this.transitiveClosure(l,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"),!1)}findTypeURIs(e){return this.NTtoURI(this.findTypesNT(e))}connectedStatements(e,t,n){n=n||[];let r=[e],i={},a={},o=[],s=this,c=function(e){let c=function(e){"BlankNode"!==e.termType||i[e.value]||(i[e.value]=!0,r.push(e))},l=s.statementsMatching(null,null,e,t).concat(s.statementsMatching(e,null,null,t));l=l.filter(function(e){if(n[e.predicate.value])return!1;let t=e.toNT();return!a[t]&&(a[t]=!0,!0)}),l.forEach(function(e){c(e.subject),c(e.object)}),o=o.concat(l)};for(;r.length;)c(r.shift());return o}formula(e){return new q}fromNT(e){let t,n,r;switch(e[0]){case"<":return this.sym(e.slice(1,-1));case'"':if(r=void 0,t=void 0,n=e.lastIndexOf('"'),n<e.length-1)if("@"===e[n+1])r=e.slice(n+2);else{if("^^"!==e.slice(n+1,n+3))throw new Error("Can't convert string from NT: "+e);t=this.fromNT(e.slice(n+3))}return e=(e=(e=(e=e.slice(1,n)).replace(/\\"/g,'"')).replace(/\\n/g,"\n")).replace(/\\\\/g,"\\"),this.rdfFactory.literal(e,r||t);case"_":return this.rdfFactory.blankNode(e.slice(2));case"?":return new k(e.slice(1))}throw new Error("Can't convert from NT: "+e)}holds(e,t,n,r){let i;if(1===arguments.length){if(!e)return!0;if(e instanceof Array){for(i=0;i<e.length;i++)if(!this.holds(e[i]))return!1;return!0}if((0,u.SH)(e))return this.holds(e.subject,e.predicate,e.object,e.graph);if(e.statements)return this.holds(e.statements)}return null!=this.anyStatementMatching(e,t,n,r)}holdsStatement(e){return this.holds(e.subject,e.predicate,e.object,e.graph)}list(e,t){if(t.rdfFactory.supports.COLLECTIONS){const n=t.rdfFactory.collection();return e.forEach(function(e){n.append(e)}),n}{const n=t.rdfFactory.blankNode(),r=z(t.rdfFactory,n,e);return t.addAll(r),n}}NTtoURI(e){let t,n,r={};for(t in e)e.hasOwnProperty(t)&&(n=e[t],"<"===t[0]&&(r[t.slice(1,-1)]=n));return r}serialize(e,t,n,r){return j(n,this,e,t,void 0,r)}substitute(e){let t=this.statements.map(function(t){return t.substitute(e)});const n=new q;return n.addAll(t),n}sym(e,t){if(t)throw new Error("This feature (kb.sym with 2 args) is removed. Do not assume prefix mappings.");return this.rdfFactory.namedNode(e)}the(e,t,n,r){let i=this.any(e,t,n,r);return null==i&&A.A.error("No value found for the() {"+e+" "+t+" "+n+"}."),i}transitiveClosure(e,t,n){let r,i,a,o,s,c,l={};Object.assign(l,e);let u={};for(;;){if(c=function(){for(let e in l)if(l.hasOwnProperty(e))return e}(),null==c)return u;for(s=n?this.each(void 0,t,this.fromNT(c)):this.each(this.fromNT(c),t),i=0,a=s.length;i<a;i++)r=s[i],o=r.toNT(),o in u||o in l||(l[o]=l[c]);u[c]=l[c],delete l[c]}}topTypeURIs(e){let t,n,r,i,a,o,s,c;for(r in s=[],e)if(e.hasOwnProperty(r)){for(c=e[r],a=0,o=this.each(this.rdfFactory.namedNode(r),this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf")),t=0,i=o.length;t<i;t++)if(n=o[t],"http://www.w3.org/2000/01/rdf-schema#Resource"!==n.uri){a++;break}a||(s[r]=c)}return s["http://www.w3.org/2000/01/rdf-schema#Resource"]&&delete s["http://www.w3.org/2000/01/rdf-schema#Resource"],s["http://www.w3.org/2002/07/owl#Thing"]&&delete s["http://www.w3.org/2002/07/owl#Thing"],s}toString(){return"{"+this.statements.join("\n")+"}"}variable(e){return new k(e)}whether(e,t,n,r){return this.statementsMatching(e,t,n,r,!1).length}}o.A.fromValue=f;const $=o.A,W={xsd:T("http://www.w3.org/2001/XMLSchema#")};o.A.toJS=function(e){return(0,u.P3)(e)?e.elements.map(o.A.toJS):(0,u.c$)(e)?e.datatype.equals(W.xsd("boolean"))?"1"===e.value||"true"===e.value:e.datatype.equals(W.xsd("dateTime"))||e.datatype.equals(W.xsd("date"))?new Date(e.value):e.datatype.equals(W.xsd("integer"))||e.datatype.equals(W.xsd("float"))||e.datatype.equals(W.xsd("decimal"))?Number(e.value):e.value:e};class V{constructor(e,t){this.pat=new X,this.vars=[],this.name=e,this.id=t}}function G(e,t,n,r){function i(e){var t,n="";for(t in e)e.hasOwnProperty(t)&&(n+=" "+t+" -> "+e[t]);return n}function a(e){var t,n="Bindings: ",r=e.length;for(t=0;t<r;t++)n+=i(e[t][0])+";\n\t";return n}function o(e,t,n,r){var i;if(e.length!==t.length)return[];if(!e.length)return[[[],null]];var a=function(e,t,n,r){var i=n[e];if(void 0===i){if(e.isVar){var a=[];return a[e]=t,[[a,null]]}i=e}if(!i.complexType)return r.redirections[i]&&(i=r.redirections[i]),r.redirections[t]&&(t=r.redirections[t]),i.equals(t)||i.uri&&i.uri===g?[[[],null]]:[];if(e instanceof Array)return t instanceof Array?o(e,t,n):[];throw new Error("query.js: oops - code not written yet")}(e[0],t[0],n,r);if(0===a.length)return a;var s,c,l,u,p,d,f,h=[],m=a.length;for(s=0;s<m;s++){for(p in f=[],c=a[s][0])c.hasOwnProperty(p)&&(f[p]=c[p]);for(p in n)n.hasOwnProperty(p)&&(f[p]=n[p]);for(u=(i=o(e.slice(1),t.slice(1),f,r)).length,l=0;l<u;l++){for(p in d=i[l][0],c)c.hasOwnProperty(p)&&(d[p]=c[p]);h.push([d,null])}}return h}function s(e,t){var n=t[e];return void 0===n?e:n}function c(e,t){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return r}function l(e,t){return this.trunkBindings=t,this.originalCallback=e,this.branches=[],this}function u(e,t){return this.count=0,this.success=!1,this.done=!1,this.callback=e,this.onDone=t,this}l.prototype.checkAllDone=function(){var e;for(e=0;e<this.branches.length;e++)if(!this.branches[e].done)return;A.A.debug("OPTIONAL BIDNINGS ALL DONE:"),this.doCallBacks(this.branches.length-1,this.trunkBindings)},l.prototype.doCallBacks=function(e,t){var n;if(e<0)return this.originalCallback(t);for(n=0;n<this.branches[e].results.length;n++)this.doCallBacks(e-1,c(t,this.branches[e].results[n]))},u.prototype.reportMatch=function(e){this.callback(e),this.success=!0},u.prototype.reportDone=function(){this.done=!0,A.A.info("Mandatory query branch finished.***"),void 0!==this.onDone&&this.onDone()};var p=function(e){return this.count=0,this.done=!1,this.results=[],this.junction=e,e.branches.push(this),this};function d(e,t,n){var r,i,a,o;for(t.nvars=0,t.index=null,r=[t.subject,t.predicate,t.object,t.why],o=[e.subjectIndex,e.predicateIndex,e.objectIndex,e.whyIndex],a=0;a<4;a++){let c=r[a];if(c.uri&&c.uri===g);else if(c.isVar&&void 0===n[c])t.nvars++;else{if(c=s(r[a],n),e.redirections[e.id(c)]&&(c=e.redirections[e.id(c)]),!(i=o[a][e.id(c)]))return t.index=[],!1;(null===t.index||t.index.length>i.length)&&(t.index=i)}}return null===t.index&&(t.index=e.statements),!0}function f(e,t){return e.nvars!==t.nvars?e.nvars-t.nvars:e.index.length-t.index.length}p.prototype.reportMatch=function(e){this.results.push(e)},p.prototype.reportDone=function(){A.A.debug("Optional branch finished - results.length = "+this.results.length),0===this.results.length&&(this.results.push({}),A.A.debug("Optional branch FAILED - that's OK.")),this.done=!0,this.junction.checkAllDone()};var h=function(e,n,r,a,o,s,c){A.A.debug("Match begins, Branch count now: "+c.count+" for "+c.pattern_debug);var u,d,f=n.statements;if(0===f.length){if(A.A.debug("FOUND MATCH WITH BINDINGS:"+i(r)),0===n.optional.length)c.reportMatch(r);else{A.A.debug("OPTIONAL: "+n.optional);var m,g=new l(t,r),b=[];for(m=0;m<n.optional.length;m++)b[m]=new p(g),b[m].pattern_debug=n.optional[m];for(m=0;m<n.optional.length;m++)b[m].count=b[m].count+1,h(e,n.optional[m],r,"",o,t,b[m])}return c.count--,void A.A.debug("Match ends -- success , Branch count now: "+c.count+" for "+c.pattern_debug)}var y=f.length;if(o){0;var w=function(t,i){var l=t.uri.split("#")[0];o.nowOrWhenFetched(l,void 0,function(t,i,l){h(e,n,r,a,o,s,c)})};for(d=0;d<y;d++){if(u=f[d],void 0!==r[u.subject]&&r[u.subject].uri&&o&&"unrequested"===o.getState((0,x.docpart)(r[u.subject].uri)))return void w(r[u.subject]);if(void 0!==r[u.object]&&r[u.object].uri&&o&&"unrequested"===o.getState((0,x.docpart)(r[u.object].uri)))return void w(r[u.object])}}v(e,n,r,a,o,s,c)},m=function(e,t){var n,r,i=!0;for(n in e)e.hasOwnProperty(n)&&t[n]&&(r=t[n].test)&&!r(e[n])&&(i=!1);return i},v=function(e,t,n,r,s,c,l){var u,p,g,v,b,y,w,x=t.statements,k=x.length;for(u=0;u<k;u++)d(e,w=x[u],n);x.sort(f),w=x[0];var _,E=e.formula();E.optional=t.optional,E.constraints=t.constraints,E.statements=x.slice(1),A.A.debug(r+"match2 searching "+w.index.length+" for "+w+"; bindings so far="+i(n));var C,S,T=w.index.length,P=0;for(_=0;_<T;_++)for(S=w.index[_],C=o([w.subject,w.predicate,w.object,w.why],[S.subject,S.predicate,S.object,S.why],n,e),A.A.info(r+" From first: "+C.length+": "+a(C)),g=C.length,p=0;p<g;p++)if(b=[],y=C[p][0],m(y,t.constraints)){for(v in y)y.hasOwnProperty(v)&&(b[v]=y[v]);for(v in n)n.hasOwnProperty(v)&&(b[v]=n[v]);l.count++,P++,h(e,E,b,r+" ",s,c,l)}else A.A.debug("Branch count CS: "+l.count);l.count--,0===P&&A.A.debug("Match2 fails completely on "+w),A.A.debug("Match2 ends, Branch count: "+l.count+" for "+l.pattern_debug),0===l.count&&(A.A.debug("Branch finished."),l.reportDone())},b=this;A.A.debug("Query on "+this.statements.length);var y=new u(t,r);y.count++,e.sync?h(b,e.pat,e.pat.initBindings,"",n,t,y):setTimeout(function(){h(b,e.pat,e.pat.initBindings,"",n,t,y)},0)}const K="http://www.w3.org/2002/07/owl#";function J(e,t,n,r){var i=e.any(t,n,void 0);return!!i&&(e.equate(i,r),!0)}function Q(e,t,n,r){var i=e.any(void 0,n,r);return!!i&&(e.equate(i,t),!0)}function Y(e,t,n,r,i){e.typeCallback&&e.typeCallback(e,r,i);var a=e.classActions[e.id(r)],o=!1;if(a)for(var s=0;s<a.length;s++)o=o||a[s](e,t,n,r,i);return o}class X extends q{constructor(e,t={}){super(void 0,void 0,void 0,void 0,t),(0,i.A)(this,"updater",void 0),(0,i.A)(this,"namespaces",void 0),(0,i.A)(this,"classActions",void 0),(0,i.A)(this,"propertyActions",void 0),(0,i.A)(this,"redirections",void 0),(0,i.A)(this,"aliases",void 0),(0,i.A)(this,"HTTPRedirects",void 0),(0,i.A)(this,"subjectIndex",void 0),(0,i.A)(this,"predicateIndex",void 0),(0,i.A)(this,"objectIndex",void 0),(0,i.A)(this,"whyIndex",void 0),(0,i.A)(this,"index",void 0),(0,i.A)(this,"features",void 0),(0,i.A)(this,"_universalVariables",void 0),(0,i.A)(this,"_existentialVariables",void 0),(0,i.A)(this,"rdfArrayRemove",void 0),(0,i.A)(this,"dataCallbacks",[]),(0,i.A)(this,"dataRemovalCallbacks",[]),this.propertyActions={},this.classActions={},this.redirections=[],this.aliases=[],this.HTTPRedirects=[],this.subjectIndex=[],this.predicateIndex=[],this.objectIndex=[],this.whyIndex=[],this.index=[this.subjectIndex,this.predicateIndex,this.objectIndex,this.whyIndex],this.namespaces={},this.features=e||[],this.rdfArrayRemove=t.rdfArrayRemove||F.RDFArrayRemove,t.dataCallback&&(this.dataCallbacks=[t.dataCallback]),t.dataRemovalCallback&&(this.dataRemovalCallbacks=[t.dataRemovalCallback]),this.initPropertyActions(this.features)}static get defaultGraphURI(){return g}substitute(e){var t=this.statements.map(function(t){return t.substitute(e)}),n=new X;return n.add(t),n}addDataCallback(e){this.dataCallbacks.push(e)}addDataRemovalCallback(e){this.dataRemovalCallbacks.push(e)}applyPatch(e,t,n){var r,i=this,a=null;function o(o){if(e.delete){r=e.delete,a&&(r=r.substitute(a)),r=r.statements;var s=[],c=r.map(function(e){var n=i.statementsMatching(e.subject,e.predicate,e.object,t);return 0===n.length?(s.push(e),null):n[0]});if(s.length)return n("Could not find to delete: "+s.join("\n or "));c.map(function(e){i.remove(e)})}e.insert&&(r=e.insert,a&&(r=r.substitute(a)),(r=r.statements).map(function(e){e.graph=t,i.add(e.subject,e.predicate,e.object,e.graph)})),o()}if(e.where){var s=new V("patch");s.pat=e.where,s.pat.statements.map(function(e){e.graph=dn(t.value)}),s.sync=!0;var c=[];i.query(s,function(e){c.push(e)},i.fetcher,function(){return 0===c.length?n("No match found to be patched:"+e.where):c.length>1?n("Patch ambiguous. No patch done."):(a=c[0],void o(n))})}else o(n)}declareExistential(e){return this._existentialVariables||(this._existentialVariables=[]),this._existentialVariables.push(e),e}initPropertyActions(e){this.propertyActions[this.rdfFactory.id(this.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))]=[Y],H(e,"sameAs")>=0&&(this.propertyActions[this.rdfFactory.id(this.rdfFactory.namedNode(`${K}sameAs`))]=[function(e,t,n,r,i){return e.equate(t,r),!0}]),H(e,"InverseFunctionalProperty")>=0&&(this.classActions[this.rdfFactory.id(this.rdfFactory.namedNode(`${K}InverseFunctionalProperty`))]=[function(e,t,n,r,i){return e.newPropertyAction(t,Q)}]),H(e,"FunctionalProperty")>=0&&(this.classActions[this.rdfFactory.id(this.rdfFactory.namedNode(`${K}FunctionalProperty`))]=[function(e,t,n,r,i){return e.newPropertyAction(t,J)}])}addStatement(e){return this.add(e.subject,e.predicate,e.object,e.graph),this.statements.length}add(e,t,n,r){var i,a,o;if(1===arguments.length){if(e instanceof Array)for(i=0;i<e.length;i++)this.add(e[i]);else(0,u.aF)(e)?this.add(e.subject,e.predicate,e.object,e.graph):(0,u.ok)(e)&&this.add(e.statements);return this}r||(r=this.fetcher?this.fetcher.appNode:this.rdfFactory.defaultGraph()),"string"==typeof e&&(e=this.rdfFactory.namedNode(e)),t=$.fromValue(t);const s=$.fromValue(n);if(r=$.fromValue(r),!(0,u.CZ)(e))throw new Error("Subject is not a subject type");if(!(0,u.fY)(t))throw new Error(`Predicate ${t} is not a predicate type`);if(!(0,u.DJ)(s))throw new Error(`Object ${s} is not an object type`);if(!(0,u.RN)(r))throw new Error("Why is not a graph type");this.predicateCallback&&this.predicateCallback(this,t,r);var c=this.id(this.canon(t)),l=!1;if(a=this.propertyActions[c])for(i=0;i<a.length;i++)l=l||a[i](this,e,t,s,r);if(this.holds(e,t,s,r))return null;var p=[this.id(this.canon(e)),c,this.id(this.canon(s)),this.id(this.canon(r))];for(o=this.rdfFactory.quad(e,t,s,r),i=0;i<4;i++){var d=this.index[i],f=p[i];d[f]||(d[f]=[]),d[f].push(o)}this.statements.push(o);for(const e of this.dataCallbacks)e(o);return o}canon(e){if(!e)return e;const t=this.redirections[this.id(e)];if(t)return t;switch(e.termType){case s.$Q:return new c(e.value);case s.r0:return e;case s.ic:return new v;case s.S:case s.bD:return e;case s.QW:return new d(e.value,e.language,e.datatype);case s.Kk:return new l.A(e.value);case s.P2:return new k(e.value);default:throw new Error(`Term Type not recognized for canonization: ${e.termType}`)}}check(){this.checkStatementList(this.statements);for(var e=0;e<4;e++){var t=this.index[e];for(var n in t)t.hasOwnProperty(n)&&this.checkStatementList(t[n],e)}}checkStatementList(e,t){void 0===t&&(t=0);for(var n,r=" found in "+["subject","predicate","object","why"][t]+" index.",i=0;i<e.length;i++){for(var a=[(n=e[i]).subject,n.predicate,n.object,n.graph],o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].subject.equals(t.subject)&&e[n].predicate.equals(t.predicate)&&e[n].object.equals(t.object)&&e[n].why.equals(t.graph))return!0},s=0;s<4;s++){var c=this.canon(a[s]),l=this.id(c);this.index[s][l]&&o(this.index[s][l],n)}if(!o(this.statements,n))throw new Error("Statement list does not statement "+n+"@"+n.graph+r)}}close(){return this}compareTerms(e,t){return Object.prototype.hasOwnProperty.call(e,"compareTerm")?e.compareTerm(t):a.A[e.termType]<a.A[t.termType]?-1:a.A[e.termType]>a.A[t.termType]?1:e.value<t.value?-1:e.value>t.value?1:0}copyTo(e,t,n){n||(n=[]);var r=this.statementsMatching(e);-1!==H(n,"two-direction")&&r.concat(this.statementsMatching(void 0,void 0,e));for(var i=0;i<r.length;i++){var a=r[i];switch(a.object.termType){case"NamedNode":this.add(t,a.predicate,a.object);break;case"Literal":case"BlankNode":case"Collection":this.add(t,a.predicate,a.object.copy(this))}-1!==H(n,"delete")&&this.remove(a)}}equate(e,t){const n=this.canon(e),r=this.canon(t);var i=this.compareTerms(n,r);return!i||(i<0?this.replaceWith(r,n):this.replaceWith(n,r))}formula(e){return new X(e)}get length(){return this.statements.length}match(e,t,n,r){return this.statementsMatching($.fromValue(e),$.fromValue(t),$.fromValue(n),$.fromValue(r))}mentionsURI(e){var t="<"+e+">";return!!this.subjectIndex[t]||!!this.objectIndex[t]||!!this.predicateIndex[t]}newExistential(e){if(!e)return this.bnode();var t=this.sym(e);return this.declareExistential(t)}newPropertyAction(e,t){var n=this.id(e);this.propertyActions[n]||(this.propertyActions[n]=[]),this.propertyActions[n].push(t);for(var r=this.statementsMatching(void 0,e,void 0),i=!1,a=0;a<r.length;a++)i=i||t(this,r[a].subject,e,r[a].object);return i}newUniversal(e){var t=this.sym(e);return this._universalVariables||(this._universalVariables=[]),this._universalVariables.push(t),t}variable(e){return new k(e)}nextSymbol(e){for(var t=0;;t++){var n=e.value+"#n"+t;if(!this.mentionsURI(n))return this.sym(n)}}query(e,t,n,r){return G.call(this,e,t,n,r)}querySync(e){var t=[];var n=!1;if(e.sync=!0,G.call(this,e,function(e){t.push(e)},null,function(){n=!0}),!n)throw new Error("Sync query should have called done function");return t}remove(e){if(e instanceof Array){for(var t=0;t<e.length;t++)this.remove(e[t]);return this}if((0,u.ok)(e))return this.remove(e.statements);var n=this.statementsMatching(e.subject,e.predicate,e.object,e.graph);if(!n.length)throw new Error("Statement to be removed is not on store: "+e);return this.removeStatement(n[0]),this}removeDocument(e){this.removeMetadata(e);for(var t=this.statementsMatching(void 0,void 0,void 0,e).slice(),n=0;n<t.length;n++)this.removeStatement(t[n]);return this.removeMatches(e,null,null),this}removeMetadata(e){const t=this.sym("chrome://TheCurrentSession"),n="http://www.w3.org/2007/ont/link#",r=this.statementsMatching(void 0,this.sym(`${n}requestedURI`),this.rdfFactory.literal(e.value),t).map(e=>e.subject);for(var i=0;i<r.length;i++){const e=r[i];if(null!=e){let r;const i=this.any(e,this.sym(`${n}status`),null,t);if(null!=i){r=this.statementsMatching(i,this.sym(`${n}status`),null,t).slice();for(var a=0;a<r.length;a++)this.removeStatement(r[a])}const o=this.any(e,this.sym(`${n}response`),null,t);if(null!=o){r=this.statementsMatching(o,null,null,t).slice();for(a=0;a<r.length;a++)this.removeStatement(r[a])}r=this.statementsMatching(e,null,null,t).slice();for(a=0;a<r.length;a++)this.removeStatement(r[a])}}return this.removeMatches(this.sym(e.value),null,null,t),this}removeMany(e,t,n,r,i){for(var a=this.statementsMatching(e,t,n,r,!1),o=[],s=0;s<a.length;s++)o.push(a[s]);for(i&&(o=o.slice(0,i)),s=0;s<o.length;s++)this.remove(o[s])}removeMatches(e,t,n,r){return this.removeMany(e,t,n,r),this}removeStatement(e){for(var t=[e.subject,e.predicate,e.object,e.graph],n=0;n<4;n++){var r=this.canon(t[n]),i=this.id(r);this.index[n][i]&&this.rdfArrayRemove(this.index[n][i],e)}this.rdfArrayRemove(this.statements,e);for(const t of this.dataRemovalCallbacks)t(e);return this}removeStatements(e){for(var t=0;t<e.length;t++)this.remove(e[t]);return this}replaceWith(e,t){for(var n=this.id(e),r=this.id(t),i=function(e){var t=e[n];if(t){var i=e[r];e[r]=i?t.concat(i):t,delete e[n]}},a=0;a<4;a++)i(this.index[a]);if(this.redirections[n]=t,e.value){if(this.aliases[r]||(this.aliases[r]=[]),this.aliases[r].push(e),this.aliases[n])for(a=0;a<this.aliases[n].length;a++)this.redirections[this.id(this.aliases[n][a])]=t,this.aliases[r].push(this.aliases[n][a]);this.add(t,this.sym("http://www.w3.org/2007/ont/link#uri"),e),this.fetcher&&this.fetcher.nowKnownAs(e,t)}return i(this.classActions),i(this.propertyActions),!0}allAliases(e){var t=this.aliases[this.id(this.canon(e))]||[];return t.push(this.canon(e)),t}sameThings(e,t){if(e.equals(t))return!0;var n=this.canon(e);if(!n)return!1;var r=this.canon(t);return!!r&&n.value===r.value}setPrefixForURI(e,t){if(("tab"!==e||!this.namespaces.tab)&&"ns"!==e.slice(0,2)&&"default"!==e.slice(0,7)){for(let e in this.namespaces)this.namespaces[e]==t&&delete this.namespaces[e];this.namespaces[e]=t}}statementsMatching(e,t,n,r,i){var a,o,s=[e,t,n,r],c=[],l=[],u=[],p=[];for(a=0;a<4;a++)c[a]=this.canon($.fromValue(s[a])),c[a]?(p.push(a),l[a]=this.id(c[a])):u.push(a);if(0===p.length)return this.statements;if(1===p.length)return a=p[0],(o=this.index[a][l[a]])&&i&&o.length>1&&(o=o.slice(0,1)),o=o||[];var d,f,h=1e10;for(f=0;f<p.length;f++){if(a=p[f],!(o=this.index[a][l[a]]))return[];o.length<h&&(h=o.length,d=f)}for(var m=p[d],g=this.index[m][l[m]],v=p.slice(0,d).concat(p.slice(d+1)),b=[],y=["subject","predicate","object","why"],w=0;w<g.length;w++){var x=g[w];for(f=0;f<v.length;f++)if(a=v[f],!this.canon(x[y[a]]).equals(c[a])){x=null;break}if(null!=x&&(b.push(x),i))break}return b}uris(e){var t=this.canon(e),n=this.aliases[this.id(t)];if(!t.value)return[];var r=[t.value];if(n)for(var i=0;i<n.length;i++)r.push(n[i].uri);return r}serialize(e,t,n,r){return j(n,this,e,t,void 0,r={...r||{},namespaces:r?.namespaces?{...this.namespaces,...r.namespaces}:{...this.namespaces}})}}(0,i.A)(X,"handleRDFType",void 0),X.handleRDFType=Y;const Z=T("http://www.w3.org/1999/02/22-rdf-syntax-ns#");function ee(e,t){function n(r,i,a){const o=e.statementsMatching(r,Z("rest"),null,t);if(1!==o.length)throw new Error(`Bad list structure: no rest at ${r}`);const s=e.statementsMatching(r,Z("first"),null,t);if(1!==s.length)throw new Error(`Bad list structure: rest but ${s.length} firsts at ${r}`);const c=[s[0].object].concat(i),l=a.concat(o).concat(s),u=e.statementsMatching(null,Z("rest"),r,t);if(0===u.length){const n=new h(c);return e.remove(l),void function(e,t,n,r){for(const i of e.statementsMatching(n,null,null,r)){const n=new w(t,i.predicate,i.object,r);e.remove(i),e.add(n)}for(const i of e.statementsMatching(null,n,null,r))e.remove(i),e.add(new w(i.subject,t,i.object,r));for(const i of e.statementsMatching(null,null,n,r))e.remove(i),e.add(new w(i.subject,i.predicate,t,r))}(e,n,r,t)}if(1!==u.length)throw new Error(`Bad list structure: ${u.length} pres at ${r}`);const p=u[0].subject;if("BlankNode"!==p.termType)throw new Error(`Bad list element node ${p} type: ${p.termType} `);n(p,c,l)}!function(e,t){const n=Z("nil");for(const r of e.statementsMatching(n,null,null,t)){e.remove(r);const n=new h;e.add(new w(n,r.predicate,r.object,t))}for(const r of e.statementsMatching(null,null,n,t))if(!r.predicate.sameTerm(Z("rest"))){e.remove(r);const n=new h;e.add(new w(r.subject,r.predicate,n,t))}}(e,t);e.statementsMatching(null,Z("rest"),Z("nil"),t).forEach(e=>{if("BlankNode"!==e.subject.termType)throw new Error(`Bad list element node ${e.subject} type: ${e.subject.termType} `);n(e.subject,[],[])})}var te=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t},ne="http://www.w3.org/2000/10/swap/log#",re=function(e){return e},ie=function(e){return e},ae=function(e){if(e.length>0)throw"missing.js: oops nnonempty dict not imp";return[]},oe=function(e){return e.length},se=function(e,t,n){if(void 0===e.slice)throw"@@ mising.js: No .slice function for "+e+" of type "+typeof e;return void 0===n||null==n?e.slice(t):e.slice(t,n)},ce=Error("dummy error stop iteration"),le=function(e){return this.last=0,this.li=e,this.next=function(){if(this.last==this.li.length)throw ce;return this.li[this.last++]},this},ue=function(e,t){return e.indexOf(t)},pe=function(e,t){if(!e){if(t)throw"python Assertion failed: "+t;throw"(python) Assertion failed."}};String.prototype.encode=function(e){if("utf-8"!=e)throw"UTF8_converter: can only do utf-8";return te(this)},String.prototype.decode=function(e){if("utf-8"!=e)throw"UTF8_converter: can only do utf-8";return this};var de=function(e,t){return x.join(t,e)},fe="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil",he="http://www.w3.org/2002/07/owl#sameAs";var me="\t\r\n !\"#$%&'()*.,+/;<=>?@[\\]^`{|}~",ge=me+":",ve=new RegExp("^([-+]?[0-9]+)(\\.[0-9]+)?([eE][-+]?[0-9]+)?","g"),be=new RegExp("^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9](T[0-9][0-9]:[0-9][0-9](:[0-9][0-9](\\.[0-9]*)?)?)?Z?"),ye=new RegExp("[\\s#]"),we=new RegExp('[\\\\\\r\\n\\"]',"g"),xe=new RegExp("^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*","g");function ke(e,t){var n=e.charAt(t+1);return""===n||ye.test(n)}const _e=function(e,t,n,r,i,a,o,s){return new Ee(e,t,n,r,i,a,o,s)};class Ee{constructor(e,t,n,r,i,a,o,s){void 0===t&&(t=null),void 0===n&&(n=""),void 0===r&&(r=null),void 0===i&&(i=""),void 0===a&&(a=null),void 0===o&&(o=""),void 0===s&&(s=null),this._bindings=new ae([]),this._flags=o,""!=n&&(pe(n.indexOf(":")>=0,"Document URI not absolute: "+n),this._bindings[""]=n+"#"),this._store=e,i&&e.setGenPrefix(i),this._thisDoc=n,this.source=e.sym(n),this.lines=0,this.statementCount=0,this.hasNil=!1,this.startOfLine=0,this.previousLine=0,this._genPrefix=i,this.keywords=new ie(["a","this","bind","has","is","of","true","false"]),this.keywordsSet=0,this._anonymousNodes=new ae([]),this._variables=new ae([]),this._parentVariables=new ae([]),this._reason=s,this._reason2=null,this._baseURI=r||(n||null),pe(!this._baseURI||this._baseURI.indexOf(":")>=0),this._genPrefix||(this._thisDoc?this._genPrefix=this._thisDoc+"#_g":this._genPrefix=RDFSink_uniqueURI()),null==t?this._thisDoc?this._formula=e.formula(n+"#_formula"):this._formula=e.formula():this._formula=t,this._context=this._formula,this._parentContext=null}here(e){return this._genPrefix+"_L"+this.lines+"C"+(e-this.startOfLine+1)}formula(){return this._formula}loadStream(e){return this.loadBuf(e.read())}loadBuf(e){return this.startDoc(),this.feed(e),this.endDoc()}feed(e){for(var t=e.decode("utf-8"),n=0;n>=0;){var r=this.skipSpace(t,n);if(r<0)return;if((n=this.directiveOrStatement(t,r))<0)throw Se(this._thisDoc,this.lines,t,r,"expected directive or statement")}}directiveOrStatement(e,t){var n,r=this.skipSpace(e,t);return r<0?r:(n=this.directive(e,r))>=0||(n=this.statement(e,r))>=0?this.checkDot(e,n):n}tok(e,t,n){if("@"==t.slice(n,n+1))n=n+1;else if(H(this.keywords,e)<0)return-1;var r=n+oe(e);return t.slice(n,r)==e&&me.indexOf(t.charAt(r))>=0?r:-1}directive(e,t){if((a=this.skipSpace(e,t))<0)return a;var n=new ie([]);if((a=this.tok("bind",e,t))>0)throw Se(this._thisDoc,this.lines,e,t,"keyword bind is obsolete: use @prefix");if((a=this.tok("keywords",e,t))>0){if((t=this.commaSeparatedList(e,a,n,!1))<0)throw Se(this._thisDoc,this.lines,e,t,"'@keywords' needs comma separated list of words");return this.setKeywords(se(n,null,null)),t}if((a=this.tok("forAll",e,t))>0){if((t=this.commaSeparatedList(e,a,n,!0))<0)throw Se(this._thisDoc,this.lines,e,t,"Bad variable list after @forAll");var r=new le(n);try{for(;;){var i=r.next();(H(this._variables,i)<0||H(this._parentVariables,i)>=0)&&(this._variables[i]=this._context.newUniversal(i))}}catch(e){if(e!=ce)throw e}return t}if((a=this.tok("forSome",e,t))>0){if((t=this.commaSeparatedList(e,a,n,this.uri_ref2))<0)throw Se(this._thisDoc,this.lines,e,t,"Bad variable list after @forSome");r=new le(n);try{for(;;){i=r.next();this._context.declareExistential(i)}}catch(e){if(e!=ce)throw e}return t}if((a=this.tok("prefix",e,t))>=0){var a,o=new ie([]);if((t=this.qname(e,a,o))<0)throw Se(this._thisDoc,this.lines,e,a,"expected qname after @prefix");if((a=this.uri_ref2(e,t,o))<0)throw Se(this._thisDoc,this.lines,e,t,"expected <uriref> after @prefix _qname_");var s=o[1].uri;if(this._baseURI)s=de(this._baseURI,s);else pe(s.indexOf(":")>=0,"With no base URI, cannot handle relative URI for NS");return pe(s.indexOf(":")>=0),this._bindings[o[0][0]]=s,this.bind(o[0][0],function(e){return encodeURI(e)}(s)),a}if((a=this.tok("base",e,t))>=0){o=new ie([]);if((t=this.uri_ref2(e,a,o))<0)throw Se(this._thisDoc,this.lines,e,a,"expected <uri> after @base ");s=o[0].uri;if(!this._baseURI)throw Se(this._thisDoc,this.lines,e,a,"With no previous base URI, cannot use relative URI in @base <"+s+">");s=de(this._baseURI,s);return pe(s.indexOf(":")>=0),this._baseURI=s,t}return-1}bind(e,t){""==e||this._store.setPrefixForURI(e,t)}setKeywords(e){null==e?this.keywordsSet=0:(this.keywords=e,this.keywordsSet=1)}startDoc(){}endDoc(){return this.hasNil&&this._store.rdfFactory.supports.COLLECTIONS&&ee(this._store,this.source),this._formula}makeStatement(e){e[0].add(e[2],e[1],e[3],this.source),(e[2].uri&&e[2].uri===fe||e[3].uri&&e[3].uri===fe)&&(this.hasNil=!0),this.statementCount+=1}statement(e,t){var n=new ie([]);if((t=this.object(e,t,n))<0)return t;var r=this.property_list(e,t,n[0]);if(r<0)throw Se(this._thisDoc,this.lines,e,t,"expected propertylist");return r}subject(e,t,n){return this.item(e,t,n)}verb(e,t,n){if((i=this.skipSpace(e,t))<0)return i;var r=new ie([]);if((i=this.tok("has",e,t))>=0){if((t=this.prop(e,i,r))<0)throw Se(this._thisDoc,this.lines,e,i,"expected property after 'has'");return n.push(new re(["->",r[0]])),t}if((i=this.tok("is",e,t))>=0){if((t=this.prop(e,i,r))<0)throw Se(this._thisDoc,this.lines,e,i,"expected <property> after 'is'");if((i=this.skipSpace(e,t))<0)throw Se(this._thisDoc,this.lines,e,t,"End of file found, expected property after 'is'");var i;t=i;if((i=this.tok("of",e,t))<0)throw Se(this._thisDoc,this.lines,e,t,"expected 'of' after 'is' <prop>");return n.push(new re(["<-",r[0]])),i}if((i=this.tok("a",e,t))>=0)return n.push(new re(["->",this._store.sym("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")])),i;if("<="==e.slice(t,t+2))return n.push(new re(["<-",this._store.sym(ne+"implies")])),t+2;if("="==e.slice(t,t+1))return">"==e.slice(t+1,t+2)?(n.push(new re(["->",this._store.sym(ne+"implies")])),t+2):(n.push(new re(["->",this._store.sym(he)])),t+1);if(":="==e.slice(t,t+2))return n.push(new re(["->",ne+"becomes"])),t+2;if((i=this.prop(e,t,r))>=0)return n.push(new re(["->",r[0]])),i;if(">-"==e.slice(t,t+2)||"<-"==e.slice(t,t+2))throw Se(this._thisDoc,this.lines,e,i,">- ... -> syntax is obsolete.");return-1}prop(e,t,n){return this.item(e,t,n)}item(e,t,n){return this.path(e,t,n)}blankNode(e){return this._context.bnode(e,this._reason2)}path(e,t,n){if((i=this.nodeOrLiteral(e,t,n))<0)return i;for(;"!^.".indexOf(e.slice(i,i+1))>=0;){var r=e.slice(i,i+1);if("."==r&&ke(e,i))break;var i,a=n.pop(),o=this.blankNode(this.here(i));if((i=this.node(e,i+1,n))<0)throw Se(this._thisDoc,this.lines,e,i,"EOF found in middle of path syntax");var s=n.pop();"^"==r?this.makeStatement(new re([this._context,s,o,a])):this.makeStatement(new re([this._context,s,a,o])),n.push(o)}return i}anonymousNode(e){if(t=this._anonymousNodes[e])return t;var t=this._store.bnode(e);return this._anonymousNodes[e]=t,t}node(e,t,n,r){void 0===r&&(r=null);var i=r;if((u=this.skipSpace(e,t))<0)return u;t=u;var a=e.slice(t,t+1);if("["==a){var o=this.here(t);if((u=this.skipSpace(e,t+1))<0)throw Se(this._thisDoc,this.lines,e,t,"EOF after '['");if("="==e.slice(u,u+1)){var t=u+1,s=new ie([]);if(!((u=this.objectList(e,t,s))>=0))throw Se(this._thisDoc,this.lines,e,t,"objectList expected after [= ");i=s[0];if(oe(s)>1){var c=new le(s);try{for(;;){var l=c.next();this.makeStatement(new re([this._context,this._store.sym(he),i,l]))}}catch(e){if(e!=ce)throw e}}if((u=this.skipSpace(e,u))<0)throw Se(this._thisDoc,this.lines,e,t,"EOF when objectList expected after [ = ");if(";"==e.slice(u,u+1))var u=u+1}if(null==i)i=this.blankNode(o);if((t=this.property_list(e,u,i))<0)throw Se(this._thisDoc,this.lines,e,u,"property_list expected");if((u=this.skipSpace(e,t))<0)throw Se(this._thisDoc,this.lines,e,t,"EOF when ']' expected after [ <propertyList>");if("."==e.slice(u,u+1))return n.push(i),u;if("]"!=e.slice(u,u+1))throw Se(this._thisDoc,this.lines,e,u,"']' expected");return n.push(i),u+1}if("{"==a){if("$"==e.slice(t+1,t+2)){for(var u=(t+=1)+1,p=new ie([]),d=!0;;){if((t=this.skipSpace(e,u))<0)throw Se(this._thisDoc,this.lines,e,t,"needed '$}', found end.");if("$}"==e.slice(t,t+2)){var u=t+2;break}if(d)d=!1;else{if(","!=e.slice(t,t+1))throw Se(this._thisDoc,this.lines,e,t,"expected: ','");t+=1}var f=new ie([]);if((u=this.item(e,t,f))<0)throw Se(this._thisDoc,this.lines,e,t,"expected item in set or '$}'");p.push(f[0])}return n.push(this._store.newSet(p,this._context)),u}var u=t+1,h=this._parentContext;this._parentContext=this._context;var m=this._anonymousNodes,g=this._parentVariables;this._parentVariables=this._variables,this._anonymousNodes=new ae([]),this._variables=this._variables.slice();var v=this._reason2;if(this._reason2=null,null==i)i=this._store.formula();for(this._context=i;;){if((t=this.skipSpace(e,u))<0)throw Se(this._thisDoc,this.lines,e,t,"needed '}', found end.");if("}"==e.slice(t,t+1)){var u=t+1;break}if((u=this.directiveOrStatement(e,t))<0)throw Se(this._thisDoc,this.lines,e,t,"expected statement or '}'")}return this._anonymousNodes=m,this._variables=this._parentVariables,this._parentVariables=g,this._context=this._parentContext,this._reason2=v,this._parentContext=h,n.push(i.close()),u}if("("==a){var b=this._store.list;if("$"==e.slice(t+1,t+2)){b=this._store.newSet;t+=1}for(u=t+1,p=new ie([]);;){if((t=this.skipSpace(e,u))<0)throw Se(this._thisDoc,this.lines,e,t,"needed ')', found end.");if(")"==e.slice(t,t+1)){u=t+1;break}f=new ie([]);if((u=this.item(e,t,f))<0)throw Se(this._thisDoc,this.lines,e,t,"expected item in list or ')'");p.push(f[0])}return n.push(b(p,this._context)),u}if((u=this.tok("this",e,t))>=0)throw Se(this._thisDoc,this.lines,e,t,"Keyword 'this' was ancient N3. Now use @forSome and @forAll keywords.");if((u=this.tok("true",e,t))>=0)return n.push(!0),u;if((u=this.tok("false",e,t))>=0)return n.push(!1),u;if(null==i&&(u=this.uri_ref2(e,t,n))>=0)return u;return-1}property_list(e,t,n){for(;;){if((u=this.skipSpace(e,t))<0)throw Se(this._thisDoc,this.lines,e,t,"EOF found when expected verb in property list");if(":-"!=e.slice(u,u+2)){t=u;var r=new ie([]);if((u=this.verb(e,t,r))<=0)return t;var i=new ie([]);if((t=this.objectList(e,u,i))<0)throw Se(this._thisDoc,this.lines,e,u,"objectList expected");var a=new le(i);try{for(;;){var o=a.next(),s=r[0],c=s[0],l=s[1];"->"==c?this.makeStatement(new re([this._context,l,n,o])):this.makeStatement(new re([this._context,l,o,n]))}}catch(e){if(e!=ce)throw e}if((u=this.skipSpace(e,t))<0)throw Se(this._thisDoc,this.lines,e,u,"EOF found in list of objects");if(";"!=e.slice(t,t+1))return t;t=t+1}else{var u,t=u+2,p=new ie([]);if((u=this.node(e,t,p,n))<0)throw Se(this._thisDoc,this.lines,e,t,"bad {} or () or [] node after :- ");var t=u}}}commaSeparatedList(e,t,n,r){if((i=this.skipSpace(e,t))<0)throw Se(this._thisDoc,this.lines,e,i,"EOF found expecting comma sep list");if("."==e.charAt(i))return t;if(r)var i=this.uri_ref2(e,i,n);else i=this.bareWord(e,i,n);if(i<0)return-1;for(;;){if((t=this.skipSpace(e,i))<0)return t;var a=e.slice(t,t+1);if(","!=a)return"."!=a?-1:t;if(r)i=this.uri_ref2(e,t+1,n);else i=this.bareWord(e,t+1,n);if(i<0)throw Se(this._thisDoc,this.lines,e,i,"bad list content")}}objectList(e,t,n){if((t=this.object(e,t,n))<0)return-1;for(;;){var r=this.skipSpace(e,t);if(r<0)throw Se(this._thisDoc,this.lines,e,r,"EOF found after object");if(","!=e.slice(r,r+1))return r;if((t=this.object(e,r+1,n))<0)return t}}checkDot(e,t){var n=this.skipSpace(e,t);if(n<0)return n;if("."==e.slice(n,n+1))return n+1;if("}"==e.slice(n,n+1))return n;if("]"==e.slice(n,n+1))return n;throw Se(this._thisDoc,this.lines,e,n,"expected '.' or '}' or ']' at end of statement")}uri_ref2(e,t,n){var r=new ie([]);if((d=this.qname(e,t,r))>=0){var i=r[0],a=i[0],o=i[1];if(null==a){pe(0,"not used?");var s=this._baseURI+"#"}else{if(!(s=this._bindings[a])){if("_"==a)return n.push(this.anonymousNode(o)),d;throw Se(this._thisDoc,this.lines,e,t,"Prefix "+a+" not bound.")}}var c=this._store.sym(s+o);return H(this._variables,c)>=0?n.push(this._variables[c]):n.push(c),d}if((t=this.skipSpace(e,t))<0)return-1;if("?"==e.charAt(t)){var l=new ie([]);return(d=this.variable(e,t,l))>0?(n.push(l[0]),d):-1}if("<"==e.charAt(t)){for(var u=t=t+1;t<oe(e);){if(">"==e.charAt(t)){var p=e.slice(u,t);if(this._baseURI)p=de(this._baseURI,p);else pe(p.indexOf(":")>=0,"With no base URI, cannot deal with relative URIs");if("#"==e.slice(t-1,t)&&"#"!=se(p,-1,null))p=p+"#";c=this._store.sym(p);return H(this._variables,c)>=0?n.push(this._variables[c]):n.push(c),t+1}t=t+1}throw Se(this._thisDoc,this.lines,e,d,"unterminated URI reference")}if(this.keywordsSet){var d;l=new ie([]);if((d=this.bareWord(e,t,l))<0)return-1;if(H(this.keywords,l[0])>=0)throw Se(this._thisDoc,this.lines,e,t,'Keyword "'+l[0]+'" not allowed here.');return n.push(this._store.sym(this._bindings[""]+l[0])),d}return-1}skipSpace(e,t){for(var n=t||0;n<e.length;n++){var r=e.charAt(n);if(" \n\r\t\f\v \u2028\u2029 ".indexOf(r)<0){if("#"!==e.charAt(n))return n;for(;;n++){if(n===e.length)return-1;if("\n"===e.charAt(n)){this.lines=this.lines+1;break}}}else"\n"===e.charAt(n)&&(this.lines=this.lines+1)}return-1}variable(e,t,n){if((r=this.skipSpace(e,t))<0)return-1;if("?"!=e.slice(r,r+1))return-1;var r;t=r+=1;if("0123456789-".indexOf(e.charAt(r))>=0)throw Se(this._thisDoc,this.lines,e,r,"Varible name can't start with '"+e.charAt(r)+"s'");for(;t<oe(e)&&ge.indexOf(e.charAt(t))<0;)t=t+1;if(null==this._parentContext)throw Se(this._thisDoc,this.lines,e,r,"Can't use ?xxx syntax for variable in outermost level: "+e.slice(r-1,t));return n.push(this._store.variable(e.slice(r,t))),t}bareWord(e,t,n){var r=this.skipSpace(e,t);if(r<0)return-1;var i=e.charAt(r);if("0123456789-".indexOf(i)>=0)return-1;if(ge.indexOf(i)>=0)return-1;for(t=r;t<oe(e);){var a=e.charAt(t);if("."===a){if(ke(e,t))break}else if(ge.indexOf(a)>=0)break;t=t+1}return n.push(e.slice(r,t)),t}qname(e,t,n){if((t=this.skipSpace(e,t))<0)return-1;var r=e.charAt(t);if("0123456789-+".indexOf(r)>=0)return-1;if(ge.indexOf(r)<0){var i=r;for(t=t+1;t<oe(e);){if("."===(r=e.charAt(t))){if(ke(e,t))break}else if(ge.indexOf(r)>=0)break;i=i+r,t=t+1}}else i="";if(t<oe(e)&&":"==e.charAt(t)){var a=i;for(t=t+1,i="";t<oe(e);){if("."===(r=e.charAt(t))){if(ke(e,t))break}else if(ge.indexOf(r)>=0)break;i=i+r,t=t+1}return n.push(new re([a,i])),t}return i&&this.keywordsSet&&H(this.keywords,i)<0?(n.push(new re(["",i])),t):-1}object(e,t,n){if((a=this.subject(e,t,n))>=0)return a;{if((a=this.skipSpace(e,t))<0)return-1;t=a;var r=null;let s=e.charAt(t);if('"'==s||"'"==s){r=e.slice(t,t+3==s+s)?s+s+s:s;t=t+oe(r);var i=this.strconst(e,t,r),a=i[0],o=i[1];return n.push(this._store.literal(o)),a}return-1}}nodeOrLiteral(e,t,n){if((c=this.node(e,t,n))>=0)return c;if((c=this.skipSpace(e,t))<0)return-1;t=c;var r=e.charAt(t);if("-+0987654321".indexOf(r)>=0){if(be.lastIndex=0,null!=(p=be.exec(e.slice(t)))){c=t+(i=p[0]).length,i.indexOf("T")>=0?n.push(this._store.literal(i,this._store.sym("http://www.w3.org/2001/XMLSchema#dateTime"))):n.push(this._store.literal(i,this._store.sym("http://www.w3.org/2001/XMLSchema#date")))}else{var i;if(ve.lastIndex=0,null==(p=ve.exec(e.slice(t))))throw Se(this._thisDoc,this.lines,e,t,"Bad number or date syntax");c=t+ve.lastIndex,(i=e.slice(t,c)).indexOf("e")>=0?n.push(this._store.literal(parseFloat(i),this._store.sym("http://www.w3.org/2001/XMLSchema#double"))):e.slice(t,c).indexOf(".")>=0?n.push(this._store.literal(parseFloat(i),this._store.sym("http://www.w3.org/2001/XMLSchema#decimal"))):n.push(this._store.literal(parseInt(i),this._store.sym("http://www.w3.org/2001/XMLSchema#integer")))}return c}if('"'==e.charAt(t)){if('"""'==e.slice(t,t+3))var a='"""';else a='"';t=t+oe(a);var o=null,s=this.strconst(e,t,a),c=s[0],l=s[1],u=null;if("@"==e.slice(c,c+1)){var p;if(xe.lastIndex=0,null==(p=xe.exec(e.slice(c+1))))throw Se(this._thisDoc,startline,e,t,"Bad language code syntax on string literal, after @");t=xe.lastIndex+c+1,u=e.slice(c+1,t),c=t}if("^^"==e.slice(c,c+2)){var d=new ie([]);c=this.uri_ref2(e,c+2,d),o=d[0]}return n.push(this._store.literal(l,u||o)),c}return-1}strconst(e,t,n){for(var r=t,i="",a=this.lines;r<oe(e);){t=r+oe(n);if(e.slice(r,t)==n)return new re([t,i]);if('"'!=e.charAt(r)){if(we.lastIndex=0,!we.exec(e.slice(r)))throw Se(this._thisDoc,a,e,r,"Closing quote missing in string at ^ in "+e.slice(r-20,r)+"^"+e.slice(r,r+20));t=r+we.lastIndex-1,i=i+e.slice(r,t);if('"'!=(c=e.charAt(t)))if("\r"!=c){if("\n"==c){if('"'==n)throw Se(this._thisDoc,a,e,t,"newline found in string literal");this.lines=this.lines+1;i=i+c,r=t+1;this.previousLine=this.startOfLine,this.startOfLine=r}else if("\\"==c){r=t+1;if(!(c=e.slice(r,r+1)))throw Se(this._thisDoc,a,e,t,"unterminated string literal (2)");var o=ue('abfrtvn\\"',c);if(o>=0)i=i+'a\b\f\r\t\v\n\\"'.charAt(o),r=r+1;else if("u"==c)r=(s=this.uEscape(e,r+1,a))[0],i=i+(c=s[1]);else{if("U"!=c)throw Se(this._thisDoc,this.lines,e,t,"bad escape");var s,c;r=(s=this.UEscape(e,r+1,a))[0],i=i+(c=s[1])}}}else var r=t+1;else var r=t}else var i=i+'"',r=r+1}throw Se(this._thisDoc,this.lines,e,t,"unterminated string literal")}uEscape(e,t,n){for(var r=t,i=0,a=0;i<4;){var o=e.slice(r,r+1).toLowerCase();r=r+1;if(""==o)throw Se(this._thisDoc,n,e,t,"unterminated string literal(3)");var s=ue("0123456789abcdef",o);if(s<0)throw Se(this._thisDoc,n,e,t,"bad string literal hex escape");a=16*a+s,i=i+1}var c=String.fromCharCode(a);return new re([r,c])}UEscape(e,t,n){for(var r=t,i=0,a="\\U";i<8;){var o=e.slice(r,r+1).toLowerCase();r=r+1;if(""==o)throw Se(this._thisDoc,n,e,t,"unterminated string literal(3)");if(ue("0123456789abcdef",o)<0)throw Se(this._thisDoc,n,e,t,"bad string literal hex escape");a=a+o,i=i+1}var s,c=(s="0x"+se(a,2,10)-0,String.fromCharCode(s));return new re([r,c])}}function Ce(e,t,n,r,i){this._str=n.encode("utf-8"),this._str=n,this._i=r,this._why=i,this.lines=t,this._uri=e}function Se(e,t,n,r,i){let a=t+1,o="Line "+a+" of <"+e+">: Bad syntax: "+i+'\nat: "'+n.slice(r,r+30)+'"',s=new SyntaxError(o,e,a);return s.lineNo=a,s.characterInFile=r,s.syntaxProblem=i,s}Ce.prototype.toString=function(){var e=this._str,t=this._i,n=0;if(t>60){var r="...";n=t-60}else r="";if(oe(e)-t>60)var i="...";else i="";return'Line %i of <%s>: Bad syntax (%s) at ^ in:\n"%s%s^%s%s"'%new re([this.lines+1,this._uri,this._why,r,e.slice(n,t),e.slice(t,t+60),i])};const Ae={...S,supports:{[_.collections]:!0,[_.defaultGraphType]:!1,[_.equalsMethod]:!0,[_.identity]:!1,[_.id]:!0,[_.reversibleId]:!1,[_.variableType]:!0},collection:e=>new h(e),id(e){return(0,u.P3)(e)?`( ${e.elements.map(e=>this.id(e)).join(", ")} )`:(0,u.DZ)(e)?k.toString(e):S.id(e)},termToNQ:e=>e.termType===s.r0?h.toNT(e):S.termToNQ(e)},Te=Ae;function Pe(e,t){return"string"==typeof t?e.rdfFactory.literal(t):Object.prototype.hasOwnProperty.call(t,"@list")?!0===e.rdfFactory.supports.COLLECTIONS?function(e,t){if(!Array.isArray(t))throw new TypeError("Object must be an array");return e.rdfFactory.collection(t.map(t=>Pe(e,t)))}(e,t["@list"]):function(e,t){const n=t["@id"]?Ie(e,t):e.rdfFactory.blankNode(),r=t["@list"].map(t=>Pe(e,t)),i=z(e.rdfFactory,n,r);return e.addAll(i),n}(e,t):Object.prototype.hasOwnProperty.call(t,"@id")?Ie(e,t):Object.prototype.hasOwnProperty.call(t,"@language")?e.rdfFactory.literal(t["@value"],t["@language"]):Object.prototype.hasOwnProperty.call(t,"@type")?e.rdfFactory.literal(t["@value"],e.rdfFactory.namedNode(t["@type"])):Object.prototype.hasOwnProperty.call(t,"@value")?e.rdfFactory.literal(t["@value"]):e.rdfFactory.literal(t)}async function Re(e,t,r){const i=r&&Object.prototype.hasOwnProperty.call(r,"termType")?r.value:r,a=await n.e(841).then(n.t.bind(n,4841,23));return(await a.default.flatten(JSON.parse(e),null,{base:i})).reduce((e,t)=>Fe(e,r,t),t)}function Ie(e,t){return t["@id"].startsWith("_:")?e.rdfFactory.blankNode(t["@id"].substring(2)):e.rdfFactory.namedNode(t["@id"])}function Fe(e,t,n){const r=n["@id"]?Ie(e,n):e.rdfFactory.blankNode();for(const i of Object.keys(n)){if("@id"===i)continue;if("@graph"==i){const t=r,a=n[i];for(let n=0;n<a.length;n++)e=Fe(e,t,a[n])}const a=n[i];if(Array.isArray(a))for(let n=0;n<a.length;n++)e.addStatement(Ne(e,r,i,a[n],t));else e.addStatement(Ne(e,r,i,a,t))}return e}function Ne(e,t,n,r,i){let a,o;return"@type"===n?(a=e.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),o=e.rdfFactory.namedNode(r)):(a=e.rdfFactory.namedNode(n),o=Pe(e,r)),e.rdfFactory.quad(t,a,o,e.rdfFactory.namedNode(i))}var Oe=n(5576);const Le="http://www.w3.org/1999/02/22-rdf-syntax-ns#",je="http://www.w3.org/2001/XMLSchema#",Me="http://www.w3.org/2000/10/swap/",De={xsd:{decimal:`${je}decimal`,boolean:`${je}boolean`,double:`${je}double`,integer:`${je}integer`,string:`${je}string`},rdf:{type:`${Le}type`,nil:`${Le}nil`,first:`${Le}first`,rest:`${Le}rest`,langString:`${Le}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${Me}reify#forSome`,forAll:`${Me}reify#forAll`},log:{implies:`${Me}log#implies`,isImpliedBy:`${Me}log#isImpliedBy`}},{xsd:Ue}=De,Be=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,ze={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},He=/[\x00-\x20<>\\"\{\}\|\^\`]/,qe={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},$e=/$0^/;class We{constructor(e){if(this._iri=/^<((?:[^ <>{}\\]|\\[uU])+)>[ \t]*/,this._unescapedIri=/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>[ \t]*/,this._simpleQuotedString=/^"([^"\\\r\n]*)"(?=[^"])/,this._simpleApostropheString=/^'([^'\\\r\n]*)'(?=[^'])/,this._langcode=/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\-])/i,this._prefix=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,this._prefixed=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?:[ \t]+|(?=\.?[,;!\^\s#()\[\]\{\}"'<>]))/,this._variable=/^\?(?:(?:[A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=[.,;!\^\s#()\[\]\{\}"'<>])/,this._blank=/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?:[ \t]+|(?=\.?[,;:\s#()\[\]\{\}"'<>]))/,this._number=/^[\-+]?(?:(\d+\.\d*|\.?\d+)[eE][\-+]?|\d*(\.)?)\d+(?=\.?[,;:\s#()\[\]\{\}"'<>])/,this._boolean=/^(?:true|false)(?=[.,;\s#()\[\]\{\}"'<>])/,this._keyword=/^@[a-z]+(?=[\s#<:])/i,this._sparqlKeyword=/^(?:PREFIX|BASE|GRAPH)(?=[\s#<])/i,this._shortPredicates=/^a(?=[\s#()\[\]\{\}"'<>])/,this._newline=/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,this._comment=/#([^\n\r]*)/,this._whitespace=/^[ \t]+/,this._endOfFile=/^(?:#[^\n\r]*)?$/,e=e||{},this._isImpliedBy=e.isImpliedBy,this._lineMode=!!e.lineMode){this._n3Mode=!1;for(const e in this)!(e in qe)&&this[e]instanceof RegExp&&(this[e]=$e)}else this._n3Mode=!1!==e.n3;this.comments=!!e.comments,this._literalClosingPos=0}_tokenizeToEnd(e,t){let n=this._input,r=n.length;for(;;){let e,o;for(;e=this._newline.exec(n);)this.comments&&(o=this._comment.exec(e[0]))&&i("comment",o[1],"",this._line,e[0].length),n=n.substr(e[0].length,n.length),r=n.length,this._line++;if(!e&&(e=this._whitespace.exec(n))&&(n=n.substr(e[0].length,n.length)),this._endOfFile.test(n))return t&&(this.comments&&(o=this._comment.exec(n))&&i("comment",o[1],"",this._line,n.length),n=null,i("eof","","",this._line,0)),this._input=n;const s=this._line,c=n[0];let l="",u="",p="",d=null,f=0,h=!1;switch(c){case"^":if(n.length<3)break;if("^"!==n[1]){this._n3Mode&&(f=1,l="^");break}if(this._previousMarker="^^",n=n.substr(2),"<"!==n[0]){h=!0;break}case"<":if(d=this._unescapedIri.exec(n))l="IRI",u=d[1];else if(d=this._iri.exec(n)){if(u=this._unescape(d[1]),null===u||He.test(u))return a(this);l="IRI"}else n.length>1&&"<"===n[1]?(l="<<",f=2):this._n3Mode&&n.length>1&&"="===n[1]&&(f=2,this._isImpliedBy?(l="abbreviation",u="<"):(l="inverse",u=">"));break;case">":n.length>1&&">"===n[1]&&(l=">>",f=2);break;case"_":((d=this._blank.exec(n))||t&&(d=this._blank.exec(`${n} `)))&&(l="blank",p="_",u=d[1]);break;case'"':if(d=this._simpleQuotedString.exec(n))u=d[1];else if(({value:u,matchLength:f}=this._parseLiteral(n)),null===u)return a(this);null===d&&0===f||(l="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(d=this._simpleApostropheString.exec(n))u=d[1];else if(({value:u,matchLength:f}=this._parseLiteral(n)),null===u)return a(this);null===d&&0===f||(l="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(d=this._variable.exec(n))&&(l="var",u=d[0]);break;case"@":"literal"===this._previousMarker&&(d=this._langcode.exec(n))?(l="langcode",u=d[1]):(d=this._keyword.exec(n))&&(l=d[0]);break;case".":if(1===n.length?t:n[1]<"0"||n[1]>"9"){l=".",f=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(d=this._number.exec(n)||t&&(d=this._number.exec(`${n} `)))&&(l="literal",u=d[0],p="string"==typeof d[1]?Ue.double:"string"==typeof d[2]?Ue.decimal:Ue.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(d=this._sparqlKeyword.exec(n))?l=d[0].toUpperCase():h=!0;break;case"f":case"t":(d=this._boolean.exec(n))?(l="literal",u=d[0],p=Ue.boolean):h=!0;break;case"a":(d=this._shortPredicates.exec(n))?(l="abbreviation",u="a"):h=!0;break;case"=":this._n3Mode&&n.length>1&&(l="abbreviation",">"!==n[1]?(f=1,u="="):(f=2,u=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"}":this._lineMode||(f=1,l=c);break;case"{":!this._lineMode&&n.length>=2&&("|"===n[1]?(l="{|",f=2):(l=c,f=1));break;case"|":n.length>=2&&"}"===n[1]&&(l="|}",f=2);break;default:h=!0}if(h&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(d=this._prefix.exec(n))?((d=this._prefixed.exec(n))||t&&(d=this._prefixed.exec(`${n} `)))&&(l="prefixed",p=d[1]||"",u=this._unescape(d[2])):(l="prefix",u=d[1]||"")),"^^"===this._previousMarker)switch(l){case"prefixed":l="type";break;case"IRI":l="typeIRI";break;default:l=""}if(!l)return t||!/^'''|^"""/.test(n)&&/\n|\r/.test(n)?a(this):this._input=n;const m=f||d[0].length,g=i(l,u,p,s,m);this.previousToken=g,this._previousMarker=l,n=n.substr(m,n.length)}function i(t,i,a,o,s){const c=n?r-n.length:r,l={type:t,value:i,prefix:a,line:o,start:c,end:c+s};return e(null,l),l}function a(t){e(t._syntaxError(/^\S*/.exec(n)[0]))}}_unescape(e){let t=!1;const n=e.replace(Be,(e,n,r,i)=>{if("string"==typeof n)return String.fromCharCode(Number.parseInt(n,16));if("string"==typeof r){let e=Number.parseInt(r,16);return e<=65535?String.fromCharCode(Number.parseInt(r,16)):String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e))}return i in ze?ze[i]:(t=!0,"")});return t?null:n}_parseLiteral(e){if(e.length>=3){const t=e.match(/^(?:"""|"|'''|'|)/)[0],n=t.length;let r=Math.max(this._literalClosingPos,n);for(;(r=e.indexOf(t,r))>0;){let t=0;for(;"\\"===e[r-t-1];)t++;if(t%2==0){const t=e.substring(n,r),i=t.split(/\r\n|\r|\n/).length-1,a=r+n;if(1===n&&0!==i||3===n&&this._lineMode)break;return this._line+=i,{value:this._unescape(t),matchLength:a}}r++}this._literalClosingPos=e.length-n+1}return{value:"",matchLength:0}}_syntaxError(e){this._input=null;const t=new Error(`Unexpected "${e}" on line ${this._line}.`);return t.context={token:void 0,line:this._line,previousToken:this.previousToken},t}_readStartingBom(e){return e.startsWith("\ufeff")?e.substr(1):e}tokenize(e,t){if(this._line=1,"string"==typeof e){if(this._input=this._readStartingBom(e),"function"!=typeof t){const e=[];let t;if(this._tokenizeToEnd((n,r)=>n?t=n:e.push(r),!0),t)throw t;return e}queueMicrotask(()=>this._tokenizeToEnd(t,!0))}else this._pendingBuffer=null,"function"==typeof e.setEncoding&&e.setEncoding("utf8"),e.on("data",e=>{null!==this._input&&0!==e.length&&(this._pendingBuffer&&(e=Oe.Buffer.concat([this._pendingBuffer,e]),this._pendingBuffer=null),128&e[e.length-1]?this._pendingBuffer=e:(void 0===this._input?this._input=this._readStartingBom("string"==typeof e?e:e.toString()):this._input+=e,this._tokenizeToEnd(t,!1)))}),e.on("end",()=>{"string"==typeof this._input&&this._tokenizeToEnd(t,!0)}),e.on("error",t)}}const{rdf:Ve,xsd:Ge}=De;let Ke,Je=0;const Qe={namedNode:at,blankNode:ot,variable:ct,literal:st,defaultGraph:function(){return Ke},quad:lt,triple:lt,fromTerm:ut,fromQuad:pt},Ye=Qe;class Xe{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof Xe?this.id===e.id:!!e&&this.termType===e.termType&&this.value===e.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class Ze extends Xe{get termType(){return"NamedNode"}}class et extends Xe{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const e=this.id;let t=e.lastIndexOf('"')+1;return t<e.length&&"@"===e[t++]?e.substr(t).toLowerCase():""}get datatype(){return new Ze(this.datatypeString)}get datatypeString(){const e=this.id,t=e.lastIndexOf('"')+1,n=t<e.length?e[t]:"";return"^"===n?e.substr(t+2):"@"!==n?Ge.string:Ve.langString}equals(e){return e instanceof et?this.id===e.id:!!e&&!!e.datatype&&this.termType===e.termType&&this.value===e.value&&this.language===e.language&&this.datatype.value===e.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class tt extends Xe{constructor(e){super(`_:${e}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class nt extends Xe{constructor(e){super(`?${e}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}class rt extends Xe{constructor(){return super(""),Ke||this}get termType(){return"DefaultGraph"}equals(e){return this===e||!!e&&this.termType===e.termType}}Ke=new rt;class it extends Xe{constructor(e,t,n,r){super(""),this._subject=e,this._predicate=t,this._object=n,this._graph=r||Ke}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(e){return!!e&&this._subject.equals(e.subject)&&this._predicate.equals(e.predicate)&&this._object.equals(e.object)&&this._graph.equals(e.graph)}}function at(e){return new Ze(e)}function ot(e){return new tt(e||"n3-"+Je++)}function st(e,t){if("string"==typeof t)return new et(`"${e}"@${t.toLowerCase()}`);let n=t?t.value:"";return""===n&&("boolean"==typeof e?n=Ge.boolean:"number"==typeof e&&(Number.isFinite(e)?n=Number.isInteger(e)?Ge.integer:Ge.double:(n=Ge.double,Number.isNaN(e)||(e=e>0?"INF":"-INF")))),""===n||n===Ge.string?new et(`"${e}"`):new et(`"${e}"^^${n}`)}function ct(e){return new nt(e)}function lt(e,t,n,r){return new it(e,t,n,r)}function ut(e){if(e instanceof Xe)return e;switch(e.termType){case"NamedNode":return at(e.value);case"BlankNode":return ot(e.value);case"Variable":return ct(e.value);case"DefaultGraph":return Ke;case"Literal":return st(e.value,e.language||e.datatype);case"Quad":return pt(e);default:throw new Error(`Unexpected termType: ${e.termType}`)}}function pt(e){if(e instanceof it)return e;if("Quad"!==e.termType)throw new Error(`Unexpected termType: ${e.termType}`);return lt(ut(e.subject),ut(e.predicate),ut(e.object),ut(e.graph))}let dt=0;class ft{constructor(e){this._contextStack=[],this._graph=null,e=e||{},this._setBase(e.baseIRI),e.factory&&mt(this,e.factory);const t="string"==typeof e.format?e.format.match(/\w*$/)[0].toLowerCase():"",n=/turtle/.test(t),r=/trig/.test(t),i=/triple/.test(t),a=/quad/.test(t),o=this._n3Mode=/n3/.test(t),s=i||a;(this._supportsNamedGraphs=!(n||o))||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(n||r||i||o),this._isImpliedBy=e.isImpliedBy,this._supportsRDFStar=""===t||/star|\*$/.test(t),s&&(this._resolveRelativeIRI=e=>null),this._blankNodePrefix="string"!=typeof e.blankNodePrefix?"":e.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=e.lexer||new We({lineMode:s,n3:o,isImpliedBy:this._isImpliedBy}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){dt=0}_setBase(e){if(e){const t=e.indexOf("#");t>=0&&(e=e.substr(0,t)),this._base=e,this._basePath=e.indexOf("/")<0?e:e.replace(/[^\/?]*(?:\?.*)?$/,""),e=e.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=e[0],this._baseScheme=e[1]}else this._base="",this._basePath=""}_saveContext(e,t,n,r,i){const a=this._n3Mode;this._contextStack.push({type:e,subject:n,predicate:r,object:i,graph:t,inverse:!!a&&this._inversePredicate,blankPrefix:a?this._prefixes._:"",quantified:a?this._quantified:null}),a&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.value}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(e,t){const n=this._contextStack.pop();if(!n||n.type!==e)return this._error(`Unexpected ${t.type}`,t);this._subject=n.subject,this._predicate=n.predicate,this._object=n.object,this._graph=n.graph,this._n3Mode&&(this._inversePredicate=n.inverse,this._prefixes._=n.blankPrefix,this._quantified=n.quantified)}_readInTopContext(e){switch(e.type){case"eof":return null!==this._graph?this._error("Unclosed graph",e):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"PREFIX":this._sparqlStyle=!0;case"@prefix":return this._readPrefix;case"BASE":this._sparqlStyle=!0;case"@base":return this._readBaseIRI;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(e)}}_readEntity(e,t){let n;switch(e.type){case"IRI":case"typeIRI":const t=this._resolveIRI(e.value);if(null===t)return this._error("Invalid IRI",e);n=this._factory.namedNode(t);break;case"type":case"prefixed":const r=this._prefixes[e.prefix];if(void 0===r)return this._error(`Undefined prefix "${e.prefix}:"`,e);n=this._factory.namedNode(r+e.value);break;case"blank":n=this._factory.blankNode(this._prefixes[e.prefix]+e.value);break;case"var":n=this._factory.variable(e.value.substr(1));break;default:return this._error(`Expected entity but got ${e.type}`,e)}return!t&&this._n3Mode&&n.id in this._quantified&&(n=this._quantified[n.id]),n}_readSubject(e){switch(this._predicate=null,e.type){case"[":return this._saveContext("blank",this._graph,this._subject=this._factory.blankNode(),null,null),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this.RDF_NIL,null,null),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._graph=this._factory.blankNode(),null,null),this._readSubject):this._error("Unexpected graph",e);case"}":return this._readPunctuation(e);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier="blankNode",this._readQuantifierList):this._error('Unexpected "@forSome"',e);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier="variable",this._readQuantifierList):this._error('Unexpected "@forAll"',e);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",e);if(0===e.prefix.length)return this._literalValue=e.value,this._completeSubjectLiteral;this._subject=this._factory.literal(e.value,this._factory.namedNode(e.prefix));break;case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Unexpected RDF-star syntax",e);default:if(void 0===(this._subject=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(e){const t=e.type;switch(t){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[e.value];break;case".":case"]":case"}":return null===this._predicate?this._error(`Unexpected ${t}`,e):(this._subject=null,"]"===t?this._readBlankNodeTail(e):this._readPunctuation(e));case";":return null!==this._predicate?this._readPredicate:this._error("Expected predicate but got ;",e);case"[":if(this._n3Mode)return this._saveContext("blank",this._graph,this._subject,this._subject=this._factory.blankNode(),null),this._readBlankNodeHead;case"blank":if(!this._n3Mode)return this._error("Disallowed blank node as predicate",e);default:if(void 0===(this._predicate=this._readEntity(e)))return}return this._readObject}_readObject(e){switch(e.type){case"literal":if(0===e.prefix.length)return this._literalValue=e.value,this._readDataTypeOrLang;this._object=this._factory.literal(e.value,this._factory.namedNode(e.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._factory.blankNode()),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this._subject,this._predicate,this.RDF_NIL),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._factory.blankNode()),this._readSubject):this._error("Unexpected graph",e);case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject):this._error("Unexpected RDF-star syntax",e);default:if(void 0===(this._object=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._getContextEndReader())}return this._getContextEndReader()}_readPredicateOrNamedGraph(e){return"{"===e.type?this._readGraph(e):this._readPredicate(e)}_readGraph(e){return"{"!==e.type?this._error(`Expected graph but got ${e.type}`,e):(this._graph=this._subject,this._subject=null,this._readSubject)}_readBlankNodeHead(e){return"]"===e.type?(this._subject=null,this._readBlankNodeTail(e)):(this._predicate=null,this._readPredicate(e))}_readBlankNodeTail(e){if("]"!==e.type)return this._readBlankNodePunctuation(e);null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph);const t=null===this._predicate;return this._restoreContext("blank",e),null!==this._object?this._getContextEndReader():null!==this._predicate?this._readObject:t?this._readPredicateOrNamedGraph:this._readPredicateAfterBlank}_readPredicateAfterBlank(e){switch(e.type){case".":case"}":return this._subject=null,this._readPunctuation(e);default:return this._readPredicate(e)}}_readListItem(e){let t=null,n=null,r=this._readListItem;const i=this._subject,a=this._contextStack,o=a[a.length-1];switch(e.type){case"[":this._saveContext("blank",this._graph,n=this._factory.blankNode(),this.RDF_FIRST,this._subject=t=this._factory.blankNode()),r=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,n=this._factory.blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext("list",e),0!==a.length&&"list"===a[a.length-1].type&&this._emit(this._subject,this._predicate,this._object,this._graph),null===this._predicate){if(r=this._readPredicate,this._subject===this.RDF_NIL)return r}else if(r=this._getContextEndReader(),this._object===this.RDF_NIL)return r;n=this.RDF_NIL;break;case"literal":0===e.prefix.length?(this._literalValue=e.value,r=this._readListItemDataTypeOrLang):(t=this._factory.literal(e.value,this._factory.namedNode(e.prefix)),r=this._getContextEndReader());break;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._factory.blankNode()),this._readSubject):this._error("Unexpected graph",e);default:if(void 0===(t=this._readEntity(e)))return}if(null===n&&(this._subject=n=this._factory.blankNode()),null===i?null===o.predicate?o.subject=n:o.object=n:this._emit(i,this.RDF_REST,n,this._graph),null!==t){if(this._n3Mode&&("IRI"===e.type||"prefixed"===e.type))return this._saveContext("item",this._graph,n,this.RDF_FIRST,t),this._subject=t,this._predicate=null,this._getPathReader(this._readListItem);this._emit(n,this.RDF_FIRST,t,this._graph)}return r}_readDataTypeOrLang(e){return this._completeObjectLiteral(e,!1)}_readListItemDataTypeOrLang(e){return this._completeObjectLiteral(e,!0)}_completeLiteral(e){let t=this._factory.literal(this._literalValue);switch(e.type){case"type":case"typeIRI":const n=this._readEntity(e);if(void 0===n)return;t=this._factory.literal(this._literalValue,n),e=null;break;case"langcode":t=this._factory.literal(this._literalValue,e.value),e=null}return{token:e,literal:t}}_completeSubjectLiteral(e){return this._subject=this._completeLiteral(e).literal,this._readPredicateOrNamedGraph}_completeObjectLiteral(e,t){const n=this._completeLiteral(e);if(n)return this._object=n.literal,t&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),null===n.token?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(n.token))}_readFormulaTail(e){return"}"!==e.type?this._readPunctuation(e):(null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext("formula",e),null===this._object?this._readPredicate:this._getContextEndReader())}_readPunctuation(e){let t,n=this._graph;const r=this._subject,i=this._inversePredicate;switch(e.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",e);if(this._n3Mode)return this._readFormulaTail(e);this._graph=null;case".":this._subject=null,t=this._contextStack.length?this._readSubject:this._readInTopContext,i&&(this._inversePredicate=!1);break;case";":t=this._readPredicate;break;case",":t=this._readObject;break;case"{|":if(!this._supportsRDFStar)return this._error("Unexpected RDF-star syntax",e);const a=this._predicate,o=this._object;this._subject=this._factory.quad(r,a,o,this.DEFAULTGRAPH),t=this._readPredicate;break;case"|}":if("Quad"!==this._subject.termType)return this._error("Unexpected asserted triple closing",e);this._subject=null,t=this._readPunctuation;break;default:if(this._supportsQuads&&null===this._graph&&void 0!==(n=this._readEntity(e))){t=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}if(null!==r){const e=this._predicate,t=this._object;i?this._emit(t,e,r,n):this._emit(r,e,t,n)}return t}_readBlankNodePunctuation(e){let t;switch(e.type){case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}return this._emit(this._subject,this._predicate,this._object,this._graph),t}_readQuadPunctuation(e){return"."!==e.type?this._error("Expected dot to follow quad",e):this._readInTopContext}_readPrefix(e){return"prefix"!==e.type?this._error("Expected prefix to follow @prefix",e):(this._prefix=e.value,this._readPrefixIRI)}_readPrefixIRI(e){if("IRI"!==e.type)return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,e);const t=this._readEntity(e);return this._prefixes[this._prefix]=t.value,this._prefixCallback(this._prefix,t),this._readDeclarationPunctuation}_readBaseIRI(e){const t="IRI"===e.type&&this._resolveIRI(e.value);return t?(this._setBase(t),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",e)}_readNamedGraphLabel(e){switch(e.type){case"IRI":case"blank":case"prefixed":return this._readSubject(e),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",e)}}_readNamedGraphBlankLabel(e){return"]"!==e.type?this._error("Invalid graph label",e):(this._subject=this._factory.blankNode(),this._readGraph)}_readDeclarationPunctuation(e){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(e)):"."!==e.type?this._error("Expected declaration to end with a dot",e):this._readInTopContext}_readQuantifierList(e){let t;switch(e.type){case"IRI":case"prefixed":if(void 0!==(t=this._readEntity(e,!0)))break;default:return this._error(`Unexpected ${e.type}`,e)}return this._explicitQuantifiers?(null===this._subject?this._emit(this._graph||this.DEFAULTGRAPH,this._predicate,this._subject=this._factory.blankNode(),this.QUANTIFIERS_GRAPH):this._emit(this._subject,this.RDF_REST,this._subject=this._factory.blankNode(),this.QUANTIFIERS_GRAPH),this._emit(this._subject,this.RDF_FIRST,t,this.QUANTIFIERS_GRAPH)):this._quantified[t.id]=this._factory[this._quantifier](this._factory.blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(e){return","===e.type?this._readQuantifierList:(this._explicitQuantifiers&&(this._emit(this._subject,this.RDF_REST,this.RDF_NIL,this.QUANTIFIERS_GRAPH),this._subject=null),this._readCallback=this._getContextEndReader(),this._readCallback(e))}_getPathReader(e){return this._afterPath=e,this._readPath}_readPath(e){switch(e.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const t=this._contextStack,n=t.length&&t[t.length-1];if(n&&"item"===n.type){const t=this._subject;this._restoreContext("item",e),this._emit(this._subject,this.RDF_FIRST,t,this._graph)}return this._afterPath(e)}}_readForwardPath(e){let t,n;const r=this._factory.blankNode();if(void 0!==(n=this._readEntity(e)))return null===this._predicate?(t=this._subject,this._subject=r):(t=this._object,this._object=r),this._emit(t,n,r,this._graph),this._readPath}_readBackwardPath(e){const t=this._factory.blankNode();let n,r;if(void 0!==(n=this._readEntity(e)))return null===this._predicate?(r=this._subject,this._subject=t):(r=this._object,this._object=t),this._emit(t,n,r,this._graph),this._readPath}_readRDFStarTailOrGraph(e){return">>"!==e.type?this._supportsQuads&&null===this._graph&&void 0!==(this._graph=this._readEntity(e))?this._readRDFStarTail:this._error(`Expected >> to follow "${this._object.id}"`,e):this._readRDFStarTail(e)}_readRDFStarTail(e){if(">>"!==e.type)return this._error(`Expected >> but got ${e.type}`,e);const t=this._factory.quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext("<<",e),null===this._subject?(this._subject=t,this._readPredicate):(this._object=t,this._getContextEndReader())}_getContextEndReader(){const e=this._contextStack;if(!e.length)return this._readPunctuation;switch(e[e.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem;case"formula":return this._readFormulaTail;case"<<":return this._readRDFStarTailOrGraph}}_emit(e,t,n,r){this._callback(null,this._factory.quad(e,t,n,r||this.DEFAULTGRAPH))}_error(e,t){const n=new Error(`${e} on line ${t.line}.`);n.context={token:t,line:t.line,previousToken:this._lexer.previousToken},this._callback(n),this._callback=ht}_resolveIRI(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)?e:this._resolveRelativeIRI(e)}_resolveRelativeIRI(e){if(!e.length)return this._base;switch(e[0]){case"#":return this._base+e;case"?":return this._base.replace(/(?:\?.*)?$/,e);case"/":return("/"===e[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(e);default:return/^[^/:]*:/.test(e)?null:this._removeDotSegments(this._basePath+e)}}_removeDotSegments(e){if(!/(^|\/)\.\.?($|[/#?])/.test(e))return e;const t=e.length;let n="",r=-1,i=-1,a=0,o="/";for(;r<t;){switch(o){case":":if(i<0&&"/"===e[++r]&&"/"===e[++r])for(;(i=r+1)<t&&"/"!==e[i];)r=i;break;case"?":case"#":r=t;break;case"/":if("."===e[r+1])switch(o=e[1+ ++r],o){case"/":n+=e.substring(a,r-1),a=r+1;break;case void 0:case"?":case"#":return n+e.substring(a,r)+e.substr(r+1);case".":if(o=e[1+ ++r],void 0===o||"/"===o||"?"===o||"#"===o){if(n+=e.substring(a,r-2),(a=n.lastIndexOf("/"))>=i&&(n=n.substr(0,a)),"/"!==o)return`${n}/${e.substr(r+1)}`;a=r+1}}}o=e[++r]}return n+e.substring(a)}parse(e,t,n){let r,i,a;if(t&&(t.onQuad||t.onPrefix||t.onComment)?(r=t.onQuad,i=t.onPrefix,a=t.onComment):(r=t,i=n),this._readCallback=this._readInTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${dt++}_`,this._prefixCallback=i||ht,this._inversePredicate=!1,this._quantified=Object.create(null),!r){const t=[];let n;if(this._callback=(e,r)=>{e?n=e:r&&t.push(r)},this._lexer.tokenize(e).every(e=>this._readCallback=this._readCallback(e)),n)throw n;return t}let o=(e,t)=>{null!==e?(this._callback(e),this._callback=ht):this._readCallback&&(this._readCallback=this._readCallback(t))};a&&(this._lexer.comments=!0,o=(e,t)=>{null!==e?(this._callback(e),this._callback=ht):this._readCallback&&("comment"===t.type?a(t.value):this._readCallback=this._readCallback(t))}),this._callback=r,this._lexer.tokenize(e,o)}}function ht(){}function mt(e,t){e._factory=t,e.DEFAULTGRAPH=t.defaultGraph(),e.RDF_FIRST=t.namedNode(De.rdf.first),e.RDF_REST=t.namedNode(De.rdf.rest),e.RDF_NIL=t.namedNode(De.rdf.nil),e.N3_FORALL=t.namedNode(De.r.forAll),e.N3_FORSOME=t.namedNode(De.r.forSome),e.ABBREVIATIONS={a:t.namedNode(De.rdf.type),"=":t.namedNode(De.owl.sameAs),">":t.namedNode(De.log.implies),"<":t.namedNode(De.log.isImpliedBy)},e.QUANTIFIERS_GRAPH=t.namedNode("urn:n3:quantifiers")}function gt(e){return!!e&&"NamedNode"===e.termType}function vt(e){return!!e&&"BlankNode"===e.termType}function bt(e){return!!e&&"Literal"===e.termType}function yt(e){return!!e&&"Variable"===e.termType}function wt(e){return!!e&&"Quad"===e.termType}function xt(e){return!!e&&"DefaultGraph"===e.termType}function kt(e){return xt(e.graph)}function _t(e,t){return Et({"":e.value||e},t)("")}function Et(e,t){const n=Object.create(null);for(const t in e)r(t,e[t]);function r(e,r){if("string"==typeof r){const i=Object.create(null);n[e]=e=>i[e]||(i[e]=t.namedNode(r+e))}else if(!(e in n))throw new Error(`Unknown prefix: ${e}`);return n[e]}return t=t||Ye,r}mt(ft.prototype,Ye);Ye.defaultGraph();const{rdf:Ct,xsd:St}=De;var At=n(5721);Symbol("iter");Symbol.iterator;At.Readable,Symbol.iterator;At.Transform;At.Transform;if(void 0===Tt)var Tt={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};class Pt{constructor(e,t){this.options=t||{},this.kb=e,this.target=t.target||{graph:{subjects:{},prefixes:{},terms:{}}},this.blankNodes=[],this.htmlOptions={selfClosing:"br img input area base basefont col colgroup source wbr isindex link meta param hr"},this.theOne="_:"+(new Date).getTime(),this.language=null,this.vocabulary=null,this.blankCounter=0,this.langAttributes=[{namespaceURI:"http://www.w3.org/XML/1998/namespace",localName:"lang"}],this.inXHTMLMode=!1,this.absURIRE=/[\w\_\-]+:\S+/,this.finishedHandlers=[],this.init()}addTriple(e,t,n,r){var i,a,o,s;i=void 0===t?S.namedNode(this.options.base):this.toRDFNodeObject(t),o=this.toRDFNodeObject(n),a=this.toRDFNodeObject(r),s=S.namedNode(this.options.base),this.kb.add(i,o,a,s)}ancestorPath(e){for(var t="";e&&e.nodeType!==Tt.DOCUMENT_NODE;)t="/"+e.localName+t,e=e.parentNode;return t}copyMappings(e){var t={};for(var n in e)t[n]=e[n];return t}copyProperties(){}deriveDateTimeType(e){for(var t=0;t<Pt.dateTimeTypes.length;t++){var n=Pt.dateTimeTypes[t].pattern.exec(e);if(n&&n[0].length===e.length)return Pt.dateTimeTypes[t].type}return null}init(){}newBlankNode(){return this.blankCounter++,"_:"+this.blankCounter}newSubjectOrigin(e,t){}parseCURIE(e,t,n){var r,i=e.indexOf(":");if(i>=0){var a=e.substring(0,i);if(""===a)return(r=t[""])?r+e.substring(i+1):null;if("_"===a)return"_:"+e.substring(i+1);if(Pt.NCNAME.test(a)&&(r=t[a]))return r+e.substring(i+1)}return null}parseCURIEOrURI(e,t,n){var r=this.parseCURIE(e,t,n);return r||this.resolveAndNormalize(n,e)}parsePredicate(e,t,n,r,i,a){if(""===e)return null;var o=this.parseTermOrCURIEOrAbsURI(e,t,a?null:n,r,i);return o&&0===o.indexOf("_:")?null:o}parsePrefixMappings(e,t){for(var n=this.tokenize(e),r=null,i=0;i<n.length;i++)":"===n[i][n[i].length-1]?r=n[i].substring(0,n[i].length-1):r&&(t[r]=this.options.base?x.join(n[i],this.options.base):n[i],r=null)}static parseRDFaDOM(e,t,n){var r=new Pt(t,{base:n});e.baseURI||(e.baseURI=n),r.process(e,{baseURI:n})}parseSafeCURIEOrCURIEOrURI(e,t,n){return"["===(e=this.trim(e)).charAt(0)&&"]"===e.charAt(e.length-1)?0===(e=(e=e.substring(1,e.length-1)).trim(e)).length?null:"_:"===e?this.theOne:this.parseCURIE(e,t,n):this.parseCURIEOrURI(e,t,n)}parseTermOrCURIEOrAbsURI(e,t,n,r,i){e=this.trim(e);var a=this.parseCURIE(e,r,i);if(a)return a;if(n){if(t&&!this.absURIRE.exec(e))return t+e;var o=n[e];if(o)return o;if(o=n[e.toLowerCase()])return o}return this.absURIRE.exec(e)?this.resolveAndNormalize(i,e):null}parseTermOrCURIEOrURI(e,t,n,r,i){e=this.trim(e);var a=this.parseCURIE(e,r,i);if(a)return a;var o=n[e];return o||((o=n[e.toLowerCase()])?o:t&&!this.absURIRE.exec(e)?t+e:this.resolveAndNormalize(i,e))}parseURI(e){return e}process(e,t){var n;t=t||{},e.nodeType===Tt.DOCUMENT_NODE?(e.baseURI&&!t.baseURI&&(t.baseURI=e.baseURI),n=e.baseURI,(e=e.documentElement).baseURI||(e.baseURI=n),this.setContext(e)):e.parentNode.nodeType===Tt.DOCUMENT_NODE&&this.setContext(e);var r=[],i=function(e){if(!e&&t&&t.baseURI)return t.baseURI;var n=e.indexOf("#");return n>=0&&(e=e.substring(0,n)),t&&t.baseURIMap&&(e=t.baseURIMap(e)),e};for(r.push({current:e,context:this.push(null,i(e.baseURI))});r.length>0;){var a=r.shift();if(a.parent){if(a.context.parent&&a.context.parent.listMapping===a.listMapping)continue;for(let e in a.listMapping){var o=a.listMapping[e];if(0!==o.length){var s=[];for(let e=0;e<o.length;e++)s.push(this.newBlankNode());for(let e=0;e<s.length;e++)this.addTriple(a.parent,s[e],"http://www.w3.org/1999/02/22-rdf-syntax-ns#first",o[e]),this.addTriple(a.parent,s[e],"http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",{type:Pt.objectURI,value:e+1<s.length?s[e+1]:"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"});this.addTriple(a.parent,a.subject,e,{type:Pt.objectURI,value:s[0]})}else this.addTriple(a.parent,a.subject,e,{type:Pt.objectURI,value:"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"})}}else{var c=a.current,l=a.context,u=!1,p=null,d=null,f=null,h=l.prefixes,m=!1,g=[],v=l.listMapping,b=!l.parent,y=l.language,w=l.vocabulary;n=this.parseURI(i(c.baseURI)),c.item=null;var k=c.getAttributeNode("vocab");if(k){let e=this.trim(k.value);if(e.length>0){w=e;var _=n.spec;this.addTriple(c,_,"http://www.w3.org/ns/rdfa#usesVocabulary",{type:Pt.objectURI,value:w})}else w=this.vocabulary}for(var E=0;E<c.attributes.length;E++){var C=c.attributes[E];if("x"===C.nodeName.charAt(0)&&0===C.nodeName.indexOf("xmlns:")){m||(h=this.copyMappings(h),m=!0);var S=C.nodeName.substring(6),A=Pt.trim(C.value);h[S]=this.options.base?x.join(A,this.options.base):A}}var T=c.getAttributeNode("prefix");T&&(m||(h=this.copyMappings(h),m=!0),this.parsePrefixMappings(T.value,h));var P=null;for(let e=0;!P&&e<this.langAttributes.length;e++)P=c.getAttributeNodeNS(this.langAttributes[e].namespaceURI,this.langAttributes[e].localName);if(P){let e=Pt.trim(P.value);y=e.length>0?e:null}var R,I,F=c.getAttributeNode("rel"),N=c.getAttributeNode("rev"),O=c.getAttributeNode("typeof"),L=c.getAttributeNode("property"),j=c.getAttributeNode("datatype"),M=this.inHTMLMode?c.getAttributeNode("datetime"):null,D=c.getAttributeNode("content"),U=c.getAttributeNode("about"),B=c.getAttributeNode("src"),z=c.getAttributeNode("resource"),H=c.getAttributeNode("href"),q=c.getAttributeNode("inlist"),$=[];if(F){I=this.tokenize(F.value);for(let e=0;e<I.length;e++)(R=this.parsePredicate(I[e],w,l.terms,h,n,this.inHTMLMode&&null!==L))&&$.push(R)}var W=[];if(N){I=this.tokenize(N.value);for(let e=0;e<I.length;e++)(R=this.parsePredicate(I[e],w,l.terms,h,n,this.inHTMLMode&&L))&&W.push(R)}if(this.inHTMLMode&&(F||N)&&L&&(0===$.length&&(F=null),0===W.length&&(N=null)),F||N?(U&&(p=this.parseSafeCURIEOrCURIEOrURI(U.value,h,n)),O&&(f=p),p||(c.parentNode.nodeType===Tt.DOCUMENT_NODE?p=i(c.baseURI):l.parentObject&&(p=i(c.parentNode.baseURI)===l.parentObject?i(c.baseURI):l.parentObject)),z&&(d=this.parseSafeCURIEOrCURIEOrURI(z.value,h,n)),d||(H?d=this.resolveAndNormalize(n,encodeURI(H.value)):B?d=this.resolveAndNormalize(n,encodeURI(B.value)):!O||U||this.inXHTMLMode&&("head"===c.localName||"body"===c.localName)||(d=this.newBlankNode())),!O||U||!this.inXHTMLMode||"head"!==c.localName&&"body"!==c.localName?O&&!U&&(f=d):f=p):!L||D||j?(U&&(p=this.parseSafeCURIEOrCURIEOrURI(U.value,h,n)),!p&&z&&(p=this.parseSafeCURIEOrCURIEOrURI(z.value,h,n)),!p&&H&&(p=this.resolveAndNormalize(n,encodeURI(H.value))),!p&&B&&(p=this.resolveAndNormalize(n,encodeURI(B.value))),p||(c.parentNode.nodeType===Tt.DOCUMENT_NODE?p=i(c.baseURI):!this.inXHTMLMode&&!this.inHTMLMode||"head"!==c.localName&&"body"!==c.localName?O?p=this.newBlankNode():l.parentObject&&(p=i(c.parentNode.baseURI)===l.parentObject?i(c.baseURI):l.parentObject,L||(u=!0)):p=i(c.parentNode.baseURI)===l.parentObject?i(c.baseURI):l.parentObject),O&&(f=p)):(U&&(p=this.parseSafeCURIEOrCURIEOrURI(U.value,h,n),O&&(f=p)),p||c.parentNode.nodeType!==Tt.DOCUMENT_NODE?!p&&l.parentObject&&(p=i(c.parentNode.baseURI)===l.parentObject?i(c.baseURI):l.parentObject):(p=i(c.baseURI),O&&(f=p)),O&&!f&&(z&&(f=this.parseSafeCURIEOrCURIEOrURI(z.value,h,n)),!f&&H&&(f=this.resolveAndNormalize(n,encodeURI(H.value))),!f&&B&&(f=this.resolveAndNormalize(n,encodeURI(B.value))),f||!this.inXHTMLMode&&!this.inHTMLMode||"head"!==c.localName&&"body"!==c.localName||(f=p),f||(f=this.newBlankNode()),d=f)),p&&(U||z||f)){var V=p;O&&!U&&!z&&d&&(V=d),this.newSubjectOrigin(c,V)}if(f){I=this.tokenize(O.value);for(let e=0;e<I.length;e++){var G=this.parseTermOrCURIEOrAbsURI(I[e],w,l.terms,h,n);G&&this.addTriple(c,f,Pt.typeURI,{type:Pt.objectURI,value:G})}}if(p&&p!==l.parentObject&&(v={},b=!0),d){if(F&&q)for(let e=0;e<$.length;e++){let t=v[$[e]];t||(t=[],v[$[e]]=t),t.push({type:Pt.objectURI,value:d})}else if(F)for(let e=0;e<$.length;e++)this.addTriple(c,p,$[e],{type:Pt.objectURI,value:d});if(N)for(let e=0;e<W.length;e++)this.addTriple(c,d,W[e],{type:Pt.objectURI,value:p})}else{if(p&&!d&&(F||N)&&(d=this.newBlankNode()),F&&q)for(let e=0;e<$.length;e++){let t=v[$[e]];t||(t=[],v[R]=t),g.push({predicate:$[e],list:t})}else if(F)for(let e=0;e<$.length;e++)g.push({predicate:$[e],forward:!0});if(N)for(let e=0;e<W.length;e++)g.push({predicate:W[e],forward:!1})}if(L){var K=null,J=null;j?(K=""===j.value?Pt.PlainLiteralURI:this.parseTermOrCURIEOrAbsURI(j.value,w,l.terms,h,n),J=M&&!D?M.value:K===Pt.XMLLiteralURI||K===Pt.HTMLLiteralURI?null:D?D.value:c.textContent):D?(K=Pt.PlainLiteralURI,J=D.value):M?(J=M.value,(K=Pt.deriveDateTimeType(J))||(K=Pt.PlainLiteralURI)):F||N||(z&&(J=this.parseSafeCURIEOrCURIEOrURI(z.value,h,n)),!J&&H?J=this.resolveAndNormalize(n,encodeURI(H.value)):!J&&B&&(J=this.resolveAndNormalize(n,encodeURI(B.value))),J&&(K=Pt.objectURI)),K||(O&&!U?(K=Pt.objectURI,J=f):(J=c.textContent,this.inHTMLMode&&"time"===c.localName&&(K=Pt.deriveDateTimeType(J)),K||(K=Pt.PlainLiteralURI))),I=this.tokenize(L.value);for(let e=0;e<I.length;e++){let t=this.parsePredicate(I[e],w,l.terms,h,n);if(t)if(q){let e=v[t];e||(e=[],v[t]=e),e.push(K===Pt.XMLLiteralURI||K===Pt.HTMLLiteralURI?{type:K,value:c.childNodes}:{type:K||Pt.PlainLiteralURI,value:J,language:y})}else K===Pt.XMLLiteralURI||K===Pt.HTMLLiteralURI?this.addTriple(c,p,t,{type:K,value:c.childNodes}):this.addTriple(c,p,t,{type:K||Pt.PlainLiteralURI,value:J,language:y})}}if(p&&!u)for(let e=0;e<l.incomplete.length;e++)l.incomplete[e].list?l.incomplete[e].list.push({type:Pt.objectURI,value:p}):l.incomplete[e].forward?this.addTriple(c,l.subject,l.incomplete[e].predicate,{type:Pt.objectURI,value:p}):this.addTriple(c,p,l.incomplete[e].predicate,{type:Pt.objectURI,value:l.subject});var Q=null,Y=p;u?((Q=this.push(l,l.subject)).parentObject=i(c.parentNode.baseURI)===l.parentObject?i(c.baseURI):l.parentObject,Q.incomplete=l.incomplete,Q.language=y,Q.prefixes=h,Q.vocabulary=w):((Q=this.push(l,p)).parentObject=d||p||l.subject,Q.prefixes=h,Q.incomplete=g,d&&(Y=d,v={},b=!0),Q.listMapping=v,Q.language=y,Q.vocabulary=w),b&&r.unshift({parent:c,context:l,subject:Y,listMapping:v});for(var X=c.lastChild;X;X=X.previousSibling)X.nodeType===Tt.ELEMENT_NODE&&r.unshift({current:X,context:Q})}}this.inHTMLMode&&this.copyProperties();for(let t=0;t<this.finishedHandlers.length;t++)this.finishedHandlers[t](e)}push(e,t){return{parent:e,subject:t||(e?e.subject:null),parentObject:null,incomplete:[],listMapping:e?e.listMapping:{},language:e?e.language:this.language,prefixes:e?e.prefixes:this.target.graph.prefixes,terms:e?e.terms:this.target.graph.terms,vocabulary:e?e.vocabulary:this.vocabulary}}resolveAndNormalize(e,t){return x.join(t,e)}setContext(e){"html"===e.localName&&"XHTML+RDFa 1.1"===e.getAttribute("version")?this.setXHTMLContext():"html"===e.localName||"http://www.w3.org/1999/xhtml"===e.namespaceURI?"undefined"!=typeof document&&document.doctype?"-//W3C//DTD XHTML+RDFa 1.0//EN"===document.doctype.publicId&&"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"===document.doctype.systemId?this.setHTMLContext():"-//W3C//DTD XHTML+RDFa 1.1//EN"===document.doctype.publicId&&"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd"===document.doctype.systemId?this.setXHTMLContext():this.setHTMLContext():this.setHTMLContext():this.setXMLContext()}setHTMLContext(){this.setInitialContext(),this.langAttributes=[{namespaceURI:"http://www.w3.org/XML/1998/namespace",localName:"lang"},{namespaceURI:null,localName:"lang"}],this.inXHTMLMode=!1,this.inHTMLMode=!0}setInitialContext(){this.vocabulary=null,this.langAttributes=[{namespaceURI:"http://www.w3.org/XML/1998/namespace",localName:"lang"}]}setXHTMLContext(){this.setInitialContext(),this.inXHTMLMode=!0,this.inHTMLMode=!1,this.langAttributes=[{namespaceURI:"http://www.w3.org/XML/1998/namespace",localName:"lang"},{namespaceURI:null,localName:"lang"}],this.target.graph.terms.alternate="http://www.w3.org/1999/xhtml/vocab#alternate",this.target.graph.terms.appendix="http://www.w3.org/1999/xhtml/vocab#appendix",this.target.graph.terms.bookmark="http://www.w3.org/1999/xhtml/vocab#bookmark",this.target.graph.terms.cite="http://www.w3.org/1999/xhtml/vocab#cite",this.target.graph.terms.chapter="http://www.w3.org/1999/xhtml/vocab#chapter",this.target.graph.terms.contents="http://www.w3.org/1999/xhtml/vocab#contents",this.target.graph.terms.copyright="http://www.w3.org/1999/xhtml/vocab#copyright",this.target.graph.terms.first="http://www.w3.org/1999/xhtml/vocab#first",this.target.graph.terms.glossary="http://www.w3.org/1999/xhtml/vocab#glossary",this.target.graph.terms.help="http://www.w3.org/1999/xhtml/vocab#help",this.target.graph.terms.icon="http://www.w3.org/1999/xhtml/vocab#icon",this.target.graph.terms.index="http://www.w3.org/1999/xhtml/vocab#index",this.target.graph.terms.last="http://www.w3.org/1999/xhtml/vocab#last",this.target.graph.terms.license="http://www.w3.org/1999/xhtml/vocab#license",this.target.graph.terms.meta="http://www.w3.org/1999/xhtml/vocab#meta",this.target.graph.terms.next="http://www.w3.org/1999/xhtml/vocab#next",this.target.graph.terms.prev="http://www.w3.org/1999/xhtml/vocab#prev",this.target.graph.terms.previous="http://www.w3.org/1999/xhtml/vocab#previous",this.target.graph.terms.section="http://www.w3.org/1999/xhtml/vocab#section",this.target.graph.terms.stylesheet="http://www.w3.org/1999/xhtml/vocab#stylesheet",this.target.graph.terms.subsection="http://www.w3.org/1999/xhtml/vocab#subsection",this.target.graph.terms.start="http://www.w3.org/1999/xhtml/vocab#start",this.target.graph.terms.top="http://www.w3.org/1999/xhtml/vocab#top",this.target.graph.terms.up="http://www.w3.org/1999/xhtml/vocab#up",this.target.graph.terms.p3pv1="http://www.w3.org/1999/xhtml/vocab#p3pv1",this.target.graph.terms.related="http://www.w3.org/1999/xhtml/vocab#related",this.target.graph.terms.role="http://www.w3.org/1999/xhtml/vocab#role",this.target.graph.terms.transformation="http://www.w3.org/1999/xhtml/vocab#transformation"}setXMLContext(){this.setInitialContext(),this.inXHTMLMode=!1,this.inHTMLMode=!1}tokenize(e){return this.trim(e).split(/\s+/)}static tokenize(e){return this.trim(e).split(/\s+/)}toRDFNodeObject(e){if(void 0!==e){if("string"==typeof e)return"_:"===e.substring(0,2)?(void 0===this.blankNodes[e.substring(2)]&&(this.blankNodes[e.substring(2)]=new c(e.substring(2))),this.blankNodes[e.substring(2)]):S.namedNode(e);switch(e.type){case Pt.objectURI:return"_:"===e.value.substring(0,2)?(void 0===this.blankNodes[e.value.substring(2)]&&(this.blankNodes[e.value.substring(2)]=new c(e.value.substring(2))),this.blankNodes[e.value.substring(2)]):S.namedNode(e.value);case Pt.PlainLiteralURI:return new d(e.value,e.language||"");case Pt.XMLLiteralURI:case Pt.HTMLLiteralURI:var t="";return Object.keys(e.value).forEach(n=>{t+=F.domToString(e.value[n],this.htmlOptions)}),new d(t,"",new l.A(e.type));default:return new d(e.value,"",new l.A(e.type))}}}trim(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}static trim(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}}Pt.XMLLiteralURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral",Pt.HTMLLiteralURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML",Pt.PlainLiteralURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral",Pt.objectURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#object",Pt.typeURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",Pt.nameChar="[-A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�က0-F.0-9·̀-ͯ‿-⁀]",Pt.nameStartChar="[A-Za-zÀ-ÖØ-öø-ÿĀ-ıĴ-ľŁ-ňŊ-žƀ-ǃǍ-ǰǴ-ǵǺ-ȗɐ-ʨʻ-ˁΆΈ-ΊΌΎ-ΡΣ-ώϐ-ϖϚϜϞϠϢ-ϳЁ-ЌЎ-яё-ќў-ҁҐ-ӄӇ-ӈӋ-ӌӐ-ӫӮ-ӵӸ-ӹԱ-Ֆՙա-ֆא-תװ-ײء-غف-يٱ-ڷں-ھۀ-ێې-ۓەۥ-ۦअ-हऽक़-ॡঅ-ঌএ-ঐও-নপ-রলশ-হড়-ঢ়য়-ৡৰ-ৱਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઋઍએ-ઑઓ-નપ-રલ-ળવ-હઽૠଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଶ-ହଽଡ଼-ଢ଼ୟ-ୡஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-வஷ-ஹఅ-ఌఎ-ఐఒ-నప-ళవ-హౠ-ౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹೞೠ-ೡഅ-ഌഎ-ഐഒ-നപ-ഹൠ-ൡก-ฮะา-ำเ-ๅກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ຮະາ-ຳຽເ-ໄཀ-ཇཉ-ཀྵႠ-Ⴥა-ჶᄀᄂ-ᄃᄅ-ᄇᄉᄋ-ᄌᄎ-ᄒᄼᄾᅀᅌᅎᅐᅔ-ᅕᅙᅟ-ᅡᅣᅥᅧᅩᅭ-ᅮᅲ-ᅳᅵᆞᆨᆫᆮ-ᆯᆷ-ᆸᆺᆼ-ᇂᇫᇰᇹḀ-ẛẠ-ỹἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼΩK-Å℮ↀ-ↂぁ-ゔァ-ヺㄅ-ㄬ가-힣一-龥〇〡-〩_]",Pt.NCNAME=new RegExp("^"+Pt.nameStartChar+Pt.nameChar+"*$"),Pt.dateTimeTypes=[{pattern:/-?P(?:[0-9]+Y)?(?:[0-9]+M)?(?:[0-9]+D)?(?:T(?:[0-9]+H)?(?:[0-9]+M)?(?:[0-9]+(?:\.[0-9]+)?S)?)?/,type:"http://www.w3.org/2001/XMLSchema#duration"},{pattern:/-?(?:[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9])-[0-9][0-9]-[0-9][0-9]T(?:[0-1][0-9]|2[0-4]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]+)?(?:Z|[+\-][0-9][0-9]:[0-9][0-9])?/,type:"http://www.w3.org/2001/XMLSchema#dateTime"},{pattern:/-?(?:[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9])-[0-9][0-9]-[0-9][0-9](?:Z|[+\-][0-9][0-9]:[0-9][0-9])?/,type:"http://www.w3.org/2001/XMLSchema#date"},{pattern:/(?:[0-1][0-9]|2[0-4]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]+)?(?:Z|[+\-][0-9][0-9]:[0-9][0-9])?/,type:"http://www.w3.org/2001/XMLSchema#time"},{pattern:/-?(?:[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9])-[0-9][0-9]/,type:"http://www.w3.org/2001/XMLSchema#gYearMonth"},{pattern:/-?[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9]/,type:"http://www.w3.org/2001/XMLSchema#gYear"}];const Rt=Pt.parseRDFaDOM;class It{constructor(e){this.store=e,this.bnodes={},this.why=null,this.reify=!1}frameFactory(e,t,n){return{NODE:1,ARC:2,parent:t,parser:e,store:e.store,element:n,lastChild:0,base:null,lang:null,node:null,nodeType:null,listIndex:1,rdfid:null,datatype:null,collection:!1,terminateFrame:function(){this.collection&&this.node.close()},addSymbol:function(e,t){t=x.join(t,this.base),this.node=this.store.sym(t),this.nodeType=e},loadTriple:function(){if(this.parent.parent.collection?this.parent.parent.node.append(this.node):this.store.add(this.parent.parent.node,this.parent.node,this.node,this.parser.why),null!=this.parent.rdfid){var e=this.store.sym(x.join("#"+this.parent.rdfid,this.base));this.store.add(e,this.store.sym(It.ns.RDF+"type"),this.store.sym(It.ns.RDF+"Statement"),this.parser.why),this.store.add(e,this.store.sym(It.ns.RDF+"subject"),this.parent.parent.node,this.parser.why),this.store.add(e,this.store.sym(It.ns.RDF+"predicate"),this.parent.node,this.parser.why),this.store.add(e,this.store.sym(It.ns.RDF+"object"),this.node,this.parser.why)}},isTripleToLoad:function(){return null!=this.parent&&null!=this.parent.parent&&this.nodeType===this.NODE&&this.parent.nodeType===this.ARC&&this.parent.parent.nodeType===this.NODE},addNode:function(e){this.addSymbol(this.NODE,e),this.isTripleToLoad()&&this.loadTriple()},addCollection:function(){this.nodeType=this.NODE,this.node=this.store.collection(),this.collection=!0,this.isTripleToLoad()&&this.loadTriple()},addCollectionArc:function(){this.nodeType=this.ARC},addBNode:function(e){null!=e?null!=this.parser.bnodes[e]?this.node=this.parser.bnodes[e]:this.node=this.parser.bnodes[e]=this.store.bnode():this.node=this.store.bnode(),this.nodeType=this.NODE,this.isTripleToLoad()&&this.loadTriple()},addArc:function(e){e===It.ns.RDF+"li"&&(e=It.ns.RDF+"_"+this.parent.listIndex,this.parent.listIndex++),this.addSymbol(this.ARC,e)},addLiteral:function(e){this.parent.datatype&&this.parent.datatype!==It.ns.RDF+"langString"?this.node=this.store.literal(e,this.store.sym(this.parent.datatype)):this.node=this.store.literal(e,this.lang),this.nodeType=this.NODE,this.isTripleToLoad()&&this.loadTriple()}}}getAttributeNodeNS(e,t,n){var r=null;if(e.getAttributeNodeNS)r=e.getAttributeNodeNS(t,n);else for(var i,a=e.attributes,o=0;o<a.length;++o)if((i=a[o]).namespaceURI===t&&(i.prefix?i.prefix+":"+n:n)===i.nodeName){r=i;break}return r}parse(e,t,n){var r,i=e.childNodes;if(this.cleanParser(),e.nodeType===It.nodeType.DOCUMENT){for(var a=0;a<i.length;a++)if(i[a].nodeType===It.nodeType.ELEMENT){r=i[a];break}}else{if(e.nodeType!==It.nodeType.ELEMENT)throw new Error("RDFParser: can't find root in "+t+". Halting. ");r=e}this.why=n;var o=this.frameFactory(this);return this.base=t,o.base=t,o.lang=null,this.parseDOM(this.buildFrame(o,r)),!0}parseDOM(e){for(var t,n=function(e){var t="";if(null==e.namespaceURI)throw new Error("RDF/XML syntax error: No namespace for "+e.localName+" in "+this.base);return e.namespaceURI&&(t+=e.namespaceURI),e.localName?t+=e.localName:e.nodeName&&(e.nodeName.indexOf(":")>=0?t+=e.nodeName.split(":")[1]:t+=e.nodeName),t}.bind(this),r=!0;e.parent;){var i=e.element,a=i.attributes;if(i.nodeType===It.nodeType.TEXT||i.nodeType===It.nodeType.CDATA_SECTION)e.parent.nodeType===e.NODE&&(e.addArc(It.ns.RDF+"value"),e=this.buildFrame(e)),e.addLiteral(i.nodeValue);else if(n(i)!==It.ns.RDF+"RDF")if(e.parent&&e.parent.collection&&(e.addCollectionArc(),(e=this.buildFrame(e,e.element)).parent.element=null),e.parent&&e.parent.nodeType&&e.parent.nodeType!==e.ARC){e.addArc(n(i)),this.reify&&(t=this.getAttributeNodeNS(i,It.ns.RDF,"ID"))&&(e.rdfid=t.nodeValue,i.removeAttributeNode(t));var o=this.getAttributeNodeNS(i,It.ns.RDF,"parseType"),s=this.getAttributeNodeNS(i,It.ns.RDF,"datatype");if(s&&(e.datatype=s.nodeValue,i.removeAttributeNode(s)),o){var c=o.nodeValue;"Literal"===c?(e.datatype=It.ns.RDF+"XMLLiteral",(e=this.buildFrame(e)).addLiteral(i.innerHTML||i.childNodes),r=!1):"Resource"===c?((e=this.buildFrame(e,e.element)).parent.element=null,e.addBNode()):"Collection"===c&&((e=this.buildFrame(e,e.element)).parent.element=null,e.addCollection()),i.removeAttributeNode(o)}if(0!==a.length){var l=this.getAttributeNodeNS(i,It.ns.RDF,"resource"),u=this.getAttributeNodeNS(i,It.ns.RDF,"nodeID");e=this.buildFrame(e),l?(e.addNode(l.nodeValue),i.removeAttributeNode(l)):u?(e.addBNode(u.nodeValue),i.removeAttributeNode(u)):e.addBNode();for(var p=a.length-1;p>=0;p--){var d=this.buildFrame(e);d.addArc(n(a[p])),n(a[p])===It.ns.RDF+"type"?this.buildFrame(d).addNode(a[p].nodeValue):this.buildFrame(d).addLiteral(a[p].nodeValue)}}else 0===i.childNodes.length&&this.buildFrame(e).addLiteral("")}else{var f=this.getAttributeNodeNS(i,It.ns.RDF,"about");if(t=this.getAttributeNodeNS(i,It.ns.RDF,"ID"),f&&t)throw new Error("RDFParser: "+i.nodeName+" has both rdf:id and rdf:about. Halting. Only one of these properties may be specified on a node.");if(!f&&t)e.addNode("#"+t.nodeValue),i.removeAttributeNode(t);else if(null==f&&null==t){var h=this.getAttributeNodeNS(i,It.ns.RDF,"nodeID");h?(e.addBNode(h.nodeValue),i.removeAttributeNode(h)):e.addBNode()}else e.addNode(f.nodeValue),i.removeAttributeNode(f);var m=this.getAttributeNodeNS(i,It.ns.RDF,"type");It.ns.RDF+"Description"!==n(i)&&(m={nodeValue:n(i)}),null!=m&&(this.store.add(e.node,this.store.sym(It.ns.RDF+"type"),this.store.sym(x.join(m.nodeValue,e.base)),this.why),m.nodeName&&i.removeAttributeNode(m));for(var g=a.length-1;g>=0;g--)this.store.add(e.node,this.store.sym(n(a[g])),this.store.literal(a[g].nodeValue,e.lang),this.why)}for(i=e.element;e.parent;){for(var v=e;null==i;)i=(e=e.parent).element;var b=i.childNodes&&i.childNodes[e.lastChild];if(b&&r){if((b.nodeType===It.nodeType.ELEMENT||b.nodeType===It.nodeType.TEXT||b.nodeType===It.nodeType.CDATA_SECTION)&&(b.nodeType!==It.nodeType.TEXT&&b.nodeType!==It.nodeType.CDATA_SECTION||1===i.childNodes.length)){e.lastChild++,e=this.buildFrame(v,i.childNodes[e.lastChild-1]);break}e.lastChild++}else{if(e.terminateFrame(),!(e=e.parent))break;i=e.element,r=!0}}}}cleanParser(){this.bnodes={},this.why=null}buildFrame(e,t){var n=this.frameFactory(this,e,t);if(e&&(n.base=e.base,n.lang=e.lang),!t||t.nodeType===It.nodeType.TEXT||t.nodeType===It.nodeType.CDATA_SECTION)return n;var r=t.attributes,i=t.getAttributeNode("xml:base");null!=i&&(n.base=i.nodeValue,t.removeAttribute("xml:base"));var a=t.getAttributeNode("xml:lang");null!=a&&(n.lang=a.nodeValue,t.removeAttribute("xml:lang"));for(var o=r.length-1;o>=0;o--)if("xml"===r[o].nodeName.substr(0,3)){if("xmlns:"===r[o].name.slice(0,6)){var s=r[o].nodeValue;this.base&&(s=x.join(s,this.base)),this.store.setPrefixForURI(r[o].name.slice(6),s)}t.removeAttributeNode(r[o])}return n}}function Ft(e,t,n){var r,i,a,o=["INSERT","DELETE","WHERE"],s=T("http://www.w3.org/ns/pim/patch#"),c=_e(t,t,n,n,null,null,"",null),l={},u=function(e,t,n,r,i){return"Line "+(t+1)+" of <"+e+">: Bad syntax:\n "+i+'\n at: "'+n.slice(r,r+30)+'"'};r=0;var p=t.sym(n+"#query");for(l.query=p;;){if((i=c.skipSpace(e,r))<0)return l;if(";"===e[i]){if((r=c.skipSpace(e,i+1))<0)return l;i=r}var d=!1;for(a=0;a<o.length;a++){var f=o[a];if(e.slice(i,i+f.length)===f){if((r=c.skipSpace(e,i+f.length))<0)throw u(c._thisDoc,c.lines,e,i+f.length,"found EOF, needed {...} after "+f);if(("INSERT"===f||"DELETE"===f)&&"DATA"===e.slice(r,r+4)){if((i=c.skipSpace(e,r+4))<0)throw u(c._thisDoc,c.lines,e,r+4,"needed {...} after INSERT DATA "+f);r=i}var h=[];if((i=c.node(e,r,h))<0)throw u(c._thisDoc,c.lines,e,r,"bad syntax or EOF in {...} after "+f);l[f.toLowerCase()]=h[0],t.add(p,s(f.toLowerCase()),h[0]),d=!0,r=i}}if(!d&&"@prefix"===e.slice(i,i+7)){if((r=c.directive(e,i))<0)throw u(c._thisDoc,c.lines,e,r,"bad syntax or EOF after @prefix ");r=c.checkDot(e,r),d=!0}if(!d)throw u(c._thisDoc,c.lines,e,i,"Unknown syntax at start of statememt: '"+e.slice(i).slice(0,20)+"'")}}function Nt(e,t,n,r="text/turtle",i){r=(r=r||s.sT).split(";")[0];try{if(r===s.ny||r===s.sT)_e(t,t,n,n,null,null,"",null).loadBuf(e),o();else if(r===s.JG){new It(t).parse(F.parseXML(e),n,t.sym(n)),o()}else if(r===s.H)Rt(F.parseXML(e,{contentType:s.H}),t,n),o();else if(r===s.lc)Rt(F.parseXML(e,{contentType:s.lc}),t,n),o();else if(r===s.K9||r===s.Fn)Ft(e,t,n),o();else if(r===s.i2)Re(e,t,n).then(o).catch(c);else{if(r!==s._0&&r!==s.BR)throw void 0===r?new Error("contentType is undefined"):new Error("Don't know how to parse "+r+" yet");var a=new ft({factory:Te});!function(e,n){e&&i(e,t);try{a.parse(n,l)}catch(e){i(e,t)}}(null,e)}}catch(e){c(e)}function o(){i&&i(null,t)}function c(e){if(r!==s.i2||r!==s._0||r!==s.BR){if(!i){let t=new Error(e+" while trying to parse <"+n+"> as "+r);throw t.cause=e,t}i(e,t)}}function l(e,n){n?t.add(n.subject,n.predicate,n.object,n.graph):i(e,t)}Nt.handled={"text/n3":!0,"text/turtle":!0,"application/rdf+xml":!0,"application/xhtml+xml":!0,"text/html":!0,"application/sparql-update":!0,"application/sparql-update-single-match":!0,"application/ld+json":!0,"application/nquads":!0,"application/n-quads":!0}}(0,i.A)(It,"ns",{RDF:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",RDFS:"http://www.w3.org/2000/01/rdf-schema#"}),(0,i.A)(It,"nodeType",{ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12});var Ot=n(4945),Lt=n.n(Ot),jt=n(2931);const Mt={"text/n3":!0,"text/turtle":!0,"application/rdf+xml":!0,"application/xhtml+xml":!0,"text/html":!0,"application/ld+json":!0},Dt={rdf:s.JG,owl:s.JG,n3:"text/n3",ttl:"text/turtle",nt:"text/n3",acl:"text/n3",html:"text/html",xml:"text/xml"},Ut=e=>({link:T("http://www.w3.org/2007/ont/link#",e),http:T("http://www.w3.org/2007/ont/http#",e),httph:T("http://www.w3.org/2007/ont/httph#",e),rdf:T("http://www.w3.org/1999/02/22-rdf-syntax-ns#",e),rdfs:T("http://www.w3.org/2000/01/rdf-schema#",e),dc:T("http://purl.org/dc/elements/1.1/",e),ldp:T("http://www.w3.org/ns/ldp#",e)}),Bt=Ut();class zt{constructor(e,t){(0,i.A)(this,"response",void 0),(0,i.A)(this,"dom",void 0),this.response=e,this.dom=t}}(0,i.A)(zt,"pattern",void 0);class Ht extends zt{static toString(){return"RDFXMLHandler"}static register(e){e.mediatypes[s.JG]={q:.9}}parse(e,t,n){let r=e.store;this.dom||(this.dom=F.parseXML(t));let i=this.dom.documentElement;if(i&&"parsererror"===i.nodeName)return e.failFetch(n,"Badly formed XML in "+n.resource.value,"parse_error");let a=new It(r);try{a.parse(this.dom,n.original.value,n.original)}catch(t){return e.failFetch(n,"Syntax error parsing RDF/XML! "+t,"parse_error")}return n.noMeta||r.add(n.original,Bt.rdf("type"),Bt.link("RDFDocument"),e.appNode),e.doneFetch(n,this.response)}}Ht.pattern=new RegExp("application/rdf\\+xml");class qt extends zt{static toString(){return"XHTMLHandler"}static register(e){e.mediatypes[s.H]={q:.8}}parse(e,t,n){let r,i;this.dom||(this.dom=F.parseXML(t));let a=e.store,o=this.dom.getElementsByTagName("title");o.length>0&&a.add(n.resource,Bt.dc("title"),a.rdfFactory.literal(o[0].textContent),n.resource);let s=this.dom.getElementsByTagName("link");for(let t=s.length-1;t>=0;t--)r=s[t].getAttribute("rel"),i=!1,r||(r=s[t].getAttribute("rev"),i=!0),r&&e.linkData(n.original,r,s[t].getAttribute("href"),n.resource,i);let c=this.dom.getElementsByTagName("script");for(let e=0;e<c.length;e++){let t=c[e].getAttribute("type");Mt[t]&&(Nt(c[e].textContent,a,n.original.value,t),Nt(c[e].textContent,a,n.original.value,t))}if(n.noMeta||a.add(n.resource,Bt.rdf("type"),Bt.link("WebPage"),e.appNode),!n.noRDFa&&Rt)try{Rt(this.dom,a,n.original.value)}catch(t){let r="Error trying to parse "+n.resource+" as RDFa:\n"+t+":\n"+t.stack;return e.failFetch(n,r,"parse_error")}return e.doneFetch(n,this.response)}}qt.pattern=new RegExp("application/xhtml");class $t extends zt{static toString(){return"XMLHandler"}static register(e){e.mediatypes["text/xml"]={q:.5},e.mediatypes["application/xml"]={q:.5}}static isElement(e){return e.nodeType===Node.ELEMENT_NODE}parse(e,t,n){let r=F.parseXML(t);for(let i=0;i<r.childNodes.length;i++){const a=r.childNodes[i];if($t.isElement(a)){let i=a.namespaceURI;if(i&&i===i.rdf){return e.addStatus(n.req,"Has XML root element in the RDF namespace, so assume RDF/XML."),new Ht(this.response,r).parse(e,t,n)}break}}if(r.doctype&&"html"===r.doctype.name&&r.doctype.publicId.match(/^-\/\/W3C\/\/DTD XHTML/)&&r.doctype.systemId.match(/http:\/\/www.w3.org\/TR\/xhtml/)){return e.addStatus(n.req,"Has XHTML DOCTYPE. Switching to XHTML Handler.\n"),new qt(this.response,r).parse(e,t,n)}let i=r.getElementsByTagName("html")[0];if(i){let a=i.getAttribute("xmlns");if(a&&a.match(/^http:\/\/www.w3.org\/1999\/xhtml/)){return e.addStatus(n.req,"Has a default namespace for XHTML. Switching to XHTMLHandler.\n"),new qt(this.response,r).parse(e,t,n)}}return e.failFetch(n,"Unsupported dialect of XML: not RDF or XHTML namespace, etc.\n"+t.slice(0,80),901)}}$t.pattern=new RegExp("(text|application)/(.*)xml");class Wt extends zt{static toString(){return"HTMLHandler"}static register(e){e.mediatypes["text/html"]={q:.8}}parse(e,t,n){let r=e.store;if(Qt(t)){return e.addStatus(n.req,"Has an XML declaration. We'll assume it's XHTML as the content-type was text/html.\n"),new qt(this.response).parse(e,t,n)}if(function(e){const t=e.indexOf("<!DOCTYPE html"),n=e.indexOf(">");if(-1===t||-1===n||t>n)return!1;return-1!==e.substr(t,n-t).indexOf("XHTML")}(t)){return e.addStatus(n.req,"Has XHTML DOCTYPE. Switching to XHTMLHandler.\n"),new qt(this.response).parse(e,t,n)}if(function(e){const t=e.match(/[^(<html)]*<html\s+[^<]*xmlns=['"]http:\/\/www.w3.org\/1999\/xhtml["'][^<]*>/);return!!t}(t)){return e.addStatus(n.req,"Has default namespace for XHTML, so switching to XHTMLHandler.\n"),new qt(this.response).parse(e,t,n)}let i=new RegExp("<title>([\\s\\S]+?)</title>","im").exec(t);return i&&r.add(n.resource,Bt.dc("title"),r.rdfFactory.literal(i[1]),n.resource),r.add(n.resource,Bt.rdf("type"),Bt.link("WebPage"),e.appNode),e.addStatus(n.req,"non-XML HTML document, not parsed for data."),e.doneFetch(n,this.response)}}Wt.pattern=new RegExp("text/html");class Vt extends zt{static toString(){return"JsonLdHandler"}static register(e){e.mediatypes["application/ld+json"]={q:.9}}async parse(e,t,n,r){const i=e.store;try{return await Re(t,i,n.original.value),e.store.add(n.original,Bt.rdf("type"),Bt.link("RDFDocument"),e.appNode),e.doneFetch(n,r)}catch(t){const i="Error trying to parse "+n.resource+" as JSON-LD:\n"+t;return e.failFetch(n,i,"parse_error",r)}}}Vt.pattern=/application\/(ld\+json|activity\+json)/;class Gt extends zt{static toString(){return"TextHandler"}static register(e){e.mediatypes["text/plain"]={q:.5}}parse(e,t,n){if(Qt(t)){return e.addStatus(n.req,"Warning: "+n.resource+" has an XML declaration. We'll assume it's XML but its content-type wasn't XML.\n"),new $t(this.response).parse(e,t,n)}if(t.slice(0,500).match(/xmlns:/)){return e.addStatus(n.req,"May have an XML namespace. We'll assume it's XML but its content-type wasn't XML.\n"),new $t(this.response).parse(e,t,n)}return e.addStatus(n.req,"Plain text document, no known RDF semantics."),e.doneFetch(n,this.response)}}Gt.pattern=new RegExp("text/plain");class Kt extends zt{static toString(){return"N3Handler"}static register(e){e.mediatypes["text/n3"]={},e.mediatypes["text/turtle"]={}}parse(e,t,n,r){let i=e.store,a=_e(i,i,n.original.value,n.original.value,null,null,"",null);try{a.loadBuf(t)}catch(t){let i="Error trying to parse "+n.resource+" as Notation3:\n"+t;return e.failFetch(n,i,"parse_error",r)}return e.addStatus(n.req,"N3 parsed: "+a.statementCount+" triples in "+a.lines+" lines."),e.store.add(n.original,Bt.rdf("type"),Bt.link("RDFDocument"),e.appNode),e.doneFetch(n,this.response)}}Kt.pattern=new RegExp("(application|text)/(x-)?(rdf\\+)?(n3|turtle)");const Jt={RDFXMLHandler:Ht,XHTMLHandler:qt,XMLHandler:$t,HTMLHandler:Wt,TextHandler:Gt,N3Handler:Kt,JsonLdHandler:Vt};function Qt(e){return!!e.match(/\s*<\?xml\s+version\s*=[^<>]+\?>/)}class Yt{constructor(e,t={}){(0,i.A)(this,"store",void 0),(0,i.A)(this,"timeout",void 0),(0,i.A)(this,"_fetch",void 0),(0,i.A)(this,"mediatypes",void 0),(0,i.A)(this,"appNode",void 0),(0,i.A)(this,"requested",void 0),(0,i.A)(this,"timeouts",void 0),(0,i.A)(this,"redirectedTo",void 0),(0,i.A)(this,"fetchQueue",void 0),(0,i.A)(this,"fetchCallbacks",void 0),(0,i.A)(this,"nonexistent",void 0),(0,i.A)(this,"lookedUp",void 0),(0,i.A)(this,"handlers",void 0),(0,i.A)(this,"ns",void 0),(0,i.A)(this,"fireCallbacks",void 0),this.store=e||new X,this.ns=Ut(this.store.rdfFactory),this.timeout=t.timeout||3e4;let r=t.fetch||void 0!==n.g&&(n.g.solidFetcher||n.g.solidFetch)||"undefined"!=typeof window&&(window.solidFetcher||window.solidFetch)||Lt();if(!r)throw new Error("No _fetch function available for Fetcher");"undefined"!=typeof window&&r===window.fetch?this._fetch=r.bind(window):void 0!==n.g&&r===n.g.fetch?this._fetch=r.bind(n.g):this._fetch=r,this.appNode=this.store.sym("chrome://TheCurrentSession"),this.store.fetcher=this,this.requested={},this.timeouts={},this.redirectedTo={},this.fetchQueue={},this.fetchCallbacks={},this.nonexistent={},this.lookedUp={},this.handlers=[],this.mediatypes={"image/*":{q:.9},"*/*":{q:.1}},F.callbackify(this,["request","fail","refresh","retract","done"]),Object.keys(t.handlers||Jt).map(e=>this.addHandler(Jt[e]))}static crossSiteProxy(e){return Yt.crossSiteProxyTemplate?Yt.crossSiteProxyTemplate.replace("{uri}",encodeURIComponent(e)):void 0}static offlineOverride(e){let t=e;var n;return"undefined"!=typeof window&&window.panes&&(n=window.panes.UI)&&n.preferences&&n.preferences.get("offlineModeUsingLocalhost")&&"http://"===t.slice(0,7)&&"localhost/"!==t.slice(7,17)&&(t="http://localhost/"+t.slice(7),A.A.warn("Localhost kludge for offline use: actually getting <"+t+">")),t}static proxyIfNecessary(e){var t;if("undefined"!=typeof window&&window.panes&&(t=window.panes.UI)&&t.isExtension)return e;if("undefined"!=typeof $SolidTestEnvironment&&$SolidTestEnvironment.localSiteMap){let t=e.split("/").slice(2);const n=(e,t)=>{let r=t[e.shift()];return r?"string"==typeof r?r+e.join("/"):e?n(e,r):null:null},r=n(t,$SolidTestEnvironment.localSiteMap);if(r)return r}return Yt.crossSiteProxyTemplate&&"undefined"!=typeof document&&document.location&&"https:"===(""+document.location).slice(0,6)&&"http:"===e.slice(0,5)?Yt.crossSiteProxyTemplate.replace("{uri}",encodeURIComponent(e)):e}static unsupportedProtocol(e){let t=x.protocol(e);return"tel"===t||"mailto"===t||"urn"===t}static setCredentials(e,t={}){void 0===t.credentials&&(void 0!==t.withCredentials?t.credentials=t.withCredentials?"include":"omit":t.credentials="include")}load(e,t={}){if(t=Object.assign({},t),e instanceof Array)return Promise.all(e.map(e=>this.load(e,Object.assign({},t))));const n=e;let r=(0,jt.E)(n);r=r.split("#")[0],t=this.initFetchOptions(r,t);const i=this.appNode,a=this.store,o=a.statementsMatching(void 0,this.ns.link("requestedURI"),a.sym(r),i).map(e=>e.subject);for(const e of o){const n=a.any(e,this.ns.link("response"),null,i);if(null!=n){const e=a.statementsMatching(n,this.ns.link("outOfDate"),!0,i);a.remove(e),t.force=!0,t.clearPreviousData=!0}}const s=this.initFetchOptions(r,t);return this.pendingFetchPromise(r,s.baseURI,s)}async pendingFetchPromise(e,t,n){let r;return!n.force&&await this.fetchQueue[t]?r=this.fetchQueue[t]:(r=Promise.race([this.setRequestTimeout(e,n),this.fetchUri(e,n)]),this.fetchQueue[t]=r,this.cleanupFetchRequest(t,void 0,this.timeout)),r.then(t=>(e in this.timeouts&&(this.timeouts[e].forEach(clearTimeout),delete this.timeouts[e]),t))}cleanupFetchRequest(e,t,n){this.timeouts[e]=(this.timeouts[e]||[]).concat(setTimeout(()=>{this.isPending(e)||delete this.fetchQueue[e]},n))}initFetchOptions(e,t){let n=this.store;!t.method||"GET"===t.method.toUpperCase()||(t.force=!0),t.resource=n.rdfFactory.namedNode(e),t.baseURI=t.baseURI||e,t.original=n.rdfFactory.namedNode(t.baseURI),t.req=n.bnode(),t.headers=t.headers||{},t.contentType&&(t.headers["content-type"]=t.contentType),t.force&&(t.cache="no-cache");let r=this.acceptString();t.headers.accept=r;let i=Yt.offlineOverride(e);t.requestedURI=i,Yt.setCredentials(i,t);let a=Yt.proxyIfNecessary(i);return i!==a&&(t.proxyUsed=!0),t.actualProxyURI=a,t}fetchUri(e,t){if(!e)return Promise.reject(new Error("Cannot fetch an empty uri"));if(Yt.unsupportedProtocol(e))return this.failFetch(t,"fetcher: Unsupported protocol","unsupported_protocol");let n=this.getState(e);if(t.force)delete this.nonexistent[e];else{if("fetched"===n)return Promise.resolve(this.doneFetch(t,{status:200,ok:!0,statusText:"Already loaded into quadstore."}));if("failed"===n&&404===this.requested[e]){let n="Previously failed: "+this.requested[e],r={url:e,status:this.requested[e],statusText:n,responseText:n,headers:new Ot.Headers,ok:!1,body:null,bodyUsed:!1,size:0,timeout:0};return this.failFetch(t,n,this.requested[e],r)}}this.fireCallbacks("request",[e]),this.requested[e]=!0,t.noMeta||this.saveRequestMetadata(e,t);let{actualProxyURI:r}=t;return this._fetch(r,t).then(n=>this.handleResponse(n,e,t),n=>{let i={url:r,status:999,statusText:(n.name||"network failure")+": "+(n.errno||n.code||n.type),responseText:n.message,headers:new Ot.Headers,ok:!1,body:null,bodyUsed:!1,size:0,timeout:0};return this.handleError(i,e,t)})}nowOrWhenFetched(e,t,n,r={}){const i=(0,jt.E)(e);"function"==typeof t?n=t:void 0===t||((0,u.Y2)(t)?r.referringTerm=t:r=t),this.load(i,r).then(e=>{if(n)if(e)if(e.ok)n(!0,"OK",e);else{let t="HTTP error: Status "+e.status+" ("+e.statusText+")";e.responseText&&(t+=" "+e.responseText),n(!1,t,e)}else{n(!1,"@@ nowOrWhenFetched: no response object!")}},function(e){var t=e.message||e.statusText;t="Failed to load <"+i+"> "+t,e.response&&e.response.status&&(t+=" status: "+e.response.status),n(!1,t,e.response)})}addStatus(e,t){let n=new Date;t="["+n.getHours()+":"+n.getMinutes()+":"+n.getSeconds()+"."+n.getMilliseconds()+"] "+t;let r=this.store;const i=r.the(e,this.ns.link("status"));(0,u.P3)(i)?i.append(r.rdfFactory.literal(t)):A.A.warn("web.js: No list to add to: "+i+","+t)}failFetch(e,t,n,r){this.addStatus(e.req,t),e.noMeta||this.store.add(e.original,this.ns.link("error"),this.store.rdfFactory.literal(t));let i=(e.method||"GET").toUpperCase();("GET"===i||"HEAD"===i)&&(e.resource.equals(e.original),this.requested[x.docpart(e.original.value)]=n,this.fireCallbacks("fail",[e.original.value,t]));var a=new Error("Fetcher: "+t);return a.status=n,a.statusText=t,a.response=r,Promise.reject(a)}linkData(e,t,n,r,i){if(!n)return;let a,o=this.store,s=o.rdfFactory.namedNode(x.join(n,e.value));if("alternate"===t||"seeAlso"===t||"meta"===t||"describedby"===t){if(s.value===e.value)return;a=this.ns.rdfs("seeAlso")}else a="type"===t?o.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"):o.rdfFactory.namedNode(x.join(encodeURIComponent(t),"http://www.iana.org/assignments/link-relations/"));i?o.add(s,a,e,r):o.add(e,a,s,r)}parseLinkHeader(e,t,n){if(!e)return;const r=/[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*"))/g,i=e.match(/<[^>]*>\s*(\s*;\s*[^()<>@,;:"/[\]?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*")))*(,|$)/g);if(null!=i)for(let e=0;e<i.length;e++){let a=i[e].split(">"),o=a[0].substring(1),s=a[1].match(r);if(null==s)return;for(let e=0;e<s.length;e++){let r=s[e].split("=")[1].replace(/["']/g,"");this.linkData(t,r,o,n)}}}doneFetch(e,t){return this.addStatus(e.req,"Done."),this.requested[e.original.value]="done",this.fireCallbacks("done",[e.original.value]),t.req=e.req,t}nowKnownAs(e,t){this.lookedUp[e.value]?this.lookedUp[t.value]||this.lookUpThing(t,e):this.lookedUp[t.value]&&(this.lookedUp[e.value]||this.lookUpThing(e,t))}putBack(e,t={}){const n=(0,jt.E)(e);let r=new l.A(n).doc();return t.contentType=t["content-type"]||t["Content-Type"]||t.contentType||s.sT,"application/ld+json"===t.contentType?new Promise((n,i)=>{j(r,this.store,r.uri,t.contentType,(r,a)=>{r?i(r):(t.data=a,this.webOperation("PUT",e,t).then(e=>n(e)).catch(e=>i(e)))})}):(t.data=j(r,this.store,r.value,t.contentType),this.webOperation("PUT",n,t))}webCopy(e,t,n){return this.webOperation("GET",e).then(e=>this.webOperation("PUT",t,{data:e.responseText,contentType:n}))}delete(e,t){return this.webOperation("DELETE",e,t).then(t=>(this.requested[e]=404,this.nonexistent[e]=!0,this.unload(this.store.rdfFactory.namedNode(e)),t))}async createIfNotExists(e,t=s.sT,n=""){const r=this;try{var i=await r.load(e)}catch(a){if(404===a.response.status){try{i=await r.webOperation("PUT",e.value,{data:n,contentType:t})}catch(e){throw e}return delete r.requested[e.value],i}throw a}return i}createContainer(e,t,n){let r={"content-type":s.sT,link:this.ns.ldp("BasicContainer")+'; rel="type"'};t&&(r.slug=t);let i={headers:r};return n&&(i.body=n),this.webOperation("POST",e,i)}invalidateCache(e){const t=(0,jt.E)(e),n=this;n.fetchQueue&&n.fetchQueue[t]&&(n.fetchQueue[t].PromiseStatus,delete n.fetchQueue[t]);if(n.requested[t]&&"done"!==n.requested[t]&&"failed"!==n.requested[t]&&404!==n.requested[t]){n.requested[t]}else delete n.requested[t],delete n.nonexistent[t]}webOperation(e,t,n={}){const r=(0,jt.E)(t);n.method=e,n.body=n.data||n.body,n.force=!0;const i=this;if(n.body&&!n.contentType)throw new Error("Web operation sending data must have a defined contentType.");return n.contentType&&(n.headers=n.headers||{},n.headers["content-type"]=n.contentType),Yt.setCredentials(r,n),new Promise(function(t,a){i._fetch(r,n).then(n=>{if(n.ok)"PUT"!==e&&"PATCH"!==e&&"POST"!==e&&"DELETE"!==e||i.invalidateCache(r),n.text?n.text().then(e=>{n.responseText=e,t(n)}):t(n);else{let t="Web error: "+n.status;n.statusText&&(t+=" ("+n.statusText+")"),t+=" on "+e+" of <"+r+">",n.responseText&&(t+=": "+n.responseText);let i=new Error(t);i.response=n,a(i)}},t=>{a(new Error("Fetch error for "+e+" of <"+r+">:"+t))})})}lookUpThing(e,t){let n=this.store.uris(e);return n=n.map(e=>x.docpart(e)),n.forEach(e=>{this.lookedUp[e]=!0}),this.load(n,{referringTerm:t})}getHeader(e,t){const n=this.store,r=e.value,i=n.each(void 0,this.ns.link("requestedURI"),n.rdfFactory.literal(r));for(let e=0;e<i.length;e++){let r=i[e];if(void 0!==r){let e=n.any(r,this.ns.link("response"));if(void 0!==e&&n.anyValue(e,this.ns.http("status"))&&n.anyValue(e,this.ns.http("status")).startsWith("2")){let r=n.each(e,this.ns.httph(t.toLowerCase()));return r.length?r.map(e=>e.value):[]}}}}saveRequestMetadata(e,t){let n=t.req,r=this.store,i=t.referringTerm;this.addStatus(t.req,"Accept: "+t.headers.accept),(0,u.Y2)(i)&&r.add(r.rdfFactory.namedNode(e),this.ns.link("requestedBy"),i,this.appNode),t.original&&t.original.value!==e&&r.add(n,this.ns.link("orginalURI"),r.rdfFactory.literal(t.original.value),this.appNode);const a=new Date,o="["+a.getHours()+":"+a.getMinutes()+":"+a.getSeconds()+"] ";r.add(n,this.ns.rdfs("label"),r.rdfFactory.literal(o+" Request for "+e),this.appNode),r.add(n,this.ns.link("requestedURI"),r.rdfFactory.literal(e),this.appNode),r.add(n,this.ns.link("status"),r.collection(),this.appNode)}saveResponseMetadata(e,t){const n=this.store;let r=n.bnode();return n.add(t.req,this.ns.link("response"),r,this.appNode),n.add(r,this.ns.http("status"),n.rdfFactory.literal(e.status),this.appNode),n.add(r,this.ns.http("statusText"),n.rdfFactory.literal(e.statusText),this.appNode),e.headers.forEach((e,i)=>{n.add(r,this.ns.httph(i),this.store.rdfFactory.literal(e),this.appNode),"content-type"===i&&n.add(t.resource,this.ns.rdf("type"),n.rdfFactory.namedNode(F.mediaTypeClass(e).value),this.appNode)}),r}objectRefresh(e){let t=this.store.uris(e);if(void 0!==t)for(let e=0;e<t.length;e++)this.refresh(this.store.rdfFactory.namedNode(x.docpart(t[e])))}refresh(e,t){this.fireCallbacks("refresh",arguments),this.nowOrWhenFetched(e,{force:!0,clearPreviousData:!0},t)}refreshIfExpired(e,t){let n=this.getHeader(e,"Expires");!n||new Date(n[0]).getTime()<=(new Date).getTime()?this.refresh(e,t):t(!0,"Not expired",{})}retract(e){this.store.removeMany(void 0,void 0,void 0,e),e.value&&delete this.requested[x.docpart(e.value)],this.fireCallbacks("retract",arguments)}getState(e){return void 0===this.requested[e]?"unrequested":!0===this.requested[e]?"requested":"done"===this.requested[e]?"fetched":"redirected"===this.requested[e]?this.getState(this.redirectedTo[e]):"failed"}isPending(e){return!0===this.requested[e]}unload(e){this.store.removeDocument(e),delete this.requested[e.value]}addHandler(e){this.handlers.push(e),e.register(this)}retryNoCredentials(e,t){t.retriedWithNoCredentials=!0,delete this.requested[e],delete this.fetchQueue[e];let n=Object.assign({},t,{credentials:"omit"});return this.addStatus(t.req,"Abort: Will retry with credentials SUPPRESSED to see if that helps"),this.load(e,n)}isCrossSite(e){if("undefined"==typeof document||!document.location)return!1;const t=x.hostpart,n=""+document.location;return(t(n)&&t(e)&&t(n))!==t(e)}handleError(e,t,n){if(this.isCrossSite(t)){if(n.credentials&&"include"===n.credentials&&!n.retriedWithNoCredentials)return this.retryNoCredentials(t,n);let e=Yt.crossSiteProxy(t);if(e&&!n.proxyUsed)return this.redirectToProxy(e,n)}var r;return e instanceof Error?r="Fetch error: "+e.message:(r=e.statusText,e.responseText&&(r+=` ${e.responseText}`)),this.failFetch(n,r,e.status||998,e)}addType(e,t,n,r){let i=t;if(r){var a=n.any(i,this.ns.link("requestedURI"));a&&a.value!==r&&n.add(n.rdfFactory.namedNode(r),this.ns.rdf("type"),e,this.appNode)}for(;;){const t=n.any(i,this.ns.link("requestedURI"));if(t&&t.value&&n.add(n.rdfFactory.namedNode(t.value),this.ns.rdf("type"),e,this.appNode),i=n.any(void 0,n.rdfFactory.namedNode("http://www.w3.org/2007/ont/link#redirectedRequest"),i),!i)break;var o=n.any(i,n.rdfFactory.namedNode("http://www.w3.org/2007/ont/link#response"));if(!o)break;var s=n.any(o,n.rdfFactory.namedNode("http://www.w3.org/2007/ont/http#status"));if(!s)break;if("301"!==s&&"302"!==s)break}}handleResponse(e,t,n){const r=this.store,i=e.headers,a=n.req,o=this.saveResponseMetadata(e,n),s=this.normalizedContentType(n,i)||"";let c=i.get("content-location");if(0===e.status)return this.handleError(e,t,n);if(e.status>=400)return 404===e.status&&(this.nonexistent[n.original.value]=!0,this.nonexistent[t]=!0),this.saveErrorResponse(e,o).then(()=>{let t=n.resource+" "+e.statusText;return this.failFetch(n,t,e.status,e)});var l=null,u=null;if(c&&(u=x.join(c,t))!==t&&(l=u),200===e.status){if(this.addType(this.ns.link("Document"),a,r,t),l&&this.addType(this.ns.link("Document"),a,r,l),n.clearPreviousData){const e=r.statementsMatching(void 0,void 0,void 0,n.resource).slice();for(let t=0;t<e.length;t++)r.removeStatement(e[t])}let e=s.includes("image/")||s.includes("application/pdf");s&&e&&(this.addType(r.rdfFactory.namedNode("http://purl.org/dc/terms/Image"),a,r,t),l&&this.addType(r.rdfFactory.namedNode("http://purl.org/dc/terms/Image"),a,r,l))}if(c){if(!n.force&&l&&"done"===this.requested[u])return this.doneFetch(n,e);this.requested[u]=!0}this.parseLinkHeader(i.get("link"),n.original,a);let p=this.handlerForContentType(s,e);return p?e.text().then(t=>(e.responseText=t,p.parse(this,t,n,e))):(this.addStatus(a,"Fetch over. No data handled."),this.doneFetch(n,e))}saveErrorResponse(e,t){let n=this.store;return e.text().then(e=>{e.length>10&&n.add(t,this.ns.http("content"),n.rdfFactory.literal(e),t)})}handlerForContentType(e,t){if(!e)return null;let n=this.handlers.find(t=>e.match(t.pattern));return n?new n(t):null}guessContentType(e){return Dt[e.split(".").pop()]}normalizedContentType(e,t){if(e.forceContentType)return e.forceContentType;let n=t.get("content-type");if(!n||n.includes("application/octet-stream")){let t=this.guessContentType(e.resource.value);if(t)return t}let r=x.protocol(e.resource.value);return!n&&["file","chrome"].includes(r)?"text/xml":n}redirectToProxy(e,t){this.addStatus(t.req,"BLOCKED -> Cross-site Proxy to <"+e+">"),t.proxyUsed=!0;const n=this.store,r=t.req;t.noMeta||(n.add(r,this.ns.link("redirectedTo"),n.rdfFactory.namedNode(e),r),this.addStatus(r,"redirected to new request")),this.requested[t.resource.value]="redirected",this.redirectedTo[t.resource.value]=e;let i=Object.assign({},t);return i.baseURI=t.resource.value,this.fetchUri(e,i).then(e=>(i.noMeta||n.add(r,this.ns.link("redirectedRequest"),i.req,this.appNode),e))}setRequestTimeout(e,t){return new Promise(n=>{this.timeouts[e]=(this.timeouts[e]||[]).concat(setTimeout(()=>{!this.isPending(e)||t.retriedWithNoCredentials||t.proxyUsed||n(this.failFetch(t,`Request to ${e} timed out`,"timeout"))},this.timeout))})}addFetchCallback(e,t){this.fetchCallbacks[e]?this.fetchCallbacks[e].push(t):this.fetchCallbacks[e]=[t]}acceptString(){let e="";for(let t in this.mediatypes){""!==e&&(e+=", "),e+=t;for(let n in this.mediatypes[t])e+=";"+n+"="+this.mediatypes[t][n]}return e}}(0,i.A)(Yt,"HANDLERS",void 0),(0,i.A)(Yt,"CONTENT_TYPE_BY_EXT",void 0),(0,i.A)(Yt,"crossSiteProxyTemplate",void 0),Yt.HANDLERS=Jt,Yt.CONTENT_TYPE_BY_EXT=Dt;const Xt={parseJSON:function(e,t,n){var r,i,a,o={},s=n.sym(t);for(var c in e){0===c.indexOf("_:")?o[c]?r=o[c]:(r=n.bnode(c),o[c]=r):r=n.sym(c);var l=e[c];for(var u in l){var p=l[u];for(var d in i=n.sym(u),p){var f=p[d];if("uri"===f.type)a=n.sym(f.value),n.add(r,i,a,s);else if("BlankNode"===f.type)o[f.value]?a=o[f.value]:(a=n.bnode(f.value),o[f.value]=a),n.add(r,i,a,s);else{if("Literal"!==f.type)throw new Error("error: unexpected termtype: "+d.type);a=f.datatype?n.literal(f.value,void 0,n.sym(f.datatype)):f.lang?n.literal(f.value,f.lang):n.literal(f.value),n.add(r,i,a,s)}}}}}};function Zt(e){var t=0;function n(e){var t="",n=e.statements;for(var r in n)A.A.debug("Found statement: "+n),t+=o()+n[r]+"\n";return t}function r(e){var t="";for(var n in e.constraints){var r=e.constraints[n];t+=o()+"FILTER ( "+r.describe(n)+" ) \n"}return t}function i(e){for(var a="",s=0;s<e.optional.length;s++)A.A.debug("Found optional query"),a+=o()+"OPTIONAL { \n",t++,a+=n(e.optional[s]),a+=r(e.optional[s]),a+=i(e.optional[s]),t--,a+=o()+"}\n";return a}function a(e){var a=o()+"WHERE \n{ \n";return t++,a+=n(e),a+=r(e),a+=i(e),t--,a+="}"}function o(){for(var e="",n=0;n<t;n++)e+=" ";return e}return function(e){return function(e){for(var t=o()+"SELECT ",n=0;n<e.vars.length;n++)t+=e.vars[n]+" ";return t+"\n"}(e)+a(e.pat)}(e)}function en(e,t,n){var r=[];function i(e){if(r[e])return r[e];var t=n.variable(e);return r[e]=t,t}function a(e){return"string"==typeof e&&e.match(/[^ \n\t]/)}function o(e){return"string"==typeof e&&e.match(/^[\?\$]/)}function s(e){return"string"==typeof e?e.replace(/^</,"<").replace(/>$/,">"):e}function c(e){return"string"==typeof e&&e.match(/^<[^>]*>$/)}function l(e){return"string"==typeof e&&(e.match(/^_:/)||e.match(/^$/))}function u(e){return"string"==typeof e&&e.match(/:$/)}function p(e){return"string"==typeof e&&e.match(/^:|^[^_][^:]*:/)}function d(e){return e.split(":")[0]}function f(e){return e.split(":")[1]}function h(e){return c(e)?e.slice(1,e.length-1):e}function m(e){var t=-1===e.indexOf("'")?null:e.indexOf("'"),r=-1===e.indexOf('"')?null:e.indexOf('"');if(!t&&!r){var i=new Array(1);return i[0]=e,i}var a,o,s=new Array(2);if(!t||r&&r<t)a='"',o=r;else{if(r&&!(t&&t<r))return A.A.error("SQARQL QUERY OOPS!"),s;a="'",o=t}s[0]=e.slice(0,o);var c,l=e.slice(o+1).indexOf(a);return-1===l?(A.A.error("SPARQL parsing error: no matching parentheses in literal "+e),e):(e.slice(l+o+2).match(/^\^\^/)?(c=e.slice(l+o+2).indexOf(" "),s[1]=n.literal(e.slice(o+1,o+1+l),n.sym(h(e.slice(o+4+l,o+2+l+c)))),s=s.concat(m(e.slice(l+o+3+c)))):e.slice(l+o+2).match(/^@/)?(c=e.slice(l+o+2).indexOf(" "),s[1]=n.literal(e.slice(o+1,o+1+l),e.slice(o+3+l,o+2+l+c),null),s=s.concat(m(e.slice(l+o+2+c)))):(s[1]=n.literal(e.slice(o+1,o+1+l)),A.A.info("Literal found: "+s[1]),s=s.concat(m(e.slice(l+o+2)))),s)}function g(e){e=e.replace(/\(/g," ( ").replace(/\)/g," ) ").replace(/</g," <").replace(/>/g,"> ").replace(/{/g," { ").replace(/}/g," } ").replace(/[\t\n\r]/g," ").replace(/; /g," ; ").replace(/\. /g," . ").replace(/, /g," , "),A.A.info("New str into spaceDelimit: \n"+e);var t=[],n=e.split(" ");for(var r in n)a(n[r])&&(t=t.concat(n[r]));return t}function v(e,t){for(var n=0;n<t.length;n++)if("string"==typeof t[n]&&t[n].toLowerCase()===e.toLowerCase())return n;return null}function b(e,t){for(var n=[],r=0;r<t.length;r++)"string"==typeof t[r]&&t[r].toLowerCase()===e.toLowerCase()&&n.push(r);return n}function y(e,t,n){A.A.info("Looking for a close bracket of type "+n+" in "+e);for(var r=0,i=0;i<e.length;i++)if(e[i]===t&&r++,e[i]===n&&r--,r<0)return i;return A.A.error("Statement had no close parenthesis in SPARQL query"),0}function w(e){return this.describe=function(t){return t+" = "+e.toNT()},this.test=function(t){return e.equals(t)},this}function x(e){this.describe=function(t){return"REGEXP( '"+e+"' , "+t+" )"},this.test=function(t){var n=new RegExp(e);return!!t.value&&n.test(t.value)}}function k(e,t){3!==e.length||"Variable"!==e[0].termType||"NamedNode"!==e[2].termType&&"Literal"!==e[2].termType?6===e.length&&"string"==typeof e[0]&&"regexp"===e[0].toLowerCase()&&"("===e[1]&&")"===e[5]&&","===e[3]&&"Variable"===e[4].termType&&"Literal"===e[2].termType&&(A.A.debug("Constraint added: "+e),t.constraints[e[4]]=new x(e[2].value)):"="===e[1]||">"===e[1]||"<"===e[1]?(A.A.debug("Constraint added: "+e),t.constraints[e[0]]=new w(e[2])):A.A.warn("I don't know how to handle the constraint: "+e)}function _(e,t){A.A.debug("Optional query: "+e+" not yet implemented.");var r=n.formula();E(e,r),t.optional.push(r)}function E(e,t){var r,a,u=function(e){for(var t=[],r=0;r<e.length;r++)"string"==typeof e[r]?(e[r]=s(e[r]),o(e[r])?t[r]=i(e[r].slice(1)):l(e[r])?(A.A.info(e[r]+" was identified as a bnode."),t[r]=n.bnode()):c(e[r])?(A.A.info(e[r]+" was identified as a symbol."),t[r]=n.sym(h(e[r]))):p(e[r])?(A.A.info(e[r]+" was identified as a prefixed symbol"),T[d(e[r])]?t[r]=n.sym(e[r]=T[d(e[r])]+f(e[r])):(A.A.error("SPARQL error: "+e[r]+" with prefix "+d(e[r])+" does not have a correct prefix entry."),t[r]=e[r])):t[r]=e[r]):t[r]=e[r];return t}(e);for(A.A.debug("WHERE: "+u);v("OPTIONAL",u);)a=v("OPTIONAL",u),A.A.debug("OPT: "+a+" "+u[a]+" in "+u),"{"!==u[a+1]&&A.A.warn("Bad optional opening bracket in word "+a),-1===(r=y(u.slice(a+2),"{","}"))?A.A.error("No matching bracket in word "+a):(_(u.slice(a+2,a+2+r),t),a=v("OPTIONAL",u),r=y(u.slice(a+2),"{","}"),u.splice(a,r+3));for(A.A.debug("WHERE after optionals: "+u);v("FILTER",u);){var m=v("FILTER",u);"("!==u[m+1]&&A.A.warn("Bad filter opening bracket in word "+m),-1===(r=y(u.slice(m+2),"(",")"))?A.A.error("No matching bracket in word "+m):(k(u.slice(m+2,m+2+r),t),m=v("FILTER",u),r=y(u.slice(m+2),"(",")"),u.splice(m,r+3))}A.A.debug("WHERE after filters and optionals: "+u),function(e,t){var n=new Array(1);n[0]=-1;for(var r=n.concat(b(".",e)),i=[],a=0;a<r.length-1;a++)i[a]=e.slice(r[a]+1,r[a+1]);for(a in i){A.A.info("s+p+o "+a+" = "+i[a]);var o=i[a][0];i[a].splice(0,1);var s=n.concat(b(";",i[a]));s.push(i[a].length);for(var c=[],l=0;l<s.length-1;l++)c[l]=i[a].slice(s[l]+1,s[l+1]);for(a in c){A.A.info("p+o "+a+" = "+i[a]);var u=c[a][0];c[a].splice(0,1);var p=n.concat(b(",",c[a]));p.push(c[a].length);var d=[];for(l=0;l<p.length-1;l++)d[l]=c[a].slice(p[l]+1,p[l+1]);for(a in d){var f=d[a][0];A.A.info("Subj="+o+" Pred="+u+" Obj="+f),t.add(o,u,f)}}}}(u,t)}A.A.info("SPARQL input: \n"+e);var C=new V,S=function(e){var t=m(e),n=[];for(var r in t)n="string"==typeof t[r]?n.concat(g(t[r])):n.concat(t[r]);return n=function(e){for(var t=e,n=0;n<t.length;n++)if("a"===t[n]&&(t[n]="<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>"),"is"===t[n]&&"of"===t[n+2]){t.splice(n,1),t.splice(n+1,1);var r=t[n-1];t[n-1]=t[n+1],t[n+1]=r}return t}(n),A.A.info("SPARQL Tokens: "+n),n}(e),T=function(e){var t=b("PREFIX",e),n=[];for(var r in t){var i=e[t[r]+1],a=e[t[r]+2];if(u(i))if(c(a)){A.A.info("Prefix found: "+i+" -> "+a);var o=d(i),s=h(a);n[o]=s}else A.A.error("Invalid SPARQL symbol: "+a);else A.A.error("Invalid SPARQL prefix: "+i)}return n}(S);T.rdf||(T.rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"),T.rdfs||(T.rdfs="http://www.w3.org/2000/01/rdf-schema#");var P=v("SELECT",S),R=v("WHERE",S);if(P<0||R<0||P>R)return A.A.error("Invalid or nonexistent SELECT and WHERE tags in SPARQL query"),!1;if(function(e,t){for(var n in A.A.info("SPARQL vars: "+e),e)if(o(e[n])){A.A.info("Added "+e[n]+" to query variables from SPARQL");var r=i(e[n].slice(1));t.vars.push(r),r.label=e[n].slice(1)}else A.A.warn("Incorrect SPARQL variable in SELECT: "+e[n])}(S.slice(P+1,R),C),E(S.slice(R+2,S.length-1),C.pat),t)return C;for(var I in C.pat.statements){var F=C.pat.statements[I];"NamedNode"===F.subject.termType&&n.fetcher&&n.fetcher.lookUpThing(F.subject,"sparql:"+F.subject),"NamedNode"===F.object.termType&&n.fetcher&&n.fetcher.lookUpThing(F.object,"sparql:"+F.object)}return C}class tn{constructor(e){if((0,i.A)(this,"store",void 0),(0,i.A)(this,"ifps",void 0),(0,i.A)(this,"fps",void 0),(0,i.A)(this,"patchControl",void 0),(0,i.A)(this,"ns",void 0),(e=e||new X).updater)throw new Error("You can't have two UpdateManagers for the same store");e.fetcher||(e.fetcher=new Yt(e)),this.store=e,e.updater=this,this.ifps={},this.fps={},this.ns={},this.ns.link=T("http://www.w3.org/2007/ont/link#"),this.ns.http=T("http://www.w3.org/2007/ont/http#"),this.ns.httph=T("http://www.w3.org/2007/ont/httph#"),this.ns.ldp=T("http://www.w3.org/ns/ldp#"),this.ns.rdf=T("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),this.ns.rdfs=T("http://www.w3.org/2000/01/rdf-schema#"),this.ns.rdf=T("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),this.ns.owl=T("http://www.w3.org/2002/07/owl#"),this.patchControl=[]}patchControlFor(e){return this.patchControl[e.value]||(this.patchControl[e.value]=[]),this.patchControl[e.value]}isHttpUri(e){return"http"===e.slice(0,4)}flagAuthorizationMetadata(e){e||(e=this.store);const t=e.fetcher?.appNode,n=e.statementsMatching(void 0,this.ns.link("requestedURI"),void 0,t).map(e=>e.subject);for(const r of n){const n=e.any(r,this.ns.link("response"),null,t);null!=n&&e.add(n,this.ns.link("outOfDate"),!0,t)}}async checkEditable(e,t){if(!e)return!1;t||(t=this.store);const n=this.editable(e,t);if(void 0!==n)return n;await(t.fetcher?.load(e));return this.editable(e,t)}editable(e,t){if(!e)return!1;if(t||(t=this.store),e=(0,jt.E)(e),!this.isHttpUri(e)&&t.holds(t.rdfFactory.namedNode(e),t.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),t.rdfFactory.namedNode("http://www.w3.org/2007/ont/link#MachineEditableDocument")))return"LOCALFILE";var n,r=!1;const i=t.fetcher?.appNode;for(var a,o=t.each(void 0,this.ns.link("requestedURI"),(0,x.docpart)(e),i),s=0;s<o.length;s++)if(void 0!==(n=o[s])){const o=t.any(n,this.ns.link("response"),null,i);if(void 0!==o){if(t.anyJS(o,this.ns.link("outOfDate"),null,i))continue;var c=t.anyValue(o,this.ns.httph("wac-allow"));if(c)for(var l of c.split(",")){var u=l.split("=");if(u[0].includes("user")&&!u[1].includes("write")&&!u[1].includes("append"))return!1}var p=t.each(o,this.ns.httph("accept-patch"));if(p.length)for(let e=0;e<p.length;e++){if((a=p[e].value.trim()).indexOf("application/sparql-update")>=0)return"SPARQL";if(a.indexOf("application/sparql-update-single-match")>=0)return"SPARQL";if(a.indexOf("text/n3")>=0)return"N3PATCH"}var d=t.each(o,this.ns.httph("ms-author-via"));if(d.length)for(let e=0;e<d.length;e++){if((a=d[e].value.trim()).indexOf("SPARQL")>=0)return"SPARQL";if(a.indexOf("DAV")>=0)return"DAV"}if(!this.isHttpUri(e))return!!c&&"LOCALFILE";var f=t.each(o,this.ns.http("status"));if(f.length)for(let e=0;e<f.length;e++)200!==f[e]&&404!==f[e]||(r=!0)}}if(0===o.length);else if(r)return!1}anonymize(e){return"_:"===e.toNT().substr(0,2)&&this.mentioned(e)?"?"+e.toNT().substr(2):e.toNT()}anonymizeNT(e){return this.anonymize(e.subject)+" "+this.anonymize(e.predicate)+" "+this.anonymize(e.object)+" ."}nTriples(e){return`${e.subject.toNT()} ${e.predicate.toNT()} ${e.object.toNT()} .`}statementBnodes(e){return[e.subject,e.predicate,e.object].filter(function(e){return(0,u.jt)(e)})}statementArrayBnodes(e){var t=[];for(let n=0;n<e.length;n++)t=t.concat(this.statementBnodes(e[n]));t.sort();var n=[];for(let e=0;e<t.length;e++)0!==e&&t[e].equals(t[e-1])||n.push(t[e]);return n}cacheIfps(){this.ifps={};var e=this.store.each(void 0,this.ns.rdf("type"),this.ns.owl("InverseFunctionalProperty"));for(let t=0;t<e.length;t++)this.ifps[e[t].value]=!0;this.fps={},e=this.store.each(void 0,this.ns.rdf("type"),this.ns.owl("FunctionalProperty"));for(let t=0;t<e.length;t++)this.fps[e[t].value]=!0}bnodeContext2(e,t,n){var r,i,a=this.store.statementsMatching(void 0,void 0,e,t);for(let e=0;e<a.length;e++)if(this.fps[a[e].predicate.value]){if(!(r=a[e].subject).isBlank)return[a[e]];if(n&&(i=this.bnodeContext2(r,t,n-1)))return i.concat([a[e]])}a=this.store.statementsMatching(e,void 0,void 0,t);for(let e=0;e<a.length;e++)if(this.ifps[a[e].predicate.value]){if(!(r=a[e].object).isBlank)return[a[e]];if(n&&(i=this.bnodeContext2(r,t,n-1)))return i.concat([a[e]])}return null}bnodeContext1(e,t){for(var n=0;n<3;n++){var r=this.bnodeContext2(e,t,n);if(null!==r)return r}return this.store.connectedStatements(e,t)}mentioned(e){return 0!==this.store.statementsMatching(e,null,null,null).length||0!==this.store.statementsMatching(null,e).length||0!==this.store.statementsMatching(null,null,e).length}bnodeContext(e,t){var n=[];if(e.length){this.cacheIfps();for(let i=0;i<e.length;i++){var r=e[i];this.mentioned(r)&&(n=n.concat(this.bnodeContext1(r,t)))}}return n}statementContext(e){var t=this.statementBnodes(e);return this.bnodeContext(t,e.graph)}contextWhere(e){var t=this;return e&&0!==e.length?"WHERE { "+e.map(function(e){return t.anonymizeNT(e)}).join("\n")+" }\n":""}fire(e,t,n,r={}){return Promise.resolve().then(()=>{if(!e)throw new Error("No URI given for remote editing operation: "+t);return r.noMeta=!0,r.contentType=r.contentType||"application/sparql-update",r.body=t,this.store.fetcher.webOperation("PATCH",e,r)}).then(r=>{if(!r.ok){let n="UpdateManager: update failed for <"+e+"> status="+r.status+", "+r.statusText+"\n for query: "+t;throw new Error(n)}n(e,r.ok,r.responseText,r)}).catch(t=>{n(e,!1,t.message,t)})}update_statement(e){if(!e||e.graph){var t=this,n=this.statementContext(e);return{statement:e?[e.subject,e.predicate,e.object,e.graph]:void 0,statementNT:e?this.anonymizeNT(e):void 0,where:t.contextWhere(n),set_object:function(e,n){var r=this.where;r+="DELETE DATA { "+this.statementNT+" } ;\n",r+="INSERT DATA { "+this.anonymize(this.statement[0])+" "+this.anonymize(this.statement[1])+" "+this.anonymize(e)+" . }\n",t.fire(this.statement[3].value,r,n)}}}}insert_statement(e,t){var n=e instanceof Array?e[0]:e,r=this.contextWhere(this.statementContext(n));if(e instanceof Array){var i="";for(let t=0;t<e.length;t++)i+=e[t]+"\n";r+="INSERT DATA { "+i+" }\n"}else r+="INSERT DATA { "+this.anonymize(e.subject)+" "+this.anonymize(e.predicate)+" "+this.anonymize(e.object)+" . }\n";this.fire(n.graph.value,r,t)}delete_statement(e,t){var n=e instanceof Array?e[0]:e,r=this.contextWhere(this.statementContext(n));if(e instanceof Array){var i="";for(let t=0;t<e.length;t++)i+=e[t]+"\n";r+="DELETE DATA { "+i+" }\n"}else r+="DELETE DATA { "+this.anonymize(e.subject)+" "+this.anonymize(e.predicate)+" "+this.anonymize(e.object)+" . }\n";this.fire(n.graph.value,r,t)}requestDownstreamAction(e,t){var n=this.patchControlFor(e);if(n.pendingUpstream)if(n.downstreamAction){if(""+n.downstreamAction!=""+t)throw new Error("Can't wait for > 1 different downstream actions")}else n.downstreamAction=t;else t(e)}clearUpstreamCount(e){this.patchControlFor(e).upstreamCount=0}getUpdatesVia(e){var t=this.store.fetcher.getHeader(e,"updates-via");return t&&t.length?t[0].trim():null}addDownstreamChangeListener(e,t){var n=this.patchControlFor(e);n.downstreamChangeListeners||(n.downstreamChangeListeners=[]),n.downstreamChangeListeners.push(t),this.setRefreshHandler(e,e=>{this.reloadAndSync(e)})}reloadAndSync(e){var t=this.patchControlFor(e),n=this;if(t.reloading)t.outOfDate=!0;else{t.reloading=!0;var r=1e3,i=function(){n.reload(n.store,e,function(e,n,a){if(e){if(t.downstreamChangeListeners)for(let e=0;e<t.downstreamChangeListeners.length;e++)t.downstreamChangeListeners[e]();t.reloading=!1,t.outOfDate&&(t.outOfDate=!1,i())}else t.reloading=!1,a&&0===a.status&&(t.reloading=!0,r*=2,setTimeout(i,r))})};i()}}setRefreshHandler(e,t){let n=this.getUpdatesVia(e);var r=t,i=this,a=this,o=1500,s=0;if(!n)return!1;n=(0,x.join)(n,e.value);const c=n.replace(/^http:/,"ws:").replace(/^https:/,"wss:");var l=function(){var t;if("undefined"!=typeof WebSocket)t=new WebSocket(c);else{if("undefined"==typeof window||!window.WebSocket)return;t=window.WebSocket(c)}t.onopen=function(){o=1500,this.send("sub "+e.value),s&&a.requestDownstreamAction(e,r)};var n=i.patchControlFor(e);n.upstreamCount=0,t.onerror=function(e){},t.onclose=function(e){o*=2,s+=1,setTimeout(function(){l()},o)},t.onmessage=function(t){if(t.data&&"pub"===t.data.slice(0,3)){if("upstreamCount"in n&&(n.upstreamCount-=1,n.upstreamCount>=0))return;n.upstreamCount=0,i.requestDownstreamAction(e,r)}}};return l(),!0}updateMany(e,t=[]){const n=e.concat(t).map(e=>e.why),r=this,i=[];n.forEach(e=>{i.find(t=>t.equals(e))||i.push(e)});const a=i.map(n=>r.update(e.filter(e=>e.why.equals(n)),t.filter(e=>e.why.equals(n))));return a.length,Promise.all(a)}constructSparqlUpdateQuery(e,t,n){var r=this.contextWhere(n),i="";if(r.length){if(e.length){i+="DELETE { ";for(let t=0;t<e.length;t++)i+=this.anonymizeNT(e[t])+"\n";i+=" }\n"}if(t.length){i+="INSERT { ";for(let e=0;e<t.length;e++)i+=this.anonymizeNT(t[e])+"\n";i+=" }\n"}i+=r}else{if(e.length){i+="DELETE DATA { ";for(let t=0;t<e.length;t++)i+=this.anonymizeNT(e[t])+"\n";i+=" } \n"}if(t.length){e.length&&(i+=" ; "),i+="INSERT DATA { ";for(let e=0;e<t.length;e++)i+=this.nTriples(t[e])+"\n";i+=" }\n"}}return i}constructN3PatchQuery(e,t,n){var r="\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ex: <http://www.example.org/terms#>.\n\n_:patch\n";return n&&n.length>0&&(r+=`\n solid:where {\n ${n.map(e=>this.anonymizeNT(e)).join("\n ")}\n };`),e.length>0&&(r+=`\n solid:deletes {\n ${e.map(e=>this.anonymizeNT(e)).join("\n ")}\n };`),t.length>0&&(r+=`\n solid:inserts {\n ${t.map(e=>this.anonymizeNT(e)).join("\n ")}\n };`),r+=" a solid:InsertDeletePatch .\n"}update(e,t,n,r,i={}){if(!n){var a=this;return new Promise(function(n,o){a.update(e,t,function(e,t,r){t?n():o(new Error(r))},r,i)})}try{var o=this.store,s=e?(0,u.ok)(e)?e.statements:e instanceof Array?e:[e]:[],c=t?(0,u.ok)(t)?t.statements:t instanceof Array?t:[t]:[];if(!(s instanceof Array))throw new Error("Type Error "+typeof s+": "+s);if(!(c instanceof Array))throw new Error("Type Error "+typeof c+": "+c);if(0===s.length&&0===c.length)return n(null,!0);var l=s.length?s[0].graph:c[0].graph;if(!l){let e="Error patching: statement does not specify which document to patch:"+s[0]+", "+c[0];throw new Error(e)}if("NamedNode"!==l.termType){let e="Error patching: document not a NamedNode:"+s[0]+", "+c[0];throw new Error(e)}var p=this.patchControlFor(l),d=Date.now(),f=["subject","predicate","object","why"],h={delete:s,insert:c};["insert","delete"].map(function(e){h[e].map(function(e){if(!l.equals(e.graph))throw new Error("update: destination "+l+" inconsistent with delete quad "+e.graph);f.map(function(t){if(void 0===e[t])throw new Error("update: undefined "+t+" of statement.")})})});var m=this.editable(l.value,o);if(!1===m)throw new Error("Update: Can't make changes in uneditable "+l);if(void 0===m){if(r)throw new Error("Update: Loaded "+l+"but still can't figure out what editing protocol it supports.");return void this.store.fetcher.load(l).then(r=>{this.update(e,t,n,!0,i)},r=>{if(404!==r.response.status)throw new Error(`Update: Can't get updatability status ${l} before patching: ${r}`);this.update(e,t,n,!0,i)})}if(m.indexOf("SPARQL")>=0||m.indexOf("N3PATCH")>=0){var g=m.indexOf("SPARQL")>=0,v=[];s.length&&(v=this.statementArrayBnodes(s)),c.length&&(v=v.concat(this.statementArrayBnodes(c)));var b=this.bnodeContext(v,l),y=g?this.constructSparqlUpdateQuery(s,c,b):this.constructN3PatchQuery(s,c,b);i.contentType=g?"application/sparql-update":"text/n3",p.pendingUpstream=p.pendingUpstream?p.pendingUpstream+1:1,"upstreamCount"in p&&(p.upstreamCount+=1),this.fire(l.value,y,(e,t,r,i)=>{if(i.elapsedTimeMs=Date.now()-d,t){try{o.remove(s)}catch(e){t=!1,r="Remote Ok BUT error deleting "+s.length+" from store!!! "+e}for(let e=0;e<c.length;e++)o.add(c[e].subject,c[e].predicate,c[e].object,l)}if(n(e,t,r,i),p.pendingUpstream-=1,0===p.pendingUpstream&&p.downstreamAction){var a=p.downstreamAction;delete p.downstreamAction,a(l)}},i)}else if(m.indexOf("DAV")>=0)this.updateDav(l,s,c,n,i);else{if(!(m.indexOf("LOCALFILE")>=0))throw new Error("Unhandled edit method: '"+m+"' for "+l);try{this.updateLocalFile(l,s,c,n,i)}catch(e){n(l.value,!1,"Exception trying to write back file <"+l.value+">\n")}}}catch(e){n(void 0,!1,"Exception in update: "+e+"\n"+F.stackString(e))}}updateDav(e,t,n,r,i={}){let a=this.store;var o=a.any(e,this.ns.link("request"));if(!o)throw new Error("No record of our HTTP GET request for document: "+e);var s=a.any(o,this.ns.link("response"));if(!s)return null;var c=a.the(s,this.ns.httph("content-type")).value;let l=a.statementsMatching(void 0,void 0,void 0,e).slice();for(let e=0;e<t.length;e++)F.RDFArrayRemove(l,t[e]);for(let e=0;e<n.length;e++)l.push(n[e]);const u=this.serialize(e.value,l,c);var p,d=a.the(s,this.ns.httph("content-location"));return d&&(p=(0,x.join)(d.value,p)),i.contentType=c,i.noMeta=!0,i.body=u,a.fetcher.webOperation("PUT",p,i).then(i=>{if(!i.ok)throw new Error(i.error);for(let e=0;e<t.length;e++)a.remove(t[e]);for(let t=0;t<n.length;t++)a.add(n[t].subject,n[t].predicate,n[t].object,e);r(e.value,i.ok,i.responseText,i)}).catch(t=>{r(e.value,!1,t.message,t)})}updateLocalFile(e,t,n,r,i={}){const a=this.store;let o=a.statementsMatching(void 0,void 0,void 0,e).slice();for(let e=0;e<t.length;e++)F.RDFArrayRemove(o,t[e]);for(let e=0;e<n.length;e++)o.push(n[e]);var s=e.value.lastIndexOf(".");if(s<1)throw new Error("Rewriting file: No filename extension: "+e.value);var c=e.value.slice(s+1);let l=Yt.CONTENT_TYPE_BY_EXT[c];if(!l)throw new Error("File extension ."+c+" not supported for data write");i.body=this.serialize(e.value,o,l),i.contentType=l,a.fetcher.webOperation("PUT",e.value,i).then(i=>{if(!i.ok)return r(e.value,!1,i.error);for(let e=0;e<t.length;e++)a.remove(t[e]);for(let t=0;t<n.length;t++)a.add(n[t].subject,n[t].predicate,n[t].object,e);r(e.value,!0,"")})}serialize(e,t,n){const r=this.store;let i;if("string"==typeof t)return t;var a=O(r);switch(a.suggestNamespaces(r.namespaces),a.setBase(e),n){case"text/xml":case"application/rdf+xml":i=a.statementsToXML(t);break;case"text/n3":case"text/turtle":case"application/x-turtle":case"application/n3":i=a.statementsToN3(t);break;default:throw new Error("Content-type "+n+" not supported for data serialization")}return i}put(e,t,n,r){const i=this.store;let a;return Promise.resolve().then(()=>(a=this.serialize(e.value,t,n),i.fetcher.webOperation("PUT",e.value,{contentType:n,body:a}))).then(n=>{if(!n.ok)return r(e.value,n.ok,n.error,n);delete i.fetcher.nonexistent[e.value],delete i.fetcher.requested[e.value],"string"!=typeof t&&t.map(e=>{i.addStatement(e)}),r(e.value,n.ok,"",n)}).catch(t=>{r(e.value,!1,t.message)})}reload(e,t,n){var r=Date.now();e.fetcher.nowOrWhenFetched(t.value,{force:!0,noMeta:!0,clearPreviousData:!0},function(e,i,a){if(e)if(a.onErrorWasCalled||200!==a.status)n(!1,"Non-HTTP error reloading data: "+i,a);else{var o=Date.now()-r;t.reloadTimeTotal||(t.reloadTimeTotal=0),t.reloadTimeCount||(t.reloadTimeCount=0),t.reloadTimeTotal+=o,t.reloadTimeCount+=1,n(!0)}else n(!1,"Error reloading data: "+i,a)})}}const nn={...Te,fetcher:(e,t)=>new Yt(e,t),graph:(e=void 0,t=void 0)=>new X(e,t||{rdfFactory:Te}),lit(e,t,n){return this.literal(""+e,t||n)},st(e,t,n,r){return this.quad(e,t,n,r)}},rn=nn;class an{constructor(e,t){this.parent=e,this.via=t,this.connected=!1,this.pending={},this.subscribed={},this.socket={};try{this.socket=new WebSocket(t),this.socket.onopen=this.onOpen,this.socket.onclose=this.onClose,this.socket.onmessage=this.onMessage,this.socket.onerror=this.onError}catch(e){this.onError(e)}}_decode(e){var t,n,r,i,a,o,s;for(n in i={},a=function(){var n,r,i,a;for(a=[],n=0,r=(i=e.split("&")).length;n<r;n++)t=i[n],a.push(t.split("="));return a}())t=a[n],s=(o=[decodeURIComponent(t[0]),decodeURIComponent(t[1])])[1],null==i[r=o[0]]&&(i[r]=[]),i[r].push(s);return i}_send(e,t,n){var r,i;return i=[e,t,n].join(" "),"function"==typeof(r=this.socket).send?r.send(i):void 0}_subscribe(e){return this._send("sub",e,""),this.subscribed[e]=!0,this.subscribed[e]}onClose(e){var t;for(t in this.connected=!1,this.subscribed)this.pending[t]=!0;return this.subscribed={},this.subscribed}onError(e){throw new Error("onError"+e)}onMessage(e){var t,n;return"ping"===(n=e.data.split(" "))[0]?"function"==typeof(t=this.socket).send?t.send("pong "+n.slice(1).join(" ")):void 0:"pub"===n[0]?this.parent.onUpdate(n[1],this._decode(n[2])):void 0}onOpen(e){var t,n;for(n in this.connected=!0,t=[],this.pending)delete this.pending[n],t.push(this._subscribe(n));return t}subscribe(e){return this.connected?this._subscribe(e):(this.pending[e]=!0,this.pending[e])}}class on{constructor(e){this.fetcher=e,this.graph={},this.via={},this.fetcher.addCallback("headers",this.onHeaders)}onHeaders(e){var t,n,r;return null==e.headers||"undefined"==typeof WebSocket||null===WebSocket||(t=e.headers.etag,r=e.headers["updates-via"],n=e.uri,t&&r&&(this.graph[n]={etag:t,via:r},this.register(r,n))),!0}onUpdate(e,t){return this.fetcher.refresh(rn.namedNode(e))}register(e,t){return null==this.via[e]&&(this.via[e]=new an(this,e)),this.via[e].subscribe(t)}}const sn={};for(const e in rn)"function"==typeof rn[e]&&(sn[e]=rn[e].bind(rn));const{fetcher:cn,graph:ln,lit:un,st:pn,namedNode:dn,variable:fn,blankNode:hn,defaultGraph:mn,literal:gn,quad:vn,triple:bn}=sn,yn=new q,wn=e=>yn.fromNT(e),xn=$.fromValue,kn=c.nextId;class _n extends X{constructor(e){super(e),(0,i.A)(this,"fetcher",void 0),this.fetcher=new Yt(this,{})}}class En extends _n{constructor(e){super(e),(0,i.A)(this,"updater",void 0),this.updater=new tn(this)}}},4940(e,t,n){"use strict";n.d(t,{A:()=>r});const r={debug(e){},warn(e){},info(e){},error(e){},success(e){},msg(e){}}},5108(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(4467),i=n(1059),a=n(8936),o=n(9403),s=n(2931),c=n(2915);class l extends a.A{constructor(e){if(super((0,s.E)(e)),(0,r.A)(this,"termType",o.Kk),(0,r.A)(this,"classOrder",i.A.NamedNode),!this.value)throw new Error("Missing IRI for NamedNode");if(!this.value.includes(":"))throw new Error('NamedNode IRI "'+e+'" must be absolute.');if(this.value.includes(" "))throw new Error('Error: NamedNode IRI "'+e+'" must not contain unencoded spaces.')}dir(){var e=this.value.split("#")[0],t=e.slice(0,-1).lastIndexOf("/"),n=e.indexOf("//");return n>=0&&t<n+2||t<0?null:new l(e.slice(0,t+1))}site(){var e=this.value.split("#")[0],t=e.indexOf("//");if(t<0)throw new Error("This URI does not have a web site part (origin)");var n=e.indexOf("/",t+2);return new l(n<0?e.slice(0)+"/":e.slice(0,n+1))}doc(){return this.value.indexOf("#")<0?this:new l(this.value.split("#")[0])}toString(){return"<"+this.value+">"}id(){return this.value.split("#")[1]}get uri(){return this.value}set uri(e){this.value=e}static fromValue(e){return null==e||(0,c.D0)(e)?e:new l(e)}}},8936(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(4467);class i{constructor(e){(0,r.A)(this,"termType",void 0),(0,r.A)(this,"classOrder",void 0),(0,r.A)(this,"value",void 0),this.value=e}substitute(e){return this}compareTerm(e){return this.classOrder<e.classOrder?-1:this.classOrder>e.classOrder?1:this.value<e.value?-1:this.value>e.value?1:0}equals(e){return!!e&&(this.termType===e.termType&&this.value===e.value)}hashString(){return this.toCanonical()}sameTerm(e){return this.equals(e)}toCanonical(){return this.toNT()}toNT(){return this.toString()}toNQ(){return this.toNT()}toString(){throw new Error("Node.toString() is abstract - see the subclasses instead")}}(0,r.A)(i,"fromValue",void 0),(0,r.A)(i,"toJS",void 0)},9403(e,t,n){"use strict";n.d(t,{$Q:()=>i,BR:()=>m,Fn:()=>w,H:()=>_,JG:()=>b,K9:()=>y,Kk:()=>r,MG:()=>h,P2:()=>o,QW:()=>a,S:()=>l,_0:()=>g,bD:()=>u,bM:()=>v,hu:()=>k,i2:()=>d,ic:()=>s,lc:()=>p,ny:()=>f,r0:()=>c,sT:()=>x});const r="NamedNode",i="BlankNode",a="Literal",o="Variable",s="DefaultGraph",c="Collection",l="Empty",u="Graph",p="text/html",d="application/ld+json",f="text/n3",h="application/n3",m="application/nquads",g="application/n-quads",v="application/n-triples",b="application/rdf+xml",y="application/sparql-update",w="application/sparql-update-single-match",x="text/turtle",k="application/x-turtle",_="application/xhtml+xml"},2727(e,t,n){"use strict";n.r(t),n.d(t,{docpart:()=>a,document:()=>o,hostpart:()=>s,join:()=>c,protocol:()=>l,refTo:()=>u});var r=n(5108),i=i||console.log;function a(e){var t;return(t=e.indexOf("#"))<0?e:e.slice(0,t)}function o(e){return new r.A(a(e))}function s(e){var t=/[^\/]*\/\/([^\/]*)\//.exec(e);return t?t[1]:""}function c(e,t){var n,r,a,o,s,c=t.indexOf("#");if(c>0&&(t=t.slice(0,c)),0===e.length)return t;if(0===e.indexOf("#"))return t+e;if(e.indexOf(":")>=0)return e;if(n=t.indexOf(":"),0===t.length)return e;if(n<0)return i("Invalid base: "+t+" in join with given: "+e),e;if(r=t.slice(0,+n+1||9e9),0===e.indexOf("//"))return r+e;if(t.indexOf("//",n)===n+1){if((a=t.indexOf("/",n+3))<0)return t.length-n-3>0?t+"/"+e:r+e}else if((a=t.indexOf("/",n+1))<0)return t.length-n-1>0?t+"/"+e:r+e;if(0===e.indexOf("/"))return t.slice(0,a)+e;if((o=(s=t.slice(a)).lastIndexOf("/"))<0)return r+e;for(o>=0&&o<s.length-1&&(s=s.slice(0,+o+1||9e9)),s+=e;s.match(/[^\/]*\/\.\.\//);)s=s.replace(/[^\/]*\/\.\.\//,"");return s=(s=s.replace(/\.\//g,"")).replace(/\/\.$/,"/"),t.slice(0,a)+s}function l(e){const t=e.indexOf(":");return t<0?null:e.slice(0,t)}function u(e,t){var n,r,i,a,o,s,c,l,u,p,d,f,h=new RegExp("^[-_a-zA-Z0-9.]+:(//[^/]*)?/[^/]*$");if(!e)return t;if(e===t)return"";for(n=c=0,a=t.length;c<a;n=++c){if(t[n]!==e[n])break}if(e.slice(0,n).match(h)&&((r=t.indexOf("//"))<0&&(r=-2),i=t.indexOf("/",r+2),"/"!==t[i+1]&&"/"!==e[i+1]&&t.slice(0,i)===e.slice(0,i)))return t.slice(i);if("#"===t[n]&&e.length===n)return t.slice(n);for(;n>0&&"/"!==t[n-1];)n--;if(n<3)return t;if(e.indexOf("//",n-2)>0||t.indexOf("//",n-2)>0)return t;if(e.indexOf(":",n)>0)return t;for(s=0,l=0,o=(p=e.slice(n)).length;l<o;l++)"/"===p[l]&&s++;if(0===s&&n<t.length&&"#"===t[n])return"./"+t.slice(n);if(0===s&&n===t.length)return"./";if(f="",s>0)for(u=1,d=s;d>=1?u<=d:u>=d;d>=1?++u:--u)f+="../";return f+t.slice(n)}},4011(e,t,n){"use strict";n.r(t),n.d(t,{DOMParserFactory:()=>p,RDFArrayRemove:()=>y,callbackify:()=>u,domToString:()=>d,dtstamp:()=>h,dumpNode:()=>f,heavyCompare:()=>m,heavyCompareSPO:()=>g,linkRelationProperty:()=>l,log:()=>i.A,mediaTypeClass:()=>c,output:()=>v,parseXML:()=>b,stackString:()=>x,string:()=>s,string_startswith:()=>w,uri:()=>r});var r=n(2727),i=n(4940),a=n(5108),o=n(8392);e=n.hmd(e);const s={template:function(e,t){for(var n=e.split("%s"),r="",i=0;i<t.length;i++)t[i]+="",r+=n[i]+t[i];return r+n.slice(t.length).join()}};function c(e){return e=e.split(";")[0].trim(),new a.A("http://www.w3.org/ns/iana/media-types/"+e+"#Resource")}function l(e){return new a.A("http://www.w3.org/ns/iana/link-relations/relation#"+e.trim())}function u(e,t){e.callbacks={};for(var n=t.length-1;n>=0;n--)e.callbacks[t[n]]=[];e.addHook=function(t){e.callbacks[t]||(e.callbacks[t]=[])},e.addCallback=function(t,n){e.callbacks[t].push(n)},e.removeCallback=function(t,n){for(var r=0;r<e.callbacks[t].length;r++)if(e.callbacks[t][r].name===n)return e.callbacks[t].splice(r,1),!0;return!1},e.insertCallback=function(t,n){e.callbacks[t].unshift(n)},e.fireCallbacks=function(t,n){var r,i=[],a=[],o=e.callbacks[t].length;let s;for(r=o-1;r>=0;r--)s=e.callbacks[t][r],s&&s.apply(e,n)&&i.push(s);for(r=i.length-1;r>=0;r--)a.push(i[r]);for(r=o;r<e.callbacks[t].length;r++)a.push(e.callbacks[t][r]);e.callbacks[t]=a}}function p(){return window.DOMParser?new o.DOMParser:!!window.ActiveXObject&&new ActiveXObject("Microsoft.XMLDOM")}function d(e,t){var n=[];(t=t||{})&&t.selfClosing&&t.selfClosing.split(" ").forEach(function(e){n[e]=!0});var r=[];return t&&t.skipAttributes&&t.skipAttributes.split(" ").forEach(function(e){r[e]=!0}),f(e,t,n,r)}function f(e,t,n,r){var i,a="",o=[!1];if(void 0===e.nodeType)return a;if(1===e.nodeType){if(e.hasAttribute("class")&&t&&t.classWithChildText&&e.matches(t.classWithChildText.class))a+=e.querySelector(t.classWithChildText.element).textContent;else if(!(t&&t.skipNodeWithClass&&e.matches("."+t.skipNodeWithClass))){var s=e.nodeName.toLowerCase();a+="<"+s;var c=[];for(i=e.attributes.length-1;i>=0;i--){var l=e.attributes[i];if(!(r&&r.length>0&&r[l.name])&&!/^\d+$/.test(l.name)){if("class"===l.name&&t&&t.replaceClassItemWith&&l.value.split(" ").indexOf(t.replaceClassItemWith.source)>-1){var u=new RegExp(t.replaceClassItemWith.source,"g");l.value=l.value.replace(u,t.replaceClassItemWith.target).trim()}"class"===l.name&&t&&t.skipClassWithValue&&t.skipClassWithValue===l.value||c.push(l.name+"='"+l.value.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,""")+"'")}}if(c.length>0&&(t&&t.sortAttributes&&c.sort(function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}),a+=" "+c.join(" ")),n&&n.ename)a+=" />";else{for(a+=">",a+="html"===s?"\n ":"",o.push("style"===s||"script"===s),i=0;i<e.childNodes.length;i++)a+=f(e.childNodes[i]);o.pop(),a+="body"===s?"</"+s+">\n":"</"+s+">"}}}else if(8===e.nodeType)a+="\x3c!--"+e.nodeValue+"--\x3e";else if(3===e.nodeType||4===e.nodeType){var p=e.nodeValue.replace(/\n+$/,"");a+=o[o.length-1]?p:p.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}return a}function h(){var e=new Date,t=e.getYear()+1900,n=e.getMonth()+1,r=e.getDate(),i=e.getUTCHours(),a=e.getUTCMinutes(),o=e.getSeconds();return n<10&&(n="0"+n),r<10&&(r="0"+r),i<10&&(i="0"+i),a<10&&(a="0"+a),o<10&&(o="0"+o),t+"-"+n+"-"+r+"T"+i+":"+a+":"+o+"Z"}function m(e,t,n,r){var i=function(e){return"BlankNode"===e.termType?null:e},a=function(e){var t=n.statementsMatching(e).map(function(e){return i(e.subject)+" "+i(e.predicate)+" "+i(e.object)}).concat(n.statementsMatching(void 0,void 0,e).map(function(e){return i(e.subject)+" "+i(e.predicate)+" "+i(e.object)}));return t.sort(),t.join("\n")};const o=Object.prototype.hasOwnProperty.call(n,"compareTerms")?n.compareTerms(e,t):e.compareTerm(t);return"BlankNode"===e.termType&&"BlankNode"===t.termType?0===o?0:a(e)>a(t)?1:a(e)<a(t)?-1:o:r&&e.uri&&t.uri?(r[e.uri]||e.uri).localeCompare(r[t.uri]||t.uri):o}function g(e,t,n,r){return m(e.subject,t.subject,n,r)||m(e.predicate,t.predicate,n,r)||m(e.object,t.object,n,r)}function v(e){var t=document.createElement("div");t.textContent=e,document.body.appendChild(t)}function b(t,n){return n=n||{},e&&e.exports?(new o.DOMParser).parseFromString(t,n.contentType||"application/xhtml+xml"):("undefined"!=typeof window&&window.DOMParser?new window.DOMParser:new o.DOMParser).parseFromString(t,"application/xml")}function y(e,t){for(var n=0;n<e.length;n++)if(e[n].subject.equals(t.subject)&&e[n].predicate.equals(t.predicate)&&e[n].object.equals(t.object)&&e[n].why.equals(t.why))return void e.splice(n,1);throw new Error("RDFArrayRemove: Array did not contain "+t+" "+t.why)}function w(e,t){return e.slice(0,t.length)===t}function x(e){var t=e+"\n";if(!e.stack)return t+"No stack available.\n";for(var n=e.stack.toString().split("\n"),r=[],i=0;i<n.length;i++){var a=n[i];if(a.indexOf("ecmaunit.js")>-1)break;"("==a.charAt(0)&&(a="function"+a);var o=a.split("@");r.push(o)}for(i=0;i<r.length;i++)t+=" "+r[i][1]+"\n "+r[i][0];return t}},2931(e,t,n){"use strict";function r(e){return"string"==typeof e?e:e.value}n.d(t,{E:()=>r})},2915(e,t,n){"use strict";n.d(t,{CZ:()=>c,D0:()=>p,DJ:()=>s,DZ:()=>u,GE:()=>b,P3:()=>o,RN:()=>y,SH:()=>i,Y2:()=>h,YC:()=>v,aF:()=>f,c$:()=>d,fY:()=>l,hr:()=>g,jt:()=>m,ok:()=>a});var r=n(9403);function i(e){return"object"==typeof e&&null!==e&&"subject"in e}function a(e){return"object"==typeof e&&null!==e&&"statements"in e}function o(e){return p(e)&&e.termType===r.r0}function s(e){return e&&Object.prototype.hasOwnProperty.call(e,"termType")&&(e.termType===r.Kk||e.termType===r.P2||e.termType===r.$Q||e.termType===r.r0||e.termType===r.QW||e.termType===r.bD)}function c(e){return e&&Object.prototype.hasOwnProperty.call(e,"termType")&&(e.termType===r.Kk||e.termType===r.P2||e.termType===r.$Q||e.termType===r.r0||e.termType===r.QW||e.termType===r.bD)}function l(e){return p(e)&&(e.termType===r.Kk||e.termType===r.$Q||e.termType===r.P2)}function u(e){return p(e)&&e.termType===r.P2}function p(e){return"object"==typeof e&&null!==e&&"termType"in e}function d(e){return e.termType===r.QW}function f(e){return"object"==typeof e&&null!==e&&"subject"in e&&"predicate"in e&&"object"in e}function h(e){return p(e)&&"NamedNode"===e.termType}function m(e){return p(e)&&"termType"in e&&"BlankNode"===e.termType}function g(e){return p(e)&&(e.termType===r.Kk||e.termType===r.P2||e.termType===r.$Q)}function v(e){return p(e)&&(e.termType===r.Kk||e.termType===r.P2)}function b(e){return p(e)&&(e.termType===r.Kk||e.termType===r.P2||e.termType===r.$Q||e.termType===r.QW)}function y(e){return p(e)&&(e.termType===r.Kk||e.termType===r.P2||e.termType===r.$Q||e.termType===r.ic)}},3172(e,t){"use strict"},1247(e,t,n){"use strict";var r=n(9982),i=n(6540),a=n(961);
|
|
324
|
+
`}},2865(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIconForClass=u,t.iconForClassMap=void 0,t.presentStuff=async function(e){const t=await c(null,e);return{stuff:t.map(e=>{const t=u(e.type||i.ns.rdf("Resource"));return{href:e.instance.uri,name:i.utils.label(e.instance),icon:t,instance:e.instance}})}};var r=n(8230),i=n(500),a=n(9332);const{iconForClass:o}=i.widgets,{typeIndex:s}=a.solidLogicSingleton,{getScopedAppInstances:c}=s,l=t.iconForClassMap={};for(const e in o){const t=e.split(":")[0],n=e.split(":")[1],a=i.ns[t](n);l[a.uri]=r.uri.join(o[e],i.icons.iconBase)}function u(e){return l[e.uri]||i.icons.iconBase+"noun_10636.svg"}},4695(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addMeToYourFriendsDiv=void 0,t.checkIfFriendExists=f,t.createAddMeToYourFriendsButton=void 0,t.saveNewFriend=p;var r=n(6752),i=n(9332),a=n(8230),o=n(500),s=n(4198),c=n(1363);n(1594);let l=document.createElement("section");t.addMeToYourFriendsDiv=(e,t)=>{l=t.dom.createElement("section"),l.setAttribute("class","buttonSubSection text-truncate text-center section-centered"),l.setAttribute("aria-labelledby","add-me-to-your-friends-button-section"),l.setAttribute("data-testid","button");const n=t.dom.createElement("h3");n.setAttribute("id","add-me-to-your-friends-button-section"),n.setAttribute("class","sr-only"),n.textContent="Add me to your friends actions",l.appendChild(n);const i=u(e,t);return i.classList.add("actionButton","btn-primary","action-button-focus"),l.appendChild(i),r.html`${l}`};const u=(e,t)=>{let n=d(i.authn.currentUser())?c.addMeToYourFriendsButtonText.toUpperCase():c.logInAddMeToYourFriendsButtonText.toUpperCase();const r=o.widgets.button(t.dom,void 0,n,function(n){n.preventDefault(),p(e,t).then(()=>{(0,s.clearPreviousMessage)(l),(0,s.mention)(l,c.friendWasAddedSuccesMessage),a()}).catch(e=>{(0,s.clearPreviousMessage)(l),(0,s.complain)(l,t,e)})},{needsBorder:!0});function a(){const n=i.authn.currentUser(),a=t.session.store;d(n)?f(a,n,e).then(e=>{r.innerHTML=e?c.friendExistsAlreadyButtonText.toUpperCase():c.addMeToYourFriendsButtonText.toUpperCase()}):r.innerHTML=c.logInAddMeToYourFriendsButtonText.toUpperCase()}return r.refresh=a(),r};async function p(e,t){const n=i.authn.currentUser(),r=t.session.store;if(!d(n))throw new Error(c.userNotLoggedInErrorMessage);if(await f(r,n,e))throw new Error(c.friendExistsMessage);{await r.fetcher.load(n);const t=r.updater,i=[(0,a.st)(n,o.ns.foaf("knows"),e,n.doc())];try{await t.update([],i)}catch(e){let t=e;throw t.toString().includes("Unauthenticated")&&(t=c.userNotLoggedInErrorMessage),new Error(t)}}}function d(e){return!!e}async function f(e,t,n){return await e.fetcher.load(t),0!==e.whether(t,o.ns.foaf("knows"),n,t.doc())}t.createAddMeToYourFriendsButton=u},4198(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkIfAnyUserLoggedIn=function(e){return!!e},t.clearPreviousMessage=function(e){for(;e.childNodes.length>2;)e.removeChild(e.lastChild)},t.complain=function(e,t,n){const i=r.widgets.errorMessageBlock(t.dom,n);i.setAttribute("role","alert"),i.setAttribute("aria-live","assertive"),i.setAttribute("tabindex","0"),setTimeout(()=>{i.focus()},100),e.appendChild(i)},t.mention=function(e,t){const n=document.createElement("div");n.setAttribute("role","status"),n.setAttribute("aria-live","polite"),n.setAttribute("tabindex","0"),n.classList.add("actionButton","licOkay"),n.innerHTML=t,setTimeout(()=>{n.focus()},100),e.appendChild(n)};var r=n(500)},6016(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditCVSection=function(e,t,n,r){const o=e.dom.createElement("section");o.setAttribute("data-testid","edit-cv-section"),o.setAttribute("aria-labelledby","edit-profile-cv-heading"),o.classList.add("profileSection","section-bg","profile-form");const s=e.dom.createElement("header");s.classList.add("text-center","mb-md");const c=e.dom.createElement("h2");if(c.id="edit-profile-cv-heading",c.classList.add("section-title"),c.textContent=a.resumeHeadingText,s.appendChild(c),o.appendChild(s),n){const t=e.dom.createElement("p");t.classList.add("p-md"),t.textContent="Edit your resume. These will be publicly visible on your profile.",o.appendChild(t)}else{const t=e.dom.createElement("p");t.classList.add("p-md"),t.textContent="Login to add resume information to your profile.",o.appendChild(t)}return(0,i.default)(o,t,'@prefix os: <http://www.w3.org/2000/10/swap/os#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix schema: <http://schema.org/>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n@prefix org: <http://www.w3.org/ns/org#>.\n@prefix esco: <http://data.europa.eu/esco/model#>.\n@prefix wd: <http://www.wikidata.org/entity/>.\n@prefix wdt: <http://www.wikidata.org/prop/direct/>.\n\n@prefix : <#>.\n\n:this\n <http://purl.org/dc/elements/1.1/title> "Resume form" ;\n a ui:Form ;\n ui:parts (\n :CVGroup\n :SkillsHeading :SkillsForm\n :LanguagesHeading :LanguagesForm\n ).\n\n# Curriculum Vitae: membership of organizations\n\n:CVGroup a ui:Group; \n ui:weight 1; \n ui:parts ( \n :CVPrompt \n :involvementWithOrganizationsForm \n ).\n\n:CVPrompt a ui:Comment; ui:contents "What organizations have you been involved with?" .\n\n:involvementWithOrganizationsForm a ui:Multiple;\n ui:label "Involvement with organization";\n ui:property org:member; \n ui:reverse true; # link back from role to member\n ui:ordered false; # Allow user to order CV secions rather than force date order? No.\n ui:part :RoleMembershipForm.\n\norg:member owl:inverse [ ui:label "Involvement with organization" ]. # timelimited involvement\n\n# This is a big important form for one of a series of roles in the list.\n\n:RoleMembershipForm a ui:Group; \n ui:weight 3; \n ui:parts ( \n :MembershipFormHeading \n :roleNameField\n :escoOccupationField \n :orgField \n :RoleClassifier \n :RoleDatesForm \n :RoleDescriptionForm).\n\n:MembershipFormHeading a ui:Heading; \n ui:contents "Details of the role"@en, "Détailes de ce rôle"@fr .\n\n:roleNameField a ui:SingleLineTextField; \n ui:property vcard:role .\n\n:escoOccupationField a ui:AutocompleteField;\n ui:label "Occupation";\n ui:property org:role;\n ui:dataSource :ESCO_Occupation_DataSource;\n ui:targetClass schema:Occupation .\n\n :ESCO_Occupation_DataSource a ui:DataSource;\n schema:name "ESCO";\n ui:targetClass schema:Occupation ;\n schema:logo <https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif>;\n ui:searchByNameURI "https://ec.europa.eu/esco/api/search?language=$(language)&type=occupation&text=$(name)".\n\n:orgField a ui:Choice; \n ui:label "Organization"@en, "Organization"@fr;\n ui:canMintNew true; \n ui:use :OrganizationCreationForm ;\n ui:property org:organization;\n ui:from vcard:Organization .\n\nvcard:Organization ui:creationForm :OrganizationCreationForm .\n\n###### eposodes in one\'s career - Roles\n\n:RoleClassifier a ui:Classifier; \n ui:label "What sort of role?"@en;\n ui:category solid:Role .\n\n:RoleDatesForm a ui:Options; \n ui:dependingOn rdf:type; \n ui:case\n [ ui:for solid:PastRole; ui:use :TwoDateForm ],\n [ ui:for solid:CurrentRole; ui:use :StartDateForm ],\n [ ui:for solid:FutureRole; ui:use :StartDateForm ].\n\n :TwoDateForm a ui:Group; \n ui:weight 0; \n ui:parts ( :StartDateForm :EndDateForm ) .\n :StartDateForm a ui:DateField; \n ui:label "Start"@en,"Début"@fr;\n ui:property schema:startDate .\n :EndDateForm a ui:DateField; \n ui:label "End"@en,"Fin"@fr;\n ui:property schema:endDate .\n\nsolid:Role a rdfs:Class;\n owl:disjointUnionOf ( solid:PastRole solid:CurrentRole solid:FutureRole ) ;\n owl:oneOf ( solid:CurrentRole solid:PastRole solid:FutureRole ). # Future Role too?\n\nsolid:PastRole a rdfs:Class; rdfs:label "Former role"@en, "Ancien rôle"@fr, "Vergangene Rolle"@de, "Rol anterior"@es .\nsolid:CurrentRole a rdfs:Class; rdfs:label "Current role"@en, "Rôle actuel"@fr, "Momentane Rolle"@de , "Rol actual"@es .\nsolid:FutureRole a rdfs:Class; rdfs:label "Future role"@en, "Rôle à venir"@fr, "Zukünftige Rolle"@de, "Rol futuro"@es .\n\n:RoleDescriptionForm a ui:MultiLineTextField; \n ui:property schema:description;\n ui:label "Describe your role" .\n\n###### Organizations\n\n:OrganizationCreationForm a ui:Form; \n schema:name "Form for editing an organization using public data" ;\n ui:parts ( \n :OrgClassifier \n :OrgSwitch \n :OrganizationNameField \n :homePageURIField ) .\n\n:OrgClassifier a ui:Classifier; \n ui:label "Type of organization?"@en;\n ui:category solid:InterestingOrganization .\n\n:OrgSwitch a ui:Options; \n ui:dependingOn rdf:type;\n ui:case\n [ ui:for schema:Corporation; ui:use :CorporationForm ],\n [ ui:for schema:GovernmentOrganization; ui:use :GovernmentOrganizationForm ],\n [ ui:for schema:PerformingGroup; ui:use :PerformingGroupForm ],\n [ ui:for schema:Project; ui:use :ProjectForm ],\n [ ui:for schema:NGO; ui:use :NGOForm ],\n [ ui:for schema:EducationalOrganization; ui:use :EducationalOrganizationForm ],\n [ ui:for schema:ResearchOrganization; ui:use :ResearchOrganizationForm ],\n [ ui:for schema:SportsOrganization; ui:use :SportsOrganizationForm ].\n\n:OrganizationNameField\n a ui:SingleLineTextField ;\n ui:label "Name";\n ui:maxLength "200" ;\n ui:property schema:name .\n\n:homePageURIField a ui:NamedNodeURIField;\n ui:label "Homepage"@en;\n ui:property schema:uri .\n\n# Ontology data to drive the :OrgClassifier classifier\nsolid:InterestingOrganization owl:disjointUnionOf (\n # Airline - a Corporation\n # Consortium - a Corporation or a NGO\n schema:Corporation\n schema:EducationalOrganization\n schema:ResearchOrganization # Proposed. https://github.com/schemaorg/schemaorg/issues/2877\n # FundingScheme - eh?\n schema:GovernmentOrganization\n # LibrarySystem\n # LocalBusiness - Corporation\n # MedicalOrganization - a Corporation or a NGO\n schema:NGO\n # NewsMediaOrganization - a Corporation or a NGO\n schema:PerformingGroup # a band\n schema:Project # like Solid\n schema:SportsOrganization) .\n\n# This until the schema.org ontology adopts it\nschema:ResearchOrganization a rdfs:Class; \n rdfs:label "Research Organization"@en, "Organization de Recherche"@fr ,"organización de investigación"@es, \n "منظمة البحث"@ar, "अनुसंधान संगठन"@hi, "Forschungsorganisation"@de, "shirika la utafiti"@sw .\n\n##### Depending on the type of org, chose a different form\n\n#### Corporation\n:CorporationForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :CorporationPrompt \n :CorporationAutocomplete ) .\n\n :CorporationPrompt a ui:Comment; ui:contents "Corporation details".\n\n :CorporationAutocomplete a ui:AutocompleteField; \n ui:label "Find in wikidata";\n ui:targetClass <http://www.wikidata.org/entity/Q6881511>; # Enterprise\n ui:property solid:publicId; \n ui:dataSource :WikidataInstancesByName.\n\n :WikidataInstancesByName a ui:DataSource ;\n schema:name "Wikidata instances by name";\n ui:endpoint "https://query.wikidata.org/sparql" ;\n ui:searchByNameQuery """SELECT ?subject ?name\n WHERE {\n ?klass wdt:P279* $(targetClass) .\n ?subject wdt:P31 ?klass .\n ?subject rdfs:label ?name.\n FILTER regex(?name, "$(name)", "i")\n } LIMIT $(limit) """ ;\n\n # Note this form of the query is very experimental\n ui:searchByName [ ui:construct { ?subject schema:name ?name } ;\n ui:where { ?klass wdt:P279 ?targetClass .\n ?subject wdt:P31 ?klass; rdfs:label ?name .\n };\n ].\n\n#### Gouvernment\n:GovernmentOrganizationForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :GovernmentOrganizationPrompt \n :GovernmentOrganizationAutocomplete ) .\n\n :GovernmentOrganizationPrompt a ui:Comment; ui:contents "Government organization details".\n\n :GovernmentOrganizationAutocomplete\n a ui:AutocompleteField; ui:label "Find in wikidata";\n ui:targetClass <http://www.wikidata.org/entity/Q327333>; # GovernmentOrganization\n ui:property solid:publicId; \n ui:dataSource :WikidataInstancesByName.\n\n#### Educational\n:EducationalOrganizationForm a ui:Group; \n ui:weight 1; \n ui:parts ( \n :EducationalOrganizationPrompt \n :EducationalOrganizationAutocomplete ) .\n\n :EducationalOrganizationPrompt a ui:Comment; ui:contents "Educational organization details".\n\n :EducationalOrganizationAutocomplete\n a ui:AutocompleteField; ui:label "Find in wikidata";\n ui:targetClass <http://www.wikidata.org/entity/Q2385804>; # EducationalOrganization\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### Research Group\n:ResearchOrganizationForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :ResearchOrganizationPrompt \n :ResearchOrganizationAutocomplete ) .\n\n :ResearchOrganizationPrompt a ui:Comment; ui:contents "Research organizationd details".\n\n :ResearchOrganizationAutocomplete\n a ui:AutocompleteField; ui:label "Find in wikidata";\n ui:targetClass <http://www.wikidata.org/entity/Q31855>; # research institute\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### NGO\n:NGOForm a ui:Group; ui:weight 0; \n ui:parts ( \n :NGOPrompt \n :NGOAutocomplete ) .\n\n :NGOPrompt a ui:Comment; ui:contents "NGO details".\n\n :NGOAutocomplete\n a ui:AutocompleteField; ui:label "Find in wikidata";\n ui:targetClass <http://www.wikidata.org/entity/Q163740>; # Non-profit org\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### Performing group\n:PerformingGroupForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :PerformingGroupPrompt \n :PerformingGroupAutocomplete ) .\n\n :PerformingGroupPrompt a ui:Comment; ui:contents "Performing group details".\n\n :PerformingGroupAutocomplete\n a ui:AutocompleteField; ui:label "Find in wikidata";\n ui:targetClass <http://www.wikidata.org/entity/Q32178211>; # Music Org\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### Project\n:ProjectForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :ProjectPrompt \n :ProjectAutocomplete ) . # :ProjectAutocomplete - no: supress, as not in WD\n\n :ProjectPrompt a ui:Comment; ui:contents "Project details".\n\n :ProjectAutocomplete\n a ui:AutocompleteField; ui:label "Find in wikidata";\n ui:targetClass <http://www.wikidata.org/entity/Q170584>; # Project\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#### Sports Organization\n:SportsOrganizationForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :SportsOrganizationPrompt \n :SportsOrganizationAutocomplete ) .\n\n:SportsOrganizationPrompt a ui:Comment; ui:contents "Sports organization details".\n\n:SportsOrganizationAutocomplete\n a ui:AutocompleteField; ui:label "Find in wikidata";\n ui:targetClass <http://www.wikidata.org/entity/Q4438121>; # SportsOrganization\n ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n#################### Skills\n\n:SkillsHeading a ui:Heading; \n ui:contents "Add your skills" .\n\n:SkillsForm a ui:Multiple;\n ui:label "Skills";\n ui:property schema:skills;\n ui:ordered false; # Allow reader to order skills\n ui:part :SkillForm.\n\n:SkillForm a ui:Group; ui:weight 1; ui:parts ( :escoSkillField ).\n\n :escoSkillField a ui:AutocompleteField;\n ui:label "Find in ESCO";\n ui:property solid:publicId;\n ui:dataSource :ESCO_Skill_DataSource;\n ui:targetClass schema:Skill .\n\n :ESCO_Skill_DataSource a ui:DataSource;\n schema:name "ESCO skill";\n ui:targetClass esco:Skill ;\n schema:logo <https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif>;\n ui:searchByNameURI "https://ec.europa.eu/esco/api/search?language=$(language)&limit=$(limit)&type=skill&text=$(name)".\n\n#################### Languages\n\n:LanguagesHeading a ui:Heading; ui:contents "Add your languages" .\n\n:LanguagesForm a ui:Multiple;\n ui:label "Languages";\n ui:property schema:knowsLanguage; \n ui:ordered true; # Allow user to order languages most important first.\n ui:part :LanguageForm.\n\n:LanguageForm a ui:Group; ui:weight 1; ui:parts ( :WikidataLanguageField ).\n\n :WikidataLanguageField a ui:AutocompleteField;\n ui:label "Language";\n ui:property solid:publicId; \n ui:dataSource :WikidataLanguageDataSource;\n ui:targetClass schema:Language .\n\n :WikidataLanguageDataSource\n schema:name "Find in wikidata";\n ui:endpoint "https://query.wikidata.org/sparql" ;\n ui:objectURIBase <https://www.w3.org/ns/iana/language-code/>;\n # Add this to any literal string returned as ?subject\n ui:searchByNameQuery """SELECT ?item ?subject ?name\n WHERE\n { ?item wdt:P305 ?subject .\n OPTIONAL {?item rdfs:label ?name}\n OPTIONAL {?item wdt:P1705 ?name}\n FILTER regex(?name, "$(name)", "i")\n FILTER regex(?subject, "^..$", "i")\n }""" .\n # Note we restrict code to two-letter codes with the second regex, so as to limit the deluge of languages\n # Hope there are not any important ones which have three-letter codes.\n # Omitted: SERVICE wikibase:label { bd:serviceParam wikibase:language "$(languages)". }',"resumeForm.ttl",r,e.dom,n),o};var r,i=(r=n(7824))&&r.__esModule?r:{default:r},a=n(1363)},8188(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditProfileCommunitiesSection=function(e,t,n,a){const o=e.dom.createElement("section");o.setAttribute("aria-labelledby","edit-profile-communities-heading"),o.classList.add("profileSection","section-bg");const s=e.dom.createElement("header");s.classList.add("text-center","mb-md");const c=e.dom.createElement("h2");c.id="edit-profile-communities-heading",c.classList.add("section-title"),c.textContent=i.communitiesHeadingText,s.appendChild(c),o.appendChild(s);const l=e.dom.createElement("p");l.id="edit-profile-communities-description",l.classList.add("p-md"),l.textContent="These are organizations and projects whose stuff you share",o.appendChild(l);let u=null;n&&(u=e.dom.createElement("p"),u.id="edit-profile-communities-help",u.classList.add("p-md"),u.textContent="Drag organizations onto the target below to add organizations.",o.appendChild(u));const p=r.widgets.attachmentList(e.dom,t,o,{doc:a,modify:!!n,predicate:r.ns.solid("community"),noun:"community"}),d=[l.id];u?.id&&d.push(u.id);return p.setAttribute("aria-describedby",d.join(" ")),o.appendChild(p),o};var r=n(500),i=n(1363)},1344(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditContactsSection=function(e,t){const n=e.dom.createElement("section");n.setAttribute("aria-labelledby","edit-profile-contact-heading"),n.classList.add("profileSection","section-bg","profile-form");const i=e.dom.createElement("header");i.classList.add("text-center","mb-md");const a=e.dom.createElement("h2");return a.id="edit-profile-contact-heading",a.classList.add("section-title"),a.textContent=r.yourContactInformationHeading,i.appendChild(a),n.appendChild(i),n.appendChild(function(e,t,n){const r=e.session.paneRegistry.byName(n);if(!r){const t=e.dom.createElement("div");return t.innerText=`Unable to load view: ${n}`,t}const i=r.render(t,e);let a;i&&"function"==typeof i.setAttribute?a=i:i&&i.nodeType===Node.TEXT_NODE?(a=e.dom.createElement("section"),a.appendChild(i)):(a=e.dom.createElement("section"),a.innerText=`View render did not return a valid Node for: ${n}`);return a.setAttribute("role","region"),a.setAttribute("aria-label",`${n} section`),a}(e,t,"contact")),n};var r=n(1363)},8308(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditFriendsSection=function(e,t,n,a){const o=e.dom.createElement("section");o.setAttribute("aria-labelledby","edit-profile-friends-heading"),o.classList.add("profileSection","section-bg");const s=e.dom.createElement("header");s.classList.add("text-center","mb-md");const c=e.dom.createElement("h2");c.id="edit-profile-friends-heading",c.classList.add("section-title"),c.textContent=i.friendsHeadingText,s.appendChild(c),o.appendChild(s);const l=e.dom.createElement("p");l.id="edit-profile-friends-description",l.classList.add("p-md"),l.textContent="This is your public social network. Only put people here to whom you are happy to be publicly connected. (You can always keep private track of friends and family in your contacts.)",o.appendChild(l);let u=null;n&&(u=e.dom.createElement("p"),u.id="edit-profile-friends-help",u.classList.add("p-md"),u.textContent="Drag people onto the target below to add people.",o.appendChild(u));const p=r.widgets.attachmentList(e.dom,t,o,{doc:a,modify:!!n,predicate:r.ns.foaf("knows"),noun:"friend"}),d=[l.id];u?.id&&d.push(u.id);return p.setAttribute("aria-describedby",d.join(" ")),o.appendChild(p),o};var r=n(500),i=n(1363)},7643(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditOtherPreferencesSection=function(e,t,n,r){const o=e.dom.createElement("section");o.setAttribute("data-testid","edit-other-preferences-section"),o.setAttribute("aria-labelledby","edit-profile-other-preferences-heading"),o.classList.add("profileSection","section-bg","profile-form");const s=e.dom.createElement("header");s.classList.add("text-center","mb-md");const c=e.dom.createElement("h2");return c.id="edit-profile-other-preferences-heading",c.classList.add("section-title"),c.textContent=a.otherPreferencesHeadingText,s.appendChild(c),o.appendChild(s),(0,i.default)(o,t,'@prefix os: <http://www.w3.org/2000/10/swap/os#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix schema: <http://schema.org/>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n@prefix wd: <http://www.wikidata.org/entity/>.\n@prefix wdt: <http://www.wikidata.org/prop/direct/>.\n\n@prefix : <#>.\n\n\n:this\n <http://purl.org/dc/elements/1.1/title> "Other preferences form" ;\n a ui:Form ;\n ui:parts (\n :styleGroup\n :nicknameGroup\n :pronounsGroup\n ).\n\n:styleGroup a ui:Group; ui:weight 0; \n ui:parts ( :styleHeading :backgroundColor :highlightColor ).\n\n:styleHeading a ui:Heading; ui:contents "The style of your public profile.".\n\n:backgroundColor a ui:ColorField; ui:property solid:profileBackgroundColor;\n ui:label "Background color"; ui:default "#ffffff".\n:highlightColor a ui:ColorField; ui:property solid:profileHighlightColor;\n ui:label "Highlight color"; ui:default "#000000".\n\n# Nickname\n\n:nicknameGroup a ui:Group; ui:weight 0; \n ui:parts ( :nicknameHeading :nicknameField) .\n\n:nicknameHeading a ui:Heading; ui:contents "What is your nickname?" .\n\n:nicknameField a ui:SingleLineTextField; \n ui:property foaf:nick;\n ui:label "Nickname"@en, "Nom court"@fr.\n\n# Pronouns\n\n:pronounsGroup a ui:Group; ui:weight 0; \n ui:parts ( :pronounsHeading :subjectPronounForm :objectPronounForm :relativePronounForm) .\n\n:pronounsHeading a ui:Heading; ui:contents "What are your pronouns?" .\n\n:subjectPronounForm a ui:SingleLineTextField; ui:property solid:preferredSubjectPronoun;\n ui:size 10; ui:label "he/she/they..." .\n:objectPronounForm a ui:SingleLineTextField; ui:property solid:preferredObjectPronoun;\n ui:size 10; ui:label "him/her/them..." .\n:relativePronounForm a ui:SingleLineTextField; ui:property solid:preferredRelativePronoun;\n ui:size 10; ui:label "his/hers/theirs..." .',"otherPreferencesForm.ttl",r,e.dom,n),o};var r,i=(r=n(7824))&&r.__esModule?r:{default:r},a=n(1363)},5011(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(500),i=n(1344),a=n(8308),o=n(9410),s=n(8188);n(1295),n(7436);var c=n(6016),l=n(7643);const u={global:!0,icon:r.icons.iconBase+"noun_492246.svg",name:"editProfile",label:()=>null,render:function(e,t){const n=t.dom,u=t.session.store,p=n.createElement("section");let d;p.setAttribute("data-testid","profile-editor"),p.setAttribute("role","region"),p.setAttribute("aria-label","Edit your profile");const f=n.createElement("main");f.setAttribute("id","profile-edit-main-content"),f.setAttribute("aria-busy","true"),f.setAttribute("tabindex","-1"),f.classList.add("profile-grid","no-focus-ring");const h=n.createElement("h1");h.classList.add("visually-hidden"),h.textContent="Edit Profile",f.appendChild(h),p.appendChild(f);const m=n.createElement("aside");m.classList.add("p-sm"),m.setAttribute("role","status"),m.setAttribute("aria-live","polite"),m.setAttribute("aria-atomic","true");const g=()=>{m.isConnected||p.appendChild(m)},v={dom:n,div:f,statusArea:m,me:null};return r.login.ensureLoadedProfile(v).then(e=>{const p=e.me,h=p.doc();if(!u.updater)throw new Error("Store has no updater");if(u.any(p,r.ns.solid("editableProfile")))d=u.any(p,r.ns.solid("editableProfile"));else{if(!u.updater.editable(h.uri,u))return g(),void m.appendChild(r.widgets.errorMessageBlock(n,`⚠️ Your profile ${h} is not editable, so we cannot do much here.`,"straw"));d=h}f.appendChild((0,i.EditContactsSection)(t,p)),f.appendChild((0,c.EditCVSection)(t,p,d,u)),f.appendChild((0,o.EditSocialSection)(t,p,d,u)),f.appendChild((0,l.EditOtherPreferencesSection)(t,p,d,u)),f.appendChild((0,a.EditFriendsSection)(t,p,d,h)),f.appendChild((0,s.EditProfileCommunitiesSection)(t,p,d,h)),f.setAttribute("aria-busy","false"),f.focus()}).catch(e=>{g(),m.appendChild(r.widgets.errorMessageBlock(n,e,"#fee")),f.setAttribute("aria-busy","false")}),p}};t.default=u},9410(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditSocialSection=function(e,t,n,r){const o=e.dom.createElement("section");o.setAttribute("data-testid","edit-social-section"),o.setAttribute("aria-labelledby","edit-profile-social-heading"),o.classList.add("profileSection","section-bg","profile-form");const s=e.dom.createElement("header");s.classList.add("text-center","mb-md");const c=e.dom.createElement("h2");if(c.id="edit-profile-social-heading",c.classList.add("section-title"),c.textContent=a.socialAccountsHeadingText,s.appendChild(c),o.appendChild(s),n){const t=e.dom.createElement("p");t.classList.add("p-md"),t.textContent="Add links to your social media accounts here. These will be publicly visible on your profile.",o.appendChild(t)}else{const t=e.dom.createElement("p");t.classList.add("p-md"),t.textContent="Login to add social media accounts to your profile.",o.appendChild(t)}return(0,i.default)(o,t,'@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix schema: <http://schema.org/>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n@prefix org: <http://www.w3.org/ns/org#>.\n@prefix : <#>.\n\n########### ATTENTION - we cannot rename this ontology file name without migrating existing data on existing accounts\n\n########### Social Media - other accounts\n#\n# Twitter, linked In, Orkid, Mastodon, Matrix, Bluesky, Instagram, Facebook, Github,\n# Snapchat, TikTok, etc\n\n:this\n <http://purl.org/dc/elements/1.1/title> "Social media form" ;\n a ui:Form ;\n ui:parts (\n :SocialsForm\n ).\n\n:SocialsForm a ui:Multiple;\n ui:label "online account";\n ui:property foaf:account; # the triple is created with the foaf:acccounts predicate\n ui:ordered true; # Allow user to order occounts most important first.\n ui:part :AccountsForm.\n\n:AccountsForm a ui:Group; \n ui:weight 1; \n ui:parts ( \n :AccountField \n :AccountIdField ).\n\n:AccountField a ui:Classifier; \n ui:label "Choose account"@en;\n ui:multiple false ; \n ui:category foaf:Account. # the accounts are described by the foaf:Account predicate\n\n# this is what is needed to make a dropdown box\nfoaf:Account a rdfs:Class;\n rdfs:label "Online Account Provider";\n owl:disjointUnionOf ( \n :BlueSkyAccount :DiggAccount :FacebookAccount :GithubAccount :InstagramAccount\n :LinkedInAccount :MastodonAccount :MatrixAccount :MediumAccount :NostrAccount \n :OrcidAccount :PinterestAccount :RedditAccount :SnapchatAccount :StravaAccount \n :TiktokAccount :TumblrAccount :TwitterAccount :OtherAccount) .\n\n:AccountIdField a ui:Options; \n ui:dependingOn rdf:type; \n ui:case\n [ ui:for :BlueSkyAccount; ui:use :BlueSkyIdField ],\n [ ui:for :DiggAccount; ui:use :DiggIdField],\n [ ui:for :FacebookAccount; ui:use :FacebookIdField ],\n [ ui:for :GithubAccount; ui:use :GithubIdField ],\n [ ui:for :InstagramAccount; ui:use :InstagramIdField ],\n [ ui:for :LinkedInAccount; ui:use :LinkedInIdField ],\n [ ui:for :MastodonAccount; ui:use :MastodonIdField ],\n [ ui:for :MatrixAccount; ui:use :MatrixIdField ],\n [ ui:for :MediumAccount; ui:use :MediumIdField ],\n [ ui:for :NostrAccount; ui:use :NostrIdField ],\n [ ui:for :OrcidAccount; ui:use :OrcidIdField ],\n [ ui:for :PinterestAccount; ui:use :PinterestIdField ],\n [ ui:for :RedditAccount; ui:use :RedditIdField ],\n [ ui:for :StravaAccount; ui:use :StravaIdField ],\n [ ui:for :SnapchatAccount; ui:use :SnapchatIdField ],\n [ ui:for :TiktokAccount; ui:use :TiktokIdField ],\n [ ui:for :TumblrAccount; ui:use :TumblrIdField ],\n [ ui:for :TwitterAccount; ui:use :TwitterIdField ],\n [ ui:for :OtherAccount; ui:use :OtherIdForm ] .\n\n:BlueSkyAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Bluesky";\n foaf:userProfilePrefix "https://bsky.app/profile/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/bluesky-1.svg>;\n foaf:homepage <https://bsky.app/> .\n\n:DiggAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Digg";\n foaf:userProfilePrefix "https://www.digg.com/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/digg-icon.svg>;\n foaf:homepage <https://www.digg.com/> .\n\n:FacebookAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Facebook";\n foaf:userProfilePrefix "https://www.facebook.com/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/facebook-2020-2-1.svg>;\n foaf:homepage <https://www.facebook.com/> .\n\n:GithubAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Github";\n foaf:userProfilePrefix "https://www.github.com/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/github-icon.svg>;\n foaf:homepage <https://github.com/> .\n\n:InstagramAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Instagram";\n foaf:userProfilePrefix "https://www.instagram.com/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/instagram-2016-5.svg>;\n foaf:homepage <https://www.instagram.com/> .\n\n:LinkedInAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "LinkedIn";\n foaf:userProfilePrefix "https://www.linkedin.com/in/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/linkedin-icon.svg>;\n foaf:homepage <https://linkedin.com/> .\n\n:MastodonAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Mastodon" ;\n foaf:userProfilePrefix "https://mastodon.social/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/mastodon-2.svg>;\n foaf:homepage <https://joinmastodon.org/> .\n\n:MatrixAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Matrix" ;\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/matrix-logo-black.svg> ;\n foaf:userProfilePrefix "https://matrix.to/#/" ;\n foaf:homepage <https://matrix.org/> .\n\n:MediumAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Medium";\n foaf:userProfilePrefix "https://medium.com/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/medium-logo-wordmark-black.svg>;\n foaf:homepage <https://medium.com/> .\n\n:NostrAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Nostr";\n foaf:userProfilePrefix "https://primal.net/p/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/nostr-icon-purple-on-white.svg>;\n foaf:homepage <https://nostr.net/> .\n\n:OrcidAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "ORCiD";\n foaf:userProfilePrefix "https://orcid.org/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/ORCID-1.svg>;\n foaf:homepage <https://orcid.org/> .\n\n:PinterestAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Pinterest";\n foaf:userProfilePrefix "https://pin.it/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/pinterest-2-1.svg>;\n foaf:homepage <https://pinterest.com/> .\n\n:RedditAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Reddit";\n foaf:userProfilePrefix "https://www.reddit.com/user/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/reddit-4.svg>;\n foaf:homepage <https://reddit.com/> .\n\n:SnapchatAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Snapchat";\n foaf:userProfilePrefix "https://www.snapchat.com/add/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/snapchat-1.svg>;\n foaf:homepage <https://www.snapchat.com/> .\n\n:StravaAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Strava";\n foaf:userProfilePrefix "https://www.strava.com/athletes/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/strava-2.svg>;\n foaf:homepage <https://strava.com/> .\n\n:TiktokAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "TikTok";\n foaf:userProfilePrefix "https://www.tiktok.com/@";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/tiktok-icon-2.svg>;\n foaf:homepage <https://www.tiktok.com/> .\n\n:TumblrAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Tumblr";\n foaf:userProfilePrefix "https://www.tumblr.com/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/tumblr-icon.svg>;\n foaf:homepage <https://www.tumblr.com/> .\n\n:TwitterAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "X";\n foaf:userProfilePrefix "https://x.com/";\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/social/x-2.svg>;\n foaf:homepage <https://x.com/> .\n\n:OtherAccount rdfs:subClassOf foaf:Account ;\n rdfs:label "Other" ;\n foaf:icon <https://solidos.github.io/solid-ui/src/icons/noun_1689339.svg> .\n\n:BlueSkyIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-](.[a-z0-9A-Z_-])*".\n\n:DiggIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-](.[a-z0-9A-Z_-])*".\n\n:FacebookIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*".\n\n:GithubIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*".\n\n:InstagramIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*".\n\n:LinkedInIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*".\n\n:MastodonIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*".\n\n:MatrixIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*".\n\n:MediumIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*".\n\n:NostrIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*(.[a-z0-9A-Z_-])*".\n\n:OrcidIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*".\n\n:PinterestIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*".\n\n:RedditIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*".\n\n:StravaIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "[a-z0-9A-Z_-]*".\n\n:SnapchatIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-]*".\n\n:TiktokIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-]*".\n\n:TumblrIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-]*".\n\n:TwitterIdField\n a ui:SingleLineTextField ;\n ui:label "Username";\n ui:maxLength "200" ;\n ui:property foaf:accountName ; \n ui:pattern "@[a-z0-9A-Z_-]*".\n\n# an unknown online account needs more info\n\n:OtherIdForm a ui:Group; \n ui:weight 0; \n ui:parts ( \n :OtherIdField \n :OtherIconField \n :OtherLabelField ).\n\n:OtherIdField\n a ui:NamedNodeURIField ;\n ui:label "Account link";\n ui:maxLength "200" ;\n ui:property foaf:homepage.\n\n:OtherIconField\n a ui:NamedNodeURIField ;\n ui:label "Icon link";\n ui:maxLength "200" ;\n ui:property foaf:icon.\n\n:OtherLabelField\n a ui:SingleLineTextField ;\n ui:label "Name";\n ui:maxLength "200" ;\n ui:property rdfs:label.\n\n# ends\n',"socialMedia.ttl",r,e.dom,n),o};var r,i=(r=n(7824))&&r.__esModule?r:{default:r},a=n(1363)},2643(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(9970),n(1275),n(4675),n(1594),n(8235),n(2195),n(8428),n(5755),n(1295);var r,i=n(6752),a=n(3447),o=(r=n(5011))&&r.__esModule?r:{default:r},s=n(500),c=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o}(e,t)}(n(7583));const l={global:!1,icon:s.icons.iconBase+"noun_15059.svg",name:"profile",label:function(e,t){const n=t.session.store.findTypeURIs(e);return n[s.ns.vcard("Individual").uri]||n[s.ns.foaf("Person").uri]||n[s.ns.schema("Person").uri]?"Profile":null},editor:o.default,render:(e,t)=>{const n=t.dom.createElement("div");return async function(e,t){const n=e.each(t,s.ns.rdfs("seeAlso"),null,t.doc());n.length>0&&await e.fetcher.load(n)}(t.session.store,e).then(async()=>{(0,i.render)(await(0,a.ProfileView)(e,t),n);const r=Array.from(n.getElementsByClassName("QRCode"));if(r.length)for(const e of r){const t=e.getAttribute("data-value");if(!t)return;const n={type:"svg",color:{dark:e.getAttribute("highlightColor")||"#000000",light:e.getAttribute("backgroundColor")||"#ffffff"}};c.toString(t,n,function(t,n){t||(e.innerHTML=n,e.style.width="80%",e.style.height="80%",e.style.margin="10%")})}}),n}};t.default=l},4887(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.presentProfile=void 0,t.pronounsAsText=o;var r=n(500),i=n(9332),a=n(6077);function o(e){let t=i.store.anyJS(e,r.ns.solid("preferredSubjectPronoun"))||"";if(t){const n=i.store.anyJS(e,r.ns.solid("preferredObjectPronoun"));if(n){t+="/"+n;const a=i.store.anyJS(e,r.ns.solid("preferredRelativePronoun"));a&&(t+="/"+a)}t=" ("+t+") "}return t||""}function s(e,t){return e&&t?`${t}, ${e}`:e||t||null}function c(e,t){return e&&t?`${e} at ${t}`:t||e||null}function l(e,t){return e&&(0,a.validateHTMLColorHex)(e)?e:t}t.presentProfile=(e,t)=>{const n=r.utils.label(e),i=r.widgets.findImage(e),a=t.anyValue(e,r.ns.vcard("role")),u=t.anyValue(e,r.ns.vcard("organization-name")),p=t.any(e,r.ns.vcard("hasAddress")),d=null!=p?t.anyValue(p,r.ns.vcard("country-name")):null,f=null!=p?t.anyValue(p,r.ns.vcard("locality")):null,{backgroundColor:h,highlightColor:m}=function(e,t){const n=t.anyValue(e,r.ns.solid("profileBackgroundColor"),null,e.doc()),i=t.anyValue(e,r.ns.solid("profileHighlightColor"),null,e.doc());return{backgroundColor:l(n,""),highlightColor:l(i,"")}}(e,t),g=o(e);return{name:n,imageSrc:i,introduction:c(a,u),location:s(d,f),backgroundColor:h,pronouns:g,highlightColor:m}}},7824(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,s,c,l,u,p){const d=a+s,f=p||"this",h=(0,r.Namespace)(d+"#")(f);o(c,n,s,d),i.widgets.appendForm(l,e,{},t,h,u,(e,t)=>{e||i.widgets.errorMessageBlock(l,t)})},t.loadDocument=o;var r=n(8230),i=n(500);const a="https://solidos.github.io/profile-pane/src/ontology/";function o(e,t,n,i){const o=i||a+n,s=(0,r.sym)(o);e.holds(void 0,void 0,void 0,s)||(0,r.parse)(t,e,o,"text/turtle",()=>null)}},1363(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.yourContactInformationHeading=t.userNotLoggedInErrorMessage=t.socialAccountsHeadingText=t.sharedItemsHeadingText=t.scanQrToConnectText=t.resumeHeadingText=t.otherPreferencesHeadingText=t.logInToChatWithMeButtonText=t.logInAddMeToYourFriendsButtonText=t.loadingMessage=t.internalErrorMessage=t.friendsHeadingText=t.friendWasAddedSuccesMessage=t.friendExistsMessage=t.friendExistsAlreadyButtonText=t.contactHeadingText=t.communitiesHeadingText=t.chatWithMeButtonText=t.addMeToYourFriendsButtonText=void 0;t.scanQrToConnectText="Scan the QR code to connect with me",t.userNotLoggedInErrorMessage="Current user not found! Not logged in?",t.internalErrorMessage="An internal error occured!",t.friendWasAddedSuccesMessage="Friend was added!",t.friendExistsMessage="Friend already exists",t.loadingMessage="Loading...",t.addMeToYourFriendsButtonText="Add me to your friends",t.logInAddMeToYourFriendsButtonText="Login to add me to your friends",t.logInToChatWithMeButtonText="Login to chat with me",t.friendExistsAlreadyButtonText="Already part of friends",t.chatWithMeButtonText="Chat with me",t.yourContactInformationHeading="Contact Information",t.otherPreferencesHeadingText="Other Preferences",t.communitiesHeadingText="Communities You Participate In",t.resumeHeadingText="Resume",t.socialAccountsHeadingText="Social Accounts",t.sharedItemsHeadingText="Shared Items",t.friendsHeadingText="Friends",t.contactHeadingText="Contact"},2694(e,t,n){"use strict";var r=n(6925);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7583(e,t,n){const r=n(1333),i=n(157),a=n(7899),o=n(6756);function s(e,t,n,a,o){const s=[].slice.call(arguments,1),c=s.length,l="function"==typeof s[c-1];if(!l&&!r())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(n=t,t=a=void 0):2!==c||t.getContext||(a=n,n=t,t=void 0),new Promise(function(r,o){try{const o=i.create(n,a);r(e(o,t,a))}catch(e){o(e)}})}if(c<2)throw new Error("Too few arguments provided");2===c?(o=n,n=t,t=a=void 0):3===c&&(t.getContext&&void 0===o?(o=a,a=void 0):(o=a,a=n,n=t,t=void 0));try{const r=i.create(n,a);o(null,e(r,t,a))}catch(e){o(e)}}t.create=i.create,t.toCanvas=s.bind(null,a.render),t.toDataURL=s.bind(null,a.renderToDataURL),t.toString=s.bind(null,function(e,t,n){return o.render(e,n)})},1333(e){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},6421(e,t,n){const r=n(6886).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,n=r(e),i=145===n?26:2*Math.ceil((n-13)/(2*t-2)),a=[n-7];for(let e=1;e<t-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)0===e&&0===t||0===e&&t===i-1||e===i-1&&0===t||n.push([r[e],r[t]]);return n}},1433(e,t,n){const r=n(208),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function a(e){this.mode=r.ALPHANUMERIC,this.data=e}a.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=45*i.indexOf(this.data[t]);n+=i.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=a},9899(e){function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},8820(e){function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,n,r){const i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},5822(e,t,n){const r=n(208);function i(e){this.mode=r.BYTE,this.data="string"==typeof e?(new TextEncoder).encode(e):new Uint8Array(e)}i.getBitsLength=function(e){return 8*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},e.exports=i},7518(e,t,n){const r=n(9953),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],a=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case r.L:return i[4*(e-1)+0];case r.M:return i[4*(e-1)+1];case r.Q:return i[4*(e-1)+2];case r.H:return i[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return a[4*(e-1)+0];case r.M:return a[4*(e-1)+1];case r.Q:return a[4*(e-1)+2];case r.H:return a[4*(e-1)+3];default:return}}},9953(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return n}}},7756(e,t,n){const r=n(6886).getSymbolSize;t.getPositions=function(e){const t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},4565(e,t,n){const r=n(6886),i=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){const n=e.bit<<3|t;let a=n<<10;for(;r.getBCHDigit(a)-i>=0;)a^=1335<<r.getBCHDigit(a)-i;return 21522^(n<<10|a)}},2731(e,t){const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)n[t]=e,r[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)n[e]=n[e-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return r[e]},t.exp=function(e){return n[e]},t.mul=function(e,t){return 0===e||0===t?0:n[r[e]+r[t]]}},4861(e,t,n){const r=n(208),i=n(6886);function a(e){this.mode=r.KANJI,this.data=e}a.getBitsLength=function(e){return 13*e},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=i.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}},e.exports=a},1332(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n=3,r=3,i=40,a=10;function o(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let r=0,i=0,a=0,o=null,s=null;for(let c=0;c<t;c++){i=a=0,o=s=null;for(let l=0;l<t;l++){let t=e.get(c,l);t===o?i++:(i>=5&&(r+=n+(i-5)),o=t,i=1),t=e.get(l,c),t===s?a++:(a>=5&&(r+=n+(a-5)),s=t,a=1)}i>=5&&(r+=n+(i-5)),a>=5&&(r+=n+(a-5))}return r},t.getPenaltyN2=function(e){const t=e.size;let n=0;for(let r=0;r<t-1;r++)for(let i=0;i<t-1;i++){const t=e.get(r,i)+e.get(r,i+1)+e.get(r+1,i)+e.get(r+1,i+1);4!==t&&0!==t||n++}return n*r},t.getPenaltyN3=function(e){const t=e.size;let n=0,r=0,a=0;for(let i=0;i<t;i++){r=a=0;for(let o=0;o<t;o++)r=r<<1&2047|e.get(i,o),o>=10&&(1488===r||93===r)&&n++,a=a<<1&2047|e.get(o,i),o>=10&&(1488===a||93===a)&&n++}return n*i},t.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return Math.abs(Math.ceil(100*t/n/5)-10)*a},t.applyMask=function(e,t){const n=t.size;for(let r=0;r<n;r++)for(let i=0;i<n;i++)t.isReserved(i,r)||t.xor(i,r,o(e,i,r))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let i=0,a=1/0;for(let o=0;o<r;o++){n(o),t.applyMask(o,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(o,e),r<a&&(a=r,i=o)}return i}},208(e,t,n){const r=n(1878),i=n(7044);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!r.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return n}}},4357(e,t,n){const r=n(208);function i(e){this.mode=r.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);const i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*i+1))},e.exports=i},4713(e,t,n){const r=n(2731);t.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<t.length;a++)n[i+a]^=r.mul(e[i],t[a]);return n},t.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){const e=n[0];for(let i=0;i<t.length;i++)n[i]^=r.mul(t[i],e);let i=0;for(;i<n.length&&0===n[i];)i++;n=n.slice(i)}return n},t.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let i=0;i<e;i++)n=t.mul(n,new Uint8Array([1,r.exp(i)]));return n}},157(e,t,n){const r=n(6886),i=n(9953),a=n(9899),o=n(8820),s=n(6421),c=n(7756),l=n(1332),u=n(7518),p=n(4764),d=n(1427),f=n(4565),h=n(208),m=n(9801);function g(e,t,n){const r=e.size,i=f.getEncodedBits(t,n);let a,o;for(a=0;a<15;a++)o=1==(i>>a&1),a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function v(e,t,n){const i=new a;n.forEach(function(t){i.put(t.mode.bit,4),i.put(t.getLength(),h.getCharCountIndicator(t.mode,e)),t.write(i)});const o=8*(r.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,t));for(i.getLengthInBits()+4<=o&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const s=(o-i.getLengthInBits())/8;for(let e=0;e<s;e++)i.put(e%2?17:236,8);return function(e,t,n){const i=r.getSymbolTotalCodewords(t),a=u.getTotalCodewordsCount(t,n),o=i-a,s=u.getBlocksCount(t,n),c=i%s,l=s-c,d=Math.floor(i/s),f=Math.floor(o/s),h=f+1,m=d-f,g=new p(m);let v=0;const b=new Array(s),y=new Array(s);let w=0;const x=new Uint8Array(e.buffer);for(let e=0;e<s;e++){const t=e<l?f:h;b[e]=x.slice(v,v+t),y[e]=g.encode(b[e]),v+=t,w=Math.max(w,t)}const k=new Uint8Array(i);let _,E,C=0;for(_=0;_<w;_++)for(E=0;E<s;E++)_<b[E].length&&(k[C++]=b[E][_]);for(_=0;_<m;_++)for(E=0;E<s;E++)k[C++]=y[E][_];return k}(i,e,t)}function b(e,t,n,i){let a;if(Array.isArray(e))a=m.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let r=t;if(!r){const t=m.rawSplit(e);r=d.getBestVersionForData(t,n)}a=m.fromString(e,r||40)}}const u=d.getBestVersionForData(a,n);if(!u)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<u)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+u+".\n")}else t=u;const p=v(t,n,a),f=r.getSymbolSize(t),h=new o(f);return function(e,t){const n=e.size,r=c.getPositions(t);for(let t=0;t<r.length;t++){const i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===t||6===t)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}(h,t),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(h),function(e,t){const n=s.getPositions(t);for(let t=0;t<n.length;t++){const r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}(h,t),g(h,n,0),t>=7&&function(e,t){const n=e.size,r=d.getEncodedBits(t);let i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=1==(r>>t&1),e.set(i,a,o,!0),e.set(a,i,o,!0)}(h,t),function(e,t){const n=e.size;let r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=1==(t[o]>>>a&1)),e.set(i,s-n,r),a--,-1===a&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}(h,p),isNaN(i)&&(i=l.getBestMask(h,g.bind(null,h,n))),l.applyMask(i,h),g(h,n,i),{modules:h,version:t,errorCorrectionLevel:n,maskPattern:i,segments:a}}t.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let n,a,o=i.M;return void 0!==t&&(o=i.from(t.errorCorrectionLevel,i.M),n=d.from(t.version),a=l.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),b(e,n,o,a)}},4764(e,t,n){const r=n(4713);function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=r.mod(t,this.genPoly),i=this.degree-n.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(n,i),e}return n},e.exports=i},7044(e,t){const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";t.KANJI=new RegExp(r,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(i,"g"),t.NUMERIC=new RegExp(n,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const a=new RegExp("^"+r+"$"),o=new RegExp("^"+n+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return a.test(e)},t.testNumeric=function(e){return o.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},9801(e,t,n){const r=n(208),i=n(4357),a=n(1433),o=n(5822),s=n(4861),c=n(7044),l=n(6886),u=n(6320);function p(e){return unescape(encodeURIComponent(e)).length}function d(e,t,n){const r=[];let i;for(;null!==(i=e.exec(n));)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function f(e){const t=d(c.NUMERIC,r.NUMERIC,e),n=d(c.ALPHANUMERIC,r.ALPHANUMERIC,e);let i,a;l.isKanjiModeEnabled()?(i=d(c.BYTE,r.BYTE,e),a=d(c.KANJI,r.KANJI,e)):(i=d(c.BYTE_KANJI,r.BYTE,e),a=[]);return t.concat(n,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function h(e,t){switch(t){case r.NUMERIC:return i.getBitsLength(e);case r.ALPHANUMERIC:return a.getBitsLength(e);case r.KANJI:return s.getBitsLength(e);case r.BYTE:return o.getBitsLength(e)}}function m(e,t){let n;const c=r.getBestModeForData(e);if(n=r.from(t,c),n!==r.BYTE&&n.bit<c.bit)throw new Error('"'+e+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(c));switch(n!==r.KANJI||l.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new i(e);case r.ALPHANUMERIC:return new a(e);case r.KANJI:return new s(e);case r.BYTE:return new o(e)}}t.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e},[])},t.fromString=function(e,n){const i=function(e){const t=[];for(let n=0;n<e.length;n++){const i=e[n];switch(i.mode){case r.NUMERIC:t.push([i,{data:i.data,mode:r.ALPHANUMERIC,length:i.length},{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.ALPHANUMERIC:t.push([i,{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.KANJI:t.push([i,{data:i.data,mode:r.BYTE,length:p(i.data)}]);break;case r.BYTE:t.push([{data:i.data,mode:r.BYTE,length:p(i.data)}])}}return t}(f(e,l.isKanjiModeEnabled())),a=function(e,t){const n={},i={start:{}};let a=["start"];for(let o=0;o<e.length;o++){const s=e[o],c=[];for(let e=0;e<s.length;e++){const l=s[e],u=""+o+e;c.push(u),n[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){const o=a[e];n[o]&&n[o].node.mode===l.mode?(i[o][u]=h(n[o].lastCount+l.length,l.mode)-h(n[o].lastCount,l.mode),n[o].lastCount+=l.length):(n[o]&&(n[o].lastCount=l.length),i[o][u]=h(l.length,l.mode)+4+r.getCharCountIndicator(l.mode,t))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:n}}(i,n),o=u.find_path(a.map,"start","end"),s=[];for(let e=1;e<o.length-1;e++)s.push(a.table[o[e]].node);return t.fromArray(function(e){return e.reduce(function(e,t){const n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}(s))},t.rawSplit=function(e){return t.fromArray(f(e,l.isKanjiModeEnabled()))}},6886(e,t){let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return void 0!==n},t.toSJIS=function(e){return n(e)}},1878(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},1427(e,t,n){const r=n(6886),i=n(7518),a=n(9953),o=n(208),s=n(1878),c=r.getBCHDigit(7973);function l(e,t){return o.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){const r=l(e.mode,t);n+=r+e.getBitsLength()}),n}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!s.isValid(e))throw new Error("Invalid QR Code version");void 0===n&&(n=o.BYTE);const a=8*(r.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t));if(n===o.MIXED)return a;const c=a-l(n,e);switch(n){case o.NUMERIC:return Math.floor(c/10*3);case o.ALPHANUMERIC:return Math.floor(c/11*2);case o.KANJI:return Math.floor(c/13);case o.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){let r;const i=a.from(n,a.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(u(e,r)<=t.getCapacity(r,n,o.MIXED))return r}(e,i);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let i=1;i<=40;i++)if(n<=t.getCapacity(i,r,e))return i}(r.mode,r.getLength(),i)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-c>=0;)t^=7973<<r.getBCHDigit(t)-c;return e<<12|t}},7899(e,t,n){const r=n(2726);t.render=function(e,t,n){let i=n,a=t;void 0!==i||t&&t.getContext||(i=t,t=void 0),t||(a=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=r.getOptions(i);const o=r.getImageWidth(e.modules.size,i),s=a.getContext("2d"),c=s.createImageData(o,o);return r.qrToImageData(c.data,e,i),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(s,a,o),s.putImageData(c,0,0),a},t.renderToDataURL=function(e,n,r){let i=r;void 0!==i||n&&n.getContext||(i=n,n=void 0),i||(i={});const a=t.render(e,n,i),o=i.type||"image/png",s=i.rendererOpts||{};return a.toDataURL(o,s.quality)}},6756(e,t,n){const r=n(2726);function i(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function a(e,t,n){let r=e+t;return void 0!==n&&(r+=" "+n),r}t.render=function(e,t,n){const o=r.getOptions(t),s=e.modules.size,c=e.modules.data,l=s+2*o.margin,u=o.color.light.a?"<path "+i(o.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",p="<path "+i(o.color.dark,"stroke")+' d="'+function(e,t,n){let r="",i=0,o=!1,s=0;for(let c=0;c<e.length;c++){const l=Math.floor(c%t),u=Math.floor(c/t);l||o||(o=!0),e[c]?(s++,c>0&&l>0&&e[c-1]||(r+=o?a("M",l+n,.5+u+n):a("m",i,0),i=0,o=!1),l+1<t&&e[c+1]||(r+=a("h",s),s=0)):i++}return r}(c,s,o.margin)+'"/>',d='viewBox="0 0 '+l+" "+l+'"',f='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+d+' shape-rendering="crispEdges">'+u+p+"</svg>\n";return"function"==typeof n&&n(null,f),f}},2726(e,t){function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const i=n.modules.size,a=n.modules.data,o=t.getScale(i,r),s=Math.floor((i+2*r.margin)*o),c=r.margin*o,l=[r.color.light,r.color.dark];for(let t=0;t<s;t++)for(let n=0;n<s;n++){let u=4*(t*s+n),p=r.color.light;if(t>=c&&n>=c&&t<s-c&&n<s-c){p=l[a[Math.floor((t-c)/o)*i+Math.floor((n-c)/o)]?1:0]}e[u++]=p.r,e[u++]=p.g,e[u++]=p.b,e[u]=p.a}}},1059(e,t,n){"use strict";n.d(t,{A:()=>r});const r={Literal:1,Collection:3,Graph:4,NamedNode:5,BlankNode:6,Variable:7}},8230(e,t,n){"use strict";n.r(t),n.d(t,{BlankNode:()=>c,Collection:()=>h,ConnectedStore:()=>_n,DataFactory:()=>rn,Empty:()=>m,Fetcher:()=>Yt,Formula:()=>q,IndexedFormula:()=>X,Literal:()=>d,LiveStore:()=>En,N3Parser:()=>_e,NamedNode:()=>l.A,Namespace:()=>T,NextId:()=>kn,Node:()=>$,Query:()=>V,RDFParser:()=>It,RDFaProcessor:()=>Pt,SPARQLToQuery:()=>en,Serializer:()=>O,Statement:()=>w,Store:()=>X,UpdateManager:()=>tn,UpdatesSocket:()=>an,UpdatesVia:()=>on,Util:()=>F,Variable:()=>k,blankNode:()=>hn,defaultGraph:()=>mn,fetcher:()=>cn,fromNT:()=>wn,graph:()=>ln,isBlankNode:()=>u.jt,isCollection:()=>u.P3,isGraph:()=>u.RN,isLiteral:()=>u.c$,isNamedNode:()=>u.Y2,isPredicate:()=>u.YC,isQuad:()=>u.aF,isRDFObject:()=>u.GE,isRDFlibObject:()=>u.DJ,isRDFlibPredicate:()=>u.fY,isRDFlibSubject:()=>u.CZ,isStatement:()=>u.SH,isStore:()=>u.ok,isSubject:()=>u.hr,isTerm:()=>u.D0,isVariable:()=>u.DZ,jsonParser:()=>Xt,lit:()=>un,literal:()=>gn,log:()=>A.A,namedNode:()=>dn,parse:()=>Nt,quad:()=>vn,queryToSPARQL:()=>Zt,serialize:()=>j,sparqlUpdateParser:()=>Ft,st:()=>pn,sym:()=>dn,term:()=>xn,termValue:()=>jt.E,triple:()=>bn,uri:()=>x,variable:()=>fn});var r={};n.r(r),n.d(r,{inDefaultGraph:()=>kt,isBlankNode:()=>vt,isDefaultGraph:()=>xt,isLiteral:()=>bt,isNamedNode:()=>gt,isQuad:()=>wt,isVariable:()=>yt,prefix:()=>_t,prefixes:()=>Et});var i=n(4467),a=n(1059),o=n(8936),s=n(9403);class c extends o.A{static getId(e){if(e){if("string"!=typeof e)throw new Error("Bad id argument to new blank node: "+e);if(e.includes("#")){let t=e.split("#");return t[t.length-1]}return e}return"n"+c.nextId++}constructor(e){super(c.getId(e)),(0,i.A)(this,"termType",s.$Q),(0,i.A)(this,"classOrder",a.A.BlankNode),(0,i.A)(this,"isBlank",1),(0,i.A)(this,"isVar",1)}get id(){return this.value}set id(e){this.value=e}compareTerm(e){return this.classOrder<e.classOrder?-1:this.classOrder>e.classOrder?1:this.id<e.id?-1:this.id>e.id?1:0}copy(e){var t=new c;return e.copyTo(this,t),t}toCanonical(){return c.NTAnonymousNodePrefix+this.value}toString(){return c.NTAnonymousNodePrefix+this.id}}(0,i.A)(c,"nextId",0),(0,i.A)(c,"NTAnonymousNodePrefix","_:");var l=n(5108),u=n(2915);const p={boolean:new l.A("http://www.w3.org/2001/XMLSchema#boolean"),dateTime:new l.A("http://www.w3.org/2001/XMLSchema#dateTime"),decimal:new l.A("http://www.w3.org/2001/XMLSchema#decimal"),double:new l.A("http://www.w3.org/2001/XMLSchema#double"),integer:new l.A("http://www.w3.org/2001/XMLSchema#integer"),langString:new l.A("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),string:new l.A("http://www.w3.org/2001/XMLSchema#string")};class d extends o.A{constructor(e,t,n){super(e),(0,i.A)(this,"termType",s.QW),(0,i.A)(this,"classOrder",a.A.Literal),(0,i.A)(this,"datatype",p.string),(0,i.A)(this,"isVar",0),(0,i.A)(this,"language",""),t?(this.language=t,this.datatype=p.langString):this.datatype=n?l.A.fromValue(n):p.string}copy(){return new d(this.value,this.lang,this.datatype)}equals(e){return!!e&&(this.termType===e.termType&&this.value===e.value&&this.language===e.language&&(!this.datatype&&!e.datatype||this.datatype&&this.datatype.equals(e.datatype)))}get lang(){return this.language}set lang(e){this.language=e||""}toNT(){return d.toNT(this)}static toNT(e){if("number"==typeof e.value)return""+e.value;if("string"!=typeof e.value)throw new Error("Value of RDF literal is not string or number: "+e.value);var t=e.value;return t='"'+(t=(t=(t=(t=t.replace(/\\/g,"\\\\")).replace(/\"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r"))+'"',e.language?t+="@"+e.language:e.datatype.equals(p.string)||(t+="^^"+e.datatype.toCanonical()),t}toString(){return""+this.value}static fromBoolean(e){return new d(e?"1":"0",null,p.boolean)}static fromDate(e){if(!(e instanceof Date))throw new TypeError("Invalid argument to Literal.fromDate()");let t=function(e){return(""+(100+e)).slice(1,3)},n=e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"Z";return new d(n,null,p.dateTime)}static fromNumber(e){if("number"!=typeof e)throw new TypeError("Invalid argument to Literal.fromNumber()");let t;const n=e.toString();return t=n.indexOf("e")<0&&Math.abs(e)<=Number.MAX_SAFE_INTEGER?Number.isInteger(e)?p.integer:p.decimal:p.double,new d(n,null,t)}static fromValue(e){if((0,u.c$)(e))return e;switch(typeof e){case"object":if(e instanceof Date)return d.fromDate(e);case"boolean":return d.fromBoolean(e);case"number":return d.fromNumber(e);case"string":return new d(e)}throw new Error("Can't make literal from "+e+" of type "+typeof e)}}function f(e){return null==e||(0,u.D0)(e)?e:Array.isArray(e)?new h(e):d.fromValue(e)}class h extends o.A{constructor(e){super((c.nextId++).toString()),(0,i.A)(this,"termType",s.r0),(0,i.A)(this,"classOrder",a.A.Collection),(0,i.A)(this,"closed",!1),(0,i.A)(this,"compareTerm",c.prototype.compareTerm),(0,i.A)(this,"elements",[]),(0,i.A)(this,"isVar",0),e&&e.length>0&&e.forEach(e=>{this.elements.push(f(e))})}get id(){return this.value}set id(e){this.value=e}append(e){return this.elements.push(e)}close(){return this.closed=!0,this.closed}shift(){return this.elements.shift()}substitute(e){const t=this.elements.map(t=>t.substitute(e));return new h(t)}toNT(){return h.toNT(this)}static toNT(e){return c.NTAnonymousNodePrefix+e.id}toString(){return"("+this.elements.join(" ")+")"}unshift(e){return this.elements.unshift(e)}}(0,i.A)(h,"termType",s.r0);class m extends o.A{constructor(){super(""),(0,i.A)(this,"termType",s.S)}toString(){return"()"}}const g="chrome:theSession";new l.A(g);class v extends o.A{constructor(){super(""),(0,i.A)(this,"value",""),(0,i.A)(this,"termType",s.ic),(0,i.A)(this,"uri",g)}toCanonical(){return this.value}toString(){return"DefaultGraph"}}function b(e){return!!e&&e.termType===s.ic}const y=new v;class w{constructor(e,t,n,r){(0,i.A)(this,"subject",void 0),(0,i.A)(this,"predicate",void 0),(0,i.A)(this,"object",void 0),(0,i.A)(this,"graph",void 0),this.subject=o.A.fromValue(e),this.predicate=o.A.fromValue(t),this.object=o.A.fromValue(n),this.graph=null==r?y:o.A.fromValue(r)}get why(){return this.graph}set why(e){this.graph=e}equals(e){return e.subject.equals(this.subject)&&e.predicate.equals(this.predicate)&&e.object.equals(this.object)&&e.graph.equals(this.graph)}substitute(e){return new w(this.subject.substitute(e),this.predicate.substitute(e),this.object.substitute(e),b(this.graph)?this.graph:this.graph.substitute(e))}toCanonical(){let e=[this.subject.toCanonical(),this.predicate.toCanonical(),this.object.toCanonical()];return this.graph&&this.graph.termType!==s.ic&&e.push(this.graph.toCanonical()),e.join(" ")+" ."}toNT(){return[this.subject.toNT(),this.predicate.toNT(),this.object.toNT()].join(" ")+" ."}toNQ(){return[this.subject.toNT(),this.predicate.toNT(),this.object.toNT(),b(this.graph)?"":this.graph.toNT()].join(" ")+" ."}toString(){return this.toNT()}}var x=n(2727);class k extends o.A{constructor(e=""){super(e),(0,i.A)(this,"termType",s.P2),(0,i.A)(this,"base","varid:"),(0,i.A)(this,"classOrder",a.A.Variable),(0,i.A)(this,"isVar",1),(0,i.A)(this,"uri",void 0),this.base="varid:",this.uri=x.join(e,this.base)}equals(e){return!!e&&(this.termType===e.termType&&this.value===e.value)}hashString(){return this.toString()}substitute(e){var t;return null!=(t=e[this.toNT()])?t:this}toString(){return k.toString(this)}static toString(e){return e.uri.slice(0,e.base.length)===e.base?`?${e.uri.slice(e.base.length)}`:`?${e.uri}`}}let _=function(e){return e.collections="COLLECTIONS",e.defaultGraphType="DEFAULT_GRAPH_TYPE",e.equalsMethod="EQUALS_METHOD",e.id="ID",e.identity="IDENTITY",e.reversibleId="REVERSIBLE_ID",e.variableType="VARIABLE_TYPE",e}({});const E=new v,C={supports:{[_.collections]:!1,[_.defaultGraphType]:!1,[_.equalsMethod]:!0,[_.identity]:!1,[_.id]:!0,[_.reversibleId]:!1,[_.variableType]:!0},blankNode:e=>new c(e),defaultGraph:()=>E,equals(e,t){return e===t||!e||!t||((0,u.aF)(e)||(0,u.aF)(t)?!(!(0,u.aF)(e)||!(0,u.aF)(t))&&(this.equals(e.subject,t.subject)&&this.equals(e.predicate,t.predicate)&&this.equals(e.object,t.object)&&this.equals(e.graph,t.graph)):!(!(0,u.D0)(e)||!(0,u.D0)(t))&&this.id(e)===this.id(t))},id(e){if(!e)return"undefined";if((0,u.aF)(e))return this.quadToNQ(e);switch(e.termType){case s.ic:return"defaultGraph";case s.P2:return k.toString(e);default:const t=this.termToNQ(e);if(t)return t;throw new Error(`Can't id term with type '${e.termType}'`)}},isQuad:e=>e instanceof w,literal(e,t){if("string"!=typeof e&&!t)return d.fromValue(e);const n="string"==typeof e?e:""+e;return"string"==typeof t?-1===t.indexOf(":")?new d(n,t):new d(n,null,this.namedNode(t)):new d(n,null,t)},namedNode:e=>new l.A(e),quad:(e,t,n,r)=>new w(e,t,n,r||E),triple(e,t,n,r){return this.quad(e,t,n,r)},quadToNQ(e){return`${this.termToNQ(e.subject)} ${this.termToNQ(e.predicate)} ${this.termToNQ(e.object)} ${this.termToNQ(e.graph)} .`},termToNQ(e){switch(e.termType){case s.$Q:return"_:"+e.value;case s.ic:return"";case s.S:return"<http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>";case s.QW:return d.toNT(e);case s.bD:case s.Kk:return"<"+e.value+">";case s.r0:return"("+e.elements.map(e=>this.termToNQ(e)).join(" ")+")";default:throw new Error(`Can't serialize nonstandard term type (was '${e.termType}')`)}},toNQ(e){return this.isQuad(e)?this.quadToNQ(e):this.termToNQ(e)},variable:e=>new k(e)},S=C;var A=n(4940);function T(e,t){const n=t||{namedNode:e=>new l.A(e)};return function(t){return n.namedNode(e+(t||""))}}var P=n(5306),R=n(5386),I=n.n(R),F=n(4011);function N(e=S){return{boolean:e.namedNode("http://www.w3.org/2001/XMLSchema#boolean"),dateTime:e.namedNode("http://www.w3.org/2001/XMLSchema#dateTime"),decimal:e.namedNode("http://www.w3.org/2001/XMLSchema#decimal"),double:e.namedNode("http://www.w3.org/2001/XMLSchema#double"),integer:e.namedNode("http://www.w3.org/2001/XMLSchema#integer"),langString:e.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),string:e.namedNode("http://www.w3.org/2001/XMLSchema#string")}}N(S);function O(e){return new L(e)}class L{constructor(e){(0,i.A)(this,"_notQNameChars","\t\r\n !\"#$%&'()*,+/;<=>?@[\\]^`{|}~"),(0,i.A)(this,"_notNameChars",this._notQNameChars+":"),(0,i.A)(this,"validPrefix",new RegExp(/^[a-zA-Z][a-zA-Z0-9]*$/)),(0,i.A)(this,"forbidden1",new RegExp(/[\\"\b\f\r\v\t\n\u0080-\uffff]/gm)),(0,i.A)(this,"forbidden3",new RegExp(/[\\"\b\f\r\v\u0080-\uffff]/gm)),this.flags="",this.base=null,this.prefixes=[],this.namespaces=[];const t=Object.keys(I()());for(const e in t){const n=I()()[t[e]](""),r=t[e];this.prefixes[n]=r,this.namespaces[r]=n}this.suggestPrefix("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#"),this.suggestPrefix("xml","reserved:reservedForFutureUse"),this.namespacesUsed=[],this.keywords=["a"],this.prefixchars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",this.incoming=null,this.formulas=[],this.store=e,this.rdfFactory=e.rdfFactory||S,this.xsd=N(this.rdfFactory)}setBase(e){return this.base=e,this}setFlags(e){return this.flags=e||"",this}toStr(e){var t=e.toNT();return"Graph"===e.termType&&(this.formulas[t]=e),t}fromStr(e){if("{"===e[0]){var t=this.formulas[e];return t}return this.store.fromNT(e)}setNamespaces(e){for(var t in e)this.setPrefix(t,e[t]);return this}setPrefix(e,t){if("default"!==e.slice(0,7)&&"ns"!==e.slice(0,2)&&e&&t){for(let t in this.prefixes)this.prefixes[t]==e&&delete this.prefixes[t];this.prefixes[t]=e,this.namespaces[e]=t}}suggestPrefix(e,t){"default"!==e.slice(0,7)&&"ns"!==e.slice(0,2)&&e&&t&&(e in this.namespaces||t in this.prefixes||(this.prefixes[t]=e,this.namespaces[e]=t))}suggestNamespaces(e){for(var t in e)this.suggestPrefix(t,e[t]);return this}checkIntegrity(){var e,t;for(e in this.namespaces)if(this.prefixes[this.namespaces[e]]!==e)throw new Error("Serializer integity error 1: "+e+", "+this.namespaces[e]+", "+this.prefixes[this.namespaces[e]]+"!");for(t in this.prefixes)if(this.namespaces[this.prefixes[t]]!==t)throw new Error("Serializer integity error 2: "+t+", "+this.prefixs[t]+", "+this.namespaces[this.prefixes[t]]+"!")}makeUpPrefix(e){var t=e;var n=function(t){return!!this.validPrefix.test(t)&&("ns"!==t&&(!(t in this.namespaces)&&(this.prefixes[e]=t,this.namespaces[t]=e,t)))}.bind(this);"#/".indexOf(t[t.length-1])>=0&&(t=t.slice(0,-1));var r=t.lastIndexOf("/");r>=0&&(t=t.slice(r+1));for(var i=0;i<t.length&&this.prefixchars.indexOf(t[i])>=0;)i++;if((t=t.slice(0,i)).length<6&&n(t))return t;if(n(t.slice(0,3)))return t.slice(0,3);if(n(t.slice(0,2)))return t.slice(0,2);if(n(t.slice(0,4)))return t.slice(0,4);if(n(t.slice(0,1)))return t.slice(0,1);if(n(t.slice(0,5)))return t.slice(0,5);this.validPrefix.test(t)||(t="n");for(var a=0;;a++)if(n(t.slice(0,3)+a))return t.slice(0,3)+a}rootSubjects(e){for(var t={},n={},r={},i=0;i<e.length;i++){var a=e[i],o=function(e){t.hasOwnProperty(e)||(t[e]=[]),t[e].push(a.subject)};[a.subject,a.predicate,a.object].map(function(e){"BlankNode"===e.termType?r[e.toNT()]=!0:"Collection"===e.termType&&e.elements.forEach(function(e){o(e)})}),o(e[i].object);var s=n[this.toStr(a.subject)];s||(s=[]),s.push(a),n[this.toStr(a.subject)]=s}var c=[];for(var l in n)if(n.hasOwnProperty(l)){var u=this.fromStr(l);"BlankNode"===u.termType&&t[u]&&1===t[u].length||c.push(u)}this.incoming=t;for(var p={},d=0;d<c.length;d++)p[c[d].toNT()]=!0;return{roots:c,subjects:n,rootsHash:p,incoming:t}}toN3(e){return this.statementsToN3(e.statements)}isValidPNLocal(e){if(0===e.length)return!0;if("."===e[e.length-1])return!1;for(var t=0;t<e.length;t++){var n=e[t];if("."!==n&&this._notNameChars.indexOf(n)>=0)return!1}return!0}explicitURI(e){var t;return this.flags.indexOf("r")<0&&this.base?e=x.refTo(this.base,e):this.flags.indexOf("u")>=0?e=function(e){for(var t,n="",r=0;r<e.length;r++)n+=(t=e.charCodeAt(r))>65535?"\\U"+("00000000"+t.toString(16)).slice(-8):t>126?"\\u"+("0000"+t.toString(16)).slice(-4):e[r];return n}(e):(t=decodeURI(e),e=encodeURI(t)),"<"+e+">"}statementsToNTriples(e){var t=e.slice();t.sort();for(var n="",r="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i=this,a=this.store,o=this.rdfFactory,s=function(e){if("Collection"!==e.termType)return i.atomicTermToN3(e);for(var t=e.elements,c=a.sym(r+"nill"),l=t.length-1;l>=0;l--){var u=o.blankNode();n+=s(u)+" "+s(a.sym(r+"first"))+" "+s(t[l])+".\n",n+=s(u)+" "+s(a.sym(r+"rest"))+" "+s(c)+".\n",c=u}return i.atomicTermToN3(c)},c=0;c<t.length;c++){var l=t[c],u="";u+=s(l.subject)+" ",u+=s(l.predicate)+" ",u+=s(l.object)+" ",this.flags.indexOf("q")>=0&&(u+=s(l.why)+" "),n+=u+=".\n"}return n}statementsToN3(e){var t=this.store,n={"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":"aaa:00"};e.sort(function(e,r){return F.heavyCompareSPO(e,r,t,n)}),this.base&&!this.defaultNamespace&&(this.defaultNamespace=this.base+"#");var r={};this.flags.indexOf("s")<0&&(r["http://www.w3.org/2002/07/owl#sameAs"]="="),this.flags.indexOf("t")<0&&(r["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"]="a"),this.flags.indexOf("i")<0&&(r["http://www.w3.org/2000/10/swap/log#implies"]="=>");var i=function(e){for(var t="",n=0;n<e;n++)t+=" ";return t},a=function(e){for(var t="",n=0;n<e.length;n++){var r=e[n],i="string"==typeof r?r:a(r);if(0!==n){var o=t.slice(-1)||" ";","===i||";"===i||("."!==i||"0123456789.:".includes(o))&&(t+=" ")}t+=i}return t},o=function(e,t){var n="",r=1e5;void 0===t&&(t=-1);for(var s=0;s<e.length;s++){var c=e[s];if("string"!=typeof c){var l=o(c,t+1);if(l.length<10*(80-4*t)&&l.indexOf('"""')<0){var u=a(c);u.length<80-4*t&&(c=u,l="")}l&&(r=1e4),n+=l}if("string"==typeof c){if(1===c.length&&"\n"===n.slice(-1)&&",.;".indexOf(c)>=0){n=n.slice(0,-1),"."==c&&"0123456789.:".includes(n.charAt(n.length-1))&&(n+=" ",r+=1),n+=c+"\n",r+=1;continue}if(r<4*t+4||r+c.length+1<80&&";.".indexOf(n[n.length-2])<0)n=n.slice(0,-1)+" "+c+"\n",r+=c.length+1;else{let e=i(4*t)+c;n+=e+"\n",r=e.length,t<0&&(n+="\n",r=1e5)}}}return n};var s=function(e){for(var t=this.rootSubjects(e),n=t.roots,r=[],i=0;i<n.length;i++){var a=n[i];r.push(c(a,t))}return r}.bind(this);function c(e,t){return"BlankNode"!==e.termType||t.incoming[e]?[p(e,t)].concat([l(e,t)]).concat(["."]):u(e,t,!0).concat(["."])}var l=function(e,t){var n=[],i=null,a=t.subjects[this.toStr(e)]||[];if(void 0===a)throw new Error("Cant find statements for "+e);for(var o=[],s=0;s<a.length;s++){var c=a[s];c.predicate.uri===i?o.push(","):(i&&(n=n.concat([o]).concat([";"]),o=[]),n.push(r[c.predicate.uri]?r[c.predicate.uri]:p(c.predicate,t))),i=c.predicate.uri,o.push(u(c.object,t))}return n=n.concat([o])}.bind(this);var u=function(e,t,n){return"BlankNode"!==e.termType||!n&&void 0!==t.rootsHash[e.toNT()]?p(e,t):t.subjects[this.toStr(e)]?["[",l(e,t),"]"]:"[]"}.bind(this);L.prototype.termToN3=p;var p=function(e,t){var n,r;switch(e.termType){case"Graph":return(r=(r=["{"]).concat(s(e.statements))).concat(["}"]);case"Collection":for(r=["("],n=0;n<e.elements.length;n++)r.push([u(e.elements[n],t)]);return r.push(")"),r;default:return this.atomicTermToN3(e)}}.bind(this);var d=function(){var e="";for(var t in this.flags.indexOf("d")<0&&this.defaultNamespace&&(e+="@prefix : "+this.explicitURI(this.defaultNamespace)+".\n"),this.prefixes)this.prefixes.hasOwnProperty(t)&&this.namespacesUsed[t]&&(e+="@prefix "+this.prefixes[t]+": "+this.explicitURI(t)+".\n");return e+"\n"}.bind(this),f=s(e);return d()+o(f)}atomicTermToN3(e,t){switch(e.termType){case"BlankNode":case"Variable":return e.toNT();case"Literal":var n=e.value;if("string"!=typeof n)throw new TypeError("Value of RDF literal node must be a string");if(e.datatype&&this.flags.indexOf("x")<0)switch(e.datatype.uri){case"http://www.w3.org/2001/XMLSchema#integer":return n;case"http://www.w3.org/2001/XMLSchema#decimal":return n.indexOf(".")<0&&(n+=".0"),n;case"http://www.w3.org/2001/XMLSchema#double":{const e=n.toLowerCase().indexOf("e")>0;return n.indexOf(".")<0&&!e&&(n+=".0"),e||(n+="e0"),n}case"http://www.w3.org/2001/XMLSchema#boolean":return"1"===e.value?"true":"false"}var r=this.stringToN3(e.value,this.flags);return e.language?r+="@"+e.language:e.datatype.equals(this.xsd.string)||(r+="^^"+this.atomicTermToN3(e.datatype,t)),r;case"NamedNode":return this.symbolToN3(e);case"DefaultGraph":return"";default:throw new Error("Internal: atomicTermToN3 cannot handle "+e+" of termType: "+e.termType)}}stringToN3(e,t){t||(t="e");var n,r,i,a,o,s="";for(e.length>20&&'"'!==e.slice(-1)&&t.indexOf("n")<0&&(e.indexOf("\n")>0||e.indexOf('"')>0)?(a='"""',o=this.forbidden3):(a='"',o=this.forbidden1),n=0;n<e.length;){if(o.lastIndex=0,null==o.exec(e.slice(n)))break;r=n+o.lastIndex-1,s+=e.slice(n,r);var c=e[r];'"'===c&&'"""'===a&&'"""'!==e.slice(r,r+3)?s+=c:(i='\b\f\r\t\v\n\\"'.indexOf(c))>=0?s+="\\"+'bfrtvn\\"'[i]:t.indexOf("e")>=0?s+="\\u"+("000"+c.charCodeAt(0).toString(16).toLowerCase()).slice(-4):s+=c,n=r+1}return a+s+e.slice(n)+a}symbolToN3(e){var t=e.uri,n=t.indexOf("#");if(n<0&&this.flags.indexOf("/")<0&&(n=t.lastIndexOf("/")),n>=0&&this.flags.indexOf("p")<0&&(0===t.indexOf("http")||0===t.indexOf("ws")||0===t.indexOf("file"))){var r=t.slice(n+1),i=t.slice(0,n+1),a=t.indexOf("://")+4,o=this.base?this.base.slice(0,Math.max(this.base.lastIndexOf("/"),this.base.lastIndexOf("#"))+1):null,s=o&&i===o,c=this.flags.indexOf("o")>=0&&r.indexOf(".")>=0;if(!s&&!c&&i.length>a&&this.isValidPNLocal(r)){if(this.defaultNamespace&&this.defaultNamespace===i&&this.flags.indexOf("d")<0)return this.flags.indexOf("k")>=0&&this.keyords.indexOf(r)<0?r:":"+r;var l=this.prefixes[i];if(l||(l=this.makeUpPrefix(i)),l)return this.namespacesUsed[i]=!0,l+":"+r}}return this.explicitURI(t)}writeStore(e){var t=this.store,n=t.fetcher,r=n&&n.appNode,i=this.store.index[3];for(var a in i){var o=t.fromNT(a);r&&o.equals(r)||e("\n"+this.atomicTermToN3(o)+" "+this.atomicTermToN3(t.sym("http://www.w3.org/2000/10/swap/log#semantics"))+" { "+this.statementsToN3(t.statementsMatching(void 0,void 0,void 0,o))+" }.\n")}t.statementsMatching(void 0,t.sym("http://www.w3.org/2007/ont/link#requestedURI")).map(function(n){e("\n<"+n.object.value+"> log:metadata {\n");var r=t.statementsMatching(void 0,void 0,void 0,n.subject);e(this.statementsToN3(this.statementsToN3(r))),e("}.\n")});var s=[];r&&s.push(r);var c=[];s.map(function(e){c=c.concat(t.statementsMatching(void 0,void 0,void 0,e))}),e(this.statementsToN3(c))}statementsToXML(e){var t=[];t["http://www.w3.org/1999/02/22-rdf-syntax-ns#"]=!0;var n="http://www.w3.org/1999/02/22-rdf-syntax-ns#_",r=function(e){for(var t="",n=0;n<e;n++)t+=" ";return t},i=function(e){for(var t="",n=0;n<e.length;n++){var r=e[n];t+="string"==typeof r?r:i(r)}return t},a=function(e,t){var n,o="",s=1e5;t||(t=0);for(var c=0;c<e.length;c++){var l=e[c];if("string"!=typeof l){var u=a(l,t+1);u.length<10*(80-4*t)&&u.indexOf('"""')<0&&(n=i(l)).length<80-4*t&&(l=" "+n,u=""),u&&(s=1e4),o+=u}"string"==typeof l&&(s<4*t+4?(o=o.slice(0,-1)+" "+l+"\n",s+=l.length+1):(o+=(n=r(4*t)+l)+"\n",s=n.length))}return o};var o=function(e){this.suggestPrefix("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#");for(var t=this.rootSubjects(e),n=t.roots,r=[],i=0;i<n.length;i++){var a=n[i];r.push(l(a,t))}return r}.bind(this);function s(e){return void 0===e?"@@@undefined@@@@":e.replace(/[&<"]/g,function(e){switch(e[0]){case"&":return"&";case"<":return"<";case'"':return"""}})}var c=function(e){return s(this.base?F.uri.refTo(this.base,e.uri):e.uri)}.bind(this);var l=function(e,t){var r,i,a,o,f=[],h=t.subjects[this.toStr(e)];if(void 0===h)return p(e,t);h.sort(function(e,t){var r=e.predicate.uri,i=t.predicate.uri;if(r.substring(0,44)===n||i.substring(0,44)===n)return r.localeCompare(i);var a=r.substring(44),o=i.substring(44),s=parseInt(a,10),c=parseInt(o,10);return isNaN(s)||isNaN(c)||s!==a||c!==o?r.localeCompare(i):s-c});for(var m=0;m<h.length;m++)if("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"!==(a=h[m]).predicate.uri||r||"NamedNode"!==a.object.termType){if((o=a.predicate).uri.substr(0,44)===n){var g=o.uri.substr(44);g===parseInt(g,10).toString()&&(o=this.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#li"))}switch(i=d(o),a.object.termType){case"BlankNode":f=1===t.incoming[a.object].length?f.concat(["<"+i+' rdf:parseType="Resource">',l(a.object,t),"</"+i+">"]):f.concat(["<"+i+' rdf:nodeID="'+a.object.toNT().slice(2)+'"/>']);break;case"NamedNode":f=f.concat(["<"+i+' rdf:resource="'+c(a.object)+'"/>']);break;case"Literal":f=f.concat(["<"+i+(a.object.language?' xml:lang="'+a.object.language+'"':a.object.datatype.equals(this.xsd.string)?"":' rdf:datatype="'+s(a.object.datatype.uri)+'"')+">"+s(a.object.value)+"</"+i+">"]);break;case"Collection":f=f.concat(["<"+i+' rdf:parseType="Collection">',u(a.object,t),"</"+i+">"]);break;default:throw new Error("Can't serialize object of type "+a.object.termType+" into XML")}}else r=a.object;var v=r?d(r):"rdf:Description",b="";return"BlankNode"===e.termType?t.incoming[e]&&1===t.incoming[e].length||(b=' rdf:nodeID="'+e.toNT().slice(2)+'"'):b=' rdf:about="'+c(e)+'"',["<"+v+b+">"].concat([f]).concat(["</"+v+">"])}.bind(this);function u(e,t){for(var n=[],r=0;r<e.elements.length;r++)n.push(l(e.elements[r],t));return n}var p=function(e,t){var n=[],r=t.subjects[this.toStr(e)];if(!r)return n;r.sort();for(var i=0;i<r.length;i++){var a=r[i];switch(a.object.termType){case"BlankNode":n=t.rootsHash[a.object.toNT()]?n.concat(["<"+d(a.predicate)+' rdf:nodeID="'+a.object.toNT().slice(2)+'">',"</"+d(a.predicate)+">"]):n.concat(["<"+d(a.predicate)+' rdf:parseType="Resource">',p(a.object,t),"</"+d(a.predicate)+">"]);break;case"NamedNode":n=n.concat(["<"+d(a.predicate)+' rdf:resource="'+c(a.object)+'"/>']);break;case"Literal":n=n.concat(["<"+d(a.predicate)+(a.object.language?' xml:lang="'+a.object.language+'"':a.object.datatype.equals(this.xsd.string)?"":' rdf:datatype="'+s(a.object.datatype.value)+'"')+">"+s(a.object.value)+"</"+d(a.predicate)+">"]);break;case"Collection":n=n.concat(["<"+d(a.predicate)+' rdf:parseType="Collection">',u(a.object,t),"</"+d(a.predicate)+">"]);break;default:throw new Error("Can't serialize object of type "+a.object.termType+" into XML")}}return n}.bind(this);var d=function(e){var n=e.uri,r=n.indexOf("#");if(r<0&&this.flags.indexOf("/")<0&&(r=n.lastIndexOf("/")),r<0)throw new Error("Cannot make qname out of <"+n+">");for(var i=r+1;i<n.length;i++)if(this._notNameChars.indexOf(n[i])>=0)throw new Error('Invalid character "'+n[i]+'" cannot be in XML qname for URI: '+n);var a=n.slice(r+1),o=n.slice(0,r+1);if(this.defaultNamespace&&this.defaultNamespace===o&&this.flags.indexOf("d")<0)return a;var s=this.prefixes[o];return s||(s=this.makeUpPrefix(o)),t[o]=!0,s+":"+a}.bind(this),f=o(e),h="<rdf:RDF";for(var m in this.defaultNamespace&&(h+=' xmlns="'+s(this.defaultNamespace)+'"'),t)if(t.hasOwnProperty(m)){var g=this.base&&this.flags.includes("z")?F.uri.refTo(this.base,m):m;h+="\n xmlns:"+this.prefixes[m]+'="'+s(g)+'"'}return a([h+=">",f,"</rdf:RDF>"],-1)}statementsToJsonld(e){const t=this.statementsToN3(e),n=P.parse(t);return JSON.stringify(n,null,2)}}function j(e,t,n,r,i,a){n=n||e?.value;const o=a||{};r=r||s.sT;try{var c=O(t);o.flags&&c.setFlags(o.flags);var l=t.statementsMatching(void 0,void 0,void 0,e);switch("namespaces"in t&&c.suggestNamespaces(t.namespaces),o.namespaces&&c.setNamespaces(o.namespaces),c.setBase(n),r){case s.JG:return u(null,c.statementsToXML(l));case s.ny:case s.MG:return u(null,c.statementsToN3(l));case s.sT:case s.hu:return c.setFlags("si"+(o.flags?" "+o.flags:"")),u(null,c.statementsToN3(l));case s.bM:return c.setFlags("deinprstux"),u(null,c.statementsToNTriples(l));case s.i2:return c.setFlags("si dr"+(o.flags?" "+o.flags:"")),u(null,c.statementsToJsonld(l));case s._0:case s.BR:return c.setFlags("deinprstux q"),u(null,c.statementsToNTriples(l));default:throw new Error("Serialize: Content-type "+r+" not supported for data write.")}}catch(e){if(i)return i(e,void 0);throw e}function u(e,t){return i?void i(e,t):t}}const M=["blankNode","defaultGraph","literal","namedNode","quad","variable","supports"],D="http://www.w3.org/1999/02/22-rdf-syntax-ns#first",U="http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",B="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil";function z(e,t,n){const r=[];return n.reduce((t,n,i,a)=>{let o;return r.push(e.quad(t,e.namedNode(D),a[i])),i<a.length-1?(o=e.blankNode(),r.push(e.quad(t,e.namedNode(U),o))):r.push(e.quad(t,e.namedNode(U),e.namedNode(B))),o},t),r}function H(e,t,n=0){var r=e.length;for(n<0&&(n=r+n);n<r;n++)if(e[n]===t)return n;return-1}class q extends o.A{constructor(e=[],t=[],n=[],r=[],o={}){super(""),this.statements=e,this.constraints=t,this.initBindings=n,this.optional=r,(0,i.A)(this,"termType",s.bD),(0,i.A)(this,"classOrder",a.A.Graph),(0,i.A)(this,"fetcher",void 0),(0,i.A)(this,"isVar",0),(0,i.A)(this,"ns",T),(0,i.A)(this,"rdfFactory",void 0),this.rdfFactory=o&&o.rdfFactory||S;for(const e of M)this[e]=(...t)=>this.rdfFactory[e](...t)}add(e,t,n,r){return 1===arguments.length&&e.forEach(e=>this.add(e.subject,e.predicate,e.object,e.graph)),this.statements.push(this.rdfFactory.quad(e,t,n,r))}addStatement(e){return this.add(e)}bnode(e){return this.rdfFactory.blankNode(e)}addAll(e){e.forEach(e=>{this.add(e.subject,e.predicate,e.object,e.graph)})}any(e,t,n,r){const i=this.anyStatementMatching(e,t,n,r);return null==i?null:null==e?i.subject:null==t?i.predicate:null==n?i.object:null}anyValue(e,t,n,r){const i=this.any(e,t,n,r);return i?i.value:void 0}anyJS(e,t,n,r){const i=this.any(e,t,n,r);return i?o.A.toJS(i):void 0}anyStatementMatching(e,t,n,r){let i=this.statementsMatching(e,t,n,r,!0);if(i&&0!==i.length)return i[0]}id(e){return this.rdfFactory.id(e)}statementsMatching(e,t,n,r,i){const a=this.statements.filter(i=>(!e||e.equals(i.subject))&&(!t||t.equals(i.predicate))&&(!n||n.equals(i.object))&&(!r||r.equals(i.graph)));return i?0===a.length?[]:[a[0]]:a}bottomTypeURIs(e){let t,n,r,i,a,o,s,c;t=[];for(let l in e)if(e.hasOwnProperty(l)){for(c=e[l],s=this.each(void 0,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"),this.rdfFactory.namedNode(l)),n=!0,i=0,a=s.length;i<a;i++)if(r=s[i],o=r.uri,o in e){n=!1;break}n&&(t[l]=c)}return t}collection(){return new h}each(e,t,n,r){const i=[];let a=this.statementsMatching(e,t,n,r,!1);if(null==e)for(let e=0,t=a.length;e<t;e++)i.push(a[e].subject);else if(null==t)for(let e=0,t=a.length;e<t;e++)i.push(a[e].predicate);else if(null==n)for(let e=0,t=a.length;e<t;e++)i.push(a[e].object);else if(null==r)for(let e=0,t=a.length;e<t;e++)i.push(new l.A(a[e].graph.value));return i}equals(e){return!!e&&this.hashString()===e.hashString()}findMembersNT(e){let t,n,r,i,a,o,s,c,l,u,p,d,f,h;d={},d[e.toNT()]=!0,i={},o=this.transitiveClosure(d,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"),!0);for(let e in o)if(o.hasOwnProperty(e)){s=this.statementsMatching(void 0,this.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),this.fromNT(e));for(let e=0,t=s.length;e<t;e++)f=s[e],i[f.subject.toNT()]=f;c=this.each(void 0,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#domain"),this.fromNT(e));for(let e=0,n=c.length;e<n;e++)for(a=c[e],l=this.statementsMatching(void 0,a),r=0,t=l.length;r<t;r++)f=l[r],i[f.subject.toNT()]=f;u=this.each(void 0,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#range"),this.fromNT(e));for(let e=0,t=u.length;e<t;e++)for(a=u[e],p=this.statementsMatching(void 0,a),h=0,n=p.length;h<n;h++)f=p[h],i[f.object.toNT()]=f}return i}findMemberURIs(e){return this.NTtoURI(this.findMembersNT(e))}findSubClassesNT(e){let t={};return t[e.toNT()]=!0,this.transitiveClosure(t,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"),!0)}findSuperClassesNT(e){let t={};return t[e.toNT()]=!0,this.transitiveClosure(t,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"),!1)}findTypesNT(e){let t,n,r,i,a,o,s,c,l;r="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",l=[],i=this.statementsMatching(e,void 0,void 0);for(let e=0,t=i.length;e<t;e++)if(c=i[e],"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"===c.predicate.uri)l[c.object.toNT()]=c;else{a=this.each(c.predicate,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#domain"));for(let e=0,t=a.length;e<t;e++)n=a[e],l[n.toNT()]=c}o=this.statementsMatching(void 0,void 0,e);for(let e=0,n=o.length;e<n;e++){c=o[e],s=this.each(c.predicate,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#range"));for(let e=0,n=s.length;e<n;e++)t=s[e],l[t.toNT()]=c}return this.transitiveClosure(l,this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf"),!1)}findTypeURIs(e){return this.NTtoURI(this.findTypesNT(e))}connectedStatements(e,t,n){n=n||[];let r=[e],i={},a={},o=[],s=this,c=function(e){let c=function(e){"BlankNode"!==e.termType||i[e.value]||(i[e.value]=!0,r.push(e))},l=s.statementsMatching(null,null,e,t).concat(s.statementsMatching(e,null,null,t));l=l.filter(function(e){if(n[e.predicate.value])return!1;let t=e.toNT();return!a[t]&&(a[t]=!0,!0)}),l.forEach(function(e){c(e.subject),c(e.object)}),o=o.concat(l)};for(;r.length;)c(r.shift());return o}formula(e){return new q}fromNT(e){let t,n,r;switch(e[0]){case"<":return this.sym(e.slice(1,-1));case'"':if(r=void 0,t=void 0,n=e.lastIndexOf('"'),n<e.length-1)if("@"===e[n+1])r=e.slice(n+2);else{if("^^"!==e.slice(n+1,n+3))throw new Error("Can't convert string from NT: "+e);t=this.fromNT(e.slice(n+3))}return e=(e=(e=(e=e.slice(1,n)).replace(/\\"/g,'"')).replace(/\\n/g,"\n")).replace(/\\\\/g,"\\"),this.rdfFactory.literal(e,r||t);case"_":return this.rdfFactory.blankNode(e.slice(2));case"?":return new k(e.slice(1))}throw new Error("Can't convert from NT: "+e)}holds(e,t,n,r){let i;if(1===arguments.length){if(!e)return!0;if(e instanceof Array){for(i=0;i<e.length;i++)if(!this.holds(e[i]))return!1;return!0}if((0,u.SH)(e))return this.holds(e.subject,e.predicate,e.object,e.graph);if(e.statements)return this.holds(e.statements)}return null!=this.anyStatementMatching(e,t,n,r)}holdsStatement(e){return this.holds(e.subject,e.predicate,e.object,e.graph)}list(e,t){if(t.rdfFactory.supports.COLLECTIONS){const n=t.rdfFactory.collection();return e.forEach(function(e){n.append(e)}),n}{const n=t.rdfFactory.blankNode(),r=z(t.rdfFactory,n,e);return t.addAll(r),n}}NTtoURI(e){let t,n,r={};for(t in e)e.hasOwnProperty(t)&&(n=e[t],"<"===t[0]&&(r[t.slice(1,-1)]=n));return r}serialize(e,t,n,r){return j(n,this,e,t,void 0,r)}substitute(e){let t=this.statements.map(function(t){return t.substitute(e)});const n=new q;return n.addAll(t),n}sym(e,t){if(t)throw new Error("This feature (kb.sym with 2 args) is removed. Do not assume prefix mappings.");return this.rdfFactory.namedNode(e)}the(e,t,n,r){let i=this.any(e,t,n,r);return null==i&&A.A.error("No value found for the() {"+e+" "+t+" "+n+"}."),i}transitiveClosure(e,t,n){let r,i,a,o,s,c,l={};Object.assign(l,e);let u={};for(;;){if(c=function(){for(let e in l)if(l.hasOwnProperty(e))return e}(),null==c)return u;for(s=n?this.each(void 0,t,this.fromNT(c)):this.each(this.fromNT(c),t),i=0,a=s.length;i<a;i++)r=s[i],o=r.toNT(),o in u||o in l||(l[o]=l[c]);u[c]=l[c],delete l[c]}}topTypeURIs(e){let t,n,r,i,a,o,s,c;for(r in s=[],e)if(e.hasOwnProperty(r)){for(c=e[r],a=0,o=this.each(this.rdfFactory.namedNode(r),this.rdfFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#subClassOf")),t=0,i=o.length;t<i;t++)if(n=o[t],"http://www.w3.org/2000/01/rdf-schema#Resource"!==n.uri){a++;break}a||(s[r]=c)}return s["http://www.w3.org/2000/01/rdf-schema#Resource"]&&delete s["http://www.w3.org/2000/01/rdf-schema#Resource"],s["http://www.w3.org/2002/07/owl#Thing"]&&delete s["http://www.w3.org/2002/07/owl#Thing"],s}toString(){return"{"+this.statements.join("\n")+"}"}variable(e){return new k(e)}whether(e,t,n,r){return this.statementsMatching(e,t,n,r,!1).length}}o.A.fromValue=f;const $=o.A,W={xsd:T("http://www.w3.org/2001/XMLSchema#")};o.A.toJS=function(e){return(0,u.P3)(e)?e.elements.map(o.A.toJS):(0,u.c$)(e)?e.datatype.equals(W.xsd("boolean"))?"1"===e.value||"true"===e.value:e.datatype.equals(W.xsd("dateTime"))||e.datatype.equals(W.xsd("date"))?new Date(e.value):e.datatype.equals(W.xsd("integer"))||e.datatype.equals(W.xsd("float"))||e.datatype.equals(W.xsd("decimal"))?Number(e.value):e.value:e};class V{constructor(e,t){this.pat=new X,this.vars=[],this.name=e,this.id=t}}function G(e,t,n,r){function i(e){var t,n="";for(t in e)e.hasOwnProperty(t)&&(n+=" "+t+" -> "+e[t]);return n}function a(e){var t,n="Bindings: ",r=e.length;for(t=0;t<r;t++)n+=i(e[t][0])+";\n\t";return n}function o(e,t,n,r){var i;if(e.length!==t.length)return[];if(!e.length)return[[[],null]];var a=function(e,t,n,r){var i=n[e];if(void 0===i){if(e.isVar){var a=[];return a[e]=t,[[a,null]]}i=e}if(!i.complexType)return r.redirections[i]&&(i=r.redirections[i]),r.redirections[t]&&(t=r.redirections[t]),i.equals(t)||i.uri&&i.uri===g?[[[],null]]:[];if(e instanceof Array)return t instanceof Array?o(e,t,n):[];throw new Error("query.js: oops - code not written yet")}(e[0],t[0],n,r);if(0===a.length)return a;var s,c,l,u,p,d,f,h=[],m=a.length;for(s=0;s<m;s++){for(p in f=[],c=a[s][0])c.hasOwnProperty(p)&&(f[p]=c[p]);for(p in n)n.hasOwnProperty(p)&&(f[p]=n[p]);for(u=(i=o(e.slice(1),t.slice(1),f,r)).length,l=0;l<u;l++){for(p in d=i[l][0],c)c.hasOwnProperty(p)&&(d[p]=c[p]);h.push([d,null])}}return h}function s(e,t){var n=t[e];return void 0===n?e:n}function c(e,t){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return r}function l(e,t){return this.trunkBindings=t,this.originalCallback=e,this.branches=[],this}function u(e,t){return this.count=0,this.success=!1,this.done=!1,this.callback=e,this.onDone=t,this}l.prototype.checkAllDone=function(){var e;for(e=0;e<this.branches.length;e++)if(!this.branches[e].done)return;A.A.debug("OPTIONAL BIDNINGS ALL DONE:"),this.doCallBacks(this.branches.length-1,this.trunkBindings)},l.prototype.doCallBacks=function(e,t){var n;if(e<0)return this.originalCallback(t);for(n=0;n<this.branches[e].results.length;n++)this.doCallBacks(e-1,c(t,this.branches[e].results[n]))},u.prototype.reportMatch=function(e){this.callback(e),this.success=!0},u.prototype.reportDone=function(){this.done=!0,A.A.info("Mandatory query branch finished.***"),void 0!==this.onDone&&this.onDone()};var p=function(e){return this.count=0,this.done=!1,this.results=[],this.junction=e,e.branches.push(this),this};function d(e,t,n){var r,i,a,o;for(t.nvars=0,t.index=null,r=[t.subject,t.predicate,t.object,t.why],o=[e.subjectIndex,e.predicateIndex,e.objectIndex,e.whyIndex],a=0;a<4;a++){let c=r[a];if(c.uri&&c.uri===g);else if(c.isVar&&void 0===n[c])t.nvars++;else{if(c=s(r[a],n),e.redirections[e.id(c)]&&(c=e.redirections[e.id(c)]),!(i=o[a][e.id(c)]))return t.index=[],!1;(null===t.index||t.index.length>i.length)&&(t.index=i)}}return null===t.index&&(t.index=e.statements),!0}function f(e,t){return e.nvars!==t.nvars?e.nvars-t.nvars:e.index.length-t.index.length}p.prototype.reportMatch=function(e){this.results.push(e)},p.prototype.reportDone=function(){A.A.debug("Optional branch finished - results.length = "+this.results.length),0===this.results.length&&(this.results.push({}),A.A.debug("Optional branch FAILED - that's OK.")),this.done=!0,this.junction.checkAllDone()};var h=function(e,n,r,a,o,s,c){A.A.debug("Match begins, Branch count now: "+c.count+" for "+c.pattern_debug);var u,d,f=n.statements;if(0===f.length){if(A.A.debug("FOUND MATCH WITH BINDINGS:"+i(r)),0===n.optional.length)c.reportMatch(r);else{A.A.debug("OPTIONAL: "+n.optional);var m,g=new l(t,r),b=[];for(m=0;m<n.optional.length;m++)b[m]=new p(g),b[m].pattern_debug=n.optional[m];for(m=0;m<n.optional.length;m++)b[m].count=b[m].count+1,h(e,n.optional[m],r,"",o,t,b[m])}return c.count--,void A.A.debug("Match ends -- success , Branch count now: "+c.count+" for "+c.pattern_debug)}var y=f.length;if(o){0;var w=function(t,i){var l=t.uri.split("#")[0];o.nowOrWhenFetched(l,void 0,function(t,i,l){h(e,n,r,a,o,s,c)})};for(d=0;d<y;d++){if(u=f[d],void 0!==r[u.subject]&&r[u.subject].uri&&o&&"unrequested"===o.getState((0,x.docpart)(r[u.subject].uri)))return void w(r[u.subject]);if(void 0!==r[u.object]&&r[u.object].uri&&o&&"unrequested"===o.getState((0,x.docpart)(r[u.object].uri)))return void w(r[u.object])}}v(e,n,r,a,o,s,c)},m=function(e,t){var n,r,i=!0;for(n in e)e.hasOwnProperty(n)&&t[n]&&(r=t[n].test)&&!r(e[n])&&(i=!1);return i},v=function(e,t,n,r,s,c,l){var u,p,g,v,b,y,w,x=t.statements,k=x.length;for(u=0;u<k;u++)d(e,w=x[u],n);x.sort(f),w=x[0];var _,E=e.formula();E.optional=t.optional,E.constraints=t.constraints,E.statements=x.slice(1),A.A.debug(r+"match2 searching "+w.index.length+" for "+w+"; bindings so far="+i(n));var C,S,T=w.index.length,P=0;for(_=0;_<T;_++)for(S=w.index[_],C=o([w.subject,w.predicate,w.object,w.why],[S.subject,S.predicate,S.object,S.why],n,e),A.A.info(r+" From first: "+C.length+": "+a(C)),g=C.length,p=0;p<g;p++)if(b=[],y=C[p][0],m(y,t.constraints)){for(v in y)y.hasOwnProperty(v)&&(b[v]=y[v]);for(v in n)n.hasOwnProperty(v)&&(b[v]=n[v]);l.count++,P++,h(e,E,b,r+" ",s,c,l)}else A.A.debug("Branch count CS: "+l.count);l.count--,0===P&&A.A.debug("Match2 fails completely on "+w),A.A.debug("Match2 ends, Branch count: "+l.count+" for "+l.pattern_debug),0===l.count&&(A.A.debug("Branch finished."),l.reportDone())},b=this;A.A.debug("Query on "+this.statements.length);var y=new u(t,r);y.count++,e.sync?h(b,e.pat,e.pat.initBindings,"",n,t,y):setTimeout(function(){h(b,e.pat,e.pat.initBindings,"",n,t,y)},0)}const K="http://www.w3.org/2002/07/owl#";function J(e,t,n,r){var i=e.any(t,n,void 0);return!!i&&(e.equate(i,r),!0)}function Q(e,t,n,r){var i=e.any(void 0,n,r);return!!i&&(e.equate(i,t),!0)}function Y(e,t,n,r,i){e.typeCallback&&e.typeCallback(e,r,i);var a=e.classActions[e.id(r)],o=!1;if(a)for(var s=0;s<a.length;s++)o=o||a[s](e,t,n,r,i);return o}class X extends q{constructor(e,t={}){super(void 0,void 0,void 0,void 0,t),(0,i.A)(this,"updater",void 0),(0,i.A)(this,"namespaces",void 0),(0,i.A)(this,"classActions",void 0),(0,i.A)(this,"propertyActions",void 0),(0,i.A)(this,"redirections",void 0),(0,i.A)(this,"aliases",void 0),(0,i.A)(this,"HTTPRedirects",void 0),(0,i.A)(this,"subjectIndex",void 0),(0,i.A)(this,"predicateIndex",void 0),(0,i.A)(this,"objectIndex",void 0),(0,i.A)(this,"whyIndex",void 0),(0,i.A)(this,"index",void 0),(0,i.A)(this,"features",void 0),(0,i.A)(this,"_universalVariables",void 0),(0,i.A)(this,"_existentialVariables",void 0),(0,i.A)(this,"rdfArrayRemove",void 0),(0,i.A)(this,"dataCallbacks",[]),(0,i.A)(this,"dataRemovalCallbacks",[]),this.propertyActions={},this.classActions={},this.redirections=[],this.aliases=[],this.HTTPRedirects=[],this.subjectIndex=[],this.predicateIndex=[],this.objectIndex=[],this.whyIndex=[],this.index=[this.subjectIndex,this.predicateIndex,this.objectIndex,this.whyIndex],this.namespaces={},this.features=e||[],this.rdfArrayRemove=t.rdfArrayRemove||F.RDFArrayRemove,t.dataCallback&&(this.dataCallbacks=[t.dataCallback]),t.dataRemovalCallback&&(this.dataRemovalCallbacks=[t.dataRemovalCallback]),this.initPropertyActions(this.features)}static get defaultGraphURI(){return g}substitute(e){var t=this.statements.map(function(t){return t.substitute(e)}),n=new X;return n.add(t),n}addDataCallback(e){this.dataCallbacks.push(e)}addDataRemovalCallback(e){this.dataRemovalCallbacks.push(e)}applyPatch(e,t,n){var r,i=this,a=null;function o(o){if(e.delete){r=e.delete,a&&(r=r.substitute(a)),r=r.statements;var s=[],c=r.map(function(e){var n=i.statementsMatching(e.subject,e.predicate,e.object,t);return 0===n.length?(s.push(e),null):n[0]});if(s.length)return n("Could not find to delete: "+s.join("\n or "));c.map(function(e){i.remove(e)})}e.insert&&(r=e.insert,a&&(r=r.substitute(a)),(r=r.statements).map(function(e){e.graph=t,i.add(e.subject,e.predicate,e.object,e.graph)})),o()}if(e.where){var s=new V("patch");s.pat=e.where,s.pat.statements.map(function(e){e.graph=dn(t.value)}),s.sync=!0;var c=[];i.query(s,function(e){c.push(e)},i.fetcher,function(){return 0===c.length?n("No match found to be patched:"+e.where):c.length>1?n("Patch ambiguous. No patch done."):(a=c[0],void o(n))})}else o(n)}declareExistential(e){return this._existentialVariables||(this._existentialVariables=[]),this._existentialVariables.push(e),e}initPropertyActions(e){this.propertyActions[this.rdfFactory.id(this.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))]=[Y],H(e,"sameAs")>=0&&(this.propertyActions[this.rdfFactory.id(this.rdfFactory.namedNode(`${K}sameAs`))]=[function(e,t,n,r,i){return e.equate(t,r),!0}]),H(e,"InverseFunctionalProperty")>=0&&(this.classActions[this.rdfFactory.id(this.rdfFactory.namedNode(`${K}InverseFunctionalProperty`))]=[function(e,t,n,r,i){return e.newPropertyAction(t,Q)}]),H(e,"FunctionalProperty")>=0&&(this.classActions[this.rdfFactory.id(this.rdfFactory.namedNode(`${K}FunctionalProperty`))]=[function(e,t,n,r,i){return e.newPropertyAction(t,J)}])}addStatement(e){return this.add(e.subject,e.predicate,e.object,e.graph),this.statements.length}add(e,t,n,r){var i,a,o;if(1===arguments.length){if(e instanceof Array)for(i=0;i<e.length;i++)this.add(e[i]);else(0,u.aF)(e)?this.add(e.subject,e.predicate,e.object,e.graph):(0,u.ok)(e)&&this.add(e.statements);return this}r||(r=this.fetcher?this.fetcher.appNode:this.rdfFactory.defaultGraph()),"string"==typeof e&&(e=this.rdfFactory.namedNode(e)),t=$.fromValue(t);const s=$.fromValue(n);if(r=$.fromValue(r),!(0,u.CZ)(e))throw new Error("Subject is not a subject type");if(!(0,u.fY)(t))throw new Error(`Predicate ${t} is not a predicate type`);if(!(0,u.DJ)(s))throw new Error(`Object ${s} is not an object type`);if(!(0,u.RN)(r))throw new Error("Why is not a graph type");this.predicateCallback&&this.predicateCallback(this,t,r);var c=this.id(this.canon(t)),l=!1;if(a=this.propertyActions[c])for(i=0;i<a.length;i++)l=l||a[i](this,e,t,s,r);if(this.holds(e,t,s,r))return null;var p=[this.id(this.canon(e)),c,this.id(this.canon(s)),this.id(this.canon(r))];for(o=this.rdfFactory.quad(e,t,s,r),i=0;i<4;i++){var d=this.index[i],f=p[i];d[f]||(d[f]=[]),d[f].push(o)}this.statements.push(o);for(const e of this.dataCallbacks)e(o);return o}canon(e){if(!e)return e;const t=this.redirections[this.id(e)];if(t)return t;switch(e.termType){case s.$Q:return new c(e.value);case s.r0:return e;case s.ic:return new v;case s.S:case s.bD:return e;case s.QW:return new d(e.value,e.language,e.datatype);case s.Kk:return new l.A(e.value);case s.P2:return new k(e.value);default:throw new Error(`Term Type not recognized for canonization: ${e.termType}`)}}check(){this.checkStatementList(this.statements);for(var e=0;e<4;e++){var t=this.index[e];for(var n in t)t.hasOwnProperty(n)&&this.checkStatementList(t[n],e)}}checkStatementList(e,t){void 0===t&&(t=0);for(var n,r=" found in "+["subject","predicate","object","why"][t]+" index.",i=0;i<e.length;i++){for(var a=[(n=e[i]).subject,n.predicate,n.object,n.graph],o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].subject.equals(t.subject)&&e[n].predicate.equals(t.predicate)&&e[n].object.equals(t.object)&&e[n].why.equals(t.graph))return!0},s=0;s<4;s++){var c=this.canon(a[s]),l=this.id(c);this.index[s][l]&&o(this.index[s][l],n)}if(!o(this.statements,n))throw new Error("Statement list does not statement "+n+"@"+n.graph+r)}}close(){return this}compareTerms(e,t){return Object.prototype.hasOwnProperty.call(e,"compareTerm")?e.compareTerm(t):a.A[e.termType]<a.A[t.termType]?-1:a.A[e.termType]>a.A[t.termType]?1:e.value<t.value?-1:e.value>t.value?1:0}copyTo(e,t,n){n||(n=[]);var r=this.statementsMatching(e);-1!==H(n,"two-direction")&&r.concat(this.statementsMatching(void 0,void 0,e));for(var i=0;i<r.length;i++){var a=r[i];switch(a.object.termType){case"NamedNode":this.add(t,a.predicate,a.object);break;case"Literal":case"BlankNode":case"Collection":this.add(t,a.predicate,a.object.copy(this))}-1!==H(n,"delete")&&this.remove(a)}}equate(e,t){const n=this.canon(e),r=this.canon(t);var i=this.compareTerms(n,r);return!i||(i<0?this.replaceWith(r,n):this.replaceWith(n,r))}formula(e){return new X(e)}get length(){return this.statements.length}match(e,t,n,r){return this.statementsMatching($.fromValue(e),$.fromValue(t),$.fromValue(n),$.fromValue(r))}mentionsURI(e){var t="<"+e+">";return!!this.subjectIndex[t]||!!this.objectIndex[t]||!!this.predicateIndex[t]}newExistential(e){if(!e)return this.bnode();var t=this.sym(e);return this.declareExistential(t)}newPropertyAction(e,t){var n=this.id(e);this.propertyActions[n]||(this.propertyActions[n]=[]),this.propertyActions[n].push(t);for(var r=this.statementsMatching(void 0,e,void 0),i=!1,a=0;a<r.length;a++)i=i||t(this,r[a].subject,e,r[a].object);return i}newUniversal(e){var t=this.sym(e);return this._universalVariables||(this._universalVariables=[]),this._universalVariables.push(t),t}variable(e){return new k(e)}nextSymbol(e){for(var t=0;;t++){var n=e.value+"#n"+t;if(!this.mentionsURI(n))return this.sym(n)}}query(e,t,n,r){return G.call(this,e,t,n,r)}querySync(e){var t=[];var n=!1;if(e.sync=!0,G.call(this,e,function(e){t.push(e)},null,function(){n=!0}),!n)throw new Error("Sync query should have called done function");return t}remove(e){if(e instanceof Array){for(var t=0;t<e.length;t++)this.remove(e[t]);return this}if((0,u.ok)(e))return this.remove(e.statements);var n=this.statementsMatching(e.subject,e.predicate,e.object,e.graph);if(!n.length)throw new Error("Statement to be removed is not on store: "+e);return this.removeStatement(n[0]),this}removeDocument(e){this.removeMetadata(e);for(var t=this.statementsMatching(void 0,void 0,void 0,e).slice(),n=0;n<t.length;n++)this.removeStatement(t[n]);return this.removeMatches(e,null,null),this}removeMetadata(e){const t=this.sym("chrome://TheCurrentSession"),n="http://www.w3.org/2007/ont/link#",r=this.statementsMatching(void 0,this.sym(`${n}requestedURI`),this.rdfFactory.literal(e.value),t).map(e=>e.subject);for(var i=0;i<r.length;i++){const e=r[i];if(null!=e){let r;const i=this.any(e,this.sym(`${n}status`),null,t);if(null!=i){r=this.statementsMatching(i,this.sym(`${n}status`),null,t).slice();for(var a=0;a<r.length;a++)this.removeStatement(r[a])}const o=this.any(e,this.sym(`${n}response`),null,t);if(null!=o){r=this.statementsMatching(o,null,null,t).slice();for(a=0;a<r.length;a++)this.removeStatement(r[a])}r=this.statementsMatching(e,null,null,t).slice();for(a=0;a<r.length;a++)this.removeStatement(r[a])}}return this.removeMatches(this.sym(e.value),null,null,t),this}removeMany(e,t,n,r,i){for(var a=this.statementsMatching(e,t,n,r,!1),o=[],s=0;s<a.length;s++)o.push(a[s]);for(i&&(o=o.slice(0,i)),s=0;s<o.length;s++)this.remove(o[s])}removeMatches(e,t,n,r){return this.removeMany(e,t,n,r),this}removeStatement(e){for(var t=[e.subject,e.predicate,e.object,e.graph],n=0;n<4;n++){var r=this.canon(t[n]),i=this.id(r);this.index[n][i]&&this.rdfArrayRemove(this.index[n][i],e)}this.rdfArrayRemove(this.statements,e);for(const t of this.dataRemovalCallbacks)t(e);return this}removeStatements(e){for(var t=0;t<e.length;t++)this.remove(e[t]);return this}replaceWith(e,t){for(var n=this.id(e),r=this.id(t),i=function(e){var t=e[n];if(t){var i=e[r];e[r]=i?t.concat(i):t,delete e[n]}},a=0;a<4;a++)i(this.index[a]);if(this.redirections[n]=t,e.value){if(this.aliases[r]||(this.aliases[r]=[]),this.aliases[r].push(e),this.aliases[n])for(a=0;a<this.aliases[n].length;a++)this.redirections[this.id(this.aliases[n][a])]=t,this.aliases[r].push(this.aliases[n][a]);this.add(t,this.sym("http://www.w3.org/2007/ont/link#uri"),e),this.fetcher&&this.fetcher.nowKnownAs(e,t)}return i(this.classActions),i(this.propertyActions),!0}allAliases(e){var t=this.aliases[this.id(this.canon(e))]||[];return t.push(this.canon(e)),t}sameThings(e,t){if(e.equals(t))return!0;var n=this.canon(e);if(!n)return!1;var r=this.canon(t);return!!r&&n.value===r.value}setPrefixForURI(e,t){if(("tab"!==e||!this.namespaces.tab)&&"ns"!==e.slice(0,2)&&"default"!==e.slice(0,7)){for(let e in this.namespaces)this.namespaces[e]==t&&delete this.namespaces[e];this.namespaces[e]=t}}statementsMatching(e,t,n,r,i){var a,o,s=[e,t,n,r],c=[],l=[],u=[],p=[];for(a=0;a<4;a++)c[a]=this.canon($.fromValue(s[a])),c[a]?(p.push(a),l[a]=this.id(c[a])):u.push(a);if(0===p.length)return this.statements;if(1===p.length)return a=p[0],(o=this.index[a][l[a]])&&i&&o.length>1&&(o=o.slice(0,1)),o=o||[];var d,f,h=1e10;for(f=0;f<p.length;f++){if(a=p[f],!(o=this.index[a][l[a]]))return[];o.length<h&&(h=o.length,d=f)}for(var m=p[d],g=this.index[m][l[m]],v=p.slice(0,d).concat(p.slice(d+1)),b=[],y=["subject","predicate","object","why"],w=0;w<g.length;w++){var x=g[w];for(f=0;f<v.length;f++)if(a=v[f],!this.canon(x[y[a]]).equals(c[a])){x=null;break}if(null!=x&&(b.push(x),i))break}return b}uris(e){var t=this.canon(e),n=this.aliases[this.id(t)];if(!t.value)return[];var r=[t.value];if(n)for(var i=0;i<n.length;i++)r.push(n[i].uri);return r}serialize(e,t,n,r){return j(n,this,e,t,void 0,r={...r||{},namespaces:r?.namespaces?{...this.namespaces,...r.namespaces}:{...this.namespaces}})}}(0,i.A)(X,"handleRDFType",void 0),X.handleRDFType=Y;const Z=T("http://www.w3.org/1999/02/22-rdf-syntax-ns#");function ee(e,t){function n(r,i,a){const o=e.statementsMatching(r,Z("rest"),null,t);if(1!==o.length)throw new Error(`Bad list structure: no rest at ${r}`);const s=e.statementsMatching(r,Z("first"),null,t);if(1!==s.length)throw new Error(`Bad list structure: rest but ${s.length} firsts at ${r}`);const c=[s[0].object].concat(i),l=a.concat(o).concat(s),u=e.statementsMatching(null,Z("rest"),r,t);if(0===u.length){const n=new h(c);return e.remove(l),void function(e,t,n,r){for(const i of e.statementsMatching(n,null,null,r)){const n=new w(t,i.predicate,i.object,r);e.remove(i),e.add(n)}for(const i of e.statementsMatching(null,n,null,r))e.remove(i),e.add(new w(i.subject,t,i.object,r));for(const i of e.statementsMatching(null,null,n,r))e.remove(i),e.add(new w(i.subject,i.predicate,t,r))}(e,n,r,t)}if(1!==u.length)throw new Error(`Bad list structure: ${u.length} pres at ${r}`);const p=u[0].subject;if("BlankNode"!==p.termType)throw new Error(`Bad list element node ${p} type: ${p.termType} `);n(p,c,l)}!function(e,t){const n=Z("nil");for(const r of e.statementsMatching(n,null,null,t)){e.remove(r);const n=new h;e.add(new w(n,r.predicate,r.object,t))}for(const r of e.statementsMatching(null,null,n,t))if(!r.predicate.sameTerm(Z("rest"))){e.remove(r);const n=new h;e.add(new w(r.subject,r.predicate,n,t))}}(e,t);e.statementsMatching(null,Z("rest"),Z("nil"),t).forEach(e=>{if("BlankNode"!==e.subject.termType)throw new Error(`Bad list element node ${e.subject} type: ${e.subject.termType} `);n(e.subject,[],[])})}var te=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t},ne="http://www.w3.org/2000/10/swap/log#",re=function(e){return e},ie=function(e){return e},ae=function(e){if(e.length>0)throw"missing.js: oops nnonempty dict not imp";return[]},oe=function(e){return e.length},se=function(e,t,n){if(void 0===e.slice)throw"@@ mising.js: No .slice function for "+e+" of type "+typeof e;return void 0===n||null==n?e.slice(t):e.slice(t,n)},ce=Error("dummy error stop iteration"),le=function(e){return this.last=0,this.li=e,this.next=function(){if(this.last==this.li.length)throw ce;return this.li[this.last++]},this},ue=function(e,t){return e.indexOf(t)},pe=function(e,t){if(!e){if(t)throw"python Assertion failed: "+t;throw"(python) Assertion failed."}};String.prototype.encode=function(e){if("utf-8"!=e)throw"UTF8_converter: can only do utf-8";return te(this)},String.prototype.decode=function(e){if("utf-8"!=e)throw"UTF8_converter: can only do utf-8";return this};var de=function(e,t){return x.join(t,e)},fe="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil",he="http://www.w3.org/2002/07/owl#sameAs";var me="\t\r\n !\"#$%&'()*.,+/;<=>?@[\\]^`{|}~",ge=me+":",ve=new RegExp("^([-+]?[0-9]+)(\\.[0-9]+)?([eE][-+]?[0-9]+)?","g"),be=new RegExp("^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9](T[0-9][0-9]:[0-9][0-9](:[0-9][0-9](\\.[0-9]*)?)?)?Z?"),ye=new RegExp("[\\s#]"),we=new RegExp('[\\\\\\r\\n\\"]',"g"),xe=new RegExp("^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*","g");function ke(e,t){var n=e.charAt(t+1);return""===n||ye.test(n)}const _e=function(e,t,n,r,i,a,o,s){return new Ee(e,t,n,r,i,a,o,s)};class Ee{constructor(e,t,n,r,i,a,o,s){void 0===t&&(t=null),void 0===n&&(n=""),void 0===r&&(r=null),void 0===i&&(i=""),void 0===a&&(a=null),void 0===o&&(o=""),void 0===s&&(s=null),this._bindings=new ae([]),this._flags=o,""!=n&&(pe(n.indexOf(":")>=0,"Document URI not absolute: "+n),this._bindings[""]=n+"#"),this._store=e,i&&e.setGenPrefix(i),this._thisDoc=n,this.source=e.sym(n),this.lines=0,this.statementCount=0,this.hasNil=!1,this.startOfLine=0,this.previousLine=0,this._genPrefix=i,this.keywords=new ie(["a","this","bind","has","is","of","true","false"]),this.keywordsSet=0,this._anonymousNodes=new ae([]),this._variables=new ae([]),this._parentVariables=new ae([]),this._reason=s,this._reason2=null,this._baseURI=r||(n||null),pe(!this._baseURI||this._baseURI.indexOf(":")>=0),this._genPrefix||(this._thisDoc?this._genPrefix=this._thisDoc+"#_g":this._genPrefix=RDFSink_uniqueURI()),null==t?this._thisDoc?this._formula=e.formula(n+"#_formula"):this._formula=e.formula():this._formula=t,this._context=this._formula,this._parentContext=null}here(e){return this._genPrefix+"_L"+this.lines+"C"+(e-this.startOfLine+1)}formula(){return this._formula}loadStream(e){return this.loadBuf(e.read())}loadBuf(e){return this.startDoc(),this.feed(e),this.endDoc()}feed(e){for(var t=e.decode("utf-8"),n=0;n>=0;){var r=this.skipSpace(t,n);if(r<0)return;if((n=this.directiveOrStatement(t,r))<0)throw Se(this._thisDoc,this.lines,t,r,"expected directive or statement")}}directiveOrStatement(e,t){var n,r=this.skipSpace(e,t);return r<0?r:(n=this.directive(e,r))>=0||(n=this.statement(e,r))>=0?this.checkDot(e,n):n}tok(e,t,n){if("@"==t.slice(n,n+1))n=n+1;else if(H(this.keywords,e)<0)return-1;var r=n+oe(e);return t.slice(n,r)==e&&me.indexOf(t.charAt(r))>=0?r:-1}directive(e,t){if((a=this.skipSpace(e,t))<0)return a;var n=new ie([]);if((a=this.tok("bind",e,t))>0)throw Se(this._thisDoc,this.lines,e,t,"keyword bind is obsolete: use @prefix");if((a=this.tok("keywords",e,t))>0){if((t=this.commaSeparatedList(e,a,n,!1))<0)throw Se(this._thisDoc,this.lines,e,t,"'@keywords' needs comma separated list of words");return this.setKeywords(se(n,null,null)),t}if((a=this.tok("forAll",e,t))>0){if((t=this.commaSeparatedList(e,a,n,!0))<0)throw Se(this._thisDoc,this.lines,e,t,"Bad variable list after @forAll");var r=new le(n);try{for(;;){var i=r.next();(H(this._variables,i)<0||H(this._parentVariables,i)>=0)&&(this._variables[i]=this._context.newUniversal(i))}}catch(e){if(e!=ce)throw e}return t}if((a=this.tok("forSome",e,t))>0){if((t=this.commaSeparatedList(e,a,n,this.uri_ref2))<0)throw Se(this._thisDoc,this.lines,e,t,"Bad variable list after @forSome");r=new le(n);try{for(;;){i=r.next();this._context.declareExistential(i)}}catch(e){if(e!=ce)throw e}return t}if((a=this.tok("prefix",e,t))>=0){var a,o=new ie([]);if((t=this.qname(e,a,o))<0)throw Se(this._thisDoc,this.lines,e,a,"expected qname after @prefix");if((a=this.uri_ref2(e,t,o))<0)throw Se(this._thisDoc,this.lines,e,t,"expected <uriref> after @prefix _qname_");var s=o[1].uri;if(this._baseURI)s=de(this._baseURI,s);else pe(s.indexOf(":")>=0,"With no base URI, cannot handle relative URI for NS");return pe(s.indexOf(":")>=0),this._bindings[o[0][0]]=s,this.bind(o[0][0],function(e){return encodeURI(e)}(s)),a}if((a=this.tok("base",e,t))>=0){o=new ie([]);if((t=this.uri_ref2(e,a,o))<0)throw Se(this._thisDoc,this.lines,e,a,"expected <uri> after @base ");s=o[0].uri;if(!this._baseURI)throw Se(this._thisDoc,this.lines,e,a,"With no previous base URI, cannot use relative URI in @base <"+s+">");s=de(this._baseURI,s);return pe(s.indexOf(":")>=0),this._baseURI=s,t}return-1}bind(e,t){""==e||this._store.setPrefixForURI(e,t)}setKeywords(e){null==e?this.keywordsSet=0:(this.keywords=e,this.keywordsSet=1)}startDoc(){}endDoc(){return this.hasNil&&this._store.rdfFactory.supports.COLLECTIONS&&ee(this._store,this.source),this._formula}makeStatement(e){e[0].add(e[2],e[1],e[3],this.source),(e[2].uri&&e[2].uri===fe||e[3].uri&&e[3].uri===fe)&&(this.hasNil=!0),this.statementCount+=1}statement(e,t){var n=new ie([]);if((t=this.object(e,t,n))<0)return t;var r=this.property_list(e,t,n[0]);if(r<0)throw Se(this._thisDoc,this.lines,e,t,"expected propertylist");return r}subject(e,t,n){return this.item(e,t,n)}verb(e,t,n){if((i=this.skipSpace(e,t))<0)return i;var r=new ie([]);if((i=this.tok("has",e,t))>=0){if((t=this.prop(e,i,r))<0)throw Se(this._thisDoc,this.lines,e,i,"expected property after 'has'");return n.push(new re(["->",r[0]])),t}if((i=this.tok("is",e,t))>=0){if((t=this.prop(e,i,r))<0)throw Se(this._thisDoc,this.lines,e,i,"expected <property> after 'is'");if((i=this.skipSpace(e,t))<0)throw Se(this._thisDoc,this.lines,e,t,"End of file found, expected property after 'is'");var i;t=i;if((i=this.tok("of",e,t))<0)throw Se(this._thisDoc,this.lines,e,t,"expected 'of' after 'is' <prop>");return n.push(new re(["<-",r[0]])),i}if((i=this.tok("a",e,t))>=0)return n.push(new re(["->",this._store.sym("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")])),i;if("<="==e.slice(t,t+2))return n.push(new re(["<-",this._store.sym(ne+"implies")])),t+2;if("="==e.slice(t,t+1))return">"==e.slice(t+1,t+2)?(n.push(new re(["->",this._store.sym(ne+"implies")])),t+2):(n.push(new re(["->",this._store.sym(he)])),t+1);if(":="==e.slice(t,t+2))return n.push(new re(["->",ne+"becomes"])),t+2;if((i=this.prop(e,t,r))>=0)return n.push(new re(["->",r[0]])),i;if(">-"==e.slice(t,t+2)||"<-"==e.slice(t,t+2))throw Se(this._thisDoc,this.lines,e,i,">- ... -> syntax is obsolete.");return-1}prop(e,t,n){return this.item(e,t,n)}item(e,t,n){return this.path(e,t,n)}blankNode(e){return this._context.bnode(e,this._reason2)}path(e,t,n){if((i=this.nodeOrLiteral(e,t,n))<0)return i;for(;"!^.".indexOf(e.slice(i,i+1))>=0;){var r=e.slice(i,i+1);if("."==r&&ke(e,i))break;var i,a=n.pop(),o=this.blankNode(this.here(i));if((i=this.node(e,i+1,n))<0)throw Se(this._thisDoc,this.lines,e,i,"EOF found in middle of path syntax");var s=n.pop();"^"==r?this.makeStatement(new re([this._context,s,o,a])):this.makeStatement(new re([this._context,s,a,o])),n.push(o)}return i}anonymousNode(e){if(t=this._anonymousNodes[e])return t;var t=this._store.bnode(e);return this._anonymousNodes[e]=t,t}node(e,t,n,r){void 0===r&&(r=null);var i=r;if((u=this.skipSpace(e,t))<0)return u;t=u;var a=e.slice(t,t+1);if("["==a){var o=this.here(t);if((u=this.skipSpace(e,t+1))<0)throw Se(this._thisDoc,this.lines,e,t,"EOF after '['");if("="==e.slice(u,u+1)){var t=u+1,s=new ie([]);if(!((u=this.objectList(e,t,s))>=0))throw Se(this._thisDoc,this.lines,e,t,"objectList expected after [= ");i=s[0];if(oe(s)>1){var c=new le(s);try{for(;;){var l=c.next();this.makeStatement(new re([this._context,this._store.sym(he),i,l]))}}catch(e){if(e!=ce)throw e}}if((u=this.skipSpace(e,u))<0)throw Se(this._thisDoc,this.lines,e,t,"EOF when objectList expected after [ = ");if(";"==e.slice(u,u+1))var u=u+1}if(null==i)i=this.blankNode(o);if((t=this.property_list(e,u,i))<0)throw Se(this._thisDoc,this.lines,e,u,"property_list expected");if((u=this.skipSpace(e,t))<0)throw Se(this._thisDoc,this.lines,e,t,"EOF when ']' expected after [ <propertyList>");if("."==e.slice(u,u+1))return n.push(i),u;if("]"!=e.slice(u,u+1))throw Se(this._thisDoc,this.lines,e,u,"']' expected");return n.push(i),u+1}if("{"==a){if("$"==e.slice(t+1,t+2)){for(var u=(t+=1)+1,p=new ie([]),d=!0;;){if((t=this.skipSpace(e,u))<0)throw Se(this._thisDoc,this.lines,e,t,"needed '$}', found end.");if("$}"==e.slice(t,t+2)){var u=t+2;break}if(d)d=!1;else{if(","!=e.slice(t,t+1))throw Se(this._thisDoc,this.lines,e,t,"expected: ','");t+=1}var f=new ie([]);if((u=this.item(e,t,f))<0)throw Se(this._thisDoc,this.lines,e,t,"expected item in set or '$}'");p.push(f[0])}return n.push(this._store.newSet(p,this._context)),u}var u=t+1,h=this._parentContext;this._parentContext=this._context;var m=this._anonymousNodes,g=this._parentVariables;this._parentVariables=this._variables,this._anonymousNodes=new ae([]),this._variables=this._variables.slice();var v=this._reason2;if(this._reason2=null,null==i)i=this._store.formula();for(this._context=i;;){if((t=this.skipSpace(e,u))<0)throw Se(this._thisDoc,this.lines,e,t,"needed '}', found end.");if("}"==e.slice(t,t+1)){var u=t+1;break}if((u=this.directiveOrStatement(e,t))<0)throw Se(this._thisDoc,this.lines,e,t,"expected statement or '}'")}return this._anonymousNodes=m,this._variables=this._parentVariables,this._parentVariables=g,this._context=this._parentContext,this._reason2=v,this._parentContext=h,n.push(i.close()),u}if("("==a){var b=this._store.list;if("$"==e.slice(t+1,t+2)){b=this._store.newSet;t+=1}for(u=t+1,p=new ie([]);;){if((t=this.skipSpace(e,u))<0)throw Se(this._thisDoc,this.lines,e,t,"needed ')', found end.");if(")"==e.slice(t,t+1)){u=t+1;break}f=new ie([]);if((u=this.item(e,t,f))<0)throw Se(this._thisDoc,this.lines,e,t,"expected item in list or ')'");p.push(f[0])}return n.push(b(p,this._context)),u}if((u=this.tok("this",e,t))>=0)throw Se(this._thisDoc,this.lines,e,t,"Keyword 'this' was ancient N3. Now use @forSome and @forAll keywords.");if((u=this.tok("true",e,t))>=0)return n.push(!0),u;if((u=this.tok("false",e,t))>=0)return n.push(!1),u;if(null==i&&(u=this.uri_ref2(e,t,n))>=0)return u;return-1}property_list(e,t,n){for(;;){if((u=this.skipSpace(e,t))<0)throw Se(this._thisDoc,this.lines,e,t,"EOF found when expected verb in property list");if(":-"!=e.slice(u,u+2)){t=u;var r=new ie([]);if((u=this.verb(e,t,r))<=0)return t;var i=new ie([]);if((t=this.objectList(e,u,i))<0)throw Se(this._thisDoc,this.lines,e,u,"objectList expected");var a=new le(i);try{for(;;){var o=a.next(),s=r[0],c=s[0],l=s[1];"->"==c?this.makeStatement(new re([this._context,l,n,o])):this.makeStatement(new re([this._context,l,o,n]))}}catch(e){if(e!=ce)throw e}if((u=this.skipSpace(e,t))<0)throw Se(this._thisDoc,this.lines,e,u,"EOF found in list of objects");if(";"!=e.slice(t,t+1))return t;t=t+1}else{var u,t=u+2,p=new ie([]);if((u=this.node(e,t,p,n))<0)throw Se(this._thisDoc,this.lines,e,t,"bad {} or () or [] node after :- ");var t=u}}}commaSeparatedList(e,t,n,r){if((i=this.skipSpace(e,t))<0)throw Se(this._thisDoc,this.lines,e,i,"EOF found expecting comma sep list");if("."==e.charAt(i))return t;if(r)var i=this.uri_ref2(e,i,n);else i=this.bareWord(e,i,n);if(i<0)return-1;for(;;){if((t=this.skipSpace(e,i))<0)return t;var a=e.slice(t,t+1);if(","!=a)return"."!=a?-1:t;if(r)i=this.uri_ref2(e,t+1,n);else i=this.bareWord(e,t+1,n);if(i<0)throw Se(this._thisDoc,this.lines,e,i,"bad list content")}}objectList(e,t,n){if((t=this.object(e,t,n))<0)return-1;for(;;){var r=this.skipSpace(e,t);if(r<0)throw Se(this._thisDoc,this.lines,e,r,"EOF found after object");if(","!=e.slice(r,r+1))return r;if((t=this.object(e,r+1,n))<0)return t}}checkDot(e,t){var n=this.skipSpace(e,t);if(n<0)return n;if("."==e.slice(n,n+1))return n+1;if("}"==e.slice(n,n+1))return n;if("]"==e.slice(n,n+1))return n;throw Se(this._thisDoc,this.lines,e,n,"expected '.' or '}' or ']' at end of statement")}uri_ref2(e,t,n){var r=new ie([]);if((d=this.qname(e,t,r))>=0){var i=r[0],a=i[0],o=i[1];if(null==a){pe(0,"not used?");var s=this._baseURI+"#"}else{if(!(s=this._bindings[a])){if("_"==a)return n.push(this.anonymousNode(o)),d;throw Se(this._thisDoc,this.lines,e,t,"Prefix "+a+" not bound.")}}var c=this._store.sym(s+o);return H(this._variables,c)>=0?n.push(this._variables[c]):n.push(c),d}if((t=this.skipSpace(e,t))<0)return-1;if("?"==e.charAt(t)){var l=new ie([]);return(d=this.variable(e,t,l))>0?(n.push(l[0]),d):-1}if("<"==e.charAt(t)){for(var u=t=t+1;t<oe(e);){if(">"==e.charAt(t)){var p=e.slice(u,t);if(this._baseURI)p=de(this._baseURI,p);else pe(p.indexOf(":")>=0,"With no base URI, cannot deal with relative URIs");if("#"==e.slice(t-1,t)&&"#"!=se(p,-1,null))p=p+"#";c=this._store.sym(p);return H(this._variables,c)>=0?n.push(this._variables[c]):n.push(c),t+1}t=t+1}throw Se(this._thisDoc,this.lines,e,d,"unterminated URI reference")}if(this.keywordsSet){var d;l=new ie([]);if((d=this.bareWord(e,t,l))<0)return-1;if(H(this.keywords,l[0])>=0)throw Se(this._thisDoc,this.lines,e,t,'Keyword "'+l[0]+'" not allowed here.');return n.push(this._store.sym(this._bindings[""]+l[0])),d}return-1}skipSpace(e,t){for(var n=t||0;n<e.length;n++){var r=e.charAt(n);if(" \n\r\t\f\v \u2028\u2029 ".indexOf(r)<0){if("#"!==e.charAt(n))return n;for(;;n++){if(n===e.length)return-1;if("\n"===e.charAt(n)){this.lines=this.lines+1;break}}}else"\n"===e.charAt(n)&&(this.lines=this.lines+1)}return-1}variable(e,t,n){if((r=this.skipSpace(e,t))<0)return-1;if("?"!=e.slice(r,r+1))return-1;var r;t=r+=1;if("0123456789-".indexOf(e.charAt(r))>=0)throw Se(this._thisDoc,this.lines,e,r,"Varible name can't start with '"+e.charAt(r)+"s'");for(;t<oe(e)&&ge.indexOf(e.charAt(t))<0;)t=t+1;if(null==this._parentContext)throw Se(this._thisDoc,this.lines,e,r,"Can't use ?xxx syntax for variable in outermost level: "+e.slice(r-1,t));return n.push(this._store.variable(e.slice(r,t))),t}bareWord(e,t,n){var r=this.skipSpace(e,t);if(r<0)return-1;var i=e.charAt(r);if("0123456789-".indexOf(i)>=0)return-1;if(ge.indexOf(i)>=0)return-1;for(t=r;t<oe(e);){var a=e.charAt(t);if("."===a){if(ke(e,t))break}else if(ge.indexOf(a)>=0)break;t=t+1}return n.push(e.slice(r,t)),t}qname(e,t,n){if((t=this.skipSpace(e,t))<0)return-1;var r=e.charAt(t);if("0123456789-+".indexOf(r)>=0)return-1;if(ge.indexOf(r)<0){var i=r;for(t=t+1;t<oe(e);){if("."===(r=e.charAt(t))){if(ke(e,t))break}else if(ge.indexOf(r)>=0)break;i=i+r,t=t+1}}else i="";if(t<oe(e)&&":"==e.charAt(t)){var a=i;for(t=t+1,i="";t<oe(e);){if("."===(r=e.charAt(t))){if(ke(e,t))break}else if(ge.indexOf(r)>=0)break;i=i+r,t=t+1}return n.push(new re([a,i])),t}return i&&this.keywordsSet&&H(this.keywords,i)<0?(n.push(new re(["",i])),t):-1}object(e,t,n){if((a=this.subject(e,t,n))>=0)return a;{if((a=this.skipSpace(e,t))<0)return-1;t=a;var r=null;let s=e.charAt(t);if('"'==s||"'"==s){r=e.slice(t,t+3==s+s)?s+s+s:s;t=t+oe(r);var i=this.strconst(e,t,r),a=i[0],o=i[1];return n.push(this._store.literal(o)),a}return-1}}nodeOrLiteral(e,t,n){if((c=this.node(e,t,n))>=0)return c;if((c=this.skipSpace(e,t))<0)return-1;t=c;var r=e.charAt(t);if("-+0987654321".indexOf(r)>=0){if(be.lastIndex=0,null!=(p=be.exec(e.slice(t)))){c=t+(i=p[0]).length,i.indexOf("T")>=0?n.push(this._store.literal(i,this._store.sym("http://www.w3.org/2001/XMLSchema#dateTime"))):n.push(this._store.literal(i,this._store.sym("http://www.w3.org/2001/XMLSchema#date")))}else{var i;if(ve.lastIndex=0,null==(p=ve.exec(e.slice(t))))throw Se(this._thisDoc,this.lines,e,t,"Bad number or date syntax");c=t+ve.lastIndex,(i=e.slice(t,c)).indexOf("e")>=0?n.push(this._store.literal(parseFloat(i),this._store.sym("http://www.w3.org/2001/XMLSchema#double"))):e.slice(t,c).indexOf(".")>=0?n.push(this._store.literal(parseFloat(i),this._store.sym("http://www.w3.org/2001/XMLSchema#decimal"))):n.push(this._store.literal(parseInt(i),this._store.sym("http://www.w3.org/2001/XMLSchema#integer")))}return c}if('"'==e.charAt(t)){if('"""'==e.slice(t,t+3))var a='"""';else a='"';t=t+oe(a);var o=null,s=this.strconst(e,t,a),c=s[0],l=s[1],u=null;if("@"==e.slice(c,c+1)){var p;if(xe.lastIndex=0,null==(p=xe.exec(e.slice(c+1))))throw Se(this._thisDoc,startline,e,t,"Bad language code syntax on string literal, after @");t=xe.lastIndex+c+1,u=e.slice(c+1,t),c=t}if("^^"==e.slice(c,c+2)){var d=new ie([]);c=this.uri_ref2(e,c+2,d),o=d[0]}return n.push(this._store.literal(l,u||o)),c}return-1}strconst(e,t,n){for(var r=t,i="",a=this.lines;r<oe(e);){t=r+oe(n);if(e.slice(r,t)==n)return new re([t,i]);if('"'!=e.charAt(r)){if(we.lastIndex=0,!we.exec(e.slice(r)))throw Se(this._thisDoc,a,e,r,"Closing quote missing in string at ^ in "+e.slice(r-20,r)+"^"+e.slice(r,r+20));t=r+we.lastIndex-1,i=i+e.slice(r,t);if('"'!=(c=e.charAt(t)))if("\r"!=c){if("\n"==c){if('"'==n)throw Se(this._thisDoc,a,e,t,"newline found in string literal");this.lines=this.lines+1;i=i+c,r=t+1;this.previousLine=this.startOfLine,this.startOfLine=r}else if("\\"==c){r=t+1;if(!(c=e.slice(r,r+1)))throw Se(this._thisDoc,a,e,t,"unterminated string literal (2)");var o=ue('abfrtvn\\"',c);if(o>=0)i=i+'a\b\f\r\t\v\n\\"'.charAt(o),r=r+1;else if("u"==c)r=(s=this.uEscape(e,r+1,a))[0],i=i+(c=s[1]);else{if("U"!=c)throw Se(this._thisDoc,this.lines,e,t,"bad escape");var s,c;r=(s=this.UEscape(e,r+1,a))[0],i=i+(c=s[1])}}}else var r=t+1;else var r=t}else var i=i+'"',r=r+1}throw Se(this._thisDoc,this.lines,e,t,"unterminated string literal")}uEscape(e,t,n){for(var r=t,i=0,a=0;i<4;){var o=e.slice(r,r+1).toLowerCase();r=r+1;if(""==o)throw Se(this._thisDoc,n,e,t,"unterminated string literal(3)");var s=ue("0123456789abcdef",o);if(s<0)throw Se(this._thisDoc,n,e,t,"bad string literal hex escape");a=16*a+s,i=i+1}var c=String.fromCharCode(a);return new re([r,c])}UEscape(e,t,n){for(var r=t,i=0,a="\\U";i<8;){var o=e.slice(r,r+1).toLowerCase();r=r+1;if(""==o)throw Se(this._thisDoc,n,e,t,"unterminated string literal(3)");if(ue("0123456789abcdef",o)<0)throw Se(this._thisDoc,n,e,t,"bad string literal hex escape");a=a+o,i=i+1}var s,c=(s="0x"+se(a,2,10)-0,String.fromCharCode(s));return new re([r,c])}}function Ce(e,t,n,r,i){this._str=n.encode("utf-8"),this._str=n,this._i=r,this._why=i,this.lines=t,this._uri=e}function Se(e,t,n,r,i){let a=t+1,o="Line "+a+" of <"+e+">: Bad syntax: "+i+'\nat: "'+n.slice(r,r+30)+'"',s=new SyntaxError(o,e,a);return s.lineNo=a,s.characterInFile=r,s.syntaxProblem=i,s}Ce.prototype.toString=function(){var e=this._str,t=this._i,n=0;if(t>60){var r="...";n=t-60}else r="";if(oe(e)-t>60)var i="...";else i="";return'Line %i of <%s>: Bad syntax (%s) at ^ in:\n"%s%s^%s%s"'%new re([this.lines+1,this._uri,this._why,r,e.slice(n,t),e.slice(t,t+60),i])};const Ae={...S,supports:{[_.collections]:!0,[_.defaultGraphType]:!1,[_.equalsMethod]:!0,[_.identity]:!1,[_.id]:!0,[_.reversibleId]:!1,[_.variableType]:!0},collection:e=>new h(e),id(e){return(0,u.P3)(e)?`( ${e.elements.map(e=>this.id(e)).join(", ")} )`:(0,u.DZ)(e)?k.toString(e):S.id(e)},termToNQ:e=>e.termType===s.r0?h.toNT(e):S.termToNQ(e)},Te=Ae;function Pe(e,t){return"string"==typeof t?e.rdfFactory.literal(t):Object.prototype.hasOwnProperty.call(t,"@list")?!0===e.rdfFactory.supports.COLLECTIONS?function(e,t){if(!Array.isArray(t))throw new TypeError("Object must be an array");return e.rdfFactory.collection(t.map(t=>Pe(e,t)))}(e,t["@list"]):function(e,t){const n=t["@id"]?Ie(e,t):e.rdfFactory.blankNode(),r=t["@list"].map(t=>Pe(e,t)),i=z(e.rdfFactory,n,r);return e.addAll(i),n}(e,t):Object.prototype.hasOwnProperty.call(t,"@id")?Ie(e,t):Object.prototype.hasOwnProperty.call(t,"@language")?e.rdfFactory.literal(t["@value"],t["@language"]):Object.prototype.hasOwnProperty.call(t,"@type")?e.rdfFactory.literal(t["@value"],e.rdfFactory.namedNode(t["@type"])):Object.prototype.hasOwnProperty.call(t,"@value")?e.rdfFactory.literal(t["@value"]):e.rdfFactory.literal(t)}async function Re(e,t,r){const i=r&&Object.prototype.hasOwnProperty.call(r,"termType")?r.value:r,a=await n.e(841).then(n.t.bind(n,4841,23));return(await a.default.flatten(JSON.parse(e),null,{base:i})).reduce((e,t)=>Fe(e,r,t),t)}function Ie(e,t){return t["@id"].startsWith("_:")?e.rdfFactory.blankNode(t["@id"].substring(2)):e.rdfFactory.namedNode(t["@id"])}function Fe(e,t,n){const r=n["@id"]?Ie(e,n):e.rdfFactory.blankNode();for(const i of Object.keys(n)){if("@id"===i)continue;if("@graph"==i){const t=r,a=n[i];for(let n=0;n<a.length;n++)e=Fe(e,t,a[n])}const a=n[i];if(Array.isArray(a))for(let n=0;n<a.length;n++)e.addStatement(Ne(e,r,i,a[n],t));else e.addStatement(Ne(e,r,i,a,t))}return e}function Ne(e,t,n,r,i){let a,o;return"@type"===n?(a=e.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),o=e.rdfFactory.namedNode(r)):(a=e.rdfFactory.namedNode(n),o=Pe(e,r)),e.rdfFactory.quad(t,a,o,e.rdfFactory.namedNode(i))}var Oe=n(5576);const Le="http://www.w3.org/1999/02/22-rdf-syntax-ns#",je="http://www.w3.org/2001/XMLSchema#",Me="http://www.w3.org/2000/10/swap/",De={xsd:{decimal:`${je}decimal`,boolean:`${je}boolean`,double:`${je}double`,integer:`${je}integer`,string:`${je}string`},rdf:{type:`${Le}type`,nil:`${Le}nil`,first:`${Le}first`,rest:`${Le}rest`,langString:`${Le}langString`,dirLangString:`${Le}dirLangString`,reifies:`${Le}reifies`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${Me}reify#forSome`,forAll:`${Me}reify#forAll`},log:{implies:`${Me}log#implies`,isImpliedBy:`${Me}log#isImpliedBy`}},{xsd:Ue}=De,Be=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,ze={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},He=/[\x00-\x20<>\\"\{\}\|\^\`]/,qe={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_dircode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},$e=/$0^/;class We{constructor(e){if(this._iri=/^<((?:[^ <>{}\\]|\\[uU])+)>[ \t]*/,this._unescapedIri=/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>[ \t]*/,this._simpleQuotedString=/^"([^"\\\r\n]*)"(?=[^"])/,this._simpleApostropheString=/^'([^'\\\r\n]*)'(?=[^'])/,this._langcode=/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9])/i,this._dircode=/^--(ltr)|(rtl)/,this._prefix=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,this._prefixed=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?:[ \t]+|(?=\.?[,;!\^\s#()\[\]\{\}"'<>]))/,this._variable=/^\?(?:(?:[A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=[.,;!\^\s#()\[\]\{\}"'<>])/,this._blank=/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?:[ \t]+|(?=\.?[,;:\s#()\[\]\{\}"'<>]))/,this._number=/^[\-+]?(?:(\d+\.\d*|\.?\d+)[eE][\-+]?|\d*(\.)?)\d+(?=\.?[,;:\s#()\[\]\{\}"'<>])/,this._boolean=/^(?:true|false)(?=[.,;\s#()\[\]\{\}"'<>])/,this._atKeyword=/^@[a-z]+(?=[\s#<:])/i,this._keyword=/^(?:PREFIX|BASE|VERSION|GRAPH)(?=[\s#<])/i,this._shortPredicates=/^a(?=[\s#()\[\]\{\}"'<>])/,this._newline=/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,this._comment=/#([^\n\r]*)/,this._whitespace=/^[ \t]+/,this._endOfFile=/^(?:#[^\n\r]*)?$/,e=e||{},this._isImpliedBy=e.isImpliedBy,this._lineMode=!!e.lineMode){this._n3Mode=!1;for(const e in this)!(e in qe)&&this[e]instanceof RegExp&&(this[e]=$e)}else this._n3Mode=!1!==e.n3;this.comments=!!e.comments,this._literalClosingPos=0}_tokenizeToEnd(e,t){let n=this._input,r=n.length;for(;;){let e,o;for(;e=this._newline.exec(n);)this.comments&&(o=this._comment.exec(e[0]))&&i("comment",o[1],"",this._line,e[0].length),n=n.substr(e[0].length,n.length),r=n.length,this._line++;if(!e&&(e=this._whitespace.exec(n))&&(n=n.substr(e[0].length,n.length)),this._endOfFile.test(n))return t&&(this.comments&&(o=this._comment.exec(n))&&i("comment",o[1],"",this._line,n.length),n=null,i("eof","","",this._line,0)),this._input=n;const s=this._line,c=n[0];let l="",u="",p="",d=null,f=0,h=!1;switch(c){case"^":if(n.length<3)break;if("^"!==n[1]){this._n3Mode&&(f=1,l="^");break}if(this._previousMarker="^^",n=n.substr(2),"<"!==n[0]){h=!0;break}case"<":if(d=this._unescapedIri.exec(n))l="IRI",u=d[1];else if(d=this._iri.exec(n)){if(u=this._unescape(d[1]),null===u||He.test(u))return a(this);l="IRI"}else n.length>2&&"<"===n[1]&&"("===n[2]?(l="<<(",f=3):!this._lineMode&&n.length>(t?1:2)&&"<"===n[1]?(l="<<",f=2):this._n3Mode&&n.length>1&&"="===n[1]&&(f=2,this._isImpliedBy?(l="abbreviation",u="<"):(l="inverse",u=">"));break;case">":n.length>1&&">"===n[1]&&(l=">>",f=2);break;case"_":((d=this._blank.exec(n))||t&&(d=this._blank.exec(`${n} `)))&&(l="blank",p="_",u=d[1]);break;case'"':if(d=this._simpleQuotedString.exec(n))u=d[1];else if(({value:u,matchLength:f}=this._parseLiteral(n)),null===u)return a(this);null===d&&0===f||(l="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(d=this._simpleApostropheString.exec(n))u=d[1];else if(({value:u,matchLength:f}=this._parseLiteral(n)),null===u)return a(this);null===d&&0===f||(l="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(d=this._variable.exec(n))&&(l="var",u=d[0]);break;case"@":"literal"===this._previousMarker&&(d=this._langcode.exec(n))&&"version"!==d[1]?(l="langcode",u=d[1]):(d=this._atKeyword.exec(n))&&(l=d[0]);break;case".":if(1===n.length?t:n[1]<"0"||n[1]>"9"){l=".",f=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":if("-"===n[1]){"langcode"===this._previousMarker&&(d=this._dircode.exec(n))&&(l="dircode",f=2,u=d[1]||d[2],f=u.length+2);break}(d=this._number.exec(n)||t&&(d=this._number.exec(`${n} `)))&&(l="literal",u=d[0],p="string"==typeof d[1]?Ue.double:"string"==typeof d[2]?Ue.decimal:Ue.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":case"V":case"v":(d=this._keyword.exec(n))?l=d[0].toUpperCase():h=!0;break;case"f":case"t":(d=this._boolean.exec(n))?(l="literal",u=d[0],p=Ue.boolean):h=!0;break;case"a":(d=this._shortPredicates.exec(n))?(l="abbreviation",u="a"):h=!0;break;case"=":this._n3Mode&&n.length>1&&(l="abbreviation",">"!==n[1]?(f=1,u="="):(f=2,u=">"));break;case"!":if(!this._n3Mode)break;case")":if(!t&&(1===n.length||2===n.length&&">"===n[1]))break;if(n.length>2&&">"===n[1]&&">"===n[2]){l=")>>",f=3;break}case",":case";":case"[":case"]":case"(":case"}":case"~":this._lineMode||(f=1,l=c);break;case"{":!this._lineMode&&n.length>=2&&("|"===n[1]?(l="{|",f=2):(l=c,f=1));break;case"|":n.length>=2&&"}"===n[1]&&(l="|}",f=2);break;default:h=!0}if(h&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(d=this._prefix.exec(n))?((d=this._prefixed.exec(n))||t&&(d=this._prefixed.exec(`${n} `)))&&(l="prefixed",p=d[1]||"",u=this._unescape(d[2])):(l="prefix",u=d[1]||"")),"^^"===this._previousMarker)switch(l){case"prefixed":l="type";break;case"IRI":l="typeIRI";break;default:l=""}if(!l)return t||!/^'''|^"""/.test(n)&&/\n|\r/.test(n)?a(this):this._input=n;const m=f||d[0].length,g=i(l,u,p,s,m);this.previousToken=g,this._previousMarker=l,n=n.substr(m,n.length)}function i(t,i,a,o,s){const c=n?r-n.length:r,l={type:t,value:i,prefix:a,line:o,start:c,end:c+s};return e(null,l),l}function a(t){e(t._syntaxError(/^\S*/.exec(n)[0]))}}_unescape(e){let t=!1;const n=e.replace(Be,(e,n,r,i)=>{if("string"==typeof n)return String.fromCharCode(Number.parseInt(n,16));if("string"==typeof r){let e=Number.parseInt(r,16);return e<=65535?String.fromCharCode(Number.parseInt(r,16)):String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e))}return i in ze?ze[i]:(t=!0,"")});return t?null:n}_parseLiteral(e){if(e.length>=3){const t=e.match(/^(?:"""|"|'''|'|)/)[0],n=t.length;let r=Math.max(this._literalClosingPos,n);for(;(r=e.indexOf(t,r))>0;){let t=0;for(;"\\"===e[r-t-1];)t++;if(t%2==0){const t=e.substring(n,r),i=t.split(/\r\n|\r|\n/).length-1,a=r+n;if(1===n&&0!==i||3===n&&this._lineMode)break;return this._line+=i,{value:this._unescape(t),matchLength:a}}r++}this._literalClosingPos=e.length-n+1}return{value:"",matchLength:0}}_syntaxError(e){this._input=null;const t=new Error(`Unexpected "${e}" on line ${this._line}.`);return t.context={token:void 0,line:this._line,previousToken:this.previousToken},t}_readStartingBom(e){return e.startsWith("\ufeff")?e.substr(1):e}tokenize(e,t){if(this._line=1,"string"==typeof e){if(this._input=this._readStartingBom(e),"function"!=typeof t){const e=[];let t;if(this._tokenizeToEnd((n,r)=>n?t=n:e.push(r),!0),t)throw t;return e}queueMicrotask(()=>this._tokenizeToEnd(t,!0))}else this._pendingBuffer=null,"function"==typeof e.setEncoding&&e.setEncoding("utf8"),e.on("data",e=>{null!==this._input&&0!==e.length&&(this._pendingBuffer&&(e=Oe.Buffer.concat([this._pendingBuffer,e]),this._pendingBuffer=null),128&e[e.length-1]?this._pendingBuffer=e:(void 0===this._input?this._input=this._readStartingBom("string"==typeof e?e:e.toString()):this._input+=e,this._tokenizeToEnd(t,!1)))}),e.on("end",()=>{"string"==typeof this._input&&this._tokenizeToEnd(t,!0)}),e.on("error",t)}}const{rdf:Ve,xsd:Ge}=De;let Ke,Je=0;const Qe={namedNode:at,blankNode:ot,variable:ct,literal:st,defaultGraph:function(){return Ke},quad:lt,triple:lt,fromTerm:ut,fromQuad:pt},Ye=Qe;class Xe{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof Xe?this.id===e.id:!!e&&this.termType===e.termType&&this.value===e.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class Ze extends Xe{get termType(){return"NamedNode"}}class et extends Xe{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const e=this.id;let t=e.lastIndexOf('"')+1;const n=e.lastIndexOf("--");return t<e.length&&"@"===e[t++]?(n>t?e.substr(0,n):e).substr(t).toLowerCase():""}get direction(){const e=this.id,t=e.lastIndexOf('"'),n=e.lastIndexOf("--");return n>t&&n+2<e.length?e.substr(n+2).toLowerCase():""}get datatype(){return new Ze(this.datatypeString)}get datatypeString(){const e=this.id,t=e.lastIndexOf('"')+1,n=t<e.length?e[t]:"";return"^"===n?e.substr(t+2):"@"!==n?Ge.string:e.indexOf("--",t)>0?Ve.dirLangString:Ve.langString}equals(e){return e instanceof et?this.id===e.id:!!e&&!!e.datatype&&this.termType===e.termType&&this.value===e.value&&this.language===e.language&&(this.direction===e.direction||""===this.direction&&!e.direction)&&this.datatype.value===e.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,direction:this.direction,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class tt extends Xe{constructor(e){super(`_:${e}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class nt extends Xe{constructor(e){super(`?${e}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}class rt extends Xe{constructor(){return super(""),Ke||this}get termType(){return"DefaultGraph"}equals(e){return this===e||!!e&&this.termType===e.termType}}Ke=new rt;class it extends Xe{constructor(e,t,n,r){super(""),this._subject=e,this._predicate=t,this._object=n,this._graph=r||Ke}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(e){return!!e&&this._subject.equals(e.subject)&&this._predicate.equals(e.predicate)&&this._object.equals(e.object)&&this._graph.equals(e.graph)}}function at(e){return new Ze(e)}function ot(e){return new tt(e||"n3-"+Je++)}function st(e,t){if("string"==typeof t)return new et(`"${e}"@${t.toLowerCase()}`);if(void 0!==t&&!("termType"in t))return new et(`"${e}"@${t.language.toLowerCase()}${t.direction?`--${t.direction.toLowerCase()}`:""}`);let n=t?t.value:"";return""===n&&("boolean"==typeof e?n=Ge.boolean:"number"==typeof e&&(Number.isFinite(e)?n=Number.isInteger(e)?Ge.integer:Ge.double:(n=Ge.double,Number.isNaN(e)||(e=e>0?"INF":"-INF")))),""===n||n===Ge.string?new et(`"${e}"`):new et(`"${e}"^^${n}`)}function ct(e){return new nt(e)}function lt(e,t,n,r){return new it(e,t,n,r)}function ut(e){if(e instanceof Xe)return e;switch(e.termType){case"NamedNode":return at(e.value);case"BlankNode":return ot(e.value);case"Variable":return ct(e.value);case"DefaultGraph":return Ke;case"Literal":return st(e.value,e.language||e.datatype);case"Quad":return pt(e);default:throw new Error(`Unexpected termType: ${e.termType}`)}}function pt(e){if(e instanceof it)return e;if("Quad"!==e.termType)throw new Error(`Unexpected termType: ${e.termType}`);return lt(ut(e.subject),ut(e.predicate),ut(e.object),ut(e.graph))}let dt=0;class ft{constructor(e){this._contextStack=[],this._graph=null,e=e||{},this._setBase(e.baseIRI),e.factory&&mt(this,e.factory);const t="string"==typeof e.format?e.format.match(/\w*$/)[0].toLowerCase():"",n=/turtle/.test(t),r=/trig/.test(t),i=/triple/.test(t),a=/quad/.test(t),o=this._n3Mode=/n3/.test(t),s=i||a;(this._supportsNamedGraphs=!(n||o))||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(n||r||i||o),this._isImpliedBy=e.isImpliedBy,s&&(this._resolveRelativeIRI=e=>null),this._blankNodePrefix="string"!=typeof e.blankNodePrefix?"":e.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=e.lexer||new We({lineMode:s,n3:o,isImpliedBy:this._isImpliedBy}),this._explicitQuantifiers=!!e.explicitQuantifiers,this._parseUnsupportedVersions=!!e.parseUnsupportedVersions,this._version=e.version}static _resetBlankNodePrefix(){dt=0}_setBase(e){if(e){const t=e.indexOf("#");t>=0&&(e=e.substr(0,t)),this._base=e,this._basePath=e.indexOf("/")<0?e:e.replace(/[^\/?]*(?:\?.*)?$/,""),e=e.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=e[0],this._baseScheme=e[1]}else this._base="",this._basePath=""}_saveContext(e,t,n,r,i){const a=this._n3Mode;this._contextStack.push({type:e,subject:n,predicate:r,object:i,graph:t,inverse:!!a&&this._inversePredicate,blankPrefix:a?this._prefixes._:"",quantified:a?this._quantified:null}),a&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.value}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(e,t){const n=this._contextStack.pop();if(!n||n.type!==e)return this._error(`Unexpected ${t.type}`,t);this._subject=n.subject,this._predicate=n.predicate,this._object=n.object,this._graph=n.graph,this._n3Mode&&(this._inversePredicate=n.inverse,this._prefixes._=n.blankPrefix,this._quantified=n.quantified)}_readBeforeTopContext(e){return this._version&&!this._isValidVersion(this._version)?this._error(`Detected unsupported version as media type parameter: "${this._version}"`,e):this._readInTopContext(e)}_readInTopContext(e){switch(e.type){case"eof":return null!==this._graph?this._error("Unclosed graph",e):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"PREFIX":this._sparqlStyle=!0;case"@prefix":return this._readPrefix;case"BASE":this._sparqlStyle=!0;case"@base":return this._readBaseIRI;case"VERSION":this._sparqlStyle=!0;case"@version":return this._readVersion;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(e)}}_readEntity(e,t){let n;switch(e.type){case"IRI":case"typeIRI":const t=this._resolveIRI(e.value);if(null===t)return this._error("Invalid IRI",e);n=this._factory.namedNode(t);break;case"type":case"prefixed":const r=this._prefixes[e.prefix];if(void 0===r)return this._error(`Undefined prefix "${e.prefix}:"`,e);n=this._factory.namedNode(r+e.value);break;case"blank":n=this._factory.blankNode(this._prefixes[e.prefix]+e.value);break;case"var":n=this._factory.variable(e.value.substr(1));break;default:return this._error(`Expected entity but got ${e.type}`,e)}return!t&&this._n3Mode&&n.id in this._quantified&&(n=this._quantified[n.id]),n}_readSubject(e){switch(this._predicate=null,e.type){case"[":return this._saveContext("blank",this._graph,this._subject=this._factory.blankNode(),null,null),this._readBlankNodeHead;case"(":const t=this._contextStack;return"<<"===(t.length&&t[t.length-1]).type?this._error("Unexpected list in reified triple",e):(this._saveContext("list",this._graph,this.RDF_NIL,null,null),this._subject=null,this._readListItem);case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._graph=this._factory.blankNode(),null,null),this._readSubject):this._error("Unexpected graph",e);case"}":return this._readPunctuation(e);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier="blankNode",this._readQuantifierList):this._error('Unexpected "@forSome"',e);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier="variable",this._readQuantifierList):this._error('Unexpected "@forAll"',e);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",e);if(0===e.prefix.length)return this._literalValue=e.value,this._completeSubjectLiteral;this._subject=this._factory.literal(e.value,this._factory.namedNode(e.prefix));break;case"<<(":return this._n3Mode?(this._saveContext("<<(",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Disallowed triple term as subject",e);case"<<":return this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject;default:if(void 0===(this._subject=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(e){const t=e.type;switch(t){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[e.value];break;case".":case"]":case"}":case"|}":return null===this._predicate?this._error(`Unexpected ${t}`,e):(this._subject=null,"]"===t?this._readBlankNodeTail(e):this._readPunctuation(e));case";":return null!==this._predicate?this._readPredicate:this._error("Expected predicate but got ;",e);case"[":if(this._n3Mode)return this._saveContext("blank",this._graph,this._subject,this._subject=this._factory.blankNode(),null),this._readBlankNodeHead;case"blank":if(!this._n3Mode)return this._error("Disallowed blank node as predicate",e);default:if(void 0===(this._predicate=this._readEntity(e)))return}return this._validAnnotation=!0,this._readObject}_readObject(e){switch(e.type){case"literal":if(0===e.prefix.length)return this._literalValue=e.value,this._readDataTypeOrLang;this._object=this._factory.literal(e.value,this._factory.namedNode(e.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._factory.blankNode()),this._readBlankNodeHead;case"(":const t=this._contextStack;return"<<"===(t.length&&t[t.length-1]).type?this._error("Unexpected list in reified triple",e):(this._saveContext("list",this._graph,this._subject,this._predicate,this.RDF_NIL),this._subject=null,this._readListItem);case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._factory.blankNode()),this._readSubject):this._error("Unexpected graph",e);case"<<(":return this._saveContext("<<(",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject;case"<<":return this._saveContext("<<",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject;default:if(void 0===(this._object=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._getContextEndReader())}return this._getContextEndReader()}_readPredicateOrNamedGraph(e){return"{"===e.type?this._readGraph(e):this._readPredicate(e)}_readGraph(e){return"{"!==e.type?this._error(`Expected graph but got ${e.type}`,e):(this._graph=this._subject,this._subject=null,this._readSubject)}_readBlankNodeHead(e){if("]"===e.type)return this._subject=null,this._readBlankNodeTail(e);{const t=this._contextStack;return"<<"===(t.length>1&&t[t.length-2]).type?this._error("Unexpected compound blank node expression in reified triple",e):(this._predicate=null,this._readPredicate(e))}}_readBlankNodeTail(e){if("]"!==e.type)return this._readBlankNodePunctuation(e);null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph);const t=null===this._predicate;return this._restoreContext("blank",e),null!==this._object?this._getContextEndReader():null!==this._predicate?this._readObject:t?this._readPredicateOrNamedGraph:this._readPredicateAfterBlank}_readPredicateAfterBlank(e){switch(e.type){case".":case"}":return this._subject=null,this._readPunctuation(e);default:return this._readPredicate(e)}}_readListItem(e){let t=null,n=null,r=this._readListItem;const i=this._subject,a=this._contextStack,o=a[a.length-1];switch(e.type){case"[":this._saveContext("blank",this._graph,n=this._factory.blankNode(),this.RDF_FIRST,this._subject=t=this._factory.blankNode()),r=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,n=this._factory.blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext("list",e),0!==a.length&&"list"===a[a.length-1].type&&this._emit(this._subject,this._predicate,this._object,this._graph),null===this._predicate){if(r=this._readPredicate,this._subject===this.RDF_NIL)return r}else if(r=this._getContextEndReader(),this._object===this.RDF_NIL)return r;n=this.RDF_NIL;break;case"literal":0===e.prefix.length?(this._literalValue=e.value,r=this._readListItemDataTypeOrLang):(t=this._factory.literal(e.value,this._factory.namedNode(e.prefix)),r=this._getContextEndReader());break;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._factory.blankNode()),this._readSubject):this._error("Unexpected graph",e);case"<<":this._saveContext("<<",this._graph,null,null,null),this._graph=null,r=this._readSubject;break;default:if(void 0===(t=this._readEntity(e)))return}if(null===n&&(this._subject=n=this._factory.blankNode()),"<<"===e.type&&(a[a.length-1].subject=this._subject),null===i?null===o.predicate?o.subject=n:o.object=n:this._emit(i,this.RDF_REST,n,this._graph),null!==t){if(this._n3Mode&&("IRI"===e.type||"prefixed"===e.type))return this._saveContext("item",this._graph,n,this.RDF_FIRST,t),this._subject=t,this._predicate=null,this._getPathReader(this._readListItem);this._emit(n,this.RDF_FIRST,t,this._graph)}return r}_readDataTypeOrLang(e){return this._completeObjectLiteral(e,!1)}_readListItemDataTypeOrLang(e){return this._completeObjectLiteral(e,!0)}_completeLiteral(e,t){let n,r=this._factory.literal(this._literalValue);switch(e.type){case"type":case"typeIRI":const i=this._readEntity(e);if(void 0===i)return;if(i.value===De.rdf.langString||i.value===De.rdf.dirLangString)return this._error("Detected illegal (directional) languaged-tagged string with explicit datatype",e);r=this._factory.literal(this._literalValue,i),e=null;break;case"langcode":if(e.value.split("-").some(e=>e.length>8))return this._error("Detected language tag with subtag longer than 8 characters",e);r=this._factory.literal(this._literalValue,e.value),this._literalLanguage=e.value,e=null,n=this._readDirCode.bind(this,t)}return{token:e,literal:r,readCb:n}}_readDirCode(e,t,n){if("dircode"===n.type){const t=this._factory.literal(this._literalValue,{language:this._literalLanguage,direction:n.value});"subject"===e?this._subject=t:this._object=t,this._literalLanguage=void 0,n=null}return"subject"===e?null===n?this._readPredicateOrNamedGraph:this._readPredicateOrNamedGraph(n):this._completeObjectLiteralPost(n,t)}_completeSubjectLiteral(e){const t=this._completeLiteral(e,"subject");return this._subject=t.literal,t.readCb?t.readCb.bind(this,!1):this._readPredicateOrNamedGraph}_completeObjectLiteral(e,t){const n=this._completeLiteral(e,"object");if(n)return this._object=n.literal,n.readCb?n.readCb.bind(this,t):this._completeObjectLiteralPost(n.token,t)}_completeObjectLiteralPost(e,t){return t&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),null===e?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(e))}_readFormulaTail(e){return"}"!==e.type?this._readPunctuation(e):(null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext("formula",e),null===this._object?this._readPredicate:this._getContextEndReader())}_readPunctuation(e){let t,n=this._graph,r=!1;const i=this._subject,a=this._inversePredicate;switch(e.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",e);if(this._n3Mode)return this._readFormulaTail(e);this._graph=null;case".":this._subject=null,this._tripleTerm=null,t=this._contextStack.length?this._readSubject:this._readInTopContext,a&&(this._inversePredicate=!1);break;case";":t=this._readPredicate;break;case",":t=this._readObject;break;case"~":t=this._readReifierInAnnotation,r=!0;break;case"{|":this._subject=this._readTripleTerm(),this._validAnnotation=!1,r=!0,t=this._readPredicate;break;case"|}":if(!this._annotation)return this._error("Unexpected annotation syntax closing",e);if(!this._validAnnotation)return this._error("Annotation block can not be empty",e);this._subject=null,this._annotation=!1,t=this._readPunctuation;break;default:if(this._supportsQuads&&null===this._graph&&void 0!==(n=this._readEntity(e))){t=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}if(null!==i&&(!r||r&&!this._annotation)){const e=this._predicate,t=this._object;a?this._emit(t,e,i,n):this._emit(i,e,t,n)}return r&&(this._annotation=!0),t}_readBlankNodePunctuation(e){let t;switch(e.type){case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}return this._emit(this._subject,this._predicate,this._object,this._graph),t}_readQuadPunctuation(e){return"."!==e.type?this._error("Expected dot to follow quad",e):this._readInTopContext}_readPrefix(e){return"prefix"!==e.type?this._error("Expected prefix to follow @prefix",e):(this._prefix=e.value,this._readPrefixIRI)}_readPrefixIRI(e){if("IRI"!==e.type)return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,e);const t=this._readEntity(e);return this._prefixes[this._prefix]=t.value,this._prefixCallback(this._prefix,t),this._readDeclarationPunctuation}_readBaseIRI(e){const t="IRI"===e.type&&this._resolveIRI(e.value);return t?(this._setBase(t),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",e)}_isValidVersion(e){return this._parseUnsupportedVersions||ft.SUPPORTED_VERSIONS.includes(e)}_readVersion(e){return"literal"!==e.type?this._error("Expected literal to follow version declaration",e):e.end-e.start!==e.value.length+2?this._error("Version declarations must use single quotes",e):(this._versionCallback(e.value),this._isValidVersion(e.value)?this._readDeclarationPunctuation:this._error(`Detected unsupported version: "${e.value}"`,e))}_readNamedGraphLabel(e){switch(e.type){case"IRI":case"blank":case"prefixed":return this._readSubject(e),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",e)}}_readNamedGraphBlankLabel(e){return"]"!==e.type?this._error("Invalid graph label",e):(this._subject=this._factory.blankNode(),this._readGraph)}_readDeclarationPunctuation(e){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(e)):"."!==e.type?this._error("Expected declaration to end with a dot",e):this._readInTopContext}_readQuantifierList(e){let t;switch(e.type){case"IRI":case"prefixed":if(void 0!==(t=this._readEntity(e,!0)))break;default:return this._error(`Unexpected ${e.type}`,e)}return this._explicitQuantifiers?(null===this._subject?this._emit(this._graph||this.DEFAULTGRAPH,this._predicate,this._subject=this._factory.blankNode(),this.QUANTIFIERS_GRAPH):this._emit(this._subject,this.RDF_REST,this._subject=this._factory.blankNode(),this.QUANTIFIERS_GRAPH),this._emit(this._subject,this.RDF_FIRST,t,this.QUANTIFIERS_GRAPH)):this._quantified[t.id]=this._factory[this._quantifier](this._factory.blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(e){return","===e.type?this._readQuantifierList:(this._explicitQuantifiers&&(this._emit(this._subject,this.RDF_REST,this.RDF_NIL,this.QUANTIFIERS_GRAPH),this._subject=null),this._readCallback=this._getContextEndReader(),this._readCallback(e))}_getPathReader(e){return this._afterPath=e,this._readPath}_readPath(e){switch(e.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const t=this._contextStack,n=t.length&&t[t.length-1];if(n&&"item"===n.type){const t=this._subject;this._restoreContext("item",e),this._emit(this._subject,this.RDF_FIRST,t,this._graph)}return this._afterPath(e)}}_readForwardPath(e){let t,n;const r=this._factory.blankNode();if(void 0!==(n=this._readEntity(e)))return null===this._predicate?(t=this._subject,this._subject=r):(t=this._object,this._object=r),this._emit(t,n,r,this._graph),this._readPath}_readBackwardPath(e){const t=this._factory.blankNode();let n,r;if(void 0!==(n=this._readEntity(e)))return null===this._predicate?(r=this._subject,this._subject=t):(r=this._object,this._object=t),this._emit(t,n,r,this._graph),this._readPath}_readTripleTermTail(e){if(")>>"!==e.type)return this._error(`Expected )>> but got ${e.type}`,e);const t=this._factory.quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext("<<(",e),null===this._subject?(this._subject=t,this._readPredicate):(this._object=t,this._getContextEndReader())}_readReifiedTripleTailOrReifier(e){return"~"===e.type?this._readReifier:this._readReifiedTripleTail(e)}_readReifiedTripleTail(e){if(">>"!==e.type)return this._error(`Expected >> but got ${e.type}`,e);this._tripleTerm=null;const t=this._readTripleTerm();this._restoreContext("<<",e);const n=this._contextStack,r=n.length&&n[n.length-1];return r&&"list"===r.type?(this._emit(this._subject,this.RDF_FIRST,t,this._graph),this._getContextEndReader()):null===this._subject?(this._subject=t,this._readPredicateOrReifierTripleEnd):(this._object=t,this._getContextEndReader())}_readPredicateOrReifierTripleEnd(e){return"."===e.type?(this._subject=null,this._readPunctuation(e)):this._readPredicate(e)}_readReifier(e){return this._reifier=this._readEntity(e),this._readReifiedTripleTail}_readReifierInAnnotation(e){return"IRI"===e.type||"typeIRI"===e.type||"type"===e.type||"prefixed"===e.type||"blank"===e.type||"var"===e.type?(this._reifier=this._readEntity(e),this._readPunctuation):(this._readTripleTerm(),this._subject=null,this._readPunctuation(e))}_readTripleTerm(){const e=this._contextStack,t=e.length&&e[e.length-1],n=t?t.graph:void 0,r=this._reifier||this._factory.blankNode();return this._reifier=null,this._tripleTerm=this._tripleTerm||this._factory.quad(this._subject,this._predicate,this._object),this._emit(r,this.RDF_REIFIES,this._tripleTerm,n||this.DEFAULTGRAPH),r}_getContextEndReader(){const e=this._contextStack;if(!e.length)return this._readPunctuation;switch(e[e.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem;case"formula":return this._readFormulaTail;case"<<(":return this._readTripleTermTail;case"<<":return this._readReifiedTripleTailOrReifier}}_emit(e,t,n,r){this._callback(null,this._factory.quad(e,t,n,r||this.DEFAULTGRAPH))}_error(e,t){const n=new Error(`${e} on line ${t.line}.`);n.context={token:t,line:t.line,previousToken:this._lexer.previousToken},this._callback(n),this._callback=ht}_resolveIRI(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)?e:this._resolveRelativeIRI(e)}_resolveRelativeIRI(e){if(!e.length)return this._base;switch(e[0]){case"#":return this._base+e;case"?":return this._base.replace(/(?:\?.*)?$/,e);case"/":return("/"===e[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(e);default:return/^[^/:]*:/.test(e)?null:this._removeDotSegments(this._basePath+e)}}_removeDotSegments(e){if(!/(^|\/)\.\.?($|[/#?])/.test(e))return e;const t=e.length;let n="",r=-1,i=-1,a=0,o="/";for(;r<t;){switch(o){case":":if(i<0&&"/"===e[++r]&&"/"===e[++r])for(;(i=r+1)<t&&"/"!==e[i];)r=i;break;case"?":case"#":r=t;break;case"/":if("."===e[r+1])switch(o=e[1+ ++r],o){case"/":n+=e.substring(a,r-1),a=r+1;break;case void 0:case"?":case"#":return n+e.substring(a,r)+e.substr(r+1);case".":if(o=e[1+ ++r],void 0===o||"/"===o||"?"===o||"#"===o){if(n+=e.substring(a,r-2),(a=n.lastIndexOf("/"))>=i&&(n=n.substr(0,a)),"/"!==o)return`${n}/${e.substr(r+1)}`;a=r+1}}}o=e[++r]}return n+e.substring(a)}parse(e,t,n,r){let i,a,o,s;if(t&&(t.onQuad||t.onPrefix||t.onComment||t.onVersion)?(i=t.onQuad,a=t.onPrefix,o=t.onComment,s=t.onVersion):(i=t,a=n,s=r),this._readCallback=this._readBeforeTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${dt++}_`,this._prefixCallback=a||ht,this._versionCallback=s||ht,this._inversePredicate=!1,this._quantified=Object.create(null),!i){const t=[];let n;if(this._callback=(e,r)=>{e?n=e:r&&t.push(r)},this._lexer.tokenize(e).every(e=>this._readCallback=this._readCallback(e)),n)throw n;return t}let c=(e,t)=>{null!==e?(this._callback(e),this._callback=ht):this._readCallback&&(this._readCallback=this._readCallback(t))};o&&(this._lexer.comments=!0,c=(e,t)=>{null!==e?(this._callback(e),this._callback=ht):this._readCallback&&("comment"===t.type?o(t.value):this._readCallback=this._readCallback(t))}),this._callback=i,this._lexer.tokenize(e,c)}}function ht(){}function mt(e,t){e._factory=t,e.DEFAULTGRAPH=t.defaultGraph(),e.RDF_FIRST=t.namedNode(De.rdf.first),e.RDF_REST=t.namedNode(De.rdf.rest),e.RDF_NIL=t.namedNode(De.rdf.nil),e.RDF_REIFIES=t.namedNode(De.rdf.reifies),e.N3_FORALL=t.namedNode(De.r.forAll),e.N3_FORSOME=t.namedNode(De.r.forSome),e.ABBREVIATIONS={a:t.namedNode(De.rdf.type),"=":t.namedNode(De.owl.sameAs),">":t.namedNode(De.log.implies),"<":t.namedNode(De.log.isImpliedBy)},e.QUANTIFIERS_GRAPH=t.namedNode("urn:n3:quantifiers")}function gt(e){return!!e&&"NamedNode"===e.termType}function vt(e){return!!e&&"BlankNode"===e.termType}function bt(e){return!!e&&"Literal"===e.termType}function yt(e){return!!e&&"Variable"===e.termType}function wt(e){return!!e&&"Quad"===e.termType}function xt(e){return!!e&&"DefaultGraph"===e.termType}function kt(e){return xt(e.graph)}function _t(e,t){return Et({"":e.value||e},t)("")}function Et(e,t){const n=Object.create(null);for(const t in e)r(t,e[t]);function r(e,r){if("string"==typeof r){const i=Object.create(null);n[e]=e=>i[e]||(i[e]=t.namedNode(r+e))}else if(!(e in n))throw new Error(`Unknown prefix: ${e}`);return n[e]}return t=t||Ye,r}ft.SUPPORTED_VERSIONS=["1.2","1.2-basic","1.1"],mt(ft.prototype,Ye);Ye.defaultGraph();const{rdf:Ct,xsd:St}=De;var At=n(5721);Symbol("iter");Symbol.iterator;At.Readable,Symbol.iterator;At.Transform;At.Transform;if(void 0===Tt)var Tt={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};class Pt{constructor(e,t){this.options=t||{},this.kb=e,this.target=t.target||{graph:{subjects:{},prefixes:{},terms:{}}},this.blankNodes=[],this.htmlOptions={selfClosing:"br img input area base basefont col colgroup source wbr isindex link meta param hr"},this.theOne="_:"+(new Date).getTime(),this.language=null,this.vocabulary=null,this.blankCounter=0,this.langAttributes=[{namespaceURI:"http://www.w3.org/XML/1998/namespace",localName:"lang"}],this.inXHTMLMode=!1,this.absURIRE=/[\w\_\-]+:\S+/,this.finishedHandlers=[],this.init()}addTriple(e,t,n,r){var i,a,o,s;i=void 0===t?S.namedNode(this.options.base):this.toRDFNodeObject(t),o=this.toRDFNodeObject(n),a=this.toRDFNodeObject(r),s=S.namedNode(this.options.base),this.kb.add(i,o,a,s)}ancestorPath(e){for(var t="";e&&e.nodeType!==Tt.DOCUMENT_NODE;)t="/"+e.localName+t,e=e.parentNode;return t}copyMappings(e){var t={};for(var n in e)t[n]=e[n];return t}copyProperties(){}deriveDateTimeType(e){for(var t=0;t<Pt.dateTimeTypes.length;t++){var n=Pt.dateTimeTypes[t].pattern.exec(e);if(n&&n[0].length===e.length)return Pt.dateTimeTypes[t].type}return null}init(){}newBlankNode(){return this.blankCounter++,"_:"+this.blankCounter}newSubjectOrigin(e,t){}parseCURIE(e,t,n){var r,i=e.indexOf(":");if(i>=0){var a=e.substring(0,i);if(""===a)return(r=t[""])?r+e.substring(i+1):null;if("_"===a)return"_:"+e.substring(i+1);if(Pt.NCNAME.test(a)&&(r=t[a]))return r+e.substring(i+1)}return null}parseCURIEOrURI(e,t,n){var r=this.parseCURIE(e,t,n);return r||this.resolveAndNormalize(n,e)}parsePredicate(e,t,n,r,i,a){if(""===e)return null;var o=this.parseTermOrCURIEOrAbsURI(e,t,a?null:n,r,i);return o&&0===o.indexOf("_:")?null:o}parsePrefixMappings(e,t){for(var n=this.tokenize(e),r=null,i=0;i<n.length;i++)":"===n[i][n[i].length-1]?r=n[i].substring(0,n[i].length-1):r&&(t[r]=this.options.base?x.join(n[i],this.options.base):n[i],r=null)}static parseRDFaDOM(e,t,n){var r=new Pt(t,{base:n});e.baseURI||(e.baseURI=n),r.process(e,{baseURI:n})}parseSafeCURIEOrCURIEOrURI(e,t,n){return"["===(e=this.trim(e)).charAt(0)&&"]"===e.charAt(e.length-1)?0===(e=(e=e.substring(1,e.length-1)).trim(e)).length?null:"_:"===e?this.theOne:this.parseCURIE(e,t,n):this.parseCURIEOrURI(e,t,n)}parseTermOrCURIEOrAbsURI(e,t,n,r,i){e=this.trim(e);var a=this.parseCURIE(e,r,i);if(a)return a;if(n){if(t&&!this.absURIRE.exec(e))return t+e;var o=n[e];if(o)return o;if(o=n[e.toLowerCase()])return o}return this.absURIRE.exec(e)?this.resolveAndNormalize(i,e):null}parseTermOrCURIEOrURI(e,t,n,r,i){e=this.trim(e);var a=this.parseCURIE(e,r,i);if(a)return a;var o=n[e];return o||((o=n[e.toLowerCase()])?o:t&&!this.absURIRE.exec(e)?t+e:this.resolveAndNormalize(i,e))}parseURI(e){return e}process(e,t){var n;t=t||{},e.nodeType===Tt.DOCUMENT_NODE?(e.baseURI&&!t.baseURI&&(t.baseURI=e.baseURI),n=e.baseURI,(e=e.documentElement).baseURI||(e.baseURI=n),this.setContext(e)):e.parentNode.nodeType===Tt.DOCUMENT_NODE&&this.setContext(e);var r=[],i=function(e){if(!e&&t&&t.baseURI)return t.baseURI;var n=e.indexOf("#");return n>=0&&(e=e.substring(0,n)),t&&t.baseURIMap&&(e=t.baseURIMap(e)),e};for(r.push({current:e,context:this.push(null,i(e.baseURI))});r.length>0;){var a=r.shift();if(a.parent){if(a.context.parent&&a.context.parent.listMapping===a.listMapping)continue;for(let e in a.listMapping){var o=a.listMapping[e];if(0!==o.length){var s=[];for(let e=0;e<o.length;e++)s.push(this.newBlankNode());for(let e=0;e<s.length;e++)this.addTriple(a.parent,s[e],"http://www.w3.org/1999/02/22-rdf-syntax-ns#first",o[e]),this.addTriple(a.parent,s[e],"http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",{type:Pt.objectURI,value:e+1<s.length?s[e+1]:"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"});this.addTriple(a.parent,a.subject,e,{type:Pt.objectURI,value:s[0]})}else this.addTriple(a.parent,a.subject,e,{type:Pt.objectURI,value:"http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"})}}else{var c=a.current,l=a.context,u=!1,p=null,d=null,f=null,h=l.prefixes,m=!1,g=[],v=l.listMapping,b=!l.parent,y=l.language,w=l.vocabulary;n=this.parseURI(i(c.baseURI)),c.item=null;var k=c.getAttributeNode("vocab");if(k){let e=this.trim(k.value);if(e.length>0){w=e;var _=n.spec;this.addTriple(c,_,"http://www.w3.org/ns/rdfa#usesVocabulary",{type:Pt.objectURI,value:w})}else w=this.vocabulary}for(var E=0;E<c.attributes.length;E++){var C=c.attributes[E];if("x"===C.nodeName.charAt(0)&&0===C.nodeName.indexOf("xmlns:")){m||(h=this.copyMappings(h),m=!0);var S=C.nodeName.substring(6),A=Pt.trim(C.value);h[S]=this.options.base?x.join(A,this.options.base):A}}var T=c.getAttributeNode("prefix");T&&(m||(h=this.copyMappings(h),m=!0),this.parsePrefixMappings(T.value,h));var P=null;for(let e=0;!P&&e<this.langAttributes.length;e++)P=c.getAttributeNodeNS(this.langAttributes[e].namespaceURI,this.langAttributes[e].localName);if(P){let e=Pt.trim(P.value);y=e.length>0?e:null}var R,I,F=c.getAttributeNode("rel"),N=c.getAttributeNode("rev"),O=c.getAttributeNode("typeof"),L=c.getAttributeNode("property"),j=c.getAttributeNode("datatype"),M=this.inHTMLMode?c.getAttributeNode("datetime"):null,D=c.getAttributeNode("content"),U=c.getAttributeNode("about"),B=c.getAttributeNode("src"),z=c.getAttributeNode("resource"),H=c.getAttributeNode("href"),q=c.getAttributeNode("inlist"),$=[];if(F){I=this.tokenize(F.value);for(let e=0;e<I.length;e++)(R=this.parsePredicate(I[e],w,l.terms,h,n,this.inHTMLMode&&null!==L))&&$.push(R)}var W=[];if(N){I=this.tokenize(N.value);for(let e=0;e<I.length;e++)(R=this.parsePredicate(I[e],w,l.terms,h,n,this.inHTMLMode&&L))&&W.push(R)}if(this.inHTMLMode&&(F||N)&&L&&(0===$.length&&(F=null),0===W.length&&(N=null)),F||N?(U&&(p=this.parseSafeCURIEOrCURIEOrURI(U.value,h,n)),O&&(f=p),p||(c.parentNode.nodeType===Tt.DOCUMENT_NODE?p=i(c.baseURI):l.parentObject&&(p=i(c.parentNode.baseURI)===l.parentObject?i(c.baseURI):l.parentObject)),z&&(d=this.parseSafeCURIEOrCURIEOrURI(z.value,h,n)),d||(H?d=this.resolveAndNormalize(n,encodeURI(H.value)):B?d=this.resolveAndNormalize(n,encodeURI(B.value)):!O||U||this.inXHTMLMode&&("head"===c.localName||"body"===c.localName)||(d=this.newBlankNode())),!O||U||!this.inXHTMLMode||"head"!==c.localName&&"body"!==c.localName?O&&!U&&(f=d):f=p):!L||D||j?(U&&(p=this.parseSafeCURIEOrCURIEOrURI(U.value,h,n)),!p&&z&&(p=this.parseSafeCURIEOrCURIEOrURI(z.value,h,n)),!p&&H&&(p=this.resolveAndNormalize(n,encodeURI(H.value))),!p&&B&&(p=this.resolveAndNormalize(n,encodeURI(B.value))),p||(c.parentNode.nodeType===Tt.DOCUMENT_NODE?p=i(c.baseURI):!this.inXHTMLMode&&!this.inHTMLMode||"head"!==c.localName&&"body"!==c.localName?O?p=this.newBlankNode():l.parentObject&&(p=i(c.parentNode.baseURI)===l.parentObject?i(c.baseURI):l.parentObject,L||(u=!0)):p=i(c.parentNode.baseURI)===l.parentObject?i(c.baseURI):l.parentObject),O&&(f=p)):(U&&(p=this.parseSafeCURIEOrCURIEOrURI(U.value,h,n),O&&(f=p)),p||c.parentNode.nodeType!==Tt.DOCUMENT_NODE?!p&&l.parentObject&&(p=i(c.parentNode.baseURI)===l.parentObject?i(c.baseURI):l.parentObject):(p=i(c.baseURI),O&&(f=p)),O&&!f&&(z&&(f=this.parseSafeCURIEOrCURIEOrURI(z.value,h,n)),!f&&H&&(f=this.resolveAndNormalize(n,encodeURI(H.value))),!f&&B&&(f=this.resolveAndNormalize(n,encodeURI(B.value))),f||!this.inXHTMLMode&&!this.inHTMLMode||"head"!==c.localName&&"body"!==c.localName||(f=p),f||(f=this.newBlankNode()),d=f)),p&&(U||z||f)){var V=p;O&&!U&&!z&&d&&(V=d),this.newSubjectOrigin(c,V)}if(f){I=this.tokenize(O.value);for(let e=0;e<I.length;e++){var G=this.parseTermOrCURIEOrAbsURI(I[e],w,l.terms,h,n);G&&this.addTriple(c,f,Pt.typeURI,{type:Pt.objectURI,value:G})}}if(p&&p!==l.parentObject&&(v={},b=!0),d){if(F&&q)for(let e=0;e<$.length;e++){let t=v[$[e]];t||(t=[],v[$[e]]=t),t.push({type:Pt.objectURI,value:d})}else if(F)for(let e=0;e<$.length;e++)this.addTriple(c,p,$[e],{type:Pt.objectURI,value:d});if(N)for(let e=0;e<W.length;e++)this.addTriple(c,d,W[e],{type:Pt.objectURI,value:p})}else{if(p&&!d&&(F||N)&&(d=this.newBlankNode()),F&&q)for(let e=0;e<$.length;e++){let t=v[$[e]];t||(t=[],v[R]=t),g.push({predicate:$[e],list:t})}else if(F)for(let e=0;e<$.length;e++)g.push({predicate:$[e],forward:!0});if(N)for(let e=0;e<W.length;e++)g.push({predicate:W[e],forward:!1})}if(L){var K=null,J=null;j?(K=""===j.value?Pt.PlainLiteralURI:this.parseTermOrCURIEOrAbsURI(j.value,w,l.terms,h,n),J=M&&!D?M.value:K===Pt.XMLLiteralURI||K===Pt.HTMLLiteralURI?null:D?D.value:c.textContent):D?(K=Pt.PlainLiteralURI,J=D.value):M?(J=M.value,(K=Pt.deriveDateTimeType(J))||(K=Pt.PlainLiteralURI)):F||N||(z&&(J=this.parseSafeCURIEOrCURIEOrURI(z.value,h,n)),!J&&H?J=this.resolveAndNormalize(n,encodeURI(H.value)):!J&&B&&(J=this.resolveAndNormalize(n,encodeURI(B.value))),J&&(K=Pt.objectURI)),K||(O&&!U?(K=Pt.objectURI,J=f):(J=c.textContent,this.inHTMLMode&&"time"===c.localName&&(K=Pt.deriveDateTimeType(J)),K||(K=Pt.PlainLiteralURI))),I=this.tokenize(L.value);for(let e=0;e<I.length;e++){let t=this.parsePredicate(I[e],w,l.terms,h,n);if(t)if(q){let e=v[t];e||(e=[],v[t]=e),e.push(K===Pt.XMLLiteralURI||K===Pt.HTMLLiteralURI?{type:K,value:c.childNodes}:{type:K||Pt.PlainLiteralURI,value:J,language:y})}else K===Pt.XMLLiteralURI||K===Pt.HTMLLiteralURI?this.addTriple(c,p,t,{type:K,value:c.childNodes}):this.addTriple(c,p,t,{type:K||Pt.PlainLiteralURI,value:J,language:y})}}if(p&&!u)for(let e=0;e<l.incomplete.length;e++)l.incomplete[e].list?l.incomplete[e].list.push({type:Pt.objectURI,value:p}):l.incomplete[e].forward?this.addTriple(c,l.subject,l.incomplete[e].predicate,{type:Pt.objectURI,value:p}):this.addTriple(c,p,l.incomplete[e].predicate,{type:Pt.objectURI,value:l.subject});var Q=null,Y=p;u?((Q=this.push(l,l.subject)).parentObject=i(c.parentNode.baseURI)===l.parentObject?i(c.baseURI):l.parentObject,Q.incomplete=l.incomplete,Q.language=y,Q.prefixes=h,Q.vocabulary=w):((Q=this.push(l,p)).parentObject=d||p||l.subject,Q.prefixes=h,Q.incomplete=g,d&&(Y=d,v={},b=!0),Q.listMapping=v,Q.language=y,Q.vocabulary=w),b&&r.unshift({parent:c,context:l,subject:Y,listMapping:v});for(var X=c.lastChild;X;X=X.previousSibling)X.nodeType===Tt.ELEMENT_NODE&&r.unshift({current:X,context:Q})}}this.inHTMLMode&&this.copyProperties();for(let t=0;t<this.finishedHandlers.length;t++)this.finishedHandlers[t](e)}push(e,t){return{parent:e,subject:t||(e?e.subject:null),parentObject:null,incomplete:[],listMapping:e?e.listMapping:{},language:e?e.language:this.language,prefixes:e?e.prefixes:this.target.graph.prefixes,terms:e?e.terms:this.target.graph.terms,vocabulary:e?e.vocabulary:this.vocabulary}}resolveAndNormalize(e,t){return x.join(t,e)}setContext(e){"html"===e.localName&&"XHTML+RDFa 1.1"===e.getAttribute("version")?this.setXHTMLContext():"html"===e.localName||"http://www.w3.org/1999/xhtml"===e.namespaceURI?"undefined"!=typeof document&&document.doctype?"-//W3C//DTD XHTML+RDFa 1.0//EN"===document.doctype.publicId&&"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"===document.doctype.systemId?this.setHTMLContext():"-//W3C//DTD XHTML+RDFa 1.1//EN"===document.doctype.publicId&&"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd"===document.doctype.systemId?this.setXHTMLContext():this.setHTMLContext():this.setHTMLContext():this.setXMLContext()}setHTMLContext(){this.setInitialContext(),this.langAttributes=[{namespaceURI:"http://www.w3.org/XML/1998/namespace",localName:"lang"},{namespaceURI:null,localName:"lang"}],this.inXHTMLMode=!1,this.inHTMLMode=!0}setInitialContext(){this.vocabulary=null,this.langAttributes=[{namespaceURI:"http://www.w3.org/XML/1998/namespace",localName:"lang"}]}setXHTMLContext(){this.setInitialContext(),this.inXHTMLMode=!0,this.inHTMLMode=!1,this.langAttributes=[{namespaceURI:"http://www.w3.org/XML/1998/namespace",localName:"lang"},{namespaceURI:null,localName:"lang"}],this.target.graph.terms.alternate="http://www.w3.org/1999/xhtml/vocab#alternate",this.target.graph.terms.appendix="http://www.w3.org/1999/xhtml/vocab#appendix",this.target.graph.terms.bookmark="http://www.w3.org/1999/xhtml/vocab#bookmark",this.target.graph.terms.cite="http://www.w3.org/1999/xhtml/vocab#cite",this.target.graph.terms.chapter="http://www.w3.org/1999/xhtml/vocab#chapter",this.target.graph.terms.contents="http://www.w3.org/1999/xhtml/vocab#contents",this.target.graph.terms.copyright="http://www.w3.org/1999/xhtml/vocab#copyright",this.target.graph.terms.first="http://www.w3.org/1999/xhtml/vocab#first",this.target.graph.terms.glossary="http://www.w3.org/1999/xhtml/vocab#glossary",this.target.graph.terms.help="http://www.w3.org/1999/xhtml/vocab#help",this.target.graph.terms.icon="http://www.w3.org/1999/xhtml/vocab#icon",this.target.graph.terms.index="http://www.w3.org/1999/xhtml/vocab#index",this.target.graph.terms.last="http://www.w3.org/1999/xhtml/vocab#last",this.target.graph.terms.license="http://www.w3.org/1999/xhtml/vocab#license",this.target.graph.terms.meta="http://www.w3.org/1999/xhtml/vocab#meta",this.target.graph.terms.next="http://www.w3.org/1999/xhtml/vocab#next",this.target.graph.terms.prev="http://www.w3.org/1999/xhtml/vocab#prev",this.target.graph.terms.previous="http://www.w3.org/1999/xhtml/vocab#previous",this.target.graph.terms.section="http://www.w3.org/1999/xhtml/vocab#section",this.target.graph.terms.stylesheet="http://www.w3.org/1999/xhtml/vocab#stylesheet",this.target.graph.terms.subsection="http://www.w3.org/1999/xhtml/vocab#subsection",this.target.graph.terms.start="http://www.w3.org/1999/xhtml/vocab#start",this.target.graph.terms.top="http://www.w3.org/1999/xhtml/vocab#top",this.target.graph.terms.up="http://www.w3.org/1999/xhtml/vocab#up",this.target.graph.terms.p3pv1="http://www.w3.org/1999/xhtml/vocab#p3pv1",this.target.graph.terms.related="http://www.w3.org/1999/xhtml/vocab#related",this.target.graph.terms.role="http://www.w3.org/1999/xhtml/vocab#role",this.target.graph.terms.transformation="http://www.w3.org/1999/xhtml/vocab#transformation"}setXMLContext(){this.setInitialContext(),this.inXHTMLMode=!1,this.inHTMLMode=!1}tokenize(e){return this.trim(e).split(/\s+/)}static tokenize(e){return this.trim(e).split(/\s+/)}toRDFNodeObject(e){if(void 0!==e){if("string"==typeof e)return"_:"===e.substring(0,2)?(void 0===this.blankNodes[e.substring(2)]&&(this.blankNodes[e.substring(2)]=new c(e.substring(2))),this.blankNodes[e.substring(2)]):S.namedNode(e);switch(e.type){case Pt.objectURI:return"_:"===e.value.substring(0,2)?(void 0===this.blankNodes[e.value.substring(2)]&&(this.blankNodes[e.value.substring(2)]=new c(e.value.substring(2))),this.blankNodes[e.value.substring(2)]):S.namedNode(e.value);case Pt.PlainLiteralURI:return new d(e.value,e.language||"");case Pt.XMLLiteralURI:case Pt.HTMLLiteralURI:var t="";return Object.keys(e.value).forEach(n=>{t+=F.domToString(e.value[n],this.htmlOptions)}),new d(t,"",new l.A(e.type));default:return new d(e.value,"",new l.A(e.type))}}}trim(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}static trim(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}}Pt.XMLLiteralURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral",Pt.HTMLLiteralURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML",Pt.PlainLiteralURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral",Pt.objectURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#object",Pt.typeURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",Pt.nameChar="[-A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�က0-F.0-9·̀-ͯ‿-⁀]",Pt.nameStartChar="[A-Za-zÀ-ÖØ-öø-ÿĀ-ıĴ-ľŁ-ňŊ-žƀ-ǃǍ-ǰǴ-ǵǺ-ȗɐ-ʨʻ-ˁΆΈ-ΊΌΎ-ΡΣ-ώϐ-ϖϚϜϞϠϢ-ϳЁ-ЌЎ-яё-ќў-ҁҐ-ӄӇ-ӈӋ-ӌӐ-ӫӮ-ӵӸ-ӹԱ-Ֆՙա-ֆא-תװ-ײء-غف-يٱ-ڷں-ھۀ-ێې-ۓەۥ-ۦअ-हऽक़-ॡঅ-ঌএ-ঐও-নপ-রলশ-হড়-ঢ়য়-ৡৰ-ৱਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઋઍએ-ઑઓ-નપ-રલ-ળવ-હઽૠଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଶ-ହଽଡ଼-ଢ଼ୟ-ୡஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-வஷ-ஹఅ-ఌఎ-ఐఒ-నప-ళవ-హౠ-ౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹೞೠ-ೡഅ-ഌഎ-ഐഒ-നപ-ഹൠ-ൡก-ฮะา-ำเ-ๅກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ຮະາ-ຳຽເ-ໄཀ-ཇཉ-ཀྵႠ-Ⴥა-ჶᄀᄂ-ᄃᄅ-ᄇᄉᄋ-ᄌᄎ-ᄒᄼᄾᅀᅌᅎᅐᅔ-ᅕᅙᅟ-ᅡᅣᅥᅧᅩᅭ-ᅮᅲ-ᅳᅵᆞᆨᆫᆮ-ᆯᆷ-ᆸᆺᆼ-ᇂᇫᇰᇹḀ-ẛẠ-ỹἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼΩK-Å℮ↀ-ↂぁ-ゔァ-ヺㄅ-ㄬ가-힣一-龥〇〡-〩_]",Pt.NCNAME=new RegExp("^"+Pt.nameStartChar+Pt.nameChar+"*$"),Pt.dateTimeTypes=[{pattern:/-?P(?:[0-9]+Y)?(?:[0-9]+M)?(?:[0-9]+D)?(?:T(?:[0-9]+H)?(?:[0-9]+M)?(?:[0-9]+(?:\.[0-9]+)?S)?)?/,type:"http://www.w3.org/2001/XMLSchema#duration"},{pattern:/-?(?:[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9])-[0-9][0-9]-[0-9][0-9]T(?:[0-1][0-9]|2[0-4]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]+)?(?:Z|[+\-][0-9][0-9]:[0-9][0-9])?/,type:"http://www.w3.org/2001/XMLSchema#dateTime"},{pattern:/-?(?:[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9])-[0-9][0-9]-[0-9][0-9](?:Z|[+\-][0-9][0-9]:[0-9][0-9])?/,type:"http://www.w3.org/2001/XMLSchema#date"},{pattern:/(?:[0-1][0-9]|2[0-4]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]+)?(?:Z|[+\-][0-9][0-9]:[0-9][0-9])?/,type:"http://www.w3.org/2001/XMLSchema#time"},{pattern:/-?(?:[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9])-[0-9][0-9]/,type:"http://www.w3.org/2001/XMLSchema#gYearMonth"},{pattern:/-?[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9]/,type:"http://www.w3.org/2001/XMLSchema#gYear"}];const Rt=Pt.parseRDFaDOM;class It{constructor(e){this.store=e,this.bnodes={},this.why=null,this.reify=!1}frameFactory(e,t,n){return{NODE:1,ARC:2,parent:t,parser:e,store:e.store,element:n,lastChild:0,base:null,lang:null,node:null,nodeType:null,listIndex:1,rdfid:null,datatype:null,collection:!1,terminateFrame:function(){this.collection&&this.node.close()},addSymbol:function(e,t){t=x.join(t,this.base),this.node=this.store.sym(t),this.nodeType=e},loadTriple:function(){if(this.parent.parent.collection?this.parent.parent.node.append(this.node):this.store.add(this.parent.parent.node,this.parent.node,this.node,this.parser.why),null!=this.parent.rdfid){var e=this.store.sym(x.join("#"+this.parent.rdfid,this.base));this.store.add(e,this.store.sym(It.ns.RDF+"type"),this.store.sym(It.ns.RDF+"Statement"),this.parser.why),this.store.add(e,this.store.sym(It.ns.RDF+"subject"),this.parent.parent.node,this.parser.why),this.store.add(e,this.store.sym(It.ns.RDF+"predicate"),this.parent.node,this.parser.why),this.store.add(e,this.store.sym(It.ns.RDF+"object"),this.node,this.parser.why)}},isTripleToLoad:function(){return null!=this.parent&&null!=this.parent.parent&&this.nodeType===this.NODE&&this.parent.nodeType===this.ARC&&this.parent.parent.nodeType===this.NODE},addNode:function(e){this.addSymbol(this.NODE,e),this.isTripleToLoad()&&this.loadTriple()},addCollection:function(){this.nodeType=this.NODE,this.node=this.store.collection(),this.collection=!0,this.isTripleToLoad()&&this.loadTriple()},addCollectionArc:function(){this.nodeType=this.ARC},addBNode:function(e){null!=e?null!=this.parser.bnodes[e]?this.node=this.parser.bnodes[e]:this.node=this.parser.bnodes[e]=this.store.bnode():this.node=this.store.bnode(),this.nodeType=this.NODE,this.isTripleToLoad()&&this.loadTriple()},addArc:function(e){e===It.ns.RDF+"li"&&(e=It.ns.RDF+"_"+this.parent.listIndex,this.parent.listIndex++),this.addSymbol(this.ARC,e)},addLiteral:function(e){this.parent.datatype&&this.parent.datatype!==It.ns.RDF+"langString"?this.node=this.store.literal(e,this.store.sym(this.parent.datatype)):this.node=this.store.literal(e,this.lang),this.nodeType=this.NODE,this.isTripleToLoad()&&this.loadTriple()}}}getAttributeNodeNS(e,t,n){var r=null;if(e.getAttributeNodeNS)r=e.getAttributeNodeNS(t,n);else for(var i,a=e.attributes,o=0;o<a.length;++o)if((i=a[o]).namespaceURI===t&&(i.prefix?i.prefix+":"+n:n)===i.nodeName){r=i;break}return r}parse(e,t,n){var r,i=e.childNodes;if(this.cleanParser(),e.nodeType===It.nodeType.DOCUMENT){for(var a=0;a<i.length;a++)if(i[a].nodeType===It.nodeType.ELEMENT){r=i[a];break}}else{if(e.nodeType!==It.nodeType.ELEMENT)throw new Error("RDFParser: can't find root in "+t+". Halting. ");r=e}this.why=n;var o=this.frameFactory(this);return this.base=t,o.base=t,o.lang=null,this.parseDOM(this.buildFrame(o,r)),!0}parseDOM(e){for(var t,n=function(e){var t="";if(null==e.namespaceURI)throw new Error("RDF/XML syntax error: No namespace for "+e.localName+" in "+this.base);return e.namespaceURI&&(t+=e.namespaceURI),e.localName?t+=e.localName:e.nodeName&&(e.nodeName.indexOf(":")>=0?t+=e.nodeName.split(":")[1]:t+=e.nodeName),t}.bind(this),r=!0;e.parent;){var i=e.element,a=i.attributes;if(i.nodeType===It.nodeType.TEXT||i.nodeType===It.nodeType.CDATA_SECTION)e.parent.nodeType===e.NODE&&(e.addArc(It.ns.RDF+"value"),e=this.buildFrame(e)),e.addLiteral(i.nodeValue);else if(n(i)!==It.ns.RDF+"RDF")if(e.parent&&e.parent.collection&&(e.addCollectionArc(),(e=this.buildFrame(e,e.element)).parent.element=null),e.parent&&e.parent.nodeType&&e.parent.nodeType!==e.ARC){e.addArc(n(i)),this.reify&&(t=this.getAttributeNodeNS(i,It.ns.RDF,"ID"))&&(e.rdfid=t.nodeValue,i.removeAttributeNode(t));var o=this.getAttributeNodeNS(i,It.ns.RDF,"parseType"),s=this.getAttributeNodeNS(i,It.ns.RDF,"datatype");if(s&&(e.datatype=s.nodeValue,i.removeAttributeNode(s)),o){var c=o.nodeValue;"Literal"===c?(e.datatype=It.ns.RDF+"XMLLiteral",(e=this.buildFrame(e)).addLiteral(i.innerHTML||i.childNodes),r=!1):"Resource"===c?((e=this.buildFrame(e,e.element)).parent.element=null,e.addBNode()):"Collection"===c&&((e=this.buildFrame(e,e.element)).parent.element=null,e.addCollection()),i.removeAttributeNode(o)}if(0!==a.length){var l=this.getAttributeNodeNS(i,It.ns.RDF,"resource"),u=this.getAttributeNodeNS(i,It.ns.RDF,"nodeID");e=this.buildFrame(e),l?(e.addNode(l.nodeValue),i.removeAttributeNode(l)):u?(e.addBNode(u.nodeValue),i.removeAttributeNode(u)):e.addBNode();for(var p=a.length-1;p>=0;p--){var d=this.buildFrame(e);d.addArc(n(a[p])),n(a[p])===It.ns.RDF+"type"?this.buildFrame(d).addNode(a[p].nodeValue):this.buildFrame(d).addLiteral(a[p].nodeValue)}}else 0===i.childNodes.length&&this.buildFrame(e).addLiteral("")}else{var f=this.getAttributeNodeNS(i,It.ns.RDF,"about");if(t=this.getAttributeNodeNS(i,It.ns.RDF,"ID"),f&&t)throw new Error("RDFParser: "+i.nodeName+" has both rdf:id and rdf:about. Halting. Only one of these properties may be specified on a node.");if(!f&&t)e.addNode("#"+t.nodeValue),i.removeAttributeNode(t);else if(null==f&&null==t){var h=this.getAttributeNodeNS(i,It.ns.RDF,"nodeID");h?(e.addBNode(h.nodeValue),i.removeAttributeNode(h)):e.addBNode()}else e.addNode(f.nodeValue),i.removeAttributeNode(f);var m=this.getAttributeNodeNS(i,It.ns.RDF,"type");It.ns.RDF+"Description"!==n(i)&&(m={nodeValue:n(i)}),null!=m&&(this.store.add(e.node,this.store.sym(It.ns.RDF+"type"),this.store.sym(x.join(m.nodeValue,e.base)),this.why),m.nodeName&&i.removeAttributeNode(m));for(var g=a.length-1;g>=0;g--)this.store.add(e.node,this.store.sym(n(a[g])),this.store.literal(a[g].nodeValue,e.lang),this.why)}for(i=e.element;e.parent;){for(var v=e;null==i;)i=(e=e.parent).element;var b=i.childNodes&&i.childNodes[e.lastChild];if(b&&r){if((b.nodeType===It.nodeType.ELEMENT||b.nodeType===It.nodeType.TEXT||b.nodeType===It.nodeType.CDATA_SECTION)&&(b.nodeType!==It.nodeType.TEXT&&b.nodeType!==It.nodeType.CDATA_SECTION||1===i.childNodes.length)){e.lastChild++,e=this.buildFrame(v,i.childNodes[e.lastChild-1]);break}e.lastChild++}else{if(e.terminateFrame(),!(e=e.parent))break;i=e.element,r=!0}}}}cleanParser(){this.bnodes={},this.why=null}buildFrame(e,t){var n=this.frameFactory(this,e,t);if(e&&(n.base=e.base,n.lang=e.lang),!t||t.nodeType===It.nodeType.TEXT||t.nodeType===It.nodeType.CDATA_SECTION)return n;var r=t.attributes,i=t.getAttributeNode("xml:base");null!=i&&(n.base=i.nodeValue,t.removeAttribute("xml:base"));var a=t.getAttributeNode("xml:lang");null!=a&&(n.lang=a.nodeValue,t.removeAttribute("xml:lang"));for(var o=r.length-1;o>=0;o--)if("xml"===r[o].nodeName.substr(0,3)){if("xmlns:"===r[o].name.slice(0,6)){var s=r[o].nodeValue;this.base&&(s=x.join(s,this.base)),this.store.setPrefixForURI(r[o].name.slice(6),s)}t.removeAttributeNode(r[o])}return n}}function Ft(e,t,n){var r,i,a,o=["INSERT","DELETE","WHERE"],s=T("http://www.w3.org/ns/pim/patch#"),c=_e(t,t,n,n,null,null,"",null),l={},u=function(e,t,n,r,i){return"Line "+(t+1)+" of <"+e+">: Bad syntax:\n "+i+'\n at: "'+n.slice(r,r+30)+'"'};r=0;var p=t.sym(n+"#query");for(l.query=p;;){if((i=c.skipSpace(e,r))<0)return l;if(";"===e[i]){if((r=c.skipSpace(e,i+1))<0)return l;i=r}var d=!1;for(a=0;a<o.length;a++){var f=o[a];if(e.slice(i,i+f.length)===f){if((r=c.skipSpace(e,i+f.length))<0)throw u(c._thisDoc,c.lines,e,i+f.length,"found EOF, needed {...} after "+f);if(("INSERT"===f||"DELETE"===f)&&"DATA"===e.slice(r,r+4)){if((i=c.skipSpace(e,r+4))<0)throw u(c._thisDoc,c.lines,e,r+4,"needed {...} after INSERT DATA "+f);r=i}var h=[];if((i=c.node(e,r,h))<0)throw u(c._thisDoc,c.lines,e,r,"bad syntax or EOF in {...} after "+f);l[f.toLowerCase()]=h[0],t.add(p,s(f.toLowerCase()),h[0]),d=!0,r=i}}if(!d&&"@prefix"===e.slice(i,i+7)){if((r=c.directive(e,i))<0)throw u(c._thisDoc,c.lines,e,r,"bad syntax or EOF after @prefix ");r=c.checkDot(e,r),d=!0}if(!d)throw u(c._thisDoc,c.lines,e,i,"Unknown syntax at start of statememt: '"+e.slice(i).slice(0,20)+"'")}}function Nt(e,t,n,r="text/turtle",i){r=(r=r||s.sT).split(";")[0];try{if(r===s.ny||r===s.sT)_e(t,t,n,n,null,null,"",null).loadBuf(e),o();else if(r===s.JG){new It(t).parse(F.parseXML(e),n,t.sym(n)),o()}else if(r===s.H)Rt(F.parseXML(e,{contentType:s.H}),t,n),o();else if(r===s.lc)Rt(F.parseXML(e,{contentType:s.lc}),t,n),o();else if(r===s.K9||r===s.Fn)Ft(e,t,n),o();else if(r===s.i2)Re(e,t,n).then(o).catch(c);else{if(r!==s._0&&r!==s.BR)throw void 0===r?new Error("contentType is undefined"):new Error("Don't know how to parse "+r+" yet");var a=new ft({factory:Te});!function(e,n){e&&i(e,t);try{a.parse(n,l)}catch(e){i(e,t)}}(null,e)}}catch(e){c(e)}function o(){i&&i(null,t)}function c(e){if(r!==s.i2||r!==s._0||r!==s.BR){if(!i){let t=new Error(e+" while trying to parse <"+n+"> as "+r);throw t.cause=e,t}i(e,t)}}function l(e,n){n?t.add(n.subject,n.predicate,n.object,n.graph):i(e,t)}Nt.handled={"text/n3":!0,"text/turtle":!0,"application/rdf+xml":!0,"application/xhtml+xml":!0,"text/html":!0,"application/sparql-update":!0,"application/sparql-update-single-match":!0,"application/ld+json":!0,"application/nquads":!0,"application/n-quads":!0}}(0,i.A)(It,"ns",{RDF:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",RDFS:"http://www.w3.org/2000/01/rdf-schema#"}),(0,i.A)(It,"nodeType",{ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12});var Ot=n(4945),Lt=n.n(Ot),jt=n(2931);const Mt={"text/n3":!0,"text/turtle":!0,"application/rdf+xml":!0,"application/xhtml+xml":!0,"text/html":!0,"application/ld+json":!0},Dt={rdf:s.JG,owl:s.JG,n3:"text/n3",ttl:"text/turtle",nt:"text/n3",acl:"text/n3",html:"text/html",xml:"text/xml"},Ut=e=>({link:T("http://www.w3.org/2007/ont/link#",e),http:T("http://www.w3.org/2007/ont/http#",e),httph:T("http://www.w3.org/2007/ont/httph#",e),rdf:T("http://www.w3.org/1999/02/22-rdf-syntax-ns#",e),rdfs:T("http://www.w3.org/2000/01/rdf-schema#",e),dc:T("http://purl.org/dc/elements/1.1/",e),ldp:T("http://www.w3.org/ns/ldp#",e)}),Bt=Ut();class zt{constructor(e,t){(0,i.A)(this,"response",void 0),(0,i.A)(this,"dom",void 0),this.response=e,this.dom=t}}(0,i.A)(zt,"pattern",void 0);class Ht extends zt{static toString(){return"RDFXMLHandler"}static register(e){e.mediatypes[s.JG]={q:.9}}parse(e,t,n){let r=e.store;this.dom||(this.dom=F.parseXML(t));let i=this.dom.documentElement;if(i&&"parsererror"===i.nodeName)return e.failFetch(n,"Badly formed XML in "+n.resource.value,"parse_error");let a=new It(r);try{a.parse(this.dom,n.original.value,n.original)}catch(t){return e.failFetch(n,"Syntax error parsing RDF/XML! "+t,"parse_error")}return n.noMeta||r.add(n.original,Bt.rdf("type"),Bt.link("RDFDocument"),e.appNode),e.doneFetch(n,this.response)}}Ht.pattern=new RegExp("application/rdf\\+xml");class qt extends zt{static toString(){return"XHTMLHandler"}static register(e){e.mediatypes[s.H]={q:.8}}parse(e,t,n){let r,i;this.dom||(this.dom=F.parseXML(t));let a=e.store,o=this.dom.getElementsByTagName("title");o.length>0&&a.add(n.resource,Bt.dc("title"),a.rdfFactory.literal(o[0].textContent),n.resource);let s=this.dom.getElementsByTagName("link");for(let t=s.length-1;t>=0;t--)r=s[t].getAttribute("rel"),i=!1,r||(r=s[t].getAttribute("rev"),i=!0),r&&e.linkData(n.original,r,s[t].getAttribute("href"),n.resource,i);let c=this.dom.getElementsByTagName("script");for(let e=0;e<c.length;e++){let t=c[e].getAttribute("type");Mt[t]&&(Nt(c[e].textContent,a,n.original.value,t),Nt(c[e].textContent,a,n.original.value,t))}if(n.noMeta||a.add(n.resource,Bt.rdf("type"),Bt.link("WebPage"),e.appNode),!n.noRDFa&&Rt)try{Rt(this.dom,a,n.original.value)}catch(t){let r="Error trying to parse "+n.resource+" as RDFa:\n"+t+":\n"+t.stack;return e.failFetch(n,r,"parse_error")}return e.doneFetch(n,this.response)}}qt.pattern=new RegExp("application/xhtml");class $t extends zt{static toString(){return"XMLHandler"}static register(e){e.mediatypes["text/xml"]={q:.5},e.mediatypes["application/xml"]={q:.5}}static isElement(e){return e.nodeType===Node.ELEMENT_NODE}parse(e,t,n){let r=F.parseXML(t);for(let i=0;i<r.childNodes.length;i++){const a=r.childNodes[i];if($t.isElement(a)){let i=a.namespaceURI;if(i&&i===i.rdf){return e.addStatus(n.req,"Has XML root element in the RDF namespace, so assume RDF/XML."),new Ht(this.response,r).parse(e,t,n)}break}}if(r.doctype&&"html"===r.doctype.name&&r.doctype.publicId.match(/^-\/\/W3C\/\/DTD XHTML/)&&r.doctype.systemId.match(/http:\/\/www.w3.org\/TR\/xhtml/)){return e.addStatus(n.req,"Has XHTML DOCTYPE. Switching to XHTML Handler.\n"),new qt(this.response,r).parse(e,t,n)}let i=r.getElementsByTagName("html")[0];if(i){let a=i.getAttribute("xmlns");if(a&&a.match(/^http:\/\/www.w3.org\/1999\/xhtml/)){return e.addStatus(n.req,"Has a default namespace for XHTML. Switching to XHTMLHandler.\n"),new qt(this.response,r).parse(e,t,n)}}return e.failFetch(n,"Unsupported dialect of XML: not RDF or XHTML namespace, etc.\n"+t.slice(0,80),901)}}$t.pattern=new RegExp("(text|application)/(.*)xml");class Wt extends zt{static toString(){return"HTMLHandler"}static register(e){e.mediatypes["text/html"]={q:.8}}parse(e,t,n){let r=e.store;if(Qt(t)){return e.addStatus(n.req,"Has an XML declaration. We'll assume it's XHTML as the content-type was text/html.\n"),new qt(this.response).parse(e,t,n)}if(function(e){const t=e.indexOf("<!DOCTYPE html"),n=e.indexOf(">");if(-1===t||-1===n||t>n)return!1;return-1!==e.substr(t,n-t).indexOf("XHTML")}(t)){return e.addStatus(n.req,"Has XHTML DOCTYPE. Switching to XHTMLHandler.\n"),new qt(this.response).parse(e,t,n)}if(function(e){const t=e.match(/[^(<html)]*<html\s+[^<]*xmlns=['"]http:\/\/www.w3.org\/1999\/xhtml["'][^<]*>/);return!!t}(t)){return e.addStatus(n.req,"Has default namespace for XHTML, so switching to XHTMLHandler.\n"),new qt(this.response).parse(e,t,n)}let i=new RegExp("<title>([\\s\\S]+?)</title>","im").exec(t);return i&&r.add(n.resource,Bt.dc("title"),r.rdfFactory.literal(i[1]),n.resource),r.add(n.resource,Bt.rdf("type"),Bt.link("WebPage"),e.appNode),e.addStatus(n.req,"non-XML HTML document, not parsed for data."),e.doneFetch(n,this.response)}}Wt.pattern=new RegExp("text/html");class Vt extends zt{static toString(){return"JsonLdHandler"}static register(e){e.mediatypes["application/ld+json"]={q:.9}}async parse(e,t,n,r){const i=e.store;try{return await Re(t,i,n.original.value),e.store.add(n.original,Bt.rdf("type"),Bt.link("RDFDocument"),e.appNode),e.doneFetch(n,r)}catch(t){const i="Error trying to parse "+n.resource+" as JSON-LD:\n"+t;return e.failFetch(n,i,"parse_error",r)}}}Vt.pattern=/application\/(ld\+json|activity\+json)/;class Gt extends zt{static toString(){return"TextHandler"}static register(e){e.mediatypes["text/plain"]={q:.5}}parse(e,t,n){if(Qt(t)){return e.addStatus(n.req,"Warning: "+n.resource+" has an XML declaration. We'll assume it's XML but its content-type wasn't XML.\n"),new $t(this.response).parse(e,t,n)}if(t.slice(0,500).match(/xmlns:/)){return e.addStatus(n.req,"May have an XML namespace. We'll assume it's XML but its content-type wasn't XML.\n"),new $t(this.response).parse(e,t,n)}return e.addStatus(n.req,"Plain text document, no known RDF semantics."),e.doneFetch(n,this.response)}}Gt.pattern=new RegExp("text/plain");class Kt extends zt{static toString(){return"N3Handler"}static register(e){e.mediatypes["text/n3"]={},e.mediatypes["text/turtle"]={}}parse(e,t,n,r){let i=e.store,a=_e(i,i,n.original.value,n.original.value,null,null,"",null);try{a.loadBuf(t)}catch(t){let i="Error trying to parse "+n.resource+" as Notation3:\n"+t;return e.failFetch(n,i,"parse_error",r)}return e.addStatus(n.req,"N3 parsed: "+a.statementCount+" triples in "+a.lines+" lines."),e.store.add(n.original,Bt.rdf("type"),Bt.link("RDFDocument"),e.appNode),e.doneFetch(n,this.response)}}Kt.pattern=new RegExp("(application|text)/(x-)?(rdf\\+)?(n3|turtle)");const Jt={RDFXMLHandler:Ht,XHTMLHandler:qt,XMLHandler:$t,HTMLHandler:Wt,TextHandler:Gt,N3Handler:Kt,JsonLdHandler:Vt};function Qt(e){return!!e.match(/\s*<\?xml\s+version\s*=[^<>]+\?>/)}class Yt{constructor(e,t={}){(0,i.A)(this,"store",void 0),(0,i.A)(this,"timeout",void 0),(0,i.A)(this,"_fetch",void 0),(0,i.A)(this,"mediatypes",void 0),(0,i.A)(this,"appNode",void 0),(0,i.A)(this,"requested",void 0),(0,i.A)(this,"timeouts",void 0),(0,i.A)(this,"redirectedTo",void 0),(0,i.A)(this,"fetchQueue",void 0),(0,i.A)(this,"fetchCallbacks",void 0),(0,i.A)(this,"nonexistent",void 0),(0,i.A)(this,"lookedUp",void 0),(0,i.A)(this,"handlers",void 0),(0,i.A)(this,"ns",void 0),(0,i.A)(this,"fireCallbacks",void 0),this.store=e||new X,this.ns=Ut(this.store.rdfFactory),this.timeout=t.timeout||3e4;let r=t.fetch||void 0!==n.g&&(n.g.solidFetcher||n.g.solidFetch)||"undefined"!=typeof window&&(window.solidFetcher||window.solidFetch)||Lt();if(!r)throw new Error("No _fetch function available for Fetcher");"undefined"!=typeof window&&r===window.fetch?this._fetch=r.bind(window):void 0!==n.g&&r===n.g.fetch?this._fetch=r.bind(n.g):this._fetch=r,this.appNode=this.store.sym("chrome://TheCurrentSession"),this.store.fetcher=this,this.requested={},this.timeouts={},this.redirectedTo={},this.fetchQueue={},this.fetchCallbacks={},this.nonexistent={},this.lookedUp={},this.handlers=[],this.mediatypes={"image/*":{q:.9},"*/*":{q:.1}},F.callbackify(this,["request","fail","refresh","retract","done"]),Object.keys(t.handlers||Jt).map(e=>this.addHandler(Jt[e]))}static crossSiteProxy(e){return Yt.crossSiteProxyTemplate?Yt.crossSiteProxyTemplate.replace("{uri}",encodeURIComponent(e)):void 0}static offlineOverride(e){let t=e;var n;return"undefined"!=typeof window&&window.panes&&(n=window.panes.UI)&&n.preferences&&n.preferences.get("offlineModeUsingLocalhost")&&"http://"===t.slice(0,7)&&"localhost/"!==t.slice(7,17)&&(t="http://localhost/"+t.slice(7),A.A.warn("Localhost kludge for offline use: actually getting <"+t+">")),t}static proxyIfNecessary(e){var t;if("undefined"!=typeof window&&window.panes&&(t=window.panes.UI)&&t.isExtension)return e;if("undefined"!=typeof $SolidTestEnvironment&&$SolidTestEnvironment.localSiteMap){let t=e.split("/").slice(2);const n=(e,t)=>{let r=t[e.shift()];return r?"string"==typeof r?r+e.join("/"):e?n(e,r):null:null},r=n(t,$SolidTestEnvironment.localSiteMap);if(r)return r}return Yt.crossSiteProxyTemplate&&"undefined"!=typeof document&&document.location&&"https:"===(""+document.location).slice(0,6)&&"http:"===e.slice(0,5)?Yt.crossSiteProxyTemplate.replace("{uri}",encodeURIComponent(e)):e}static unsupportedProtocol(e){let t=x.protocol(e);return"tel"===t||"mailto"===t||"urn"===t}static setCredentials(e,t={}){void 0===t.credentials&&(void 0!==t.withCredentials?t.credentials=t.withCredentials?"include":"omit":t.credentials="include")}load(e,t={}){if(t=Object.assign({},t),e instanceof Array)return Promise.all(e.map(e=>this.load(e,Object.assign({},t))));const n=e;let r=(0,jt.E)(n);r=r.split("#")[0],t=this.initFetchOptions(r,t);const i=this.appNode,a=this.store,o=a.statementsMatching(void 0,this.ns.link("requestedURI"),a.sym(r),i).map(e=>e.subject);for(const e of o){const n=a.any(e,this.ns.link("response"),null,i);if(null!=n){const e=a.statementsMatching(n,this.ns.link("outOfDate"),!0,i);a.remove(e),t.force=!0,t.clearPreviousData=!0}}const s=this.initFetchOptions(r,t);return this.pendingFetchPromise(r,s.baseURI,s)}async pendingFetchPromise(e,t,n){let r;return!n.force&&await this.fetchQueue[t]?r=this.fetchQueue[t]:(r=Promise.race([this.setRequestTimeout(e,n),this.fetchUri(e,n)]),this.fetchQueue[t]=r,this.cleanupFetchRequest(t,void 0,this.timeout)),r.then(t=>(e in this.timeouts&&(this.timeouts[e].forEach(clearTimeout),delete this.timeouts[e]),t))}cleanupFetchRequest(e,t,n){this.timeouts[e]=(this.timeouts[e]||[]).concat(setTimeout(()=>{this.isPending(e)||delete this.fetchQueue[e]},n))}initFetchOptions(e,t){let n=this.store;!t.method||"GET"===t.method.toUpperCase()||(t.force=!0),t.resource=n.rdfFactory.namedNode(e),t.baseURI=t.baseURI||e,t.original=n.rdfFactory.namedNode(t.baseURI),t.req=n.bnode(),t.headers=t.headers||{},t.contentType&&(t.headers["content-type"]=t.contentType),t.force&&(t.cache="no-cache");let r=this.acceptString();t.headers.accept=r;let i=Yt.offlineOverride(e);t.requestedURI=i,Yt.setCredentials(i,t);let a=Yt.proxyIfNecessary(i);return i!==a&&(t.proxyUsed=!0),t.actualProxyURI=a,t}fetchUri(e,t){if(!e)return Promise.reject(new Error("Cannot fetch an empty uri"));if(Yt.unsupportedProtocol(e))return this.failFetch(t,"fetcher: Unsupported protocol","unsupported_protocol");let n=this.getState(e);if(t.force)delete this.nonexistent[e];else{if("fetched"===n)return Promise.resolve(this.doneFetch(t,{status:200,ok:!0,statusText:"Already loaded into quadstore."}));if("failed"===n&&404===this.requested[e]){let n="Previously failed: "+this.requested[e],r={url:e,status:this.requested[e],statusText:n,responseText:n,headers:new Ot.Headers,ok:!1,body:null,bodyUsed:!1,size:0,timeout:0};return this.failFetch(t,n,this.requested[e],r)}}this.fireCallbacks("request",[e]),this.requested[e]=!0,t.noMeta||this.saveRequestMetadata(e,t);let{actualProxyURI:r}=t;return this._fetch(r,t).then(n=>this.handleResponse(n,e,t),n=>{let i={url:r,status:999,statusText:(n.name||"network failure")+": "+(n.errno||n.code||n.type),responseText:n.message,headers:new Ot.Headers,ok:!1,body:null,bodyUsed:!1,size:0,timeout:0};return this.handleError(i,e,t)})}nowOrWhenFetched(e,t,n,r={}){const i=(0,jt.E)(e);"function"==typeof t?n=t:void 0===t||((0,u.Y2)(t)?r.referringTerm=t:r=t),this.load(i,r).then(e=>{if(n)if(e)if(e.ok)n(!0,"OK",e);else{let t="HTTP error: Status "+e.status+" ("+e.statusText+")";e.responseText&&(t+=" "+e.responseText),n(!1,t,e)}else{n(!1,"@@ nowOrWhenFetched: no response object!")}},function(e){var t=e.message||e.statusText;t="Failed to load <"+i+"> "+t,e.response&&e.response.status&&(t+=" status: "+e.response.status),n(!1,t,e.response)})}addStatus(e,t){let n=new Date;t="["+n.getHours()+":"+n.getMinutes()+":"+n.getSeconds()+"."+n.getMilliseconds()+"] "+t;let r=this.store;const i=r.the(e,this.ns.link("status"));(0,u.P3)(i)?i.append(r.rdfFactory.literal(t)):A.A.warn("web.js: No list to add to: "+i+","+t)}failFetch(e,t,n,r){this.addStatus(e.req,t),e.noMeta||this.store.add(e.original,this.ns.link("error"),this.store.rdfFactory.literal(t));let i=(e.method||"GET").toUpperCase();("GET"===i||"HEAD"===i)&&(e.resource.equals(e.original),this.requested[x.docpart(e.original.value)]=n,this.fireCallbacks("fail",[e.original.value,t]));var a=new Error("Fetcher: "+t);return a.status=n,a.statusText=t,a.response=r,Promise.reject(a)}linkData(e,t,n,r,i){if(!n)return;let a,o=this.store,s=o.rdfFactory.namedNode(x.join(n,e.value));if("alternate"===t||"seeAlso"===t||"meta"===t||"describedby"===t){if(s.value===e.value)return;a=this.ns.rdfs("seeAlso")}else a="type"===t?o.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"):o.rdfFactory.namedNode(x.join(encodeURIComponent(t),"http://www.iana.org/assignments/link-relations/"));i?o.add(s,a,e,r):o.add(e,a,s,r)}parseLinkHeader(e,t,n){if(!e)return;const r=/[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*"))/g,i=e.match(/<[^>]*>\s*(\s*;\s*[^()<>@,;:"/[\]?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*")))*(,|$)/g);if(null!=i)for(let e=0;e<i.length;e++){let a=i[e].split(">"),o=a[0].substring(1),s=a[1].match(r);if(null==s)return;for(let e=0;e<s.length;e++){let r=s[e].split("=")[1].replace(/["']/g,"");this.linkData(t,r,o,n)}}}doneFetch(e,t){return this.addStatus(e.req,"Done."),this.requested[e.original.value]="done",this.fireCallbacks("done",[e.original.value]),t.req=e.req,t}nowKnownAs(e,t){this.lookedUp[e.value]?this.lookedUp[t.value]||this.lookUpThing(t,e):this.lookedUp[t.value]&&(this.lookedUp[e.value]||this.lookUpThing(e,t))}putBack(e,t={}){const n=(0,jt.E)(e);let r=new l.A(n).doc();return t.contentType=t["content-type"]||t["Content-Type"]||t.contentType||s.sT,"application/ld+json"===t.contentType?new Promise((n,i)=>{j(r,this.store,r.uri,t.contentType,(r,a)=>{r?i(r):(t.data=a,this.webOperation("PUT",e,t).then(e=>n(e)).catch(e=>i(e)))})}):(t.data=j(r,this.store,r.value,t.contentType),this.webOperation("PUT",n,t))}webCopy(e,t,n){return this.webOperation("GET",e).then(e=>this.webOperation("PUT",t,{data:e.responseText,contentType:n}))}delete(e,t){return this.webOperation("DELETE",e,t).then(t=>(this.requested[e]=404,this.nonexistent[e]=!0,this.unload(this.store.rdfFactory.namedNode(e)),t))}async createIfNotExists(e,t=s.sT,n=""){const r=this;try{var i=await r.load(e)}catch(a){if(404===a.response.status){try{i=await r.webOperation("PUT",e.value,{data:n,contentType:t})}catch(e){throw e}return delete r.requested[e.value],i}throw a}return i}createContainer(e,t,n){let r={"content-type":s.sT,link:this.ns.ldp("BasicContainer")+'; rel="type"'};t&&(r.slug=t);let i={headers:r};return n&&(i.body=n),this.webOperation("POST",e,i)}invalidateCache(e){const t=(0,jt.E)(e),n=this;n.fetchQueue&&n.fetchQueue[t]&&(n.fetchQueue[t].PromiseStatus,delete n.fetchQueue[t]);if(n.requested[t]&&"done"!==n.requested[t]&&"failed"!==n.requested[t]&&404!==n.requested[t]){n.requested[t]}else delete n.requested[t],delete n.nonexistent[t]}webOperation(e,t,n={}){const r=(0,jt.E)(t);n.method=e,n.body=n.data||n.body,n.force=!0;const i=this;if(n.body&&!n.contentType)throw new Error("Web operation sending data must have a defined contentType.");return n.contentType&&(n.headers=n.headers||{},n.headers["content-type"]=n.contentType),Yt.setCredentials(r,n),new Promise(function(t,a){i._fetch(r,n).then(n=>{if(n.ok)"PUT"!==e&&"PATCH"!==e&&"POST"!==e&&"DELETE"!==e||i.invalidateCache(r),n.text?n.text().then(e=>{n.responseText=e,t(n)}):t(n);else{let t="Web error: "+n.status;n.statusText&&(t+=" ("+n.statusText+")"),t+=" on "+e+" of <"+r+">",n.responseText&&(t+=": "+n.responseText);let i=new Error(t);i.response=n,a(i)}},t=>{a(new Error("Fetch error for "+e+" of <"+r+">:"+t))})})}lookUpThing(e,t){let n=this.store.uris(e);return n=n.map(e=>x.docpart(e)),n.forEach(e=>{this.lookedUp[e]=!0}),this.load(n,{referringTerm:t})}getHeader(e,t){const n=this.store,r=e.value,i=n.each(void 0,this.ns.link("requestedURI"),n.rdfFactory.literal(r));for(let e=0;e<i.length;e++){let r=i[e];if(void 0!==r){let e=n.any(r,this.ns.link("response"));if(void 0!==e&&n.anyValue(e,this.ns.http("status"))&&n.anyValue(e,this.ns.http("status")).startsWith("2")){let r=n.each(e,this.ns.httph(t.toLowerCase()));return r.length?r.map(e=>e.value):[]}}}}saveRequestMetadata(e,t){let n=t.req,r=this.store,i=t.referringTerm;this.addStatus(t.req,"Accept: "+t.headers.accept),(0,u.Y2)(i)&&r.add(r.rdfFactory.namedNode(e),this.ns.link("requestedBy"),i,this.appNode),t.original&&t.original.value!==e&&r.add(n,this.ns.link("orginalURI"),r.rdfFactory.literal(t.original.value),this.appNode);const a=new Date,o="["+a.getHours()+":"+a.getMinutes()+":"+a.getSeconds()+"] ";r.add(n,this.ns.rdfs("label"),r.rdfFactory.literal(o+" Request for "+e),this.appNode),r.add(n,this.ns.link("requestedURI"),r.rdfFactory.literal(e),this.appNode),r.add(n,this.ns.link("status"),r.collection(),this.appNode)}saveResponseMetadata(e,t){const n=this.store;let r=n.bnode();return n.add(t.req,this.ns.link("response"),r,this.appNode),n.add(r,this.ns.http("status"),n.rdfFactory.literal(e.status),this.appNode),n.add(r,this.ns.http("statusText"),n.rdfFactory.literal(e.statusText),this.appNode),e.headers.forEach((e,i)=>{n.add(r,this.ns.httph(i),this.store.rdfFactory.literal(e),this.appNode),"content-type"===i&&n.add(t.resource,this.ns.rdf("type"),n.rdfFactory.namedNode(F.mediaTypeClass(e).value),this.appNode)}),r}objectRefresh(e){let t=this.store.uris(e);if(void 0!==t)for(let e=0;e<t.length;e++)this.refresh(this.store.rdfFactory.namedNode(x.docpart(t[e])))}refresh(e,t){this.fireCallbacks("refresh",arguments),this.nowOrWhenFetched(e,{force:!0,clearPreviousData:!0},t)}refreshIfExpired(e,t){let n=this.getHeader(e,"Expires");!n||new Date(n[0]).getTime()<=(new Date).getTime()?this.refresh(e,t):t(!0,"Not expired",{})}retract(e){this.store.removeMany(void 0,void 0,void 0,e),e.value&&delete this.requested[x.docpart(e.value)],this.fireCallbacks("retract",arguments)}getState(e){return void 0===this.requested[e]?"unrequested":!0===this.requested[e]?"requested":"done"===this.requested[e]?"fetched":"redirected"===this.requested[e]?this.getState(this.redirectedTo[e]):"failed"}isPending(e){return!0===this.requested[e]}unload(e){this.store.removeDocument(e),delete this.requested[e.value]}addHandler(e){this.handlers.push(e),e.register(this)}retryNoCredentials(e,t){t.retriedWithNoCredentials=!0,delete this.requested[e],delete this.fetchQueue[e];let n=Object.assign({},t,{credentials:"omit"});return this.addStatus(t.req,"Abort: Will retry with credentials SUPPRESSED to see if that helps"),this.load(e,n)}isCrossSite(e){if("undefined"==typeof document||!document.location)return!1;const t=x.hostpart,n=""+document.location;return(t(n)&&t(e)&&t(n))!==t(e)}handleError(e,t,n){if(this.isCrossSite(t)){if(n.credentials&&"include"===n.credentials&&!n.retriedWithNoCredentials)return this.retryNoCredentials(t,n);let e=Yt.crossSiteProxy(t);if(e&&!n.proxyUsed)return this.redirectToProxy(e,n)}var r;return e instanceof Error?r="Fetch error: "+e.message:(r=e.statusText,e.responseText&&(r+=` ${e.responseText}`)),this.failFetch(n,r,e.status||998,e)}addType(e,t,n,r){let i=t;if(r){var a=n.any(i,this.ns.link("requestedURI"));a&&a.value!==r&&n.add(n.rdfFactory.namedNode(r),this.ns.rdf("type"),e,this.appNode)}for(;;){const t=n.any(i,this.ns.link("requestedURI"));if(t&&t.value&&n.add(n.rdfFactory.namedNode(t.value),this.ns.rdf("type"),e,this.appNode),i=n.any(void 0,n.rdfFactory.namedNode("http://www.w3.org/2007/ont/link#redirectedRequest"),i),!i)break;var o=n.any(i,n.rdfFactory.namedNode("http://www.w3.org/2007/ont/link#response"));if(!o)break;var s=n.any(o,n.rdfFactory.namedNode("http://www.w3.org/2007/ont/http#status"));if(!s)break;if("301"!==s&&"302"!==s)break}}handleResponse(e,t,n){const r=this.store,i=e.headers,a=n.req,o=this.saveResponseMetadata(e,n),s=this.normalizedContentType(n,i)||"";let c=i.get("content-location");if(0===e.status)return this.handleError(e,t,n);if(e.status>=400)return 404===e.status&&(this.nonexistent[n.original.value]=!0,this.nonexistent[t]=!0),this.saveErrorResponse(e,o).then(()=>{let t=n.resource+" "+e.statusText;return this.failFetch(n,t,e.status,e)});var l=null,u=null;if(c&&(u=x.join(c,t))!==t&&(l=u),200===e.status){if(this.addType(this.ns.link("Document"),a,r,t),l&&this.addType(this.ns.link("Document"),a,r,l),n.clearPreviousData){const e=r.statementsMatching(void 0,void 0,void 0,n.resource).slice();for(let t=0;t<e.length;t++)r.removeStatement(e[t])}let e=s.includes("image/")||s.includes("application/pdf");s&&e&&(this.addType(r.rdfFactory.namedNode("http://purl.org/dc/terms/Image"),a,r,t),l&&this.addType(r.rdfFactory.namedNode("http://purl.org/dc/terms/Image"),a,r,l))}if(c){if(!n.force&&l&&"done"===this.requested[u])return this.doneFetch(n,e);this.requested[u]=!0}this.parseLinkHeader(i.get("link"),n.original,a);let p=this.handlerForContentType(s,e);return p?e.text().then(t=>(e.responseText=t,p.parse(this,t,n,e))):(this.addStatus(a,"Fetch over. No data handled."),this.doneFetch(n,e))}saveErrorResponse(e,t){let n=this.store;return e.text().then(e=>{e.length>10&&n.add(t,this.ns.http("content"),n.rdfFactory.literal(e),t)})}handlerForContentType(e,t){if(!e)return null;let n=this.handlers.find(t=>e.match(t.pattern));return n?new n(t):null}guessContentType(e){return Dt[e.split(".").pop()]}normalizedContentType(e,t){if(e.forceContentType)return e.forceContentType;let n=t.get("content-type");if(!n||n.includes("application/octet-stream")){let t=this.guessContentType(e.resource.value);if(t)return t}let r=x.protocol(e.resource.value);return!n&&["file","chrome"].includes(r)?"text/xml":n}redirectToProxy(e,t){this.addStatus(t.req,"BLOCKED -> Cross-site Proxy to <"+e+">"),t.proxyUsed=!0;const n=this.store,r=t.req;t.noMeta||(n.add(r,this.ns.link("redirectedTo"),n.rdfFactory.namedNode(e),r),this.addStatus(r,"redirected to new request")),this.requested[t.resource.value]="redirected",this.redirectedTo[t.resource.value]=e;let i=Object.assign({},t);return i.baseURI=t.resource.value,this.fetchUri(e,i).then(e=>(i.noMeta||n.add(r,this.ns.link("redirectedRequest"),i.req,this.appNode),e))}setRequestTimeout(e,t){return new Promise(n=>{this.timeouts[e]=(this.timeouts[e]||[]).concat(setTimeout(()=>{!this.isPending(e)||t.retriedWithNoCredentials||t.proxyUsed||n(this.failFetch(t,`Request to ${e} timed out`,"timeout"))},this.timeout))})}addFetchCallback(e,t){this.fetchCallbacks[e]?this.fetchCallbacks[e].push(t):this.fetchCallbacks[e]=[t]}acceptString(){let e="";for(let t in this.mediatypes){""!==e&&(e+=", "),e+=t;for(let n in this.mediatypes[t])e+=";"+n+"="+this.mediatypes[t][n]}return e}}(0,i.A)(Yt,"HANDLERS",void 0),(0,i.A)(Yt,"CONTENT_TYPE_BY_EXT",void 0),(0,i.A)(Yt,"crossSiteProxyTemplate",void 0),Yt.HANDLERS=Jt,Yt.CONTENT_TYPE_BY_EXT=Dt;const Xt={parseJSON:function(e,t,n){var r,i,a,o={},s=n.sym(t);for(var c in e){0===c.indexOf("_:")?o[c]?r=o[c]:(r=n.bnode(c),o[c]=r):r=n.sym(c);var l=e[c];for(var u in l){var p=l[u];for(var d in i=n.sym(u),p){var f=p[d];if("uri"===f.type)a=n.sym(f.value),n.add(r,i,a,s);else if("BlankNode"===f.type)o[f.value]?a=o[f.value]:(a=n.bnode(f.value),o[f.value]=a),n.add(r,i,a,s);else{if("Literal"!==f.type)throw new Error("error: unexpected termtype: "+d.type);a=f.datatype?n.literal(f.value,void 0,n.sym(f.datatype)):f.lang?n.literal(f.value,f.lang):n.literal(f.value),n.add(r,i,a,s)}}}}}};function Zt(e){var t=0;function n(e){var t="",n=e.statements;for(var r in n)A.A.debug("Found statement: "+n),t+=o()+n[r]+"\n";return t}function r(e){var t="";for(var n in e.constraints){var r=e.constraints[n];t+=o()+"FILTER ( "+r.describe(n)+" ) \n"}return t}function i(e){for(var a="",s=0;s<e.optional.length;s++)A.A.debug("Found optional query"),a+=o()+"OPTIONAL { \n",t++,a+=n(e.optional[s]),a+=r(e.optional[s]),a+=i(e.optional[s]),t--,a+=o()+"}\n";return a}function a(e){var a=o()+"WHERE \n{ \n";return t++,a+=n(e),a+=r(e),a+=i(e),t--,a+="}"}function o(){for(var e="",n=0;n<t;n++)e+=" ";return e}return function(e){return function(e){for(var t=o()+"SELECT ",n=0;n<e.vars.length;n++)t+=e.vars[n]+" ";return t+"\n"}(e)+a(e.pat)}(e)}function en(e,t,n){var r=[];function i(e){if(r[e])return r[e];var t=n.variable(e);return r[e]=t,t}function a(e){return"string"==typeof e&&e.match(/[^ \n\t]/)}function o(e){return"string"==typeof e&&e.match(/^[\?\$]/)}function s(e){return"string"==typeof e?e.replace(/^</,"<").replace(/>$/,">"):e}function c(e){return"string"==typeof e&&e.match(/^<[^>]*>$/)}function l(e){return"string"==typeof e&&(e.match(/^_:/)||e.match(/^$/))}function u(e){return"string"==typeof e&&e.match(/:$/)}function p(e){return"string"==typeof e&&e.match(/^:|^[^_][^:]*:/)}function d(e){return e.split(":")[0]}function f(e){return e.split(":")[1]}function h(e){return c(e)?e.slice(1,e.length-1):e}function m(e){var t=-1===e.indexOf("'")?null:e.indexOf("'"),r=-1===e.indexOf('"')?null:e.indexOf('"');if(!t&&!r){var i=new Array(1);return i[0]=e,i}var a,o,s=new Array(2);if(!t||r&&r<t)a='"',o=r;else{if(r&&!(t&&t<r))return A.A.error("SQARQL QUERY OOPS!"),s;a="'",o=t}s[0]=e.slice(0,o);var c,l=e.slice(o+1).indexOf(a);return-1===l?(A.A.error("SPARQL parsing error: no matching parentheses in literal "+e),e):(e.slice(l+o+2).match(/^\^\^/)?(c=e.slice(l+o+2).indexOf(" "),s[1]=n.literal(e.slice(o+1,o+1+l),n.sym(h(e.slice(o+4+l,o+2+l+c)))),s=s.concat(m(e.slice(l+o+3+c)))):e.slice(l+o+2).match(/^@/)?(c=e.slice(l+o+2).indexOf(" "),s[1]=n.literal(e.slice(o+1,o+1+l),e.slice(o+3+l,o+2+l+c),null),s=s.concat(m(e.slice(l+o+2+c)))):(s[1]=n.literal(e.slice(o+1,o+1+l)),A.A.info("Literal found: "+s[1]),s=s.concat(m(e.slice(l+o+2)))),s)}function g(e){e=e.replace(/\(/g," ( ").replace(/\)/g," ) ").replace(/</g," <").replace(/>/g,"> ").replace(/{/g," { ").replace(/}/g," } ").replace(/[\t\n\r]/g," ").replace(/; /g," ; ").replace(/\. /g," . ").replace(/, /g," , "),A.A.info("New str into spaceDelimit: \n"+e);var t=[],n=e.split(" ");for(var r in n)a(n[r])&&(t=t.concat(n[r]));return t}function v(e,t){for(var n=0;n<t.length;n++)if("string"==typeof t[n]&&t[n].toLowerCase()===e.toLowerCase())return n;return null}function b(e,t){for(var n=[],r=0;r<t.length;r++)"string"==typeof t[r]&&t[r].toLowerCase()===e.toLowerCase()&&n.push(r);return n}function y(e,t,n){A.A.info("Looking for a close bracket of type "+n+" in "+e);for(var r=0,i=0;i<e.length;i++)if(e[i]===t&&r++,e[i]===n&&r--,r<0)return i;return A.A.error("Statement had no close parenthesis in SPARQL query"),0}function w(e){return this.describe=function(t){return t+" = "+e.toNT()},this.test=function(t){return e.equals(t)},this}function x(e){this.describe=function(t){return"REGEXP( '"+e+"' , "+t+" )"},this.test=function(t){var n=new RegExp(e);return!!t.value&&n.test(t.value)}}function k(e,t){3!==e.length||"Variable"!==e[0].termType||"NamedNode"!==e[2].termType&&"Literal"!==e[2].termType?6===e.length&&"string"==typeof e[0]&&"regexp"===e[0].toLowerCase()&&"("===e[1]&&")"===e[5]&&","===e[3]&&"Variable"===e[4].termType&&"Literal"===e[2].termType&&(A.A.debug("Constraint added: "+e),t.constraints[e[4]]=new x(e[2].value)):"="===e[1]||">"===e[1]||"<"===e[1]?(A.A.debug("Constraint added: "+e),t.constraints[e[0]]=new w(e[2])):A.A.warn("I don't know how to handle the constraint: "+e)}function _(e,t){A.A.debug("Optional query: "+e+" not yet implemented.");var r=n.formula();E(e,r),t.optional.push(r)}function E(e,t){var r,a,u=function(e){for(var t=[],r=0;r<e.length;r++)"string"==typeof e[r]?(e[r]=s(e[r]),o(e[r])?t[r]=i(e[r].slice(1)):l(e[r])?(A.A.info(e[r]+" was identified as a bnode."),t[r]=n.bnode()):c(e[r])?(A.A.info(e[r]+" was identified as a symbol."),t[r]=n.sym(h(e[r]))):p(e[r])?(A.A.info(e[r]+" was identified as a prefixed symbol"),T[d(e[r])]?t[r]=n.sym(e[r]=T[d(e[r])]+f(e[r])):(A.A.error("SPARQL error: "+e[r]+" with prefix "+d(e[r])+" does not have a correct prefix entry."),t[r]=e[r])):t[r]=e[r]):t[r]=e[r];return t}(e);for(A.A.debug("WHERE: "+u);v("OPTIONAL",u);)a=v("OPTIONAL",u),A.A.debug("OPT: "+a+" "+u[a]+" in "+u),"{"!==u[a+1]&&A.A.warn("Bad optional opening bracket in word "+a),-1===(r=y(u.slice(a+2),"{","}"))?A.A.error("No matching bracket in word "+a):(_(u.slice(a+2,a+2+r),t),a=v("OPTIONAL",u),r=y(u.slice(a+2),"{","}"),u.splice(a,r+3));for(A.A.debug("WHERE after optionals: "+u);v("FILTER",u);){var m=v("FILTER",u);"("!==u[m+1]&&A.A.warn("Bad filter opening bracket in word "+m),-1===(r=y(u.slice(m+2),"(",")"))?A.A.error("No matching bracket in word "+m):(k(u.slice(m+2,m+2+r),t),m=v("FILTER",u),r=y(u.slice(m+2),"(",")"),u.splice(m,r+3))}A.A.debug("WHERE after filters and optionals: "+u),function(e,t){var n=new Array(1);n[0]=-1;for(var r=n.concat(b(".",e)),i=[],a=0;a<r.length-1;a++)i[a]=e.slice(r[a]+1,r[a+1]);for(a in i){A.A.info("s+p+o "+a+" = "+i[a]);var o=i[a][0];i[a].splice(0,1);var s=n.concat(b(";",i[a]));s.push(i[a].length);for(var c=[],l=0;l<s.length-1;l++)c[l]=i[a].slice(s[l]+1,s[l+1]);for(a in c){A.A.info("p+o "+a+" = "+i[a]);var u=c[a][0];c[a].splice(0,1);var p=n.concat(b(",",c[a]));p.push(c[a].length);var d=[];for(l=0;l<p.length-1;l++)d[l]=c[a].slice(p[l]+1,p[l+1]);for(a in d){var f=d[a][0];A.A.info("Subj="+o+" Pred="+u+" Obj="+f),t.add(o,u,f)}}}}(u,t)}A.A.info("SPARQL input: \n"+e);var C=new V,S=function(e){var t=m(e),n=[];for(var r in t)n="string"==typeof t[r]?n.concat(g(t[r])):n.concat(t[r]);return n=function(e){for(var t=e,n=0;n<t.length;n++)if("a"===t[n]&&(t[n]="<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>"),"is"===t[n]&&"of"===t[n+2]){t.splice(n,1),t.splice(n+1,1);var r=t[n-1];t[n-1]=t[n+1],t[n+1]=r}return t}(n),A.A.info("SPARQL Tokens: "+n),n}(e),T=function(e){var t=b("PREFIX",e),n=[];for(var r in t){var i=e[t[r]+1],a=e[t[r]+2];if(u(i))if(c(a)){A.A.info("Prefix found: "+i+" -> "+a);var o=d(i),s=h(a);n[o]=s}else A.A.error("Invalid SPARQL symbol: "+a);else A.A.error("Invalid SPARQL prefix: "+i)}return n}(S);T.rdf||(T.rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"),T.rdfs||(T.rdfs="http://www.w3.org/2000/01/rdf-schema#");var P=v("SELECT",S),R=v("WHERE",S);if(P<0||R<0||P>R)return A.A.error("Invalid or nonexistent SELECT and WHERE tags in SPARQL query"),!1;if(function(e,t){for(var n in A.A.info("SPARQL vars: "+e),e)if(o(e[n])){A.A.info("Added "+e[n]+" to query variables from SPARQL");var r=i(e[n].slice(1));t.vars.push(r),r.label=e[n].slice(1)}else A.A.warn("Incorrect SPARQL variable in SELECT: "+e[n])}(S.slice(P+1,R),C),E(S.slice(R+2,S.length-1),C.pat),t)return C;for(var I in C.pat.statements){var F=C.pat.statements[I];"NamedNode"===F.subject.termType&&n.fetcher&&n.fetcher.lookUpThing(F.subject,"sparql:"+F.subject),"NamedNode"===F.object.termType&&n.fetcher&&n.fetcher.lookUpThing(F.object,"sparql:"+F.object)}return C}class tn{constructor(e){if((0,i.A)(this,"store",void 0),(0,i.A)(this,"ifps",void 0),(0,i.A)(this,"fps",void 0),(0,i.A)(this,"patchControl",void 0),(0,i.A)(this,"ns",void 0),(e=e||new X).updater)throw new Error("You can't have two UpdateManagers for the same store");e.fetcher||(e.fetcher=new Yt(e)),this.store=e,e.updater=this,this.ifps={},this.fps={},this.ns={},this.ns.link=T("http://www.w3.org/2007/ont/link#"),this.ns.http=T("http://www.w3.org/2007/ont/http#"),this.ns.httph=T("http://www.w3.org/2007/ont/httph#"),this.ns.ldp=T("http://www.w3.org/ns/ldp#"),this.ns.rdf=T("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),this.ns.rdfs=T("http://www.w3.org/2000/01/rdf-schema#"),this.ns.rdf=T("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),this.ns.owl=T("http://www.w3.org/2002/07/owl#"),this.patchControl=[]}patchControlFor(e){return this.patchControl[e.value]||(this.patchControl[e.value]=[]),this.patchControl[e.value]}isHttpUri(e){return"http"===e.slice(0,4)}flagAuthorizationMetadata(e){e||(e=this.store);const t=e.fetcher?.appNode,n=e.statementsMatching(void 0,this.ns.link("requestedURI"),void 0,t).map(e=>e.subject);for(const r of n){const n=e.any(r,this.ns.link("response"),null,t);null!=n&&e.add(n,this.ns.link("outOfDate"),!0,t)}}async checkEditable(e,t){if(!e)return!1;t||(t=this.store);const n=this.editable(e,t);if(void 0!==n)return n;await(t.fetcher?.load(e));return this.editable(e,t)}editable(e,t){if(!e)return!1;if(t||(t=this.store),e=(0,jt.E)(e),!this.isHttpUri(e)&&t.holds(t.rdfFactory.namedNode(e),t.rdfFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),t.rdfFactory.namedNode("http://www.w3.org/2007/ont/link#MachineEditableDocument")))return"LOCALFILE";var n,r=!1;const i=t.fetcher?.appNode;for(var a,o=t.each(void 0,this.ns.link("requestedURI"),(0,x.docpart)(e),i),s=0;s<o.length;s++)if(void 0!==(n=o[s])){const o=t.any(n,this.ns.link("response"),null,i);if(void 0!==o){if(t.anyJS(o,this.ns.link("outOfDate"),null,i))continue;var c=t.anyValue(o,this.ns.httph("wac-allow"));if(c)for(var l of c.split(",")){var u=l.split("=");if(u[0].includes("user")&&!u[1].includes("write")&&!u[1].includes("append"))return!1}var p=t.each(o,this.ns.httph("accept-patch"));if(p.length)for(let e=0;e<p.length;e++){if((a=p[e].value.trim()).indexOf("application/sparql-update")>=0)return"SPARQL";if(a.indexOf("application/sparql-update-single-match")>=0)return"SPARQL";if(a.indexOf("text/n3")>=0)return"N3PATCH"}var d=t.each(o,this.ns.httph("ms-author-via"));if(d.length)for(let e=0;e<d.length;e++){if((a=d[e].value.trim()).indexOf("SPARQL")>=0)return"SPARQL";if(a.indexOf("DAV")>=0)return"DAV"}if(!this.isHttpUri(e))return!!c&&"LOCALFILE";var f=t.each(o,this.ns.http("status"));if(f.length)for(let e=0;e<f.length;e++)200!==f[e]&&404!==f[e]||(r=!0)}}if(0===o.length);else if(r)return!1}anonymize(e){return"_:"===e.toNT().substr(0,2)&&this.mentioned(e)?"?"+e.toNT().substr(2):e.toNT()}anonymizeNT(e){return this.anonymize(e.subject)+" "+this.anonymize(e.predicate)+" "+this.anonymize(e.object)+" ."}nTriples(e){return`${e.subject.toNT()} ${e.predicate.toNT()} ${e.object.toNT()} .`}statementBnodes(e){return[e.subject,e.predicate,e.object].filter(function(e){return(0,u.jt)(e)})}statementArrayBnodes(e){var t=[];for(let n=0;n<e.length;n++)t=t.concat(this.statementBnodes(e[n]));t.sort();var n=[];for(let e=0;e<t.length;e++)0!==e&&t[e].equals(t[e-1])||n.push(t[e]);return n}cacheIfps(){this.ifps={};var e=this.store.each(void 0,this.ns.rdf("type"),this.ns.owl("InverseFunctionalProperty"));for(let t=0;t<e.length;t++)this.ifps[e[t].value]=!0;this.fps={},e=this.store.each(void 0,this.ns.rdf("type"),this.ns.owl("FunctionalProperty"));for(let t=0;t<e.length;t++)this.fps[e[t].value]=!0}bnodeContext2(e,t,n){var r,i,a=this.store.statementsMatching(void 0,void 0,e,t);for(let e=0;e<a.length;e++)if(this.fps[a[e].predicate.value]){if(!(r=a[e].subject).isBlank)return[a[e]];if(n&&(i=this.bnodeContext2(r,t,n-1)))return i.concat([a[e]])}a=this.store.statementsMatching(e,void 0,void 0,t);for(let e=0;e<a.length;e++)if(this.ifps[a[e].predicate.value]){if(!(r=a[e].object).isBlank)return[a[e]];if(n&&(i=this.bnodeContext2(r,t,n-1)))return i.concat([a[e]])}return null}bnodeContext1(e,t){for(var n=0;n<3;n++){var r=this.bnodeContext2(e,t,n);if(null!==r)return r}return this.store.connectedStatements(e,t)}mentioned(e){return 0!==this.store.statementsMatching(e,null,null,null).length||0!==this.store.statementsMatching(null,e).length||0!==this.store.statementsMatching(null,null,e).length}bnodeContext(e,t){var n=[];if(e.length){this.cacheIfps();for(let i=0;i<e.length;i++){var r=e[i];this.mentioned(r)&&(n=n.concat(this.bnodeContext1(r,t)))}}return n}statementContext(e){var t=this.statementBnodes(e);return this.bnodeContext(t,e.graph)}contextWhere(e){var t=this;return e&&0!==e.length?"WHERE { "+e.map(function(e){return t.anonymizeNT(e)}).join("\n")+" }\n":""}fire(e,t,n,r={}){return Promise.resolve().then(()=>{if(!e)throw new Error("No URI given for remote editing operation: "+t);return r.noMeta=!0,r.contentType=r.contentType||"application/sparql-update",r.body=t,this.store.fetcher.webOperation("PATCH",e,r)}).then(r=>{if(!r.ok){let n="UpdateManager: update failed for <"+e+"> status="+r.status+", "+r.statusText+"\n for query: "+t;throw new Error(n)}n(e,r.ok,r.responseText,r)}).catch(t=>{n(e,!1,t.message,t)})}update_statement(e){if(!e||e.graph){var t=this,n=this.statementContext(e);return{statement:e?[e.subject,e.predicate,e.object,e.graph]:void 0,statementNT:e?this.anonymizeNT(e):void 0,where:t.contextWhere(n),set_object:function(e,n){var r=this.where;r+="DELETE DATA { "+this.statementNT+" } ;\n",r+="INSERT DATA { "+this.anonymize(this.statement[0])+" "+this.anonymize(this.statement[1])+" "+this.anonymize(e)+" . }\n",t.fire(this.statement[3].value,r,n)}}}}insert_statement(e,t){var n=e instanceof Array?e[0]:e,r=this.contextWhere(this.statementContext(n));if(e instanceof Array){var i="";for(let t=0;t<e.length;t++)i+=e[t]+"\n";r+="INSERT DATA { "+i+" }\n"}else r+="INSERT DATA { "+this.anonymize(e.subject)+" "+this.anonymize(e.predicate)+" "+this.anonymize(e.object)+" . }\n";this.fire(n.graph.value,r,t)}delete_statement(e,t){var n=e instanceof Array?e[0]:e,r=this.contextWhere(this.statementContext(n));if(e instanceof Array){var i="";for(let t=0;t<e.length;t++)i+=e[t]+"\n";r+="DELETE DATA { "+i+" }\n"}else r+="DELETE DATA { "+this.anonymize(e.subject)+" "+this.anonymize(e.predicate)+" "+this.anonymize(e.object)+" . }\n";this.fire(n.graph.value,r,t)}requestDownstreamAction(e,t){var n=this.patchControlFor(e);if(n.pendingUpstream)if(n.downstreamAction){if(""+n.downstreamAction!=""+t)throw new Error("Can't wait for > 1 different downstream actions")}else n.downstreamAction=t;else t(e)}clearUpstreamCount(e){this.patchControlFor(e).upstreamCount=0}getUpdatesVia(e){var t=this.store.fetcher.getHeader(e,"updates-via");return t&&t.length?t[0].trim():null}addDownstreamChangeListener(e,t){var n=this.patchControlFor(e);n.downstreamChangeListeners||(n.downstreamChangeListeners=[]),n.downstreamChangeListeners.push(t),this.setRefreshHandler(e,e=>{this.reloadAndSync(e)})}reloadAndSync(e){var t=this.patchControlFor(e),n=this;if(t.reloading)t.outOfDate=!0;else{t.reloading=!0;var r=1e3,i=function(){n.reload(n.store,e,function(e,n,a){if(e){if(t.downstreamChangeListeners)for(let e=0;e<t.downstreamChangeListeners.length;e++)t.downstreamChangeListeners[e]();t.reloading=!1,t.outOfDate&&(t.outOfDate=!1,i())}else t.reloading=!1,a&&0===a.status&&(t.reloading=!0,r*=2,setTimeout(i,r))})};i()}}setRefreshHandler(e,t){let n=this.getUpdatesVia(e);var r=t,i=this,a=this,o=1500,s=0;if(!n)return!1;n=(0,x.join)(n,e.value);const c=n.replace(/^http:/,"ws:").replace(/^https:/,"wss:");var l=function(){var t;if("undefined"!=typeof WebSocket)t=new WebSocket(c);else{if("undefined"==typeof window||!window.WebSocket)return;t=window.WebSocket(c)}t.onopen=function(){o=1500,this.send("sub "+e.value),s&&a.requestDownstreamAction(e,r)};var n=i.patchControlFor(e);n.upstreamCount=0,t.onerror=function(e){},t.onclose=function(e){o*=2,s+=1,setTimeout(function(){l()},o)},t.onmessage=function(t){if(t.data&&"pub"===t.data.slice(0,3)){if("upstreamCount"in n&&(n.upstreamCount-=1,n.upstreamCount>=0))return;n.upstreamCount=0,i.requestDownstreamAction(e,r)}}};return l(),!0}updateMany(e,t=[]){const n=e.concat(t).map(e=>e.why),r=this,i=[];n.forEach(e=>{i.find(t=>t.equals(e))||i.push(e)});const a=i.map(n=>r.update(e.filter(e=>e.why.equals(n)),t.filter(e=>e.why.equals(n))));return a.length,Promise.all(a)}constructSparqlUpdateQuery(e,t,n){var r=this.contextWhere(n),i="";if(r.length){if(e.length){i+="DELETE { ";for(let t=0;t<e.length;t++)i+=this.anonymizeNT(e[t])+"\n";i+=" }\n"}if(t.length){i+="INSERT { ";for(let e=0;e<t.length;e++)i+=this.anonymizeNT(t[e])+"\n";i+=" }\n"}i+=r}else{if(e.length){i+="DELETE DATA { ";for(let t=0;t<e.length;t++)i+=this.anonymizeNT(e[t])+"\n";i+=" } \n"}if(t.length){e.length&&(i+=" ; "),i+="INSERT DATA { ";for(let e=0;e<t.length;e++)i+=this.nTriples(t[e])+"\n";i+=" }\n"}}return i}constructN3PatchQuery(e,t,n){var r="\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ex: <http://www.example.org/terms#>.\n\n_:patch\n";return n&&n.length>0&&(r+=`\n solid:where {\n ${n.map(e=>this.anonymizeNT(e)).join("\n ")}\n };`),e.length>0&&(r+=`\n solid:deletes {\n ${e.map(e=>this.anonymizeNT(e)).join("\n ")}\n };`),t.length>0&&(r+=`\n solid:inserts {\n ${t.map(e=>this.anonymizeNT(e)).join("\n ")}\n };`),r+=" a solid:InsertDeletePatch .\n"}update(e,t,n,r,i={}){if(!n){var a=this;return new Promise(function(n,o){a.update(e,t,function(e,t,r){t?n():o(new Error(r))},r,i)})}try{var o=this.store,s=e?(0,u.ok)(e)?e.statements:e instanceof Array?e:[e]:[],c=t?(0,u.ok)(t)?t.statements:t instanceof Array?t:[t]:[];if(!(s instanceof Array))throw new Error("Type Error "+typeof s+": "+s);if(!(c instanceof Array))throw new Error("Type Error "+typeof c+": "+c);if(0===s.length&&0===c.length)return n(null,!0);var l=s.length?s[0].graph:c[0].graph;if(!l){let e="Error patching: statement does not specify which document to patch:"+s[0]+", "+c[0];throw new Error(e)}if("NamedNode"!==l.termType){let e="Error patching: document not a NamedNode:"+s[0]+", "+c[0];throw new Error(e)}var p=this.patchControlFor(l),d=Date.now(),f=["subject","predicate","object","why"],h={delete:s,insert:c};["insert","delete"].map(function(e){h[e].map(function(e){if(!l.equals(e.graph))throw new Error("update: destination "+l+" inconsistent with delete quad "+e.graph);f.map(function(t){if(void 0===e[t])throw new Error("update: undefined "+t+" of statement.")})})});var m=this.editable(l.value,o);if(!1===m)throw new Error("Update: Can't make changes in uneditable "+l);if(void 0===m){if(r)throw new Error("Update: Loaded "+l+"but still can't figure out what editing protocol it supports.");return void this.store.fetcher.load(l).then(r=>{this.update(e,t,n,!0,i)},r=>{if(404!==r.response.status)throw new Error(`Update: Can't get updatability status ${l} before patching: ${r}`);this.update(e,t,n,!0,i)})}if(m.indexOf("SPARQL")>=0||m.indexOf("N3PATCH")>=0){var g=m.indexOf("SPARQL")>=0,v=[];s.length&&(v=this.statementArrayBnodes(s)),c.length&&(v=v.concat(this.statementArrayBnodes(c)));var b=this.bnodeContext(v,l),y=g?this.constructSparqlUpdateQuery(s,c,b):this.constructN3PatchQuery(s,c,b);i.contentType=g?"application/sparql-update":"text/n3",p.pendingUpstream=p.pendingUpstream?p.pendingUpstream+1:1,"upstreamCount"in p&&(p.upstreamCount+=1),this.fire(l.value,y,(e,t,r,i)=>{if(i.elapsedTimeMs=Date.now()-d,t){try{o.remove(s)}catch(e){t=!1,r="Remote Ok BUT error deleting "+s.length+" from store!!! "+e}for(let e=0;e<c.length;e++)o.add(c[e].subject,c[e].predicate,c[e].object,l)}if(n(e,t,r,i),p.pendingUpstream-=1,0===p.pendingUpstream&&p.downstreamAction){var a=p.downstreamAction;delete p.downstreamAction,a(l)}},i)}else if(m.indexOf("DAV")>=0)this.updateDav(l,s,c,n,i);else{if(!(m.indexOf("LOCALFILE")>=0))throw new Error("Unhandled edit method: '"+m+"' for "+l);try{this.updateLocalFile(l,s,c,n,i)}catch(e){n(l.value,!1,"Exception trying to write back file <"+l.value+">\n")}}}catch(e){n(void 0,!1,"Exception in update: "+e+"\n"+F.stackString(e))}}updateDav(e,t,n,r,i={}){let a=this.store;var o=a.any(e,this.ns.link("request"));if(!o)throw new Error("No record of our HTTP GET request for document: "+e);var s=a.any(o,this.ns.link("response"));if(!s)return null;var c=a.the(s,this.ns.httph("content-type")).value;let l=a.statementsMatching(void 0,void 0,void 0,e).slice();for(let e=0;e<t.length;e++)F.RDFArrayRemove(l,t[e]);for(let e=0;e<n.length;e++)l.push(n[e]);const u=this.serialize(e.value,l,c);var p,d=a.the(s,this.ns.httph("content-location"));return d&&(p=(0,x.join)(d.value,p)),i.contentType=c,i.noMeta=!0,i.body=u,a.fetcher.webOperation("PUT",p,i).then(i=>{if(!i.ok)throw new Error(i.error);for(let e=0;e<t.length;e++)a.remove(t[e]);for(let t=0;t<n.length;t++)a.add(n[t].subject,n[t].predicate,n[t].object,e);r(e.value,i.ok,i.responseText,i)}).catch(t=>{r(e.value,!1,t.message,t)})}updateLocalFile(e,t,n,r,i={}){const a=this.store;let o=a.statementsMatching(void 0,void 0,void 0,e).slice();for(let e=0;e<t.length;e++)F.RDFArrayRemove(o,t[e]);for(let e=0;e<n.length;e++)o.push(n[e]);var s=e.value.lastIndexOf(".");if(s<1)throw new Error("Rewriting file: No filename extension: "+e.value);var c=e.value.slice(s+1);let l=Yt.CONTENT_TYPE_BY_EXT[c];if(!l)throw new Error("File extension ."+c+" not supported for data write");i.body=this.serialize(e.value,o,l),i.contentType=l,a.fetcher.webOperation("PUT",e.value,i).then(i=>{if(!i.ok)return r(e.value,!1,i.error);for(let e=0;e<t.length;e++)a.remove(t[e]);for(let t=0;t<n.length;t++)a.add(n[t].subject,n[t].predicate,n[t].object,e);r(e.value,!0,"")})}serialize(e,t,n){const r=this.store;let i;if("string"==typeof t)return t;var a=O(r);switch(a.suggestNamespaces(r.namespaces),a.setBase(e),n){case"text/xml":case"application/rdf+xml":i=a.statementsToXML(t);break;case"text/n3":case"text/turtle":case"application/x-turtle":case"application/n3":i=a.statementsToN3(t);break;default:throw new Error("Content-type "+n+" not supported for data serialization")}return i}put(e,t,n,r){const i=this.store;let a;return Promise.resolve().then(()=>(a=this.serialize(e.value,t,n),i.fetcher.webOperation("PUT",e.value,{contentType:n,body:a}))).then(n=>{if(!n.ok)return r(e.value,n.ok,n.error,n);delete i.fetcher.nonexistent[e.value],delete i.fetcher.requested[e.value],"string"!=typeof t&&t.map(e=>{i.addStatement(e)}),r(e.value,n.ok,"",n)}).catch(t=>{r(e.value,!1,t.message)})}reload(e,t,n){var r=Date.now();e.fetcher.nowOrWhenFetched(t.value,{force:!0,noMeta:!0,clearPreviousData:!0},function(e,i,a){if(e)if(a.onErrorWasCalled||200!==a.status)n(!1,"Non-HTTP error reloading data: "+i,a);else{var o=Date.now()-r;t.reloadTimeTotal||(t.reloadTimeTotal=0),t.reloadTimeCount||(t.reloadTimeCount=0),t.reloadTimeTotal+=o,t.reloadTimeCount+=1,n(!0)}else n(!1,"Error reloading data: "+i,a)})}}const nn={...Te,fetcher:(e,t)=>new Yt(e,t),graph:(e=void 0,t=void 0)=>new X(e,t||{rdfFactory:Te}),lit(e,t,n){return this.literal(""+e,t||n)},st(e,t,n,r){return this.quad(e,t,n,r)}},rn=nn;class an{constructor(e,t){this.parent=e,this.via=t,this.connected=!1,this.pending={},this.subscribed={},this.socket={};try{this.socket=new WebSocket(t),this.socket.onopen=this.onOpen,this.socket.onclose=this.onClose,this.socket.onmessage=this.onMessage,this.socket.onerror=this.onError}catch(e){this.onError(e)}}_decode(e){var t,n,r,i,a,o,s;for(n in i={},a=function(){var n,r,i,a;for(a=[],n=0,r=(i=e.split("&")).length;n<r;n++)t=i[n],a.push(t.split("="));return a}())t=a[n],s=(o=[decodeURIComponent(t[0]),decodeURIComponent(t[1])])[1],null==i[r=o[0]]&&(i[r]=[]),i[r].push(s);return i}_send(e,t,n){var r,i;return i=[e,t,n].join(" "),"function"==typeof(r=this.socket).send?r.send(i):void 0}_subscribe(e){return this._send("sub",e,""),this.subscribed[e]=!0,this.subscribed[e]}onClose(e){var t;for(t in this.connected=!1,this.subscribed)this.pending[t]=!0;return this.subscribed={},this.subscribed}onError(e){throw new Error("onError"+e)}onMessage(e){var t,n;return"ping"===(n=e.data.split(" "))[0]?"function"==typeof(t=this.socket).send?t.send("pong "+n.slice(1).join(" ")):void 0:"pub"===n[0]?this.parent.onUpdate(n[1],this._decode(n[2])):void 0}onOpen(e){var t,n;for(n in this.connected=!0,t=[],this.pending)delete this.pending[n],t.push(this._subscribe(n));return t}subscribe(e){return this.connected?this._subscribe(e):(this.pending[e]=!0,this.pending[e])}}class on{constructor(e){this.fetcher=e,this.graph={},this.via={},this.fetcher.addCallback("headers",this.onHeaders)}onHeaders(e){var t,n,r;return null==e.headers||"undefined"==typeof WebSocket||null===WebSocket||(t=e.headers.etag,r=e.headers["updates-via"],n=e.uri,t&&r&&(this.graph[n]={etag:t,via:r},this.register(r,n))),!0}onUpdate(e,t){return this.fetcher.refresh(rn.namedNode(e))}register(e,t){return null==this.via[e]&&(this.via[e]=new an(this,e)),this.via[e].subscribe(t)}}const sn={};for(const e in rn)"function"==typeof rn[e]&&(sn[e]=rn[e].bind(rn));const{fetcher:cn,graph:ln,lit:un,st:pn,namedNode:dn,variable:fn,blankNode:hn,defaultGraph:mn,literal:gn,quad:vn,triple:bn}=sn,yn=new q,wn=e=>yn.fromNT(e),xn=$.fromValue,kn=c.nextId;class _n extends X{constructor(e){super(e),(0,i.A)(this,"fetcher",void 0),this.fetcher=new Yt(this,{})}}class En extends _n{constructor(e){super(e),(0,i.A)(this,"updater",void 0),this.updater=new tn(this)}}},4940(e,t,n){"use strict";n.d(t,{A:()=>r});const r={debug(e){},warn(e){},info(e){},error(e){},success(e){},msg(e){}}},5108(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(4467),i=n(1059),a=n(8936),o=n(9403),s=n(2931),c=n(2915);class l extends a.A{constructor(e){if(super((0,s.E)(e)),(0,r.A)(this,"termType",o.Kk),(0,r.A)(this,"classOrder",i.A.NamedNode),!this.value)throw new Error("Missing IRI for NamedNode");if(!this.value.includes(":"))throw new Error('NamedNode IRI "'+e+'" must be absolute.');if(this.value.includes(" "))throw new Error('Error: NamedNode IRI "'+e+'" must not contain unencoded spaces.')}dir(){var e=this.value.split("#")[0],t=e.slice(0,-1).lastIndexOf("/"),n=e.indexOf("//");return n>=0&&t<n+2||t<0?null:new l(e.slice(0,t+1))}site(){var e=this.value.split("#")[0],t=e.indexOf("//");if(t<0)throw new Error("This URI does not have a web site part (origin)");var n=e.indexOf("/",t+2);return new l(n<0?e.slice(0)+"/":e.slice(0,n+1))}doc(){return this.value.indexOf("#")<0?this:new l(this.value.split("#")[0])}toString(){return"<"+this.value+">"}id(){return this.value.split("#")[1]}get uri(){return this.value}set uri(e){this.value=e}static fromValue(e){return null==e||(0,c.D0)(e)?e:new l(e)}}},8936(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(4467);class i{constructor(e){(0,r.A)(this,"termType",void 0),(0,r.A)(this,"classOrder",void 0),(0,r.A)(this,"value",void 0),this.value=e}substitute(e){return this}compareTerm(e){return this.classOrder<e.classOrder?-1:this.classOrder>e.classOrder?1:this.value<e.value?-1:this.value>e.value?1:0}equals(e){return!!e&&(this.termType===e.termType&&this.value===e.value)}hashString(){return this.toCanonical()}sameTerm(e){return this.equals(e)}toCanonical(){return this.toNT()}toNT(){return this.toString()}toNQ(){return this.toNT()}toString(){throw new Error("Node.toString() is abstract - see the subclasses instead")}}(0,r.A)(i,"fromValue",void 0),(0,r.A)(i,"toJS",void 0)},9403(e,t,n){"use strict";n.d(t,{$Q:()=>i,BR:()=>m,Fn:()=>w,H:()=>_,JG:()=>b,K9:()=>y,Kk:()=>r,MG:()=>h,P2:()=>o,QW:()=>a,S:()=>l,_0:()=>g,bD:()=>u,bM:()=>v,hu:()=>k,i2:()=>d,ic:()=>s,lc:()=>p,ny:()=>f,r0:()=>c,sT:()=>x});const r="NamedNode",i="BlankNode",a="Literal",o="Variable",s="DefaultGraph",c="Collection",l="Empty",u="Graph",p="text/html",d="application/ld+json",f="text/n3",h="application/n3",m="application/nquads",g="application/n-quads",v="application/n-triples",b="application/rdf+xml",y="application/sparql-update",w="application/sparql-update-single-match",x="text/turtle",k="application/x-turtle",_="application/xhtml+xml"},2727(e,t,n){"use strict";n.r(t),n.d(t,{docpart:()=>a,document:()=>o,hostpart:()=>s,join:()=>c,protocol:()=>l,refTo:()=>u});var r=n(5108),i=i||console.log;function a(e){var t;return(t=e.indexOf("#"))<0?e:e.slice(0,t)}function o(e){return new r.A(a(e))}function s(e){var t=/[^\/]*\/\/([^\/]*)\//.exec(e);return t?t[1]:""}function c(e,t){var n,r,a,o,s,c=t.indexOf("#");if(c>0&&(t=t.slice(0,c)),0===e.length)return t;if(0===e.indexOf("#"))return t+e;if(e.indexOf(":")>=0)return e;if(n=t.indexOf(":"),0===t.length)return e;if(n<0)return i("Invalid base: "+t+" in join with given: "+e),e;if(r=t.slice(0,+n+1||9e9),0===e.indexOf("//"))return r+e;if(t.indexOf("//",n)===n+1){if((a=t.indexOf("/",n+3))<0)return t.length-n-3>0?t+"/"+e:r+e}else if((a=t.indexOf("/",n+1))<0)return t.length-n-1>0?t+"/"+e:r+e;if(0===e.indexOf("/"))return t.slice(0,a)+e;if((o=(s=t.slice(a)).lastIndexOf("/"))<0)return r+e;for(o>=0&&o<s.length-1&&(s=s.slice(0,+o+1||9e9)),s+=e;s.match(/[^\/]*\/\.\.\//);)s=s.replace(/[^\/]*\/\.\.\//,"");return s=(s=s.replace(/\.\//g,"")).replace(/\/\.$/,"/"),t.slice(0,a)+s}function l(e){const t=e.indexOf(":");return t<0?null:e.slice(0,t)}function u(e,t){var n,r,i,a,o,s,c,l,u,p,d,f,h=new RegExp("^[-_a-zA-Z0-9.]+:(//[^/]*)?/[^/]*$");if(!e)return t;if(e===t)return"";for(n=c=0,a=t.length;c<a;n=++c){if(t[n]!==e[n])break}if(e.slice(0,n).match(h)&&((r=t.indexOf("//"))<0&&(r=-2),i=t.indexOf("/",r+2),"/"!==t[i+1]&&"/"!==e[i+1]&&t.slice(0,i)===e.slice(0,i)))return t.slice(i);if("#"===t[n]&&e.length===n)return t.slice(n);for(;n>0&&"/"!==t[n-1];)n--;if(n<3)return t;if(e.indexOf("//",n-2)>0||t.indexOf("//",n-2)>0)return t;if(e.indexOf(":",n)>0)return t;for(s=0,l=0,o=(p=e.slice(n)).length;l<o;l++)"/"===p[l]&&s++;if(0===s&&n<t.length&&"#"===t[n])return"./"+t.slice(n);if(0===s&&n===t.length)return"./";if(f="",s>0)for(u=1,d=s;d>=1?u<=d:u>=d;d>=1?++u:--u)f+="../";return f+t.slice(n)}},4011(e,t,n){"use strict";n.r(t),n.d(t,{DOMParserFactory:()=>p,RDFArrayRemove:()=>y,callbackify:()=>u,domToString:()=>d,dtstamp:()=>h,dumpNode:()=>f,heavyCompare:()=>m,heavyCompareSPO:()=>g,linkRelationProperty:()=>l,log:()=>i.A,mediaTypeClass:()=>c,output:()=>v,parseXML:()=>b,stackString:()=>x,string:()=>s,string_startswith:()=>w,uri:()=>r});var r=n(2727),i=n(4940),a=n(5108),o=n(8392);e=n.hmd(e);const s={template:function(e,t){for(var n=e.split("%s"),r="",i=0;i<t.length;i++)t[i]+="",r+=n[i]+t[i];return r+n.slice(t.length).join()}};function c(e){return e=e.split(";")[0].trim(),new a.A("http://www.w3.org/ns/iana/media-types/"+e+"#Resource")}function l(e){return new a.A("http://www.w3.org/ns/iana/link-relations/relation#"+e.trim())}function u(e,t){e.callbacks={};for(var n=t.length-1;n>=0;n--)e.callbacks[t[n]]=[];e.addHook=function(t){e.callbacks[t]||(e.callbacks[t]=[])},e.addCallback=function(t,n){e.callbacks[t].push(n)},e.removeCallback=function(t,n){for(var r=0;r<e.callbacks[t].length;r++)if(e.callbacks[t][r].name===n)return e.callbacks[t].splice(r,1),!0;return!1},e.insertCallback=function(t,n){e.callbacks[t].unshift(n)},e.fireCallbacks=function(t,n){var r,i=[],a=[],o=e.callbacks[t].length;let s;for(r=o-1;r>=0;r--)s=e.callbacks[t][r],s&&s.apply(e,n)&&i.push(s);for(r=i.length-1;r>=0;r--)a.push(i[r]);for(r=o;r<e.callbacks[t].length;r++)a.push(e.callbacks[t][r]);e.callbacks[t]=a}}function p(){return window.DOMParser?new o.DOMParser:!!window.ActiveXObject&&new ActiveXObject("Microsoft.XMLDOM")}function d(e,t){var n=[];(t=t||{})&&t.selfClosing&&t.selfClosing.split(" ").forEach(function(e){n[e]=!0});var r=[];return t&&t.skipAttributes&&t.skipAttributes.split(" ").forEach(function(e){r[e]=!0}),f(e,t,n,r)}function f(e,t,n,r){var i,a="",o=[!1];if(void 0===e.nodeType)return a;if(1===e.nodeType){if(e.hasAttribute("class")&&t&&t.classWithChildText&&e.matches(t.classWithChildText.class))a+=e.querySelector(t.classWithChildText.element).textContent;else if(!(t&&t.skipNodeWithClass&&e.matches("."+t.skipNodeWithClass))){var s=e.nodeName.toLowerCase();a+="<"+s;var c=[];for(i=e.attributes.length-1;i>=0;i--){var l=e.attributes[i];if(!(r&&r.length>0&&r[l.name])&&!/^\d+$/.test(l.name)){if("class"===l.name&&t&&t.replaceClassItemWith&&l.value.split(" ").indexOf(t.replaceClassItemWith.source)>-1){var u=new RegExp(t.replaceClassItemWith.source,"g");l.value=l.value.replace(u,t.replaceClassItemWith.target).trim()}"class"===l.name&&t&&t.skipClassWithValue&&t.skipClassWithValue===l.value||c.push(l.name+"='"+l.value.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,""")+"'")}}if(c.length>0&&(t&&t.sortAttributes&&c.sort(function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}),a+=" "+c.join(" ")),n&&n.ename)a+=" />";else{for(a+=">",a+="html"===s?"\n ":"",o.push("style"===s||"script"===s),i=0;i<e.childNodes.length;i++)a+=f(e.childNodes[i]);o.pop(),a+="body"===s?"</"+s+">\n":"</"+s+">"}}}else if(8===e.nodeType)a+="\x3c!--"+e.nodeValue+"--\x3e";else if(3===e.nodeType||4===e.nodeType){var p=e.nodeValue.replace(/\n+$/,"");a+=o[o.length-1]?p:p.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}return a}function h(){var e=new Date,t=e.getYear()+1900,n=e.getMonth()+1,r=e.getDate(),i=e.getUTCHours(),a=e.getUTCMinutes(),o=e.getSeconds();return n<10&&(n="0"+n),r<10&&(r="0"+r),i<10&&(i="0"+i),a<10&&(a="0"+a),o<10&&(o="0"+o),t+"-"+n+"-"+r+"T"+i+":"+a+":"+o+"Z"}function m(e,t,n,r){var i=function(e){return"BlankNode"===e.termType?null:e},a=function(e){var t=n.statementsMatching(e).map(function(e){return i(e.subject)+" "+i(e.predicate)+" "+i(e.object)}).concat(n.statementsMatching(void 0,void 0,e).map(function(e){return i(e.subject)+" "+i(e.predicate)+" "+i(e.object)}));return t.sort(),t.join("\n")};const o=Object.prototype.hasOwnProperty.call(n,"compareTerms")?n.compareTerms(e,t):e.compareTerm(t);return"BlankNode"===e.termType&&"BlankNode"===t.termType?0===o?0:a(e)>a(t)?1:a(e)<a(t)?-1:o:r&&e.uri&&t.uri?(r[e.uri]||e.uri).localeCompare(r[t.uri]||t.uri):o}function g(e,t,n,r){return m(e.subject,t.subject,n,r)||m(e.predicate,t.predicate,n,r)||m(e.object,t.object,n,r)}function v(e){var t=document.createElement("div");t.textContent=e,document.body.appendChild(t)}function b(t,n){return n=n||{},e&&e.exports?(new o.DOMParser).parseFromString(t,n.contentType||"application/xhtml+xml"):("undefined"!=typeof window&&window.DOMParser?new window.DOMParser:new o.DOMParser).parseFromString(t,"application/xml")}function y(e,t){for(var n=0;n<e.length;n++)if(e[n].subject.equals(t.subject)&&e[n].predicate.equals(t.predicate)&&e[n].object.equals(t.object)&&e[n].why.equals(t.why))return void e.splice(n,1);throw new Error("RDFArrayRemove: Array did not contain "+t+" "+t.why)}function w(e,t){return e.slice(0,t.length)===t}function x(e){var t=e+"\n";if(!e.stack)return t+"No stack available.\n";for(var n=e.stack.toString().split("\n"),r=[],i=0;i<n.length;i++){var a=n[i];if(a.indexOf("ecmaunit.js")>-1)break;"("==a.charAt(0)&&(a="function"+a);var o=a.split("@");r.push(o)}for(i=0;i<r.length;i++)t+=" "+r[i][1]+"\n "+r[i][0];return t}},2931(e,t,n){"use strict";function r(e){return"string"==typeof e?e:e.value}n.d(t,{E:()=>r})},2915(e,t,n){"use strict";n.d(t,{CZ:()=>c,D0:()=>p,DJ:()=>s,DZ:()=>u,GE:()=>b,P3:()=>o,RN:()=>y,SH:()=>i,Y2:()=>h,YC:()=>v,aF:()=>f,c$:()=>d,fY:()=>l,hr:()=>g,jt:()=>m,ok:()=>a});var r=n(9403);function i(e){return"object"==typeof e&&null!==e&&"subject"in e}function a(e){return"object"==typeof e&&null!==e&&"statements"in e}function o(e){return p(e)&&e.termType===r.r0}function s(e){return e&&Object.prototype.hasOwnProperty.call(e,"termType")&&(e.termType===r.Kk||e.termType===r.P2||e.termType===r.$Q||e.termType===r.r0||e.termType===r.QW||e.termType===r.bD)}function c(e){return e&&Object.prototype.hasOwnProperty.call(e,"termType")&&(e.termType===r.Kk||e.termType===r.P2||e.termType===r.$Q||e.termType===r.r0||e.termType===r.QW||e.termType===r.bD)}function l(e){return p(e)&&(e.termType===r.Kk||e.termType===r.$Q||e.termType===r.P2)}function u(e){return p(e)&&e.termType===r.P2}function p(e){return"object"==typeof e&&null!==e&&"termType"in e}function d(e){return e.termType===r.QW}function f(e){return"object"==typeof e&&null!==e&&"subject"in e&&"predicate"in e&&"object"in e}function h(e){return p(e)&&"NamedNode"===e.termType}function m(e){return p(e)&&"termType"in e&&"BlankNode"===e.termType}function g(e){return p(e)&&(e.termType===r.Kk||e.termType===r.P2||e.termType===r.$Q)}function v(e){return p(e)&&(e.termType===r.Kk||e.termType===r.P2)}function b(e){return p(e)&&(e.termType===r.Kk||e.termType===r.P2||e.termType===r.$Q||e.termType===r.QW)}function y(e){return p(e)&&(e.termType===r.Kk||e.termType===r.P2||e.termType===r.$Q||e.termType===r.ic)}},3172(e,t){"use strict"},1247(e,t,n){"use strict";var r=n(9982),i=n(6540),a=n(961);
|
|
325
325
|
/**
|
|
326
326
|
* @license React
|
|
327
327
|
* react-dom-client.production.js
|
|
@@ -458,5 +458,5 @@ var se=function(){var e=new RegExp('(?:false|true|null|[\\{\\}\\[\\]]|(?:-?\\b(?
|
|
|
458
458
|
*/
|
|
459
459
|
var r=n(30),i=n(31),a=n(32);function o(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=d(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),i=(e=s(e,r)).write(t,n);return i!==r&&(e=e.slice(0,i)),e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|f(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(e){return e!=e}(t.length)?s(e,0):d(e,t);if("Buffer"===t.type&&a(t.data))return d(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function p(e,t){if(u(t),e=s(e,t<0?0:0|f(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|f(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function f(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function h(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return z(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){var a,o=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(a=n;a<s;a++)if(l(e,a)===l(t,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===c)return u*o}else-1!==u&&(a-=a-u),u=-1}else for(n+c>s&&(n=s-c),a=n;a>=0;a--){for(var p=!0,d=0;d<c;d++)if(l(e,a+d)!==l(t,d)){p=!1;break}if(p)return a}return-1}function y(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function w(e,t,n,r){return q(z(t,e.length-n),e,n,r)}function x(e,t,n,r){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function k(e,t,n,r){return x(e,t,n,r)}function _(e,t,n,r){return q(H(t),e,n,r)}function E(e,t,n,r){return q(function(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,o,s,c,l=e[i],u=null,p=l>239?4:l>223?3:l>191?2:1;if(i+p<=n)switch(p){case 1:l<128&&(u=l);break;case 2:128==(192&(a=e[i+1]))&&(c=(31&l)<<6|63&a)>127&&(u=c);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(c=(15&l)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(u=c)}null===u?(u=65533,p=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=p}return function(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=A));return n}(r)}t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=o(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return l(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,r){return u(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return p(null,e)},c.allocUnsafeSlow=function(e){return p(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},c.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}},c.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!c.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},c.byteLength=h,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?S(this,0,e):m.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,i){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),l=this.slice(r,i),u=e.slice(t,n),p=0;p<s;++p)if(l[p]!==u[p]){a=l[p],o=u[p];break}return a<o?-1:o<a?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return k(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function R(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=B(e[a]);return i}function I(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function F(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,i,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function O(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function L(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function j(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(e,t,n,r,a){return a||j(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function D(e,t,n,r,a){return a||j(e,0,n,8),i.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((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),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var i=t-e;n=new c(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUInt8=function(e,t){return t||F(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||F(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||F(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||F(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||F(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||F(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||F(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||N(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return M(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return M(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return D(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return D(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;i>=0;--i)e[i+t]=this[i+n];else if(a<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var o=c.isBuffer(e)?e:z(new c(e,r).toString()),s=o.length;for(a=0;a<n-t;++a)this[a+t]=o[a%s]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function z(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(29))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),o=r[0],s=r[1],l=new a(function(e,t,n){return 3*(t+n)/4-n}(0,o,s)),u=0,p=s>0?o-4:o;for(n=0;n<p;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[u++]=255&t),1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,c=n-i;s<c;s+=o)a.push(l(e,s,s+o>c?c:s+o));return 1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};for(var r=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],i[o.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var i,a,o=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(r[(a=i)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
|
|
460
460
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
461
|
-
t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,c=(1<<s)-1,l=c>>1,u=-7,p=n?i-1:0,d=n?-1:1,f=e[t+p];for(p+=d,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+p],p+=d,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=256*o+e[t+p],p+=d,u-=8);if(0===a)a=1-l;else{if(a===c)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),a-=l}return(f?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,c,l=8*a-i-1,u=(1<<l)-1,p=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+p>=1?d/c:d*Math.pow(2,1-p))*c>=2&&(o++,c/=2),o+p>=u?(s=0,o=u):o+p>=1?(s=(t*c-1)*Math.pow(2,i),o+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&s,f+=h,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+f]=255&o,f+=h,o/=256,l-=8);e[n+f-h]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.jws,n=e.KeyUtil,i=e.X509,a=e.crypto,o=e.hextob64u,s=e.b64tohex,c=e.AllowedSigningAlgs;return function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.parseJwt=function e(n){r.Log.debug("JoseUtil.parseJwt");try{var i=t.JWS.parse(n);return{header:i.headerObj,payload:i.payloadObj}}catch(e){r.Log.error(e)}},e.validateJwt=function(t,a,o,c,l,u,p){r.Log.debug("JoseUtil.validateJwt");try{if("RSA"===a.kty)if(a.e&&a.n)a=n.getKey(a);else{if(!a.x5c||!a.x5c.length)return r.Log.error("JoseUtil.validateJwt: RSA key missing key material",a),Promise.reject(new Error("RSA key missing key material"));var d=s(a.x5c[0]);a=i.getPublicKeyFromCertHex(d)}else{if("EC"!==a.kty)return r.Log.error("JoseUtil.validateJwt: Unsupported key type",a&&a.kty),Promise.reject(new Error(a.kty));if(!(a.crv&&a.x&&a.y))return r.Log.error("JoseUtil.validateJwt: EC key missing key material",a),Promise.reject(new Error("EC key missing key material"));a=n.getKey(a)}return e._validateJwt(t,a,o,c,l,u,p)}catch(e){return r.Log.error(e&&e.message||e),Promise.reject("JWT validation failed")}},e.validateJwtAttributes=function(t,n,i,a,o,s){a||(a=0),o||(o=parseInt(Date.now()/1e3));var c=e.parseJwt(t).payload;if(!c.iss)return r.Log.error("JoseUtil._validateJwt: issuer was not provided"),Promise.reject(new Error("issuer was not provided"));if(c.iss!==n)return r.Log.error("JoseUtil._validateJwt: Invalid issuer in token",c.iss),Promise.reject(new Error("Invalid issuer in token: "+c.iss));if(!c.aud)return r.Log.error("JoseUtil._validateJwt: aud was not provided"),Promise.reject(new Error("aud was not provided"));if(!(c.aud===i||Array.isArray(c.aud)&&c.aud.indexOf(i)>=0))return r.Log.error("JoseUtil._validateJwt: Invalid audience in token",c.aud),Promise.reject(new Error("Invalid audience in token: "+c.aud));if(c.azp&&c.azp!==i)return r.Log.error("JoseUtil._validateJwt: Invalid azp in token",c.azp),Promise.reject(new Error("Invalid azp in token: "+c.azp));if(!s){var l=o+a,u=o-a;if(!c.iat)return r.Log.error("JoseUtil._validateJwt: iat was not provided"),Promise.reject(new Error("iat was not provided"));if(l<c.iat)return r.Log.error("JoseUtil._validateJwt: iat is in the future",c.iat),Promise.reject(new Error("iat is in the future: "+c.iat));if(c.nbf&&l<c.nbf)return r.Log.error("JoseUtil._validateJwt: nbf is in the future",c.nbf),Promise.reject(new Error("nbf is in the future: "+c.nbf));if(!c.exp)return r.Log.error("JoseUtil._validateJwt: exp was not provided"),Promise.reject(new Error("exp was not provided"));if(c.exp<u)return r.Log.error("JoseUtil._validateJwt: exp is in the past",c.exp),Promise.reject(new Error("exp is in the past:"+c.exp))}return Promise.resolve(c)},e._validateJwt=function(n,i,a,o,s,l,u){return e.validateJwtAttributes(n,a,o,s,l,u).then(function(e){try{return t.JWS.verify(n,i,c)?e:(r.Log.error("JoseUtil._validateJwt: signature validation failed"),Promise.reject(new Error("signature validation failed")))}catch(e){return r.Log.error(e&&e.message||e),Promise.reject(new Error("signature validation failed"))}})},e.hashString=function e(t,n){try{return a.Util.hashString(t,n)}catch(e){r.Log.error(e)}},e.hexToBase64Url=function e(t){try{return o(t)}catch(e){r.Log.error(e)}},e}()};var r=n(0);e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SigninResponse=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(3);t.SigninResponse=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=i.UrlUtility.parseUrlFragment(t,n);this.error=r.error,this.error_description=r.error_description,this.error_uri=r.error_uri,this.code=r.code,this.state=r.state,this.id_token=r.id_token,this.session_state=r.session_state,this.access_token=r.access_token,this.token_type=r.token_type,this.scope=r.scope,this.profile=void 0,this.expires_in=r.expires_in}return r(e,[{key:"expires_in",get:function(){if(this.expires_at){var e=parseInt(Date.now()/1e3);return this.expires_at-e}},set:function(e){var t=parseInt(e);if("number"==typeof t&&t>0){var n=parseInt(Date.now()/1e3);this.expires_at=n+t}}},{key:"expired",get:function(){var e=this.expires_in;if(void 0!==e)return e<=0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}},{key:"isOpenIdConnect",get:function(){return this.scopes.indexOf("openid")>=0||!!this.id_token}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SignoutRequest=void 0;var r=n(0),i=n(3),a=n(9);t.SignoutRequest=function e(t){var n=t.url,o=t.id_token_hint,s=t.post_logout_redirect_uri,c=t.data,l=t.extraQueryParams,u=t.request_type;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!n)throw r.Log.error("SignoutRequest.ctor: No url passed"),new Error("url");for(var p in o&&(n=i.UrlUtility.addQueryParam(n,"id_token_hint",o)),s&&(n=i.UrlUtility.addQueryParam(n,"post_logout_redirect_uri",s),c&&(this.state=new a.State({data:c,request_type:u}),n=i.UrlUtility.addQueryParam(n,"state",this.state.id))),l)n=i.UrlUtility.addQueryParam(n,p,l[p]);this.url=n}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SignoutResponse=void 0;var r=n(3);t.SignoutResponse=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=r.UrlUtility.parseUrlFragment(t,"?");this.error=n.error,this.error_description=n.error_description,this.error_uri=n.error_uri,this.state=n.state}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.InMemoryWebStorage=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0);t.InMemoryWebStorage=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._data={}}return e.prototype.getItem=function(e){return i.Log.debug("InMemoryWebStorage.getItem",e),this._data[e]},e.prototype.setItem=function(e,t){i.Log.debug("InMemoryWebStorage.setItem",e),this._data[e]=t},e.prototype.removeItem=function(e){i.Log.debug("InMemoryWebStorage.removeItem",e),delete this._data[e]},e.prototype.key=function(e){return Object.getOwnPropertyNames(this._data)[e]},r(e,[{key:"length",get:function(){return Object.getOwnPropertyNames(this._data).length}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UserManager=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=n(10),o=n(39),s=n(15),c=n(45),l=n(47),u=n(18),p=n(8),d=n(20),f=n(11),h=n(4);t.UserManager=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.SilentRenewService,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.SessionMonitor,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:d.TokenRevocationClient,p=arguments.length>4&&void 0!==arguments[4]?arguments[4]:f.TokenClient,m=arguments.length>5&&void 0!==arguments[5]?arguments[5]:h.JoseUtil;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,t),n instanceof o.UserManagerSettings||(n=new o.UserManagerSettings(n));var g=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return g._events=new c.UserManagerEvents(n),g._silentRenewService=new r(g),g.settings.automaticSilentRenew&&(i.Log.debug("UserManager.ctor: automaticSilentRenew is configured, setting up silent renew"),g.startSilentRenew()),g.settings.monitorSession&&(i.Log.debug("UserManager.ctor: monitorSession is configured, setting up session monitor"),g._sessionMonitor=new a(g)),g._tokenRevocationClient=new s(g._settings),g._tokenClient=new p(g._settings),g._joseUtil=m,g}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getUser=function(){var e=this;return this._loadUser().then(function(t){return t?(i.Log.info("UserManager.getUser: user loaded"),e._events.load(t,!1),t):(i.Log.info("UserManager.getUser: user not found in storage"),null)})},t.prototype.removeUser=function(){var e=this;return this.storeUser(null).then(function(){i.Log.info("UserManager.removeUser: user removed from storage"),e._events.unload()})},t.prototype.signinRedirect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="si:r";var t={useReplaceToNavigate:e.useReplaceToNavigate};return this._signinStart(e,this._redirectNavigator,t).then(function(){i.Log.info("UserManager.signinRedirect: successful")})},t.prototype.signinRedirectCallback=function(e){return this._signinEnd(e||this._redirectNavigator.url).then(function(e){return e.profile&&e.profile.sub?i.Log.info("UserManager.signinRedirectCallback: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinRedirectCallback: no sub"),e})},t.prototype.signinPopup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="si:p";var t=e.redirect_uri||this.settings.popup_redirect_uri||this.settings.redirect_uri;return t?(e.redirect_uri=t,e.display="popup",this._signin(e,this._popupNavigator,{startUrl:t,popupWindowFeatures:e.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:e.popupWindowTarget||this.settings.popupWindowTarget}).then(function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinPopup: signinPopup successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinPopup: no sub")),e})):(i.Log.error("UserManager.signinPopup: No popup_redirect_uri or redirect_uri configured"),Promise.reject(new Error("No popup_redirect_uri or redirect_uri configured")))},t.prototype.signinPopupCallback=function(e){return this._signinCallback(e,this._popupNavigator).then(function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinPopupCallback: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinPopupCallback: no sub")),e}).catch(function(e){i.Log.error(e.message)})},t.prototype.signinSilent=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=Object.assign({},t),this._loadUser().then(function(n){return n&&n.refresh_token?(t.refresh_token=n.refresh_token,e._useRefreshToken(t)):(t.request_type="si:s",t.id_token_hint=t.id_token_hint||e.settings.includeIdTokenInSilentRenew&&n&&n.id_token,n&&e._settings.validateSubOnSilentRenew&&(i.Log.debug("UserManager.signinSilent, subject prior to silent renew: ",n.profile.sub),t.current_sub=n.profile.sub),e._signinSilentIframe(t))})},t.prototype._useRefreshToken=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._tokenClient.exchangeRefreshToken(t).then(function(t){return t?t.access_token?e._loadUser().then(function(n){if(n){var r=Promise.resolve();return t.id_token&&(r=e._validateIdTokenFromTokenRefreshToken(n.profile,t.id_token)),r.then(function(){return i.Log.debug("UserManager._useRefreshToken: refresh token response success"),n.id_token=t.id_token||n.id_token,n.access_token=t.access_token,n.refresh_token=t.refresh_token||n.refresh_token,n.expires_in=t.expires_in,e.storeUser(n).then(function(){return e._events.load(n),n})})}return null}):(i.Log.error("UserManager._useRefreshToken: No access token returned from token endpoint"),Promise.reject("No access token returned from token endpoint")):(i.Log.error("UserManager._useRefreshToken: No response returned from token endpoint"),Promise.reject("No response returned from token endpoint"))})},t.prototype._validateIdTokenFromTokenRefreshToken=function(e,t){var n=this;return this._metadataService.getIssuer().then(function(r){return n.settings.getEpochTime().then(function(a){return n._joseUtil.validateJwtAttributes(t,r,n._settings.client_id,n._settings.clockSkew,a).then(function(t){return t?t.sub!==e.sub?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: sub in id_token does not match current sub"),Promise.reject(new Error("sub in id_token does not match current sub"))):t.auth_time&&t.auth_time!==e.auth_time?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: auth_time in id_token does not match original auth_time"),Promise.reject(new Error("auth_time in id_token does not match original auth_time"))):t.azp&&t.azp!==e.azp?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: azp in id_token does not match original azp"),Promise.reject(new Error("azp in id_token does not match original azp"))):!t.azp&&e.azp?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: azp not in id_token, but present in original id_token"),Promise.reject(new Error("azp not in id_token, but present in original id_token"))):void 0:(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: Failed to validate id_token"),Promise.reject(new Error("Failed to validate id_token")))})})})},t.prototype._signinSilentIframe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.redirect_uri||this.settings.silent_redirect_uri||this.settings.redirect_uri;return t?(e.redirect_uri=t,e.prompt=e.prompt||"none",this._signin(e,this._iframeNavigator,{startUrl:t,silentRequestTimeout:e.silentRequestTimeout||this.settings.silentRequestTimeout}).then(function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinSilent: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinSilent: no sub")),e})):(i.Log.error("UserManager.signinSilent: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))},t.prototype.signinSilentCallback=function(e){return this._signinCallback(e,this._iframeNavigator).then(function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinSilentCallback: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinSilentCallback: no sub")),e})},t.prototype.signinCallback=function(e){var t=this;return this.readSigninResponseState(e).then(function(n){var r=n.state;return n.response,"si:r"===r.request_type?t.signinRedirectCallback(e):"si:p"===r.request_type?t.signinPopupCallback(e):"si:s"===r.request_type?t.signinSilentCallback(e):Promise.reject(new Error("invalid response_type in state"))})},t.prototype.signoutCallback=function(e,t){var n=this;return this.readSignoutResponseState(e).then(function(r){var i=r.state,a=r.response;return i?"so:r"===i.request_type?n.signoutRedirectCallback(e):"so:p"===i.request_type?n.signoutPopupCallback(e,t):Promise.reject(new Error("invalid response_type in state")):a})},t.prototype.querySessionStatus=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).request_type="si:s";var n=t.redirect_uri||this.settings.silent_redirect_uri||this.settings.redirect_uri;return n?(t.redirect_uri=n,t.prompt="none",t.response_type=t.response_type||this.settings.query_status_response_type,t.scope=t.scope||"openid",t.skipUserInfo=!0,this._signinStart(t,this._iframeNavigator,{startUrl:n,silentRequestTimeout:t.silentRequestTimeout||this.settings.silentRequestTimeout}).then(function(t){return e.processSigninResponse(t.url).then(function(e){if(i.Log.debug("UserManager.querySessionStatus: got signin response"),e.session_state&&e.profile.sub)return i.Log.info("UserManager.querySessionStatus: querySessionStatus success for sub: ",e.profile.sub),{session_state:e.session_state,sub:e.profile.sub,sid:e.profile.sid};i.Log.info("querySessionStatus successful, user not authenticated")}).catch(function(t){if(t.session_state&&e.settings.monitorAnonymousSession&&("login_required"==t.message||"consent_required"==t.message||"interaction_required"==t.message||"account_selection_required"==t.message))return i.Log.info("UserManager.querySessionStatus: querySessionStatus success for anonymous user"),{session_state:t.session_state};throw t})})):(i.Log.error("UserManager.querySessionStatus: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))},t.prototype._signin=function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._signinStart(e,t,r).then(function(t){return n._signinEnd(t.url,e)})},t.prototype._signinStart=function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.prepare(r).then(function(t){return i.Log.debug("UserManager._signinStart: got navigator window handle"),n.createSigninRequest(e).then(function(e){return i.Log.debug("UserManager._signinStart: got signin request"),r.url=e.url,r.id=e.state.id,t.navigate(r)}).catch(function(e){throw t.close&&(i.Log.debug("UserManager._signinStart: Error after preparing navigator, closing navigator window"),t.close()),e})})},t.prototype._signinEnd=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.processSigninResponse(e).then(function(e){i.Log.debug("UserManager._signinEnd: got signin response");var r=new s.User(e);if(n.current_sub){if(n.current_sub!==r.profile.sub)return i.Log.debug("UserManager._signinEnd: current user does not match user returned from signin. sub from signin: ",r.profile.sub),Promise.reject(new Error("login_required"));i.Log.debug("UserManager._signinEnd: current user matches user returned from signin")}return t.storeUser(r).then(function(){return i.Log.debug("UserManager._signinEnd: user stored"),t._events.load(r),r})})},t.prototype._signinCallback=function(e,t){i.Log.debug("UserManager._signinCallback");var n="query"===this._settings.response_mode||!this._settings.response_mode&&p.SigninRequest.isCode(this._settings.response_type)?"?":"#";return t.callback(e,void 0,n)},t.prototype.signoutRedirect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="so:r";var t=e.post_logout_redirect_uri||this.settings.post_logout_redirect_uri;t&&(e.post_logout_redirect_uri=t);var n={useReplaceToNavigate:e.useReplaceToNavigate};return this._signoutStart(e,this._redirectNavigator,n).then(function(){i.Log.info("UserManager.signoutRedirect: successful")})},t.prototype.signoutRedirectCallback=function(e){return this._signoutEnd(e||this._redirectNavigator.url).then(function(e){return i.Log.info("UserManager.signoutRedirectCallback: successful"),e})},t.prototype.signoutPopup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="so:p";var t=e.post_logout_redirect_uri||this.settings.popup_post_logout_redirect_uri||this.settings.post_logout_redirect_uri;return e.post_logout_redirect_uri=t,e.display="popup",e.post_logout_redirect_uri&&(e.state=e.state||{}),this._signout(e,this._popupNavigator,{startUrl:t,popupWindowFeatures:e.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:e.popupWindowTarget||this.settings.popupWindowTarget}).then(function(){i.Log.info("UserManager.signoutPopup: successful")})},t.prototype.signoutPopupCallback=function(e,t){return void 0===t&&"boolean"==typeof e&&(t=e,e=null),this._popupNavigator.callback(e,t,"?").then(function(){i.Log.info("UserManager.signoutPopupCallback: successful")})},t.prototype._signout=function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._signoutStart(e,t,r).then(function(e){return n._signoutEnd(e.url)})},t.prototype._signoutStart=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return arguments[1].prepare(n).then(function(r){return i.Log.debug("UserManager._signoutStart: got navigator window handle"),t._loadUser().then(function(a){return i.Log.debug("UserManager._signoutStart: loaded current user from storage"),(t._settings.revokeAccessTokenOnSignout?t._revokeInternal(a):Promise.resolve()).then(function(){var o=e.id_token_hint||a&&a.id_token;return o&&(i.Log.debug("UserManager._signoutStart: Setting id_token into signout request"),e.id_token_hint=o),t.removeUser().then(function(){return i.Log.debug("UserManager._signoutStart: user removed, creating signout request"),t.createSignoutRequest(e).then(function(e){return i.Log.debug("UserManager._signoutStart: got signout request"),n.url=e.url,e.state&&(n.id=e.state.id),r.navigate(n)})})})}).catch(function(e){throw r.close&&(i.Log.debug("UserManager._signoutStart: Error after preparing navigator, closing navigator window"),r.close()),e})})},t.prototype._signoutEnd=function(e){return this.processSignoutResponse(e).then(function(e){return i.Log.debug("UserManager._signoutEnd: got signout response"),e})},t.prototype.revokeAccessToken=function(){var e=this;return this._loadUser().then(function(t){return e._revokeInternal(t,!0).then(function(n){if(n)return i.Log.debug("UserManager.revokeAccessToken: removing token properties from user and re-storing"),t.access_token=null,t.refresh_token=null,t.expires_at=null,t.token_type=null,e.storeUser(t).then(function(){i.Log.debug("UserManager.revokeAccessToken: user stored"),e._events.load(t)})})}).then(function(){i.Log.info("UserManager.revokeAccessToken: access token revoked successfully")})},t.prototype._revokeInternal=function(e,t){var n=this;if(e){var r=e.access_token,a=e.refresh_token;return this._revokeAccessTokenInternal(r,t).then(function(e){return n._revokeRefreshTokenInternal(a,t).then(function(t){return e||t||i.Log.debug("UserManager.revokeAccessToken: no need to revoke due to no token(s), or JWT format"),e||t})})}return Promise.resolve(!1)},t.prototype._revokeAccessTokenInternal=function(e,t){return!e||e.indexOf(".")>=0?Promise.resolve(!1):this._tokenRevocationClient.revoke(e,t).then(function(){return!0})},t.prototype._revokeRefreshTokenInternal=function(e,t){return e?this._tokenRevocationClient.revoke(e,t,"refresh_token").then(function(){return!0}):Promise.resolve(!1)},t.prototype.startSilentRenew=function(){this._silentRenewService.start()},t.prototype.stopSilentRenew=function(){this._silentRenewService.stop()},t.prototype._loadUser=function(){return this._userStore.get(this._userStoreKey).then(function(e){return e?(i.Log.debug("UserManager._loadUser: user storageString loaded"),s.User.fromStorageString(e)):(i.Log.debug("UserManager._loadUser: no user storageString"),null)})},t.prototype.storeUser=function(e){if(e){i.Log.debug("UserManager.storeUser: storing user");var t=e.toStorageString();return this._userStore.set(this._userStoreKey,t)}return i.Log.debug("storeUser.storeUser: removing user"),this._userStore.remove(this._userStoreKey)},r(t,[{key:"_redirectNavigator",get:function(){return this.settings.redirectNavigator}},{key:"_popupNavigator",get:function(){return this.settings.popupNavigator}},{key:"_iframeNavigator",get:function(){return this.settings.iframeNavigator}},{key:"_userStore",get:function(){return this.settings.userStore}},{key:"events",get:function(){return this._events}},{key:"_userStoreKey",get:function(){return"user:"+this.settings.authority+":"+this.settings.client_id}}]),t}(a.OidcClient)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UserManagerSettings=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=(n(0),n(5)),a=n(40),o=n(41),s=n(43),c=n(6),l=n(1),u=n(8);t.UserManagerSettings=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.popup_redirect_uri,i=n.popup_post_logout_redirect_uri,p=n.popupWindowFeatures,d=n.popupWindowTarget,f=n.silent_redirect_uri,h=n.silentRequestTimeout,m=n.automaticSilentRenew,g=void 0!==m&&m,v=n.validateSubOnSilentRenew,b=void 0!==v&&v,y=n.includeIdTokenInSilentRenew,w=void 0===y||y,x=n.monitorSession,k=void 0===x||x,_=n.monitorAnonymousSession,E=void 0!==_&&_,C=n.checkSessionInterval,S=void 0===C?2e3:C,A=n.stopCheckSessionOnError,T=void 0===A||A,P=n.query_status_response_type,R=n.revokeAccessTokenOnSignout,I=void 0!==R&&R,F=n.accessTokenExpiringNotificationTime,N=void 0===F?60:F,O=n.redirectNavigator,L=void 0===O?new a.RedirectNavigator:O,j=n.popupNavigator,M=void 0===j?new o.PopupNavigator:j,D=n.iframeNavigator,U=void 0===D?new s.IFrameNavigator:D,B=n.userStore,z=void 0===B?new c.WebStorageStateStore({store:l.Global.sessionStorage}):B;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var H=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,arguments[0]));return H._popup_redirect_uri=r,H._popup_post_logout_redirect_uri=i,H._popupWindowFeatures=p,H._popupWindowTarget=d,H._silent_redirect_uri=f,H._silentRequestTimeout=h,H._automaticSilentRenew=g,H._validateSubOnSilentRenew=b,H._includeIdTokenInSilentRenew=w,H._accessTokenExpiringNotificationTime=N,H._monitorSession=k,H._monitorAnonymousSession=E,H._checkSessionInterval=S,H._stopCheckSessionOnError=T,P?H._query_status_response_type=P:arguments[0]&&arguments[0].response_type?H._query_status_response_type=u.SigninRequest.isOidc(arguments[0].response_type)?"id_token":"code":H._query_status_response_type="id_token",H._revokeAccessTokenOnSignout=I,H._redirectNavigator=L,H._popupNavigator=M,H._iframeNavigator=U,H._userStore=z,H}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"popup_redirect_uri",get:function(){return this._popup_redirect_uri}},{key:"popup_post_logout_redirect_uri",get:function(){return this._popup_post_logout_redirect_uri}},{key:"popupWindowFeatures",get:function(){return this._popupWindowFeatures}},{key:"popupWindowTarget",get:function(){return this._popupWindowTarget}},{key:"silent_redirect_uri",get:function(){return this._silent_redirect_uri}},{key:"silentRequestTimeout",get:function(){return this._silentRequestTimeout}},{key:"automaticSilentRenew",get:function(){return this._automaticSilentRenew}},{key:"validateSubOnSilentRenew",get:function(){return this._validateSubOnSilentRenew}},{key:"includeIdTokenInSilentRenew",get:function(){return this._includeIdTokenInSilentRenew}},{key:"accessTokenExpiringNotificationTime",get:function(){return this._accessTokenExpiringNotificationTime}},{key:"monitorSession",get:function(){return this._monitorSession}},{key:"monitorAnonymousSession",get:function(){return this._monitorAnonymousSession}},{key:"checkSessionInterval",get:function(){return this._checkSessionInterval}},{key:"stopCheckSessionOnError",get:function(){return this._stopCheckSessionOnError}},{key:"query_status_response_type",get:function(){return this._query_status_response_type}},{key:"revokeAccessTokenOnSignout",get:function(){return this._revokeAccessTokenOnSignout}},{key:"redirectNavigator",get:function(){return this._redirectNavigator}},{key:"popupNavigator",get:function(){return this._popupNavigator}},{key:"iframeNavigator",get:function(){return this._iframeNavigator}},{key:"userStore",get:function(){return this._userStore}}]),t}(i.OidcClientSettings)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.RedirectNavigator=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0);t.RedirectNavigator=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function(){return Promise.resolve(this)},e.prototype.navigate=function(e){return e&&e.url?(e.useReplaceToNavigate?window.location.replace(e.url):window.location=e.url,Promise.resolve()):(i.Log.error("RedirectNavigator.navigate: No url provided"),Promise.reject(new Error("No url provided")))},r(e,[{key:"url",get:function(){return window.location.href}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PopupNavigator=void 0;var r=n(0),i=n(42);t.PopupNavigator=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function(e){var t=new i.PopupWindow(e);return Promise.resolve(t)},e.prototype.callback=function e(t,n,a){r.Log.debug("PopupNavigator.callback");try{return i.PopupWindow.notifyOpener(t,n,a),Promise.resolve()}catch(e){return Promise.reject(e)}},e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PopupWindow=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=n(3);t.PopupWindow=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._promise=new Promise(function(e,t){n._resolve=e,n._reject=t});var r=t.popupWindowTarget||"_blank",a=t.popupWindowFeatures||"location=no,toolbar=no,width=500,height=500,left=100,top=100;";this._popup=window.open("",r,a),this._popup&&(i.Log.debug("PopupWindow.ctor: popup successfully created"),this._checkForPopupClosedTimer=window.setInterval(this._checkForPopupClosed.bind(this),500))}return e.prototype.navigate=function(e){return this._popup?e&&e.url?(i.Log.debug("PopupWindow.navigate: Setting URL in popup"),this._id=e.id,this._id&&(window["popupCallback_"+e.id]=this._callback.bind(this)),this._popup.focus(),this._popup.window.location=e.url):(this._error("PopupWindow.navigate: no url provided"),this._error("No url provided")):this._error("PopupWindow.navigate: Error opening popup window"),this.promise},e.prototype._success=function(e){i.Log.debug("PopupWindow.callback: Successful response from popup window"),this._cleanup(),this._resolve(e)},e.prototype._error=function(e){i.Log.error("PopupWindow.error: ",e),this._cleanup(),this._reject(new Error(e))},e.prototype.close=function(){this._cleanup(!1)},e.prototype._cleanup=function(e){i.Log.debug("PopupWindow.cleanup"),window.clearInterval(this._checkForPopupClosedTimer),this._checkForPopupClosedTimer=null,delete window["popupCallback_"+this._id],this._popup&&!e&&this._popup.close(),this._popup=null},e.prototype._checkForPopupClosed=function(){this._popup&&!this._popup.closed||this._error("Popup window closed")},e.prototype._callback=function(e,t){this._cleanup(t),e?(i.Log.debug("PopupWindow.callback success"),this._success({url:e})):(i.Log.debug("PopupWindow.callback: Invalid response from popup"),this._error("Invalid response from popup"))},e.notifyOpener=function(e,t,n){if(window.opener){if(e=e||window.location.href){var r=a.UrlUtility.parseUrlFragment(e,n);if(r.state){var o="popupCallback_"+r.state,s=window.opener[o];s?(i.Log.debug("PopupWindow.notifyOpener: passing url message to opener"),s(e,t)):i.Log.warn("PopupWindow.notifyOpener: no matching callback found on opener")}else i.Log.warn("PopupWindow.notifyOpener: no state found in response url")}}else i.Log.warn("PopupWindow.notifyOpener: no window.opener. Can't complete notification.")},r(e,[{key:"promise",get:function(){return this._promise}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.IFrameNavigator=void 0;var r=n(0),i=n(44);t.IFrameNavigator=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function(e){var t=new i.IFrameWindow(e);return Promise.resolve(t)},e.prototype.callback=function e(t){r.Log.debug("IFrameNavigator.callback");try{return i.IFrameWindow.notifyParent(t),Promise.resolve()}catch(e){return Promise.reject(e)}},e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.IFrameWindow=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0);t.IFrameWindow=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._promise=new Promise(function(e,t){n._resolve=e,n._reject=t}),this._boundMessageEvent=this._message.bind(this),window.addEventListener("message",this._boundMessageEvent,!1),this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="absolute",this._frame.width=0,this._frame.height=0,window.document.body.appendChild(this._frame)}return e.prototype.navigate=function(e){if(e&&e.url){var t=e.silentRequestTimeout||1e4;i.Log.debug("IFrameWindow.navigate: Using timeout of:",t),this._timer=window.setTimeout(this._timeout.bind(this),t),this._frame.src=e.url}else this._error("No url provided");return this.promise},e.prototype._success=function(e){this._cleanup(),i.Log.debug("IFrameWindow: Successful response from frame window"),this._resolve(e)},e.prototype._error=function(e){this._cleanup(),i.Log.error(e),this._reject(new Error(e))},e.prototype.close=function(){this._cleanup()},e.prototype._cleanup=function(){this._frame&&(i.Log.debug("IFrameWindow: cleanup"),window.removeEventListener("message",this._boundMessageEvent,!1),window.clearTimeout(this._timer),window.document.body.removeChild(this._frame),this._timer=null,this._frame=null,this._boundMessageEvent=null)},e.prototype._timeout=function(){i.Log.debug("IFrameWindow.timeout"),this._error("Frame window timed out")},e.prototype._message=function(e){if(i.Log.debug("IFrameWindow.message"),this._timer&&e.origin===this._origin&&e.source===this._frame.contentWindow&&"string"==typeof e.data&&(e.data.startsWith("http://")||e.data.startsWith("https://"))){var t=e.data;t?this._success({url:t}):this._error("Invalid response from frame")}},e.notifyParent=function(e){i.Log.debug("IFrameWindow.notifyParent"),(e=e||window.location.href)&&(i.Log.debug("IFrameWindow.notifyParent: posting url message to parent"),window.parent.postMessage(e,location.protocol+"//"+location.host))},r(e,[{key:"promise",get:function(){return this._promise}},{key:"_origin",get:function(){return location.protocol+"//"+location.host}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UserManagerEvents=void 0;var r=n(0),i=n(16),a=n(17);t.UserManagerEvents=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r._userLoaded=new a.Event("User loaded"),r._userUnloaded=new a.Event("User unloaded"),r._silentRenewError=new a.Event("Silent renew error"),r._userSignedIn=new a.Event("User signed in"),r._userSignedOut=new a.Event("User signed out"),r._userSessionChanged=new a.Event("User session changed"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.load=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];r.Log.debug("UserManagerEvents.load"),e.prototype.load.call(this,t),n&&this._userLoaded.raise(t)},t.prototype.unload=function(){r.Log.debug("UserManagerEvents.unload"),e.prototype.unload.call(this),this._userUnloaded.raise()},t.prototype.addUserLoaded=function(e){this._userLoaded.addHandler(e)},t.prototype.removeUserLoaded=function(e){this._userLoaded.removeHandler(e)},t.prototype.addUserUnloaded=function(e){this._userUnloaded.addHandler(e)},t.prototype.removeUserUnloaded=function(e){this._userUnloaded.removeHandler(e)},t.prototype.addSilentRenewError=function(e){this._silentRenewError.addHandler(e)},t.prototype.removeSilentRenewError=function(e){this._silentRenewError.removeHandler(e)},t.prototype._raiseSilentRenewError=function(e){r.Log.debug("UserManagerEvents._raiseSilentRenewError",e.message),this._silentRenewError.raise(e)},t.prototype.addUserSignedIn=function(e){this._userSignedIn.addHandler(e)},t.prototype.removeUserSignedIn=function(e){this._userSignedIn.removeHandler(e)},t.prototype._raiseUserSignedIn=function(){r.Log.debug("UserManagerEvents._raiseUserSignedIn"),this._userSignedIn.raise()},t.prototype.addUserSignedOut=function(e){this._userSignedOut.addHandler(e)},t.prototype.removeUserSignedOut=function(e){this._userSignedOut.removeHandler(e)},t.prototype._raiseUserSignedOut=function(){r.Log.debug("UserManagerEvents._raiseUserSignedOut"),this._userSignedOut.raise()},t.prototype.addUserSessionChanged=function(e){this._userSessionChanged.addHandler(e)},t.prototype.removeUserSessionChanged=function(e){this._userSessionChanged.removeHandler(e)},t.prototype._raiseUserSessionChanged=function(){r.Log.debug("UserManagerEvents._raiseUserSessionChanged"),this._userSessionChanged.raise()},t}(i.AccessTokenEvents)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Timer=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=n(1),o=n(17);t.Timer=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.Global.timer,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return o._timer=r,o._nowFunc=i||function(){return Date.now()/1e3},o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.init=function(e){e<=0&&(e=1),e=parseInt(e);var t=this.now+e;if(this.expiration===t&&this._timerHandle)i.Log.debug("Timer.init timer "+this._name+" skipping initialization since already initialized for expiration:",this.expiration);else{this.cancel(),i.Log.debug("Timer.init timer "+this._name+" for duration:",e),this._expiration=t;var n=5;e<n&&(n=e),this._timerHandle=this._timer.setInterval(this._callback.bind(this),1e3*n)}},t.prototype.cancel=function(){this._timerHandle&&(i.Log.debug("Timer.cancel: ",this._name),this._timer.clearInterval(this._timerHandle),this._timerHandle=null)},t.prototype._callback=function(){var t=this._expiration-this.now;i.Log.debug("Timer.callback; "+this._name+" timer expires in:",t),this._expiration<=this.now&&(this.cancel(),e.prototype.raise.call(this))},r(t,[{key:"now",get:function(){return parseInt(this._nowFunc())}},{key:"expiration",get:function(){return this._expiration}}]),t}(o.Event)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SilentRenewService=void 0;var r=n(0);t.SilentRenewService=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._userManager=t}return e.prototype.start=function(){this._callback||(this._callback=this._tokenExpiring.bind(this),this._userManager.events.addAccessTokenExpiring(this._callback),this._userManager.getUser().then(function(e){}).catch(function(e){r.Log.error("SilentRenewService.start: Error from getUser:",e.message)}))},e.prototype.stop=function(){this._callback&&(this._userManager.events.removeAccessTokenExpiring(this._callback),delete this._callback)},e.prototype._tokenExpiring=function(){var e=this;this._userManager.signinSilent().then(function(e){r.Log.debug("SilentRenewService._tokenExpiring: Silent token renewal successful")},function(t){r.Log.error("SilentRenewService._tokenExpiring: Error from signinSilent:",t.message),e._userManager.events._raiseSilentRenewError(t)})},e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CordovaPopupNavigator=void 0;var r=n(21);t.CordovaPopupNavigator=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function(e){var t=new r.CordovaPopupWindow(e);return Promise.resolve(t)},e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CordovaIFrameNavigator=void 0;var r=n(21);t.CordovaIFrameNavigator=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function(e){e.popupWindowFeatures="hidden=yes";var t=new r.CordovaPopupWindow(e);return Promise.resolve(t)},e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Version="1.11.6"}])},e.exports=t()},7(e){var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}m(e,t,a,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,n)}(e,i,{once:!0})})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,a,o;if(s(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),void 0===o)o=a[t]=n,++e._eventsCount;else if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,console&&console.warn}return e}function u(){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 p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):h(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);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(a){r.once&&e.removeEventListener(t,i),n(a)})}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},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+".");o=e}}),a.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},a.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},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var c=a[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var l=c.length,u=h(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,o;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},a.prototype.listenerCount=f,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},386(e){const t={acl:"http://www.w3.org/ns/auth/acl#",arg:"http://www.w3.org/ns/pim/arg#",as:"https://www.w3.org/ns/activitystreams#",bookmark:"http://www.w3.org/2002/01/bookmark#",cal:"http://www.w3.org/2002/12/cal/ical#",cco:"http://www.ontologyrepository.com/CommonCoreOntologies/",cert:"http://www.w3.org/ns/auth/cert#",contact:"http://www.w3.org/2000/10/swap/pim/contact#",dc:"http://purl.org/dc/elements/1.1/",dct:"http://purl.org/dc/terms/",doap:"http://usefulinc.com/ns/doap#",foaf:"http://xmlns.com/foaf/0.1/",geo:"http://www.w3.org/2003/01/geo/wgs84_pos#",gpx:"http://www.w3.org/ns/pim/gpx#",gr:"http://purl.org/goodrelations/v1#",http:"http://www.w3.org/2007/ont/http#",httph:"http://www.w3.org/2007/ont/httph#",icalTZ:"http://www.w3.org/2002/12/cal/icaltzd#",ldp:"http://www.w3.org/ns/ldp#",link:"http://www.w3.org/2007/ont/link#",log:"http://www.w3.org/2000/10/swap/log#",meeting:"http://www.w3.org/ns/pim/meeting#",mo:"http://purl.org/ontology/mo/",org:"http://www.w3.org/ns/org#",owl:"http://www.w3.org/2002/07/owl#",pad:"http://www.w3.org/ns/pim/pad#",patch:"http://www.w3.org/ns/pim/patch#",prov:"http://www.w3.org/ns/prov#",pto:"http://www.productontology.org/id/",qu:"http://www.w3.org/2000/10/swap/pim/qif#",trip:"http://www.w3.org/ns/pim/trip#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",rss:"http://purl.org/rss/1.0/",sched:"http://www.w3.org/ns/pim/schedule#",schema:"http://schema.org/",sioc:"http://rdfs.org/sioc/ns#",skos:"http://www.w3.org/2004/02/skos/core#",solid:"http://www.w3.org/ns/solid/terms#",space:"http://www.w3.org/ns/pim/space#",stat:"http://www.w3.org/ns/posix/stat#",tab:"http://www.w3.org/2007/ont/link#",tabont:"http://www.w3.org/2007/ont/link#",ui:"http://www.w3.org/ns/ui#",vann:"http://purl.org/vocab/vann/",vcard:"http://www.w3.org/2006/vcard/ns#",wf:"http://www.w3.org/2005/01/wf/flow#",xsd:"http://www.w3.org/2001/XMLSchema#"};e.exports=function(e={namedNode:e=>e}){const n={};for(const r in t){const i=t[r];n[r]=function(t=""){return e.namedNode(i+t)}}return n}}},a={};function o(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e].call(n.exports,n,n.exports,o),n.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const s=new TextEncoder,c=new TextDecoder;function l(...e){const t=e.reduce((e,{length:t})=>e+t,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}const u=e=>(e=>{let t=e;"string"==typeof t&&(t=s.encode(t));const n=[];for(let e=0;e<t.length;e+=32768)n.push(String.fromCharCode.apply(null,t.subarray(e,e+32768)));return btoa(n.join(""))})(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),p=e=>{let t=e;t instanceof Uint8Array&&(t=c.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return(e=>{const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n})(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};class d extends Error{constructor(e,t){super(e,t),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}d.code="ERR_JOSE_GENERIC";class f extends d{constructor(e,t,n="unspecified",r="unspecified"){super(e,{cause:{claim:n,reason:r,payload:t}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=n,this.reason=r,this.payload=t}}f.code="ERR_JWT_CLAIM_VALIDATION_FAILED";class h extends d{constructor(e,t,n="unspecified",r="unspecified"){super(e,{cause:{claim:n,reason:r,payload:t}}),this.code="ERR_JWT_EXPIRED",this.claim=n,this.reason=r,this.payload=t}}h.code="ERR_JWT_EXPIRED";class m extends d{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}}m.code="ERR_JOSE_ALG_NOT_ALLOWED";class g extends d{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}}g.code="ERR_JOSE_NOT_SUPPORTED";(class extends d{constructor(e="decryption operation failed",t){super(e,t),this.code="ERR_JWE_DECRYPTION_FAILED"}}).code="ERR_JWE_DECRYPTION_FAILED";(class extends d{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}}).code="ERR_JWE_INVALID";class v extends d{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}}v.code="ERR_JWS_INVALID";class b extends d{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}}b.code="ERR_JWT_INVALID";(class extends d{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}}).code="ERR_JWK_INVALID";class y extends d{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}}y.code="ERR_JWKS_INVALID";class w extends d{constructor(e="no applicable key found in the JSON Web Key Set",t){super(e,t),this.code="ERR_JWKS_NO_MATCHING_KEY"}}w.code="ERR_JWKS_NO_MATCHING_KEY";class x extends d{constructor(e="multiple matching keys found in the JSON Web Key Set",t){super(e,t),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}Symbol.asyncIterator,x.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";class k extends d{constructor(e="request timed out",t){super(e,t),this.code="ERR_JWKS_TIMEOUT"}}k.code="ERR_JWKS_TIMEOUT";class _ extends d{constructor(e="signature verification failed",t){super(e,t),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}function E(e,t){const n=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:n,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:n,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:n,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:n,name:"ECDSA",namedCurve:t.namedCurve};case"Ed25519":return{name:"Ed25519"};case"EdDSA":return{name:t.name};default:throw new g(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}_.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";const C=crypto,S=e=>e instanceof CryptoKey,A=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:n}=t.algorithm;if("number"!=typeof n||n<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};function T(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function P(e,t){return e.name===t}function R(e){return parseInt(e.name.slice(4),10)}function I(e,t){if(t.length&&!t.some(t=>e.usages.includes(t))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const n=t.pop();e+=`one of ${t.join(", ")}, or ${n}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw new TypeError(e)}}function F(e,t,...n){switch(t){case"HS256":case"HS384":case"HS512":{if(!P(e.algorithm,"HMAC"))throw T("HMAC");const n=parseInt(t.slice(2),10);if(R(e.algorithm.hash)!==n)throw T(`SHA-${n}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!P(e.algorithm,"RSASSA-PKCS1-v1_5"))throw T("RSASSA-PKCS1-v1_5");const n=parseInt(t.slice(2),10);if(R(e.algorithm.hash)!==n)throw T(`SHA-${n}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!P(e.algorithm,"RSA-PSS"))throw T("RSA-PSS");const n=parseInt(t.slice(2),10);if(R(e.algorithm.hash)!==n)throw T(`SHA-${n}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw T("Ed25519 or Ed448");break;case"Ed25519":if(!P(e.algorithm,"Ed25519"))throw T("Ed25519");break;case"ES256":case"ES384":case"ES512":{if(!P(e.algorithm,"ECDSA"))throw T("ECDSA");const n=function(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}(t);if(e.algorithm.namedCurve!==n)throw T(n,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}I(e,n)}function N(e,t,...n){if((n=n.filter(Boolean)).length>2){const t=n.pop();e+=`one of type ${n.join(", ")}, or ${t}.`}else 2===n.length?e+=`one of type ${n[0]} or ${n[1]}.`:e+=`of type ${n[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}const O=(e,...t)=>N("Key must be ",e,...t);function L(e,t,...n){return N(`Key for the ${e} algorithm must be `,t,...n)}const j=e=>!!S(e)||"KeyObject"===e?.[Symbol.toStringTag],M=["CryptoKey"];function D(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let n=e;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}function U(e){return D(e)&&"string"==typeof e.kty}const B=async e=>{if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:t,keyUsages:n}=function(e){let t,n;switch(e.kty){case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},n=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},n=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},n=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new g('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},n=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},n=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},n=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},n=e.d?["deriveBits"]:[];break;default:throw new g('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"Ed25519":t={name:"Ed25519"},n=e.d?["sign"]:["verify"];break;case"EdDSA":t={name:e.crv},n=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},n=e.d?["deriveBits"]:[];break;default:throw new g('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new g('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:n}}(e),r=[t,e.ext??!1,e.key_ops??n],i={...e};return delete i.alg,delete i.use,C.subtle.importKey("jwk",i,...r)},z=e=>p(e);let H,q;const $=e=>"KeyObject"===e?.[Symbol.toStringTag],W=async(e,t,n,r,i=!1)=>{let a=e.get(t);if(a?.[r])return a[r];const o=await B({...n,alg:r});return i&&Object.freeze(t),a?a[r]=o:e.set(t,{[r]:o}),o},V=(e,t)=>{if($(e)){let n=e.export({format:"jwk"});return delete n.d,delete n.dp,delete n.dq,delete n.p,delete n.q,delete n.qi,n.k?z(n.k):(q||(q=new WeakMap),W(q,e,n,t))}if(U(e)){if(e.k)return p(e.k);q||(q=new WeakMap);return W(q,e,e,t,!0)}return e},G=(e,t)=>{if($(e)){let n=e.export({format:"jwk"});return n.k?z(n.k):(H||(H=new WeakMap),W(H,e,n,t))}if(U(e)){if(e.k)return p(e.k);H||(H=new WeakMap);return W(H,e,e,t,!0)}return e};async function K(e,t,n){if("sign"===n&&(t=await G(t,e)),"verify"===n&&(t=await V(t,e)),S(t))return F(t,e,n),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(O(t,...M));return C.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[n])}throw new TypeError(O(t,...M,"Uint8Array","JSON Web Key"))}const J=async(e,t,n,r)=>{const i=await K(e,t,"verify");A(e,i);const a=E(e,i.algorithm);try{return await C.subtle.verify(a,i,n,r)}catch{return!1}},Q=(...e)=>{const t=e.filter(Boolean);if(0===t.length||1===t.length)return!0;let n;for(const e of t){const t=Object.keys(e);if(n&&0!==n.size)for(const e of t){if(n.has(e))return!1;n.add(e)}else n=new Set(t)}return!0},Y=e=>e?.[Symbol.toStringTag],X=(e,t,n)=>{if(void 0!==t.use&&"sig"!==t.use)throw new TypeError("Invalid key for this operation, when present its use must be sig");if(void 0!==t.key_ops&&!0!==t.key_ops.includes?.(n))throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${n}`);if(void 0!==t.alg&&t.alg!==e)throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);return!0},Z=(e,t,n,r)=>{if(!(t instanceof Uint8Array)){if(r&&U(t)){if(function(e){return U(e)&&"oct"===e.kty&&"string"==typeof e.k}(t)&&X(e,t,n))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!j(t))throw new TypeError(L(e,t,...M,"Uint8Array",r?"JSON Web Key":null));if("secret"!==t.type)throw new TypeError(`${Y(t)} instances for symmetric algorithms must be of type "secret"`)}};function ee(e,t,n,r){t.startsWith("HS")||"dir"===t||t.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(t)?Z(t,n,r,e):((e,t,n,r)=>{if(r&&U(t))switch(n){case"sign":if(function(e){return"oct"!==e.kty&&"string"==typeof e.d}(t)&&X(e,t,n))return;throw new TypeError("JSON Web Key for this operation be a private JWK");case"verify":if(function(e){return"oct"!==e.kty&&void 0===e.d}(t)&&X(e,t,n))return;throw new TypeError("JSON Web Key for this operation be a public JWK")}if(!j(t))throw new TypeError(L(e,t,...M,r?"JSON Web Key":null));if("secret"===t.type)throw new TypeError(`${Y(t)} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===n&&"public"===t.type)throw new TypeError(`${Y(t)} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===n&&"public"===t.type)throw new TypeError(`${Y(t)} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===n&&"private"===t.type)throw new TypeError(`${Y(t)} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===n&&"private"===t.type)throw new TypeError(`${Y(t)} instances for asymmetric algorithm encryption must be of type "public"`)})(t,n,r,e)}ee.bind(void 0,!1);const te=ee.bind(void 0,!0);const ne=function(e,t,n,r,i){if(void 0!==i.crit&&void 0===r?.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!r||void 0===r.crit)return new Set;if(!Array.isArray(r.crit)||0===r.crit.length||r.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let a;a=void 0!==n?new Map([...Object.entries(n),...t.entries()]):t;for(const t of r.crit){if(!a.has(t))throw new g(`Extension Header Parameter "${t}" is not recognized`);if(void 0===i[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(a.get(t)&&void 0===r[t])throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(r.crit)},re=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};async function ie(e,t){if(!D(e))throw new TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return p(e.k);case"RSA":if("oth"in e&&void 0!==e.oth)throw new g('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return B({...e,alg:t});default:throw new g('Unsupported "kty" (Key Type) Parameter value')}}async function ae(e,t,n){if(e instanceof Uint8Array&&(e=c.decode(e)),"string"!=typeof e)throw new v("Compact JWS must be a string or Uint8Array");const{0:r,1:i,2:a,length:o}=e.split(".");if(3!==o)throw new v("Invalid Compact JWS");const u=await async function(e,t,n){if(!D(e))throw new v("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new v('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new v("JWS Protected Header incorrect type");if(void 0===e.payload)throw new v("JWS Payload missing");if("string"!=typeof e.signature)throw new v("JWS Signature missing or incorrect type");if(void 0!==e.header&&!D(e.header))throw new v("JWS Unprotected Header incorrect type");let r={};if(e.protected)try{const t=p(e.protected);r=JSON.parse(c.decode(t))}catch{throw new v("JWS Protected Header is invalid")}if(!Q(r,e.header))throw new v("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const i={...r,...e.header};let a=!0;if(ne(v,new Map([["b64",!0]]),n?.crit,r,i).has("b64")&&(a=r.b64,"boolean"!=typeof a))throw new v('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:o}=i;if("string"!=typeof o||!o)throw new v('JWS "alg" (Algorithm) Header Parameter missing or invalid');const u=n&&re("algorithms",n.algorithms);if(u&&!u.has(o))throw new m('"alg" (Algorithm) Header Parameter value not allowed');if(a){if("string"!=typeof e.payload)throw new v("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new v("JWS Payload must be a string or an Uint8Array instance");let d=!1;"function"==typeof t?(t=await t(r,e),d=!0,te(o,t,"verify"),U(t)&&(t=await ie(t,o))):te(o,t,"verify");const f=l(s.encode(e.protected??""),s.encode("."),"string"==typeof e.payload?s.encode(e.payload):e.payload);let h,g;try{h=p(e.signature)}catch{throw new v("Failed to base64url decode the signature")}if(!await J(o,t,h,f))throw new _;if(a)try{g=p(e.payload)}catch{throw new v("Failed to base64url decode the payload")}else g="string"==typeof e.payload?s.encode(e.payload):e.payload;const b={payload:g};return void 0!==e.protected&&(b.protectedHeader=r),void 0!==e.header&&(b.unprotectedHeader=e.header),d?{...b,key:t}:b}({payload:i,protected:r,signature:a},t,n),d={payload:u.payload,protectedHeader:u.protectedHeader};return"function"==typeof t?{...d,key:u.key}:d}const oe=e=>Math.floor(e.getTime()/1e3),se=86400,ce=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,le=e=>{const t=ce.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");const n=parseFloat(t[2]);let r;switch(t[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":r=Math.round(n);break;case"minute":case"minutes":case"min":case"mins":case"m":r=Math.round(60*n);break;case"hour":case"hours":case"hr":case"hrs":case"h":r=Math.round(3600*n);break;case"day":case"days":case"d":r=Math.round(n*se);break;case"week":case"weeks":case"w":r=Math.round(604800*n);break;default:r=Math.round(31557600*n)}return"-"===t[1]||"ago"===t[4]?-r:r},ue=e=>e.toLowerCase().replace(/^application\//,""),pe=(e,t,n={})=>{let r;try{r=JSON.parse(c.decode(t))}catch{}if(!D(r))throw new b("JWT Claims Set must be a top-level JSON object");const{typ:i}=n;if(i&&("string"!=typeof e.typ||ue(e.typ)!==ue(i)))throw new f('unexpected "typ" JWT header value',r,"typ","check_failed");const{requiredClaims:a=[],issuer:o,subject:s,audience:l,maxTokenAge:u}=n,p=[...a];void 0!==u&&p.push("iat"),void 0!==l&&p.push("aud"),void 0!==s&&p.push("sub"),void 0!==o&&p.push("iss");for(const e of new Set(p.reverse()))if(!(e in r))throw new f(`missing required "${e}" claim`,r,e,"missing");if(o&&!(Array.isArray(o)?o:[o]).includes(r.iss))throw new f('unexpected "iss" claim value',r,"iss","check_failed");if(s&&r.sub!==s)throw new f('unexpected "sub" claim value',r,"sub","check_failed");if(l&&(d=r.aud,m="string"==typeof l?[l]:l,!("string"==typeof d?m.includes(d):Array.isArray(d)&&m.some(Set.prototype.has.bind(new Set(d))))))throw new f('unexpected "aud" claim value',r,"aud","check_failed");var d,m;let g;switch(typeof n.clockTolerance){case"string":g=le(n.clockTolerance);break;case"number":g=n.clockTolerance;break;case"undefined":g=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:v}=n,y=oe(v||new Date);if((void 0!==r.iat||u)&&"number"!=typeof r.iat)throw new f('"iat" claim must be a number',r,"iat","invalid");if(void 0!==r.nbf){if("number"!=typeof r.nbf)throw new f('"nbf" claim must be a number',r,"nbf","invalid");if(r.nbf>y+g)throw new f('"nbf" claim timestamp check failed',r,"nbf","check_failed")}if(void 0!==r.exp){if("number"!=typeof r.exp)throw new f('"exp" claim must be a number',r,"exp","invalid");if(r.exp<=y-g)throw new h('"exp" claim timestamp check failed',r,"exp","check_failed")}if(u){const e=y-r.iat;if(e-g>("number"==typeof u?u:le(u)))throw new h('"iat" claim timestamp check failed (too far in the past)',r,"iat","check_failed");if(e<0-g)throw new f('"iat" claim timestamp check failed (it should be in the past)',r,"iat","check_failed")}return r};const de=async(e,t,n)=>{let r,i,a=!1;"function"==typeof AbortController&&(r=new AbortController,i=setTimeout(()=>{a=!0,r.abort()},t));const o=await fetch(e.href,{signal:r?r.signal:void 0,redirect:"manual",headers:n.headers}).catch(e=>{if(a)throw new k;throw e});if(void 0!==i&&clearTimeout(i),200!==o.status)throw new d("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await o.json()}catch{throw new d("Failed to parse the JSON Web Key Set HTTP response as JSON")}};function fe(e){return D(e)}function he(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}class me{constructor(e){if(this._cached=new WeakMap,!function(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(fe)}(e))throw new y("JSON Web Key Set malformed");this._jwks=he(e)}async getKey(e,t){const{alg:n,kid:r}={...e,...t?.header},i=function(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new g('Unsupported "alg" value for a JSON Web Key Set')}}(n),a=this._jwks.keys.filter(e=>{let t=i===e.kty;if(t&&"string"==typeof r&&(t=r===e.kid),t&&"string"==typeof e.alg&&(t=n===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t)switch(n){case"ES256":t="P-256"===e.crv;break;case"ES256K":t="secp256k1"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv;break;case"Ed25519":t="Ed25519"===e.crv;break;case"EdDSA":t="Ed25519"===e.crv||"Ed448"===e.crv}return t}),{0:o,length:s}=a;if(0===s)throw new w;if(1!==s){const e=new x,{_cached:t}=this;throw e[Symbol.asyncIterator]=async function*(){for(const e of a)try{yield await ge(t,e,n)}catch{}},e}return ge(this._cached,o,n)}}async function ge(e,t,n){const r=e.get(t)||e.set(t,{}).get(t);if(void 0===r[n]){const e=await ie({...t,ext:!0},n);if(e instanceof Uint8Array||"public"!==e.type)throw new y("JSON Web Key Set members must be public keys");r[n]=e}return r[n]}function ve(e){const t=new me(e),n=async(e,n)=>t.getKey(e,n);return Object.defineProperties(n,{jwks:{value:()=>he(t._jwks),enumerable:!0,configurable:!1,writable:!1}}),n}let be;if("undefined"==typeof navigator||!navigator.userAgent?.startsWith?.("Mozilla/5.0 ")){be=`${"jose"}/${"v5.10.0"}`}const ye=Symbol();class we{constructor(e,t){if(!(e instanceof URL))throw new TypeError("url must be an instance of URL");var n,r;this._url=new URL(e.href),this._options={agent:t?.agent,headers:t?.headers},this._timeoutDuration="number"==typeof t?.timeoutDuration?t?.timeoutDuration:5e3,this._cooldownDuration="number"==typeof t?.cooldownDuration?t?.cooldownDuration:3e4,this._cacheMaxAge="number"==typeof t?.cacheMaxAge?t?.cacheMaxAge:6e5,void 0!==t?.[ye]&&(this._cache=t?.[ye],n=t?.[ye],r=this._cacheMaxAge,"object"==typeof n&&null!==n&&"uat"in n&&"number"==typeof n.uat&&!(Date.now()-n.uat>=r)&&"jwks"in n&&D(n.jwks)&&Array.isArray(n.jwks.keys)&&Array.prototype.every.call(n.jwks.keys,D)&&(this._jwksTimestamp=this._cache.uat,this._local=ve(this._cache.jwks)))}coolingDown(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cooldownDuration}fresh(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cacheMaxAge}async getKey(e,t){this._local&&this.fresh()||await this.reload();try{return await this._local(e,t)}catch(n){if(n instanceof w&&!1===this.coolingDown())return await this.reload(),this._local(e,t);throw n}}async reload(){this._pendingFetch&&("undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&(this._pendingFetch=void 0);const e=new Headers(this._options.headers);be&&!e.has("User-Agent")&&(e.set("User-Agent",be),this._options.headers=Object.fromEntries(e.entries())),this._pendingFetch||(this._pendingFetch=de(this._url,this._timeoutDuration,this._options).then(e=>{this._local=ve(e),this._cache&&(this._cache.uat=Date.now(),this._cache.jwks=e),this._jwksTimestamp=Date.now(),this._pendingFetch=void 0}).catch(e=>{throw this._pendingFetch=void 0,e})),await this._pendingFetch}}const xe=async e=>{if(e instanceof Uint8Array)return{kty:"oct",k:u(e)};if(!S(e))throw new TypeError(O(e,...M,"Uint8Array"));if(!e.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");const{ext:t,key_ops:n,alg:r,use:i,...a}=await C.subtle.exportKey("jwk",e);return a};async function ke(e){return xe(e)}const _e=async(e,t,n)=>{const r=await K(e,t,"sign");A(e,r);const i=await C.subtle.sign(E(e,r.algorithm),r,n);return new Uint8Array(i)};class Ee{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader)throw new v("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!Q(this._protectedHeader,this._unprotectedHeader))throw new v("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const n={...this._protectedHeader,...this._unprotectedHeader};let r=!0;if(ne(v,new Map([["b64",!0]]),t?.crit,this._protectedHeader,n).has("b64")&&(r=this._protectedHeader.b64,"boolean"!=typeof r))throw new v('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:i}=n;if("string"!=typeof i||!i)throw new v('JWS "alg" (Algorithm) Header Parameter missing or invalid');te(i,e,"sign");let a,o=this._payload;r&&(o=s.encode(u(o))),a=this._protectedHeader?s.encode(u(JSON.stringify(this._protectedHeader))):s.encode("");const p=l(a,s.encode("."),o),d=await _e(i,e,p),f={signature:u(d),payload:""};return r&&(f.payload=c.decode(o)),this._unprotectedHeader&&(f.header=this._unprotectedHeader),this._protectedHeader&&(f.protected=c.decode(a)),f}}class Ce{constructor(e){this._flattened=new Ee(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){const n=await this._flattened.sign(e,t);if(void 0===n.payload)throw new TypeError("use the flattened module for creating JWS with b64: false");return`${n.protected}.${n.payload}.${n.signature}`}}function Se(e,t){if(!Number.isFinite(t))throw new TypeError(`Invalid ${e} input`);return t}class Ae{constructor(e={}){if(!D(e))throw new TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return"number"==typeof e?this._payload={...this._payload,nbf:Se("setNotBefore",e)}:e instanceof Date?this._payload={...this._payload,nbf:Se("setNotBefore",oe(e))}:this._payload={...this._payload,nbf:oe(new Date)+le(e)},this}setExpirationTime(e){return"number"==typeof e?this._payload={...this._payload,exp:Se("setExpirationTime",e)}:e instanceof Date?this._payload={...this._payload,exp:Se("setExpirationTime",oe(e))}:this._payload={...this._payload,exp:oe(new Date)+le(e)},this}setIssuedAt(e){return void 0===e?this._payload={...this._payload,iat:oe(new Date)}:e instanceof Date?this._payload={...this._payload,iat:Se("setIssuedAt",oe(e))}:this._payload="string"==typeof e?{...this._payload,iat:Se("setIssuedAt",oe(new Date)+le(e))}:{...this._payload,iat:Se("setIssuedAt",e)},this}}class Te extends Ae{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){const n=new Ce(s.encode(JSON.stringify(this._payload)));if(n.setProtectedHeader(this._protectedHeader),Array.isArray(this._protectedHeader?.crit)&&this._protectedHeader.crit.includes("b64")&&!1===this._protectedHeader.b64)throw new b("JWTs MUST NOT use unencoded payload");return n.sign(e,t)}}function Pe(e){const t=e?.modulusLength??2048;if("number"!=typeof t||t<2048)throw new g("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return t}async function Re(e,t){return async function(e,t){let n,r;switch(e){case"PS256":case"PS384":case"PS512":n={name:"RSA-PSS",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Pe(t)},r=["sign","verify"];break;case"RS256":case"RS384":case"RS512":n={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Pe(t)},r=["sign","verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":n={name:"RSA-OAEP",hash:`SHA-${parseInt(e.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Pe(t)},r=["decrypt","unwrapKey","encrypt","wrapKey"];break;case"ES256":n={name:"ECDSA",namedCurve:"P-256"},r=["sign","verify"];break;case"ES384":n={name:"ECDSA",namedCurve:"P-384"},r=["sign","verify"];break;case"ES512":n={name:"ECDSA",namedCurve:"P-521"},r=["sign","verify"];break;case"Ed25519":n={name:"Ed25519"},r=["sign","verify"];break;case"EdDSA":{r=["sign","verify"];const e=t?.crv??"Ed25519";switch(e){case"Ed25519":case"Ed448":n={name:e};break;default:throw new g("Invalid or unsupported crv option provided")}break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{r=["deriveKey","deriveBits"];const e=t?.crv??"P-256";switch(e){case"P-256":case"P-384":case"P-521":n={name:"ECDH",namedCurve:e};break;case"X25519":case"X448":n={name:e};break;default:throw new g("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new g('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return C.subtle.generateKey(n,t?.extractable??!1,r)}(e,t)}const Ie={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Fe;const Ne=new Uint8Array(16);const Oe=[];for(let e=0;e<256;++e)Oe.push((e+256).toString(16).slice(1));function Le(e,t=0){return(Oe[e[t+0]]+Oe[e[t+1]]+Oe[e[t+2]]+Oe[e[t+3]]+"-"+Oe[e[t+4]]+Oe[e[t+5]]+"-"+Oe[e[t+6]]+Oe[e[t+7]]+"-"+Oe[e[t+8]]+Oe[e[t+9]]+"-"+Oe[e[t+10]]+Oe[e[t+11]]+Oe[e[t+12]]+Oe[e[t+13]]+Oe[e[t+14]]+Oe[e[t+15]]).toLowerCase()}const je=function(e,t,n){if(Ie.randomUUID&&!t&&!e)return Ie.randomUUID();const r=(e=e||{}).random??e.rng?.()??function(){if(!Fe){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Fe=crypto.getRandomValues.bind(crypto)}return Fe(Ne)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Le(r)},Me="solidClientAuthn:",De=["ES256","RS256"],Ue="error",Be="login",ze="logout",He="newRefreshToken",qe="sessionExpired",$e="sessionExtended",We="sessionRestore",Ve="timeoutSet",Ge=["openid","offline_access","webid"];class Ke{handleables;constructor(e){this.handleables=e,this.handleables=e}async getProperHandler(e){const t=await Promise.all(this.handleables.map(t=>t.canHandle(...e)));for(let e=0;e<t.length;e+=1)if(t[e])return this.handleables[e];return null}async canHandle(...e){return null!==await this.getProperHandler(e)}async handle(...e){const t=await this.getProperHandler(e);if(t)return t.handle(...e);throw new Error(`[${this.constructor.name}] cannot find a suitable handler for: ${e.map(e=>{try{return JSON.stringify(e)}catch(t){return e.toString()}}).join(", ")}`)}}async function Je(e,t,n,r){let i,a;try{const{payload:a}=await async function(e,t,n){const r=await ae(e,t,n);if(r.protectedHeader.crit?.includes("b64")&&!1===r.protectedHeader.b64)throw new b("JWTs MUST NOT use unencoded payload");const i={payload:pe(r.protectedHeader,r.payload,n),protectedHeader:r.protectedHeader};return"function"==typeof t?{...i,key:r.key}:i}(e,function(e,t){const n=new we(e,t),r=async(e,t)=>n.getKey(e,t);return Object.defineProperties(r,{coolingDown:{get:()=>n.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>n.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>n.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>!!n._pendingFetch,enumerable:!0,configurable:!1},jwks:{value:()=>n._local?.jwks(),enumerable:!0,configurable:!1,writable:!1}}),r}(new URL(t)),{issuer:n,audience:r});i=a}catch(e){throw new Error(`Token verification failed: ${e.stack}`)}if("string"==typeof i.azp&&(a=i.azp),"string"==typeof i.webid)return{webId:i.webid,clientId:a};if("string"!=typeof i.sub)throw new Error(`The token ${JSON.stringify(i)} is invalid: it has no 'webid' claim and no 'sub' claim.`);try{return new URL(i.sub),{webId:i.sub,clientId:a}}catch(e){throw new Error(`The token has no 'webid' claim, and its 'sub' claim of [${i.sub}] is invalid as a URL - error [${e}].`)}}function Qe(e){try{const t=new URL(e),n=!t.searchParams.has("code")&&!t.searchParams.has("state"),r=""===t.hash;return n&&r}catch(e){return!1}}function Ye(e){const t=new URL(e);return t.searchParams.delete("state"),t.searchParams.delete("code"),t.searchParams.delete("error"),t.searchParams.delete("error_description"),t.searchParams.delete("iss"),t}class Xe{storageUtility;redirector;constructor(e,t){this.storageUtility=e,this.redirector=t,this.storageUtility=e,this.redirector=t}parametersGuard=e=>void 0!==e.issuerConfiguration.grantTypesSupported&&e.issuerConfiguration.grantTypesSupported.indexOf("authorization_code")>-1&&void 0!==e.redirectUrl;async canHandle(e){return this.parametersGuard(e)}async setupRedirectHandler({oidcLoginOptions:e,state:t,codeVerifier:n,targetUrl:r}){if(!this.parametersGuard(e))throw new Error("The authorization code grant requires a redirectUrl.");var i,a;await Promise.all([this.storageUtility.setForUser(t,{sessionId:e.sessionId}),this.storageUtility.setForUser(e.sessionId,{codeVerifier:n,issuer:e.issuer.toString(),redirectUrl:e.redirectUrl,dpop:Boolean(e.dpop).toString(),keepAlive:(i=e.keepAlive,a=!0,"boolean"==typeof i?Boolean(i):Boolean(a)).toString()})]),this.redirector.redirect(r,{handleRedirect:e.handleRedirect})}}class Ze{sessionInfoManager;constructor(e){this.sessionInfoManager=e,this.sessionInfoManager=e}async canHandle(){return!0}async handle(e){await this.sessionInfoManager.clear(e)}}class et{redirector;constructor(e){this.redirector=e,this.redirector=e}async canHandle(e,t){return"idp"===t?.logoutType}async handle(e,t){if("idp"!==t?.logoutType)throw new Error("Attempting to call idp logout handler to perform app logout");if(void 0===t.toLogoutUrl)throw new Error("Cannot perform IDP logout. Did you log in using the OIDC authentication flow?");this.redirector.redirect(t.toLogoutUrl(t),{handleRedirect:t.handleRedirect})}}class tt{handlers;constructor(e,t){this.handlers=[new Ze(e),new et(t)]}async canHandle(){return!0}async handle(e,t){for(const n of this.handlers)await n.canHandle(e,t)&&await n.handle(e,t)}}function nt(){return{isLoggedIn:!1,sessionId:je(),fetch:(...e)=>fetch(...e)}}async function rt(e,t){await Promise.all([t.deleteAllUserData(e,{secure:!1}),t.deleteAllUserData(e,{secure:!0})])}class it{storageUtility;constructor(e){this.storageUtility=e,this.storageUtility=e}update(e,t){throw new Error("Not Implemented")}set(e,t){throw new Error("Not Implemented")}get(e){throw new Error("Not implemented")}async getAll(){throw new Error("Not implemented")}async clear(e){return rt(e,this.storageUtility)}async register(e){throw new Error("Not implemented")}async getRegisteredSessionIdAll(){throw new Error("Not implemented")}async clearAll(){throw new Error("Not implemented")}async setOidcContext(e,t){throw new Error("Not implemented")}}function at({endSessionEndpoint:e,idTokenHint:t}){if(void 0!==e)return function({state:n,postLogoutUrl:r}){return function({endSessionEndpoint:e,idTokenHint:t,postLogoutRedirectUri:n,state:r}){const i=new URL(e);return void 0!==t&&i.searchParams.append("id_token_hint",t),void 0!==n&&(i.searchParams.append("post_logout_redirect_uri",n),void 0!==r&&i.searchParams.append("state",r)),i.toString()}({endSessionEndpoint:e,idTokenHint:t,state:n,postLogoutRedirectUri:r})}}function ot(e){try{return new URL(e),!0}catch{return!1}}async function st(e,t,n,r){let i;if(function(e,t){return t.scopesSupported.includes("webid")&&void 0!==e.clientId&&ot(e.clientId)}(e,t))i={clientId:e.clientId,clientName:e.clientName,clientType:"solid-oidc"};else{if(!function(e){return void 0!==e.clientId&&!ot(e.clientId)}(e))return r.getClient({sessionId:e.sessionId,clientName:e.clientName,redirectUrl:e.redirectUrl},t);i={clientId:e.clientId,clientSecret:e.clientSecret,clientName:e.clientName,clientType:"static"}}const a={clientId:i.clientId,clientType:i.clientType};return"static"===i.clientType&&(a.clientSecret=i.clientSecret),i.clientName&&(a.clientName=i.clientName),await n.setForUser(e.sessionId,a),i}const ct=(e,t)=>fetch(e,t);class lt{loginHandler;redirectHandler;logoutHandler;sessionInfoManager;issuerConfigFetcher;boundLogout;constructor(e,t,n,r,i){this.loginHandler=e,this.redirectHandler=t,this.logoutHandler=n,this.sessionInfoManager=r,this.issuerConfigFetcher=i,this.loginHandler=e,this.redirectHandler=t,this.logoutHandler=n,this.sessionInfoManager=r,this.issuerConfigFetcher=i}fetch=ct;logout=async(e,t)=>{await this.logoutHandler.handle(e,"idp"===t?.logoutType?{...t,toLogoutUrl:this.boundLogout}:t),this.fetch=ct,delete this.boundLogout};getSessionInfo=async e=>this.sessionInfoManager.get(e);getAllSessionInfo=async()=>this.sessionInfoManager.getAll()}async function ut(e,t,n){try{const[r,i,a,o,s]=await Promise.all([t.getForUser(e,"issuer",{errorIfNull:!0}),t.getForUser(e,"codeVerifier"),t.getForUser(e,"redirectUrl"),t.getForUser(e,"dpop",{errorIfNull:!0}),t.getForUser(e,"keepAlive")]);await t.deleteForUser(e,"codeVerifier");return{codeVerifier:i,redirectUrl:a,issuerConfig:await n.fetchConfig(r),dpop:"true"===o,keepAlive:"string"!=typeof s||"true"===s}}catch(t){throw new Error(`Failed to retrieve OIDC context from storage associated with session [${e}]: ${t}`)}}class pt{secureStorage;insecureStorage;constructor(e,t){this.secureStorage=e,this.insecureStorage=t,this.secureStorage=e,this.insecureStorage=t}getKey(e){return`solidClientAuthenticationUser:${e}`}async getUserData(e,t){const n=await(t?this.secureStorage:this.insecureStorage).get(this.getKey(e));if(void 0===n)return{};try{return JSON.parse(n)}catch(r){throw new Error(`Data for user [${e}] in [${t?"secure":"unsecure"}] storage is corrupted - expected valid JSON, but got: ${n}`)}}async setUserData(e,t,n){await(n?this.secureStorage:this.insecureStorage).set(this.getKey(e),JSON.stringify(t))}async get(e,t){const n=await(t?.secure?this.secureStorage:this.insecureStorage).get(e);if(void 0===n&&t?.errorIfNull)throw new Error(`[${e}] is not stored`);return n}async set(e,t,n){return(n?.secure?this.secureStorage:this.insecureStorage).set(e,t)}async delete(e,t){return(t?.secure?this.secureStorage:this.insecureStorage).delete(e)}async getForUser(e,t,n){const r=await this.getUserData(e,n?.secure);let i;if(r&&r[t]||(i=void 0),i=r[t],void 0===i&&n?.errorIfNull)throw new Error(`Field [${t}] for user [${e}] is not stored`);return i||void 0}async setForUser(e,t,n){let r;try{r=await this.getUserData(e,n?.secure)}catch{r={}}await this.setUserData(e,{...r,...t},n?.secure)}async deleteForUser(e,t,n){const r=await this.getUserData(e,n?.secure);delete r[t],await this.setUserData(e,r,n?.secure)}async deleteAllUserData(e,t){await(t?.secure?this.secureStorage:this.insecureStorage).delete(this.getKey(e))}}class dt{map={};async get(e){return this.map[e]||void 0}async set(e,t){this.map[e]=t}async delete(e){delete this.map[e]}}class ft extends Error{constructor(e){super(e)}}Error;class ht extends Error{missingFields;constructor(e){super(`Invalid response from OIDC provider: missing fields ${e}`),this.missingFields=e}}class mt extends Error{error;errorDescription;constructor(e,t,n){super(e),this.error=t,this.errorDescription=n}}function gt(e){const t=new URL(e);return new URL(t.pathname,t.origin).toString()}async function vt(e,t,n){return new Te({htu:gt(e),htm:t.toUpperCase(),jti:je()}).setProtectedHeader({alg:De[0],jwk:n.publicKey,typ:"dpop+jwt"}).setIssuedAt().sign(n.privateKey,{})}async function bt(e,t,n,r){if(void 0!==n)return async function(e,t,n,r){const i=new Headers(r?.headers);return i.set("Authorization",`DPoP ${t}`),i.set("DPoP",await vt(e,r?.method??"get",n)),{...r,headers:i}}(e,t,n,r);const i=new Headers(r?.headers);return i.set("Authorization",`Bearer ${t}`),{...r,headers:i}}async function yt(e,t,n,r,i=fetch){return i(t,await bt(t.toString(),e,r,n))}const wt=e=>void 0!==e?e-5>0?e-5:e:600;function xt(e,t){let n,r=e;const i=t?.refreshOptions;if(void 0!==i){const e=async()=>{try{const{accessToken:a,refreshToken:o,expiresIn:s}=await async function(e,t,n){const r=await e.tokenRefresher.refresh(e.sessionId,e.refreshToken,t);return n?.emit($e,r.expiresIn??600),{accessToken:r.accessToken,refreshToken:r.refreshToken,expiresIn:r.expiresIn}}(i,t.dpopKey,t.eventEmitter);r=a,void 0!==o&&(i.refreshToken=o),clearTimeout(n),n=setTimeout(e,1e3*wt(s)),t.eventEmitter?.emit(Ve,n)}catch(e){e instanceof mt&&(t?.eventEmitter?.emit(Ue,e.error,e.errorDescription),t?.eventEmitter?.emit(qe)),e instanceof ht&&e.missingFields.includes("access_token")&&t?.eventEmitter?.emit(qe)}};n=setTimeout(e,1e3*wt(t.expiresIn)),t.eventEmitter?.emit(Ve,n)}else if(void 0!==t&&void 0!==t.eventEmitter){const e=setTimeout(()=>{t.eventEmitter.emit(qe)},1e3*wt(t.expiresIn));t.eventEmitter.emit(Ve,e)}return async(e,n)=>{let i=await yt(r,e,n,t?.dpopKey,t?.fetch);const a=!i.ok&&(o=i.status,![401,403].includes(o));var o;if(i.ok||a)return i;return i.url!==e&&void 0!==t?.dpopKey&&(i=await yt(r,i.url,n,t.dpopKey,t.fetch)),i}}var kt=o(7),_t=o(516);function Et(e,t){if("string"!=typeof e.client_id)throw new Error(`Dynamic client registration failed: no client_id has been found on ${JSON.stringify(e)}`);if(t.redirectUrl&&function(e){return Array.isArray(e.redirect_uris)&&e.redirect_uris.every(e=>"string"==typeof e)}(e)&&e.redirect_uris[0]!==t.redirectUrl.toString())throw new Error(`Dynamic client registration failed: the returned redirect URIs ${JSON.stringify(e.redirect_uris)} don't match the provided ${JSON.stringify([t.redirectUrl.toString()])}`);return!0}async function Ct(e,t){if(!t.registrationEndpoint)throw new Error("Dynamic Registration could not be completed because the issuer has no registration endpoint.");if(!Array.isArray(t.idTokenSigningAlgValuesSupported))throw new Error("The OIDC issuer discovery profile is missing the 'id_token_signing_alg_values_supported' value, which is mandatory.");const n=(r=t.idTokenSigningAlgValuesSupported,De.find(e=>r.includes(e))??null);var r;const i={client_name:e.clientName,application_type:"web",redirect_uris:[e.redirectUrl?.toString()],subject_type:"public",token_endpoint_auth_method:"client_secret_basic",id_token_signed_response_alg:n,grant_types:["authorization_code","refresh_token"]},a=await fetch(t.registrationEndpoint.toString(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(a.ok){const t=await a.json();return Et(t,e),{clientId:t.client_id,clientSecret:t.client_secret,expiresAt:t.client_secret_expires_at,idTokenSignedResponseAlg:t.id_token_signed_response_alg,clientType:"dynamic"}}throw 400===a.status&&function(e,t){if("invalid_redirect_uri"===e.error)throw new Error(`Dynamic client registration failed: the provided redirect uri [${t.redirectUrl?.toString()}] is invalid - ${e.error_description??""}`);if("invalid_client_metadata"===e.error)throw new Error(`Dynamic client registration failed: the provided client metadata ${JSON.stringify(t)} is invalid - ${e.error_description??""}`);throw new Error(`Dynamic client registration failed: ${e.error} - ${e.error_description??""}`)}(await a.json(),e),new Error(`Dynamic client registration failed: the server returned ${a.status} ${a.statusText} - ${await a.text()}`)}function St(e){return void 0!==e.error_description&&"string"==typeof e.error_description}function At(e,t){if(void 0!==(n=e).error&&"string"==typeof n.error)throw new mt(`Token endpoint returned error [${e.error}]${St(e)?`: ${e.error_description}`:""}${function(e){return void 0!==e.error_uri&&"string"==typeof e.error_uri}(e)?` (see ${e.error_uri})`:""}`,e.error,St(e)?e.error_description:void 0);var n;if(!function(e){return void 0!==e.access_token&&"string"==typeof e.access_token}(e))throw new ht(["access_token"]);if(!function(e){return void 0!==e.id_token&&"string"==typeof e.id_token}(e))throw new ht(["id_token"]);if(!function(e){return void 0!==e.token_type&&"string"==typeof e.token_type}(e))throw new ht(["token_type"]);if(!function(e){return void 0===e.expires_in||"number"==typeof e.expires_in}(e))throw new ht(["expires_in"]);if(!t&&"bearer"!==e.token_type.toLowerCase())throw new Error(`Invalid token endpoint response: requested a [Bearer] token, but got a 'token_type' value of [${e.token_type}].`);return e}async function Tt(e,t,n,r){!function(e,t){if(t.grantType&&(!e.grantTypesSupported||!e.grantTypesSupported.includes(t.grantType)))throw new Error(`The issuer [${e.issuer}] does not support the [${t.grantType}] grant`);if(!e.tokenEndpoint)throw new Error(`This issuer [${e.issuer}] does not have a token endpoint`)}(e,n);const i={"content-type":"application/x-www-form-urlencoded"};let a;r&&(a=await async function(){const{privateKey:e,publicKey:t}=await Re(De[0]),n={privateKey:e,publicKey:await ke(t)};return[n.publicKey.alg]=De,n}(),i.DPoP=await vt(e.tokenEndpoint,"POST",a)),t.clientSecret&&(i.Authorization=`Basic ${btoa(`${t.clientId}:${t.clientSecret}`)}`);const o={grant_type:n.grantType,redirect_uri:n.redirectUrl,code:n.code,code_verifier:n.codeVerifier,client_id:t.clientId},s={method:"POST",headers:i,body:new URLSearchParams(o).toString()},c=await fetch(e.tokenEndpoint,s),l=At(await c.json(),r),{webId:u,clientId:p}=await Je(l.id_token,e.jwksUri,e.issuer,t.clientId);return{accessToken:l.access_token,idToken:l.id_token,refreshToken:(d=l,void 0!==d.refresh_token&&"string"==typeof d.refresh_token?l.refresh_token:void 0),webId:u,clientId:p,dpopKey:a,expiresIn:l.expires_in};var d}async function Pt(e,t,n,r){if(void 0===n.clientId)throw new Error("No client ID available when trying to refresh the access token.");const i={grant_type:"refresh_token",refresh_token:e};let a={};void 0!==r&&(a={DPoP:await vt(t.tokenEndpoint,"POST",r)});let o={};void 0!==n.clientSecret?o={Authorization:`Basic ${btoa(`${n.clientId}:${n.clientSecret}`)}`}:(e=>{try{return new URL(e),!0}catch{return!1}})(n.clientId)&&(i.client_id=n.clientId);const s=await fetch(t.tokenEndpoint,{method:"POST",body:new URLSearchParams(i).toString(),headers:{...a,...o,"Content-Type":"application/x-www-form-urlencoded"}});let c;try{c=await s.json()}catch(e){throw new Error(`The token endpoint of issuer ${t.issuer} returned a malformed response.`)}const l=At(c,void 0!==r),{webId:u}=await Je(l.id_token,t.jwksUri,t.issuer,n.clientId);return{accessToken:l.access_token,idToken:l.id_token,refreshToken:"string"==typeof l.refresh_token?l.refresh_token:void 0,webId:u,dpopKey:r,expiresIn:l.expires_in}}class Rt extends pt{constructor(e,t){super(e,t)}}class It extends lt{login=async(e,t)=>{"none"!==e.prompt&&await this.sessionInfoManager.clear(e.sessionId);const n=e.redirectUrl??function(e){const t=Ye(e);return t.hash="",e.includes(`${t.origin}/`)?t.href:`${t.origin}${t.href.substring(t.origin.length+1)}`}(window.location.href);if(!Qe(n))throw new Error(`${n} is not a valid redirect URL, it is either a malformed IRI, includes a hash fragment, or reserved query parameters ('code' or 'state').`);await this.loginHandler.handle({...e,redirectUrl:n,clientName:e.clientName??e.clientId,eventEmitter:t})};validateCurrentSession=async e=>{const t=await this.sessionInfoManager.get(e);return void 0===t||void 0===t.clientAppId||void 0===t.issuer?null:t};handleIncomingRedirect=async(e,t)=>{try{const n=await this.redirectHandler.handle(e,t,void 0);return this.fetch=n.fetch.bind(window),this.boundLogout=n.getLogoutUrl,await this.cleanUrlAfterRedirect(e),{isLoggedIn:n.isLoggedIn,webId:n.webId,sessionId:n.sessionId,expirationDate:n.expirationDate,clientAppId:n.clientAppId}}catch(n){return await this.cleanUrlAfterRedirect(e),void t.emit(Ue,"redirect",n)}};async cleanUrlAfterRedirect(e){const t=Ye(e).href;for(window.history.replaceState(null,"",t);window.location.href!==t;)await new Promise(e=>{setTimeout(()=>e(),1)})}}function Ft(e){return"string"==typeof e.oidcIssuer}function Nt(e){return"string"==typeof e.redirectUrl}class Ot{storageUtility;oidcHandler;issuerConfigFetcher;clientRegistrar;constructor(e,t,n,r){this.storageUtility=e,this.oidcHandler=t,this.issuerConfigFetcher=n,this.clientRegistrar=r,this.storageUtility=e,this.oidcHandler=t,this.issuerConfigFetcher=n,this.clientRegistrar=r}async canHandle(e){return Ft(e)&&Nt(e)}async handle(e){if(!Ft(e))throw new ft(`OidcLoginHandler requires an OIDC issuer: missing property 'oidcIssuer' in ${JSON.stringify(e)}`);if(!Nt(e))throw new ft(`OidcLoginHandler requires a redirect URL: missing property 'redirectUrl' in ${JSON.stringify(e)}`);const t=await this.issuerConfigFetcher.fetchConfig(e.oidcIssuer),n=await st(e,t,this.storageUtility,this.clientRegistrar),r={issuer:t.issuer,dpop:"dpop"===e.tokenType.toLowerCase(),...e,issuerConfiguration:t,client:n,scopes:(i=e.customScopes,Array.isArray(i)?Array.from(new Set([...Ge,...i.filter(e=>"string"==typeof e&&!e.includes(" "))])):Ge)};var i;return this.oidcHandler.handle(r)}}class Lt extends Xe{async handle(e){const t={authority:e.issuer.toString(),client_id:e.client.clientId,client_secret:e.client.clientSecret,redirect_uri:e.redirectUrl,response_type:"code",scope:e.scopes.join(" "),filterProtocolClaims:!0,loadUserInfo:!1,code_verifier:!0,prompt:e.prompt??"consent"},n=new _t.OidcClient(t);try{const t=await n.createSigninRequest();return await this.setupRedirectHandler({oidcLoginOptions:e,state:t.state._id,codeVerifier:t.state._code_verifier,targetUrl:t.url.toString()})}catch(e){}}}const jt={issuer:{toKey:"issuer",convertToUrl:!0},authorization_endpoint:{toKey:"authorizationEndpoint",convertToUrl:!0},token_endpoint:{toKey:"tokenEndpoint",convertToUrl:!0},userinfo_endpoint:{toKey:"userinfoEndpoint",convertToUrl:!0},jwks_uri:{toKey:"jwksUri",convertToUrl:!0},registration_endpoint:{toKey:"registrationEndpoint",convertToUrl:!0},end_session_endpoint:{toKey:"endSessionEndpoint",convertToUrl:!0},scopes_supported:{toKey:"scopesSupported"},response_types_supported:{toKey:"responseTypesSupported"},response_modes_supported:{toKey:"responseModesSupported"},grant_types_supported:{toKey:"grantTypesSupported"},acr_values_supported:{toKey:"acrValuesSupported"},subject_types_supported:{toKey:"subjectTypesSupported"},id_token_signing_alg_values_supported:{toKey:"idTokenSigningAlgValuesSupported"},id_token_encryption_alg_values_supported:{toKey:"idTokenEncryptionAlgValuesSupported"},id_token_encryption_enc_values_supported:{toKey:"idTokenEncryptionEncValuesSupported"},userinfo_signing_alg_values_supported:{toKey:"userinfoSigningAlgValuesSupported"},userinfo_encryption_alg_values_supported:{toKey:"userinfoEncryptionAlgValuesSupported"},userinfo_encryption_enc_values_supported:{toKey:"userinfoEncryptionEncValuesSupported"},request_object_signing_alg_values_supported:{toKey:"requestObjectSigningAlgValuesSupported"},request_object_encryption_alg_values_supported:{toKey:"requestObjectEncryptionAlgValuesSupported"},request_object_encryption_enc_values_supported:{toKey:"requestObjectEncryptionEncValuesSupported"},token_endpoint_auth_methods_supported:{toKey:"tokenEndpointAuthMethodsSupported"},token_endpoint_auth_signing_alg_values_supported:{toKey:"tokenEndpointAuthSigningAlgValuesSupported"},display_values_supported:{toKey:"displayValuesSupported"},claim_types_supported:{toKey:"claimTypesSupported"},claims_supported:{toKey:"claimsSupported"},service_documentation:{toKey:"serviceDocumentation"},claims_locales_supported:{toKey:"claimsLocalesSupported"},ui_locales_supported:{toKey:"uiLocalesSupported"},claims_parameter_supported:{toKey:"claimsParameterSupported"},request_parameter_supported:{toKey:"requestParameterSupported"},request_uri_parameter_supported:{toKey:"requestUriParameterSupported"},require_request_uri_registration:{toKey:"requireRequestUriRegistration"},op_policy_uri:{toKey:"opPolicyUri",convertToUrl:!0},op_tos_uri:{toKey:"opTosUri",convertToUrl:!0}};class Mt{storageUtility;constructor(e){this.storageUtility=e,this.storageUtility=e}static getLocalStorageKey(e){return`issuerConfig:${e}`}async fetchConfig(e){let t;const n=new URL(".well-known/openid-configuration",e.endsWith("/")?e:`${e}/`).href,r=await fetch(n);try{t=function(e){const t={};return Object.keys(e).forEach(n=>{jt[n]&&(t[jt[n].toKey]=e[n])}),Array.isArray(t.scopesSupported)||(t.scopesSupported=["openid"]),t}(await r.json())}catch(t){throw new ft(`[${e.toString()}] has an invalid configuration: ${t.message}`)}return await this.storageUtility.set(Mt.getLocalStorageKey(e),JSON.stringify(t)),t}}async function Dt(e,t){await rt(e,t),await async function(){const e=new _t.OidcClient({response_mode:"query"});await e.clearStaleState(new _t.WebStorageStateStore({}));const t=window.localStorage,n=[];for(let e=0;e<=t.length;e+=1){const r=t.key(e);r&&(r.match(/^oidc\..+$/)||r.match(/^solidClientAuthenticationUser:.+$/))&&n.push(r)}n.forEach(e=>t.removeItem(e))}()}class Ut extends it{async get(e){const[t,n,r,i,a,o,s,c]=await Promise.all([this.storageUtility.getForUser(e,"isLoggedIn",{secure:!0}),this.storageUtility.getForUser(e,"webId",{secure:!0}),this.storageUtility.getForUser(e,"clientId",{secure:!1}),this.storageUtility.getForUser(e,"clientSecret",{secure:!1}),this.storageUtility.getForUser(e,"redirectUrl",{secure:!1}),this.storageUtility.getForUser(e,"refreshToken",{secure:!0}),this.storageUtility.getForUser(e,"issuer",{secure:!1}),this.storageUtility.getForUser(e,"tokenType",{secure:!1})]);if("string"!=typeof a||Qe(a)){if(void 0!==c&&("string"!=typeof(l=c)||!["DPoP","Bearer"].includes(l)))throw new Error(`Tokens of type [${c}] are not supported.`);var l;if(void 0!==r||void 0!==t||void 0!==n||void 0!==o)return{sessionId:e,webId:n,isLoggedIn:"true"===t,redirectUrl:a,refreshToken:o,issuer:s,clientAppId:r,clientAppSecret:i,tokenType:c??"DPoP"}}else await Promise.all([this.storageUtility.deleteAllUserData(e,{secure:!1}),this.storageUtility.deleteAllUserData(e,{secure:!0})])}async clear(e){return Dt(e,this.storageUtility)}}class Bt{async canHandle(e){try{return new URL(e),!0}catch(t){throw new Error(`[${e}] is not a valid URL, and cannot be used as a redirect URL: ${t}`)}}async handle(e){return nt()}}class zt{storageUtility;sessionInfoManager;issuerConfigFetcher;clientRegistrar;tokerRefresher;constructor(e,t,n,r,i){this.storageUtility=e,this.sessionInfoManager=t,this.issuerConfigFetcher=n,this.clientRegistrar=r,this.tokerRefresher=i,this.storageUtility=e,this.sessionInfoManager=t,this.issuerConfigFetcher=n,this.clientRegistrar=r,this.tokerRefresher=i}async canHandle(e){try{const t=new URL(e);return null!==t.searchParams.get("code")&&null!==t.searchParams.get("state")}catch(t){throw new Error(`[${e}] is not a valid URL, and cannot be used as a redirect URL: ${t}`)}}async handle(e,t){if(!await this.canHandle(e))throw new Error(`AuthCodeRedirectHandler cannot handle [${e}]: it is missing one of [code, state].`);const n=new URL(e),r=n.searchParams.get("state"),i=await this.storageUtility.getForUser(r,"sessionId",{errorIfNull:!0}),{issuerConfig:a,codeVerifier:o,redirectUrl:s,dpop:c}=await ut(i,this.storageUtility,this.issuerConfigFetcher),l=n.searchParams.get("iss");if("string"==typeof l&&l!==a.issuer)throw new Error(`The value of the iss parameter (${l}) does not match the issuer identifier of the authorization server (${a.issuer}). See [rfc9207](https://www.rfc-editor.org/rfc/rfc9207.html#section-2.3-3.1.1)`);if(void 0===o)throw new Error(`The code verifier for session ${i} is missing from storage.`);if(void 0===s)throw new Error(`The redirect URL for session ${i} is missing from storage.`);const u=await this.clientRegistrar.getClient({sessionId:i},a),p=Date.now(),d=await Tt(a,u,{grantType:"authorization_code",code:n.searchParams.get("code"),codeVerifier:o,redirectUrl:s},c);let f;window.localStorage.removeItem(`oidc.${r}`),void 0!==d.refreshToken&&(f={sessionId:i,refreshToken:d.refreshToken,tokenRefresher:this.tokerRefresher});const h=xt(d.accessToken,{dpopKey:d.dpopKey,refreshOptions:f,eventEmitter:t,expiresIn:d.expiresIn});await async function(e,t,n,r,i,a,o,s){void 0!==a&&await e.setForUser(t,{refreshToken:a},{secure:o}),void 0!==n&&await e.setForUser(t,{webId:n},{secure:o}),void 0!==r&&await e.setForUser(t,{clientId:r},{secure:o}),void 0!==i&&await e.setForUser(t,{isLoggedIn:i},{secure:o}),void 0!==s&&await e.setForUser(t,{publicKey:JSON.stringify(s.publicKey),privateKey:JSON.stringify(await ke(s.privateKey))},{secure:o})}(this.storageUtility,i,d.webId,d.clientId,"true",void 0,!0);const m=await this.sessionInfoManager.get(i);if(!m)throw new Error(`Could not retrieve session: [${i}].`);return Object.assign(m,{fetch:h,getLogoutUrl:at({idTokenHint:d.idToken,endSessionEndpoint:a.endSessionEndpoint}),expirationDate:"number"==typeof d.expiresIn?p+1e3*d.expiresIn:void 0})}}class Ht extends Ke{constructor(e){super(e)}}class qt{get storage(){return window.localStorage}async get(e){return this.storage.getItem(e)||void 0}async set(e,t){this.storage.setItem(e,t)}async delete(e){this.storage.removeItem(e)}}class $t{redirect(e,t){t&&t.handleRedirect?t.handleRedirect(e):t&&t.redirectByReplacingState?window.history.replaceState({},"",e):window.location.href=e}}class Wt{storageUtility;constructor(e){this.storageUtility=e,this.storageUtility=e}async getClient(e,t){const[n,r,i,a,o]=await Promise.all([this.storageUtility.getForUser(e.sessionId,"clientId",{secure:!1}),this.storageUtility.getForUser(e.sessionId,"clientSecret",{secure:!1}),this.storageUtility.getForUser(e.sessionId,"expiresAt",{secure:!1}),this.storageUtility.getForUser(e.sessionId,"clientName",{secure:!1}),this.storageUtility.getForUser(e.sessionId,"clientType",{secure:!1})]),s=void 0!==i?Number.parseInt(i,10):-1,c=void 0!==r&&0!==s&&Math.floor(Date.now()/1e3)>s;if(n&&("string"==typeof(l=o)&&["dynamic","static","solid-oidc"].includes(l))&&!c)return void 0!==r?{clientId:n,clientSecret:r,clientName:a,clientType:"dynamic",expiresAt:s}:{clientId:n,clientName:a,clientType:o};var l;try{const n=await Ct(e,t),r={clientId:n.clientId,clientType:"dynamic"};return void 0!==n.clientSecret&&(r.clientSecret=n.clientSecret,r.expiresAt=String(n.expiresAt)),n.idTokenSignedResponseAlg&&(r.idTokenSignedResponseAlg=n.idTokenSignedResponseAlg),await this.storageUtility.setForUser(e.sessionId,r,{secure:!1}),n}catch(e){throw new Error("Client registration failed.",{cause:e})}}}class Vt{async canHandle(e){try{return new URL(e).searchParams.has("error")}catch(t){throw new Error(`[${e}] is not a valid URL, and cannot be used as a redirect URL: ${t}`)}}async handle(e,t){if(void 0!==t){const n=new URL(e),r=n.searchParams.get("error"),i=n.searchParams.get("error_description");t.emit(Ue,r,i)}return nt()}}class Gt{storageUtility;issuerConfigFetcher;clientRegistrar;constructor(e,t,n){this.storageUtility=e,this.issuerConfigFetcher=t,this.clientRegistrar=n,this.storageUtility=e,this.issuerConfigFetcher=t,this.clientRegistrar=n}async refresh(e,t,n,r){const i=await ut(e,this.storageUtility,this.issuerConfigFetcher),a=await this.clientRegistrar.getClient({sessionId:e},i.issuerConfig);if(void 0===t)throw new Error(`Session [${e}] has no refresh token to allow it to refresh its access token.`);if(i.dpop&&void 0===n)throw new Error(`For session [${e}], the key bound to the DPoP access token must be provided to refresh said access token.`);const o=await Pt(t,i.issuerConfig,a,n);return void 0!==o.refreshToken&&r?.emit(He,o.refreshToken),o}}function Kt(e){const t=new dt,n=e.secureStorage||t,r=e.insecureStorage||new qt,i=new Rt(n,r),a=new Mt(i),o=new Wt(i),s=new Ut(i),c=new Gt(i,a,o),l=new $t,u=new Ot(i,new Lt(i,l),a,o),p=new Ht([new Vt,new zt(i,s,a,o,c),new Bt]);return new It(u,p,new tt(s,l),s,a)}const Jt=`${Me}currentSession`,Qt=`${Me}currentUrl`;class Yt{info;events;clientAuthentication;tokenRequestInProgress=!1;constructor(e={},t=void 0){this.events=new kt,e.clientAuthentication?this.clientAuthentication=e.clientAuthentication:e.secureStorage&&e.insecureStorage?this.clientAuthentication=Kt({secureStorage:e.secureStorage,insecureStorage:e.insecureStorage}):this.clientAuthentication=Kt({}),e.sessionInfo?this.info={sessionId:e.sessionInfo.sessionId,isLoggedIn:!1,webId:e.sessionInfo.webId,clientAppId:e.sessionInfo.clientAppId}:this.info={sessionId:t??je(),isLoggedIn:!1},this.events.on(Be,()=>window.localStorage.setItem(Jt,this.info.sessionId)),this.events.on(qe,()=>this.internalLogout(!1)),this.events.on(Ue,()=>this.internalLogout(!1))}login=async e=>(await this.clientAuthentication.login({sessionId:this.info.sessionId,...e,tokenType:e.tokenType??"DPoP"},this.events),new Promise(()=>{}));fetch=(e,t)=>this.clientAuthentication.fetch(e,t);internalLogout=async(e,t)=>{window.localStorage.removeItem(Jt),await this.clientAuthentication.logout(this.info.sessionId,t),this.info.isLoggedIn=!1,e&&this.events.emit(ze)};logout=async e=>this.internalLogout(!0,e);handleIncomingRedirect=async(e={})=>{if(this.info.isLoggedIn)return this.info;if(this.tokenRequestInProgress)return;const t="string"==typeof e?{url:e}:e,n=t.url??window.location.href;this.tokenRequestInProgress=!0;const r=await this.clientAuthentication.handleIncomingRedirect(n,this.events);if(function(e){return!!e?.isLoggedIn}(r)){this.setSessionInfo(r);const e=window.localStorage.getItem(Qt);null===e?this.events.emit(Be):(window.localStorage.removeItem(Qt),this.events.emit(We,e))}else if(!0===t.restorePreviousSession){const e=window.localStorage.getItem(Jt);if(null!==e){if(await async function(e,t,n){const r=await t.validateCurrentSession(e);return null!==r&&(window.localStorage.setItem(Qt,window.location.href),await t.login({sessionId:e,prompt:"none",oidcIssuer:r.issuer,redirectUrl:r.redirectUrl,clientId:r.clientAppId,clientSecret:r.clientAppSecret,tokenType:r.tokenType??"DPoP"},n.events),!0)}(e,this.clientAuthentication,this))return new Promise(()=>{})}}return this.tokenRequestInProgress=!1,r};setSessionInfo(e){this.info.isLoggedIn=e.isLoggedIn,this.info.webId=e.webId,this.info.sessionId=e.sessionId,this.info.clientAppId=e.clientAppId,this.info.expirationDate=e.expirationDate,this.events.on($e,e=>{this.info.expirationDate=Date.now()+1e3*e})}}const Xt=new Yt,Zt=r;var en=o(386);const tn=o.n(en)()(Zt),nn=(0,Zt.sym)("http://www.iana.org/assignments/link-relations/acl");function rn(e){const t=tn;function n(e,n,r,i={}){const a=i.public||[],o=(0,Zt.graph)(),s=(0,Zt.Namespace)("http://www.w3.org/ns/auth/acl#");let c=o.sym(`${r}#a1`);const l=o.sym(r),u=o.sym(e);if(o.add(c,t.rdf("type"),s("Authorization"),l),o.add(c,s("accessTo"),u,l),i.defaultForNew&&o.add(c,s("default"),u,l),o.add(c,s("agent"),n,l),o.add(c,s("mode"),s("Read"),l),o.add(c,s("mode"),s("Write"),l),o.add(c,s("mode"),s("Control"),l),a.length){c=o.sym(`${r}#a2`),o.add(c,t.rdf("type"),s("Authorization"),l),o.add(c,s("accessTo"),u,l),o.add(c,s("agentClass"),t.foaf("Agent"),l);for(let e=0;e<a.length;e++)o.add(c,s("mode"),s(a[e]),l)}return(0,Zt.serialize)(l,o,r)}return{findAclDocUrl:async function(t){await e.fetcher.load(t);const n=e.any(t,nn);if(!n)throw new Error(`No ACL link discovered for ${t}`);return n.value},setACLUserPublic:function(t,r,i){const a=e.any(e.sym(t),nn);return Promise.resolve().then(()=>a||function(t){const n=e.fetcher;if(!n)throw new Error("Cannot fetch ACL rel, store has no fetcher");return n.load(t).then(n=>{if(!n.ok)throw new Error("fetchACLRel: While loading:"+n.error);const r=e.any(e.sym(t),nn);if(!r)throw new Error("fetchACLRel: No Link rel=ACL header for "+t);return r})}(t).catch(e=>{throw new Error(`Error fetching rel=ACL header for ${t}: ${e}`)})).then(a=>{const o=n(t,r,a.uri,i);if(!e.fetcher)throw new Error("Cannot PUT this, store has no fetcher");return e.fetcher.webOperation("PUT",a.uri,{data:o,contentType:"text/turtle"}).then(e=>{if(!e.ok)throw new Error("Error writing ACL text: "+e.error);return a})})},genACLText:n}}const an=()=>{let{SolidAppContext:e}=window;if(e||(e={}),e.viewingNoAuthPage=!1,e.noAuth&&window.document){if(window.document.location.href.startsWith(e.noAuth)){e.viewingNoAuthPage=!0;const t=new URLSearchParams(window.document.location.search);if(t){let n=e.viewedPage=t.get("uri")||null;if(n&&(n=decodeURI(n),!n.startsWith(e.noAuth))){const t=n.split(/\//);e.idp=t[0]+"//"+t[2],e.viewingNoAuthPage=!1}}}}return e};function on(){const{$SolidTestEnvironment:e}=window;if(void 0!==e&&e.username)return e.username,(0,Zt.sym)(e.username);if("undefined"!=typeof document&&document.location&&"http://localhost"===(""+document.location).slice(0,16)){const e=document.getElementById("appTarget");if(!e)return null;const t=e.getAttribute("testID");return t?(0,Zt.sym)(t):null}return null}class sn{constructor(e){this.session=e}get authSession(){return this.session}currentUser(){const e=an();return e.viewingNoAuthPage?(0,Zt.sym)(e.webId):this&&this.session&&this.session.info&&this.session.info.webId&&this.session.info.isLoggedIn?(0,Zt.sym)(this.session.info.webId):on()}async checkUser(e){const t=new URL(window.location.href).hash;t&&window.localStorage.setItem("preLoginRedirectHash",t),this.session.events.on(We,e=>{document.location.toString()!==e&&history.replaceState(null,"",e)});const n=new URL(window.location.href);n.hash="",await this.session.handleIncomingRedirect({restorePreviousSession:!0,url:n.href});const r=window.localStorage.getItem("preLoginRedirectHash");if(r){const e=new URL(window.location.href);e.hash!==r&&(history.pushState?history.pushState(null,document.title,r):location.hash=r,e.hash=r),window.localStorage.setItem("preLoginRedirectHash","")}let i=on();if(i)return Promise.resolve(e?e(i):i);const a=this.webIdFromSession(this.session.info);return a&&(i=this.saveUser(a)),Promise.resolve(e?e(i):i)}saveUser(e,t){let n;if(e){n="string"==typeof e?e:e.uri;const r=(0,Zt.namedNode)(n);return t&&(t.me=r),r}return null}webIdFromSession(e){return(null==e?void 0:e.webId)&&e.isLoggedIn?e.webId:null}}function cn(e){return(0,Zt.sym)(e.uri+"#id"+Date.now())}function ln(e){return!e||`${window.location.origin}/`!==new URL(e.value).origin}const un="index.ttl#this";function pn(e,t){const n=tn;async function r(t,n,r){await e.fetcher.load(t);const i=e.any(t,new Zt.NamedNode("http://www.iana.org/assignments/link-relations/acl"));if(!i)throw new Error("Chat ACL doc not found!");const a=`\n @prefix acl: <http://www.w3.org/ns/auth/acl#>.\n <#owner>\n a acl:Authorization;\n acl:agent <${n.value}>;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Write, acl:Control.\n <#invitee>\n a acl:Authorization;\n acl:agent <${r.value}>;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Append.\n `;await e.fetcher.webOperation("PUT",i.value,{data:a,contentType:"text/turtle"})}async function i(t,r){const i=e.any(r,n.solid("privateTypeIndex"));if(!i)throw new Error("Private type index not found!");await e.fetcher.load(i);const a=cn(i),o=[(0,Zt.st)(a,n.rdf("type"),n.solid("TypeRegistration"),i.doc()),(0,Zt.st)(a,n.solid("forClass"),n.meeting("LongChat"),i.doc()),(0,Zt.st)(a,n.solid("instance"),t,i.doc())];await new Promise((t,n)=>{e.updater.update([],o,function(e,r,i){r?t(null):n(new Error(i))})})}async function a(n){const r=await t.loadMe(),i=function(e,t){const n=new URL(`IndividualChats/${new URL(e.value).host}/`,t.value).toString();return new Zt.NamedNode(n)}(n,await t.getPodRoot(r));let a=!0;try{await e.fetcher.load(new Zt.NamedNode(i.value+"index.ttl#this"))}catch(e){a=!1}return{me:r,chatContainer:i,exists:a}}async function o(e,t){return(await s({me:t,newBase:e.value})).newInstance}function s(t){const r=e,i=r.updater;if(t.me&&!t.me.uri)throw new Error("chat mintNew: Invalid userid "+t.me);const a=t.newInstance=t.newInstance||r.sym(t.newBase+un),o=a.doc();return r.add(a,n.rdf("type"),n.meeting("LongChat"),o),r.add(a,n.dc("title"),"Chat channel",o),r.add(a,n.dc("created"),(0,Zt.term)(new Date(Date.now())),o),t.me&&r.add(a,n.dc("author"),t.me,o),new Promise(function(e,n){null==i||i.put(o,r.statementsMatching(void 0,void 0,void 0,o),"text/turtle",function(r,i,o){i?e({...t,newInstance:a}):n(new Error("FAILED to save new chat channel at: "+r+" : "+o))})})}async function c(t,r){var i;await e.fetcher.load(t.doc());const a=e.any(t,n.ldp("inbox"),void 0,t.doc());if(!a)throw new Error(`Invitee inbox not found! ${t.value}`);const o=`\n <> a <http://www.w3.org/ns/pim/meeting#LongChatInvite> ;\n ${n.rdf("seeAlso")} <${r.value}> .\n `,s=await(null===(i=e.fetcher)||void 0===i?void 0:i.webOperation("POST",a.value,{data:o,contentType:"text/turtle"}));if(!(null==s?void 0:s.headers.get("location")))throw new Error(`Invite sending returned a ${null==s?void 0:s.status}`)}return{setAcl:r,addToPrivateTypeIndex:i,findChat:a,createChatThing:o,getChat:async function(e,t=!0){const{me:n,chatContainer:s,exists:l}=await a(e);if(l)return new Zt.NamedNode(s.value+un);if(t){const t=await o(s,n);return await c(e,t),await r(s,n,e),await i(t,n),t}return null},sendInvite:c,mintNew:s}}function dn(e,t,n,r,i){return{createInboxFor:async function(e,i){const a=await t.loadMe(),o=`${(await t.getPodRoot(a)).value}p2p-inboxes/${encodeURIComponent(i)}/`;return await r.createContainer(o),await n.setSinglePeerAccess({ownerWebId:a.value,peerWebId:e,accessToModes:"acl:Append",target:o}),o},getNewMessages:async function(e){e||(e=await t.loadMe());const n=await t.getMainInbox(e);return(await r.getContainerMembers(n)).filter(e=>!r.isContainer(e))},markAsRead:async function(t,n){const r=await e.fetcher._fetch(t);if(200!==r.status)throw new Error(`Not OK! ${t}`);const i=function(e,t){const n=t.getUTCFullYear(),r=("0"+(t.getUTCMonth()+1)).slice(-2),i=("0"+t.getUTCDate()).slice(-2),a=e.split("/"),o=a[a.length-1];return new URL(`./archive/${n}/${r}/${i}/${o}`,e).toString()}(t,n),a={method:"PUT",body:await r.text(),headers:[["Content-Type",r.headers.get("Content-Type")||"application/octet-stream"]]};"2"===(await e.fetcher._fetch(i,a)).status.toString()[0]&&await e.fetcher._fetch(t,{method:"DELETE"})}}}class fn extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype),this.name=new.target.name}}class hn extends fn{}class mn extends fn{}class gn extends fn{}class vn extends fn{}class bn extends fn{}class yn extends fn{}class wn extends fn{constructor(e,t){super(t),this.status=e}}function xn(e,t,n){const r=tn;async function i(t){await a(t);const i=function(e){const t=e.uri.replace("/profile/","/").replace("/public/","/").split("/").slice(0,-1).join("/")+"/Settings/Preferences.ttl";return(0,Zt.sym)(t)}(t);let o;try{o=await n.followOrCreateLink(t,r.space("preferencesFile"),i,t.doc())}catch(e){if(e instanceof bn)throw e;if(e instanceof yn)throw e;if(e instanceof hn)throw e;if(e instanceof mn)throw e;if(e instanceof gn)throw e;if(e instanceof wn)throw e;throw e}try{await e.fetcher.load(o)}catch(e){const n=`Unable to load preference of user ${t}: ${e}`;if(401===e.response.status)throw new hn;if(403===e.response.status){if(ln(o))throw new mn;throw new gn}throw new Error(n)}return o}async function a(t){if(!t)throw new Error("loadProfile: no user given.");try{await e.fetcher.load(t.doc())}catch(e){throw new Error(`Unable to load profile of user ${t}: ${e}`)}return t.doc()}function o(t){return e.any(t,r.space("storage"),void 0,t.doc())}return{loadMe:async function(){const n=t.currentUser();if(null===n)throw new Error("Current user not found! Not logged in?");return await e.fetcher.load(n.doc()),n},getPodRoot:function(e){const t=o(e);if(!t)throw new Error("User pod root not found!");return t},getMainInbox:async function(t){await e.fetcher.load(t);const n=e.any(t,r.ldp("inbox"),void 0,t.doc());if(!n)throw new Error("User main inbox not found!");return n},findStorage:o,loadPreferences:i,loadProfile:a,silencedLoadPreferences:async function(e){try{return await i(e)}catch(e){return}}}}function kn(e,t,n,r){const i=tn;async function a(t){if(!t)throw new Error("loadTypeIndexesFor: No user given");const a=await n.loadProfile(t);let o,s=null;try{s=u(t)}catch(e){}try{o=e.any(t,i.solid("publicTypeIndex"),void 0,a)||(s?await r.followOrCreateLink(t,i.solid("publicTypeIndex"),s,a):null)}catch(e){}const c=o?[{label:"public",index:o,agent:t}]:[];let l,d;try{l=await n.silencedLoadPreferences(t)}catch(e){l=null}if(l){let n,o=null;try{o=p(l)}catch(e){}try{n=e.any(t,i.solid("privateTypeIndex"),void 0,a)||(o?await r.followOrCreateLink(t,i.solid("privateTypeIndex"),o,l):null)}catch(e){}d=n?[{label:"private",index:n,agent:t}]:[]}else d=[];const f=c.concat(d);if(0===f.length)return f;const h=f.map(e=>e.index);try{await e.fetcher.load(h)}catch(e){}return f}async function o(t){let r;try{r=await n.silencedLoadPreferences(t)}catch(e){}if(r){const n=e.each(t,i.solid("community"),void 0,r).concat(e.each(t,i.solid("community"),void 0,t.doc()));let o=[];for(const e of n)o=o.concat(await a(e));return o}return[]}async function s(e){return(await a(e)).concat((await o(e)).flat())}async function c(e,t){const n=await s(t);let r=[];for(const t of n){const n=await d(t,e);r=r.concat(n)}return r}function l(e){const t=e.doc(),n=t.dir();if(null==n?void 0:n.uri)return n.uri;const r=t.uri;if(!r)return null==e||e.uri,null;const i=r.split("#")[0],a=i.lastIndexOf("/");return-1===a?null:i.slice(0,a+1)}function u(e){const t=l(e);if(!t)throw new Error(`suggestPublicTypeIndex: Cannot derive directory for ${e.uri}`);return(0,Zt.sym)(t+"publicTypeIndex.ttl")}function p(e){const t=l(e);if(!t)throw new Error(`suggestPrivateTypeIndex: Cannot derive directory for ${e.uri}`);return(0,Zt.sym)(t+"privateTypeIndex.ttl")}async function d(t,n){const r=t.index,a=[],o=e.statementsMatching(null,i.solid("instance"),null,r).concat(e.statementsMatching(null,i.solid("instanceContainer"),null,r)).map(e=>e.subject);for(const s of o){const o=e.any(s,i.solid("forClass"),null,r);if(!n||o.sameTerm(n)){const n=e.each(s,i.solid("instance"),null,r);for(const e of n)a.push({instance:e,type:o,scope:t});const c=e.each(s,i.solid("instanceContainer"),null,r);for(const n of c)await e.fetcher.load(n),a.push({instance:(0,Zt.sym)(n.value),type:o,scope:t})}}return a}return{registerInTypeIndex:async function(t,n,r){const a=cn(n),o=[(0,Zt.st)(a,i.rdf("type"),i.solid("TypeRegistration"),n),(0,Zt.st)(a,i.solid("forClass"),r,n),(0,Zt.st)(a,i.solid("instance"),t,n)];try{await e.updater.update([],o)}catch(e){return null}return a},getRegistrations:function(t,n){return e.each(void 0,i.solid("instance"),t).filter(t=>e.holds(t,i.solid("forClass"),n))},loadTypeIndexesFor:a,loadCommunityTypeIndexes:o,loadAllTypeIndexes:s,getScopedAppInstances:c,getAppInstances:async function(e){const n=t.currentUser();if(!n)throw new Error("getAppInstances: Must be logged in to find apps.");return(await c(e,n)).map(e=>e.instance)},suggestPublicTypeIndex:u,suggestPrivateTypeIndex:p,deleteTypeIndexRegistration:async function(t){const n=e.the(null,i.solid("instance"),t.instance,t.scope.index);if(!n)throw new Error(`deleteTypeIndexRegistration: No registration found for ${t.instance}`);const r=e.statementsMatching(n,null,null,t.scope.index);await e.updater.update(r,[])},getScopedAppsFromIndex:d}}function _n(e,t){const n=Zt.graph();Zt.fetcher(n,{fetch:e.fetch}),n.updater=new Zt.UpdateManager(n),n.features=[];const r=new sn(t),i=rn(n),a=function(e){function t(t){return e.statementsMatching(t,(0,Zt.sym)("http://www.w3.org/ns/ldp#contains"),void 0).map(e=>e.object)}function n(e){const t=e.value;return"/"===t.charAt(t.length-1)}return{isContainer:n,createContainer:async function(t){if(!n((0,Zt.sym)(t)))throw new Error(`Not a container URL ${t}`);const r=await e.fetcher._fetch(t,{method:"PUT",headers:{"Content-Type":"text/turtle","If-None-Match":"*",Link:'<http://www.w3.org/ns/ldp#BasicContainer>; rel="type"'},body:" "});if("2"!==r.status.toString()[0])throw new Error(`Not OK: got ${r.status} response while creating container at ${t}`)},getContainerElements:t,getContainerMembers:async function(n){return await e.fetcher.load(n),t(n)}}}(n),o=function(e,t,n){async function r(t){let n;try{n=await e.fetcher.load(t)}catch(n){if(404!==n.response.status){if(401===n.response.status)throw new hn;if(403===n.response.status){if(ln(t))throw new mn;throw new gn}const e="createIfNotExists doc load error NOT 404: "+t+": "+n;throw new wn(n.status,n.message+e)}try{await e.fetcher.webOperation("PUT",t,{data:"",contentType:"text/turtle"})}catch(e){throw new yn("createIfNotExists: PUT FAILED: "+t+": "+e)}await e.fetcher.load(t)}return n}return{recursiveDelete:async function r(i){try{if(n.isContainer(i)){const a=await t.findAclDocUrl(i);await e.fetcher._fetch(a,{method:"DELETE"});const o=await n.getContainerMembers(i);await Promise.all(o.map(e=>r(e)))}const a=i.value;return e.fetcher._fetch(a,{method:"DELETE"})}catch(e){i.value}},setSinglePeerAccess:async function(n){let r=["@prefix acl: <http://www.w3.org/ns/auth/acl#>.","",`<#alice> a acl:Authorization;\n acl:agent <${n.ownerWebId}>;`,` acl:accessTo <${n.target}>;`,` acl:default <${n.target}>;`," acl:mode acl:Read, acl:Write, acl:Control.",""].join("\n");n.accessToModes&&(r+=["<#bobAccessTo> a acl:Authorization;",` acl:agent <${n.peerWebId}>;`,` acl:accessTo <${n.target}>;`,` acl:mode ${n.accessToModes}.`,""].join("\n")),n.defaultModes&&(r+=["<#bobDefault> a acl:Authorization;",` acl:agent <${n.peerWebId}>;`,` acl:default <${n.target}>;`,` acl:mode ${n.defaultModes}.`,""].join("\n"));const i=await t.findAclDocUrl((0,Zt.sym)(n.target));return e.fetcher._fetch(i,{method:"PUT",body:r,headers:[["Content-Type","text/turtle"]]})},createEmptyRdfDoc:async function(t,n){await e.fetcher.webOperation("PUT",t.uri,{data:`# ${new Date} ${n}\n `,contentType:"text/turtle"})},followOrCreateLink:async function(t,n,i,a){await e.fetcher.load(a);const o=e.any(t,n,null,a);if(o)return o;if(!e.updater.editable(a)){const e=`followOrCreateLink: cannot edit ${a.value}`;throw new bn(e)}try{await e.updater.update([],[(0,Zt.st)(t,n,i,a)])}catch(e){throw new yn(e)}try{await r(i)}catch(e){throw e}return i},loadOrCreateIfNotExists:r}}(n,i,a),s=xn(n,r,o),c=pn(n,s),l=dn(n,s,o,a),u=kn(n,r,s,o);return{store:n,authn:r,acl:i,inbox:l,chat:c,profile:s,typeIndex:u,load:function(e){return n.fetcher.load(e)},updatePromise:function(e,t=[]){return new Promise((r,i)=>{n.updater.update(e,t,function(e,t,n){t?r():i(new Error(n))})})},clearStore:function(){n.statements.slice().forEach(n.remove.bind(n))}}}const En=async(e,t)=>{const n=t&&t.credentials&&"omit"==t.credentials;return Xt.info.webId&&!n?Xt.fetch(e,t):window.fetch(e,t)},Cn=Symbol.for("solid-logic-singleton"),Sn="undefined"!=typeof window?window:o.g;const An=(Sn[Cn]||(Sn[Cn]=_n({fetch:En},Xt)),Sn[Cn]),Tn=[{name:"Solid Community",uri:"https://solidcommunity.net"},{name:"Solid Web",uri:"https://solidweb.org"},{name:"Solid Web ME",uri:"https://solidweb.me"},{name:"Inrupt.com",uri:"https://login.inrupt.com"}];function Pn(){const e=[...Tn],{host:t,origin:n}=new URL(location.href),r=e.map(({uri:e})=>new URL(e).host);return r.includes(t)||r.some(e=>function(e,t){const n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(t,e))||e.unshift({name:t,uri:n}),e}const Rn=An.authn,In=An.authn.authSession,Fn=An.store},1813(e){"use strict";e.exports=JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/3gpphal+json":{"source":"iana","compressible":true},"application/3gpphalforms+json":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/ace+cbor":{"source":"iana"},"application/ace+json":{"source":"iana","compressible":true},"application/ace-groupcomm+cbor":{"source":"iana"},"application/ace-trl+cbor":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/aif+cbor":{"source":"iana"},"application/aif+json":{"source":"iana","compressible":true},"application/alto-cdni+json":{"source":"iana","compressible":true},"application/alto-cdnifilter+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/alto-propmap+json":{"source":"iana","compressible":true},"application/alto-propmapparams+json":{"source":"iana","compressible":true},"application/alto-tips+json":{"source":"iana","compressible":true},"application/alto-tipsparams+json":{"source":"iana","compressible":true},"application/alto-updatestreamcontrol+json":{"source":"iana","compressible":true},"application/alto-updatestreamparams+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/appinstaller":{"compressible":false,"extensions":["appinstaller"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/appx":{"compressible":false,"extensions":["appx"]},"application/appxbundle":{"compressible":false,"extensions":["appxbundle"]},"application/at+jwt":{"source":"iana"},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-dynamic-event-message":{"source":"iana"},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/automationml-aml+xml":{"source":"iana","compressible":true,"extensions":["aml"]},"application/automationml-amlx+zip":{"source":"iana","compressible":false,"extensions":["amlx"]},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/bufr":{"source":"iana"},"application/c2pa":{"source":"iana"},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/captive+json":{"source":"iana","compressible":true},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cda+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/ce+cbor":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/cid-edhoc+cbor-seq":{"source":"iana"},"application/city+json":{"source":"iana","compressible":true},"application/city+json-seq":{"source":"iana"},"application/clr":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-eap":{"source":"iana"},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/concise-problem-details+cbor":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cose-x509":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true,"extensions":["cpl"]},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwl":{"source":"iana","extensions":["cwl"]},"application/cwl+json":{"source":"iana","compressible":true},"application/cwl+yaml":{"source":"iana"},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dash-patch+xml":{"source":"iana","compressible":true,"extensions":["mpp"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana","extensions":["dcm"]},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dots+cbor":{"source":"iana"},"application/dpop+jwt":{"source":"iana"},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/eat+cwt":{"source":"iana"},"application/eat+jwt":{"source":"iana"},"application/eat-bun+cbor":{"source":"iana"},"application/eat-bun+json":{"source":"iana","compressible":true},"application/eat-ucs+cbor":{"source":"iana"},"application/eat-ucs+json":{"source":"iana","compressible":true},"application/ecmascript":{"source":"apache","compressible":true,"extensions":["ecma"]},"application/edhoc+cbor-seq":{"source":"iana"},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/elm+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/elm+xml":{"source":"iana","compressible":true},"application/emergencycalldata.cap+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.legacyesn+json":{"source":"iana","compressible":true},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/entity-statement+jwt":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/express":{"source":"iana","extensions":["exp"]},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdf":{"source":"iana","extensions":["fdf"]},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/fhir+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geopose+json":{"source":"iana","compressible":true},"application/geoxacml+json":{"source":"iana","compressible":true},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gnap-binding-jws":{"source":"iana"},"application/gnap-binding-jwsd":{"source":"iana"},"application/gnap-binding-rotation-jws":{"source":"iana"},"application/gnap-binding-rotation-jwsd":{"source":"iana"},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/grib":{"source":"iana"},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/hl7v2+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"iana","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"apache","charset":"UTF-8","compressible":true,"extensions":["js"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/jscalendar+json":{"source":"iana","compressible":true},"application/jscontact+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jsonpath":{"source":"iana"},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwk-set+jwt":{"source":"iana"},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/linkset":{"source":"iana"},"application/linkset+json":{"source":"iana","compressible":true},"application/load-control+xml":{"source":"iana","compressible":true},"application/logout+jwt":{"source":"iana"},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lpf+zip":{"source":"iana","compressible":false},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true,"extensions":["mpf"]},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/missing-blocks+cbor-seq":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4","mpg4","mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true},"application/mrb-publish+xml":{"source":"iana","compressible":true},"application/msc-ivr+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msc-mixer+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msix":{"compressible":false,"extensions":["msix"]},"application/msixbundle":{"compressible":false,"extensions":["msixbundle"]},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana","charset":"US-ASCII"},"application/news-groupinfo":{"source":"iana","charset":"US-ASCII"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana","extensions":["cjs"]},"application/nss":{"source":"iana"},"application/oauth-authz-req+jwt":{"source":"iana"},"application/oblivious-dns-message":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":true,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/ohttp-keys":{"source":"iana"},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg","one","onea"]},"application/opc-nodeset+xml":{"source":"iana","compressible":true},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p21":{"source":"iana"},"application/p21+zip":{"source":"iana","compressible":false},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana","extensions":["asc"]},"application/pgp-signature":{"source":"iana","extensions":["sig","asc"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pidf-diff+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/private-token-issuer-directory":{"source":"iana"},"application/private-token-request":{"source":"iana"},"application/private-token-response":{"source":"iana"},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/provided-claims+jwt":{"source":"iana"},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.cyn":{"source":"iana","charset":"7-BIT"},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.implied-document+xml":{"source":"iana","compressible":true},"application/prs.implied-executable":{"source":"iana"},"application/prs.implied-object+json":{"source":"iana","compressible":true},"application/prs.implied-object+json-seq":{"source":"iana"},"application/prs.implied-object+yaml":{"source":"iana"},"application/prs.implied-structure":{"source":"iana"},"application/prs.mayfile":{"source":"iana"},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.vcfbzip2":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true,"extensions":["xsf"]},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/pvd+json":{"source":"iana","compressible":true},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"apache"},"application/reputon+json":{"source":"iana","compressible":true},"application/resolve-response+jwt":{"source":"iana"},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-checklist":{"source":"iana"},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-signed-tal":{"source":"iana"},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sarif+json":{"source":"iana","compressible":true},"application/sarif-external-properties+json":{"source":"iana","compressible":true},"application/sbe":{"source":"iana"},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-etch+cbor":{"source":"iana"},"application/senml-etch+json":{"source":"iana","compressible":true},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"apache"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spdx+json":{"source":"iana","compressible":true},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana","extensions":["sql"]},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/sslkeylogfile":{"source":"iana"},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/st2110-41":{"source":"iana"},"application/stix+json":{"source":"iana","compressible":true},"application/stratum":{"source":"iana"},"application/swid+cbor":{"source":"iana"},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/td+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tm+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/toc+cbor":{"source":"iana"},"application/token-introspection+jwt":{"source":"iana"},"application/toml":{"source":"iana","compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana","extensions":["trig"]},"application/trust-chain+json":{"source":"iana","compressible":true},"application/trust-mark+jwt":{"source":"iana"},"application/trust-mark-delegation+jwt":{"source":"iana"},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ubjson":{"compressible":false,"extensions":["ubj"]},"application/uccs+cbor":{"source":"iana"},"application/ujcs+json":{"source":"iana","compressible":true},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true,"extensions":["td"]},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vc":{"source":"iana"},"application/vc+cose":{"source":"iana"},"application/vc+jwt":{"source":"iana"},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.1ob":{"source":"iana"},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3a+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ach+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc8+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.5gnas":{"source":"iana"},"application/vnd.3gpp.5gsa2x":{"source":"iana"},"application/vnd.3gpp.5gsa2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.5gsv2x":{"source":"iana"},"application/vnd.3gpp.5gsv2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.crs+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.current-location-discovery+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gtpc":{"source":"iana"},"application/vnd.3gpp.interworking-data":{"source":"iana"},"application/vnd.3gpp.lpp":{"source":"iana"},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-msgstore-ctrl-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-regroup+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-regroup+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-regroup+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ngap":{"source":"iana"},"application/vnd.3gpp.pfcp":{"source":"iana"},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.pinapp-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.s1ap":{"source":"iana"},"application/vnd.3gpp.seal-group-doc+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-network-qos-management-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-ue-config-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-unicast-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-user-profile-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.v2x":{"source":"iana"},"application/vnd.3gpp.vae-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acm.addressxfer+json":{"source":"iana","compressible":true},"application/vnd.acm.chatbot+json":{"source":"iana","compressible":true},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"apache","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.cmoca-cmresource":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-cmtable":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.age":{"source":"iana","extensions":["age"]},"application/vnd.ah-barcode":{"source":"apache"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.arrow.file":{"source":"iana"},"application/vnd.apache.arrow.stream":{"source":"iana"},"application/vnd.apache.parquet":{"source":"iana"},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.apexlang":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["key"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"apache"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autodesk.fbx":{"extensions":["fbx"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.belightsoft.lhzd+zip":{"source":"iana","compressible":false},"application/vnd.belightsoft.lhzl+zip":{"source":"iana","compressible":false},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.bzip3":{"source":"iana"},"application/vnd.c3voc.schedule+xml":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.cncf.helm.chart.content.v1.tar+gzip":{"source":"iana"},"application/vnd.cncf.helm.chart.provenance.v1.prov":{"source":"iana"},"application/vnd.cncf.helm.config.v1+json":{"source":"iana","compressible":true},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.cryptomator.encrypted":{"source":"iana"},"application/vnd.cryptomator.vault":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.cyclonedx+json":{"source":"iana","compressible":true},"application/vnd.cyclonedx+xml":{"source":"iana","compressible":true},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.d3m-dataset":{"source":"iana"},"application/vnd.d3m-problem":{"source":"iana"},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datalog":{"source":"iana"},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.dbf":{"source":"iana","extensions":["dbf"]},"application/vnd.dcmp+xml":{"source":"iana","compressible":true,"extensions":["dcmp"]},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbisl+xml":{"source":"iana","compressible":true},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.eclipse.ditto+json":{"source":"iana","compressible":true},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.eln+zip":{"source":"iana","compressible":false},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.erofs":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eu.kasparian.car+json":{"source":"iana","compressible":true},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.familysearch.gedcom+zip":{"source":"iana","compressible":false},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"apache","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.fdsn.stationxml+xml":{"source":"iana","charset":"XML-BASED","compressible":true},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.freelog.comic":{"source":"iana"},"application/vnd.frogans.fnc":{"source":"apache","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"apache","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujifilm.fb.docuworks":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.container":{"source":"iana"},"application/vnd.fujifilm.fb.jfi+xml":{"source":"iana","compressible":true},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.ga4gh.passport+jwt":{"source":"iana"},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.genozip":{"source":"iana"},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.gentoo.catmetadata+xml":{"source":"iana","compressible":true},"application/vnd.gentoo.ebuild":{"source":"iana"},"application/vnd.gentoo.eclass":{"source":"iana"},"application/vnd.gentoo.gpkg":{"source":"iana"},"application/vnd.gentoo.manifest":{"source":"iana"},"application/vnd.gentoo.pkgmetadata+xml":{"source":"iana","compressible":true},"application/vnd.gentoo.xpak":{"source":"iana"},"application/vnd.geo+json":{"source":"apache","compressible":true},"application/vnd.geocube+xml":{"source":"apache","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.pinboard":{"source":"iana"},"application/vnd.geogebra.slides":{"source":"iana","extensions":["ggs"]},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.gnu.taler.exchange+json":{"source":"iana","compressible":true},"application/vnd.gnu.taler.merchant+json":{"source":"iana","compressible":true},"application/vnd.google-apps.audio":{},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.drawing":{"compressible":false,"extensions":["gdraw"]},"application/vnd.google-apps.drive-sdk":{"compressible":false},"application/vnd.google-apps.file":{},"application/vnd.google-apps.folder":{"compressible":false},"application/vnd.google-apps.form":{"compressible":false,"extensions":["gform"]},"application/vnd.google-apps.fusiontable":{},"application/vnd.google-apps.jam":{"compressible":false,"extensions":["gjam"]},"application/vnd.google-apps.mail-layout":{},"application/vnd.google-apps.map":{"compressible":false,"extensions":["gmap"]},"application/vnd.google-apps.photo":{},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.script":{"compressible":false,"extensions":["gscript"]},"application/vnd.google-apps.shortcut":{},"application/vnd.google-apps.site":{"compressible":false,"extensions":["gsite"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-apps.unknown":{},"application/vnd.google-apps.video":{},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"apache","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true,"extensions":["xdcf"]},"application/vnd.gpxsee.map+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.hsl":{"source":"iana"},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"apache"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"apache","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"apache"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.ipfs.ipns-record":{"source":"iana"},"application/vnd.ipld.car":{"source":"iana"},"application/vnd.ipld.dag-cbor":{"source":"iana"},"application/vnd.ipld.dag-json":{"source":"iana"},"application/vnd.ipld.raw":{"source":"iana"},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kdl":{"source":"iana"},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.keyman.kmp+zip":{"source":"iana","compressible":false},"application/vnd.keyman.kmx":{"source":"iana"},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.ldev.productlicensing":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana","extensions":["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxar.archive.3tz+zip":{"source":"iana","compressible":false},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.mdl":{"source":"iana"},"application/vnd.mdl-mbsdf":{"source":"iana"},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.medicalholodeck.recordxr":{"source":"iana"},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mermaid":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.modl":{"source":"iana"},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-visio.viewer":{"extensions":["vdx"]},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msgpack":{"source":"iana"},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.nacamar.ybrid+json":{"source":"iana","compressible":true},"application/vnd.nato.bindingdataobject+cbor":{"source":"iana"},"application/vnd.nato.bindingdataobject+json":{"source":"iana","compressible":true},"application/vnd.nato.bindingdataobject+xml":{"source":"iana","compressible":true,"extensions":["bdo"]},"application/vnd.nato.openxmlformats-package.iepd+zip":{"source":"iana","compressible":false},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nebumind.line":{"source":"iana"},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"apache","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oai.workflows":{"source":"iana"},"application/vnd.oai.workflows+json":{"source":"iana","compressible":true},"application/vnd.oai.workflows+yaml":{"source":"iana"},"application/vnd.oasis.opendocument.base":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"apache","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-master-template":{"source":"iana"},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oci.image.manifest.v1+json":{"source":"iana","compressible":true},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"apache","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"apache","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+cbor":{"source":"iana"},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.onvif.metadata":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.opentimestamps.ots":{"source":"iana"},"application/vnd.openvpi.dspx+json":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.procrate.brushset":{"extensions":["brushset"]},"application/vnd.procreate.brush":{"extensions":["brush"]},"application/vnd.procreate.dream":{"extensions":["drm"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.pt.mundusmundi":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true,"extensions":["xhtm"]},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana","extensions":["rar"]},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.relpipe":{"source":"iana"},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.resilient.logic":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sar":{"source":"iana"},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.seis+json":{"source":"iana","compressible":true},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.shp":{"source":"iana"},"application/vnd.shx":{"source":"iana"},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.sketchometry":{"source":"iana"},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.smintio.portals.archive":{"source":"iana"},"application/vnd.snesdev-page-table":{"source":"iana"},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.sybyl.mol2":{"source":"iana"},"application/vnd.sycle+xml":{"source":"iana","compressible":true},"application/vnd.syft+json":{"source":"iana","compressible":true},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","charset":"UTF-8","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uic.osdm+json":{"source":"iana","compressible":true},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml","uo"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.veraison.tsm-report+cbor":{"source":"iana"},"application/vnd.veraison.tsm-report+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veritone.aion+json":{"source":"iana","compressible":true},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw","vsdx","vtx"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vocalshaper.vsp4":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","charset":"UTF-8","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.wasmflow.wafl":{"source":"iana"},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.dpp":{"source":"iana"},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordlift":{"source":"iana"},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xarin.cpj":{"source":"iana"},"application/vnd.xecrets-encrypted":{"source":"iana"},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/voucher-jws+json":{"source":"iana","compressible":true},"application/vp":{"source":"iana"},"application/vp+cose":{"source":"iana"},"application/vp+jwt":{"source":"iana"},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"source":"iana","compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true,"extensions":["wif"]},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blender":{"extensions":["blend"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-compressed":{"extensions":["rar"]},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-ipynb+json":{"compressible":true,"extensions":["ipynb"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-iwork-keynote-sffkey":{"extensions":["key"]},"application/x-iwork-numbers-sffnumbers":{"extensions":["numbers"]},"application/x-iwork-pages-sffpages":{"extensions":["pages"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-pki-message":{"source":"iana"},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"iana","extensions":["der","crt","pem"]},"application/x-x509-ca-ra-cert":{"source":"iana"},"application/x-x509-next-ca-cert":{"source":"iana"},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zip-compressed":{"extensions":["zip"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xfdf":{"source":"iana","extensions":["xfdf"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xsl","xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yaml":{"source":"iana"},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+cbor":{"source":"iana"},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yang-sid+json":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zip+dotlottie":{"extensions":["lottie"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana","extensions":["adts","aac"]},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana","extensions":["amr"]},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flac":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/matroska":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/mhas":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/midi-clip":{"source":"iana"},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a","m4b"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx","opus"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/scip":{"source":"iana"},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sofa":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tetra_acelp_bb":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/tsvcis":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"apache"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"source":"iana","compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana","extensions":["avci"]},"image/avcs":{"source":"iana","extensions":["avcs"]},"image/avif":{"source":"iana","compressible":false,"extensions":["avif"]},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp","dib"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/dpx":{"source":"iana","extensions":["dpx"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/j2c":{"source":"iana"},"image/jaii":{"source":"iana","extensions":["jaii"]},"image/jais":{"source":"iana","extensions":["jais"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpg","jpeg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm","jpgm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxl":{"source":"iana","extensions":["jxl"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/ktx2":{"source":"iana","extensions":["ktx2"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false,"extensions":["jfif"]},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif","btf"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.clip":{"source":"iana"},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","compressible":true,"extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"compressible":true,"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.pco.b16":{"source":"iana","extensions":["b16"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"iana","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-adobe-dng":{"extensions":["dng"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-emf":{"source":"iana"},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-wmf":{"source":"iana"},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/bhttp":{"source":"iana"},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/mls":{"source":"iana"},"message/news":{"source":"apache"},"message/ohttp-req":{"source":"iana"},"message/ohttp-res":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime","mht","mhtml"]},"message/s-http":{"source":"apache"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"apache"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/e57":{"source":"iana"},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/jt":{"source":"iana","extensions":["jt"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/mtl":{"source":"iana","extensions":["mtl"]},"model/obj":{"source":"iana","extensions":["obj"]},"model/prc":{"source":"iana","extensions":["prc"]},"model/step":{"source":"iana","extensions":["step","stp","stpnc","p21","210"]},"model/step+xml":{"source":"iana","compressible":true,"extensions":["stpx"]},"model/step+zip":{"source":"iana","compressible":false,"extensions":["stpz"]},"model/step-xml+zip":{"source":"iana","compressible":false,"extensions":["stpxz"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/u3d":{"source":"iana","extensions":["u3d"]},"model/vnd.bary":{"source":"iana","extensions":["bary"]},"model/vnd.cld":{"source":"iana","extensions":["cld"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.pytha.pyox":{"source":"iana","extensions":["pyo","pyox"]},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.sap.vds":{"source":"iana","extensions":["vds"]},"model/vnd.usda":{"source":"iana","extensions":["usda"]},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/cql":{"source":"iana"},"text/cql-expression":{"source":"iana"},"text/cql-identifier":{"source":"iana"},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"apache"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/fhirpath":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/gff3":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/hl7v2":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["md","markdown"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana","charset":"UTF-8"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana","charset":"UTF-8"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/prs.texi":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shaclc":{"source":"iana"},"text/shex":{"source":"iana","extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/spdx":{"source":"iana","extensions":["spdx"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana","charset":"UTF-8"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana","charset":"UTF-8"},"text/vnd.exchangeable":{"source":"iana"},"text/vnd.familysearch.gedcom":{"source":"iana","extensions":["ged"]},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hans":{"source":"iana"},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"apache"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","charset":"UTF-8","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana","charset":"UTF-8"},"text/vnd.vcf":{"source":"iana"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vnd.zoo.kcl":{"source":"iana"},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/wgsl":{"source":"iana","extensions":["wgsl"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"compressible":true,"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/av1":{"source":"iana"},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/evc":{"source":"iana"},"video/ffv1":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/h266":{"source":"iana"},"video/iso.segment":{"source":"iana","extensions":["m4s"]},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/jxsv":{"source":"iana"},"video/lottie+json":{"source":"iana","compressible":true},"video/matroska":{"source":"iana"},"video/matroska-3d":{"source":"iana"},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts","m2t","m2ts","mts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/scip":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.planar":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"apache"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/vp9":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}')}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=a,s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var i=Object.create(null);s.r(i);var a={};t=t||[null,n({}),n([]),n(n)];for(var o=2&r&&e;("object"==typeof o||"function"==typeof o)&&!~t.indexOf(o);o=n(o))Object.getOwnPropertyNames(o).forEach(t=>a[t]=()=>e[t]);return a.default=()=>e,s.d(i,a),i},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,n)=>(s.f[n](e,t),t),[])),s.u=e=>e+".mashlib.min.js",s.miniCssF=e=>{},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},i="Mashlib:",s.l=(e,t,n,a)=>{if(r[e])r[e].push(t);else{var o,c;if(void 0!==n)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var p=l[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==i+n){o=p;break}}o||(c=!0,(o=document.createElement("script")).charset="utf-8",s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-webpack",i+n),o.src=e),r[e]=[t];var d=(t,n)=>{o.onerror=o.onload=null,clearTimeout(f);var i=r[e];if(delete r[e],o.parentNode&&o.parentNode.removeChild(o),i&&i.forEach(e=>e(n)),t)return t(n)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=d.bind(null,o.onerror),o.onload=d.bind(null,o.onload),c&&document.head.appendChild(o)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.p="/",(()=>{var e={792:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise((n,i)=>r=e[t]=[n,i]);n.push(r[2]=i);var a=s.p+s.u(t),o=new Error;s.l(a,n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;o.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",o.name="ChunkLoadError",o.type=i,o.request=a,r[1](o)}},"chunk-"+t,t)}};var t=(t,n)=>{var r,i,[a,o,c]=n,l=0;if(a.some(t=>0!==e[t])){for(r in o)s.o(o,r)&&(s.m[r]=o[r]);if(c)c(s)}for(t&&t(n);l<a.length;l++)i=a[l],s.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=self.webpackChunkMashlib=self.webpackChunkMashlib||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var c={};return(()=>{"use strict";s.r(c),s.d(c,{versionInfo:()=>r});var e=s(8230),t=s(7523),n=s(9332);const r={buildTime:"2026-03-13T10:45:09Z",commit:"54ca86bb05d5f47142d31589cef3d9e2ecf36452",npmInfo:{mashlib:"2.1.3",npm:"10.9.4",node:"22.22.0",acorn:"8.15.0",ada:"2.9.2",amaro:"1.1.4",ares:"1.34.6",brotli:"1.1.0",cjs_module_lexer:"2.1.0",cldr:"47.0",icu:"77.1",llhttp:"9.3.0",modules:"127",napi:"10",nbytes:"0.1.1",ncrypto:"0.0.1",nghttp2:"1.64.0",openssl:"3.5.4",simdjson:"3.13.0",simdutf:"6.4.2",sqlite:"3.50.4",tz:"2025b",undici:"6.23.0",unicode:"16.0",uv:"1.51.0",uvwasi:"0.0.23",v8:"12.4.254.21-node.33",zlib:"1.3.1-470d3a2",zstd:"1.5.7"}},i=window,a=()=>{const e=localStorage.getItem("mashlib-theme"),t=window.matchMedia("(prefers-color-scheme: dark)").matches;"dark"===(e||(t?"dark":"light"))?document.documentElement.setAttribute("data-theme","dark"):document.documentElement.removeAttribute("data-theme")};a(),i.$rdf=e,i.panes=t,i.SolidLogic={authn:n.authn,authSession:n.authSession,store:n.store,solidLogicSingleton:n.solidLogicSingleton},i.mashlib={versionInfo:r,theme:{set:e=>{"dark"===e?document.documentElement.setAttribute("data-theme","dark"):document.documentElement.removeAttribute("data-theme"),localStorage.setItem("mashlib-theme",e)},get:()=>"dark"===document.documentElement.getAttribute("data-theme")?"dark":"light",init:a}},i.panes.runDataBrowser=function(r){e.Fetcher.crossSiteProxyTemplate=window.origin+"/xss/?uri={uri}";try{const e=document.createElement("meta");e.setAttribute("name","monetization"),e.setAttribute("content",`$${window.location.host}`),document.head.appendChild(e)}catch(e){}n.authn.checkUser().then(function(e){return t.initMainPage(n.solidLogicSingleton.store,r)})},window.onpopstate=function(t){i.document.outline.GotoSubject(e.sym(window.document.location.href),!0,void 0,!0,void 0)},i.dump=function(e){}})(),c})());
|
|
461
|
+
t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,c=(1<<s)-1,l=c>>1,u=-7,p=n?i-1:0,d=n?-1:1,f=e[t+p];for(p+=d,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+p],p+=d,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=256*o+e[t+p],p+=d,u-=8);if(0===a)a=1-l;else{if(a===c)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),a-=l}return(f?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,c,l=8*a-i-1,u=(1<<l)-1,p=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+p>=1?d/c:d*Math.pow(2,1-p))*c>=2&&(o++,c/=2),o+p>=u?(s=0,o=u):o+p>=1?(s=(t*c-1)*Math.pow(2,i),o+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&s,f+=h,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+f]=255&o,f+=h,o/=256,l-=8);e[n+f-h]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.jws,n=e.KeyUtil,i=e.X509,a=e.crypto,o=e.hextob64u,s=e.b64tohex,c=e.AllowedSigningAlgs;return function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.parseJwt=function e(n){r.Log.debug("JoseUtil.parseJwt");try{var i=t.JWS.parse(n);return{header:i.headerObj,payload:i.payloadObj}}catch(e){r.Log.error(e)}},e.validateJwt=function(t,a,o,c,l,u,p){r.Log.debug("JoseUtil.validateJwt");try{if("RSA"===a.kty)if(a.e&&a.n)a=n.getKey(a);else{if(!a.x5c||!a.x5c.length)return r.Log.error("JoseUtil.validateJwt: RSA key missing key material",a),Promise.reject(new Error("RSA key missing key material"));var d=s(a.x5c[0]);a=i.getPublicKeyFromCertHex(d)}else{if("EC"!==a.kty)return r.Log.error("JoseUtil.validateJwt: Unsupported key type",a&&a.kty),Promise.reject(new Error(a.kty));if(!(a.crv&&a.x&&a.y))return r.Log.error("JoseUtil.validateJwt: EC key missing key material",a),Promise.reject(new Error("EC key missing key material"));a=n.getKey(a)}return e._validateJwt(t,a,o,c,l,u,p)}catch(e){return r.Log.error(e&&e.message||e),Promise.reject("JWT validation failed")}},e.validateJwtAttributes=function(t,n,i,a,o,s){a||(a=0),o||(o=parseInt(Date.now()/1e3));var c=e.parseJwt(t).payload;if(!c.iss)return r.Log.error("JoseUtil._validateJwt: issuer was not provided"),Promise.reject(new Error("issuer was not provided"));if(c.iss!==n)return r.Log.error("JoseUtil._validateJwt: Invalid issuer in token",c.iss),Promise.reject(new Error("Invalid issuer in token: "+c.iss));if(!c.aud)return r.Log.error("JoseUtil._validateJwt: aud was not provided"),Promise.reject(new Error("aud was not provided"));if(!(c.aud===i||Array.isArray(c.aud)&&c.aud.indexOf(i)>=0))return r.Log.error("JoseUtil._validateJwt: Invalid audience in token",c.aud),Promise.reject(new Error("Invalid audience in token: "+c.aud));if(c.azp&&c.azp!==i)return r.Log.error("JoseUtil._validateJwt: Invalid azp in token",c.azp),Promise.reject(new Error("Invalid azp in token: "+c.azp));if(!s){var l=o+a,u=o-a;if(!c.iat)return r.Log.error("JoseUtil._validateJwt: iat was not provided"),Promise.reject(new Error("iat was not provided"));if(l<c.iat)return r.Log.error("JoseUtil._validateJwt: iat is in the future",c.iat),Promise.reject(new Error("iat is in the future: "+c.iat));if(c.nbf&&l<c.nbf)return r.Log.error("JoseUtil._validateJwt: nbf is in the future",c.nbf),Promise.reject(new Error("nbf is in the future: "+c.nbf));if(!c.exp)return r.Log.error("JoseUtil._validateJwt: exp was not provided"),Promise.reject(new Error("exp was not provided"));if(c.exp<u)return r.Log.error("JoseUtil._validateJwt: exp is in the past",c.exp),Promise.reject(new Error("exp is in the past:"+c.exp))}return Promise.resolve(c)},e._validateJwt=function(n,i,a,o,s,l,u){return e.validateJwtAttributes(n,a,o,s,l,u).then(function(e){try{return t.JWS.verify(n,i,c)?e:(r.Log.error("JoseUtil._validateJwt: signature validation failed"),Promise.reject(new Error("signature validation failed")))}catch(e){return r.Log.error(e&&e.message||e),Promise.reject(new Error("signature validation failed"))}})},e.hashString=function e(t,n){try{return a.Util.hashString(t,n)}catch(e){r.Log.error(e)}},e.hexToBase64Url=function e(t){try{return o(t)}catch(e){r.Log.error(e)}},e}()};var r=n(0);e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SigninResponse=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(3);t.SigninResponse=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=i.UrlUtility.parseUrlFragment(t,n);this.error=r.error,this.error_description=r.error_description,this.error_uri=r.error_uri,this.code=r.code,this.state=r.state,this.id_token=r.id_token,this.session_state=r.session_state,this.access_token=r.access_token,this.token_type=r.token_type,this.scope=r.scope,this.profile=void 0,this.expires_in=r.expires_in}return r(e,[{key:"expires_in",get:function(){if(this.expires_at){var e=parseInt(Date.now()/1e3);return this.expires_at-e}},set:function(e){var t=parseInt(e);if("number"==typeof t&&t>0){var n=parseInt(Date.now()/1e3);this.expires_at=n+t}}},{key:"expired",get:function(){var e=this.expires_in;if(void 0!==e)return e<=0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}},{key:"isOpenIdConnect",get:function(){return this.scopes.indexOf("openid")>=0||!!this.id_token}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SignoutRequest=void 0;var r=n(0),i=n(3),a=n(9);t.SignoutRequest=function e(t){var n=t.url,o=t.id_token_hint,s=t.post_logout_redirect_uri,c=t.data,l=t.extraQueryParams,u=t.request_type;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!n)throw r.Log.error("SignoutRequest.ctor: No url passed"),new Error("url");for(var p in o&&(n=i.UrlUtility.addQueryParam(n,"id_token_hint",o)),s&&(n=i.UrlUtility.addQueryParam(n,"post_logout_redirect_uri",s),c&&(this.state=new a.State({data:c,request_type:u}),n=i.UrlUtility.addQueryParam(n,"state",this.state.id))),l)n=i.UrlUtility.addQueryParam(n,p,l[p]);this.url=n}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SignoutResponse=void 0;var r=n(3);t.SignoutResponse=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=r.UrlUtility.parseUrlFragment(t,"?");this.error=n.error,this.error_description=n.error_description,this.error_uri=n.error_uri,this.state=n.state}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.InMemoryWebStorage=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0);t.InMemoryWebStorage=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._data={}}return e.prototype.getItem=function(e){return i.Log.debug("InMemoryWebStorage.getItem",e),this._data[e]},e.prototype.setItem=function(e,t){i.Log.debug("InMemoryWebStorage.setItem",e),this._data[e]=t},e.prototype.removeItem=function(e){i.Log.debug("InMemoryWebStorage.removeItem",e),delete this._data[e]},e.prototype.key=function(e){return Object.getOwnPropertyNames(this._data)[e]},r(e,[{key:"length",get:function(){return Object.getOwnPropertyNames(this._data).length}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UserManager=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=n(10),o=n(39),s=n(15),c=n(45),l=n(47),u=n(18),p=n(8),d=n(20),f=n(11),h=n(4);t.UserManager=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.SilentRenewService,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.SessionMonitor,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:d.TokenRevocationClient,p=arguments.length>4&&void 0!==arguments[4]?arguments[4]:f.TokenClient,m=arguments.length>5&&void 0!==arguments[5]?arguments[5]:h.JoseUtil;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,t),n instanceof o.UserManagerSettings||(n=new o.UserManagerSettings(n));var g=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return g._events=new c.UserManagerEvents(n),g._silentRenewService=new r(g),g.settings.automaticSilentRenew&&(i.Log.debug("UserManager.ctor: automaticSilentRenew is configured, setting up silent renew"),g.startSilentRenew()),g.settings.monitorSession&&(i.Log.debug("UserManager.ctor: monitorSession is configured, setting up session monitor"),g._sessionMonitor=new a(g)),g._tokenRevocationClient=new s(g._settings),g._tokenClient=new p(g._settings),g._joseUtil=m,g}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getUser=function(){var e=this;return this._loadUser().then(function(t){return t?(i.Log.info("UserManager.getUser: user loaded"),e._events.load(t,!1),t):(i.Log.info("UserManager.getUser: user not found in storage"),null)})},t.prototype.removeUser=function(){var e=this;return this.storeUser(null).then(function(){i.Log.info("UserManager.removeUser: user removed from storage"),e._events.unload()})},t.prototype.signinRedirect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="si:r";var t={useReplaceToNavigate:e.useReplaceToNavigate};return this._signinStart(e,this._redirectNavigator,t).then(function(){i.Log.info("UserManager.signinRedirect: successful")})},t.prototype.signinRedirectCallback=function(e){return this._signinEnd(e||this._redirectNavigator.url).then(function(e){return e.profile&&e.profile.sub?i.Log.info("UserManager.signinRedirectCallback: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinRedirectCallback: no sub"),e})},t.prototype.signinPopup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="si:p";var t=e.redirect_uri||this.settings.popup_redirect_uri||this.settings.redirect_uri;return t?(e.redirect_uri=t,e.display="popup",this._signin(e,this._popupNavigator,{startUrl:t,popupWindowFeatures:e.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:e.popupWindowTarget||this.settings.popupWindowTarget}).then(function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinPopup: signinPopup successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinPopup: no sub")),e})):(i.Log.error("UserManager.signinPopup: No popup_redirect_uri or redirect_uri configured"),Promise.reject(new Error("No popup_redirect_uri or redirect_uri configured")))},t.prototype.signinPopupCallback=function(e){return this._signinCallback(e,this._popupNavigator).then(function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinPopupCallback: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinPopupCallback: no sub")),e}).catch(function(e){i.Log.error(e.message)})},t.prototype.signinSilent=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=Object.assign({},t),this._loadUser().then(function(n){return n&&n.refresh_token?(t.refresh_token=n.refresh_token,e._useRefreshToken(t)):(t.request_type="si:s",t.id_token_hint=t.id_token_hint||e.settings.includeIdTokenInSilentRenew&&n&&n.id_token,n&&e._settings.validateSubOnSilentRenew&&(i.Log.debug("UserManager.signinSilent, subject prior to silent renew: ",n.profile.sub),t.current_sub=n.profile.sub),e._signinSilentIframe(t))})},t.prototype._useRefreshToken=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._tokenClient.exchangeRefreshToken(t).then(function(t){return t?t.access_token?e._loadUser().then(function(n){if(n){var r=Promise.resolve();return t.id_token&&(r=e._validateIdTokenFromTokenRefreshToken(n.profile,t.id_token)),r.then(function(){return i.Log.debug("UserManager._useRefreshToken: refresh token response success"),n.id_token=t.id_token||n.id_token,n.access_token=t.access_token,n.refresh_token=t.refresh_token||n.refresh_token,n.expires_in=t.expires_in,e.storeUser(n).then(function(){return e._events.load(n),n})})}return null}):(i.Log.error("UserManager._useRefreshToken: No access token returned from token endpoint"),Promise.reject("No access token returned from token endpoint")):(i.Log.error("UserManager._useRefreshToken: No response returned from token endpoint"),Promise.reject("No response returned from token endpoint"))})},t.prototype._validateIdTokenFromTokenRefreshToken=function(e,t){var n=this;return this._metadataService.getIssuer().then(function(r){return n.settings.getEpochTime().then(function(a){return n._joseUtil.validateJwtAttributes(t,r,n._settings.client_id,n._settings.clockSkew,a).then(function(t){return t?t.sub!==e.sub?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: sub in id_token does not match current sub"),Promise.reject(new Error("sub in id_token does not match current sub"))):t.auth_time&&t.auth_time!==e.auth_time?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: auth_time in id_token does not match original auth_time"),Promise.reject(new Error("auth_time in id_token does not match original auth_time"))):t.azp&&t.azp!==e.azp?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: azp in id_token does not match original azp"),Promise.reject(new Error("azp in id_token does not match original azp"))):!t.azp&&e.azp?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: azp not in id_token, but present in original id_token"),Promise.reject(new Error("azp not in id_token, but present in original id_token"))):void 0:(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: Failed to validate id_token"),Promise.reject(new Error("Failed to validate id_token")))})})})},t.prototype._signinSilentIframe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.redirect_uri||this.settings.silent_redirect_uri||this.settings.redirect_uri;return t?(e.redirect_uri=t,e.prompt=e.prompt||"none",this._signin(e,this._iframeNavigator,{startUrl:t,silentRequestTimeout:e.silentRequestTimeout||this.settings.silentRequestTimeout}).then(function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinSilent: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinSilent: no sub")),e})):(i.Log.error("UserManager.signinSilent: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))},t.prototype.signinSilentCallback=function(e){return this._signinCallback(e,this._iframeNavigator).then(function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinSilentCallback: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinSilentCallback: no sub")),e})},t.prototype.signinCallback=function(e){var t=this;return this.readSigninResponseState(e).then(function(n){var r=n.state;return n.response,"si:r"===r.request_type?t.signinRedirectCallback(e):"si:p"===r.request_type?t.signinPopupCallback(e):"si:s"===r.request_type?t.signinSilentCallback(e):Promise.reject(new Error("invalid response_type in state"))})},t.prototype.signoutCallback=function(e,t){var n=this;return this.readSignoutResponseState(e).then(function(r){var i=r.state,a=r.response;return i?"so:r"===i.request_type?n.signoutRedirectCallback(e):"so:p"===i.request_type?n.signoutPopupCallback(e,t):Promise.reject(new Error("invalid response_type in state")):a})},t.prototype.querySessionStatus=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).request_type="si:s";var n=t.redirect_uri||this.settings.silent_redirect_uri||this.settings.redirect_uri;return n?(t.redirect_uri=n,t.prompt="none",t.response_type=t.response_type||this.settings.query_status_response_type,t.scope=t.scope||"openid",t.skipUserInfo=!0,this._signinStart(t,this._iframeNavigator,{startUrl:n,silentRequestTimeout:t.silentRequestTimeout||this.settings.silentRequestTimeout}).then(function(t){return e.processSigninResponse(t.url).then(function(e){if(i.Log.debug("UserManager.querySessionStatus: got signin response"),e.session_state&&e.profile.sub)return i.Log.info("UserManager.querySessionStatus: querySessionStatus success for sub: ",e.profile.sub),{session_state:e.session_state,sub:e.profile.sub,sid:e.profile.sid};i.Log.info("querySessionStatus successful, user not authenticated")}).catch(function(t){if(t.session_state&&e.settings.monitorAnonymousSession&&("login_required"==t.message||"consent_required"==t.message||"interaction_required"==t.message||"account_selection_required"==t.message))return i.Log.info("UserManager.querySessionStatus: querySessionStatus success for anonymous user"),{session_state:t.session_state};throw t})})):(i.Log.error("UserManager.querySessionStatus: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))},t.prototype._signin=function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._signinStart(e,t,r).then(function(t){return n._signinEnd(t.url,e)})},t.prototype._signinStart=function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.prepare(r).then(function(t){return i.Log.debug("UserManager._signinStart: got navigator window handle"),n.createSigninRequest(e).then(function(e){return i.Log.debug("UserManager._signinStart: got signin request"),r.url=e.url,r.id=e.state.id,t.navigate(r)}).catch(function(e){throw t.close&&(i.Log.debug("UserManager._signinStart: Error after preparing navigator, closing navigator window"),t.close()),e})})},t.prototype._signinEnd=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.processSigninResponse(e).then(function(e){i.Log.debug("UserManager._signinEnd: got signin response");var r=new s.User(e);if(n.current_sub){if(n.current_sub!==r.profile.sub)return i.Log.debug("UserManager._signinEnd: current user does not match user returned from signin. sub from signin: ",r.profile.sub),Promise.reject(new Error("login_required"));i.Log.debug("UserManager._signinEnd: current user matches user returned from signin")}return t.storeUser(r).then(function(){return i.Log.debug("UserManager._signinEnd: user stored"),t._events.load(r),r})})},t.prototype._signinCallback=function(e,t){i.Log.debug("UserManager._signinCallback");var n="query"===this._settings.response_mode||!this._settings.response_mode&&p.SigninRequest.isCode(this._settings.response_type)?"?":"#";return t.callback(e,void 0,n)},t.prototype.signoutRedirect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="so:r";var t=e.post_logout_redirect_uri||this.settings.post_logout_redirect_uri;t&&(e.post_logout_redirect_uri=t);var n={useReplaceToNavigate:e.useReplaceToNavigate};return this._signoutStart(e,this._redirectNavigator,n).then(function(){i.Log.info("UserManager.signoutRedirect: successful")})},t.prototype.signoutRedirectCallback=function(e){return this._signoutEnd(e||this._redirectNavigator.url).then(function(e){return i.Log.info("UserManager.signoutRedirectCallback: successful"),e})},t.prototype.signoutPopup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="so:p";var t=e.post_logout_redirect_uri||this.settings.popup_post_logout_redirect_uri||this.settings.post_logout_redirect_uri;return e.post_logout_redirect_uri=t,e.display="popup",e.post_logout_redirect_uri&&(e.state=e.state||{}),this._signout(e,this._popupNavigator,{startUrl:t,popupWindowFeatures:e.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:e.popupWindowTarget||this.settings.popupWindowTarget}).then(function(){i.Log.info("UserManager.signoutPopup: successful")})},t.prototype.signoutPopupCallback=function(e,t){return void 0===t&&"boolean"==typeof e&&(t=e,e=null),this._popupNavigator.callback(e,t,"?").then(function(){i.Log.info("UserManager.signoutPopupCallback: successful")})},t.prototype._signout=function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._signoutStart(e,t,r).then(function(e){return n._signoutEnd(e.url)})},t.prototype._signoutStart=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return arguments[1].prepare(n).then(function(r){return i.Log.debug("UserManager._signoutStart: got navigator window handle"),t._loadUser().then(function(a){return i.Log.debug("UserManager._signoutStart: loaded current user from storage"),(t._settings.revokeAccessTokenOnSignout?t._revokeInternal(a):Promise.resolve()).then(function(){var o=e.id_token_hint||a&&a.id_token;return o&&(i.Log.debug("UserManager._signoutStart: Setting id_token into signout request"),e.id_token_hint=o),t.removeUser().then(function(){return i.Log.debug("UserManager._signoutStart: user removed, creating signout request"),t.createSignoutRequest(e).then(function(e){return i.Log.debug("UserManager._signoutStart: got signout request"),n.url=e.url,e.state&&(n.id=e.state.id),r.navigate(n)})})})}).catch(function(e){throw r.close&&(i.Log.debug("UserManager._signoutStart: Error after preparing navigator, closing navigator window"),r.close()),e})})},t.prototype._signoutEnd=function(e){return this.processSignoutResponse(e).then(function(e){return i.Log.debug("UserManager._signoutEnd: got signout response"),e})},t.prototype.revokeAccessToken=function(){var e=this;return this._loadUser().then(function(t){return e._revokeInternal(t,!0).then(function(n){if(n)return i.Log.debug("UserManager.revokeAccessToken: removing token properties from user and re-storing"),t.access_token=null,t.refresh_token=null,t.expires_at=null,t.token_type=null,e.storeUser(t).then(function(){i.Log.debug("UserManager.revokeAccessToken: user stored"),e._events.load(t)})})}).then(function(){i.Log.info("UserManager.revokeAccessToken: access token revoked successfully")})},t.prototype._revokeInternal=function(e,t){var n=this;if(e){var r=e.access_token,a=e.refresh_token;return this._revokeAccessTokenInternal(r,t).then(function(e){return n._revokeRefreshTokenInternal(a,t).then(function(t){return e||t||i.Log.debug("UserManager.revokeAccessToken: no need to revoke due to no token(s), or JWT format"),e||t})})}return Promise.resolve(!1)},t.prototype._revokeAccessTokenInternal=function(e,t){return!e||e.indexOf(".")>=0?Promise.resolve(!1):this._tokenRevocationClient.revoke(e,t).then(function(){return!0})},t.prototype._revokeRefreshTokenInternal=function(e,t){return e?this._tokenRevocationClient.revoke(e,t,"refresh_token").then(function(){return!0}):Promise.resolve(!1)},t.prototype.startSilentRenew=function(){this._silentRenewService.start()},t.prototype.stopSilentRenew=function(){this._silentRenewService.stop()},t.prototype._loadUser=function(){return this._userStore.get(this._userStoreKey).then(function(e){return e?(i.Log.debug("UserManager._loadUser: user storageString loaded"),s.User.fromStorageString(e)):(i.Log.debug("UserManager._loadUser: no user storageString"),null)})},t.prototype.storeUser=function(e){if(e){i.Log.debug("UserManager.storeUser: storing user");var t=e.toStorageString();return this._userStore.set(this._userStoreKey,t)}return i.Log.debug("storeUser.storeUser: removing user"),this._userStore.remove(this._userStoreKey)},r(t,[{key:"_redirectNavigator",get:function(){return this.settings.redirectNavigator}},{key:"_popupNavigator",get:function(){return this.settings.popupNavigator}},{key:"_iframeNavigator",get:function(){return this.settings.iframeNavigator}},{key:"_userStore",get:function(){return this.settings.userStore}},{key:"events",get:function(){return this._events}},{key:"_userStoreKey",get:function(){return"user:"+this.settings.authority+":"+this.settings.client_id}}]),t}(a.OidcClient)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UserManagerSettings=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=(n(0),n(5)),a=n(40),o=n(41),s=n(43),c=n(6),l=n(1),u=n(8);t.UserManagerSettings=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.popup_redirect_uri,i=n.popup_post_logout_redirect_uri,p=n.popupWindowFeatures,d=n.popupWindowTarget,f=n.silent_redirect_uri,h=n.silentRequestTimeout,m=n.automaticSilentRenew,g=void 0!==m&&m,v=n.validateSubOnSilentRenew,b=void 0!==v&&v,y=n.includeIdTokenInSilentRenew,w=void 0===y||y,x=n.monitorSession,k=void 0===x||x,_=n.monitorAnonymousSession,E=void 0!==_&&_,C=n.checkSessionInterval,S=void 0===C?2e3:C,A=n.stopCheckSessionOnError,T=void 0===A||A,P=n.query_status_response_type,R=n.revokeAccessTokenOnSignout,I=void 0!==R&&R,F=n.accessTokenExpiringNotificationTime,N=void 0===F?60:F,O=n.redirectNavigator,L=void 0===O?new a.RedirectNavigator:O,j=n.popupNavigator,M=void 0===j?new o.PopupNavigator:j,D=n.iframeNavigator,U=void 0===D?new s.IFrameNavigator:D,B=n.userStore,z=void 0===B?new c.WebStorageStateStore({store:l.Global.sessionStorage}):B;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var H=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,arguments[0]));return H._popup_redirect_uri=r,H._popup_post_logout_redirect_uri=i,H._popupWindowFeatures=p,H._popupWindowTarget=d,H._silent_redirect_uri=f,H._silentRequestTimeout=h,H._automaticSilentRenew=g,H._validateSubOnSilentRenew=b,H._includeIdTokenInSilentRenew=w,H._accessTokenExpiringNotificationTime=N,H._monitorSession=k,H._monitorAnonymousSession=E,H._checkSessionInterval=S,H._stopCheckSessionOnError=T,P?H._query_status_response_type=P:arguments[0]&&arguments[0].response_type?H._query_status_response_type=u.SigninRequest.isOidc(arguments[0].response_type)?"id_token":"code":H._query_status_response_type="id_token",H._revokeAccessTokenOnSignout=I,H._redirectNavigator=L,H._popupNavigator=M,H._iframeNavigator=U,H._userStore=z,H}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"popup_redirect_uri",get:function(){return this._popup_redirect_uri}},{key:"popup_post_logout_redirect_uri",get:function(){return this._popup_post_logout_redirect_uri}},{key:"popupWindowFeatures",get:function(){return this._popupWindowFeatures}},{key:"popupWindowTarget",get:function(){return this._popupWindowTarget}},{key:"silent_redirect_uri",get:function(){return this._silent_redirect_uri}},{key:"silentRequestTimeout",get:function(){return this._silentRequestTimeout}},{key:"automaticSilentRenew",get:function(){return this._automaticSilentRenew}},{key:"validateSubOnSilentRenew",get:function(){return this._validateSubOnSilentRenew}},{key:"includeIdTokenInSilentRenew",get:function(){return this._includeIdTokenInSilentRenew}},{key:"accessTokenExpiringNotificationTime",get:function(){return this._accessTokenExpiringNotificationTime}},{key:"monitorSession",get:function(){return this._monitorSession}},{key:"monitorAnonymousSession",get:function(){return this._monitorAnonymousSession}},{key:"checkSessionInterval",get:function(){return this._checkSessionInterval}},{key:"stopCheckSessionOnError",get:function(){return this._stopCheckSessionOnError}},{key:"query_status_response_type",get:function(){return this._query_status_response_type}},{key:"revokeAccessTokenOnSignout",get:function(){return this._revokeAccessTokenOnSignout}},{key:"redirectNavigator",get:function(){return this._redirectNavigator}},{key:"popupNavigator",get:function(){return this._popupNavigator}},{key:"iframeNavigator",get:function(){return this._iframeNavigator}},{key:"userStore",get:function(){return this._userStore}}]),t}(i.OidcClientSettings)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.RedirectNavigator=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0);t.RedirectNavigator=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function(){return Promise.resolve(this)},e.prototype.navigate=function(e){return e&&e.url?(e.useReplaceToNavigate?window.location.replace(e.url):window.location=e.url,Promise.resolve()):(i.Log.error("RedirectNavigator.navigate: No url provided"),Promise.reject(new Error("No url provided")))},r(e,[{key:"url",get:function(){return window.location.href}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PopupNavigator=void 0;var r=n(0),i=n(42);t.PopupNavigator=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function(e){var t=new i.PopupWindow(e);return Promise.resolve(t)},e.prototype.callback=function e(t,n,a){r.Log.debug("PopupNavigator.callback");try{return i.PopupWindow.notifyOpener(t,n,a),Promise.resolve()}catch(e){return Promise.reject(e)}},e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PopupWindow=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=n(3);t.PopupWindow=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._promise=new Promise(function(e,t){n._resolve=e,n._reject=t});var r=t.popupWindowTarget||"_blank",a=t.popupWindowFeatures||"location=no,toolbar=no,width=500,height=500,left=100,top=100;";this._popup=window.open("",r,a),this._popup&&(i.Log.debug("PopupWindow.ctor: popup successfully created"),this._checkForPopupClosedTimer=window.setInterval(this._checkForPopupClosed.bind(this),500))}return e.prototype.navigate=function(e){return this._popup?e&&e.url?(i.Log.debug("PopupWindow.navigate: Setting URL in popup"),this._id=e.id,this._id&&(window["popupCallback_"+e.id]=this._callback.bind(this)),this._popup.focus(),this._popup.window.location=e.url):(this._error("PopupWindow.navigate: no url provided"),this._error("No url provided")):this._error("PopupWindow.navigate: Error opening popup window"),this.promise},e.prototype._success=function(e){i.Log.debug("PopupWindow.callback: Successful response from popup window"),this._cleanup(),this._resolve(e)},e.prototype._error=function(e){i.Log.error("PopupWindow.error: ",e),this._cleanup(),this._reject(new Error(e))},e.prototype.close=function(){this._cleanup(!1)},e.prototype._cleanup=function(e){i.Log.debug("PopupWindow.cleanup"),window.clearInterval(this._checkForPopupClosedTimer),this._checkForPopupClosedTimer=null,delete window["popupCallback_"+this._id],this._popup&&!e&&this._popup.close(),this._popup=null},e.prototype._checkForPopupClosed=function(){this._popup&&!this._popup.closed||this._error("Popup window closed")},e.prototype._callback=function(e,t){this._cleanup(t),e?(i.Log.debug("PopupWindow.callback success"),this._success({url:e})):(i.Log.debug("PopupWindow.callback: Invalid response from popup"),this._error("Invalid response from popup"))},e.notifyOpener=function(e,t,n){if(window.opener){if(e=e||window.location.href){var r=a.UrlUtility.parseUrlFragment(e,n);if(r.state){var o="popupCallback_"+r.state,s=window.opener[o];s?(i.Log.debug("PopupWindow.notifyOpener: passing url message to opener"),s(e,t)):i.Log.warn("PopupWindow.notifyOpener: no matching callback found on opener")}else i.Log.warn("PopupWindow.notifyOpener: no state found in response url")}}else i.Log.warn("PopupWindow.notifyOpener: no window.opener. Can't complete notification.")},r(e,[{key:"promise",get:function(){return this._promise}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.IFrameNavigator=void 0;var r=n(0),i=n(44);t.IFrameNavigator=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function(e){var t=new i.IFrameWindow(e);return Promise.resolve(t)},e.prototype.callback=function e(t){r.Log.debug("IFrameNavigator.callback");try{return i.IFrameWindow.notifyParent(t),Promise.resolve()}catch(e){return Promise.reject(e)}},e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.IFrameWindow=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0);t.IFrameWindow=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._promise=new Promise(function(e,t){n._resolve=e,n._reject=t}),this._boundMessageEvent=this._message.bind(this),window.addEventListener("message",this._boundMessageEvent,!1),this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="absolute",this._frame.width=0,this._frame.height=0,window.document.body.appendChild(this._frame)}return e.prototype.navigate=function(e){if(e&&e.url){var t=e.silentRequestTimeout||1e4;i.Log.debug("IFrameWindow.navigate: Using timeout of:",t),this._timer=window.setTimeout(this._timeout.bind(this),t),this._frame.src=e.url}else this._error("No url provided");return this.promise},e.prototype._success=function(e){this._cleanup(),i.Log.debug("IFrameWindow: Successful response from frame window"),this._resolve(e)},e.prototype._error=function(e){this._cleanup(),i.Log.error(e),this._reject(new Error(e))},e.prototype.close=function(){this._cleanup()},e.prototype._cleanup=function(){this._frame&&(i.Log.debug("IFrameWindow: cleanup"),window.removeEventListener("message",this._boundMessageEvent,!1),window.clearTimeout(this._timer),window.document.body.removeChild(this._frame),this._timer=null,this._frame=null,this._boundMessageEvent=null)},e.prototype._timeout=function(){i.Log.debug("IFrameWindow.timeout"),this._error("Frame window timed out")},e.prototype._message=function(e){if(i.Log.debug("IFrameWindow.message"),this._timer&&e.origin===this._origin&&e.source===this._frame.contentWindow&&"string"==typeof e.data&&(e.data.startsWith("http://")||e.data.startsWith("https://"))){var t=e.data;t?this._success({url:t}):this._error("Invalid response from frame")}},e.notifyParent=function(e){i.Log.debug("IFrameWindow.notifyParent"),(e=e||window.location.href)&&(i.Log.debug("IFrameWindow.notifyParent: posting url message to parent"),window.parent.postMessage(e,location.protocol+"//"+location.host))},r(e,[{key:"promise",get:function(){return this._promise}},{key:"_origin",get:function(){return location.protocol+"//"+location.host}}]),e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UserManagerEvents=void 0;var r=n(0),i=n(16),a=n(17);t.UserManagerEvents=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r._userLoaded=new a.Event("User loaded"),r._userUnloaded=new a.Event("User unloaded"),r._silentRenewError=new a.Event("Silent renew error"),r._userSignedIn=new a.Event("User signed in"),r._userSignedOut=new a.Event("User signed out"),r._userSessionChanged=new a.Event("User session changed"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.load=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];r.Log.debug("UserManagerEvents.load"),e.prototype.load.call(this,t),n&&this._userLoaded.raise(t)},t.prototype.unload=function(){r.Log.debug("UserManagerEvents.unload"),e.prototype.unload.call(this),this._userUnloaded.raise()},t.prototype.addUserLoaded=function(e){this._userLoaded.addHandler(e)},t.prototype.removeUserLoaded=function(e){this._userLoaded.removeHandler(e)},t.prototype.addUserUnloaded=function(e){this._userUnloaded.addHandler(e)},t.prototype.removeUserUnloaded=function(e){this._userUnloaded.removeHandler(e)},t.prototype.addSilentRenewError=function(e){this._silentRenewError.addHandler(e)},t.prototype.removeSilentRenewError=function(e){this._silentRenewError.removeHandler(e)},t.prototype._raiseSilentRenewError=function(e){r.Log.debug("UserManagerEvents._raiseSilentRenewError",e.message),this._silentRenewError.raise(e)},t.prototype.addUserSignedIn=function(e){this._userSignedIn.addHandler(e)},t.prototype.removeUserSignedIn=function(e){this._userSignedIn.removeHandler(e)},t.prototype._raiseUserSignedIn=function(){r.Log.debug("UserManagerEvents._raiseUserSignedIn"),this._userSignedIn.raise()},t.prototype.addUserSignedOut=function(e){this._userSignedOut.addHandler(e)},t.prototype.removeUserSignedOut=function(e){this._userSignedOut.removeHandler(e)},t.prototype._raiseUserSignedOut=function(){r.Log.debug("UserManagerEvents._raiseUserSignedOut"),this._userSignedOut.raise()},t.prototype.addUserSessionChanged=function(e){this._userSessionChanged.addHandler(e)},t.prototype.removeUserSessionChanged=function(e){this._userSessionChanged.removeHandler(e)},t.prototype._raiseUserSessionChanged=function(){r.Log.debug("UserManagerEvents._raiseUserSessionChanged"),this._userSessionChanged.raise()},t}(i.AccessTokenEvents)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Timer=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=n(1),o=n(17);t.Timer=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.Global.timer,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return o._timer=r,o._nowFunc=i||function(){return Date.now()/1e3},o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.init=function(e){e<=0&&(e=1),e=parseInt(e);var t=this.now+e;if(this.expiration===t&&this._timerHandle)i.Log.debug("Timer.init timer "+this._name+" skipping initialization since already initialized for expiration:",this.expiration);else{this.cancel(),i.Log.debug("Timer.init timer "+this._name+" for duration:",e),this._expiration=t;var n=5;e<n&&(n=e),this._timerHandle=this._timer.setInterval(this._callback.bind(this),1e3*n)}},t.prototype.cancel=function(){this._timerHandle&&(i.Log.debug("Timer.cancel: ",this._name),this._timer.clearInterval(this._timerHandle),this._timerHandle=null)},t.prototype._callback=function(){var t=this._expiration-this.now;i.Log.debug("Timer.callback; "+this._name+" timer expires in:",t),this._expiration<=this.now&&(this.cancel(),e.prototype.raise.call(this))},r(t,[{key:"now",get:function(){return parseInt(this._nowFunc())}},{key:"expiration",get:function(){return this._expiration}}]),t}(o.Event)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SilentRenewService=void 0;var r=n(0);t.SilentRenewService=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._userManager=t}return e.prototype.start=function(){this._callback||(this._callback=this._tokenExpiring.bind(this),this._userManager.events.addAccessTokenExpiring(this._callback),this._userManager.getUser().then(function(e){}).catch(function(e){r.Log.error("SilentRenewService.start: Error from getUser:",e.message)}))},e.prototype.stop=function(){this._callback&&(this._userManager.events.removeAccessTokenExpiring(this._callback),delete this._callback)},e.prototype._tokenExpiring=function(){var e=this;this._userManager.signinSilent().then(function(e){r.Log.debug("SilentRenewService._tokenExpiring: Silent token renewal successful")},function(t){r.Log.error("SilentRenewService._tokenExpiring: Error from signinSilent:",t.message),e._userManager.events._raiseSilentRenewError(t)})},e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CordovaPopupNavigator=void 0;var r=n(21);t.CordovaPopupNavigator=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function(e){var t=new r.CordovaPopupWindow(e);return Promise.resolve(t)},e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CordovaIFrameNavigator=void 0;var r=n(21);t.CordovaIFrameNavigator=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.prepare=function(e){e.popupWindowFeatures="hidden=yes";var t=new r.CordovaPopupWindow(e);return Promise.resolve(t)},e}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Version="1.11.6"}])},e.exports=t()},7(e){var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}m(e,t,a,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,n)}(e,i,{once:!0})})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,a,o;if(s(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),void 0===o)o=a[t]=n,++e._eventsCount;else if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,console&&console.warn}return e}function u(){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 p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):h(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);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(a){r.once&&e.removeEventListener(t,i),n(a)})}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},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+".");o=e}}),a.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},a.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},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var c=a[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var l=c.length,u=h(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,o;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},a.prototype.listenerCount=f,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},386(e){const t={acl:"http://www.w3.org/ns/auth/acl#",arg:"http://www.w3.org/ns/pim/arg#",as:"https://www.w3.org/ns/activitystreams#",bookmark:"http://www.w3.org/2002/01/bookmark#",cal:"http://www.w3.org/2002/12/cal/ical#",cco:"http://www.ontologyrepository.com/CommonCoreOntologies/",cert:"http://www.w3.org/ns/auth/cert#",contact:"http://www.w3.org/2000/10/swap/pim/contact#",dc:"http://purl.org/dc/elements/1.1/",dct:"http://purl.org/dc/terms/",doap:"http://usefulinc.com/ns/doap#",foaf:"http://xmlns.com/foaf/0.1/",geo:"http://www.w3.org/2003/01/geo/wgs84_pos#",gpx:"http://www.w3.org/ns/pim/gpx#",gr:"http://purl.org/goodrelations/v1#",http:"http://www.w3.org/2007/ont/http#",httph:"http://www.w3.org/2007/ont/httph#",icalTZ:"http://www.w3.org/2002/12/cal/icaltzd#",ldp:"http://www.w3.org/ns/ldp#",link:"http://www.w3.org/2007/ont/link#",log:"http://www.w3.org/2000/10/swap/log#",meeting:"http://www.w3.org/ns/pim/meeting#",mo:"http://purl.org/ontology/mo/",org:"http://www.w3.org/ns/org#",owl:"http://www.w3.org/2002/07/owl#",pad:"http://www.w3.org/ns/pim/pad#",patch:"http://www.w3.org/ns/pim/patch#",prov:"http://www.w3.org/ns/prov#",pto:"http://www.productontology.org/id/",qu:"http://www.w3.org/2000/10/swap/pim/qif#",trip:"http://www.w3.org/ns/pim/trip#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",rss:"http://purl.org/rss/1.0/",sched:"http://www.w3.org/ns/pim/schedule#",schema:"http://schema.org/",sioc:"http://rdfs.org/sioc/ns#",skos:"http://www.w3.org/2004/02/skos/core#",solid:"http://www.w3.org/ns/solid/terms#",space:"http://www.w3.org/ns/pim/space#",stat:"http://www.w3.org/ns/posix/stat#",tab:"http://www.w3.org/2007/ont/link#",tabont:"http://www.w3.org/2007/ont/link#",ui:"http://www.w3.org/ns/ui#",vann:"http://purl.org/vocab/vann/",vcard:"http://www.w3.org/2006/vcard/ns#",wf:"http://www.w3.org/2005/01/wf/flow#",xsd:"http://www.w3.org/2001/XMLSchema#"};e.exports=function(e={namedNode:e=>e}){const n={};for(const r in t){const i=t[r];n[r]=function(t=""){return e.namedNode(i+t)}}return n}}},a={};function o(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e].call(n.exports,n,n.exports,o),n.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const s=new TextEncoder,c=new TextDecoder;function l(...e){const t=e.reduce((e,{length:t})=>e+t,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}const u=e=>(e=>{let t=e;"string"==typeof t&&(t=s.encode(t));const n=[];for(let e=0;e<t.length;e+=32768)n.push(String.fromCharCode.apply(null,t.subarray(e,e+32768)));return btoa(n.join(""))})(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),p=e=>{let t=e;t instanceof Uint8Array&&(t=c.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return(e=>{const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n})(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};class d extends Error{constructor(e,t){super(e,t),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}d.code="ERR_JOSE_GENERIC";class f extends d{constructor(e,t,n="unspecified",r="unspecified"){super(e,{cause:{claim:n,reason:r,payload:t}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=n,this.reason=r,this.payload=t}}f.code="ERR_JWT_CLAIM_VALIDATION_FAILED";class h extends d{constructor(e,t,n="unspecified",r="unspecified"){super(e,{cause:{claim:n,reason:r,payload:t}}),this.code="ERR_JWT_EXPIRED",this.claim=n,this.reason=r,this.payload=t}}h.code="ERR_JWT_EXPIRED";class m extends d{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}}m.code="ERR_JOSE_ALG_NOT_ALLOWED";class g extends d{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}}g.code="ERR_JOSE_NOT_SUPPORTED";(class extends d{constructor(e="decryption operation failed",t){super(e,t),this.code="ERR_JWE_DECRYPTION_FAILED"}}).code="ERR_JWE_DECRYPTION_FAILED";(class extends d{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}}).code="ERR_JWE_INVALID";class v extends d{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}}v.code="ERR_JWS_INVALID";class b extends d{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}}b.code="ERR_JWT_INVALID";(class extends d{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}}).code="ERR_JWK_INVALID";class y extends d{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}}y.code="ERR_JWKS_INVALID";class w extends d{constructor(e="no applicable key found in the JSON Web Key Set",t){super(e,t),this.code="ERR_JWKS_NO_MATCHING_KEY"}}w.code="ERR_JWKS_NO_MATCHING_KEY";class x extends d{constructor(e="multiple matching keys found in the JSON Web Key Set",t){super(e,t),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}Symbol.asyncIterator,x.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";class k extends d{constructor(e="request timed out",t){super(e,t),this.code="ERR_JWKS_TIMEOUT"}}k.code="ERR_JWKS_TIMEOUT";class _ extends d{constructor(e="signature verification failed",t){super(e,t),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}function E(e,t){const n=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:n,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:n,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:n,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:n,name:"ECDSA",namedCurve:t.namedCurve};case"Ed25519":return{name:"Ed25519"};case"EdDSA":return{name:t.name};default:throw new g(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}_.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";const C=crypto,S=e=>e instanceof CryptoKey,A=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:n}=t.algorithm;if("number"!=typeof n||n<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};function T(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function P(e,t){return e.name===t}function R(e){return parseInt(e.name.slice(4),10)}function I(e,t){if(t.length&&!t.some(t=>e.usages.includes(t))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const n=t.pop();e+=`one of ${t.join(", ")}, or ${n}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw new TypeError(e)}}function F(e,t,...n){switch(t){case"HS256":case"HS384":case"HS512":{if(!P(e.algorithm,"HMAC"))throw T("HMAC");const n=parseInt(t.slice(2),10);if(R(e.algorithm.hash)!==n)throw T(`SHA-${n}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!P(e.algorithm,"RSASSA-PKCS1-v1_5"))throw T("RSASSA-PKCS1-v1_5");const n=parseInt(t.slice(2),10);if(R(e.algorithm.hash)!==n)throw T(`SHA-${n}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!P(e.algorithm,"RSA-PSS"))throw T("RSA-PSS");const n=parseInt(t.slice(2),10);if(R(e.algorithm.hash)!==n)throw T(`SHA-${n}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw T("Ed25519 or Ed448");break;case"Ed25519":if(!P(e.algorithm,"Ed25519"))throw T("Ed25519");break;case"ES256":case"ES384":case"ES512":{if(!P(e.algorithm,"ECDSA"))throw T("ECDSA");const n=function(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}(t);if(e.algorithm.namedCurve!==n)throw T(n,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}I(e,n)}function N(e,t,...n){if((n=n.filter(Boolean)).length>2){const t=n.pop();e+=`one of type ${n.join(", ")}, or ${t}.`}else 2===n.length?e+=`one of type ${n[0]} or ${n[1]}.`:e+=`of type ${n[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}const O=(e,...t)=>N("Key must be ",e,...t);function L(e,t,...n){return N(`Key for the ${e} algorithm must be `,t,...n)}const j=e=>!!S(e)||"KeyObject"===e?.[Symbol.toStringTag],M=["CryptoKey"];function D(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let n=e;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}function U(e){return D(e)&&"string"==typeof e.kty}const B=async e=>{if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:t,keyUsages:n}=function(e){let t,n;switch(e.kty){case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},n=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},n=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},n=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new g('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},n=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},n=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},n=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},n=e.d?["deriveBits"]:[];break;default:throw new g('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"Ed25519":t={name:"Ed25519"},n=e.d?["sign"]:["verify"];break;case"EdDSA":t={name:e.crv},n=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},n=e.d?["deriveBits"]:[];break;default:throw new g('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new g('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:n}}(e),r=[t,e.ext??!1,e.key_ops??n],i={...e};return delete i.alg,delete i.use,C.subtle.importKey("jwk",i,...r)},z=e=>p(e);let H,q;const $=e=>"KeyObject"===e?.[Symbol.toStringTag],W=async(e,t,n,r,i=!1)=>{let a=e.get(t);if(a?.[r])return a[r];const o=await B({...n,alg:r});return i&&Object.freeze(t),a?a[r]=o:e.set(t,{[r]:o}),o},V=(e,t)=>{if($(e)){let n=e.export({format:"jwk"});return delete n.d,delete n.dp,delete n.dq,delete n.p,delete n.q,delete n.qi,n.k?z(n.k):(q||(q=new WeakMap),W(q,e,n,t))}if(U(e)){if(e.k)return p(e.k);q||(q=new WeakMap);return W(q,e,e,t,!0)}return e},G=(e,t)=>{if($(e)){let n=e.export({format:"jwk"});return n.k?z(n.k):(H||(H=new WeakMap),W(H,e,n,t))}if(U(e)){if(e.k)return p(e.k);H||(H=new WeakMap);return W(H,e,e,t,!0)}return e};async function K(e,t,n){if("sign"===n&&(t=await G(t,e)),"verify"===n&&(t=await V(t,e)),S(t))return F(t,e,n),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(O(t,...M));return C.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[n])}throw new TypeError(O(t,...M,"Uint8Array","JSON Web Key"))}const J=async(e,t,n,r)=>{const i=await K(e,t,"verify");A(e,i);const a=E(e,i.algorithm);try{return await C.subtle.verify(a,i,n,r)}catch{return!1}},Q=(...e)=>{const t=e.filter(Boolean);if(0===t.length||1===t.length)return!0;let n;for(const e of t){const t=Object.keys(e);if(n&&0!==n.size)for(const e of t){if(n.has(e))return!1;n.add(e)}else n=new Set(t)}return!0},Y=e=>e?.[Symbol.toStringTag],X=(e,t,n)=>{if(void 0!==t.use&&"sig"!==t.use)throw new TypeError("Invalid key for this operation, when present its use must be sig");if(void 0!==t.key_ops&&!0!==t.key_ops.includes?.(n))throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${n}`);if(void 0!==t.alg&&t.alg!==e)throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);return!0},Z=(e,t,n,r)=>{if(!(t instanceof Uint8Array)){if(r&&U(t)){if(function(e){return U(e)&&"oct"===e.kty&&"string"==typeof e.k}(t)&&X(e,t,n))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!j(t))throw new TypeError(L(e,t,...M,"Uint8Array",r?"JSON Web Key":null));if("secret"!==t.type)throw new TypeError(`${Y(t)} instances for symmetric algorithms must be of type "secret"`)}};function ee(e,t,n,r){t.startsWith("HS")||"dir"===t||t.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(t)?Z(t,n,r,e):((e,t,n,r)=>{if(r&&U(t))switch(n){case"sign":if(function(e){return"oct"!==e.kty&&"string"==typeof e.d}(t)&&X(e,t,n))return;throw new TypeError("JSON Web Key for this operation be a private JWK");case"verify":if(function(e){return"oct"!==e.kty&&void 0===e.d}(t)&&X(e,t,n))return;throw new TypeError("JSON Web Key for this operation be a public JWK")}if(!j(t))throw new TypeError(L(e,t,...M,r?"JSON Web Key":null));if("secret"===t.type)throw new TypeError(`${Y(t)} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===n&&"public"===t.type)throw new TypeError(`${Y(t)} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===n&&"public"===t.type)throw new TypeError(`${Y(t)} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===n&&"private"===t.type)throw new TypeError(`${Y(t)} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===n&&"private"===t.type)throw new TypeError(`${Y(t)} instances for asymmetric algorithm encryption must be of type "public"`)})(t,n,r,e)}ee.bind(void 0,!1);const te=ee.bind(void 0,!0);const ne=function(e,t,n,r,i){if(void 0!==i.crit&&void 0===r?.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!r||void 0===r.crit)return new Set;if(!Array.isArray(r.crit)||0===r.crit.length||r.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let a;a=void 0!==n?new Map([...Object.entries(n),...t.entries()]):t;for(const t of r.crit){if(!a.has(t))throw new g(`Extension Header Parameter "${t}" is not recognized`);if(void 0===i[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(a.get(t)&&void 0===r[t])throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(r.crit)},re=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};async function ie(e,t){if(!D(e))throw new TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return p(e.k);case"RSA":if("oth"in e&&void 0!==e.oth)throw new g('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return B({...e,alg:t});default:throw new g('Unsupported "kty" (Key Type) Parameter value')}}async function ae(e,t,n){if(e instanceof Uint8Array&&(e=c.decode(e)),"string"!=typeof e)throw new v("Compact JWS must be a string or Uint8Array");const{0:r,1:i,2:a,length:o}=e.split(".");if(3!==o)throw new v("Invalid Compact JWS");const u=await async function(e,t,n){if(!D(e))throw new v("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new v('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new v("JWS Protected Header incorrect type");if(void 0===e.payload)throw new v("JWS Payload missing");if("string"!=typeof e.signature)throw new v("JWS Signature missing or incorrect type");if(void 0!==e.header&&!D(e.header))throw new v("JWS Unprotected Header incorrect type");let r={};if(e.protected)try{const t=p(e.protected);r=JSON.parse(c.decode(t))}catch{throw new v("JWS Protected Header is invalid")}if(!Q(r,e.header))throw new v("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const i={...r,...e.header};let a=!0;if(ne(v,new Map([["b64",!0]]),n?.crit,r,i).has("b64")&&(a=r.b64,"boolean"!=typeof a))throw new v('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:o}=i;if("string"!=typeof o||!o)throw new v('JWS "alg" (Algorithm) Header Parameter missing or invalid');const u=n&&re("algorithms",n.algorithms);if(u&&!u.has(o))throw new m('"alg" (Algorithm) Header Parameter value not allowed');if(a){if("string"!=typeof e.payload)throw new v("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new v("JWS Payload must be a string or an Uint8Array instance");let d=!1;"function"==typeof t?(t=await t(r,e),d=!0,te(o,t,"verify"),U(t)&&(t=await ie(t,o))):te(o,t,"verify");const f=l(s.encode(e.protected??""),s.encode("."),"string"==typeof e.payload?s.encode(e.payload):e.payload);let h,g;try{h=p(e.signature)}catch{throw new v("Failed to base64url decode the signature")}if(!await J(o,t,h,f))throw new _;if(a)try{g=p(e.payload)}catch{throw new v("Failed to base64url decode the payload")}else g="string"==typeof e.payload?s.encode(e.payload):e.payload;const b={payload:g};return void 0!==e.protected&&(b.protectedHeader=r),void 0!==e.header&&(b.unprotectedHeader=e.header),d?{...b,key:t}:b}({payload:i,protected:r,signature:a},t,n),d={payload:u.payload,protectedHeader:u.protectedHeader};return"function"==typeof t?{...d,key:u.key}:d}const oe=e=>Math.floor(e.getTime()/1e3),se=86400,ce=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,le=e=>{const t=ce.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");const n=parseFloat(t[2]);let r;switch(t[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":r=Math.round(n);break;case"minute":case"minutes":case"min":case"mins":case"m":r=Math.round(60*n);break;case"hour":case"hours":case"hr":case"hrs":case"h":r=Math.round(3600*n);break;case"day":case"days":case"d":r=Math.round(n*se);break;case"week":case"weeks":case"w":r=Math.round(604800*n);break;default:r=Math.round(31557600*n)}return"-"===t[1]||"ago"===t[4]?-r:r},ue=e=>e.toLowerCase().replace(/^application\//,""),pe=(e,t,n={})=>{let r;try{r=JSON.parse(c.decode(t))}catch{}if(!D(r))throw new b("JWT Claims Set must be a top-level JSON object");const{typ:i}=n;if(i&&("string"!=typeof e.typ||ue(e.typ)!==ue(i)))throw new f('unexpected "typ" JWT header value',r,"typ","check_failed");const{requiredClaims:a=[],issuer:o,subject:s,audience:l,maxTokenAge:u}=n,p=[...a];void 0!==u&&p.push("iat"),void 0!==l&&p.push("aud"),void 0!==s&&p.push("sub"),void 0!==o&&p.push("iss");for(const e of new Set(p.reverse()))if(!(e in r))throw new f(`missing required "${e}" claim`,r,e,"missing");if(o&&!(Array.isArray(o)?o:[o]).includes(r.iss))throw new f('unexpected "iss" claim value',r,"iss","check_failed");if(s&&r.sub!==s)throw new f('unexpected "sub" claim value',r,"sub","check_failed");if(l&&(d=r.aud,m="string"==typeof l?[l]:l,!("string"==typeof d?m.includes(d):Array.isArray(d)&&m.some(Set.prototype.has.bind(new Set(d))))))throw new f('unexpected "aud" claim value',r,"aud","check_failed");var d,m;let g;switch(typeof n.clockTolerance){case"string":g=le(n.clockTolerance);break;case"number":g=n.clockTolerance;break;case"undefined":g=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:v}=n,y=oe(v||new Date);if((void 0!==r.iat||u)&&"number"!=typeof r.iat)throw new f('"iat" claim must be a number',r,"iat","invalid");if(void 0!==r.nbf){if("number"!=typeof r.nbf)throw new f('"nbf" claim must be a number',r,"nbf","invalid");if(r.nbf>y+g)throw new f('"nbf" claim timestamp check failed',r,"nbf","check_failed")}if(void 0!==r.exp){if("number"!=typeof r.exp)throw new f('"exp" claim must be a number',r,"exp","invalid");if(r.exp<=y-g)throw new h('"exp" claim timestamp check failed',r,"exp","check_failed")}if(u){const e=y-r.iat;if(e-g>("number"==typeof u?u:le(u)))throw new h('"iat" claim timestamp check failed (too far in the past)',r,"iat","check_failed");if(e<0-g)throw new f('"iat" claim timestamp check failed (it should be in the past)',r,"iat","check_failed")}return r};const de=async(e,t,n)=>{let r,i,a=!1;"function"==typeof AbortController&&(r=new AbortController,i=setTimeout(()=>{a=!0,r.abort()},t));const o=await fetch(e.href,{signal:r?r.signal:void 0,redirect:"manual",headers:n.headers}).catch(e=>{if(a)throw new k;throw e});if(void 0!==i&&clearTimeout(i),200!==o.status)throw new d("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await o.json()}catch{throw new d("Failed to parse the JSON Web Key Set HTTP response as JSON")}};function fe(e){return D(e)}function he(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}class me{constructor(e){if(this._cached=new WeakMap,!function(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(fe)}(e))throw new y("JSON Web Key Set malformed");this._jwks=he(e)}async getKey(e,t){const{alg:n,kid:r}={...e,...t?.header},i=function(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new g('Unsupported "alg" value for a JSON Web Key Set')}}(n),a=this._jwks.keys.filter(e=>{let t=i===e.kty;if(t&&"string"==typeof r&&(t=r===e.kid),t&&"string"==typeof e.alg&&(t=n===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t)switch(n){case"ES256":t="P-256"===e.crv;break;case"ES256K":t="secp256k1"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv;break;case"Ed25519":t="Ed25519"===e.crv;break;case"EdDSA":t="Ed25519"===e.crv||"Ed448"===e.crv}return t}),{0:o,length:s}=a;if(0===s)throw new w;if(1!==s){const e=new x,{_cached:t}=this;throw e[Symbol.asyncIterator]=async function*(){for(const e of a)try{yield await ge(t,e,n)}catch{}},e}return ge(this._cached,o,n)}}async function ge(e,t,n){const r=e.get(t)||e.set(t,{}).get(t);if(void 0===r[n]){const e=await ie({...t,ext:!0},n);if(e instanceof Uint8Array||"public"!==e.type)throw new y("JSON Web Key Set members must be public keys");r[n]=e}return r[n]}function ve(e){const t=new me(e),n=async(e,n)=>t.getKey(e,n);return Object.defineProperties(n,{jwks:{value:()=>he(t._jwks),enumerable:!0,configurable:!1,writable:!1}}),n}let be;if("undefined"==typeof navigator||!navigator.userAgent?.startsWith?.("Mozilla/5.0 ")){be=`${"jose"}/${"v5.10.0"}`}const ye=Symbol();class we{constructor(e,t){if(!(e instanceof URL))throw new TypeError("url must be an instance of URL");var n,r;this._url=new URL(e.href),this._options={agent:t?.agent,headers:t?.headers},this._timeoutDuration="number"==typeof t?.timeoutDuration?t?.timeoutDuration:5e3,this._cooldownDuration="number"==typeof t?.cooldownDuration?t?.cooldownDuration:3e4,this._cacheMaxAge="number"==typeof t?.cacheMaxAge?t?.cacheMaxAge:6e5,void 0!==t?.[ye]&&(this._cache=t?.[ye],n=t?.[ye],r=this._cacheMaxAge,"object"==typeof n&&null!==n&&"uat"in n&&"number"==typeof n.uat&&!(Date.now()-n.uat>=r)&&"jwks"in n&&D(n.jwks)&&Array.isArray(n.jwks.keys)&&Array.prototype.every.call(n.jwks.keys,D)&&(this._jwksTimestamp=this._cache.uat,this._local=ve(this._cache.jwks)))}coolingDown(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cooldownDuration}fresh(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cacheMaxAge}async getKey(e,t){this._local&&this.fresh()||await this.reload();try{return await this._local(e,t)}catch(n){if(n instanceof w&&!1===this.coolingDown())return await this.reload(),this._local(e,t);throw n}}async reload(){this._pendingFetch&&("undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&(this._pendingFetch=void 0);const e=new Headers(this._options.headers);be&&!e.has("User-Agent")&&(e.set("User-Agent",be),this._options.headers=Object.fromEntries(e.entries())),this._pendingFetch||(this._pendingFetch=de(this._url,this._timeoutDuration,this._options).then(e=>{this._local=ve(e),this._cache&&(this._cache.uat=Date.now(),this._cache.jwks=e),this._jwksTimestamp=Date.now(),this._pendingFetch=void 0}).catch(e=>{throw this._pendingFetch=void 0,e})),await this._pendingFetch}}const xe=async e=>{if(e instanceof Uint8Array)return{kty:"oct",k:u(e)};if(!S(e))throw new TypeError(O(e,...M,"Uint8Array"));if(!e.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");const{ext:t,key_ops:n,alg:r,use:i,...a}=await C.subtle.exportKey("jwk",e);return a};async function ke(e){return xe(e)}const _e=async(e,t,n)=>{const r=await K(e,t,"sign");A(e,r);const i=await C.subtle.sign(E(e,r.algorithm),r,n);return new Uint8Array(i)};class Ee{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader)throw new v("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!Q(this._protectedHeader,this._unprotectedHeader))throw new v("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const n={...this._protectedHeader,...this._unprotectedHeader};let r=!0;if(ne(v,new Map([["b64",!0]]),t?.crit,this._protectedHeader,n).has("b64")&&(r=this._protectedHeader.b64,"boolean"!=typeof r))throw new v('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:i}=n;if("string"!=typeof i||!i)throw new v('JWS "alg" (Algorithm) Header Parameter missing or invalid');te(i,e,"sign");let a,o=this._payload;r&&(o=s.encode(u(o))),a=this._protectedHeader?s.encode(u(JSON.stringify(this._protectedHeader))):s.encode("");const p=l(a,s.encode("."),o),d=await _e(i,e,p),f={signature:u(d),payload:""};return r&&(f.payload=c.decode(o)),this._unprotectedHeader&&(f.header=this._unprotectedHeader),this._protectedHeader&&(f.protected=c.decode(a)),f}}class Ce{constructor(e){this._flattened=new Ee(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){const n=await this._flattened.sign(e,t);if(void 0===n.payload)throw new TypeError("use the flattened module for creating JWS with b64: false");return`${n.protected}.${n.payload}.${n.signature}`}}function Se(e,t){if(!Number.isFinite(t))throw new TypeError(`Invalid ${e} input`);return t}class Ae{constructor(e={}){if(!D(e))throw new TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return"number"==typeof e?this._payload={...this._payload,nbf:Se("setNotBefore",e)}:e instanceof Date?this._payload={...this._payload,nbf:Se("setNotBefore",oe(e))}:this._payload={...this._payload,nbf:oe(new Date)+le(e)},this}setExpirationTime(e){return"number"==typeof e?this._payload={...this._payload,exp:Se("setExpirationTime",e)}:e instanceof Date?this._payload={...this._payload,exp:Se("setExpirationTime",oe(e))}:this._payload={...this._payload,exp:oe(new Date)+le(e)},this}setIssuedAt(e){return void 0===e?this._payload={...this._payload,iat:oe(new Date)}:e instanceof Date?this._payload={...this._payload,iat:Se("setIssuedAt",oe(e))}:this._payload="string"==typeof e?{...this._payload,iat:Se("setIssuedAt",oe(new Date)+le(e))}:{...this._payload,iat:Se("setIssuedAt",e)},this}}class Te extends Ae{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){const n=new Ce(s.encode(JSON.stringify(this._payload)));if(n.setProtectedHeader(this._protectedHeader),Array.isArray(this._protectedHeader?.crit)&&this._protectedHeader.crit.includes("b64")&&!1===this._protectedHeader.b64)throw new b("JWTs MUST NOT use unencoded payload");return n.sign(e,t)}}function Pe(e){const t=e?.modulusLength??2048;if("number"!=typeof t||t<2048)throw new g("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return t}async function Re(e,t){return async function(e,t){let n,r;switch(e){case"PS256":case"PS384":case"PS512":n={name:"RSA-PSS",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Pe(t)},r=["sign","verify"];break;case"RS256":case"RS384":case"RS512":n={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Pe(t)},r=["sign","verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":n={name:"RSA-OAEP",hash:`SHA-${parseInt(e.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Pe(t)},r=["decrypt","unwrapKey","encrypt","wrapKey"];break;case"ES256":n={name:"ECDSA",namedCurve:"P-256"},r=["sign","verify"];break;case"ES384":n={name:"ECDSA",namedCurve:"P-384"},r=["sign","verify"];break;case"ES512":n={name:"ECDSA",namedCurve:"P-521"},r=["sign","verify"];break;case"Ed25519":n={name:"Ed25519"},r=["sign","verify"];break;case"EdDSA":{r=["sign","verify"];const e=t?.crv??"Ed25519";switch(e){case"Ed25519":case"Ed448":n={name:e};break;default:throw new g("Invalid or unsupported crv option provided")}break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{r=["deriveKey","deriveBits"];const e=t?.crv??"P-256";switch(e){case"P-256":case"P-384":case"P-521":n={name:"ECDH",namedCurve:e};break;case"X25519":case"X448":n={name:e};break;default:throw new g("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new g('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return C.subtle.generateKey(n,t?.extractable??!1,r)}(e,t)}const Ie={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Fe;const Ne=new Uint8Array(16);const Oe=[];for(let e=0;e<256;++e)Oe.push((e+256).toString(16).slice(1));function Le(e,t=0){return(Oe[e[t+0]]+Oe[e[t+1]]+Oe[e[t+2]]+Oe[e[t+3]]+"-"+Oe[e[t+4]]+Oe[e[t+5]]+"-"+Oe[e[t+6]]+Oe[e[t+7]]+"-"+Oe[e[t+8]]+Oe[e[t+9]]+"-"+Oe[e[t+10]]+Oe[e[t+11]]+Oe[e[t+12]]+Oe[e[t+13]]+Oe[e[t+14]]+Oe[e[t+15]]).toLowerCase()}const je=function(e,t,n){if(Ie.randomUUID&&!t&&!e)return Ie.randomUUID();const r=(e=e||{}).random??e.rng?.()??function(){if(!Fe){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Fe=crypto.getRandomValues.bind(crypto)}return Fe(Ne)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Le(r)},Me="solidClientAuthn:",De=["ES256","RS256"],Ue="error",Be="login",ze="logout",He="newRefreshToken",qe="sessionExpired",$e="sessionExtended",We="sessionRestore",Ve="timeoutSet",Ge=["openid","offline_access","webid"];class Ke{handleables;constructor(e){this.handleables=e,this.handleables=e}async getProperHandler(e){const t=await Promise.all(this.handleables.map(t=>t.canHandle(...e)));for(let e=0;e<t.length;e+=1)if(t[e])return this.handleables[e];return null}async canHandle(...e){return null!==await this.getProperHandler(e)}async handle(...e){const t=await this.getProperHandler(e);if(t)return t.handle(...e);throw new Error(`[${this.constructor.name}] cannot find a suitable handler for: ${e.map(e=>{try{return JSON.stringify(e)}catch(t){return e.toString()}}).join(", ")}`)}}async function Je(e,t,n,r){let i,a;try{const{payload:a}=await async function(e,t,n){const r=await ae(e,t,n);if(r.protectedHeader.crit?.includes("b64")&&!1===r.protectedHeader.b64)throw new b("JWTs MUST NOT use unencoded payload");const i={payload:pe(r.protectedHeader,r.payload,n),protectedHeader:r.protectedHeader};return"function"==typeof t?{...i,key:r.key}:i}(e,function(e,t){const n=new we(e,t),r=async(e,t)=>n.getKey(e,t);return Object.defineProperties(r,{coolingDown:{get:()=>n.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>n.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>n.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>!!n._pendingFetch,enumerable:!0,configurable:!1},jwks:{value:()=>n._local?.jwks(),enumerable:!0,configurable:!1,writable:!1}}),r}(new URL(t)),{issuer:n,audience:r});i=a}catch(e){throw new Error(`Token verification failed: ${e.stack}`)}if("string"==typeof i.azp&&(a=i.azp),"string"==typeof i.webid)return{webId:i.webid,clientId:a};if("string"!=typeof i.sub)throw new Error(`The token ${JSON.stringify(i)} is invalid: it has no 'webid' claim and no 'sub' claim.`);try{return new URL(i.sub),{webId:i.sub,clientId:a}}catch(e){throw new Error(`The token has no 'webid' claim, and its 'sub' claim of [${i.sub}] is invalid as a URL - error [${e}].`)}}function Qe(e){try{const t=new URL(e),n=!t.searchParams.has("code")&&!t.searchParams.has("state"),r=""===t.hash;return n&&r}catch(e){return!1}}function Ye(e){const t=new URL(e);return t.searchParams.delete("state"),t.searchParams.delete("code"),t.searchParams.delete("error"),t.searchParams.delete("error_description"),t.searchParams.delete("iss"),t}class Xe{storageUtility;redirector;constructor(e,t){this.storageUtility=e,this.redirector=t,this.storageUtility=e,this.redirector=t}parametersGuard=e=>void 0!==e.issuerConfiguration.grantTypesSupported&&e.issuerConfiguration.grantTypesSupported.indexOf("authorization_code")>-1&&void 0!==e.redirectUrl;async canHandle(e){return this.parametersGuard(e)}async setupRedirectHandler({oidcLoginOptions:e,state:t,codeVerifier:n,targetUrl:r}){if(!this.parametersGuard(e))throw new Error("The authorization code grant requires a redirectUrl.");var i,a;await Promise.all([this.storageUtility.setForUser(t,{sessionId:e.sessionId}),this.storageUtility.setForUser(e.sessionId,{codeVerifier:n,issuer:e.issuer.toString(),redirectUrl:e.redirectUrl,dpop:Boolean(e.dpop).toString(),keepAlive:(i=e.keepAlive,a=!0,"boolean"==typeof i?Boolean(i):Boolean(a)).toString()})]),this.redirector.redirect(r,{handleRedirect:e.handleRedirect})}}class Ze{sessionInfoManager;constructor(e){this.sessionInfoManager=e,this.sessionInfoManager=e}async canHandle(){return!0}async handle(e){await this.sessionInfoManager.clear(e)}}class et{redirector;constructor(e){this.redirector=e,this.redirector=e}async canHandle(e,t){return"idp"===t?.logoutType}async handle(e,t){if("idp"!==t?.logoutType)throw new Error("Attempting to call idp logout handler to perform app logout");if(void 0===t.toLogoutUrl)throw new Error("Cannot perform IDP logout. Did you log in using the OIDC authentication flow?");this.redirector.redirect(t.toLogoutUrl(t),{handleRedirect:t.handleRedirect})}}class tt{handlers;constructor(e,t){this.handlers=[new Ze(e),new et(t)]}async canHandle(){return!0}async handle(e,t){for(const n of this.handlers)await n.canHandle(e,t)&&await n.handle(e,t)}}function nt(){return{isLoggedIn:!1,sessionId:je(),fetch:(...e)=>fetch(...e)}}async function rt(e,t){await Promise.all([t.deleteAllUserData(e,{secure:!1}),t.deleteAllUserData(e,{secure:!0})])}class it{storageUtility;constructor(e){this.storageUtility=e,this.storageUtility=e}update(e,t){throw new Error("Not Implemented")}set(e,t){throw new Error("Not Implemented")}get(e){throw new Error("Not implemented")}async getAll(){throw new Error("Not implemented")}async clear(e){return rt(e,this.storageUtility)}async register(e){throw new Error("Not implemented")}async getRegisteredSessionIdAll(){throw new Error("Not implemented")}async clearAll(){throw new Error("Not implemented")}async setOidcContext(e,t){throw new Error("Not implemented")}}function at({endSessionEndpoint:e,idTokenHint:t}){if(void 0!==e)return function({state:n,postLogoutUrl:r}){return function({endSessionEndpoint:e,idTokenHint:t,postLogoutRedirectUri:n,state:r}){const i=new URL(e);return void 0!==t&&i.searchParams.append("id_token_hint",t),void 0!==n&&(i.searchParams.append("post_logout_redirect_uri",n),void 0!==r&&i.searchParams.append("state",r)),i.toString()}({endSessionEndpoint:e,idTokenHint:t,state:n,postLogoutRedirectUri:r})}}function ot(e){try{return new URL(e),!0}catch{return!1}}async function st(e,t,n,r){let i;if(function(e,t){return t.scopesSupported.includes("webid")&&void 0!==e.clientId&&ot(e.clientId)}(e,t))i={clientId:e.clientId,clientName:e.clientName,clientType:"solid-oidc"};else{if(!function(e){return void 0!==e.clientId&&!ot(e.clientId)}(e))return r.getClient({sessionId:e.sessionId,clientName:e.clientName,redirectUrl:e.redirectUrl},t);i={clientId:e.clientId,clientSecret:e.clientSecret,clientName:e.clientName,clientType:"static"}}const a={clientId:i.clientId,clientType:i.clientType};return"static"===i.clientType&&(a.clientSecret=i.clientSecret),i.clientName&&(a.clientName=i.clientName),await n.setForUser(e.sessionId,a),i}const ct=(e,t)=>fetch(e,t);class lt{loginHandler;redirectHandler;logoutHandler;sessionInfoManager;issuerConfigFetcher;boundLogout;constructor(e,t,n,r,i){this.loginHandler=e,this.redirectHandler=t,this.logoutHandler=n,this.sessionInfoManager=r,this.issuerConfigFetcher=i,this.loginHandler=e,this.redirectHandler=t,this.logoutHandler=n,this.sessionInfoManager=r,this.issuerConfigFetcher=i}fetch=ct;logout=async(e,t)=>{await this.logoutHandler.handle(e,"idp"===t?.logoutType?{...t,toLogoutUrl:this.boundLogout}:t),this.fetch=ct,delete this.boundLogout};getSessionInfo=async e=>this.sessionInfoManager.get(e);getAllSessionInfo=async()=>this.sessionInfoManager.getAll()}async function ut(e,t,n){try{const[r,i,a,o,s]=await Promise.all([t.getForUser(e,"issuer",{errorIfNull:!0}),t.getForUser(e,"codeVerifier"),t.getForUser(e,"redirectUrl"),t.getForUser(e,"dpop",{errorIfNull:!0}),t.getForUser(e,"keepAlive")]);await t.deleteForUser(e,"codeVerifier");return{codeVerifier:i,redirectUrl:a,issuerConfig:await n.fetchConfig(r),dpop:"true"===o,keepAlive:"string"!=typeof s||"true"===s}}catch(t){throw new Error(`Failed to retrieve OIDC context from storage associated with session [${e}]: ${t}`)}}class pt{secureStorage;insecureStorage;constructor(e,t){this.secureStorage=e,this.insecureStorage=t,this.secureStorage=e,this.insecureStorage=t}getKey(e){return`solidClientAuthenticationUser:${e}`}async getUserData(e,t){const n=await(t?this.secureStorage:this.insecureStorage).get(this.getKey(e));if(void 0===n)return{};try{return JSON.parse(n)}catch(r){throw new Error(`Data for user [${e}] in [${t?"secure":"unsecure"}] storage is corrupted - expected valid JSON, but got: ${n}`)}}async setUserData(e,t,n){await(n?this.secureStorage:this.insecureStorage).set(this.getKey(e),JSON.stringify(t))}async get(e,t){const n=await(t?.secure?this.secureStorage:this.insecureStorage).get(e);if(void 0===n&&t?.errorIfNull)throw new Error(`[${e}] is not stored`);return n}async set(e,t,n){return(n?.secure?this.secureStorage:this.insecureStorage).set(e,t)}async delete(e,t){return(t?.secure?this.secureStorage:this.insecureStorage).delete(e)}async getForUser(e,t,n){const r=await this.getUserData(e,n?.secure);let i;if(r&&r[t]||(i=void 0),i=r[t],void 0===i&&n?.errorIfNull)throw new Error(`Field [${t}] for user [${e}] is not stored`);return i||void 0}async setForUser(e,t,n){let r;try{r=await this.getUserData(e,n?.secure)}catch{r={}}await this.setUserData(e,{...r,...t},n?.secure)}async deleteForUser(e,t,n){const r=await this.getUserData(e,n?.secure);delete r[t],await this.setUserData(e,r,n?.secure)}async deleteAllUserData(e,t){await(t?.secure?this.secureStorage:this.insecureStorage).delete(this.getKey(e))}}class dt{map={};async get(e){return this.map[e]||void 0}async set(e,t){this.map[e]=t}async delete(e){delete this.map[e]}}class ft extends Error{constructor(e){super(e)}}Error;class ht extends Error{missingFields;constructor(e){super(`Invalid response from OIDC provider: missing fields ${e}`),this.missingFields=e}}class mt extends Error{error;errorDescription;constructor(e,t,n){super(e),this.error=t,this.errorDescription=n}}function gt(e){const t=new URL(e);return new URL(t.pathname,t.origin).toString()}async function vt(e,t,n){return new Te({htu:gt(e),htm:t.toUpperCase(),jti:je()}).setProtectedHeader({alg:De[0],jwk:n.publicKey,typ:"dpop+jwt"}).setIssuedAt().sign(n.privateKey,{})}async function bt(e,t,n,r){if(void 0!==n)return async function(e,t,n,r){const i=new Headers(r?.headers);return i.set("Authorization",`DPoP ${t}`),i.set("DPoP",await vt(e,r?.method??"get",n)),{...r,headers:i}}(e,t,n,r);const i=new Headers(r?.headers);return i.set("Authorization",`Bearer ${t}`),{...r,headers:i}}async function yt(e,t,n,r,i=fetch){return i(t,await bt(t.toString(),e,r,n))}const wt=e=>void 0!==e?e-5>0?e-5:e:600;function xt(e,t){let n,r=e;const i=t?.refreshOptions;if(void 0!==i){const e=async()=>{try{const{accessToken:a,refreshToken:o,expiresIn:s}=await async function(e,t,n){const r=await e.tokenRefresher.refresh(e.sessionId,e.refreshToken,t);return n?.emit($e,r.expiresIn??600),{accessToken:r.accessToken,refreshToken:r.refreshToken,expiresIn:r.expiresIn}}(i,t.dpopKey,t.eventEmitter);r=a,void 0!==o&&(i.refreshToken=o),clearTimeout(n),n=setTimeout(e,1e3*wt(s)),t.eventEmitter?.emit(Ve,n)}catch(e){e instanceof mt&&(t?.eventEmitter?.emit(Ue,e.error,e.errorDescription),t?.eventEmitter?.emit(qe)),e instanceof ht&&e.missingFields.includes("access_token")&&t?.eventEmitter?.emit(qe)}};n=setTimeout(e,1e3*wt(t.expiresIn)),t.eventEmitter?.emit(Ve,n)}else if(void 0!==t&&void 0!==t.eventEmitter){const e=setTimeout(()=>{t.eventEmitter.emit(qe)},1e3*wt(t.expiresIn));t.eventEmitter.emit(Ve,e)}return async(e,n)=>{let i=await yt(r,e,n,t?.dpopKey,t?.fetch);const a=!i.ok&&(o=i.status,![401,403].includes(o));var o;if(i.ok||a)return i;return i.url!==e&&void 0!==t?.dpopKey&&(i=await yt(r,i.url,n,t.dpopKey,t.fetch)),i}}var kt=o(7),_t=o(516);function Et(e,t){if("string"!=typeof e.client_id)throw new Error(`Dynamic client registration failed: no client_id has been found on ${JSON.stringify(e)}`);if(t.redirectUrl&&function(e){return Array.isArray(e.redirect_uris)&&e.redirect_uris.every(e=>"string"==typeof e)}(e)&&e.redirect_uris[0]!==t.redirectUrl.toString())throw new Error(`Dynamic client registration failed: the returned redirect URIs ${JSON.stringify(e.redirect_uris)} don't match the provided ${JSON.stringify([t.redirectUrl.toString()])}`);return!0}async function Ct(e,t){if(!t.registrationEndpoint)throw new Error("Dynamic Registration could not be completed because the issuer has no registration endpoint.");if(!Array.isArray(t.idTokenSigningAlgValuesSupported))throw new Error("The OIDC issuer discovery profile is missing the 'id_token_signing_alg_values_supported' value, which is mandatory.");const n=(r=t.idTokenSigningAlgValuesSupported,De.find(e=>r.includes(e))??null);var r;const i={client_name:e.clientName,application_type:"web",redirect_uris:[e.redirectUrl?.toString()],subject_type:"public",token_endpoint_auth_method:"client_secret_basic",id_token_signed_response_alg:n,grant_types:["authorization_code","refresh_token"]},a=await fetch(t.registrationEndpoint.toString(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(a.ok){const t=await a.json();return Et(t,e),{clientId:t.client_id,clientSecret:t.client_secret,expiresAt:t.client_secret_expires_at,idTokenSignedResponseAlg:t.id_token_signed_response_alg,clientType:"dynamic"}}throw 400===a.status&&function(e,t){if("invalid_redirect_uri"===e.error)throw new Error(`Dynamic client registration failed: the provided redirect uri [${t.redirectUrl?.toString()}] is invalid - ${e.error_description??""}`);if("invalid_client_metadata"===e.error)throw new Error(`Dynamic client registration failed: the provided client metadata ${JSON.stringify(t)} is invalid - ${e.error_description??""}`);throw new Error(`Dynamic client registration failed: ${e.error} - ${e.error_description??""}`)}(await a.json(),e),new Error(`Dynamic client registration failed: the server returned ${a.status} ${a.statusText} - ${await a.text()}`)}function St(e){return void 0!==e.error_description&&"string"==typeof e.error_description}function At(e,t){if(void 0!==(n=e).error&&"string"==typeof n.error)throw new mt(`Token endpoint returned error [${e.error}]${St(e)?`: ${e.error_description}`:""}${function(e){return void 0!==e.error_uri&&"string"==typeof e.error_uri}(e)?` (see ${e.error_uri})`:""}`,e.error,St(e)?e.error_description:void 0);var n;if(!function(e){return void 0!==e.access_token&&"string"==typeof e.access_token}(e))throw new ht(["access_token"]);if(!function(e){return void 0!==e.id_token&&"string"==typeof e.id_token}(e))throw new ht(["id_token"]);if(!function(e){return void 0!==e.token_type&&"string"==typeof e.token_type}(e))throw new ht(["token_type"]);if(!function(e){return void 0===e.expires_in||"number"==typeof e.expires_in}(e))throw new ht(["expires_in"]);if(!t&&"bearer"!==e.token_type.toLowerCase())throw new Error(`Invalid token endpoint response: requested a [Bearer] token, but got a 'token_type' value of [${e.token_type}].`);return e}async function Tt(e,t,n,r){!function(e,t){if(t.grantType&&(!e.grantTypesSupported||!e.grantTypesSupported.includes(t.grantType)))throw new Error(`The issuer [${e.issuer}] does not support the [${t.grantType}] grant`);if(!e.tokenEndpoint)throw new Error(`This issuer [${e.issuer}] does not have a token endpoint`)}(e,n);const i={"content-type":"application/x-www-form-urlencoded"};let a;r&&(a=await async function(){const{privateKey:e,publicKey:t}=await Re(De[0]),n={privateKey:e,publicKey:await ke(t)};return[n.publicKey.alg]=De,n}(),i.DPoP=await vt(e.tokenEndpoint,"POST",a)),t.clientSecret&&(i.Authorization=`Basic ${btoa(`${t.clientId}:${t.clientSecret}`)}`);const o={grant_type:n.grantType,redirect_uri:n.redirectUrl,code:n.code,code_verifier:n.codeVerifier,client_id:t.clientId},s={method:"POST",headers:i,body:new URLSearchParams(o).toString()},c=await fetch(e.tokenEndpoint,s),l=At(await c.json(),r),{webId:u,clientId:p}=await Je(l.id_token,e.jwksUri,e.issuer,t.clientId);return{accessToken:l.access_token,idToken:l.id_token,refreshToken:(d=l,void 0!==d.refresh_token&&"string"==typeof d.refresh_token?l.refresh_token:void 0),webId:u,clientId:p,dpopKey:a,expiresIn:l.expires_in};var d}async function Pt(e,t,n,r){if(void 0===n.clientId)throw new Error("No client ID available when trying to refresh the access token.");const i={grant_type:"refresh_token",refresh_token:e};let a={};void 0!==r&&(a={DPoP:await vt(t.tokenEndpoint,"POST",r)});let o={};void 0!==n.clientSecret?o={Authorization:`Basic ${btoa(`${n.clientId}:${n.clientSecret}`)}`}:(e=>{try{return new URL(e),!0}catch{return!1}})(n.clientId)&&(i.client_id=n.clientId);const s=await fetch(t.tokenEndpoint,{method:"POST",body:new URLSearchParams(i).toString(),headers:{...a,...o,"Content-Type":"application/x-www-form-urlencoded"}});let c;try{c=await s.json()}catch(e){throw new Error(`The token endpoint of issuer ${t.issuer} returned a malformed response.`)}const l=At(c,void 0!==r),{webId:u}=await Je(l.id_token,t.jwksUri,t.issuer,n.clientId);return{accessToken:l.access_token,idToken:l.id_token,refreshToken:"string"==typeof l.refresh_token?l.refresh_token:void 0,webId:u,dpopKey:r,expiresIn:l.expires_in}}class Rt extends pt{constructor(e,t){super(e,t)}}class It extends lt{login=async(e,t)=>{"none"!==e.prompt&&await this.sessionInfoManager.clear(e.sessionId);const n=e.redirectUrl??function(e){const t=Ye(e);return t.hash="",e.includes(`${t.origin}/`)?t.href:`${t.origin}${t.href.substring(t.origin.length+1)}`}(window.location.href);if(!Qe(n))throw new Error(`${n} is not a valid redirect URL, it is either a malformed IRI, includes a hash fragment, or reserved query parameters ('code' or 'state').`);await this.loginHandler.handle({...e,redirectUrl:n,clientName:e.clientName??e.clientId,eventEmitter:t})};validateCurrentSession=async e=>{const t=await this.sessionInfoManager.get(e);return void 0===t||void 0===t.clientAppId||void 0===t.issuer?null:t};handleIncomingRedirect=async(e,t)=>{try{const n=await this.redirectHandler.handle(e,t,void 0);return this.fetch=n.fetch.bind(window),this.boundLogout=n.getLogoutUrl,await this.cleanUrlAfterRedirect(e),{isLoggedIn:n.isLoggedIn,webId:n.webId,sessionId:n.sessionId,expirationDate:n.expirationDate,clientAppId:n.clientAppId}}catch(n){return await this.cleanUrlAfterRedirect(e),void t.emit(Ue,"redirect",n)}};async cleanUrlAfterRedirect(e){const t=Ye(e).href;for(window.history.replaceState(null,"",t);window.location.href!==t;)await new Promise(e=>{setTimeout(()=>e(),1)})}}function Ft(e){return"string"==typeof e.oidcIssuer}function Nt(e){return"string"==typeof e.redirectUrl}class Ot{storageUtility;oidcHandler;issuerConfigFetcher;clientRegistrar;constructor(e,t,n,r){this.storageUtility=e,this.oidcHandler=t,this.issuerConfigFetcher=n,this.clientRegistrar=r,this.storageUtility=e,this.oidcHandler=t,this.issuerConfigFetcher=n,this.clientRegistrar=r}async canHandle(e){return Ft(e)&&Nt(e)}async handle(e){if(!Ft(e))throw new ft(`OidcLoginHandler requires an OIDC issuer: missing property 'oidcIssuer' in ${JSON.stringify(e)}`);if(!Nt(e))throw new ft(`OidcLoginHandler requires a redirect URL: missing property 'redirectUrl' in ${JSON.stringify(e)}`);const t=await this.issuerConfigFetcher.fetchConfig(e.oidcIssuer),n=await st(e,t,this.storageUtility,this.clientRegistrar),r={issuer:t.issuer,dpop:"dpop"===e.tokenType.toLowerCase(),...e,issuerConfiguration:t,client:n,scopes:(i=e.customScopes,Array.isArray(i)?Array.from(new Set([...Ge,...i.filter(e=>"string"==typeof e&&!e.includes(" "))])):Ge)};var i;return this.oidcHandler.handle(r)}}class Lt extends Xe{async handle(e){const t={authority:e.issuer.toString(),client_id:e.client.clientId,client_secret:e.client.clientSecret,redirect_uri:e.redirectUrl,response_type:"code",scope:e.scopes.join(" "),filterProtocolClaims:!0,loadUserInfo:!1,code_verifier:!0,prompt:e.prompt??"consent"},n=new _t.OidcClient(t);try{const t=await n.createSigninRequest();return await this.setupRedirectHandler({oidcLoginOptions:e,state:t.state._id,codeVerifier:t.state._code_verifier,targetUrl:t.url.toString()})}catch(e){}}}const jt={issuer:{toKey:"issuer",convertToUrl:!0},authorization_endpoint:{toKey:"authorizationEndpoint",convertToUrl:!0},token_endpoint:{toKey:"tokenEndpoint",convertToUrl:!0},userinfo_endpoint:{toKey:"userinfoEndpoint",convertToUrl:!0},jwks_uri:{toKey:"jwksUri",convertToUrl:!0},registration_endpoint:{toKey:"registrationEndpoint",convertToUrl:!0},end_session_endpoint:{toKey:"endSessionEndpoint",convertToUrl:!0},scopes_supported:{toKey:"scopesSupported"},response_types_supported:{toKey:"responseTypesSupported"},response_modes_supported:{toKey:"responseModesSupported"},grant_types_supported:{toKey:"grantTypesSupported"},acr_values_supported:{toKey:"acrValuesSupported"},subject_types_supported:{toKey:"subjectTypesSupported"},id_token_signing_alg_values_supported:{toKey:"idTokenSigningAlgValuesSupported"},id_token_encryption_alg_values_supported:{toKey:"idTokenEncryptionAlgValuesSupported"},id_token_encryption_enc_values_supported:{toKey:"idTokenEncryptionEncValuesSupported"},userinfo_signing_alg_values_supported:{toKey:"userinfoSigningAlgValuesSupported"},userinfo_encryption_alg_values_supported:{toKey:"userinfoEncryptionAlgValuesSupported"},userinfo_encryption_enc_values_supported:{toKey:"userinfoEncryptionEncValuesSupported"},request_object_signing_alg_values_supported:{toKey:"requestObjectSigningAlgValuesSupported"},request_object_encryption_alg_values_supported:{toKey:"requestObjectEncryptionAlgValuesSupported"},request_object_encryption_enc_values_supported:{toKey:"requestObjectEncryptionEncValuesSupported"},token_endpoint_auth_methods_supported:{toKey:"tokenEndpointAuthMethodsSupported"},token_endpoint_auth_signing_alg_values_supported:{toKey:"tokenEndpointAuthSigningAlgValuesSupported"},display_values_supported:{toKey:"displayValuesSupported"},claim_types_supported:{toKey:"claimTypesSupported"},claims_supported:{toKey:"claimsSupported"},service_documentation:{toKey:"serviceDocumentation"},claims_locales_supported:{toKey:"claimsLocalesSupported"},ui_locales_supported:{toKey:"uiLocalesSupported"},claims_parameter_supported:{toKey:"claimsParameterSupported"},request_parameter_supported:{toKey:"requestParameterSupported"},request_uri_parameter_supported:{toKey:"requestUriParameterSupported"},require_request_uri_registration:{toKey:"requireRequestUriRegistration"},op_policy_uri:{toKey:"opPolicyUri",convertToUrl:!0},op_tos_uri:{toKey:"opTosUri",convertToUrl:!0}};class Mt{storageUtility;constructor(e){this.storageUtility=e,this.storageUtility=e}static getLocalStorageKey(e){return`issuerConfig:${e}`}async fetchConfig(e){let t;const n=new URL(".well-known/openid-configuration",e.endsWith("/")?e:`${e}/`).href,r=await fetch(n);try{t=function(e){const t={};return Object.keys(e).forEach(n=>{jt[n]&&(t[jt[n].toKey]=e[n])}),Array.isArray(t.scopesSupported)||(t.scopesSupported=["openid"]),t}(await r.json())}catch(t){throw new ft(`[${e.toString()}] has an invalid configuration: ${t.message}`)}return await this.storageUtility.set(Mt.getLocalStorageKey(e),JSON.stringify(t)),t}}async function Dt(e,t){await rt(e,t),await async function(){const e=new _t.OidcClient({response_mode:"query"});await e.clearStaleState(new _t.WebStorageStateStore({}));const t=window.localStorage,n=[];for(let e=0;e<=t.length;e+=1){const r=t.key(e);r&&(r.match(/^oidc\..+$/)||r.match(/^solidClientAuthenticationUser:.+$/))&&n.push(r)}n.forEach(e=>t.removeItem(e))}()}class Ut extends it{async get(e){const[t,n,r,i,a,o,s,c]=await Promise.all([this.storageUtility.getForUser(e,"isLoggedIn",{secure:!0}),this.storageUtility.getForUser(e,"webId",{secure:!0}),this.storageUtility.getForUser(e,"clientId",{secure:!1}),this.storageUtility.getForUser(e,"clientSecret",{secure:!1}),this.storageUtility.getForUser(e,"redirectUrl",{secure:!1}),this.storageUtility.getForUser(e,"refreshToken",{secure:!0}),this.storageUtility.getForUser(e,"issuer",{secure:!1}),this.storageUtility.getForUser(e,"tokenType",{secure:!1})]);if("string"!=typeof a||Qe(a)){if(void 0!==c&&("string"!=typeof(l=c)||!["DPoP","Bearer"].includes(l)))throw new Error(`Tokens of type [${c}] are not supported.`);var l;if(void 0!==r||void 0!==t||void 0!==n||void 0!==o)return{sessionId:e,webId:n,isLoggedIn:"true"===t,redirectUrl:a,refreshToken:o,issuer:s,clientAppId:r,clientAppSecret:i,tokenType:c??"DPoP"}}else await Promise.all([this.storageUtility.deleteAllUserData(e,{secure:!1}),this.storageUtility.deleteAllUserData(e,{secure:!0})])}async clear(e){return Dt(e,this.storageUtility)}}class Bt{async canHandle(e){try{return new URL(e),!0}catch(t){throw new Error(`[${e}] is not a valid URL, and cannot be used as a redirect URL: ${t}`)}}async handle(e){return nt()}}class zt{storageUtility;sessionInfoManager;issuerConfigFetcher;clientRegistrar;tokerRefresher;constructor(e,t,n,r,i){this.storageUtility=e,this.sessionInfoManager=t,this.issuerConfigFetcher=n,this.clientRegistrar=r,this.tokerRefresher=i,this.storageUtility=e,this.sessionInfoManager=t,this.issuerConfigFetcher=n,this.clientRegistrar=r,this.tokerRefresher=i}async canHandle(e){try{const t=new URL(e);return null!==t.searchParams.get("code")&&null!==t.searchParams.get("state")}catch(t){throw new Error(`[${e}] is not a valid URL, and cannot be used as a redirect URL: ${t}`)}}async handle(e,t){if(!await this.canHandle(e))throw new Error(`AuthCodeRedirectHandler cannot handle [${e}]: it is missing one of [code, state].`);const n=new URL(e),r=n.searchParams.get("state"),i=await this.storageUtility.getForUser(r,"sessionId",{errorIfNull:!0}),{issuerConfig:a,codeVerifier:o,redirectUrl:s,dpop:c}=await ut(i,this.storageUtility,this.issuerConfigFetcher),l=n.searchParams.get("iss");if("string"==typeof l&&l!==a.issuer)throw new Error(`The value of the iss parameter (${l}) does not match the issuer identifier of the authorization server (${a.issuer}). See [rfc9207](https://www.rfc-editor.org/rfc/rfc9207.html#section-2.3-3.1.1)`);if(void 0===o)throw new Error(`The code verifier for session ${i} is missing from storage.`);if(void 0===s)throw new Error(`The redirect URL for session ${i} is missing from storage.`);const u=await this.clientRegistrar.getClient({sessionId:i},a),p=Date.now(),d=await Tt(a,u,{grantType:"authorization_code",code:n.searchParams.get("code"),codeVerifier:o,redirectUrl:s},c);let f;window.localStorage.removeItem(`oidc.${r}`),void 0!==d.refreshToken&&(f={sessionId:i,refreshToken:d.refreshToken,tokenRefresher:this.tokerRefresher});const h=xt(d.accessToken,{dpopKey:d.dpopKey,refreshOptions:f,eventEmitter:t,expiresIn:d.expiresIn});await async function(e,t,n,r,i,a,o,s){void 0!==a&&await e.setForUser(t,{refreshToken:a},{secure:o}),void 0!==n&&await e.setForUser(t,{webId:n},{secure:o}),void 0!==r&&await e.setForUser(t,{clientId:r},{secure:o}),void 0!==i&&await e.setForUser(t,{isLoggedIn:i},{secure:o}),void 0!==s&&await e.setForUser(t,{publicKey:JSON.stringify(s.publicKey),privateKey:JSON.stringify(await ke(s.privateKey))},{secure:o})}(this.storageUtility,i,d.webId,d.clientId,"true",void 0,!0);const m=await this.sessionInfoManager.get(i);if(!m)throw new Error(`Could not retrieve session: [${i}].`);return Object.assign(m,{fetch:h,getLogoutUrl:at({idTokenHint:d.idToken,endSessionEndpoint:a.endSessionEndpoint}),expirationDate:"number"==typeof d.expiresIn?p+1e3*d.expiresIn:void 0})}}class Ht extends Ke{constructor(e){super(e)}}class qt{get storage(){return window.localStorage}async get(e){return this.storage.getItem(e)||void 0}async set(e,t){this.storage.setItem(e,t)}async delete(e){this.storage.removeItem(e)}}class $t{redirect(e,t){t&&t.handleRedirect?t.handleRedirect(e):t&&t.redirectByReplacingState?window.history.replaceState({},"",e):window.location.href=e}}class Wt{storageUtility;constructor(e){this.storageUtility=e,this.storageUtility=e}async getClient(e,t){const[n,r,i,a,o]=await Promise.all([this.storageUtility.getForUser(e.sessionId,"clientId",{secure:!1}),this.storageUtility.getForUser(e.sessionId,"clientSecret",{secure:!1}),this.storageUtility.getForUser(e.sessionId,"expiresAt",{secure:!1}),this.storageUtility.getForUser(e.sessionId,"clientName",{secure:!1}),this.storageUtility.getForUser(e.sessionId,"clientType",{secure:!1})]),s=void 0!==i?Number.parseInt(i,10):-1,c=void 0!==r&&0!==s&&Math.floor(Date.now()/1e3)>s;if(n&&("string"==typeof(l=o)&&["dynamic","static","solid-oidc"].includes(l))&&!c)return void 0!==r?{clientId:n,clientSecret:r,clientName:a,clientType:"dynamic",expiresAt:s}:{clientId:n,clientName:a,clientType:o};var l;try{const n=await Ct(e,t),r={clientId:n.clientId,clientType:"dynamic"};return void 0!==n.clientSecret&&(r.clientSecret=n.clientSecret,r.expiresAt=String(n.expiresAt)),n.idTokenSignedResponseAlg&&(r.idTokenSignedResponseAlg=n.idTokenSignedResponseAlg),await this.storageUtility.setForUser(e.sessionId,r,{secure:!1}),n}catch(e){throw new Error("Client registration failed.",{cause:e})}}}class Vt{async canHandle(e){try{return new URL(e).searchParams.has("error")}catch(t){throw new Error(`[${e}] is not a valid URL, and cannot be used as a redirect URL: ${t}`)}}async handle(e,t){if(void 0!==t){const n=new URL(e),r=n.searchParams.get("error"),i=n.searchParams.get("error_description");t.emit(Ue,r,i)}return nt()}}class Gt{storageUtility;issuerConfigFetcher;clientRegistrar;constructor(e,t,n){this.storageUtility=e,this.issuerConfigFetcher=t,this.clientRegistrar=n,this.storageUtility=e,this.issuerConfigFetcher=t,this.clientRegistrar=n}async refresh(e,t,n,r){const i=await ut(e,this.storageUtility,this.issuerConfigFetcher),a=await this.clientRegistrar.getClient({sessionId:e},i.issuerConfig);if(void 0===t)throw new Error(`Session [${e}] has no refresh token to allow it to refresh its access token.`);if(i.dpop&&void 0===n)throw new Error(`For session [${e}], the key bound to the DPoP access token must be provided to refresh said access token.`);const o=await Pt(t,i.issuerConfig,a,n);return void 0!==o.refreshToken&&r?.emit(He,o.refreshToken),o}}function Kt(e){const t=new dt,n=e.secureStorage||t,r=e.insecureStorage||new qt,i=new Rt(n,r),a=new Mt(i),o=new Wt(i),s=new Ut(i),c=new Gt(i,a,o),l=new $t,u=new Ot(i,new Lt(i,l),a,o),p=new Ht([new Vt,new zt(i,s,a,o,c),new Bt]);return new It(u,p,new tt(s,l),s,a)}const Jt=`${Me}currentSession`,Qt=`${Me}currentUrl`;class Yt{info;events;clientAuthentication;tokenRequestInProgress=!1;constructor(e={},t=void 0){this.events=new kt,e.clientAuthentication?this.clientAuthentication=e.clientAuthentication:e.secureStorage&&e.insecureStorage?this.clientAuthentication=Kt({secureStorage:e.secureStorage,insecureStorage:e.insecureStorage}):this.clientAuthentication=Kt({}),e.sessionInfo?this.info={sessionId:e.sessionInfo.sessionId,isLoggedIn:!1,webId:e.sessionInfo.webId,clientAppId:e.sessionInfo.clientAppId}:this.info={sessionId:t??je(),isLoggedIn:!1},this.events.on(Be,()=>window.localStorage.setItem(Jt,this.info.sessionId)),this.events.on(qe,()=>this.internalLogout(!1)),this.events.on(Ue,()=>this.internalLogout(!1))}login=async e=>(await this.clientAuthentication.login({sessionId:this.info.sessionId,...e,tokenType:e.tokenType??"DPoP"},this.events),new Promise(()=>{}));fetch=(e,t)=>this.clientAuthentication.fetch(e,t);internalLogout=async(e,t)=>{window.localStorage.removeItem(Jt),await this.clientAuthentication.logout(this.info.sessionId,t),this.info.isLoggedIn=!1,e&&this.events.emit(ze)};logout=async e=>this.internalLogout(!0,e);handleIncomingRedirect=async(e={})=>{if(this.info.isLoggedIn)return this.info;if(this.tokenRequestInProgress)return;const t="string"==typeof e?{url:e}:e,n=t.url??window.location.href;this.tokenRequestInProgress=!0;const r=await this.clientAuthentication.handleIncomingRedirect(n,this.events);if(function(e){return!!e?.isLoggedIn}(r)){this.setSessionInfo(r);const e=window.localStorage.getItem(Qt);null===e?this.events.emit(Be):(window.localStorage.removeItem(Qt),this.events.emit(We,e))}else if(!0===t.restorePreviousSession){const e=window.localStorage.getItem(Jt);if(null!==e){if(await async function(e,t,n){const r=await t.validateCurrentSession(e);return null!==r&&(window.localStorage.setItem(Qt,window.location.href),await t.login({sessionId:e,prompt:"none",oidcIssuer:r.issuer,redirectUrl:r.redirectUrl,clientId:r.clientAppId,clientSecret:r.clientAppSecret,tokenType:r.tokenType??"DPoP"},n.events),!0)}(e,this.clientAuthentication,this))return new Promise(()=>{})}}return this.tokenRequestInProgress=!1,r};setSessionInfo(e){this.info.isLoggedIn=e.isLoggedIn,this.info.webId=e.webId,this.info.sessionId=e.sessionId,this.info.clientAppId=e.clientAppId,this.info.expirationDate=e.expirationDate,this.events.on($e,e=>{this.info.expirationDate=Date.now()+1e3*e})}}const Xt=new Yt,Zt=r;var en=o(386);const tn=o.n(en)()(Zt),nn=(0,Zt.sym)("http://www.iana.org/assignments/link-relations/acl");function rn(e){const t=tn;function n(e,n,r,i={}){const a=i.public||[],o=(0,Zt.graph)(),s=(0,Zt.Namespace)("http://www.w3.org/ns/auth/acl#");let c=o.sym(`${r}#a1`);const l=o.sym(r),u=o.sym(e);if(o.add(c,t.rdf("type"),s("Authorization"),l),o.add(c,s("accessTo"),u,l),i.defaultForNew&&o.add(c,s("default"),u,l),o.add(c,s("agent"),n,l),o.add(c,s("mode"),s("Read"),l),o.add(c,s("mode"),s("Write"),l),o.add(c,s("mode"),s("Control"),l),a.length){c=o.sym(`${r}#a2`),o.add(c,t.rdf("type"),s("Authorization"),l),o.add(c,s("accessTo"),u,l),o.add(c,s("agentClass"),t.foaf("Agent"),l);for(let e=0;e<a.length;e++)o.add(c,s("mode"),s(a[e]),l)}return(0,Zt.serialize)(l,o,r)}return{findAclDocUrl:async function(t){await e.fetcher.load(t);const n=e.any(t,nn);if(!n)throw new Error(`No ACL link discovered for ${t}`);return n.value},setACLUserPublic:function(t,r,i){const a=e.any(e.sym(t),nn);return Promise.resolve().then(()=>a||function(t){const n=e.fetcher;if(!n)throw new Error("Cannot fetch ACL rel, store has no fetcher");return n.load(t).then(n=>{if(!n.ok)throw new Error("fetchACLRel: While loading:"+n.error);const r=e.any(e.sym(t),nn);if(!r)throw new Error("fetchACLRel: No Link rel=ACL header for "+t);return r})}(t).catch(e=>{throw new Error(`Error fetching rel=ACL header for ${t}: ${e}`)})).then(a=>{const o=n(t,r,a.uri,i);if(!e.fetcher)throw new Error("Cannot PUT this, store has no fetcher");return e.fetcher.webOperation("PUT",a.uri,{data:o,contentType:"text/turtle"}).then(e=>{if(!e.ok)throw new Error("Error writing ACL text: "+e.error);return a})})},genACLText:n}}const an=()=>{let{SolidAppContext:e}=window;if(e||(e={}),e.viewingNoAuthPage=!1,e.noAuth&&window.document){if(window.document.location.href.startsWith(e.noAuth)){e.viewingNoAuthPage=!0;const t=new URLSearchParams(window.document.location.search);if(t){let n=e.viewedPage=t.get("uri")||null;if(n&&(n=decodeURI(n),!n.startsWith(e.noAuth))){const t=n.split(/\//);e.idp=t[0]+"//"+t[2],e.viewingNoAuthPage=!1}}}}return e};function on(){const{$SolidTestEnvironment:e}=window;if(void 0!==e&&e.username)return e.username,(0,Zt.sym)(e.username);if("undefined"!=typeof document&&document.location&&"http://localhost"===(""+document.location).slice(0,16)){const e=document.getElementById("appTarget");if(!e)return null;const t=e.getAttribute("testID");return t?(0,Zt.sym)(t):null}return null}class sn{constructor(e){this.session=e}get authSession(){return this.session}currentUser(){const e=an();return e.viewingNoAuthPage?(0,Zt.sym)(e.webId):this&&this.session&&this.session.info&&this.session.info.webId&&this.session.info.isLoggedIn?(0,Zt.sym)(this.session.info.webId):on()}async checkUser(e){const t=new URL(window.location.href).hash;t&&window.localStorage.setItem("preLoginRedirectHash",t),this.session.events.on(We,e=>{document.location.toString()!==e&&history.replaceState(null,"",e)});const n=new URL(window.location.href);n.hash="",await this.session.handleIncomingRedirect({restorePreviousSession:!0,url:n.href});const r=window.localStorage.getItem("preLoginRedirectHash");if(r){const e=new URL(window.location.href);e.hash!==r&&(history.pushState?history.pushState(null,document.title,r):location.hash=r,e.hash=r),window.localStorage.setItem("preLoginRedirectHash","")}let i=on();if(i)return Promise.resolve(e?e(i):i);const a=this.webIdFromSession(this.session.info);return a&&(i=this.saveUser(a)),Promise.resolve(e?e(i):i)}saveUser(e,t){let n;if(e){n="string"==typeof e?e:e.uri;const r=(0,Zt.namedNode)(n);return t&&(t.me=r),r}return null}webIdFromSession(e){return(null==e?void 0:e.webId)&&e.isLoggedIn?e.webId:null}}function cn(e){return(0,Zt.sym)(e.uri+"#id"+Date.now())}function ln(e){return!e||`${window.location.origin}/`!==new URL(e.value).origin}const un="index.ttl#this";function pn(e,t){const n=tn;async function r(t,n,r){await e.fetcher.load(t);const i=e.any(t,new Zt.NamedNode("http://www.iana.org/assignments/link-relations/acl"));if(!i)throw new Error("Chat ACL doc not found!");const a=`\n @prefix acl: <http://www.w3.org/ns/auth/acl#>.\n <#owner>\n a acl:Authorization;\n acl:agent <${n.value}>;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Write, acl:Control.\n <#invitee>\n a acl:Authorization;\n acl:agent <${r.value}>;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Append.\n `;await e.fetcher.webOperation("PUT",i.value,{data:a,contentType:"text/turtle"})}async function i(t,r){const i=e.any(r,n.solid("privateTypeIndex"));if(!i)throw new Error("Private type index not found!");await e.fetcher.load(i);const a=cn(i),o=[(0,Zt.st)(a,n.rdf("type"),n.solid("TypeRegistration"),i.doc()),(0,Zt.st)(a,n.solid("forClass"),n.meeting("LongChat"),i.doc()),(0,Zt.st)(a,n.solid("instance"),t,i.doc())];await new Promise((t,n)=>{e.updater.update([],o,function(e,r,i){r?t(null):n(new Error(i))})})}async function a(n){const r=await t.loadMe(),i=function(e,t){const n=new URL(`IndividualChats/${new URL(e.value).host}/`,t.value).toString();return new Zt.NamedNode(n)}(n,await t.getPodRoot(r));let a=!0;try{await e.fetcher.load(new Zt.NamedNode(i.value+"index.ttl#this"))}catch(e){a=!1}return{me:r,chatContainer:i,exists:a}}async function o(e,t){return(await s({me:t,newBase:e.value})).newInstance}function s(t){const r=e,i=r.updater;if(t.me&&!t.me.uri)throw new Error("chat mintNew: Invalid userid "+t.me);const a=t.newInstance=t.newInstance||r.sym(t.newBase+un),o=a.doc();return r.add(a,n.rdf("type"),n.meeting("LongChat"),o),r.add(a,n.dc("title"),"Chat channel",o),r.add(a,n.dc("created"),(0,Zt.term)(new Date(Date.now())),o),t.me&&r.add(a,n.dc("author"),t.me,o),new Promise(function(e,n){null==i||i.put(o,r.statementsMatching(void 0,void 0,void 0,o),"text/turtle",function(r,i,o){i?e({...t,newInstance:a}):n(new Error("FAILED to save new chat channel at: "+r+" : "+o))})})}async function c(t,r){var i;await e.fetcher.load(t.doc());const a=e.any(t,n.ldp("inbox"),void 0,t.doc());if(!a)throw new Error(`Invitee inbox not found! ${t.value}`);const o=`\n <> a <http://www.w3.org/ns/pim/meeting#LongChatInvite> ;\n ${n.rdf("seeAlso")} <${r.value}> .\n `,s=await(null===(i=e.fetcher)||void 0===i?void 0:i.webOperation("POST",a.value,{data:o,contentType:"text/turtle"}));if(!(null==s?void 0:s.headers.get("location")))throw new Error(`Invite sending returned a ${null==s?void 0:s.status}`)}return{setAcl:r,addToPrivateTypeIndex:i,findChat:a,createChatThing:o,getChat:async function(e,t=!0){const{me:n,chatContainer:s,exists:l}=await a(e);if(l)return new Zt.NamedNode(s.value+un);if(t){const t=await o(s,n);return await c(e,t),await r(s,n,e),await i(t,n),t}return null},sendInvite:c,mintNew:s}}function dn(e,t,n,r,i){return{createInboxFor:async function(e,i){const a=await t.loadMe(),o=`${(await t.getPodRoot(a)).value}p2p-inboxes/${encodeURIComponent(i)}/`;return await r.createContainer(o),await n.setSinglePeerAccess({ownerWebId:a.value,peerWebId:e,accessToModes:"acl:Append",target:o}),o},getNewMessages:async function(e){e||(e=await t.loadMe());const n=await t.getMainInbox(e);return(await r.getContainerMembers(n)).filter(e=>!r.isContainer(e))},markAsRead:async function(t,n){const r=await e.fetcher._fetch(t);if(200!==r.status)throw new Error(`Not OK! ${t}`);const i=function(e,t){const n=t.getUTCFullYear(),r=("0"+(t.getUTCMonth()+1)).slice(-2),i=("0"+t.getUTCDate()).slice(-2),a=e.split("/"),o=a[a.length-1];return new URL(`./archive/${n}/${r}/${i}/${o}`,e).toString()}(t,n),a={method:"PUT",body:await r.text(),headers:[["Content-Type",r.headers.get("Content-Type")||"application/octet-stream"]]};"2"===(await e.fetcher._fetch(i,a)).status.toString()[0]&&await e.fetcher._fetch(t,{method:"DELETE"})}}}class fn extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype),this.name=new.target.name}}class hn extends fn{}class mn extends fn{}class gn extends fn{}class vn extends fn{}class bn extends fn{}class yn extends fn{}class wn extends fn{constructor(e,t){super(t),this.status=e}}function xn(e,t,n){const r=tn;async function i(t){await a(t);const i=function(e){const t=e.uri.replace("/profile/","/").replace("/public/","/").split("/").slice(0,-1).join("/")+"/Settings/Preferences.ttl";return(0,Zt.sym)(t)}(t);let o;try{o=await n.followOrCreateLink(t,r.space("preferencesFile"),i,t.doc())}catch(e){if(e instanceof bn)throw e;if(e instanceof yn)throw e;if(e instanceof hn)throw e;if(e instanceof mn)throw e;if(e instanceof gn)throw e;if(e instanceof wn)throw e;throw e}try{await e.fetcher.load(o)}catch(e){const n=`Unable to load preference of user ${t}: ${e}`;if(401===e.response.status)throw new hn;if(403===e.response.status){if(ln(o))throw new mn;throw new gn}throw new Error(n)}return o}async function a(t){if(!t)throw new Error("loadProfile: no user given.");try{await e.fetcher.load(t.doc())}catch(e){throw new Error(`Unable to load profile of user ${t}: ${e}`)}return t.doc()}function o(t){return e.any(t,r.space("storage"),void 0,t.doc())}return{loadMe:async function(){const n=t.currentUser();if(null===n)throw new Error("Current user not found! Not logged in?");return await e.fetcher.load(n.doc()),n},getPodRoot:function(e){const t=o(e);if(!t)throw new Error("User pod root not found!");return t},getMainInbox:async function(t){await e.fetcher.load(t);const n=e.any(t,r.ldp("inbox"),void 0,t.doc());if(!n)throw new Error("User main inbox not found!");return n},findStorage:o,loadPreferences:i,loadProfile:a,silencedLoadPreferences:async function(e){try{return await i(e)}catch(e){return}}}}function kn(e,t,n,r){const i=tn;async function a(t){if(!t)throw new Error("loadTypeIndexesFor: No user given");const a=await n.loadProfile(t);let o,s=null;try{s=u(t)}catch(e){}try{o=e.any(t,i.solid("publicTypeIndex"),void 0,a)||(s?await r.followOrCreateLink(t,i.solid("publicTypeIndex"),s,a):null)}catch(e){}const c=o?[{label:"public",index:o,agent:t}]:[];let l,d;try{l=await n.silencedLoadPreferences(t)}catch(e){l=null}if(l){let n,o=null;try{o=p(l)}catch(e){}try{n=e.any(t,i.solid("privateTypeIndex"),void 0,a)||(o?await r.followOrCreateLink(t,i.solid("privateTypeIndex"),o,l):null)}catch(e){}d=n?[{label:"private",index:n,agent:t}]:[]}else d=[];const f=c.concat(d);if(0===f.length)return f;const h=f.map(e=>e.index);try{await e.fetcher.load(h)}catch(e){}return f}async function o(t){let r;try{r=await n.silencedLoadPreferences(t)}catch(e){}if(r){const n=e.each(t,i.solid("community"),void 0,r).concat(e.each(t,i.solid("community"),void 0,t.doc()));let o=[];for(const e of n)o=o.concat(await a(e));return o}return[]}async function s(e){return(await a(e)).concat((await o(e)).flat())}async function c(e,t){const n=await s(t);let r=[];for(const t of n){const n=await d(t,e);r=r.concat(n)}return r}function l(e){const t=e.doc(),n=t.dir();if(null==n?void 0:n.uri)return n.uri;const r=t.uri;if(!r)return null==e||e.uri,null;const i=r.split("#")[0],a=i.lastIndexOf("/");return-1===a?null:i.slice(0,a+1)}function u(e){const t=l(e);if(!t)throw new Error(`suggestPublicTypeIndex: Cannot derive directory for ${e.uri}`);return(0,Zt.sym)(t+"publicTypeIndex.ttl")}function p(e){const t=l(e);if(!t)throw new Error(`suggestPrivateTypeIndex: Cannot derive directory for ${e.uri}`);return(0,Zt.sym)(t+"privateTypeIndex.ttl")}async function d(t,n){const r=t.index,a=[],o=e.statementsMatching(null,i.solid("instance"),null,r).concat(e.statementsMatching(null,i.solid("instanceContainer"),null,r)).map(e=>e.subject);for(const s of o){const o=e.any(s,i.solid("forClass"),null,r);if(!n||o.sameTerm(n)){const n=e.each(s,i.solid("instance"),null,r);for(const e of n)a.push({instance:e,type:o,scope:t});const c=e.each(s,i.solid("instanceContainer"),null,r);for(const n of c)await e.fetcher.load(n),a.push({instance:(0,Zt.sym)(n.value),type:o,scope:t})}}return a}return{registerInTypeIndex:async function(t,n,r){const a=cn(n),o=[(0,Zt.st)(a,i.rdf("type"),i.solid("TypeRegistration"),n),(0,Zt.st)(a,i.solid("forClass"),r,n),(0,Zt.st)(a,i.solid("instance"),t,n)];try{await e.updater.update([],o)}catch(e){return null}return a},getRegistrations:function(t,n){return e.each(void 0,i.solid("instance"),t).filter(t=>e.holds(t,i.solid("forClass"),n))},loadTypeIndexesFor:a,loadCommunityTypeIndexes:o,loadAllTypeIndexes:s,getScopedAppInstances:c,getAppInstances:async function(e){const n=t.currentUser();if(!n)throw new Error("getAppInstances: Must be logged in to find apps.");return(await c(e,n)).map(e=>e.instance)},suggestPublicTypeIndex:u,suggestPrivateTypeIndex:p,deleteTypeIndexRegistration:async function(t){const n=e.the(null,i.solid("instance"),t.instance,t.scope.index);if(!n)throw new Error(`deleteTypeIndexRegistration: No registration found for ${t.instance}`);const r=e.statementsMatching(n,null,null,t.scope.index);await e.updater.update(r,[])},getScopedAppsFromIndex:d}}function _n(e,t){const n=Zt.graph();Zt.fetcher(n,{fetch:e.fetch}),n.updater=new Zt.UpdateManager(n),n.features=[];const r=new sn(t),i=rn(n),a=function(e){function t(t){return e.statementsMatching(t,(0,Zt.sym)("http://www.w3.org/ns/ldp#contains"),void 0).map(e=>e.object)}function n(e){const t=e.value;return"/"===t.charAt(t.length-1)}return{isContainer:n,createContainer:async function(t){if(!n((0,Zt.sym)(t)))throw new Error(`Not a container URL ${t}`);const r=await e.fetcher._fetch(t,{method:"PUT",headers:{"Content-Type":"text/turtle","If-None-Match":"*",Link:'<http://www.w3.org/ns/ldp#BasicContainer>; rel="type"'},body:" "});if("2"!==r.status.toString()[0])throw new Error(`Not OK: got ${r.status} response while creating container at ${t}`)},getContainerElements:t,getContainerMembers:async function(n){return await e.fetcher.load(n),t(n)}}}(n),o=function(e,t,n){async function r(t){let n;try{n=await e.fetcher.load(t)}catch(n){if(404!==n.response.status){if(401===n.response.status)throw new hn;if(403===n.response.status){if(ln(t))throw new mn;throw new gn}const e="createIfNotExists doc load error NOT 404: "+t+": "+n;throw new wn(n.status,n.message+e)}try{await e.fetcher.webOperation("PUT",t,{data:"",contentType:"text/turtle"})}catch(e){throw new yn("createIfNotExists: PUT FAILED: "+t+": "+e)}await e.fetcher.load(t)}return n}return{recursiveDelete:async function r(i){try{if(n.isContainer(i)){const a=await t.findAclDocUrl(i);await e.fetcher._fetch(a,{method:"DELETE"});const o=await n.getContainerMembers(i);await Promise.all(o.map(e=>r(e)))}const a=i.value;return e.fetcher._fetch(a,{method:"DELETE"})}catch(e){i.value}},setSinglePeerAccess:async function(n){let r=["@prefix acl: <http://www.w3.org/ns/auth/acl#>.","",`<#alice> a acl:Authorization;\n acl:agent <${n.ownerWebId}>;`,` acl:accessTo <${n.target}>;`,` acl:default <${n.target}>;`," acl:mode acl:Read, acl:Write, acl:Control.",""].join("\n");n.accessToModes&&(r+=["<#bobAccessTo> a acl:Authorization;",` acl:agent <${n.peerWebId}>;`,` acl:accessTo <${n.target}>;`,` acl:mode ${n.accessToModes}.`,""].join("\n")),n.defaultModes&&(r+=["<#bobDefault> a acl:Authorization;",` acl:agent <${n.peerWebId}>;`,` acl:default <${n.target}>;`,` acl:mode ${n.defaultModes}.`,""].join("\n"));const i=await t.findAclDocUrl((0,Zt.sym)(n.target));return e.fetcher._fetch(i,{method:"PUT",body:r,headers:[["Content-Type","text/turtle"]]})},createEmptyRdfDoc:async function(t,n){await e.fetcher.webOperation("PUT",t.uri,{data:`# ${new Date} ${n}\n `,contentType:"text/turtle"})},followOrCreateLink:async function(t,n,i,a){await e.fetcher.load(a);const o=e.any(t,n,null,a);if(o)return o;if(!e.updater.editable(a)){const e=`followOrCreateLink: cannot edit ${a.value}`;throw new bn(e)}try{await e.updater.update([],[(0,Zt.st)(t,n,i,a)])}catch(e){throw new yn(e)}try{await r(i)}catch(e){throw e}return i},loadOrCreateIfNotExists:r}}(n,i,a),s=xn(n,r,o),c=pn(n,s),l=dn(n,s,o,a),u=kn(n,r,s,o);return{store:n,authn:r,acl:i,inbox:l,chat:c,profile:s,typeIndex:u,load:function(e){return n.fetcher.load(e)},updatePromise:function(e,t=[]){return new Promise((r,i)=>{n.updater.update(e,t,function(e,t,n){t?r():i(new Error(n))})})},clearStore:function(){n.statements.slice().forEach(n.remove.bind(n))}}}const En=async(e,t)=>{const n=t&&t.credentials&&"omit"==t.credentials;return Xt.info.webId&&!n?Xt.fetch(e,t):window.fetch(e,t)},Cn=Symbol.for("solid-logic-singleton"),Sn="undefined"!=typeof window?window:o.g;const An=(Sn[Cn]||(Sn[Cn]=_n({fetch:En},Xt)),Sn[Cn]),Tn=[{name:"Solid Community",uri:"https://solidcommunity.net"},{name:"Solid Web",uri:"https://solidweb.org"},{name:"Solid Web ME",uri:"https://solidweb.me"},{name:"Inrupt.com",uri:"https://login.inrupt.com"}];function Pn(){const e=[...Tn],{host:t,origin:n}=new URL(location.href),r=e.map(({uri:e})=>new URL(e).host);return r.includes(t)||r.some(e=>function(e,t){const n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(t,e))||e.unshift({name:t,uri:n}),e}const Rn=An.authn,In=An.authn.authSession,Fn=An.store},1813(e){"use strict";e.exports=JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/3gpphal+json":{"source":"iana","compressible":true},"application/3gpphalforms+json":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/ace+cbor":{"source":"iana"},"application/ace+json":{"source":"iana","compressible":true},"application/ace-groupcomm+cbor":{"source":"iana"},"application/ace-trl+cbor":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/aif+cbor":{"source":"iana"},"application/aif+json":{"source":"iana","compressible":true},"application/alto-cdni+json":{"source":"iana","compressible":true},"application/alto-cdnifilter+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/alto-propmap+json":{"source":"iana","compressible":true},"application/alto-propmapparams+json":{"source":"iana","compressible":true},"application/alto-tips+json":{"source":"iana","compressible":true},"application/alto-tipsparams+json":{"source":"iana","compressible":true},"application/alto-updatestreamcontrol+json":{"source":"iana","compressible":true},"application/alto-updatestreamparams+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/appinstaller":{"compressible":false,"extensions":["appinstaller"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/appx":{"compressible":false,"extensions":["appx"]},"application/appxbundle":{"compressible":false,"extensions":["appxbundle"]},"application/at+jwt":{"source":"iana"},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-dynamic-event-message":{"source":"iana"},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/automationml-aml+xml":{"source":"iana","compressible":true,"extensions":["aml"]},"application/automationml-amlx+zip":{"source":"iana","compressible":false,"extensions":["amlx"]},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/bufr":{"source":"iana"},"application/c2pa":{"source":"iana"},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/captive+json":{"source":"iana","compressible":true},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cda+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/ce+cbor":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/cid-edhoc+cbor-seq":{"source":"iana"},"application/city+json":{"source":"iana","compressible":true},"application/city+json-seq":{"source":"iana"},"application/clr":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-eap":{"source":"iana"},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/concise-problem-details+cbor":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cose-x509":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true,"extensions":["cpl"]},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwl":{"source":"iana","extensions":["cwl"]},"application/cwl+json":{"source":"iana","compressible":true},"application/cwl+yaml":{"source":"iana"},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dash-patch+xml":{"source":"iana","compressible":true,"extensions":["mpp"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana","extensions":["dcm"]},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dots+cbor":{"source":"iana"},"application/dpop+jwt":{"source":"iana"},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/eat+cwt":{"source":"iana"},"application/eat+jwt":{"source":"iana"},"application/eat-bun+cbor":{"source":"iana"},"application/eat-bun+json":{"source":"iana","compressible":true},"application/eat-ucs+cbor":{"source":"iana"},"application/eat-ucs+json":{"source":"iana","compressible":true},"application/ecmascript":{"source":"apache","compressible":true,"extensions":["ecma"]},"application/edhoc+cbor-seq":{"source":"iana"},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/elm+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/elm+xml":{"source":"iana","compressible":true},"application/emergencycalldata.cap+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.legacyesn+json":{"source":"iana","compressible":true},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/entity-statement+jwt":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/express":{"source":"iana","extensions":["exp"]},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdf":{"source":"iana","extensions":["fdf"]},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/fhir+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geopose+json":{"source":"iana","compressible":true},"application/geoxacml+json":{"source":"iana","compressible":true},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gnap-binding-jws":{"source":"iana"},"application/gnap-binding-jwsd":{"source":"iana"},"application/gnap-binding-rotation-jws":{"source":"iana"},"application/gnap-binding-rotation-jwsd":{"source":"iana"},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/grib":{"source":"iana"},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/hl7v2+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"iana","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"apache","charset":"UTF-8","compressible":true,"extensions":["js"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/jscalendar+json":{"source":"iana","compressible":true},"application/jscontact+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jsonpath":{"source":"iana"},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwk-set+jwt":{"source":"iana"},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/linkset":{"source":"iana"},"application/linkset+json":{"source":"iana","compressible":true},"application/load-control+xml":{"source":"iana","compressible":true},"application/logout+jwt":{"source":"iana"},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lpf+zip":{"source":"iana","compressible":false},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true,"extensions":["mpf"]},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/missing-blocks+cbor-seq":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4","mpg4","mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true},"application/mrb-publish+xml":{"source":"iana","compressible":true},"application/msc-ivr+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msc-mixer+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msix":{"compressible":false,"extensions":["msix"]},"application/msixbundle":{"compressible":false,"extensions":["msixbundle"]},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana","charset":"US-ASCII"},"application/news-groupinfo":{"source":"iana","charset":"US-ASCII"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana","extensions":["cjs"]},"application/nss":{"source":"iana"},"application/oauth-authz-req+jwt":{"source":"iana"},"application/oblivious-dns-message":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":true,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/ohttp-keys":{"source":"iana"},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg","one","onea"]},"application/opc-nodeset+xml":{"source":"iana","compressible":true},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p21":{"source":"iana"},"application/p21+zip":{"source":"iana","compressible":false},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana","extensions":["asc"]},"application/pgp-signature":{"source":"iana","extensions":["sig","asc"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pidf-diff+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/private-token-issuer-directory":{"source":"iana"},"application/private-token-request":{"source":"iana"},"application/private-token-response":{"source":"iana"},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/provided-claims+jwt":{"source":"iana"},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.cyn":{"source":"iana","charset":"7-BIT"},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.implied-document+xml":{"source":"iana","compressible":true},"application/prs.implied-executable":{"source":"iana"},"application/prs.implied-object+json":{"source":"iana","compressible":true},"application/prs.implied-object+json-seq":{"source":"iana"},"application/prs.implied-object+yaml":{"source":"iana"},"application/prs.implied-structure":{"source":"iana"},"application/prs.mayfile":{"source":"iana"},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.vcfbzip2":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true,"extensions":["xsf"]},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/pvd+json":{"source":"iana","compressible":true},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"apache"},"application/reputon+json":{"source":"iana","compressible":true},"application/resolve-response+jwt":{"source":"iana"},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-checklist":{"source":"iana"},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-signed-tal":{"source":"iana"},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sarif+json":{"source":"iana","compressible":true},"application/sarif-external-properties+json":{"source":"iana","compressible":true},"application/sbe":{"source":"iana"},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-etch+cbor":{"source":"iana"},"application/senml-etch+json":{"source":"iana","compressible":true},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"apache"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spdx+json":{"source":"iana","compressible":true},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana","extensions":["sql"]},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/sslkeylogfile":{"source":"iana"},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/st2110-41":{"source":"iana"},"application/stix+json":{"source":"iana","compressible":true},"application/stratum":{"source":"iana"},"application/swid+cbor":{"source":"iana"},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/td+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tm+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/toc+cbor":{"source":"iana"},"application/token-introspection+jwt":{"source":"iana"},"application/toml":{"source":"iana","compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana","extensions":["trig"]},"application/trust-chain+json":{"source":"iana","compressible":true},"application/trust-mark+jwt":{"source":"iana"},"application/trust-mark-delegation+jwt":{"source":"iana"},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ubjson":{"compressible":false,"extensions":["ubj"]},"application/uccs+cbor":{"source":"iana"},"application/ujcs+json":{"source":"iana","compressible":true},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true,"extensions":["td"]},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vc":{"source":"iana"},"application/vc+cose":{"source":"iana"},"application/vc+jwt":{"source":"iana"},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.1ob":{"source":"iana"},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3a+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ach+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc8+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.5gnas":{"source":"iana"},"application/vnd.3gpp.5gsa2x":{"source":"iana"},"application/vnd.3gpp.5gsa2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.5gsv2x":{"source":"iana"},"application/vnd.3gpp.5gsv2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.crs+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.current-location-discovery+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gtpc":{"source":"iana"},"application/vnd.3gpp.interworking-data":{"source":"iana"},"application/vnd.3gpp.lpp":{"source":"iana"},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-msgstore-ctrl-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-regroup+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-regroup+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-regroup+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ngap":{"source":"iana"},"application/vnd.3gpp.pfcp":{"source":"iana"},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.pinapp-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.s1ap":{"source":"iana"},"application/vnd.3gpp.seal-group-doc+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-network-qos-management-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-ue-config-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-unicast-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.seal-user-profile-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.v2x":{"source":"iana"},"application/vnd.3gpp.vae-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acm.addressxfer+json":{"source":"iana","compressible":true},"application/vnd.acm.chatbot+json":{"source":"iana","compressible":true},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"apache","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.cmoca-cmresource":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-cmtable":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.age":{"source":"iana","extensions":["age"]},"application/vnd.ah-barcode":{"source":"apache"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.arrow.file":{"source":"iana"},"application/vnd.apache.arrow.stream":{"source":"iana"},"application/vnd.apache.parquet":{"source":"iana"},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.apexlang":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["key"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"apache"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autodesk.fbx":{"extensions":["fbx"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.belightsoft.lhzd+zip":{"source":"iana","compressible":false},"application/vnd.belightsoft.lhzl+zip":{"source":"iana","compressible":false},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.bzip3":{"source":"iana"},"application/vnd.c3voc.schedule+xml":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.cncf.helm.chart.content.v1.tar+gzip":{"source":"iana"},"application/vnd.cncf.helm.chart.provenance.v1.prov":{"source":"iana"},"application/vnd.cncf.helm.config.v1+json":{"source":"iana","compressible":true},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.cryptomator.encrypted":{"source":"iana"},"application/vnd.cryptomator.vault":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.cyclonedx+json":{"source":"iana","compressible":true},"application/vnd.cyclonedx+xml":{"source":"iana","compressible":true},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.d3m-dataset":{"source":"iana"},"application/vnd.d3m-problem":{"source":"iana"},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datalog":{"source":"iana"},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.dbf":{"source":"iana","extensions":["dbf"]},"application/vnd.dcmp+xml":{"source":"iana","compressible":true,"extensions":["dcmp"]},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbisl+xml":{"source":"iana","compressible":true},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.eclipse.ditto+json":{"source":"iana","compressible":true},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.eln+zip":{"source":"iana","compressible":false},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.erofs":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eu.kasparian.car+json":{"source":"iana","compressible":true},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.familysearch.gedcom+zip":{"source":"iana","compressible":false},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"apache","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.fdsn.stationxml+xml":{"source":"iana","charset":"XML-BASED","compressible":true},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.freelog.comic":{"source":"iana"},"application/vnd.frogans.fnc":{"source":"apache","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"apache","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujifilm.fb.docuworks":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.container":{"source":"iana"},"application/vnd.fujifilm.fb.jfi+xml":{"source":"iana","compressible":true},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.ga4gh.passport+jwt":{"source":"iana"},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.genozip":{"source":"iana"},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.gentoo.catmetadata+xml":{"source":"iana","compressible":true},"application/vnd.gentoo.ebuild":{"source":"iana"},"application/vnd.gentoo.eclass":{"source":"iana"},"application/vnd.gentoo.gpkg":{"source":"iana"},"application/vnd.gentoo.manifest":{"source":"iana"},"application/vnd.gentoo.pkgmetadata+xml":{"source":"iana","compressible":true},"application/vnd.gentoo.xpak":{"source":"iana"},"application/vnd.geo+json":{"source":"apache","compressible":true},"application/vnd.geocube+xml":{"source":"apache","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.pinboard":{"source":"iana"},"application/vnd.geogebra.slides":{"source":"iana","extensions":["ggs"]},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.gnu.taler.exchange+json":{"source":"iana","compressible":true},"application/vnd.gnu.taler.merchant+json":{"source":"iana","compressible":true},"application/vnd.google-apps.audio":{},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.drawing":{"compressible":false,"extensions":["gdraw"]},"application/vnd.google-apps.drive-sdk":{"compressible":false},"application/vnd.google-apps.file":{},"application/vnd.google-apps.folder":{"compressible":false},"application/vnd.google-apps.form":{"compressible":false,"extensions":["gform"]},"application/vnd.google-apps.fusiontable":{},"application/vnd.google-apps.jam":{"compressible":false,"extensions":["gjam"]},"application/vnd.google-apps.mail-layout":{},"application/vnd.google-apps.map":{"compressible":false,"extensions":["gmap"]},"application/vnd.google-apps.photo":{},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.script":{"compressible":false,"extensions":["gscript"]},"application/vnd.google-apps.shortcut":{},"application/vnd.google-apps.site":{"compressible":false,"extensions":["gsite"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-apps.unknown":{},"application/vnd.google-apps.video":{},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"apache","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true,"extensions":["xdcf"]},"application/vnd.gpxsee.map+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.hsl":{"source":"iana"},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"apache"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"apache","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"apache"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.ipfs.ipns-record":{"source":"iana"},"application/vnd.ipld.car":{"source":"iana"},"application/vnd.ipld.dag-cbor":{"source":"iana"},"application/vnd.ipld.dag-json":{"source":"iana"},"application/vnd.ipld.raw":{"source":"iana"},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kdl":{"source":"iana"},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.keyman.kmp+zip":{"source":"iana","compressible":false},"application/vnd.keyman.kmx":{"source":"iana"},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.ldev.productlicensing":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana","extensions":["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxar.archive.3tz+zip":{"source":"iana","compressible":false},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.mdl":{"source":"iana"},"application/vnd.mdl-mbsdf":{"source":"iana"},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.medicalholodeck.recordxr":{"source":"iana"},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mermaid":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.modl":{"source":"iana"},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-visio.viewer":{"extensions":["vdx"]},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msgpack":{"source":"iana"},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.nacamar.ybrid+json":{"source":"iana","compressible":true},"application/vnd.nato.bindingdataobject+cbor":{"source":"iana"},"application/vnd.nato.bindingdataobject+json":{"source":"iana","compressible":true},"application/vnd.nato.bindingdataobject+xml":{"source":"iana","compressible":true,"extensions":["bdo"]},"application/vnd.nato.openxmlformats-package.iepd+zip":{"source":"iana","compressible":false},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nebumind.line":{"source":"iana"},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"apache","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oai.workflows":{"source":"iana"},"application/vnd.oai.workflows+json":{"source":"iana","compressible":true},"application/vnd.oai.workflows+yaml":{"source":"iana"},"application/vnd.oasis.opendocument.base":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"apache","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-master-template":{"source":"iana"},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oci.image.manifest.v1+json":{"source":"iana","compressible":true},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"apache","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"apache","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+cbor":{"source":"iana"},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.onvif.metadata":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.opentimestamps.ots":{"source":"iana"},"application/vnd.openvpi.dspx+json":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.procrate.brushset":{"extensions":["brushset"]},"application/vnd.procreate.brush":{"extensions":["brush"]},"application/vnd.procreate.dream":{"extensions":["drm"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.pt.mundusmundi":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true,"extensions":["xhtm"]},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana","extensions":["rar"]},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.relpipe":{"source":"iana"},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.resilient.logic":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sar":{"source":"iana"},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.seis+json":{"source":"iana","compressible":true},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.shp":{"source":"iana"},"application/vnd.shx":{"source":"iana"},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.sketchometry":{"source":"iana"},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.smintio.portals.archive":{"source":"iana"},"application/vnd.snesdev-page-table":{"source":"iana"},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.sybyl.mol2":{"source":"iana"},"application/vnd.sycle+xml":{"source":"iana","compressible":true},"application/vnd.syft+json":{"source":"iana","compressible":true},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","charset":"UTF-8","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uic.osdm+json":{"source":"iana","compressible":true},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml","uo"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.veraison.tsm-report+cbor":{"source":"iana"},"application/vnd.veraison.tsm-report+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veritone.aion+json":{"source":"iana","compressible":true},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw","vsdx","vtx"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vocalshaper.vsp4":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","charset":"UTF-8","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.wasmflow.wafl":{"source":"iana"},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.dpp":{"source":"iana"},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordlift":{"source":"iana"},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xarin.cpj":{"source":"iana"},"application/vnd.xecrets-encrypted":{"source":"iana"},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/voucher-jws+json":{"source":"iana","compressible":true},"application/vp":{"source":"iana"},"application/vp+cose":{"source":"iana"},"application/vp+jwt":{"source":"iana"},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"source":"iana","compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true,"extensions":["wif"]},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blender":{"extensions":["blend"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-compressed":{"extensions":["rar"]},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-ipynb+json":{"compressible":true,"extensions":["ipynb"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-iwork-keynote-sffkey":{"extensions":["key"]},"application/x-iwork-numbers-sffnumbers":{"extensions":["numbers"]},"application/x-iwork-pages-sffpages":{"extensions":["pages"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-pki-message":{"source":"iana"},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"iana","extensions":["der","crt","pem"]},"application/x-x509-ca-ra-cert":{"source":"iana"},"application/x-x509-next-ca-cert":{"source":"iana"},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zip-compressed":{"extensions":["zip"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xfdf":{"source":"iana","extensions":["xfdf"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xsl","xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yaml":{"source":"iana"},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+cbor":{"source":"iana"},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yang-sid+json":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zip+dotlottie":{"extensions":["lottie"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana","extensions":["adts","aac"]},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana","extensions":["amr"]},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flac":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/matroska":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/mhas":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/midi-clip":{"source":"iana"},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a","m4b"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx","opus"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/scip":{"source":"iana"},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sofa":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tetra_acelp_bb":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/tsvcis":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"apache"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"source":"iana","compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana","extensions":["avci"]},"image/avcs":{"source":"iana","extensions":["avcs"]},"image/avif":{"source":"iana","compressible":false,"extensions":["avif"]},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp","dib"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/dpx":{"source":"iana","extensions":["dpx"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/j2c":{"source":"iana"},"image/jaii":{"source":"iana","extensions":["jaii"]},"image/jais":{"source":"iana","extensions":["jais"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpg","jpeg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm","jpgm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxl":{"source":"iana","extensions":["jxl"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/ktx2":{"source":"iana","extensions":["ktx2"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false,"extensions":["jfif"]},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif","btf"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.clip":{"source":"iana"},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","compressible":true,"extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"compressible":true,"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.pco.b16":{"source":"iana","extensions":["b16"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"iana","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-adobe-dng":{"extensions":["dng"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-emf":{"source":"iana"},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-wmf":{"source":"iana"},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/bhttp":{"source":"iana"},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/mls":{"source":"iana"},"message/news":{"source":"apache"},"message/ohttp-req":{"source":"iana"},"message/ohttp-res":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime","mht","mhtml"]},"message/s-http":{"source":"apache"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"apache"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/e57":{"source":"iana"},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/jt":{"source":"iana","extensions":["jt"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/mtl":{"source":"iana","extensions":["mtl"]},"model/obj":{"source":"iana","extensions":["obj"]},"model/prc":{"source":"iana","extensions":["prc"]},"model/step":{"source":"iana","extensions":["step","stp","stpnc","p21","210"]},"model/step+xml":{"source":"iana","compressible":true,"extensions":["stpx"]},"model/step+zip":{"source":"iana","compressible":false,"extensions":["stpz"]},"model/step-xml+zip":{"source":"iana","compressible":false,"extensions":["stpxz"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/u3d":{"source":"iana","extensions":["u3d"]},"model/vnd.bary":{"source":"iana","extensions":["bary"]},"model/vnd.cld":{"source":"iana","extensions":["cld"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.pytha.pyox":{"source":"iana","extensions":["pyo","pyox"]},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.sap.vds":{"source":"iana","extensions":["vds"]},"model/vnd.usda":{"source":"iana","extensions":["usda"]},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/cql":{"source":"iana"},"text/cql-expression":{"source":"iana"},"text/cql-identifier":{"source":"iana"},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"apache"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/fhirpath":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/gff3":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/hl7v2":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["md","markdown"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana","charset":"UTF-8"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana","charset":"UTF-8"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/prs.texi":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shaclc":{"source":"iana"},"text/shex":{"source":"iana","extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/spdx":{"source":"iana","extensions":["spdx"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana","charset":"UTF-8"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana","charset":"UTF-8"},"text/vnd.exchangeable":{"source":"iana"},"text/vnd.familysearch.gedcom":{"source":"iana","extensions":["ged"]},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hans":{"source":"iana"},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"apache"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","charset":"UTF-8","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana","charset":"UTF-8"},"text/vnd.vcf":{"source":"iana"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vnd.zoo.kcl":{"source":"iana"},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/wgsl":{"source":"iana","extensions":["wgsl"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"compressible":true,"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/av1":{"source":"iana"},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/evc":{"source":"iana"},"video/ffv1":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/h266":{"source":"iana"},"video/iso.segment":{"source":"iana","extensions":["m4s"]},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/jxsv":{"source":"iana"},"video/lottie+json":{"source":"iana","compressible":true},"video/matroska":{"source":"iana"},"video/matroska-3d":{"source":"iana"},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts","m2t","m2ts","mts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/scip":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.planar":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"apache"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/vp9":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}')}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=a,s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var i=Object.create(null);s.r(i);var a={};t=t||[null,n({}),n([]),n(n)];for(var o=2&r&&e;("object"==typeof o||"function"==typeof o)&&!~t.indexOf(o);o=n(o))Object.getOwnPropertyNames(o).forEach(t=>a[t]=()=>e[t]);return a.default=()=>e,s.d(i,a),i},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,n)=>(s.f[n](e,t),t),[])),s.u=e=>e+".mashlib.min.js",s.miniCssF=e=>{},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},i="Mashlib:",s.l=(e,t,n,a)=>{if(r[e])r[e].push(t);else{var o,c;if(void 0!==n)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var p=l[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==i+n){o=p;break}}o||(c=!0,(o=document.createElement("script")).charset="utf-8",s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-webpack",i+n),o.src=e),r[e]=[t];var d=(t,n)=>{o.onerror=o.onload=null,clearTimeout(f);var i=r[e];if(delete r[e],o.parentNode&&o.parentNode.removeChild(o),i&&i.forEach(e=>e(n)),t)return t(n)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=d.bind(null,o.onerror),o.onload=d.bind(null,o.onload),c&&document.head.appendChild(o)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.p="/",(()=>{var e={792:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise((n,i)=>r=e[t]=[n,i]);n.push(r[2]=i);var a=s.p+s.u(t),o=new Error;s.l(a,n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;o.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",o.name="ChunkLoadError",o.type=i,o.request=a,r[1](o)}},"chunk-"+t,t)}};var t=(t,n)=>{var r,i,[a,o,c]=n,l=0;if(a.some(t=>0!==e[t])){for(r in o)s.o(o,r)&&(s.m[r]=o[r]);if(c)c(s)}for(t&&t(n);l<a.length;l++)i=a[l],s.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=self.webpackChunkMashlib=self.webpackChunkMashlib||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var c={};return(()=>{"use strict";s.r(c),s.d(c,{versionInfo:()=>r});var e=s(8230),t=s(7523),n=s(9332);const r={buildTime:"2026-03-23T09:47:01Z",commit:"65d8af17cf24ef9d2711e935fc11e5c9c657e11f",npmInfo:{mashlib:"2.1.3",npm:"10.9.4",node:"22.22.1",acorn:"8.15.0",ada:"2.9.2",amaro:"1.1.5",ares:"1.34.6",brotli:"1.1.0",cjs_module_lexer:"2.2.0",cldr:"48.0",icu:"78.2",llhttp:"9.3.0",modules:"127",napi:"10",nbytes:"0.1.1",ncrypto:"0.0.1",nghttp2:"1.64.0",openssl:"3.5.5",simdjson:"4.2.4",simdutf:"6.4.2",sqlite:"3.51.2",tz:"2025c",undici:"6.23.0",unicode:"17.0",uv:"1.51.0",uvwasi:"0.0.23",v8:"12.4.254.21-node.35",zlib:"1.3.1-e00f703",zstd:"1.5.7"}},i=window,a=()=>{const e=localStorage.getItem("mashlib-theme"),t=window.matchMedia("(prefers-color-scheme: dark)").matches;"dark"===(e||(t?"dark":"light"))?document.documentElement.setAttribute("data-theme","dark"):document.documentElement.removeAttribute("data-theme")};a(),i.$rdf=e,i.panes=t,i.SolidLogic={authn:n.authn,authSession:n.authSession,store:n.store,solidLogicSingleton:n.solidLogicSingleton},i.mashlib={versionInfo:r,theme:{set:e=>{"dark"===e?document.documentElement.setAttribute("data-theme","dark"):document.documentElement.removeAttribute("data-theme"),localStorage.setItem("mashlib-theme",e)},get:()=>"dark"===document.documentElement.getAttribute("data-theme")?"dark":"light",init:a}},i.panes.runDataBrowser=function(r){e.Fetcher.crossSiteProxyTemplate=window.origin+"/xss/?uri={uri}";try{const e=document.createElement("meta");e.setAttribute("name","monetization"),e.setAttribute("content",`$${window.location.host}`),document.head.appendChild(e)}catch(e){}n.authn.checkUser().then(function(e){return t.initMainPage(n.solidLogicSingleton.store,r)})},window.onpopstate=function(t){i.document.outline.GotoSubject(e.sym(window.document.location.href),!0,void 0,!0,void 0)},i.dump=function(e){}})(),c})());
|
|
462
462
|
//# sourceMappingURL=mashlib.min.js.map
|