@ulb-darmstadt/shacl-form 1.5.3 → 1.6.1

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.
@@ -1,6 +1,6 @@
1
1
  /*! For license information please see form-material.js.LICENSE.txt */
2
- var e={5568:e=>{const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},7526:(e,t)=>{t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],l=o[1],d=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,l)),c=0,u=l>0?a-4:a;for(r=0;r<u;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],d[c++]=t>>16&255,d[c++]=t>>8&255,d[c++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,d[c++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,d[c++]=t>>8&255,d[c++]=255&t),d},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,d=n-i;s<d;s+=a)o.push(l(e,s,s+a>d?d:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(e,t,r)=>{const n=r(7526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return d(e,t,r)}function d(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Q(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Q(e,ArrayBuffer)||e&&Q(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Q(e,SharedArrayBuffer)||e&&Q(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,r);const i=function(e){if(l.isBuffer(e)){const t=0|f(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?s(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(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 u(e){return c(e),s(e<0?0:0|f(e))}function h(e){const t=e.length<0?0:0|f(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,l.prototype),n}function f(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function g(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(i)return n?-1:G(e).length;t=(""+t).toLowerCase(),i=!0}}function v(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){let o,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,r/=2}function d(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;o<s;o++)if(d(e,o)===d(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===l)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+l>s&&(r=s-l),o=r;o>=0;o--){let r=!0;for(let n=0;n<l;n++)if(d(e,o+n)!==d(t,n)){r=!1;break}if(r)return o}return-1}function x(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(X(n))return a;e[r+a]=n}return a}function w(e,t,r,n){return J(G(t,e.length-r),e,r,n)}function _(e,t,r,n){return J(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return J(W(t),e,r,n)}function E(e,t,r,n){return J(function(e,t){let r,n,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function I(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,l;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(l=(31&t)<<6|63&r,l>127&&(o=l));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(l=(15&t)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=j)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=j));return r}(n)}t.kMaxLength=a,l.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,r){return d(e,t,r)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,r){return function(e,t,r){return c(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},l.allocUnsafe=function(e){return u(e)},l.allocUnsafeSlow=function(e){return u(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(Q(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),Q(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},l.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}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=l.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(Q(t,Uint8Array))i+t.length>n.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},l.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},l.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},l.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):v.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,r,n,i){if(Q(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),d=this.slice(n,i),c=e.slice(t,r);for(let e=0;e<s;++e)if(d[e]!==c[e]){o=d[e],a=c[e];break}return o<a?-1:a<o?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},l.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return x(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const j=4096;function k(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function N(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function A(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=K[e[n]];return i}function R(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,r,n,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function L(e,t,r,n,i){U(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function $(e,t,r,n,i){U(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function D(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(e,t,r,n,o){return t=+t,r>>>=0,o||D(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function M(e,t,r,n,o){return t=+t,r>>>=0,o||D(e,0,r,8),i.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,l.prototype),n},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Y((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),l.prototype.readBigUInt64BE=Y((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),l.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Y((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),l.prototype.readBigInt64BE=Y((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||O(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||O(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(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},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(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},l.prototype.writeBigUInt64LE=Y((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Y((function(e,t=0){return $(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(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},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(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},l.prototype.writeBigInt64LE=Y((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Y((function(e,t=0){return $(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,r){return P(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return P(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},l.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=l.isBuffer(e)?e:l.from(e,n),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%a]}return this};const B={};function F(e,t,r){B[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function U(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){z(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,i,o)}function z(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){if(Math.floor(e)!==e)throw z(e,r),new B.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function J(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const K=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Y(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},2341:e=>{e.exports=function e(t){return null===t||"object"!=typeof t||null!=t.toJSON?JSON.stringify(t):Array.isArray(t)?"["+t.reduce(((t,r,n)=>t+(0===n?"":",")+e(void 0===r||"symbol"==typeof r?null:r)),"")+"]":"{"+Object.keys(t).sort().reduce(((r,n,i)=>void 0===t[n]||"symbol"==typeof t[n]?r:r+(0===r.length?"":",")+e(n)+":"+e(t[n])),"")+"}"}},7007:e=>{var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function d(e,t,r,n){var i,o,a,d;if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=l(e))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,d=c,console&&console.warn&&console.warn(d)}return e}function c(){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 u(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):f(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function f(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},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+".");a=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var d=l.length,c=f(l,d);for(r=0;r<d;++r)n(c[r],this,t)}return!0},o.prototype.addListener=function(e,t){return d(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return d(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,u(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,u(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,a;if(s(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},251:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1<<s)-1,d=l>>1,c=-7,u=r?i-1:0,h=r?-1:1,p=e[t+u];for(u+=h,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+e[t+u],u+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+u],u+=h,c-=8);if(0===o)o=1-d;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=d}return(p?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,l,d=8*o-i-1,c=(1<<d)-1,u=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,f=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+u>=1?h/l:h*Math.pow(2,1-u))*l>=2&&(a++,l/=2),a+u>=c?(s=0,a=c):a+u>=1?(s=(t*l-1)*Math.pow(2,i),a+=u):(s=t*Math.pow(2,u-1)*Math.pow(2,i),a=0));i>=8;e[r+p]=255&s,p+=f,s/=256,i-=8);for(a=a<<i|s,d+=i;d>0;e[r+p]=255&a,p+=f,a/=256,d-=8);e[r+p-f]|=128*g}},7034:(e,t,r)=>{const{isArray:n,isObject:i,isString:o}=r(7382),{asArray:a}=r(9263),{prependBase:s}=r(470),l=r(2207),d=r(7532);function c(e){throw new l("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:e})}function u({context:e,base:t}){if(!e)return;const r=e["@context"];if(o(r))e["@context"]=s(t,r);else if(n(r))for(let e=0;e<r.length;++e){const n=r[e];o(n)?r[e]=s(t,n):i(n)&&u({context:{"@context":n},base:t})}else if(i(r))for(const e in r)u({context:r[e],base:t})}e.exports=class{constructor({sharedCache:e}){this.perOpCache=new Map,this.sharedCache=e}async resolve({activeCtx:e,context:t,documentLoader:r,base:s,cycles:l=new Set}){t&&i(t)&&t["@context"]&&(t=t["@context"]),t=a(t);const u=[];for(const a of t){if(o(a)){let t=this._get(a);t||(t=await this._resolveRemoteContext({activeCtx:e,url:a,documentLoader:r,base:s,cycles:l})),n(t)?u.push(...t):u.push(t);continue}if(null===a){u.push(new d({document:null}));continue}i(a)||c(t);const h=JSON.stringify(a);let p=this._get(h);p||(p=new d({document:a}),this._cacheResolvedContext({key:h,resolved:p,tag:"static"})),u.push(p)}return u}_get(e){let t=this.perOpCache.get(e);if(!t){const r=this.sharedCache.get(e);r&&(t=r.get("static"),t&&this.perOpCache.set(e,t))}return t}_cacheResolvedContext({key:e,resolved:t,tag:r}){if(this.perOpCache.set(e,t),void 0!==r){let n=this.sharedCache.get(e);n||(n=new Map,this.sharedCache.set(e,n)),n.set(r,t)}return t}async _resolveRemoteContext({activeCtx:e,url:t,documentLoader:r,base:n,cycles:i}){t=s(n,t);const{context:o,remoteDoc:a}=await this._fetchContext({activeCtx:e,url:t,documentLoader:r,cycles:i});u({context:o,base:n=a.documentUrl||t});const l=await this.resolve({activeCtx:e,context:o,documentLoader:r,base:n,cycles:i});return this._cacheResolvedContext({key:t,resolved:l,tag:a.tag}),l}async _fetchContext({activeCtx:e,url:t,documentLoader:r,cycles:a}){if(a.size>10)throw new l("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"loading remote context failed":"context overflow",max:10});if(a.has(t))throw new l("Cyclical @context URLs detected.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"recursive context inclusion":"context overflow",url:t});let s,d;a.add(t);try{d=await r(t),s=d.document||null,o(s)&&(s=JSON.parse(s))}catch(e){throw new l("Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.","jsonld.InvalidUrl",{code:"loading remote context failed",url:t,cause:e})}if(!i(s))throw new l("Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object.","jsonld.InvalidUrl",{code:"invalid remote context",url:t});return s="@context"in s?{"@context":s["@context"]}:{"@context":{}},d.contextUrl&&(n(s["@context"])||(s["@context"]=[s["@context"]]),s["@context"].push(d.contextUrl)),{context:s,remoteDoc:d}}}},2207:e=>{e.exports=class extends Error{constructor(e="An unspecified JSON-LD error occurred.",t="jsonld.Error",r={}){super(e),this.name=t,this.message=e,this.details=r}}},5445:e=>{e.exports=e=>{class t{toString(){return"[object JsonLdProcessor]"}}return Object.defineProperty(t,"prototype",{writable:!1,enumerable:!1}),Object.defineProperty(t.prototype,"constructor",{writable:!0,enumerable:!1,configurable:!0,value:t}),t.compact=function(t,r){return arguments.length<2?Promise.reject(new TypeError("Could not compact, too few arguments.")):e.compact(t,r)},t.expand=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not expand, too few arguments.")):e.expand(t)},t.flatten=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not flatten, too few arguments.")):e.flatten(t)},t}},8229:(e,t,r)=>{e.exports=r(989).NQuads},3743:e=>{e.exports=class{constructor(){this._requests={}}wrapLoader(e){const t=this;return t._loader=e,function(){return t.add.apply(t,arguments)}}async add(e){let t=this._requests[e];if(t)return Promise.resolve(t);t=this._requests[e]=this._loader(e);try{return await t}finally{delete this._requests[e]}}}},7532:(e,t,r)=>{const n=r(9749);e.exports=class{constructor({document:e}){this.document=e,this.cache=new n({max:10})}getProcessed(e){return this.cache.get(e)}setProcessed(e,t){this.cache.set(e,t)}}},1058:(e,t,r)=>{const n=r(2207),{isArray:i,isObject:o,isString:a,isUndefined:s}=r(7382),{isList:l,isValue:d,isGraph:c,isSimpleGraph:u,isSubjectReference:h}=r(3978),{expandIri:p,getContextValue:f,isKeyword:g,process:v,processingMode:m}=r(1972),{removeBase:b,prependBase:y}=r(470),{REGEX_KEYWORD:x,addValue:w,asArray:_,compareShortestLeast:S}=r(9263),E={};function I(e,t,r){if("@nest"!==p(e,t,{vocab:!0},r))throw new n("JSON-LD compact error; nested property must have an @nest value resolving to @nest.","jsonld.SyntaxError",{code:"invalid @nest value"})}e.exports=E,E.compact=async({activeCtx:e,activeProperty:t=null,element:r,options:p={}})=>{if(i(r)){let n=[];for(let i=0;i<r.length;++i){const o=await E.compact({activeCtx:e,activeProperty:t,element:r[i],options:p});null!==o&&n.push(o)}return p.compactArrays&&1===n.length&&0===(f(e,t,"@container")||[]).length&&(n=n[0]),n}const b=f(e,t,"@context");if(s(b)||(e=await v({activeCtx:e,localCtx:b,propagate:!0,overrideProtected:!0,options:p})),o(r)){if(p.link&&"@id"in r&&p.link.hasOwnProperty(r["@id"])){const e=p.link[r["@id"]];for(let t=0;t<e.length;++t)if(e[t].expanded===r)return e[t].compacted}if(d(r)||h(r)){const n=E.compactValue({activeCtx:e,activeProperty:t,value:r,options:p});return p.link&&h(r)&&(p.link.hasOwnProperty(r["@id"])||(p.link[r["@id"]]=[]),p.link[r["@id"]].push({expanded:r,compacted:n})),n}if(l(r)&&(f(e,t,"@container")||[]).includes("@list"))return E.compact({activeCtx:e,activeProperty:t,element:r["@list"],options:p});const b="@reverse"===t,y={},x=e;d(r)||h(r)||(e=e.revertToPreviousContext());const S=f(x,t,"@context");s(S)||(e=await v({activeCtx:e,localCtx:S,propagate:!0,overrideProtected:!0,options:p})),p.link&&"@id"in r&&(p.link.hasOwnProperty(r["@id"])||(p.link[r["@id"]]=[]),p.link[r["@id"]].push({expanded:r,compacted:y}));let T=r["@type"]||[];T.length>1&&(T=Array.from(T).sort());const j=e;for(const t of T){const r=E.compactIri({activeCtx:j,iri:t,relativeTo:{vocab:!0}}),n=f(x,r,"@context");s(n)||(e=await v({activeCtx:e,localCtx:n,options:p,propagate:!1}))}const k=Object.keys(r).sort();for(const s of k){const h=r[s];if("@id"!==s)if("@type"!==s)if("@reverse"!==s)if("@preserve"!==s)if("@index"!==s)if("@graph"!==s&&"@list"!==s&&"@included"!==s&&g(s)){const t=E.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(y,t,h)}else{if(!i(h))throw new n("JSON-LD expansion error; expanded value must be an array.","jsonld.SyntaxError");if(0===h.length){const t=E.compactIri({activeCtx:e,iri:s,value:h,relativeTo:{vocab:!0},reverse:b}),r=e.mappings.has(t)?e.mappings.get(t)["@nest"]:null;let n=y;r&&(I(e,r,p),o(y[r])||(y[r]={}),n=y[r]),w(n,t,h,{propertyIsArray:!0})}for(const t of h){const r=E.compactIri({activeCtx:e,iri:s,value:t,relativeTo:{vocab:!0},reverse:b}),n=e.mappings.has(r)?e.mappings.get(r)["@nest"]:null;let h=y;n&&(I(e,n,p),o(y[n])||(y[n]={}),h=y[n]);const g=f(e,r,"@container")||[],v=c(t),m=l(t);let x;m?x=t["@list"]:v&&(x=t["@graph"]);let S=await E.compact({activeCtx:e,activeProperty:r,element:m||v?x:t,options:p});if(m){if(i(S)||(S=[S]),g.includes("@list")){w(h,r,S,{valueIsArray:!0,allowDuplicate:!0});continue}S={[E.compactIri({activeCtx:e,iri:"@list",relativeTo:{vocab:!0}})]:S},"@index"in t&&(S[E.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"])}if(v)if(g.includes("@graph")&&(g.includes("@id")||g.includes("@index")&&u(t))){let n;h.hasOwnProperty(r)?n=h[r]:h[r]=n={};const i=(g.includes("@id")?t["@id"]:t["@index"])||E.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}});w(n,i,S,{propertyIsArray:!p.compactArrays||g.includes("@set")})}else g.includes("@graph")&&u(t)?(i(S)&&S.length>1&&(S={"@included":S}),w(h,r,S,{propertyIsArray:!p.compactArrays||g.includes("@set")})):(i(S)&&1===S.length&&p.compactArrays&&(S=S[0]),S={[E.compactIri({activeCtx:e,iri:"@graph",relativeTo:{vocab:!0}})]:S},"@id"in t&&(S[E.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t["@id"]),"@index"in t&&(S[E.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"]),w(h,r,S,{propertyIsArray:!p.compactArrays||g.includes("@set")}));else if(g.includes("@language")||g.includes("@index")||g.includes("@id")||g.includes("@type")){let n,i;if(h.hasOwnProperty(r)?n=h[r]:h[r]=n={},g.includes("@language"))d(S)&&(S=S["@value"]),i=t["@language"];else if(g.includes("@index")){const n=f(e,r,"@index")||"@index",o=E.compactIri({activeCtx:e,iri:n,relativeTo:{vocab:!0}});if("@index"===n)i=t["@index"],delete S[o];else{let e;if([i,...e]=_(S[n]||[]),a(i))switch(e.length){case 0:delete S[n];break;case 1:S[n]=e[0];break;default:S[n]=e}else i=null}}else if(g.includes("@id")){const t=E.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}});i=S[t],delete S[t]}else if(g.includes("@type")){const n=E.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}});let o;switch([i,...o]=_(S[n]||[]),o.length){case 0:delete S[n];break;case 1:S[n]=o[0];break;default:S[n]=o}1===Object.keys(S).length&&"@id"in t&&(S=await E.compact({activeCtx:e,activeProperty:r,element:{"@id":t["@id"]},options:p}))}i||(i=E.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}})),w(n,i,S,{propertyIsArray:g.includes("@set")})}else{const e=!p.compactArrays||g.includes("@set")||g.includes("@list")||i(S)&&0===S.length||"@list"===s||"@graph"===s;w(h,r,S,{propertyIsArray:e})}}}else{if((f(e,t,"@container")||[]).includes("@index"))continue;const r=E.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(y,r,h)}else{const r=await E.compact({activeCtx:e,activeProperty:t,element:h,options:p});i(r)&&0===r.length||w(y,s,r)}else{const t=await E.compact({activeCtx:e,activeProperty:"@reverse",element:h,options:p});for(const r in t)if(e.mappings.has(r)&&e.mappings.get(r).reverse){const n=t[r],i=(f(e,r,"@container")||[]).includes("@set")||!p.compactArrays;w(y,r,n,{propertyIsArray:i}),delete t[r]}if(Object.keys(t).length>0){const r=E.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(y,r,t)}}else{let t=_(h).map((e=>E.compactIri({activeCtx:x,iri:e,relativeTo:{vocab:!0}})));1===t.length&&(t=t[0]);const r=E.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}}),n=(f(e,r,"@container")||[]).includes("@set")&&m(e,1.1)||i(t)&&0===h.length;w(y,r,t,{propertyIsArray:n})}else{let t=_(h).map((t=>E.compactIri({activeCtx:e,iri:t,relativeTo:{vocab:!1},base:p.base})));1===t.length&&(t=t[0]),y[E.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t}}return y}return r},E.compactIri=({activeCtx:e,iri:t,value:r=null,relativeTo:i={vocab:!1},reverse:a=!1,base:s=null})=>{if(null===t)return t;e.isPropertyTermScoped&&e.previousContext&&(e=e.previousContext);const u=e.getInverse();if(g(t)&&t in u&&"@none"in u[t]&&"@type"in u[t]["@none"]&&"@none"in u[t]["@none"]["@type"])return u[t]["@none"]["@type"]["@none"];if(i.vocab&&t in u){const n=e["@language"]||"@none",i=[];o(r)&&"@index"in r&&!("@graph"in r)&&i.push("@index","@index@set"),o(r)&&"@preserve"in r&&(r=r["@preserve"][0]),c(r)?("@index"in r&&i.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in r&&i.push("@graph@id","@graph@id@set"),i.push("@graph","@graph@set","@set"),"@index"in r||i.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in r||i.push("@graph@id","@graph@id@set")):o(r)&&!d(r)&&i.push("@id","@id@set","@type","@set@type");let s="@language",u="@null";if(a)s="@type",u="@reverse",i.push("@set");else if(l(r)){"@index"in r||i.push("@list");const e=r["@list"];if(0===e.length)s="@any",u="@none";else{let t=0===e.length?n:null,r=null;for(let n=0;n<e.length;++n){const i=e[n];let o="@none",a="@none";if(d(i)?"@direction"in i?o=`${(i["@language"]||"").toLowerCase()}_${i["@direction"]}`:"@language"in i?o=i["@language"].toLowerCase():"@type"in i?a=i["@type"]:o="@null":a="@id",null===t?t=o:o!==t&&d(i)&&(t="@none"),null===r?r=a:a!==r&&(r="@none"),"@none"===t&&"@none"===r)break}t=t||"@none",r=r||"@none","@none"!==r?(s="@type",u=r):u=t}}else{if(d(r))if("@language"in r&&!("@index"in r)){i.push("@language","@language@set"),u=r["@language"];const e=r["@direction"];e&&(u=`${u}_${e}`)}else"@direction"in r&&!("@index"in r)?u=`_${r["@direction"]}`:"@type"in r&&(s="@type",u=r["@type"]);else s="@type",u="@id";i.push("@set")}i.push("@none"),o(r)&&!("@index"in r)&&i.push("@index","@index@set"),d(r)&&1===Object.keys(r).length&&i.push("@language","@language@set");const h=function(e,t,r,n,i,a){null===a&&(a="@null");const s=[];if(("@id"===a||"@reverse"===a)&&o(r)&&"@id"in r){"@reverse"===a&&s.push("@reverse");const t=E.compactIri({activeCtx:e,iri:r["@id"],relativeTo:{vocab:!0}});e.mappings.has(t)&&e.mappings.get(t)&&e.mappings.get(t)["@id"]===r["@id"]?s.push.apply(s,["@vocab","@id"]):s.push.apply(s,["@id","@vocab"])}else{s.push(a);const e=s.find((e=>e.includes("_")));e&&s.push(e.replace(/^[^_]+_/,"_"))}s.push("@none");const l=e.inverse[t];for(const e of n){if(!(e in l))continue;const t=l[e][i];for(const e of s)if(e in t)return t[e]}return null}(e,t,r,i,s,u);if(null!==h)return h}if(i.vocab&&"@vocab"in e){const r=e["@vocab"];if(0===t.indexOf(r)&&t!==r){const n=t.substr(r.length);if(!e.mappings.has(n))return n}}let h=null;const p=[];let f=e.fastCurieMap;const v=t.length-1;for(let e=0;e<v&&t[e]in f;++e)f=f[t[e]],""in f&&p.push(f[""][0]);for(let n=p.length-1;n>=0;--n){const i=p[n],o=i.terms;for(const n of o){const o=n+":"+t.substr(i.iri.length);e.mappings.get(n)._prefix&&(!e.mappings.has(o)||null===r&&e.mappings.get(o)["@id"]===t)&&(null===h||S(o,h)<0)&&(h=o)}}if(null!==h)return h;for(const[r,i]of e.mappings)if(i&&i._prefix&&t.startsWith(r+":"))throw new n(`Absolute IRI "${t}" confused with prefix "${r}".`,"jsonld.SyntaxError",{code:"IRI confused with prefix",context:e});if(!i.vocab){if("@base"in e){if(e["@base"]){const r=b(y(s,e["@base"]),t);return x.test(r)?`./${r}`:r}return t}return b(s,t)}return t},E.compactValue=({activeCtx:e,activeProperty:t,value:r,options:n})=>{if(d(r)){const n=f(e,t,"@type"),i=f(e,t,"@language"),o=f(e,t,"@direction"),s=f(e,t,"@container")||[],l="@index"in r&&!s.includes("@index");if(!l&&"@none"!==n){if(r["@type"]===n)return r["@value"];if("@language"in r&&r["@language"]===i&&"@direction"in r&&r["@direction"]===o)return r["@value"];if("@language"in r&&r["@language"]===i)return r["@value"];if("@direction"in r&&r["@direction"]===o)return r["@value"]}const d=Object.keys(r).length,c=1===d||2===d&&"@index"in r&&!l,u="@language"in e,h=a(r["@value"]),p=e.mappings.has(t)&&null===e.mappings.get(t)["@language"];if(c&&"@none"!==n&&(!u||!h||p))return r["@value"];const g={};return l&&(g[E.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=r["@index"]),"@type"in r?g[E.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}})]=E.compactIri({activeCtx:e,iri:r["@type"],relativeTo:{vocab:!0}}):"@language"in r&&(g[E.compactIri({activeCtx:e,iri:"@language",relativeTo:{vocab:!0}})]=r["@language"]),"@direction"in r&&(g[E.compactIri({activeCtx:e,iri:"@direction",relativeTo:{vocab:!0}})]=r["@direction"]),g[E.compactIri({activeCtx:e,iri:"@value",relativeTo:{vocab:!0}})]=r["@value"],g}const i=p(e,t,{vocab:!0},n),o=f(e,t,"@type"),s=E.compactIri({activeCtx:e,iri:r["@id"],relativeTo:{vocab:"@vocab"===o},base:n.base});return"@id"===o||"@vocab"===o||"@graph"===i?s:{[E.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]:s}}},9378:e=>{const t="http://www.w3.org/1999/02/22-rdf-syntax-ns#",r="http://www.w3.org/2001/XMLSchema#";e.exports={LINK_HEADER_REL:"http://www.w3.org/ns/json-ld#context",LINK_HEADER_CONTEXT:"http://www.w3.org/ns/json-ld#context",RDF:t,RDF_LIST:t+"List",RDF_FIRST:t+"first",RDF_REST:t+"rest",RDF_NIL:t+"nil",RDF_TYPE:t+"type",RDF_PLAIN_LITERAL:t+"PlainLiteral",RDF_XML_LITERAL:t+"XMLLiteral",RDF_JSON_LITERAL:t+"JSON",RDF_OBJECT:t+"object",RDF_LANGSTRING:t+"langString",XSD:r,XSD_BOOLEAN:r+"boolean",XSD_DOUBLE:r+"double",XSD_INTEGER:r+"integer",XSD_STRING:r+"string"}},1972:(e,t,r)=>{const n=r(9263),i=r(2207),{isArray:o,isObject:a,isString:s,isUndefined:l}=r(7382),{isAbsolute:d,isRelative:c,prependBase:u}=r(470),{handleEvent:h}=r(2246),{REGEX_BCP47:p,REGEX_KEYWORD:f,asArray:g,compareShortestLeast:v}=r(9263),m=new Map,b={};function y(e,t,r,n,i,o){if(null===t||!s(t)||b.isKeyword(t))return t;if(t.match(f))return null;if(n&&n.hasOwnProperty(t)&&!0!==i.get(t)&&b.createTermDefinition({activeCtx:e,localCtx:n,term:t,defined:i,options:o}),(r=r||{}).vocab){const r=e.mappings.get(t);if(null===r)return null;if(a(r)&&"@id"in r)return r["@id"]}const l=t.indexOf(":");if(l>0){const r=t.substr(0,l),a=t.substr(l+1);if("_"===r||0===a.indexOf("//"))return t;n&&n.hasOwnProperty(r)&&b.createTermDefinition({activeCtx:e,localCtx:n,term:r,defined:i,options:o});const s=e.mappings.get(r);if(s&&s._prefix)return s["@id"]+a;if(d(t))return t}if(r.vocab&&"@vocab"in e)t=e["@vocab"]+t;else if(r.base){let r,n;"@base"in e?e["@base"]?(n=u(o.base,e["@base"]),r=u(n,t)):(n=e["@base"],r=t):(n=o.base,r=u(o.base,t)),t=r}return t}function x(e,t){if(!e||"object"!=typeof e||!t||"object"!=typeof t)return e===t;const r=Array.isArray(e);if(r!==Array.isArray(t))return!1;if(r){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!x(e[r],t[r]))return!1;return!0}const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const r in e){let n=e[r],i=t[r];if("@container"===r&&Array.isArray(n)&&Array.isArray(i)&&(n=n.slice().sort(),i=i.slice().sort()),!x(n,i))return!1}return!0}e.exports=b,b.process=async({activeCtx:e,localCtx:t,options:r,propagate:n=!0,overrideProtected:l=!1,cycles:f=new Set})=>{if(a(t)&&"@context"in t&&o(t["@context"])&&(t=t["@context"]),0===g(t).length)return e;const v=[],m=[({event:e,next:t})=>{v.push(e),t()}];r.eventHandler&&m.push(r.eventHandler);const x=r;r={...r,eventHandler:m};const w=await r.contextResolver.resolve({activeCtx:e,context:t,documentLoader:r.documentLoader,base:r.base});a(w[0].document)&&"boolean"==typeof w[0].document["@propagate"]&&(n=w[0].document["@propagate"]);let _=e;n||_.previousContext||(_=_.clone(),_.previousContext=e);for(const n of w){let{document:o}=n;if(e=_,null===o){if(!l&&0!==Object.keys(e.protected).length)throw new i("Tried to nullify a context with protected terms outside of a term definition.","jsonld.SyntaxError",{code:"invalid context nullification"});_=e=b.getInitialContext(r).clone();continue}const g=n.getProcessed(e);if(g){if(x.eventHandler)for(const e of g.events)h({event:e,options:x});_=e=g.context;continue}if(a(o)&&"@context"in o&&(o=o["@context"]),!a(o))throw new i("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:o});_=_.clone();const m=new Map;if("@version"in o){if(1.1!==o["@version"])throw new i("Unsupported JSON-LD version: "+o["@version"],"jsonld.UnsupportedVersion",{code:"invalid @version value",context:o});if(e.processingMode&&"json-ld-1.0"===e.processingMode)throw new i("@version: "+o["@version"]+" not compatible with "+e.processingMode,"jsonld.ProcessingModeConflict",{code:"processing mode conflict",context:o});_.processingMode="json-ld-1.1",_["@version"]=o["@version"],m.set("@version",!0)}if(_.processingMode=_.processingMode||e.processingMode,"@base"in o){let e=o["@base"];if(null===e||d(e));else{if(!c(e))throw new i('Invalid JSON-LD syntax; the value of "@base" in a @context must be an absolute IRI, a relative IRI, or null.',"jsonld.SyntaxError",{code:"invalid base IRI",context:o});e=u(_["@base"],e)}_["@base"]=e,m.set("@base",!0)}if("@vocab"in o){const e=o["@vocab"];if(null===e)delete _["@vocab"];else{if(!s(e))throw new i('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:o});if(!d(e)&&b.processingMode(_,1))throw new i('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be an absolute IRI.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:o});{const t=y(_,e,{vocab:!0,base:!0},void 0,void 0,r);d(t)||r.eventHandler&&h({event:{type:["JsonLdEvent"],code:"relative @vocab reference",level:"warning",message:"Relative @vocab reference found.",details:{vocab:t}},options:r}),_["@vocab"]=t}}m.set("@vocab",!0)}if("@language"in o){const e=o["@language"];if(null===e)delete _["@language"];else{if(!s(e))throw new i('Invalid JSON-LD syntax; the value of "@language" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid default language",context:o});e.match(p)||r.eventHandler&&h({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:r}),_["@language"]=e.toLowerCase()}m.set("@language",!0)}if("@direction"in o){const t=o["@direction"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @direction not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context member",context:o});if(null===t)delete _["@direction"];else{if("ltr"!==t&&"rtl"!==t)throw new i('Invalid JSON-LD syntax; the value of "@direction" in a @context must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:o});_["@direction"]=t}m.set("@direction",!0)}if("@propagate"in o){const r=o["@propagate"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @propagate not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:o});if("boolean"!=typeof r)throw new i("Invalid JSON-LD syntax; @propagate value must be a boolean.","jsonld.SyntaxError",{code:"invalid @propagate value",context:t});m.set("@propagate",!0)}if("@import"in o){const n=o["@import"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @import not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:o});if(!s(n))throw new i("Invalid JSON-LD syntax; @import must be a string.","jsonld.SyntaxError",{code:"invalid @import value",context:t});const a=await r.contextResolver.resolve({activeCtx:e,context:n,documentLoader:r.documentLoader,base:r.base});if(1!==a.length)throw new i("Invalid JSON-LD syntax; @import must reference a single context.","jsonld.SyntaxError",{code:"invalid remote context",context:t});const l=a[0].getProcessed(e);if(l)o=l;else{const r=a[0].document;if("@import"in r)throw new i("Invalid JSON-LD syntax: imported context must not include @import.","jsonld.SyntaxError",{code:"invalid context entry",context:t});for(const e in r)o.hasOwnProperty(e)||(o[e]=r[e]);a[0].setProcessed(e,o)}m.set("@import",!0)}m.set("@protected",o["@protected"]||!1);for(const e in o)if(b.createTermDefinition({activeCtx:_,localCtx:o,term:e,defined:m,options:r,overrideProtected:l}),a(o[e])&&"@context"in o[e]){const t=o[e]["@context"];let n=!0;if(s(t)){const e=u(r.base,t);f.has(e)?n=!1:f.add(e)}if(n)try{await b.process({activeCtx:_.clone(),localCtx:o[e]["@context"],overrideProtected:!0,options:r,cycles:f})}catch(t){throw new i("Invalid JSON-LD syntax; invalid scoped context.","jsonld.SyntaxError",{code:"invalid scoped context",context:o[e]["@context"],term:e})}}n.setProcessed(e,{context:_,events:v})}return _},b.createTermDefinition=({activeCtx:e,localCtx:t,term:r,defined:n,options:l,overrideProtected:c=!1})=>{if(n.has(r)){if(n.get(r))return;throw new i("Cyclical context definition detected.","jsonld.CyclicalContext",{code:"cyclic IRI mapping",context:t,term:r})}let u;if(n.set(r,!1),t.hasOwnProperty(r)&&(u=t[r]),"@type"===r&&a(u)&&"@set"===(u["@container"]||"@set")&&b.processingMode(e,1.1)){const e=["@container","@id","@protected"],n=Object.keys(u);if(0===n.length||n.some((t=>!e.includes(t))))throw new i("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:r})}else{if(b.isKeyword(r))throw new i("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:r});if(r.match(f))return void(l.eventHandler&&h({event:{type:["JsonLdEvent"],code:"reserved term",level:"warning",message:'Terms beginning with "@" are reserved for future use and dropped.',details:{term:r}},options:l}));if(""===r)throw new i("Invalid JSON-LD syntax; a term cannot be an empty string.","jsonld.SyntaxError",{code:"invalid term definition",context:t})}const p=e.mappings.get(r);e.mappings.has(r)&&e.mappings.delete(r);let g=!1;if((s(u)||null===u)&&(g=!0,u={"@id":u}),!a(u))throw new i("Invalid JSON-LD syntax; @context term values must be strings or objects.","jsonld.SyntaxError",{code:"invalid term definition",context:t});const v={};e.mappings.set(r,v),v.reverse=!1;const m=["@container","@id","@language","@reverse","@type"];b.processingMode(e,1.1)&&m.push("@context","@direction","@index","@nest","@prefix","@protected");for(const e in u)if(!m.includes(e))throw new i("Invalid JSON-LD syntax; a term definition must not contain "+e,"jsonld.SyntaxError",{code:"invalid term definition",context:t});const w=r.indexOf(":");if(v._termHasColon=w>0,"@reverse"in u){if("@id"in u)throw new i("Invalid JSON-LD syntax; a @reverse term definition must not contain @id.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});if("@nest"in u)throw new i("Invalid JSON-LD syntax; a @reverse term definition must not contain @nest.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});const o=u["@reverse"];if(!s(o))throw new i("Invalid JSON-LD syntax; a @context @reverse value must be a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(o.match(f))return l.eventHandler&&h({event:{type:["JsonLdEvent"],code:"reserved @reverse value",level:"warning",message:'@reverse values beginning with "@" are reserved for future use and dropped.',details:{reverse:o}},options:l}),void(p?e.mappings.set(r,p):e.mappings.delete(r));const a=y(e,o,{vocab:!0,base:!1},t,n,l);if(!d(a))throw new i("Invalid JSON-LD syntax; a @context @reverse value must be an absolute IRI or a blank node identifier.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});v["@id"]=a,v.reverse=!0}else if("@id"in u){let o=u["@id"];if(o&&!s(o))throw new i("Invalid JSON-LD syntax; a @context @id value must be an array of strings or a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(null===o)v["@id"]=null;else{if(!b.isKeyword(o)&&o.match(f))return l.eventHandler&&h({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:'@id values beginning with "@" are reserved for future use and dropped.',details:{id:o}},options:l}),void(p?e.mappings.set(r,p):e.mappings.delete(r));if(o!==r){if(o=y(e,o,{vocab:!0,base:!1},t,n,l),!d(o)&&!b.isKeyword(o))throw new i("Invalid JSON-LD syntax; a @context @id value must be an absolute IRI, a blank node identifier, or a keyword.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(r.match(/(?::[^:])|\//)&&y(e,r,{vocab:!0,base:!1},t,new Map(n).set(r,!0),l)!==o)throw new i("Invalid JSON-LD syntax; term in form of IRI must expand to definition.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});v["@id"]=o,v._prefix=g&&!v._termHasColon&&null!==o.match(/[:\/\?#\[\]@]$/)}}}if(!("@id"in v))if(v._termHasColon){const i=r.substr(0,w);if(t.hasOwnProperty(i)&&b.createTermDefinition({activeCtx:e,localCtx:t,term:i,defined:n,options:l}),e.mappings.has(i)){const t=r.substr(w+1);v["@id"]=e.mappings.get(i)["@id"]+t}else v["@id"]=r}else if("@type"===r)v["@id"]=r;else{if(!("@vocab"in e))throw new i("Invalid JSON-LD syntax; @context terms must define an @id.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t,term:r});v["@id"]=e["@vocab"]+r}if((!0===u["@protected"]||!0===n.get("@protected")&&!1!==u["@protected"])&&(e.protected[r]=!0,v.protected=!0),n.set(r,!0),"@type"in u){let r=u["@type"];if(!s(r))throw new i("Invalid JSON-LD syntax; an @context @type value must be a string.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if("@json"===r||"@none"===r){if(b.processingMode(e,1))throw new i(`Invalid JSON-LD syntax; an @context @type value must not be "${r}" in JSON-LD 1.0 mode.`,"jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else if("@id"!==r&&"@vocab"!==r){if(r=y(e,r,{vocab:!0,base:!1},t,n,l),!d(r))throw new i("Invalid JSON-LD syntax; an @context @type value must be an absolute IRI.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if(0===r.indexOf("_:"))throw new i("Invalid JSON-LD syntax; an @context @type value must be an IRI, not a blank node identifier.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}v["@type"]=r}if("@container"in u){const r=s(u["@container"])?[u["@container"]]:u["@container"]||[],n=["@list","@set","@index","@language"];let a=!0;const l=r.includes("@set");if(b.processingMode(e,1.1)){if(n.push("@graph","@id","@type"),r.includes("@list")){if(1!==r.length)throw new i("Invalid JSON-LD syntax; @context @container with @list must have no other values","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else if(r.includes("@graph")){if(r.some((e=>"@graph"!==e&&"@id"!==e&&"@index"!==e&&"@set"!==e)))throw new i("Invalid JSON-LD syntax; @context @container with @graph must have no other values other than @id, @index, and @set","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else a&=r.length<=(l?2:1);if(r.includes("@type")&&(v["@type"]=v["@type"]||"@id",!["@id","@vocab"].includes(v["@type"])))throw new i("Invalid JSON-LD syntax; container: @type requires @type to be @id or @vocab.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else a&=!o(u["@container"]),a&=r.length<=1;if(a&=r.every((e=>n.includes(e))),a&=!(l&&r.includes("@list")),!a)throw new i("Invalid JSON-LD syntax; @context @container value must be one of the following: "+n.join(", "),"jsonld.SyntaxError",{code:"invalid container mapping",context:t});if(v.reverse&&!r.every((e=>["@index","@set"].includes(e))))throw new i("Invalid JSON-LD syntax; @context @container value for a @reverse type definition must be @index or @set.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});v["@container"]=r}if("@index"in u){if(!("@container"in u)||!v["@container"].includes("@index"))throw new i(`Invalid JSON-LD syntax; @index without @index in @container: "${u["@index"]}" on term "${r}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});if(!s(u["@index"])||0===u["@index"].indexOf("@"))throw new i(`Invalid JSON-LD syntax; @index must expand to an IRI: "${u["@index"]}" on term "${r}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});v["@index"]=u["@index"]}if("@context"in u&&(v["@context"]=u["@context"]),"@language"in u&&!("@type"in u)){let e=u["@language"];if(null!==e&&!s(e))throw new i("Invalid JSON-LD syntax; @context @language value must be a string or null.","jsonld.SyntaxError",{code:"invalid language mapping",context:t});null!==e&&(e=e.toLowerCase()),v["@language"]=e}if("@prefix"in u){if(r.match(/:|\//))throw new i("Invalid JSON-LD syntax; @context @prefix used on a compact IRI term","jsonld.SyntaxError",{code:"invalid term definition",context:t});if(b.isKeyword(v["@id"]))throw new i("Invalid JSON-LD syntax; keywords may not be used as prefixes","jsonld.SyntaxError",{code:"invalid term definition",context:t});if("boolean"!=typeof u["@prefix"])throw new i("Invalid JSON-LD syntax; @context value for @prefix must be boolean","jsonld.SyntaxError",{code:"invalid @prefix value",context:t});v._prefix=!0===u["@prefix"]}if("@direction"in u){const e=u["@direction"];if(null!==e&&"ltr"!==e&&"rtl"!==e)throw new i('Invalid JSON-LD syntax; @direction value must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:t});v["@direction"]=e}if("@nest"in u){const e=u["@nest"];if(!s(e)||"@nest"!==e&&0===e.indexOf("@"))throw new i("Invalid JSON-LD syntax; @context @nest value must be a string which is not a keyword other than @nest.","jsonld.SyntaxError",{code:"invalid @nest value",context:t});v["@nest"]=e}const _=v["@id"];if("@context"===_||"@preserve"===_)throw new i("Invalid JSON-LD syntax; @context and @preserve cannot be aliased.","jsonld.SyntaxError",{code:"invalid keyword alias",context:t});if(p&&p.protected&&!c&&(e.protected[r]=!0,v.protected=!0,!x(p,v)))throw new i("Invalid JSON-LD syntax; tried to redefine a protected term.","jsonld.SyntaxError",{code:"protected term redefinition",context:t,term:r})},b.expandIri=(e,t,r,n)=>y(e,t,r,void 0,void 0,n),b.getInitialContext=e=>{const t=JSON.stringify({processingMode:e.processingMode}),r=m.get(t);if(r)return r;const i={processingMode:e.processingMode,mappings:new Map,inverse:null,getInverse:function(){const e=this;if(e.inverse)return e.inverse;const t=e.inverse={},r=e.fastCurieMap={},n={},i=(e["@language"]||"@none").toLowerCase(),s=e["@direction"],l=e.mappings,d=[...l.keys()].sort(v);for(const e of d){const o=l.get(e);if(null===o)continue;let d=o["@container"]||"@none";if(d=[].concat(d).sort().join(""),null===o["@id"])continue;const c=g(o["@id"]);for(const l of c){let c=t[l];const u=b.isKeyword(l);if(c)u||o._termHasColon||n[l].push(e);else if(t[l]=c={},!u&&!o._termHasColon){n[l]=[e];const t={iri:l,terms:n[l]};l[0]in r?r[l[0]].push(t):r[l[0]]=[t]}if(c[d]||(c[d]={"@language":{},"@type":{},"@any":{}}),c=c[d],a(e,c["@any"],"@none"),o.reverse)a(e,c["@type"],"@reverse");else if("@none"===o["@type"])a(e,c["@any"],"@none"),a(e,c["@language"],"@none"),a(e,c["@type"],"@none");else if("@type"in o)a(e,c["@type"],o["@type"]);else if("@language"in o&&"@direction"in o){const t=o["@language"],r=o["@direction"];a(e,c["@language"],t&&r?`${t}_${r}`.toLowerCase():t?t.toLowerCase():r?`_${r}`:"@null")}else"@language"in o?a(e,c["@language"],(o["@language"]||"@null").toLowerCase()):"@direction"in o?o["@direction"]?a(e,c["@language"],`_${o["@direction"]}`):a(e,c["@language"],"@none"):s?(a(e,c["@language"],`_${s}`),a(e,c["@language"],"@none"),a(e,c["@type"],"@none")):(a(e,c["@language"],i),a(e,c["@language"],"@none"),a(e,c["@type"],"@none"))}}for(const e in r)o(r,e,1);return t},clone:function(){const e={};return e.mappings=n.clone(this.mappings),e.clone=this.clone,e.inverse=null,e.getInverse=this.getInverse,e.protected=n.clone(this.protected),this.previousContext&&(e.previousContext=this.previousContext.clone()),e.revertToPreviousContext=this.revertToPreviousContext,"@base"in this&&(e["@base"]=this["@base"]),"@language"in this&&(e["@language"]=this["@language"]),"@vocab"in this&&(e["@vocab"]=this["@vocab"]),e},revertToPreviousContext:function(){return this.previousContext?this.previousContext.clone():this},protected:{}};return 1e4===m.size&&m.clear(),m.set(t,i),i;function o(e,t,r){const n=e[t],i=e[t]={};let a,s;for(const e of n)a=e.iri,s=r>=a.length?"":a[r],s in i?i[s].push(e):i[s]=[e];for(const e in i)""!==e&&o(i,e,r+1)}function a(e,t,r){t.hasOwnProperty(r)||(t[r]=e)}},b.getContextValue=(e,t,r)=>{if(null===t){if("@context"===r)return;return null}if(e.mappings.has(t)){const n=e.mappings.get(t);if(l(r))return n;if(n.hasOwnProperty(r))return n[r]}return"@language"===r&&r in e||"@direction"===r&&r in e?e[r]:"@context"!==r?null:void 0},b.processingMode=(e,t)=>t.toString()>="1.1"?!e.processingMode||e.processingMode>="json-ld-"+t.toString():"json-ld-1.0"===e.processingMode,b.isKeyword=e=>{if(!s(e)||"@"!==e[0])return!1;switch(e){case"@base":case"@container":case"@context":case"@default":case"@direction":case"@embed":case"@explicit":case"@graph":case"@id":case"@included":case"@index":case"@json":case"@language":case"@list":case"@nest":case"@none":case"@omitDefault":case"@prefix":case"@preserve":case"@protected":case"@requireAll":case"@reverse":case"@set":case"@type":case"@value":case"@version":case"@vocab":return!0}return!1}},6957:(e,t,r)=>{const{parseLinkHeader:n,buildHeaders:i}=r(9263),{LINK_HEADER_CONTEXT:o}=r(9378),a=r(2207),s=r(3743),{prependBase:l}=r(470),d=/(^|(\r\n))link:/i;e.exports=({secure:e,headers:t={},xhr:r}={headers:{}})=>(t=i(t),(new s).wrapLoader((async function i(s){if(0!==s.indexOf("http:")&&0!==s.indexOf("https:"))throw new a('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:s});if(e&&0!==s.indexOf("https"))throw new a('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:s});let c;try{c=await function(e,t,r){const n=new(e=e||XMLHttpRequest);return new Promise(((e,i)=>{n.onload=()=>e(n),n.onerror=e=>i(e),n.open("GET",t,!0);for(const e in r)n.setRequestHeader(e,r[e]);n.send()}))}(r,s,t)}catch(e){throw new a("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:s,cause:e})}if(c.status>=400)throw new a("URL could not be dereferenced: "+c.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:s,httpStatusCode:c.status});let u={contextUrl:null,documentUrl:s,document:c.response},h=null;const p=c.getResponseHeader("Content-Type");let f;if(d.test(c.getAllResponseHeaders())&&(f=c.getResponseHeader("Link")),f&&"application/ld+json"!==p){const e=n(f),t=e[o];if(Array.isArray(t))throw new a("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:s});t&&(u.contextUrl=t.target),h=e.alternate,h&&"application/ld+json"==h.type&&!(p||"").match(/^application\/(\w*\+)?json$/)&&(u=await i(l(s,h.target)))}return u})))},2246:(e,t,r)=>{const n=r(2207),{isArray:i}=r(7382),{asArray:o}=r(9263),a={};function s({event:e,handlers:t}){let r=!0;for(let o=0;r&&o<t.length;++o){r=!1;const a=t[o];if(i(a))r=s({event:e,handlers:a});else if("function"==typeof a)a({event:e,next:()=>{r=!0}});else{if("object"!=typeof a)throw new n("Invalid event handler.","jsonld.InvalidEventHandler",{event:e});e.code in a?a[e.code]({event:e,next:()=>{r=!0}}):r=!0}}return r}e.exports=a,a.defaultEventHandler=null,a.setupEventHandler=({options:e={}})=>{const t=[].concat(e.safe?a.safeEventHandler:[],e.eventHandler?o(e.eventHandler):[],a.defaultEventHandler?a.defaultEventHandler:[]);return 0===t.length?null:t},a.handleEvent=({event:e,options:t})=>{s({event:e,handlers:t.eventHandler})};const l=new Set(["empty object","free-floating scalar","invalid @language value","invalid property","null @id value","null @value value","object with only @id","object with only @language","object with only @list","object with only @value","relative @id reference","relative @type reference","relative @vocab reference","reserved @id value","reserved @reverse value","reserved term","blank node predicate","relative graph reference","relative object reference","relative predicate reference","relative subject reference","rdfDirection not set"]);a.safeEventHandler=function({event:e,next:t}){if("warning"===e.level&&l.has(e.code))throw new n("Safe mode validation error.","jsonld.ValidationError",{event:e});t()},a.logEventHandler=function({event:e,next:t}){console.log(`EVENT: ${e.message}`,{event:e}),t()},a.logWarningEventHandler=function({event:e,next:t}){"warning"===e.level&&console.warn(`WARNING: ${e.message}`,{event:e}),t()},a.unhandledEventHandler=function({event:e}){throw new n("No handler for event.","jsonld.UnhandledEvent",{event:e})},a.setDefaultEventHandler=function({eventHandler:e}={}){a.defaultEventHandler=e?o(e):null}},4019:(e,t,r)=>{const n=r(2207),{isArray:i,isObject:o,isEmptyObject:a,isString:s,isUndefined:l}=r(7382),{isList:d,isValue:c,isGraph:u,isSubject:h}=r(3978),{expandIri:p,getContextValue:f,isKeyword:g,process:v,processingMode:m}=r(1972),{isAbsolute:b}=r(470),{REGEX_BCP47:y,REGEX_KEYWORD:x,addValue:w,asArray:_,getValues:S,validateTypeValue:E}=r(9263),{handleEvent:I}=r(2246),T={};function j({value:e,count:t,options:r}){if(0===t||"@value"in e||"@list"in e||1===t&&"@id"in e){if(r.eventHandler){let n,i;0===t?(n="empty object",i="Dropping empty object."):"@value"in e?(n="object with only @value",i="Dropping object with only @value."):"@list"in e?(n="object with only @list",i="Dropping object with only @list."):1===t&&"@id"in e&&(n="object with only @id",i="Dropping object with only @id."),I({event:{type:["JsonLdEvent"],code:n,level:"warning",message:i,details:{value:e}},options:r})}return null}return e}async function k({activeCtx:e,activeProperty:t,expandedActiveProperty:r,element:u,expandedParent:x,options:S={},insideList:N,typeKey:C,typeScopedContext:O}){const L=Object.keys(u).sort(),$=[];let D;const P=u[C]&&"@json"===p(e,i(u[C])?u[C][0]:u[C],{vocab:!0},{...S,typeExpansion:!0});for(const k of L){let N,C=u[k];if("@context"===k)continue;const L=p(e,k,{vocab:!0},S);if(null===L||!b(L)&&!g(L)){S.eventHandler&&I({event:{type:["JsonLdEvent"],code:"invalid property",level:"warning",message:"Dropping property that did not expand into an absolute IRI or keyword.",details:{property:k,expandedProperty:L}},options:S});continue}if(g(L)){if("@reverse"===r)throw new n("Invalid JSON-LD syntax; a keyword cannot be used as a @reverse property.","jsonld.SyntaxError",{code:"invalid reverse property map",value:C});if(L in x&&"@included"!==L&&"@type"!==L)throw new n("Invalid JSON-LD syntax; colliding keywords detected.","jsonld.SyntaxError",{code:"colliding keywords",keyword:L})}if("@id"===L){if(!s(C)){if(!S.isFrame)throw new n('Invalid JSON-LD syntax; "@id" value must a string.',"jsonld.SyntaxError",{code:"invalid @id value",value:C});if(o(C)){if(!a(C))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:C})}else{if(!i(C))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:C});if(!C.every((e=>s(e))))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:C})}}w(x,"@id",_(C).map((t=>{if(s(t)){const r=p(e,t,{base:!0},S);return S.eventHandler&&(null===r?I(null===t?{event:{type:["JsonLdEvent"],code:"null @id value",level:"warning",message:"Null @id found.",details:{id:t}},options:S}:{event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:t}},options:S}):b(r)||I({event:{type:["JsonLdEvent"],code:"relative @id reference",level:"warning",message:"Relative @id reference found.",details:{id:t,expandedId:r}},options:S})),r}return t})),{propertyIsArray:S.isFrame});continue}if("@type"===L){o(C)&&(C=Object.fromEntries(Object.entries(C).map((([e,t])=>[p(O,e,{vocab:!0}),_(t).map((e=>p(O,e,{base:!0,vocab:!0},{...S,typeExpansion:!0})))])))),E(C,S.isFrame),w(x,"@type",_(C).map((e=>{if(s(e)){const t=p(O,e,{base:!0,vocab:!0},{...S,typeExpansion:!0});return"@json"===t||b(t)||S.eventHandler&&I({event:{type:["JsonLdEvent"],code:"relative @type reference",level:"warning",message:"Relative @type reference found.",details:{type:e}},options:S}),t}return e})),{propertyIsArray:!!S.isFrame});continue}if("@included"===L&&m(e,1.1)){const r=_(await T.expand({activeCtx:e,activeProperty:t,element:C,options:S}));if(!r.every((e=>h(e))))throw new n("Invalid JSON-LD syntax; values of @included must expand to node objects.","jsonld.SyntaxError",{code:"invalid @included value",value:C});w(x,"@included",r,{propertyIsArray:!0});continue}if("@graph"===L&&!o(C)&&!i(C))throw new n('Invalid JSON-LD syntax; "@graph" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid @graph value",value:C});if("@value"===L){D=C,P&&m(e,1.1)?x["@value"]=C:w(x,"@value",C,{propertyIsArray:S.isFrame});continue}if("@language"===L){if(null===C)continue;if(!s(C)&&!S.isFrame)throw new n('Invalid JSON-LD syntax; "@language" value must be a string.',"jsonld.SyntaxError",{code:"invalid language-tagged string",value:C});C=_(C).map((e=>s(e)?e.toLowerCase():e));for(const e of C)s(e)&&!e.match(y)&&S.eventHandler&&I({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:S});w(x,"@language",C,{propertyIsArray:S.isFrame});continue}if("@direction"===L){if(!s(C)&&!S.isFrame)throw new n('Invalid JSON-LD syntax; "@direction" value must be a string.',"jsonld.SyntaxError",{code:"invalid base direction",value:C});C=_(C);for(const e of C)if(s(e)&&"ltr"!==e&&"rtl"!==e)throw new n('Invalid JSON-LD syntax; "@direction" must be "ltr" or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",value:C});w(x,"@direction",C,{propertyIsArray:S.isFrame});continue}if("@index"===L){if(!s(C))throw new n('Invalid JSON-LD syntax; "@index" value must be a string.',"jsonld.SyntaxError",{code:"invalid @index value",value:C});w(x,"@index",C);continue}if("@reverse"===L){if(!o(C))throw new n('Invalid JSON-LD syntax; "@reverse" value must be an object.',"jsonld.SyntaxError",{code:"invalid @reverse value",value:C});if(N=await T.expand({activeCtx:e,activeProperty:"@reverse",element:C,options:S}),"@reverse"in N)for(const e in N["@reverse"])w(x,e,N["@reverse"][e],{propertyIsArray:!0});let t=x["@reverse"]||null;for(const e in N){if("@reverse"===e)continue;null===t&&(t=x["@reverse"]={}),w(t,e,[],{propertyIsArray:!0});const r=N[e];for(let i=0;i<r.length;++i){const o=r[i];if(c(o)||d(o))throw new n('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:N});w(t,e,o,{propertyIsArray:!0})}}continue}if("@nest"===L){$.push(k);continue}let M=e;const B=f(e,k,"@context");l(B)||(M=await v({activeCtx:e,localCtx:B,propagate:!0,overrideProtected:!0,options:S}));const F=f(e,k,"@container")||[];if(F.includes("@language")&&o(C))N=A(M,C,f(M,k,"@direction"),S);else if(F.includes("@index")&&o(C)){const t=F.includes("@graph"),r=f(M,k,"@index")||"@index",n="@index"!==r&&p(e,r,{vocab:!0},S);N=await R({activeCtx:M,options:S,activeProperty:k,value:C,asGraph:t,indexKey:r,propertyIndex:n})}else if(F.includes("@id")&&o(C)){const e=F.includes("@graph");N=await R({activeCtx:M,options:S,activeProperty:k,value:C,asGraph:e,indexKey:"@id"})}else if(F.includes("@type")&&o(C))N=await R({activeCtx:M.revertToPreviousContext(),options:S,activeProperty:k,value:C,asGraph:!1,indexKey:"@type"});else{const n="@list"===L;if(n||"@set"===L){let e=t;n&&"@graph"===r&&(e=null),N=await T.expand({activeCtx:M,activeProperty:e,element:C,options:S,insideList:n})}else N="@json"===f(e,k,"@type")?{"@type":"@json","@value":C}:await T.expand({activeCtx:M,activeProperty:k,element:C,options:S,insideList:!1})}if(null!==N||"@value"===L){if("@list"!==L&&!d(N)&&F.includes("@list")&&(N={"@list":_(N)}),F.includes("@graph")&&!F.some((e=>"@id"===e||"@index"===e))){if(N=_(N),S.isFrame||(N=N.filter((e=>null!==j({value:e,count:Object.keys(e).length,options:S})))),0===N.length)continue;N=N.map((e=>({"@graph":_(e)})))}if(M.mappings.has(k)&&M.mappings.get(k).reverse){const e=x["@reverse"]=x["@reverse"]||{};N=_(N);for(let t=0;t<N.length;++t){const r=N[t];if(c(r)||d(r))throw new n('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:N});w(e,L,r,{propertyIsArray:!0})}}else w(x,L,N,{propertyIsArray:!0})}}if("@value"in x)if("@json"===x["@type"]&&m(e,1.1));else if((o(D)||i(D))&&!S.isFrame)throw new n('Invalid JSON-LD syntax; "@value" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid value object value",value:D});for(const a of $){const s=i(u[a])?u[a]:[u[a]];for(const i of s){if(!o(i)||Object.keys(i).some((t=>"@value"===p(e,t,{vocab:!0},S))))throw new n("Invalid JSON-LD syntax; nested value must be a node object.","jsonld.SyntaxError",{code:"invalid @nest value",value:i});await k({activeCtx:e,activeProperty:t,expandedActiveProperty:r,element:i,expandedParent:x,options:S,insideList:N,typeScopedContext:O,typeKey:C})}}}function N({activeCtx:e,activeProperty:t,value:r,options:n}){if(null==r)return null;const i=p(e,t,{vocab:!0},n);if("@id"===i)return p(e,r,{base:!0},n);if("@type"===i)return p(e,r,{vocab:!0,base:!0},{...n,typeExpansion:!0});const o=f(e,t,"@type");if(("@id"===o||"@graph"===i)&&s(r)){const i=p(e,r,{base:!0},n);return null===i&&r.match(x)&&n.eventHandler&&I({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:t}},options:n}),{"@id":i}}if("@vocab"===o&&s(r))return{"@id":p(e,r,{vocab:!0,base:!0},n)};if(g(i))return r;const a={};if(o&&!["@id","@vocab","@none"].includes(o))a["@type"]=o;else if(s(r)){const r=f(e,t,"@language");null!==r&&(a["@language"]=r);const n=f(e,t,"@direction");null!==n&&(a["@direction"]=n)}return["boolean","number","string"].includes(typeof r)||(r=r.toString()),a["@value"]=r,a}function A(e,t,r,o){const a=[],l=Object.keys(t).sort();for(const d of l){const l=p(e,d,{vocab:!0},o);let c=t[d];i(c)||(c=[c]);for(const e of c){if(null===e)continue;if(!s(e))throw new n("Invalid JSON-LD syntax; language map values must be strings.","jsonld.SyntaxError",{code:"invalid language map value",languageMap:t});const i={"@value":e};"@none"!==l&&(d.match(y)||o.eventHandler&&I({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:d}},options:o}),i["@language"]=d.toLowerCase()),r&&(i["@direction"]=r),a.push(i)}}return a}async function R({activeCtx:e,options:t,activeProperty:r,value:o,asGraph:a,indexKey:s,propertyIndex:d}){const h=[],g=Object.keys(o).sort(),m="@type"===s;for(let b of g){if(m){const r=f(e,b,"@context");l(r)||(e=await v({activeCtx:e,localCtx:r,propagate:!1,options:t}))}let g,y=o[b];i(y)||(y=[y]),y=await T.expand({activeCtx:e,activeProperty:r,element:y,options:t,insideList:!1,insideIndex:!0}),g=d?"@none"===b?"@none":N({activeCtx:e,activeProperty:s,value:b,options:t}):p(e,b,{vocab:!0},t),"@id"===s?b=p(e,b,{base:!0},t):m&&(b=g);for(let e of y){if(a&&!u(e)&&(e={"@graph":[e]}),"@type"===s)"@none"===g||(e["@type"]?e["@type"]=[b].concat(e["@type"]):e["@type"]=[b]);else{if(c(e)&&!["@language","@type","@index"].includes(s))throw new n(`Invalid JSON-LD syntax; Attempt to add illegal key to value object: "${s}".`,"jsonld.SyntaxError",{code:"invalid value object",value:e});d?"@none"!==g&&w(e,d,g,{propertyIsArray:!0,prependValue:!0}):"@none"===g||s in e||(e[s]=b)}h.push(e)}}return h}e.exports=T,T.expand=async({activeCtx:e,activeProperty:t=null,element:r,options:d={},insideList:c=!1,insideIndex:u=!1,typeScopedContext:h=null})=>{if(null==r)return null;if("@default"===t&&(d=Object.assign({},d,{isFrame:!1})),!i(r)&&!o(r))return c||null!==t&&"@graph"!==p(e,t,{vocab:!0},d)?N({activeCtx:e,activeProperty:t,value:r,options:d}):(d.eventHandler&&I({event:{type:["JsonLdEvent"],code:"free-floating scalar",level:"warning",message:"Dropping free-floating scalar not in a list.",details:{value:r}},options:d}),null);if(i(r)){let n=[];const o=f(e,t,"@container")||[];c=c||o.includes("@list");for(let o=0;o<r.length;++o){let a=await T.expand({activeCtx:e,activeProperty:t,element:r[o],options:d,insideIndex:u,typeScopedContext:h});c&&i(a)&&(a={"@list":a}),null!==a&&(i(a)?n=n.concat(a):n.push(a))}return n}const g=p(e,t,{vocab:!0},d),y=f(e,t,"@context");h=h||(e.previousContext?e:null);let x=Object.keys(r).sort(),w=!u;if(w&&h&&x.length<=2&&!x.includes("@context"))for(const t of x){const r=p(h,t,{vocab:!0},d);if("@value"===r){w=!1,e=h;break}if("@id"===r&&1===x.length){w=!1;break}}w&&(e=e.revertToPreviousContext()),l(y)||(e=await v({activeCtx:e,localCtx:y,propagate:!0,overrideProtected:!0,options:d})),"@context"in r&&(e=await v({activeCtx:e,localCtx:r["@context"],options:d})),h=e;let E=null;for(const t of x)if("@type"===p(e,t,{vocab:!0},d)){E=E||t;const n=r[t],i=Array.isArray(n)?n.length>1?n.slice().sort():n:[n];for(const t of i){const r=f(h,t,"@context");l(r)||(e=await v({activeCtx:e,localCtx:r,options:d,propagate:!1}))}}let A={};await k({activeCtx:e,activeProperty:t,expandedActiveProperty:g,element:r,expandedParent:A,options:d,insideList:c,typeKey:E,typeScopedContext:h}),x=Object.keys(A);let R=x.length;if("@value"in A){if("@type"in A&&("@language"in A||"@direction"in A))throw new n('Invalid JSON-LD syntax; an element containing "@value" may not contain both "@type" and either "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:A});let t=R-1;if("@type"in A&&(t-=1),"@index"in A&&(t-=1),"@language"in A&&(t-=1),"@direction"in A&&(t-=1),0!==t)throw new n('Invalid JSON-LD syntax; an element containing "@value" may only have an "@index" property and either "@type" or either or both "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:A});const r=null===A["@value"]?[]:_(A["@value"]),i=S(A,"@type");if(m(e,1.1)&&i.includes("@json")&&1===i.length);else if(0===r.length)d.eventHandler&&I({event:{type:["JsonLdEvent"],code:"null @value value",level:"warning",message:"Dropping null @value value.",details:{value:A}},options:d}),A=null;else{if(!r.every((e=>s(e)||a(e)))&&"@language"in A)throw new n("Invalid JSON-LD syntax; only strings may be language-tagged.","jsonld.SyntaxError",{code:"invalid language-tagged value",element:A});if(!i.every((e=>b(e)&&!(s(e)&&0===e.indexOf("_:"))||a(e))))throw new n('Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',"jsonld.SyntaxError",{code:"invalid typed value",element:A})}}else if("@type"in A&&!i(A["@type"]))A["@type"]=[A["@type"]];else if("@set"in A||"@list"in A){if(R>1&&(2!==R||!("@index"in A)))throw new n('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:A});"@set"in A&&(A=A["@set"],x=Object.keys(A),R=x.length)}else 1===R&&"@language"in A&&(d.eventHandler&&I({event:{type:["JsonLdEvent"],code:"object with only @language",level:"warning",message:"Dropping object with only @language.",details:{value:A}},options:d}),A=null);return!o(A)||d.keepFreeFloatingNodes||c||null!==t&&"@graph"!==g&&!(f(e,t,"@container")||[]).includes("@graph")||(A=j({value:A,count:R,options:d})),A}},5229:(e,t,r)=>{const{isSubjectReference:n}=r(3978),{createMergedNodeMap:i}=r(9233),o={};e.exports=o,o.flatten=e=>{const t=i(e),r=[],o=Object.keys(t).sort();for(let e=0;e<o.length;++e){const i=t[o[e]];n(i)||r.push(i)}return r}},7946:(e,t,r)=>{const{isKeyword:n}=r(1972),i=r(3978),o=r(7382),a=r(9263),s=r(470),l=r(2207),{createNodeMap:d,mergeNodeMapGraphs:c}=r(9233),u={};function h(e){const t={};for(const r in e)void 0!==e[r]&&(t["@"+r]=[e[r]]);return[t]}function p(e,t,r){for(let n=r.length-1;n>=0;--n){const i=r[n];if(i.graph===t&&i.subject["@id"]===e["@id"])return!0}return!1}function f(e,t,r){const n="@"+r;let i=n in e?e[n][0]:t[r];if("embed"===r)if(!0===i)i="@once";else if(!1===i)i="@never";else if("@always"!==i&&"@never"!==i&&"@link"!==i&&"@first"!==i&&"@last"!==i&&"@once"!==i)throw new l("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:e});return i}function g(e){if(!o.isArray(e)||1!==e.length||!o.isObject(e[0]))throw new l("Invalid JSON-LD syntax; a JSON-LD frame must be a single object.","jsonld.SyntaxError",{frame:e});if("@id"in e[0])for(const t of a.asArray(e[0]["@id"]))if(!o.isObject(t)&&!s.isAbsolute(t)||o.isString(t)&&0===t.indexOf("_:"))throw new l("Invalid JSON-LD syntax; invalid @id in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e});if("@type"in e[0])for(const t of a.asArray(e[0]["@type"]))if(!o.isObject(t)&&!s.isAbsolute(t)&&"@json"!==t||o.isString(t)&&0===t.indexOf("_:"))throw new l("Invalid JSON-LD syntax; invalid @type in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e})}function v(e,t,r,s){let l=!0,d=!1;for(const c in r){let u=!1;const h=a.getValues(t,c),p=0===a.getValues(r,c).length;if("@id"===c){if(o.isEmptyObject(r["@id"][0]||{})?u=!0:r["@id"].length>=0&&(u=r["@id"].includes(h[0])),!s.requireAll)return u}else if("@type"===c){if(l=!1,p){if(h.length>0)return!1;u=!0}else if(1===r["@type"].length&&o.isEmptyObject(r["@type"][0]))u=h.length>0;else for(const e of r["@type"])u=!(!o.isObject(e)||!("@default"in e))||u||h.some((t=>t===e));if(!s.requireAll)return u}else{if(n(c))continue;{const t=a.getValues(r,c)[0];let n=!1;if(t&&(g([t]),n="@default"in t),l=!1,0===h.length&&n)continue;if(h.length>0&&p)return!1;if(void 0===t){if(h.length>0)return!1;u=!0}else if(i.isList(t)){const r=t["@list"][0];if(i.isList(h[0])){const t=h[0]["@list"];i.isValue(r)?u=t.some((e=>w(r,e))):(i.isSubject(r)||i.isSubjectReference(r))&&(u=t.some((t=>x(e,r,t,s))))}}else u=i.isValue(t)?h.some((e=>w(t,e))):i.isSubjectReference(t)?h.some((r=>x(e,t,r,s))):!!o.isObject(t)&&h.length>0}}if(!u&&s.requireAll)return!1;d=d||u}return l||d}function m(e,t){const r=e.uniqueEmbeds[e.graph],n=r[t],i=n.parent,s=n.property,l={"@id":t};if(o.isArray(i)){for(let e=0;e<i.length;++e)if(a.compareValues(i[e],l)){i[e]=l;break}}else{const e=o.isArray(i[s]);a.removeValue(i,s,l,{propertyIsArray:e}),a.addValue(i,s,l,{propertyIsArray:e})}const d=e=>{const t=Object.keys(r);for(const n of t)n in r&&o.isObject(r[n].parent)&&r[n].parent["@id"]===e&&(delete r[n],d(n))};d(t)}function b(e,t){if(o.isArray(e))return e.map((e=>b(e,t)));if(o.isObject(e)){if("@preserve"in e)return e["@preserve"][0];if(i.isValue(e))return e;if(i.isList(e))return e["@list"]=b(e["@list"],t),e;if("@id"in e){const r=e["@id"];if(t.link.hasOwnProperty(r)){const n=t.link[r].indexOf(e);if(-1!==n)return t.link[r][n];t.link[r].push(e)}else t.link[r]=[e]}for(const r in e)"@id"===r&&t.bnodesToClear.includes(e[r])?delete e["@id"]:e[r]=b(e[r],t)}return e}function y(e,t,r){o.isObject(e)?a.addValue(e,t,r,{propertyIsArray:!0}):e.push(r)}function x(e,t,r,n){if(!("@id"in r))return!1;const i=e.subjects[r["@id"]];return i&&v(e,i,t,n)}function w(e,t){const r=t["@value"],n=t["@type"],i=t["@language"],a=e["@value"]?o.isArray(e["@value"])?e["@value"]:[e["@value"]]:[],s=e["@type"]?o.isArray(e["@type"])?e["@type"]:[e["@type"]]:[],l=e["@language"]?o.isArray(e["@language"])?e["@language"]:[e["@language"]]:[];return 0===a.length&&0===s.length&&0===l.length||!(!a.includes(r)&&!o.isEmptyObject(a[0]))&&!!(!n&&0===s.length||s.includes(n)||n&&o.isEmptyObject(s[0]))&&!!(!i&&0===l.length||l.includes(i)||i&&o.isEmptyObject(l[0]))}e.exports=u,u.frameMergedOrDefault=(e,t,r)=>{const n={options:r,embedded:!1,graph:"@default",graphMap:{"@default":{}},subjectStack:[],link:{},bnodeMap:{}},i=new a.IdentifierIssuer("_:b");d(e,n.graphMap,"@default",i),r.merged&&(n.graphMap["@merged"]=c(n.graphMap),n.graph="@merged"),n.subjects=n.graphMap[n.graph];const o=[];return u.frame(n,Object.keys(n.subjects).sort(),t,o),r.pruneBlankNodeIdentifiers&&(r.bnodesToClear=Object.keys(n.bnodeMap).filter((e=>1===n.bnodeMap[e].length))),r.link={},b(o,r)},u.frame=(e,t,r,s,d=null)=>{g(r),r=r[0];const c=e.options,b={embed:f(r,c,"embed"),explicit:f(r,c,"explicit"),requireAll:f(r,c,"requireAll")};e.link.hasOwnProperty(e.graph)||(e.link[e.graph]={});const x=e.link[e.graph],_=function(e,t,r,n){const i={};for(const o of t){const t=e.graphMap[e.graph][o];v(e,t,r,n)&&(i[o]=t)}return i}(e,t,r,b),S=Object.keys(_).sort();for(const g of S){const v=_[g];if(null===d?e.uniqueEmbeds={[e.graph]:{}}:e.uniqueEmbeds[e.graph]=e.uniqueEmbeds[e.graph]||{},"@link"===b.embed&&g in x){y(s,d,x[g]);continue}const S={"@id":g};if(0===g.indexOf("_:")&&a.addValue(e.bnodeMap,g,S,{propertyIsArray:!0}),x[g]=S,("@first"===b.embed||"@last"===b.embed)&&e.is11)throw new l("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:r});if(e.embedded||!e.uniqueEmbeds[e.graph].hasOwnProperty(g))if(!e.embedded||"@never"!==b.embed&&!p(v,e.graph,e.subjectStack))if(!e.embedded||"@first"!=b.embed&&"@once"!=b.embed||!e.uniqueEmbeds[e.graph].hasOwnProperty(g)){if("@last"===b.embed&&g in e.uniqueEmbeds[e.graph]&&m(e,g),e.uniqueEmbeds[e.graph][g]={parent:s,property:d},e.subjectStack.push({subject:v,graph:e.graph}),g in e.graphMap){let t=!1,n=null;"@graph"in r?(n=r["@graph"][0],t=!("@merged"===g||"@default"===g),o.isObject(n)||(n={})):(t="@merged"!==e.graph,n={}),t&&u.frame({...e,graph:g,embedded:!1},Object.keys(e.graphMap[g]).sort(),[n],S,"@graph")}"@included"in r&&u.frame({...e,embedded:!1},t,r["@included"],S,"@included");for(const t of Object.keys(v).sort())if(n(t)){if(S[t]=a.clone(v[t]),"@type"===t)for(const t of v["@type"])0===t.indexOf("_:")&&a.addValue(e.bnodeMap,t,S,{propertyIsArray:!0})}else if(!b.explicit||t in r)for(const n of v[t]){const o=t in r?r[t]:h(b);if(i.isList(n)){const o=r[t]&&r[t][0]&&r[t][0]["@list"]?r[t][0]["@list"]:h(b),s={"@list":[]};y(S,t,s);const l=n["@list"];for(const t of l)i.isSubjectReference(t)?u.frame({...e,embedded:!0},[t["@id"]],o,s,"@list"):y(s,"@list",a.clone(t))}else i.isSubjectReference(n)?u.frame({...e,embedded:!0},[n["@id"]],o,S,t):w(o[0],n)&&y(S,t,a.clone(n))}for(const e of Object.keys(r).sort()){if("@type"===e){if(!o.isObject(r[e][0])||!("@default"in r[e][0]))continue}else if(n(e))continue;const t=r[e][0]||{};if(!f(t,c,"omitDefault")&&!(e in S)){let r="@null";"@default"in t&&(r=a.clone(t["@default"])),o.isArray(r)||(r=[r]),S[e]=[{"@preserve":r}]}}for(const t of Object.keys(r["@reverse"]||{}).sort()){const n=r["@reverse"][t];for(const r of Object.keys(e.subjects))a.getValues(e.subjects[r],t).some((e=>e["@id"]===g))&&(S["@reverse"]=S["@reverse"]||{},a.addValue(S["@reverse"],t,[],{propertyIsArray:!0}),u.frame({...e,embedded:!0},[r],n,S["@reverse"][t],d))}y(s,d,S),e.subjectStack.pop()}else y(s,d,S);else y(s,d,S)}},u.cleanupNull=(e,t)=>{if(o.isArray(e)){const r=e.map((e=>u.cleanupNull(e,t)));return r.filter((e=>e))}if("@null"===e)return null;if(o.isObject(e)){if("@id"in e){const r=e["@id"];if(t.link.hasOwnProperty(r)){const n=t.link[r].indexOf(e);if(-1!==n)return t.link[r][n];t.link[r].push(e)}else t.link[r]=[e]}for(const r in e)e[r]=u.cleanupNull(e[r],t)}return e}},3947:(e,t,r)=>{const n=r(2207),i=r(3978),o=r(7382),{REGEX_BCP47:a,addValue:s}=r(9263),{handleEvent:l}=r(2246),{RDF_LIST:d,RDF_FIRST:c,RDF_REST:u,RDF_NIL:h,RDF_TYPE:p,RDF_JSON_LITERAL:f,XSD_BOOLEAN:g,XSD_DOUBLE:v,XSD_INTEGER:m,XSD_STRING:b}=r(9378),y={};function x(e,t,r,i){if(e.termType.endsWith("Node"))return{"@id":e.value};const s={"@value":e.value};if(e.language)e.language.match(a)||i.eventHandler&&l({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e.language}},options:i}),s["@language"]=e.language;else{let d=e.datatype.value;if(d||(d=b),d===f){d="@json";try{s["@value"]=JSON.parse(s["@value"])}catch(e){throw new n("JSON literal could not be parsed.","jsonld.InvalidJsonLiteral",{code:"invalid JSON literal",value:s["@value"],cause:e})}}if(t){if(d===g)"true"===s["@value"]?s["@value"]=!0:"false"===s["@value"]&&(s["@value"]=!1);else if(o.isNumeric(s["@value"]))if(d===m){const e=parseInt(s["@value"],10);e.toFixed(0)===s["@value"]&&(s["@value"]=e)}else d===v&&(s["@value"]=parseFloat(s["@value"]));[g,m,v,b].includes(d)||(s["@type"]=d)}else if("i18n-datatype"===r&&d.startsWith("https://www.w3.org/ns/i18n#")){const[,e,t]=d.split(/[#_]/);e.length>0&&(s["@language"]=e,e.match(a)||i.eventHandler&&l({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:i})),s["@direction"]=t}else d!==b&&(s["@type"]=d)}return s}e.exports=y,y.fromRDF=async(e,t)=>{const{useRdfType:r=!1,useNativeTypes:a=!1,rdfDirection:l=null}=t,f={},g={"@default":f},v={};if(l){if("compound-literal"===l)throw new n("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:l});if("i18n-datatype"!==l)throw new n("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:l})}for(const n of e){const e="DefaultGraph"===n.graph.termType?"@default":n.graph.value;e in g||(g[e]={}),"@default"===e||e in f||(f[e]={"@id":e});const i=g[e],o=n.subject.value,d=n.predicate.value,c=n.object;o in i||(i[o]={"@id":o});const u=i[o],m=c.termType.endsWith("Node");if(m&&!(c.value in i)&&(i[c.value]={"@id":c.value}),d===p&&!r&&m){s(u,"@type",c.value,{propertyIsArray:!0});continue}const b=x(c,a,l,t);if(s(u,d,b,{propertyIsArray:!0}),m)if(c.value===h){const e=i[c.value];"usages"in e||(e.usages=[]),e.usages.push({node:u,property:d,value:b})}else c.value in v?v[c.value]=!1:v[c.value]={node:u,property:d,value:b}}for(const e in g){const t=g[e];if(!(h in t))continue;const r=t[h];if(r.usages){for(let e of r.usages){let r=e.node,n=e.property,a=e.value;const s=[],l=[];let h=Object.keys(r).length;for(;n===u&&o.isObject(v[r["@id"]])&&o.isArray(r[c])&&1===r[c].length&&o.isArray(r[u])&&1===r[u].length&&(3===h||4===h&&o.isArray(r["@type"])&&1===r["@type"].length&&r["@type"][0]===d)&&(s.push(r[c][0]),l.push(r["@id"]),e=v[r["@id"]],r=e.node,n=e.property,a=e.value,h=Object.keys(r).length,i.isBlankNode(r)););delete a["@id"],a["@list"]=s.reverse();for(const e of l)delete t[e]}delete r.usages}}const m=[],b=Object.keys(f).sort();for(const e of b){const t=f[e];if(e in g){const r=t["@graph"]=[],n=g[e],o=Object.keys(n).sort();for(const e of o){const t=n[e];i.isSubjectReference(t)||r.push(t)}}i.isSubjectReference(t)||m.push(t)}return m}},3978:(e,t,r)=>{const n=r(7382),i={};e.exports=i,i.isSubject=e=>!(!n.isObject(e)||"@value"in e||"@set"in e||"@list"in e)&&(Object.keys(e).length>1||!("@id"in e)),i.isSubjectReference=e=>n.isObject(e)&&1===Object.keys(e).length&&"@id"in e,i.isValue=e=>n.isObject(e)&&"@value"in e,i.isList=e=>n.isObject(e)&&"@list"in e,i.isGraph=e=>n.isObject(e)&&"@graph"in e&&1===Object.keys(e).filter((e=>"@id"!==e&&"@index"!==e)).length,i.isSimpleGraph=e=>i.isGraph(e)&&!("@id"in e),i.isBlankNode=e=>{if(n.isObject(e)){if("@id"in e){const t=e["@id"];return!n.isString(t)||0===t.indexOf("_:")}return 0===Object.keys(e).length||!("@value"in e||"@set"in e||"@list"in e)}return!1}},4841:(e,t,r)=>{const n=r(989),i=r(701),o=r(9263),a=r(7034),s=o.IdentifierIssuer,l=r(2207),d=r(9749),c=r(8229),{expand:u}=r(4019),{flatten:h}=r(5229),{fromRDF:p}=r(3947),{toRDF:f}=r(9180),{frameMergedOrDefault:g,cleanupNull:v}=r(7946),{isArray:m,isObject:b,isString:y}=r(7382),{isSubjectReference:x}=r(3978),{expandIri:w,getInitialContext:_,process:S,processingMode:E}=r(1972),{compact:I,compactIri:T}=r(1058),{createNodeMap:j,createMergedNodeMap:k,mergeNodeMaps:N}=r(9233),{logEventHandler:A,logWarningEventHandler:R,safeEventHandler:C,setDefaultEventHandler:O,setupEventHandler:L,strictEventHandler:$,unhandledEventHandler:D}=r(2246),P=function(e){const t={},P=new d({max:100});function M(t,{documentLoader:r=e.documentLoader,...n}){if(t&&"compactionMap"in t)throw new l('"compactionMap" not supported.',"jsonld.OptionsError");if(t&&"expansionMap"in t)throw new l('"expansionMap" not supported.',"jsonld.OptionsError");return Object.assign({},{documentLoader:r},n,t,{eventHandler:L({options:t})})}return e.compact=async function(t,r,n){if(arguments.length<2)throw new TypeError("Could not compact, too few arguments.");if(null===r)throw new l("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"});if(null===t)return null;let i;(n=M(n,{base:y(t)?t:"",compactArrays:!0,compactToRelative:!0,graph:!1,skipExpansion:!1,link:!1,issuer:new s("_:b"),contextResolver:new a({sharedCache:P})})).link&&(n.skipExpansion=!0),n.compactToRelative||delete n.base,i=n.skipExpansion?t:await e.expand(t,n);const d=await e.processContext(_(n),r,n);let c=await I({activeCtx:d,element:i,options:n});n.compactArrays&&!n.graph&&m(c)?1===c.length?c=c[0]:0===c.length&&(c={}):n.graph&&b(c)&&(c=[c]),b(r)&&"@context"in r&&(r=r["@context"]),r=o.clone(r),m(r)||(r=[r]);const u=r;r=[];for(let e=0;e<u.length;++e)(!b(u[e])||Object.keys(u[e]).length>0)&&r.push(u[e]);const h=r.length>0;if(1===r.length&&(r=r[0]),m(c)){const e=T({activeCtx:d,iri:"@graph",relativeTo:{vocab:!0}}),t=c;c={},h&&(c["@context"]=r),c[e]=t}else if(b(c)&&h){const e=c;c={"@context":r};for(const t in e)c[t]=e[t]}return c},e.expand=async function(t,r){if(arguments.length<1)throw new TypeError("Could not expand, too few arguments.");const n={},i=[];if("expandContext"in(r=M(r,{keepFreeFloatingNodes:!1,contextResolver:new a({sharedCache:P})}))){const e=o.clone(r.expandContext);b(e)&&"@context"in e?n.expandContext=e:n.expandContext={"@context":e},i.push(n.expandContext)}let s;if(y(t)){const o=await e.get(t,r);s=o.documentUrl,n.input=o.document,o.contextUrl&&(n.remoteContext={"@context":o.contextUrl},i.push(n.remoteContext))}else n.input=o.clone(t);"base"in r||(r.base=s||"");let l=_(r);for(const e of i)l=await S({activeCtx:l,localCtx:e,options:r});let d=await u({activeCtx:l,element:n.input,options:r});return b(d)&&"@graph"in d&&1===Object.keys(d).length?d=d["@graph"]:null===d&&(d=[]),m(d)||(d=[d]),d},e.flatten=async function(t,r,n){if(arguments.length<1)return new TypeError("Could not flatten, too few arguments.");r="function"==typeof r?null:r||null,n=M(n,{base:y(t)?t:"",contextResolver:new a({sharedCache:P})});const i=await e.expand(t,n),o=h(i);return null===r?o:(n.graph=!0,n.skipExpansion=!0,await e.compact(o,r,n))},e.frame=async function(t,r,n){if(arguments.length<2)throw new TypeError("Could not frame, too few arguments.");if(n=M(n,{base:y(t)?t:"",embed:"@once",explicit:!1,requireAll:!1,omitDefault:!1,bnodesToClear:[],contextResolver:new a({sharedCache:P})}),y(r)){const t=await e.get(r,n);if(r=t.document,t.contextUrl){let e=r["@context"];e?m(e)?e.push(t.contextUrl):e=[e,t.contextUrl]:e=t.contextUrl,r["@context"]=e}}const i=r&&r["@context"]||{},o=await e.processContext(_(n),i,n);n.hasOwnProperty("omitGraph")||(n.omitGraph=E(o,1.1)),n.hasOwnProperty("pruneBlankNodeIdentifiers")||(n.pruneBlankNodeIdentifiers=E(o,1.1));const s=await e.expand(t,n),l={...n};l.isFrame=!0,l.keepFreeFloatingNodes=!0;const d=await e.expand(r,l),c=Object.keys(r).map((e=>w(o,e,{vocab:!0})));l.merged=!c.includes("@graph"),l.is11=E(o,1.1);const u=g(s,d,l);l.graph=!n.omitGraph,l.skipExpansion=!0,l.link={},l.framing=!0;let h=await e.compact(u,i,l);return l.link={},h=v(h,l),h},e.link=async function(t,r,n){const i={};return r&&(i["@context"]=r),i["@embed"]="@link",e.frame(t,i,n)},e.normalize=e.canonize=async function(t,r){if(arguments.length<1)throw new TypeError("Could not canonize, too few arguments.");if("inputFormat"in(r=M(r,{base:y(t)?t:null,algorithm:"URDNA2015",skipExpansion:!1,safe:!0,contextResolver:new a({sharedCache:P})}))){if("application/n-quads"!==r.inputFormat&&"application/nquads"!==r.inputFormat)throw new l("Unknown canonicalization input format.","jsonld.CanonizeError");const e=c.parse(t);return n.canonize(e,r)}const i={...r};delete i.format,i.produceGeneralizedRdf=!1;const o=await e.toRDF(t,i);return n.canonize(o,r)},e.fromRDF=async function(e,r){if(arguments.length<1)throw new TypeError("Could not convert from RDF, too few arguments.");r=M(r,{format:y(e)?"application/n-quads":void 0});const{format:n}=r;let{rdfParser:i}=r;if(n){if(i=i||t[n],!i)throw new l("Unknown input format.","jsonld.UnknownFormat",{format:n})}else i=()=>e;const o=await i(e);return p(o,r)},e.toRDF=async function(t,r){if(arguments.length<1)throw new TypeError("Could not convert to RDF, too few arguments.");let n;n=(r=M(r,{base:y(t)?t:"",skipExpansion:!1,contextResolver:new a({sharedCache:P})})).skipExpansion?t:await e.expand(t,r);const i=f(n,r);if(r.format){if("application/n-quads"===r.format||"application/nquads"===r.format)return c.serialize(i);throw new l("Unknown output format.","jsonld.UnknownFormat",{format:r.format})}return i},e.createNodeMap=async function(t,r){if(arguments.length<1)throw new TypeError("Could not create node map, too few arguments.");r=M(r,{base:y(t)?t:"",contextResolver:new a({sharedCache:P})});const n=await e.expand(t,r);return k(n,r)},e.merge=async function(t,r,n){if(arguments.length<1)throw new TypeError("Could not merge, too few arguments.");if(!m(t))throw new TypeError('Could not merge, "docs" must be an array.');r="function"==typeof r?null:r||null,n=M(n,{contextResolver:new a({sharedCache:P})});const i=await Promise.all(t.map((t=>{const r={...n};return e.expand(t,r)})));let l=!0;"mergeNodes"in n&&(l=n.mergeNodes);const d=n.issuer||new s("_:b"),c={"@default":{}};for(let e=0;e<i.length;++e){const t=o.relabelBlankNodes(i[e],{issuer:new s("_:b"+e+"-")}),r=l||0===e?c:{"@default":{}};if(j(t,r,"@default",d),r!==c)for(const e in r){const t=r[e];if(!(e in c)){c[e]=t;continue}const n=c[e];for(const e in t)e in n||(n[e]=t[e])}}const u=N(c),h=[],p=Object.keys(u).sort();for(let e=0;e<p.length;++e){const t=u[p[e]];x(t)||h.push(t)}return null===r?h:(n.graph=!0,n.skipExpansion=!0,await e.compact(h,r,n))},Object.defineProperty(e,"documentLoader",{get:()=>e._documentLoader,set:t=>e._documentLoader=t}),e.documentLoader=async e=>{throw new l("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:e})},e.get=async function(t,r){let n;n="function"==typeof r.documentLoader?r.documentLoader:e.documentLoader;const i=await n(t);try{if(!i.document)throw new l("No remote document found at the given URL.","jsonld.NullRemoteDocument");y(i.document)&&(i.document=JSON.parse(i.document))}catch(e){throw new l("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:e,remoteDoc:i})}return i},e.processContext=async function(e,t,r){return r=M(r,{base:"",contextResolver:new a({sharedCache:P})}),null===t?_(r):(t=o.clone(t),b(t)&&"@context"in t||(t={"@context":t}),S({activeCtx:e,localCtx:t,options:r}))},e.getContextValue=r(1972).getContextValue,e.documentLoaders={},e.useDocumentLoader=function(t){if(!(t in e.documentLoaders))throw new l('Unknown document loader type: "'+t+'"',"jsonld.UnknownDocumentLoader",{type:t});e.documentLoader=e.documentLoaders[t].apply(e,Array.prototype.slice.call(arguments,1))},e.registerRDFParser=function(e,r){t[e]=r},e.unregisterRDFParser=function(e){delete t[e]},e.registerRDFParser("application/n-quads",c.parse),e.registerRDFParser("application/nquads",c.parse),e.url=r(470),e.logEventHandler=A,e.logWarningEventHandler=R,e.safeEventHandler=C,e.setDefaultEventHandler=O,e.strictEventHandler=$,e.unhandledEventHandler=D,e.util=o,Object.assign(e,o),e.promises=e,e.RequestQueue=r(3743),e.JsonLdProcessor=r(5445)(e),i.setupGlobals(e),i.setupDocumentLoaders(e),e},M=function(){return P((function(){return M()}))};P(M),e.exports=M},9233:(e,t,r)=>{const{isKeyword:n}=r(1972),i=r(3978),o=r(7382),a=r(9263),s=r(2207),l={};e.exports=l,l.createMergedNodeMap=(e,t)=>{const r=(t=t||{}).issuer||new a.IdentifierIssuer("_:b"),n={"@default":{}};return l.createNodeMap(e,n,"@default",r),l.mergeNodeMaps(n)},l.createNodeMap=(e,t,r,d,c,u)=>{if(o.isArray(e)){for(const n of e)l.createNodeMap(n,t,r,d,void 0,u);return}if(!o.isObject(e))return void(u&&u.push(e));if(i.isValue(e)){if("@type"in e){let t=e["@type"];0===t.indexOf("_:")&&(e["@type"]=t=d.getId(t))}return void(u&&u.push(e))}if(u&&i.isList(e)){const n=[];return l.createNodeMap(e["@list"],t,r,d,c,n),void u.push({"@list":n})}if("@type"in e){const t=e["@type"];for(const e of t)0===e.indexOf("_:")&&d.getId(e)}o.isUndefined(c)&&(c=i.isBlankNode(e)?d.getId(e["@id"]):e["@id"]),u&&u.push({"@id":c});const h=t[r],p=h[c]=h[c]||{};p["@id"]=c;const f=Object.keys(e).sort();for(let o of f){if("@id"===o)continue;if("@reverse"===o){const n={"@id":c},o=e["@reverse"];for(const e in o){const s=o[e];for(const o of s){let s=o["@id"];i.isBlankNode(o)&&(s=d.getId(s)),l.createNodeMap(o,t,r,d,s),a.addValue(h[s],e,n,{propertyIsArray:!0,allowDuplicate:!1})}}continue}if("@graph"===o){c in t||(t[c]={}),l.createNodeMap(e[o],t,c,d);continue}if("@included"===o){l.createNodeMap(e[o],t,r,d);continue}if("@type"!==o&&n(o)){if("@index"===o&&o in p&&(e[o]!==p[o]||e[o]["@id"]!==p[o]["@id"]))throw new s("Invalid JSON-LD syntax; conflicting @index property detected.","jsonld.SyntaxError",{code:"conflicting indexes",subject:p});p[o]=e[o];continue}const u=e[o];if(0===o.indexOf("_:")&&(o=d.getId(o)),0!==u.length)for(let e of u)if("@type"===o&&(e=0===e.indexOf("_:")?d.getId(e):e),i.isSubject(e)||i.isSubjectReference(e)){if("@id"in e&&!e["@id"])continue;const n=i.isBlankNode(e)?d.getId(e["@id"]):e["@id"];a.addValue(p,o,{"@id":n},{propertyIsArray:!0,allowDuplicate:!1}),l.createNodeMap(e,t,r,d,n)}else if(i.isValue(e))a.addValue(p,o,e,{propertyIsArray:!0,allowDuplicate:!1});else if(i.isList(e)){const n=[];l.createNodeMap(e["@list"],t,r,d,c,n),e={"@list":n},a.addValue(p,o,e,{propertyIsArray:!0,allowDuplicate:!1})}else l.createNodeMap(e,t,r,d,c),a.addValue(p,o,e,{propertyIsArray:!0,allowDuplicate:!1});else a.addValue(p,o,[],{propertyIsArray:!0})}},l.mergeNodeMapGraphs=e=>{const t={};for(const r of Object.keys(e).sort())for(const i of Object.keys(e[r]).sort()){const o=e[r][i];i in t||(t[i]={"@id":i});const s=t[i];for(const e of Object.keys(o).sort())if(n(e)&&"@type"!==e)s[e]=a.clone(o[e]);else for(const t of o[e])a.addValue(s,e,a.clone(t),{propertyIsArray:!0,allowDuplicate:!1})}return t},l.mergeNodeMaps=e=>{const t=e["@default"],r=Object.keys(e).sort();for(const n of r){if("@default"===n)continue;const r=e[n];let o=t[n];o?"@graph"in o||(o["@graph"]=[]):t[n]=o={"@id":n,"@graph":[]};const a=o["@graph"];for(const e of Object.keys(r).sort()){const t=r[e];i.isSubjectReference(t)||a.push(t)}}return t}},701:(e,t,r)=>{const n=r(6957),i={};e.exports=i,i.setupDocumentLoaders=function(e){"undefined"!=typeof XMLHttpRequest&&(e.documentLoaders.xhr=n,e.useDocumentLoader("xhr"))},i.setupGlobals=function(e){void 0===globalThis.JsonLdProcessor&&Object.defineProperty(globalThis,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:e.JsonLdProcessor})}},9180:(e,t,r)=>{const{createNodeMap:n}=r(9233),{isKeyword:i}=r(1972),o=r(3978),a=r(2341),s=r(2207),l=r(7382),d=r(9263),{handleEvent:c}=r(2246),{RDF_FIRST:u,RDF_REST:h,RDF_NIL:p,RDF_TYPE:f,RDF_JSON_LITERAL:g,RDF_LANGSTRING:v,XSD_BOOLEAN:m,XSD_DOUBLE:b,XSD_INTEGER:y,XSD_STRING:x}=r(9378),{isAbsolute:w}=r(470),_={};function S(e,t,r,n,o){const a=Object.keys(t).sort();for(const s of a){const a=t[s],l=Object.keys(a).sort();for(let t of l){const l=a[t];if("@type"===t)t=f;else if(i(t))continue;for(const i of l){const a={termType:s.startsWith("_:")?"BlankNode":"NamedNode",value:s};if(!w(s)){o.eventHandler&&c({event:{type:["JsonLdEvent"],code:"relative subject reference",level:"warning",message:"Relative subject reference found.",details:{subject:s}},options:o});continue}const l={termType:t.startsWith("_:")?"BlankNode":"NamedNode",value:t};if(!w(t)){o.eventHandler&&c({event:{type:["JsonLdEvent"],code:"relative predicate reference",level:"warning",message:"Relative predicate reference found.",details:{predicate:t}},options:o});continue}if("BlankNode"===l.termType&&!o.produceGeneralizedRdf){o.eventHandler&&c({event:{type:["JsonLdEvent"],code:"blank node predicate",level:"warning",message:"Dropping blank node predicate.",details:{property:n.getOldIds().find((e=>n.getId(e)===t))}},options:o});continue}const d=E(i,n,e,r,o.rdfDirection,o);d&&e.push({subject:a,predicate:l,object:d,graph:r})}}}}function E(e,t,r,n,i,d){const f={};if(o.isValue(e)){f.termType="Literal",f.value=void 0,f.datatype={termType:"NamedNode"};let t=e["@value"];const r=e["@type"]||null;if("@json"===r)f.value=a(t),f.datatype.value=g;else if(l.isBoolean(t))f.value=t.toString(),f.datatype.value=r||m;else if(l.isDouble(t)||r===b)l.isDouble(t)||(t=parseFloat(t)),f.value=t.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),f.datatype.value=r||b;else if(l.isNumber(t))f.value=t.toFixed(0),f.datatype.value=r||y;else if("@direction"in e&&"i18n-datatype"===i){const r=`https://www.w3.org/ns/i18n#${(e["@language"]||"").toLowerCase()}_${e["@direction"]}`;f.datatype.value=r,f.value=t}else{if("@direction"in e&&"compound-literal"===i)throw new s("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:i});if("@direction"in e&&i)throw new s("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:i});"@language"in e?("@direction"in e&&!i&&d.eventHandler&&c({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:f.value}},options:d}),f.value=t,f.datatype.value=r||v,f.language=e["@language"]):("@direction"in e&&!i&&d.eventHandler&&c({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:f.value}},options:d}),f.value=t,f.datatype.value=r||x)}}else if(o.isList(e)){const o=function(e,t,r,n,i,o){const a={termType:"NamedNode",value:u},s={termType:"NamedNode",value:h},l={termType:"NamedNode",value:p},d=e.pop(),c=d?{termType:"BlankNode",value:t.getId()}:l;let f=c;for(const l of e){const e=E(l,t,r,n,i,o),d={termType:"BlankNode",value:t.getId()};r.push({subject:f,predicate:a,object:e,graph:n}),r.push({subject:f,predicate:s,object:d,graph:n}),f=d}if(d){const e=E(d,t,r,n,i,o);r.push({subject:f,predicate:a,object:e,graph:n}),r.push({subject:f,predicate:s,object:l,graph:n})}return c}(e["@list"],t,r,n,i,d);f.termType=o.termType,f.value=o.value}else{const t=l.isObject(e)?e["@id"]:e;f.termType=t.startsWith("_:")?"BlankNode":"NamedNode",f.value=t}return"NamedNode"!==f.termType||w(f.value)?f:(d.eventHandler&&c({event:{type:["JsonLdEvent"],code:"relative object reference",level:"warning",message:"Relative object reference found.",details:{object:f.value}},options:d}),null)}e.exports=_,_.toRDF=(e,t)=>{const r=new d.IdentifierIssuer("_:b"),i={"@default":{}};n(e,i,"@default",r);const o=[],a=Object.keys(i).sort();for(const e of a){let n;if("@default"===e)n={termType:"DefaultGraph",value:""};else{if(!w(e)){t.eventHandler&&c({event:{type:["JsonLdEvent"],code:"relative graph reference",level:"warning",message:"Relative graph reference found.",details:{graph:e}},options:t});continue}n=e.startsWith("_:")?{termType:"BlankNode"}:{termType:"NamedNode"},n.value=e}S(o,i[e],n,r,t)}return o}},7382:e=>{const t={};e.exports=t,t.isArray=Array.isArray,t.isBoolean=e=>"boolean"==typeof e||"[object Boolean]"===Object.prototype.toString.call(e),t.isDouble=e=>t.isNumber(e)&&(-1!==String(e).indexOf(".")||Math.abs(e)>=1e21),t.isEmptyObject=e=>t.isObject(e)&&0===Object.keys(e).length,t.isNumber=e=>"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e),t.isNumeric=e=>!isNaN(parseFloat(e))&&isFinite(e),t.isObject=e=>"[object Object]"===Object.prototype.toString.call(e),t.isString=e=>"string"==typeof e||"[object String]"===Object.prototype.toString.call(e),t.isUndefined=e=>void 0===e},470:(e,t,r)=>{const n=r(7382),i={};e.exports=i,i.parsers={simple:{keys:["href","scheme","authority","path","query","fragment"],regex:/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/},full:{keys:["href","protocol","scheme","authority","auth","user","password","hostname","port","path","directory","file","query","fragment"],regex:/^(([a-zA-Z][a-zA-Z0-9+-.]*):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(?:(((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/}},i.parse=(e,t)=>{const r={},n=i.parsers[t||"full"],o=n.regex.exec(e);let a=n.keys.length;for(;a--;)r[n.keys[a]]=void 0===o[a]?null:o[a];return("https"===r.scheme&&"443"===r.port||"http"===r.scheme&&"80"===r.port)&&(r.href=r.href.replace(":"+r.port,""),r.authority=r.authority.replace(":"+r.port,""),r.port=null),r.normalizedPath=i.removeDotSegments(r.path),r},i.prependBase=(e,t)=>{if(null===e)return t;if(i.isAbsolute(t))return t;e&&!n.isString(e)||(e=i.parse(e||""));const r=i.parse(t),o={protocol:e.protocol||""};if(null!==r.authority)o.authority=r.authority,o.path=r.path,o.query=r.query;else if(o.authority=e.authority,""===r.path)o.path=e.path,null!==r.query?o.query=r.query:o.query=e.query;else{if(0===r.path.indexOf("/"))o.path=r.path;else{let t=e.path;t=t.substr(0,t.lastIndexOf("/")+1),(t.length>0||e.authority)&&"/"!==t.substr(-1)&&(t+="/"),t+=r.path,o.path=t}o.query=r.query}""!==r.path&&(o.path=i.removeDotSegments(o.path));let a=o.protocol;return null!==o.authority&&(a+="//"+o.authority),a+=o.path,null!==o.query&&(a+="?"+o.query),null!==r.fragment&&(a+="#"+r.fragment),""===a&&(a="./"),a},i.removeBase=(e,t)=>{if(null===e)return t;e&&!n.isString(e)||(e=i.parse(e||""));let r="";if(""!==e.href?r+=(e.protocol||"")+"//"+(e.authority||""):t.indexOf("//")&&(r+="//"),0!==t.indexOf(r))return t;const o=i.parse(t.substr(r.length)),a=e.normalizedPath.split("/"),s=o.normalizedPath.split("/"),l=o.fragment||o.query?0:1;for(;a.length>0&&s.length>l&&a[0]===s[0];)a.shift(),s.shift();let d="";if(a.length>0){a.pop();for(let e=0;e<a.length;++e)d+="../"}return d+=s.join("/"),null!==o.query&&(d+="?"+o.query),null!==o.fragment&&(d+="#"+o.fragment),""===d&&(d="./"),d},i.removeDotSegments=e=>{if(0===e.length)return"";const t=e.split("/"),r=[];for(;t.length>0;){const e=t.shift(),n=0===t.length;"."!==e?".."!==e?r.push(e):(r.pop(),n&&r.push("")):n&&r.push("")}return"/"===e[0]&&r.length>0&&""!==r[0]&&r.unshift(""),1===r.length&&""===r[0]?"/":r.join("/")};const o=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;i.isAbsolute=e=>n.isString(e)&&o.test(e),i.isRelative=e=>n.isString(e)},9263:(e,t,r)=>{const n=r(3978),i=r(7382),o=r(989).IdentifierIssuer,a=r(2207),s=/(?:<[^>]*?>|"[^"]*?"|[^,])+/g,l=/\s*<([^>]*?)>\s*(?:;\s*(.*))?/,d=/(.*?)=(?:(?:"([^"]*?)")|([^"]*?))\s*(?:(?:;\s*)|$)/g,c="application/ld+json, application/json",u={};function h(e,t){if(i.isArray(t))for(let r=0;r<t.length;++r)t[r]=h(e,t[r]);else if(n.isList(t))t["@list"]=h(e,t["@list"]);else if(i.isObject(t)){n.isBlankNode(t)&&(t["@id"]=e.getId(t["@id"]));const r=Object.keys(t).sort();for(let n=0;n<r.length;++n){const i=r[n];"@id"!==i&&(t[i]=h(e,t[i]))}}return t}e.exports=u,u.IdentifierIssuer=o,u.REGEX_BCP47=/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/,u.REGEX_KEYWORD=/^@[a-zA-Z]+$/,u.clone=function(e){if(e&&"object"==typeof e){let t;if(i.isArray(e)){t=[];for(let r=0;r<e.length;++r)t[r]=u.clone(e[r])}else if(e instanceof Map){t=new Map;for(const[r,n]of e)t.set(r,u.clone(n))}else if(e instanceof Set){t=new Set;for(const r of e)t.add(u.clone(r))}else if(i.isObject(e)){t={};for(const r in e)t[r]=u.clone(e[r])}else t=e.toString();return t}return e},u.asArray=function(e){return Array.isArray(e)?e:[e]},u.buildHeaders=(e={})=>{const t=Object.keys(e).some((e=>"accept"===e.toLowerCase()));if(t)throw new RangeError('Accept header may not be specified; only "'+c+'" is supported.');return Object.assign({Accept:c},e)},u.parseLinkHeader=e=>{const t={},r=e.match(s);for(let e=0;e<r.length;++e){let n=r[e].match(l);if(!n)continue;const i={target:n[1]},o=n[2];for(;n=d.exec(o);)i[n[1]]=void 0===n[2]?n[3]:n[2];const a=i.rel||"";Array.isArray(t[a])?t[a].push(i):t.hasOwnProperty(a)?t[a]=[t[a],i]:t[a]=i}return t},u.validateTypeValue=(e,t)=>{if(!(i.isString(e)||i.isArray(e)&&e.every((e=>i.isString(e))))){if(t&&i.isObject(e))switch(Object.keys(e).length){case 0:return;case 1:if("@default"in e&&u.asArray(e["@default"]).every((e=>i.isString(e))))return}throw new a('Invalid JSON-LD syntax; "@type" value must a string, an array of strings, an empty object, or a default object.',"jsonld.SyntaxError",{code:"invalid type value",value:e})}},u.hasProperty=(e,t)=>{if(e.hasOwnProperty(t)){const r=e[t];return!i.isArray(r)||r.length>0}return!1},u.hasValue=(e,t,r)=>{if(u.hasProperty(e,t)){let o=e[t];const a=n.isList(o);if(i.isArray(o)||a){a&&(o=o["@list"]);for(let e=0;e<o.length;++e)if(u.compareValues(r,o[e]))return!0}else if(!i.isArray(r))return u.compareValues(r,o)}return!1},u.addValue=(e,t,r,n)=>{if("propertyIsArray"in(n=n||{})||(n.propertyIsArray=!1),"valueIsArray"in n||(n.valueIsArray=!1),"allowDuplicate"in n||(n.allowDuplicate=!0),"prependValue"in n||(n.prependValue=!1),n.valueIsArray)e[t]=r;else if(i.isArray(r)){0===r.length&&n.propertyIsArray&&!e.hasOwnProperty(t)&&(e[t]=[]),n.prependValue&&(r=r.concat(e[t]),e[t]=[]);for(let i=0;i<r.length;++i)u.addValue(e,t,r[i],n)}else if(e.hasOwnProperty(t)){const o=!n.allowDuplicate&&u.hasValue(e,t,r);i.isArray(e[t])||o&&!n.propertyIsArray||(e[t]=[e[t]]),o||(n.prependValue?e[t].unshift(r):e[t].push(r))}else e[t]=n.propertyIsArray?[r]:r},u.getValues=(e,t)=>[].concat(e[t]||[]),u.removeProperty=(e,t)=>{delete e[t]},u.removeValue=(e,t,r,n)=>{"propertyIsArray"in(n=n||{})||(n.propertyIsArray=!1);const i=u.getValues(e,t).filter((e=>!u.compareValues(e,r)));0===i.length?u.removeProperty(e,t):1!==i.length||n.propertyIsArray?e[t]=i:e[t]=i[0]},u.relabelBlankNodes=(e,t)=>h((t=t||{}).issuer||new o("_:b"),e),u.compareValues=(e,t)=>e===t||!(!n.isValue(e)||!n.isValue(t)||e["@value"]!==t["@value"]||e["@type"]!==t["@type"]||e["@language"]!==t["@language"]||e["@index"]!==t["@index"])||!!(i.isObject(e)&&"@id"in e&&i.isObject(t)&&"@id"in t)&&e["@id"]===t["@id"],u.compareShortestLeast=(e,t)=>e.length<t.length?-1:t.length<e.length?1:e===t?0:e<t?-1:1},1873:(e,t,r)=>{var n=r(9325).Symbol;e.exports=n},2552:(e,t,r)=>{var n=r(1873),i=r(659),o=r(9350),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},4128:(e,t,r)=>{var n=r(1800),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},4840:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},659:(e,t,r)=>{var n=r(1873),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var i=a.call(e);return n&&(t?e[s]=r:delete e[s]),i}},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9325:(e,t,r)=>{var n=r(4840),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},1800:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},2177:(e,t,r)=>{var n=r(1489);e.exports=function(e,t){var r;if("function"!=typeof t)throw new TypeError("Expected a function");return e=n(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},4394:(e,t,r)=>{var n=r(2552),i=r(346);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},8059:(e,t,r)=>{var n=r(2177);e.exports=function(e){return n(2,e)}},7400:(e,t,r)=>{var n=r(9374),i=1/0;e.exports=function(e){return e?(e=n(e))===i||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},1489:(e,t,r)=>{var n=r(7400);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},9374:(e,t,r)=>{var n=r(4128),i=r(3805),o=r(4394),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=s.test(e);return r||l.test(e)?d(e.slice(2),r?2:8):a.test(e)?NaN:+e}},9749:(e,t,r)=>{const n=r(8799),i=Symbol("max"),o=Symbol("length"),a=Symbol("lengthCalculator"),s=Symbol("allowStale"),l=Symbol("maxAge"),d=Symbol("dispose"),c=Symbol("noDisposeOnSet"),u=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),f=()=>1,g=(e,t,r)=>{const n=e[h].get(t);if(n){const t=n.value;if(v(e,t)){if(b(e,n),!e[s])return}else r&&(e[p]&&(n.value.now=Date.now()),e[u].unshiftNode(n));return t.value}},v=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[l]&&r>e[l]},m=e=>{if(e[o]>e[i])for(let t=e[u].tail;e[o]>e[i]&&null!==t;){const r=t.prev;b(e,t),t=r}},b=(e,t)=>{if(t){const r=t.value;e[d]&&e[d](r.key,r.value),e[o]-=r.length,e[h].delete(r.key),e[u].removeNode(t)}};class y{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const x=(e,t,r,n)=>{let i=r.value;v(e,i)&&(b(e,r),e[s]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||f;if(this[a]="function"!=typeof t?f:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[d]=e.dispose,this[c]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,m(this)}get max(){return this[i]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,m(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[a]&&(this[a]=e,this[o]=0,this[u].forEach((e=>{e.length=this[a](e.value,e.key),this[o]+=e.length}))),m(this)}get lengthCalculator(){return this[a]}get length(){return this[o]}get itemCount(){return this[u].length}rforEach(e,t){t=t||this;for(let r=this[u].tail;null!==r;){const n=r.prev;x(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[u].head;null!==r;){const n=r.next;x(this,e,r,t),r=n}}keys(){return this[u].toArray().map((e=>e.key))}values(){return this[u].toArray().map((e=>e.value))}reset(){this[d]&&this[u]&&this[u].length&&this[u].forEach((e=>this[d](e.key,e.value))),this[h]=new Map,this[u]=new n,this[o]=0}dump(){return this[u].map((e=>!v(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[u]}set(e,t,r){if((r=r||this[l])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,s=this[a](t,e);if(this[h].has(e)){if(s>this[i])return b(this,this[h].get(e)),!1;const a=this[h].get(e).value;return this[d]&&(this[c]||this[d](e,a.value)),a.now=n,a.maxAge=r,a.value=t,this[o]+=s-a.length,a.length=s,this.get(e),m(this),!0}const p=new y(e,t,s,n,r);return p.length>this[i]?(this[d]&&this[d](e,t),!1):(this[o]+=p.length,this[u].unshift(p),this[h].set(e,this[u].head),m(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!v(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[u].tail;return e?(b(this,e),e.value):null}del(e){b(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[h].forEach(((e,t)=>g(this,t,!1)))}}},5606:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var s,l=[],d=!1,c=-1;function u(){d&&s&&(d=!1,s.length?l=s.concat(l):c=-1,l.length&&h())}function h(){if(!d){var e=a(u);d=!0;for(var t=l.length;t;){for(s=l,l=[];++c<t;)s&&s[c].run();c=-1,t=l.length}s=null,d=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function f(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new p(e,t)),1!==l.length||d||a(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=f,n.addListener=f,n.once=f,n.off=f,n.removeListener=f,n.removeAllListeners=f,n.emit=f,n.prependListener=f,n.prependOnceListener=f,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},9596:(e,t,r)=>{let n;e.exports="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:r.g):e=>(n||(n=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)))},989:(e,t,r)=>{e.exports=r(4005)},2985:e=>{e.exports=class e{constructor(e,t=new Map,r=0){this.prefix=e,this._existing=t,this.counter=r}clone(){const{prefix:t,_existing:r,counter:n}=this;return new e(t,new Map(r),n)}getId(e){const t=e&&this._existing.get(e);if(t)return t;const r=this.prefix+this.counter;return this.counter++,e&&this._existing.set(e,r),r}hasId(e){return this._existing.has(e)}getOldIds(){return[...this._existing.keys()]}}},3751:(e,t,r)=>{r(2791);const n=self.crypto||self.msCrypto;e.exports=class{constructor(e){if(!n||!n.subtle)throw new Error("crypto.subtle not found.");if("sha256"===e)this.algorithm={name:"SHA-256"};else{if("sha1"!==e)throw new Error(`Unsupported algorithm "${e}".`);this.algorithm={name:"SHA-1"}}this._content=""}update(e){this._content+=e}async digest(){const e=(new TextEncoder).encode(this._content),t=new Uint8Array(await n.subtle.digest(this.algorithm,e));let r="";for(let e=0;e<t.length;++e)r+=t[e].toString(16).padStart(2,"0");return r}}},1227:e=>{const t="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",r="http://www.w3.org/2001/XMLSchema#string",n="NamedNode",i="BlankNode",o="Literal",a="DefaultGraph",s={};(()=>{const e="(?:<([^:]+:[^>]*)>)",t="A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_",r=t+"0-9-·̀-ͯ‿-⁀",n="(_:(?:["+t+"0-9])(?:(?:["+r+".])*(?:["+r+"]))?)",i="[ \\t]+",o="[ \\t]*",a="(?:"+e+"|"+n+")"+i,l=e+i,d="(?:"+e+"|"+n+'|(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"(?:(?:\\^\\^'+e+")|(?:@([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)))?))"+o,c="(?:\\.|(?:(?:"+e+"|"+n+")"+o+"\\.))";s.eoln=/(?:\r\n)|(?:\n)|(?:\r)/g,s.empty=new RegExp("^"+o+"$"),s.quad=new RegExp("^"+o+a+l+d+c+o+"$")})(),e.exports=class e{static parse(e){const l=[],d={},u=e.split(s.eoln);let h=0;for(const e of u){if(h++,s.empty.test(e))continue;const u=e.match(s.quad);if(null===u)throw new Error("N-Quads parse error on line "+h+".");const g={subject:null,predicate:null,object:null,graph:null};if(void 0!==u[1]?g.subject={termType:n,value:u[1]}:g.subject={termType:i,value:u[2]},g.predicate={termType:n,value:u[3]},void 0!==u[4]?g.object={termType:n,value:u[4]}:void 0!==u[5]?g.object={termType:i,value:u[5]}:(g.object={termType:o,value:void 0,datatype:{termType:n}},void 0!==u[7]?g.object.datatype.value=u[7]:void 0!==u[8]?(g.object.datatype.value=t,g.object.language=u[8]):g.object.datatype.value=r,g.object.value=c(u[6])),void 0!==u[9]?g.graph={termType:n,value:u[9]}:void 0!==u[10]?g.graph={termType:i,value:u[10]}:g.graph={termType:a,value:""},g.graph.value in d){let e=!0;const t=d[g.graph.value];for(const r of t)if(f=g,(p=r).subject.termType===f.subject.termType&&p.object.termType===f.object.termType&&p.subject.value===f.subject.value&&p.predicate.value===f.predicate.value&&p.object.value===f.object.value&&(p.object.termType!==o||p.object.datatype.termType===f.object.datatype.termType&&p.object.language===f.object.language&&p.object.datatype.value===f.object.datatype.value)){e=!1;break}e&&(t.push(g),l.push(g))}else d[g.graph.value]=[g],l.push(g)}var p,f;return l}static serialize(t){Array.isArray(t)||(t=e.legacyDatasetToQuads(t));const r=[];for(const n of t)r.push(e.serializeQuad(n));return r.sort().join("")}static serializeQuadComponents(e,o,a,s){let d="";return e.termType===n?d+=`<${e.value}>`:d+=`${e.value}`,d+=` <${o.value}> `,a.termType===n?d+=`<${a.value}>`:a.termType===i?d+=a.value:(d+=`"${function(e){return e.replace(l,(function(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r"}}))}(a.value)}"`,a.datatype.value===t?a.language&&(d+=`@${a.language}`):a.datatype.value!==r&&(d+=`^^<${a.datatype.value}>`)),s.termType===n?d+=` <${s.value}>`:s.termType===i&&(d+=` ${s.value}`),d+=" .\n",d}static serializeQuad(t){return e.serializeQuadComponents(t.subject,t.predicate,t.object,t.graph)}static legacyDatasetToQuads(e){const s=[],l={"blank node":i,IRI:n,literal:o};for(const d in e)e[d].forEach((e=>{const c={};for(const i in e){const a=e[i],s={termType:l[a.type],value:a.value};s.termType===o&&(s.datatype={termType:n},"datatype"in a&&(s.datatype.value=a.datatype),"language"in a?("datatype"in a||(s.datatype.value=t),s.language=a.language):"datatype"in a||(s.datatype.value=r)),c[i]=s}c.graph="@default"===d?{termType:a,value:""}:{termType:d.startsWith("_:")?i:n,value:d},s.push(c)}));return s}};const l=/["\\\n\r]/g,d=/(?:\\([tbnrf"'\\]))|(?:\\u([0-9A-Fa-f]{4}))|(?:\\U([0-9A-Fa-f]{8}))/g;function c(e){return e.replace(d,(function(e,t,r,n){if(t)switch(t){case"t":return"\t";case"b":return"\b";case"n":return"\n";case"r":return"\r";case"f":return"\f";case'"':return'"';case"'":return"'";case"\\":return"\\"}if(r)return String.fromCharCode(parseInt(r,16));if(n)throw new Error("Unsupported U escape")}))}},9925:e=>{e.exports=class{constructor(e){this.current=e.sort(),this.done=!1,this.dir=new Map;for(let t=0;t<e.length;++t)this.dir.set(e[t],!0)}hasNext(){return!this.done}next(){const{current:e,dir:t}=this,r=e.slice();let n=null,i=0;const o=e.length;for(let r=0;r<o;++r){const a=e[r],s=t.get(a);(null===n||a>n)&&(s&&r>0&&a>e[r-1]||!s&&r<o-1&&a>e[r+1])&&(n=a,i=r)}if(null===n)this.done=!0;else{const r=t.get(n)?i-1:i+1;e[i]=e[r],e[r]=n;for(const r of e)r>n&&t.set(r,!t.get(r))}return r}}},3513:(e,t,r)=>{const n=r(2985),i=r(3751),o=r(9925),a=r(1227);function s(e,t){return e.hash<t.hash?-1:e.hash>t.hash?1:0}e.exports=class{constructor({createMessageDigest:e=()=>new i("sha256"),canonicalIdMap:t=new Map,maxDeepIterations:r=1/0}={}){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new n("_:c14n",t),this.createMessageDigest=e,this.maxDeepIterations=r,this.quads=null,this.deepIterations=null}async main(e){this.deepIterations=new Map,this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,r=[...this.blankNodeInfo.keys()];let i=0;for(const e of r)++i%100==0&&await this._yield(),await this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const o=[...t.keys()].sort(),l=[];for(const e of o){const r=t.get(e);if(r.length>1){l.push(r);continue}const n=r[0];this.canonicalIssuer.getId(n)}for(const e of l){const t=[];for(const r of e){if(this.canonicalIssuer.hasId(r))continue;const e=new n("_:b");e.getId(r);const i=await this.hashNDegreeQuads(r,e);t.push(i)}t.sort(s);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const d=[];for(const e of this.quads){const t=a.serializeQuadComponents(this._componentWithCanonicalId(e.subject),e.predicate,this._componentWithCanonicalId(e.object),this._componentWithCanonicalId(e.graph));d.push(t)}return d.sort(),d.join("")}async hashFirstDegreeQuads(e){const t=[],r=this.blankNodeInfo.get(e),n=r.quads;for(const r of n){const n={subject:null,predicate:r.predicate,object:null,graph:null};n.subject=this.modifyFirstDegreeComponent(e,r.subject,"subject"),n.object=this.modifyFirstDegreeComponent(e,r.object,"object"),n.graph=this.modifyFirstDegreeComponent(e,r.graph,"graph"),t.push(a.serializeQuad(n))}t.sort();const i=this.createMessageDigest();for(const e of t)i.update(e);return r.hash=await i.digest(),r.hash}async hashRelatedBlankNode(e,t,r,n){let i;i=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):r.hasId(e)?r.getId(e):this.blankNodeInfo.get(e).hash;const o=this.createMessageDigest();return o.update(n),"g"!==n&&o.update(this.getRelatedPredicate(t)),o.update(i),o.digest()}async hashNDegreeQuads(e,t){const r=this.deepIterations.get(e)||0;if(r>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(e,r+1);const n=this.createMessageDigest(),i=await this.createHashToRelated(e,t),a=[...i.keys()].sort();for(const e of a){n.update(e);let r,a="";const s=new o(i.get(e));let l=0;for(;s.hasNext();){const e=s.next();++l%3==0&&await this._yield();let n=t.clone(),i="";const o=[];let d=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?i+=this.canonicalIssuer.getId(t):(n.hasId(t)||o.push(t),i+=n.getId(t)),0!==a.length&&i>a){d=!0;break}if(!d){for(const e of o){const t=await this.hashNDegreeQuads(e,n);if(i+=n.getId(e),i+=`<${t.hash}>`,n=t.issuer,0!==a.length&&i>a){d=!0;break}}d||(0===a.length||i<a)&&(a=i,r=n)}}n.update(a),t=r}return{hash:await n.digest(),issuer:t}}modifyFirstDegreeComponent(e,t){return"BlankNode"!==t.termType?t:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return`<${e.predicate.value}>`}async createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;let i=0;for(const o of n)++i%100==0&&await this._yield(),await Promise.all([this._addRelatedBlankNodeHash({quad:o,component:o.subject,position:"s",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:o,component:o.object,position:"o",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:o,component:o.graph,position:"g",id:e,issuer:t,hashToRelated:r})]);return r}async _hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const r=await this.hashFirstDegreeQuads(e),n=t.get(r);n?n.push(e):t.set(r,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const r=t.value,n=this.blankNodeInfo.get(r);n?n.quads.add(e):this.blankNodeInfo.set(r,{quads:new Set([e]),hash:null})}async _addRelatedBlankNodeHash({quad:e,component:t,position:r,id:n,issuer:i,hashToRelated:o}){if("BlankNode"!==t.termType||t.value===n)return;const a=t.value,s=await this.hashRelatedBlankNode(a,e,i,r),l=o.get(s);l?l.push(a):o.set(s,[a])}_componentWithCanonicalId(e){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}async _yield(){return new Promise((e=>setImmediate(e)))}}},2438:(e,t,r)=>{const n=r(2985),i=r(3751),o=r(9925),a=r(1227);function s(e,t){return e.hash<t.hash?-1:e.hash>t.hash?1:0}e.exports=class{constructor({createMessageDigest:e=()=>new i("sha256"),canonicalIdMap:t=new Map,maxDeepIterations:r=1/0}={}){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new n("_:c14n",t),this.createMessageDigest=e,this.maxDeepIterations=r,this.quads=null,this.deepIterations=null}main(e){this.deepIterations=new Map,this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,r=[...this.blankNodeInfo.keys()];for(const e of r)this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const i=[...t.keys()].sort(),o=[];for(const e of i){const r=t.get(e);if(r.length>1){o.push(r);continue}const n=r[0];this.canonicalIssuer.getId(n)}for(const e of o){const t=[];for(const r of e){if(this.canonicalIssuer.hasId(r))continue;const e=new n("_:b");e.getId(r);const i=this.hashNDegreeQuads(r,e);t.push(i)}t.sort(s);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const l=[];for(const e of this.quads){const t=a.serializeQuadComponents(this._componentWithCanonicalId({component:e.subject}),e.predicate,this._componentWithCanonicalId({component:e.object}),this._componentWithCanonicalId({component:e.graph}));l.push(t)}return l.sort(),l.join("")}hashFirstDegreeQuads(e){const t=[],r=this.blankNodeInfo.get(e),n=r.quads;for(const r of n){const n={subject:null,predicate:r.predicate,object:null,graph:null};n.subject=this.modifyFirstDegreeComponent(e,r.subject,"subject"),n.object=this.modifyFirstDegreeComponent(e,r.object,"object"),n.graph=this.modifyFirstDegreeComponent(e,r.graph,"graph"),t.push(a.serializeQuad(n))}t.sort();const i=this.createMessageDigest();for(const e of t)i.update(e);return r.hash=i.digest(),r.hash}hashRelatedBlankNode(e,t,r,n){let i;i=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):r.hasId(e)?r.getId(e):this.blankNodeInfo.get(e).hash;const o=this.createMessageDigest();return o.update(n),"g"!==n&&o.update(this.getRelatedPredicate(t)),o.update(i),o.digest()}hashNDegreeQuads(e,t){const r=this.deepIterations.get(e)||0;if(r>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(e,r+1);const n=this.createMessageDigest(),i=this.createHashToRelated(e,t),a=[...i.keys()].sort();for(const e of a){n.update(e);let r,a="";const s=new o(i.get(e));for(;s.hasNext();){const e=s.next();let n=t.clone(),i="";const o=[];let l=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?i+=this.canonicalIssuer.getId(t):(n.hasId(t)||o.push(t),i+=n.getId(t)),0!==a.length&&i>a){l=!0;break}if(!l){for(const e of o){const t=this.hashNDegreeQuads(e,n);if(i+=n.getId(e),i+=`<${t.hash}>`,n=t.issuer,0!==a.length&&i>a){l=!0;break}}l||(0===a.length||i<a)&&(a=i,r=n)}}n.update(a),t=r}return{hash:n.digest(),issuer:t}}modifyFirstDegreeComponent(e,t){return"BlankNode"!==t.termType?t:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return`<${e.predicate.value}>`}createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;for(const i of n)this._addRelatedBlankNodeHash({quad:i,component:i.subject,position:"s",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:i,component:i.object,position:"o",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:i,component:i.graph,position:"g",id:e,issuer:t,hashToRelated:r});return r}_hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const r=this.hashFirstDegreeQuads(e),n=t.get(r);n?n.push(e):t.set(r,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const r=t.value,n=this.blankNodeInfo.get(r);n?n.quads.add(e):this.blankNodeInfo.set(r,{quads:new Set([e]),hash:null})}_addRelatedBlankNodeHash({quad:e,component:t,position:r,id:n,issuer:i,hashToRelated:o}){if("BlankNode"!==t.termType||t.value===n)return;const a=t.value,s=this.hashRelatedBlankNode(a,e,i,r),l=o.get(s);l?l.push(a):o.set(s,[a])}_componentWithCanonicalId({component:e}){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}}},3845:(e,t,r)=>{const n=r(3751),i=r(3513);e.exports=class extends i{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new n("sha1")}modifyFirstDegreeComponent(e,t,r){return"BlankNode"!==t.termType?t:"graph"===r?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}async createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;let i=0;for(const o of n){let n,a;if("BlankNode"===o.subject.termType&&o.subject.value!==e)a=o.subject.value,n="p";else{if("BlankNode"!==o.object.termType||o.object.value===e)continue;a=o.object.value,n="r"}++i%100==0&&await this._yield();const s=await this.hashRelatedBlankNode(a,o,t,n),l=r.get(s);l?l.push(a):r.set(s,[a])}return r}}},378:(e,t,r)=>{const n=r(3751),i=r(2438);e.exports=class extends i{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new n("sha1")}modifyFirstDegreeComponent(e,t,r){return"BlankNode"!==t.termType?t:"graph"===r?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;for(const i of n){let n,o;if("BlankNode"===i.subject.termType&&i.subject.value!==e)o=i.subject.value,n="p";else{if("BlankNode"!==i.object.termType||i.object.value===e)continue;o=i.object.value,n="r"}const a=this.hashRelatedBlankNode(o,i,t,n),s=r.get(a);s?s.push(o):r.set(a,[o])}return r}}},4005:(e,t,r)=>{const n=r(3513),i=r(3845),o=r(2438),a=r(378);let s;try{s=r(7789)}catch(e){}function l(e){return Array.isArray(e)?e:t.NQuads.legacyDatasetToQuads(e)}t.NQuads=r(1227),t.IdentifierIssuer=r(2985),t._rdfCanonizeNative=function(e){return e&&(s=e),s},t.canonize=async function(e,t){const r=l(e);if(t.useNative){if(!s)throw new Error("rdf-canonize-native not available");if(t.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return new Promise(((e,n)=>s.canonize(r,t,((t,r)=>t?n(t):e(r)))))}if("URDNA2015"===t.algorithm)return new n(t).main(r);if("URGNA2012"===t.algorithm){if(t.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new i(t).main(r)}if(!("algorithm"in t))throw new Error("No RDF Dataset Canonicalization algorithm specified.");throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+t.algorithm)},t._canonizeSync=function(e,t){const r=l(e);if(t.useNative){if(!s)throw new Error("rdf-canonize-native not available");if(t.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return s.canonizeSync(r,t)}if("URDNA2015"===t.algorithm)return new o(t).main(r);if("URGNA2012"===t.algorithm){if(t.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new a(t).main(r)}if(!("algorithm"in t))throw new Error("No RDF Dataset Canonicalization algorithm specified.");throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+t.algorithm)}},7793:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(9931),t),i(r(8483),t),i(r(2142),t),i(r(2426),t),i(r(3988),t),i(r(6754),t),i(r(8401),t)},9931:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BlankNode=void 0,t.BlankNode=class{constructor(e){this.termType="BlankNode",this.value=e}equals(e){return!!e&&"BlankNode"===e.termType&&e.value===this.value}}},8483:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DataFactory=void 0;const n=r(9931),i=r(2142),o=r(2426),a=r(3988),s=r(6754),l=r(8401);let d=0;t.DataFactory=class{constructor(e){this.blankNodeCounter=0,e=e||{},this.blankNodePrefix=e.blankNodePrefix||`df_${d++}_`}namedNode(e){return new a.NamedNode(e)}blankNode(e){return new n.BlankNode(e||`${this.blankNodePrefix}${this.blankNodeCounter++}`)}literal(e,t){return new o.Literal(e,t)}variable(e){return new l.Variable(e)}defaultGraph(){return i.DefaultGraph.INSTANCE}quad(e,t,r,n){return new s.Quad(e,t,r,n||this.defaultGraph())}fromTerm(e){switch(e.termType){case"NamedNode":return this.namedNode(e.value);case"BlankNode":return this.blankNode(e.value);case"Literal":return e.language?this.literal(e.value,e.language):e.datatype.equals(o.Literal.XSD_STRING)?this.literal(e.value):this.literal(e.value,this.fromTerm(e.datatype));case"Variable":return this.variable(e.value);case"DefaultGraph":return this.defaultGraph();case"Quad":return this.quad(this.fromTerm(e.subject),this.fromTerm(e.predicate),this.fromTerm(e.object),this.fromTerm(e.graph))}}fromQuad(e){return this.fromTerm(e)}resetBlankNodeCounter(){this.blankNodeCounter=0}}},2142:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultGraph=void 0;class r{constructor(){this.termType="DefaultGraph",this.value=""}equals(e){return!!e&&"DefaultGraph"===e.termType}}t.DefaultGraph=r,r.INSTANCE=new r},2426:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Literal=void 0;const n=r(3988);class i{constructor(e,t){this.termType="Literal",this.value=e,"string"==typeof t?(this.language=t,this.datatype=i.RDF_LANGUAGE_STRING):t?(this.language="",this.datatype=t):(this.language="",this.datatype=i.XSD_STRING)}equals(e){return!!e&&"Literal"===e.termType&&e.value===this.value&&e.language===this.language&&this.datatype.equals(e.datatype)}}t.Literal=i,i.RDF_LANGUAGE_STRING=new n.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),i.XSD_STRING=new n.NamedNode("http://www.w3.org/2001/XMLSchema#string")},3988:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NamedNode=void 0,t.NamedNode=class{constructor(e){this.termType="NamedNode",this.value=e}equals(e){return!!e&&"NamedNode"===e.termType&&e.value===this.value}}},6754:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Quad=void 0,t.Quad=class{constructor(e,t,r,n){this.termType="Quad",this.value="",this.subject=e,this.predicate=t,this.object=r,this.graph=n}equals(e){return!!e&&("Quad"===e.termType||!e.termType)&&this.subject.equals(e.subject)&&this.predicate.equals(e.predicate)&&this.object.equals(e.object)&&this.graph.equals(e.graph)}}},8401:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Variable=void 0,t.Variable=class{constructor(e){this.termType="Variable",this.value=e}equals(e){return!!e&&"Variable"===e.termType&&e.value===this.value}}},9349:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.getSupportedJavaScriptPrimitives=t.getSupportedRdfDatatypes=t.getTermRaw=t.toRdf=t.fromRdf=void 0;const o=r(7793),a=r(4802),s=r(103);i(r(4802),t),i(r(5448),t),i(r(103),t);const l=new o.DataFactory,d=new s.Translator;function c(e,t){return d.fromRdf(e,t)}d.registerHandler(new a.TypeHandlerString,a.TypeHandlerString.TYPES.map((e=>l.namedNode(e))),["string"]),d.registerHandler(new a.TypeHandlerBoolean,[a.TypeHandlerBoolean.TYPE].map((e=>l.namedNode(e))),["boolean"]),d.registerHandler(new a.TypeHandlerNumberDouble,a.TypeHandlerNumberDouble.TYPES.map((e=>l.namedNode(e))),["number"]),d.registerHandler(new a.TypeHandlerNumberInteger,a.TypeHandlerNumberInteger.TYPES.map((e=>l.namedNode(e))),["number"]),d.registerHandler(new a.TypeHandlerDate,a.TypeHandlerDate.TYPES.map((e=>l.namedNode(e))),["object"]),t.fromRdf=c,t.toRdf=function(e,t){return t&&"namedNode"in t&&(t={dataFactory:t}),(t=t||{})&&!t.dataFactory&&(t.dataFactory=l),d.toRdf(e,t)},t.getTermRaw=function(e,t){return"Literal"===e.termType?c(e,t):e.value},t.getSupportedRdfDatatypes=function(){return d.getSupportedRdfDatatypes()},t.getSupportedJavaScriptPrimitives=function(){return d.getSupportedJavaScriptPrimitives()}},5448:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},103:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Translator=void 0,t.Translator=class{constructor(){this.supportedRdfDatatypes=[],this.fromRdfHandlers={},this.toRdfHandlers={}}static incorrectRdfDataType(e){throw new Error(`Invalid RDF ${e.datatype.value} value: '${e.value}'`)}registerHandler(e,t,r){for(const r of t)this.supportedRdfDatatypes.push(r),this.fromRdfHandlers[r.value]=e;for(const t of r){let r=this.toRdfHandlers[t];r||(this.toRdfHandlers[t]=r=[]),r.push(e)}}fromRdf(e,t){const r=this.fromRdfHandlers[e.datatype.value];return r?r.fromRdf(e,t):e.value}toRdf(e,t){const r=this.toRdfHandlers[typeof e];if(r)for(const n of r){const r=n.toRdf(e,t);if(r)return r}throw new Error(`Invalid JavaScript value: '${e}'`)}getSupportedRdfDatatypes(){return this.supportedRdfDatatypes}getSupportedJavaScriptPrimitives(){return Object.keys(this.toRdfHandlers)}}},92:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerBoolean=void 0;const n=r(103);class i{fromRdf(e,t){switch(e.value){case"true":case"1":return!0;case"false":case"0":return!1}return t&&n.Translator.incorrectRdfDataType(e),!1}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(e?"true":"false",t||r.namedNode(i.TYPE))}}i.TYPE="http://www.w3.org/2001/XMLSchema#boolean",t.TypeHandlerBoolean=i},7258:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerDate=void 0;const n=r(103);class i{fromRdf(e,t){switch(t&&!e.value.match(i.VALIDATORS[e.datatype.value.substr(33,e.datatype.value.length)])&&n.Translator.incorrectRdfDataType(e),e.datatype.value){case"http://www.w3.org/2001/XMLSchema#gDay":return new Date(0,0,parseInt(e.value,10));case"http://www.w3.org/2001/XMLSchema#gMonthDay":const t=e.value.split("-");return new Date(0,parseInt(t[0],10)-1,parseInt(t[1],10));case"http://www.w3.org/2001/XMLSchema#gYear":return new Date(e.value+"-01-01");case"http://www.w3.org/2001/XMLSchema#gYearMonth":return new Date(e.value+"-01");default:return new Date(e.value)}}toRdf(e,{datatype:t,dataFactory:r}){if(t=t||r.namedNode(i.TYPES[0]),!(e instanceof Date))return null;const n=e;let o;switch(t.value){case"http://www.w3.org/2001/XMLSchema#gDay":o=String(n.getUTCDate());break;case"http://www.w3.org/2001/XMLSchema#gMonthDay":o=n.getUTCMonth()+1+"-"+n.getUTCDate();break;case"http://www.w3.org/2001/XMLSchema#gYear":o=String(n.getUTCFullYear());break;case"http://www.w3.org/2001/XMLSchema#gYearMonth":o=n.getUTCFullYear()+"-"+(n.getUTCMonth()+1);break;case"http://www.w3.org/2001/XMLSchema#date":o=n.toISOString().replace(/T.*$/,"");break;default:o=n.toISOString()}return r.literal(o,t)}}i.TYPES=["http://www.w3.org/2001/XMLSchema#dateTime","http://www.w3.org/2001/XMLSchema#date","http://www.w3.org/2001/XMLSchema#gDay","http://www.w3.org/2001/XMLSchema#gMonthDay","http://www.w3.org/2001/XMLSchema#gYear","http://www.w3.org/2001/XMLSchema#gYearMonth"],i.VALIDATORS={date:/^[0-9]+-[0-9][0-9]-[0-9][0-9]Z?$/,dateTime:/^[0-9]+-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9](\.[0-9][0-9][0-9])?((Z?)|([\+-][0-9][0-9]:[0-9][0-9]))$/,gDay:/^[0-9]+$/,gMonthDay:/^[0-9]+-[0-9][0-9]$/,gYear:/^[0-9]+$/,gYearMonth:/^[0-9]+-[0-9][0-9]$/},t.TypeHandlerDate=i},2406:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerNumberDouble=void 0;const n=r(103);class i{fromRdf(e,t){const r=parseFloat(e.value);return t&&isNaN(r)&&n.Translator.incorrectRdfDataType(e),r}toRdf(e,{datatype:t,dataFactory:r}){return t=t||r.namedNode(i.TYPES[0]),isNaN(e)?r.literal("NaN",t):isFinite(e)?e%1==0?null:r.literal(e.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),t):r.literal(e>0?"INF":"-INF",t)}}i.TYPES=["http://www.w3.org/2001/XMLSchema#double","http://www.w3.org/2001/XMLSchema#decimal","http://www.w3.org/2001/XMLSchema#float"],t.TypeHandlerNumberDouble=i},6925:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerNumberInteger=void 0;const n=r(103);class i{fromRdf(e,t){const r=parseInt(e.value,10);return t&&(isNaN(r)||e.value.indexOf(".")>=0)&&n.Translator.incorrectRdfDataType(e),r}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(String(e),t||(e<=i.MAX_INT&&e>=i.MIN_INT?r.namedNode(i.TYPES[0]):r.namedNode(i.TYPES[1])))}}i.TYPES=["http://www.w3.org/2001/XMLSchema#integer","http://www.w3.org/2001/XMLSchema#long","http://www.w3.org/2001/XMLSchema#int","http://www.w3.org/2001/XMLSchema#byte","http://www.w3.org/2001/XMLSchema#short","http://www.w3.org/2001/XMLSchema#negativeInteger","http://www.w3.org/2001/XMLSchema#nonNegativeInteger","http://www.w3.org/2001/XMLSchema#nonPositiveInteger","http://www.w3.org/2001/XMLSchema#positiveInteger","http://www.w3.org/2001/XMLSchema#unsignedByte","http://www.w3.org/2001/XMLSchema#unsignedInt","http://www.w3.org/2001/XMLSchema#unsignedLong","http://www.w3.org/2001/XMLSchema#unsignedShort"],i.MAX_INT=2147483647,i.MIN_INT=-2147483648,t.TypeHandlerNumberInteger=i},4191:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerString=void 0;class r{fromRdf(e){return e.value}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(e,t)}}r.TYPES=["http://www.w3.org/2001/XMLSchema#string","http://www.w3.org/2001/XMLSchema#normalizedString","http://www.w3.org/2001/XMLSchema#anyURI","http://www.w3.org/2001/XMLSchema#base64Binary","http://www.w3.org/2001/XMLSchema#language","http://www.w3.org/2001/XMLSchema#Name","http://www.w3.org/2001/XMLSchema#NCName","http://www.w3.org/2001/XMLSchema#NMTOKEN","http://www.w3.org/2001/XMLSchema#token","http://www.w3.org/2001/XMLSchema#hexBinary","http://www.w3.org/1999/02/22-rdf-syntax-ns#langString","http://www.w3.org/2001/XMLSchema#time","http://www.w3.org/2001/XMLSchema#duration"],t.TypeHandlerString=r},4802:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(92),t),i(r(7258),t),i(r(2406),t),i(r(6925),t),i(r(4191),t)},4147:(e,t,r)=>{const{SymbolDispose:n}=r(4134),{AbortError:i,codes:o}=r(6371),{isNodeStream:a,isWebStream:s,kControllerErrorFunction:l}=r(6115),d=r(6238),{ERR_INVALID_ARG_TYPE:c}=o;let u;e.exports.addAbortSignal=function(t,r){if((e=>{if("object"!=typeof e||!("aborted"in e))throw new c("signal","AbortSignal",e)})(t),!a(r)&&!s(r))throw new c("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const o=a(t)?()=>{t.destroy(new i(void 0,{cause:e.reason}))}:()=>{t[l](new i(void 0,{cause:e.reason}))};if(e.aborted)o();else{u=u||r(7760).addAbortListener;const i=u(e,o);d(t,i[n])}return t}},345:(e,t,r)=>{const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:a}=r(4134),{Buffer:s}=r(8287),{inspect:l}=r(7760);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return s.alloc(0);const t=s.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(e<r.length){const t=r.slice(0,e);return this.head.data=r.slice(e),t}return e===r.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[i](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t="",r=this.head,i=0;do{const o=r.data;if(!(e>o.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=s.allocUnsafe(e),r=e;let n=this.head,i=0;do{const s=n.data;if(!(e>s.length)){e===s.length?(o(t,s,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new a(s.buffer,s.byteOffset,e),r-e),this.head=n,n.data=s.slice(e));break}o(t,s,r-e),e-=s.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return l(this,{...t,depth:0,customInspect:!1})}}},7830:(e,t,r)=>{const{pipeline:n}=r(7758),i=r(3370),{destroyer:o}=r(5896),{isNodeStream:a,isReadable:s,isWritable:l,isWebStream:d,isTransformStream:c,isWritableStream:u,isReadableStream:h}=r(6115),{AbortError:p,codes:{ERR_INVALID_ARG_VALUE:f,ERR_MISSING_ARGS:g}}=r(6371),v=r(6238);e.exports=function(...e){if(0===e.length)throw new g("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let r=0;r<e.length;++r)if(a(e[r])||d(e[r])){if(r<e.length-1&&!(s(e[r])||h(e[r])||c(e[r])))throw new f(`streams[${r}]`,t[r],"must be readable");if(r>0&&!(l(e[r])||u(e[r])||c(e[r])))throw new f(`streams[${r}]`,t[r],"must be writable")}let r,m,b,y,x;const w=e[0],_=n(e,(function(e){const t=y;y=null,t?t(e):e?x.destroy(e):E||S||x.destroy()})),S=!!(l(w)||u(w)||c(w)),E=!!(s(_)||h(_)||c(_));if(x=new i({writableObjectMode:!(null==w||!w.writableObjectMode),readableObjectMode:!(null==_||!_.readableObjectMode),writable:S,readable:E}),S){if(a(w))x._write=function(e,t,n){w.write(e,t)?n():r=n},x._final=function(e){w.end(),m=e},w.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(d(w)){const e=(c(w)?w.writable:w).getWriter();x._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},x._final=async function(t){try{await e.ready,e.close().catch((()=>{})),m=t}catch(e){t(e)}}}const e=c(_)?_.readable:_;v(e,(()=>{if(m){const e=m;m=null,e()}}))}if(E)if(a(_))_.on("readable",(function(){if(b){const e=b;b=null,e()}})),_.on("end",(function(){x.push(null)})),x._read=function(){for(;;){const e=_.read();if(null===e)return void(b=x._read);if(!x.push(e))return}};else if(d(_)){const e=(c(_)?_.readable:_).getReader();x._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!x.push(t))return;if(r)return void x.push(null)}catch{return}}}return x._destroy=function(e,t){e||null===y||(e=new p),b=null,r=null,m=null,null===y?t(e):(y=t,a(_)&&o(_,e))},x}},5896:(e,t,r)=>{const n=r(5606),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:o},AbortError:a}=r(6371),{Symbol:s}=r(4134),{kIsDestroyed:l,isDestroyed:d,isFinished:c,isServerRequest:u}=r(6115),h=s("kDestroy"),p=s("kConstruct");function f(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function g(e,t,r){let i=!1;function o(t){if(i)return;i=!0;const o=e._readableState,a=e._writableState;f(t,a,o),a&&(a.closed=!0),o&&(o.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(v,e,t):n.nextTick(m,e)}try{e._destroy(t||null,o)}catch(t){o(t)}}function v(e,t){b(e,t),m(e)}function m(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function b(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function y(e,t,r){const i=e._readableState,o=e._writableState;if(null!=o&&o.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=o&&o.autoDestroy?e.destroy(t):t&&(t.stack,o&&!o.errored&&(o.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(b,e,t):b(e,t))}function x(e){let t=!1;function r(r){if(t)return void y(e,null!=r?r:new o);t=!0;const i=e._readableState,a=e._writableState,s=a||i;i&&(i.constructed=!0),a&&(a.constructed=!0),s.destroyed?e.emit(h,r):r?y(e,r,!0):n.nextTick(w,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function w(e){e.emit(p)}function _(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function S(e){e.emit("close")}function E(e,t){e.emit("error",t),n.nextTick(S,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(p,t),e.listenerCount(p)>1||n.nextTick(x,e)},destroyer:function(e,t){e&&!d(e)&&(t||c(e)||(t=new a),u(e)?(e.socket=null,e.destroy(t)):_(e)?e.abort():_(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(E,e,t):n.nextTick(S,e),e.destroyed||(e[l]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,o=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(f(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),o.constructed?g(this,e,t):this.once(h,(function(r){g(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:y}},3370:(e,t,r)=>{const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:o,ObjectSetPrototypeOf:a}=r(4134);e.exports=d;const s=r(7576),l=r(8584);a(d.prototype,s.prototype),a(d,s);{const e=o(l.prototype);for(let t=0;t<e.length;t++){const r=e[t];d.prototype[r]||(d.prototype[r]=l.prototype[r])}}function d(e){if(!(this instanceof d))return new d(e);s.call(this,e),l.call(this,e),e?(this.allowHalfOpen=!1!==e.allowHalfOpen,!1===e.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===e.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let c,u;function h(){return void 0===c&&(c={}),c}n(d.prototype,{writable:{__proto__:null,...i(l.prototype,"writable")},writableHighWaterMark:{__proto__:null,...i(l.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...i(l.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...i(l.prototype,"writableBuffer")},writableLength:{__proto__:null,...i(l.prototype,"writableLength")},writableFinished:{__proto__:null,...i(l.prototype,"writableFinished")},writableCorked:{__proto__:null,...i(l.prototype,"writableCorked")},writableEnded:{__proto__:null,...i(l.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...i(l.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set(e){this._readableState&&this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}}),d.fromWeb=function(e,t){return h().newStreamDuplexFromReadableWritablePair(e,t)},d.toWeb=function(e){return h().newReadableWritablePairFromDuplex(e)},d.from=function(e){return u||(u=r(6706)),u(e,"body")}},6706:(e,t,r)=>{const n=r(5606),i=r(8287),{isReadable:o,isWritable:a,isIterable:s,isNodeStream:l,isReadableNodeStream:d,isWritableNodeStream:c,isDuplexNodeStream:u,isReadableStream:h,isWritableStream:p}=r(6115),f=r(6238),{AbortError:g,codes:{ERR_INVALID_ARG_TYPE:v,ERR_INVALID_RETURN_VALUE:m}}=r(6371),{destroyer:b}=r(5896),y=r(3370),x=r(7576),w=r(8584),{createDeferredPromise:_}=r(7760),S=r(6532),E=globalThis.Blob||i.Blob,I=void 0!==E?function(e){return e instanceof E}:function(e){return!1},T=globalThis.AbortController||r(5568).AbortController,{FunctionPrototypeCall:j}=r(4134);class k extends y{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function N(e){const t=e.readable&&"function"!=typeof e.readable.read?x.wrap(e.readable):e.readable,r=e.writable;let n,i,s,l,d,c=!!o(t),u=!!a(r);function h(e){const t=l;l=null,t?t(e):e&&d.destroy(e)}return d=new k({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:c,writable:u}),u&&(f(r,(e=>{u=!1,e&&b(t,e),h(e)})),d._write=function(e,t,i){r.write(e,t)?i():n=i},d._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),c&&(f(t,(e=>{c=!1,e&&b(t,e),h(e)})),t.on("readable",(function(){if(s){const e=s;s=null,e()}})),t.on("end",(function(){d.push(null)})),d._read=function(){for(;;){const e=t.read();if(null===e)return void(s=d._read);if(!d.push(e))return}}),d._destroy=function(e,o){e||null===l||(e=new g),s=null,n=null,i=null,null===l?o(e):(l=o,b(r,e),b(t,e))},d}e.exports=function e(t,r){if(u(t))return t;if(d(t))return N({readable:t});if(c(t))return N({writable:t});if(l(t))return N({writable:!1,readable:!1});if(h(t))return N({readable:x.fromWeb(t)});if(p(t))return N({writable:w.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:o,destroy:a}=function(e){let{promise:t,resolve:r}=_();const i=new T,o=i.signal;return{value:e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:a,cb:s}=await e;if(n.nextTick(s),a)return;if(o.aborted)throw new g(void 0,{cause:o.reason});({promise:t,resolve:r}=_()),yield i}}(),{signal:o}),write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(s(e))return S(k,e,{objectMode:!0,write:i,final:o,destroy:a});const l=null==e?void 0:e.then;if("function"==typeof l){let t;const r=j(l,e,(e=>{if(null!=e)throw new m("nully","body",e)}),(e=>{b(t,e)}));return t=new k({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:a})}throw new m("Iterable, AsyncIterable or AsyncFunction",r,e)}if(I(t))return e(t.arrayBuffer());if(s(t))return S(k,t,{objectMode:!0,writable:!1});if(h(null==t?void 0:t.readable)&&p(null==t?void 0:t.writable))return k.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return N({readable:null!=t&&t.readable?d(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?c(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});const i=null==t?void 0:t.then;if("function"==typeof i){let e;return j(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{b(e,t)})),e=new k({objectMode:!0,writable:!1,read(){}})}throw new v(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},6238:(e,t,r)=>{const n=r(5606),{AbortError:i,codes:o}=r(6371),{ERR_INVALID_ARG_TYPE:a,ERR_STREAM_PREMATURE_CLOSE:s}=o,{kEmptyObject:l,once:d}=r(7760),{validateAbortSignal:c,validateFunction:u,validateObject:h,validateBoolean:p}=r(277),{Promise:f,PromisePrototypeThen:g,SymbolDispose:v}=r(4134),{isClosed:m,isReadable:b,isReadableNodeStream:y,isReadableStream:x,isReadableFinished:w,isReadableErrored:_,isWritable:S,isWritableNodeStream:E,isWritableStream:I,isWritableFinished:T,isWritableErrored:j,isNodeStream:k,willEmitClose:N,kIsClosedPromise:A}=r(6115);let R;const C=()=>{};function O(e,t,o){var p,f;if(2===arguments.length?(o=t,t=l):null==t?t=l:h(t,"options"),u(o,"callback"),c(t.signal,"options.signal"),o=d(o),x(e)||I(e))return function(e,t,o){let a=!1,s=C;if(t.signal)if(s=()=>{a=!0,o.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(s);else{R=R||r(7760).addAbortListener;const n=R(t.signal,s),i=o;o=d(((...t)=>{n[v](),i.apply(e,t)}))}const l=(...t)=>{a||n.nextTick((()=>o.apply(e,t)))};return g(e[A].promise,l,l),C}(e,t,o);if(!k(e))throw new a("stream",["ReadableStream","WritableStream","Stream"],e);const O=null!==(p=t.readable)&&void 0!==p?p:y(e),L=null!==(f=t.writable)&&void 0!==f?f:E(e),$=e._writableState,D=e._readableState,P=()=>{e.writable||F()};let M=N(e)&&y(e)===O&&E(e)===L,B=T(e,!1);const F=()=>{B=!0,e.destroyed&&(M=!1),(!M||e.readable&&!O)&&(O&&!q||o.call(e))};let q=w(e,!1);const U=()=>{q=!0,e.destroyed&&(M=!1),(!M||e.writable&&!L)&&(L&&!B||o.call(e))},z=t=>{o.call(e,t)};let H=m(e);const V=()=>{H=!0;const t=j(e)||_(e);return t&&"boolean"!=typeof t?o.call(e,t):O&&!q&&y(e,!0)&&!w(e,!1)?o.call(e,new s):!L||B||T(e,!1)?void o.call(e):o.call(e,new s)},G=()=>{H=!0;const t=j(e)||_(e);if(t&&"boolean"!=typeof t)return o.call(e,t);o.call(e)},W=()=>{e.req.on("finish",F)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?L&&!$&&(e.on("end",P),e.on("close",P)):(e.on("complete",F),M||e.on("abort",V),e.req?W():e.on("request",W)),M||"boolean"!=typeof e.aborted||e.on("aborted",V),e.on("end",U),e.on("finish",F),!1!==t.error&&e.on("error",z),e.on("close",V),H?n.nextTick(V):null!=$&&$.errorEmitted||null!=D&&D.errorEmitted?M||n.nextTick(G):(O||M&&!b(e)||!B&&!1!==S(e))&&(L||M&&!S(e)||!q&&!1!==b(e))?D&&e.req&&e.aborted&&n.nextTick(G):n.nextTick(G);const J=()=>{o=C,e.removeListener("aborted",V),e.removeListener("complete",F),e.removeListener("abort",V),e.removeListener("request",W),e.req&&e.req.removeListener("finish",F),e.removeListener("end",P),e.removeListener("close",P),e.removeListener("finish",F),e.removeListener("end",U),e.removeListener("error",z),e.removeListener("close",V)};if(t.signal&&!H){const a=()=>{const r=o;J(),r.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(a);else{R=R||r(7760).addAbortListener;const n=R(t.signal,a),i=o;o=d(((...t)=>{n[v](),i.apply(e,t)}))}}return J}e.exports=O,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=l),null!==(r=t)&&void 0!==r&&r.cleanup&&(p(t.cleanup,"cleanup"),n=t.cleanup),new f(((r,i)=>{const o=O(e,t,(e=>{n&&o(),e?i(e):r()}))}))}},6532:(e,t,r)=>{const n=r(5606),{PromisePrototypeThen:i,SymbolAsyncIterator:o,SymbolIterator:a}=r(4134),{Buffer:s}=r(8287),{ERR_INVALID_ARG_TYPE:l,ERR_STREAM_NULL_VALUES:d}=r(6371).codes;e.exports=function(e,t,r){let c,u;if("string"==typeof t||t instanceof s)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[o])u=!0,c=t[o]();else{if(!t||!t[a])throw new l("iterable",["Iterable"],t);u=!1,c=t[a]()}const h=new e({objectMode:!0,highWaterMark:1,...r});let p=!1;return h._read=function(){p||(p=!0,async function(){for(;;){try{const{value:e,done:t}=u?await c.next():c.next();if(t)h.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw p=!1,new d;if(h.push(t))continue;p=!1}}catch(e){h.destroy(e)}break}}())},h._destroy=function(e,t){i(async function(e){const t=null!=e,r="function"==typeof c.throw;if(t&&r){const{value:t,done:r}=await c.throw(e);if(await t,r)return}if("function"==typeof c.return){const{value:e}=await c.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},h}},4259:(e,t,r)=>{const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(4134),{EventEmitter:o}=r(7007);function a(e){o.call(this,e)}function s(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(a.prototype,o.prototype),i(a,o),a.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",l),r.on("close",d));let a=!1;function l(){a||(a=!0,e.end())}function d(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){u(),0===o.listenerCount(this,"error")&&this.emit("error",e)}function u(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",l),r.removeListener("close",d),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return s(r,"error",c),s(e,"error",c),r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e},e.exports={Stream:a,prependListener:s}},823:(e,t,r)=>{const n=globalThis.AbortController||r(5568).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:a,ERR_OUT_OF_RANGE:s},AbortError:l}=r(6371),{validateAbortSignal:d,validateInteger:c,validateObject:u}=r(277),h=r(4134).Symbol("kWeak"),p=r(4134).Symbol("kResistStopPropagation"),{finished:f}=r(6238),g=r(7830),{addAbortSignalNoValidate:v}=r(4147),{isWritable:m,isNodeStream:b}=r(6115),{deprecate:y}=r(7760),{ArrayPrototypePush:x,Boolean:w,MathFloor:_,Number:S,NumberIsNaN:E,Promise:I,PromiseReject:T,PromiseResolve:j,PromisePrototypeThen:k,Symbol:N}=r(4134),A=N("kEmpty"),R=N("kEof");function C(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&u(t,"options"),null!=(null==t?void 0:t.signal)&&d(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=_(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=_(t.highWaterMark)),c(n,"options.concurrency",1),c(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(7760).AbortSignalAny([null==t?void 0:t.signal].filter(w)),a=this,s=[],d={signal:o};let c,u,h=!1,p=0;function f(){h=!0,g()}function g(){p-=1,v()}function v(){u&&!h&&p<n&&s.length<i&&(u(),u=null)}!async function(){try{for await(let t of a){if(h)return;if(o.aborted)throw new l;try{if(t=e(t,d),t===A)continue;t=j(t)}catch(e){t=T(e)}p+=1,k(t,g,f),s.push(t),c&&(c(),c=null),!h&&(s.length>=i||p>=n)&&await new I((e=>{u=e}))}s.push(R)}catch(e){const t=T(e);k(t,g,f),s.push(t)}finally{h=!0,c&&(c(),c=null)}}();try{for(;;){for(;s.length>0;){const e=await s[0];if(e===R)return;if(o.aborted)throw new l;e!==A&&(yield e),s.shift(),v()}await new I((e=>{c=e}))}}finally{h=!0,u&&(u(),u=null)}}.call(this)}async function O(e,t=void 0){for await(const r of L.call(this,e,t))return!0;return!1}function L(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return C.call(this,(async function(t,r){return await e(t,r)?t:A}),t)}class $ extends a{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function D(e){if(e=S(e),E(e))return 0;if(e<0)throw new s("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:y((function(e=void 0){return null!=e&&u(e,"options"),null!=(null==e?void 0:e.signal)&&d(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&u(t,"options"),null!=(null==t?void 0:t.signal)&&d(t.signal,"options.signal"),e=D(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;e--<=0&&(yield r)}}.call(this)},filter:L,flatMap:function(e,t){const r=C.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:C,take:function(e,t=void 0){return null!=t&&u(t,"options"),null!=(null==t?void 0:t.signal)&&d(t.signal,"options.signal"),e=D(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&u(t,"options"),null!=(null==t?void 0:t.signal)&&d(t.signal,"options.signal"),b(e)&&!m(e))throw new i("stream",e,"must be writable");const r=g(this,e);return null!=t&&t.signal&&v(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await O.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of C.call(this,(async function(t,r){return await e(t,r),A}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&u(r,"options"),null!=(null==r?void 0:r.signal)&&d(r.signal,"options.signal");let a=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new l(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await f(this.destroy(e)),e}const s=new n,c=s.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this,[p]:!0};r.signal.addEventListener("abort",(()=>s.abort()),e)}let g=!1;try{for await(const n of this){var v;if(g=!0,null!=r&&null!==(v=r.signal)&&void 0!==v&&v.aborted)throw new l;a?t=await e(t,n,{signal:c}):(t=n,a=!0)}if(!g&&!a)throw new $}finally{s.abort()}return t},toArray:async function(e){null!=e&&u(e,"options"),null!=(null==e?void 0:e.signal)&&d(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l(void 0,{cause:e.signal.reason});x(t,n)}return t},some:O,find:async function(e,t){for await(const r of L.call(this,e,t))return r}}},6524:(e,t,r)=>{const{ObjectSetPrototypeOf:n}=r(4134);e.exports=o;const i=r(5001);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n(o.prototype,i.prototype),n(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},7758:(e,t,r)=>{const n=r(5606),{ArrayIsArray:i,Promise:o,SymbolAsyncIterator:a,SymbolDispose:s}=r(4134),l=r(6238),{once:d}=r(7760),c=r(5896),u=r(3370),{aggregateTwoErrors:h,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:f,ERR_MISSING_ARGS:g,ERR_STREAM_DESTROYED:v,ERR_STREAM_PREMATURE_CLOSE:m},AbortError:b}=r(6371),{validateFunction:y,validateAbortSignal:x}=r(277),{isIterable:w,isReadable:_,isReadableNodeStream:S,isNodeStream:E,isTransformStream:I,isWebStream:T,isReadableStream:j,isReadableFinished:k}=r(6115),N=globalThis.AbortController||r(5568).AbortController;let A,R,C;function O(e,t,r){let n=!1;return e.on("close",(()=>{n=!0})),{destroy:t=>{n||(n=!0,c.destroyer(e,t||new v("pipe")))},cleanup:l(e,{readable:t,writable:r},(e=>{n=!e}))}}function L(e){if(w(e))return e;if(S(e))return async function*(e){R||(R=r(7576)),yield*R.prototype[a].call(e)}(e);throw new p("val",["Readable","Iterable","AsyncIterable"],e)}async function $(e,t,r,{end:n}){let i,a=null;const s=e=>{if(e&&(i=e),a){const e=a;a=null,e()}},d=()=>new o(((e,t)=>{i?t(i):a=()=>{i?t(i):e()}}));t.on("drain",s);const c=l(t,{readable:!1},s);try{t.writableNeedDrain&&await d();for await(const r of e)t.write(r)||await d();n&&(t.end(),await d()),r()}catch(e){r(i!==e?h(i,e):e)}finally{c(),t.off("drain",s)}}async function D(e,t,r,{end:n}){I(t)&&(t=t.writable);const i=t.getWriter();try{for await(const t of e)await i.ready,i.write(t).catch((()=>{}));await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function P(e,t,o){if(1===e.length&&i(e[0])&&(e=e[0]),e.length<2)throw new g("streams");const a=new N,l=a.signal,d=null==o?void 0:o.signal,c=[];function h(){F(new b)}let v,m,y;x(d,"options.signal"),C=C||r(7760).addAbortListener,d&&(v=C(d,h));const k=[];let R,P=0;function B(e){F(e,0==--P)}function F(e,r){var i;if(!e||m&&"ERR_STREAM_PREMATURE_CLOSE"!==m.code||(m=e),m||r){for(;k.length;)k.shift()(m);null===(i=v)||void 0===i||i[s](),a.abort(),r&&(m||c.forEach((e=>e())),n.nextTick(t,m,y))}}for(let z=0;z<e.length;z++){const H=e[z],V=z<e.length-1,G=z>0,W=V||!1!==(null==o?void 0:o.end),J=z===e.length-1;if(E(H)){if(W){const{destroy:X,cleanup:K}=O(H,V,G);k.push(X),_(H)&&J&&c.push(K)}function Q(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&B(e)}H.on("error",Q),_(H)&&J&&c.push((()=>{H.removeListener("error",Q)}))}if(0===z)if("function"==typeof H){if(R=H({signal:l}),!w(R))throw new f("Iterable, AsyncIterable or Stream","source",R)}else R=w(H)||S(H)||I(H)?H:u.from(H);else if("function"==typeof H){var q;if(R=I(R)?L(null===(q=R)||void 0===q?void 0:q.readable):L(R),R=H(R,{signal:l}),V){if(!w(R,!0))throw new f("AsyncIterable",`transform[${z-1}]`,R)}else{var U;A||(A=r(6524));const Y=new A({objectMode:!0}),Z=null===(U=R)||void 0===U?void 0:U.then;if("function"==typeof Z)P++,Z.call(R,(e=>{y=e,null!=e&&Y.write(e),W&&Y.end(),n.nextTick(B)}),(e=>{Y.destroy(e),n.nextTick(B,e)}));else if(w(R,!0))P++,$(R,Y,B,{end:W});else{if(!j(R)&&!I(R))throw new f("AsyncIterable or Promise","destination",R);{const re=R.readable||R;P++,$(re,Y,B,{end:W})}}R=Y;const{destroy:ee,cleanup:te}=O(R,!1,!0);k.push(ee),J&&c.push(te)}}else if(E(H)){if(S(R)){P+=2;const ne=M(R,H,B,{end:W});_(H)&&J&&c.push(ne)}else if(I(R)||j(R)){const ie=R.readable||R;P++,$(ie,H,B,{end:W})}else{if(!w(R))throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],R);P++,$(R,H,B,{end:W})}R=H}else if(T(H)){if(S(R))P++,D(L(R),H,B,{end:W});else if(j(R)||w(R))P++,D(R,H,B,{end:W});else{if(!I(R))throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],R);P++,D(R.readable,H,B,{end:W})}R=H}else R=u.from(H)}return(null!=l&&l.aborted||null!=d&&d.aborted)&&n.nextTick(h),R}function M(e,t,r,{end:i}){let o=!1;if(t.on("close",(()=>{o||r(new m)})),e.pipe(t,{end:!1}),i){function a(){o=!0,t.end()}k(e)?n.nextTick(a):e.once("end",a)}else r();return l(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),l(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:P,pipeline:function(...e){return P(e,d(function(e){return y(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},7576:(e,t,r)=>{const n=r(5606),{ArrayPrototypeIndexOf:i,NumberIsInteger:o,NumberIsNaN:a,NumberParseInt:s,ObjectDefineProperties:l,ObjectKeys:d,ObjectSetPrototypeOf:c,Promise:u,SafeSet:h,SymbolAsyncDispose:p,SymbolAsyncIterator:f,Symbol:g}=r(4134);e.exports=Q,Q.ReadableState=J;const{EventEmitter:v}=r(7007),{Stream:m,prependListener:b}=r(4259),{Buffer:y}=r(8287),{addAbortSignal:x}=r(4147),w=r(6238);let _=r(7760).debuglog("stream",(e=>{_=e}));const S=r(345),E=r(5896),{getHighWaterMark:I,getDefaultHighWaterMark:T}=r(5291),{aggregateTwoErrors:j,codes:{ERR_INVALID_ARG_TYPE:k,ERR_METHOD_NOT_IMPLEMENTED:N,ERR_OUT_OF_RANGE:A,ERR_STREAM_PUSH_AFTER_EOF:R,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:C},AbortError:O}=r(6371),{validateObject:L}=r(277),$=g("kPaused"),{StringDecoder:D}=r(3141),P=r(6532);c(Q.prototype,m.prototype),c(Q,m);const M=()=>{},{errorOrDestroy:B}=E,F=1,q=16,U=32,z=64,H=2048,V=4096,G=65536;function W(e){return{enumerable:!1,get(){return!!(this.state&e)},set(t){t?this.state|=e:this.state&=~e}}}function J(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(3370)),this.state=H|V|q|U,e&&e.objectMode&&(this.state|=F),n&&e&&e.readableObjectMode&&(this.state|=F),this.highWaterMark=e?I(this,e,"readableHighWaterMark",n):T(!1),this.buffer=new S,this.length=0,this.pipes=[],this.flowing=null,this[$]=null,e&&!1===e.emitClose&&(this.state&=~H),e&&!1===e.autoDestroy&&(this.state&=~V),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new D(e.encoding),this.encoding=e.encoding)}function Q(e){if(!(this instanceof Q))return new Q(e);const t=this instanceof r(3370);this._readableState=new J(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&x(e.signal,this)),m.call(this,e),E.construct(this,(()=>{this._readableState.needReadable&&te(this,this._readableState)}))}function X(e,t,r,n){_("readableAddChunk",t);const i=e._readableState;let o;if(i.state&F||("string"==typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=y.from(t,r).toString(i.encoding):(t=y.from(t,r),r=""))):t instanceof y?r="":m._isUint8Array(t)?(t=m._uint8ArrayToBuffer(t),r=""):null!=t&&(o=new k("chunk",["string","Buffer","Uint8Array"],t))),o)B(e,o);else if(null===t)i.state&=-9,function(e,t){if(_("onEofChunk"),!t.ended){if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?Z(e):(t.needReadable=!1,t.emittedReadable=!0,ee(e))}}(e,i);else if(i.state&F||t&&t.length>0)if(n)if(4&i.state)B(e,new C);else{if(i.destroyed||i.errored)return!1;K(e,i,t,!0)}else if(i.ended)B(e,new R);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?K(e,i,t,!1):te(e,i)):K(e,i,t,!1)}else n||(i.state&=-9,te(e,i));return!i.ended&&(i.length<i.highWaterMark||0===i.length)}function K(e,t,r,n){t.flowing&&0===t.length&&!t.sync&&e.listenerCount("data")>0?(t.state&G?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.state&z&&Z(e)),te(e,t)}function Y(e,t){return e<=0||0===t.length&&t.ended?0:t.state&F?1:a(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function Z(e){const t=e._readableState;_("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(_("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(ee,e))}function ee(e){const t=e._readableState;_("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,ae(e)}function te(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(re,e,t))}function re(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){const r=t.length;if(_("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function ne(e){const t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!1===t[$]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function ie(e){_("readable nexttick read 0"),e.read(0)}function oe(e,t){_("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),ae(e),t.flowing&&!t.reading&&e.read(0)}function ae(e){const t=e._readableState;for(_("flow",t.flowing);t.flowing&&null!==e.read(););}function se(e,t){"function"!=typeof e.read&&(e=Q.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=M;function i(t){this===e?(n(),n=M):n=t}e.on("readable",i);const o=w(e,{writable:!1},(e=>{r=e?j(r,e):null,n(),n=M}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new u(i)}}}catch(e){throw r=j(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),o()):E.destroyer(e,null)}}(e,t);return r.stream=e,r}function le(e,t){if(0===t.length)return null;let r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function de(e){const t=e._readableState;_("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(ce,t,e))}function ce(e,t){if(_("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(ue,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function ue(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let he;function pe(){return void 0===he&&(he={}),he}l(J.prototype,{objectMode:W(F),ended:W(2),endEmitted:W(4),reading:W(8),constructed:W(q),sync:W(U),needReadable:W(z),emittedReadable:W(128),readableListening:W(256),resumeScheduled:W(512),errorEmitted:W(1024),emitClose:W(H),autoDestroy:W(V),destroyed:W(8192),closed:W(16384),closeEmitted:W(32768),multiAwaitDrain:W(G),readingMore:W(1<<17),dataEmitted:W(1<<18)}),Q.prototype.destroy=E.destroy,Q.prototype._undestroy=E.undestroy,Q.prototype._destroy=function(e,t){t(e)},Q.prototype[v.captureRejectionSymbol]=function(e){this.destroy(e)},Q.prototype[p]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new O,this.destroy(e)),new u(((t,r)=>w(this,(n=>n&&n!==e?r(n):t(null)))))},Q.prototype.push=function(e,t){return X(this,e,t,!1)},Q.prototype.unshift=function(e,t){return X(this,e,t,!0)},Q.prototype.isPaused=function(){const e=this._readableState;return!0===e[$]||!1===e.flowing},Q.prototype.setEncoding=function(e){const t=new D(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},Q.prototype.read=function(e){_("read",e),void 0===e?e=NaN:o(e)||(e=s(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new A("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return _("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?de(this):Z(this),null;if(0===(e=Y(e,t))&&t.ended)return 0===t.length&&de(this),null;let n,i=!!(t.state&z);if(_("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&(i=!0,_("length less than watermark",i)),t.ended||t.reading||t.destroyed||t.errored||!t.constructed)i=!1,_("reading, ended or constructing",i);else if(i){_("do read"),t.state|=8|U,0===t.length&&(t.state|=z);try{this._read(t.highWaterMark)}catch(e){B(this,e)}t.state&=~U,t.reading||(e=Y(r,t))}return n=e>0?le(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&de(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},Q.prototype._read=function(e){throw new N("_read()")},Q.prototype.pipe=function(e,t){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new h(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),_("pipe count=%d opts=%j",i.pipes.length,t);const o=t&&!1===t.end||e===n.stdout||e===n.stderr?g:a;function a(){_("onend"),e.end()}let s;i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",(function t(n,o){_("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,_("cleanup"),e.removeListener("close",p),e.removeListener("finish",f),s&&e.removeListener("drain",s),e.removeListener("error",u),e.removeListener("unpipe",t),r.removeListener("end",a),r.removeListener("end",g),r.removeListener("data",c),l=!0,s&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&s())}));let l=!1;function d(){l||(1===i.pipes.length&&i.pipes[0]===e?(_("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(_("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),r.pause()),s||(s=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(_("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(_("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",s))}function c(t){_("ondata");const r=e.write(t);_("dest.write",r),!1===r&&d()}function u(t){if(_("onerror",t),g(),e.removeListener("error",u),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?B(e,t):e.emit("error",t)}}function p(){e.removeListener("finish",f),g()}function f(){_("onfinish"),e.removeListener("close",p),g()}function g(){_("unpipe"),r.unpipe(e)}return r.on("data",c),b(e,"error",u),e.once("close",p),e.once("finish",f),e.emit("pipe",r),!0===e.writableNeedDrain?d():i.flowing||(_("pipe resume"),r.resume()),e},Q.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t<e.length;t++)e[t].emit("unpipe",this,{hasUnpiped:!1});return this}const r=i(t.pipes,e);return-1===r||(t.pipes.splice(r,1),0===t.pipes.length&&this.pause(),e.emit("unpipe",this,{hasUnpiped:!1})),this},Q.prototype.on=function(e,t){const r=m.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,_("on readable",i.length,i.reading),i.length?Z(this):i.reading||n.nextTick(ie,this))),r},Q.prototype.addListener=Q.prototype.on,Q.prototype.removeListener=function(e,t){const r=m.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(ne,this),r},Q.prototype.off=Q.prototype.removeListener,Q.prototype.removeAllListeners=function(e){const t=m.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(ne,this),t},Q.prototype.resume=function(){const e=this._readableState;return e.flowing||(_("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(oe,e,t))}(this,e)),e[$]=!1,this},Q.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[$]=!0,this},Q.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{B(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=d(e);for(let t=1;t<r.length;t++){const n=r[t];void 0===this[n]&&"function"==typeof e[n]&&(this[n]=e[n].bind(e))}return this},Q.prototype[f]=function(){return se(this)},Q.prototype.iterator=function(e){return void 0!==e&&L(e,"options"),se(this,e)},l(Q.prototype,{readable:{__proto__:null,get(){const e=this._readableState;return!(!e||!1===e.readable||e.destroyed||e.errorEmitted||e.endEmitted)},set(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),l(J.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[$]},set(e){this[$]=!!e}}}),Q._fromList=le,Q.from=function(e,t){return P(Q,e,t)},Q.fromWeb=function(e,t){return pe().newStreamReadableFromReadableStream(e,t)},Q.toWeb=function(e,t){return pe().newReadableStreamFromStreamReadable(e,t)},Q.wrap=function(e,t){var r,n;return new Q({objectMode:null===(r=null!==(n=e.readableObjectMode)&&void 0!==n?n:e.objectMode)||void 0===r||r,...t,destroy(t,r){E.destroyer(e,t),r(t)}}).wrap(e)}},5291:(e,t,r)=>{const{MathFloor:n,NumberIsInteger:i}=r(4134),{validateInteger:o}=r(277),{ERR_INVALID_ARG_VALUE:a}=r(6371).codes;let s=16384,l=16;function d(e){return e?l:s}e.exports={getHighWaterMark:function(e,t,r,o){const s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,o,r);if(null!=s){if(!i(s)||s<0)throw new a(o?`options.${r}`:"options.highWaterMark",s);return n(s)}return d(e.objectMode)},getDefaultHighWaterMark:d,setDefaultHighWaterMark:function(e,t){o(t,"value",0),e?l=t:s=t}}},5001:(e,t,r)=>{const{ObjectSetPrototypeOf:n,Symbol:i}=r(4134);e.exports=d;const{ERR_METHOD_NOT_IMPLEMENTED:o}=r(6371).codes,a=r(3370),{getHighWaterMark:s}=r(5291);n(d.prototype,a.prototype),n(d,a);const l=i("kCallback");function d(e){if(!(this instanceof d))return new d(e);const t=e?s(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),a.call(this,e),this._readableState.sync=!1,this[l]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",u)}function c(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function u(){this._final!==c&&c.call(this)}d.prototype._final=c,d.prototype._transform=function(e,t,r){throw new o("_transform()")},d.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,o=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||o===n.length||n.length<n.highWaterMark?r():this[l]=r)}))},d.prototype._read=function(){if(this[l]){const e=this[l];this[l]=null,e()}}},6115:(e,t,r)=>{const{SymbolAsyncIterator:n,SymbolIterator:i,SymbolFor:o}=r(4134),a=o("nodejs.stream.destroyed"),s=o("nodejs.stream.errored"),l=o("nodejs.stream.readable"),d=o("nodejs.stream.writable"),c=o("nodejs.stream.disturbed"),u=o("nodejs.webstream.isClosedPromise"),h=o("nodejs.webstream.controllerErrorFunction");function p(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function f(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function g(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function v(e){return!(!e||g(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function m(e){return!(!e||g(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function b(e){return!(!e||g(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function y(e){if(!g(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[a]||null!=n&&n.destroyed)}function x(e){if(!f(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function w(e,t){if(!p(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function _(e){return e&&null!=e[l]?e[l]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!y(e)&&p(e)&&e.readable&&!w(e)}function S(e){return e&&null!=e[d]?e[d]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!y(e)&&f(e)&&e.writable&&!x(e)}function E(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function I(e){return"boolean"==typeof e._sent100&&E(e)}e.exports={isDestroyed:y,kIsDestroyed:a,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[c])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:c,isErrored:function(e){var t,r,n,i,o,a,l,d,c,u;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(o=null!==(a=e[s])&&void 0!==a?a:e.readableErrored)&&void 0!==o?o:e.writableErrored)&&void 0!==i?i:null===(l=e._readableState)||void 0===l?void 0:l.errorEmitted)&&void 0!==n?n:null===(d=e._writableState)||void 0===d?void 0:d.errorEmitted)&&void 0!==r?r:null===(c=e._readableState)||void 0===c?void 0:c.errored)&&void 0!==t?t:null===(u=e._writableState)||void 0===u?void 0:u.errored))},kIsErrored:s,isReadable:_,kIsReadable:l,kIsClosedPromise:u,kControllerErrorFunction:h,kIsWritable:d,isClosed:function(e){if(!g(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&E(e)?e._closed:null},isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return g(e)?!(!y(e)&&(!1!==(null==t?void 0:t.readable)&&_(e)||!1!==(null==t?void 0:t.writable)&&S(e))):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[n]:!1===t?"function"==typeof e[i]:"function"==typeof e[n]||"function"==typeof e[i])},isReadableNodeStream:p,isReadableStream:v,isReadableEnded:function(e){if(!p(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:w,isReadableErrored:function(e){var t,r;return g(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:g,isWebStream:function(e){return v(e)||m(e)||b(e)},isWritable:S,isWritableNodeStream:f,isWritableStream:m,isWritableEnded:x,isWritableFinished:function(e,t){if(!f(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return g(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:I,willEmitClose:function(e){if(!g(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&I(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:b}},8584:(e,t,r)=>{const n=r(5606),{ArrayPrototypeSlice:i,Error:o,FunctionPrototypeSymbolHasInstance:a,ObjectDefineProperty:s,ObjectDefineProperties:l,ObjectSetPrototypeOf:d,StringPrototypeToLowerCase:c,Symbol:u,SymbolHasInstance:h}=r(4134);e.exports=L,L.WritableState=C;const{EventEmitter:p}=r(7007),f=r(4259).Stream,{Buffer:g}=r(8287),v=r(5896),{addAbortSignal:m}=r(4147),{getHighWaterMark:b,getDefaultHighWaterMark:y}=r(5291),{ERR_INVALID_ARG_TYPE:x,ERR_METHOD_NOT_IMPLEMENTED:w,ERR_MULTIPLE_CALLBACK:_,ERR_STREAM_CANNOT_PIPE:S,ERR_STREAM_DESTROYED:E,ERR_STREAM_ALREADY_FINISHED:I,ERR_STREAM_NULL_VALUES:T,ERR_STREAM_WRITE_AFTER_END:j,ERR_UNKNOWN_ENCODING:k}=r(6371).codes,{errorOrDestroy:N}=v;function A(){}d(L.prototype,f.prototype),d(L,f);const R=u("kOnFinished");function C(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(3370)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?b(this,e,"writableHighWaterMark",n):y(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=M.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,O(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[R]=[]}function O(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function L(e){const t=this instanceof r(3370);if(!t&&!a(L,this))return new L(e);this._writableState=new C(e,this,t),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&m(e.signal,this)),f.call(this,e),v.construct(this,(()=>{const e=this._writableState;e.writing||U(this,e),H(this,e)}))}function $(e,t,r,i){const o=e._writableState;if("function"==typeof r)i=r,r=o.defaultEncoding;else{if(r){if("buffer"!==r&&!g.isEncoding(r))throw new k(r)}else r=o.defaultEncoding;"function"!=typeof i&&(i=A)}if(null===t)throw new T;if(!o.objectMode)if("string"==typeof t)!1!==o.decodeStrings&&(t=g.from(t,r),r="buffer");else if(t instanceof g)r="buffer";else{if(!f._isUint8Array(t))throw new x("chunk",["string","Buffer","Uint8Array"],t);t=f._uint8ArrayToBuffer(t),r="buffer"}let a;return o.ending?a=new j:o.destroyed&&(a=new E("write")),a?(n.nextTick(i,a),N(e,a,!0),a):(o.pendingcb++,function(e,t,r,n,i){const o=t.objectMode?1:r.length;t.length+=o;const a=t.length<t.highWaterMark;return a||(t.needDrain=!0),t.writing||t.corked||t.errored||!t.constructed?(t.buffered.push({chunk:r,encoding:n,callback:i}),t.allBuffers&&"buffer"!==n&&(t.allBuffers=!1),t.allNoop&&i!==A&&(t.allNoop=!1)):(t.writelen=o,t.writecb=i,t.writing=!0,t.sync=!0,e._write(r,n,t.onwrite),t.sync=!1),a&&!t.errored&&!t.destroyed}(e,o,t,r,i))}function D(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new E("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function P(e,t,r,n){--t.pendingcb,n(r),q(t),N(e,r)}function M(e,t){const r=e._writableState,i=r.sync,o=r.writecb;"function"==typeof o?(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t?(t.stack,r.errored||(r.errored=t),e._readableState&&!e._readableState.errored&&(e._readableState.errored=t),i?n.nextTick(P,e,r,t,o):P(e,r,t,o)):(r.buffered.length>r.bufferedIndex&&U(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===o?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:o,stream:e,state:r},n.nextTick(B,r.afterWriteTickInfo)):F(e,r,1,o))):N(e,new _)}function B({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,F(e,t,r,n)}function F(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&q(t),H(e,t)}function q(e){if(e.writing)return;for(let r=e.bufferedIndex;r<e.buffered.length;++r){var t;const{chunk:n,callback:i}=e.buffered[r],o=e.objectMode?1:n.length;e.length-=o,i(null!==(t=e.errored)&&void 0!==t?t:new E("write"))}const r=e[R].splice(0);for(let t=0;t<r.length;t++){var n;r[t](null!==(n=e.errored)&&void 0!==n?n:new E("end"))}O(e)}function U(e,t){if(t.corked||t.bufferProcessing||t.destroyed||!t.constructed)return;const{buffered:r,bufferedIndex:n,objectMode:o}=t,a=r.length-n;if(!a)return;let s=n;if(t.bufferProcessing=!0,a>1&&e._writev){t.pendingcb-=a-1;const n=t.allNoop?A:e=>{for(let t=s;t<r.length;++t)r[t].callback(e)},o=t.allNoop&&0===s?r:i(r,s);o.allBuffers=t.allBuffers,D(e,t,!0,t.length,o,"",n),O(t)}else{do{const{chunk:n,encoding:i,callback:a}=r[s];r[s++]=null,D(e,t,!1,o?1:n.length,n,i,a)}while(s<r.length&&!t.writing);s===r.length?O(t):s>256?(r.splice(0,s),t.bufferedIndex=0):t.bufferedIndex=s}t.bufferProcessing=!1}function z(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function H(e,t,r){z(t)&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)N(e,null!=i?i:_());else if(r=!0,t.pendingcb--,i){const r=t[R].splice(0);for(let e=0;e<r.length;e++)r[e](i);N(e,i,t.sync)}else z(t)&&(t.prefinished=!0,e.emit("prefinish"),t.pendingcb++,n.nextTick(V,e,t))}t.sync=!0,t.pendingcb++;try{e._final(i)}catch(e){i(e)}t.sync=!1}(e,t)))}(e,t),0===t.pendingcb&&(r?(t.pendingcb++,n.nextTick(((e,t)=>{z(t)?V(e,t):t.pendingcb--}),e,t)):z(t)&&(t.pendingcb++,V(e,t))))}function V(e,t){t.pendingcb--,t.finished=!0;const r=t[R].splice(0);for(let e=0;e<r.length;e++)r[e]();if(e.emit("finish"),t.autoDestroy){const t=e._readableState;(!t||t.autoDestroy&&(t.endEmitted||!1===t.readable))&&e.destroy()}}C.prototype.getBuffer=function(){return i(this.buffered,this.bufferedIndex)},s(C.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),s(L,h,{__proto__:null,value:function(e){return!!a(this,e)||this===L&&e&&e._writableState instanceof C}}),L.prototype.pipe=function(){N(this,new S)},L.prototype.write=function(e,t,r){return!0===$(this,e,t,r)},L.prototype.cork=function(){this._writableState.corked++},L.prototype.uncork=function(){const e=this._writableState;e.corked&&(e.corked--,e.writing||U(this,e))},L.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=c(e)),!g.isEncoding(e))throw new k(e);return this._writableState.defaultEncoding=e,this},L.prototype._write=function(e,t,r){if(!this._writev)throw new w("_write()");this._writev([{chunk:e,encoding:t}],r)},L.prototype._writev=null,L.prototype.end=function(e,t,r){const i=this._writableState;let a;if("function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e){const r=$(this,e,t);r instanceof o&&(a=r)}return i.corked&&(i.corked=1,this.uncork()),a||(i.errored||i.ending?i.finished?a=new I("end"):i.destroyed&&(a=new E("end")):(i.ending=!0,H(this,i,!0),i.ended=!0)),"function"==typeof r&&(a||i.finished?n.nextTick(r,a):i[R].push(r)),this},l(L.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(e){this._writableState&&(this._writableState.destroyed=e)}},writable:{__proto__:null,get(){const e=this._writableState;return!(!e||!1===e.writable||e.destroyed||e.errored||e.ending||e.ended)},set(e){this._writableState&&(this._writableState.writable=!!e)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){const e=this._writableState;return!!e&&!e.destroyed&&!e.ending&&e.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});const G=v.destroy;let W;function J(){return void 0===W&&(W={}),W}L.prototype.destroy=function(e,t){const r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[R].length)&&n.nextTick(q,r),G.call(this,e,t),this},L.prototype._undestroy=v.undestroy,L.prototype._destroy=function(e,t){t(e)},L.prototype[p.captureRejectionSymbol]=function(e){this.destroy(e)},L.fromWeb=function(e,t){return J().newStreamWritableFromWritableStream(e,t)},L.toWeb=function(e){return J().newWritableStreamFromStreamWritable(e)}},277:(e,t,r)=>{const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:o,ArrayPrototypeMap:a,NumberIsInteger:s,NumberIsNaN:l,NumberMAX_SAFE_INTEGER:d,NumberMIN_SAFE_INTEGER:c,NumberParseInt:u,ObjectPrototypeHasOwnProperty:h,RegExpPrototypeExec:p,String:f,StringPrototypeToUpperCase:g,StringPrototypeTrim:v}=r(4134),{hideStackFrames:m,codes:{ERR_SOCKET_BAD_PORT:b,ERR_INVALID_ARG_TYPE:y,ERR_INVALID_ARG_VALUE:x,ERR_OUT_OF_RANGE:w,ERR_UNKNOWN_SIGNAL:_}}=r(6371),{normalizeEncoding:S}=r(7760),{isAsyncFunction:E,isArrayBufferView:I}=r(7760).types,T={},j=/^[0-7]+$/,k=m(((e,t,r=c,n=d)=>{if("number"!=typeof e)throw new y(t,"number",e);if(!s(e))throw new w(t,"an integer",e);if(e<r||e>n)throw new w(t,`>= ${r} && <= ${n}`,e)})),N=m(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new y(t,"number",e);if(!s(e))throw new w(t,"an integer",e);if(e<r||e>n)throw new w(t,`>= ${r} && <= ${n}`,e)})),A=m(((e,t,r=!1)=>{if("number"!=typeof e)throw new y(t,"number",e);if(!s(e))throw new w(t,"an integer",e);const n=r?1:0,i=4294967295;if(e<n||e>i)throw new w(t,`>= ${n} && <= ${i}`,e)}));function R(e,t){if("string"!=typeof e)throw new y(t,"string",e)}const C=m(((e,t,r)=>{if(!i(r,e)){const n=o(a(r,(e=>"string"==typeof e?`'${e}'`:f(e))),", ");throw new x(t,e,"must be one of: "+n)}}));function O(e,t){if("boolean"!=typeof e)throw new y(t,"boolean",e)}function L(e,t,r){return null!=e&&h(e,t)?e[t]:r}const $=m(((e,t,r=null)=>{const i=L(r,"allowArray",!1),o=L(r,"allowFunction",!1);if(!L(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!o||"function"!=typeof e))throw new y(t,"Object",e)})),D=m(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new y(t,"a dictionary",e)})),P=m(((e,t,r=0)=>{if(!n(e))throw new y(t,"Array",e);if(e.length<r)throw new x(t,e,`must be longer than ${r}`)})),M=m(((e,t="buffer")=>{if(!I(e))throw new y(t,["Buffer","TypedArray","DataView"],e)})),B=m(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new y(t,"AbortSignal",e)})),F=m(((e,t)=>{if("function"!=typeof e)throw new y(t,"Function",e)})),q=m(((e,t)=>{if("function"!=typeof e||E(e))throw new y(t,"Function",e)})),U=m(((e,t)=>{if(void 0!==e)throw new y(t,"undefined",e)})),z=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function H(e,t){if(void 0===e||!p(z,e))throw new x(t,e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===p(j,e))throw new x(t,e,"must be a 32-bit unsigned integer or an octal string");e=u(e,8)}return A(e,t),e},validateArray:P,validateStringArray:function(e,t){P(e,t);for(let r=0;r<e.length;r++)R(e[r],`${t}[${r}]`)},validateBooleanArray:function(e,t){P(e,t);for(let r=0;r<e.length;r++)O(e[r],`${t}[${r}]`)},validateAbortSignalArray:function(e,t){P(e,t);for(let r=0;r<e.length;r++){const n=e[r],i=`${t}[${r}]`;if(null==n)throw new y(i,"AbortSignal",n);B(n,i)}},validateBoolean:O,validateBuffer:M,validateDictionary:D,validateEncoding:function(e,t){const r=S(t),n=e.length;if("hex"===r&&n%2!=0)throw new x("encoding",t,`is invalid for data of length ${n}`)},validateFunction:F,validateInt32:N,validateInteger:k,validateNumber:function(e,t,r=void 0,n){if("number"!=typeof e)throw new y(t,"number",e);if(null!=r&&e<r||null!=n&&e>n||(null!=r||null!=n)&&l(e))throw new w(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:$,validateOneOf:C,validatePlainFunction:q,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===v(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new b(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(R(e,t),void 0===T[e]){if(void 0!==T[g(e)])throw new _(e+" (signals must use all capital letters)");throw new _(e)}},validateString:R,validateUint32:A,validateUndefined:U,validateUnion:function(e,t,r){if(!i(r,e))throw new y(t,`('${o(r,"|")}')`,e)},validateAbortSignal:B,validateLinkHeaderValue:function(e){if("string"==typeof e)return H(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n<t;n++){const i=e[n];H(i,"hints"),r+=i,n!==t-1&&(r+=", ")}return r}throw new x("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}},9198:(e,t,r)=>{const n=r(5506),i=r(3095),o=n.Readable.destroy;e.exports=n.Readable,e.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,e.exports._isUint8Array=n._isUint8Array,e.exports.isDisturbed=n.isDisturbed,e.exports.isErrored=n.isErrored,e.exports.isReadable=n.isReadable,e.exports.Readable=n.Readable,e.exports.Writable=n.Writable,e.exports.Duplex=n.Duplex,e.exports.Transform=n.Transform,e.exports.PassThrough=n.PassThrough,e.exports.addAbortSignal=n.addAbortSignal,e.exports.finished=n.finished,e.exports.destroy=n.destroy,e.exports.destroy=o,e.exports.pipeline=n.pipeline,e.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),e.exports.Stream=n.Stream,e.exports.default=e.exports},6371:(e,t,r)=>{const{format:n,inspect:i,AggregateError:o}=r(7760),a=globalThis.AggregateError||o,s=Symbol("kIsNodeError"),l=["string","function","number","object","Function","Object","boolean","bigint","symbol"],d=/^([A-Z][a-z0-9]*)+$/,c={};function u(e,t){if(!e)throw new c.ERR_INTERNAL_ASSERTION(t)}function h(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function p(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return u(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const i=(t.match(/%[dfijoOs]/g)||[]).length;return u(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[s]=!0,c[e]=i}function f(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class g extends Error{constructor(e="The operation was aborted",t=void 0){if(void 0!==t&&"object"!=typeof t)throw new c.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}p("ERR_ASSERTION","%s",Error),p("ERR_INVALID_ARG_TYPE",((e,t,r)=>{u("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const o=[],a=[],s=[];for(const e of t)u("string"==typeof e,"All expected entries have to be of type string"),l.includes(e)?o.push(e.toLowerCase()):d.test(e)?a.push(e):(u("object"!==e,'The value "object" should be written as "Object"'),s.push(e));if(a.length>0){const e=o.indexOf("object");-1!==e&&(o.splice(o,e,1),a.push("Object"))}if(o.length>0){switch(o.length){case 1:n+=`of type ${o[0]}`;break;case 2:n+=`one of type ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`one of type ${o.join(", ")}, or ${e}`}}(a.length>0||s.length>0)&&(n+=" or ")}if(a.length>0){switch(a.length){case 1:n+=`an instance of ${a[0]}`;break;case 2:n+=`an instance of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`an instance of ${a.join(", ")}, or ${e}`}}s.length>0&&(n+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(n+="an "),n+=`${s[0]}`;break;case 2:n+=`one of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`one of ${s.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var c;null!==(c=r.constructor)&&void 0!==c&&c.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${i(r,{depth:-1})}`}else{let e=i(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),p("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=i(t);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),p("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),p("ERR_MISSING_ARGS",((...e)=>{let t;u(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),p("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return u(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=h(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=h(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),p("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),p("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),p("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),p("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),p("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),p("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),p("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),p("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),p("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),p("ERR_STREAM_WRITE_AFTER_END","write after end",Error),p("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:g,aggregateTwoErrors:f((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new a([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:f,codes:c}},4134:e=>{e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),PromiseResolve:e=>Promise.resolve(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Boolean,Uint8Array}},7760:(e,t,r)=>{const n=r(8287),{kResistStopPropagation:i,SymbolDispose:o}=r(4134),a=globalThis.AbortSignal||r(5568).AbortSignal,s=globalThis.AbortController||r(5568).AbortController,l=Object.getPrototypeOf((async function(){})).constructor,d=globalThis.Blob||n.Blob,c=void 0!==d?function(e){return e instanceof d}:function(e){return!1},u=(e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new ERR_INVALID_ARG_TYPE(t,"AbortSignal",e)};class h extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r<e.length;r++)t+=` ${e[r].stack}\n`;super(t),this.name="AggregateError",this.errors=e}}e.exports={AggregateError:h,kEmptyObject:Object.freeze({}),once(e){let t=!1;return function(...r){t||(t=!0,e.apply(this,r))}},createDeferredPromise:function(){let e,t;return{promise:new Promise(((r,n)=>{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof l,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:c,deprecate:(e,t)=>e,addAbortListener:r(7007).addAbortListener||function(e,t){if(void 0===e)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);let r;return u(e,"signal"),(e=>{if("function"!=typeof e)throw new ERR_INVALID_ARG_TYPE("listener","Function",e)})(t),e.aborted?queueMicrotask((()=>t())):(e.addEventListener("abort",t,{__proto__:null,once:!0,[i]:!0}),r=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[o](){var e;null===(e=r)||void 0===e||e()}}},AbortSignalAny:a.any||function(e){if(1===e.length)return e[0];const t=new s,r=()=>t.abort();return e.forEach((e=>{u(e,"signals"),e.addEventListener("abort",r,{once:!0})})),t.signal.addEventListener("abort",(()=>{e.forEach((e=>e.removeEventListener("abort",r)))}),{once:!0}),t.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},5506:(e,t,r)=>{const{Buffer:n}=r(8287),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:a}=r(4134),{promisify:{custom:s}}=r(7760),{streamReturningOperators:l,promiseReturningOperators:d}=r(823),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=r(6371),u=r(7830),{setDefaultHighWaterMark:h,getDefaultHighWaterMark:p}=r(5291),{pipeline:f}=r(7758),{destroyer:g}=r(5896),v=r(6238),m=r(3095),b=r(6115),y=e.exports=r(4259).Stream;y.isDestroyed=b.isDestroyed,y.isDisturbed=b.isDisturbed,y.isErrored=b.isErrored,y.isReadable=b.isReadable,y.isWritable=b.isWritable,y.Readable=r(7576);for(const w of o(l)){const _=l[w];function S(...e){if(new.target)throw c();return y.Readable.from(a(_,this,e))}i(S,"name",{__proto__:null,value:_.name}),i(S,"length",{__proto__:null,value:_.length}),i(y.Readable.prototype,w,{__proto__:null,value:S,enumerable:!1,configurable:!0,writable:!0})}for(const E of o(d)){const I=d[E];function T(...e){if(new.target)throw c();return a(I,this,e)}i(T,"name",{__proto__:null,value:I.name}),i(T,"length",{__proto__:null,value:I.length}),i(y.Readable.prototype,E,{__proto__:null,value:T,enumerable:!1,configurable:!0,writable:!0})}y.Writable=r(8584),y.Duplex=r(3370),y.Transform=r(5001),y.PassThrough=r(6524),y.pipeline=f;const{addAbortSignal:x}=r(4147);y.addAbortSignal=x,y.finished=v,y.destroy=g,y.compose=u,y.setDefaultHighWaterMark=h,y.getDefaultHighWaterMark=p,i(y,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>m}),i(f,s,{__proto__:null,enumerable:!0,get:()=>m.pipeline}),i(v,s,{__proto__:null,enumerable:!0,get:()=>m.finished}),y.Stream=y,y._isUint8Array=function(e){return e instanceof Uint8Array},y._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},3095:(e,t,r)=>{const{ArrayPrototypePop:n,Promise:i}=r(4134),{isIterable:o,isNodeStream:a,isWebStream:s}=r(6115),{pipelineImpl:l}=r(7758),{finished:d}=r(6238);r(5506),e.exports={finished:d,pipeline:function(...e){return new i(((t,r)=>{let i,d;const c=e[e.length-1];if(c&&"object"==typeof c&&!a(c)&&!o(c)&&!s(c)){const t=n(e);i=t.signal,d=t.end}l(e,((e,n)=>{e?r(e):t(n)}),{signal:i,end:d})}))}}},2791:function(e,t,r){!function(e){if(!e.setImmediate){var t,r,n,i,o,a=1,s={},l=!1,d=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,"[object process]"==={}.toString.call(e.process)?t=function(e){process.nextTick((function(){h(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(i="setImmediate$"+Math.random()+"$",o=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&h(+t.data.slice(i.length))},e.addEventListener?e.addEventListener("message",o,!1):e.attachEvent("onmessage",o),t=function(t){e.postMessage(i+t,"*")}):e.MessageChannel?((n=new MessageChannel).port1.onmessage=function(e){h(e.data)},t=function(e){n.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,t=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):t=function(e){setTimeout(h,0,e)},c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var r=new Array(arguments.length-1),n=0;n<r.length;n++)r[n]=arguments[n+1];var i={callback:e,args:r};return s[a]=i,t(a),a++},c.clearImmediate=u}function u(e){delete s[e]}function h(e){if(l)setTimeout(h,0,e);else{var t=s[e];if(t){l=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(undefined,r)}}(t)}finally{u(e),l=!1}}}}}("undefined"==typeof self?void 0===r.g?this:r.g:self)},3141:(e,t,r)=>{var n=r(5003).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=d,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=u,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function d(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},5003:(e,t,r)=>{var n=r(8287),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},259:e=>{e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},8799:(e,t,r)=>{function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new s(r,null,t,e):new s(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function o(e,t){e.tail=new s(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function a(e,t){e.head=new s(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function s(e,t,r,n){if(!(this instanceof s))return new s(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=s,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)a(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,o=this.head;null!==o&&n<e;n++)o=o.next;var a=[];for(n=0;o&&n<t;n++)a.push(o.value),o=this.removeNode(o);for(null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev),n=0;n<r.length;n++)o=i(this,o,r[n]);return a},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(259)(n)}catch(e){}},7789:()=>{}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};r.d(n,{TS:()=>Ke,aH:()=>Qe,k_:()=>pe,a6:()=>Es,nt:()=>X,Sx:()=>K,E7:()=>z,F3:()=>he});var i={};r.r(i),r.d(i,{anyAtomicType:()=>Nr,anySimpleType:()=>kr,anyURI:()=>Xr,base64Binary:()=>Qr,boolean:()=>$r,byte:()=>ln,date:()=>Ur,dateTime:()=>Fr,dateTimeStamp:()=>mn,dayTimeDuration:()=>vn,decimal:()=>Dr,double:()=>Mr,duration:()=>Br,float:()=>Pr,gDay:()=>Gr,gMonth:()=>Wr,gMonthDay:()=>Vr,gYear:()=>Hr,gYearMonth:()=>zr,hexBinary:()=>Jr,int:()=>an,integer:()=>tn,language:()=>en,long:()=>on,negativeInteger:()=>nn,nonNegativeInteger:()=>dn,nonPositiveInteger:()=>rn,normalizedString:()=>Yr,positiveInteger:()=>fn,short:()=>sn,string:()=>Lr,time:()=>qr,token:()=>Zr,unsignedByte:()=>pn,unsignedInt:()=>un,unsignedLong:()=>cn,unsignedShort:()=>hn,yearMonthDuration:()=>gn});const o="http://www.w3.org/1999/02/22-rdf-syntax-ns#",a="http://www.w3.org/2001/XMLSchema#",s="http://www.w3.org/2000/10/swap/",l={xsd:{decimal:`${a}decimal`,boolean:`${a}boolean`,double:`${a}double`,integer:`${a}integer`,string:`${a}string`},rdf:{type:`${o}type`,nil:`${o}nil`,first:`${o}first`,rest:`${o}rest`,langString:`${o}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${s}reify#forSome`,forAll:`${s}reify#forAll`},log:{implies:`${s}log#implies`}},{rdf:d,xsd:c}=l;let u,h=0;const p={namedNode:function(e){return new v(e)},blankNode:function(e){return new b(e||"n3-"+h++)},variable:function(e){return new y(e)},literal:function(e,t){if("string"==typeof t)return new m(`"${e}"@${t.toLowerCase()}`);let r=t?t.value:"";return""===r&&("boolean"==typeof e?r=c.boolean:"number"==typeof e&&(Number.isFinite(e)?r=Number.isInteger(e)?c.integer:c.double:(r=c.double,Number.isNaN(e)||(e=e>0?"INF":"-INF")))),""===r||r===c.string?new m(`"${e}"`):new m(`"${e}"^^${r}`)},defaultGraph:function(){return u},quad:S,triple:S},f=p;class g{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof g?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 v extends g{get termType(){return"NamedNode"}}class m extends g{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 v(this.datatypeString)}get datatypeString(){const e=this.id,t=e.lastIndexOf('"')+1,r=t<e.length?e[t]:"";return"^"===r?e.substr(t+2):"@"!==r?c.string:d.langString}equals(e){return e instanceof m?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 b extends g{constructor(e){super(`_:${e}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class y extends g{constructor(e){super(`?${e}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}function x(e,t,r){if(t=t||p,!e)return t.defaultGraph();switch(e[0]){case"?":return t.variable(e.substr(1));case"_":return t.blankNode(e.substr(2));case'"':if(t===p)return new m(e);if('"'===e[e.length-1])return t.literal(e.substr(1,e.length-2));const n=e.lastIndexOf('"',e.length-1);return t.literal(e.substr(1,n-1),"@"===e[n+1]?e.substr(n+2):t.namedNode(e.substr(n+3)));case"[":e=JSON.parse(e);break;default:if(!r||!Array.isArray(e))return t.namedNode(e)}return t.quad(x(e[0],t,!0),x(e[1],t,!0),x(e[2],t,!0),e[3]&&x(e[3],t,!0))}function w(e,t){if("string"==typeof e)return e;if(e instanceof g&&"Quad"!==e.termType)return e.id;if(!e)return u.id;switch(e.termType){case"NamedNode":return e.value;case"BlankNode":return`_:${e.value}`;case"Variable":return`?${e.value}`;case"DefaultGraph":return"";case"Literal":return`"${e.value}"${e.language?`@${e.language}`:e.datatype&&e.datatype.value!==c.string?`^^${e.datatype.value}`:""}`;case"Quad":const r=[w(e.subject,!0),w(e.predicate,!0),w(e.object,!0)];return e.graph&&"DefaultGraph"!==e.graph.termType&&r.push(w(e.graph,!0)),t?r:JSON.stringify(r);default:throw new Error(`Unexpected termType: ${e.termType}`)}}u=new class extends g{constructor(){return super(""),u||this}get termType(){return"DefaultGraph"}equals(e){return this===e||!!e&&this.termType===e.termType}};class _ extends g{constructor(e,t,r,n){super(""),this._subject=e,this._predicate=t,this._object=r,this._graph=n||u}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 S(e,t,r,n){return new _(e,t,r,n)}const E="http://www.w3.org/ns/shacl#",I="http://www.w3.org/2001/XMLSchema#",T="http://www.w3.org/1999/02/22-rdf-syntax-ns#",j="http://www.w3.org/2000/01/rdf-schema#",k="http://www.w3.org/2004/02/skos/core#",N="http://www.w3.org/2002/07/owl#",A=f.namedNode("shapes"),R=f.namedNode(N+"imports"),C=f.namedNode(T+"type"),O=f.namedNode("http://purl.org/dc/terms/conformsTo"),L=f.namedNode(j+"subClassOf"),$=f.namedNode(k+"broader"),D=f.namedNode(N+"NamedIndividual"),P=f.namedNode(E+"NodeShape"),M=f.namedNode(E+"IRI"),B=f.namedNode(E+"class"),F=f.namedNode(E+"targetClass"),q=f.namedNode(E+"nodeKind");function U(e,t,r=E,n){let i="";const o=function(e,t,r=E,n){let i;const o=r+t;if(null==n?void 0:n.length){for(const t of n)for(const r of e)if(r.predicate.value===o){if(r.object.id.endsWith(`@${t}`))return r.object;r.object.id.indexOf("@")<0?i=r.object:i||(i=r.object)}}else for(const t of e)if(t.predicate.value===o)return t.object;return i}(e,t,r,n);return o&&(i=o.value),i}function z(e,t){return U(e,"prefLabel",k,t)||U(e,"label",j,t)}function H(e,t,r){const n=[];for(const i of e)n.push({value:i,label:z(t.getQuads(i,null,null,null),r)});return n}function V(e,t){for(const r in t)e=e.replace(t[r],"");return e}function G(e,t){const r=t.shapesGraph.getSubjects(C,e,null);r.push(...t.dataGraph.getSubjects(C,e,null));const n=H(r,t.shapesGraph,t.languages);for(const r of t.shapesGraph.getSubjects(L,e,null))n.push(...G(r,t));if(t.shapesGraph.has(new _(e,C,D,A))){n.push(...H([e],t.shapesGraph,t.languages));for(const r of t.shapesGraph.getSubjects($,e,null))n.push(...G(r,t))}return n}function W(e){let t;try{t=new URL(e)}catch(e){return!1}return"http:"===t.protocol||"https:"===t.protocol}function J(e,t,r){const n=document.createElement("div");n.classList.add("shacl-or-constraint");const i=[];if(i.push({label:"--- please choose ---",value:""}),t instanceof Ee){const o=[];for(let n=0;n<e.length;n++){const a=new fe(e[n],r,t.nodeId);o.push(a),i.push({label:a.template.label,value:n.toString()})}const a=r.theme.createListEditor("Please choose",null,!1,i),s=a.querySelector(".editor");s.onchange=()=>{s.value&&n.replaceWith(o[parseInt(s.value)])},n.appendChild(a)}else{const o=[];for(let t=0;t<e.length;t++){const n=r.shapesGraph.getQuads(e[t],null,null,A);n.length&&(o.push(n),i.push({label:z(n,r.languages)||V(n[0].predicate.value,r.prefixes)+" = "+V(n[0].object.value,r.prefixes),value:t.toString()}))}const a=r.theme.createListEditor(t.template.label+"?",null,!1,i,t.template),s=a.querySelector(".editor");s.onchange=()=>{s.value&&n.replaceWith(ge(t.template.clone().merge(o[parseInt(s.value)]),void 0,!0))},n.appendChild(a)}return n}const Q={[`${E}name`]:(e,t)=>{const r=t;e.name&&r.language!==e.config.attributes.language||(e.name=r)},[`${E}description`]:(e,t)=>{const r=t;e.description&&r.language!==e.config.attributes.language||(e.description=r)},[`${E}path`]:(e,t)=>{e.path=t.value},[`${E}node`]:(e,t)=>{e.node=t},[`${E}datatype`]:(e,t)=>{e.datatype=t},[`${E}nodeKind`]:(e,t)=>{e.nodeKind=t},[`${E}minCount`]:(e,t)=>{e.minCount=parseInt(t.value)},[`${E}maxCount`]:(e,t)=>{e.maxCount=parseInt(t.value)},[`${E}minLength`]:(e,t)=>{e.minLength=parseInt(t.value)},[`${E}maxLength`]:(e,t)=>{e.maxLength=parseInt(t.value)},[`${E}minInclusive`]:(e,t)=>{e.minInclusive=parseInt(t.value)},[`${E}maxInclusive`]:(e,t)=>{e.maxInclusive=parseInt(t.value)},[`${E}minExclusive`]:(e,t)=>{e.minExclusive=parseInt(t.value)},[`${E}maxExclusive`]:(e,t)=>{e.maxExclusive=parseInt(t.value)},[`${E}pattern`]:(e,t)=>{e.pattern=t.value},[`${E}order`]:(e,t)=>{e.order=parseInt(t.value)},"http://datashapes.org/dash#singleLine":(e,t)=>{e.singleLine="true"===t.value},"http://www.w3.org/ns/oa#styleClass":(e,t)=>{e.cssClass=t.value},[`${E}and`]:(e,t)=>{e.shaclAnd=t.value},[`${E}in`]:(e,t)=>{e.shaclIn=t.value},[`${E}languageIn`]:(e,t)=>{e.languageIn=e.config.lists[t.value],e.datatype=f.namedNode(T+"langString")},[`${E}defaultValue`]:(e,t)=>{e.defaultValue=t},[`${E}hasValue`]:(e,t)=>{e.hasValue=t},[B.value]:(e,t)=>{e.class=t;const r=e.config.shapesGraph.getSubjects(F,t,A);r.length>0&&(e.node=r[0])},[`${E}or`]:(e,t)=>{const r=e.config.lists[t.value];(null==r?void 0:r.length)?e.shaclOr=r:console.error("list not found:",t.value,"existing lists:",e.config.lists)}};class X{constructor(e,t,r){this.label="",this.config=r,this.nodeId=t,this.merge(e)}merge(e){var t,r;for(const r of e)null===(t=Q[r.predicate.id])||void 0===t||t.call(this,this,r.object);if(this.label=(null===(r=this.name)||void 0===r?void 0:r.value)||z(e,this.config.languages),this.label||this.shaclAnd||(this.label=this.path?V(this.path,this.config.prefixes):"unknown"),(this.node||this.shaclAnd)&&(this.extendedShapes=[],this.node&&this.extendedShapes.push(this.node),this.shaclAnd)){const e=this.config.lists[this.shaclAnd];if(null==e?void 0:e.length)for(const t of e)this.extendedShapes.push(t)}return this}clone(){const e=Object.assign({},this);return e.merge=this.merge.bind(e),e.clone=this.clone.bind(e),e}}class K{constructor(e){let t="form { box-sizing: border-box; display:block; --label-width: 8em; --caret-size: 10px; }\nform.mode-edit { padding-left: 1em; }\nform *, form ::after, form ::before { box-sizing: inherit; }\nshacl-node, .shacl-group { display: flex; flex-direction: column; width: 100%; position: relative; }\nshacl-node .control-button { text-decoration: none; cursor: pointer; border: 1px solid transparent; border-radius: 4px; padding: 2px 4px; }\nshacl-node .control-button:hover { border-color: inherit; }\nshacl-node .remove-button { margin-left: 4px; }\nshacl-node .add-button { font-size: 0.8rem; color: #555; margin: 4px 24px 0 0; }\nshacl-node .add-button:before { content: '+'; margin-right: 0.2em; }\nshacl-node .add-button:hover { color: inherit; }\nshacl-node h1 { font-size: 1.1rem; border-bottom: 1px solid; margin-top: 4px; color: #555; }\nshacl-property { display: flex; flex-direction: column; align-items: end; position: relative; }\nshacl-property:not(.may-add) > .add-button { display: none; }\nshacl-property:not(.may-remove) > .property-instance > .remove-button:not(.persistent) { visibility: hidden; }\nshacl-property:not(.may-remove) > .shacl-or-constraint > .remove-button:not(.persistent) { visibility: hidden; }\n.shacl-group { margin-bottom: 1em; padding-bottom: 1em; }\n.mode-view .shacl-group:not(:has(shacl-property)) { display: none; }\n.property-instance, .shacl-or-constraint { display: flex; align-items: flex-start; padding: 4px 0; width: 100%; position: relative; }\n.shacl-or-constraint label { display: inline-block; word-break: break-word; width: var(--label-width); line-height: 1em; padding-top: 0.15em; padding-right: 1em; flex-shrink: 0; position: relative; }\n.property-instance label[title] { cursor: help; text-decoration: underline dashed #AAA; }\n.mode-edit .property-instance label.required::before { color: red; content: '\\2736'; font-size: 0.6rem; position: absolute; left: -1.4em; top: 0.15rem; }\n.property-instance.valid::before { position: absolute; left: calc(var(--label-width) - 1em); top: 6px; color: green; content: '\\2713'; }\n.editor:not([type='checkbox']), .shacl-or-constraint select { flex-grow: 1; }\n.shacl-or-constraint select { border: 1px solid #DDD; padding: 2px 4px; }\nselect { overflow: hidden; text-overflow: ellipsis; }\ntextarea.editor { resize: vertical; }\n.lang-chooser { position: absolute; top: 5px; right: 28px; border: 0; background-color: #e9e9ed; padding: 2px 4px; max-width: 40px; width: 40px; box-sizing: content-box; }\n.lang-chooser+.editor { padding-right: 55px; }\n.validation-error { position: absolute; left: calc(var(--label-width) - 1em); top: 6px; color: red; cursor: help; }\n.validation-error::before { content: '\\26a0' }\n.validation-error.node { left: -1em; }\n.invalid > .editor { border-color: red !important; }\n.ml-0 { margin-left: 0 !important; }\n.pr-0 { padding-right: 0 !important; }\n.mode-view .property-instance:not(:first-child) > label { visibility: hidden; }\n.mode-view .property-instance label { width: var(--label-width); }\n\n.d-flex { display: flex; }\n.lang { opacity: 0.65; font-size: 0.6em; }\na, a:visited { color: inherit; }\n\n.fadeIn, .fadeOut { animation: fadeIn 0.2s ease-out; }\n.fadeOut { animation-direction: reverse; animation-timing-function: ease-out;}\n@keyframes fadeIn {\n 0% { opacity: 0; transform: scaleY(0.8); }\n 100% { opacity: 1; transform: scaleY(1); }\n}\n \n.collapsible > .activator { display: flex; justify-content: space-between; align-items: center; cursor: pointer; width: 100%; border: 0; padding: 8px 0; transition: 0.2s; }\n.collapsible > .activator:hover, .collapsible.open > .activator { background-color: #F5F5F5; }\n.collapsible > .activator::after { content:''; width: var(--caret-size); height: var(--caret-size); border-style: none solid solid none; border-width: calc(0.3 * var(--caret-size)); transform: rotate(45deg); transition: transform .15s ease-out; margin-right: calc(0.5 * var(--caret-size)); }\n.collapsible.open > .activator::after { transform: rotate(225deg); }\n.collapsible > *:not(.activator) { transition: all 0.2s ease-out; opacity: 1; }\n.collapsible:not(.open) > *:not(.activator) { max-height: 0; padding: 0; opacity: 0; overflow: hidden; }\n.collapsible > .property-instance > shacl-node > h1 { display: none; }\n.collapsible.open > .property-instance:nth-child(odd) { background-color: #F5F5F5; }\n.ref-link { cursor: pointer; }\n.ref-link:hover { text-decoration: underline; }\n.node-id-display { color: #999; font-size: 11px; }";e&&(t+="\n"+e),this.stylesheet=new CSSStyleSheet,this.stylesheet.replaceSync(t)}apply(e){}createViewer(e,t,r){const n=document.createElement("div"),i=document.createElement("label");i.innerHTML=e+":",r.description&&i.setAttribute("title",r.description.value),n.appendChild(i);let o,a=t.value,s=null;if(t instanceof v){const e=r.config.shapesGraph.getQuads(a,null,null,A);if(e.length){const t=z(e,r.config.languages);t&&(a=t)}}else t instanceof m&&(t.language?(s=document.createElement("span"),s.classList.add("lang"),s.innerText=`@${t.language}`):t.datatype.value===`${I}date`?a=new Date(Date.parse(t.value)).toDateString():t.datatype.value===`${I}dateTime`&&(a=new Date(Date.parse(t.value)).toLocaleString()));return W(t.value)?(o=document.createElement("a"),o.setAttribute("href",t.value)):o=document.createElement("div"),o.classList.add("d-flex"),o.innerText=a,s&&o.appendChild(s),n.appendChild(o),n}}function Y(e,t){var r,n,i;if(e.config.editMode){const o=void 0!==e.minCount&&e.minCount>0;if(e.class)return e.config.theme.createListEditor(e.label,t,o,G(e.class,e.config),e);if(e.shaclIn){const r=e.config.lists[e.shaclIn];if(null==r?void 0:r.length){const n=H(r,e.config.shapesGraph,e.config.languages);return e.config.theme.createListEditor(e.label,t,o,n,e)}console.error("list not found:",e.shaclIn,"existing lists:",e.config.lists)}if((null===(r=e.datatype)||void 0===r?void 0:r.value)===`${T}langString`||(null===(n=e.languageIn)||void 0===n?void 0:n.length))return e.config.theme.createLangStringEditor(e.label,t,o,e);switch(null===(i=e.datatype)||void 0===i?void 0:i.value.replace(I,"")){case"integer":case"float":case"double":case"decimal":return e.config.theme.createNumberEditor(e.label,t,o,e);case"date":case"dateTime":return e.config.theme.createDateEditor(e.label,t,o,e);case"boolean":return e.config.theme.createBooleanEditor(e.label,t,o,e);case"base64Binary":return e.config.theme.createFileEditor(e.label,t,o,e)}return e.config.theme.createTextEditor(e.label,t,o,e)}{if(t)return e.config.theme.createViewer(e.label,t,e);const r=document.createElement("div");return r.innerHTML="No value",r}}function Z(e){return!!e&&"DefaultGraph"===e.termType}const ee=f.defaultGraph(),{rdf:te,xsd:re}=l,ne=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,ie=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,oe={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class ae extends g{equals(e){return e===this}}class se{constructor(e,t){if(this._prefixRegex=/$0^/,e&&"function"!=typeof e.write&&(t=e,e=null),t=t||{},this._lists=t.lists,e)this._outputStream=e,this._endStream=void 0===t.end||!!t.end;else{let e="";this._outputStream={write(t,r,n){e+=t,n&&n()},end:t=>{t&&t(null,e)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(t.format)?(this._lineMode=!0,this._writeQuad=this._writeQuadLine):(this._lineMode=!1,this._graph=ee,this._prefixIRIs=Object.create(null),t.prefixes&&this.addPrefixes(t.prefixes),t.baseIRI&&(this._baseMatcher=new RegExp(`^${de(t.baseIRI)}${t.baseIRI.endsWith("/")?"":"[#?]"}`),this._baseLength=t.baseIRI.length))}get _inDefaultGraph(){return ee.equals(this._graph)}_write(e,t){this._outputStream.write(e,"utf8",t)}_writeQuad(e,t,r,n,i){try{n.equals(this._graph)||(this._write((null===this._subject?"":this._inDefaultGraph?".\n":"\n}\n")+(ee.equals(n)?"":`${this._encodeIriOrBlank(n)} {\n`)),this._graph=n,this._subject=null),e.equals(this._subject)?t.equals(this._predicate)?this._write(`, ${this._encodeObject(r)}`,i):this._write(`;\n ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i):this._write(`${(null===this._subject?"":".\n")+this._encodeSubject(this._subject=e)} ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i)}catch(e){i&&i(e)}}_writeQuadLine(e,t,r,n,i){delete this._prefixMatch,this._write(this.quadToString(e,t,r,n),i)}quadToString(e,t,r,n){return`${this._encodeSubject(e)} ${this._encodeIriOrBlank(t)} ${this._encodeObject(r)}${n&&n.value?` ${this._encodeIriOrBlank(n)} .\n`:" .\n"}`}quadsToString(e){let t="";for(const r of e)t+=this.quadToString(r.subject,r.predicate,r.object,r.graph);return t}_encodeSubject(e){return"Quad"===e.termType?this._encodeQuad(e):this._encodeIriOrBlank(e)}_encodeIriOrBlank(e){if("NamedNode"!==e.termType)return this._lists&&e.value in this._lists&&(e=this.list(this._lists[e.value])),"id"in e?e.id:`_:${e.value}`;let t=e.value;this._baseMatcher&&this._baseMatcher.test(t)&&(t=t.substr(this._baseLength)),ne.test(t)&&(t=t.replace(ie,le));const r=this._prefixRegex.exec(t);return r?r[1]?this._prefixIRIs[r[1]]+r[2]:t:`<${t}>`}_encodeLiteral(e){let t=e.value;if(ne.test(t)&&(t=t.replace(ie,le)),e.language)return`"${t}"@${e.language}`;if(this._lineMode){if(e.datatype.value===re.string)return`"${t}"`}else switch(e.datatype.value){case re.string:return`"${t}"`;case re.boolean:if("true"===t||"false"===t)return t;break;case re.integer:if(/^[+-]?\d+$/.test(t))return t;break;case re.decimal:if(/^[+-]?\d*\.\d+$/.test(t))return t;break;case re.double:if(/^[+-]?(?:\d+\.\d*|\.?\d+)[eE][+-]?\d+$/.test(t))return t}return`"${t}"^^${this._encodeIriOrBlank(e.datatype)}`}_encodePredicate(e){return e.value===te.type?"a":this._encodeIriOrBlank(e)}_encodeObject(e){switch(e.termType){case"Quad":return this._encodeQuad(e);case"Literal":return this._encodeLiteral(e);default:return this._encodeIriOrBlank(e)}}_encodeQuad({subject:e,predicate:t,object:r,graph:n}){return`<<${this._encodeSubject(e)} ${this._encodePredicate(t)} ${this._encodeObject(r)}${Z(n)?"":` ${this._encodeIriOrBlank(n)}`}>>`}_blockedWrite(){throw new Error("Cannot write because the writer has been closed.")}addQuad(e,t,r,n,i){void 0===r?this._writeQuad(e.subject,e.predicate,e.object,e.graph,t):"function"==typeof n?this._writeQuad(e,t,r,ee,n):this._writeQuad(e,t,r,n||ee,i)}addQuads(e){for(let t=0;t<e.length;t++)this.addQuad(e[t])}addPrefix(e,t,r){const n={};n[e]=t,this.addPrefixes(n,r)}addPrefixes(e,t){if(!this._prefixIRIs)return t&&t();let r=!1;for(let t in e){let n=e[t];"string"!=typeof n&&(n=n.value),r=!0,null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null,this._graph=""),this._prefixIRIs[n]=t+=":",this._write(`@prefix ${t} <${n}>.\n`)}if(r){let e="",t="";for(const r in this._prefixIRIs)e+=e?`|${r}`:r,t+=(t?"|":"")+this._prefixIRIs[r];e=de(e),this._prefixRegex=new RegExp(`^(?:${t})[^/]*$|^(${e})([_a-zA-Z][\\-_a-zA-Z0-9]*)$`)}this._write(r?"\n":"",t)}blank(e,t){let r,n,i=e;switch(void 0===e?i=[]:e.termType?i=[{predicate:e,object:t}]:"length"in e||(i=[e]),n=i.length){case 0:return new ae("[]");case 1:if(r=i[0],!(r.object instanceof ae))return new ae(`[ ${this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)} ]`);default:let t="[";for(let o=0;o<n;o++)r=i[o],r.predicate.equals(e)?t+=`, ${this._encodeObject(r.object)}`:(t+=`${(o?";\n ":"\n ")+this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)}`,e=r.predicate);return new ae(`${t}\n]`)}}list(e){const t=e&&e.length||0,r=new Array(t);for(let n=0;n<t;n++)r[n]=this._encodeObject(e[n]);return new ae(`(${r.join(" ")})`)}end(e){null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null),this._write=this._blockedWrite;let t=e&&((r,n)=>{t=null,e(r,n)});if(this._endStream)try{return this._outputStream.end(t)}catch(e){}t&&t()}}function le(e){let t=oe[e];return void 0===t&&(1===e.length?(t=e.charCodeAt(0).toString(16),t="\\u0000".substr(0,6-t.length)+t):(t=(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)+9216).toString(16),t="\\U00000000".substr(0,10-t.length)+t)),t}function de(e){return e.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&")}function ce(e){let t=e.shaclDatatype,r=e.value;return r?e.dataset.class||e.dataset.nodeKind===E+"IRI"?f.namedNode(r):(e.dataset.lang?t=e.dataset.lang:"number"===e.type?r=parseFloat(r):"file"===e.type&&e.binaryData?r=e.binaryData:"datetime-local"===e.type&&(r=new Date(r).toISOString().slice(0,19)),f.literal(r,t)):"checkbox"!==e.type&&"checkbox"!==e.getAttribute("type")||!(e.checked||parseInt(e.dataset.minCount||"0")>0)?void 0:f.literal(e.checked?"true":"false",t)}const ue={};function he(e){void 0===e.predicate&&void 0===e.datatype?console.warn('not registering plugin because it does neither define "predicate" nor "datatype"',e):ue[`${e.predicate}^${e.datatype}`]=e}class pe{constructor(e,t){this.predicate=e.predicate,this.datatype=e.datatype,t&&(this.stylesheet=new CSSStyleSheet,this.stylesheet.replaceSync(t))}createViewer(e,t){return e.config.theme.createViewer(e.label,t,e)}}class fe extends HTMLElement{constructor(e,t,r,n){var i;if(super(),this.template=new X(t.shapesGraph.getQuads(e,null,null,A),r,t),this.dataset.nodeId=this.template.nodeId.id,void 0!==this.template.order&&(this.style.order=`${this.template.order}`),this.template.cssClass&&this.classList.add(this.template.cssClass),t.editMode&&(this.addButton=document.createElement("a"),this.addButton.innerText=this.template.label,this.addButton.title="Add "+this.template.label,this.addButton.classList.add("control-button","add-button"),this.addButton.addEventListener("click",(e=>{const t=this.addPropertyInstance();t.classList.add("fadeIn"),this.updateControls(),function(e){var t;null===(t=e.querySelector("input,select,textarea"))||void 0===t||t.focus()}(t),setTimeout((()=>{t.classList.remove("fadeIn")}),200)})),this.appendChild(this.addButton)),this.template.path){const e=n?t.dataGraph.getQuads(n,this.template.path,null,null):[];let r=!1;for(const t of e)this.addPropertyInstance(t.object),this.template.hasValue&&t.object.equals(this.template.hasValue)&&(r=!0);t.editMode&&this.template.hasValue&&!r&&this.addPropertyInstance(this.template.hasValue)}if(t.editMode&&(this.addEventListener("change",(()=>{this.updateControls()})),this.updateControls()),(null===(i=this.template.extendedShapes)||void 0===i?void 0:i.length)&&null!==this.template.config.attributes.collapse&&(!this.template.maxCount||this.template.maxCount>1)&&(t.editMode||this.childElementCount>0)){const e=this;e.classList.add("collapsible"),"open"===this.template.config.attributes.collapse&&e.classList.add("open");const t=document.createElement("h1");t.classList.add("activator"),t.innerText=this.template.label,t.addEventListener("click",(()=>{e.classList.toggle("open")})),this.prepend(t)}}addPropertyInstance(e){var t;let r;return(null===(t=this.template.shaclOr)||void 0===t?void 0:t.length)?e?r=ge(function(e,t){if(!e.shaclOr)return console.warn("can't resolve sh:or because template has no options",e),e;if(t instanceof m){const r=t.datatype;for(const t of e.shaclOr){const n=e.config.shapesGraph.getQuads(t,null,null,A);for(const t of n)if(t.predicate.value===`${E}datatype`&&t.object.equals(r))return e.clone().merge(n)}}else{let r=e.config.dataGraph.getObjects(t,C,null);r.push(...e.config.shapesGraph.getObjects(t,C,A));for(const t of e.shaclOr){const n=e.config.shapesGraph.getQuads(t,null,null,A);for(const t of n)if(r.length>0){if(t.predicate.value===`${E}node`)for(const i of r)if(e.config.shapesGraph.has(new _(t.object,F,i,A)))return e.clone().merge(n);if(t.predicate.equals(B))for(const i of r)if(t.object.equals(i))return e.clone().merge(n)}else if(t.predicate.equals(q)&&t.object.equals(M))return e.clone().merge(n)}}return console.error("couldn't resolve sh:or for value",t),e}(this.template,e),e,!0):(r=J(this.template.shaclOr,this,this.template.config),ve(r,"")):r=ge(this.template,e),this.template.config.editMode?this.insertBefore(r,this.addButton):this.appendChild(r),r}updateControls(){var e;let t,r=this.querySelectorAll(":scope > .property-instance, :scope > .shacl-or-constraint, :scope > shacl-node").length;0===r&&(!(null===(e=this.template.extendedShapes)||void 0===e?void 0:e.length)||void 0!==this.template.minCount&&this.template.minCount>0)&&(this.addPropertyInstance(),r=this.querySelectorAll(":scope > .property-instance, :scope > .shacl-or-constraint, :scope > shacl-node").length),t=void 0!==this.template.minCount?r>this.template.minCount:this.template.extendedShapes&&this.template.extendedShapes.length>0||r>1;const n=void 0===this.template.maxCount||r<this.template.maxCount;this.classList.toggle("may-remove",t),this.classList.toggle("may-add",n)}toRDF(e,t){for(const r of this.querySelectorAll(":scope > .property-instance")){const n=f.namedNode(r.dataset.path);if(r.firstChild instanceof Ee){e.size;const i=r.firstChild.toRDF(e);e.addQuad(t,n,i)}else{const i=ce(r.querySelector(".editor"));i&&e.addQuad(t,n,i)}}}}function ge(e,t,r=!1){var n,i;let o;if(null===(n=e.extendedShapes)||void 0===n?void 0:n.length){o=document.createElement("div"),o.classList.add("property-instance");for(const r of e.extendedShapes)o.appendChild(new Ee(r,e.config,t,e.nodeKind,e.label))}else{const r=function(e,t){let r=ue[`${e}^${t}`];return r||(r=ue[`${e}^undefined`],r||ue[`undefined^${t}`])}(e.path,null===(i=e.datatype)||void 0===i?void 0:i.value);o=r?e.config.editMode?r.createEditor(e,t):r.createViewer(e,t):Y(e,t||null),o.classList.add("property-instance")}return e.config.editMode&&ve(o,e.label,r),o.dataset.path=e.path,o}function ve(e,t,r=!1){const n=document.createElement("a");n.innerText="×",n.classList.add("control-button","btn","remove-button"),n.title="Remove "+t,n.addEventListener("click",(t=>{e.classList.remove("fadeIn"),e.classList.add("fadeOut"),setTimeout((()=>{const t=e.parentElement;e.remove(),null==t||t.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))}),200)})),r&&n.classList.add("persistent"),e.appendChild(n)}function me(e,t){const r=document.createElement("div");r.dataset.subject=e,r.classList.add("shacl-group");let n=e;const i=t.shapesGraph.getQuads(e,null,null,A),o=U(i,"label",j,t.languages);o&&(n=o);const a=U(i,"order");a&&(r.style.order=a);const s=document.createElement("h1");return s.innerText=n,r.appendChild(s),null!==t.attributes.collapse&&(r.classList.add("collapsible"),"open"===t.attributes.collapse&&r.classList.add("open"),s.classList.add("activator"),s.addEventListener("click",(()=>{r.classList.toggle("open")}))),r}window.customElements.define("shacl-property",fe);const be={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let ye;const xe=new Uint8Array(16);function we(){if(!ye&&(ye="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ye))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ye(xe)}const _e=[];for(let e=0;e<256;++e)_e.push((e+256).toString(16).slice(1));const Se=function(e,t,r){if(be.randomUUID&&!t&&!e)return be.randomUUID();const n=(e=e||{}).random||(e.rng||we)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return _e[e[t+0]]+_e[e[t+1]]+_e[e[t+2]]+_e[e[t+3]]+"-"+_e[e[t+4]]+_e[e[t+5]]+"-"+_e[e[t+6]]+_e[e[t+7]]+"-"+_e[e[t+8]]+_e[e[t+9]]+"-"+_e[e[t+10]]+_e[e[t+11]]+_e[e[t+12]]+_e[e[t+13]]+_e[e[t+14]]+_e[e[t+15]]}(n)};class Ee extends HTMLElement{constructor(e,t,r,n,i){super(),this.config=t,this.shaclSubject=e;let o=r;if(!o){if(!n){const r=t.shapesGraph.getObjects(e,`${E}nodeKind`,A);r.length&&(n=r[0])}o=void 0===n&&t.attributes.valuesNamespace||(null==n?void 0:n.id)===`${E}IRI`?f.namedNode(t.attributes.valuesNamespace+Se()):f.blankNode(Se())}this.nodeId=o;const a=JSON.stringify([e,r]);if(r&&t.renderedNodes.has(a)){if(i&&null===t.attributes.collapse){const e=document.createElement("label");e.innerText=i,this.appendChild(e)}const e=document.createElement("a");e.innerText=r.id,e.classList.add("ref-link"),e.onclick=()=>{var e;null===(e=this.config.form.querySelector(`shacl-node[data-node-id='${this.nodeId.id}']`))||void 0===e||e.scrollIntoView()},this.appendChild(e),this.style.flexDirection="row"}else{r&&t.renderedNodes.add(a),this.dataset.nodeId=this.nodeId.id;const n=t.shapesGraph.getQuads(e,null,null,A);let o;if(null!==this.config.attributes.showNodeIds){const e=document.createElement("div");e.innerText=`id: ${this.nodeId.id}`,e.classList.add("node-id-display"),this.appendChild(e)}for(const e of n)switch(e.predicate.id){case`${E}property`:let n=this;const i=t.shapesGraph.getQuads(e.object,`${E}group`,null,A);if(i.length>0){const e=i[0].object.value;if(t.groups.indexOf(e)>-1){let r=this.querySelector(`:scope > .shacl-group[data-subject='${e}']`);r||(r=me(e,t),this.appendChild(r)),n=r}else console.warn("ignoring unknown group reference",i[0])}const a=new fe(e.object,t,this.nodeId,r);a.childElementCount>0&&n.appendChild(a);break;case`${E}and`:if(o=t.lists[e.object.value],null==o?void 0:o.length)for(const e of o)this.prepend(new Ee(e,t,r));else console.error("list not found:",e.object.value,"existing lists:",t.lists);break;case`${E}node`:this.prepend(new Ee(e.object,t,r));break;case`${E}targetClass`:this.targetClass=e.object;break;case`${E}or`:o=t.lists[e.object.value],(null==o?void 0:o.length)?this.appendChild(J(o,this,t)):console.error("list not found:",e.object.value,"existing lists:",t.lists)}if(i){const e=document.createElement("h1");e.innerText=i,this.prepend(e)}}}toRDF(e,t){t||(t=this.nodeId);for(const r of this.querySelectorAll(":scope > shacl-node, :scope > .shacl-group > shacl-node, :scope > shacl-property, :scope > .shacl-group > shacl-property"))r.toRDF(e,t);return this.targetClass&&e.addQuad(t,C,this.targetClass),this.config.attributes.generateNodeShapeReference&&!this.closest("shacl-node shacl-node")&&e.addQuad(t,f.namedNode(this.config.attributes.generateNodeShapeReference),this.shaclSubject),t}}window.customElements.define("shacl-node",Ee);var Ie=r(9198);const Te=Symbol("iter");function je(e,t,r=4){if(0===r)return Object.assign(e,t);for(const n in t)e[n]=je(e[n]||Object.create(null),t[n],r-1);return e}class ke{constructor(e={}){this._id=1,this._ids=Object.create(null),this._ids[""]=1,this._entities=Object.create(null),this._entities[1]="",this._blankNodeIndex=0,this._factory=e.factory||f}_termFromId(e){if("."===e[0]){const t=this._entities,r=e.split(".");return this._factory.quad(this._termFromId(t[r[1]]),this._termFromId(t[r[2]]),this._termFromId(t[r[3]]),r[4]&&this._termFromId(t[r[4]]))}return x(e,this._factory)}_termToNumericId(e){if("Quad"===e.termType){const t=this._termToNumericId(e.subject),r=this._termToNumericId(e.predicate),n=this._termToNumericId(e.object);let i;return t&&r&&n&&(Z(e.graph)||(i=this._termToNumericId(e.graph)))&&this._ids[i?`.${t}.${r}.${n}.${i}`:`.${t}.${r}.${n}`]}return this._ids[w(e)]}_termToNewNumericId(e){const t=e&&"Quad"===e.termType?`.${this._termToNewNumericId(e.subject)}.${this._termToNewNumericId(e.predicate)}.${this._termToNewNumericId(e.object)}${Z(e.graph)?"":`.${this._termToNewNumericId(e.graph)}`}`:w(e);return this._ids[t]||(this._ids[this._entities[++this._id]=t]=this._id)}createBlankNode(e){let t,r;if(e)for(t=e=`_:${e}`,r=1;this._ids[t];)t=e+r++;else do{t="_:b"+this._blankNodeIndex++}while(this._ids[t]);return this._ids[t]=++this._id,this._entities[this._id]=t,this._factory.blankNode(t.substr(2))}}class Ne{constructor(e,t){this._size=0,this._graphs=Object.create(null),t||!e||e[0]||(t=e,e=null),t=t||{},this._factory=t.factory||f,this._entityIndex=t.entityIndex||new ke({factory:this._factory}),this._entities=this._entityIndex._entities,this._termFromId=this._entityIndex._termFromId.bind(this._entityIndex),this._termToNumericId=this._entityIndex._termToNumericId.bind(this._entityIndex),this._termToNewNumericId=this._entityIndex._termToNewNumericId.bind(this._entityIndex),e&&this.addQuads(e)}get size(){let e=this._size;if(null!==e)return e;e=0;const t=this._graphs;let r,n;for(const i in t)for(const o in r=t[i].subjects)for(const t in n=r[o])e+=Object.keys(n[t]).length;return this._size=e}_addToIndex(e,t,r,n){const i=e[t]||(e[t]={}),o=i[r]||(i[r]={}),a=n in o;return a||(o[n]=null),!a}_removeFromIndex(e,t,r,n){const i=e[t],o=i[r];delete o[n];for(const e in o)return;delete i[r];for(const e in i)return;delete e[t]}*_findInIndex(e,t,r,n,i,o,a,s){let l,d,c;const u=this._entities,h=this._termFromId(u[s]),p={subject:null,predicate:null,object:null};t&&((l=e,e={})[t]=l[t]);for(const t in e)if(d=e[t]){p[i]=this._termFromId(u[t]),r&&((l=d,d={})[r]=l[r]);for(const e in d)if(c=d[e]){p[o]=this._termFromId(u[e]);const t=n?n in c?[n]:[]:Object.keys(c);for(let e=0;e<t.length;e++)p[a]=this._termFromId(u[t[e]]),yield this._factory.quad(p.subject,p.predicate,p.object,h)}}}_loop(e,t){for(const r in e)t(r)}_loopByKey0(e,t,r){let n,i;if(n=e[t])for(i in n)r(i)}_loopByKey1(e,t,r){let n,i;for(n in e)i=e[n],i[t]&&r(n)}_loopBy2Keys(e,t,r,n){let i,o,a;if((i=e[t])&&(o=i[r]))for(a in o)n(a)}_countInIndex(e,t,r,n){let i,o,a,s=0;t&&((i=e,e={})[t]=i[t]);for(const t in e)if(o=e[t]){r&&((i=o,o={})[r]=i[r]);for(const e in o)(a=o[e])&&(n?n in a&&s++:s+=Object.keys(a).length)}return s}_getGraphs(e){return"number"!=typeof(e=""===e?1:e&&(this._termToNumericId(e)||-1))?this._graphs:{[e]:this._graphs[e]}}_uniqueEntities(e){const t=Object.create(null);return r=>{r in t||(t[r]=!0,e(this._termFromId(this._entities[r],this._factory)))}}add(e){return this.addQuad(e),this}addQuad(e,t,r,n){t||(n=e.graph,r=e.object,t=e.predicate,e=e.subject),n=n?this._termToNewNumericId(n):1;let i=this._graphs[n];return i||(i=this._graphs[n]={subjects:{},predicates:{},objects:{}},Object.freeze(i)),e=this._termToNewNumericId(e),t=this._termToNewNumericId(t),r=this._termToNewNumericId(r),!!this._addToIndex(i.subjects,e,t,r)&&(this._addToIndex(i.predicates,t,r,e),this._addToIndex(i.objects,r,e,t),this._size=null,!0)}addQuads(e){for(let t=0;t<e.length;t++)this.addQuad(e[t])}delete(e){return this.removeQuad(e),this}has(e,t,r,n){return e&&e.subject&&({subject:e,predicate:t,object:r,graph:n}=e),!this.readQuads(e,t,r,n).next().done}import(e){return e.on("data",(e=>{this.addQuad(e)})),e}removeQuad(e,t,r,n){t||(n=e.graph,r=e.object,t=e.predicate,e=e.subject),n=n?this._termToNumericId(n):1;const i=this._graphs;let o,a,s;if(!((e=e&&this._termToNumericId(e))&&(t=t&&this._termToNumericId(t))&&(r=r&&this._termToNumericId(r))&&(o=i[n])&&(a=o.subjects[e])&&(s=a[t])&&r in s))return!1;for(e in this._removeFromIndex(o.subjects,e,t,r),this._removeFromIndex(o.predicates,t,r,e),this._removeFromIndex(o.objects,r,e,t),null!==this._size&&this._size--,o.subjects)return!0;return delete i[n],!0}removeQuads(e){for(let t=0;t<e.length;t++)this.removeQuad(e[t])}remove(e){return e.on("data",(e=>{this.removeQuad(e)})),e}removeMatches(e,t,r,n){const i=new Ie.Readable({objectMode:!0}),o=this.readQuads(e,t,r,n);return i._read=e=>{for(;e-- >0;){const{done:e,value:t}=o.next();if(e)return void i.push(null);i.push(t)}},this.remove(i)}deleteGraph(e){return this.removeMatches(null,null,null,e)}getQuads(e,t,r,n){return[...this.readQuads(e,t,r,n)]}*readQuads(e,t,r,n){const i=this._getGraphs(n);let o,a,s,l;if(!(e&&!(a=this._termToNumericId(e))||t&&!(s=this._termToNumericId(t))||r&&!(l=this._termToNumericId(r))))for(const e in i)(o=i[e])&&(a?l?yield*this._findInIndex(o.objects,l,a,s,"object","subject","predicate",e):yield*this._findInIndex(o.subjects,a,s,null,"subject","predicate","object",e):s?yield*this._findInIndex(o.predicates,s,l,null,"predicate","object","subject",e):l?yield*this._findInIndex(o.objects,l,null,null,"object","subject","predicate",e):yield*this._findInIndex(o.subjects,null,null,null,"subject","predicate","object",e))}match(e,t,r,n){return new Ae(this,e,t,r,n,{entityIndex:this._entityIndex})}countQuads(e,t,r,n){const i=this._getGraphs(n);let o,a,s,l,d=0;if(e&&!(a=this._termToNumericId(e))||t&&!(s=this._termToNumericId(t))||r&&!(l=this._termToNumericId(r)))return 0;for(const n in i)(o=i[n])&&(d+=e?r?this._countInIndex(o.objects,l,a,s):this._countInIndex(o.subjects,a,s,l):t?this._countInIndex(o.predicates,s,l,a):this._countInIndex(o.objects,l,a,s));return d}forEach(e,t,r,n,i){this.some((t=>(e(t,this),!1)),t,r,n,i)}every(e,t,r,n,i){return!this.some((t=>!e(t,this)),t,r,n,i)}some(e,t,r,n,i){for(const o of this.readQuads(t,r,n,i))if(e(o))return!0;return!1}getSubjects(e,t,r){const n=[];return this.forSubjects((e=>{n.push(e)}),e,t,r),n}forSubjects(e,t,r,n){const i=this._getGraphs(n);let o,a,s;if(e=this._uniqueEntities(e),!(t&&!(a=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(o=i[n])&&(a?s?this._loopBy2Keys(o.predicates,a,s,e):this._loopByKey1(o.subjects,a,e):s?this._loopByKey0(o.objects,s,e):this._loop(o.subjects,e))}getPredicates(e,t,r){const n=[];return this.forPredicates((e=>{n.push(e)}),e,t,r),n}forPredicates(e,t,r,n){const i=this._getGraphs(n);let o,a,s;if(e=this._uniqueEntities(e),!(t&&!(a=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(o=i[n])&&(a?s?this._loopBy2Keys(o.objects,s,a,e):this._loopByKey0(o.subjects,a,e):s?this._loopByKey1(o.predicates,s,e):this._loop(o.predicates,e))}getObjects(e,t,r){const n=[];return this.forObjects((e=>{n.push(e)}),e,t,r),n}forObjects(e,t,r,n){const i=this._getGraphs(n);let o,a,s;if(e=this._uniqueEntities(e),!(t&&!(a=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(o=i[n])&&(a?s?this._loopBy2Keys(o.subjects,a,s,e):this._loopByKey1(o.objects,a,e):s?this._loopByKey0(o.predicates,s,e):this._loop(o.objects,e))}getGraphs(e,t,r){const n=[];return this.forGraphs((e=>{n.push(e)}),e,t,r),n}forGraphs(e,t,r,n){for(const i in this._graphs)this.some((t=>(e(t.graph),!0)),t,r,n,this._termFromId(this._entities[i]))}createBlankNode(e){return this._entityIndex.createBlankNode(e)}extractLists({remove:e=!1,ignoreErrors:t=!1}={}){const r={},n=t?()=>!0:(e,t)=>{throw new Error(`${e.value} ${t}`)},i=this.getQuads(null,l.rdf.rest,l.rdf.nil,null),o=e?[...i]:[];return i.forEach((t=>{const i=[];let a,s,d=!1;const c=t.graph;let u=t.subject;for(;u&&!d;){const e=this.getQuads(null,null,u,null),t=this.getQuads(u,null,null,null);let r,h=null,p=null,f=null;for(let i=0;i<t.length&&!d;i++)r=t[i],r.graph.equals(c)?a?d=n(u,"has non-list arcs out"):r.predicate.value===l.rdf.first?h?d=n(u,"has multiple rdf:first arcs"):o.push(h=r):r.predicate.value===l.rdf.rest?p?d=n(u,"has multiple rdf:rest arcs"):o.push(p=r):e.length?d=n(u,"can't be subject and object"):(a=r,s="subject"):d=n(u,"not confined to single graph");for(let t=0;t<e.length&&!d;++t)r=e[t],a?d=n(u,"can't have coreferences"):r.predicate.value===l.rdf.rest?f?d=n(u,"has incoming rdf:rest arcs"):f=r:(a=r,s="object");h?i.unshift(h.object):d=n(u,"has no list head"),u=f&&f.subject}d?e=!1:a&&(r[a[s].value]=i)})),e&&this.removeQuads(o),r}addAll(e){if(Array.isArray(e))this.addQuads(e);else if(e instanceof Ne&&e._entityIndex===this._entityIndex)0!==e._size&&(this._graphs=je(this._graphs,e._graphs),this._size=null);else for(const t of e)this.add(t);return this}contains(e){if(e===this)return!0;if(!(e instanceof Ne)||this._entityIndex!==e._entityIndex)return e.every((e=>this.has(e)));const t=this._graphs,r=e._graphs;let n,i,o,a,s;for(const e in r){if(!(n=t[e]))return!1;n=n.subjects;for(const t in i=r[e].subjects){if(!(o=n[t]))return!1;for(const e in a=i[t]){if(!(s=o[e]))return!1;for(const t in a[e])if(!(t in s))return!1}}}return!0}deleteMatches(e,t,r,n){for(const i of this.match(e,t,r,n))this.removeQuad(i);return this}difference(e){return e===this?new Ne({entityIndex:this._entityIndex}):this.filter((t=>!e.has(t)))}equals(e){return e===this||this.size===e.size&&this.contains(e)}filter(e){const t=new Ne({entityIndex:this._entityIndex});for(const r of this)e(r,this)&&t.add(r);return t}intersection(e){if(e===this){const e=new Ne({entityIndex:this._entityIndex});e._graphs=je(Object.create(null),this._graphs),e._size=this._size}return this.filter((t=>e.has(t)))}map(e){const t=new Ne({entityIndex:this._entityIndex});for(const r of this)t.add(e(r,this));return t}reduce(e,t){const r=this.readQuads();let n=void 0===t?r.next().value:t;for(const t of r)n=e(n,t,this);return n}toArray(){return this.getQuads()}toCanonical(){throw new Error("not implemented")}toStream(){return this.match()}toString(){return(new se).quadsToString(this)}union(e){const t=new Ne({entityIndex:this._entityIndex});return t._graphs=je(Object.create(null),this._graphs),t._size=this._size,t.addAll(e),t}*[Symbol.iterator](){yield*this.readQuads()}}class Ae extends Ie.Readable{constructor(e,t,r,n,i,o){super({objectMode:!0}),Object.assign(this,{n3Store:e,subject:t,predicate:r,object:n,graph:i,options:o})}get filtered(){if(!this._filtered){const{n3Store:e,graph:t,object:r,predicate:n,subject:i}=this,o=this._filtered=new Ne({factory:e._factory,entityIndex:this.options.entityIndex});for(const a of e.readQuads(i,n,r,t))o.addQuad(a)}return this._filtered}get size(){return this.filtered.size}_read(e){e>0&&!this[Te]&&(this[Te]=this[Symbol.iterator]());const t=this[Te];for(;e-- >0;){const{done:e,value:r}=t.next();if(e)return void this.push(null);this.push(r)}}addAll(e){return this.filtered.addAll(e)}contains(e){return this.filtered.contains(e)}deleteMatches(e,t,r,n){return this.filtered.deleteMatches(e,t,r,n)}difference(e){return this.filtered.difference(e)}equals(e){return this.filtered.equals(e)}every(e,t,r,n,i){return this.filtered.every(e,t,r,n,i)}filter(e){return this.filtered.filter(e)}forEach(e,t,r,n,i){return this.filtered.forEach(e,t,r,n,i)}import(e){return this.filtered.import(e)}intersection(e){return this.filtered.intersection(e)}map(e){return this.filtered.map(e)}some(e,t,r,n,i){return this.filtered.some(e,t,r,n,i)}toCanonical(){return this.filtered.toCanonical()}toStream(){return this._filtered?this._filtered.toStream():this.n3Store.match(this.subject,this.predicate,this.object,this.graph)}union(e){return this._filtered?this._filtered.union(e):this.n3Store.match(this.subject,this.predicate,this.object,this.graph).addAll(e)}toArray(){return this._filtered?this._filtered.toArray():this.n3Store.getQuads(this.subject,this.predicate,this.object,this.graph)}reduce(e,t){return this.filtered.reduce(e,t)}toString(){return(new se).quadsToString(this)}add(e){return this.filtered.add(e)}delete(e){return this.filtered.delete(e)}has(e){return this.filtered.has(e)}match(e,t,r,n){return new Ae(this.filtered,e,t,r,n,this.options)}*[Symbol.iterator](){yield*this._filtered||this.n3Store.readQuads(this.subject,this.predicate,this.object,this.graph)}}var Re=r(8287),Ce=r(9596),Oe=r.n(Ce);const{xsd:Le}=l,$e=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,De={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},Pe=/[\x00-\x20<>\\"\{\}\|\^\`]/,Me={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},Be=/$0^/;class Fe{constructor(e){if(this._iri=/^<((?:[^ <>{}\\]|\\[uU])+)>[ \t]*/,this._unescapedIri=/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>[ \t]*/,this._simpleQuotedString=/^"([^"\\\r\n]*)"(?=[^"])/,this._simpleApostropheString=/^'([^'\\\r\n]*)'(?=[^'])/,this._langcode=/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\-])/i,this._prefix=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,this._prefixed=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?:[ \t]+|(?=\.?[,;!\^\s#()\[\]\{\}"'<>]))/,this._variable=/^\?(?:(?:[A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=[.,;!\^\s#()\[\]\{\}"'<>])/,this._blank=/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?:[ \t]+|(?=\.?[,;:\s#()\[\]\{\}"'<>]))/,this._number=/^[\-+]?(?:(\d+\.\d*|\.?\d+)[eE][\-+]?|\d*(\.)?)\d+(?=\.?[,;:\s#()\[\]\{\}"'<>])/,this._boolean=/^(?:true|false)(?=[.,;\s#()\[\]\{\}"'<>])/,this._keyword=/^@[a-z]+(?=[\s#<:])/i,this._sparqlKeyword=/^(?:PREFIX|BASE|GRAPH)(?=[\s#<])/i,this._shortPredicates=/^a(?=[\s#()\[\]\{\}"'<>])/,this._newline=/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,this._comment=/#([^\n\r]*)/,this._whitespace=/^[ \t]+/,this._endOfFile=/^(?:#[^\n\r]*)?$/,e=e||{},this._lineMode=!!e.lineMode){this._n3Mode=!1;for(const e in this)!(e in Me)&&this[e]instanceof RegExp&&(this[e]=Be)}else this._n3Mode=!1!==e.n3;this._comments=!!e.comments,this._literalClosingPos=0}_tokenizeToEnd(e,t){let r=this._input,n=r.length;for(;;){let e,a;for(;e=this._newline.exec(r);)this._comments&&(a=this._comment.exec(e[0]))&&i("comment",a[1],"",this._line,e[0].length),r=r.substr(e[0].length,r.length),n=r.length,this._line++;if(!e&&(e=this._whitespace.exec(r))&&(r=r.substr(e[0].length,r.length)),this._endOfFile.test(r))return t&&(this._comments&&(a=this._comment.exec(r))&&i("comment",a[1],"",this._line,r.length),r=null,i("eof","","",this._line,0)),this._input=r;const s=this._line,l=r[0];let d="",c="",u="",h=null,p=0,f=!1;switch(l){case"^":if(r.length<3)break;if("^"!==r[1]){this._n3Mode&&(p=1,d="^");break}if(this._previousMarker="^^",r=r.substr(2),"<"!==r[0]){f=!0;break}case"<":if(h=this._unescapedIri.exec(r))d="IRI",c=h[1];else if(h=this._iri.exec(r)){if(c=this._unescape(h[1]),null===c||Pe.test(c))return o(this);d="IRI"}else r.length>1&&"<"===r[1]?(d="<<",p=2):this._n3Mode&&r.length>1&&"="===r[1]&&(d="inverse",p=2,c=">");break;case">":r.length>1&&">"===r[1]&&(d=">>",p=2);break;case"_":((h=this._blank.exec(r))||t&&(h=this._blank.exec(`${r} `)))&&(d="blank",u="_",c=h[1]);break;case'"':if(h=this._simpleQuotedString.exec(r))c=h[1];else if(({value:c,matchLength:p}=this._parseLiteral(r)),null===c)return o(this);null===h&&0===p||(d="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(h=this._simpleApostropheString.exec(r))c=h[1];else if(({value:c,matchLength:p}=this._parseLiteral(r)),null===c)return o(this);null===h&&0===p||(d="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(h=this._variable.exec(r))&&(d="var",c=h[0]);break;case"@":"literal"===this._previousMarker&&(h=this._langcode.exec(r))?(d="langcode",c=h[1]):(h=this._keyword.exec(r))&&(d=h[0]);break;case".":if(1===r.length?t:r[1]<"0"||r[1]>"9"){d=".",p=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(h=this._number.exec(r)||t&&(h=this._number.exec(`${r} `)))&&(d="literal",c=h[0],u="string"==typeof h[1]?Le.double:"string"==typeof h[2]?Le.decimal:Le.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(h=this._sparqlKeyword.exec(r))?d=h[0].toUpperCase():f=!0;break;case"f":case"t":(h=this._boolean.exec(r))?(d="literal",c=h[0],u=Le.boolean):f=!0;break;case"a":(h=this._shortPredicates.exec(r))?(d="abbreviation",c="a"):f=!0;break;case"=":this._n3Mode&&r.length>1&&(d="abbreviation",">"!==r[1]?(p=1,c="="):(p=2,c=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"}":this._lineMode||(p=1,d=l);break;case"{":!this._lineMode&&r.length>=2&&("|"===r[1]?(d="{|",p=2):(d=l,p=1));break;case"|":r.length>=2&&"}"===r[1]&&(d="|}",p=2);break;default:f=!0}if(f&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(h=this._prefix.exec(r))?((h=this._prefixed.exec(r))||t&&(h=this._prefixed.exec(`${r} `)))&&(d="prefixed",u=h[1]||"",c=this._unescape(h[2])):(d="prefix",c=h[1]||"")),"^^"===this._previousMarker)switch(d){case"prefixed":d="type";break;case"IRI":d="typeIRI";break;default:d=""}if(!d)return t||!/^'''|^"""/.test(r)&&/\n|\r/.test(r)?o(this):this._input=r;const g=p||h[0].length,v=i(d,c,u,s,g);this.previousToken=v,this._previousMarker=d,r=r.substr(g,r.length)}function i(t,i,o,a,s){const l=r?n-r.length:n,d={type:t,value:i,prefix:o,line:a,start:l,end:l+s};return e(null,d),d}function o(t){e(t._syntaxError(/^\S*/.exec(r)[0]))}}_unescape(e){let t=!1;const r=e.replace($e,((e,r,n,i)=>{if("string"==typeof r)return String.fromCharCode(Number.parseInt(r,16));if("string"==typeof n){let e=Number.parseInt(n,16);return e<=65535?String.fromCharCode(Number.parseInt(n,16)):String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e))}return i in De?De[i]:(t=!0,"")}));return t?null:r}_parseLiteral(e){if(e.length>=3){const t=e.match(/^(?:"""|"|'''|'|)/)[0],r=t.length;let n=Math.max(this._literalClosingPos,r);for(;(n=e.indexOf(t,n))>0;){let t=0;for(;"\\"===e[n-t-1];)t++;if(t%2==0){const t=e.substring(r,n),i=t.split(/\r\n|\r|\n/).length-1,o=n+r;if(1===r&&0!==i||3===r&&this._lineMode)break;return this._line+=i,{value:this._unescape(t),matchLength:o}}n++}this._literalClosingPos=e.length-r+1}return{value:"",matchLength:0}}_syntaxError(e){this._input=null;const t=new Error(`Unexpected "${e}" on line ${this._line}.`);return t.context={token:void 0,line:this._line,previousToken:this.previousToken},t}_readStartingBom(e){return e.startsWith("\ufeff")?e.substr(1):e}tokenize(e,t){if(this._line=1,"string"==typeof e){if(this._input=this._readStartingBom(e),"function"!=typeof t){const e=[];let t;if(this._tokenizeToEnd(((r,n)=>r?t=r:e.push(n)),!0),t)throw t;return e}Oe()((()=>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=Re.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)}}let qe=0;class Ue{constructor(e){this._contextStack=[],this._graph=null,e=e||{},this._setBase(e.baseIRI),e.factory&&He(this,e.factory);const t="string"==typeof e.format?e.format.match(/\w*$/)[0].toLowerCase():"",r=/turtle/.test(t),n=/trig/.test(t),i=/triple/.test(t),o=/quad/.test(t),a=this._n3Mode=/n3/.test(t),s=i||o;(this._supportsNamedGraphs=!(r||a))||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(r||n||i||a),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 Fe({lineMode:s,n3:a}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){qe=0}_setBase(e){if(e){const t=e.indexOf("#");t>=0&&(e=e.substr(0,t)),this._base=e,this._basePath=e.indexOf("/")<0?e:e.replace(/[^\/?]*(?:\?.*)?$/,""),e=e.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=e[0],this._baseScheme=e[1]}else this._base="",this._basePath=""}_saveContext(e,t,r,n,i){const o=this._n3Mode;this._contextStack.push({type:e,subject:r,predicate:n,object:i,graph:t,inverse:!!o&&this._inversePredicate,blankPrefix:o?this._prefixes._:"",quantified:o?this._quantified:null}),o&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.value}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(e,t){const r=this._contextStack.pop();if(!r||r.type!==e)return this._error(`Unexpected ${t.type}`,t);this._subject=r.subject,this._predicate=r.predicate,this._object=r.object,this._graph=r.graph,this._n3Mode&&(this._inversePredicate=r.inverse,this._prefixes._=r.blankPrefix,this._quantified=r.quantified)}_readInTopContext(e){switch(e.type){case"eof":return null!==this._graph?this._error("Unclosed graph",e):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"PREFIX":this._sparqlStyle=!0;case"@prefix":return this._readPrefix;case"BASE":this._sparqlStyle=!0;case"@base":return this._readBaseIRI;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(e)}}_readEntity(e,t){let r;switch(e.type){case"IRI":case"typeIRI":const t=this._resolveIRI(e.value);if(null===t)return this._error("Invalid IRI",e);r=this._namedNode(t);break;case"type":case"prefixed":const n=this._prefixes[e.prefix];if(void 0===n)return this._error(`Undefined prefix "${e.prefix}:"`,e);r=this._namedNode(n+e.value);break;case"blank":r=this._blankNode(this._prefixes[e.prefix]+e.value);break;case"var":r=this._variable(e.value.substr(1));break;default:return this._error(`Expected entity but got ${e.type}`,e)}return!t&&this._n3Mode&&r.id in this._quantified&&(r=this._quantified[r.id]),r}_readSubject(e){switch(this._predicate=null,e.type){case"[":return this._saveContext("blank",this._graph,this._subject=this._blankNode(),null,null),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this.RDF_NIL,null,null),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._graph=this._blankNode(),null,null),this._readSubject):this._error("Unexpected graph",e);case"}":return this._readPunctuation(e);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier=this._blankNode,this._readQuantifierList):this._error('Unexpected "@forSome"',e);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier=this._variable,this._readQuantifierList):this._error('Unexpected "@forAll"',e);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",e);if(0===e.prefix.length)return this._literalValue=e.value,this._completeSubjectLiteral;this._subject=this._literal(e.value,this._namedNode(e.prefix));break;case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Unexpected RDF-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._blankNode(),null),this._readBlankNodeHead;case"blank":if(!this._n3Mode)return this._error("Disallowed blank node as predicate",e);default:if(void 0===(this._predicate=this._readEntity(e)))return}return this._readObject}_readObject(e){switch(e.type){case"literal":if(0===e.prefix.length)return this._literalValue=e.value,this._readDataTypeOrLang;this._object=this._literal(e.value,this._namedNode(e.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._blankNode()),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this._subject,this._predicate,this.RDF_NIL),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject):this._error("Unexpected RDF-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,r=null,n=this._readListItem;const i=this._subject,o=this._contextStack,a=o[o.length-1];switch(e.type){case"[":this._saveContext("blank",this._graph,r=this._blankNode(),this.RDF_FIRST,this._subject=t=this._blankNode()),n=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,r=this._blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext("list",e),0!==o.length&&"list"===o[o.length-1].type&&this._emit(this._subject,this._predicate,this._object,this._graph),null===this._predicate){if(n=this._readPredicate,this._subject===this.RDF_NIL)return n}else if(n=this._getContextEndReader(),this._object===this.RDF_NIL)return n;r=this.RDF_NIL;break;case"literal":0===e.prefix.length?(this._literalValue=e.value,n=this._readListItemDataTypeOrLang):(t=this._literal(e.value,this._namedNode(e.prefix)),n=this._getContextEndReader());break;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);default:if(void 0===(t=this._readEntity(e)))return}if(null===r&&(this._subject=r=this._blankNode()),null===i?null===a.predicate?a.subject=r:a.object=r:this._emit(i,this.RDF_REST,r,this._graph),null!==t){if(this._n3Mode&&("IRI"===e.type||"prefixed"===e.type))return this._saveContext("item",this._graph,r,this.RDF_FIRST,t),this._subject=t,this._predicate=null,this._getPathReader(this._readListItem);this._emit(r,this.RDF_FIRST,t,this._graph)}return n}_readDataTypeOrLang(e){return this._completeObjectLiteral(e,!1)}_readListItemDataTypeOrLang(e){return this._completeObjectLiteral(e,!0)}_completeLiteral(e){let t=this._literal(this._literalValue);switch(e.type){case"type":case"typeIRI":const r=this._readEntity(e);if(void 0===r)return;t=this._literal(this._literalValue,r),e=null;break;case"langcode":t=this._literal(this._literalValue,e.value),e=null}return{token:e,literal:t}}_completeSubjectLiteral(e){return this._subject=this._completeLiteral(e).literal,this._readPredicateOrNamedGraph}_completeObjectLiteral(e,t){const r=this._completeLiteral(e);if(r)return this._object=r.literal,t&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),null===r.token?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(r.token))}_readFormulaTail(e){return"}"!==e.type?this._readPunctuation(e):(null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext("formula",e),null===this._object?this._readPredicate:this._getContextEndReader())}_readPunctuation(e){let t,r=this._graph;const n=this._subject,i=this._inversePredicate;switch(e.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",e);if(this._n3Mode)return this._readFormulaTail(e);this._graph=null;case".":this._subject=null,t=this._contextStack.length?this._readSubject:this._readInTopContext,i&&(this._inversePredicate=!1);break;case";":t=this._readPredicate;break;case",":t=this._readObject;break;case"{|":if(!this._supportsRDFStar)return this._error("Unexpected RDF-star syntax",e);const o=this._predicate,a=this._object;this._subject=this._quad(n,o,a,this.DEFAULTGRAPH),t=this._readPredicate;break;case"|}":if("Quad"!==this._subject.termType)return this._error("Unexpected asserted triple closing",e);this._subject=null,t=this._readPunctuation;break;default:if(this._supportsQuads&&null===this._graph&&void 0!==(r=this._readEntity(e))){t=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}if(null!==n){const e=this._predicate,t=this._object;i?this._emit(t,e,n,r):this._emit(n,e,t,r)}return t}_readBlankNodePunctuation(e){let t;switch(e.type){case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}return this._emit(this._subject,this._predicate,this._object,this._graph),t}_readQuadPunctuation(e){return"."!==e.type?this._error("Expected dot to follow quad",e):this._readInTopContext}_readPrefix(e){return"prefix"!==e.type?this._error("Expected prefix to follow @prefix",e):(this._prefix=e.value,this._readPrefixIRI)}_readPrefixIRI(e){if("IRI"!==e.type)return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,e);const t=this._readEntity(e);return this._prefixes[this._prefix]=t.value,this._prefixCallback(this._prefix,t),this._readDeclarationPunctuation}_readBaseIRI(e){const t="IRI"===e.type&&this._resolveIRI(e.value);return t?(this._setBase(t),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",e)}_readNamedGraphLabel(e){switch(e.type){case"IRI":case"blank":case"prefixed":return this._readSubject(e),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",e)}}_readNamedGraphBlankLabel(e){return"]"!==e.type?this._error("Invalid graph label",e):(this._subject=this._blankNode(),this._readGraph)}_readDeclarationPunctuation(e){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(e)):"."!==e.type?this._error("Expected declaration to end with a dot",e):this._readInTopContext}_readQuantifierList(e){let t;switch(e.type){case"IRI":case"prefixed":if(void 0!==(t=this._readEntity(e,!0)))break;default:return this._error(`Unexpected ${e.type}`,e)}return this._explicitQuantifiers?(null===this._subject?this._emit(this._graph||this.DEFAULTGRAPH,this._predicate,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH):this._emit(this._subject,this.RDF_REST,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH),this._emit(this._subject,this.RDF_FIRST,t,this.QUANTIFIERS_GRAPH)):this._quantified[t.id]=this._quantifier(this._blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(e){return","===e.type?this._readQuantifierList:(this._explicitQuantifiers&&(this._emit(this._subject,this.RDF_REST,this.RDF_NIL,this.QUANTIFIERS_GRAPH),this._subject=null),this._readCallback=this._getContextEndReader(),this._readCallback(e))}_getPathReader(e){return this._afterPath=e,this._readPath}_readPath(e){switch(e.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const t=this._contextStack,r=t.length&&t[t.length-1];if(r&&"item"===r.type){const t=this._subject;this._restoreContext("item",e),this._emit(this._subject,this.RDF_FIRST,t,this._graph)}return this._afterPath(e)}}_readForwardPath(e){let t,r;const n=this._blankNode();if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(t=this._subject,this._subject=n):(t=this._object,this._object=n),this._emit(t,r,n,this._graph),this._readPath}_readBackwardPath(e){const t=this._blankNode();let r,n;if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(n=this._subject,this._subject=t):(n=this._object,this._object=t),this._emit(t,r,n,this._graph),this._readPath}_readRDFStarTailOrGraph(e){return">>"!==e.type?this._supportsQuads&&null===this._graph&&void 0!==(this._graph=this._readEntity(e))?this._readRDFStarTail:this._error(`Expected >> to follow "${this._object.id}"`,e):this._readRDFStarTail(e)}_readRDFStarTail(e){if(">>"!==e.type)return this._error(`Expected >> but got ${e.type}`,e);const t=this._quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext("<<",e),null===this._subject?(this._subject=t,this._readPredicate):(this._object=t,this._getContextEndReader())}_getContextEndReader(){const e=this._contextStack;if(!e.length)return this._readPunctuation;switch(e[e.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem;case"formula":return this._readFormulaTail;case"<<":return this._readRDFStarTailOrGraph}}_emit(e,t,r,n){this._callback(null,this._quad(e,t,r,n||this.DEFAULTGRAPH))}_error(e,t){const r=new Error(`${e} on line ${t.line}.`);r.context={token:t,line:t.line,previousToken:this._lexer.previousToken},this._callback(r),this._callback=ze}_resolveIRI(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)?e:this._resolveRelativeIRI(e)}_resolveRelativeIRI(e){if(!e.length)return this._base;switch(e[0]){case"#":return this._base+e;case"?":return this._base.replace(/(?:\?.*)?$/,e);case"/":return("/"===e[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(e);default:return/^[^/:]*:/.test(e)?null:this._removeDotSegments(this._basePath+e)}}_removeDotSegments(e){if(!/(^|\/)\.\.?($|[/#?])/.test(e))return e;const t=e.length;let r="",n=-1,i=-1,o=0,a="/";for(;n<t;){switch(a){case":":if(i<0&&"/"===e[++n]&&"/"===e[++n])for(;(i=n+1)<t&&"/"!==e[i];)n=i;break;case"?":case"#":n=t;break;case"/":if("."===e[n+1])switch(a=e[1+ ++n],a){case"/":r+=e.substring(o,n-1),o=n+1;break;case void 0:case"?":case"#":return r+e.substring(o,n)+e.substr(n+1);case".":if(a=e[1+ ++n],void 0===a||"/"===a||"?"===a||"#"===a){if(r+=e.substring(o,n-2),(o=r.lastIndexOf("/"))>=i&&(r=r.substr(0,o)),"/"!==a)return`${r}/${e.substr(n+1)}`;o=n+1}}}a=e[++n]}return r+e.substring(o)}parse(e,t,r){if(this._readCallback=this._readInTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${qe++}_`,this._prefixCallback=r||ze,this._inversePredicate=!1,this._quantified=Object.create(null),!t){const t=[];let r;if(this._callback=(e,n)=>{e?r=e:n&&t.push(n)},this._lexer.tokenize(e).every((e=>this._readCallback=this._readCallback(e))),r)throw r;return t}this._callback=t,this._lexer.tokenize(e,((e,t)=>{null!==e?(this._callback(e),this._callback=ze):this._readCallback&&(this._readCallback=this._readCallback(t))}))}}function ze(){}function He(e,t){const r=t.namedNode;e._namedNode=r,e._blankNode=t.blankNode,e._literal=t.literal,e._variable=t.variable,e._quad=t.quad,e.DEFAULTGRAPH=t.defaultGraph(),e.RDF_FIRST=r(l.rdf.first),e.RDF_REST=r(l.rdf.rest),e.RDF_NIL=r(l.rdf.nil),e.N3_FORALL=r(l.r.forAll),e.N3_FORSOME=r(l.r.forSome),e.ABBREVIATIONS={a:r(l.rdf.type),"=":r(l.owl.sameAs),">":r(l.log.implies)},e.QUANTIFIERS_GRAPH=r("urn:n3:quantifiers")}He(Ue.prototype,f);var Ve=r(4841),Ge=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};const We={},Je={};class Qe{constructor(e){this.loadedExternalUrls=[],this.loadedClasses=[],this.config=e}loadGraphs(){return Ge(this,void 0,void 0,(function*(){this.loadedExternalUrls=[],this.loadedClasses=[];const e=new Ne,t=new Ne;if(this.config.prefixes={},yield Promise.all([this.importRDF(this.config.attributes.shapes?this.config.attributes.shapes:this.config.attributes.shapesUrl?this.fetchRDF(this.config.attributes.shapesUrl):"",e,A),this.importRDF(this.config.attributes.values?this.config.attributes.values:this.config.attributes.valuesUrl?this.fetchRDF(this.config.attributes.valuesUrl):"",t,void 0,new Ue({blankNodePrefix:""}))]),0==e.size&&this.config.attributes.valuesSubject){const r=[...t.getObjects(this.config.attributes.valuesSubject,C,null),...t.getObjects(this.config.attributes.valuesSubject,O,null)],n=[];for(const t of r){const r=this.toURL(t.value);r&&this.loadedExternalUrls.indexOf(r)<0&&(this.loadedExternalUrls.push(r),n.push(this.importRDF(this.fetchRDF(r),e,A)))}try{yield Promise.allSettled(n)}catch(e){console.warn(e)}}this.config.shapesGraph=e,this.config.dataGraph=t}))}importRDF(e,t,r,n){return Ge(this,void 0,void 0,(function*(){const i=n||new Ue,o=e=>Ge(this,void 0,void 0,(function*(){const o=[];yield new Promise(((a,s)=>{i.parse(e,((e,i,l)=>{if(e)return s(e);if(i){if(t.add(new _(i.subject,i.predicate,i.object,r)),null===this.config.attributes.ignoreOwlImports&&R.equals(i.predicate)){const e=this.toURL(i.object.value);e&&this.loadedExternalUrls.indexOf(e)<0&&(this.loadedExternalUrls.push(e),o.push(this.importRDF(this.fetchRDF(e),t,r,n)))}if(this.config.classInstanceProvider&&B.equals(i.predicate)){const e=i.object.value;if(this.loadedClasses.indexOf(e)<0){let i;e in Je?i=Je[e]:(i=this.config.classInstanceProvider(e),Je[e]=i),this.loadedClasses.push(e),o.push(this.importRDF(i,t,r,n))}}}else l&&this.config.registerPrefixes(l),a(null)}))}));try{yield Promise.allSettled(o)}catch(e){console.warn(e)}}));if(e instanceof Promise&&(e=yield e),e){try{e=yield(0,Ve.toRDF)(JSON.parse(e),{format:"application/n-quads"})}catch(e){}yield o(e)}}))}fetchRDF(e){return Ge(this,void 0,void 0,(function*(){if(e in We)return We[e];const t=fetch(e,{headers:{Accept:"text/turtle, application/trig, application/n-triples, application/n-quads, text/n3, application/ld+json"}}).then((e=>e.text()));return We[e]=t,t}))}toURL(e){if(W(e))return e;if(this.config.prefixes){const t=e.split(":");if(2===t.length){const r=this.config.prefixes[t[0]];if(r&&W(e=e.replace(`${t[0]}:`,r)))return e}}return null}}class Xe{constructor(){this.shapes=null,this.shapesUrl=null,this.shapeSubject=null,this.values=null,this.valuesUrl=null,this.valueSubject=null,this.valuesSubject=null,this.valuesNamespace="",this.view=null,this.language=null,this.loading="Loading…",this.ignoreOwlImports=null,this.collapse=null,this.submitButton=null,this.generateNodeShapeReference=null,this.showNodeIds=null}}class Ke{constructor(e,t){this.attributes=new Xe,this.loader=new Qe(this),this.prefixes={},this.editMode=!0,this.dataGraph=new Ne,this.lists={},this.groups=[],this.renderedNodes=new Set,this._shapesGraph=new Ne,this.theme=e,this.form=t,this.languages=[...new Set(navigator.languages.flatMap((e=>e.length>2?[e,e.substring(0,2)]:e)))]}updateAttributes(e){const t=new Xe;if(Object.keys(t).forEach((r=>{const n=e.dataset[r];void 0!==n&&(t[r]=n)})),this.editMode=null===t.view,this.attributes=t,this.attributes.valueSubject&&!this.attributes.valuesSubject&&(this.attributes.valuesSubject=this.attributes.valueSubject),t.language){const e=this.languages.indexOf(t.language);e>-1&&this.languages.splice(e,1),this.languages.unshift(t.language)}}static dataAttributes(){const e=new Xe;return Object.keys(e).map((e=>(e=e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),"data-"+e)))}get shapesGraph(){return this._shapesGraph}set shapesGraph(e){this._shapesGraph=e,this.lists=e.extractLists(),this.groups=[],e.getQuads(null,C,`${E}PropertyGroup`,A).forEach((e=>{this.groups.push(e.subject.value)}))}registerPrefixes(e){for(const t in e)t&&(this.prefixes[t]=e[t])}}const Ye=function(e){return"<"+e.value+">"},Ze=/["\\\\\n\r]/,et=/["\\\\\n\r]/g,tt={'"':'\\"',"\\":"\\\\","\n":"\\n","\r":"\\r"};function rt(e){return tt[e]}const nt=function e(t){if(!t)return null;if("BlankNode"===t.termType)return"_:"+t.value;if("DefaultGraph"===t.termType)return"";if("Literal"===t.termType)return function(e){const t=(r=e.value,Ze.test(r)?r.replace(et,rt):r);var r;return"http://www.w3.org/2001/XMLSchema#string"===e.datatype.value?'"'+t+'"':"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"===e.datatype.value?'"'+t+'"@'+e.language:'"'+t+'"^^'+Ye(e.datatype)}(t);if("NamedNode"===t.termType)return Ye(t);if("Quad"===t.termType||t.subject&&t.predicate&&t.object&&t.graph)return function(e,t){const r=t(e.subject),n=t(e.predicate),i=t(e.object),o=t(e.graph);return`${r} ${n} ${i} ${o?o+" ":""}.`}(t,e);if("Variable"===t.termType)return"?"+t.value;if(t[Symbol.iterator])return function(e,t){return[...e].map((e=>t(e))).join("\n")+"\n"}(t,e);throw new Error(`unknown termType ${t.termType}`)};class it{constructor(e){if(this.index=new Map,e)for(const[t,r]of e)this.set(t,r)}get size(){return this.index.size}clear(){this.index.clear()}delete(e){return this.index.delete(nt(e))}*entries(){for(const[,{term:e,value:t}]of this.index)yield[e,t]}forEach(e,t){for(const r of this.entries())e.call(t,r[1],r[0],this)}get(e){const t=this.index.get(nt(e));return t&&t.value}has(e){return this.index.has(nt(e))}*keys(){for(const[,{term:e}]of this.index)yield e}set(e,t){const r=nt(e);return this.index.set(r,{term:e,value:t}),this}*values(){for(const[,{value:e}]of this.index)yield e}[Symbol.iterator](){return this.entries()[Symbol.iterator]()}}const ot=it;function at(e){try{return nt(e)}catch(e){return null}}class st{constructor(e){if(this.index=new Map,e)for(const t of e)this.add(t)}get size(){return this.index.size}add(e){const t=nt(e);return this.index.has(t)||this.index.set(t,e),this}clear(){this.index.clear()}delete(e){return!!e&&this.index.delete(at(e))}entries(){return this.values().entries()}forEach(e,t){return this.values().forEach(e,t)}has(e){return!!e&&this.index.has(at(e))}values(){return new Set(this.index.values())}keys(){return this.values()}[Symbol.iterator](){return this.index.values()}}const lt=st,dt=class{constructor({dataset:e,end:t,quad:r,start:n}){this.dataset=e,this.end=t,this.quad=r,this.start=n}get term(){return this.quad[this.end]}get graph(){return this.quad.graph}get startTerm(){return this.quad[this.start]}};class ct{constructor(e){this.value=e}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}ct.prototype.termType="BlankNode";const ut=ct;class ht{equals(e){return!!e&&e.termType===this.termType}}ht.prototype.termType="DefaultGraph",ht.prototype.value="";const pt=ht,ft=function(e,t){if(!t)return null;if("BlankNode"===t.termType)return e.blankNode(t.value);if("DefaultGraph"===t.termType)return e.defaultGraph();if("Literal"===t.termType)return e.literal(t.value,t.language||e.namedNode(t.datatype.value));if("NamedNode"===t.termType)return e.namedNode(t.value);if("Quad"===t.termType){const r=e.fromTerm(t.subject),n=e.fromTerm(t.predicate),i=e.fromTerm(t.object),o=e.fromTerm(t.graph);return e.quad(r,n,i,o)}if("Variable"===t.termType)return e.variable(t.value);throw new Error(`unknown termType ${t.termType}`)};class gt{constructor(e,t,r){this.value=e,this.language=t,this.datatype=r}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value&&e.language===this.language&&e.datatype.equals(this.datatype)}}gt.prototype.termType="Literal";const vt=gt;class mt{constructor(e){this.value=e}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}mt.prototype.termType="NamedNode";const bt=mt;class yt{constructor(e,t,r,n){this.subject=e,this.predicate=t,this.object=r,this.graph=n}equals(e){return!!e&&("Quad"===e.termType||!e.termType)&&e.subject.equals(this.subject)&&e.predicate.equals(this.predicate)&&e.object.equals(this.object)&&e.graph.equals(this.graph)}}yt.prototype.termType="Quad",yt.prototype.value="";const xt=yt;class wt{constructor(e){this.value=e}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}wt.prototype.termType="Variable";const _t=wt,St=new bt("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),Et=new bt("http://www.w3.org/2001/XMLSchema#string");class It{constructor(){this.init()}init(){this._data={blankNodeCounter:0,defaultGraph:new pt}}namedNode(e){return new bt(e)}blankNode(e){return e=e||"b"+ ++this._data.blankNodeCounter,new ut(e)}literal(e,t){return"string"==typeof t?new vt(e,t,St):new vt(e,"",t||Et)}variable(e){return new _t(e)}defaultGraph(){return this._data.defaultGraph}quad(e,t,r,n=this.defaultGraph()){return new xt(e,t,r,n)}fromTerm(e){return ft(this,e)}fromQuad(e){return ft(this,e)}}It.exports=["blankNode","defaultGraph","fromQuad","fromTerm","literal","namedNode","quad","variable"];const Tt=new It,jt={apply:(e,t,r)=>e(r[0]),get:(e,t)=>e(t)},kt=function(e,{factory:t=Tt}={}){const r=(r="")=>t.namedNode(`${e}${r.raw||r}`);return"undefined"==typeof Proxy?r:new Proxy(r,jt)},Nt=(kt("http://www.w3.org/2001/XMLSchema#"),kt("http://www.w3.org/1999/02/22-rdf-syntax-ns#"));kt("http://www.w3.org/2000/01/rdf-schema#");class At{static add({ptr:e,start:t,end:r,subjects:n=[null],predicates:i=[null],objects:o=[null],graphs:a,callback:s}={}){if(!e.factory)throw new Error("add operation requires a factory");let l=()=>{};s&&(l=n=>{s(new dt({dataset:e.dataset,start:t,end:r,quad:n}))});for(const r of n)for(const n of i)for(const i of o)for(const o of a){const a={subject:r,predicate:n,object:i,graph:o};a[t]=e.term;const s=e.factory.quad(a.subject,a.predicate,a.object,a.graph);e.dataset.add(s),l(s)}return e}static addList({ptr:e,predicates:t,items:r,graphs:n}){if(e.isAny())throw new Error("can't attach a list to an any ptr");for(const i of t)for(const t of n){const n=r.map((()=>e.factory.blankNode()));e.dataset.add(e.factory.quad(e.term,i,n[0]||Nt.nil,t));for(let i=0;i<n.length;i++)e.dataset.add(e.factory.quad(n[i],Nt.first,r[i],t)),e.dataset.add(e.factory.quad(n[i],Nt.rest,n[i+1]||Nt.nil,t))}return e}static delete({ptr:e,start:t,subjects:r=[null],predicates:n=[null],objects:i=[null]}){for(const o of r)for(const r of n)for(const n of i){const i={subject:o,predicate:r,object:n};i[t]=e.term;const a=e.dataset.match(i.subject,i.predicate,i.object);for(const t of a)e.dataset.delete(t)}return e}static deleteList({ptr:e,predicates:t}){const r=[];for(const n of t)for(const t of e.dataset.match(e.term,n)){let n=t.object;for(r.push(t);!Nt.nil.equals(n);){n=r[r.length-1].object;const t=e.dataset.match(n);if(0===t.size)break;for(const e of t)r.push(e)}}for(const t of r)e.dataset.delete(t);return e}static execute({ptr:e,operation:t="traverse",quantifier:r,start:n,end:i,subjects:o,predicates:a,objects:s,graphs:l,items:d,callback:c}={}){if("add"===t)return At.add({ptr:e,start:n,end:i,subjects:o,predicates:a,objects:s,graphs:l,callback:c});if("addList"===t)return At.addList({ptr:e,predicates:a,items:d,graphs:l});if("delete"===t)return At.delete({ptr:e,start:n,subjects:o,predicates:a,objects:s});if("deleteList"===t)return At.deleteList({ptr:e,predicates:a});if("isList"===t)return At.isList({ptr:e});if("list"===t)return At.list({ptr:e});if("traverse"===t)return At.traverse({ptr:e,quantifier:r,start:n,end:i,subjects:o,predicates:a,objects:s,graphs:l});throw new Error(`unknown operation ${t}`)}static isList({ptr:e}){return!e.isAny()&&(!!Nt.nil.equals(e.term)||1===At.traverse({ptr:e,predicates:[Nt.first]}).length)}static list({ptr:e}){if(e.isList())return{*[Symbol.iterator](){for(;e&&!e.term.equals(Nt.nil);){const t=e.out([Nt.first]);if(1!==t.length)throw new Error(`Invalid list: rdf:first count not equals one on ${e.value}`);const r=e.out([Nt.rest]);if(1!==r.length)throw new Error(`Invalid list: rdf:rest count not equals one on ${e.value}`);yield t[0],e=r[0]}}}}static traverse({ptr:e,quantifier:t="one",start:r="subject",end:n="object",subjects:i=[null],predicates:o=[null],objects:a=[null],graphs:s=[null],callback:l}){if("one"===t)return At.traverseOne({ptr:e,start:r,end:n,subjects:i,predicates:o,objects:a,graphs:s,callback:l});if("oneOrMore"===t){const t=At.traverse({ptr:e,end:n,start:r,subjects:i,predicates:o,objects:a,graphs:s,callback:l});return At.traverseMore({ptrs:t,end:n,start:r,subjects:i,predicates:o,objects:a,graphs:s,callback:l})}if("zeroOrMore"===t)return At.traverseMore({ptrs:[e],end:n,start:r,subjects:i,predicates:o,objects:a,graphs:s,callback:l});if("zeroOrOne"===t)return[e,...At.traverse({ptr:e,end:n,start:r,subjects:i,predicates:o,objects:a,graphs:s,callback:l})];throw new Error(`unknown quantifier ${t}`)}static traverseMore({ptrs:e,end:t,start:r,subjects:n,predicates:i,objects:o,graphs:a,callback:s}={}){let l,d,c=[...e];do{l=[];for(const d of e)l=[...l,...At.traverseOne({ptr:d,end:t,start:r,subjects:n,predicates:i,objects:o,graphs:a,callback:s})];d&&(l=l.filter((e=>!d.has(e.term)))),e=l,c=[...c,...l],d=new lt(c.map((e=>e.term)))}while(l.length>0);return c}static traverseOne({ptr:e,start:t,end:r,subjects:n,predicates:i,objects:o,graphs:a,callback:s=(e,t)=>t.extend(e)}={}){const l=[];for(const d of n)for(const n of i)for(const i of o)for(const o of a){const a={subject:d,predicate:n,object:i,graph:o};a[t]=e.term;for(const n of e.dataset.match(a.subject,a.predicate,a.object,a.graph))l.push(s(new dt({dataset:e.dataset,end:r,quad:n,start:t}),e))}return l}}const Rt=At;function Ct(e,t){return t?r=>t(e.extend(r)):()=>{}}const Ot=class{constructor({dataset:e,edges:t=[],factory:r,graph:n,term:i}){if(!e&&0===t.length)throw new Error("dataset or edges is required");if(0===t.length&&void 0===i)throw new Error("edges or term must be given");if(t.length>0&&i)throw new Error("edges or term must be given");this.dataset=e||t[t.length-1].dataset,this.edges=t,this.factory=r,this._graph=n,0===t.length&&(this._term=i)}get edge(){return this.edges[this.edges.length-1]}get graph(){return"object"==typeof this._graph?this._graph:this.edge&&this.edge.graph}get length(){return void 0!==this._term?1:this.edges.length+1}get startTerm(){return this._term||this.edges[0].startTerm}get term(){return void 0!==this._term?this._term:this.edge.term}get value(){const e=this.term;return null===e?void 0:e.value}addIn(e,t,r){return Rt.add({ptr:this,start:"object",end:"subject",subjects:t,predicates:e,graphs:[this.graph||this.factory.defaultGraph()],callback:Ct(this,r)})}addList(e,t){return Rt.addList({ptr:this,predicates:e,graphs:[this.graph||this.factory.defaultGraph()],items:t})}addOut(e,t,r){return Rt.add({ptr:this,start:"subject",end:"object",predicates:e,objects:t,graphs:[this.graph||this.factory.defaultGraph()],callback:Ct(this,r)})}deleteIn(e,t){return Rt.delete({ptr:this,start:"object",subjects:t,predicates:e})}deleteList(e){return Rt.deleteList({ptr:this,predicates:e})}deleteOut(e,t){return Rt.delete({ptr:this,start:"subject",predicates:e,objects:t})}execute({operation:e,quantifier:t,start:r,end:n,subjects:i,predicates:o,objects:a,graphs:s,items:l,callback:d}){return Rt.execute({ptr:this,operation:e,quantifier:t,start:r,end:n,subjects:i,predicates:o,objects:a,graphs:s,items:l,callback:d})}extend(e){return new this.constructor({dataset:this.dataset,edges:[...this.edges,e],factory:this.factory,graph:this._graph})}hasIn(e,t){return Rt.traverse({ptr:this,start:"object",end:"object",subjects:t,predicates:e,graphs:[this.graph]})}hasOut(e,t){return Rt.traverse({ptr:this,start:"subject",end:"subject",predicates:e,objects:t,graphs:[this.graph]})}in(e,t){return Rt.traverse({ptr:this,start:"object",end:"subject",subjects:t,predicates:e,graphs:[this.graph]})}isAny(){return!this.term}isList(){return Rt.isList({ptr:this})}list(){return Rt.list({ptr:this})}nodes(){const e=this,t=e=>void 0!==this._term?{dataset:this.dataset,term:this._term}:this.edges.length>e?{dataset:this.edges[e].dataset,term:this.edges[e].startTerm}:this.edges.length===e?{dataset:this.edges[e-1].dataset,term:this.edges[e-1].term}:void 0;return{*[Symbol.iterator](){for(let r=0;r<e.length;r++)yield t(r)}}}out(e,t){return Rt.traverse({ptr:this,predicates:e,objects:t,graphs:[this.graph]})}quads(){const e=this;return{*[Symbol.iterator](){for(const t of e.edges)yield t.quad}}}trim(){return new this.constructor({dataset:this.dataset,factory:this.factory,graph:this.graph,term:this.term})}},Lt=function(e,t){return e?e.equals(t):e===t};function $t(e,t){return t?r=>t(new e.constructor({factory:e.factory,ptrs:[r]})):()=>{}}class Dt{constructor({dataset:e,factory:t,ptrs:r,terms:n,graphs:i}){if(this.factory=t,r)this.ptrs=[...r];else{this.ptrs=[];for(const r of n||[null])for(const n of i||[null])this.ptrs.push(new Ot({dataset:e,factory:t,graph:n,term:r}))}}get dataset(){const e=new Set(this.datasets);return 1!==e.size?null:e[Symbol.iterator]().next().value}get datasets(){return this.ptrs.map((e=>e.dataset))}get term(){const e=new lt(this.terms);if(1===e.size)return e[Symbol.iterator]().next().value}get terms(){return this.ptrs.map((e=>e.term))}get value(){const e=this.term;return null==e?void 0:e.value}get values(){return this.ptrs.map((e=>e.value))}addIn(e,t,r){const n=$t(this,r);for(const r of this.ptrs)r.addIn(e,t,n);return this}addList(e,t){if(this.isAny())throw new Error("can't attach a list to an any ptr");for(const r of this.ptrs)r.addList(e,t);return this}addOut(e,t,r){const n=$t(this,r);for(const r of this.ptrs)r.addOut(e,t,n);return this}clone(e){return new this.constructor({factory:this.factory,ptrs:this.ptrs,...e})}deleteIn(e,t){for(const r of this.ptrs)r.deleteIn(e,t);return this}deleteList(e){for(const t of this.ptrs)t.deleteList(e);return this}deleteOut(e,t){for(const r of this.ptrs)r.deleteOut(e,t);return this}distinct(){const e=this.ptrs.reduce(((e,t)=>(e.some((e=>function(e,t){return e.dataset===t.dataset&&!!Lt(e.graph,t.graph)&&!!Lt(e.term,t.term)}(e,t)))||e.push(t.trim()),e)),[]);return this.clone({ptrs:e})}execute(e){return this.clone({ptrs:this.ptrs.flatMap((t=>t.execute(e)))})}executeAll(e){let t=this;for(const r of e)t=t.execute(r);return t}filter(e){return this.clone({ptrs:[...this].filter(e).map((e=>e.ptrs[0]))})}hasIn(e,t){return this.clone({ptrs:this.ptrs.flatMap((r=>r.hasIn(e,t)))})}hasOut(e,t){return this.clone({ptrs:this.ptrs.flatMap((r=>r.hasOut(e,t)))})}in(e,t){return this.clone({ptrs:this.ptrs.flatMap((r=>r.in(e,t)))})}isAny(){return this.ptrs.length>0&&this.ptrs.some((e=>e.isAny()))}isList(){return 1===this.ptrs.length&&this.ptrs[0].isList()}list(){if(!this.isList())return;const e=this.ptrs[0].list()[Symbol.iterator](),t=()=>{const{done:t,value:r}=e.next();return t?{done:!0}:{done:!1,value:this.clone({ptrs:[r]})}};return{[Symbol.iterator]:()=>({next:t})}}map(e){return[...this].map(e)}node(e){const t=this.dataset,r=[...e].map((e=>new Ot({dataset:t,factory:this.factory,term:e})));return this.clone({ptrs:r})}out(e,t){return this.clone({ptrs:this.ptrs.flatMap((r=>r.out(e,t)))})}quads(){const e=this;return{*[Symbol.iterator](){for(const t of e.ptrs)for(const e of t.edges)yield e.quad}}}trim(){return this.clone({ptrs:this.ptrs.map((e=>e.trim()))})}*[Symbol.iterator](){for(const e of this.ptrs)yield this.clone({ptrs:[e]})}}const Pt=Dt;kt("http://www.w3.org/2002/07/owl#");const Mt=kt("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),Bt=kt("http://www.w3.org/2000/01/rdf-schema#"),Ft=kt("http://www.w3.org/ns/shacl#"),qt=kt("https://schemas.link/shacl-next#"),Ut=kt("http://www.w3.org/2001/XMLSchema#");var zt=r(8059);const Ht=class{constructor({details:e,factory:t,options:r,results:n=[]}={}){this.details=e,this.factory=t,this.options=r,this.results=n,this._conforms=zt((()=>!this.results.some((e=>e.severity.equals(Ft.Info)||e.severity.equals(Ft.Violation)||e.severity.equals(Ft.Warning))))),this._ptr=zt((()=>this.build()))}get conforms(){return this._conforms()}get dataset(){return this.ptr.dataset}get ptr(){return this._ptr()}get term(){return this.ptr.term}build(){const e=new Pt({dataset:this.factory.dataset(),factory:this.factory,terms:[this.factory.blankNode()]});e.addOut([Mt.type],[Ft.ValidationReport]).addOut([Ft.conforms],[this.factory.literal(this.conforms.toString(),Ut.boolean)]);for(const t of this.results)e.addOut([Ft.result],[this.factory.blankNode()],(e=>{t.build(e,this.options)}));return e}coverage(){return this.results.flatMap((e=>e.coverage()))}},Vt=class{constructor({args:e={},constraintComponent:t,factory:r,focusNode:n,message:i=[],path:o,results:a=[],severity:s,shape:l,source:d=[],value:c,valuePaths:u=[]}={}){this.args=e,this.constraintComponent=t,this.factory=r,this.focusNode=n,this.path=o||l.path,this.results=a,this.severity=s,this.shape=l,this.source=d,this.value=c,this.valuePaths=u,this._message=zt((()=>(this.shape.message.length>0&&(i=this.shape.message),0===i.length&&(i=this.shape.ptr.node([this.constraintComponent]).out([Ft.message]).terms),i.map((t=>r.literal(function(e,t){return Object.entries(t).reduce(((e,[t,r])=>(r&&r.termType&&(r=nt(r)),e.replace(`{$${t}}`,r).replace(`{?${t}}`,r))),e)}(t.value,e),t.language||null))))))}get message(){return this._message()}build(e,{details:t}={}){e.addOut([Mt.type],[Ft.ValidationResult]).addOut([Ft.focusNode],this.focusNode.terms).addOut([Ft.resultSeverity],[this.severity]).addOut([Ft.sourceConstraint],this.source).addOut([Ft.sourceConstraintComponent],[this.constraintComponent]).addOut([Ft.sourceShape],this.shape.ptr.terms),this.message&&e.addOut([Ft.resultMessage],this.message);const r=t=>"one"===t.quantifier?t.predicates.length>1?e.node([this.factory.blankNode()]).addList([Ft.alternativePath],t.predicates):"object"===t.start?e.node([this.factory.blankNode()]).addOut([Ft.inversePath],[t.predicates[0]]):e.node([t.predicates[0]]):"oneOrMore"===t.quantifier?e.node([this.factory.blankNode()]).addOut([Ft.oneOrMorePath],[t.predicates[0]]):"zeroOrMore"===t.quantifier?e.node([this.factory.blankNode()]).addOut([Ft.zeroOrMorePath],[t.predicates[0]]):"zeroOrOne"===t.quantifier?e.node([this.factory.blankNode()]).addOut([Ft.zeroOrOnePath],[t.predicates[0]]):void 0;if(this.path&&(1===this.path.length?e.addOut([Ft.resultPath],r(this.path[0]).terms):e.addList([Ft.resultPath],this.path.map((e=>r(e).term)))),void 0!==this.value&&e.addOut([Ft.value],this.value.terms),t)for(const r of this.results)e.addOut([Ft.detail],[this.factory.blankNode()],(e=>{r.build(e,{details:t})}))}coverage(){return[...this.valuePaths.flatMap((e=>[...e.quads()])),...this.results.flatMap((e=>e.coverage()))]}};class Gt{constructor({factory:e,focusNode:t,options:r={debug:!1,details:!1},processed:n=new Set,report:i=new Ht({factory:e,options:r}),results:o=new Map,shape:a,value:s,valueOrNode:l,valuePaths:d,values:c}={}){this.factory=e,this.focusNode=t,this.options=r,this.processed=n,this.report=i,this.results=o,this.shape=a,this.value=s,this.valuePaths=d,this.valueOrNode=l,this.values=c}create({child:e,focusNode:t=this.focusNode,shape:r=this.shape,value:n=this.value,valueOrNode:i=this.valueOrNode,valuePaths:o=this.valuePaths,values:a=this.values}={}){return new Gt({factory:this.factory,focusNode:t,options:this.options,processed:this.processed,report:e?new Ht({factory:this.factory,options:this.options}):this.report,results:this.results,shape:r,value:n,valueOrNode:i,valuePaths:o,values:a})}id({shape:e=this.shape}={}){return`${nt(e.ptr.term)} - ${nt(this.focusNode.term)} - ${t=this.valuePaths,t?`{${t.map((e=>function(e){return e?`{${[...e.quads()].map((e=>nt(e))).join(" ")}}`:"{}"}(e))).join(" ")}}`:"{}"}`;var t}result(e){const t=new Vt({factory:this.factory,focusNode:this.focusNode,shape:this.shape,value:this.value,valuePaths:this.valuePaths,...e}),r=this.id();this.results.has(r)?this.results.get(r).add(t):this.results.set(r,new Set([t])),this.report.results.push(t)}debug(e,t){this.options.debug&&this.result({severity:qt.Debug,constraintComponent:e,...t})}trace(e,t){this.options.trace&&this.result({severity:qt.Trace,constraintComponent:e,...t})}test(e,t,r){e?this.debug(t,r):this.violation(t,r)}violation(e,t){this.result({constraintComponent:e,severity:this.shape.severity||Ft.Violation,...t})}}const Wt=Gt;function Jt(){return{generic:e=>{e.trace(qt.TraversalConstraintComponent,{args:{},message:[e.factory.literal("Traversal")],value:e.valueOrNode})}}}const Qt=class{constructor(e){this.validations=new ot(e)}compile(e){const t=e.validator.options.coverage;if(e.deactivated)return[];let r=!1;const n=new Set;for(const t of e.ptr.execute({start:"subject",end:"predicate"})){const e=this.validations.get(t.term);e&&(n.add(e),t.term.equals(Ft.property)&&(r=!0))}return t&&e.isPropertyShape&&!r&&n.add(Jt),[...n].map((t=>t(e))).filter(Boolean)}};var Xt=r(9349);function Kt(e){if("BlankNode"!==e.term.termType)return{quantifier:"one",start:"subject",end:"object",predicates:[e.term]};const t=e.out([Ft.alternativePath]);if(1===t.ptrs.length&&t.ptrs[0].isList())return{quantifier:"one",start:"subject",end:"object",predicates:[...t.list()].map((e=>e.term))};const r=e.out([Ft.inversePath]);if(r.term)return{quantifier:"one",start:"object",end:"subject",predicates:[r.term]};const n=e.out([Ft.oneOrMorePath]);if(n.term)return{quantifier:"oneOrMore",start:"subject",end:"object",predicates:[n.term]};const i=e.out([Ft.zeroOrMorePath]);if(i.term)return{quantifier:"zeroOrMore",start:"subject",end:"object",predicates:[i.term]};const o=e.out([Ft.zeroOrOnePath]);return o.term?{quantifier:"zeroOrOne",start:"subject",end:"object",predicates:[o.term]}:void 0}const Yt=class{constructor(e){this.shape=e,this._compiled=zt((()=>this.shape.validator.registry.compile(e)))}get compiled(){return this._compiled()}async validate(e){return 0===e.focusNode.dataset.size||(this.shape.isPropertyShape?await this.validateProperty(e):await this.validateNode(e)),e}async validateNode(e){const t=e.create({shape:this.shape,valueOrNode:e.value||e.focusNode});for(const e of this.compiled)e.node&&await e.node(t),e.generic&&await e.generic(t)}async validateProperty(e){let t;t=this.shape.isSparqlShape?e.focusNode:e.focusNode.executeAll(this.shape.path);const r=t.node(new lt(t.terms)),n=[...t].reduce(((e,r)=>{const n=r.term,i=t.node([n]);return e.has(n)||e.set(n,{value:i,valuePaths:[]}),e.get(n).valuePaths.push(r),e}),new ot).values(),i=e.create({shape:this.shape,values:r});for(const e of this.compiled)e.property&&await e.property(i);for(const{value:t,valuePaths:r}of n){const n=e.create({shape:this.shape,value:t,valueOrNode:t,valuePaths:r});for(const e of this.compiled)e.generic&&await e.generic(n)}}},Zt=function(e){const t=new lt,r=new Pt({dataset:e.dataset,terms:e.terms}).execute({quantifier:"zeroOrMore",start:"object",end:"subject",predicates:[Bt.subClassOf]});for(const e of r.ptrs)for(const{term:r}of e.nodes())t.add(r);return t},er=class{constructor(e){this.targetClass=new lt([...Zt(e.hasOut([Mt.type],[Ft.NodeShape])),...Zt(e.out([Ft.targetClass]))]),this.targetNode=e.out([Ft.targetNode]).terms,this.targetObjectsOf=e.out([Ft.targetObjectsOf]).terms,this.targetSubjectsOf=e.out([Ft.targetSubjectsOf]).terms}resolve(e){const t=e.focusNode.node([null]),r=[...e.focusNode.hasOut([Mt.type],this.targetClass).ptrs,...e.focusNode.node(this.targetNode).ptrs,...t.execute({start:"object",end:"object",predicates:this.targetObjectsOf}).ptrs,...t.execute({start:"subject",end:"subject",predicates:this.targetSubjectsOf}).ptrs],n=e.focusNode.clone({ptrs:r});return n.node([...new lt(n.terms)])}},tr=class{constructor(e,{validator:t}){this.ptr=e,this.validator=t,this._deactivated=zt((()=>{const e=this.ptr.out([Ft.deactivated]).term;return e&&(0,Xt.fromRdf)(e)})),this._message=zt((()=>this.ptr.out([Ft.message]).terms)),this._path=zt((()=>function(e){return 0===e.terms.length?null:e.ptrs[0].isList()?[...e.list()].map((e=>Kt(e))):[Kt(e)]}(this.ptr.out([Ft.path])))),this._severity=zt((()=>this.ptr.out([Ft.severity]).term)),this._shapeValidator=zt((()=>new Yt(this))),this._sparql=zt((()=>this.ptr.out([Ft.sparql]))),this._targetResolver=zt((()=>new er(this.ptr)))}get deactivated(){return this._deactivated()}get isPropertyShape(){return Boolean(this.path)}get isSparqlShape(){return this.sparql.terms.length>0}get path(){return this._path()}get targetResolver(){return this._targetResolver()}get message(){return this._message()}get severity(){return this._severity()}get shapeValidator(){return this._shapeValidator()}get sparql(){return this._sparql()}resolveTargets(e){return this.targetResolver.resolve(e)}async validate(e){const t=e.id({shape:this});if(e.processed.has(t)){if(e.results.has(t))for(const r of e.results.get(t))e.report.results.push(r);return e}return e.processed.add(t),this.shapeValidator.validate(e)}};async function rr(e,t){return Promise.all(e.map(t))}function nr(e){return t=>{t.test(e.equals(t.valueOrNode.term),Ft.HasValueConstraintComponent,{args:{hasValue:e},message:[t.factory.literal("Value must be {$hasValue}")]})}}function ir(e){return t=>{const r=[...t.values].some((t=>e.equals(t.term)));t.test(r,Ft.HasValueConstraintComponent,{args:{hasValue:e},message:[t.factory.literal("Missing expected value {$hasValue}")]})}}function or(e){return Ut.dateTime.equals(e.datatype)&&/^.*(((\+|-)\d{2}:\d{2})|Z)$/.test(e.value)}const ar=function(e,t){if(!e||"Literal"!==e.termType)return null;if(!t||"Literal"!==t.termType)return null;if(or(e)!==or(t))return null;const r=(0,Xt.fromRdf)(e),n=(0,Xt.fromRdf)(t);return typeof r!=typeof n?null:"string"==typeof r?r.localeCompare(n):r-n};function sr(e){return t=>{const r=t.focusNode.out([e]),n=r.filter((e=>!e.term.equals(t.focusNode.term))),i=0!==r.terms.length&&0===n.terms.length;t.test(i,Ft.EqualsConstraintComponent,{args:{equals:e},message:[t.factory.literal("Must have same values as {$equals}")],value:n.terms[0]&&t.focusNode.node([n.terms[0]])||t.focusNode})}}function lr(e){return t=>{const r=new lt(t.focusNode.out([e]).terms),n=new lt(t.values.terms),i=[...[...n].filter((e=>!r.has(e))),...[...r].filter((e=>!n.has(e)))];for(const r of i)t.violation(Ft.EqualsConstraintComponent,{args:{equals:e},message:[t.factory.literal("Must have same values as {$equals}")],value:t.focusNode.node([r])});0===i.length&&t.debug(Ft.EqualsConstraintComponent,{args:{equals:e},message:[t.factory.literal("Must have same values as {$equals}")]})}}function dr(e,t,r,n){return async i=>{const o=[];let a=[];t&&(a=new Set(i.shape.ptr.in([Ft.property]).out([Ft.property]).out([Ft.qualifiedValueShape]).filter((t=>!t.term.equals(e.ptr.term))).map((e=>i.shape.validator.shape(e)))));const s=(await async function(t){return(await Promise.all(t.map((t=>(async t=>{const r=(await e.validate(i.create({child:!0,focusNode:t}))).report;if(o.push(r.results),!r.conforms)return!1;if(0===a.length)return!0;if(i.options.debug||i.options.details){const e=await rr([...a],(async e=>(await e.validate(i.create({child:!0,focusNode:t}))).report));return o.push(e.flatMap((e=>e.results))),!e.every((e=>e.conforms))}return!await async function(e,t){for(const r of e)if(!await t(r))return!1;return!0}([...a],(async e=>(await e.validate(i.create({child:!0,focusNode:t}))).report.conforms))})(t))))).filter(Boolean)}(i.values)).length;null!==r&&i.test(s<=r,Ft.QualifiedMaxCountConstraintComponent,{args:{qualifiedMaxCount:r,qualifiedValueShape:e.ptr.term,qualifiedValueShapesDisjoint:t},message:[i.factory.literal("More than {$qualifiedMaxCount} values have shape {$qualifiedValueShape}")],results:o.flat()}),null!==n&&i.test(s>=n,Ft.QualifiedMinCountConstraintComponent,{args:{qualifiedMinCount:n,qualifiedValueShape:e.ptr.term,qualifiedValueShapesDisjoint:t},message:[i.factory.literal("Less than {$qualifiedMinCount} values have shape {$qualifiedValueShape}")],results:o.flat()})}}function cr(e,t,r){return n=>{n.test(r.test(n.valueOrNode.term.value),Ft.PatternConstraintComponent,{args:{flags:t,pattern:e},message:[n.factory.literal('Value does not match pattern "{$pattern}"')],value:n.valueOrNode})}}const ur=kt("http://www.w3.org/ns/shacl#"),hr=kt("https://schemas.link/shacl-next#"),pr=class{constructor({results:e=[]}={}){this.results=e}get conforms(){return!this.results.some((e=>e.severity.equals(ur.Info)||e.severity.equals(ur.Violation)||e.severity.equals(ur.Warning)))}},fr=class{constructor({args:e={},factory:t,message:r=[],severity:n=ur.Violation}={}){this.severity=n,this.message=r.map((r=>t.literal(function(e,t){return Object.entries(t).reduce(((e,[t,r])=>(r&&r.termType&&(r=nt(r)),e.replace(`{$${t}}`,r).replace(`{?${t}}`,r))),e)}(r.value,e),r.language||null)))}};class gr{constructor({factory:e=Tt}={}){this.factory=e}clone({factory:e}={}){return new gr({factory:e||this.factory})}validate(){return new pr}validateSimple(){return!0}}const vr=gr;class mr extends vr{constructor({datatypes:e,factory:t}={}){super({factory:t}),this.datatypes=[];for(const t of Array.isArray(e)?e:[e])t&&this.datatypes.push(this.factory.fromTerm(t))}clone({factory:e}={}){return new mr({datatypes:this.datatypes,factory:e||this.factory})}}const br=mr,yr=class{constructor({factory:e=Tt,validations:t}={}){if(this.factory=e,this.validations=new ot,t)for(const e of Object.values(t)){const t=e.clone({factory:this.factory});for(const e of t.datatypes)this.validations.set(e,t)}}validate(e){const t=this.validations.get(e.datatype);return t?t.validate(e):new pr}validateSimple(e){const t=this.validations.get(e.datatype);return!t||t.validateSimple(e)}};class xr extends br{constructor(e,t,{factory:r}={}){super({datatypes:t,factory:r}),this.message=[this.factory.literal("term value {$this} matches pattern {$pattern}")],this.patterns=Array.isArray(e)?e:[e]}clone({factory:e}={}){return new xr(this.patterns,this.datatypes,{factory:e||this.factory})}validate(e){const t=this.patterns.map((t=>{let r;t.test(e.value)&&(r=hr.Debug);const n={pattern:this.factory.literal(t.toString()),this:e};return new fr({args:n,factory:this.factory,message:this.message,severity:r})}));return new pr({results:t})}validateSimple(e){return this.patterns.every((t=>t.test(e.value)))}}const wr=xr,_r=/^([-+]?[0-9]+)$/;class Sr extends wr{constructor(e=null,t=null,r,{factory:n}={}){super(_r,r,{factory:n}),this.maxInclusive=null,this.minInclusive=null,"string"==typeof t&&(this.maxInclusive=BigInt(t)),"string"==typeof e&&(this.minInclusive=BigInt(e))}clone({factory:e}={}){return new Sr(this.minInclusive?.toString(),this.maxInclusive?.toString(),this.datatypes,{factory:e||this.factory})}validate(e){const t=super.validate(e).results;if(!hr.Debug.equals(t[0].severity))return new pr({results:t});const r=BigInt(e.value);if(null!==this.minInclusive&&r<this.minInclusive){const r=`term value "${e.value}" is less than "${this.minInclusive.toString()}"`,n=[this.factory.literal(r)];t.push(new fr({factory:this.factory,message:n}))}if(null!==this.maxInclusive&&r>this.maxInclusive){const r=`term value "${e.value}" is greater than "${this.maxInclusive.toString()}"`,n=[this.factory.literal(r)];t.push(new fr({factory:this.factory,message:n}))}return new pr({results:t})}validateSimple(e){if(!super.validateSimple(e))return!1;const t=BigInt(e.value);return!(null!==this.minInclusive&&t<this.minInclusive||null!==this.maxInclusive&&t>this.maxInclusive)}}const Er=Sr;class Ir extends br{constructor(e,t,{factory:r}={}){super({datatypes:t,factory:r}),this.values=new Set(e)}clone({factory:e}={}){return new Ir(this.values,this.datatypes,{factory:e||this.factory})}validate(e){const t=[];if(!this.values.has(e.value)){const r=`term value "${e.value}" is not included in the list: ${[...this.values].join(",")}`,n=[this.factory.literal(r)];t.push(new fr({factory:this.factory,message:n}))}return new pr({results:t})}validateSimple(e){return this.values.has(e.value)}}const Tr=Ir,jr={xsd:kt("http://www.w3.org/2001/XMLSchema#")},kr=new br({datatypes:jr.xsd.anySimpleType}),Nr=new br({datatypes:jr.xsd.anyAtomicType}),Ar=/^([^\ud8ff-\udfff\ufffe-\uffff]*)$/,Rr=/^((\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+)([Ee](\+|-)?[0-9]+)?|(\+|-)?INF|NaN)$/,Cr=/^(-?P((([0-9]+Y([0-9]+M)?([0-9]+D)?|([0-9]+M)([0-9]+D)?|([0-9]+D))(T(([0-9]+H)([0-9]+M)?([0-9]+(\.[0-9]+)?S)?|([0-9]+M)([0-9]+(\.[0-9]+)?S)?|([0-9]+(\.[0-9]+)?S)))?)|(T(([0-9]+H)([0-9]+M)?([0-9]+(\.[0-9]+)?S)?|([0-9]+M)([0-9]+(\.[0-9]+)?S)?|([0-9]+(\.[0-9]+)?S)))))$/,Or=/^(-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?))(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,Lr=new wr(Ar,jr.xsd.string),$r=new Tr(["1","true","0","false"],jr.xsd.boolean),Dr=new wr(/^((\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+))$/,jr.xsd.decimal),Pr=new wr(Rr,jr.xsd.float),Mr=new wr(Rr,jr.xsd.double),Br=new wr(Cr,jr.xsd.duration),Fr=new wr(Or,jr.xsd.dateTime),qr=new wr(/^((([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?))(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,jr.xsd.time),Ur=new wr(/^(-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,jr.xsd.date),zr=new wr(/^(-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,jr.xsd.gYearMonth),Hr=new wr(/^(-?([1-9][0-9]{3,}|0[0-9]{3})(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,jr.xsd.gYear),Vr=new wr(/^(--(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,jr.xsd.gMonthDay),Gr=new wr(/^(---(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,jr.xsd.gDay),Wr=new wr(/^(--(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,jr.xsd.gMonth),Jr=new wr(/^(([0-9a-fA-F]{2})*)$/,jr.xsd.hexBinary),Qr=new wr(/^(((([A-Za-z0-9+/] ?){4})*(([A-Za-z0-9+/] ?){3}[A-Za-z0-9+/]|([A-Za-z0-9+/] ?){2}[AEIMQUYcgkosw048] ?=|[A-Za-z0-9+/] ?[AQgw] ?= ?=))?)$/,jr.xsd.base64Binary),Xr=new wr(Ar,jr.xsd.anyURI),Kr=/^([^\u000d\u000a\u0009]*)$/,Yr=new wr([Ar,Kr],jr.xsd.normalizedString),Zr=new wr([Ar,Kr,/^([^ ]+( [^ ]+)*)*$/],jr.xsd.token),en=new wr(/^([a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*)$/,jr.xsd.language),tn=new Er(null,null,jr.xsd.integer),rn=new Er(null,"0",jr.xsd.nonPositiveInteger),nn=new Er(null,"-1",jr.xsd.negativeInteger),on=new Er("-9223372036854775808","9223372036854775807",jr.xsd.long),an=new Er("-2147483648","2147483647",jr.xsd.int),sn=new Er("-32768","32767",jr.xsd.short),ln=new Er("-128","127",jr.xsd.byte),dn=new Er("0",null,jr.xsd.nonNegativeInteger),cn=new Er("0","18446744073709551615",jr.xsd.unsignedLong),un=new Er("0","4294967295",jr.xsd.unsignedInt),hn=new Er("0","65535",jr.xsd.unsignedShort),pn=new Er("0","255",jr.xsd.unsignedByte),fn=new Er("1",null,jr.xsd.positiveInteger),gn=new wr([Cr,/^([^DT]*)$/],jr.xsd.yearMonthDuration),vn=new wr([Cr,/^([^YM]*[DT].*)$/],jr.xsd.dayTimeDuration),mn=new wr([Or,/^(.*(Z|(\+|-)[0-9][0-9]:[0-9][0-9]))$/],jr.xsd.dateTimeStamp),bn=class extends yr{constructor({factory:e}={}){super({factory:e,validations:{...i}})}},yn=new ot([[Ft.BlankNode,new Set(["BlankNode"])],[Ft.BlankNodeOrIRI,new Set(["BlankNode","NamedNode"])],[Ft.BlankNodeOrLiteral,new Set(["BlankNode","Literal"])],[Ft.IRI,new Set(["NamedNode"])],[Ft.IRIOrLiteral,new Set(["NamedNode","Literal"])],[Ft.Literal,new Set(["Literal"])]]);function xn(e,t){return r=>{r.test(t.has(r.valueOrNode.term.termType),Ft.NodeKindConstraintComponent,{args:{nodeKind:e},message:[r.factory.literal("Value does not have node kind {$nodeKind}")],value:r.valueOrNode})}}const wn=new ot([[Ft.maxCount,function(e){return{property:(t=parseInt(e.ptr.out([Ft.maxCount]).value),e=>{e.test(e.values.terms.length<=t,Ft.MaxCountConstraintComponent,{args:{maxCount:t},message:[e.factory.literal("More than {$maxCount} values")]})})};var t}],[Ft.minCount,function(e){return{property:(t=parseInt(e.ptr.out([Ft.minCount]).value),e=>{e.test(e.values.terms.length>=t,Ft.MinCountConstraintComponent,{args:{minCount:t},message:[e.factory.literal("Less than {$minCount} values")]})})};var t}],[Ft.and,function(e){return{generic:(t=[...e.ptr.out([Ft.and])].flatMap((e=>[...e.list()])).map((t=>e.validator.shape(t))),async e=>{const r=await rr(t,(async t=>(await t.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report)),n=r.every((e=>e.conforms));e.test(n,Ft.AndConstraintComponent,{results:r.flatMap((e=>e.results)),value:e.valueOrNode})})};var t}],[Ft.not,function(e){return{generic:(t=e.validator.shape(e.ptr.out([Ft.not])),async e=>{const r=(await t.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report,n=!r.conforms;e.test(n,Ft.NotConstraintComponent,{args:{not:t.ptr.term},message:[e.factory.literal("Value does have shape {$not}")],results:r.results,value:e.valueOrNode})})};var t}],[Ft.or,function(e){return{generic:(t=[...e.ptr.out([Ft.or])].flatMap((e=>[...e.list()])).map((t=>e.validator.shape(t))),async e=>{let r,n=[];if(e.options.debug||e.options.details){const i=await rr(t,(async t=>(await t.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report));n=i.flatMap((e=>e.results)),r=i.some((e=>e.conforms))}else r=await async function(e,t){for(const r of e)if(await t(r))return!0;return!1}(t,(async t=>(await t.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report.conforms));e.test(r,Ft.OrConstraintComponent,{results:n,value:e.valueOrNode})})};var t}],[Ft.xone,function(e){return{generic:(t=[...e.ptr.out([Ft.xone])].flatMap((e=>[...e.list()])).map((t=>e.validator.shape(t))),async e=>{const r=await rr(t,(async t=>(await t.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report)),n=1===r.filter((e=>e.conforms)).length;e.test(n,Ft.XoneConstraintComponent,{results:r.flatMap((e=>e.results)),value:e.valueOrNode})})};var t}],[Ft.closed,function(e){if(!(0,Xt.fromRdf)(e.ptr.out([Ft.closed]).term))return null;const t=e.ptr.out([Ft.property]).map((t=>e.validator.shape(t)));return{node:(r=new lt(t.filter((e=>!e.deactivated)).map((e=>e.path[0].predicates[0]))),n=new lt([...e.ptr.out([Ft.ignoredProperties]).list()||[]].map((e=>e.term))),e=>{const t=e.focusNode.execute({start:"subject",end:"predicate"}).filter((e=>!n.has(e.term)&&!r.has(e.term)));if(t.ptrs.length>0)for(const r of t)e.violation(Ft.ClosedConstraintComponent,{message:[e.factory.literal("Predicate is not allowed (closed shape)")],path:[{quantifier:"one",start:"subject",end:"object",predicates:[r.term]}],value:e.focusNode.node([[...r.quads()][0].object])});else e.debug(Ft.ClosedConstraintComponent)})};var r,n}],[Ft.hasValue,function(e){const t=e.ptr.out([Ft.hasValue]).term;return{node:nr(t),property:ir(t)}}],[Ft.in,function(e){return{generic:(t=new lt([...e.ptr.out([Ft.in]).list()].map((e=>e.term))),e=>{e.test(t.has(e.valueOrNode.term),Ft.InConstraintComponent,{args:{in:[...t].map((e=>e.value)).join(", ")},message:[e.factory.literal("Value is not in {$in}")],value:e.valueOrNode})})};var t}],[Ft.disjoint,function(e){return{generic:(t=e.ptr.out([Ft.disjoint]).term,e=>{const r=e.focusNode.dataset.match(e.focusNode.term,t,e.valueOrNode.term);e.test(0===r.size,Ft.DisjointConstraintComponent,{args:{disjoint:t},message:[e.factory.literal("Value node must not also be one of the values of {$disjoint}")],value:e.valueOrNode})})};var t}],[Ft.equals,function(e){const t=e.ptr.out([Ft.equals]).term;return{node:sr(t),property:lr(t)}}],[Ft.lessThan,function(e){return{property:(t=e.ptr.out([Ft.lessThan]).term,e=>{const r=e.focusNode.out([t]).terms;for(const n of e.values)for(const i of r){const r=ar(n.term,i);null===r||r>=0?e.violation(Ft.LessThanConstraintComponent,{args:{lessThan:t},message:[e.factory.literal("Value is not less than value of {$lessThan}")],value:n}):e.debug(Ft.LessThanConstraintComponent,{args:{lessThan:t},message:[e.factory.literal("Value is not less than value of {$lessThan}")],value:n})}})};var t}],[Ft.lessThanOrEquals,function(e){return{property:(t=e.ptr.out([Ft.lessThanOrEquals]).term,e=>{const r=e.focusNode.out([t]).terms;for(const n of e.values)for(const i of r){const r=ar(n.term,i);null===r||r>0?e.violation(Ft.LessThanOrEqualsConstraintComponent,{args:{lessThanOrEquals:t},message:[e.factory.literal("Value is not less than or equal to value of {$lessThanOrEquals}")],value:n}):e.debug(Ft.LessThanOrEqualsConstraintComponent,{args:{lessThanOrEquals:t},message:[e.factory.literal("Value is not less than or equal to value of {$lessThanOrEquals}")],value:n})}})};var t}],[Ft.maxExclusive,function(e){return{generic:(t=e.ptr.out([Ft.maxExclusive]).term,e=>{const r=ar(e.valueOrNode.term,t);e.test(null!==r&&r<0,Ft.MaxExclusiveConstraintComponent,{args:{maxExclusive:t},message:[e.factory.literal("Value is not less than {$maxExclusive}")],value:e.valueOrNode})})};var t}],[Ft.maxInclusive,function(e){return{generic:(t=e.ptr.out([Ft.maxInclusive]).term,e=>{const r=ar(e.valueOrNode.term,t);e.test(null!==r&&r<=0,Ft.MaxInclusiveConstraintComponent,{args:{maxInclusive:t},message:[e.factory.literal("Value is not less than or equal to {$maxInclusive}")],value:e.valueOrNode})})};var t}],[Ft.minExclusive,function(e){return{generic:(t=e.ptr.out([Ft.minExclusive]).term,e=>{const r=ar(e.valueOrNode.term,t);e.test(null!==r&&r>0,Ft.MinExclusiveConstraintComponent,{args:{minExclusive:t},message:[e.factory.literal("Value is not greater than {$minExclusive}")],value:e.valueOrNode})})};var t}],[Ft.minInclusive,function(e){return{generic:(t=e.ptr.out([Ft.minInclusive]).term,e=>{const r=ar(e.valueOrNode.term,t);e.test(null!==r&&r>=0,Ft.MinInclusiveConstraintComponent,{args:{minInclusive:t},message:[e.factory.literal("Value is not greater than or equal to {$minInclusive}")],value:e.valueOrNode})})};var t}],[Ft.node,function(e){return{generic:(t=[...e.ptr.out([Ft.node])].map((t=>e.validator.shape(t))),async e=>{for(const r of t){const t=await r.validate(e.create({child:!0,focusNode:e.valueOrNode}));e.test(t.report.conforms,Ft.NodeConstraintComponent,{args:{node:r.ptr.term},message:[e.factory.literal("Value does not have shape {$node}")],results:t.report.results,value:e.valueOrNode})}})};var t}],[Ft.property,function(e){return{generic:(t=[...e.ptr.out([Ft.property])].map((t=>e.validator.shape(t))),async e=>{const r=e.create({focusNode:e.valueOrNode});for(const e of t)await e.validate(r)})};var t}],[Ft.qualifiedValueShape,function(e){const t=e.validator.shape(e.ptr.out([Ft.qualifiedValueShape])),r=e.ptr.out([Ft.qualifiedValueShapesDisjoint]).term,n=!!r&&(0,Xt.fromRdf)(r),i=e.ptr.out([Ft.qualifiedMaxCount]).term,o=i?parseInt(i.value):null,a=e.ptr.out([Ft.qualifiedMinCount]).term;return{property:dr(t,n,o,a?parseInt(a.value):null)}}],[Ft.languageIn,function(e){return{generic:(t=[...new Set([...e.ptr.out([Ft.languageIn]).list()].map((e=>e.value)))],e=>{const r=t.some((t=>function(e,t){return!!t&&t.slice(0,e.length)===e}(t,e.valueOrNode.term.language)));e.test(r,Ft.LanguageInConstraintComponent,{args:{languageIn:t.join(", ")},message:[e.factory.literal("Language does not match any of {$languageIn}")],value:e.valueOrNode})})};var t}],[Ft.maxLength,function(e){return{generic:(t=parseInt(e.ptr.out([Ft.maxLength]).value),e=>{const r="BlankNode"!==e.valueOrNode.term.termType&&e.valueOrNode.value.length<=t;e.test(r,Ft.MaxLengthConstraintComponent,{args:{maxLength:t},message:[e.factory.literal("Value has more than {$maxLength} characters")],value:e.valueOrNode})})};var t}],[Ft.minLength,function(e){return{generic:(t=parseInt(e.ptr.out([Ft.minLength]).value),e=>{const r="BlankNode"!==e.valueOrNode.term.termType&&e.valueOrNode.value.length>=t;e.test(r,Ft.MinLengthConstraintComponent,{args:{minLength:t},message:[e.factory.literal("Value has less than {$minLength} characters")],value:e.valueOrNode})})};var t}],[Ft.pattern,function(e){const t=e.ptr.out([Ft.pattern]).value,r=e.ptr.out([Ft.flags]).value;return{generic:cr(t,r,new RegExp(t,r))}}],[Ft.uniqueLang,function(e){const t=e.ptr.out([Ft.uniqueLang]).term;return"true"===t.value&&Ut.boolean.equals(t.datatype)?{property:e=>{const t=Object.entries(e.values.terms.reduce(((e,t)=>(t.language&&(e[t.language]=(e[t.language]||0)+1),e)),{})),r=t.filter((([,e])=>e>1));for(const[t]of r)e.violation(Ft.UniqueLangConstraintComponent,{args:{lang:t},message:[e.factory.literal('Language "{?lang}" used more than once')]});0===r.length&&e.debug(Ft.UniqueLangConstraintComponent)}}:null}],[Ft.class,function(e){return{generic:(t=e.ptr.out([Ft.class]).map((e=>Zt(e))),e=>{const r=new lt(e.valueOrNode.out([Mt.type]).terms);for(const n of t){const t=[...r].some((e=>n.has(e)));e.test(t,Ft.ClassConstraintComponent,{value:e.valueOrNode})}})};var t}],[Ft.datatype,function(e){return{generic:(t=e.ptr.out([Ft.datatype]).term,r=new bn,e=>{const n=t.equals(e.valueOrNode.term.datatype)&&r.validateSimple(e.valueOrNode.term);e.test(n,Ft.DatatypeConstraintComponent,{args:{datatype:t},message:[e.factory.literal("Value does not have datatype {$datatype}")],value:e.valueOrNode})})};var t,r}],[Ft.nodeKind,function(e){const t=e.ptr.out([Ft.nodeKind]).term;return{generic:xn(t,yn.get(t))}}]]),_n=class{constructor(e,{factory:t,...r}){if(this.factory=t,this.options=r,this.registry=new Qt(wn),this.shapesPtr=new Pt({dataset:e,factory:t}),this.shapes=new ot,this.options.coverage&&(this.options.debug=!0,this.options.details=!0,this.options.trace=!0),this.options.validations)for(const[e,t]of this.options.validations)this.registry.validations.set(e,t);const n=[...this.shapesPtr.hasOut([Ft.targetClass]),...this.shapesPtr.hasOut([Ft.targetNode]),...this.shapesPtr.hasOut([Ft.targetObjectsOf]),...this.shapesPtr.hasOut([Ft.targetSubjectsOf]),...this.shapesPtr.hasOut([Mt.type],[Ft.NodeShape]),...this.shapesPtr.hasOut([Mt.type],[Ft.PropertyShape])];for(const e of n)this.shape(e)}shape(e){if(!e.term)return null;let t=this.shapes.get(e.term);return t||(t=new tr(e,{validator:this}),this.shapes.set(e.term,t)),t}async validate(e,t){const r=new Pt({...e,factory:this.factory}),n=new Wt({factory:this.factory,focusNode:r,options:this.options,validator:this});t=t?t.map((e=>this.shape(this.shapesPtr.node(e.terms)))):this.shapes.values();for(const e of t){const t=n.create({shape:e});let i;i=r.isAny()?e.resolveTargets(t):r;for(const r of i)await e.validate(t.create({focusNode:r}))}return n.report}};var Sn=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};class En extends HTMLElement{static get observedAttributes(){return Ke.dataAttributes()}constructor(e){super(),this.shape=null,this.attachShadow({mode:"open"}),this.form=document.createElement("form"),this.config=new Ke(e,this.form),this.form.addEventListener("change",(e=>{e.stopPropagation(),this.config.editMode&&this.validate(!0).then((e=>{this.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!1,composed:!0,detail:{valid:e}}))})).catch((e=>{console.warn(e)}))}))}connectedCallback(){this.shadowRoot.prepend(this.form)}attributeChangedCallback(){this.config.updateAttributes(this),this.initialize()}initialize(){clearTimeout(this.initDebounceTimeout),this.initDebounceTimeout=setTimeout((()=>Sn(this,void 0,void 0,(function*(){this.form.replaceChildren(document.createTextNode(this.config.attributes.loading));try{yield this.config.loader.loadGraphs(),this.form.replaceChildren(),this.config.renderedNodes.clear();const e=this.findRootShaclShapeSubject();if(e){this.form.classList.forEach((e=>{this.form.classList.remove(e)})),this.form.classList.toggle("mode-edit",this.config.editMode),this.form.classList.toggle("mode-view",!this.config.editMode),this.config.theme.apply(this.form);const t=[this.config.theme.stylesheet];for(const e of Object.entries(ue).map((e=>e[1])))e.stylesheet&&t.push(e.stylesheet);if(this.shadowRoot.adoptedStyleSheets=t,this.shape=new Ee(e,this.config,this.config.attributes.valuesSubject?f.namedNode(this.config.attributes.valuesSubject):void 0),this.form.appendChild(this.shape),this.config.editMode){if(null!==this.config.attributes.submitButton){const e=this.config.theme.createButton(this.config.attributes.submitButton||"Submit",!0);e.addEventListener("click",(e=>{e.preventDefault(),this.form.reportValidity()&&this.validate().then((e=>{var t;e?this.dispatchEvent(new Event("submit",{bubbles:!0,cancelable:!0})):null===(t=this.form.querySelector(":scope .invalid > .editor"))||void 0===t||t.focus()}))})),this.form.appendChild(e)}yield this.validate(!0)}}else if(this.config.shapesGraph.size>0)throw new Error("shacl root node shape not found")}catch(e){console.error(e);const t=document.createElement("div");t.innerText=String(e),this.form.replaceChildren(t)}}))),200)}serialize(e="text/turtle",t=this.toRDF()){return function(e,t,r){if("application/ld+json"===t)return function(e){const t=[];for(const r of e){const e={"@id":r.subject.id};if(r.predicate===C)e["@type"]=r.object.id;else{let t=r.object.value;r.object instanceof m?r.object.language?t={"@language":r.object.language,"@value":r.object.value}:r.object.datatype&&r.object.datatype.value!==`${I}#string`&&(t={"@type":r.object.datatype.value,"@value":r.object.value}):t={"@id":r.object.id},e[r.predicate.value]=t}t.push(e)}return JSON.stringify(t)}(e);{const n=new se({format:t,prefixes:r});n.addQuads(e);let i="";return n.end(((e,t)=>{e&&console.error(e),i=t})),i}}(t.getQuads(null,null,null,null),e,this.config.prefixes)}toRDF(e=new Ne){var t;return null===(t=this.shape)||void 0===t||t.toRDF(e),e}registerPlugin(e){he(e),this.initialize()}setTheme(e){this.config.theme=e,this.initialize()}setClassInstanceProvider(e){this.config.classInstanceProvider=e,this.initialize()}validate(){return Sn(this,arguments,void 0,(function*(e=!1){var t,r,n,i,o,a;for(const e of this.form.querySelectorAll(":scope .validation-error"))e.remove();for(const e of this.form.querySelectorAll(":scope .property-instance"))e.classList.remove("invalid"),(null===(t=e.querySelector(":scope > .editor"))||void 0===t?void 0:t.value)?e.classList.add("valid"):e.classList.remove("valid");this.config.shapesGraph.deleteGraph(""),null===(r=this.shape)||void 0===r||r.toRDF(this.config.shapesGraph);try{const t=this.config.shapesGraph,r=yield new _n(t,{details:!0,factory:f}).validate({dataset:t});for(const t of r.results)if(null===(i=null===(n=t.focusNode)||void 0===n?void 0:n.ptrs)||void 0===i?void 0:i.length)for(const r of t.focusNode.ptrs){const n=r._term;if(null===(o=t.path)||void 0===o?void 0:o.length){const r=t.path[0].predicates[0];let i=this.form.querySelectorAll(`:scope [data-node-id='${n.id}'] [data-path='${r.id}'] > .editor`);0===i.length&&(i=this.form.querySelectorAll(`:scope [data-node-id='${n.id}'] [data-path='${r.id}']`));for(const r of i)if(r.classList.contains("editor")){if(!e||r.value){let e=r.parentElement;e.classList.add("invalid"),e.classList.remove("valid"),e.appendChild(this.createValidationErrorDisplay(t));do{e.classList.contains("collapsible")&&e.classList.add("open"),e=e.parentElement}while(e)}}else e||(r.classList.add("invalid"),r.classList.remove("valid"),r.appendChild(this.createValidationErrorDisplay(t,"node")))}else e||null===(a=this.form.querySelector(`:scope [data-node-id='${n.id}']`))||void 0===a||a.prepend(this.createValidationErrorDisplay(t,"node"))}return r.conforms}catch(e){return console.error(e),!1}}))}createValidationErrorDisplay(e,t){var r,n;const i=document.createElement("span");if(i.classList.add("validation-error"),t&&i.classList.add(t),e)if((null===(r=e.message)||void 0===r?void 0:r.length)>0)for(const t of e.message)i.title+=t.value+"\n";else i.title=null===(n=e.sourceConstraintComponent)||void 0===n?void 0:n.value;return i}findRootShaclShapeSubject(){let e=null;if(this.config.attributes.shapeSubject){if(e=f.namedNode(this.config.attributes.shapeSubject),!this.config.shapesGraph.has(new _(e,C,P,A)))return void console.warn(`shapes graph does not contain requested root shape ${this.config.attributes.shapeSubject}`)}else if(this.config.attributes.valuesSubject&&this.config.dataGraph.size>0){const t=f.namedNode(this.config.attributes.valuesSubject),r=[...this.config.dataGraph.getQuads(t,C,null,null),...this.config.dataGraph.getQuads(t,O,null,null)];if(0===r.length)return void console.warn(`value subject '${this.config.attributes.valuesSubject}' has neither ${C.id} nor ${O.id} statement`);for(const t of r)if(this.config.shapesGraph.has(new _(t.object,C,P,A))){e=t.object;break}if(!e){const t=this.config.shapesGraph.getQuads(null,F,r[0].object,A);if(0===t.length)return void console.error(`value subject '${this.config.attributes.valuesSubject}' has no shacl shape definition in the shapes graph`);if(t.length>1&&console.warn(`value subject '${this.config.attributes.valuesSubject}' has multiple shacl shape definitions in the shapes graph, choosing the first found (${t[0].subject})`),0===this.config.shapesGraph.getQuads(t[0].subject,C,P,A).length)return void console.error(`value subject '${this.config.attributes.valuesSubject}' references a shape which is not a NodeShape (${t[0].subject})`);e=t[0].subject}}else{const t=this.config.shapesGraph.getQuads(null,C,P,A);if(0==t.length)return void console.warn("shapes graph does not contain any root shapes");t.length>1&&(console.warn("shapes graph contains",t.length,"root shapes. choosing first found which is",t[0].subject.value),console.info('hint: set the shape to use with attribute "data-shape-subject"')),e=t[0].subject}return e}}function In(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;const Tn=e=>(t,r)=>{void 0!==r?r.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)},jn=globalThis,kn=jn.ShadowRoot&&(void 0===jn.ShadyCSS||jn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Nn=Symbol(),An=new WeakMap;class Rn{constructor(e,t,r){if(this._$cssResult$=!0,r!==Nn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(kn&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=An.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&An.set(t,e))}return e}toString(){return this.cssText}}const Cn=(e,...t)=>{const r=1===e.length?e[0]:t.reduce(((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1]),e[0]);return new Rn(r,e,Nn)},On=kn?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new Rn("string"==typeof e?e:e+"",void 0,Nn))(t)})(e):e,{is:Ln,defineProperty:$n,getOwnPropertyDescriptor:Dn,getOwnPropertyNames:Pn,getOwnPropertySymbols:Mn,getPrototypeOf:Bn}=Object,Fn=globalThis,qn=Fn.trustedTypes,Un=qn?qn.emptyScript:"",zn=Fn.reactiveElementPolyfillSupport,Hn=(e,t)=>e,Vn={toAttribute(e,t){switch(t){case Boolean:e=e?Un:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},Gn=(e,t)=>!Ln(e,t),Wn={attribute:!0,type:String,converter:Vn,reflect:!1,hasChanged:Gn};Symbol.metadata??=Symbol("metadata"),Fn.litPropertyMetadata??=new WeakMap;class Jn extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Wn){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&$n(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:i}=Dn(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return n?.call(this)},set(t){const o=n?.call(this);i.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Wn}static _$Ei(){if(this.hasOwnProperty(Hn("elementProperties")))return;const e=Bn(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Hn("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Hn("properties"))){const e=this.properties,t=[...Pn(e),...Mn(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(On(e))}else void 0!==e&&t.push(On(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(kn)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const r of t){const t=document.createElement("style"),n=jn.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=r.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const i=(void 0!==r.converter?.toAttribute?r.converter:Vn).toAttribute(t,r.type);this._$Em=e,null==i?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Vn;this._$Em=n,this[n]=i.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??Gn)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}Jn.elementStyles=[],Jn.shadowRootOptions={mode:"open"},Jn[Hn("elementProperties")]=new Map,Jn[Hn("finalized")]=new Map,zn?.({ReactiveElement:Jn}),(Fn.reactiveElementVersions??=[]).push("2.0.4");const Qn={attribute:!0,type:String,converter:Vn,reflect:!1,hasChanged:Gn},Xn=(e=Qn,t,r)=>{const{kind:n,metadata:i}=r;let o=globalThis.litPropertyMetadata.get(i);if(void 0===o&&globalThis.litPropertyMetadata.set(i,o=new Map),o.set(r.name,e),"accessor"===n){const{name:n}=r;return{set(r){const i=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,i,e)},init(t){return void 0!==t&&this.P(n,void 0,e),t}}}if("setter"===n){const{name:n}=r;return function(r){const i=this[n];t.call(this,r),this.requestUpdate(n,i,e)}}throw Error("Unsupported decorator location: "+n)};function Kn(e){return(t,r)=>"object"==typeof r?Xn(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,n?{...e,wrapped:!0}:e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}function Yn(e){return Kn({...e,state:!0,attribute:!1})}const Zn=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r);function ei(e,t){return(r,n,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof n?r:i??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return Zn(r,n,{get(){let r=e.call(this);return void 0===r&&(r=o(this),(null!==r||this.hasUpdated)&&t.call(this,r)),r}})}return Zn(r,n,{get(){return o(this)}})}}let ti;function ri(e){return(t,r)=>{const{slot:n,selector:i}=e??{},o="slot"+(n?`[name=${n}]`:":not([name])");return Zn(t,r,{get(){const t=this.renderRoot?.querySelector(o),r=t?.assignedElements(e)??[];return void 0===i?r:r.filter((e=>e.matches(i)))}})}}const ni=globalThis,ii=ni.trustedTypes,oi=ii?ii.createPolicy("lit-html",{createHTML:e=>e}):void 0,ai="$lit$",si=`lit$${Math.random().toFixed(9).slice(2)}$`,li="?"+si,di=`<${li}>`,ci=document,ui=()=>ci.createComment(""),hi=e=>null===e||"object"!=typeof e&&"function"!=typeof e,pi=Array.isArray,fi=e=>pi(e)||"function"==typeof e?.[Symbol.iterator],gi="[ \t\n\f\r]",vi=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,mi=/-->/g,bi=/>/g,yi=RegExp(`>|${gi}(?:([^\\s"'>=/]+)(${gi}*=${gi}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),xi=/'/g,wi=/"/g,_i=/^(?:script|style|textarea|title)$/i,Si=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),Ei=Si(1),Ii=Si(2),Ti=Si(3),ji=Symbol.for("lit-noChange"),ki=Symbol.for("lit-nothing"),Ni=new WeakMap,Ai=ci.createTreeWalker(ci,129);function Ri(e,t){if(!pi(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==oi?oi.createHTML(t):t}const Ci=(e,t)=>{const r=e.length-1,n=[];let i,o=2===t?"<svg>":3===t?"<math>":"",a=vi;for(let t=0;t<r;t++){const r=e[t];let s,l,d=-1,c=0;for(;c<r.length&&(a.lastIndex=c,l=a.exec(r),null!==l);)c=a.lastIndex,a===vi?"!--"===l[1]?a=mi:void 0!==l[1]?a=bi:void 0!==l[2]?(_i.test(l[2])&&(i=RegExp("</"+l[2],"g")),a=yi):void 0!==l[3]&&(a=yi):a===yi?">"===l[0]?(a=i??vi,d=-1):void 0===l[1]?d=-2:(d=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?yi:'"'===l[3]?wi:xi):a===wi||a===xi?a=yi:a===mi||a===bi?a=vi:(a=yi,i=void 0);const u=a===yi&&e[t+1].startsWith("/>")?" ":"";o+=a===vi?r+di:d>=0?(n.push(s),r.slice(0,d)+ai+r.slice(d)+si+u):r+si+(-2===d?t:u)}return[Ri(e,o+(e[r]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),n]};class Oi{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let i=0,o=0;const a=e.length-1,s=this.parts,[l,d]=Ci(e,t);if(this.el=Oi.createElement(l,r),Ai.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=Ai.nextNode())&&s.length<a;){if(1===n.nodeType){if(n.hasAttributes())for(const e of n.getAttributeNames())if(e.endsWith(ai)){const t=d[o++],r=n.getAttribute(e).split(si),a=/([.?@])?(.*)/.exec(t);s.push({type:1,index:i,name:a[2],strings:r,ctor:"."===a[1]?Mi:"?"===a[1]?Bi:"@"===a[1]?Fi:Pi}),n.removeAttribute(e)}else e.startsWith(si)&&(s.push({type:6,index:i}),n.removeAttribute(e));if(_i.test(n.tagName)){const e=n.textContent.split(si),t=e.length-1;if(t>0){n.textContent=ii?ii.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],ui()),Ai.nextNode(),s.push({type:2,index:++i});n.append(e[t],ui())}}}else if(8===n.nodeType)if(n.data===li)s.push({type:2,index:i});else{let e=-1;for(;-1!==(e=n.data.indexOf(si,e+1));)s.push({type:7,index:i}),e+=si.length-1}i++}}static createElement(e,t){const r=ci.createElement("template");return r.innerHTML=e,r}}function Li(e,t,r=e,n){if(t===ji)return t;let i=void 0!==n?r.o?.[n]:r.l;const o=hi(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),void 0===o?i=void 0:(i=new o(e),i._$AT(e,r,n)),void 0!==n?(r.o??=[])[n]=i:r.l=i),void 0!==i&&(t=Li(e,i._$AS(e,t.values),i,n)),t}class $i{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,n=(e?.creationScope??ci).importNode(t,!0);Ai.currentNode=n;let i=Ai.nextNode(),o=0,a=0,s=r[0];for(;void 0!==s;){if(o===s.index){let t;2===s.type?t=new Di(i,i.nextSibling,this,e):1===s.type?t=new s.ctor(i,s.name,s.strings,this,e):6===s.type&&(t=new qi(i,this,e)),this._$AV.push(t),s=r[++a]}o!==s?.index&&(i=Ai.nextNode(),o++)}return Ai.currentNode=ci,n}p(e){let t=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class Di{get _$AU(){return this._$AM?._$AU??this.v}constructor(e,t,r,n){this.type=2,this._$AH=ki,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this.v=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Li(this,e,t),hi(e)?e===ki||null==e||""===e?(this._$AH!==ki&&this._$AR(),this._$AH=ki):e!==this._$AH&&e!==ji&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):fi(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==ki&&hi(this._$AH)?this._$AA.nextSibling.data=e:this.T(ci.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,n="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=Oi.createElement(Ri(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{const e=new $i(n,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=Ni.get(e.strings);return void 0===t&&Ni.set(e.strings,t=new Oi(e)),t}k(e){pi(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const i of e)n===t.length?t.push(r=new Di(this.O(ui()),this.O(ui()),this,this.options)):r=t[n],r._$AI(i),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this.v=e,this._$AP?.(e))}}class Pi{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,i){this.type=1,this._$AH=ki,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=i,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=ki}_$AI(e,t=this,r,n){const i=this.strings;let o=!1;if(void 0===i)e=Li(this,e,t,0),o=!hi(e)||e!==this._$AH&&e!==ji,o&&(this._$AH=e);else{const n=e;let a,s;for(e=i[0],a=0;a<i.length-1;a++)s=Li(this,n[r+a],t,a),s===ji&&(s=this._$AH[a]),o||=!hi(s)||s!==this._$AH[a],s===ki?e=ki:e!==ki&&(e+=(s??"")+i[a+1]),this._$AH[a]=s}o&&!n&&this.j(e)}j(e){e===ki?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Mi extends Pi{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===ki?void 0:e}}class Bi extends Pi{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==ki)}}class Fi extends Pi{constructor(e,t,r,n,i){super(e,t,r,n,i),this.type=5}_$AI(e,t=this){if((e=Li(this,e,t,0)??ki)===ji)return;const r=this._$AH,n=e===ki&&r!==ki||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,i=e!==ki&&(r===ki||n);n&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class qi{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Li(this,e)}}const Ui={M:ai,P:si,A:li,C:1,L:Ci,R:$i,D:fi,V:Li,I:Di,H:Pi,N:Bi,U:Fi,B:Mi,F:qi},zi=ni.litHtmlPolyfillSupport;zi?.(Oi,Di),(ni.litHtmlVersions??=[]).push("3.2.0");const Hi=(e,t,r)=>{const n=r?.renderBefore??t;let i=n._$litPart$;if(void 0===i){const e=r?.renderBefore??null;n._$litPart$=i=new Di(t.insertBefore(ui(),e),e,void 0,r??{})}return i._$AI(e),i};class Vi extends Jn{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.o=Hi(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return ji}}Vi._$litElement$=!0,Vi.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:Vi});const Gi=globalThis.litElementPolyfillSupport;Gi?.({LitElement:Vi}),(globalThis.litElementVersions??=[]).push("4.1.0");const Wi=e=>(...t)=>({_$litDirective$:e,values:t});class Ji{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this.t=e,this._$AM=t,this.i=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const Qi=Wi(class extends Ji{constructor(e){if(super(e),1!==e.type||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.st)e in t||(r.remove(e),this.st.delete(e));for(const e in t){const n=!!t[e];n===this.st.has(e)||this.nt?.has(e)||(n?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return ji}}),Xi="cubic-bezier(0.2, 0, 0, 1)",Ki="cubic-bezier(.3,0,0,1)",Yi="cubic-bezier(.3,0,.8,.15)";class Zi extends Vi{constructor(){super(...arguments),this.disabled=!1,this.error=!1,this.focused=!1,this.label="",this.noAsterisk=!1,this.populated=!1,this.required=!1,this.resizable=!1,this.supportingText="",this.errorText="",this.count=-1,this.max=-1,this.hasStart=!1,this.hasEnd=!1,this.isAnimating=!1,this.refreshErrorAlert=!1,this.disableTransitions=!1}get counterText(){const e=this.count??-1,t=this.max??-1;return e<0||t<=0?"":`${e} / ${t}`}get supportingOrErrorText(){return this.error&&this.errorText?this.errorText:this.supportingText}reannounceError(){this.refreshErrorAlert=!0}update(e){e.has("disabled")&&void 0!==e.get("disabled")&&(this.disableTransitions=!0),this.disabled&&this.focused&&(e.set("focused",!0),this.focused=!1),this.animateLabelIfNeeded({wasFocused:e.get("focused"),wasPopulated:e.get("populated")}),super.update(e)}render(){const e=this.renderLabel(!0),t=this.renderLabel(!1),r=this.renderOutline?.(e),n={disabled:this.disabled,"disable-transitions":this.disableTransitions,error:this.error&&!this.disabled,focused:this.focused,"with-start":this.hasStart,"with-end":this.hasEnd,populated:this.populated,resizable:this.resizable,required:this.required,"no-label":!this.label};return Ei`
3
- <div class="field ${Qi(n)}">
2
+ var e={5568:e=>{const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},7526:(e,t)=>{t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],l=o[1],d=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,l)),c=0,u=l>0?a-4:a;for(r=0;r<u;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],d[c++]=t>>16&255,d[c++]=t>>8&255,d[c++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,d[c++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,d[c++]=t>>8&255,d[c++]=255&t),d},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,d=n-i;s<d;s+=a)o.push(l(e,s,s+a>d?d:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(e,t,r)=>{const n=r(7526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return d(e,t,r)}function d(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Q(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Q(e,ArrayBuffer)||e&&Q(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Q(e,SharedArrayBuffer)||e&&Q(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,r);const i=function(e){if(l.isBuffer(e)){const t=0|f(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?s(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(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 u(e){return c(e),s(e<0?0:0|f(e))}function h(e){const t=e.length<0?0:0|f(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,l.prototype),n}function f(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function g(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(i)return n?-1:G(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return j(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){let o,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,r/=2}function d(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;o<s;o++)if(d(e,o)===d(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===l)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+l>s&&(r=s-l),o=r;o>=0;o--){let r=!0;for(let n=0;n<l;n++)if(d(e,o+n)!==d(t,n)){r=!1;break}if(r)return o}return-1}function x(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(X(n))return a;e[r+a]=n}return a}function w(e,t,r,n){return J(G(t,e.length-r),e,r,n)}function _(e,t,r,n){return J(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return J(W(t),e,r,n)}function E(e,t,r,n){return J(function(e,t){let r,n,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function I(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,l;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(l=(31&t)<<6|63&r,l>127&&(o=l));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(l=(15&t)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=k));return r}(n)}t.kMaxLength=a,l.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,r){return d(e,t,r)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,r){return function(e,t,r){return c(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},l.allocUnsafe=function(e){return u(e)},l.allocUnsafeSlow=function(e){return u(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(Q(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),Q(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},l.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}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=l.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(Q(t,Uint8Array))i+t.length>n.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},l.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},l.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)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},l.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):m.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,r,n,i){if(Q(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),d=this.slice(n,i),c=e.slice(t,r);for(let e=0;e<s;++e)if(d[e]!==c[e]){o=d[e],a=c[e];break}return o<a?-1:a<o?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},l.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return x(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const k=4096;function j(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function A(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function C(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=K[e[n]];return i}function N(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function R(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,r,n,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function L(e,t,r,n,i){U(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function $(e,t,r,n,i){U(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function D(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(e,t,r,n,o){return t=+t,r>>>=0,o||D(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function M(e,t,r,n,o){return t=+t,r>>>=0,o||D(e,0,r,8),i.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,l.prototype),n},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Y((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),l.prototype.readBigUInt64BE=Y((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),l.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Y((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),l.prototype.readBigInt64BE=Y((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||O(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||O(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(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},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(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},l.prototype.writeBigUInt64LE=Y((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Y((function(e,t=0){return $(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(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},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(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},l.prototype.writeBigInt64LE=Y((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Y((function(e,t=0){return $(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,r){return P(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return P(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},l.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=l.isBuffer(e)?e:l.from(e,n),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%a]}return this};const B={};function F(e,t,r){B[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function U(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){z(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,i,o)}function z(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){if(Math.floor(e)!==e)throw z(e,r),new B.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function J(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const K=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Y(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},2341:e=>{e.exports=function e(t){return null===t||"object"!=typeof t||null!=t.toJSON?JSON.stringify(t):Array.isArray(t)?"["+t.reduce(((t,r,n)=>t+(0===n?"":",")+e(void 0===r||"symbol"==typeof r?null:r)),"")+"]":"{"+Object.keys(t).sort().reduce(((r,n,i)=>void 0===t[n]||"symbol"==typeof t[n]?r:r+(0===r.length?"":",")+e(n)+":"+e(t[n])),"")+"}"}},7007:e=>{var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function d(e,t,r,n){var i,o,a,d;if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=l(e))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,d=c,console&&console.warn&&console.warn(d)}return e}function c(){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 u(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):f(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function f(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},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+".");a=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var d=l.length,c=f(l,d);for(r=0;r<d;++r)n(c[r],this,t)}return!0},o.prototype.addListener=function(e,t){return d(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return d(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,u(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,u(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,a;if(s(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},251:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1<<s)-1,d=l>>1,c=-7,u=r?i-1:0,h=r?-1:1,p=e[t+u];for(u+=h,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+e[t+u],u+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+u],u+=h,c-=8);if(0===o)o=1-d;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=d}return(p?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,l,d=8*o-i-1,c=(1<<d)-1,u=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,f=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+u>=1?h/l:h*Math.pow(2,1-u))*l>=2&&(a++,l/=2),a+u>=c?(s=0,a=c):a+u>=1?(s=(t*l-1)*Math.pow(2,i),a+=u):(s=t*Math.pow(2,u-1)*Math.pow(2,i),a=0));i>=8;e[r+p]=255&s,p+=f,s/=256,i-=8);for(a=a<<i|s,d+=i;d>0;e[r+p]=255&a,p+=f,a/=256,d-=8);e[r+p-f]|=128*g}},7034:(e,t,r)=>{const{isArray:n,isObject:i,isString:o}=r(7382),{asArray:a}=r(9263),{prependBase:s}=r(470),l=r(2207),d=r(7532);function c(e){throw new l("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:e})}function u({context:e,base:t}){if(!e)return;const r=e["@context"];if(o(r))e["@context"]=s(t,r);else if(n(r))for(let e=0;e<r.length;++e){const n=r[e];o(n)?r[e]=s(t,n):i(n)&&u({context:{"@context":n},base:t})}else if(i(r))for(const e in r)u({context:r[e],base:t})}e.exports=class{constructor({sharedCache:e}){this.perOpCache=new Map,this.sharedCache=e}async resolve({activeCtx:e,context:t,documentLoader:r,base:s,cycles:l=new Set}){t&&i(t)&&t["@context"]&&(t=t["@context"]),t=a(t);const u=[];for(const a of t){if(o(a)){let t=this._get(a);t||(t=await this._resolveRemoteContext({activeCtx:e,url:a,documentLoader:r,base:s,cycles:l})),n(t)?u.push(...t):u.push(t);continue}if(null===a){u.push(new d({document:null}));continue}i(a)||c(t);const h=JSON.stringify(a);let p=this._get(h);p||(p=new d({document:a}),this._cacheResolvedContext({key:h,resolved:p,tag:"static"})),u.push(p)}return u}_get(e){let t=this.perOpCache.get(e);if(!t){const r=this.sharedCache.get(e);r&&(t=r.get("static"),t&&this.perOpCache.set(e,t))}return t}_cacheResolvedContext({key:e,resolved:t,tag:r}){if(this.perOpCache.set(e,t),void 0!==r){let n=this.sharedCache.get(e);n||(n=new Map,this.sharedCache.set(e,n)),n.set(r,t)}return t}async _resolveRemoteContext({activeCtx:e,url:t,documentLoader:r,base:n,cycles:i}){t=s(n,t);const{context:o,remoteDoc:a}=await this._fetchContext({activeCtx:e,url:t,documentLoader:r,cycles:i});u({context:o,base:n=a.documentUrl||t});const l=await this.resolve({activeCtx:e,context:o,documentLoader:r,base:n,cycles:i});return this._cacheResolvedContext({key:t,resolved:l,tag:a.tag}),l}async _fetchContext({activeCtx:e,url:t,documentLoader:r,cycles:a}){if(a.size>10)throw new l("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"loading remote context failed":"context overflow",max:10});if(a.has(t))throw new l("Cyclical @context URLs detected.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"recursive context inclusion":"context overflow",url:t});let s,d;a.add(t);try{d=await r(t),s=d.document||null,o(s)&&(s=JSON.parse(s))}catch(e){throw new l("Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.","jsonld.InvalidUrl",{code:"loading remote context failed",url:t,cause:e})}if(!i(s))throw new l("Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object.","jsonld.InvalidUrl",{code:"invalid remote context",url:t});return s="@context"in s?{"@context":s["@context"]}:{"@context":{}},d.contextUrl&&(n(s["@context"])||(s["@context"]=[s["@context"]]),s["@context"].push(d.contextUrl)),{context:s,remoteDoc:d}}}},2207:e=>{e.exports=class extends Error{constructor(e="An unspecified JSON-LD error occurred.",t="jsonld.Error",r={}){super(e),this.name=t,this.message=e,this.details=r}}},5445:e=>{e.exports=e=>{class t{toString(){return"[object JsonLdProcessor]"}}return Object.defineProperty(t,"prototype",{writable:!1,enumerable:!1}),Object.defineProperty(t.prototype,"constructor",{writable:!0,enumerable:!1,configurable:!0,value:t}),t.compact=function(t,r){return arguments.length<2?Promise.reject(new TypeError("Could not compact, too few arguments.")):e.compact(t,r)},t.expand=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not expand, too few arguments.")):e.expand(t)},t.flatten=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not flatten, too few arguments.")):e.flatten(t)},t}},8229:(e,t,r)=>{e.exports=r(989).NQuads},3743:e=>{e.exports=class{constructor(){this._requests={}}wrapLoader(e){const t=this;return t._loader=e,function(){return t.add.apply(t,arguments)}}async add(e){let t=this._requests[e];if(t)return Promise.resolve(t);t=this._requests[e]=this._loader(e);try{return await t}finally{delete this._requests[e]}}}},7532:(e,t,r)=>{const n=r(9749);e.exports=class{constructor({document:e}){this.document=e,this.cache=new n({max:10})}getProcessed(e){return this.cache.get(e)}setProcessed(e,t){this.cache.set(e,t)}}},1058:(e,t,r)=>{const n=r(2207),{isArray:i,isObject:o,isString:a,isUndefined:s}=r(7382),{isList:l,isValue:d,isGraph:c,isSimpleGraph:u,isSubjectReference:h}=r(3978),{expandIri:p,getContextValue:f,isKeyword:g,process:m,processingMode:v}=r(1972),{removeBase:b,prependBase:y}=r(470),{REGEX_KEYWORD:x,addValue:w,asArray:_,compareShortestLeast:S}=r(9263),E={};function I(e,t,r){if("@nest"!==p(e,t,{vocab:!0},r))throw new n("JSON-LD compact error; nested property must have an @nest value resolving to @nest.","jsonld.SyntaxError",{code:"invalid @nest value"})}e.exports=E,E.compact=async({activeCtx:e,activeProperty:t=null,element:r,options:p={}})=>{if(i(r)){let n=[];for(let i=0;i<r.length;++i){const o=await E.compact({activeCtx:e,activeProperty:t,element:r[i],options:p});null!==o&&n.push(o)}return p.compactArrays&&1===n.length&&0===(f(e,t,"@container")||[]).length&&(n=n[0]),n}const b=f(e,t,"@context");if(s(b)||(e=await m({activeCtx:e,localCtx:b,propagate:!0,overrideProtected:!0,options:p})),o(r)){if(p.link&&"@id"in r&&p.link.hasOwnProperty(r["@id"])){const e=p.link[r["@id"]];for(let t=0;t<e.length;++t)if(e[t].expanded===r)return e[t].compacted}if(d(r)||h(r)){const n=E.compactValue({activeCtx:e,activeProperty:t,value:r,options:p});return p.link&&h(r)&&(p.link.hasOwnProperty(r["@id"])||(p.link[r["@id"]]=[]),p.link[r["@id"]].push({expanded:r,compacted:n})),n}if(l(r)&&(f(e,t,"@container")||[]).includes("@list"))return E.compact({activeCtx:e,activeProperty:t,element:r["@list"],options:p});const b="@reverse"===t,y={},x=e;d(r)||h(r)||(e=e.revertToPreviousContext());const S=f(x,t,"@context");s(S)||(e=await m({activeCtx:e,localCtx:S,propagate:!0,overrideProtected:!0,options:p})),p.link&&"@id"in r&&(p.link.hasOwnProperty(r["@id"])||(p.link[r["@id"]]=[]),p.link[r["@id"]].push({expanded:r,compacted:y}));let T=r["@type"]||[];T.length>1&&(T=Array.from(T).sort());const k=e;for(const t of T){const r=E.compactIri({activeCtx:k,iri:t,relativeTo:{vocab:!0}}),n=f(x,r,"@context");s(n)||(e=await m({activeCtx:e,localCtx:n,options:p,propagate:!1}))}const j=Object.keys(r).sort();for(const s of j){const h=r[s];if("@id"!==s)if("@type"!==s)if("@reverse"!==s)if("@preserve"!==s)if("@index"!==s)if("@graph"!==s&&"@list"!==s&&"@included"!==s&&g(s)){const t=E.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(y,t,h)}else{if(!i(h))throw new n("JSON-LD expansion error; expanded value must be an array.","jsonld.SyntaxError");if(0===h.length){const t=E.compactIri({activeCtx:e,iri:s,value:h,relativeTo:{vocab:!0},reverse:b}),r=e.mappings.has(t)?e.mappings.get(t)["@nest"]:null;let n=y;r&&(I(e,r,p),o(y[r])||(y[r]={}),n=y[r]),w(n,t,h,{propertyIsArray:!0})}for(const t of h){const r=E.compactIri({activeCtx:e,iri:s,value:t,relativeTo:{vocab:!0},reverse:b}),n=e.mappings.has(r)?e.mappings.get(r)["@nest"]:null;let h=y;n&&(I(e,n,p),o(y[n])||(y[n]={}),h=y[n]);const g=f(e,r,"@container")||[],m=c(t),v=l(t);let x;v?x=t["@list"]:m&&(x=t["@graph"]);let S=await E.compact({activeCtx:e,activeProperty:r,element:v||m?x:t,options:p});if(v){if(i(S)||(S=[S]),g.includes("@list")){w(h,r,S,{valueIsArray:!0,allowDuplicate:!0});continue}S={[E.compactIri({activeCtx:e,iri:"@list",relativeTo:{vocab:!0}})]:S},"@index"in t&&(S[E.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"])}if(m)if(g.includes("@graph")&&(g.includes("@id")||g.includes("@index")&&u(t))){let n;h.hasOwnProperty(r)?n=h[r]:h[r]=n={};const i=(g.includes("@id")?t["@id"]:t["@index"])||E.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}});w(n,i,S,{propertyIsArray:!p.compactArrays||g.includes("@set")})}else g.includes("@graph")&&u(t)?(i(S)&&S.length>1&&(S={"@included":S}),w(h,r,S,{propertyIsArray:!p.compactArrays||g.includes("@set")})):(i(S)&&1===S.length&&p.compactArrays&&(S=S[0]),S={[E.compactIri({activeCtx:e,iri:"@graph",relativeTo:{vocab:!0}})]:S},"@id"in t&&(S[E.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t["@id"]),"@index"in t&&(S[E.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"]),w(h,r,S,{propertyIsArray:!p.compactArrays||g.includes("@set")}));else if(g.includes("@language")||g.includes("@index")||g.includes("@id")||g.includes("@type")){let n,i;if(h.hasOwnProperty(r)?n=h[r]:h[r]=n={},g.includes("@language"))d(S)&&(S=S["@value"]),i=t["@language"];else if(g.includes("@index")){const n=f(e,r,"@index")||"@index",o=E.compactIri({activeCtx:e,iri:n,relativeTo:{vocab:!0}});if("@index"===n)i=t["@index"],delete S[o];else{let e;if([i,...e]=_(S[n]||[]),a(i))switch(e.length){case 0:delete S[n];break;case 1:S[n]=e[0];break;default:S[n]=e}else i=null}}else if(g.includes("@id")){const t=E.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}});i=S[t],delete S[t]}else if(g.includes("@type")){const n=E.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}});let o;switch([i,...o]=_(S[n]||[]),o.length){case 0:delete S[n];break;case 1:S[n]=o[0];break;default:S[n]=o}1===Object.keys(S).length&&"@id"in t&&(S=await E.compact({activeCtx:e,activeProperty:r,element:{"@id":t["@id"]},options:p}))}i||(i=E.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}})),w(n,i,S,{propertyIsArray:g.includes("@set")})}else{const e=!p.compactArrays||g.includes("@set")||g.includes("@list")||i(S)&&0===S.length||"@list"===s||"@graph"===s;w(h,r,S,{propertyIsArray:e})}}}else{if((f(e,t,"@container")||[]).includes("@index"))continue;const r=E.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(y,r,h)}else{const r=await E.compact({activeCtx:e,activeProperty:t,element:h,options:p});i(r)&&0===r.length||w(y,s,r)}else{const t=await E.compact({activeCtx:e,activeProperty:"@reverse",element:h,options:p});for(const r in t)if(e.mappings.has(r)&&e.mappings.get(r).reverse){const n=t[r],i=(f(e,r,"@container")||[]).includes("@set")||!p.compactArrays;w(y,r,n,{propertyIsArray:i}),delete t[r]}if(Object.keys(t).length>0){const r=E.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(y,r,t)}}else{let t=_(h).map((e=>E.compactIri({activeCtx:x,iri:e,relativeTo:{vocab:!0}})));1===t.length&&(t=t[0]);const r=E.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}}),n=(f(e,r,"@container")||[]).includes("@set")&&v(e,1.1)||i(t)&&0===h.length;w(y,r,t,{propertyIsArray:n})}else{let t=_(h).map((t=>E.compactIri({activeCtx:e,iri:t,relativeTo:{vocab:!1},base:p.base})));1===t.length&&(t=t[0]),y[E.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t}}return y}return r},E.compactIri=({activeCtx:e,iri:t,value:r=null,relativeTo:i={vocab:!1},reverse:a=!1,base:s=null})=>{if(null===t)return t;e.isPropertyTermScoped&&e.previousContext&&(e=e.previousContext);const u=e.getInverse();if(g(t)&&t in u&&"@none"in u[t]&&"@type"in u[t]["@none"]&&"@none"in u[t]["@none"]["@type"])return u[t]["@none"]["@type"]["@none"];if(i.vocab&&t in u){const n=e["@language"]||"@none",i=[];o(r)&&"@index"in r&&!("@graph"in r)&&i.push("@index","@index@set"),o(r)&&"@preserve"in r&&(r=r["@preserve"][0]),c(r)?("@index"in r&&i.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in r&&i.push("@graph@id","@graph@id@set"),i.push("@graph","@graph@set","@set"),"@index"in r||i.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in r||i.push("@graph@id","@graph@id@set")):o(r)&&!d(r)&&i.push("@id","@id@set","@type","@set@type");let s="@language",u="@null";if(a)s="@type",u="@reverse",i.push("@set");else if(l(r)){"@index"in r||i.push("@list");const e=r["@list"];if(0===e.length)s="@any",u="@none";else{let t=0===e.length?n:null,r=null;for(let n=0;n<e.length;++n){const i=e[n];let o="@none",a="@none";if(d(i)?"@direction"in i?o=`${(i["@language"]||"").toLowerCase()}_${i["@direction"]}`:"@language"in i?o=i["@language"].toLowerCase():"@type"in i?a=i["@type"]:o="@null":a="@id",null===t?t=o:o!==t&&d(i)&&(t="@none"),null===r?r=a:a!==r&&(r="@none"),"@none"===t&&"@none"===r)break}t=t||"@none",r=r||"@none","@none"!==r?(s="@type",u=r):u=t}}else{if(d(r))if("@language"in r&&!("@index"in r)){i.push("@language","@language@set"),u=r["@language"];const e=r["@direction"];e&&(u=`${u}_${e}`)}else"@direction"in r&&!("@index"in r)?u=`_${r["@direction"]}`:"@type"in r&&(s="@type",u=r["@type"]);else s="@type",u="@id";i.push("@set")}i.push("@none"),o(r)&&!("@index"in r)&&i.push("@index","@index@set"),d(r)&&1===Object.keys(r).length&&i.push("@language","@language@set");const h=function(e,t,r,n,i,a){null===a&&(a="@null");const s=[];if(("@id"===a||"@reverse"===a)&&o(r)&&"@id"in r){"@reverse"===a&&s.push("@reverse");const t=E.compactIri({activeCtx:e,iri:r["@id"],relativeTo:{vocab:!0}});e.mappings.has(t)&&e.mappings.get(t)&&e.mappings.get(t)["@id"]===r["@id"]?s.push.apply(s,["@vocab","@id"]):s.push.apply(s,["@id","@vocab"])}else{s.push(a);const e=s.find((e=>e.includes("_")));e&&s.push(e.replace(/^[^_]+_/,"_"))}s.push("@none");const l=e.inverse[t];for(const e of n){if(!(e in l))continue;const t=l[e][i];for(const e of s)if(e in t)return t[e]}return null}(e,t,r,i,s,u);if(null!==h)return h}if(i.vocab&&"@vocab"in e){const r=e["@vocab"];if(0===t.indexOf(r)&&t!==r){const n=t.substr(r.length);if(!e.mappings.has(n))return n}}let h=null;const p=[];let f=e.fastCurieMap;const m=t.length-1;for(let e=0;e<m&&t[e]in f;++e)f=f[t[e]],""in f&&p.push(f[""][0]);for(let n=p.length-1;n>=0;--n){const i=p[n],o=i.terms;for(const n of o){const o=n+":"+t.substr(i.iri.length);e.mappings.get(n)._prefix&&(!e.mappings.has(o)||null===r&&e.mappings.get(o)["@id"]===t)&&(null===h||S(o,h)<0)&&(h=o)}}if(null!==h)return h;for(const[r,i]of e.mappings)if(i&&i._prefix&&t.startsWith(r+":"))throw new n(`Absolute IRI "${t}" confused with prefix "${r}".`,"jsonld.SyntaxError",{code:"IRI confused with prefix",context:e});if(!i.vocab){if("@base"in e){if(e["@base"]){const r=b(y(s,e["@base"]),t);return x.test(r)?`./${r}`:r}return t}return b(s,t)}return t},E.compactValue=({activeCtx:e,activeProperty:t,value:r,options:n})=>{if(d(r)){const n=f(e,t,"@type"),i=f(e,t,"@language"),o=f(e,t,"@direction"),s=f(e,t,"@container")||[],l="@index"in r&&!s.includes("@index");if(!l&&"@none"!==n){if(r["@type"]===n)return r["@value"];if("@language"in r&&r["@language"]===i&&"@direction"in r&&r["@direction"]===o)return r["@value"];if("@language"in r&&r["@language"]===i)return r["@value"];if("@direction"in r&&r["@direction"]===o)return r["@value"]}const d=Object.keys(r).length,c=1===d||2===d&&"@index"in r&&!l,u="@language"in e,h=a(r["@value"]),p=e.mappings.has(t)&&null===e.mappings.get(t)["@language"];if(c&&"@none"!==n&&(!u||!h||p))return r["@value"];const g={};return l&&(g[E.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=r["@index"]),"@type"in r?g[E.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}})]=E.compactIri({activeCtx:e,iri:r["@type"],relativeTo:{vocab:!0}}):"@language"in r&&(g[E.compactIri({activeCtx:e,iri:"@language",relativeTo:{vocab:!0}})]=r["@language"]),"@direction"in r&&(g[E.compactIri({activeCtx:e,iri:"@direction",relativeTo:{vocab:!0}})]=r["@direction"]),g[E.compactIri({activeCtx:e,iri:"@value",relativeTo:{vocab:!0}})]=r["@value"],g}const i=p(e,t,{vocab:!0},n),o=f(e,t,"@type"),s=E.compactIri({activeCtx:e,iri:r["@id"],relativeTo:{vocab:"@vocab"===o},base:n.base});return"@id"===o||"@vocab"===o||"@graph"===i?s:{[E.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]:s}}},9378:e=>{const t="http://www.w3.org/1999/02/22-rdf-syntax-ns#",r="http://www.w3.org/2001/XMLSchema#";e.exports={LINK_HEADER_REL:"http://www.w3.org/ns/json-ld#context",LINK_HEADER_CONTEXT:"http://www.w3.org/ns/json-ld#context",RDF:t,RDF_LIST:t+"List",RDF_FIRST:t+"first",RDF_REST:t+"rest",RDF_NIL:t+"nil",RDF_TYPE:t+"type",RDF_PLAIN_LITERAL:t+"PlainLiteral",RDF_XML_LITERAL:t+"XMLLiteral",RDF_JSON_LITERAL:t+"JSON",RDF_OBJECT:t+"object",RDF_LANGSTRING:t+"langString",XSD:r,XSD_BOOLEAN:r+"boolean",XSD_DOUBLE:r+"double",XSD_INTEGER:r+"integer",XSD_STRING:r+"string"}},1972:(e,t,r)=>{const n=r(9263),i=r(2207),{isArray:o,isObject:a,isString:s,isUndefined:l}=r(7382),{isAbsolute:d,isRelative:c,prependBase:u}=r(470),{handleEvent:h}=r(2246),{REGEX_BCP47:p,REGEX_KEYWORD:f,asArray:g,compareShortestLeast:m}=r(9263),v=new Map,b={};function y(e,t,r,n,i,o){if(null===t||!s(t)||b.isKeyword(t))return t;if(t.match(f))return null;if(n&&n.hasOwnProperty(t)&&!0!==i.get(t)&&b.createTermDefinition({activeCtx:e,localCtx:n,term:t,defined:i,options:o}),(r=r||{}).vocab){const r=e.mappings.get(t);if(null===r)return null;if(a(r)&&"@id"in r)return r["@id"]}const l=t.indexOf(":");if(l>0){const r=t.substr(0,l),a=t.substr(l+1);if("_"===r||0===a.indexOf("//"))return t;n&&n.hasOwnProperty(r)&&b.createTermDefinition({activeCtx:e,localCtx:n,term:r,defined:i,options:o});const s=e.mappings.get(r);if(s&&s._prefix)return s["@id"]+a;if(d(t))return t}if(r.vocab&&"@vocab"in e)t=e["@vocab"]+t;else if(r.base){let r,n;"@base"in e?e["@base"]?(n=u(o.base,e["@base"]),r=u(n,t)):(n=e["@base"],r=t):(n=o.base,r=u(o.base,t)),t=r}return t}function x(e,t){if(!e||"object"!=typeof e||!t||"object"!=typeof t)return e===t;const r=Array.isArray(e);if(r!==Array.isArray(t))return!1;if(r){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!x(e[r],t[r]))return!1;return!0}const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const r in e){let n=e[r],i=t[r];if("@container"===r&&Array.isArray(n)&&Array.isArray(i)&&(n=n.slice().sort(),i=i.slice().sort()),!x(n,i))return!1}return!0}e.exports=b,b.process=async({activeCtx:e,localCtx:t,options:r,propagate:n=!0,overrideProtected:l=!1,cycles:f=new Set})=>{if(a(t)&&"@context"in t&&o(t["@context"])&&(t=t["@context"]),0===g(t).length)return e;const m=[],v=[({event:e,next:t})=>{m.push(e),t()}];r.eventHandler&&v.push(r.eventHandler);const x=r;r={...r,eventHandler:v};const w=await r.contextResolver.resolve({activeCtx:e,context:t,documentLoader:r.documentLoader,base:r.base});a(w[0].document)&&"boolean"==typeof w[0].document["@propagate"]&&(n=w[0].document["@propagate"]);let _=e;n||_.previousContext||(_=_.clone(),_.previousContext=e);for(const n of w){let{document:o}=n;if(e=_,null===o){if(!l&&0!==Object.keys(e.protected).length)throw new i("Tried to nullify a context with protected terms outside of a term definition.","jsonld.SyntaxError",{code:"invalid context nullification"});_=e=b.getInitialContext(r).clone();continue}const g=n.getProcessed(e);if(g){if(x.eventHandler)for(const e of g.events)h({event:e,options:x});_=e=g.context;continue}if(a(o)&&"@context"in o&&(o=o["@context"]),!a(o))throw new i("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:o});_=_.clone();const v=new Map;if("@version"in o){if(1.1!==o["@version"])throw new i("Unsupported JSON-LD version: "+o["@version"],"jsonld.UnsupportedVersion",{code:"invalid @version value",context:o});if(e.processingMode&&"json-ld-1.0"===e.processingMode)throw new i("@version: "+o["@version"]+" not compatible with "+e.processingMode,"jsonld.ProcessingModeConflict",{code:"processing mode conflict",context:o});_.processingMode="json-ld-1.1",_["@version"]=o["@version"],v.set("@version",!0)}if(_.processingMode=_.processingMode||e.processingMode,"@base"in o){let e=o["@base"];if(null===e||d(e));else{if(!c(e))throw new i('Invalid JSON-LD syntax; the value of "@base" in a @context must be an absolute IRI, a relative IRI, or null.',"jsonld.SyntaxError",{code:"invalid base IRI",context:o});e=u(_["@base"],e)}_["@base"]=e,v.set("@base",!0)}if("@vocab"in o){const e=o["@vocab"];if(null===e)delete _["@vocab"];else{if(!s(e))throw new i('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:o});if(!d(e)&&b.processingMode(_,1))throw new i('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be an absolute IRI.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:o});{const t=y(_,e,{vocab:!0,base:!0},void 0,void 0,r);d(t)||r.eventHandler&&h({event:{type:["JsonLdEvent"],code:"relative @vocab reference",level:"warning",message:"Relative @vocab reference found.",details:{vocab:t}},options:r}),_["@vocab"]=t}}v.set("@vocab",!0)}if("@language"in o){const e=o["@language"];if(null===e)delete _["@language"];else{if(!s(e))throw new i('Invalid JSON-LD syntax; the value of "@language" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid default language",context:o});e.match(p)||r.eventHandler&&h({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:r}),_["@language"]=e.toLowerCase()}v.set("@language",!0)}if("@direction"in o){const t=o["@direction"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @direction not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context member",context:o});if(null===t)delete _["@direction"];else{if("ltr"!==t&&"rtl"!==t)throw new i('Invalid JSON-LD syntax; the value of "@direction" in a @context must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:o});_["@direction"]=t}v.set("@direction",!0)}if("@propagate"in o){const r=o["@propagate"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @propagate not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:o});if("boolean"!=typeof r)throw new i("Invalid JSON-LD syntax; @propagate value must be a boolean.","jsonld.SyntaxError",{code:"invalid @propagate value",context:t});v.set("@propagate",!0)}if("@import"in o){const n=o["@import"];if("json-ld-1.0"===e.processingMode)throw new i("Invalid JSON-LD syntax; @import not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:o});if(!s(n))throw new i("Invalid JSON-LD syntax; @import must be a string.","jsonld.SyntaxError",{code:"invalid @import value",context:t});const a=await r.contextResolver.resolve({activeCtx:e,context:n,documentLoader:r.documentLoader,base:r.base});if(1!==a.length)throw new i("Invalid JSON-LD syntax; @import must reference a single context.","jsonld.SyntaxError",{code:"invalid remote context",context:t});const l=a[0].getProcessed(e);if(l)o=l;else{const r=a[0].document;if("@import"in r)throw new i("Invalid JSON-LD syntax: imported context must not include @import.","jsonld.SyntaxError",{code:"invalid context entry",context:t});for(const e in r)o.hasOwnProperty(e)||(o[e]=r[e]);a[0].setProcessed(e,o)}v.set("@import",!0)}v.set("@protected",o["@protected"]||!1);for(const e in o)if(b.createTermDefinition({activeCtx:_,localCtx:o,term:e,defined:v,options:r,overrideProtected:l}),a(o[e])&&"@context"in o[e]){const t=o[e]["@context"];let n=!0;if(s(t)){const e=u(r.base,t);f.has(e)?n=!1:f.add(e)}if(n)try{await b.process({activeCtx:_.clone(),localCtx:o[e]["@context"],overrideProtected:!0,options:r,cycles:f})}catch(t){throw new i("Invalid JSON-LD syntax; invalid scoped context.","jsonld.SyntaxError",{code:"invalid scoped context",context:o[e]["@context"],term:e})}}n.setProcessed(e,{context:_,events:m})}return _},b.createTermDefinition=({activeCtx:e,localCtx:t,term:r,defined:n,options:l,overrideProtected:c=!1})=>{if(n.has(r)){if(n.get(r))return;throw new i("Cyclical context definition detected.","jsonld.CyclicalContext",{code:"cyclic IRI mapping",context:t,term:r})}let u;if(n.set(r,!1),t.hasOwnProperty(r)&&(u=t[r]),"@type"===r&&a(u)&&"@set"===(u["@container"]||"@set")&&b.processingMode(e,1.1)){const e=["@container","@id","@protected"],n=Object.keys(u);if(0===n.length||n.some((t=>!e.includes(t))))throw new i("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:r})}else{if(b.isKeyword(r))throw new i("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:r});if(r.match(f))return void(l.eventHandler&&h({event:{type:["JsonLdEvent"],code:"reserved term",level:"warning",message:'Terms beginning with "@" are reserved for future use and dropped.',details:{term:r}},options:l}));if(""===r)throw new i("Invalid JSON-LD syntax; a term cannot be an empty string.","jsonld.SyntaxError",{code:"invalid term definition",context:t})}const p=e.mappings.get(r);e.mappings.has(r)&&e.mappings.delete(r);let g=!1;if((s(u)||null===u)&&(g=!0,u={"@id":u}),!a(u))throw new i("Invalid JSON-LD syntax; @context term values must be strings or objects.","jsonld.SyntaxError",{code:"invalid term definition",context:t});const m={};e.mappings.set(r,m),m.reverse=!1;const v=["@container","@id","@language","@reverse","@type"];b.processingMode(e,1.1)&&v.push("@context","@direction","@index","@nest","@prefix","@protected");for(const e in u)if(!v.includes(e))throw new i("Invalid JSON-LD syntax; a term definition must not contain "+e,"jsonld.SyntaxError",{code:"invalid term definition",context:t});const w=r.indexOf(":");if(m._termHasColon=w>0,"@reverse"in u){if("@id"in u)throw new i("Invalid JSON-LD syntax; a @reverse term definition must not contain @id.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});if("@nest"in u)throw new i("Invalid JSON-LD syntax; a @reverse term definition must not contain @nest.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});const o=u["@reverse"];if(!s(o))throw new i("Invalid JSON-LD syntax; a @context @reverse value must be a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(o.match(f))return l.eventHandler&&h({event:{type:["JsonLdEvent"],code:"reserved @reverse value",level:"warning",message:'@reverse values beginning with "@" are reserved for future use and dropped.',details:{reverse:o}},options:l}),void(p?e.mappings.set(r,p):e.mappings.delete(r));const a=y(e,o,{vocab:!0,base:!1},t,n,l);if(!d(a))throw new i("Invalid JSON-LD syntax; a @context @reverse value must be an absolute IRI or a blank node identifier.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});m["@id"]=a,m.reverse=!0}else if("@id"in u){let o=u["@id"];if(o&&!s(o))throw new i("Invalid JSON-LD syntax; a @context @id value must be an array of strings or a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(null===o)m["@id"]=null;else{if(!b.isKeyword(o)&&o.match(f))return l.eventHandler&&h({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:'@id values beginning with "@" are reserved for future use and dropped.',details:{id:o}},options:l}),void(p?e.mappings.set(r,p):e.mappings.delete(r));if(o!==r){if(o=y(e,o,{vocab:!0,base:!1},t,n,l),!d(o)&&!b.isKeyword(o))throw new i("Invalid JSON-LD syntax; a @context @id value must be an absolute IRI, a blank node identifier, or a keyword.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(r.match(/(?::[^:])|\//)&&y(e,r,{vocab:!0,base:!1},t,new Map(n).set(r,!0),l)!==o)throw new i("Invalid JSON-LD syntax; term in form of IRI must expand to definition.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});m["@id"]=o,m._prefix=g&&!m._termHasColon&&null!==o.match(/[:\/\?#\[\]@]$/)}}}if(!("@id"in m))if(m._termHasColon){const i=r.substr(0,w);if(t.hasOwnProperty(i)&&b.createTermDefinition({activeCtx:e,localCtx:t,term:i,defined:n,options:l}),e.mappings.has(i)){const t=r.substr(w+1);m["@id"]=e.mappings.get(i)["@id"]+t}else m["@id"]=r}else if("@type"===r)m["@id"]=r;else{if(!("@vocab"in e))throw new i("Invalid JSON-LD syntax; @context terms must define an @id.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t,term:r});m["@id"]=e["@vocab"]+r}if((!0===u["@protected"]||!0===n.get("@protected")&&!1!==u["@protected"])&&(e.protected[r]=!0,m.protected=!0),n.set(r,!0),"@type"in u){let r=u["@type"];if(!s(r))throw new i("Invalid JSON-LD syntax; an @context @type value must be a string.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if("@json"===r||"@none"===r){if(b.processingMode(e,1))throw new i(`Invalid JSON-LD syntax; an @context @type value must not be "${r}" in JSON-LD 1.0 mode.`,"jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else if("@id"!==r&&"@vocab"!==r){if(r=y(e,r,{vocab:!0,base:!1},t,n,l),!d(r))throw new i("Invalid JSON-LD syntax; an @context @type value must be an absolute IRI.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if(0===r.indexOf("_:"))throw new i("Invalid JSON-LD syntax; an @context @type value must be an IRI, not a blank node identifier.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}m["@type"]=r}if("@container"in u){const r=s(u["@container"])?[u["@container"]]:u["@container"]||[],n=["@list","@set","@index","@language"];let a=!0;const l=r.includes("@set");if(b.processingMode(e,1.1)){if(n.push("@graph","@id","@type"),r.includes("@list")){if(1!==r.length)throw new i("Invalid JSON-LD syntax; @context @container with @list must have no other values","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else if(r.includes("@graph")){if(r.some((e=>"@graph"!==e&&"@id"!==e&&"@index"!==e&&"@set"!==e)))throw new i("Invalid JSON-LD syntax; @context @container with @graph must have no other values other than @id, @index, and @set","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else a&=r.length<=(l?2:1);if(r.includes("@type")&&(m["@type"]=m["@type"]||"@id",!["@id","@vocab"].includes(m["@type"])))throw new i("Invalid JSON-LD syntax; container: @type requires @type to be @id or @vocab.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else a&=!o(u["@container"]),a&=r.length<=1;if(a&=r.every((e=>n.includes(e))),a&=!(l&&r.includes("@list")),!a)throw new i("Invalid JSON-LD syntax; @context @container value must be one of the following: "+n.join(", "),"jsonld.SyntaxError",{code:"invalid container mapping",context:t});if(m.reverse&&!r.every((e=>["@index","@set"].includes(e))))throw new i("Invalid JSON-LD syntax; @context @container value for a @reverse type definition must be @index or @set.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});m["@container"]=r}if("@index"in u){if(!("@container"in u)||!m["@container"].includes("@index"))throw new i(`Invalid JSON-LD syntax; @index without @index in @container: "${u["@index"]}" on term "${r}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});if(!s(u["@index"])||0===u["@index"].indexOf("@"))throw new i(`Invalid JSON-LD syntax; @index must expand to an IRI: "${u["@index"]}" on term "${r}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});m["@index"]=u["@index"]}if("@context"in u&&(m["@context"]=u["@context"]),"@language"in u&&!("@type"in u)){let e=u["@language"];if(null!==e&&!s(e))throw new i("Invalid JSON-LD syntax; @context @language value must be a string or null.","jsonld.SyntaxError",{code:"invalid language mapping",context:t});null!==e&&(e=e.toLowerCase()),m["@language"]=e}if("@prefix"in u){if(r.match(/:|\//))throw new i("Invalid JSON-LD syntax; @context @prefix used on a compact IRI term","jsonld.SyntaxError",{code:"invalid term definition",context:t});if(b.isKeyword(m["@id"]))throw new i("Invalid JSON-LD syntax; keywords may not be used as prefixes","jsonld.SyntaxError",{code:"invalid term definition",context:t});if("boolean"!=typeof u["@prefix"])throw new i("Invalid JSON-LD syntax; @context value for @prefix must be boolean","jsonld.SyntaxError",{code:"invalid @prefix value",context:t});m._prefix=!0===u["@prefix"]}if("@direction"in u){const e=u["@direction"];if(null!==e&&"ltr"!==e&&"rtl"!==e)throw new i('Invalid JSON-LD syntax; @direction value must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:t});m["@direction"]=e}if("@nest"in u){const e=u["@nest"];if(!s(e)||"@nest"!==e&&0===e.indexOf("@"))throw new i("Invalid JSON-LD syntax; @context @nest value must be a string which is not a keyword other than @nest.","jsonld.SyntaxError",{code:"invalid @nest value",context:t});m["@nest"]=e}const _=m["@id"];if("@context"===_||"@preserve"===_)throw new i("Invalid JSON-LD syntax; @context and @preserve cannot be aliased.","jsonld.SyntaxError",{code:"invalid keyword alias",context:t});if(p&&p.protected&&!c&&(e.protected[r]=!0,m.protected=!0,!x(p,m)))throw new i("Invalid JSON-LD syntax; tried to redefine a protected term.","jsonld.SyntaxError",{code:"protected term redefinition",context:t,term:r})},b.expandIri=(e,t,r,n)=>y(e,t,r,void 0,void 0,n),b.getInitialContext=e=>{const t=JSON.stringify({processingMode:e.processingMode}),r=v.get(t);if(r)return r;const i={processingMode:e.processingMode,mappings:new Map,inverse:null,getInverse:function(){const e=this;if(e.inverse)return e.inverse;const t=e.inverse={},r=e.fastCurieMap={},n={},i=(e["@language"]||"@none").toLowerCase(),s=e["@direction"],l=e.mappings,d=[...l.keys()].sort(m);for(const e of d){const o=l.get(e);if(null===o)continue;let d=o["@container"]||"@none";if(d=[].concat(d).sort().join(""),null===o["@id"])continue;const c=g(o["@id"]);for(const l of c){let c=t[l];const u=b.isKeyword(l);if(c)u||o._termHasColon||n[l].push(e);else if(t[l]=c={},!u&&!o._termHasColon){n[l]=[e];const t={iri:l,terms:n[l]};l[0]in r?r[l[0]].push(t):r[l[0]]=[t]}if(c[d]||(c[d]={"@language":{},"@type":{},"@any":{}}),c=c[d],a(e,c["@any"],"@none"),o.reverse)a(e,c["@type"],"@reverse");else if("@none"===o["@type"])a(e,c["@any"],"@none"),a(e,c["@language"],"@none"),a(e,c["@type"],"@none");else if("@type"in o)a(e,c["@type"],o["@type"]);else if("@language"in o&&"@direction"in o){const t=o["@language"],r=o["@direction"];a(e,c["@language"],t&&r?`${t}_${r}`.toLowerCase():t?t.toLowerCase():r?`_${r}`:"@null")}else"@language"in o?a(e,c["@language"],(o["@language"]||"@null").toLowerCase()):"@direction"in o?o["@direction"]?a(e,c["@language"],`_${o["@direction"]}`):a(e,c["@language"],"@none"):s?(a(e,c["@language"],`_${s}`),a(e,c["@language"],"@none"),a(e,c["@type"],"@none")):(a(e,c["@language"],i),a(e,c["@language"],"@none"),a(e,c["@type"],"@none"))}}for(const e in r)o(r,e,1);return t},clone:function(){const e={};return e.mappings=n.clone(this.mappings),e.clone=this.clone,e.inverse=null,e.getInverse=this.getInverse,e.protected=n.clone(this.protected),this.previousContext&&(e.previousContext=this.previousContext.clone()),e.revertToPreviousContext=this.revertToPreviousContext,"@base"in this&&(e["@base"]=this["@base"]),"@language"in this&&(e["@language"]=this["@language"]),"@vocab"in this&&(e["@vocab"]=this["@vocab"]),e},revertToPreviousContext:function(){return this.previousContext?this.previousContext.clone():this},protected:{}};return 1e4===v.size&&v.clear(),v.set(t,i),i;function o(e,t,r){const n=e[t],i=e[t]={};let a,s;for(const e of n)a=e.iri,s=r>=a.length?"":a[r],s in i?i[s].push(e):i[s]=[e];for(const e in i)""!==e&&o(i,e,r+1)}function a(e,t,r){t.hasOwnProperty(r)||(t[r]=e)}},b.getContextValue=(e,t,r)=>{if(null===t){if("@context"===r)return;return null}if(e.mappings.has(t)){const n=e.mappings.get(t);if(l(r))return n;if(n.hasOwnProperty(r))return n[r]}return"@language"===r&&r in e||"@direction"===r&&r in e?e[r]:"@context"!==r?null:void 0},b.processingMode=(e,t)=>t.toString()>="1.1"?!e.processingMode||e.processingMode>="json-ld-"+t.toString():"json-ld-1.0"===e.processingMode,b.isKeyword=e=>{if(!s(e)||"@"!==e[0])return!1;switch(e){case"@base":case"@container":case"@context":case"@default":case"@direction":case"@embed":case"@explicit":case"@graph":case"@id":case"@included":case"@index":case"@json":case"@language":case"@list":case"@nest":case"@none":case"@omitDefault":case"@prefix":case"@preserve":case"@protected":case"@requireAll":case"@reverse":case"@set":case"@type":case"@value":case"@version":case"@vocab":return!0}return!1}},6957:(e,t,r)=>{const{parseLinkHeader:n,buildHeaders:i}=r(9263),{LINK_HEADER_CONTEXT:o}=r(9378),a=r(2207),s=r(3743),{prependBase:l}=r(470),d=/(^|(\r\n))link:/i;e.exports=({secure:e,headers:t={},xhr:r}={headers:{}})=>(t=i(t),(new s).wrapLoader((async function i(s){if(0!==s.indexOf("http:")&&0!==s.indexOf("https:"))throw new a('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:s});if(e&&0!==s.indexOf("https"))throw new a('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:s});let c;try{c=await function(e,t,r){const n=new(e=e||XMLHttpRequest);return new Promise(((e,i)=>{n.onload=()=>e(n),n.onerror=e=>i(e),n.open("GET",t,!0);for(const e in r)n.setRequestHeader(e,r[e]);n.send()}))}(r,s,t)}catch(e){throw new a("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:s,cause:e})}if(c.status>=400)throw new a("URL could not be dereferenced: "+c.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:s,httpStatusCode:c.status});let u={contextUrl:null,documentUrl:s,document:c.response},h=null;const p=c.getResponseHeader("Content-Type");let f;if(d.test(c.getAllResponseHeaders())&&(f=c.getResponseHeader("Link")),f&&"application/ld+json"!==p){const e=n(f),t=e[o];if(Array.isArray(t))throw new a("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:s});t&&(u.contextUrl=t.target),h=e.alternate,h&&"application/ld+json"==h.type&&!(p||"").match(/^application\/(\w*\+)?json$/)&&(u=await i(l(s,h.target)))}return u})))},2246:(e,t,r)=>{const n=r(2207),{isArray:i}=r(7382),{asArray:o}=r(9263),a={};function s({event:e,handlers:t}){let r=!0;for(let o=0;r&&o<t.length;++o){r=!1;const a=t[o];if(i(a))r=s({event:e,handlers:a});else if("function"==typeof a)a({event:e,next:()=>{r=!0}});else{if("object"!=typeof a)throw new n("Invalid event handler.","jsonld.InvalidEventHandler",{event:e});e.code in a?a[e.code]({event:e,next:()=>{r=!0}}):r=!0}}return r}e.exports=a,a.defaultEventHandler=null,a.setupEventHandler=({options:e={}})=>{const t=[].concat(e.safe?a.safeEventHandler:[],e.eventHandler?o(e.eventHandler):[],a.defaultEventHandler?a.defaultEventHandler:[]);return 0===t.length?null:t},a.handleEvent=({event:e,options:t})=>{s({event:e,handlers:t.eventHandler})};const l=new Set(["empty object","free-floating scalar","invalid @language value","invalid property","null @id value","null @value value","object with only @id","object with only @language","object with only @list","object with only @value","relative @id reference","relative @type reference","relative @vocab reference","reserved @id value","reserved @reverse value","reserved term","blank node predicate","relative graph reference","relative object reference","relative predicate reference","relative subject reference","rdfDirection not set"]);a.safeEventHandler=function({event:e,next:t}){if("warning"===e.level&&l.has(e.code))throw new n("Safe mode validation error.","jsonld.ValidationError",{event:e});t()},a.logEventHandler=function({event:e,next:t}){console.log(`EVENT: ${e.message}`,{event:e}),t()},a.logWarningEventHandler=function({event:e,next:t}){"warning"===e.level&&console.warn(`WARNING: ${e.message}`,{event:e}),t()},a.unhandledEventHandler=function({event:e}){throw new n("No handler for event.","jsonld.UnhandledEvent",{event:e})},a.setDefaultEventHandler=function({eventHandler:e}={}){a.defaultEventHandler=e?o(e):null}},4019:(e,t,r)=>{const n=r(2207),{isArray:i,isObject:o,isEmptyObject:a,isString:s,isUndefined:l}=r(7382),{isList:d,isValue:c,isGraph:u,isSubject:h}=r(3978),{expandIri:p,getContextValue:f,isKeyword:g,process:m,processingMode:v}=r(1972),{isAbsolute:b}=r(470),{REGEX_BCP47:y,REGEX_KEYWORD:x,addValue:w,asArray:_,getValues:S,validateTypeValue:E}=r(9263),{handleEvent:I}=r(2246),T={};function k({value:e,count:t,options:r}){if(0===t||"@value"in e||"@list"in e||1===t&&"@id"in e){if(r.eventHandler){let n,i;0===t?(n="empty object",i="Dropping empty object."):"@value"in e?(n="object with only @value",i="Dropping object with only @value."):"@list"in e?(n="object with only @list",i="Dropping object with only @list."):1===t&&"@id"in e&&(n="object with only @id",i="Dropping object with only @id."),I({event:{type:["JsonLdEvent"],code:n,level:"warning",message:i,details:{value:e}},options:r})}return null}return e}async function j({activeCtx:e,activeProperty:t,expandedActiveProperty:r,element:u,expandedParent:x,options:S={},insideList:A,typeKey:R,typeScopedContext:O}){const L=Object.keys(u).sort(),$=[];let D;const P=u[R]&&"@json"===p(e,i(u[R])?u[R][0]:u[R],{vocab:!0},{...S,typeExpansion:!0});for(const j of L){let A,R=u[j];if("@context"===j)continue;const L=p(e,j,{vocab:!0},S);if(null===L||!b(L)&&!g(L)){S.eventHandler&&I({event:{type:["JsonLdEvent"],code:"invalid property",level:"warning",message:"Dropping property that did not expand into an absolute IRI or keyword.",details:{property:j,expandedProperty:L}},options:S});continue}if(g(L)){if("@reverse"===r)throw new n("Invalid JSON-LD syntax; a keyword cannot be used as a @reverse property.","jsonld.SyntaxError",{code:"invalid reverse property map",value:R});if(L in x&&"@included"!==L&&"@type"!==L)throw new n("Invalid JSON-LD syntax; colliding keywords detected.","jsonld.SyntaxError",{code:"colliding keywords",keyword:L})}if("@id"===L){if(!s(R)){if(!S.isFrame)throw new n('Invalid JSON-LD syntax; "@id" value must a string.',"jsonld.SyntaxError",{code:"invalid @id value",value:R});if(o(R)){if(!a(R))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:R})}else{if(!i(R))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:R});if(!R.every((e=>s(e))))throw new n('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:R})}}w(x,"@id",_(R).map((t=>{if(s(t)){const r=p(e,t,{base:!0},S);return S.eventHandler&&(null===r?I(null===t?{event:{type:["JsonLdEvent"],code:"null @id value",level:"warning",message:"Null @id found.",details:{id:t}},options:S}:{event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:t}},options:S}):b(r)||I({event:{type:["JsonLdEvent"],code:"relative @id reference",level:"warning",message:"Relative @id reference found.",details:{id:t,expandedId:r}},options:S})),r}return t})),{propertyIsArray:S.isFrame});continue}if("@type"===L){o(R)&&(R=Object.fromEntries(Object.entries(R).map((([e,t])=>[p(O,e,{vocab:!0}),_(t).map((e=>p(O,e,{base:!0,vocab:!0},{...S,typeExpansion:!0})))])))),E(R,S.isFrame),w(x,"@type",_(R).map((e=>{if(s(e)){const t=p(O,e,{base:!0,vocab:!0},{...S,typeExpansion:!0});return"@json"===t||b(t)||S.eventHandler&&I({event:{type:["JsonLdEvent"],code:"relative @type reference",level:"warning",message:"Relative @type reference found.",details:{type:e}},options:S}),t}return e})),{propertyIsArray:!!S.isFrame});continue}if("@included"===L&&v(e,1.1)){const r=_(await T.expand({activeCtx:e,activeProperty:t,element:R,options:S}));if(!r.every((e=>h(e))))throw new n("Invalid JSON-LD syntax; values of @included must expand to node objects.","jsonld.SyntaxError",{code:"invalid @included value",value:R});w(x,"@included",r,{propertyIsArray:!0});continue}if("@graph"===L&&!o(R)&&!i(R))throw new n('Invalid JSON-LD syntax; "@graph" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid @graph value",value:R});if("@value"===L){D=R,P&&v(e,1.1)?x["@value"]=R:w(x,"@value",R,{propertyIsArray:S.isFrame});continue}if("@language"===L){if(null===R)continue;if(!s(R)&&!S.isFrame)throw new n('Invalid JSON-LD syntax; "@language" value must be a string.',"jsonld.SyntaxError",{code:"invalid language-tagged string",value:R});R=_(R).map((e=>s(e)?e.toLowerCase():e));for(const e of R)s(e)&&!e.match(y)&&S.eventHandler&&I({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:S});w(x,"@language",R,{propertyIsArray:S.isFrame});continue}if("@direction"===L){if(!s(R)&&!S.isFrame)throw new n('Invalid JSON-LD syntax; "@direction" value must be a string.',"jsonld.SyntaxError",{code:"invalid base direction",value:R});R=_(R);for(const e of R)if(s(e)&&"ltr"!==e&&"rtl"!==e)throw new n('Invalid JSON-LD syntax; "@direction" must be "ltr" or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",value:R});w(x,"@direction",R,{propertyIsArray:S.isFrame});continue}if("@index"===L){if(!s(R))throw new n('Invalid JSON-LD syntax; "@index" value must be a string.',"jsonld.SyntaxError",{code:"invalid @index value",value:R});w(x,"@index",R);continue}if("@reverse"===L){if(!o(R))throw new n('Invalid JSON-LD syntax; "@reverse" value must be an object.',"jsonld.SyntaxError",{code:"invalid @reverse value",value:R});if(A=await T.expand({activeCtx:e,activeProperty:"@reverse",element:R,options:S}),"@reverse"in A)for(const e in A["@reverse"])w(x,e,A["@reverse"][e],{propertyIsArray:!0});let t=x["@reverse"]||null;for(const e in A){if("@reverse"===e)continue;null===t&&(t=x["@reverse"]={}),w(t,e,[],{propertyIsArray:!0});const r=A[e];for(let i=0;i<r.length;++i){const o=r[i];if(c(o)||d(o))throw new n('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:A});w(t,e,o,{propertyIsArray:!0})}}continue}if("@nest"===L){$.push(j);continue}let M=e;const B=f(e,j,"@context");l(B)||(M=await m({activeCtx:e,localCtx:B,propagate:!0,overrideProtected:!0,options:S}));const F=f(e,j,"@container")||[];if(F.includes("@language")&&o(R))A=C(M,R,f(M,j,"@direction"),S);else if(F.includes("@index")&&o(R)){const t=F.includes("@graph"),r=f(M,j,"@index")||"@index",n="@index"!==r&&p(e,r,{vocab:!0},S);A=await N({activeCtx:M,options:S,activeProperty:j,value:R,asGraph:t,indexKey:r,propertyIndex:n})}else if(F.includes("@id")&&o(R)){const e=F.includes("@graph");A=await N({activeCtx:M,options:S,activeProperty:j,value:R,asGraph:e,indexKey:"@id"})}else if(F.includes("@type")&&o(R))A=await N({activeCtx:M.revertToPreviousContext(),options:S,activeProperty:j,value:R,asGraph:!1,indexKey:"@type"});else{const n="@list"===L;if(n||"@set"===L){let e=t;n&&"@graph"===r&&(e=null),A=await T.expand({activeCtx:M,activeProperty:e,element:R,options:S,insideList:n})}else A="@json"===f(e,j,"@type")?{"@type":"@json","@value":R}:await T.expand({activeCtx:M,activeProperty:j,element:R,options:S,insideList:!1})}if(null!==A||"@value"===L){if("@list"!==L&&!d(A)&&F.includes("@list")&&(A={"@list":_(A)}),F.includes("@graph")&&!F.some((e=>"@id"===e||"@index"===e))){if(A=_(A),S.isFrame||(A=A.filter((e=>null!==k({value:e,count:Object.keys(e).length,options:S})))),0===A.length)continue;A=A.map((e=>({"@graph":_(e)})))}if(M.mappings.has(j)&&M.mappings.get(j).reverse){const e=x["@reverse"]=x["@reverse"]||{};A=_(A);for(let t=0;t<A.length;++t){const r=A[t];if(c(r)||d(r))throw new n('Invalid JSON-LD syntax; "@reverse" value must not be a @value or an @list.',"jsonld.SyntaxError",{code:"invalid reverse property value",value:A});w(e,L,r,{propertyIsArray:!0})}}else w(x,L,A,{propertyIsArray:!0})}}if("@value"in x)if("@json"===x["@type"]&&v(e,1.1));else if((o(D)||i(D))&&!S.isFrame)throw new n('Invalid JSON-LD syntax; "@value" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid value object value",value:D});for(const a of $){const s=i(u[a])?u[a]:[u[a]];for(const i of s){if(!o(i)||Object.keys(i).some((t=>"@value"===p(e,t,{vocab:!0},S))))throw new n("Invalid JSON-LD syntax; nested value must be a node object.","jsonld.SyntaxError",{code:"invalid @nest value",value:i});await j({activeCtx:e,activeProperty:t,expandedActiveProperty:r,element:i,expandedParent:x,options:S,insideList:A,typeScopedContext:O,typeKey:R})}}}function A({activeCtx:e,activeProperty:t,value:r,options:n}){if(null==r)return null;const i=p(e,t,{vocab:!0},n);if("@id"===i)return p(e,r,{base:!0},n);if("@type"===i)return p(e,r,{vocab:!0,base:!0},{...n,typeExpansion:!0});const o=f(e,t,"@type");if(("@id"===o||"@graph"===i)&&s(r)){const i=p(e,r,{base:!0},n);return null===i&&r.match(x)&&n.eventHandler&&I({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:t}},options:n}),{"@id":i}}if("@vocab"===o&&s(r))return{"@id":p(e,r,{vocab:!0,base:!0},n)};if(g(i))return r;const a={};if(o&&!["@id","@vocab","@none"].includes(o))a["@type"]=o;else if(s(r)){const r=f(e,t,"@language");null!==r&&(a["@language"]=r);const n=f(e,t,"@direction");null!==n&&(a["@direction"]=n)}return["boolean","number","string"].includes(typeof r)||(r=r.toString()),a["@value"]=r,a}function C(e,t,r,o){const a=[],l=Object.keys(t).sort();for(const d of l){const l=p(e,d,{vocab:!0},o);let c=t[d];i(c)||(c=[c]);for(const e of c){if(null===e)continue;if(!s(e))throw new n("Invalid JSON-LD syntax; language map values must be strings.","jsonld.SyntaxError",{code:"invalid language map value",languageMap:t});const i={"@value":e};"@none"!==l&&(d.match(y)||o.eventHandler&&I({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:d}},options:o}),i["@language"]=d.toLowerCase()),r&&(i["@direction"]=r),a.push(i)}}return a}async function N({activeCtx:e,options:t,activeProperty:r,value:o,asGraph:a,indexKey:s,propertyIndex:d}){const h=[],g=Object.keys(o).sort(),v="@type"===s;for(let b of g){if(v){const r=f(e,b,"@context");l(r)||(e=await m({activeCtx:e,localCtx:r,propagate:!1,options:t}))}let g,y=o[b];i(y)||(y=[y]),y=await T.expand({activeCtx:e,activeProperty:r,element:y,options:t,insideList:!1,insideIndex:!0}),g=d?"@none"===b?"@none":A({activeCtx:e,activeProperty:s,value:b,options:t}):p(e,b,{vocab:!0},t),"@id"===s?b=p(e,b,{base:!0},t):v&&(b=g);for(let e of y){if(a&&!u(e)&&(e={"@graph":[e]}),"@type"===s)"@none"===g||(e["@type"]?e["@type"]=[b].concat(e["@type"]):e["@type"]=[b]);else{if(c(e)&&!["@language","@type","@index"].includes(s))throw new n(`Invalid JSON-LD syntax; Attempt to add illegal key to value object: "${s}".`,"jsonld.SyntaxError",{code:"invalid value object",value:e});d?"@none"!==g&&w(e,d,g,{propertyIsArray:!0,prependValue:!0}):"@none"===g||s in e||(e[s]=b)}h.push(e)}}return h}e.exports=T,T.expand=async({activeCtx:e,activeProperty:t=null,element:r,options:d={},insideList:c=!1,insideIndex:u=!1,typeScopedContext:h=null})=>{if(null==r)return null;if("@default"===t&&(d=Object.assign({},d,{isFrame:!1})),!i(r)&&!o(r))return c||null!==t&&"@graph"!==p(e,t,{vocab:!0},d)?A({activeCtx:e,activeProperty:t,value:r,options:d}):(d.eventHandler&&I({event:{type:["JsonLdEvent"],code:"free-floating scalar",level:"warning",message:"Dropping free-floating scalar not in a list.",details:{value:r}},options:d}),null);if(i(r)){let n=[];const o=f(e,t,"@container")||[];c=c||o.includes("@list");for(let o=0;o<r.length;++o){let a=await T.expand({activeCtx:e,activeProperty:t,element:r[o],options:d,insideIndex:u,typeScopedContext:h});c&&i(a)&&(a={"@list":a}),null!==a&&(i(a)?n=n.concat(a):n.push(a))}return n}const g=p(e,t,{vocab:!0},d),y=f(e,t,"@context");h=h||(e.previousContext?e:null);let x=Object.keys(r).sort(),w=!u;if(w&&h&&x.length<=2&&!x.includes("@context"))for(const t of x){const r=p(h,t,{vocab:!0},d);if("@value"===r){w=!1,e=h;break}if("@id"===r&&1===x.length){w=!1;break}}w&&(e=e.revertToPreviousContext()),l(y)||(e=await m({activeCtx:e,localCtx:y,propagate:!0,overrideProtected:!0,options:d})),"@context"in r&&(e=await m({activeCtx:e,localCtx:r["@context"],options:d})),h=e;let E=null;for(const t of x)if("@type"===p(e,t,{vocab:!0},d)){E=E||t;const n=r[t],i=Array.isArray(n)?n.length>1?n.slice().sort():n:[n];for(const t of i){const r=f(h,t,"@context");l(r)||(e=await m({activeCtx:e,localCtx:r,options:d,propagate:!1}))}}let C={};await j({activeCtx:e,activeProperty:t,expandedActiveProperty:g,element:r,expandedParent:C,options:d,insideList:c,typeKey:E,typeScopedContext:h}),x=Object.keys(C);let N=x.length;if("@value"in C){if("@type"in C&&("@language"in C||"@direction"in C))throw new n('Invalid JSON-LD syntax; an element containing "@value" may not contain both "@type" and either "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:C});let t=N-1;if("@type"in C&&(t-=1),"@index"in C&&(t-=1),"@language"in C&&(t-=1),"@direction"in C&&(t-=1),0!==t)throw new n('Invalid JSON-LD syntax; an element containing "@value" may only have an "@index" property and either "@type" or either or both "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:C});const r=null===C["@value"]?[]:_(C["@value"]),i=S(C,"@type");if(v(e,1.1)&&i.includes("@json")&&1===i.length);else if(0===r.length)d.eventHandler&&I({event:{type:["JsonLdEvent"],code:"null @value value",level:"warning",message:"Dropping null @value value.",details:{value:C}},options:d}),C=null;else{if(!r.every((e=>s(e)||a(e)))&&"@language"in C)throw new n("Invalid JSON-LD syntax; only strings may be language-tagged.","jsonld.SyntaxError",{code:"invalid language-tagged value",element:C});if(!i.every((e=>b(e)&&!(s(e)&&0===e.indexOf("_:"))||a(e))))throw new n('Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',"jsonld.SyntaxError",{code:"invalid typed value",element:C})}}else if("@type"in C&&!i(C["@type"]))C["@type"]=[C["@type"]];else if("@set"in C||"@list"in C){if(N>1&&(2!==N||!("@index"in C)))throw new n('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:C});"@set"in C&&(C=C["@set"],x=Object.keys(C),N=x.length)}else 1===N&&"@language"in C&&(d.eventHandler&&I({event:{type:["JsonLdEvent"],code:"object with only @language",level:"warning",message:"Dropping object with only @language.",details:{value:C}},options:d}),C=null);return!o(C)||d.keepFreeFloatingNodes||c||null!==t&&"@graph"!==g&&!(f(e,t,"@container")||[]).includes("@graph")||(C=k({value:C,count:N,options:d})),C}},5229:(e,t,r)=>{const{isSubjectReference:n}=r(3978),{createMergedNodeMap:i}=r(9233),o={};e.exports=o,o.flatten=e=>{const t=i(e),r=[],o=Object.keys(t).sort();for(let e=0;e<o.length;++e){const i=t[o[e]];n(i)||r.push(i)}return r}},7946:(e,t,r)=>{const{isKeyword:n}=r(1972),i=r(3978),o=r(7382),a=r(9263),s=r(470),l=r(2207),{createNodeMap:d,mergeNodeMapGraphs:c}=r(9233),u={};function h(e){const t={};for(const r in e)void 0!==e[r]&&(t["@"+r]=[e[r]]);return[t]}function p(e,t,r){for(let n=r.length-1;n>=0;--n){const i=r[n];if(i.graph===t&&i.subject["@id"]===e["@id"])return!0}return!1}function f(e,t,r){const n="@"+r;let i=n in e?e[n][0]:t[r];if("embed"===r)if(!0===i)i="@once";else if(!1===i)i="@never";else if("@always"!==i&&"@never"!==i&&"@link"!==i&&"@first"!==i&&"@last"!==i&&"@once"!==i)throw new l("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:e});return i}function g(e){if(!o.isArray(e)||1!==e.length||!o.isObject(e[0]))throw new l("Invalid JSON-LD syntax; a JSON-LD frame must be a single object.","jsonld.SyntaxError",{frame:e});if("@id"in e[0])for(const t of a.asArray(e[0]["@id"]))if(!o.isObject(t)&&!s.isAbsolute(t)||o.isString(t)&&0===t.indexOf("_:"))throw new l("Invalid JSON-LD syntax; invalid @id in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e});if("@type"in e[0])for(const t of a.asArray(e[0]["@type"]))if(!o.isObject(t)&&!s.isAbsolute(t)&&"@json"!==t||o.isString(t)&&0===t.indexOf("_:"))throw new l("Invalid JSON-LD syntax; invalid @type in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e})}function m(e,t,r,s){let l=!0,d=!1;for(const c in r){let u=!1;const h=a.getValues(t,c),p=0===a.getValues(r,c).length;if("@id"===c){if(o.isEmptyObject(r["@id"][0]||{})?u=!0:r["@id"].length>=0&&(u=r["@id"].includes(h[0])),!s.requireAll)return u}else if("@type"===c){if(l=!1,p){if(h.length>0)return!1;u=!0}else if(1===r["@type"].length&&o.isEmptyObject(r["@type"][0]))u=h.length>0;else for(const e of r["@type"])u=!(!o.isObject(e)||!("@default"in e))||u||h.some((t=>t===e));if(!s.requireAll)return u}else{if(n(c))continue;{const t=a.getValues(r,c)[0];let n=!1;if(t&&(g([t]),n="@default"in t),l=!1,0===h.length&&n)continue;if(h.length>0&&p)return!1;if(void 0===t){if(h.length>0)return!1;u=!0}else if(i.isList(t)){const r=t["@list"][0];if(i.isList(h[0])){const t=h[0]["@list"];i.isValue(r)?u=t.some((e=>w(r,e))):(i.isSubject(r)||i.isSubjectReference(r))&&(u=t.some((t=>x(e,r,t,s))))}}else u=i.isValue(t)?h.some((e=>w(t,e))):i.isSubjectReference(t)?h.some((r=>x(e,t,r,s))):!!o.isObject(t)&&h.length>0}}if(!u&&s.requireAll)return!1;d=d||u}return l||d}function v(e,t){const r=e.uniqueEmbeds[e.graph],n=r[t],i=n.parent,s=n.property,l={"@id":t};if(o.isArray(i)){for(let e=0;e<i.length;++e)if(a.compareValues(i[e],l)){i[e]=l;break}}else{const e=o.isArray(i[s]);a.removeValue(i,s,l,{propertyIsArray:e}),a.addValue(i,s,l,{propertyIsArray:e})}const d=e=>{const t=Object.keys(r);for(const n of t)n in r&&o.isObject(r[n].parent)&&r[n].parent["@id"]===e&&(delete r[n],d(n))};d(t)}function b(e,t){if(o.isArray(e))return e.map((e=>b(e,t)));if(o.isObject(e)){if("@preserve"in e)return e["@preserve"][0];if(i.isValue(e))return e;if(i.isList(e))return e["@list"]=b(e["@list"],t),e;if("@id"in e){const r=e["@id"];if(t.link.hasOwnProperty(r)){const n=t.link[r].indexOf(e);if(-1!==n)return t.link[r][n];t.link[r].push(e)}else t.link[r]=[e]}for(const r in e)"@id"===r&&t.bnodesToClear.includes(e[r])?delete e["@id"]:e[r]=b(e[r],t)}return e}function y(e,t,r){o.isObject(e)?a.addValue(e,t,r,{propertyIsArray:!0}):e.push(r)}function x(e,t,r,n){if(!("@id"in r))return!1;const i=e.subjects[r["@id"]];return i&&m(e,i,t,n)}function w(e,t){const r=t["@value"],n=t["@type"],i=t["@language"],a=e["@value"]?o.isArray(e["@value"])?e["@value"]:[e["@value"]]:[],s=e["@type"]?o.isArray(e["@type"])?e["@type"]:[e["@type"]]:[],l=e["@language"]?o.isArray(e["@language"])?e["@language"]:[e["@language"]]:[];return 0===a.length&&0===s.length&&0===l.length||!(!a.includes(r)&&!o.isEmptyObject(a[0]))&&!!(!n&&0===s.length||s.includes(n)||n&&o.isEmptyObject(s[0]))&&!!(!i&&0===l.length||l.includes(i)||i&&o.isEmptyObject(l[0]))}e.exports=u,u.frameMergedOrDefault=(e,t,r)=>{const n={options:r,embedded:!1,graph:"@default",graphMap:{"@default":{}},subjectStack:[],link:{},bnodeMap:{}},i=new a.IdentifierIssuer("_:b");d(e,n.graphMap,"@default",i),r.merged&&(n.graphMap["@merged"]=c(n.graphMap),n.graph="@merged"),n.subjects=n.graphMap[n.graph];const o=[];return u.frame(n,Object.keys(n.subjects).sort(),t,o),r.pruneBlankNodeIdentifiers&&(r.bnodesToClear=Object.keys(n.bnodeMap).filter((e=>1===n.bnodeMap[e].length))),r.link={},b(o,r)},u.frame=(e,t,r,s,d=null)=>{g(r),r=r[0];const c=e.options,b={embed:f(r,c,"embed"),explicit:f(r,c,"explicit"),requireAll:f(r,c,"requireAll")};e.link.hasOwnProperty(e.graph)||(e.link[e.graph]={});const x=e.link[e.graph],_=function(e,t,r,n){const i={};for(const o of t){const t=e.graphMap[e.graph][o];m(e,t,r,n)&&(i[o]=t)}return i}(e,t,r,b),S=Object.keys(_).sort();for(const g of S){const m=_[g];if(null===d?e.uniqueEmbeds={[e.graph]:{}}:e.uniqueEmbeds[e.graph]=e.uniqueEmbeds[e.graph]||{},"@link"===b.embed&&g in x){y(s,d,x[g]);continue}const S={"@id":g};if(0===g.indexOf("_:")&&a.addValue(e.bnodeMap,g,S,{propertyIsArray:!0}),x[g]=S,("@first"===b.embed||"@last"===b.embed)&&e.is11)throw new l("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:r});if(e.embedded||!e.uniqueEmbeds[e.graph].hasOwnProperty(g))if(!e.embedded||"@never"!==b.embed&&!p(m,e.graph,e.subjectStack))if(!e.embedded||"@first"!=b.embed&&"@once"!=b.embed||!e.uniqueEmbeds[e.graph].hasOwnProperty(g)){if("@last"===b.embed&&g in e.uniqueEmbeds[e.graph]&&v(e,g),e.uniqueEmbeds[e.graph][g]={parent:s,property:d},e.subjectStack.push({subject:m,graph:e.graph}),g in e.graphMap){let t=!1,n=null;"@graph"in r?(n=r["@graph"][0],t=!("@merged"===g||"@default"===g),o.isObject(n)||(n={})):(t="@merged"!==e.graph,n={}),t&&u.frame({...e,graph:g,embedded:!1},Object.keys(e.graphMap[g]).sort(),[n],S,"@graph")}"@included"in r&&u.frame({...e,embedded:!1},t,r["@included"],S,"@included");for(const t of Object.keys(m).sort())if(n(t)){if(S[t]=a.clone(m[t]),"@type"===t)for(const t of m["@type"])0===t.indexOf("_:")&&a.addValue(e.bnodeMap,t,S,{propertyIsArray:!0})}else if(!b.explicit||t in r)for(const n of m[t]){const o=t in r?r[t]:h(b);if(i.isList(n)){const o=r[t]&&r[t][0]&&r[t][0]["@list"]?r[t][0]["@list"]:h(b),s={"@list":[]};y(S,t,s);const l=n["@list"];for(const t of l)i.isSubjectReference(t)?u.frame({...e,embedded:!0},[t["@id"]],o,s,"@list"):y(s,"@list",a.clone(t))}else i.isSubjectReference(n)?u.frame({...e,embedded:!0},[n["@id"]],o,S,t):w(o[0],n)&&y(S,t,a.clone(n))}for(const e of Object.keys(r).sort()){if("@type"===e){if(!o.isObject(r[e][0])||!("@default"in r[e][0]))continue}else if(n(e))continue;const t=r[e][0]||{};if(!f(t,c,"omitDefault")&&!(e in S)){let r="@null";"@default"in t&&(r=a.clone(t["@default"])),o.isArray(r)||(r=[r]),S[e]=[{"@preserve":r}]}}for(const t of Object.keys(r["@reverse"]||{}).sort()){const n=r["@reverse"][t];for(const r of Object.keys(e.subjects))a.getValues(e.subjects[r],t).some((e=>e["@id"]===g))&&(S["@reverse"]=S["@reverse"]||{},a.addValue(S["@reverse"],t,[],{propertyIsArray:!0}),u.frame({...e,embedded:!0},[r],n,S["@reverse"][t],d))}y(s,d,S),e.subjectStack.pop()}else y(s,d,S);else y(s,d,S)}},u.cleanupNull=(e,t)=>{if(o.isArray(e)){const r=e.map((e=>u.cleanupNull(e,t)));return r.filter((e=>e))}if("@null"===e)return null;if(o.isObject(e)){if("@id"in e){const r=e["@id"];if(t.link.hasOwnProperty(r)){const n=t.link[r].indexOf(e);if(-1!==n)return t.link[r][n];t.link[r].push(e)}else t.link[r]=[e]}for(const r in e)e[r]=u.cleanupNull(e[r],t)}return e}},3947:(e,t,r)=>{const n=r(2207),i=r(3978),o=r(7382),{REGEX_BCP47:a,addValue:s}=r(9263),{handleEvent:l}=r(2246),{RDF_LIST:d,RDF_FIRST:c,RDF_REST:u,RDF_NIL:h,RDF_TYPE:p,RDF_JSON_LITERAL:f,XSD_BOOLEAN:g,XSD_DOUBLE:m,XSD_INTEGER:v,XSD_STRING:b}=r(9378),y={};function x(e,t,r,i){if(e.termType.endsWith("Node"))return{"@id":e.value};const s={"@value":e.value};if(e.language)e.language.match(a)||i.eventHandler&&l({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e.language}},options:i}),s["@language"]=e.language;else{let d=e.datatype.value;if(d||(d=b),d===f){d="@json";try{s["@value"]=JSON.parse(s["@value"])}catch(e){throw new n("JSON literal could not be parsed.","jsonld.InvalidJsonLiteral",{code:"invalid JSON literal",value:s["@value"],cause:e})}}if(t){if(d===g)"true"===s["@value"]?s["@value"]=!0:"false"===s["@value"]&&(s["@value"]=!1);else if(o.isNumeric(s["@value"]))if(d===v){const e=parseInt(s["@value"],10);e.toFixed(0)===s["@value"]&&(s["@value"]=e)}else d===m&&(s["@value"]=parseFloat(s["@value"]));[g,v,m,b].includes(d)||(s["@type"]=d)}else if("i18n-datatype"===r&&d.startsWith("https://www.w3.org/ns/i18n#")){const[,e,t]=d.split(/[#_]/);e.length>0&&(s["@language"]=e,e.match(a)||i.eventHandler&&l({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:i})),s["@direction"]=t}else d!==b&&(s["@type"]=d)}return s}e.exports=y,y.fromRDF=async(e,t)=>{const{useRdfType:r=!1,useNativeTypes:a=!1,rdfDirection:l=null}=t,f={},g={"@default":f},m={};if(l){if("compound-literal"===l)throw new n("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:l});if("i18n-datatype"!==l)throw new n("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:l})}for(const n of e){const e="DefaultGraph"===n.graph.termType?"@default":n.graph.value;e in g||(g[e]={}),"@default"===e||e in f||(f[e]={"@id":e});const i=g[e],o=n.subject.value,d=n.predicate.value,c=n.object;o in i||(i[o]={"@id":o});const u=i[o],v=c.termType.endsWith("Node");if(v&&!(c.value in i)&&(i[c.value]={"@id":c.value}),d===p&&!r&&v){s(u,"@type",c.value,{propertyIsArray:!0});continue}const b=x(c,a,l,t);if(s(u,d,b,{propertyIsArray:!0}),v)if(c.value===h){const e=i[c.value];"usages"in e||(e.usages=[]),e.usages.push({node:u,property:d,value:b})}else c.value in m?m[c.value]=!1:m[c.value]={node:u,property:d,value:b}}for(const e in g){const t=g[e];if(!(h in t))continue;const r=t[h];if(r.usages){for(let e of r.usages){let r=e.node,n=e.property,a=e.value;const s=[],l=[];let h=Object.keys(r).length;for(;n===u&&o.isObject(m[r["@id"]])&&o.isArray(r[c])&&1===r[c].length&&o.isArray(r[u])&&1===r[u].length&&(3===h||4===h&&o.isArray(r["@type"])&&1===r["@type"].length&&r["@type"][0]===d)&&(s.push(r[c][0]),l.push(r["@id"]),e=m[r["@id"]],r=e.node,n=e.property,a=e.value,h=Object.keys(r).length,i.isBlankNode(r)););delete a["@id"],a["@list"]=s.reverse();for(const e of l)delete t[e]}delete r.usages}}const v=[],b=Object.keys(f).sort();for(const e of b){const t=f[e];if(e in g){const r=t["@graph"]=[],n=g[e],o=Object.keys(n).sort();for(const e of o){const t=n[e];i.isSubjectReference(t)||r.push(t)}}i.isSubjectReference(t)||v.push(t)}return v}},3978:(e,t,r)=>{const n=r(7382),i={};e.exports=i,i.isSubject=e=>!(!n.isObject(e)||"@value"in e||"@set"in e||"@list"in e)&&(Object.keys(e).length>1||!("@id"in e)),i.isSubjectReference=e=>n.isObject(e)&&1===Object.keys(e).length&&"@id"in e,i.isValue=e=>n.isObject(e)&&"@value"in e,i.isList=e=>n.isObject(e)&&"@list"in e,i.isGraph=e=>n.isObject(e)&&"@graph"in e&&1===Object.keys(e).filter((e=>"@id"!==e&&"@index"!==e)).length,i.isSimpleGraph=e=>i.isGraph(e)&&!("@id"in e),i.isBlankNode=e=>{if(n.isObject(e)){if("@id"in e){const t=e["@id"];return!n.isString(t)||0===t.indexOf("_:")}return 0===Object.keys(e).length||!("@value"in e||"@set"in e||"@list"in e)}return!1}},4841:(e,t,r)=>{const n=r(989),i=r(701),o=r(9263),a=r(7034),s=o.IdentifierIssuer,l=r(2207),d=r(9749),c=r(8229),{expand:u}=r(4019),{flatten:h}=r(5229),{fromRDF:p}=r(3947),{toRDF:f}=r(9180),{frameMergedOrDefault:g,cleanupNull:m}=r(7946),{isArray:v,isObject:b,isString:y}=r(7382),{isSubjectReference:x}=r(3978),{expandIri:w,getInitialContext:_,process:S,processingMode:E}=r(1972),{compact:I,compactIri:T}=r(1058),{createNodeMap:k,createMergedNodeMap:j,mergeNodeMaps:A}=r(9233),{logEventHandler:C,logWarningEventHandler:N,safeEventHandler:R,setDefaultEventHandler:O,setupEventHandler:L,strictEventHandler:$,unhandledEventHandler:D}=r(2246),P=function(e){const t={},P=new d({max:100});function M(t,{documentLoader:r=e.documentLoader,...n}){if(t&&"compactionMap"in t)throw new l('"compactionMap" not supported.',"jsonld.OptionsError");if(t&&"expansionMap"in t)throw new l('"expansionMap" not supported.',"jsonld.OptionsError");return Object.assign({},{documentLoader:r},n,t,{eventHandler:L({options:t})})}return e.compact=async function(t,r,n){if(arguments.length<2)throw new TypeError("Could not compact, too few arguments.");if(null===r)throw new l("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"});if(null===t)return null;let i;(n=M(n,{base:y(t)?t:"",compactArrays:!0,compactToRelative:!0,graph:!1,skipExpansion:!1,link:!1,issuer:new s("_:b"),contextResolver:new a({sharedCache:P})})).link&&(n.skipExpansion=!0),n.compactToRelative||delete n.base,i=n.skipExpansion?t:await e.expand(t,n);const d=await e.processContext(_(n),r,n);let c=await I({activeCtx:d,element:i,options:n});n.compactArrays&&!n.graph&&v(c)?1===c.length?c=c[0]:0===c.length&&(c={}):n.graph&&b(c)&&(c=[c]),b(r)&&"@context"in r&&(r=r["@context"]),r=o.clone(r),v(r)||(r=[r]);const u=r;r=[];for(let e=0;e<u.length;++e)(!b(u[e])||Object.keys(u[e]).length>0)&&r.push(u[e]);const h=r.length>0;if(1===r.length&&(r=r[0]),v(c)){const e=T({activeCtx:d,iri:"@graph",relativeTo:{vocab:!0}}),t=c;c={},h&&(c["@context"]=r),c[e]=t}else if(b(c)&&h){const e=c;c={"@context":r};for(const t in e)c[t]=e[t]}return c},e.expand=async function(t,r){if(arguments.length<1)throw new TypeError("Could not expand, too few arguments.");const n={},i=[];if("expandContext"in(r=M(r,{keepFreeFloatingNodes:!1,contextResolver:new a({sharedCache:P})}))){const e=o.clone(r.expandContext);b(e)&&"@context"in e?n.expandContext=e:n.expandContext={"@context":e},i.push(n.expandContext)}let s;if(y(t)){const o=await e.get(t,r);s=o.documentUrl,n.input=o.document,o.contextUrl&&(n.remoteContext={"@context":o.contextUrl},i.push(n.remoteContext))}else n.input=o.clone(t);"base"in r||(r.base=s||"");let l=_(r);for(const e of i)l=await S({activeCtx:l,localCtx:e,options:r});let d=await u({activeCtx:l,element:n.input,options:r});return b(d)&&"@graph"in d&&1===Object.keys(d).length?d=d["@graph"]:null===d&&(d=[]),v(d)||(d=[d]),d},e.flatten=async function(t,r,n){if(arguments.length<1)return new TypeError("Could not flatten, too few arguments.");r="function"==typeof r?null:r||null,n=M(n,{base:y(t)?t:"",contextResolver:new a({sharedCache:P})});const i=await e.expand(t,n),o=h(i);return null===r?o:(n.graph=!0,n.skipExpansion=!0,await e.compact(o,r,n))},e.frame=async function(t,r,n){if(arguments.length<2)throw new TypeError("Could not frame, too few arguments.");if(n=M(n,{base:y(t)?t:"",embed:"@once",explicit:!1,requireAll:!1,omitDefault:!1,bnodesToClear:[],contextResolver:new a({sharedCache:P})}),y(r)){const t=await e.get(r,n);if(r=t.document,t.contextUrl){let e=r["@context"];e?v(e)?e.push(t.contextUrl):e=[e,t.contextUrl]:e=t.contextUrl,r["@context"]=e}}const i=r&&r["@context"]||{},o=await e.processContext(_(n),i,n);n.hasOwnProperty("omitGraph")||(n.omitGraph=E(o,1.1)),n.hasOwnProperty("pruneBlankNodeIdentifiers")||(n.pruneBlankNodeIdentifiers=E(o,1.1));const s=await e.expand(t,n),l={...n};l.isFrame=!0,l.keepFreeFloatingNodes=!0;const d=await e.expand(r,l),c=Object.keys(r).map((e=>w(o,e,{vocab:!0})));l.merged=!c.includes("@graph"),l.is11=E(o,1.1);const u=g(s,d,l);l.graph=!n.omitGraph,l.skipExpansion=!0,l.link={},l.framing=!0;let h=await e.compact(u,i,l);return l.link={},h=m(h,l),h},e.link=async function(t,r,n){const i={};return r&&(i["@context"]=r),i["@embed"]="@link",e.frame(t,i,n)},e.normalize=e.canonize=async function(t,r){if(arguments.length<1)throw new TypeError("Could not canonize, too few arguments.");if("inputFormat"in(r=M(r,{base:y(t)?t:null,algorithm:"URDNA2015",skipExpansion:!1,safe:!0,contextResolver:new a({sharedCache:P})}))){if("application/n-quads"!==r.inputFormat&&"application/nquads"!==r.inputFormat)throw new l("Unknown canonicalization input format.","jsonld.CanonizeError");const e=c.parse(t);return n.canonize(e,r)}const i={...r};delete i.format,i.produceGeneralizedRdf=!1;const o=await e.toRDF(t,i);return n.canonize(o,r)},e.fromRDF=async function(e,r){if(arguments.length<1)throw new TypeError("Could not convert from RDF, too few arguments.");r=M(r,{format:y(e)?"application/n-quads":void 0});const{format:n}=r;let{rdfParser:i}=r;if(n){if(i=i||t[n],!i)throw new l("Unknown input format.","jsonld.UnknownFormat",{format:n})}else i=()=>e;const o=await i(e);return p(o,r)},e.toRDF=async function(t,r){if(arguments.length<1)throw new TypeError("Could not convert to RDF, too few arguments.");let n;n=(r=M(r,{base:y(t)?t:"",skipExpansion:!1,contextResolver:new a({sharedCache:P})})).skipExpansion?t:await e.expand(t,r);const i=f(n,r);if(r.format){if("application/n-quads"===r.format||"application/nquads"===r.format)return c.serialize(i);throw new l("Unknown output format.","jsonld.UnknownFormat",{format:r.format})}return i},e.createNodeMap=async function(t,r){if(arguments.length<1)throw new TypeError("Could not create node map, too few arguments.");r=M(r,{base:y(t)?t:"",contextResolver:new a({sharedCache:P})});const n=await e.expand(t,r);return j(n,r)},e.merge=async function(t,r,n){if(arguments.length<1)throw new TypeError("Could not merge, too few arguments.");if(!v(t))throw new TypeError('Could not merge, "docs" must be an array.');r="function"==typeof r?null:r||null,n=M(n,{contextResolver:new a({sharedCache:P})});const i=await Promise.all(t.map((t=>{const r={...n};return e.expand(t,r)})));let l=!0;"mergeNodes"in n&&(l=n.mergeNodes);const d=n.issuer||new s("_:b"),c={"@default":{}};for(let e=0;e<i.length;++e){const t=o.relabelBlankNodes(i[e],{issuer:new s("_:b"+e+"-")}),r=l||0===e?c:{"@default":{}};if(k(t,r,"@default",d),r!==c)for(const e in r){const t=r[e];if(!(e in c)){c[e]=t;continue}const n=c[e];for(const e in t)e in n||(n[e]=t[e])}}const u=A(c),h=[],p=Object.keys(u).sort();for(let e=0;e<p.length;++e){const t=u[p[e]];x(t)||h.push(t)}return null===r?h:(n.graph=!0,n.skipExpansion=!0,await e.compact(h,r,n))},Object.defineProperty(e,"documentLoader",{get:()=>e._documentLoader,set:t=>e._documentLoader=t}),e.documentLoader=async e=>{throw new l("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:e})},e.get=async function(t,r){let n;n="function"==typeof r.documentLoader?r.documentLoader:e.documentLoader;const i=await n(t);try{if(!i.document)throw new l("No remote document found at the given URL.","jsonld.NullRemoteDocument");y(i.document)&&(i.document=JSON.parse(i.document))}catch(e){throw new l("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:e,remoteDoc:i})}return i},e.processContext=async function(e,t,r){return r=M(r,{base:"",contextResolver:new a({sharedCache:P})}),null===t?_(r):(t=o.clone(t),b(t)&&"@context"in t||(t={"@context":t}),S({activeCtx:e,localCtx:t,options:r}))},e.getContextValue=r(1972).getContextValue,e.documentLoaders={},e.useDocumentLoader=function(t){if(!(t in e.documentLoaders))throw new l('Unknown document loader type: "'+t+'"',"jsonld.UnknownDocumentLoader",{type:t});e.documentLoader=e.documentLoaders[t].apply(e,Array.prototype.slice.call(arguments,1))},e.registerRDFParser=function(e,r){t[e]=r},e.unregisterRDFParser=function(e){delete t[e]},e.registerRDFParser("application/n-quads",c.parse),e.registerRDFParser("application/nquads",c.parse),e.url=r(470),e.logEventHandler=C,e.logWarningEventHandler=N,e.safeEventHandler=R,e.setDefaultEventHandler=O,e.strictEventHandler=$,e.unhandledEventHandler=D,e.util=o,Object.assign(e,o),e.promises=e,e.RequestQueue=r(3743),e.JsonLdProcessor=r(5445)(e),i.setupGlobals(e),i.setupDocumentLoaders(e),e},M=function(){return P((function(){return M()}))};P(M),e.exports=M},9233:(e,t,r)=>{const{isKeyword:n}=r(1972),i=r(3978),o=r(7382),a=r(9263),s=r(2207),l={};e.exports=l,l.createMergedNodeMap=(e,t)=>{const r=(t=t||{}).issuer||new a.IdentifierIssuer("_:b"),n={"@default":{}};return l.createNodeMap(e,n,"@default",r),l.mergeNodeMaps(n)},l.createNodeMap=(e,t,r,d,c,u)=>{if(o.isArray(e)){for(const n of e)l.createNodeMap(n,t,r,d,void 0,u);return}if(!o.isObject(e))return void(u&&u.push(e));if(i.isValue(e)){if("@type"in e){let t=e["@type"];0===t.indexOf("_:")&&(e["@type"]=t=d.getId(t))}return void(u&&u.push(e))}if(u&&i.isList(e)){const n=[];return l.createNodeMap(e["@list"],t,r,d,c,n),void u.push({"@list":n})}if("@type"in e){const t=e["@type"];for(const e of t)0===e.indexOf("_:")&&d.getId(e)}o.isUndefined(c)&&(c=i.isBlankNode(e)?d.getId(e["@id"]):e["@id"]),u&&u.push({"@id":c});const h=t[r],p=h[c]=h[c]||{};p["@id"]=c;const f=Object.keys(e).sort();for(let o of f){if("@id"===o)continue;if("@reverse"===o){const n={"@id":c},o=e["@reverse"];for(const e in o){const s=o[e];for(const o of s){let s=o["@id"];i.isBlankNode(o)&&(s=d.getId(s)),l.createNodeMap(o,t,r,d,s),a.addValue(h[s],e,n,{propertyIsArray:!0,allowDuplicate:!1})}}continue}if("@graph"===o){c in t||(t[c]={}),l.createNodeMap(e[o],t,c,d);continue}if("@included"===o){l.createNodeMap(e[o],t,r,d);continue}if("@type"!==o&&n(o)){if("@index"===o&&o in p&&(e[o]!==p[o]||e[o]["@id"]!==p[o]["@id"]))throw new s("Invalid JSON-LD syntax; conflicting @index property detected.","jsonld.SyntaxError",{code:"conflicting indexes",subject:p});p[o]=e[o];continue}const u=e[o];if(0===o.indexOf("_:")&&(o=d.getId(o)),0!==u.length)for(let e of u)if("@type"===o&&(e=0===e.indexOf("_:")?d.getId(e):e),i.isSubject(e)||i.isSubjectReference(e)){if("@id"in e&&!e["@id"])continue;const n=i.isBlankNode(e)?d.getId(e["@id"]):e["@id"];a.addValue(p,o,{"@id":n},{propertyIsArray:!0,allowDuplicate:!1}),l.createNodeMap(e,t,r,d,n)}else if(i.isValue(e))a.addValue(p,o,e,{propertyIsArray:!0,allowDuplicate:!1});else if(i.isList(e)){const n=[];l.createNodeMap(e["@list"],t,r,d,c,n),e={"@list":n},a.addValue(p,o,e,{propertyIsArray:!0,allowDuplicate:!1})}else l.createNodeMap(e,t,r,d,c),a.addValue(p,o,e,{propertyIsArray:!0,allowDuplicate:!1});else a.addValue(p,o,[],{propertyIsArray:!0})}},l.mergeNodeMapGraphs=e=>{const t={};for(const r of Object.keys(e).sort())for(const i of Object.keys(e[r]).sort()){const o=e[r][i];i in t||(t[i]={"@id":i});const s=t[i];for(const e of Object.keys(o).sort())if(n(e)&&"@type"!==e)s[e]=a.clone(o[e]);else for(const t of o[e])a.addValue(s,e,a.clone(t),{propertyIsArray:!0,allowDuplicate:!1})}return t},l.mergeNodeMaps=e=>{const t=e["@default"],r=Object.keys(e).sort();for(const n of r){if("@default"===n)continue;const r=e[n];let o=t[n];o?"@graph"in o||(o["@graph"]=[]):t[n]=o={"@id":n,"@graph":[]};const a=o["@graph"];for(const e of Object.keys(r).sort()){const t=r[e];i.isSubjectReference(t)||a.push(t)}}return t}},701:(e,t,r)=>{const n=r(6957),i={};e.exports=i,i.setupDocumentLoaders=function(e){"undefined"!=typeof XMLHttpRequest&&(e.documentLoaders.xhr=n,e.useDocumentLoader("xhr"))},i.setupGlobals=function(e){void 0===globalThis.JsonLdProcessor&&Object.defineProperty(globalThis,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:e.JsonLdProcessor})}},9180:(e,t,r)=>{const{createNodeMap:n}=r(9233),{isKeyword:i}=r(1972),o=r(3978),a=r(2341),s=r(2207),l=r(7382),d=r(9263),{handleEvent:c}=r(2246),{RDF_FIRST:u,RDF_REST:h,RDF_NIL:p,RDF_TYPE:f,RDF_JSON_LITERAL:g,RDF_LANGSTRING:m,XSD_BOOLEAN:v,XSD_DOUBLE:b,XSD_INTEGER:y,XSD_STRING:x}=r(9378),{isAbsolute:w}=r(470),_={};function S(e,t,r,n,o){const a=Object.keys(t).sort();for(const s of a){const a=t[s],l=Object.keys(a).sort();for(let t of l){const l=a[t];if("@type"===t)t=f;else if(i(t))continue;for(const i of l){const a={termType:s.startsWith("_:")?"BlankNode":"NamedNode",value:s};if(!w(s)){o.eventHandler&&c({event:{type:["JsonLdEvent"],code:"relative subject reference",level:"warning",message:"Relative subject reference found.",details:{subject:s}},options:o});continue}const l={termType:t.startsWith("_:")?"BlankNode":"NamedNode",value:t};if(!w(t)){o.eventHandler&&c({event:{type:["JsonLdEvent"],code:"relative predicate reference",level:"warning",message:"Relative predicate reference found.",details:{predicate:t}},options:o});continue}if("BlankNode"===l.termType&&!o.produceGeneralizedRdf){o.eventHandler&&c({event:{type:["JsonLdEvent"],code:"blank node predicate",level:"warning",message:"Dropping blank node predicate.",details:{property:n.getOldIds().find((e=>n.getId(e)===t))}},options:o});continue}const d=E(i,n,e,r,o.rdfDirection,o);d&&e.push({subject:a,predicate:l,object:d,graph:r})}}}}function E(e,t,r,n,i,d){const f={};if(o.isValue(e)){f.termType="Literal",f.value=void 0,f.datatype={termType:"NamedNode"};let t=e["@value"];const r=e["@type"]||null;if("@json"===r)f.value=a(t),f.datatype.value=g;else if(l.isBoolean(t))f.value=t.toString(),f.datatype.value=r||v;else if(l.isDouble(t)||r===b)l.isDouble(t)||(t=parseFloat(t)),f.value=t.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),f.datatype.value=r||b;else if(l.isNumber(t))f.value=t.toFixed(0),f.datatype.value=r||y;else if("@direction"in e&&"i18n-datatype"===i){const r=`https://www.w3.org/ns/i18n#${(e["@language"]||"").toLowerCase()}_${e["@direction"]}`;f.datatype.value=r,f.value=t}else{if("@direction"in e&&"compound-literal"===i)throw new s("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:i});if("@direction"in e&&i)throw new s("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:i});"@language"in e?("@direction"in e&&!i&&d.eventHandler&&c({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:f.value}},options:d}),f.value=t,f.datatype.value=r||m,f.language=e["@language"]):("@direction"in e&&!i&&d.eventHandler&&c({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:f.value}},options:d}),f.value=t,f.datatype.value=r||x)}}else if(o.isList(e)){const o=function(e,t,r,n,i,o){const a={termType:"NamedNode",value:u},s={termType:"NamedNode",value:h},l={termType:"NamedNode",value:p},d=e.pop(),c=d?{termType:"BlankNode",value:t.getId()}:l;let f=c;for(const l of e){const e=E(l,t,r,n,i,o),d={termType:"BlankNode",value:t.getId()};r.push({subject:f,predicate:a,object:e,graph:n}),r.push({subject:f,predicate:s,object:d,graph:n}),f=d}if(d){const e=E(d,t,r,n,i,o);r.push({subject:f,predicate:a,object:e,graph:n}),r.push({subject:f,predicate:s,object:l,graph:n})}return c}(e["@list"],t,r,n,i,d);f.termType=o.termType,f.value=o.value}else{const t=l.isObject(e)?e["@id"]:e;f.termType=t.startsWith("_:")?"BlankNode":"NamedNode",f.value=t}return"NamedNode"!==f.termType||w(f.value)?f:(d.eventHandler&&c({event:{type:["JsonLdEvent"],code:"relative object reference",level:"warning",message:"Relative object reference found.",details:{object:f.value}},options:d}),null)}e.exports=_,_.toRDF=(e,t)=>{const r=new d.IdentifierIssuer("_:b"),i={"@default":{}};n(e,i,"@default",r);const o=[],a=Object.keys(i).sort();for(const e of a){let n;if("@default"===e)n={termType:"DefaultGraph",value:""};else{if(!w(e)){t.eventHandler&&c({event:{type:["JsonLdEvent"],code:"relative graph reference",level:"warning",message:"Relative graph reference found.",details:{graph:e}},options:t});continue}n=e.startsWith("_:")?{termType:"BlankNode"}:{termType:"NamedNode"},n.value=e}S(o,i[e],n,r,t)}return o}},7382:e=>{const t={};e.exports=t,t.isArray=Array.isArray,t.isBoolean=e=>"boolean"==typeof e||"[object Boolean]"===Object.prototype.toString.call(e),t.isDouble=e=>t.isNumber(e)&&(-1!==String(e).indexOf(".")||Math.abs(e)>=1e21),t.isEmptyObject=e=>t.isObject(e)&&0===Object.keys(e).length,t.isNumber=e=>"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e),t.isNumeric=e=>!isNaN(parseFloat(e))&&isFinite(e),t.isObject=e=>"[object Object]"===Object.prototype.toString.call(e),t.isString=e=>"string"==typeof e||"[object String]"===Object.prototype.toString.call(e),t.isUndefined=e=>void 0===e},470:(e,t,r)=>{const n=r(7382),i={};e.exports=i,i.parsers={simple:{keys:["href","scheme","authority","path","query","fragment"],regex:/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/},full:{keys:["href","protocol","scheme","authority","auth","user","password","hostname","port","path","directory","file","query","fragment"],regex:/^(([a-zA-Z][a-zA-Z0-9+-.]*):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(?:(((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/}},i.parse=(e,t)=>{const r={},n=i.parsers[t||"full"],o=n.regex.exec(e);let a=n.keys.length;for(;a--;)r[n.keys[a]]=void 0===o[a]?null:o[a];return("https"===r.scheme&&"443"===r.port||"http"===r.scheme&&"80"===r.port)&&(r.href=r.href.replace(":"+r.port,""),r.authority=r.authority.replace(":"+r.port,""),r.port=null),r.normalizedPath=i.removeDotSegments(r.path),r},i.prependBase=(e,t)=>{if(null===e)return t;if(i.isAbsolute(t))return t;e&&!n.isString(e)||(e=i.parse(e||""));const r=i.parse(t),o={protocol:e.protocol||""};if(null!==r.authority)o.authority=r.authority,o.path=r.path,o.query=r.query;else if(o.authority=e.authority,""===r.path)o.path=e.path,null!==r.query?o.query=r.query:o.query=e.query;else{if(0===r.path.indexOf("/"))o.path=r.path;else{let t=e.path;t=t.substr(0,t.lastIndexOf("/")+1),(t.length>0||e.authority)&&"/"!==t.substr(-1)&&(t+="/"),t+=r.path,o.path=t}o.query=r.query}""!==r.path&&(o.path=i.removeDotSegments(o.path));let a=o.protocol;return null!==o.authority&&(a+="//"+o.authority),a+=o.path,null!==o.query&&(a+="?"+o.query),null!==r.fragment&&(a+="#"+r.fragment),""===a&&(a="./"),a},i.removeBase=(e,t)=>{if(null===e)return t;e&&!n.isString(e)||(e=i.parse(e||""));let r="";if(""!==e.href?r+=(e.protocol||"")+"//"+(e.authority||""):t.indexOf("//")&&(r+="//"),0!==t.indexOf(r))return t;const o=i.parse(t.substr(r.length)),a=e.normalizedPath.split("/"),s=o.normalizedPath.split("/"),l=o.fragment||o.query?0:1;for(;a.length>0&&s.length>l&&a[0]===s[0];)a.shift(),s.shift();let d="";if(a.length>0){a.pop();for(let e=0;e<a.length;++e)d+="../"}return d+=s.join("/"),null!==o.query&&(d+="?"+o.query),null!==o.fragment&&(d+="#"+o.fragment),""===d&&(d="./"),d},i.removeDotSegments=e=>{if(0===e.length)return"";const t=e.split("/"),r=[];for(;t.length>0;){const e=t.shift(),n=0===t.length;"."!==e?".."!==e?r.push(e):(r.pop(),n&&r.push("")):n&&r.push("")}return"/"===e[0]&&r.length>0&&""!==r[0]&&r.unshift(""),1===r.length&&""===r[0]?"/":r.join("/")};const o=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;i.isAbsolute=e=>n.isString(e)&&o.test(e),i.isRelative=e=>n.isString(e)},9263:(e,t,r)=>{const n=r(3978),i=r(7382),o=r(989).IdentifierIssuer,a=r(2207),s=/(?:<[^>]*?>|"[^"]*?"|[^,])+/g,l=/\s*<([^>]*?)>\s*(?:;\s*(.*))?/,d=/(.*?)=(?:(?:"([^"]*?)")|([^"]*?))\s*(?:(?:;\s*)|$)/g,c="application/ld+json, application/json",u={};function h(e,t){if(i.isArray(t))for(let r=0;r<t.length;++r)t[r]=h(e,t[r]);else if(n.isList(t))t["@list"]=h(e,t["@list"]);else if(i.isObject(t)){n.isBlankNode(t)&&(t["@id"]=e.getId(t["@id"]));const r=Object.keys(t).sort();for(let n=0;n<r.length;++n){const i=r[n];"@id"!==i&&(t[i]=h(e,t[i]))}}return t}e.exports=u,u.IdentifierIssuer=o,u.REGEX_BCP47=/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/,u.REGEX_KEYWORD=/^@[a-zA-Z]+$/,u.clone=function(e){if(e&&"object"==typeof e){let t;if(i.isArray(e)){t=[];for(let r=0;r<e.length;++r)t[r]=u.clone(e[r])}else if(e instanceof Map){t=new Map;for(const[r,n]of e)t.set(r,u.clone(n))}else if(e instanceof Set){t=new Set;for(const r of e)t.add(u.clone(r))}else if(i.isObject(e)){t={};for(const r in e)t[r]=u.clone(e[r])}else t=e.toString();return t}return e},u.asArray=function(e){return Array.isArray(e)?e:[e]},u.buildHeaders=(e={})=>{const t=Object.keys(e).some((e=>"accept"===e.toLowerCase()));if(t)throw new RangeError('Accept header may not be specified; only "'+c+'" is supported.');return Object.assign({Accept:c},e)},u.parseLinkHeader=e=>{const t={},r=e.match(s);for(let e=0;e<r.length;++e){let n=r[e].match(l);if(!n)continue;const i={target:n[1]},o=n[2];for(;n=d.exec(o);)i[n[1]]=void 0===n[2]?n[3]:n[2];const a=i.rel||"";Array.isArray(t[a])?t[a].push(i):t.hasOwnProperty(a)?t[a]=[t[a],i]:t[a]=i}return t},u.validateTypeValue=(e,t)=>{if(!(i.isString(e)||i.isArray(e)&&e.every((e=>i.isString(e))))){if(t&&i.isObject(e))switch(Object.keys(e).length){case 0:return;case 1:if("@default"in e&&u.asArray(e["@default"]).every((e=>i.isString(e))))return}throw new a('Invalid JSON-LD syntax; "@type" value must a string, an array of strings, an empty object, or a default object.',"jsonld.SyntaxError",{code:"invalid type value",value:e})}},u.hasProperty=(e,t)=>{if(e.hasOwnProperty(t)){const r=e[t];return!i.isArray(r)||r.length>0}return!1},u.hasValue=(e,t,r)=>{if(u.hasProperty(e,t)){let o=e[t];const a=n.isList(o);if(i.isArray(o)||a){a&&(o=o["@list"]);for(let e=0;e<o.length;++e)if(u.compareValues(r,o[e]))return!0}else if(!i.isArray(r))return u.compareValues(r,o)}return!1},u.addValue=(e,t,r,n)=>{if("propertyIsArray"in(n=n||{})||(n.propertyIsArray=!1),"valueIsArray"in n||(n.valueIsArray=!1),"allowDuplicate"in n||(n.allowDuplicate=!0),"prependValue"in n||(n.prependValue=!1),n.valueIsArray)e[t]=r;else if(i.isArray(r)){0===r.length&&n.propertyIsArray&&!e.hasOwnProperty(t)&&(e[t]=[]),n.prependValue&&(r=r.concat(e[t]),e[t]=[]);for(let i=0;i<r.length;++i)u.addValue(e,t,r[i],n)}else if(e.hasOwnProperty(t)){const o=!n.allowDuplicate&&u.hasValue(e,t,r);i.isArray(e[t])||o&&!n.propertyIsArray||(e[t]=[e[t]]),o||(n.prependValue?e[t].unshift(r):e[t].push(r))}else e[t]=n.propertyIsArray?[r]:r},u.getValues=(e,t)=>[].concat(e[t]||[]),u.removeProperty=(e,t)=>{delete e[t]},u.removeValue=(e,t,r,n)=>{"propertyIsArray"in(n=n||{})||(n.propertyIsArray=!1);const i=u.getValues(e,t).filter((e=>!u.compareValues(e,r)));0===i.length?u.removeProperty(e,t):1!==i.length||n.propertyIsArray?e[t]=i:e[t]=i[0]},u.relabelBlankNodes=(e,t)=>h((t=t||{}).issuer||new o("_:b"),e),u.compareValues=(e,t)=>e===t||!(!n.isValue(e)||!n.isValue(t)||e["@value"]!==t["@value"]||e["@type"]!==t["@type"]||e["@language"]!==t["@language"]||e["@index"]!==t["@index"])||!!(i.isObject(e)&&"@id"in e&&i.isObject(t)&&"@id"in t)&&e["@id"]===t["@id"],u.compareShortestLeast=(e,t)=>e.length<t.length?-1:t.length<e.length?1:e===t?0:e<t?-1:1},1873:(e,t,r)=>{var n=r(9325).Symbol;e.exports=n},2552:(e,t,r)=>{var n=r(1873),i=r(659),o=r(9350),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},4128:(e,t,r)=>{var n=r(1800),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},4840:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},659:(e,t,r)=>{var n=r(1873),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var i=a.call(e);return n&&(t?e[s]=r:delete e[s]),i}},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9325:(e,t,r)=>{var n=r(4840),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},1800:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},2177:(e,t,r)=>{var n=r(1489);e.exports=function(e,t){var r;if("function"!=typeof t)throw new TypeError("Expected a function");return e=n(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},4394:(e,t,r)=>{var n=r(2552),i=r(346);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},8059:(e,t,r)=>{var n=r(2177);e.exports=function(e){return n(2,e)}},7400:(e,t,r)=>{var n=r(9374),i=1/0;e.exports=function(e){return e?(e=n(e))===i||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},1489:(e,t,r)=>{var n=r(7400);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},9374:(e,t,r)=>{var n=r(4128),i=r(3805),o=r(4394),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=s.test(e);return r||l.test(e)?d(e.slice(2),r?2:8):a.test(e)?NaN:+e}},9749:(e,t,r)=>{const n=r(8799),i=Symbol("max"),o=Symbol("length"),a=Symbol("lengthCalculator"),s=Symbol("allowStale"),l=Symbol("maxAge"),d=Symbol("dispose"),c=Symbol("noDisposeOnSet"),u=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),f=()=>1,g=(e,t,r)=>{const n=e[h].get(t);if(n){const t=n.value;if(m(e,t)){if(b(e,n),!e[s])return}else r&&(e[p]&&(n.value.now=Date.now()),e[u].unshiftNode(n));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[l]&&r>e[l]},v=e=>{if(e[o]>e[i])for(let t=e[u].tail;e[o]>e[i]&&null!==t;){const r=t.prev;b(e,t),t=r}},b=(e,t)=>{if(t){const r=t.value;e[d]&&e[d](r.key,r.value),e[o]-=r.length,e[h].delete(r.key),e[u].removeNode(t)}};class y{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const x=(e,t,r,n)=>{let i=r.value;m(e,i)&&(b(e,r),e[s]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||f;if(this[a]="function"!=typeof t?f:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[d]=e.dispose,this[c]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,v(this)}get max(){return this[i]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,v(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[a]&&(this[a]=e,this[o]=0,this[u].forEach((e=>{e.length=this[a](e.value,e.key),this[o]+=e.length}))),v(this)}get lengthCalculator(){return this[a]}get length(){return this[o]}get itemCount(){return this[u].length}rforEach(e,t){t=t||this;for(let r=this[u].tail;null!==r;){const n=r.prev;x(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[u].head;null!==r;){const n=r.next;x(this,e,r,t),r=n}}keys(){return this[u].toArray().map((e=>e.key))}values(){return this[u].toArray().map((e=>e.value))}reset(){this[d]&&this[u]&&this[u].length&&this[u].forEach((e=>this[d](e.key,e.value))),this[h]=new Map,this[u]=new n,this[o]=0}dump(){return this[u].map((e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[u]}set(e,t,r){if((r=r||this[l])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,s=this[a](t,e);if(this[h].has(e)){if(s>this[i])return b(this,this[h].get(e)),!1;const a=this[h].get(e).value;return this[d]&&(this[c]||this[d](e,a.value)),a.now=n,a.maxAge=r,a.value=t,this[o]+=s-a.length,a.length=s,this.get(e),v(this),!0}const p=new y(e,t,s,n,r);return p.length>this[i]?(this[d]&&this[d](e,t),!1):(this[o]+=p.length,this[u].unshift(p),this[h].set(e,this[u].head),v(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!m(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[u].tail;return e?(b(this,e),e.value):null}del(e){b(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[h].forEach(((e,t)=>g(this,t,!1)))}}},5606:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var s,l=[],d=!1,c=-1;function u(){d&&s&&(d=!1,s.length?l=s.concat(l):c=-1,l.length&&h())}function h(){if(!d){var e=a(u);d=!0;for(var t=l.length;t;){for(s=l,l=[];++c<t;)s&&s[c].run();c=-1,t=l.length}s=null,d=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function f(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new p(e,t)),1!==l.length||d||a(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=f,n.addListener=f,n.once=f,n.off=f,n.removeListener=f,n.removeAllListeners=f,n.emit=f,n.prependListener=f,n.prependOnceListener=f,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},9596:(e,t,r)=>{let n;e.exports="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:r.g):e=>(n||(n=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)))},989:(e,t,r)=>{e.exports=r(4005)},2985:e=>{e.exports=class e{constructor(e,t=new Map,r=0){this.prefix=e,this._existing=t,this.counter=r}clone(){const{prefix:t,_existing:r,counter:n}=this;return new e(t,new Map(r),n)}getId(e){const t=e&&this._existing.get(e);if(t)return t;const r=this.prefix+this.counter;return this.counter++,e&&this._existing.set(e,r),r}hasId(e){return this._existing.has(e)}getOldIds(){return[...this._existing.keys()]}}},3751:(e,t,r)=>{r(2791);const n=self.crypto||self.msCrypto;e.exports=class{constructor(e){if(!n||!n.subtle)throw new Error("crypto.subtle not found.");if("sha256"===e)this.algorithm={name:"SHA-256"};else{if("sha1"!==e)throw new Error(`Unsupported algorithm "${e}".`);this.algorithm={name:"SHA-1"}}this._content=""}update(e){this._content+=e}async digest(){const e=(new TextEncoder).encode(this._content),t=new Uint8Array(await n.subtle.digest(this.algorithm,e));let r="";for(let e=0;e<t.length;++e)r+=t[e].toString(16).padStart(2,"0");return r}}},1227:e=>{const t="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",r="http://www.w3.org/2001/XMLSchema#string",n="NamedNode",i="BlankNode",o="Literal",a="DefaultGraph",s={};(()=>{const e="(?:<([^:]+:[^>]*)>)",t="A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_",r=t+"0-9-·̀-ͯ‿-⁀",n="(_:(?:["+t+"0-9])(?:(?:["+r+".])*(?:["+r+"]))?)",i="[ \\t]+",o="[ \\t]*",a="(?:"+e+"|"+n+")"+i,l=e+i,d="(?:"+e+"|"+n+'|(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"(?:(?:\\^\\^'+e+")|(?:@([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)))?))"+o,c="(?:\\.|(?:(?:"+e+"|"+n+")"+o+"\\.))";s.eoln=/(?:\r\n)|(?:\n)|(?:\r)/g,s.empty=new RegExp("^"+o+"$"),s.quad=new RegExp("^"+o+a+l+d+c+o+"$")})(),e.exports=class e{static parse(e){const l=[],d={},u=e.split(s.eoln);let h=0;for(const e of u){if(h++,s.empty.test(e))continue;const u=e.match(s.quad);if(null===u)throw new Error("N-Quads parse error on line "+h+".");const g={subject:null,predicate:null,object:null,graph:null};if(void 0!==u[1]?g.subject={termType:n,value:u[1]}:g.subject={termType:i,value:u[2]},g.predicate={termType:n,value:u[3]},void 0!==u[4]?g.object={termType:n,value:u[4]}:void 0!==u[5]?g.object={termType:i,value:u[5]}:(g.object={termType:o,value:void 0,datatype:{termType:n}},void 0!==u[7]?g.object.datatype.value=u[7]:void 0!==u[8]?(g.object.datatype.value=t,g.object.language=u[8]):g.object.datatype.value=r,g.object.value=c(u[6])),void 0!==u[9]?g.graph={termType:n,value:u[9]}:void 0!==u[10]?g.graph={termType:i,value:u[10]}:g.graph={termType:a,value:""},g.graph.value in d){let e=!0;const t=d[g.graph.value];for(const r of t)if(f=g,(p=r).subject.termType===f.subject.termType&&p.object.termType===f.object.termType&&p.subject.value===f.subject.value&&p.predicate.value===f.predicate.value&&p.object.value===f.object.value&&(p.object.termType!==o||p.object.datatype.termType===f.object.datatype.termType&&p.object.language===f.object.language&&p.object.datatype.value===f.object.datatype.value)){e=!1;break}e&&(t.push(g),l.push(g))}else d[g.graph.value]=[g],l.push(g)}var p,f;return l}static serialize(t){Array.isArray(t)||(t=e.legacyDatasetToQuads(t));const r=[];for(const n of t)r.push(e.serializeQuad(n));return r.sort().join("")}static serializeQuadComponents(e,o,a,s){let d="";return e.termType===n?d+=`<${e.value}>`:d+=`${e.value}`,d+=` <${o.value}> `,a.termType===n?d+=`<${a.value}>`:a.termType===i?d+=a.value:(d+=`"${function(e){return e.replace(l,(function(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r"}}))}(a.value)}"`,a.datatype.value===t?a.language&&(d+=`@${a.language}`):a.datatype.value!==r&&(d+=`^^<${a.datatype.value}>`)),s.termType===n?d+=` <${s.value}>`:s.termType===i&&(d+=` ${s.value}`),d+=" .\n",d}static serializeQuad(t){return e.serializeQuadComponents(t.subject,t.predicate,t.object,t.graph)}static legacyDatasetToQuads(e){const s=[],l={"blank node":i,IRI:n,literal:o};for(const d in e)e[d].forEach((e=>{const c={};for(const i in e){const a=e[i],s={termType:l[a.type],value:a.value};s.termType===o&&(s.datatype={termType:n},"datatype"in a&&(s.datatype.value=a.datatype),"language"in a?("datatype"in a||(s.datatype.value=t),s.language=a.language):"datatype"in a||(s.datatype.value=r)),c[i]=s}c.graph="@default"===d?{termType:a,value:""}:{termType:d.startsWith("_:")?i:n,value:d},s.push(c)}));return s}};const l=/["\\\n\r]/g,d=/(?:\\([tbnrf"'\\]))|(?:\\u([0-9A-Fa-f]{4}))|(?:\\U([0-9A-Fa-f]{8}))/g;function c(e){return e.replace(d,(function(e,t,r,n){if(t)switch(t){case"t":return"\t";case"b":return"\b";case"n":return"\n";case"r":return"\r";case"f":return"\f";case'"':return'"';case"'":return"'";case"\\":return"\\"}if(r)return String.fromCharCode(parseInt(r,16));if(n)throw new Error("Unsupported U escape")}))}},9925:e=>{e.exports=class{constructor(e){this.current=e.sort(),this.done=!1,this.dir=new Map;for(let t=0;t<e.length;++t)this.dir.set(e[t],!0)}hasNext(){return!this.done}next(){const{current:e,dir:t}=this,r=e.slice();let n=null,i=0;const o=e.length;for(let r=0;r<o;++r){const a=e[r],s=t.get(a);(null===n||a>n)&&(s&&r>0&&a>e[r-1]||!s&&r<o-1&&a>e[r+1])&&(n=a,i=r)}if(null===n)this.done=!0;else{const r=t.get(n)?i-1:i+1;e[i]=e[r],e[r]=n;for(const r of e)r>n&&t.set(r,!t.get(r))}return r}}},3513:(e,t,r)=>{const n=r(2985),i=r(3751),o=r(9925),a=r(1227);function s(e,t){return e.hash<t.hash?-1:e.hash>t.hash?1:0}e.exports=class{constructor({createMessageDigest:e=()=>new i("sha256"),canonicalIdMap:t=new Map,maxDeepIterations:r=1/0}={}){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new n("_:c14n",t),this.createMessageDigest=e,this.maxDeepIterations=r,this.quads=null,this.deepIterations=null}async main(e){this.deepIterations=new Map,this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,r=[...this.blankNodeInfo.keys()];let i=0;for(const e of r)++i%100==0&&await this._yield(),await this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const o=[...t.keys()].sort(),l=[];for(const e of o){const r=t.get(e);if(r.length>1){l.push(r);continue}const n=r[0];this.canonicalIssuer.getId(n)}for(const e of l){const t=[];for(const r of e){if(this.canonicalIssuer.hasId(r))continue;const e=new n("_:b");e.getId(r);const i=await this.hashNDegreeQuads(r,e);t.push(i)}t.sort(s);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const d=[];for(const e of this.quads){const t=a.serializeQuadComponents(this._componentWithCanonicalId(e.subject),e.predicate,this._componentWithCanonicalId(e.object),this._componentWithCanonicalId(e.graph));d.push(t)}return d.sort(),d.join("")}async hashFirstDegreeQuads(e){const t=[],r=this.blankNodeInfo.get(e),n=r.quads;for(const r of n){const n={subject:null,predicate:r.predicate,object:null,graph:null};n.subject=this.modifyFirstDegreeComponent(e,r.subject,"subject"),n.object=this.modifyFirstDegreeComponent(e,r.object,"object"),n.graph=this.modifyFirstDegreeComponent(e,r.graph,"graph"),t.push(a.serializeQuad(n))}t.sort();const i=this.createMessageDigest();for(const e of t)i.update(e);return r.hash=await i.digest(),r.hash}async hashRelatedBlankNode(e,t,r,n){let i;i=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):r.hasId(e)?r.getId(e):this.blankNodeInfo.get(e).hash;const o=this.createMessageDigest();return o.update(n),"g"!==n&&o.update(this.getRelatedPredicate(t)),o.update(i),o.digest()}async hashNDegreeQuads(e,t){const r=this.deepIterations.get(e)||0;if(r>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(e,r+1);const n=this.createMessageDigest(),i=await this.createHashToRelated(e,t),a=[...i.keys()].sort();for(const e of a){n.update(e);let r,a="";const s=new o(i.get(e));let l=0;for(;s.hasNext();){const e=s.next();++l%3==0&&await this._yield();let n=t.clone(),i="";const o=[];let d=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?i+=this.canonicalIssuer.getId(t):(n.hasId(t)||o.push(t),i+=n.getId(t)),0!==a.length&&i>a){d=!0;break}if(!d){for(const e of o){const t=await this.hashNDegreeQuads(e,n);if(i+=n.getId(e),i+=`<${t.hash}>`,n=t.issuer,0!==a.length&&i>a){d=!0;break}}d||(0===a.length||i<a)&&(a=i,r=n)}}n.update(a),t=r}return{hash:await n.digest(),issuer:t}}modifyFirstDegreeComponent(e,t){return"BlankNode"!==t.termType?t:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return`<${e.predicate.value}>`}async createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;let i=0;for(const o of n)++i%100==0&&await this._yield(),await Promise.all([this._addRelatedBlankNodeHash({quad:o,component:o.subject,position:"s",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:o,component:o.object,position:"o",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:o,component:o.graph,position:"g",id:e,issuer:t,hashToRelated:r})]);return r}async _hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const r=await this.hashFirstDegreeQuads(e),n=t.get(r);n?n.push(e):t.set(r,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const r=t.value,n=this.blankNodeInfo.get(r);n?n.quads.add(e):this.blankNodeInfo.set(r,{quads:new Set([e]),hash:null})}async _addRelatedBlankNodeHash({quad:e,component:t,position:r,id:n,issuer:i,hashToRelated:o}){if("BlankNode"!==t.termType||t.value===n)return;const a=t.value,s=await this.hashRelatedBlankNode(a,e,i,r),l=o.get(s);l?l.push(a):o.set(s,[a])}_componentWithCanonicalId(e){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}async _yield(){return new Promise((e=>setImmediate(e)))}}},2438:(e,t,r)=>{const n=r(2985),i=r(3751),o=r(9925),a=r(1227);function s(e,t){return e.hash<t.hash?-1:e.hash>t.hash?1:0}e.exports=class{constructor({createMessageDigest:e=()=>new i("sha256"),canonicalIdMap:t=new Map,maxDeepIterations:r=1/0}={}){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new n("_:c14n",t),this.createMessageDigest=e,this.maxDeepIterations=r,this.quads=null,this.deepIterations=null}main(e){this.deepIterations=new Map,this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,r=[...this.blankNodeInfo.keys()];for(const e of r)this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const i=[...t.keys()].sort(),o=[];for(const e of i){const r=t.get(e);if(r.length>1){o.push(r);continue}const n=r[0];this.canonicalIssuer.getId(n)}for(const e of o){const t=[];for(const r of e){if(this.canonicalIssuer.hasId(r))continue;const e=new n("_:b");e.getId(r);const i=this.hashNDegreeQuads(r,e);t.push(i)}t.sort(s);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const l=[];for(const e of this.quads){const t=a.serializeQuadComponents(this._componentWithCanonicalId({component:e.subject}),e.predicate,this._componentWithCanonicalId({component:e.object}),this._componentWithCanonicalId({component:e.graph}));l.push(t)}return l.sort(),l.join("")}hashFirstDegreeQuads(e){const t=[],r=this.blankNodeInfo.get(e),n=r.quads;for(const r of n){const n={subject:null,predicate:r.predicate,object:null,graph:null};n.subject=this.modifyFirstDegreeComponent(e,r.subject,"subject"),n.object=this.modifyFirstDegreeComponent(e,r.object,"object"),n.graph=this.modifyFirstDegreeComponent(e,r.graph,"graph"),t.push(a.serializeQuad(n))}t.sort();const i=this.createMessageDigest();for(const e of t)i.update(e);return r.hash=i.digest(),r.hash}hashRelatedBlankNode(e,t,r,n){let i;i=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):r.hasId(e)?r.getId(e):this.blankNodeInfo.get(e).hash;const o=this.createMessageDigest();return o.update(n),"g"!==n&&o.update(this.getRelatedPredicate(t)),o.update(i),o.digest()}hashNDegreeQuads(e,t){const r=this.deepIterations.get(e)||0;if(r>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(e,r+1);const n=this.createMessageDigest(),i=this.createHashToRelated(e,t),a=[...i.keys()].sort();for(const e of a){n.update(e);let r,a="";const s=new o(i.get(e));for(;s.hasNext();){const e=s.next();let n=t.clone(),i="";const o=[];let l=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?i+=this.canonicalIssuer.getId(t):(n.hasId(t)||o.push(t),i+=n.getId(t)),0!==a.length&&i>a){l=!0;break}if(!l){for(const e of o){const t=this.hashNDegreeQuads(e,n);if(i+=n.getId(e),i+=`<${t.hash}>`,n=t.issuer,0!==a.length&&i>a){l=!0;break}}l||(0===a.length||i<a)&&(a=i,r=n)}}n.update(a),t=r}return{hash:n.digest(),issuer:t}}modifyFirstDegreeComponent(e,t){return"BlankNode"!==t.termType?t:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return`<${e.predicate.value}>`}createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;for(const i of n)this._addRelatedBlankNodeHash({quad:i,component:i.subject,position:"s",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:i,component:i.object,position:"o",id:e,issuer:t,hashToRelated:r}),this._addRelatedBlankNodeHash({quad:i,component:i.graph,position:"g",id:e,issuer:t,hashToRelated:r});return r}_hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const r=this.hashFirstDegreeQuads(e),n=t.get(r);n?n.push(e):t.set(r,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const r=t.value,n=this.blankNodeInfo.get(r);n?n.quads.add(e):this.blankNodeInfo.set(r,{quads:new Set([e]),hash:null})}_addRelatedBlankNodeHash({quad:e,component:t,position:r,id:n,issuer:i,hashToRelated:o}){if("BlankNode"!==t.termType||t.value===n)return;const a=t.value,s=this.hashRelatedBlankNode(a,e,i,r),l=o.get(s);l?l.push(a):o.set(s,[a])}_componentWithCanonicalId({component:e}){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}}},3845:(e,t,r)=>{const n=r(3751),i=r(3513);e.exports=class extends i{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new n("sha1")}modifyFirstDegreeComponent(e,t,r){return"BlankNode"!==t.termType?t:"graph"===r?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}async createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;let i=0;for(const o of n){let n,a;if("BlankNode"===o.subject.termType&&o.subject.value!==e)a=o.subject.value,n="p";else{if("BlankNode"!==o.object.termType||o.object.value===e)continue;a=o.object.value,n="r"}++i%100==0&&await this._yield();const s=await this.hashRelatedBlankNode(a,o,t,n),l=r.get(s);l?l.push(a):r.set(s,[a])}return r}}},378:(e,t,r)=>{const n=r(3751),i=r(2438);e.exports=class extends i{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new n("sha1")}modifyFirstDegreeComponent(e,t,r){return"BlankNode"!==t.termType?t:"graph"===r?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}createHashToRelated(e,t){const r=new Map,n=this.blankNodeInfo.get(e).quads;for(const i of n){let n,o;if("BlankNode"===i.subject.termType&&i.subject.value!==e)o=i.subject.value,n="p";else{if("BlankNode"!==i.object.termType||i.object.value===e)continue;o=i.object.value,n="r"}const a=this.hashRelatedBlankNode(o,i,t,n),s=r.get(a);s?s.push(o):r.set(a,[o])}return r}}},4005:(e,t,r)=>{const n=r(3513),i=r(3845),o=r(2438),a=r(378);let s;try{s=r(7789)}catch(e){}function l(e){return Array.isArray(e)?e:t.NQuads.legacyDatasetToQuads(e)}t.NQuads=r(1227),t.IdentifierIssuer=r(2985),t._rdfCanonizeNative=function(e){return e&&(s=e),s},t.canonize=async function(e,t){const r=l(e);if(t.useNative){if(!s)throw new Error("rdf-canonize-native not available");if(t.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return new Promise(((e,n)=>s.canonize(r,t,((t,r)=>t?n(t):e(r)))))}if("URDNA2015"===t.algorithm)return new n(t).main(r);if("URGNA2012"===t.algorithm){if(t.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new i(t).main(r)}if(!("algorithm"in t))throw new Error("No RDF Dataset Canonicalization algorithm specified.");throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+t.algorithm)},t._canonizeSync=function(e,t){const r=l(e);if(t.useNative){if(!s)throw new Error("rdf-canonize-native not available");if(t.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return s.canonizeSync(r,t)}if("URDNA2015"===t.algorithm)return new o(t).main(r);if("URGNA2012"===t.algorithm){if(t.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new a(t).main(r)}if(!("algorithm"in t))throw new Error("No RDF Dataset Canonicalization algorithm specified.");throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+t.algorithm)}},7793:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(9931),t),i(r(8483),t),i(r(2142),t),i(r(2426),t),i(r(3988),t),i(r(6754),t),i(r(8401),t)},9931:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BlankNode=void 0,t.BlankNode=class{constructor(e){this.termType="BlankNode",this.value=e}equals(e){return!!e&&"BlankNode"===e.termType&&e.value===this.value}}},8483:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DataFactory=void 0;const n=r(9931),i=r(2142),o=r(2426),a=r(3988),s=r(6754),l=r(8401);let d=0;t.DataFactory=class{constructor(e){this.blankNodeCounter=0,e=e||{},this.blankNodePrefix=e.blankNodePrefix||`df_${d++}_`}namedNode(e){return new a.NamedNode(e)}blankNode(e){return new n.BlankNode(e||`${this.blankNodePrefix}${this.blankNodeCounter++}`)}literal(e,t){return new o.Literal(e,t)}variable(e){return new l.Variable(e)}defaultGraph(){return i.DefaultGraph.INSTANCE}quad(e,t,r,n){return new s.Quad(e,t,r,n||this.defaultGraph())}fromTerm(e){switch(e.termType){case"NamedNode":return this.namedNode(e.value);case"BlankNode":return this.blankNode(e.value);case"Literal":return e.language?this.literal(e.value,e.language):e.datatype.equals(o.Literal.XSD_STRING)?this.literal(e.value):this.literal(e.value,this.fromTerm(e.datatype));case"Variable":return this.variable(e.value);case"DefaultGraph":return this.defaultGraph();case"Quad":return this.quad(this.fromTerm(e.subject),this.fromTerm(e.predicate),this.fromTerm(e.object),this.fromTerm(e.graph))}}fromQuad(e){return this.fromTerm(e)}resetBlankNodeCounter(){this.blankNodeCounter=0}}},2142:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultGraph=void 0;class r{constructor(){this.termType="DefaultGraph",this.value=""}equals(e){return!!e&&"DefaultGraph"===e.termType}}t.DefaultGraph=r,r.INSTANCE=new r},2426:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Literal=void 0;const n=r(3988);class i{constructor(e,t){this.termType="Literal",this.value=e,"string"==typeof t?(this.language=t,this.datatype=i.RDF_LANGUAGE_STRING):t?(this.language="",this.datatype=t):(this.language="",this.datatype=i.XSD_STRING)}equals(e){return!!e&&"Literal"===e.termType&&e.value===this.value&&e.language===this.language&&this.datatype.equals(e.datatype)}}t.Literal=i,i.RDF_LANGUAGE_STRING=new n.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),i.XSD_STRING=new n.NamedNode("http://www.w3.org/2001/XMLSchema#string")},3988:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NamedNode=void 0,t.NamedNode=class{constructor(e){this.termType="NamedNode",this.value=e}equals(e){return!!e&&"NamedNode"===e.termType&&e.value===this.value}}},6754:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Quad=void 0,t.Quad=class{constructor(e,t,r,n){this.termType="Quad",this.value="",this.subject=e,this.predicate=t,this.object=r,this.graph=n}equals(e){return!!e&&("Quad"===e.termType||!e.termType)&&this.subject.equals(e.subject)&&this.predicate.equals(e.predicate)&&this.object.equals(e.object)&&this.graph.equals(e.graph)}}},8401:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Variable=void 0,t.Variable=class{constructor(e){this.termType="Variable",this.value=e}equals(e){return!!e&&"Variable"===e.termType&&e.value===this.value}}},9349:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.getSupportedJavaScriptPrimitives=t.getSupportedRdfDatatypes=t.getTermRaw=t.toRdf=t.fromRdf=void 0;const o=r(7793),a=r(4802),s=r(103);i(r(4802),t),i(r(5448),t),i(r(103),t);const l=new o.DataFactory,d=new s.Translator;function c(e,t){return d.fromRdf(e,t)}d.registerHandler(new a.TypeHandlerString,a.TypeHandlerString.TYPES.map((e=>l.namedNode(e))),["string"]),d.registerHandler(new a.TypeHandlerBoolean,[a.TypeHandlerBoolean.TYPE].map((e=>l.namedNode(e))),["boolean"]),d.registerHandler(new a.TypeHandlerNumberDouble,a.TypeHandlerNumberDouble.TYPES.map((e=>l.namedNode(e))),["number"]),d.registerHandler(new a.TypeHandlerNumberInteger,a.TypeHandlerNumberInteger.TYPES.map((e=>l.namedNode(e))),["number"]),d.registerHandler(new a.TypeHandlerDate,a.TypeHandlerDate.TYPES.map((e=>l.namedNode(e))),["object"]),t.fromRdf=c,t.toRdf=function(e,t){return t&&"namedNode"in t&&(t={dataFactory:t}),(t=t||{})&&!t.dataFactory&&(t.dataFactory=l),d.toRdf(e,t)},t.getTermRaw=function(e,t){return"Literal"===e.termType?c(e,t):e.value},t.getSupportedRdfDatatypes=function(){return d.getSupportedRdfDatatypes()},t.getSupportedJavaScriptPrimitives=function(){return d.getSupportedJavaScriptPrimitives()}},5448:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},103:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Translator=void 0,t.Translator=class{constructor(){this.supportedRdfDatatypes=[],this.fromRdfHandlers={},this.toRdfHandlers={}}static incorrectRdfDataType(e){throw new Error(`Invalid RDF ${e.datatype.value} value: '${e.value}'`)}registerHandler(e,t,r){for(const r of t)this.supportedRdfDatatypes.push(r),this.fromRdfHandlers[r.value]=e;for(const t of r){let r=this.toRdfHandlers[t];r||(this.toRdfHandlers[t]=r=[]),r.push(e)}}fromRdf(e,t){const r=this.fromRdfHandlers[e.datatype.value];return r?r.fromRdf(e,t):e.value}toRdf(e,t){const r=this.toRdfHandlers[typeof e];if(r)for(const n of r){const r=n.toRdf(e,t);if(r)return r}throw new Error(`Invalid JavaScript value: '${e}'`)}getSupportedRdfDatatypes(){return this.supportedRdfDatatypes}getSupportedJavaScriptPrimitives(){return Object.keys(this.toRdfHandlers)}}},92:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerBoolean=void 0;const n=r(103);class i{fromRdf(e,t){switch(e.value){case"true":case"1":return!0;case"false":case"0":return!1}return t&&n.Translator.incorrectRdfDataType(e),!1}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(e?"true":"false",t||r.namedNode(i.TYPE))}}i.TYPE="http://www.w3.org/2001/XMLSchema#boolean",t.TypeHandlerBoolean=i},7258:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerDate=void 0;const n=r(103);class i{fromRdf(e,t){switch(t&&!e.value.match(i.VALIDATORS[e.datatype.value.substr(33,e.datatype.value.length)])&&n.Translator.incorrectRdfDataType(e),e.datatype.value){case"http://www.w3.org/2001/XMLSchema#gDay":return new Date(0,0,parseInt(e.value,10));case"http://www.w3.org/2001/XMLSchema#gMonthDay":const t=e.value.split("-");return new Date(0,parseInt(t[0],10)-1,parseInt(t[1],10));case"http://www.w3.org/2001/XMLSchema#gYear":return new Date(e.value+"-01-01");case"http://www.w3.org/2001/XMLSchema#gYearMonth":return new Date(e.value+"-01");default:return new Date(e.value)}}toRdf(e,{datatype:t,dataFactory:r}){if(t=t||r.namedNode(i.TYPES[0]),!(e instanceof Date))return null;const n=e;let o;switch(t.value){case"http://www.w3.org/2001/XMLSchema#gDay":o=String(n.getUTCDate());break;case"http://www.w3.org/2001/XMLSchema#gMonthDay":o=n.getUTCMonth()+1+"-"+n.getUTCDate();break;case"http://www.w3.org/2001/XMLSchema#gYear":o=String(n.getUTCFullYear());break;case"http://www.w3.org/2001/XMLSchema#gYearMonth":o=n.getUTCFullYear()+"-"+(n.getUTCMonth()+1);break;case"http://www.w3.org/2001/XMLSchema#date":o=n.toISOString().replace(/T.*$/,"");break;default:o=n.toISOString()}return r.literal(o,t)}}i.TYPES=["http://www.w3.org/2001/XMLSchema#dateTime","http://www.w3.org/2001/XMLSchema#date","http://www.w3.org/2001/XMLSchema#gDay","http://www.w3.org/2001/XMLSchema#gMonthDay","http://www.w3.org/2001/XMLSchema#gYear","http://www.w3.org/2001/XMLSchema#gYearMonth"],i.VALIDATORS={date:/^[0-9]+-[0-9][0-9]-[0-9][0-9]Z?$/,dateTime:/^[0-9]+-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9](\.[0-9][0-9][0-9])?((Z?)|([\+-][0-9][0-9]:[0-9][0-9]))$/,gDay:/^[0-9]+$/,gMonthDay:/^[0-9]+-[0-9][0-9]$/,gYear:/^[0-9]+$/,gYearMonth:/^[0-9]+-[0-9][0-9]$/},t.TypeHandlerDate=i},2406:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerNumberDouble=void 0;const n=r(103);class i{fromRdf(e,t){const r=parseFloat(e.value);return t&&isNaN(r)&&n.Translator.incorrectRdfDataType(e),r}toRdf(e,{datatype:t,dataFactory:r}){return t=t||r.namedNode(i.TYPES[0]),isNaN(e)?r.literal("NaN",t):isFinite(e)?e%1==0?null:r.literal(e.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),t):r.literal(e>0?"INF":"-INF",t)}}i.TYPES=["http://www.w3.org/2001/XMLSchema#double","http://www.w3.org/2001/XMLSchema#decimal","http://www.w3.org/2001/XMLSchema#float"],t.TypeHandlerNumberDouble=i},6925:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerNumberInteger=void 0;const n=r(103);class i{fromRdf(e,t){const r=parseInt(e.value,10);return t&&(isNaN(r)||e.value.indexOf(".")>=0)&&n.Translator.incorrectRdfDataType(e),r}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(String(e),t||(e<=i.MAX_INT&&e>=i.MIN_INT?r.namedNode(i.TYPES[0]):r.namedNode(i.TYPES[1])))}}i.TYPES=["http://www.w3.org/2001/XMLSchema#integer","http://www.w3.org/2001/XMLSchema#long","http://www.w3.org/2001/XMLSchema#int","http://www.w3.org/2001/XMLSchema#byte","http://www.w3.org/2001/XMLSchema#short","http://www.w3.org/2001/XMLSchema#negativeInteger","http://www.w3.org/2001/XMLSchema#nonNegativeInteger","http://www.w3.org/2001/XMLSchema#nonPositiveInteger","http://www.w3.org/2001/XMLSchema#positiveInteger","http://www.w3.org/2001/XMLSchema#unsignedByte","http://www.w3.org/2001/XMLSchema#unsignedInt","http://www.w3.org/2001/XMLSchema#unsignedLong","http://www.w3.org/2001/XMLSchema#unsignedShort"],i.MAX_INT=2147483647,i.MIN_INT=-2147483648,t.TypeHandlerNumberInteger=i},4191:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerString=void 0;class r{fromRdf(e){return e.value}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(e,t)}}r.TYPES=["http://www.w3.org/2001/XMLSchema#string","http://www.w3.org/2001/XMLSchema#normalizedString","http://www.w3.org/2001/XMLSchema#anyURI","http://www.w3.org/2001/XMLSchema#base64Binary","http://www.w3.org/2001/XMLSchema#language","http://www.w3.org/2001/XMLSchema#Name","http://www.w3.org/2001/XMLSchema#NCName","http://www.w3.org/2001/XMLSchema#NMTOKEN","http://www.w3.org/2001/XMLSchema#token","http://www.w3.org/2001/XMLSchema#hexBinary","http://www.w3.org/1999/02/22-rdf-syntax-ns#langString","http://www.w3.org/2001/XMLSchema#time","http://www.w3.org/2001/XMLSchema#duration"],t.TypeHandlerString=r},4802:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(92),t),i(r(7258),t),i(r(2406),t),i(r(6925),t),i(r(4191),t)},4147:(e,t,r)=>{const{SymbolDispose:n}=r(4134),{AbortError:i,codes:o}=r(6371),{isNodeStream:a,isWebStream:s,kControllerErrorFunction:l}=r(6115),d=r(6238),{ERR_INVALID_ARG_TYPE:c}=o;let u;e.exports.addAbortSignal=function(t,r){if((e=>{if("object"!=typeof e||!("aborted"in e))throw new c("signal","AbortSignal",e)})(t),!a(r)&&!s(r))throw new c("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const o=a(t)?()=>{t.destroy(new i(void 0,{cause:e.reason}))}:()=>{t[l](new i(void 0,{cause:e.reason}))};if(e.aborted)o();else{u=u||r(7760).addAbortListener;const i=u(e,o);d(t,i[n])}return t}},345:(e,t,r)=>{const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:a}=r(4134),{Buffer:s}=r(8287),{inspect:l}=r(7760);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return s.alloc(0);const t=s.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(e<r.length){const t=r.slice(0,e);return this.head.data=r.slice(e),t}return e===r.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[i](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t="",r=this.head,i=0;do{const o=r.data;if(!(e>o.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=s.allocUnsafe(e),r=e;let n=this.head,i=0;do{const s=n.data;if(!(e>s.length)){e===s.length?(o(t,s,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new a(s.buffer,s.byteOffset,e),r-e),this.head=n,n.data=s.slice(e));break}o(t,s,r-e),e-=s.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return l(this,{...t,depth:0,customInspect:!1})}}},7830:(e,t,r)=>{const{pipeline:n}=r(7758),i=r(3370),{destroyer:o}=r(5896),{isNodeStream:a,isReadable:s,isWritable:l,isWebStream:d,isTransformStream:c,isWritableStream:u,isReadableStream:h}=r(6115),{AbortError:p,codes:{ERR_INVALID_ARG_VALUE:f,ERR_MISSING_ARGS:g}}=r(6371),m=r(6238);e.exports=function(...e){if(0===e.length)throw new g("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let r=0;r<e.length;++r)if(a(e[r])||d(e[r])){if(r<e.length-1&&!(s(e[r])||h(e[r])||c(e[r])))throw new f(`streams[${r}]`,t[r],"must be readable");if(r>0&&!(l(e[r])||u(e[r])||c(e[r])))throw new f(`streams[${r}]`,t[r],"must be writable")}let r,v,b,y,x;const w=e[0],_=n(e,(function(e){const t=y;y=null,t?t(e):e?x.destroy(e):E||S||x.destroy()})),S=!!(l(w)||u(w)||c(w)),E=!!(s(_)||h(_)||c(_));if(x=new i({writableObjectMode:!(null==w||!w.writableObjectMode),readableObjectMode:!(null==_||!_.readableObjectMode),writable:S,readable:E}),S){if(a(w))x._write=function(e,t,n){w.write(e,t)?n():r=n},x._final=function(e){w.end(),v=e},w.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(d(w)){const e=(c(w)?w.writable:w).getWriter();x._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},x._final=async function(t){try{await e.ready,e.close().catch((()=>{})),v=t}catch(e){t(e)}}}const e=c(_)?_.readable:_;m(e,(()=>{if(v){const e=v;v=null,e()}}))}if(E)if(a(_))_.on("readable",(function(){if(b){const e=b;b=null,e()}})),_.on("end",(function(){x.push(null)})),x._read=function(){for(;;){const e=_.read();if(null===e)return void(b=x._read);if(!x.push(e))return}};else if(d(_)){const e=(c(_)?_.readable:_).getReader();x._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!x.push(t))return;if(r)return void x.push(null)}catch{return}}}return x._destroy=function(e,t){e||null===y||(e=new p),b=null,r=null,v=null,null===y?t(e):(y=t,a(_)&&o(_,e))},x}},5896:(e,t,r)=>{const n=r(5606),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:o},AbortError:a}=r(6371),{Symbol:s}=r(4134),{kIsDestroyed:l,isDestroyed:d,isFinished:c,isServerRequest:u}=r(6115),h=s("kDestroy"),p=s("kConstruct");function f(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function g(e,t,r){let i=!1;function o(t){if(i)return;i=!0;const o=e._readableState,a=e._writableState;f(t,a,o),a&&(a.closed=!0),o&&(o.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(m,e,t):n.nextTick(v,e)}try{e._destroy(t||null,o)}catch(t){o(t)}}function m(e,t){b(e,t),v(e)}function v(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function b(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function y(e,t,r){const i=e._readableState,o=e._writableState;if(null!=o&&o.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=o&&o.autoDestroy?e.destroy(t):t&&(t.stack,o&&!o.errored&&(o.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(b,e,t):b(e,t))}function x(e){let t=!1;function r(r){if(t)return void y(e,null!=r?r:new o);t=!0;const i=e._readableState,a=e._writableState,s=a||i;i&&(i.constructed=!0),a&&(a.constructed=!0),s.destroyed?e.emit(h,r):r?y(e,r,!0):n.nextTick(w,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function w(e){e.emit(p)}function _(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function S(e){e.emit("close")}function E(e,t){e.emit("error",t),n.nextTick(S,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(p,t),e.listenerCount(p)>1||n.nextTick(x,e)},destroyer:function(e,t){e&&!d(e)&&(t||c(e)||(t=new a),u(e)?(e.socket=null,e.destroy(t)):_(e)?e.abort():_(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(E,e,t):n.nextTick(S,e),e.destroyed||(e[l]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,o=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(f(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),o.constructed?g(this,e,t):this.once(h,(function(r){g(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:y}},3370:(e,t,r)=>{const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:o,ObjectSetPrototypeOf:a}=r(4134);e.exports=d;const s=r(7576),l=r(8584);a(d.prototype,s.prototype),a(d,s);{const e=o(l.prototype);for(let t=0;t<e.length;t++){const r=e[t];d.prototype[r]||(d.prototype[r]=l.prototype[r])}}function d(e){if(!(this instanceof d))return new d(e);s.call(this,e),l.call(this,e),e?(this.allowHalfOpen=!1!==e.allowHalfOpen,!1===e.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===e.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let c,u;function h(){return void 0===c&&(c={}),c}n(d.prototype,{writable:{__proto__:null,...i(l.prototype,"writable")},writableHighWaterMark:{__proto__:null,...i(l.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...i(l.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...i(l.prototype,"writableBuffer")},writableLength:{__proto__:null,...i(l.prototype,"writableLength")},writableFinished:{__proto__:null,...i(l.prototype,"writableFinished")},writableCorked:{__proto__:null,...i(l.prototype,"writableCorked")},writableEnded:{__proto__:null,...i(l.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...i(l.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set(e){this._readableState&&this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}}),d.fromWeb=function(e,t){return h().newStreamDuplexFromReadableWritablePair(e,t)},d.toWeb=function(e){return h().newReadableWritablePairFromDuplex(e)},d.from=function(e){return u||(u=r(6706)),u(e,"body")}},6706:(e,t,r)=>{const n=r(5606),i=r(8287),{isReadable:o,isWritable:a,isIterable:s,isNodeStream:l,isReadableNodeStream:d,isWritableNodeStream:c,isDuplexNodeStream:u,isReadableStream:h,isWritableStream:p}=r(6115),f=r(6238),{AbortError:g,codes:{ERR_INVALID_ARG_TYPE:m,ERR_INVALID_RETURN_VALUE:v}}=r(6371),{destroyer:b}=r(5896),y=r(3370),x=r(7576),w=r(8584),{createDeferredPromise:_}=r(7760),S=r(6532),E=globalThis.Blob||i.Blob,I=void 0!==E?function(e){return e instanceof E}:function(e){return!1},T=globalThis.AbortController||r(5568).AbortController,{FunctionPrototypeCall:k}=r(4134);class j extends y{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function A(e){const t=e.readable&&"function"!=typeof e.readable.read?x.wrap(e.readable):e.readable,r=e.writable;let n,i,s,l,d,c=!!o(t),u=!!a(r);function h(e){const t=l;l=null,t?t(e):e&&d.destroy(e)}return d=new j({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:c,writable:u}),u&&(f(r,(e=>{u=!1,e&&b(t,e),h(e)})),d._write=function(e,t,i){r.write(e,t)?i():n=i},d._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),c&&(f(t,(e=>{c=!1,e&&b(t,e),h(e)})),t.on("readable",(function(){if(s){const e=s;s=null,e()}})),t.on("end",(function(){d.push(null)})),d._read=function(){for(;;){const e=t.read();if(null===e)return void(s=d._read);if(!d.push(e))return}}),d._destroy=function(e,o){e||null===l||(e=new g),s=null,n=null,i=null,null===l?o(e):(l=o,b(r,e),b(t,e))},d}e.exports=function e(t,r){if(u(t))return t;if(d(t))return A({readable:t});if(c(t))return A({writable:t});if(l(t))return A({writable:!1,readable:!1});if(h(t))return A({readable:x.fromWeb(t)});if(p(t))return A({writable:w.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:o,destroy:a}=function(e){let{promise:t,resolve:r}=_();const i=new T,o=i.signal;return{value:e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:a,cb:s}=await e;if(n.nextTick(s),a)return;if(o.aborted)throw new g(void 0,{cause:o.reason});({promise:t,resolve:r}=_()),yield i}}(),{signal:o}),write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(s(e))return S(j,e,{objectMode:!0,write:i,final:o,destroy:a});const l=null==e?void 0:e.then;if("function"==typeof l){let t;const r=k(l,e,(e=>{if(null!=e)throw new v("nully","body",e)}),(e=>{b(t,e)}));return t=new j({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:a})}throw new v("Iterable, AsyncIterable or AsyncFunction",r,e)}if(I(t))return e(t.arrayBuffer());if(s(t))return S(j,t,{objectMode:!0,writable:!1});if(h(null==t?void 0:t.readable)&&p(null==t?void 0:t.writable))return j.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return A({readable:null!=t&&t.readable?d(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?c(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});const i=null==t?void 0:t.then;if("function"==typeof i){let e;return k(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{b(e,t)})),e=new j({objectMode:!0,writable:!1,read(){}})}throw new m(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},6238:(e,t,r)=>{const n=r(5606),{AbortError:i,codes:o}=r(6371),{ERR_INVALID_ARG_TYPE:a,ERR_STREAM_PREMATURE_CLOSE:s}=o,{kEmptyObject:l,once:d}=r(7760),{validateAbortSignal:c,validateFunction:u,validateObject:h,validateBoolean:p}=r(277),{Promise:f,PromisePrototypeThen:g,SymbolDispose:m}=r(4134),{isClosed:v,isReadable:b,isReadableNodeStream:y,isReadableStream:x,isReadableFinished:w,isReadableErrored:_,isWritable:S,isWritableNodeStream:E,isWritableStream:I,isWritableFinished:T,isWritableErrored:k,isNodeStream:j,willEmitClose:A,kIsClosedPromise:C}=r(6115);let N;const R=()=>{};function O(e,t,o){var p,f;if(2===arguments.length?(o=t,t=l):null==t?t=l:h(t,"options"),u(o,"callback"),c(t.signal,"options.signal"),o=d(o),x(e)||I(e))return function(e,t,o){let a=!1,s=R;if(t.signal)if(s=()=>{a=!0,o.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(s);else{N=N||r(7760).addAbortListener;const n=N(t.signal,s),i=o;o=d(((...t)=>{n[m](),i.apply(e,t)}))}const l=(...t)=>{a||n.nextTick((()=>o.apply(e,t)))};return g(e[C].promise,l,l),R}(e,t,o);if(!j(e))throw new a("stream",["ReadableStream","WritableStream","Stream"],e);const O=null!==(p=t.readable)&&void 0!==p?p:y(e),L=null!==(f=t.writable)&&void 0!==f?f:E(e),$=e._writableState,D=e._readableState,P=()=>{e.writable||F()};let M=A(e)&&y(e)===O&&E(e)===L,B=T(e,!1);const F=()=>{B=!0,e.destroyed&&(M=!1),(!M||e.readable&&!O)&&(O&&!q||o.call(e))};let q=w(e,!1);const U=()=>{q=!0,e.destroyed&&(M=!1),(!M||e.writable&&!L)&&(L&&!B||o.call(e))},z=t=>{o.call(e,t)};let H=v(e);const V=()=>{H=!0;const t=k(e)||_(e);return t&&"boolean"!=typeof t?o.call(e,t):O&&!q&&y(e,!0)&&!w(e,!1)?o.call(e,new s):!L||B||T(e,!1)?void o.call(e):o.call(e,new s)},G=()=>{H=!0;const t=k(e)||_(e);if(t&&"boolean"!=typeof t)return o.call(e,t);o.call(e)},W=()=>{e.req.on("finish",F)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?L&&!$&&(e.on("end",P),e.on("close",P)):(e.on("complete",F),M||e.on("abort",V),e.req?W():e.on("request",W)),M||"boolean"!=typeof e.aborted||e.on("aborted",V),e.on("end",U),e.on("finish",F),!1!==t.error&&e.on("error",z),e.on("close",V),H?n.nextTick(V):null!=$&&$.errorEmitted||null!=D&&D.errorEmitted?M||n.nextTick(G):(O||M&&!b(e)||!B&&!1!==S(e))&&(L||M&&!S(e)||!q&&!1!==b(e))?D&&e.req&&e.aborted&&n.nextTick(G):n.nextTick(G);const J=()=>{o=R,e.removeListener("aborted",V),e.removeListener("complete",F),e.removeListener("abort",V),e.removeListener("request",W),e.req&&e.req.removeListener("finish",F),e.removeListener("end",P),e.removeListener("close",P),e.removeListener("finish",F),e.removeListener("end",U),e.removeListener("error",z),e.removeListener("close",V)};if(t.signal&&!H){const a=()=>{const r=o;J(),r.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(a);else{N=N||r(7760).addAbortListener;const n=N(t.signal,a),i=o;o=d(((...t)=>{n[m](),i.apply(e,t)}))}}return J}e.exports=O,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=l),null!==(r=t)&&void 0!==r&&r.cleanup&&(p(t.cleanup,"cleanup"),n=t.cleanup),new f(((r,i)=>{const o=O(e,t,(e=>{n&&o(),e?i(e):r()}))}))}},6532:(e,t,r)=>{const n=r(5606),{PromisePrototypeThen:i,SymbolAsyncIterator:o,SymbolIterator:a}=r(4134),{Buffer:s}=r(8287),{ERR_INVALID_ARG_TYPE:l,ERR_STREAM_NULL_VALUES:d}=r(6371).codes;e.exports=function(e,t,r){let c,u;if("string"==typeof t||t instanceof s)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[o])u=!0,c=t[o]();else{if(!t||!t[a])throw new l("iterable",["Iterable"],t);u=!1,c=t[a]()}const h=new e({objectMode:!0,highWaterMark:1,...r});let p=!1;return h._read=function(){p||(p=!0,async function(){for(;;){try{const{value:e,done:t}=u?await c.next():c.next();if(t)h.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw p=!1,new d;if(h.push(t))continue;p=!1}}catch(e){h.destroy(e)}break}}())},h._destroy=function(e,t){i(async function(e){const t=null!=e,r="function"==typeof c.throw;if(t&&r){const{value:t,done:r}=await c.throw(e);if(await t,r)return}if("function"==typeof c.return){const{value:e}=await c.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},h}},4259:(e,t,r)=>{const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(4134),{EventEmitter:o}=r(7007);function a(e){o.call(this,e)}function s(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(a.prototype,o.prototype),i(a,o),a.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",l),r.on("close",d));let a=!1;function l(){a||(a=!0,e.end())}function d(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){u(),0===o.listenerCount(this,"error")&&this.emit("error",e)}function u(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",l),r.removeListener("close",d),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return s(r,"error",c),s(e,"error",c),r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e},e.exports={Stream:a,prependListener:s}},823:(e,t,r)=>{const n=globalThis.AbortController||r(5568).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:a,ERR_OUT_OF_RANGE:s},AbortError:l}=r(6371),{validateAbortSignal:d,validateInteger:c,validateObject:u}=r(277),h=r(4134).Symbol("kWeak"),p=r(4134).Symbol("kResistStopPropagation"),{finished:f}=r(6238),g=r(7830),{addAbortSignalNoValidate:m}=r(4147),{isWritable:v,isNodeStream:b}=r(6115),{deprecate:y}=r(7760),{ArrayPrototypePush:x,Boolean:w,MathFloor:_,Number:S,NumberIsNaN:E,Promise:I,PromiseReject:T,PromiseResolve:k,PromisePrototypeThen:j,Symbol:A}=r(4134),C=A("kEmpty"),N=A("kEof");function R(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&u(t,"options"),null!=(null==t?void 0:t.signal)&&d(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=_(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=_(t.highWaterMark)),c(n,"options.concurrency",1),c(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(7760).AbortSignalAny([null==t?void 0:t.signal].filter(w)),a=this,s=[],d={signal:o};let c,u,h=!1,p=0;function f(){h=!0,g()}function g(){p-=1,m()}function m(){u&&!h&&p<n&&s.length<i&&(u(),u=null)}!async function(){try{for await(let t of a){if(h)return;if(o.aborted)throw new l;try{if(t=e(t,d),t===C)continue;t=k(t)}catch(e){t=T(e)}p+=1,j(t,g,f),s.push(t),c&&(c(),c=null),!h&&(s.length>=i||p>=n)&&await new I((e=>{u=e}))}s.push(N)}catch(e){const t=T(e);j(t,g,f),s.push(t)}finally{h=!0,c&&(c(),c=null)}}();try{for(;;){for(;s.length>0;){const e=await s[0];if(e===N)return;if(o.aborted)throw new l;e!==C&&(yield e),s.shift(),m()}await new I((e=>{c=e}))}}finally{h=!0,u&&(u(),u=null)}}.call(this)}async function O(e,t=void 0){for await(const r of L.call(this,e,t))return!0;return!1}function L(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return R.call(this,(async function(t,r){return await e(t,r)?t:C}),t)}class $ extends a{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function D(e){if(e=S(e),E(e))return 0;if(e<0)throw new s("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:y((function(e=void 0){return null!=e&&u(e,"options"),null!=(null==e?void 0:e.signal)&&d(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&u(t,"options"),null!=(null==t?void 0:t.signal)&&d(t.signal,"options.signal"),e=D(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;e--<=0&&(yield r)}}.call(this)},filter:L,flatMap:function(e,t){const r=R.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:R,take:function(e,t=void 0){return null!=t&&u(t,"options"),null!=(null==t?void 0:t.signal)&&d(t.signal,"options.signal"),e=D(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&u(t,"options"),null!=(null==t?void 0:t.signal)&&d(t.signal,"options.signal"),b(e)&&!v(e))throw new i("stream",e,"must be writable");const r=g(this,e);return null!=t&&t.signal&&m(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await O.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of R.call(this,(async function(t,r){return await e(t,r),C}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&u(r,"options"),null!=(null==r?void 0:r.signal)&&d(r.signal,"options.signal");let a=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new l(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await f(this.destroy(e)),e}const s=new n,c=s.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this,[p]:!0};r.signal.addEventListener("abort",(()=>s.abort()),e)}let g=!1;try{for await(const n of this){var m;if(g=!0,null!=r&&null!==(m=r.signal)&&void 0!==m&&m.aborted)throw new l;a?t=await e(t,n,{signal:c}):(t=n,a=!0)}if(!g&&!a)throw new $}finally{s.abort()}return t},toArray:async function(e){null!=e&&u(e,"options"),null!=(null==e?void 0:e.signal)&&d(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l(void 0,{cause:e.signal.reason});x(t,n)}return t},some:O,find:async function(e,t){for await(const r of L.call(this,e,t))return r}}},6524:(e,t,r)=>{const{ObjectSetPrototypeOf:n}=r(4134);e.exports=o;const i=r(5001);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n(o.prototype,i.prototype),n(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},7758:(e,t,r)=>{const n=r(5606),{ArrayIsArray:i,Promise:o,SymbolAsyncIterator:a,SymbolDispose:s}=r(4134),l=r(6238),{once:d}=r(7760),c=r(5896),u=r(3370),{aggregateTwoErrors:h,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:f,ERR_MISSING_ARGS:g,ERR_STREAM_DESTROYED:m,ERR_STREAM_PREMATURE_CLOSE:v},AbortError:b}=r(6371),{validateFunction:y,validateAbortSignal:x}=r(277),{isIterable:w,isReadable:_,isReadableNodeStream:S,isNodeStream:E,isTransformStream:I,isWebStream:T,isReadableStream:k,isReadableFinished:j}=r(6115),A=globalThis.AbortController||r(5568).AbortController;let C,N,R;function O(e,t,r){let n=!1;return e.on("close",(()=>{n=!0})),{destroy:t=>{n||(n=!0,c.destroyer(e,t||new m("pipe")))},cleanup:l(e,{readable:t,writable:r},(e=>{n=!e}))}}function L(e){if(w(e))return e;if(S(e))return async function*(e){N||(N=r(7576)),yield*N.prototype[a].call(e)}(e);throw new p("val",["Readable","Iterable","AsyncIterable"],e)}async function $(e,t,r,{end:n}){let i,a=null;const s=e=>{if(e&&(i=e),a){const e=a;a=null,e()}},d=()=>new o(((e,t)=>{i?t(i):a=()=>{i?t(i):e()}}));t.on("drain",s);const c=l(t,{readable:!1},s);try{t.writableNeedDrain&&await d();for await(const r of e)t.write(r)||await d();n&&(t.end(),await d()),r()}catch(e){r(i!==e?h(i,e):e)}finally{c(),t.off("drain",s)}}async function D(e,t,r,{end:n}){I(t)&&(t=t.writable);const i=t.getWriter();try{for await(const t of e)await i.ready,i.write(t).catch((()=>{}));await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function P(e,t,o){if(1===e.length&&i(e[0])&&(e=e[0]),e.length<2)throw new g("streams");const a=new A,l=a.signal,d=null==o?void 0:o.signal,c=[];function h(){F(new b)}let m,v,y;x(d,"options.signal"),R=R||r(7760).addAbortListener,d&&(m=R(d,h));const j=[];let N,P=0;function B(e){F(e,0==--P)}function F(e,r){var i;if(!e||v&&"ERR_STREAM_PREMATURE_CLOSE"!==v.code||(v=e),v||r){for(;j.length;)j.shift()(v);null===(i=m)||void 0===i||i[s](),a.abort(),r&&(v||c.forEach((e=>e())),n.nextTick(t,v,y))}}for(let z=0;z<e.length;z++){const H=e[z],V=z<e.length-1,G=z>0,W=V||!1!==(null==o?void 0:o.end),J=z===e.length-1;if(E(H)){if(W){const{destroy:X,cleanup:K}=O(H,V,G);j.push(X),_(H)&&J&&c.push(K)}function Q(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&B(e)}H.on("error",Q),_(H)&&J&&c.push((()=>{H.removeListener("error",Q)}))}if(0===z)if("function"==typeof H){if(N=H({signal:l}),!w(N))throw new f("Iterable, AsyncIterable or Stream","source",N)}else N=w(H)||S(H)||I(H)?H:u.from(H);else if("function"==typeof H){var q;if(N=I(N)?L(null===(q=N)||void 0===q?void 0:q.readable):L(N),N=H(N,{signal:l}),V){if(!w(N,!0))throw new f("AsyncIterable",`transform[${z-1}]`,N)}else{var U;C||(C=r(6524));const Y=new C({objectMode:!0}),Z=null===(U=N)||void 0===U?void 0:U.then;if("function"==typeof Z)P++,Z.call(N,(e=>{y=e,null!=e&&Y.write(e),W&&Y.end(),n.nextTick(B)}),(e=>{Y.destroy(e),n.nextTick(B,e)}));else if(w(N,!0))P++,$(N,Y,B,{end:W});else{if(!k(N)&&!I(N))throw new f("AsyncIterable or Promise","destination",N);{const re=N.readable||N;P++,$(re,Y,B,{end:W})}}N=Y;const{destroy:ee,cleanup:te}=O(N,!1,!0);j.push(ee),J&&c.push(te)}}else if(E(H)){if(S(N)){P+=2;const ne=M(N,H,B,{end:W});_(H)&&J&&c.push(ne)}else if(I(N)||k(N)){const ie=N.readable||N;P++,$(ie,H,B,{end:W})}else{if(!w(N))throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],N);P++,$(N,H,B,{end:W})}N=H}else if(T(H)){if(S(N))P++,D(L(N),H,B,{end:W});else if(k(N)||w(N))P++,D(N,H,B,{end:W});else{if(!I(N))throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],N);P++,D(N.readable,H,B,{end:W})}N=H}else N=u.from(H)}return(null!=l&&l.aborted||null!=d&&d.aborted)&&n.nextTick(h),N}function M(e,t,r,{end:i}){let o=!1;if(t.on("close",(()=>{o||r(new v)})),e.pipe(t,{end:!1}),i){function a(){o=!0,t.end()}j(e)?n.nextTick(a):e.once("end",a)}else r();return l(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),l(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:P,pipeline:function(...e){return P(e,d(function(e){return y(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},7576:(e,t,r)=>{const n=r(5606),{ArrayPrototypeIndexOf:i,NumberIsInteger:o,NumberIsNaN:a,NumberParseInt:s,ObjectDefineProperties:l,ObjectKeys:d,ObjectSetPrototypeOf:c,Promise:u,SafeSet:h,SymbolAsyncDispose:p,SymbolAsyncIterator:f,Symbol:g}=r(4134);e.exports=Q,Q.ReadableState=J;const{EventEmitter:m}=r(7007),{Stream:v,prependListener:b}=r(4259),{Buffer:y}=r(8287),{addAbortSignal:x}=r(4147),w=r(6238);let _=r(7760).debuglog("stream",(e=>{_=e}));const S=r(345),E=r(5896),{getHighWaterMark:I,getDefaultHighWaterMark:T}=r(5291),{aggregateTwoErrors:k,codes:{ERR_INVALID_ARG_TYPE:j,ERR_METHOD_NOT_IMPLEMENTED:A,ERR_OUT_OF_RANGE:C,ERR_STREAM_PUSH_AFTER_EOF:N,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:R},AbortError:O}=r(6371),{validateObject:L}=r(277),$=g("kPaused"),{StringDecoder:D}=r(3141),P=r(6532);c(Q.prototype,v.prototype),c(Q,v);const M=()=>{},{errorOrDestroy:B}=E,F=1,q=16,U=32,z=64,H=2048,V=4096,G=65536;function W(e){return{enumerable:!1,get(){return!!(this.state&e)},set(t){t?this.state|=e:this.state&=~e}}}function J(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(3370)),this.state=H|V|q|U,e&&e.objectMode&&(this.state|=F),n&&e&&e.readableObjectMode&&(this.state|=F),this.highWaterMark=e?I(this,e,"readableHighWaterMark",n):T(!1),this.buffer=new S,this.length=0,this.pipes=[],this.flowing=null,this[$]=null,e&&!1===e.emitClose&&(this.state&=~H),e&&!1===e.autoDestroy&&(this.state&=~V),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new D(e.encoding),this.encoding=e.encoding)}function Q(e){if(!(this instanceof Q))return new Q(e);const t=this instanceof r(3370);this._readableState=new J(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&x(e.signal,this)),v.call(this,e),E.construct(this,(()=>{this._readableState.needReadable&&te(this,this._readableState)}))}function X(e,t,r,n){_("readableAddChunk",t);const i=e._readableState;let o;if(i.state&F||("string"==typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=y.from(t,r).toString(i.encoding):(t=y.from(t,r),r=""))):t instanceof y?r="":v._isUint8Array(t)?(t=v._uint8ArrayToBuffer(t),r=""):null!=t&&(o=new j("chunk",["string","Buffer","Uint8Array"],t))),o)B(e,o);else if(null===t)i.state&=-9,function(e,t){if(_("onEofChunk"),!t.ended){if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?Z(e):(t.needReadable=!1,t.emittedReadable=!0,ee(e))}}(e,i);else if(i.state&F||t&&t.length>0)if(n)if(4&i.state)B(e,new R);else{if(i.destroyed||i.errored)return!1;K(e,i,t,!0)}else if(i.ended)B(e,new N);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?K(e,i,t,!1):te(e,i)):K(e,i,t,!1)}else n||(i.state&=-9,te(e,i));return!i.ended&&(i.length<i.highWaterMark||0===i.length)}function K(e,t,r,n){t.flowing&&0===t.length&&!t.sync&&e.listenerCount("data")>0?(t.state&G?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.state&z&&Z(e)),te(e,t)}function Y(e,t){return e<=0||0===t.length&&t.ended?0:t.state&F?1:a(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function Z(e){const t=e._readableState;_("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(_("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(ee,e))}function ee(e){const t=e._readableState;_("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,ae(e)}function te(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(re,e,t))}function re(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){const r=t.length;if(_("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function ne(e){const t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!1===t[$]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function ie(e){_("readable nexttick read 0"),e.read(0)}function oe(e,t){_("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),ae(e),t.flowing&&!t.reading&&e.read(0)}function ae(e){const t=e._readableState;for(_("flow",t.flowing);t.flowing&&null!==e.read(););}function se(e,t){"function"!=typeof e.read&&(e=Q.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=M;function i(t){this===e?(n(),n=M):n=t}e.on("readable",i);const o=w(e,{writable:!1},(e=>{r=e?k(r,e):null,n(),n=M}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new u(i)}}}catch(e){throw r=k(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),o()):E.destroyer(e,null)}}(e,t);return r.stream=e,r}function le(e,t){if(0===t.length)return null;let r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function de(e){const t=e._readableState;_("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(ce,t,e))}function ce(e,t){if(_("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(ue,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function ue(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let he;function pe(){return void 0===he&&(he={}),he}l(J.prototype,{objectMode:W(F),ended:W(2),endEmitted:W(4),reading:W(8),constructed:W(q),sync:W(U),needReadable:W(z),emittedReadable:W(128),readableListening:W(256),resumeScheduled:W(512),errorEmitted:W(1024),emitClose:W(H),autoDestroy:W(V),destroyed:W(8192),closed:W(16384),closeEmitted:W(32768),multiAwaitDrain:W(G),readingMore:W(1<<17),dataEmitted:W(1<<18)}),Q.prototype.destroy=E.destroy,Q.prototype._undestroy=E.undestroy,Q.prototype._destroy=function(e,t){t(e)},Q.prototype[m.captureRejectionSymbol]=function(e){this.destroy(e)},Q.prototype[p]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new O,this.destroy(e)),new u(((t,r)=>w(this,(n=>n&&n!==e?r(n):t(null)))))},Q.prototype.push=function(e,t){return X(this,e,t,!1)},Q.prototype.unshift=function(e,t){return X(this,e,t,!0)},Q.prototype.isPaused=function(){const e=this._readableState;return!0===e[$]||!1===e.flowing},Q.prototype.setEncoding=function(e){const t=new D(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},Q.prototype.read=function(e){_("read",e),void 0===e?e=NaN:o(e)||(e=s(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new C("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return _("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?de(this):Z(this),null;if(0===(e=Y(e,t))&&t.ended)return 0===t.length&&de(this),null;let n,i=!!(t.state&z);if(_("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&(i=!0,_("length less than watermark",i)),t.ended||t.reading||t.destroyed||t.errored||!t.constructed)i=!1,_("reading, ended or constructing",i);else if(i){_("do read"),t.state|=8|U,0===t.length&&(t.state|=z);try{this._read(t.highWaterMark)}catch(e){B(this,e)}t.state&=~U,t.reading||(e=Y(r,t))}return n=e>0?le(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&de(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},Q.prototype._read=function(e){throw new A("_read()")},Q.prototype.pipe=function(e,t){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new h(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),_("pipe count=%d opts=%j",i.pipes.length,t);const o=t&&!1===t.end||e===n.stdout||e===n.stderr?g:a;function a(){_("onend"),e.end()}let s;i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",(function t(n,o){_("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,_("cleanup"),e.removeListener("close",p),e.removeListener("finish",f),s&&e.removeListener("drain",s),e.removeListener("error",u),e.removeListener("unpipe",t),r.removeListener("end",a),r.removeListener("end",g),r.removeListener("data",c),l=!0,s&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&s())}));let l=!1;function d(){l||(1===i.pipes.length&&i.pipes[0]===e?(_("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(_("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),r.pause()),s||(s=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(_("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(_("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",s))}function c(t){_("ondata");const r=e.write(t);_("dest.write",r),!1===r&&d()}function u(t){if(_("onerror",t),g(),e.removeListener("error",u),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?B(e,t):e.emit("error",t)}}function p(){e.removeListener("finish",f),g()}function f(){_("onfinish"),e.removeListener("close",p),g()}function g(){_("unpipe"),r.unpipe(e)}return r.on("data",c),b(e,"error",u),e.once("close",p),e.once("finish",f),e.emit("pipe",r),!0===e.writableNeedDrain?d():i.flowing||(_("pipe resume"),r.resume()),e},Q.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t<e.length;t++)e[t].emit("unpipe",this,{hasUnpiped:!1});return this}const r=i(t.pipes,e);return-1===r||(t.pipes.splice(r,1),0===t.pipes.length&&this.pause(),e.emit("unpipe",this,{hasUnpiped:!1})),this},Q.prototype.on=function(e,t){const r=v.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,_("on readable",i.length,i.reading),i.length?Z(this):i.reading||n.nextTick(ie,this))),r},Q.prototype.addListener=Q.prototype.on,Q.prototype.removeListener=function(e,t){const r=v.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(ne,this),r},Q.prototype.off=Q.prototype.removeListener,Q.prototype.removeAllListeners=function(e){const t=v.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(ne,this),t},Q.prototype.resume=function(){const e=this._readableState;return e.flowing||(_("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(oe,e,t))}(this,e)),e[$]=!1,this},Q.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[$]=!0,this},Q.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{B(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=d(e);for(let t=1;t<r.length;t++){const n=r[t];void 0===this[n]&&"function"==typeof e[n]&&(this[n]=e[n].bind(e))}return this},Q.prototype[f]=function(){return se(this)},Q.prototype.iterator=function(e){return void 0!==e&&L(e,"options"),se(this,e)},l(Q.prototype,{readable:{__proto__:null,get(){const e=this._readableState;return!(!e||!1===e.readable||e.destroyed||e.errorEmitted||e.endEmitted)},set(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),l(J.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[$]},set(e){this[$]=!!e}}}),Q._fromList=le,Q.from=function(e,t){return P(Q,e,t)},Q.fromWeb=function(e,t){return pe().newStreamReadableFromReadableStream(e,t)},Q.toWeb=function(e,t){return pe().newReadableStreamFromStreamReadable(e,t)},Q.wrap=function(e,t){var r,n;return new Q({objectMode:null===(r=null!==(n=e.readableObjectMode)&&void 0!==n?n:e.objectMode)||void 0===r||r,...t,destroy(t,r){E.destroyer(e,t),r(t)}}).wrap(e)}},5291:(e,t,r)=>{const{MathFloor:n,NumberIsInteger:i}=r(4134),{validateInteger:o}=r(277),{ERR_INVALID_ARG_VALUE:a}=r(6371).codes;let s=16384,l=16;function d(e){return e?l:s}e.exports={getHighWaterMark:function(e,t,r,o){const s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,o,r);if(null!=s){if(!i(s)||s<0)throw new a(o?`options.${r}`:"options.highWaterMark",s);return n(s)}return d(e.objectMode)},getDefaultHighWaterMark:d,setDefaultHighWaterMark:function(e,t){o(t,"value",0),e?l=t:s=t}}},5001:(e,t,r)=>{const{ObjectSetPrototypeOf:n,Symbol:i}=r(4134);e.exports=d;const{ERR_METHOD_NOT_IMPLEMENTED:o}=r(6371).codes,a=r(3370),{getHighWaterMark:s}=r(5291);n(d.prototype,a.prototype),n(d,a);const l=i("kCallback");function d(e){if(!(this instanceof d))return new d(e);const t=e?s(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),a.call(this,e),this._readableState.sync=!1,this[l]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",u)}function c(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function u(){this._final!==c&&c.call(this)}d.prototype._final=c,d.prototype._transform=function(e,t,r){throw new o("_transform()")},d.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,o=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||o===n.length||n.length<n.highWaterMark?r():this[l]=r)}))},d.prototype._read=function(){if(this[l]){const e=this[l];this[l]=null,e()}}},6115:(e,t,r)=>{const{SymbolAsyncIterator:n,SymbolIterator:i,SymbolFor:o}=r(4134),a=o("nodejs.stream.destroyed"),s=o("nodejs.stream.errored"),l=o("nodejs.stream.readable"),d=o("nodejs.stream.writable"),c=o("nodejs.stream.disturbed"),u=o("nodejs.webstream.isClosedPromise"),h=o("nodejs.webstream.controllerErrorFunction");function p(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function f(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function g(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function m(e){return!(!e||g(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function v(e){return!(!e||g(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function b(e){return!(!e||g(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function y(e){if(!g(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[a]||null!=n&&n.destroyed)}function x(e){if(!f(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function w(e,t){if(!p(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function _(e){return e&&null!=e[l]?e[l]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!y(e)&&p(e)&&e.readable&&!w(e)}function S(e){return e&&null!=e[d]?e[d]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!y(e)&&f(e)&&e.writable&&!x(e)}function E(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function I(e){return"boolean"==typeof e._sent100&&E(e)}e.exports={isDestroyed:y,kIsDestroyed:a,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[c])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:c,isErrored:function(e){var t,r,n,i,o,a,l,d,c,u;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(o=null!==(a=e[s])&&void 0!==a?a:e.readableErrored)&&void 0!==o?o:e.writableErrored)&&void 0!==i?i:null===(l=e._readableState)||void 0===l?void 0:l.errorEmitted)&&void 0!==n?n:null===(d=e._writableState)||void 0===d?void 0:d.errorEmitted)&&void 0!==r?r:null===(c=e._readableState)||void 0===c?void 0:c.errored)&&void 0!==t?t:null===(u=e._writableState)||void 0===u?void 0:u.errored))},kIsErrored:s,isReadable:_,kIsReadable:l,kIsClosedPromise:u,kControllerErrorFunction:h,kIsWritable:d,isClosed:function(e){if(!g(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&E(e)?e._closed:null},isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return g(e)?!(!y(e)&&(!1!==(null==t?void 0:t.readable)&&_(e)||!1!==(null==t?void 0:t.writable)&&S(e))):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[n]:!1===t?"function"==typeof e[i]:"function"==typeof e[n]||"function"==typeof e[i])},isReadableNodeStream:p,isReadableStream:m,isReadableEnded:function(e){if(!p(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:w,isReadableErrored:function(e){var t,r;return g(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:g,isWebStream:function(e){return m(e)||v(e)||b(e)},isWritable:S,isWritableNodeStream:f,isWritableStream:v,isWritableEnded:x,isWritableFinished:function(e,t){if(!f(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return g(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:I,willEmitClose:function(e){if(!g(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&I(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:b}},8584:(e,t,r)=>{const n=r(5606),{ArrayPrototypeSlice:i,Error:o,FunctionPrototypeSymbolHasInstance:a,ObjectDefineProperty:s,ObjectDefineProperties:l,ObjectSetPrototypeOf:d,StringPrototypeToLowerCase:c,Symbol:u,SymbolHasInstance:h}=r(4134);e.exports=L,L.WritableState=R;const{EventEmitter:p}=r(7007),f=r(4259).Stream,{Buffer:g}=r(8287),m=r(5896),{addAbortSignal:v}=r(4147),{getHighWaterMark:b,getDefaultHighWaterMark:y}=r(5291),{ERR_INVALID_ARG_TYPE:x,ERR_METHOD_NOT_IMPLEMENTED:w,ERR_MULTIPLE_CALLBACK:_,ERR_STREAM_CANNOT_PIPE:S,ERR_STREAM_DESTROYED:E,ERR_STREAM_ALREADY_FINISHED:I,ERR_STREAM_NULL_VALUES:T,ERR_STREAM_WRITE_AFTER_END:k,ERR_UNKNOWN_ENCODING:j}=r(6371).codes,{errorOrDestroy:A}=m;function C(){}d(L.prototype,f.prototype),d(L,f);const N=u("kOnFinished");function R(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(3370)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?b(this,e,"writableHighWaterMark",n):y(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=M.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,O(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[N]=[]}function O(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function L(e){const t=this instanceof r(3370);if(!t&&!a(L,this))return new L(e);this._writableState=new R(e,this,t),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&v(e.signal,this)),f.call(this,e),m.construct(this,(()=>{const e=this._writableState;e.writing||U(this,e),H(this,e)}))}function $(e,t,r,i){const o=e._writableState;if("function"==typeof r)i=r,r=o.defaultEncoding;else{if(r){if("buffer"!==r&&!g.isEncoding(r))throw new j(r)}else r=o.defaultEncoding;"function"!=typeof i&&(i=C)}if(null===t)throw new T;if(!o.objectMode)if("string"==typeof t)!1!==o.decodeStrings&&(t=g.from(t,r),r="buffer");else if(t instanceof g)r="buffer";else{if(!f._isUint8Array(t))throw new x("chunk",["string","Buffer","Uint8Array"],t);t=f._uint8ArrayToBuffer(t),r="buffer"}let a;return o.ending?a=new k:o.destroyed&&(a=new E("write")),a?(n.nextTick(i,a),A(e,a,!0),a):(o.pendingcb++,function(e,t,r,n,i){const o=t.objectMode?1:r.length;t.length+=o;const a=t.length<t.highWaterMark;return a||(t.needDrain=!0),t.writing||t.corked||t.errored||!t.constructed?(t.buffered.push({chunk:r,encoding:n,callback:i}),t.allBuffers&&"buffer"!==n&&(t.allBuffers=!1),t.allNoop&&i!==C&&(t.allNoop=!1)):(t.writelen=o,t.writecb=i,t.writing=!0,t.sync=!0,e._write(r,n,t.onwrite),t.sync=!1),a&&!t.errored&&!t.destroyed}(e,o,t,r,i))}function D(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new E("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function P(e,t,r,n){--t.pendingcb,n(r),q(t),A(e,r)}function M(e,t){const r=e._writableState,i=r.sync,o=r.writecb;"function"==typeof o?(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t?(t.stack,r.errored||(r.errored=t),e._readableState&&!e._readableState.errored&&(e._readableState.errored=t),i?n.nextTick(P,e,r,t,o):P(e,r,t,o)):(r.buffered.length>r.bufferedIndex&&U(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===o?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:o,stream:e,state:r},n.nextTick(B,r.afterWriteTickInfo)):F(e,r,1,o))):A(e,new _)}function B({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,F(e,t,r,n)}function F(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&q(t),H(e,t)}function q(e){if(e.writing)return;for(let r=e.bufferedIndex;r<e.buffered.length;++r){var t;const{chunk:n,callback:i}=e.buffered[r],o=e.objectMode?1:n.length;e.length-=o,i(null!==(t=e.errored)&&void 0!==t?t:new E("write"))}const r=e[N].splice(0);for(let t=0;t<r.length;t++){var n;r[t](null!==(n=e.errored)&&void 0!==n?n:new E("end"))}O(e)}function U(e,t){if(t.corked||t.bufferProcessing||t.destroyed||!t.constructed)return;const{buffered:r,bufferedIndex:n,objectMode:o}=t,a=r.length-n;if(!a)return;let s=n;if(t.bufferProcessing=!0,a>1&&e._writev){t.pendingcb-=a-1;const n=t.allNoop?C:e=>{for(let t=s;t<r.length;++t)r[t].callback(e)},o=t.allNoop&&0===s?r:i(r,s);o.allBuffers=t.allBuffers,D(e,t,!0,t.length,o,"",n),O(t)}else{do{const{chunk:n,encoding:i,callback:a}=r[s];r[s++]=null,D(e,t,!1,o?1:n.length,n,i,a)}while(s<r.length&&!t.writing);s===r.length?O(t):s>256?(r.splice(0,s),t.bufferedIndex=0):t.bufferedIndex=s}t.bufferProcessing=!1}function z(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function H(e,t,r){z(t)&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)A(e,null!=i?i:_());else if(r=!0,t.pendingcb--,i){const r=t[N].splice(0);for(let e=0;e<r.length;e++)r[e](i);A(e,i,t.sync)}else z(t)&&(t.prefinished=!0,e.emit("prefinish"),t.pendingcb++,n.nextTick(V,e,t))}t.sync=!0,t.pendingcb++;try{e._final(i)}catch(e){i(e)}t.sync=!1}(e,t)))}(e,t),0===t.pendingcb&&(r?(t.pendingcb++,n.nextTick(((e,t)=>{z(t)?V(e,t):t.pendingcb--}),e,t)):z(t)&&(t.pendingcb++,V(e,t))))}function V(e,t){t.pendingcb--,t.finished=!0;const r=t[N].splice(0);for(let e=0;e<r.length;e++)r[e]();if(e.emit("finish"),t.autoDestroy){const t=e._readableState;(!t||t.autoDestroy&&(t.endEmitted||!1===t.readable))&&e.destroy()}}R.prototype.getBuffer=function(){return i(this.buffered,this.bufferedIndex)},s(R.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),s(L,h,{__proto__:null,value:function(e){return!!a(this,e)||this===L&&e&&e._writableState instanceof R}}),L.prototype.pipe=function(){A(this,new S)},L.prototype.write=function(e,t,r){return!0===$(this,e,t,r)},L.prototype.cork=function(){this._writableState.corked++},L.prototype.uncork=function(){const e=this._writableState;e.corked&&(e.corked--,e.writing||U(this,e))},L.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=c(e)),!g.isEncoding(e))throw new j(e);return this._writableState.defaultEncoding=e,this},L.prototype._write=function(e,t,r){if(!this._writev)throw new w("_write()");this._writev([{chunk:e,encoding:t}],r)},L.prototype._writev=null,L.prototype.end=function(e,t,r){const i=this._writableState;let a;if("function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e){const r=$(this,e,t);r instanceof o&&(a=r)}return i.corked&&(i.corked=1,this.uncork()),a||(i.errored||i.ending?i.finished?a=new I("end"):i.destroyed&&(a=new E("end")):(i.ending=!0,H(this,i,!0),i.ended=!0)),"function"==typeof r&&(a||i.finished?n.nextTick(r,a):i[N].push(r)),this},l(L.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(e){this._writableState&&(this._writableState.destroyed=e)}},writable:{__proto__:null,get(){const e=this._writableState;return!(!e||!1===e.writable||e.destroyed||e.errored||e.ending||e.ended)},set(e){this._writableState&&(this._writableState.writable=!!e)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){const e=this._writableState;return!!e&&!e.destroyed&&!e.ending&&e.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});const G=m.destroy;let W;function J(){return void 0===W&&(W={}),W}L.prototype.destroy=function(e,t){const r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[N].length)&&n.nextTick(q,r),G.call(this,e,t),this},L.prototype._undestroy=m.undestroy,L.prototype._destroy=function(e,t){t(e)},L.prototype[p.captureRejectionSymbol]=function(e){this.destroy(e)},L.fromWeb=function(e,t){return J().newStreamWritableFromWritableStream(e,t)},L.toWeb=function(e){return J().newWritableStreamFromStreamWritable(e)}},277:(e,t,r)=>{const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:o,ArrayPrototypeMap:a,NumberIsInteger:s,NumberIsNaN:l,NumberMAX_SAFE_INTEGER:d,NumberMIN_SAFE_INTEGER:c,NumberParseInt:u,ObjectPrototypeHasOwnProperty:h,RegExpPrototypeExec:p,String:f,StringPrototypeToUpperCase:g,StringPrototypeTrim:m}=r(4134),{hideStackFrames:v,codes:{ERR_SOCKET_BAD_PORT:b,ERR_INVALID_ARG_TYPE:y,ERR_INVALID_ARG_VALUE:x,ERR_OUT_OF_RANGE:w,ERR_UNKNOWN_SIGNAL:_}}=r(6371),{normalizeEncoding:S}=r(7760),{isAsyncFunction:E,isArrayBufferView:I}=r(7760).types,T={},k=/^[0-7]+$/,j=v(((e,t,r=c,n=d)=>{if("number"!=typeof e)throw new y(t,"number",e);if(!s(e))throw new w(t,"an integer",e);if(e<r||e>n)throw new w(t,`>= ${r} && <= ${n}`,e)})),A=v(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new y(t,"number",e);if(!s(e))throw new w(t,"an integer",e);if(e<r||e>n)throw new w(t,`>= ${r} && <= ${n}`,e)})),C=v(((e,t,r=!1)=>{if("number"!=typeof e)throw new y(t,"number",e);if(!s(e))throw new w(t,"an integer",e);const n=r?1:0,i=4294967295;if(e<n||e>i)throw new w(t,`>= ${n} && <= ${i}`,e)}));function N(e,t){if("string"!=typeof e)throw new y(t,"string",e)}const R=v(((e,t,r)=>{if(!i(r,e)){const n=o(a(r,(e=>"string"==typeof e?`'${e}'`:f(e))),", ");throw new x(t,e,"must be one of: "+n)}}));function O(e,t){if("boolean"!=typeof e)throw new y(t,"boolean",e)}function L(e,t,r){return null!=e&&h(e,t)?e[t]:r}const $=v(((e,t,r=null)=>{const i=L(r,"allowArray",!1),o=L(r,"allowFunction",!1);if(!L(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!o||"function"!=typeof e))throw new y(t,"Object",e)})),D=v(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new y(t,"a dictionary",e)})),P=v(((e,t,r=0)=>{if(!n(e))throw new y(t,"Array",e);if(e.length<r)throw new x(t,e,`must be longer than ${r}`)})),M=v(((e,t="buffer")=>{if(!I(e))throw new y(t,["Buffer","TypedArray","DataView"],e)})),B=v(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new y(t,"AbortSignal",e)})),F=v(((e,t)=>{if("function"!=typeof e)throw new y(t,"Function",e)})),q=v(((e,t)=>{if("function"!=typeof e||E(e))throw new y(t,"Function",e)})),U=v(((e,t)=>{if(void 0!==e)throw new y(t,"undefined",e)})),z=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function H(e,t){if(void 0===e||!p(z,e))throw new x(t,e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===p(k,e))throw new x(t,e,"must be a 32-bit unsigned integer or an octal string");e=u(e,8)}return C(e,t),e},validateArray:P,validateStringArray:function(e,t){P(e,t);for(let r=0;r<e.length;r++)N(e[r],`${t}[${r}]`)},validateBooleanArray:function(e,t){P(e,t);for(let r=0;r<e.length;r++)O(e[r],`${t}[${r}]`)},validateAbortSignalArray:function(e,t){P(e,t);for(let r=0;r<e.length;r++){const n=e[r],i=`${t}[${r}]`;if(null==n)throw new y(i,"AbortSignal",n);B(n,i)}},validateBoolean:O,validateBuffer:M,validateDictionary:D,validateEncoding:function(e,t){const r=S(t),n=e.length;if("hex"===r&&n%2!=0)throw new x("encoding",t,`is invalid for data of length ${n}`)},validateFunction:F,validateInt32:A,validateInteger:j,validateNumber:function(e,t,r=void 0,n){if("number"!=typeof e)throw new y(t,"number",e);if(null!=r&&e<r||null!=n&&e>n||(null!=r||null!=n)&&l(e))throw new w(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:$,validateOneOf:R,validatePlainFunction:q,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===m(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new b(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(N(e,t),void 0===T[e]){if(void 0!==T[g(e)])throw new _(e+" (signals must use all capital letters)");throw new _(e)}},validateString:N,validateUint32:C,validateUndefined:U,validateUnion:function(e,t,r){if(!i(r,e))throw new y(t,`('${o(r,"|")}')`,e)},validateAbortSignal:B,validateLinkHeaderValue:function(e){if("string"==typeof e)return H(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n<t;n++){const i=e[n];H(i,"hints"),r+=i,n!==t-1&&(r+=", ")}return r}throw new x("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}},9198:(e,t,r)=>{const n=r(5506),i=r(3095),o=n.Readable.destroy;e.exports=n.Readable,e.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,e.exports._isUint8Array=n._isUint8Array,e.exports.isDisturbed=n.isDisturbed,e.exports.isErrored=n.isErrored,e.exports.isReadable=n.isReadable,e.exports.Readable=n.Readable,e.exports.Writable=n.Writable,e.exports.Duplex=n.Duplex,e.exports.Transform=n.Transform,e.exports.PassThrough=n.PassThrough,e.exports.addAbortSignal=n.addAbortSignal,e.exports.finished=n.finished,e.exports.destroy=n.destroy,e.exports.destroy=o,e.exports.pipeline=n.pipeline,e.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),e.exports.Stream=n.Stream,e.exports.default=e.exports},6371:(e,t,r)=>{const{format:n,inspect:i,AggregateError:o}=r(7760),a=globalThis.AggregateError||o,s=Symbol("kIsNodeError"),l=["string","function","number","object","Function","Object","boolean","bigint","symbol"],d=/^([A-Z][a-z0-9]*)+$/,c={};function u(e,t){if(!e)throw new c.ERR_INTERNAL_ASSERTION(t)}function h(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function p(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return u(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const i=(t.match(/%[dfijoOs]/g)||[]).length;return u(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[s]=!0,c[e]=i}function f(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class g extends Error{constructor(e="The operation was aborted",t=void 0){if(void 0!==t&&"object"!=typeof t)throw new c.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}p("ERR_ASSERTION","%s",Error),p("ERR_INVALID_ARG_TYPE",((e,t,r)=>{u("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const o=[],a=[],s=[];for(const e of t)u("string"==typeof e,"All expected entries have to be of type string"),l.includes(e)?o.push(e.toLowerCase()):d.test(e)?a.push(e):(u("object"!==e,'The value "object" should be written as "Object"'),s.push(e));if(a.length>0){const e=o.indexOf("object");-1!==e&&(o.splice(o,e,1),a.push("Object"))}if(o.length>0){switch(o.length){case 1:n+=`of type ${o[0]}`;break;case 2:n+=`one of type ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`one of type ${o.join(", ")}, or ${e}`}}(a.length>0||s.length>0)&&(n+=" or ")}if(a.length>0){switch(a.length){case 1:n+=`an instance of ${a[0]}`;break;case 2:n+=`an instance of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`an instance of ${a.join(", ")}, or ${e}`}}s.length>0&&(n+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(n+="an "),n+=`${s[0]}`;break;case 2:n+=`one of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`one of ${s.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var c;null!==(c=r.constructor)&&void 0!==c&&c.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${i(r,{depth:-1})}`}else{let e=i(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),p("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=i(t);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),p("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),p("ERR_MISSING_ARGS",((...e)=>{let t;u(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),p("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return u(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=h(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=h(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),p("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),p("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),p("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),p("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),p("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),p("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),p("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),p("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),p("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),p("ERR_STREAM_WRITE_AFTER_END","write after end",Error),p("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:g,aggregateTwoErrors:f((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new a([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:f,codes:c}},4134:e=>{e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),PromiseResolve:e=>Promise.resolve(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Boolean,Uint8Array}},7760:(e,t,r)=>{const n=r(8287),{kResistStopPropagation:i,SymbolDispose:o}=r(4134),a=globalThis.AbortSignal||r(5568).AbortSignal,s=globalThis.AbortController||r(5568).AbortController,l=Object.getPrototypeOf((async function(){})).constructor,d=globalThis.Blob||n.Blob,c=void 0!==d?function(e){return e instanceof d}:function(e){return!1},u=(e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new ERR_INVALID_ARG_TYPE(t,"AbortSignal",e)};class h extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r<e.length;r++)t+=` ${e[r].stack}\n`;super(t),this.name="AggregateError",this.errors=e}}e.exports={AggregateError:h,kEmptyObject:Object.freeze({}),once(e){let t=!1;return function(...r){t||(t=!0,e.apply(this,r))}},createDeferredPromise:function(){let e,t;return{promise:new Promise(((r,n)=>{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof l,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:c,deprecate:(e,t)=>e,addAbortListener:r(7007).addAbortListener||function(e,t){if(void 0===e)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);let r;return u(e,"signal"),(e=>{if("function"!=typeof e)throw new ERR_INVALID_ARG_TYPE("listener","Function",e)})(t),e.aborted?queueMicrotask((()=>t())):(e.addEventListener("abort",t,{__proto__:null,once:!0,[i]:!0}),r=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[o](){var e;null===(e=r)||void 0===e||e()}}},AbortSignalAny:a.any||function(e){if(1===e.length)return e[0];const t=new s,r=()=>t.abort();return e.forEach((e=>{u(e,"signals"),e.addEventListener("abort",r,{once:!0})})),t.signal.addEventListener("abort",(()=>{e.forEach((e=>e.removeEventListener("abort",r)))}),{once:!0}),t.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},5506:(e,t,r)=>{const{Buffer:n}=r(8287),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:a}=r(4134),{promisify:{custom:s}}=r(7760),{streamReturningOperators:l,promiseReturningOperators:d}=r(823),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=r(6371),u=r(7830),{setDefaultHighWaterMark:h,getDefaultHighWaterMark:p}=r(5291),{pipeline:f}=r(7758),{destroyer:g}=r(5896),m=r(6238),v=r(3095),b=r(6115),y=e.exports=r(4259).Stream;y.isDestroyed=b.isDestroyed,y.isDisturbed=b.isDisturbed,y.isErrored=b.isErrored,y.isReadable=b.isReadable,y.isWritable=b.isWritable,y.Readable=r(7576);for(const w of o(l)){const _=l[w];function S(...e){if(new.target)throw c();return y.Readable.from(a(_,this,e))}i(S,"name",{__proto__:null,value:_.name}),i(S,"length",{__proto__:null,value:_.length}),i(y.Readable.prototype,w,{__proto__:null,value:S,enumerable:!1,configurable:!0,writable:!0})}for(const E of o(d)){const I=d[E];function T(...e){if(new.target)throw c();return a(I,this,e)}i(T,"name",{__proto__:null,value:I.name}),i(T,"length",{__proto__:null,value:I.length}),i(y.Readable.prototype,E,{__proto__:null,value:T,enumerable:!1,configurable:!0,writable:!0})}y.Writable=r(8584),y.Duplex=r(3370),y.Transform=r(5001),y.PassThrough=r(6524),y.pipeline=f;const{addAbortSignal:x}=r(4147);y.addAbortSignal=x,y.finished=m,y.destroy=g,y.compose=u,y.setDefaultHighWaterMark=h,y.getDefaultHighWaterMark=p,i(y,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>v}),i(f,s,{__proto__:null,enumerable:!0,get:()=>v.pipeline}),i(m,s,{__proto__:null,enumerable:!0,get:()=>v.finished}),y.Stream=y,y._isUint8Array=function(e){return e instanceof Uint8Array},y._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},3095:(e,t,r)=>{const{ArrayPrototypePop:n,Promise:i}=r(4134),{isIterable:o,isNodeStream:a,isWebStream:s}=r(6115),{pipelineImpl:l}=r(7758),{finished:d}=r(6238);r(5506),e.exports={finished:d,pipeline:function(...e){return new i(((t,r)=>{let i,d;const c=e[e.length-1];if(c&&"object"==typeof c&&!a(c)&&!o(c)&&!s(c)){const t=n(e);i=t.signal,d=t.end}l(e,((e,n)=>{e?r(e):t(n)}),{signal:i,end:d})}))}}},2791:function(e,t,r){!function(e){if(!e.setImmediate){var t,r,n,i,o,a=1,s={},l=!1,d=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,"[object process]"==={}.toString.call(e.process)?t=function(e){process.nextTick((function(){h(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(i="setImmediate$"+Math.random()+"$",o=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&h(+t.data.slice(i.length))},e.addEventListener?e.addEventListener("message",o,!1):e.attachEvent("onmessage",o),t=function(t){e.postMessage(i+t,"*")}):e.MessageChannel?((n=new MessageChannel).port1.onmessage=function(e){h(e.data)},t=function(e){n.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,t=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):t=function(e){setTimeout(h,0,e)},c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var r=new Array(arguments.length-1),n=0;n<r.length;n++)r[n]=arguments[n+1];var i={callback:e,args:r};return s[a]=i,t(a),a++},c.clearImmediate=u}function u(e){delete s[e]}function h(e){if(l)setTimeout(h,0,e);else{var t=s[e];if(t){l=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(undefined,r)}}(t)}finally{u(e),l=!1}}}}}("undefined"==typeof self?void 0===r.g?this:r.g:self)},3141:(e,t,r)=>{var n=r(5003).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=d,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=u,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function d(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},5003:(e,t,r)=>{var n=r(8287),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},259:e=>{e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},8799:(e,t,r)=>{function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new s(r,null,t,e):new s(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function o(e,t){e.tail=new s(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function a(e,t){e.head=new s(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function s(e,t,r,n){if(!(this instanceof s))return new s(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=s,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)a(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,o=this.head;null!==o&&n<e;n++)o=o.next;var a=[];for(n=0;o&&n<t;n++)a.push(o.value),o=this.removeNode(o);for(null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev),n=0;n<r.length;n++)o=i(this,o,r[n]);return a},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(259)(n)}catch(e){}},7789:()=>{}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};r.d(n,{TS:()=>Ze,aH:()=>Ke,k_:()=>pe,a6:()=>Rs,nt:()=>K,Sx:()=>Y,E7:()=>z,F3:()=>he});var i={};r.r(i),r.d(i,{anyAtomicType:()=>Nr,anySimpleType:()=>Cr,anyURI:()=>Yr,base64Binary:()=>Kr,boolean:()=>Pr,byte:()=>cn,date:()=>Hr,dateTime:()=>Ur,dateTimeStamp:()=>yn,dayTimeDuration:()=>bn,decimal:()=>Mr,double:()=>Fr,duration:()=>qr,float:()=>Br,gDay:()=>Jr,gMonth:()=>Qr,gMonthDay:()=>Wr,gYear:()=>Gr,gYearMonth:()=>Vr,hexBinary:()=>Xr,int:()=>ln,integer:()=>nn,language:()=>rn,long:()=>sn,negativeInteger:()=>an,nonNegativeInteger:()=>un,nonPositiveInteger:()=>on,normalizedString:()=>en,positiveInteger:()=>mn,short:()=>dn,string:()=>Dr,time:()=>zr,token:()=>tn,unsignedByte:()=>gn,unsignedInt:()=>pn,unsignedLong:()=>hn,unsignedShort:()=>fn,yearMonthDuration:()=>vn});const o="http://www.w3.org/1999/02/22-rdf-syntax-ns#",a="http://www.w3.org/2001/XMLSchema#",s="http://www.w3.org/2000/10/swap/",l={xsd:{decimal:`${a}decimal`,boolean:`${a}boolean`,double:`${a}double`,integer:`${a}integer`,string:`${a}string`},rdf:{type:`${o}type`,nil:`${o}nil`,first:`${o}first`,rest:`${o}rest`,langString:`${o}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${s}reify#forSome`,forAll:`${s}reify#forAll`},log:{implies:`${s}log#implies`}},{rdf:d,xsd:c}=l;let u,h=0;const p={namedNode:function(e){return new m(e)},blankNode:function(e){return new b(e||"n3-"+h++)},variable:function(e){return new y(e)},literal:function(e,t){if("string"==typeof t)return new v(`"${e}"@${t.toLowerCase()}`);let r=t?t.value:"";return""===r&&("boolean"==typeof e?r=c.boolean:"number"==typeof e&&(Number.isFinite(e)?r=Number.isInteger(e)?c.integer:c.double:(r=c.double,Number.isNaN(e)||(e=e>0?"INF":"-INF")))),""===r||r===c.string?new v(`"${e}"`):new v(`"${e}"^^${r}`)},defaultGraph:function(){return u},quad:S,triple:S},f=p;class g{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof g?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 m extends g{get termType(){return"NamedNode"}}class v extends g{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 m(this.datatypeString)}get datatypeString(){const e=this.id,t=e.lastIndexOf('"')+1,r=t<e.length?e[t]:"";return"^"===r?e.substr(t+2):"@"!==r?c.string:d.langString}equals(e){return e instanceof v?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 b extends g{constructor(e){super(`_:${e}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class y extends g{constructor(e){super(`?${e}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}function x(e,t,r){if(t=t||p,!e)return t.defaultGraph();switch(e[0]){case"?":return t.variable(e.substr(1));case"_":return t.blankNode(e.substr(2));case'"':if(t===p)return new v(e);if('"'===e[e.length-1])return t.literal(e.substr(1,e.length-2));const n=e.lastIndexOf('"',e.length-1);return t.literal(e.substr(1,n-1),"@"===e[n+1]?e.substr(n+2):t.namedNode(e.substr(n+3)));case"[":e=JSON.parse(e);break;default:if(!r||!Array.isArray(e))return t.namedNode(e)}return t.quad(x(e[0],t,!0),x(e[1],t,!0),x(e[2],t,!0),e[3]&&x(e[3],t,!0))}function w(e,t){if("string"==typeof e)return e;if(e instanceof g&&"Quad"!==e.termType)return e.id;if(!e)return u.id;switch(e.termType){case"NamedNode":return e.value;case"BlankNode":return`_:${e.value}`;case"Variable":return`?${e.value}`;case"DefaultGraph":return"";case"Literal":return`"${e.value}"${e.language?`@${e.language}`:e.datatype&&e.datatype.value!==c.string?`^^${e.datatype.value}`:""}`;case"Quad":const r=[w(e.subject,!0),w(e.predicate,!0),w(e.object,!0)];return e.graph&&"DefaultGraph"!==e.graph.termType&&r.push(w(e.graph,!0)),t?r:JSON.stringify(r);default:throw new Error(`Unexpected termType: ${e.termType}`)}}u=new class extends g{constructor(){return super(""),u||this}get termType(){return"DefaultGraph"}equals(e){return this===e||!!e&&this.termType===e.termType}};class _ extends g{constructor(e,t,r,n){super(""),this._subject=e,this._predicate=t,this._object=r,this._graph=n||u}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 S(e,t,r,n){return new _(e,t,r,n)}const E="http://www.w3.org/ns/shacl#",I="http://www.w3.org/2001/XMLSchema#",T="http://www.w3.org/1999/02/22-rdf-syntax-ns#",k="http://www.w3.org/2000/01/rdf-schema#",j="http://www.w3.org/2004/02/skos/core#",A="http://www.w3.org/2002/07/owl#",C=f.namedNode("shapes"),N=f.namedNode(T+"type"),R=f.namedNode("http://purl.org/dc/terms/conformsTo"),O=f.namedNode(k+"subClassOf"),L=f.namedNode(j+"broader"),$=f.namedNode(A+"imports"),D=f.namedNode(A+"NamedIndividual"),P=f.namedNode(E+"NodeShape"),M=f.namedNode(E+"IRI"),B=f.namedNode(E+"class"),F=f.namedNode(E+"targetClass"),q=f.namedNode(E+"nodeKind");function U(e,t,r=E,n){let i="";const o=function(e,t,r=E,n){let i;const o=r+t;if(null==n?void 0:n.length){for(const t of n)for(const r of e)if(r.predicate.value===o){if(r.object.id.endsWith(`@${t}`))return r.object;r.object.id.indexOf("@")<0?i=r.object:i||(i=r.object)}}else for(const t of e)if(t.predicate.value===o)return t.object;return i}(e,t,r,n);return o&&(i=o.value),i}function z(e,t){return U(e,"prefLabel",j,t)||U(e,"label",k,t)}function H(e,t,r,n){const i=[];for(const o of e)i.push({value:o,label:z(t.getQuads(o,null,null,null),r),indent:n});return i}function V(e,t){for(const r in t)e=e.replace(t[r],"");return e}function G(e,t,r,n,i=new Set){for(const o of t.owlImports)i.has(o.id)||(i.add(o.id),n.push(...r.getSubjects(N,e,o)));t.parent&&G(e,t.parent,r,n,i)}function W(e,t,r=0){const n=t.config.shapesGraph.getSubjects(N,e,C);n.push(...t.config.dataGraph.getSubjects(N,e,null)),G(e,t,t.config.shapesGraph,n);const i=H(n,t.config.shapesGraph,t.config.languages,r);for(const n of t.config.shapesGraph.getSubjects(O,e,null))i.push(...W(n,t,r+1));if(t.config.shapesGraph.getQuads(e,N,D,null).length>0){i.push(...H([e],t.config.shapesGraph,t.config.languages,r));for(const n of t.config.shapesGraph.getSubjects(L,e,null))i.push(...W(n,t,r+1))}return i}function J(e){let t;try{t=new URL(e)}catch(e){return!1}return"http:"===t.protocol||"https:"===t.protocol}function Q(e,t,r){const n=document.createElement("div");n.classList.add("shacl-or-constraint");const i=[];if(i.push({label:"--- please choose ---",value:""}),t instanceof Ie){const o=[];for(let n=0;n<e.length;n++){const a=new fe(e[n],t,r);o.push(a),i.push({label:a.template.label,value:n.toString()})}const a=r.theme.createListEditor("Please choose",null,!1,i),s=a.querySelector(".editor");s.onchange=()=>{s.value&&n.replaceWith(o[parseInt(s.value)])},n.appendChild(a)}else{const o=[];for(let t=0;t<e.length;t++){const n=r.shapesGraph.getQuads(e[t],null,null,null);n.length&&(o.push(n),i.push({label:z(n,r.languages)||V(n[0].predicate.value,r.prefixes)+" = "+V(n[0].object.value,r.prefixes),value:t.toString()}))}const a=r.theme.createListEditor(t.template.label+"?",null,!1,i,t.template),s=a.querySelector(".editor");s.onchange=()=>{s.value&&n.replaceWith(ge(t.template.clone().merge(o[parseInt(s.value)]),void 0,!0))},n.appendChild(a)}return n}const X={[`${E}name`]:(e,t)=>{const r=t;e.name&&r.language!==e.config.attributes.language||(e.name=r)},[`${E}description`]:(e,t)=>{const r=t;e.description&&r.language!==e.config.attributes.language||(e.description=r)},[`${E}path`]:(e,t)=>{e.path=t.value},[`${E}node`]:(e,t)=>{e.node=t},[`${E}datatype`]:(e,t)=>{e.datatype=t},[`${E}nodeKind`]:(e,t)=>{e.nodeKind=t},[`${E}minCount`]:(e,t)=>{e.minCount=parseInt(t.value)},[`${E}maxCount`]:(e,t)=>{e.maxCount=parseInt(t.value)},[`${E}minLength`]:(e,t)=>{e.minLength=parseInt(t.value)},[`${E}maxLength`]:(e,t)=>{e.maxLength=parseInt(t.value)},[`${E}minInclusive`]:(e,t)=>{e.minInclusive=parseInt(t.value)},[`${E}maxInclusive`]:(e,t)=>{e.maxInclusive=parseInt(t.value)},[`${E}minExclusive`]:(e,t)=>{e.minExclusive=parseInt(t.value)},[`${E}maxExclusive`]:(e,t)=>{e.maxExclusive=parseInt(t.value)},[`${E}pattern`]:(e,t)=>{e.pattern=t.value},[`${E}order`]:(e,t)=>{e.order=parseInt(t.value)},"http://datashapes.org/dash#singleLine":(e,t)=>{e.singleLine="true"===t.value},"http://www.w3.org/ns/oa#styleClass":(e,t)=>{e.cssClass=t.value},[`${E}and`]:(e,t)=>{e.shaclAnd=t.value},[`${E}in`]:(e,t)=>{e.shaclIn=t.value},[`${E}languageIn`]:(e,t)=>{e.languageIn=e.config.lists[t.value],e.datatype=f.namedNode(T+"langString")},[`${E}defaultValue`]:(e,t)=>{e.defaultValue=t},[`${E}hasValue`]:(e,t)=>{e.hasValue=t},[$.id]:(e,t)=>{e.owlImports.push(t)},[B.id]:(e,t)=>{e.class=t;const r=e.config.shapesGraph.getSubjects(F,t,null);r.length>0&&(e.node=r[0])},[`${E}or`]:(e,t)=>{const r=e.config.lists[t.value];(null==r?void 0:r.length)?e.shaclOr=r:console.error("list not found:",t.value,"existing lists:",e.config.lists)}};class K{constructor(e,t,r){this.label="",this.owlImports=[],this.parent=t,this.config=r,this.merge(e)}merge(e){var t,r;for(const r of e)null===(t=X[r.predicate.id])||void 0===t||t.call(this,this,r.object);if(this.label=(null===(r=this.name)||void 0===r?void 0:r.value)||z(e,this.config.languages),this.label||this.shaclAnd||(this.label=this.path?V(this.path,this.config.prefixes):"unknown"),(this.node||this.shaclAnd)&&(this.extendedShapes=[],this.node&&this.extendedShapes.push(this.node),this.shaclAnd)){const e=this.config.lists[this.shaclAnd];if(null==e?void 0:e.length)for(const t of e)this.extendedShapes.push(t)}return this}clone(){const e=Object.assign({},this);return e.owlImports=[...this.owlImports],this.languageIn&&(e.languageIn=[...this.languageIn]),this.shaclOr&&(e.shaclOr=[...this.shaclOr]),e.merge=this.merge.bind(e),e.clone=this.clone.bind(e),e}}class Y{constructor(e){let t="form { box-sizing: border-box; display:block; --label-width: 8em; --caret-size: 10px; }\nform.mode-edit { padding-left: 1em; }\nform *, form ::after, form ::before { box-sizing: inherit; }\nshacl-node, .shacl-group { display: flex; flex-direction: column; width: 100%; position: relative; }\nshacl-node .control-button { text-decoration: none; cursor: pointer; border: 1px solid transparent; border-radius: 4px; padding: 2px 4px; }\nshacl-node .control-button:hover { border-color: inherit; }\nshacl-node .remove-button { margin-left: 4px; }\nshacl-node .add-button { font-size: 0.8rem; color: #555; margin: 4px 24px 0 0; }\nshacl-node .add-button:before { content: '+'; margin-right: 0.2em; }\nshacl-node .add-button:hover { color: inherit; }\nshacl-node h1 { font-size: 1.1rem; border-bottom: 1px solid; margin-top: 4px; color: #555; }\nshacl-property { display: flex; flex-direction: column; align-items: end; position: relative; }\nshacl-property:not(.may-add) > .add-button { display: none; }\nshacl-property:not(.may-remove) > .property-instance > .remove-button:not(.persistent) { visibility: hidden; }\nshacl-property:not(.may-remove) > .shacl-or-constraint > .remove-button:not(.persistent) { visibility: hidden; }\n.shacl-group { margin-bottom: 1em; padding-bottom: 1em; }\n.mode-view .shacl-group:not(:has(shacl-property)) { display: none; }\n.property-instance, .shacl-or-constraint { display: flex; align-items: flex-start; padding: 4px 0; width: 100%; position: relative; }\n.shacl-or-constraint label { display: inline-block; word-break: break-word; width: var(--label-width); line-height: 1em; padding-top: 0.15em; padding-right: 1em; flex-shrink: 0; position: relative; }\n.property-instance label[title] { cursor: help; text-decoration: underline dashed #AAA; }\n.mode-edit .property-instance label.required::before { color: red; content: '\\2736'; font-size: 0.6rem; position: absolute; left: -1.4em; top: 0.15rem; }\n.property-instance.valid::before { position: absolute; left: calc(var(--label-width) - 1em); top: 6px; color: green; content: '\\2713'; }\n.editor:not([type='checkbox']), .shacl-or-constraint select { flex-grow: 1; }\n.shacl-or-constraint select { border: 1px solid #DDD; padding: 2px 4px; }\nselect { overflow: hidden; text-overflow: ellipsis; }\ntextarea.editor { resize: vertical; }\n.lang-chooser { position: absolute; top: 5px; right: 28px; border: 0; background-color: #e9e9ed; padding: 2px 4px; max-width: 40px; width: 40px; box-sizing: content-box; }\n.lang-chooser+.editor { padding-right: 55px; }\n.validation-error { position: absolute; left: calc(var(--label-width) - 1em); top: 6px; color: red; cursor: help; }\n.validation-error::before { content: '\\26a0' }\n.validation-error.node { left: -1em; }\n.invalid > .editor { border-color: red !important; }\n.ml-0 { margin-left: 0 !important; }\n.pr-0 { padding-right: 0 !important; }\n.mode-view .property-instance:not(:first-child) > label { visibility: hidden; }\n.mode-view .property-instance label { width: var(--label-width); }\n\n.d-flex { display: flex; }\n.lang { opacity: 0.65; font-size: 0.6em; }\na, a:visited { color: inherit; }\n\n.fadeIn, .fadeOut { animation: fadeIn 0.2s ease-out; }\n.fadeOut { animation-direction: reverse; animation-timing-function: ease-out;}\n@keyframes fadeIn {\n 0% { opacity: 0; transform: scaleY(0.8); }\n 100% { opacity: 1; transform: scaleY(1); }\n}\n \n.collapsible > .activator { display: flex; justify-content: space-between; align-items: center; cursor: pointer; width: 100%; border: 0; padding: 8px 0; transition: 0.2s; }\n.collapsible > .activator:hover, .collapsible.open > .activator { background-color: #F5F5F5; }\n.collapsible > .activator::after { content:''; width: var(--caret-size); height: var(--caret-size); border-style: none solid solid none; border-width: calc(0.3 * var(--caret-size)); transform: rotate(45deg); transition: transform .15s ease-out; margin-right: calc(0.5 * var(--caret-size)); }\n.collapsible.open > .activator::after { transform: rotate(225deg); }\n.collapsible > *:not(.activator) { transition: all 0.2s ease-out; opacity: 1; }\n.collapsible:not(.open) > *:not(.activator) { max-height: 0; padding: 0; opacity: 0; overflow: hidden; }\n.collapsible > .property-instance > shacl-node > h1 { display: none; }\n.collapsible.open > .property-instance:nth-child(odd) { background-color: #F5F5F5; }\n.ref-link { cursor: pointer; }\n.ref-link:hover { text-decoration: underline; }\n.node-id-display { color: #999; font-size: 11px; }";e&&(t+="\n"+e),this.stylesheet=new CSSStyleSheet,this.stylesheet.replaceSync(t)}apply(e){}createViewer(e,t,r){const n=document.createElement("div"),i=document.createElement("label");i.innerHTML=e+":",r.description&&i.setAttribute("title",r.description.value),n.appendChild(i);let o,a=t.value,s=null;if(t instanceof m){const e=r.config.shapesGraph.getQuads(a,null,null,null);if(e.length){const t=z(e,r.config.languages);t&&(a=t)}}else t instanceof v&&(t.language?(s=document.createElement("span"),s.classList.add("lang"),s.innerText=`@${t.language}`):t.datatype.value===`${I}date`?a=new Date(Date.parse(t.value)).toDateString():t.datatype.value===`${I}dateTime`&&(a=new Date(Date.parse(t.value)).toLocaleString()));return J(t.value)?(o=document.createElement("a"),o.setAttribute("href",t.value)):o=document.createElement("div"),o.classList.add("d-flex"),o.innerText=a,s&&o.appendChild(s),n.appendChild(o),n}}function Z(e){return!!e&&"DefaultGraph"===e.termType}const ee=f.defaultGraph(),{rdf:te,xsd:re}=l,ne=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,ie=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,oe={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class ae extends g{equals(e){return e===this}}class se{constructor(e,t){if(this._prefixRegex=/$0^/,e&&"function"!=typeof e.write&&(t=e,e=null),t=t||{},this._lists=t.lists,e)this._outputStream=e,this._endStream=void 0===t.end||!!t.end;else{let e="";this._outputStream={write(t,r,n){e+=t,n&&n()},end:t=>{t&&t(null,e)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(t.format)?(this._lineMode=!0,this._writeQuad=this._writeQuadLine):(this._lineMode=!1,this._graph=ee,this._prefixIRIs=Object.create(null),t.prefixes&&this.addPrefixes(t.prefixes),t.baseIRI&&(this._baseMatcher=new RegExp(`^${de(t.baseIRI)}${t.baseIRI.endsWith("/")?"":"[#?]"}`),this._baseLength=t.baseIRI.length))}get _inDefaultGraph(){return ee.equals(this._graph)}_write(e,t){this._outputStream.write(e,"utf8",t)}_writeQuad(e,t,r,n,i){try{n.equals(this._graph)||(this._write((null===this._subject?"":this._inDefaultGraph?".\n":"\n}\n")+(ee.equals(n)?"":`${this._encodeIriOrBlank(n)} {\n`)),this._graph=n,this._subject=null),e.equals(this._subject)?t.equals(this._predicate)?this._write(`, ${this._encodeObject(r)}`,i):this._write(`;\n ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i):this._write(`${(null===this._subject?"":".\n")+this._encodeSubject(this._subject=e)} ${this._encodePredicate(this._predicate=t)} ${this._encodeObject(r)}`,i)}catch(e){i&&i(e)}}_writeQuadLine(e,t,r,n,i){delete this._prefixMatch,this._write(this.quadToString(e,t,r,n),i)}quadToString(e,t,r,n){return`${this._encodeSubject(e)} ${this._encodeIriOrBlank(t)} ${this._encodeObject(r)}${n&&n.value?` ${this._encodeIriOrBlank(n)} .\n`:" .\n"}`}quadsToString(e){let t="";for(const r of e)t+=this.quadToString(r.subject,r.predicate,r.object,r.graph);return t}_encodeSubject(e){return"Quad"===e.termType?this._encodeQuad(e):this._encodeIriOrBlank(e)}_encodeIriOrBlank(e){if("NamedNode"!==e.termType)return this._lists&&e.value in this._lists&&(e=this.list(this._lists[e.value])),"id"in e?e.id:`_:${e.value}`;let t=e.value;this._baseMatcher&&this._baseMatcher.test(t)&&(t=t.substr(this._baseLength)),ne.test(t)&&(t=t.replace(ie,le));const r=this._prefixRegex.exec(t);return r?r[1]?this._prefixIRIs[r[1]]+r[2]:t:`<${t}>`}_encodeLiteral(e){let t=e.value;if(ne.test(t)&&(t=t.replace(ie,le)),e.language)return`"${t}"@${e.language}`;if(this._lineMode){if(e.datatype.value===re.string)return`"${t}"`}else switch(e.datatype.value){case re.string:return`"${t}"`;case re.boolean:if("true"===t||"false"===t)return t;break;case re.integer:if(/^[+-]?\d+$/.test(t))return t;break;case re.decimal:if(/^[+-]?\d*\.\d+$/.test(t))return t;break;case re.double:if(/^[+-]?(?:\d+\.\d*|\.?\d+)[eE][+-]?\d+$/.test(t))return t}return`"${t}"^^${this._encodeIriOrBlank(e.datatype)}`}_encodePredicate(e){return e.value===te.type?"a":this._encodeIriOrBlank(e)}_encodeObject(e){switch(e.termType){case"Quad":return this._encodeQuad(e);case"Literal":return this._encodeLiteral(e);default:return this._encodeIriOrBlank(e)}}_encodeQuad({subject:e,predicate:t,object:r,graph:n}){return`<<${this._encodeSubject(e)} ${this._encodePredicate(t)} ${this._encodeObject(r)}${Z(n)?"":` ${this._encodeIriOrBlank(n)}`}>>`}_blockedWrite(){throw new Error("Cannot write because the writer has been closed.")}addQuad(e,t,r,n,i){void 0===r?this._writeQuad(e.subject,e.predicate,e.object,e.graph,t):"function"==typeof n?this._writeQuad(e,t,r,ee,n):this._writeQuad(e,t,r,n||ee,i)}addQuads(e){for(let t=0;t<e.length;t++)this.addQuad(e[t])}addPrefix(e,t,r){const n={};n[e]=t,this.addPrefixes(n,r)}addPrefixes(e,t){if(!this._prefixIRIs)return t&&t();let r=!1;for(let t in e){let n=e[t];"string"!=typeof n&&(n=n.value),r=!0,null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null,this._graph=""),this._prefixIRIs[n]=t+=":",this._write(`@prefix ${t} <${n}>.\n`)}if(r){let e="",t="";for(const r in this._prefixIRIs)e+=e?`|${r}`:r,t+=(t?"|":"")+this._prefixIRIs[r];e=de(e),this._prefixRegex=new RegExp(`^(?:${t})[^/]*$|^(${e})([_a-zA-Z][\\-_a-zA-Z0-9]*)$`)}this._write(r?"\n":"",t)}blank(e,t){let r,n,i=e;switch(void 0===e?i=[]:e.termType?i=[{predicate:e,object:t}]:"length"in e||(i=[e]),n=i.length){case 0:return new ae("[]");case 1:if(r=i[0],!(r.object instanceof ae))return new ae(`[ ${this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)} ]`);default:let t="[";for(let o=0;o<n;o++)r=i[o],r.predicate.equals(e)?t+=`, ${this._encodeObject(r.object)}`:(t+=`${(o?";\n ":"\n ")+this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)}`,e=r.predicate);return new ae(`${t}\n]`)}}list(e){const t=e&&e.length||0,r=new Array(t);for(let n=0;n<t;n++)r[n]=this._encodeObject(e[n]);return new ae(`(${r.join(" ")})`)}end(e){null!==this._subject&&(this._write(this._inDefaultGraph?".\n":"\n}\n"),this._subject=null),this._write=this._blockedWrite;let t=e&&((r,n)=>{t=null,e(r,n)});if(this._endStream)try{return this._outputStream.end(t)}catch(e){}t&&t()}}function le(e){let t=oe[e];return void 0===t&&(1===e.length?(t=e.charCodeAt(0).toString(16),t="\\u0000".substr(0,6-t.length)+t):(t=(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)+9216).toString(16),t="\\U00000000".substr(0,10-t.length)+t)),t}function de(e){return e.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&")}function ce(e){let t=e.shaclDatatype,r=e.value;return r?e.dataset.class||e.dataset.nodeKind===E+"IRI"?f.namedNode(r):(e.dataset.lang?t=e.dataset.lang:"number"===e.type?r=parseFloat(r):"file"===e.type&&e.binaryData?r=e.binaryData:"datetime-local"===e.type&&(r=new Date(r).toISOString().slice(0,19)),f.literal(r,t)):"checkbox"!==e.type&&"checkbox"!==e.getAttribute("type")||!(e.checked||parseInt(e.dataset.minCount||"0")>0)?void 0:f.literal(e.checked?"true":"false",t)}const ue={};function he(e){void 0===e.predicate&&void 0===e.datatype?console.warn('not registering plugin because it does neither define "predicate" nor "datatype"',e):ue[`${e.predicate}^${e.datatype}`]=e}class pe{constructor(e,t){this.predicate=e.predicate,this.datatype=e.datatype,t&&(this.stylesheet=new CSSStyleSheet,this.stylesheet.replaceSync(t))}createViewer(e,t){return e.config.theme.createViewer(e.label,t,e)}}class fe extends HTMLElement{constructor(e,t,r,n){var i;if(super(),this.template=new K(r.shapesGraph.getQuads(e,null,null,null),t,r),void 0!==this.template.order&&(this.style.order=`${this.template.order}`),this.template.cssClass&&this.classList.add(this.template.cssClass),r.editMode&&(this.addButton=document.createElement("a"),this.addButton.innerText=this.template.label,this.addButton.title="Add "+this.template.label,this.addButton.classList.add("control-button","add-button"),this.addButton.addEventListener("click",(e=>{const t=this.addPropertyInstance();t.classList.add("fadeIn"),this.updateControls(),function(e){var t;null===(t=e.querySelector("input,select,textarea"))||void 0===t||t.focus()}(t),setTimeout((()=>{t.classList.remove("fadeIn")}),200)})),this.appendChild(this.addButton)),this.template.path){const e=n?r.dataGraph.getQuads(n,this.template.path,null,null):[];let t=!1;for(const r of e)this.addPropertyInstance(r.object),this.template.hasValue&&r.object.equals(this.template.hasValue)&&(t=!0);r.editMode&&this.template.hasValue&&!t&&this.addPropertyInstance(this.template.hasValue)}if(r.editMode&&(this.addEventListener("change",(()=>{this.updateControls()})),this.updateControls()),(null===(i=this.template.extendedShapes)||void 0===i?void 0:i.length)&&null!==this.template.config.attributes.collapse&&(!this.template.maxCount||this.template.maxCount>1)&&(r.editMode||this.childElementCount>0)){const e=this;e.classList.add("collapsible"),"open"===this.template.config.attributes.collapse&&e.classList.add("open");const t=document.createElement("h1");t.classList.add("activator"),t.innerText=this.template.label,t.addEventListener("click",(()=>{e.classList.toggle("open")})),this.prepend(t)}}addPropertyInstance(e){var t;let r;return(null===(t=this.template.shaclOr)||void 0===t?void 0:t.length)?e?r=ge(function(e,t){if(!e.shaclOr)return console.warn("can't resolve sh:or because template has no options",e),e;if(t instanceof v){const r=t.datatype;for(const t of e.shaclOr){const n=e.config.shapesGraph.getQuads(t,null,null,null);for(const t of n)if(t.predicate.value===`${E}datatype`&&t.object.equals(r))return e.clone().merge(n)}}else{let r=e.config.dataGraph.getObjects(t,N,null);r.push(...e.config.shapesGraph.getObjects(t,N,null));for(const t of e.shaclOr){const n=e.config.shapesGraph.getQuads(t,null,null,null);for(const t of n)if(r.length>0){if(t.predicate.value===`${E}node`)for(const i of r)if(e.config.shapesGraph.getQuads(t.object,F,i,null).length>0)return e.clone().merge(n);if(t.predicate.equals(B))for(const i of r)if(t.object.equals(i))return e.clone().merge(n)}else if(t.predicate.equals(q)&&t.object.equals(M))return e.clone().merge(n)}}return console.error("couldn't resolve sh:or for value",t),e}(this.template,e),e,!0):(r=Q(this.template.shaclOr,this,this.template.config),me(r,"")):r=ge(this.template,e),this.template.config.editMode?this.insertBefore(r,this.addButton):this.appendChild(r),r}updateControls(){var e;let t,r=this.querySelectorAll(":scope > .property-instance, :scope > .shacl-or-constraint, :scope > shacl-node").length;0===r&&(!(null===(e=this.template.extendedShapes)||void 0===e?void 0:e.length)||void 0!==this.template.minCount&&this.template.minCount>0)&&(this.addPropertyInstance(),r=this.querySelectorAll(":scope > .property-instance, :scope > .shacl-or-constraint, :scope > shacl-node").length),t=void 0!==this.template.minCount?r>this.template.minCount:this.template.extendedShapes&&this.template.extendedShapes.length>0||r>1;const n=void 0===this.template.maxCount||r<this.template.maxCount;this.classList.toggle("may-remove",t),this.classList.toggle("may-add",n)}toRDF(e,t){for(const r of this.querySelectorAll(":scope > .property-instance")){const n=f.namedNode(r.dataset.path);if(r.firstChild instanceof Ie){e.size;const i=r.firstChild.toRDF(e);e.addQuad(t,n,i)}else{const i=ce(r.querySelector(".editor"));i&&e.addQuad(t,n,i)}}}}function ge(e,t,r=!1){var n,i;let o;if(null===(n=e.extendedShapes)||void 0===n?void 0:n.length){o=document.createElement("div"),o.classList.add("property-instance");for(const r of e.extendedShapes)o.appendChild(new Ie(r,e.config,t,e.parent,e.nodeKind,e.label))}else{const r=function(e,t){let r=ue[`${e}^${t}`];return r||(r=ue[`${e}^undefined`],r||ue[`undefined^${t}`])}(e.path,null===(i=e.datatype)||void 0===i?void 0:i.value);o=r?e.config.editMode?r.createEditor(e,t):r.createViewer(e,t):function(e,t){var r,n,i;if(e.config.editMode){const o=void 0!==e.minCount&&e.minCount>0;if(e.class)return e.config.theme.createListEditor(e.label,t,o,W(e.class,e),e);if(e.shaclIn){const r=e.config.lists[e.shaclIn];if(null==r?void 0:r.length){const n=H(r,e.config.shapesGraph,e.config.languages);return e.config.theme.createListEditor(e.label,t,o,n,e)}console.error("list not found:",e.shaclIn,"existing lists:",e.config.lists)}if((null===(r=e.datatype)||void 0===r?void 0:r.value)===`${T}langString`||(null===(n=e.languageIn)||void 0===n?void 0:n.length))return e.config.theme.createLangStringEditor(e.label,t,o,e);switch(null===(i=e.datatype)||void 0===i?void 0:i.value.replace(I,"")){case"integer":case"float":case"double":case"decimal":return e.config.theme.createNumberEditor(e.label,t,o,e);case"date":case"dateTime":return e.config.theme.createDateEditor(e.label,t,o,e);case"boolean":return e.config.theme.createBooleanEditor(e.label,t,o,e);case"base64Binary":return e.config.theme.createFileEditor(e.label,t,o,e)}return e.config.theme.createTextEditor(e.label,t,o,e)}{if(t)return e.config.theme.createViewer(e.label,t,e);const r=document.createElement("div");return r.innerHTML="No value",r}}(e,t||null),o.classList.add("property-instance")}return e.config.editMode&&me(o,e.label,r),o.dataset.path=e.path,o}function me(e,t,r=!1){const n=document.createElement("a");n.innerText="×",n.classList.add("control-button","btn","remove-button"),n.title="Remove "+t,n.addEventListener("click",(t=>{e.classList.remove("fadeIn"),e.classList.add("fadeOut"),setTimeout((()=>{const t=e.parentElement;e.remove(),null==t||t.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))}),200)})),r&&n.classList.add("persistent"),e.appendChild(n)}function ve(e,t){const r=document.createElement("div");r.dataset.subject=e,r.classList.add("shacl-group");let n=e;const i=t.shapesGraph.getQuads(e,null,null,null),o=U(i,"label",k,t.languages);o&&(n=o);const a=U(i,"order");a&&(r.style.order=a);const s=document.createElement("h1");return s.innerText=n,r.appendChild(s),null!==t.attributes.collapse&&(r.classList.add("collapsible"),"open"===t.attributes.collapse&&r.classList.add("open"),s.classList.add("activator"),s.addEventListener("click",(()=>{r.classList.toggle("open")}))),r}window.customElements.define("shacl-property",fe);const be={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var ye,xe=new Uint8Array(16);function we(){if(!ye&&!(ye="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ye(xe)}for(var _e=[],Se=0;Se<256;++Se)_e.push((Se+256).toString(16).slice(1));const Ee=function(e,t,r){if(be.randomUUID&&!t&&!e)return be.randomUUID();var n=(e=e||{}).random||(e.rng||we)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return function(e,t=0){return(_e[e[t+0]]+_e[e[t+1]]+_e[e[t+2]]+_e[e[t+3]]+"-"+_e[e[t+4]]+_e[e[t+5]]+"-"+_e[e[t+6]]+_e[e[t+7]]+"-"+_e[e[t+8]]+_e[e[t+9]]+"-"+_e[e[t+10]]+_e[e[t+11]]+_e[e[t+12]]+_e[e[t+13]]+_e[e[t+14]]+_e[e[t+15]]).toLowerCase()}(n)};class Ie extends HTMLElement{constructor(e,t,r,n,i,o){super(),this.owlImports=[],this.parent=n,this.config=t,this.shaclSubject=e;let a=r;if(!a){if(!i){const r=t.shapesGraph.getObjects(e,`${E}nodeKind`,null);r.length&&(i=r[0])}a=void 0===i&&t.attributes.valuesNamespace||(null==i?void 0:i.id)===`${E}IRI`?f.namedNode(t.attributes.valuesNamespace+Ee()):f.blankNode(Ee())}this.nodeId=a;const s=JSON.stringify([e,r]);if(r&&t.renderedNodes.has(s)){if(o&&null===t.attributes.collapse){const e=document.createElement("label");e.innerText=o,this.appendChild(e)}const e=document.createElement("a");e.innerText=r.id,e.classList.add("ref-link"),e.onclick=()=>{var e;null===(e=this.config.form.querySelector(`shacl-node[data-node-id='${this.nodeId.id}']`))||void 0===e||e.scrollIntoView()},this.appendChild(e),this.style.flexDirection="row"}else{r&&t.renderedNodes.add(s),this.dataset.nodeId=this.nodeId.id;const n=t.shapesGraph.getQuads(e,null,null,null);let i;if(null!==this.config.attributes.showNodeIds){const e=document.createElement("div");e.innerText=`id: ${this.nodeId.id}`,e.classList.add("node-id-display"),this.appendChild(e)}for(const e of n)switch(e.predicate.id){case`${E}property`:let n=this;const o=t.shapesGraph.getQuads(e.object,`${E}group`,null,null);if(o.length>0){const e=o[0].object.value;if(t.groups.indexOf(e)>-1){let r=this.querySelector(`:scope > .shacl-group[data-subject='${e}']`);r||(r=ve(e,t),this.appendChild(r)),n=r}else console.warn("ignoring unknown group reference",o[0],"existing groups:",t.groups)}setTimeout((()=>{const i=new fe(e.object,this,t,r);i.childElementCount>0&&n.appendChild(i)}));break;case`${E}and`:if(i=t.lists[e.object.value],null==i?void 0:i.length)for(const e of i)this.prepend(new Ie(e,t,r,this));else console.error("list not found:",e.object.value,"existing lists:",t.lists);break;case`${E}node`:this.prepend(new Ie(e.object,t,r,this));break;case`${E}targetClass`:this.targetClass=e.object;break;case $.id:this.owlImports.push(e.object);break;case`${E}or`:i=t.lists[e.object.value],(null==i?void 0:i.length)?this.appendChild(Q(i,this,t)):console.error("list not found:",e.object.value,"existing lists:",t.lists)}if(o){const e=document.createElement("h1");e.innerText=o,this.prepend(e)}}}toRDF(e,t){t||(t=this.nodeId);for(const r of this.querySelectorAll(":scope > shacl-node, :scope > .shacl-group > shacl-node, :scope > shacl-property, :scope > .shacl-group > shacl-property"))r.toRDF(e,t);return this.targetClass&&e.addQuad(t,N,this.targetClass),this.config.attributes.generateNodeShapeReference&&!this.parent&&e.addQuad(t,f.namedNode(this.config.attributes.generateNodeShapeReference),this.shaclSubject),t}}window.customElements.define("shacl-node",Ie);var Te=r(9198);const ke=Symbol("iter");function je(e,t,r=4){if(0===r)return Object.assign(e,t);for(const n in t)e[n]=je(e[n]||Object.create(null),t[n],r-1);return e}function Ae(e,t,r=4){let n=!1;for(const i in e)if(i in t){const o=0===r?null:Ae(e[i],t[i],r-1);if(!1!==o)n=n||Object.create(null),n[i]=o;else if(3===r)return!1}return n}class Ce{constructor(e={}){this._id=1,this._ids=Object.create(null),this._ids[""]=1,this._entities=Object.create(null),this._entities[1]="",this._blankNodeIndex=0,this._factory=e.factory||f}_termFromId(e){if("."===e[0]){const t=this._entities,r=e.split(".");return this._factory.quad(this._termFromId(t[r[1]]),this._termFromId(t[r[2]]),this._termFromId(t[r[3]]),r[4]&&this._termFromId(t[r[4]]))}return x(e,this._factory)}_termToNumericId(e){if("Quad"===e.termType){const t=this._termToNumericId(e.subject),r=this._termToNumericId(e.predicate),n=this._termToNumericId(e.object);let i;return t&&r&&n&&(Z(e.graph)||(i=this._termToNumericId(e.graph)))&&this._ids[i?`.${t}.${r}.${n}.${i}`:`.${t}.${r}.${n}`]}return this._ids[w(e)]}_termToNewNumericId(e){const t=e&&"Quad"===e.termType?`.${this._termToNewNumericId(e.subject)}.${this._termToNewNumericId(e.predicate)}.${this._termToNewNumericId(e.object)}${Z(e.graph)?"":`.${this._termToNewNumericId(e.graph)}`}`:w(e);return this._ids[t]||(this._ids[this._entities[++this._id]=t]=this._id)}createBlankNode(e){let t,r;if(e)for(t=e=`_:${e}`,r=1;this._ids[t];)t=e+r++;else do{t="_:b"+this._blankNodeIndex++}while(this._ids[t]);return this._ids[t]=++this._id,this._entities[this._id]=t,this._factory.blankNode(t.substr(2))}}class Ne{constructor(e,t){this._size=0,this._graphs=Object.create(null),t||!e||e[0]||(t=e,e=null),t=t||{},this._factory=t.factory||f,this._entityIndex=t.entityIndex||new Ce({factory:this._factory}),this._entities=this._entityIndex._entities,this._termFromId=this._entityIndex._termFromId.bind(this._entityIndex),this._termToNumericId=this._entityIndex._termToNumericId.bind(this._entityIndex),this._termToNewNumericId=this._entityIndex._termToNewNumericId.bind(this._entityIndex),e&&this.addQuads(e)}get size(){let e=this._size;if(null!==e)return e;e=0;const t=this._graphs;let r,n;for(const i in t)for(const o in r=t[i].subjects)for(const t in n=r[o])e+=Object.keys(n[t]).length;return this._size=e}_addToIndex(e,t,r,n){const i=e[t]||(e[t]={}),o=i[r]||(i[r]={}),a=n in o;return a||(o[n]=null),!a}_removeFromIndex(e,t,r,n){const i=e[t],o=i[r];delete o[n];for(const e in o)return;delete i[r];for(const e in i)return;delete e[t]}*_findInIndex(e,t,r,n,i,o,a,s){let l,d,c;const u=this._entities,h=this._termFromId(u[s]),p={subject:null,predicate:null,object:null};t&&((l=e,e={})[t]=l[t]);for(const t in e)if(d=e[t]){p[i]=this._termFromId(u[t]),r&&((l=d,d={})[r]=l[r]);for(const e in d)if(c=d[e]){p[o]=this._termFromId(u[e]);const t=n?n in c?[n]:[]:Object.keys(c);for(let e=0;e<t.length;e++)p[a]=this._termFromId(u[t[e]]),yield this._factory.quad(p.subject,p.predicate,p.object,h)}}}_loop(e,t){for(const r in e)t(r)}_loopByKey0(e,t,r){let n,i;if(n=e[t])for(i in n)r(i)}_loopByKey1(e,t,r){let n,i;for(n in e)i=e[n],i[t]&&r(n)}_loopBy2Keys(e,t,r,n){let i,o,a;if((i=e[t])&&(o=i[r]))for(a in o)n(a)}_countInIndex(e,t,r,n){let i,o,a,s=0;t&&((i=e,e={})[t]=i[t]);for(const t in e)if(o=e[t]){r&&((i=o,o={})[r]=i[r]);for(const e in o)(a=o[e])&&(n?n in a&&s++:s+=Object.keys(a).length)}return s}_getGraphs(e){return"number"!=typeof(e=""===e?1:e&&(this._termToNumericId(e)||-1))?this._graphs:{[e]:this._graphs[e]}}_uniqueEntities(e){const t=Object.create(null);return r=>{r in t||(t[r]=!0,e(this._termFromId(this._entities[r],this._factory)))}}add(e){return this.addQuad(e),this}addQuad(e,t,r,n){t||(n=e.graph,r=e.object,t=e.predicate,e=e.subject),n=n?this._termToNewNumericId(n):1;let i=this._graphs[n];return i||(i=this._graphs[n]={subjects:{},predicates:{},objects:{}},Object.freeze(i)),e=this._termToNewNumericId(e),t=this._termToNewNumericId(t),r=this._termToNewNumericId(r),!!this._addToIndex(i.subjects,e,t,r)&&(this._addToIndex(i.predicates,t,r,e),this._addToIndex(i.objects,r,e,t),this._size=null,!0)}addQuads(e){for(let t=0;t<e.length;t++)this.addQuad(e[t])}delete(e){return this.removeQuad(e),this}has(e,t,r,n){return e&&e.subject&&({subject:e,predicate:t,object:r,graph:n}=e),!this.readQuads(e,t,r,n).next().done}import(e){return e.on("data",(e=>{this.addQuad(e)})),e}removeQuad(e,t,r,n){t||({subject:e,predicate:t,object:r,graph:n}=e),n=n?this._termToNumericId(n):1;const i=this._graphs;let o,a,s;if(!((e=e&&this._termToNumericId(e))&&(t=t&&this._termToNumericId(t))&&(r=r&&this._termToNumericId(r))&&(o=i[n])&&(a=o.subjects[e])&&(s=a[t])&&r in s))return!1;for(e in this._removeFromIndex(o.subjects,e,t,r),this._removeFromIndex(o.predicates,t,r,e),this._removeFromIndex(o.objects,r,e,t),null!==this._size&&this._size--,o.subjects)return!0;return delete i[n],!0}removeQuads(e){for(let t=0;t<e.length;t++)this.removeQuad(e[t])}remove(e){return e.on("data",(e=>{this.removeQuad(e)})),e}removeMatches(e,t,r,n){const i=new Te.Readable({objectMode:!0}),o=this.readQuads(e,t,r,n);return i._read=e=>{for(;e-- >0;){const{done:e,value:t}=o.next();if(e)return void i.push(null);i.push(t)}},this.remove(i)}deleteGraph(e){return this.removeMatches(null,null,null,e)}getQuads(e,t,r,n){return[...this.readQuads(e,t,r,n)]}*readQuads(e,t,r,n){const i=this._getGraphs(n);let o,a,s,l;if(!(e&&!(a=this._termToNumericId(e))||t&&!(s=this._termToNumericId(t))||r&&!(l=this._termToNumericId(r))))for(const e in i)(o=i[e])&&(a?l?yield*this._findInIndex(o.objects,l,a,s,"object","subject","predicate",e):yield*this._findInIndex(o.subjects,a,s,null,"subject","predicate","object",e):s?yield*this._findInIndex(o.predicates,s,l,null,"predicate","object","subject",e):l?yield*this._findInIndex(o.objects,l,null,null,"object","subject","predicate",e):yield*this._findInIndex(o.subjects,null,null,null,"subject","predicate","object",e))}match(e,t,r,n){return new Re(this,e,t,r,n,{entityIndex:this._entityIndex})}countQuads(e,t,r,n){const i=this._getGraphs(n);let o,a,s,l,d=0;if(e&&!(a=this._termToNumericId(e))||t&&!(s=this._termToNumericId(t))||r&&!(l=this._termToNumericId(r)))return 0;for(const n in i)(o=i[n])&&(d+=e?r?this._countInIndex(o.objects,l,a,s):this._countInIndex(o.subjects,a,s,l):t?this._countInIndex(o.predicates,s,l,a):this._countInIndex(o.objects,l,a,s));return d}forEach(e,t,r,n,i){this.some((t=>(e(t,this),!1)),t,r,n,i)}every(e,t,r,n,i){return!this.some((t=>!e(t,this)),t,r,n,i)}some(e,t,r,n,i){for(const o of this.readQuads(t,r,n,i))if(e(o))return!0;return!1}getSubjects(e,t,r){const n=[];return this.forSubjects((e=>{n.push(e)}),e,t,r),n}forSubjects(e,t,r,n){const i=this._getGraphs(n);let o,a,s;if(e=this._uniqueEntities(e),!(t&&!(a=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(o=i[n])&&(a?s?this._loopBy2Keys(o.predicates,a,s,e):this._loopByKey1(o.subjects,a,e):s?this._loopByKey0(o.objects,s,e):this._loop(o.subjects,e))}getPredicates(e,t,r){const n=[];return this.forPredicates((e=>{n.push(e)}),e,t,r),n}forPredicates(e,t,r,n){const i=this._getGraphs(n);let o,a,s;if(e=this._uniqueEntities(e),!(t&&!(a=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(o=i[n])&&(a?s?this._loopBy2Keys(o.objects,s,a,e):this._loopByKey0(o.subjects,a,e):s?this._loopByKey1(o.predicates,s,e):this._loop(o.predicates,e))}getObjects(e,t,r){const n=[];return this.forObjects((e=>{n.push(e)}),e,t,r),n}forObjects(e,t,r,n){const i=this._getGraphs(n);let o,a,s;if(e=this._uniqueEntities(e),!(t&&!(a=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(o=i[n])&&(a?s?this._loopBy2Keys(o.subjects,a,s,e):this._loopByKey1(o.objects,a,e):s?this._loopByKey0(o.predicates,s,e):this._loop(o.objects,e))}getGraphs(e,t,r){const n=[];return this.forGraphs((e=>{n.push(e)}),e,t,r),n}forGraphs(e,t,r,n){for(const i in this._graphs)this.some((t=>(e(t.graph),!0)),t,r,n,this._termFromId(this._entities[i]))}createBlankNode(e){return this._entityIndex.createBlankNode(e)}extractLists({remove:e=!1,ignoreErrors:t=!1}={}){const r={},n=t?()=>!0:(e,t)=>{throw new Error(`${e.value} ${t}`)},i=this.getQuads(null,l.rdf.rest,l.rdf.nil,null),o=e?[...i]:[];return i.forEach((t=>{const i=[];let a,s,d=!1;const c=t.graph;let u=t.subject;for(;u&&!d;){const e=this.getQuads(null,null,u,null),t=this.getQuads(u,null,null,null);let r,h=null,p=null,f=null;for(let i=0;i<t.length&&!d;i++)r=t[i],r.graph.equals(c)?a?d=n(u,"has non-list arcs out"):r.predicate.value===l.rdf.first?h?d=n(u,"has multiple rdf:first arcs"):o.push(h=r):r.predicate.value===l.rdf.rest?p?d=n(u,"has multiple rdf:rest arcs"):o.push(p=r):e.length?d=n(u,"can't be subject and object"):(a=r,s="subject"):d=n(u,"not confined to single graph");for(let t=0;t<e.length&&!d;++t)r=e[t],a?d=n(u,"can't have coreferences"):r.predicate.value===l.rdf.rest?f?d=n(u,"has incoming rdf:rest arcs"):f=r:(a=r,s="object");h?i.unshift(h.object):d=n(u,"has no list head"),u=f&&f.subject}d?e=!1:a&&(r[a[s].value]=i)})),e&&this.removeQuads(o),r}addAll(e){if(Array.isArray(e))this.addQuads(e);else if(e instanceof Ne&&e._entityIndex===this._entityIndex)0!==e._size&&(this._graphs=je(this._graphs,e._graphs),this._size=null);else for(const t of e)this.add(t);return this}contains(e){if(e===this)return!0;if(!(e instanceof Ne)||this._entityIndex!==e._entityIndex)return e.every((e=>this.has(e)));const t=this._graphs,r=e._graphs;let n,i,o,a,s;for(const e in r){if(!(n=t[e]))return!1;n=n.subjects;for(const t in i=r[e].subjects){if(!(o=n[t]))return!1;for(const e in a=i[t]){if(!(s=o[e]))return!1;for(const t in a[e])if(!(t in s))return!1}}}return!0}deleteMatches(e,t,r,n){for(const i of this.match(e,t,r,n))this.removeQuad(i);return this}difference(e){return e===this?new Ne({entityIndex:this._entityIndex}):this.filter((t=>!e.has(t)))}equals(e){return e===this||this.size===e.size&&this.contains(e)}filter(e){const t=new Ne({entityIndex:this._entityIndex});for(const r of this)e(r,this)&&t.add(r);return t}intersection(e){if(e===this){const e=new Ne({entityIndex:this._entityIndex});return e._graphs=je(Object.create(null),this._graphs),e._size=this._size,e}if(e instanceof Ne&&this._entityIndex===e._entityIndex){const t=new Ne({entityIndex:this._entityIndex}),r=Ae(e._graphs,this._graphs);return r&&(t._graphs=r,t._size=null),t}return this.filter((t=>e.has(t)))}map(e){const t=new Ne({entityIndex:this._entityIndex});for(const r of this)t.add(e(r,this));return t}reduce(e,t){const r=this.readQuads();let n=void 0===t?r.next().value:t;for(const t of r)n=e(n,t,this);return n}toArray(){return this.getQuads()}toCanonical(){throw new Error("not implemented")}toStream(){return this.match()}toString(){return(new se).quadsToString(this)}union(e){const t=new Ne({entityIndex:this._entityIndex});return t._graphs=je(Object.create(null),this._graphs),t._size=this._size,t.addAll(e),t}*[Symbol.iterator](){yield*this.readQuads()}}class Re extends Te.Readable{constructor(e,t,r,n,i,o){super({objectMode:!0}),Object.assign(this,{n3Store:e,subject:t,predicate:r,object:n,graph:i,options:o})}get filtered(){if(!this._filtered){const{n3Store:e,graph:t,object:r,predicate:n,subject:i}=this,o=this._filtered=new Ne({factory:e._factory,entityIndex:this.options.entityIndex});for(const a of e.readQuads(i,n,r,t))o.addQuad(a)}return this._filtered}get size(){return this.filtered.size}_read(e){e>0&&!this[ke]&&(this[ke]=this[Symbol.iterator]());const t=this[ke];for(;e-- >0;){const{done:e,value:r}=t.next();if(e)return void this.push(null);this.push(r)}}addAll(e){return this.filtered.addAll(e)}contains(e){return this.filtered.contains(e)}deleteMatches(e,t,r,n){return this.filtered.deleteMatches(e,t,r,n)}difference(e){return this.filtered.difference(e)}equals(e){return this.filtered.equals(e)}every(e,t,r,n,i){return this.filtered.every(e,t,r,n,i)}filter(e){return this.filtered.filter(e)}forEach(e,t,r,n,i){return this.filtered.forEach(e,t,r,n,i)}import(e){return this.filtered.import(e)}intersection(e){return this.filtered.intersection(e)}map(e){return this.filtered.map(e)}some(e,t,r,n,i){return this.filtered.some(e,t,r,n,i)}toCanonical(){return this.filtered.toCanonical()}toStream(){return this._filtered?this._filtered.toStream():this.n3Store.match(this.subject,this.predicate,this.object,this.graph)}union(e){return this._filtered?this._filtered.union(e):this.n3Store.match(this.subject,this.predicate,this.object,this.graph).addAll(e)}toArray(){return this._filtered?this._filtered.toArray():this.n3Store.getQuads(this.subject,this.predicate,this.object,this.graph)}reduce(e,t){return this.filtered.reduce(e,t)}toString(){return(new se).quadsToString(this)}add(e){return this.filtered.add(e)}delete(e){return this.filtered.delete(e)}has(e){return this.filtered.has(e)}match(e,t,r,n){return new Re(this.filtered,e,t,r,n,this.options)}*[Symbol.iterator](){yield*this._filtered||this.n3Store.readQuads(this.subject,this.predicate,this.object,this.graph)}}var Oe=r(8287),Le=r(9596),$e=r.n(Le);const{xsd:De}=l,Pe=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,Me={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},Be=/[\x00-\x20<>\\"\{\}\|\^\`]/,Fe={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},qe=/$0^/;class Ue{constructor(e){if(this._iri=/^<((?:[^ <>{}\\]|\\[uU])+)>[ \t]*/,this._unescapedIri=/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>[ \t]*/,this._simpleQuotedString=/^"([^"\\\r\n]*)"(?=[^"])/,this._simpleApostropheString=/^'([^'\\\r\n]*)'(?=[^'])/,this._langcode=/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\-])/i,this._prefix=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,this._prefixed=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?:[ \t]+|(?=\.?[,;!\^\s#()\[\]\{\}"'<>]))/,this._variable=/^\?(?:(?:[A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=[.,;!\^\s#()\[\]\{\}"'<>])/,this._blank=/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?:[ \t]+|(?=\.?[,;:\s#()\[\]\{\}"'<>]))/,this._number=/^[\-+]?(?:(\d+\.\d*|\.?\d+)[eE][\-+]?|\d*(\.)?)\d+(?=\.?[,;:\s#()\[\]\{\}"'<>])/,this._boolean=/^(?:true|false)(?=[.,;\s#()\[\]\{\}"'<>])/,this._keyword=/^@[a-z]+(?=[\s#<:])/i,this._sparqlKeyword=/^(?:PREFIX|BASE|GRAPH)(?=[\s#<])/i,this._shortPredicates=/^a(?=[\s#()\[\]\{\}"'<>])/,this._newline=/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,this._comment=/#([^\n\r]*)/,this._whitespace=/^[ \t]+/,this._endOfFile=/^(?:#[^\n\r]*)?$/,e=e||{},this._lineMode=!!e.lineMode){this._n3Mode=!1;for(const e in this)!(e in Fe)&&this[e]instanceof RegExp&&(this[e]=qe)}else this._n3Mode=!1!==e.n3;this.comments=!!e.comments,this._literalClosingPos=0}_tokenizeToEnd(e,t){let r=this._input,n=r.length;for(;;){let e,a;for(;e=this._newline.exec(r);)this.comments&&(a=this._comment.exec(e[0]))&&i("comment",a[1],"",this._line,e[0].length),r=r.substr(e[0].length,r.length),n=r.length,this._line++;if(!e&&(e=this._whitespace.exec(r))&&(r=r.substr(e[0].length,r.length)),this._endOfFile.test(r))return t&&(this.comments&&(a=this._comment.exec(r))&&i("comment",a[1],"",this._line,r.length),r=null,i("eof","","",this._line,0)),this._input=r;const s=this._line,l=r[0];let d="",c="",u="",h=null,p=0,f=!1;switch(l){case"^":if(r.length<3)break;if("^"!==r[1]){this._n3Mode&&(p=1,d="^");break}if(this._previousMarker="^^",r=r.substr(2),"<"!==r[0]){f=!0;break}case"<":if(h=this._unescapedIri.exec(r))d="IRI",c=h[1];else if(h=this._iri.exec(r)){if(c=this._unescape(h[1]),null===c||Be.test(c))return o(this);d="IRI"}else r.length>1&&"<"===r[1]?(d="<<",p=2):this._n3Mode&&r.length>1&&"="===r[1]&&(d="inverse",p=2,c=">");break;case">":r.length>1&&">"===r[1]&&(d=">>",p=2);break;case"_":((h=this._blank.exec(r))||t&&(h=this._blank.exec(`${r} `)))&&(d="blank",u="_",c=h[1]);break;case'"':if(h=this._simpleQuotedString.exec(r))c=h[1];else if(({value:c,matchLength:p}=this._parseLiteral(r)),null===c)return o(this);null===h&&0===p||(d="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(h=this._simpleApostropheString.exec(r))c=h[1];else if(({value:c,matchLength:p}=this._parseLiteral(r)),null===c)return o(this);null===h&&0===p||(d="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(h=this._variable.exec(r))&&(d="var",c=h[0]);break;case"@":"literal"===this._previousMarker&&(h=this._langcode.exec(r))?(d="langcode",c=h[1]):(h=this._keyword.exec(r))&&(d=h[0]);break;case".":if(1===r.length?t:r[1]<"0"||r[1]>"9"){d=".",p=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(h=this._number.exec(r)||t&&(h=this._number.exec(`${r} `)))&&(d="literal",c=h[0],u="string"==typeof h[1]?De.double:"string"==typeof h[2]?De.decimal:De.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(h=this._sparqlKeyword.exec(r))?d=h[0].toUpperCase():f=!0;break;case"f":case"t":(h=this._boolean.exec(r))?(d="literal",c=h[0],u=De.boolean):f=!0;break;case"a":(h=this._shortPredicates.exec(r))?(d="abbreviation",c="a"):f=!0;break;case"=":this._n3Mode&&r.length>1&&(d="abbreviation",">"!==r[1]?(p=1,c="="):(p=2,c=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"}":this._lineMode||(p=1,d=l);break;case"{":!this._lineMode&&r.length>=2&&("|"===r[1]?(d="{|",p=2):(d=l,p=1));break;case"|":r.length>=2&&"}"===r[1]&&(d="|}",p=2);break;default:f=!0}if(f&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(h=this._prefix.exec(r))?((h=this._prefixed.exec(r))||t&&(h=this._prefixed.exec(`${r} `)))&&(d="prefixed",u=h[1]||"",c=this._unescape(h[2])):(d="prefix",c=h[1]||"")),"^^"===this._previousMarker)switch(d){case"prefixed":d="type";break;case"IRI":d="typeIRI";break;default:d=""}if(!d)return t||!/^'''|^"""/.test(r)&&/\n|\r/.test(r)?o(this):this._input=r;const g=p||h[0].length,m=i(d,c,u,s,g);this.previousToken=m,this._previousMarker=d,r=r.substr(g,r.length)}function i(t,i,o,a,s){const l=r?n-r.length:n,d={type:t,value:i,prefix:o,line:a,start:l,end:l+s};return e(null,d),d}function o(t){e(t._syntaxError(/^\S*/.exec(r)[0]))}}_unescape(e){let t=!1;const r=e.replace(Pe,((e,r,n,i)=>{if("string"==typeof r)return String.fromCharCode(Number.parseInt(r,16));if("string"==typeof n){let e=Number.parseInt(n,16);return e<=65535?String.fromCharCode(Number.parseInt(n,16)):String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e))}return i in Me?Me[i]:(t=!0,"")}));return t?null:r}_parseLiteral(e){if(e.length>=3){const t=e.match(/^(?:"""|"|'''|'|)/)[0],r=t.length;let n=Math.max(this._literalClosingPos,r);for(;(n=e.indexOf(t,n))>0;){let t=0;for(;"\\"===e[n-t-1];)t++;if(t%2==0){const t=e.substring(r,n),i=t.split(/\r\n|\r|\n/).length-1,o=n+r;if(1===r&&0!==i||3===r&&this._lineMode)break;return this._line+=i,{value:this._unescape(t),matchLength:o}}n++}this._literalClosingPos=e.length-r+1}return{value:"",matchLength:0}}_syntaxError(e){this._input=null;const t=new Error(`Unexpected "${e}" on line ${this._line}.`);return t.context={token:void 0,line:this._line,previousToken:this.previousToken},t}_readStartingBom(e){return e.startsWith("\ufeff")?e.substr(1):e}tokenize(e,t){if(this._line=1,"string"==typeof e){if(this._input=this._readStartingBom(e),"function"!=typeof t){const e=[];let t;if(this._tokenizeToEnd(((r,n)=>r?t=r:e.push(n)),!0),t)throw t;return e}$e()((()=>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)}}let ze=0;class He{constructor(e){this._contextStack=[],this._graph=null,e=e||{},this._setBase(e.baseIRI),e.factory&&Ge(this,e.factory);const t="string"==typeof e.format?e.format.match(/\w*$/)[0].toLowerCase():"",r=/turtle/.test(t),n=/trig/.test(t),i=/triple/.test(t),o=/quad/.test(t),a=this._n3Mode=/n3/.test(t),s=i||o;(this._supportsNamedGraphs=!(r||a))||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(r||n||i||a),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 Ue({lineMode:s,n3:a}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){ze=0}_setBase(e){if(e){const t=e.indexOf("#");t>=0&&(e=e.substr(0,t)),this._base=e,this._basePath=e.indexOf("/")<0?e:e.replace(/[^\/?]*(?:\?.*)?$/,""),e=e.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=e[0],this._baseScheme=e[1]}else this._base="",this._basePath=""}_saveContext(e,t,r,n,i){const o=this._n3Mode;this._contextStack.push({type:e,subject:r,predicate:n,object:i,graph:t,inverse:!!o&&this._inversePredicate,blankPrefix:o?this._prefixes._:"",quantified:o?this._quantified:null}),o&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.value}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(e,t){const r=this._contextStack.pop();if(!r||r.type!==e)return this._error(`Unexpected ${t.type}`,t);this._subject=r.subject,this._predicate=r.predicate,this._object=r.object,this._graph=r.graph,this._n3Mode&&(this._inversePredicate=r.inverse,this._prefixes._=r.blankPrefix,this._quantified=r.quantified)}_readInTopContext(e){switch(e.type){case"eof":return null!==this._graph?this._error("Unclosed graph",e):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"PREFIX":this._sparqlStyle=!0;case"@prefix":return this._readPrefix;case"BASE":this._sparqlStyle=!0;case"@base":return this._readBaseIRI;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(e)}}_readEntity(e,t){let r;switch(e.type){case"IRI":case"typeIRI":const t=this._resolveIRI(e.value);if(null===t)return this._error("Invalid IRI",e);r=this._namedNode(t);break;case"type":case"prefixed":const n=this._prefixes[e.prefix];if(void 0===n)return this._error(`Undefined prefix "${e.prefix}:"`,e);r=this._namedNode(n+e.value);break;case"blank":r=this._blankNode(this._prefixes[e.prefix]+e.value);break;case"var":r=this._variable(e.value.substr(1));break;default:return this._error(`Expected entity but got ${e.type}`,e)}return!t&&this._n3Mode&&r.id in this._quantified&&(r=this._quantified[r.id]),r}_readSubject(e){switch(this._predicate=null,e.type){case"[":return this._saveContext("blank",this._graph,this._subject=this._blankNode(),null,null),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this.RDF_NIL,null,null),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._graph=this._blankNode(),null,null),this._readSubject):this._error("Unexpected graph",e);case"}":return this._readPunctuation(e);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier=this._blankNode,this._readQuantifierList):this._error('Unexpected "@forSome"',e);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier=this._variable,this._readQuantifierList):this._error('Unexpected "@forAll"',e);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",e);if(0===e.prefix.length)return this._literalValue=e.value,this._completeSubjectLiteral;this._subject=this._literal(e.value,this._namedNode(e.prefix));break;case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Unexpected RDF-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._blankNode(),null),this._readBlankNodeHead;case"blank":if(!this._n3Mode)return this._error("Disallowed blank node as predicate",e);default:if(void 0===(this._predicate=this._readEntity(e)))return}return this._readObject}_readObject(e){switch(e.type){case"literal":if(0===e.prefix.length)return this._literalValue=e.value,this._readDataTypeOrLang;this._object=this._literal(e.value,this._namedNode(e.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._blankNode()),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this._subject,this._predicate,this.RDF_NIL),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject):this._error("Unexpected RDF-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,r=null,n=this._readListItem;const i=this._subject,o=this._contextStack,a=o[o.length-1];switch(e.type){case"[":this._saveContext("blank",this._graph,r=this._blankNode(),this.RDF_FIRST,this._subject=t=this._blankNode()),n=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,r=this._blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext("list",e),0!==o.length&&"list"===o[o.length-1].type&&this._emit(this._subject,this._predicate,this._object,this._graph),null===this._predicate){if(n=this._readPredicate,this._subject===this.RDF_NIL)return n}else if(n=this._getContextEndReader(),this._object===this.RDF_NIL)return n;r=this.RDF_NIL;break;case"literal":0===e.prefix.length?(this._literalValue=e.value,n=this._readListItemDataTypeOrLang):(t=this._literal(e.value,this._namedNode(e.prefix)),n=this._getContextEndReader());break;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);default:if(void 0===(t=this._readEntity(e)))return}if(null===r&&(this._subject=r=this._blankNode()),null===i?null===a.predicate?a.subject=r:a.object=r:this._emit(i,this.RDF_REST,r,this._graph),null!==t){if(this._n3Mode&&("IRI"===e.type||"prefixed"===e.type))return this._saveContext("item",this._graph,r,this.RDF_FIRST,t),this._subject=t,this._predicate=null,this._getPathReader(this._readListItem);this._emit(r,this.RDF_FIRST,t,this._graph)}return n}_readDataTypeOrLang(e){return this._completeObjectLiteral(e,!1)}_readListItemDataTypeOrLang(e){return this._completeObjectLiteral(e,!0)}_completeLiteral(e){let t=this._literal(this._literalValue);switch(e.type){case"type":case"typeIRI":const r=this._readEntity(e);if(void 0===r)return;t=this._literal(this._literalValue,r),e=null;break;case"langcode":t=this._literal(this._literalValue,e.value),e=null}return{token:e,literal:t}}_completeSubjectLiteral(e){return this._subject=this._completeLiteral(e).literal,this._readPredicateOrNamedGraph}_completeObjectLiteral(e,t){const r=this._completeLiteral(e);if(r)return this._object=r.literal,t&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),null===r.token?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(r.token))}_readFormulaTail(e){return"}"!==e.type?this._readPunctuation(e):(null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext("formula",e),null===this._object?this._readPredicate:this._getContextEndReader())}_readPunctuation(e){let t,r=this._graph;const n=this._subject,i=this._inversePredicate;switch(e.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",e);if(this._n3Mode)return this._readFormulaTail(e);this._graph=null;case".":this._subject=null,t=this._contextStack.length?this._readSubject:this._readInTopContext,i&&(this._inversePredicate=!1);break;case";":t=this._readPredicate;break;case",":t=this._readObject;break;case"{|":if(!this._supportsRDFStar)return this._error("Unexpected RDF-star syntax",e);const o=this._predicate,a=this._object;this._subject=this._quad(n,o,a,this.DEFAULTGRAPH),t=this._readPredicate;break;case"|}":if("Quad"!==this._subject.termType)return this._error("Unexpected asserted triple closing",e);this._subject=null,t=this._readPunctuation;break;default:if(this._supportsQuads&&null===this._graph&&void 0!==(r=this._readEntity(e))){t=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}if(null!==n){const e=this._predicate,t=this._object;i?this._emit(t,e,n,r):this._emit(n,e,t,r)}return t}_readBlankNodePunctuation(e){let t;switch(e.type){case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}return this._emit(this._subject,this._predicate,this._object,this._graph),t}_readQuadPunctuation(e){return"."!==e.type?this._error("Expected dot to follow quad",e):this._readInTopContext}_readPrefix(e){return"prefix"!==e.type?this._error("Expected prefix to follow @prefix",e):(this._prefix=e.value,this._readPrefixIRI)}_readPrefixIRI(e){if("IRI"!==e.type)return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,e);const t=this._readEntity(e);return this._prefixes[this._prefix]=t.value,this._prefixCallback(this._prefix,t),this._readDeclarationPunctuation}_readBaseIRI(e){const t="IRI"===e.type&&this._resolveIRI(e.value);return t?(this._setBase(t),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",e)}_readNamedGraphLabel(e){switch(e.type){case"IRI":case"blank":case"prefixed":return this._readSubject(e),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",e)}}_readNamedGraphBlankLabel(e){return"]"!==e.type?this._error("Invalid graph label",e):(this._subject=this._blankNode(),this._readGraph)}_readDeclarationPunctuation(e){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(e)):"."!==e.type?this._error("Expected declaration to end with a dot",e):this._readInTopContext}_readQuantifierList(e){let t;switch(e.type){case"IRI":case"prefixed":if(void 0!==(t=this._readEntity(e,!0)))break;default:return this._error(`Unexpected ${e.type}`,e)}return this._explicitQuantifiers?(null===this._subject?this._emit(this._graph||this.DEFAULTGRAPH,this._predicate,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH):this._emit(this._subject,this.RDF_REST,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH),this._emit(this._subject,this.RDF_FIRST,t,this.QUANTIFIERS_GRAPH)):this._quantified[t.id]=this._quantifier(this._blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(e){return","===e.type?this._readQuantifierList:(this._explicitQuantifiers&&(this._emit(this._subject,this.RDF_REST,this.RDF_NIL,this.QUANTIFIERS_GRAPH),this._subject=null),this._readCallback=this._getContextEndReader(),this._readCallback(e))}_getPathReader(e){return this._afterPath=e,this._readPath}_readPath(e){switch(e.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const t=this._contextStack,r=t.length&&t[t.length-1];if(r&&"item"===r.type){const t=this._subject;this._restoreContext("item",e),this._emit(this._subject,this.RDF_FIRST,t,this._graph)}return this._afterPath(e)}}_readForwardPath(e){let t,r;const n=this._blankNode();if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(t=this._subject,this._subject=n):(t=this._object,this._object=n),this._emit(t,r,n,this._graph),this._readPath}_readBackwardPath(e){const t=this._blankNode();let r,n;if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(n=this._subject,this._subject=t):(n=this._object,this._object=t),this._emit(t,r,n,this._graph),this._readPath}_readRDFStarTailOrGraph(e){return">>"!==e.type?this._supportsQuads&&null===this._graph&&void 0!==(this._graph=this._readEntity(e))?this._readRDFStarTail:this._error(`Expected >> to follow "${this._object.id}"`,e):this._readRDFStarTail(e)}_readRDFStarTail(e){if(">>"!==e.type)return this._error(`Expected >> but got ${e.type}`,e);const t=this._quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext("<<",e),null===this._subject?(this._subject=t,this._readPredicate):(this._object=t,this._getContextEndReader())}_getContextEndReader(){const e=this._contextStack;if(!e.length)return this._readPunctuation;switch(e[e.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem;case"formula":return this._readFormulaTail;case"<<":return this._readRDFStarTailOrGraph}}_emit(e,t,r,n){this._callback(null,this._quad(e,t,r,n||this.DEFAULTGRAPH))}_error(e,t){const r=new Error(`${e} on line ${t.line}.`);r.context={token:t,line:t.line,previousToken:this._lexer.previousToken},this._callback(r),this._callback=Ve}_resolveIRI(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)?e:this._resolveRelativeIRI(e)}_resolveRelativeIRI(e){if(!e.length)return this._base;switch(e[0]){case"#":return this._base+e;case"?":return this._base.replace(/(?:\?.*)?$/,e);case"/":return("/"===e[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(e);default:return/^[^/:]*:/.test(e)?null:this._removeDotSegments(this._basePath+e)}}_removeDotSegments(e){if(!/(^|\/)\.\.?($|[/#?])/.test(e))return e;const t=e.length;let r="",n=-1,i=-1,o=0,a="/";for(;n<t;){switch(a){case":":if(i<0&&"/"===e[++n]&&"/"===e[++n])for(;(i=n+1)<t&&"/"!==e[i];)n=i;break;case"?":case"#":n=t;break;case"/":if("."===e[n+1])switch(a=e[1+ ++n],a){case"/":r+=e.substring(o,n-1),o=n+1;break;case void 0:case"?":case"#":return r+e.substring(o,n)+e.substr(n+1);case".":if(a=e[1+ ++n],void 0===a||"/"===a||"?"===a||"#"===a){if(r+=e.substring(o,n-2),(o=r.lastIndexOf("/"))>=i&&(r=r.substr(0,o)),"/"!==a)return`${r}/${e.substr(n+1)}`;o=n+1}}}a=e[++n]}return r+e.substring(o)}parse(e,t,r){let n,i,o;if(t&&(t.onQuad||t.onPrefix||t.onComment)?(n=t.onQuad,i=t.onPrefix,o=t.onComment):(n=t,i=r),this._readCallback=this._readInTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${ze++}_`,this._prefixCallback=i||Ve,this._inversePredicate=!1,this._quantified=Object.create(null),!n){const t=[];let r;if(this._callback=(e,n)=>{e?r=e:n&&t.push(n)},this._lexer.tokenize(e).every((e=>this._readCallback=this._readCallback(e))),r)throw r;return t}let a=(e,t)=>{null!==e?(this._callback(e),this._callback=Ve):this._readCallback&&(this._readCallback=this._readCallback(t))};o&&(this._lexer.comments=!0,a=(e,t)=>{null!==e?(this._callback(e),this._callback=Ve):this._readCallback&&("comment"===t.type?o(t.value):this._readCallback=this._readCallback(t))}),this._callback=n,this._lexer.tokenize(e,a)}}function Ve(){}function Ge(e,t){const r=t.namedNode;e._namedNode=r,e._blankNode=t.blankNode,e._literal=t.literal,e._variable=t.variable,e._quad=t.quad,e.DEFAULTGRAPH=t.defaultGraph(),e.RDF_FIRST=r(l.rdf.first),e.RDF_REST=r(l.rdf.rest),e.RDF_NIL=r(l.rdf.nil),e.N3_FORALL=r(l.r.forAll),e.N3_FORSOME=r(l.r.forSome),e.ABBREVIATIONS={a:r(l.rdf.type),"=":r(l.owl.sameAs),">":r(l.log.implies)},e.QUANTIFIERS_GRAPH=r("urn:n3:quantifiers")}Ge(He.prototype,f);var We=r(4841),Je=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};const Qe={},Xe={};class Ke{constructor(e){this.loadedExternalUrls=[],this.loadedClasses=[],this.config=e}loadGraphs(){return Je(this,void 0,void 0,(function*(){this.loadedExternalUrls=[],this.loadedClasses=[];const e=new Ne,t=new Ne;if(this.config.prefixes={},yield Promise.all([this.importRDF(this.config.attributes.shapes?this.config.attributes.shapes:this.config.attributes.shapesUrl?this.fetchRDF(this.config.attributes.shapesUrl):"",e,C),this.importRDF(this.config.attributes.values?this.config.attributes.values:this.config.attributes.valuesUrl?this.fetchRDF(this.config.attributes.valuesUrl):"",t,void 0,new He({blankNodePrefix:""}))]),0==e.size&&this.config.attributes.valuesSubject){const r=[...t.getObjects(this.config.attributes.valuesSubject,N,null),...t.getObjects(this.config.attributes.valuesSubject,R,null)],n=[];for(const t of r){const r=this.toURL(t.value);r&&this.loadedExternalUrls.indexOf(r)<0&&(this.loadedExternalUrls.push(r),n.push(this.importRDF(this.fetchRDF(r),e,C)))}try{yield Promise.allSettled(n)}catch(e){console.warn(e)}}this.config.shapesGraph=e,this.config.dataGraph=t}))}importRDF(e,t,r,n){return Je(this,void 0,void 0,(function*(){const i=n||new He,o=e=>Je(this,void 0,void 0,(function*(){const o=[];yield new Promise(((a,s)=>{i.parse(e,((e,i,l)=>{if(e)return s(e);if(i){if(t.add(new _(i.subject,i.predicate,i.object,r)),null===this.config.attributes.ignoreOwlImports&&$.equals(i.predicate)){const e=this.toURL(i.object.value);e&&this.loadedExternalUrls.indexOf(e)<0&&(this.loadedExternalUrls.push(e),o.push(this.importRDF(this.fetchRDF(e),t,f.namedNode(e),n)))}if(this.config.classInstanceProvider&&B.equals(i.predicate)){const e=i.object.value;if(this.loadedClasses.indexOf(e)<0){let i;e in Xe?i=Xe[e]:(i=this.config.classInstanceProvider(e),Xe[e]=i),this.loadedClasses.push(e),o.push(this.importRDF(i,t,r,n))}}}else l&&this.config.registerPrefixes(l),a(null)}))}));try{yield Promise.allSettled(o)}catch(e){console.warn(e)}}));if(e instanceof Promise&&(e=yield e),e){try{e=yield(0,We.toRDF)(JSON.parse(e),{format:"application/n-quads"})}catch(e){}yield o(e)}}))}fetchRDF(e){return Je(this,void 0,void 0,(function*(){if(e in Qe)return Qe[e];const t=fetch(e,{headers:{Accept:"text/turtle, application/trig, application/n-triples, application/n-quads, text/n3, application/ld+json"}}).then((e=>e.text()));return Qe[e]=t,t}))}toURL(e){if(J(e))return e;if(this.config.prefixes){const t=e.split(":");if(2===t.length){const r=this.config.prefixes[t[0]];if(r&&J(e=e.replace(`${t[0]}:`,r)))return e}}return null}}class Ye{constructor(){this.shapes=null,this.shapesUrl=null,this.shapeSubject=null,this.values=null,this.valuesUrl=null,this.valueSubject=null,this.valuesSubject=null,this.valuesNamespace="",this.view=null,this.language=null,this.loading="Loading…",this.ignoreOwlImports=null,this.collapse=null,this.submitButton=null,this.generateNodeShapeReference=null,this.showNodeIds=null}}class Ze{constructor(e,t){this.attributes=new Ye,this.loader=new Ke(this),this.prefixes={},this.editMode=!0,this.dataGraph=new Ne,this.lists={},this.groups=[],this.renderedNodes=new Set,this._shapesGraph=new Ne,this.theme=e,this.form=t,this.languages=[...new Set(navigator.languages.flatMap((e=>e.length>2?[e,e.substring(0,2)]:e)))]}updateAttributes(e){const t=new Ye;if(Object.keys(t).forEach((r=>{const n=e.dataset[r];void 0!==n&&(t[r]=n)})),this.editMode=null===t.view,this.attributes=t,this.attributes.valueSubject&&!this.attributes.valuesSubject&&(this.attributes.valuesSubject=this.attributes.valueSubject),t.language){const e=this.languages.indexOf(t.language);e>-1&&this.languages.splice(e,1),this.languages.unshift(t.language)}}static dataAttributes(){const e=new Ye;return Object.keys(e).map((e=>(e=e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),"data-"+e)))}get shapesGraph(){return this._shapesGraph}set shapesGraph(e){this._shapesGraph=e,this.lists=e.extractLists(),this.groups=[],e.forSubjects((e=>{this.groups.push(e.id)}),N,`${E}PropertyGroup`,null)}registerPrefixes(e){for(const t in e)t&&(this.prefixes[t]=e[t])}}const et=function(e){return"<"+e.value+">"},tt=/["\\\\\n\r]/,rt=/["\\\\\n\r]/g,nt={'"':'\\"',"\\":"\\\\","\n":"\\n","\r":"\\r"};function it(e){return nt[e]}const ot=function e(t){if(!t)return null;if("BlankNode"===t.termType)return"_:"+t.value;if("DefaultGraph"===t.termType)return"";if("Literal"===t.termType)return function(e){const t=(r=e.value,tt.test(r)?r.replace(rt,it):r);var r;return"http://www.w3.org/2001/XMLSchema#string"===e.datatype.value?'"'+t+'"':"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"===e.datatype.value?'"'+t+'"@'+e.language:'"'+t+'"^^'+et(e.datatype)}(t);if("NamedNode"===t.termType)return et(t);if("Quad"===t.termType||t.subject&&t.predicate&&t.object&&t.graph)return function(e,t){const r=t(e.subject),n=t(e.predicate),i=t(e.object),o=t(e.graph);return`${r} ${n} ${i} ${o?o+" ":""}.`}(t,e);if("Variable"===t.termType)return"?"+t.value;if(t[Symbol.iterator])return function(e,t){return[...e].map((e=>t(e))).join("\n")+"\n"}(t,e);throw new Error(`unknown termType ${t.termType}`)};class at{constructor(e){if(this.index=new Map,e)for(const[t,r]of e)this.set(t,r)}get size(){return this.index.size}clear(){this.index.clear()}delete(e){return this.index.delete(ot(e))}*entries(){for(const[,{term:e,value:t}]of this.index)yield[e,t]}forEach(e,t){for(const r of this.entries())e.call(t,r[1],r[0],this)}get(e){const t=this.index.get(ot(e));return t&&t.value}has(e){return this.index.has(ot(e))}*keys(){for(const[,{term:e}]of this.index)yield e}set(e,t){const r=ot(e);return this.index.set(r,{term:e,value:t}),this}*values(){for(const[,{value:e}]of this.index)yield e}[Symbol.iterator](){return this.entries()[Symbol.iterator]()}}const st=at;function lt(e){try{return ot(e)}catch(e){return null}}class dt{constructor(e){if(this.index=new Map,e)for(const t of e)this.add(t)}get size(){return this.index.size}add(e){const t=ot(e);return this.index.has(t)||this.index.set(t,e),this}clear(){this.index.clear()}delete(e){return!!e&&this.index.delete(lt(e))}entries(){return this.values().entries()}forEach(e,t){return this.values().forEach(e,t)}has(e){return!!e&&this.index.has(lt(e))}values(){return new Set(this.index.values())}keys(){return this.values()}[Symbol.iterator](){return this.index.values()}}const ct=dt,ut=class{constructor({dataset:e,end:t,quad:r,start:n}){this.dataset=e,this.end=t,this.quad=r,this.start=n}get term(){return this.quad[this.end]}get graph(){return this.quad.graph}get startTerm(){return this.quad[this.start]}};class ht{constructor(e){this.value=e}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}ht.prototype.termType="BlankNode";const pt=ht;class ft{equals(e){return!!e&&e.termType===this.termType}}ft.prototype.termType="DefaultGraph",ft.prototype.value="";const gt=ft,mt=function(e,t){if(!t)return null;if("BlankNode"===t.termType)return e.blankNode(t.value);if("DefaultGraph"===t.termType)return e.defaultGraph();if("Literal"===t.termType)return e.literal(t.value,t.language||e.namedNode(t.datatype.value));if("NamedNode"===t.termType)return e.namedNode(t.value);if("Quad"===t.termType){const r=e.fromTerm(t.subject),n=e.fromTerm(t.predicate),i=e.fromTerm(t.object),o=e.fromTerm(t.graph);return e.quad(r,n,i,o)}if("Variable"===t.termType)return e.variable(t.value);throw new Error(`unknown termType ${t.termType}`)};class vt{constructor(e,t,r){this.value=e,this.language=t,this.datatype=r}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value&&e.language===this.language&&e.datatype.equals(this.datatype)}}vt.prototype.termType="Literal";const bt=vt;class yt{constructor(e){this.value=e}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}yt.prototype.termType="NamedNode";const xt=yt;class wt{constructor(e,t,r,n){this.subject=e,this.predicate=t,this.object=r,this.graph=n}equals(e){return!!e&&("Quad"===e.termType||!e.termType)&&e.subject.equals(this.subject)&&e.predicate.equals(this.predicate)&&e.object.equals(this.object)&&e.graph.equals(this.graph)}}wt.prototype.termType="Quad",wt.prototype.value="";const _t=wt;class St{constructor(e){this.value=e}equals(e){return!!e&&e.termType===this.termType&&e.value===this.value}}St.prototype.termType="Variable";const Et=St,It=new xt("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),Tt=new xt("http://www.w3.org/2001/XMLSchema#string");class kt{constructor(){this.init()}init(){this._data={blankNodeCounter:0,defaultGraph:new gt}}namedNode(e){return new xt(e)}blankNode(e){return e=e||"b"+ ++this._data.blankNodeCounter,new pt(e)}literal(e,t){return"string"==typeof t?new bt(e,t,It):new bt(e,"",t||Tt)}variable(e){return new Et(e)}defaultGraph(){return this._data.defaultGraph}quad(e,t,r,n=this.defaultGraph()){return new _t(e,t,r,n)}fromTerm(e){return mt(this,e)}fromQuad(e){return mt(this,e)}}kt.exports=["blankNode","defaultGraph","fromQuad","fromTerm","literal","namedNode","quad","variable"];const jt=new kt,At={apply:(e,t,r)=>e(r[0]),get:(e,t)=>e(t)},Ct=function(e,{factory:t=jt}={}){const r=(r="")=>t.namedNode(`${e}${r.raw||r}`);return"undefined"==typeof Proxy?r:new Proxy(r,At)},Nt=(Ct("http://www.w3.org/2001/XMLSchema#"),Ct("http://www.w3.org/1999/02/22-rdf-syntax-ns#"));Ct("http://www.w3.org/2000/01/rdf-schema#");class Rt{static add({ptr:e,start:t,end:r,subjects:n=[null],predicates:i=[null],objects:o=[null],graphs:a,callback:s}={}){if(!e.factory)throw new Error("add operation requires a factory");let l=()=>{};s&&(l=n=>{s(new ut({dataset:e.dataset,start:t,end:r,quad:n}))});for(const r of n)for(const n of i)for(const i of o)for(const o of a){const a={subject:r,predicate:n,object:i,graph:o};a[t]=e.term;const s=e.factory.quad(a.subject,a.predicate,a.object,a.graph);e.dataset.add(s),l(s)}return e}static addList({ptr:e,predicates:t,items:r,graphs:n}){if(e.isAny())throw new Error("can't attach a list to an any ptr");for(const i of t)for(const t of n){const n=r.map((()=>e.factory.blankNode()));e.dataset.add(e.factory.quad(e.term,i,n[0]||Nt.nil,t));for(let i=0;i<n.length;i++)e.dataset.add(e.factory.quad(n[i],Nt.first,r[i],t)),e.dataset.add(e.factory.quad(n[i],Nt.rest,n[i+1]||Nt.nil,t))}return e}static delete({ptr:e,start:t,subjects:r=[null],predicates:n=[null],objects:i=[null]}){for(const o of r)for(const r of n)for(const n of i){const i={subject:o,predicate:r,object:n};i[t]=e.term;const a=e.dataset.match(i.subject,i.predicate,i.object);for(const t of a)e.dataset.delete(t)}return e}static deleteList({ptr:e,predicates:t}){const r=[];for(const n of t)for(const t of e.dataset.match(e.term,n)){let n=t.object;for(r.push(t);!Nt.nil.equals(n);){n=r[r.length-1].object;const t=e.dataset.match(n);if(0===t.size)break;for(const e of t)r.push(e)}}for(const t of r)e.dataset.delete(t);return e}static execute({ptr:e,operation:t="traverse",quantifier:r,start:n,end:i,subjects:o,predicates:a,objects:s,graphs:l,items:d,callback:c}={}){if("add"===t)return Rt.add({ptr:e,start:n,end:i,subjects:o,predicates:a,objects:s,graphs:l,callback:c});if("addList"===t)return Rt.addList({ptr:e,predicates:a,items:d,graphs:l});if("delete"===t)return Rt.delete({ptr:e,start:n,subjects:o,predicates:a,objects:s});if("deleteList"===t)return Rt.deleteList({ptr:e,predicates:a});if("isList"===t)return Rt.isList({ptr:e});if("list"===t)return Rt.list({ptr:e});if("traverse"===t)return Rt.traverse({ptr:e,quantifier:r,start:n,end:i,subjects:o,predicates:a,objects:s,graphs:l});throw new Error(`unknown operation ${t}`)}static isList({ptr:e}){return!e.isAny()&&(!!Nt.nil.equals(e.term)||1===Rt.traverse({ptr:e,predicates:[Nt.first]}).length)}static list({ptr:e}){if(e.isList())return{*[Symbol.iterator](){for(;e&&!e.term.equals(Nt.nil);){const t=e.out([Nt.first]);if(1!==t.length)throw new Error(`Invalid list: rdf:first count not equals one on ${e.value}`);const r=e.out([Nt.rest]);if(1!==r.length)throw new Error(`Invalid list: rdf:rest count not equals one on ${e.value}`);yield t[0],e=r[0]}}}}static traverse({ptr:e,quantifier:t="one",start:r="subject",end:n="object",subjects:i=[null],predicates:o=[null],objects:a=[null],graphs:s=[null],callback:l}){if("one"===t)return Rt.traverseOne({ptr:e,start:r,end:n,subjects:i,predicates:o,objects:a,graphs:s,callback:l});if("oneOrMore"===t){const t=Rt.traverse({ptr:e,end:n,start:r,subjects:i,predicates:o,objects:a,graphs:s,callback:l});return Rt.traverseMore({ptrs:t,end:n,start:r,subjects:i,predicates:o,objects:a,graphs:s,callback:l})}if("zeroOrMore"===t)return Rt.traverseMore({ptrs:[e],end:n,start:r,subjects:i,predicates:o,objects:a,graphs:s,callback:l});if("zeroOrOne"===t)return[e,...Rt.traverse({ptr:e,end:n,start:r,subjects:i,predicates:o,objects:a,graphs:s,callback:l})];throw new Error(`unknown quantifier ${t}`)}static traverseMore({ptrs:e,end:t,start:r,subjects:n,predicates:i,objects:o,graphs:a,callback:s}={}){let l,d,c=[...e];do{l=[];for(const d of e)l=[...l,...Rt.traverseOne({ptr:d,end:t,start:r,subjects:n,predicates:i,objects:o,graphs:a,callback:s})];d&&(l=l.filter((e=>!d.has(e.term)))),e=l,c=[...c,...l],d=new ct(c.map((e=>e.term)))}while(l.length>0);return c}static traverseOne({ptr:e,start:t,end:r,subjects:n,predicates:i,objects:o,graphs:a,callback:s=(e,t)=>t.extend(e)}={}){const l=[];for(const d of n)for(const n of i)for(const i of o)for(const o of a){const a={subject:d,predicate:n,object:i,graph:o};a[t]=e.term;for(const n of e.dataset.match(a.subject,a.predicate,a.object,a.graph))l.push(s(new ut({dataset:e.dataset,end:r,quad:n,start:t}),e))}return l}}const Ot=Rt;function Lt(e,t){return t?r=>t(e.extend(r)):()=>{}}const $t=class{constructor({dataset:e,edges:t=[],factory:r,graph:n,term:i}){if(!e&&0===t.length)throw new Error("dataset or edges is required");if(0===t.length&&void 0===i)throw new Error("edges or term must be given");if(t.length>0&&i)throw new Error("edges or term must be given");this.dataset=e||t[t.length-1].dataset,this.edges=t,this.factory=r,this._graph=n,0===t.length&&(this._term=i)}get edge(){return this.edges[this.edges.length-1]}get graph(){return"object"==typeof this._graph?this._graph:this.edge&&this.edge.graph}get length(){return void 0!==this._term?1:this.edges.length+1}get startTerm(){return this._term||this.edges[0].startTerm}get term(){return void 0!==this._term?this._term:this.edge.term}get value(){const e=this.term;return null===e?void 0:e.value}addIn(e,t,r){return Ot.add({ptr:this,start:"object",end:"subject",subjects:t,predicates:e,graphs:[this.graph||this.factory.defaultGraph()],callback:Lt(this,r)})}addList(e,t){return Ot.addList({ptr:this,predicates:e,graphs:[this.graph||this.factory.defaultGraph()],items:t})}addOut(e,t,r){return Ot.add({ptr:this,start:"subject",end:"object",predicates:e,objects:t,graphs:[this.graph||this.factory.defaultGraph()],callback:Lt(this,r)})}deleteIn(e,t){return Ot.delete({ptr:this,start:"object",subjects:t,predicates:e})}deleteList(e){return Ot.deleteList({ptr:this,predicates:e})}deleteOut(e,t){return Ot.delete({ptr:this,start:"subject",predicates:e,objects:t})}execute({operation:e,quantifier:t,start:r,end:n,subjects:i,predicates:o,objects:a,graphs:s,items:l,callback:d}){return Ot.execute({ptr:this,operation:e,quantifier:t,start:r,end:n,subjects:i,predicates:o,objects:a,graphs:s,items:l,callback:d})}extend(e){return new this.constructor({dataset:this.dataset,edges:[...this.edges,e],factory:this.factory,graph:this._graph})}hasIn(e,t){return Ot.traverse({ptr:this,start:"object",end:"object",subjects:t,predicates:e,graphs:[this.graph]})}hasOut(e,t){return Ot.traverse({ptr:this,start:"subject",end:"subject",predicates:e,objects:t,graphs:[this.graph]})}in(e,t){return Ot.traverse({ptr:this,start:"object",end:"subject",subjects:t,predicates:e,graphs:[this.graph]})}isAny(){return!this.term}isList(){return Ot.isList({ptr:this})}list(){return Ot.list({ptr:this})}nodes(){const e=this,t=e=>void 0!==this._term?{dataset:this.dataset,term:this._term}:this.edges.length>e?{dataset:this.edges[e].dataset,term:this.edges[e].startTerm}:this.edges.length===e?{dataset:this.edges[e-1].dataset,term:this.edges[e-1].term}:void 0;return{*[Symbol.iterator](){for(let r=0;r<e.length;r++)yield t(r)}}}out(e,t){return Ot.traverse({ptr:this,predicates:e,objects:t,graphs:[this.graph]})}quads(){const e=this;return{*[Symbol.iterator](){for(const t of e.edges)yield t.quad}}}trim(){return new this.constructor({dataset:this.dataset,factory:this.factory,graph:this.graph,term:this.term})}},Dt=function(e,t){return e?e.equals(t):e===t};function Pt(e,t){return t?r=>t(new e.constructor({factory:e.factory,ptrs:[r]})):()=>{}}class Mt{constructor({dataset:e,factory:t,ptrs:r,terms:n,graphs:i}){if(this.factory=t,r)this.ptrs=[...r];else{this.ptrs=[];for(const r of n||[null])for(const n of i||[null])this.ptrs.push(new $t({dataset:e,factory:t,graph:n,term:r}))}}get dataset(){const e=new Set(this.datasets);return 1!==e.size?null:e[Symbol.iterator]().next().value}get datasets(){return this.ptrs.map((e=>e.dataset))}get term(){const e=new ct(this.terms);if(1===e.size)return e[Symbol.iterator]().next().value}get terms(){return this.ptrs.map((e=>e.term))}get value(){const e=this.term;return null==e?void 0:e.value}get values(){return this.ptrs.map((e=>e.value))}addIn(e,t,r){const n=Pt(this,r);for(const r of this.ptrs)r.addIn(e,t,n);return this}addList(e,t){if(this.isAny())throw new Error("can't attach a list to an any ptr");for(const r of this.ptrs)r.addList(e,t);return this}addOut(e,t,r){const n=Pt(this,r);for(const r of this.ptrs)r.addOut(e,t,n);return this}clone(e){return new this.constructor({factory:this.factory,ptrs:this.ptrs,...e})}deleteIn(e,t){for(const r of this.ptrs)r.deleteIn(e,t);return this}deleteList(e){for(const t of this.ptrs)t.deleteList(e);return this}deleteOut(e,t){for(const r of this.ptrs)r.deleteOut(e,t);return this}distinct(){const e=this.ptrs.reduce(((e,t)=>(e.some((e=>function(e,t){return e.dataset===t.dataset&&!!Dt(e.graph,t.graph)&&!!Dt(e.term,t.term)}(e,t)))||e.push(t.trim()),e)),[]);return this.clone({ptrs:e})}execute(e){return this.clone({ptrs:this.ptrs.flatMap((t=>t.execute(e)))})}executeAll(e){let t=this;for(const r of e)t=t.execute(r);return t}filter(e){return this.clone({ptrs:[...this].filter(e).map((e=>e.ptrs[0]))})}hasIn(e,t){return this.clone({ptrs:this.ptrs.flatMap((r=>r.hasIn(e,t)))})}hasOut(e,t){return this.clone({ptrs:this.ptrs.flatMap((r=>r.hasOut(e,t)))})}in(e,t){return this.clone({ptrs:this.ptrs.flatMap((r=>r.in(e,t)))})}isAny(){return this.ptrs.length>0&&this.ptrs.some((e=>e.isAny()))}isList(){return 1===this.ptrs.length&&this.ptrs[0].isList()}list(){if(!this.isList())return;const e=this.ptrs[0].list()[Symbol.iterator](),t=()=>{const{done:t,value:r}=e.next();return t?{done:!0}:{done:!1,value:this.clone({ptrs:[r]})}};return{[Symbol.iterator]:()=>({next:t})}}map(e){return[...this].map(e)}node(e){const t=this.dataset,r=[...e].map((e=>new $t({dataset:t,factory:this.factory,term:e})));return this.clone({ptrs:r})}out(e,t){return this.clone({ptrs:this.ptrs.flatMap((r=>r.out(e,t)))})}quads(){const e=this;return{*[Symbol.iterator](){for(const t of e.ptrs)for(const e of t.edges)yield e.quad}}}trim(){return this.clone({ptrs:this.ptrs.map((e=>e.trim()))})}*[Symbol.iterator](){for(const e of this.ptrs)yield this.clone({ptrs:[e]})}}const Bt=Mt;Ct("http://www.w3.org/2002/07/owl#");const Ft=Ct("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),qt=Ct("http://www.w3.org/2000/01/rdf-schema#"),Ut=Ct("http://www.w3.org/ns/shacl#"),zt=Ct("https://schemas.link/shacl-next#"),Ht=Ct("http://www.w3.org/2001/XMLSchema#");var Vt=r(8059);const Gt=class{constructor({details:e,factory:t,options:r,results:n=[]}={}){this.details=e,this.factory=t,this.options=r,this.results=n,this._conforms=Vt((()=>!this.results.some((e=>e.severity.equals(Ut.Info)||e.severity.equals(Ut.Violation)||e.severity.equals(Ut.Warning))))),this._ptr=Vt((()=>this.build()))}get conforms(){return this._conforms()}get dataset(){return this.ptr.dataset}get ptr(){return this._ptr()}get term(){return this.ptr.term}build(){const e=new Bt({dataset:this.factory.dataset(),factory:this.factory,terms:[this.factory.blankNode()]});e.addOut([Ft.type],[Ut.ValidationReport]).addOut([Ut.conforms],[this.factory.literal(this.conforms.toString(),Ht.boolean)]);for(const t of this.results)e.addOut([Ut.result],[this.factory.blankNode()],(e=>{t.build(e,this.options)}));return e}coverage(){return this.results.flatMap((e=>e.coverage()))}},Wt=class{constructor({args:e={},constraintComponent:t,factory:r,focusNode:n,message:i=[],path:o,results:a=[],severity:s,shape:l,source:d=[],value:c,valuePaths:u=[]}={}){this.args=e,this.constraintComponent=t,this.factory=r,this.focusNode=n,this.path=o||l.path,this.results=a,this.severity=s,this.shape=l,this.source=d,this.value=c,this.valuePaths=u,this._message=Vt((()=>(this.shape.message.length>0&&(i=this.shape.message),0===i.length&&(i=this.shape.ptr.node([this.constraintComponent]).out([Ut.message]).terms),i.map((t=>r.literal(function(e,t){return Object.entries(t).reduce(((e,[t,r])=>(r&&r.termType&&(r=ot(r)),e.replace(`{$${t}}`,r).replace(`{?${t}}`,r))),e)}(t.value,e),t.language||null))))))}get message(){return this._message()}build(e,{details:t}={}){e.addOut([Ft.type],[Ut.ValidationResult]).addOut([Ut.focusNode],this.focusNode.terms).addOut([Ut.resultSeverity],[this.severity]).addOut([Ut.sourceConstraint],this.source).addOut([Ut.sourceConstraintComponent],[this.constraintComponent]).addOut([Ut.sourceShape],this.shape.ptr.terms),this.message&&e.addOut([Ut.resultMessage],this.message);const r=t=>"one"===t.quantifier?t.predicates.length>1?e.node([this.factory.blankNode()]).addList([Ut.alternativePath],t.predicates):"object"===t.start?e.node([this.factory.blankNode()]).addOut([Ut.inversePath],[t.predicates[0]]):e.node([t.predicates[0]]):"oneOrMore"===t.quantifier?e.node([this.factory.blankNode()]).addOut([Ut.oneOrMorePath],[t.predicates[0]]):"zeroOrMore"===t.quantifier?e.node([this.factory.blankNode()]).addOut([Ut.zeroOrMorePath],[t.predicates[0]]):"zeroOrOne"===t.quantifier?e.node([this.factory.blankNode()]).addOut([Ut.zeroOrOnePath],[t.predicates[0]]):void 0;if(this.path&&(1===this.path.length?e.addOut([Ut.resultPath],r(this.path[0]).terms):e.addList([Ut.resultPath],this.path.map((e=>r(e).term)))),void 0!==this.value&&e.addOut([Ut.value],this.value.terms),t)for(const r of this.results)e.addOut([Ut.detail],[this.factory.blankNode()],(e=>{r.build(e,{details:t})}))}coverage(){return[...this.valuePaths.flatMap((e=>[...e.quads()])),...this.results.flatMap((e=>e.coverage()))]}};class Jt{constructor({factory:e,focusNode:t,options:r={debug:!1,details:!1},processed:n=new Set,report:i=new Gt({factory:e,options:r}),results:o=new Map,shape:a,value:s,valueOrNode:l,valuePaths:d,values:c}={}){this.factory=e,this.focusNode=t,this.options=r,this.processed=n,this.report=i,this.results=o,this.shape=a,this.value=s,this.valuePaths=d,this.valueOrNode=l,this.values=c}create({child:e,focusNode:t=this.focusNode,shape:r=this.shape,value:n=this.value,valueOrNode:i=this.valueOrNode,valuePaths:o=this.valuePaths,values:a=this.values}={}){return new Jt({factory:this.factory,focusNode:t,options:this.options,processed:this.processed,report:e?new Gt({factory:this.factory,options:this.options}):this.report,results:this.results,shape:r,value:n,valueOrNode:i,valuePaths:o,values:a})}id({shape:e=this.shape}={}){return`${ot(e.ptr.term)} - ${ot(this.focusNode.term)} - ${t=this.valuePaths,t?`{${t.map((e=>function(e){return e?`{${[...e.quads()].map((e=>ot(e))).join(" ")}}`:"{}"}(e))).join(" ")}}`:"{}"}`;var t}result(e){const t=new Wt({factory:this.factory,focusNode:this.focusNode,shape:this.shape,value:this.value,valuePaths:this.valuePaths,...e}),r=this.id();this.results.has(r)?this.results.get(r).add(t):this.results.set(r,new Set([t])),this.report.results.push(t)}debug(e,t){this.options.debug&&this.result({severity:zt.Debug,constraintComponent:e,...t})}trace(e,t){this.options.trace&&this.result({severity:zt.Trace,constraintComponent:e,...t})}test(e,t,r){e?this.debug(t,r):this.violation(t,r)}violation(e,t){this.result({constraintComponent:e,severity:this.shape.severity||Ut.Violation,...t})}}const Qt=Jt;function Xt(){return{generic:e=>{e.trace(zt.TraversalConstraintComponent,{args:{},message:[e.factory.literal("Traversal")],value:e.valueOrNode})}}}const Kt=class{constructor(e){this.validations=new st(e)}compile(e){const t=e.validator.options.coverage;if(e.deactivated)return[];let r=!1;const n=new Set;for(const t of e.ptr.execute({start:"subject",end:"predicate"})){const e=this.validations.get(t.term);e&&(n.add(e),t.term.equals(Ut.property)&&(r=!0))}return t&&e.isPropertyShape&&!r&&n.add(Xt),[...n].map((t=>t(e))).filter(Boolean)}};var Yt=r(9349);function Zt(e){if("BlankNode"!==e.term.termType)return{quantifier:"one",start:"subject",end:"object",predicates:[e.term]};const t=e.out([Ut.alternativePath]);if(1===t.ptrs.length&&t.ptrs[0].isList())return{quantifier:"one",start:"subject",end:"object",predicates:[...t.list()].map((e=>e.term))};const r=e.out([Ut.inversePath]);if(r.term)return{quantifier:"one",start:"object",end:"subject",predicates:[r.term]};const n=e.out([Ut.oneOrMorePath]);if(n.term)return{quantifier:"oneOrMore",start:"subject",end:"object",predicates:[n.term]};const i=e.out([Ut.zeroOrMorePath]);if(i.term)return{quantifier:"zeroOrMore",start:"subject",end:"object",predicates:[i.term]};const o=e.out([Ut.zeroOrOnePath]);return o.term?{quantifier:"zeroOrOne",start:"subject",end:"object",predicates:[o.term]}:void 0}const er=class{constructor(e){this.shape=e,this._compiled=Vt((()=>this.shape.validator.registry.compile(e)))}get compiled(){return this._compiled()}async validate(e){return 0===e.focusNode.dataset.size||(this.shape.isPropertyShape?await this.validateProperty(e):await this.validateNode(e)),e}async validateNode(e){const t=e.create({shape:this.shape,valueOrNode:e.value||e.focusNode});for(const e of this.compiled)e.node&&await e.node(t),e.generic&&await e.generic(t)}async validateProperty(e){let t;t=this.shape.isSparqlShape?e.focusNode:e.focusNode.executeAll(this.shape.path);const r=t.node(new ct(t.terms)),n=[...t].reduce(((e,r)=>{const n=r.term,i=t.node([n]);return e.has(n)||e.set(n,{value:i,valuePaths:[]}),e.get(n).valuePaths.push(r),e}),new st).values(),i=e.create({shape:this.shape,values:r});for(const e of this.compiled)e.property&&await e.property(i);for(const{value:t,valuePaths:r}of n){const n=e.create({shape:this.shape,value:t,valueOrNode:t,valuePaths:r});for(const e of this.compiled)e.generic&&await e.generic(n)}}},tr=function(e){const t=new ct,r=new Bt({dataset:e.dataset,terms:e.terms}).execute({quantifier:"zeroOrMore",start:"object",end:"subject",predicates:[qt.subClassOf]});for(const e of r.ptrs)for(const{term:r}of e.nodes())t.add(r);return t},rr=class{constructor(e){this.targetClass=new ct([...tr(e.hasOut([Ft.type],[Ut.NodeShape])),...tr(e.out([Ut.targetClass]))]),this.targetNode=e.out([Ut.targetNode]).terms,this.targetObjectsOf=e.out([Ut.targetObjectsOf]).terms,this.targetSubjectsOf=e.out([Ut.targetSubjectsOf]).terms}resolve(e){const t=e.focusNode.node([null]),r=[...e.focusNode.hasOut([Ft.type],this.targetClass).ptrs,...e.focusNode.node(this.targetNode).ptrs,...t.execute({start:"object",end:"object",predicates:this.targetObjectsOf}).ptrs,...t.execute({start:"subject",end:"subject",predicates:this.targetSubjectsOf}).ptrs],n=e.focusNode.clone({ptrs:r});return n.node([...new ct(n.terms)])}},nr=class{constructor(e,{validator:t}){this.ptr=e,this.validator=t,this._deactivated=Vt((()=>{const e=this.ptr.out([Ut.deactivated]).term;return e&&(0,Yt.fromRdf)(e)})),this._message=Vt((()=>this.ptr.out([Ut.message]).terms)),this._path=Vt((()=>function(e){return 0===e.terms.length?null:e.ptrs[0].isList()?[...e.list()].map((e=>Zt(e))):[Zt(e)]}(this.ptr.out([Ut.path])))),this._severity=Vt((()=>this.ptr.out([Ut.severity]).term)),this._shapeValidator=Vt((()=>new er(this))),this._sparql=Vt((()=>this.ptr.out([Ut.sparql]))),this._targetResolver=Vt((()=>new rr(this.ptr)))}get deactivated(){return this._deactivated()}get isPropertyShape(){return Boolean(this.path)}get isSparqlShape(){return this.sparql.terms.length>0}get path(){return this._path()}get targetResolver(){return this._targetResolver()}get message(){return this._message()}get severity(){return this._severity()}get shapeValidator(){return this._shapeValidator()}get sparql(){return this._sparql()}resolveTargets(e){return this.targetResolver.resolve(e)}async validate(e){const t=e.id({shape:this});if(e.processed.has(t)){if(e.results.has(t))for(const r of e.results.get(t))e.report.results.push(r);return e}return e.processed.add(t),this.shapeValidator.validate(e)}};async function ir(e,t){return Promise.all(e.map(t))}function or(e){return t=>{t.test(e.equals(t.valueOrNode.term),Ut.HasValueConstraintComponent,{args:{hasValue:e},message:[t.factory.literal("Value must be {$hasValue}")]})}}function ar(e){return t=>{const r=[...t.values].some((t=>e.equals(t.term)));t.test(r,Ut.HasValueConstraintComponent,{args:{hasValue:e},message:[t.factory.literal("Missing expected value {$hasValue}")]})}}function sr(e){return Ht.dateTime.equals(e.datatype)&&/^.*(((\+|-)\d{2}:\d{2})|Z)$/.test(e.value)}const lr=function(e,t){if(!e||"Literal"!==e.termType)return null;if(!t||"Literal"!==t.termType)return null;if(sr(e)!==sr(t))return null;const r=(0,Yt.fromRdf)(e),n=(0,Yt.fromRdf)(t);return typeof r!=typeof n?null:"string"==typeof r?r.localeCompare(n):r-n};function dr(e){return t=>{const r=t.focusNode.out([e]),n=r.filter((e=>!e.term.equals(t.focusNode.term))),i=0!==r.terms.length&&0===n.terms.length;t.test(i,Ut.EqualsConstraintComponent,{args:{equals:e},message:[t.factory.literal("Must have same values as {$equals}")],value:n.terms[0]&&t.focusNode.node([n.terms[0]])||t.focusNode})}}function cr(e){return t=>{const r=new ct(t.focusNode.out([e]).terms),n=new ct(t.values.terms),i=[...[...n].filter((e=>!r.has(e))),...[...r].filter((e=>!n.has(e)))];for(const r of i)t.violation(Ut.EqualsConstraintComponent,{args:{equals:e},message:[t.factory.literal("Must have same values as {$equals}")],value:t.focusNode.node([r])});0===i.length&&t.debug(Ut.EqualsConstraintComponent,{args:{equals:e},message:[t.factory.literal("Must have same values as {$equals}")]})}}function ur(e,t,r,n){return async i=>{const o=[];let a=[];t&&(a=new Set(i.shape.ptr.in([Ut.property]).out([Ut.property]).out([Ut.qualifiedValueShape]).filter((t=>!t.term.equals(e.ptr.term))).map((e=>i.shape.validator.shape(e)))));const s=(await async function(t){return(await Promise.all(t.map((t=>(async t=>{const r=(await e.validate(i.create({child:!0,focusNode:t}))).report;if(o.push(r.results),!r.conforms)return!1;if(0===a.length)return!0;if(i.options.debug||i.options.details){const e=await ir([...a],(async e=>(await e.validate(i.create({child:!0,focusNode:t}))).report));return o.push(e.flatMap((e=>e.results))),!e.every((e=>e.conforms))}return!await async function(e,t){for(const r of e)if(!await t(r))return!1;return!0}([...a],(async e=>(await e.validate(i.create({child:!0,focusNode:t}))).report.conforms))})(t))))).filter(Boolean)}(i.values)).length;null!==r&&i.test(s<=r,Ut.QualifiedMaxCountConstraintComponent,{args:{qualifiedMaxCount:r,qualifiedValueShape:e.ptr.term,qualifiedValueShapesDisjoint:t},message:[i.factory.literal("More than {$qualifiedMaxCount} values have shape {$qualifiedValueShape}")],results:o.flat()}),null!==n&&i.test(s>=n,Ut.QualifiedMinCountConstraintComponent,{args:{qualifiedMinCount:n,qualifiedValueShape:e.ptr.term,qualifiedValueShapesDisjoint:t},message:[i.factory.literal("Less than {$qualifiedMinCount} values have shape {$qualifiedValueShape}")],results:o.flat()})}}function hr(e,t,r){return n=>{n.test(r.test(n.valueOrNode.term.value),Ut.PatternConstraintComponent,{args:{flags:t,pattern:e},message:[n.factory.literal('Value does not match pattern "{$pattern}"')],value:n.valueOrNode})}}const pr=Ct("http://www.w3.org/ns/shacl#"),fr=Ct("https://schemas.link/shacl-next#"),gr=class{constructor({results:e=[]}={}){this.results=e}get conforms(){return!this.results.some((e=>e.severity.equals(pr.Info)||e.severity.equals(pr.Violation)||e.severity.equals(pr.Warning)))}},mr=class{constructor({args:e={},factory:t,message:r=[],severity:n=pr.Violation}={}){this.severity=n,this.message=r.map((r=>t.literal(function(e,t){return Object.entries(t).reduce(((e,[t,r])=>(r&&r.termType&&(r=ot(r)),e.replace(`{$${t}}`,r).replace(`{?${t}}`,r))),e)}(r.value,e),r.language||null)))}};class vr{constructor({factory:e=jt}={}){this.factory=e}clone({factory:e}={}){return new vr({factory:e||this.factory})}validate(){return new gr}validateSimple(){return!0}}const br=vr;class yr extends br{constructor({datatypes:e,factory:t}={}){super({factory:t}),this.datatypes=[];for(const t of Array.isArray(e)?e:[e])t&&this.datatypes.push(this.factory.fromTerm(t))}clone({factory:e}={}){return new yr({datatypes:this.datatypes,factory:e||this.factory})}}const xr=yr,wr=class{constructor({factory:e=jt,validations:t}={}){if(this.factory=e,this.validations=new st,t)for(const e of Object.values(t)){const t=e.clone({factory:this.factory});for(const e of t.datatypes)this.validations.set(e,t)}}validate(e){const t=this.validations.get(e.datatype);return t?t.validate(e):new gr}validateSimple(e){const t=this.validations.get(e.datatype);return!t||t.validateSimple(e)}};class _r extends xr{constructor(e,t,{factory:r}={}){super({datatypes:t,factory:r}),this.message=[this.factory.literal("term value {$this} matches pattern {$pattern}")],this.patterns=Array.isArray(e)?e:[e]}clone({factory:e}={}){return new _r(this.patterns,this.datatypes,{factory:e||this.factory})}validate(e){const t=this.patterns.map((t=>{let r;t.test(e.value)&&(r=fr.Debug);const n={pattern:this.factory.literal(t.toString()),this:e};return new mr({args:n,factory:this.factory,message:this.message,severity:r})}));return new gr({results:t})}validateSimple(e){return this.patterns.every((t=>t.test(e.value)))}}const Sr=_r,Er=/^([-+]?[0-9]+)$/;class Ir extends Sr{constructor(e=null,t=null,r,{factory:n}={}){super(Er,r,{factory:n}),this.maxInclusive=null,this.minInclusive=null,"string"==typeof t&&(this.maxInclusive=BigInt(t)),"string"==typeof e&&(this.minInclusive=BigInt(e))}clone({factory:e}={}){return new Ir(this.minInclusive?.toString(),this.maxInclusive?.toString(),this.datatypes,{factory:e||this.factory})}validate(e){const t=super.validate(e).results;if(!fr.Debug.equals(t[0].severity))return new gr({results:t});const r=BigInt(e.value);if(null!==this.minInclusive&&r<this.minInclusive){const r=`term value "${e.value}" is less than "${this.minInclusive.toString()}"`,n=[this.factory.literal(r)];t.push(new mr({factory:this.factory,message:n}))}if(null!==this.maxInclusive&&r>this.maxInclusive){const r=`term value "${e.value}" is greater than "${this.maxInclusive.toString()}"`,n=[this.factory.literal(r)];t.push(new mr({factory:this.factory,message:n}))}return new gr({results:t})}validateSimple(e){if(!super.validateSimple(e))return!1;const t=BigInt(e.value);return!(null!==this.minInclusive&&t<this.minInclusive||null!==this.maxInclusive&&t>this.maxInclusive)}}const Tr=Ir;class kr extends xr{constructor(e,t,{factory:r}={}){super({datatypes:t,factory:r}),this.values=new Set(e)}clone({factory:e}={}){return new kr(this.values,this.datatypes,{factory:e||this.factory})}validate(e){const t=[];if(!this.values.has(e.value)){const r=`term value "${e.value}" is not included in the list: ${[...this.values].join(",")}`,n=[this.factory.literal(r)];t.push(new mr({factory:this.factory,message:n}))}return new gr({results:t})}validateSimple(e){return this.values.has(e.value)}}const jr=kr,Ar={xsd:Ct("http://www.w3.org/2001/XMLSchema#")},Cr=new xr({datatypes:Ar.xsd.anySimpleType}),Nr=new xr({datatypes:Ar.xsd.anyAtomicType}),Rr=/^([^\ud8ff-\udfff\ufffe-\uffff]*)$/,Or=/^((\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+)([Ee](\+|-)?[0-9]+)?|(\+|-)?INF|NaN)$/,Lr=/^(-?P((([0-9]+Y([0-9]+M)?([0-9]+D)?|([0-9]+M)([0-9]+D)?|([0-9]+D))(T(([0-9]+H)([0-9]+M)?([0-9]+(\.[0-9]+)?S)?|([0-9]+M)([0-9]+(\.[0-9]+)?S)?|([0-9]+(\.[0-9]+)?S)))?)|(T(([0-9]+H)([0-9]+M)?([0-9]+(\.[0-9]+)?S)?|([0-9]+M)([0-9]+(\.[0-9]+)?S)?|([0-9]+(\.[0-9]+)?S)))))$/,$r=/^(-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?))(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,Dr=new Sr(Rr,Ar.xsd.string),Pr=new jr(["1","true","0","false"],Ar.xsd.boolean),Mr=new Sr(/^((\+|-)?([0-9]+(\.[0-9]*)?|\.[0-9]+))$/,Ar.xsd.decimal),Br=new Sr(Or,Ar.xsd.float),Fr=new Sr(Or,Ar.xsd.double),qr=new Sr(Lr,Ar.xsd.duration),Ur=new Sr($r,Ar.xsd.dateTime),zr=new Sr(/^((([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?|(24:00:00(\.0+)?))(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,Ar.xsd.time),Hr=new Sr(/^(-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,Ar.xsd.date),Vr=new Sr(/^(-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,Ar.xsd.gYearMonth),Gr=new Sr(/^(-?([1-9][0-9]{3,}|0[0-9]{3})(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,Ar.xsd.gYear),Wr=new Sr(/^(--(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,Ar.xsd.gMonthDay),Jr=new Sr(/^(---(0[1-9]|[12][0-9]|3[01])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,Ar.xsd.gDay),Qr=new Sr(/^(--(0[1-9]|1[0-2])(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)$/,Ar.xsd.gMonth),Xr=new Sr(/^(([0-9a-fA-F]{2})*)$/,Ar.xsd.hexBinary),Kr=new Sr(/^(((([A-Za-z0-9+/] ?){4})*(([A-Za-z0-9+/] ?){3}[A-Za-z0-9+/]|([A-Za-z0-9+/] ?){2}[AEIMQUYcgkosw048] ?=|[A-Za-z0-9+/] ?[AQgw] ?= ?=))?)$/,Ar.xsd.base64Binary),Yr=new Sr(Rr,Ar.xsd.anyURI),Zr=/^([^\u000d\u000a\u0009]*)$/,en=new Sr([Rr,Zr],Ar.xsd.normalizedString),tn=new Sr([Rr,Zr,/^([^ ]+( [^ ]+)*)*$/],Ar.xsd.token),rn=new Sr(/^([a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*)$/,Ar.xsd.language),nn=new Tr(null,null,Ar.xsd.integer),on=new Tr(null,"0",Ar.xsd.nonPositiveInteger),an=new Tr(null,"-1",Ar.xsd.negativeInteger),sn=new Tr("-9223372036854775808","9223372036854775807",Ar.xsd.long),ln=new Tr("-2147483648","2147483647",Ar.xsd.int),dn=new Tr("-32768","32767",Ar.xsd.short),cn=new Tr("-128","127",Ar.xsd.byte),un=new Tr("0",null,Ar.xsd.nonNegativeInteger),hn=new Tr("0","18446744073709551615",Ar.xsd.unsignedLong),pn=new Tr("0","4294967295",Ar.xsd.unsignedInt),fn=new Tr("0","65535",Ar.xsd.unsignedShort),gn=new Tr("0","255",Ar.xsd.unsignedByte),mn=new Tr("1",null,Ar.xsd.positiveInteger),vn=new Sr([Lr,/^([^DT]*)$/],Ar.xsd.yearMonthDuration),bn=new Sr([Lr,/^([^YM]*[DT].*)$/],Ar.xsd.dayTimeDuration),yn=new Sr([$r,/^(.*(Z|(\+|-)[0-9][0-9]:[0-9][0-9]))$/],Ar.xsd.dateTimeStamp),xn=class extends wr{constructor({factory:e}={}){super({factory:e,validations:{...i}})}},wn=new st([[Ut.BlankNode,new Set(["BlankNode"])],[Ut.BlankNodeOrIRI,new Set(["BlankNode","NamedNode"])],[Ut.BlankNodeOrLiteral,new Set(["BlankNode","Literal"])],[Ut.IRI,new Set(["NamedNode"])],[Ut.IRIOrLiteral,new Set(["NamedNode","Literal"])],[Ut.Literal,new Set(["Literal"])]]);function _n(e,t){return r=>{r.test(t.has(r.valueOrNode.term.termType),Ut.NodeKindConstraintComponent,{args:{nodeKind:e},message:[r.factory.literal("Value does not have node kind {$nodeKind}")],value:r.valueOrNode})}}const Sn=new st([[Ut.maxCount,function(e){return{property:(t=parseInt(e.ptr.out([Ut.maxCount]).value),e=>{e.test(e.values.terms.length<=t,Ut.MaxCountConstraintComponent,{args:{maxCount:t},message:[e.factory.literal("More than {$maxCount} values")]})})};var t}],[Ut.minCount,function(e){return{property:(t=parseInt(e.ptr.out([Ut.minCount]).value),e=>{e.test(e.values.terms.length>=t,Ut.MinCountConstraintComponent,{args:{minCount:t},message:[e.factory.literal("Less than {$minCount} values")]})})};var t}],[Ut.and,function(e){return{generic:(t=[...e.ptr.out([Ut.and])].flatMap((e=>[...e.list()])).map((t=>e.validator.shape(t))),async e=>{const r=await ir(t,(async t=>(await t.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report)),n=r.every((e=>e.conforms));e.test(n,Ut.AndConstraintComponent,{results:r.flatMap((e=>e.results)),value:e.valueOrNode})})};var t}],[Ut.not,function(e){return{generic:(t=e.validator.shape(e.ptr.out([Ut.not])),async e=>{const r=(await t.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report,n=!r.conforms;e.test(n,Ut.NotConstraintComponent,{args:{not:t.ptr.term},message:[e.factory.literal("Value does have shape {$not}")],results:r.results,value:e.valueOrNode})})};var t}],[Ut.or,function(e){return{generic:(t=[...e.ptr.out([Ut.or])].flatMap((e=>[...e.list()])).map((t=>e.validator.shape(t))),async e=>{let r,n=[];if(e.options.debug||e.options.details){const i=await ir(t,(async t=>(await t.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report));n=i.flatMap((e=>e.results)),r=i.some((e=>e.conforms))}else r=await async function(e,t){for(const r of e)if(await t(r))return!0;return!1}(t,(async t=>(await t.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report.conforms));e.test(r,Ut.OrConstraintComponent,{results:n,value:e.valueOrNode})})};var t}],[Ut.xone,function(e){return{generic:(t=[...e.ptr.out([Ut.xone])].flatMap((e=>[...e.list()])).map((t=>e.validator.shape(t))),async e=>{const r=await ir(t,(async t=>(await t.validate(e.create({child:!0,focusNode:e.valueOrNode}))).report)),n=1===r.filter((e=>e.conforms)).length;e.test(n,Ut.XoneConstraintComponent,{results:r.flatMap((e=>e.results)),value:e.valueOrNode})})};var t}],[Ut.closed,function(e){if(!(0,Yt.fromRdf)(e.ptr.out([Ut.closed]).term))return null;const t=e.ptr.out([Ut.property]).map((t=>e.validator.shape(t)));return{node:(r=new ct(t.filter((e=>!e.deactivated)).map((e=>e.path[0].predicates[0]))),n=new ct([...e.ptr.out([Ut.ignoredProperties]).list()||[]].map((e=>e.term))),e=>{const t=e.focusNode.execute({start:"subject",end:"predicate"}).filter((e=>!n.has(e.term)&&!r.has(e.term)));if(t.ptrs.length>0)for(const r of t)e.violation(Ut.ClosedConstraintComponent,{message:[e.factory.literal("Predicate is not allowed (closed shape)")],path:[{quantifier:"one",start:"subject",end:"object",predicates:[r.term]}],value:e.focusNode.node([[...r.quads()][0].object])});else e.debug(Ut.ClosedConstraintComponent)})};var r,n}],[Ut.hasValue,function(e){const t=e.ptr.out([Ut.hasValue]).term;return{node:or(t),property:ar(t)}}],[Ut.in,function(e){return{generic:(t=new ct([...e.ptr.out([Ut.in]).list()].map((e=>e.term))),e=>{e.test(t.has(e.valueOrNode.term),Ut.InConstraintComponent,{args:{in:[...t].map((e=>e.value)).join(", ")},message:[e.factory.literal("Value is not in {$in}")],value:e.valueOrNode})})};var t}],[Ut.disjoint,function(e){return{generic:(t=e.ptr.out([Ut.disjoint]).term,e=>{const r=e.focusNode.dataset.match(e.focusNode.term,t,e.valueOrNode.term);e.test(0===r.size,Ut.DisjointConstraintComponent,{args:{disjoint:t},message:[e.factory.literal("Value node must not also be one of the values of {$disjoint}")],value:e.valueOrNode})})};var t}],[Ut.equals,function(e){const t=e.ptr.out([Ut.equals]).term;return{node:dr(t),property:cr(t)}}],[Ut.lessThan,function(e){return{property:(t=e.ptr.out([Ut.lessThan]).term,e=>{const r=e.focusNode.out([t]).terms;for(const n of e.values)for(const i of r){const r=lr(n.term,i);null===r||r>=0?e.violation(Ut.LessThanConstraintComponent,{args:{lessThan:t},message:[e.factory.literal("Value is not less than value of {$lessThan}")],value:n}):e.debug(Ut.LessThanConstraintComponent,{args:{lessThan:t},message:[e.factory.literal("Value is not less than value of {$lessThan}")],value:n})}})};var t}],[Ut.lessThanOrEquals,function(e){return{property:(t=e.ptr.out([Ut.lessThanOrEquals]).term,e=>{const r=e.focusNode.out([t]).terms;for(const n of e.values)for(const i of r){const r=lr(n.term,i);null===r||r>0?e.violation(Ut.LessThanOrEqualsConstraintComponent,{args:{lessThanOrEquals:t},message:[e.factory.literal("Value is not less than or equal to value of {$lessThanOrEquals}")],value:n}):e.debug(Ut.LessThanOrEqualsConstraintComponent,{args:{lessThanOrEquals:t},message:[e.factory.literal("Value is not less than or equal to value of {$lessThanOrEquals}")],value:n})}})};var t}],[Ut.maxExclusive,function(e){return{generic:(t=e.ptr.out([Ut.maxExclusive]).term,e=>{const r=lr(e.valueOrNode.term,t);e.test(null!==r&&r<0,Ut.MaxExclusiveConstraintComponent,{args:{maxExclusive:t},message:[e.factory.literal("Value is not less than {$maxExclusive}")],value:e.valueOrNode})})};var t}],[Ut.maxInclusive,function(e){return{generic:(t=e.ptr.out([Ut.maxInclusive]).term,e=>{const r=lr(e.valueOrNode.term,t);e.test(null!==r&&r<=0,Ut.MaxInclusiveConstraintComponent,{args:{maxInclusive:t},message:[e.factory.literal("Value is not less than or equal to {$maxInclusive}")],value:e.valueOrNode})})};var t}],[Ut.minExclusive,function(e){return{generic:(t=e.ptr.out([Ut.minExclusive]).term,e=>{const r=lr(e.valueOrNode.term,t);e.test(null!==r&&r>0,Ut.MinExclusiveConstraintComponent,{args:{minExclusive:t},message:[e.factory.literal("Value is not greater than {$minExclusive}")],value:e.valueOrNode})})};var t}],[Ut.minInclusive,function(e){return{generic:(t=e.ptr.out([Ut.minInclusive]).term,e=>{const r=lr(e.valueOrNode.term,t);e.test(null!==r&&r>=0,Ut.MinInclusiveConstraintComponent,{args:{minInclusive:t},message:[e.factory.literal("Value is not greater than or equal to {$minInclusive}")],value:e.valueOrNode})})};var t}],[Ut.node,function(e){return{generic:(t=[...e.ptr.out([Ut.node])].map((t=>e.validator.shape(t))),async e=>{for(const r of t){const t=await r.validate(e.create({child:!0,focusNode:e.valueOrNode}));e.test(t.report.conforms,Ut.NodeConstraintComponent,{args:{node:r.ptr.term},message:[e.factory.literal("Value does not have shape {$node}")],results:t.report.results,value:e.valueOrNode})}})};var t}],[Ut.property,function(e){return{generic:(t=[...e.ptr.out([Ut.property])].map((t=>e.validator.shape(t))),async e=>{const r=e.create({focusNode:e.valueOrNode});for(const e of t)await e.validate(r)})};var t}],[Ut.qualifiedValueShape,function(e){const t=e.validator.shape(e.ptr.out([Ut.qualifiedValueShape])),r=e.ptr.out([Ut.qualifiedValueShapesDisjoint]).term,n=!!r&&(0,Yt.fromRdf)(r),i=e.ptr.out([Ut.qualifiedMaxCount]).term,o=i?parseInt(i.value):null,a=e.ptr.out([Ut.qualifiedMinCount]).term;return{property:ur(t,n,o,a?parseInt(a.value):null)}}],[Ut.languageIn,function(e){return{generic:(t=[...new Set([...e.ptr.out([Ut.languageIn]).list()].map((e=>e.value)))],e=>{const r=t.some((t=>function(e,t){return!!t&&t.slice(0,e.length)===e}(t,e.valueOrNode.term.language)));e.test(r,Ut.LanguageInConstraintComponent,{args:{languageIn:t.join(", ")},message:[e.factory.literal("Language does not match any of {$languageIn}")],value:e.valueOrNode})})};var t}],[Ut.maxLength,function(e){return{generic:(t=parseInt(e.ptr.out([Ut.maxLength]).value),e=>{const r="BlankNode"!==e.valueOrNode.term.termType&&e.valueOrNode.value.length<=t;e.test(r,Ut.MaxLengthConstraintComponent,{args:{maxLength:t},message:[e.factory.literal("Value has more than {$maxLength} characters")],value:e.valueOrNode})})};var t}],[Ut.minLength,function(e){return{generic:(t=parseInt(e.ptr.out([Ut.minLength]).value),e=>{const r="BlankNode"!==e.valueOrNode.term.termType&&e.valueOrNode.value.length>=t;e.test(r,Ut.MinLengthConstraintComponent,{args:{minLength:t},message:[e.factory.literal("Value has less than {$minLength} characters")],value:e.valueOrNode})})};var t}],[Ut.pattern,function(e){const t=e.ptr.out([Ut.pattern]).value,r=e.ptr.out([Ut.flags]).value;return{generic:hr(t,r,new RegExp(t,r))}}],[Ut.uniqueLang,function(e){const t=e.ptr.out([Ut.uniqueLang]).term;return"true"===t.value&&Ht.boolean.equals(t.datatype)?{property:e=>{const t=Object.entries(e.values.terms.reduce(((e,t)=>(t.language&&(e[t.language]=(e[t.language]||0)+1),e)),{})),r=t.filter((([,e])=>e>1));for(const[t]of r)e.violation(Ut.UniqueLangConstraintComponent,{args:{lang:t},message:[e.factory.literal('Language "{?lang}" used more than once')]});0===r.length&&e.debug(Ut.UniqueLangConstraintComponent)}}:null}],[Ut.class,function(e){return{generic:(t=e.ptr.out([Ut.class]).map((e=>tr(e))),e=>{const r=new ct(e.valueOrNode.out([Ft.type]).terms);for(const n of t){const t=[...r].some((e=>n.has(e)));e.test(t,Ut.ClassConstraintComponent,{value:e.valueOrNode})}})};var t}],[Ut.datatype,function(e){return{generic:(t=e.ptr.out([Ut.datatype]).term,r=new xn,e=>{const n=t.equals(e.valueOrNode.term.datatype)&&r.validateSimple(e.valueOrNode.term);e.test(n,Ut.DatatypeConstraintComponent,{args:{datatype:t},message:[e.factory.literal("Value does not have datatype {$datatype}")],value:e.valueOrNode})})};var t,r}],[Ut.nodeKind,function(e){const t=e.ptr.out([Ut.nodeKind]).term;return{generic:_n(t,wn.get(t))}}]]),En=class{constructor(e,{factory:t,...r}){if(this.factory=t,this.options=r,this.registry=new Kt(Sn),this.shapesPtr=new Bt({dataset:e,factory:t}),this.shapes=new st,this.options.coverage&&(this.options.debug=!0,this.options.details=!0,this.options.trace=!0),this.options.validations)for(const[e,t]of this.options.validations)this.registry.validations.set(e,t);const n=[...this.shapesPtr.hasOut([Ut.targetClass]),...this.shapesPtr.hasOut([Ut.targetNode]),...this.shapesPtr.hasOut([Ut.targetObjectsOf]),...this.shapesPtr.hasOut([Ut.targetSubjectsOf]),...this.shapesPtr.hasOut([Ft.type],[Ut.NodeShape]),...this.shapesPtr.hasOut([Ft.type],[Ut.PropertyShape])];for(const e of n)this.shape(e)}shape(e){if(!e.term)return null;let t=this.shapes.get(e.term);return t||(t=new nr(e,{validator:this}),this.shapes.set(e.term,t)),t}async validate(e,t){const r=new Bt({...e,factory:this.factory}),n=new Qt({factory:this.factory,focusNode:r,options:this.options,validator:this});t=t?t.map((e=>this.shape(this.shapesPtr.node(e.terms)))):this.shapes.values();for(const e of t){const t=n.create({shape:e});let i;i=r.isAny()?e.resolveTargets(t):r;for(const r of i)await e.validate(t.create({focusNode:r}))}return n.report}};var In=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};class Tn extends HTMLElement{static get observedAttributes(){return Ze.dataAttributes()}constructor(e){super(),this.shape=null,this.attachShadow({mode:"open"}),this.form=document.createElement("form"),this.config=new Ze(e,this.form),this.form.addEventListener("change",(e=>{e.stopPropagation(),this.config.editMode&&this.validate(!0).then((e=>{this.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!1,composed:!0,detail:{valid:e}}))})).catch((e=>{console.warn(e)}))}))}connectedCallback(){this.shadowRoot.prepend(this.form)}attributeChangedCallback(){this.config.updateAttributes(this),this.initialize()}initialize(){clearTimeout(this.initDebounceTimeout),this.initDebounceTimeout=setTimeout((()=>In(this,void 0,void 0,(function*(){this.form.replaceChildren(document.createTextNode(this.config.attributes.loading));try{yield this.config.loader.loadGraphs(),this.form.replaceChildren(),this.config.renderedNodes.clear();const e=this.findRootShaclShapeSubject();if(e){this.form.classList.forEach((e=>{this.form.classList.remove(e)})),this.form.classList.toggle("mode-edit",this.config.editMode),this.form.classList.toggle("mode-view",!this.config.editMode),this.config.theme.apply(this.form);const t=[this.config.theme.stylesheet];for(const e of Object.entries(ue).map((e=>e[1])))e.stylesheet&&t.push(e.stylesheet);if(this.shadowRoot.adoptedStyleSheets=t,this.shape=new Ie(e,this.config,this.config.attributes.valuesSubject?f.namedNode(this.config.attributes.valuesSubject):void 0),this.form.appendChild(this.shape),this.config.editMode){if(null!==this.config.attributes.submitButton){const e=this.config.theme.createButton(this.config.attributes.submitButton||"Submit",!0);e.addEventListener("click",(e=>{e.preventDefault(),this.form.reportValidity()&&this.validate().then((e=>{var t;e?this.dispatchEvent(new Event("submit",{bubbles:!0,cancelable:!0})):null===(t=this.form.querySelector(":scope .invalid > .editor"))||void 0===t||t.focus()}))})),this.form.appendChild(e)}yield this.validate(!0)}}else if(this.config.shapesGraph.size>0)throw new Error("shacl root node shape not found")}catch(e){console.error(e);const t=document.createElement("div");t.innerText=String(e),this.form.replaceChildren(t)}}))),200)}serialize(e="text/turtle",t=this.toRDF()){return function(e,t,r){if("application/ld+json"===t)return function(e){const t=[];for(const r of e){const e={"@id":r.subject.id};if(r.predicate===N)e["@type"]=r.object.id;else{let t=r.object.value;r.object instanceof v?r.object.language?t={"@language":r.object.language,"@value":r.object.value}:r.object.datatype&&r.object.datatype.value!==`${I}#string`&&(t={"@type":r.object.datatype.value,"@value":r.object.value}):t={"@id":r.object.id},e[r.predicate.value]=t}t.push(e)}return JSON.stringify(t)}(e);{const n=new se({format:t,prefixes:r});n.addQuads(e);let i="";return n.end(((e,t)=>{e&&console.error(e),i=t})),i}}(t.getQuads(null,null,null,null),e,this.config.prefixes)}toRDF(e=new Ne){var t;return null===(t=this.shape)||void 0===t||t.toRDF(e),e}registerPlugin(e){he(e),this.initialize()}setTheme(e){this.config.theme=e,this.initialize()}setClassInstanceProvider(e){this.config.classInstanceProvider=e,this.initialize()}validate(){return In(this,arguments,void 0,(function*(e=!1){var t,r,n,i,o,a;for(const e of this.form.querySelectorAll(":scope .validation-error"))e.remove();for(const e of this.form.querySelectorAll(":scope .property-instance"))e.classList.remove("invalid"),(null===(t=e.querySelector(":scope > .editor"))||void 0===t?void 0:t.value)?e.classList.add("valid"):e.classList.remove("valid");this.config.shapesGraph.deleteGraph(""),null===(r=this.shape)||void 0===r||r.toRDF(this.config.shapesGraph);try{const t=this.config.shapesGraph,r=yield new En(t,{details:!0,factory:f}).validate({dataset:t});for(const t of r.results)if(null===(i=null===(n=t.focusNode)||void 0===n?void 0:n.ptrs)||void 0===i?void 0:i.length)for(const r of t.focusNode.ptrs){const n=r._term;if(null===(o=t.path)||void 0===o?void 0:o.length){const r=t.path[0].predicates[0];let i=this.form.querySelectorAll(`:scope [data-node-id='${n.id}'] [data-path='${r.id}'] > .editor`);0===i.length&&(i=this.form.querySelectorAll(`:scope [data-node-id='${n.id}'] [data-path='${r.id}']`));for(const r of i)if(r.classList.contains("editor")){if(!e||r.value){let e=r.parentElement;e.classList.add("invalid"),e.classList.remove("valid"),e.appendChild(this.createValidationErrorDisplay(t));do{e.classList.contains("collapsible")&&e.classList.add("open"),e=e.parentElement}while(e)}}else e||(r.classList.add("invalid"),r.classList.remove("valid"),r.appendChild(this.createValidationErrorDisplay(t,"node")))}else e||null===(a=this.form.querySelector(`:scope [data-node-id='${n.id}']`))||void 0===a||a.prepend(this.createValidationErrorDisplay(t,"node"))}return r.conforms}catch(e){return console.error(e),!1}}))}createValidationErrorDisplay(e,t){var r,n;const i=document.createElement("span");if(i.classList.add("validation-error"),t&&i.classList.add(t),e)if((null===(r=e.message)||void 0===r?void 0:r.length)>0)for(const t of e.message)i.title+=t.value+"\n";else i.title=null===(n=e.sourceConstraintComponent)||void 0===n?void 0:n.value;return i}findRootShaclShapeSubject(){let e=null;if(this.config.attributes.shapeSubject){if(e=f.namedNode(this.config.attributes.shapeSubject),0===this.config.shapesGraph.getQuads(e,N,P,null).length)return void console.warn(`shapes graph does not contain requested root shape ${this.config.attributes.shapeSubject}`)}else if(this.config.attributes.valuesSubject&&this.config.dataGraph.size>0){const t=f.namedNode(this.config.attributes.valuesSubject),r=[...this.config.dataGraph.getQuads(t,N,null,null),...this.config.dataGraph.getQuads(t,R,null,null)];if(0===r.length)return void console.warn(`value subject '${this.config.attributes.valuesSubject}' has neither ${N.id} nor ${R.id} statement`);for(const t of r)if(this.config.shapesGraph.getQuads(t.object,N,P,null).length>0){e=t.object;break}if(!e){const t=this.config.shapesGraph.getQuads(null,F,r[0].object,null);if(0===t.length)return void console.error(`value subject '${this.config.attributes.valuesSubject}' has no shacl shape definition in the shapes graph`);if(t.length>1&&console.warn(`value subject '${this.config.attributes.valuesSubject}' has multiple shacl shape definitions in the shapes graph, choosing the first found (${t[0].subject})`),0===this.config.shapesGraph.getQuads(t[0].subject,N,P,null).length)return void console.error(`value subject '${this.config.attributes.valuesSubject}' references a shape which is not a NodeShape (${t[0].subject})`);e=t[0].subject}}else{const t=this.config.shapesGraph.getQuads(null,N,P,null);if(0==t.length)return void console.warn("shapes graph does not contain any root shapes");t.length>1&&(console.warn("shapes graph contains",t.length,"root shapes. choosing first found which is",t[0].subject.value),console.info('hint: set the shape to use with attribute "data-shape-subject"')),e=t[0].subject}return e}}function kn(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;const jn=e=>(t,r)=>{void 0!==r?r.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)},An=globalThis,Cn=An.ShadowRoot&&(void 0===An.ShadyCSS||An.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Nn=Symbol(),Rn=new WeakMap;class On{constructor(e,t,r){if(this._$cssResult$=!0,r!==Nn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Cn&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=Rn.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Rn.set(t,e))}return e}toString(){return this.cssText}}const Ln=(e,...t)=>{const r=1===e.length?e[0]:t.reduce(((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1]),e[0]);return new On(r,e,Nn)},$n=Cn?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new On("string"==typeof e?e:e+"",void 0,Nn))(t)})(e):e,{is:Dn,defineProperty:Pn,getOwnPropertyDescriptor:Mn,getOwnPropertyNames:Bn,getOwnPropertySymbols:Fn,getPrototypeOf:qn}=Object,Un=globalThis,zn=Un.trustedTypes,Hn=zn?zn.emptyScript:"",Vn=Un.reactiveElementPolyfillSupport,Gn=(e,t)=>e,Wn={toAttribute(e,t){switch(t){case Boolean:e=e?Hn:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},Jn=(e,t)=>!Dn(e,t),Qn={attribute:!0,type:String,converter:Wn,reflect:!1,hasChanged:Jn};Symbol.metadata??=Symbol("metadata"),Un.litPropertyMetadata??=new WeakMap;class Xn extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Qn){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&Pn(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:i}=Mn(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return n?.call(this)},set(t){const o=n?.call(this);i.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Qn}static _$Ei(){if(this.hasOwnProperty(Gn("elementProperties")))return;const e=qn(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Gn("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Gn("properties"))){const e=this.properties,t=[...Bn(e),...Fn(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift($n(e))}else void 0!==e&&t.push($n(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(Cn)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const r of t){const t=document.createElement("style"),n=An.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=r.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const i=(void 0!==r.converter?.toAttribute?r.converter:Wn).toAttribute(t,r.type);this._$Em=e,null==i?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Wn;this._$Em=n,this[n]=i.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??Jn)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}Xn.elementStyles=[],Xn.shadowRootOptions={mode:"open"},Xn[Gn("elementProperties")]=new Map,Xn[Gn("finalized")]=new Map,Vn?.({ReactiveElement:Xn}),(Un.reactiveElementVersions??=[]).push("2.0.4");const Kn={attribute:!0,type:String,converter:Wn,reflect:!1,hasChanged:Jn},Yn=(e=Kn,t,r)=>{const{kind:n,metadata:i}=r;let o=globalThis.litPropertyMetadata.get(i);if(void 0===o&&globalThis.litPropertyMetadata.set(i,o=new Map),o.set(r.name,e),"accessor"===n){const{name:n}=r;return{set(r){const i=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,i,e)},init(t){return void 0!==t&&this.P(n,void 0,e),t}}}if("setter"===n){const{name:n}=r;return function(r){const i=this[n];t.call(this,r),this.requestUpdate(n,i,e)}}throw Error("Unsupported decorator location: "+n)};function Zn(e){return(t,r)=>"object"==typeof r?Yn(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,n?{...e,wrapped:!0}:e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}function ei(e){return Zn({...e,state:!0,attribute:!1})}const ti=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r);function ri(e,t){return(r,n,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof n?r:i??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return ti(r,n,{get(){let r=e.call(this);return void 0===r&&(r=o(this),(null!==r||this.hasUpdated)&&t.call(this,r)),r}})}return ti(r,n,{get(){return o(this)}})}}let ni;function ii(e){return(t,r)=>{const{slot:n,selector:i}=e??{},o="slot"+(n?`[name=${n}]`:":not([name])");return ti(t,r,{get(){const t=this.renderRoot?.querySelector(o),r=t?.assignedElements(e)??[];return void 0===i?r:r.filter((e=>e.matches(i)))}})}}const oi=globalThis,ai=oi.trustedTypes,si=ai?ai.createPolicy("lit-html",{createHTML:e=>e}):void 0,li="$lit$",di=`lit$${Math.random().toFixed(9).slice(2)}$`,ci="?"+di,ui=`<${ci}>`,hi=document,pi=()=>hi.createComment(""),fi=e=>null===e||"object"!=typeof e&&"function"!=typeof e,gi=Array.isArray,mi=e=>gi(e)||"function"==typeof e?.[Symbol.iterator],vi="[ \t\n\f\r]",bi=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,yi=/-->/g,xi=/>/g,wi=RegExp(`>|${vi}(?:([^\\s"'>=/]+)(${vi}*=${vi}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),_i=/'/g,Si=/"/g,Ei=/^(?:script|style|textarea|title)$/i,Ii=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),Ti=Ii(1),ki=Ii(2),ji=Ii(3),Ai=Symbol.for("lit-noChange"),Ci=Symbol.for("lit-nothing"),Ni=new WeakMap,Ri=hi.createTreeWalker(hi,129);function Oi(e,t){if(!gi(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==si?si.createHTML(t):t}const Li=(e,t)=>{const r=e.length-1,n=[];let i,o=2===t?"<svg>":3===t?"<math>":"",a=bi;for(let t=0;t<r;t++){const r=e[t];let s,l,d=-1,c=0;for(;c<r.length&&(a.lastIndex=c,l=a.exec(r),null!==l);)c=a.lastIndex,a===bi?"!--"===l[1]?a=yi:void 0!==l[1]?a=xi:void 0!==l[2]?(Ei.test(l[2])&&(i=RegExp("</"+l[2],"g")),a=wi):void 0!==l[3]&&(a=wi):a===wi?">"===l[0]?(a=i??bi,d=-1):void 0===l[1]?d=-2:(d=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?wi:'"'===l[3]?Si:_i):a===Si||a===_i?a=wi:a===yi||a===xi?a=bi:(a=wi,i=void 0);const u=a===wi&&e[t+1].startsWith("/>")?" ":"";o+=a===bi?r+ui:d>=0?(n.push(s),r.slice(0,d)+li+r.slice(d)+di+u):r+di+(-2===d?t:u)}return[Oi(e,o+(e[r]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),n]};class $i{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let i=0,o=0;const a=e.length-1,s=this.parts,[l,d]=Li(e,t);if(this.el=$i.createElement(l,r),Ri.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=Ri.nextNode())&&s.length<a;){if(1===n.nodeType){if(n.hasAttributes())for(const e of n.getAttributeNames())if(e.endsWith(li)){const t=d[o++],r=n.getAttribute(e).split(di),a=/([.?@])?(.*)/.exec(t);s.push({type:1,index:i,name:a[2],strings:r,ctor:"."===a[1]?Fi:"?"===a[1]?qi:"@"===a[1]?Ui:Bi}),n.removeAttribute(e)}else e.startsWith(di)&&(s.push({type:6,index:i}),n.removeAttribute(e));if(Ei.test(n.tagName)){const e=n.textContent.split(di),t=e.length-1;if(t>0){n.textContent=ai?ai.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],pi()),Ri.nextNode(),s.push({type:2,index:++i});n.append(e[t],pi())}}}else if(8===n.nodeType)if(n.data===ci)s.push({type:2,index:i});else{let e=-1;for(;-1!==(e=n.data.indexOf(di,e+1));)s.push({type:7,index:i}),e+=di.length-1}i++}}static createElement(e,t){const r=hi.createElement("template");return r.innerHTML=e,r}}function Di(e,t,r=e,n){if(t===Ai)return t;let i=void 0!==n?r.o?.[n]:r.l;const o=fi(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),void 0===o?i=void 0:(i=new o(e),i._$AT(e,r,n)),void 0!==n?(r.o??=[])[n]=i:r.l=i),void 0!==i&&(t=Di(e,i._$AS(e,t.values),i,n)),t}class Pi{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,n=(e?.creationScope??hi).importNode(t,!0);Ri.currentNode=n;let i=Ri.nextNode(),o=0,a=0,s=r[0];for(;void 0!==s;){if(o===s.index){let t;2===s.type?t=new Mi(i,i.nextSibling,this,e):1===s.type?t=new s.ctor(i,s.name,s.strings,this,e):6===s.type&&(t=new zi(i,this,e)),this._$AV.push(t),s=r[++a]}o!==s?.index&&(i=Ri.nextNode(),o++)}return Ri.currentNode=hi,n}p(e){let t=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class Mi{get _$AU(){return this._$AM?._$AU??this.v}constructor(e,t,r,n){this.type=2,this._$AH=Ci,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this.v=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Di(this,e,t),fi(e)?e===Ci||null==e||""===e?(this._$AH!==Ci&&this._$AR(),this._$AH=Ci):e!==this._$AH&&e!==Ai&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):mi(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Ci&&fi(this._$AH)?this._$AA.nextSibling.data=e:this.T(hi.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,n="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=$i.createElement(Oi(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{const e=new Pi(n,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=Ni.get(e.strings);return void 0===t&&Ni.set(e.strings,t=new $i(e)),t}k(e){gi(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const i of e)n===t.length?t.push(r=new Mi(this.O(pi()),this.O(pi()),this,this.options)):r=t[n],r._$AI(i),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this.v=e,this._$AP?.(e))}}class Bi{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,i){this.type=1,this._$AH=Ci,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=i,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Ci}_$AI(e,t=this,r,n){const i=this.strings;let o=!1;if(void 0===i)e=Di(this,e,t,0),o=!fi(e)||e!==this._$AH&&e!==Ai,o&&(this._$AH=e);else{const n=e;let a,s;for(e=i[0],a=0;a<i.length-1;a++)s=Di(this,n[r+a],t,a),s===Ai&&(s=this._$AH[a]),o||=!fi(s)||s!==this._$AH[a],s===Ci?e=Ci:e!==Ci&&(e+=(s??"")+i[a+1]),this._$AH[a]=s}o&&!n&&this.j(e)}j(e){e===Ci?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Fi extends Bi{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Ci?void 0:e}}class qi extends Bi{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Ci)}}class Ui extends Bi{constructor(e,t,r,n,i){super(e,t,r,n,i),this.type=5}_$AI(e,t=this){if((e=Di(this,e,t,0)??Ci)===Ai)return;const r=this._$AH,n=e===Ci&&r!==Ci||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,i=e!==Ci&&(r===Ci||n);n&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class zi{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Di(this,e)}}const Hi={M:li,P:di,A:ci,C:1,L:Li,R:Pi,D:mi,V:Di,I:Mi,H:Bi,N:qi,U:Ui,B:Fi,F:zi},Vi=oi.litHtmlPolyfillSupport;Vi?.($i,Mi),(oi.litHtmlVersions??=[]).push("3.2.0");const Gi=(e,t,r)=>{const n=r?.renderBefore??t;let i=n._$litPart$;if(void 0===i){const e=r?.renderBefore??null;n._$litPart$=i=new Mi(t.insertBefore(pi(),e),e,void 0,r??{})}return i._$AI(e),i};class Wi extends Xn{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.o=Gi(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return Ai}}Wi._$litElement$=!0,Wi.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:Wi});const Ji=globalThis.litElementPolyfillSupport;Ji?.({LitElement:Wi}),(globalThis.litElementVersions??=[]).push("4.1.0");const Qi=e=>(...t)=>({_$litDirective$:e,values:t});class Xi{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this.t=e,this._$AM=t,this.i=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const Ki=Qi(class extends Xi{constructor(e){if(super(e),1!==e.type||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const r=e.element.classList;for(const e of this.st)e in t||(r.remove(e),this.st.delete(e));for(const e in t){const n=!!t[e];n===this.st.has(e)||this.nt?.has(e)||(n?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return Ai}}),Yi="cubic-bezier(0.2, 0, 0, 1)",Zi="cubic-bezier(.3,0,0,1)",eo="cubic-bezier(.3,0,.8,.15)";class to extends Wi{constructor(){super(...arguments),this.disabled=!1,this.error=!1,this.focused=!1,this.label="",this.noAsterisk=!1,this.populated=!1,this.required=!1,this.resizable=!1,this.supportingText="",this.errorText="",this.count=-1,this.max=-1,this.hasStart=!1,this.hasEnd=!1,this.isAnimating=!1,this.refreshErrorAlert=!1,this.disableTransitions=!1}get counterText(){const e=this.count??-1,t=this.max??-1;return e<0||t<=0?"":`${e} / ${t}`}get supportingOrErrorText(){return this.error&&this.errorText?this.errorText:this.supportingText}reannounceError(){this.refreshErrorAlert=!0}update(e){e.has("disabled")&&void 0!==e.get("disabled")&&(this.disableTransitions=!0),this.disabled&&this.focused&&(e.set("focused",!0),this.focused=!1),this.animateLabelIfNeeded({wasFocused:e.get("focused"),wasPopulated:e.get("populated")}),super.update(e)}render(){const e=this.renderLabel(!0),t=this.renderLabel(!1),r=this.renderOutline?.(e),n={disabled:this.disabled,"disable-transitions":this.disableTransitions,error:this.error&&!this.disabled,focused:this.focused,"with-start":this.hasStart,"with-end":this.hasEnd,populated:this.populated,resizable:this.resizable,required:this.required,"no-label":!this.label};return Ti`
3
+ <div class="field ${Ki(n)}">
4
4
  <div class="container-overflow">
5
5
  ${this.renderBackground?.()} ${this.renderIndicator?.()} ${r}
6
6
  <div class="container">
@@ -9,7 +9,7 @@ var e={5568:e=>{const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?
9
9
  </div>
10
10
  <div class="middle">
11
11
  <div class="label-wrapper">
12
- ${t} ${r?ki:e}
12
+ ${t} ${r?Ci:e}
13
13
  </div>
14
14
  <div class="content">
15
15
  <slot></slot>
@@ -22,16 +22,16 @@ var e={5568:e=>{const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?
22
22
  </div>
23
23
  ${this.renderSupportingText()}
24
24
  </div>
25
- `}updated(e){(e.has("supportingText")||e.has("errorText")||e.has("count")||e.has("max"))&&this.updateSlottedAriaDescribedBy(),this.refreshErrorAlert&&requestAnimationFrame((()=>{this.refreshErrorAlert=!1})),this.disableTransitions&&requestAnimationFrame((()=>{this.disableTransitions=!1}))}renderSupportingText(){const{supportingOrErrorText:e,counterText:t}=this;if(!e&&!t)return ki;const r=Ei`<span>${e}</span>`,n=t?Ei`<span class="counter">${t}</span>`:ki,i=this.error&&this.errorText&&!this.refreshErrorAlert;return Ei`
26
- <div class="supporting-text" role=${i?"alert":ki}>${r}${n}</div>
25
+ `}updated(e){(e.has("supportingText")||e.has("errorText")||e.has("count")||e.has("max"))&&this.updateSlottedAriaDescribedBy(),this.refreshErrorAlert&&requestAnimationFrame((()=>{this.refreshErrorAlert=!1})),this.disableTransitions&&requestAnimationFrame((()=>{this.disableTransitions=!1}))}renderSupportingText(){const{supportingOrErrorText:e,counterText:t}=this;if(!e&&!t)return Ci;const r=Ti`<span>${e}</span>`,n=t?Ti`<span class="counter">${t}</span>`:Ci,i=this.error&&this.errorText&&!this.refreshErrorAlert;return Ti`
26
+ <div class="supporting-text" role=${i?"alert":Ci}>${r}${n}</div>
27
27
  <slot
28
28
  name="aria-describedby"
29
29
  @slotchange=${this.updateSlottedAriaDescribedBy}></slot>
30
- `}updateSlottedAriaDescribedBy(){for(const e of this.slottedAriaDescribedBy)Hi(Ei`${this.supportingOrErrorText} ${this.counterText}`,e),e.setAttribute("hidden","")}renderLabel(e){if(!this.label)return ki;let t;t=e?this.focused||this.populated||this.isAnimating:!this.focused&&!this.populated&&!this.isAnimating;const r={hidden:!t,floating:e,resting:!e},n=`${this.label}${this.required&&!this.noAsterisk?"*":""}`;return Ei`
31
- <span class="label ${Qi(r)}" aria-hidden=${!t}
30
+ `}updateSlottedAriaDescribedBy(){for(const e of this.slottedAriaDescribedBy)Gi(Ti`${this.supportingOrErrorText} ${this.counterText}`,e),e.setAttribute("hidden","")}renderLabel(e){if(!this.label)return Ci;let t;t=e?this.focused||this.populated||this.isAnimating:!this.focused&&!this.populated&&!this.isAnimating;const r={hidden:!t,floating:e,resting:!e},n=`${this.label}${this.required&&!this.noAsterisk?"*":""}`;return Ti`
31
+ <span class="label ${Ki(r)}" aria-hidden=${!t}
32
32
  >${n}</span
33
33
  >
34
- `}animateLabelIfNeeded({wasFocused:e,wasPopulated:t}){this.label&&(e??(e=this.focused),t??(t=this.populated),(e||t)!==(this.focused||this.populated)&&(this.isAnimating=!0,this.labelAnimation?.cancel(),this.labelAnimation=this.floatingLabelEl?.animate(this.getLabelKeyframes(),{duration:150,easing:Xi}),this.labelAnimation?.addEventListener("finish",(()=>{this.isAnimating=!1}))))}getLabelKeyframes(){const{floatingLabelEl:e,restingLabelEl:t}=this;if(!e||!t)return[];const{x:r,y:n,height:i}=e.getBoundingClientRect(),{x:o,y:a,height:s}=t.getBoundingClientRect(),l=e.scrollWidth,d=t.scrollWidth,c=d/l,u=`translateX(${o-r}px) translateY(${a-n+Math.round((s-i*c)/2)}px) scale(${c})`,h="translateX(0) translateY(0) scale(1)",p=t.clientWidth,f=d>p?p/c+"px":"";return this.focused||this.populated?[{transform:u,width:f},{transform:h,width:f}]:[{transform:h,width:f},{transform:u,width:f}]}getSurfacePositionClientRect(){return this.containerEl.getBoundingClientRect()}}In([Kn({type:Boolean})],Zi.prototype,"disabled",void 0),In([Kn({type:Boolean})],Zi.prototype,"error",void 0),In([Kn({type:Boolean})],Zi.prototype,"focused",void 0),In([Kn()],Zi.prototype,"label",void 0),In([Kn({type:Boolean,attribute:"no-asterisk"})],Zi.prototype,"noAsterisk",void 0),In([Kn({type:Boolean})],Zi.prototype,"populated",void 0),In([Kn({type:Boolean})],Zi.prototype,"required",void 0),In([Kn({type:Boolean})],Zi.prototype,"resizable",void 0),In([Kn({attribute:"supporting-text"})],Zi.prototype,"supportingText",void 0),In([Kn({attribute:"error-text"})],Zi.prototype,"errorText",void 0),In([Kn({type:Number})],Zi.prototype,"count",void 0),In([Kn({type:Number})],Zi.prototype,"max",void 0),In([Kn({type:Boolean,attribute:"has-start"})],Zi.prototype,"hasStart",void 0),In([Kn({type:Boolean,attribute:"has-end"})],Zi.prototype,"hasEnd",void 0),In([ri({slot:"aria-describedby"})],Zi.prototype,"slottedAriaDescribedBy",void 0),In([Yn()],Zi.prototype,"isAnimating",void 0),In([Yn()],Zi.prototype,"refreshErrorAlert",void 0),In([Yn()],Zi.prototype,"disableTransitions",void 0),In([ei(".label.floating")],Zi.prototype,"floatingLabelEl",void 0),In([ei(".label.resting")],Zi.prototype,"restingLabelEl",void 0),In([ei(".container")],Zi.prototype,"containerEl",void 0);class eo extends Zi{renderOutline(e){return Ei`
34
+ `}animateLabelIfNeeded({wasFocused:e,wasPopulated:t}){this.label&&(e??=this.focused,t??=this.populated,(e||t)!==(this.focused||this.populated)&&(this.isAnimating=!0,this.labelAnimation?.cancel(),this.labelAnimation=this.floatingLabelEl?.animate(this.getLabelKeyframes(),{duration:150,easing:Yi}),this.labelAnimation?.addEventListener("finish",(()=>{this.isAnimating=!1}))))}getLabelKeyframes(){const{floatingLabelEl:e,restingLabelEl:t}=this;if(!e||!t)return[];const{x:r,y:n,height:i}=e.getBoundingClientRect(),{x:o,y:a,height:s}=t.getBoundingClientRect(),l=e.scrollWidth,d=t.scrollWidth,c=d/l,u=`translateX(${o-r}px) translateY(${a-n+Math.round((s-i*c)/2)}px) scale(${c})`,h="translateX(0) translateY(0) scale(1)",p=t.clientWidth,f=d>p?p/c+"px":"";return this.focused||this.populated?[{transform:u,width:f},{transform:h,width:f}]:[{transform:h,width:f},{transform:u,width:f}]}getSurfacePositionClientRect(){return this.containerEl.getBoundingClientRect()}}kn([Zn({type:Boolean})],to.prototype,"disabled",void 0),kn([Zn({type:Boolean})],to.prototype,"error",void 0),kn([Zn({type:Boolean})],to.prototype,"focused",void 0),kn([Zn()],to.prototype,"label",void 0),kn([Zn({type:Boolean,attribute:"no-asterisk"})],to.prototype,"noAsterisk",void 0),kn([Zn({type:Boolean})],to.prototype,"populated",void 0),kn([Zn({type:Boolean})],to.prototype,"required",void 0),kn([Zn({type:Boolean})],to.prototype,"resizable",void 0),kn([Zn({attribute:"supporting-text"})],to.prototype,"supportingText",void 0),kn([Zn({attribute:"error-text"})],to.prototype,"errorText",void 0),kn([Zn({type:Number})],to.prototype,"count",void 0),kn([Zn({type:Number})],to.prototype,"max",void 0),kn([Zn({type:Boolean,attribute:"has-start"})],to.prototype,"hasStart",void 0),kn([Zn({type:Boolean,attribute:"has-end"})],to.prototype,"hasEnd",void 0),kn([ii({slot:"aria-describedby"})],to.prototype,"slottedAriaDescribedBy",void 0),kn([ei()],to.prototype,"isAnimating",void 0),kn([ei()],to.prototype,"refreshErrorAlert",void 0),kn([ei()],to.prototype,"disableTransitions",void 0),kn([ri(".label.floating")],to.prototype,"floatingLabelEl",void 0),kn([ri(".label.resting")],to.prototype,"restingLabelEl",void 0),kn([ri(".container")],to.prototype,"containerEl",void 0);class ro extends to{renderOutline(e){return Ti`
35
35
  <div class="outline">
36
36
  <div class="outline-start"></div>
37
37
  <div class="outline-notch">
@@ -41,14 +41,14 @@ var e={5568:e=>{const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?
41
41
  </div>
42
42
  <div class="outline-end"></div>
43
43
  </div>
44
- `}}const to=Cn`@layer styles{:host{--_bottom-space: var(--md-outlined-field-bottom-space, 16px);--_content-color: var(--md-outlined-field-content-color, var(--md-sys-color-on-surface, #1d1b20));--_content-font: var(--md-outlined-field-content-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_content-line-height: var(--md-outlined-field-content-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_content-size: var(--md-outlined-field-content-size, var(--md-sys-typescale-body-large-size, 1rem));--_content-weight: var(--md-outlined-field-content-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_disabled-content-color: var(--md-outlined-field-disabled-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-content-opacity: var(--md-outlined-field-disabled-content-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-field-disabled-label-text-opacity, 0.38);--_disabled-leading-content-color: var(--md-outlined-field-disabled-leading-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-content-opacity: var(--md-outlined-field-disabled-leading-content-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-content-color: var(--md-outlined-field-disabled-trailing-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-content-opacity: var(--md-outlined-field-disabled-trailing-content-opacity, 0.38);--_error-content-color: var(--md-outlined-field-error-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-content-color: var(--md-outlined-field-error-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-content-color: var(--md-outlined-field-error-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-content-color: var(--md-outlined-field-error-focus-trailing-content-color, var(--md-sys-color-error, #b3261e));--_error-hover-content-color: var(--md-outlined-field-error-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-content-color: var(--md-outlined-field-error-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-content-color: var(--md-outlined-field-error-hover-trailing-content-color, var(--md-sys-color-on-error-container, #410e0b));--_error-label-text-color: var(--md-outlined-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-content-color: var(--md-outlined-field-error-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-content-color: var(--md-outlined-field-error-trailing-content-color, var(--md-sys-color-error, #b3261e));--_focus-content-color: var(--md-outlined-field-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-content-color: var(--md-outlined-field-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-content-color: var(--md-outlined-field-focus-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-content-color: var(--md-outlined-field-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-content-color: var(--md-outlined-field-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-content-color: var(--md-outlined-field-hover-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-outlined-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-padding-bottom: var(--md-outlined-field-label-text-padding-bottom, 8px);--_label-text-populated-line-height: var(--md-outlined-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-content-color: var(--md-outlined-field-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-space: var(--md-outlined-field-leading-space, 16px);--_outline-color: var(--md-outlined-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-label-padding: var(--md-outlined-field-outline-label-padding, 4px);--_outline-width: var(--md-outlined-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-leading-space: var(--md-outlined-field-supporting-text-leading-space, 16px);--_supporting-text-line-height: var(--md-outlined-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-top-space: var(--md-outlined-field-supporting-text-top-space, 4px);--_supporting-text-trailing-space: var(--md-outlined-field-supporting-text-trailing-space, 16px);--_supporting-text-weight: var(--md-outlined-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_top-space: var(--md-outlined-field-top-space, 16px);--_trailing-content-color: var(--md-outlined-field-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-space: var(--md-outlined-field-trailing-space, 16px);--_container-shape-start-start: var(--md-outlined-field-container-shape-start-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-field-container-shape-start-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-field-container-shape-end-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-field-container-shape-end-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)))}.outline{border-color:var(--_outline-color);border-radius:inherit;display:flex;pointer-events:none;height:100%;position:absolute;width:100%;z-index:1}.outline-start::before,.outline-start::after,.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after,.outline-end::before,.outline-end::after{border:inherit;content:"";inset:0;position:absolute}.outline-start,.outline-end{border:inherit;border-radius:inherit;box-sizing:border-box;position:relative}.outline-start::before,.outline-start::after,.outline-end::before,.outline-end::after{border-bottom-style:solid;border-top-style:solid}.outline-start::after,.outline-end::after{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-start::after,.focused .outline-end::after{opacity:1}.outline-start::before,.outline-start::after{border-inline-start-style:solid;border-inline-end-style:none;border-start-start-radius:inherit;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:0;margin-inline-end:var(--_outline-label-padding)}.outline-end{flex-grow:1;margin-inline-start:calc(-1*var(--_outline-label-padding))}.outline-end::before,.outline-end::after{border-inline-start-style:none;border-inline-end-style:solid;border-start-start-radius:0;border-start-end-radius:inherit;border-end-start-radius:0;border-end-end-radius:inherit}.outline-notch{align-items:flex-start;border:inherit;display:flex;margin-inline-start:calc(-1*var(--_outline-label-padding));margin-inline-end:var(--_outline-label-padding);max-width:calc(100% - var(--_leading-space) - var(--_trailing-space));padding:0 var(--_outline-label-padding);position:relative}.no-label .outline-notch{display:none}.outline-panel-inactive,.outline-panel-active{border:inherit;border-bottom-style:solid;inset:0;position:absolute}.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after{border-top-style:solid;border-bottom:none;bottom:auto;transform:scaleX(1);transition:transform 150ms cubic-bezier(0.2, 0, 0, 1)}.outline-panel-inactive::before,.outline-panel-active::before{right:50%;transform-origin:top left}.outline-panel-inactive::after,.outline-panel-active::after{left:50%;transform-origin:top right}.populated .outline-panel-inactive::before,.populated .outline-panel-inactive::after,.populated .outline-panel-active::before,.populated .outline-panel-active::after,.focused .outline-panel-inactive::before,.focused .outline-panel-inactive::after,.focused .outline-panel-active::before,.focused .outline-panel-active::after{transform:scaleX(0)}.outline-panel-active{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-panel-active{opacity:1}.outline-label{display:flex;max-width:100%;transform:translateY(calc(-100% + var(--_label-text-padding-bottom)))}.outline-start,.field:not(.with-start) .content ::slotted(*){padding-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-start) .label-wrapper{margin-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-end) .content ::slotted(*){padding-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.field:not(.with-end) .label-wrapper{margin-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.outline-start::before,.outline-end::before,.outline-panel-inactive,.outline-panel-inactive::before,.outline-panel-inactive::after{border-width:var(--_outline-width)}:hover .outline{border-color:var(--_hover-outline-color);color:var(--_hover-outline-color)}:hover .outline-start::before,:hover .outline-end::before,:hover .outline-panel-inactive,:hover .outline-panel-inactive::before,:hover .outline-panel-inactive::after{border-width:var(--_hover-outline-width)}.focused .outline{border-color:var(--_focus-outline-color);color:var(--_focus-outline-color)}.outline-start::after,.outline-end::after,.outline-panel-active,.outline-panel-active::before,.outline-panel-active::after{border-width:var(--_focus-outline-width)}.disabled .outline{border-color:var(--_disabled-outline-color);color:var(--_disabled-outline-color)}.disabled .outline-start,.disabled .outline-end,.disabled .outline-panel-inactive{opacity:var(--_disabled-outline-opacity)}.disabled .outline-start::before,.disabled .outline-end::before,.disabled .outline-panel-inactive,.disabled .outline-panel-inactive::before,.disabled .outline-panel-inactive::after{border-width:var(--_disabled-outline-width)}.error .outline{border-color:var(--_error-outline-color);color:var(--_error-outline-color)}.error:hover .outline{border-color:var(--_error-hover-outline-color);color:var(--_error-hover-outline-color)}.error.focused .outline{border-color:var(--_error-focus-outline-color);color:var(--_error-focus-outline-color)}.resizable .container{bottom:var(--_focus-outline-width);inset-inline-end:var(--_focus-outline-width);clip-path:inset(var(--_focus-outline-width) 0 0 var(--_focus-outline-width))}.resizable .container>*{top:var(--_focus-outline-width);inset-inline-start:var(--_focus-outline-width)}.resizable .container:dir(rtl){clip-path:inset(var(--_focus-outline-width) var(--_focus-outline-width) 0 0)}}@layer hcm{@media(forced-colors: active){.disabled .outline{border-color:GrayText;color:GrayText}.disabled :is(.outline-start,.outline-end,.outline-panel-inactive){opacity:1}}}
45
- `,ro=Cn`:host{display:inline-flex;resize:both}.field{display:flex;flex:1;flex-direction:column;writing-mode:horizontal-tb;max-width:100%}.container-overflow{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start);display:flex;height:100%;position:relative}.container{align-items:center;border-radius:inherit;display:flex;flex:1;max-height:100%;min-height:100%;min-width:min-content;position:relative}.field,.container-overflow{resize:inherit}.resizable:not(.disabled) .container{resize:inherit;overflow:hidden}.disabled{pointer-events:none}@layer styles{.start,.middle,.end{display:flex;box-sizing:border-box;height:100%;position:relative}.start{color:var(--_leading-content-color)}.end{color:var(--_trailing-content-color)}.start,.end{align-items:center;justify-content:center}.with-start .start,.with-end .end{min-width:48px}.with-start .start{margin-inline-end:4px}.with-end .end{margin-inline-start:4px}.middle{align-items:stretch;align-self:baseline;flex:1}.content{color:var(--_content-color);display:flex;flex:1;opacity:0;transition:opacity 83ms cubic-bezier(0.2, 0, 0, 1)}.no-label .content,.focused .content,.populated .content{opacity:1;transition-delay:67ms}:is(.disabled,.disable-transitions) .content{transition:none}.content ::slotted(*){all:unset;color:currentColor;font-family:var(--_content-font);font-size:var(--_content-size);line-height:var(--_content-line-height);font-weight:var(--_content-weight);width:100%;overflow-wrap:revert;white-space:revert}.content ::slotted(:not(textarea)){padding-top:var(--_top-space);padding-bottom:var(--_bottom-space)}.content ::slotted(textarea){margin-top:var(--_top-space);margin-bottom:var(--_bottom-space)}:hover .content{color:var(--_hover-content-color)}:hover .start{color:var(--_hover-leading-content-color)}:hover .end{color:var(--_hover-trailing-content-color)}.focused .content{color:var(--_focus-content-color)}.focused .start{color:var(--_focus-leading-content-color)}.focused .end{color:var(--_focus-trailing-content-color)}.disabled .content{color:var(--_disabled-content-color)}.disabled.no-label .content,.disabled.focused .content,.disabled.populated .content{opacity:var(--_disabled-content-opacity)}.disabled .start{color:var(--_disabled-leading-content-color);opacity:var(--_disabled-leading-content-opacity)}.disabled .end{color:var(--_disabled-trailing-content-color);opacity:var(--_disabled-trailing-content-opacity)}.error .content{color:var(--_error-content-color)}.error .start{color:var(--_error-leading-content-color)}.error .end{color:var(--_error-trailing-content-color)}.error:hover .content{color:var(--_error-hover-content-color)}.error:hover .start{color:var(--_error-hover-leading-content-color)}.error:hover .end{color:var(--_error-hover-trailing-content-color)}.error.focused .content{color:var(--_error-focus-content-color)}.error.focused .start{color:var(--_error-focus-leading-content-color)}.error.focused .end{color:var(--_error-focus-trailing-content-color)}}@layer hcm{@media(forced-colors: active){.disabled :is(.start,.content,.end){color:GrayText;opacity:1}}}@layer styles{.label{box-sizing:border-box;color:var(--_label-text-color);overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap;z-index:1;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);width:min-content}.label-wrapper{inset:0;pointer-events:none;position:absolute}.label.resting{position:absolute;top:var(--_top-space)}.label.floating{font-size:var(--_label-text-populated-size);line-height:var(--_label-text-populated-line-height);transform-origin:top left}.label.hidden{opacity:0}.no-label .label{display:none}.label-wrapper{inset:0;position:absolute;text-align:initial}:hover .label{color:var(--_hover-label-text-color)}.focused .label{color:var(--_focus-label-text-color)}.disabled .label{color:var(--_disabled-label-text-color)}.disabled .label:not(.hidden){opacity:var(--_disabled-label-text-opacity)}.error .label{color:var(--_error-label-text-color)}.error:hover .label{color:var(--_error-hover-label-text-color)}.error.focused .label{color:var(--_error-focus-label-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .label:not(.hidden){color:GrayText;opacity:1}}}@layer styles{.supporting-text{color:var(--_supporting-text-color);display:flex;font-family:var(--_supporting-text-font);font-size:var(--_supporting-text-size);line-height:var(--_supporting-text-line-height);font-weight:var(--_supporting-text-weight);gap:16px;justify-content:space-between;padding-inline-start:var(--_supporting-text-leading-space);padding-inline-end:var(--_supporting-text-trailing-space);padding-top:var(--_supporting-text-top-space)}.supporting-text :nth-child(2){flex-shrink:0}:hover .supporting-text{color:var(--_hover-supporting-text-color)}.focus .supporting-text{color:var(--_focus-supporting-text-color)}.disabled .supporting-text{color:var(--_disabled-supporting-text-color);opacity:var(--_disabled-supporting-text-opacity)}.error .supporting-text{color:var(--_error-supporting-text-color)}.error:hover .supporting-text{color:var(--_error-hover-supporting-text-color)}.error.focus .supporting-text{color:var(--_error-focus-supporting-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .supporting-text{color:GrayText;opacity:1}}}
46
- `;let no=class extends eo{};no.styles=[ro,to],no=In([Tn("md-outlined-field")],no);const io=Symbol.for(""),oo=e=>{if(e?.r===io)return e?._$litStatic$},ao=(e,...t)=>({_$litStatic$:t.reduce(((t,r,n)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(r)+e[n+1]),e[0]),r:io}),so=new Map,lo=e=>(t,...r)=>{const n=r.length;let i,o;const a=[],s=[];let l,d=0,c=!1;for(;d<n;){for(l=t[d];d<n&&void 0!==(o=r[d],i=oo(o));)l+=i+t[++d],c=!0;d!==n&&s.push(o),a.push(l),d++}if(d===n&&a.push(t[n]),c){const e=a.join("$$lit$$");void 0===(t=so.get(e))&&(a.raw=a,so.set(e,t=a)),r=s}return e(t,...r)},co=lo(Ei),uo=(lo(Ii),lo(Ti),Cn`:host{--_caret-color: var(--md-outlined-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_disabled-input-text-color: var(--md-outlined-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-outlined-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-outlined-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-outlined-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-text-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-text-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-outlined-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-outlined-text-field-disabled-trailing-icon-opacity, 0.38);--_error-focus-caret-color: var(--md-outlined-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-outlined-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-outlined-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-outlined-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-input-text-color: var(--md-outlined-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-outlined-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-outlined-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-outlined-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-outlined-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-outlined-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-outlined-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-input-text-color: var(--md-outlined-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-outlined-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-text-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-outlined-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-input-text-color: var(--md-outlined-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-icon-color: var(--md-outlined-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-text-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-outlined-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-outlined-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var(--md-outlined-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_input-text-line-height: var(--md-outlined-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_input-text-placeholder-color: var(--md-outlined-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-outlined-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-size: var(--md-outlined-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-suffix-color: var(--md-outlined-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-weight: var(--md-outlined-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_label-text-color: var(--md-outlined-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-outlined-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-icon-color: var(--md-outlined-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-outlined-text-field-leading-icon-size, 24px);--_outline-color: var(--md-outlined-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-text-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-line-height: var(--md-outlined-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-weight: var(--md-outlined-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_trailing-icon-color: var(--md-outlined-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-outlined-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var(--md-outlined-text-field-container-shape-start-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-text-field-container-shape-start-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-text-field-container-shape-end-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-text-field-container-shape-end-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_leading-space: var(--md-outlined-text-field-leading-space, 16px);--_trailing-space: var(--md-outlined-text-field-trailing-space, 16px);--_top-space: var(--md-outlined-text-field-top-space, 16px);--_bottom-space: var(--md-outlined-text-field-bottom-space, 16px);--_input-text-prefix-trailing-space: var(--md-outlined-text-field-input-text-prefix-trailing-space, 2px);--_input-text-suffix-leading-space: var(--md-outlined-text-field-input-text-suffix-leading-space, 2px);--_focus-caret-color: var(--md-outlined-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--md-outlined-field-bottom-space: var(--_bottom-space);--md-outlined-field-container-shape-end-end: var(--_container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_container-shape-start-start);--md-outlined-field-content-color: var(--_input-text-color);--md-outlined-field-content-font: var(--_input-text-font);--md-outlined-field-content-line-height: var(--_input-text-line-height);--md-outlined-field-content-size: var(--_input-text-size);--md-outlined-field-content-weight: var(--_input-text-weight);--md-outlined-field-disabled-content-color: var(--_disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_focus-outline-color);--md-outlined-field-focus-outline-width: var(--_focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_hover-outline-color);--md-outlined-field-hover-outline-width: var(--_hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_label-text-color);--md-outlined-field-label-text-font: var(--_label-text-font);--md-outlined-field-label-text-line-height: var(--_label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_label-text-populated-size);--md-outlined-field-label-text-size: var(--_label-text-size);--md-outlined-field-label-text-weight: var(--_label-text-weight);--md-outlined-field-leading-content-color: var(--_leading-icon-color);--md-outlined-field-leading-space: var(--_leading-space);--md-outlined-field-outline-color: var(--_outline-color);--md-outlined-field-outline-width: var(--_outline-width);--md-outlined-field-supporting-text-color: var(--_supporting-text-color);--md-outlined-field-supporting-text-font: var(--_supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_supporting-text-weight);--md-outlined-field-top-space: var(--_top-space);--md-outlined-field-trailing-content-color: var(--_trailing-icon-color);--md-outlined-field-trailing-space: var(--_trailing-space)}
47
- `),{I:ho}=Ui,po={},fo=Wi(class extends Ji{constructor(e){if(super(e),3!==e.type&&1!==e.type&&4!==e.type)throw Error("The `live` directive is not allowed on child or event bindings");if(!(e=>void 0===e.strings)(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===ji||t===ki)return t;const r=e.element,n=e.name;if(3===e.type){if(t===r[n])return ji}else if(4===e.type){if(!!t===r.hasAttribute(n))return ji}else if(1===e.type&&r.getAttribute(n)===t+"")return ji;return((e,t=po)=>{e._$AH=t})(e),t}}),go="important",vo=" !"+go,mo=Wi(class extends Ji{constructor(e){if(super(e),1!==e.type||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,r)=>{const n=e[r];return null==n?t:t+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(e,[t]){const{style:r}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?r.removeProperty(e):r[e]=null);for(const e in t){const n=t[e];if(null!=n){this.ft.add(e);const t="string"==typeof n&&n.endsWith(vo);e.includes("-")||t?r.setProperty(e,t?n.slice(0,-11):n,t?go:""):r[e]=n}}return ji}}),bo=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"];function yo(e){return e.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}function xo(e){for(const t of bo)e.createProperty(t,{attribute:yo(t),reflect:!0});e.addInitializer((e=>{const t={hostConnected(){e.setAttribute("role","presentation")}};e.addController(t)}))}bo.map(yo);function wo(e,t){!t.bubbles||e.shadowRoot&&!t.composed||t.stopPropagation();const r=Reflect.construct(t.constructor,[t.type,t]),n=e.dispatchEvent(r);return n||t.preventDefault(),n}const _o=Symbol("internals"),So=Symbol("privateInternals");function Eo(e){return class extends e{get[_o](){return this[So]||(this[So]=this.attachInternals()),this[So]}}}const Io=Symbol("createValidator"),To=Symbol("getValidityAnchor"),jo=Symbol("privateValidator"),ko=Symbol("privateSyncValidity"),No=Symbol("privateCustomValidationMessage");function Ao(e){var t;class r extends e{constructor(){super(...arguments),this[t]=""}get validity(){return this[ko](),this[_o].validity}get validationMessage(){return this[ko](),this[_o].validationMessage}get willValidate(){return this[ko](),this[_o].willValidate}checkValidity(){return this[ko](),this[_o].checkValidity()}reportValidity(){return this[ko](),this[_o].reportValidity()}setCustomValidity(e){this[No]=e,this[ko]()}requestUpdate(e,t,r){super.requestUpdate(e,t,r),this[ko]()}firstUpdated(e){super.firstUpdated(e),this[ko]()}[(t=No,ko)](){this[jo]||(this[jo]=this[Io]());const{validity:e,validationMessage:t}=this[jo].getValidity(),r=!!this[No],n=this[No]||t;this[_o].setValidity({...e,customError:r},n,this[To]()??void 0)}[Io](){throw new Error("Implement [createValidator]")}[To](){throw new Error("Implement [getValidityAnchor]")}}return r}const Ro=Symbol("getFormValue"),Co=Symbol("getFormState");function Oo(e){class t extends e{get form(){return this[_o].form}get labels(){return this[_o].labels}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get disabled(){return this.hasAttribute("disabled")}set disabled(e){this.toggleAttribute("disabled",e)}attributeChangedCallback(e,t,r){if("name"!==e&&"disabled"!==e)super.attributeChangedCallback(e,t,r);else{const r="disabled"===e?null!==t:t;this.requestUpdate(e,r)}}requestUpdate(e,t,r){super.requestUpdate(e,t,r),this[_o].setFormValue(this[Ro](),this[Co]())}[Ro](){throw new Error("Implement [getFormValue]")}[Co](){return this[Ro]()}formDisabledCallback(e){this.disabled=e}}return t.formAssociated=!0,In([Kn({noAccessor:!0})],t.prototype,"name",null),In([Kn({type:Boolean,noAccessor:!0})],t.prototype,"disabled",null),t}const Lo=Symbol("onReportValidity"),$o=Symbol("privateCleanupFormListeners"),Do=Symbol("privateDoNotReportInvalid"),Po=Symbol("privateIsSelfReportingValidity"),Mo=Symbol("privateCallOnReportValidity");function Bo(e){var t,r,n;class i extends e{constructor(...e){super(...e),this[t]=new AbortController,this[r]=!1,this[n]=!1,this.addEventListener("invalid",(e=>{!this[Do]&&e.isTrusted&&this.addEventListener("invalid",(()=>{this[Mo](e)}),{once:!0})}),{capture:!0})}checkValidity(){this[Do]=!0;const e=super.checkValidity();return this[Do]=!1,e}reportValidity(){this[Po]=!0;const e=super.reportValidity();return e&&this[Mo](null),this[Po]=!1,e}[(t=$o,r=Do,n=Po,Mo)](e){const t=e?.defaultPrevented;t||(this[Lo](e),!t&&e?.defaultPrevented&&(this[Po]||function(e,t){if(!e)return!0;let r;for(const t of e.elements)if(t.matches(":invalid")){r=t;break}return r===t}(this[_o].form,this))&&this.focus())}[Lo](e){throw new Error("Implement [onReportValidity]")}formAssociatedCallback(e){super.formAssociatedCallback&&super.formAssociatedCallback(e),this[$o].abort(),e&&(this[$o]=new AbortController,function(e,t,r,n){const i=function(e){if(!Fo.has(e)){const t=new EventTarget;Fo.set(e,t);for(const r of["reportValidity","requestSubmit"]){const n=e[r];e[r]=function(){t.dispatchEvent(new Event("before"));const e=Reflect.apply(n,this,arguments);return t.dispatchEvent(new Event("after")),e}}}return Fo.get(e)}(t);let o,a=!1,s=!1;i.addEventListener("before",(()=>{s=!0,o=new AbortController,a=!1,e.addEventListener("invalid",(()=>{a=!0}),{signal:o.signal})}),{signal:n}),i.addEventListener("after",(()=>{s=!1,o?.abort(),a||r()}),{signal:n}),t.addEventListener("submit",(()=>{s||r()}),{signal:n})}(this,e,(()=>{this[Mo](null)}),this[$o].signal))}}return i}const Fo=new WeakMap;class qo{constructor(e){this.getCurrentState=e,this.currentValidity={validity:{},validationMessage:""}}getValidity(){const e=this.getCurrentState();if(this.prevState&&this.equals(this.prevState,e))return this.currentValidity;const{validity:t,validationMessage:r}=this.computeValidity(e);return this.prevState=this.copy(e),this.currentValidity={validationMessage:r,validity:{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing}},this.currentValidity}}class Uo extends qo{computeValidity({state:e,renderedControl:t}){let r=t;zo(e)&&!r?(r=this.inputControl||document.createElement("input"),this.inputControl=r):r||(r=this.textAreaControl||document.createElement("textarea"),this.textAreaControl=r);const n=zo(e)?r:null;if(n&&(n.type=e.type),r.value!==e.value&&(r.value=e.value),r.required=e.required,n){const t=e;t.pattern?n.pattern=t.pattern:n.removeAttribute("pattern"),t.min?n.min=t.min:n.removeAttribute("min"),t.max?n.max=t.max:n.removeAttribute("max"),t.step?n.step=t.step:n.removeAttribute("step")}return(e.minLength??-1)>-1?r.setAttribute("minlength",String(e.minLength)):r.removeAttribute("minlength"),(e.maxLength??-1)>-1?r.setAttribute("maxlength",String(e.maxLength)):r.removeAttribute("maxlength"),{validity:r.validity,validationMessage:r.validationMessage}}equals({state:e},{state:t}){const r=e.type===t.type&&e.value===t.value&&e.required===t.required&&e.minLength===t.minLength&&e.maxLength===t.maxLength;return zo(e)&&zo(t)?r&&e.pattern===t.pattern&&e.min===t.min&&e.max===t.max&&e.step===t.step:r}copy({state:e}){return{state:zo(e)?this.copyInput(e):this.copyTextArea(e),renderedControl:null}}copyInput(e){const{type:t,pattern:r,min:n,max:i,step:o}=e;return{...this.copySharedState(e),type:t,pattern:r,min:n,max:i,step:o}}copyTextArea(e){return{...this.copySharedState(e),type:e.type}}copySharedState({value:e,required:t,minLength:r,maxLength:n}){return{value:e,required:t,minLength:r,maxLength:n}}}function zo(e){return"textarea"!==e.type}const Ho=Bo(Ao(Oo(Eo(Vi))));class Vo extends Ho{constructor(){super(...arguments),this.error=!1,this.errorText="",this.label="",this.noAsterisk=!1,this.required=!1,this.value="",this.prefixText="",this.suffixText="",this.hasLeadingIcon=!1,this.hasTrailingIcon=!1,this.supportingText="",this.textDirection="",this.rows=2,this.cols=20,this.inputMode="",this.max="",this.maxLength=-1,this.min="",this.minLength=-1,this.noSpinner=!1,this.pattern="",this.placeholder="",this.readOnly=!1,this.multiple=!1,this.step="",this.type="text",this.autocomplete="",this.dirty=!1,this.focused=!1,this.nativeError=!1,this.nativeErrorText=""}get selectionDirection(){return this.getInputOrTextarea().selectionDirection}set selectionDirection(e){this.getInputOrTextarea().selectionDirection=e}get selectionEnd(){return this.getInputOrTextarea().selectionEnd}set selectionEnd(e){this.getInputOrTextarea().selectionEnd=e}get selectionStart(){return this.getInputOrTextarea().selectionStart}set selectionStart(e){this.getInputOrTextarea().selectionStart=e}get valueAsNumber(){const e=this.getInput();return e?e.valueAsNumber:NaN}set valueAsNumber(e){const t=this.getInput();t&&(t.valueAsNumber=e,this.value=t.value)}get valueAsDate(){const e=this.getInput();return e?e.valueAsDate:null}set valueAsDate(e){const t=this.getInput();t&&(t.valueAsDate=e,this.value=t.value)}get hasError(){return this.error||this.nativeError}select(){this.getInputOrTextarea().select()}setRangeText(...e){this.getInputOrTextarea().setRangeText(...e),this.value=this.getInputOrTextarea().value}setSelectionRange(e,t,r){this.getInputOrTextarea().setSelectionRange(e,t,r)}stepDown(e){const t=this.getInput();t&&(t.stepDown(e),this.value=t.value)}stepUp(e){const t=this.getInput();t&&(t.stepUp(e),this.value=t.value)}reset(){this.dirty=!1,this.value=this.getAttribute("value")??"",this.nativeError=!1,this.nativeErrorText=""}attributeChangedCallback(e,t,r){"value"===e&&this.dirty||super.attributeChangedCallback(e,t,r)}render(){const e={disabled:this.disabled,error:!this.disabled&&this.hasError,textarea:"textarea"===this.type,"no-spinner":this.noSpinner};return Ei`
48
- <span class="text-field ${Qi(e)}">
44
+ `}}const no=Ln`@layer styles{:host{--_bottom-space: var(--md-outlined-field-bottom-space, 16px);--_content-color: var(--md-outlined-field-content-color, var(--md-sys-color-on-surface, #1d1b20));--_content-font: var(--md-outlined-field-content-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_content-line-height: var(--md-outlined-field-content-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_content-size: var(--md-outlined-field-content-size, var(--md-sys-typescale-body-large-size, 1rem));--_content-space: var(--md-outlined-field-content-space, 16px);--_content-weight: var(--md-outlined-field-content-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_disabled-content-color: var(--md-outlined-field-disabled-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-content-opacity: var(--md-outlined-field-disabled-content-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-field-disabled-label-text-opacity, 0.38);--_disabled-leading-content-color: var(--md-outlined-field-disabled-leading-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-content-opacity: var(--md-outlined-field-disabled-leading-content-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-content-color: var(--md-outlined-field-disabled-trailing-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-content-opacity: var(--md-outlined-field-disabled-trailing-content-opacity, 0.38);--_error-content-color: var(--md-outlined-field-error-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-content-color: var(--md-outlined-field-error-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-content-color: var(--md-outlined-field-error-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-content-color: var(--md-outlined-field-error-focus-trailing-content-color, var(--md-sys-color-error, #b3261e));--_error-hover-content-color: var(--md-outlined-field-error-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-content-color: var(--md-outlined-field-error-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-content-color: var(--md-outlined-field-error-hover-trailing-content-color, var(--md-sys-color-on-error-container, #410e0b));--_error-label-text-color: var(--md-outlined-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-content-color: var(--md-outlined-field-error-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-content-color: var(--md-outlined-field-error-trailing-content-color, var(--md-sys-color-error, #b3261e));--_focus-content-color: var(--md-outlined-field-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-content-color: var(--md-outlined-field-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-content-color: var(--md-outlined-field-focus-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-content-color: var(--md-outlined-field-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-content-color: var(--md-outlined-field-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-content-color: var(--md-outlined-field-hover-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-outlined-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-padding-bottom: var(--md-outlined-field-label-text-padding-bottom, 8px);--_label-text-populated-line-height: var(--md-outlined-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-content-color: var(--md-outlined-field-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-space: var(--md-outlined-field-leading-space, 16px);--_outline-color: var(--md-outlined-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-label-padding: var(--md-outlined-field-outline-label-padding, 4px);--_outline-width: var(--md-outlined-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-leading-space: var(--md-outlined-field-supporting-text-leading-space, 16px);--_supporting-text-line-height: var(--md-outlined-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-top-space: var(--md-outlined-field-supporting-text-top-space, 4px);--_supporting-text-trailing-space: var(--md-outlined-field-supporting-text-trailing-space, 16px);--_supporting-text-weight: var(--md-outlined-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_top-space: var(--md-outlined-field-top-space, 16px);--_trailing-content-color: var(--md-outlined-field-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-space: var(--md-outlined-field-trailing-space, 16px);--_with-leading-content-leading-space: var(--md-outlined-field-with-leading-content-leading-space, 12px);--_with-trailing-content-trailing-space: var(--md-outlined-field-with-trailing-content-trailing-space, 12px);--_container-shape-start-start: var(--md-outlined-field-container-shape-start-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-field-container-shape-start-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-field-container-shape-end-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-field-container-shape-end-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)))}.outline{border-color:var(--_outline-color);border-radius:inherit;display:flex;pointer-events:none;height:100%;position:absolute;width:100%;z-index:1}.outline-start::before,.outline-start::after,.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after,.outline-end::before,.outline-end::after{border:inherit;content:"";inset:0;position:absolute}.outline-start,.outline-end{border:inherit;border-radius:inherit;box-sizing:border-box;position:relative}.outline-start::before,.outline-start::after,.outline-end::before,.outline-end::after{border-bottom-style:solid;border-top-style:solid}.outline-start::after,.outline-end::after{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-start::after,.focused .outline-end::after{opacity:1}.outline-start::before,.outline-start::after{border-inline-start-style:solid;border-inline-end-style:none;border-start-start-radius:inherit;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:0;margin-inline-end:var(--_outline-label-padding)}.outline-end{flex-grow:1;margin-inline-start:calc(-1*var(--_outline-label-padding))}.outline-end::before,.outline-end::after{border-inline-start-style:none;border-inline-end-style:solid;border-start-start-radius:0;border-start-end-radius:inherit;border-end-start-radius:0;border-end-end-radius:inherit}.outline-notch{align-items:flex-start;border:inherit;display:flex;margin-inline-start:calc(-1*var(--_outline-label-padding));margin-inline-end:var(--_outline-label-padding);max-width:calc(100% - var(--_leading-space) - var(--_trailing-space));padding:0 var(--_outline-label-padding);position:relative}.no-label .outline-notch{display:none}.outline-panel-inactive,.outline-panel-active{border:inherit;border-bottom-style:solid;inset:0;position:absolute}.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after{border-top-style:solid;border-bottom:none;bottom:auto;transform:scaleX(1);transition:transform 150ms cubic-bezier(0.2, 0, 0, 1)}.outline-panel-inactive::before,.outline-panel-active::before{right:50%;transform-origin:top left}.outline-panel-inactive::after,.outline-panel-active::after{left:50%;transform-origin:top right}.populated .outline-panel-inactive::before,.populated .outline-panel-inactive::after,.populated .outline-panel-active::before,.populated .outline-panel-active::after,.focused .outline-panel-inactive::before,.focused .outline-panel-inactive::after,.focused .outline-panel-active::before,.focused .outline-panel-active::after{transform:scaleX(0)}.outline-panel-active{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-panel-active{opacity:1}.outline-label{display:flex;max-width:100%;transform:translateY(calc(-100% + var(--_label-text-padding-bottom)))}.outline-start,.field:not(.with-start) .content ::slotted(*){padding-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-start) .label-wrapper{margin-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-end) .content ::slotted(*){padding-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.field:not(.with-end) .label-wrapper{margin-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.outline-start::before,.outline-end::before,.outline-panel-inactive,.outline-panel-inactive::before,.outline-panel-inactive::after{border-width:var(--_outline-width)}:hover .outline{border-color:var(--_hover-outline-color);color:var(--_hover-outline-color)}:hover .outline-start::before,:hover .outline-end::before,:hover .outline-panel-inactive,:hover .outline-panel-inactive::before,:hover .outline-panel-inactive::after{border-width:var(--_hover-outline-width)}.focused .outline{border-color:var(--_focus-outline-color);color:var(--_focus-outline-color)}.outline-start::after,.outline-end::after,.outline-panel-active,.outline-panel-active::before,.outline-panel-active::after{border-width:var(--_focus-outline-width)}.disabled .outline{border-color:var(--_disabled-outline-color);color:var(--_disabled-outline-color)}.disabled .outline-start,.disabled .outline-end,.disabled .outline-panel-inactive{opacity:var(--_disabled-outline-opacity)}.disabled .outline-start::before,.disabled .outline-end::before,.disabled .outline-panel-inactive,.disabled .outline-panel-inactive::before,.disabled .outline-panel-inactive::after{border-width:var(--_disabled-outline-width)}.error .outline{border-color:var(--_error-outline-color);color:var(--_error-outline-color)}.error:hover .outline{border-color:var(--_error-hover-outline-color);color:var(--_error-hover-outline-color)}.error.focused .outline{border-color:var(--_error-focus-outline-color);color:var(--_error-focus-outline-color)}.resizable .container{bottom:var(--_focus-outline-width);inset-inline-end:var(--_focus-outline-width);clip-path:inset(var(--_focus-outline-width) 0 0 var(--_focus-outline-width))}.resizable .container>*{top:var(--_focus-outline-width);inset-inline-start:var(--_focus-outline-width)}.resizable .container:dir(rtl){clip-path:inset(var(--_focus-outline-width) var(--_focus-outline-width) 0 0)}}@layer hcm{@media(forced-colors: active){.disabled .outline{border-color:GrayText;color:GrayText}.disabled :is(.outline-start,.outline-end,.outline-panel-inactive){opacity:1}}}
45
+ `,io=Ln`:host{display:inline-flex;resize:both}.field{display:flex;flex:1;flex-direction:column;writing-mode:horizontal-tb;max-width:100%}.container-overflow{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start);display:flex;height:100%;position:relative}.container{align-items:center;border-radius:inherit;display:flex;flex:1;max-height:100%;min-height:100%;min-width:min-content;position:relative}.field,.container-overflow{resize:inherit}.resizable:not(.disabled) .container{resize:inherit;overflow:hidden}.disabled{pointer-events:none}@layer styles{.start,.middle,.end{display:flex;box-sizing:border-box;height:100%;position:relative}.start{color:var(--_leading-content-color)}.end{color:var(--_trailing-content-color)}.start,.end{align-items:center;justify-content:center}.with-start .start{margin-inline:var(--_with-leading-content-leading-space) var(--_content-space)}.with-end .end{margin-inline:var(--_content-space) var(--_with-trailing-content-trailing-space)}.middle{align-items:stretch;align-self:baseline;flex:1}.content{color:var(--_content-color);display:flex;flex:1;opacity:0;transition:opacity 83ms cubic-bezier(0.2, 0, 0, 1)}.no-label .content,.focused .content,.populated .content{opacity:1;transition-delay:67ms}:is(.disabled,.disable-transitions) .content{transition:none}.content ::slotted(*){all:unset;color:currentColor;font-family:var(--_content-font);font-size:var(--_content-size);line-height:var(--_content-line-height);font-weight:var(--_content-weight);width:100%;overflow-wrap:revert;white-space:revert}.content ::slotted(:not(textarea)){padding-top:var(--_top-space);padding-bottom:var(--_bottom-space)}.content ::slotted(textarea){margin-top:var(--_top-space);margin-bottom:var(--_bottom-space)}:hover .content{color:var(--_hover-content-color)}:hover .start{color:var(--_hover-leading-content-color)}:hover .end{color:var(--_hover-trailing-content-color)}.focused .content{color:var(--_focus-content-color)}.focused .start{color:var(--_focus-leading-content-color)}.focused .end{color:var(--_focus-trailing-content-color)}.disabled .content{color:var(--_disabled-content-color)}.disabled.no-label .content,.disabled.focused .content,.disabled.populated .content{opacity:var(--_disabled-content-opacity)}.disabled .start{color:var(--_disabled-leading-content-color);opacity:var(--_disabled-leading-content-opacity)}.disabled .end{color:var(--_disabled-trailing-content-color);opacity:var(--_disabled-trailing-content-opacity)}.error .content{color:var(--_error-content-color)}.error .start{color:var(--_error-leading-content-color)}.error .end{color:var(--_error-trailing-content-color)}.error:hover .content{color:var(--_error-hover-content-color)}.error:hover .start{color:var(--_error-hover-leading-content-color)}.error:hover .end{color:var(--_error-hover-trailing-content-color)}.error.focused .content{color:var(--_error-focus-content-color)}.error.focused .start{color:var(--_error-focus-leading-content-color)}.error.focused .end{color:var(--_error-focus-trailing-content-color)}}@layer hcm{@media(forced-colors: active){.disabled :is(.start,.content,.end){color:GrayText;opacity:1}}}@layer styles{.label{box-sizing:border-box;color:var(--_label-text-color);overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap;z-index:1;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);width:min-content}.label-wrapper{inset:0;pointer-events:none;position:absolute}.label.resting{position:absolute;top:var(--_top-space)}.label.floating{font-size:var(--_label-text-populated-size);line-height:var(--_label-text-populated-line-height);transform-origin:top left}.label.hidden{opacity:0}.no-label .label{display:none}.label-wrapper{inset:0;position:absolute;text-align:initial}:hover .label{color:var(--_hover-label-text-color)}.focused .label{color:var(--_focus-label-text-color)}.disabled .label{color:var(--_disabled-label-text-color)}.disabled .label:not(.hidden){opacity:var(--_disabled-label-text-opacity)}.error .label{color:var(--_error-label-text-color)}.error:hover .label{color:var(--_error-hover-label-text-color)}.error.focused .label{color:var(--_error-focus-label-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .label:not(.hidden){color:GrayText;opacity:1}}}@layer styles{.supporting-text{color:var(--_supporting-text-color);display:flex;font-family:var(--_supporting-text-font);font-size:var(--_supporting-text-size);line-height:var(--_supporting-text-line-height);font-weight:var(--_supporting-text-weight);gap:16px;justify-content:space-between;padding-inline-start:var(--_supporting-text-leading-space);padding-inline-end:var(--_supporting-text-trailing-space);padding-top:var(--_supporting-text-top-space)}.supporting-text :nth-child(2){flex-shrink:0}:hover .supporting-text{color:var(--_hover-supporting-text-color)}.focus .supporting-text{color:var(--_focus-supporting-text-color)}.disabled .supporting-text{color:var(--_disabled-supporting-text-color);opacity:var(--_disabled-supporting-text-opacity)}.error .supporting-text{color:var(--_error-supporting-text-color)}.error:hover .supporting-text{color:var(--_error-hover-supporting-text-color)}.error.focus .supporting-text{color:var(--_error-focus-supporting-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .supporting-text{color:GrayText;opacity:1}}}
46
+ `;let oo=class extends ro{};oo.styles=[io,no],oo=kn([jn("md-outlined-field")],oo);const ao=Symbol.for(""),so=e=>{if(e?.r===ao)return e?._$litStatic$},lo=(e,...t)=>({_$litStatic$:t.reduce(((t,r,n)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(r)+e[n+1]),e[0]),r:ao}),co=new Map,uo=e=>(t,...r)=>{const n=r.length;let i,o;const a=[],s=[];let l,d=0,c=!1;for(;d<n;){for(l=t[d];d<n&&void 0!==(o=r[d],i=so(o));)l+=i+t[++d],c=!0;d!==n&&s.push(o),a.push(l),d++}if(d===n&&a.push(t[n]),c){const e=a.join("$$lit$$");void 0===(t=co.get(e))&&(a.raw=a,co.set(e,t=a)),r=s}return e(t,...r)},ho=uo(Ti),po=(uo(ki),uo(ji),Ln`:host{--_caret-color: var(--md-outlined-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_disabled-input-text-color: var(--md-outlined-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-outlined-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-outlined-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-outlined-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-text-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-text-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-outlined-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-outlined-text-field-disabled-trailing-icon-opacity, 0.38);--_error-focus-caret-color: var(--md-outlined-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-outlined-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-outlined-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-outlined-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-input-text-color: var(--md-outlined-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-outlined-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-outlined-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-outlined-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-outlined-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-outlined-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-outlined-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-input-text-color: var(--md-outlined-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-outlined-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-text-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-outlined-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-input-text-color: var(--md-outlined-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-icon-color: var(--md-outlined-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-text-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-outlined-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-outlined-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var(--md-outlined-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_input-text-line-height: var(--md-outlined-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_input-text-placeholder-color: var(--md-outlined-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-outlined-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-size: var(--md-outlined-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-suffix-color: var(--md-outlined-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-weight: var(--md-outlined-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_label-text-color: var(--md-outlined-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-outlined-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-icon-color: var(--md-outlined-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-outlined-text-field-leading-icon-size, 24px);--_outline-color: var(--md-outlined-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-text-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-line-height: var(--md-outlined-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-weight: var(--md-outlined-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_trailing-icon-color: var(--md-outlined-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-outlined-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var(--md-outlined-text-field-container-shape-start-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-text-field-container-shape-start-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-text-field-container-shape-end-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-text-field-container-shape-end-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_icon-input-space: var(--md-outlined-text-field-icon-input-space, 16px);--_leading-space: var(--md-outlined-text-field-leading-space, 16px);--_trailing-space: var(--md-outlined-text-field-trailing-space, 16px);--_top-space: var(--md-outlined-text-field-top-space, 16px);--_bottom-space: var(--md-outlined-text-field-bottom-space, 16px);--_input-text-prefix-trailing-space: var(--md-outlined-text-field-input-text-prefix-trailing-space, 2px);--_input-text-suffix-leading-space: var(--md-outlined-text-field-input-text-suffix-leading-space, 2px);--_focus-caret-color: var(--md-outlined-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--_with-leading-icon-leading-space: var(--md-outlined-text-field-with-leading-icon-leading-space, 12px);--_with-trailing-icon-trailing-space: var(--md-outlined-text-field-with-trailing-icon-trailing-space, 12px);--md-outlined-field-bottom-space: var(--_bottom-space);--md-outlined-field-container-shape-end-end: var(--_container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_container-shape-start-start);--md-outlined-field-content-color: var(--_input-text-color);--md-outlined-field-content-font: var(--_input-text-font);--md-outlined-field-content-line-height: var(--_input-text-line-height);--md-outlined-field-content-size: var(--_input-text-size);--md-outlined-field-content-space: var(--_icon-input-space);--md-outlined-field-content-weight: var(--_input-text-weight);--md-outlined-field-disabled-content-color: var(--_disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_focus-outline-color);--md-outlined-field-focus-outline-width: var(--_focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_hover-outline-color);--md-outlined-field-hover-outline-width: var(--_hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_label-text-color);--md-outlined-field-label-text-font: var(--_label-text-font);--md-outlined-field-label-text-line-height: var(--_label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_label-text-populated-size);--md-outlined-field-label-text-size: var(--_label-text-size);--md-outlined-field-label-text-weight: var(--_label-text-weight);--md-outlined-field-leading-content-color: var(--_leading-icon-color);--md-outlined-field-leading-space: var(--_leading-space);--md-outlined-field-outline-color: var(--_outline-color);--md-outlined-field-outline-width: var(--_outline-width);--md-outlined-field-supporting-text-color: var(--_supporting-text-color);--md-outlined-field-supporting-text-font: var(--_supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_supporting-text-weight);--md-outlined-field-top-space: var(--_top-space);--md-outlined-field-trailing-content-color: var(--_trailing-icon-color);--md-outlined-field-trailing-space: var(--_trailing-space);--md-outlined-field-with-leading-content-leading-space: var(--_with-leading-icon-leading-space);--md-outlined-field-with-trailing-content-trailing-space: var(--_with-trailing-icon-trailing-space)}
47
+ `),{I:fo}=Hi,go={},mo=Qi(class extends Xi{constructor(e){if(super(e),3!==e.type&&1!==e.type&&4!==e.type)throw Error("The `live` directive is not allowed on child or event bindings");if(!(e=>void 0===e.strings)(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===Ai||t===Ci)return t;const r=e.element,n=e.name;if(3===e.type){if(t===r[n])return Ai}else if(4===e.type){if(!!t===r.hasAttribute(n))return Ai}else if(1===e.type&&r.getAttribute(n)===t+"")return Ai;return((e,t=go)=>{e._$AH=t})(e),t}}),vo="important",bo=" !"+vo,yo=Qi(class extends Xi{constructor(e){if(super(e),1!==e.type||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,r)=>{const n=e[r];return null==n?t:t+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(e,[t]){const{style:r}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?r.removeProperty(e):r[e]=null);for(const e in t){const n=t[e];if(null!=n){this.ft.add(e);const t="string"==typeof n&&n.endsWith(bo);e.includes("-")||t?r.setProperty(e,t?n.slice(0,-11):n,t?vo:""):r[e]=n}}return Ai}}),xo=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"],wo=xo.map(So);function _o(e){return wo.includes(e)}function So(e){return e.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}const Eo=Symbol("privateIgnoreAttributeChangesFor");function Io(e){var t;class r extends e{constructor(){super(...arguments),this[t]=new Set}attributeChangedCallback(e,t,r){if(!_o(e))return void super.attributeChangedCallback(e,t,r);if(this[Eo].has(e))return;this[Eo].add(e),this.removeAttribute(e),this[Eo].delete(e);const n=ko(e);null===r?delete this.dataset[n]:this.dataset[n]=r,this.requestUpdate(ko(e),t)}getAttribute(e){return _o(e)?super.getAttribute(To(e)):super.getAttribute(e)}removeAttribute(e){super.removeAttribute(e),_o(e)&&(super.removeAttribute(To(e)),this.requestUpdate())}}return t=Eo,function(e){for(const t of xo){const r=So(t),n=To(r),i=ko(r);e.createProperty(t,{attribute:r,noAccessor:!0}),e.createProperty(Symbol(n),{attribute:n,noAccessor:!0}),Object.defineProperty(e.prototype,t,{configurable:!0,enumerable:!0,get(){return this.dataset[i]??null},set(e){const r=this.dataset[i]??null;e!==r&&(null===e?delete this.dataset[i]:this.dataset[i]=e,this.requestUpdate(t,r))}})}}(r),r}function To(e){return`data-${e}`}function ko(e){return e.replace(/-\w/,(e=>e[1].toUpperCase()))}function jo(e,t){!t.bubbles||e.shadowRoot&&!t.composed||t.stopPropagation();const r=Reflect.construct(t.constructor,[t.type,t]),n=e.dispatchEvent(r);return n||t.preventDefault(),n}const Ao=Symbol("internals"),Co=Symbol("privateInternals");function No(e){return class extends e{get[Ao](){return this[Co]||(this[Co]=this.attachInternals()),this[Co]}}}const Ro=Symbol("createValidator"),Oo=Symbol("getValidityAnchor"),Lo=Symbol("privateValidator"),$o=Symbol("privateSyncValidity"),Do=Symbol("privateCustomValidationMessage");function Po(e){var t;class r extends e{constructor(){super(...arguments),this[t]=""}get validity(){return this[$o](),this[Ao].validity}get validationMessage(){return this[$o](),this[Ao].validationMessage}get willValidate(){return this[$o](),this[Ao].willValidate}checkValidity(){return this[$o](),this[Ao].checkValidity()}reportValidity(){return this[$o](),this[Ao].reportValidity()}setCustomValidity(e){this[Do]=e,this[$o]()}requestUpdate(e,t,r){super.requestUpdate(e,t,r),this[$o]()}firstUpdated(e){super.firstUpdated(e),this[$o]()}[(t=Do,$o)](){this[Lo]||(this[Lo]=this[Ro]());const{validity:e,validationMessage:t}=this[Lo].getValidity(),r=!!this[Do],n=this[Do]||t;this[Ao].setValidity({...e,customError:r},n,this[Oo]()??void 0)}[Ro](){throw new Error("Implement [createValidator]")}[Oo](){throw new Error("Implement [getValidityAnchor]")}}return r}const Mo=Symbol("getFormValue"),Bo=Symbol("getFormState");function Fo(e){class t extends e{get form(){return this[Ao].form}get labels(){return this[Ao].labels}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get disabled(){return this.hasAttribute("disabled")}set disabled(e){this.toggleAttribute("disabled",e)}attributeChangedCallback(e,t,r){if("name"!==e&&"disabled"!==e)super.attributeChangedCallback(e,t,r);else{const r="disabled"===e?null!==t:t;this.requestUpdate(e,r)}}requestUpdate(e,t,r){super.requestUpdate(e,t,r),this[Ao].setFormValue(this[Mo](),this[Bo]())}[Mo](){throw new Error("Implement [getFormValue]")}[Bo](){return this[Mo]()}formDisabledCallback(e){this.disabled=e}}return t.formAssociated=!0,kn([Zn({noAccessor:!0})],t.prototype,"name",null),kn([Zn({type:Boolean,noAccessor:!0})],t.prototype,"disabled",null),t}const qo=Symbol("onReportValidity"),Uo=Symbol("privateCleanupFormListeners"),zo=Symbol("privateDoNotReportInvalid"),Ho=Symbol("privateIsSelfReportingValidity"),Vo=Symbol("privateCallOnReportValidity");function Go(e){var t,r,n;class i extends e{constructor(...e){super(...e),this[t]=new AbortController,this[r]=!1,this[n]=!1,this.addEventListener("invalid",(e=>{!this[zo]&&e.isTrusted&&this.addEventListener("invalid",(()=>{this[Vo](e)}),{once:!0})}),{capture:!0})}checkValidity(){this[zo]=!0;const e=super.checkValidity();return this[zo]=!1,e}reportValidity(){this[Ho]=!0;const e=super.reportValidity();return e&&this[Vo](null),this[Ho]=!1,e}[(t=Uo,r=zo,n=Ho,Vo)](e){const t=e?.defaultPrevented;t||(this[qo](e),!t&&e?.defaultPrevented&&(this[Ho]||function(e,t){if(!e)return!0;let r;for(const t of e.elements)if(t.matches(":invalid")){r=t;break}return r===t}(this[Ao].form,this))&&this.focus())}[qo](e){throw new Error("Implement [onReportValidity]")}formAssociatedCallback(e){super.formAssociatedCallback&&super.formAssociatedCallback(e),this[Uo].abort(),e&&(this[Uo]=new AbortController,function(e,t,r,n){const i=function(e){if(!Wo.has(e)){const t=new EventTarget;Wo.set(e,t);for(const r of["reportValidity","requestSubmit"]){const n=e[r];e[r]=function(){t.dispatchEvent(new Event("before"));const e=Reflect.apply(n,this,arguments);return t.dispatchEvent(new Event("after")),e}}}return Wo.get(e)}(t);let o,a=!1,s=!1;i.addEventListener("before",(()=>{s=!0,o=new AbortController,a=!1,e.addEventListener("invalid",(()=>{a=!0}),{signal:o.signal})}),{signal:n}),i.addEventListener("after",(()=>{s=!1,o?.abort(),a||r()}),{signal:n}),t.addEventListener("submit",(()=>{s||r()}),{signal:n})}(this,e,(()=>{this[Vo](null)}),this[Uo].signal))}}return i}const Wo=new WeakMap;class Jo{constructor(e){this.getCurrentState=e,this.currentValidity={validity:{},validationMessage:""}}getValidity(){const e=this.getCurrentState();if(this.prevState&&this.equals(this.prevState,e))return this.currentValidity;const{validity:t,validationMessage:r}=this.computeValidity(e);return this.prevState=this.copy(e),this.currentValidity={validationMessage:r,validity:{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing}},this.currentValidity}}class Qo extends Jo{computeValidity({state:e,renderedControl:t}){let r=t;Xo(e)&&!r?(r=this.inputControl||document.createElement("input"),this.inputControl=r):r||(r=this.textAreaControl||document.createElement("textarea"),this.textAreaControl=r);const n=Xo(e)?r:null;if(n&&(n.type=e.type),r.value!==e.value&&(r.value=e.value),r.required=e.required,n){const t=e;t.pattern?n.pattern=t.pattern:n.removeAttribute("pattern"),t.min?n.min=t.min:n.removeAttribute("min"),t.max?n.max=t.max:n.removeAttribute("max"),t.step?n.step=t.step:n.removeAttribute("step")}return(e.minLength??-1)>-1?r.setAttribute("minlength",String(e.minLength)):r.removeAttribute("minlength"),(e.maxLength??-1)>-1?r.setAttribute("maxlength",String(e.maxLength)):r.removeAttribute("maxlength"),{validity:r.validity,validationMessage:r.validationMessage}}equals({state:e},{state:t}){const r=e.type===t.type&&e.value===t.value&&e.required===t.required&&e.minLength===t.minLength&&e.maxLength===t.maxLength;return Xo(e)&&Xo(t)?r&&e.pattern===t.pattern&&e.min===t.min&&e.max===t.max&&e.step===t.step:r}copy({state:e}){return{state:Xo(e)?this.copyInput(e):this.copyTextArea(e),renderedControl:null}}copyInput(e){const{type:t,pattern:r,min:n,max:i,step:o}=e;return{...this.copySharedState(e),type:t,pattern:r,min:n,max:i,step:o}}copyTextArea(e){return{...this.copySharedState(e),type:e.type}}copySharedState({value:e,required:t,minLength:r,maxLength:n}){return{value:e,required:t,minLength:r,maxLength:n}}}function Xo(e){return"textarea"!==e.type}const Ko=Io(Go(Po(Fo(No(Wi)))));class Yo extends Ko{constructor(){super(...arguments),this.error=!1,this.errorText="",this.label="",this.noAsterisk=!1,this.required=!1,this.value="",this.prefixText="",this.suffixText="",this.hasLeadingIcon=!1,this.hasTrailingIcon=!1,this.supportingText="",this.textDirection="",this.rows=2,this.cols=20,this.inputMode="",this.max="",this.maxLength=-1,this.min="",this.minLength=-1,this.noSpinner=!1,this.pattern="",this.placeholder="",this.readOnly=!1,this.multiple=!1,this.step="",this.type="text",this.autocomplete="",this.dirty=!1,this.focused=!1,this.nativeError=!1,this.nativeErrorText=""}get selectionDirection(){return this.getInputOrTextarea().selectionDirection}set selectionDirection(e){this.getInputOrTextarea().selectionDirection=e}get selectionEnd(){return this.getInputOrTextarea().selectionEnd}set selectionEnd(e){this.getInputOrTextarea().selectionEnd=e}get selectionStart(){return this.getInputOrTextarea().selectionStart}set selectionStart(e){this.getInputOrTextarea().selectionStart=e}get valueAsNumber(){const e=this.getInput();return e?e.valueAsNumber:NaN}set valueAsNumber(e){const t=this.getInput();t&&(t.valueAsNumber=e,this.value=t.value)}get valueAsDate(){const e=this.getInput();return e?e.valueAsDate:null}set valueAsDate(e){const t=this.getInput();t&&(t.valueAsDate=e,this.value=t.value)}get hasError(){return this.error||this.nativeError}select(){this.getInputOrTextarea().select()}setRangeText(...e){this.getInputOrTextarea().setRangeText(...e),this.value=this.getInputOrTextarea().value}setSelectionRange(e,t,r){this.getInputOrTextarea().setSelectionRange(e,t,r)}stepDown(e){const t=this.getInput();t&&(t.stepDown(e),this.value=t.value)}stepUp(e){const t=this.getInput();t&&(t.stepUp(e),this.value=t.value)}reset(){this.dirty=!1,this.value=this.getAttribute("value")??"",this.nativeError=!1,this.nativeErrorText=""}attributeChangedCallback(e,t,r){"value"===e&&this.dirty||super.attributeChangedCallback(e,t,r)}render(){const e={disabled:this.disabled,error:!this.disabled&&this.hasError,textarea:"textarea"===this.type,"no-spinner":this.noSpinner};return Ti`
48
+ <span class="text-field ${Ki(e)}">
49
49
  ${this.renderField()}
50
50
  </span>
51
- `}updated(e){const t=this.getInputOrTextarea().value;this.value!==t&&(this.value=t)}renderField(){return co`<${this.fieldTag}
51
+ `}updated(e){const t=this.getInputOrTextarea().value;this.value!==t&&(this.value=t)}renderField(){return ho`<${this.fieldTag}
52
52
  class="field"
53
53
  count=${this.value.length}
54
54
  ?disabled=${this.disabled}
@@ -69,62 +69,62 @@ var e={5568:e=>{const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?
69
69
  ${this.renderInputOrTextarea()}
70
70
  ${this.renderTrailingIcon()}
71
71
  <div id="description" slot="aria-describedby"></div>
72
- </${this.fieldTag}>`}renderLeadingIcon(){return Ei`
72
+ </${this.fieldTag}>`}renderLeadingIcon(){return Ti`
73
73
  <span class="icon leading" slot="start">
74
74
  <slot name="leading-icon" @slotchange=${this.handleIconChange}></slot>
75
75
  </span>
76
- `}renderTrailingIcon(){return Ei`
76
+ `}renderTrailingIcon(){return Ti`
77
77
  <span class="icon trailing" slot="end">
78
78
  <slot name="trailing-icon" @slotchange=${this.handleIconChange}></slot>
79
79
  </span>
80
- `}renderInputOrTextarea(){const e={direction:this.textDirection},t=this.ariaLabel||this.label||ki,r=this.autocomplete,n=(this.maxLength??-1)>-1,i=(this.minLength??-1)>-1;if("textarea"===this.type)return Ei`
80
+ `}renderInputOrTextarea(){const e={direction:this.textDirection},t=this.ariaLabel||this.label||Ci,r=this.autocomplete,n=(this.maxLength??-1)>-1,i=(this.minLength??-1)>-1;if("textarea"===this.type)return Ti`
81
81
  <textarea
82
82
  class="input"
83
- style=${mo(e)}
83
+ style=${yo(e)}
84
84
  aria-describedby="description"
85
85
  aria-invalid=${this.hasError}
86
86
  aria-label=${t}
87
- autocomplete=${r||ki}
88
- name=${this.name||ki}
87
+ autocomplete=${r||Ci}
88
+ name=${this.name||Ci}
89
89
  ?disabled=${this.disabled}
90
- maxlength=${n?this.maxLength:ki}
91
- minlength=${i?this.minLength:ki}
92
- placeholder=${this.placeholder||ki}
90
+ maxlength=${n?this.maxLength:Ci}
91
+ minlength=${i?this.minLength:Ci}
92
+ placeholder=${this.placeholder||Ci}
93
93
  ?readonly=${this.readOnly}
94
94
  ?required=${this.required}
95
95
  rows=${this.rows}
96
96
  cols=${this.cols}
97
- .value=${fo(this.value)}
97
+ .value=${mo(this.value)}
98
98
  @change=${this.redispatchEvent}
99
99
  @focus=${this.handleFocusChange}
100
100
  @blur=${this.handleFocusChange}
101
101
  @input=${this.handleInput}
102
102
  @select=${this.redispatchEvent}></textarea>
103
- `;const o=this.renderPrefix(),a=this.renderSuffix(),s=this.inputMode;return Ei`
103
+ `;const o=this.renderPrefix(),a=this.renderSuffix(),s=this.inputMode;return Ti`
104
104
  <div class="input-wrapper">
105
105
  ${o}
106
106
  <input
107
107
  class="input"
108
- style=${mo(e)}
108
+ style=${yo(e)}
109
109
  aria-describedby="description"
110
110
  aria-invalid=${this.hasError}
111
111
  aria-label=${t}
112
- autocomplete=${r||ki}
113
- name=${this.name||ki}
112
+ autocomplete=${r||Ci}
113
+ name=${this.name||Ci}
114
114
  ?disabled=${this.disabled}
115
- inputmode=${s||ki}
116
- max=${this.max||ki}
117
- maxlength=${n?this.maxLength:ki}
118
- min=${this.min||ki}
119
- minlength=${i?this.minLength:ki}
120
- pattern=${this.pattern||ki}
121
- placeholder=${this.placeholder||ki}
115
+ inputmode=${s||Ci}
116
+ max=${this.max||Ci}
117
+ maxlength=${n?this.maxLength:Ci}
118
+ min=${this.min||Ci}
119
+ minlength=${i?this.minLength:Ci}
120
+ pattern=${this.pattern||Ci}
121
+ placeholder=${this.placeholder||Ci}
122
122
  ?readonly=${this.readOnly}
123
123
  ?required=${this.required}
124
124
  ?multiple=${this.multiple}
125
- step=${this.step||ki}
125
+ step=${this.step||Ci}
126
126
  type=${this.type}
127
- .value=${fo(this.value)}
127
+ .value=${mo(this.value)}
128
128
  @change=${this.redispatchEvent}
129
129
  @focus=${this.handleFocusChange}
130
130
  @blur=${this.handleFocusChange}
@@ -132,11 +132,11 @@ var e={5568:e=>{const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?
132
132
  @select=${this.redispatchEvent} />
133
133
  ${a}
134
134
  </div>
135
- `}renderPrefix(){return this.renderAffix(this.prefixText,!1)}renderSuffix(){return this.renderAffix(this.suffixText,!0)}renderAffix(e,t){return e?Ei`<span class="${Qi({suffix:t,prefix:!t})}">${e}</span>`:ki}getErrorText(){return this.error?this.errorText:this.nativeErrorText}handleFocusChange(){this.focused=this.inputOrTextarea?.matches(":focus")??!1}handleInput(e){this.dirty=!0,this.value=e.target.value}redispatchEvent(e){wo(this,e)}getInputOrTextarea(){return this.inputOrTextarea||(this.connectedCallback(),this.scheduleUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.inputOrTextarea}getInput(){return"textarea"===this.type?null:this.getInputOrTextarea()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0,this.hasTrailingIcon=this.trailingIcons.length>0}[Ro](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}focus(){this.getInputOrTextarea().focus()}[Io](){return new Uo((()=>({state:this,renderedControl:this.inputOrTextarea})))}[To](){return this.inputOrTextarea}[Lo](e){e?.preventDefault();const t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&this.field?.reannounceError()}}xo(Vo),Vo.shadowRootOptions={...Vi.shadowRootOptions,delegatesFocus:!0},In([Kn({type:Boolean,reflect:!0})],Vo.prototype,"error",void 0),In([Kn({attribute:"error-text"})],Vo.prototype,"errorText",void 0),In([Kn()],Vo.prototype,"label",void 0),In([Kn({type:Boolean,attribute:"no-asterisk"})],Vo.prototype,"noAsterisk",void 0),In([Kn({type:Boolean,reflect:!0})],Vo.prototype,"required",void 0),In([Kn()],Vo.prototype,"value",void 0),In([Kn({attribute:"prefix-text"})],Vo.prototype,"prefixText",void 0),In([Kn({attribute:"suffix-text"})],Vo.prototype,"suffixText",void 0),In([Kn({type:Boolean,attribute:"has-leading-icon"})],Vo.prototype,"hasLeadingIcon",void 0),In([Kn({type:Boolean,attribute:"has-trailing-icon"})],Vo.prototype,"hasTrailingIcon",void 0),In([Kn({attribute:"supporting-text"})],Vo.prototype,"supportingText",void 0),In([Kn({attribute:"text-direction"})],Vo.prototype,"textDirection",void 0),In([Kn({type:Number})],Vo.prototype,"rows",void 0),In([Kn({type:Number})],Vo.prototype,"cols",void 0),In([Kn({reflect:!0})],Vo.prototype,"inputMode",void 0),In([Kn()],Vo.prototype,"max",void 0),In([Kn({type:Number})],Vo.prototype,"maxLength",void 0),In([Kn()],Vo.prototype,"min",void 0),In([Kn({type:Number})],Vo.prototype,"minLength",void 0),In([Kn({type:Boolean,attribute:"no-spinner"})],Vo.prototype,"noSpinner",void 0),In([Kn()],Vo.prototype,"pattern",void 0),In([Kn({reflect:!0,converter:{fromAttribute:e=>e??"",toAttribute:e=>e||null}})],Vo.prototype,"placeholder",void 0),In([Kn({type:Boolean,reflect:!0})],Vo.prototype,"readOnly",void 0),In([Kn({type:Boolean,reflect:!0})],Vo.prototype,"multiple",void 0),In([Kn()],Vo.prototype,"step",void 0),In([Kn({reflect:!0})],Vo.prototype,"type",void 0),In([Kn({reflect:!0})],Vo.prototype,"autocomplete",void 0),In([Yn()],Vo.prototype,"dirty",void 0),In([Yn()],Vo.prototype,"focused",void 0),In([Yn()],Vo.prototype,"nativeError",void 0),In([Yn()],Vo.prototype,"nativeErrorText",void 0),In([ei(".input")],Vo.prototype,"inputOrTextarea",void 0),In([ei(".field")],Vo.prototype,"field",void 0),In([ri({slot:"leading-icon"})],Vo.prototype,"leadingIcons",void 0),In([ri({slot:"trailing-icon"})],Vo.prototype,"trailingIcons",void 0);class Go extends Vo{constructor(){super(...arguments),this.fieldTag=ao`md-outlined-field`}}const Wo=Cn`:host{display:inline-flex;outline:none;resize:both;text-align:start;-webkit-tap-highlight-color:rgba(0,0,0,0)}.text-field,.field{width:100%}.text-field{display:inline-flex}.field{cursor:text}.disabled .field{cursor:default}.text-field,.textarea .field{resize:inherit}.icon{color:currentColor;display:flex;fill:currentColor}.icon ::slotted(*){display:flex}[hasstart] .icon.leading{font-size:var(--_leading-icon-size);height:var(--_leading-icon-size);width:var(--_leading-icon-size)}[hasend] .icon.trailing{font-size:var(--_trailing-icon-size);height:var(--_trailing-icon-size);width:var(--_trailing-icon-size)}.input-wrapper{display:flex}.input-wrapper>*{all:inherit;padding:0}.input{caret-color:var(--_caret-color);overflow-x:hidden;text-align:inherit}.input::placeholder{color:currentColor;opacity:1}.input::-webkit-calendar-picker-indicator{display:none}.input::-webkit-search-decoration,.input::-webkit-search-cancel-button{display:none}@media(forced-colors: active){.input{background:none}}.no-spinner .input::-webkit-inner-spin-button,.no-spinner .input::-webkit-outer-spin-button{display:none}.no-spinner .input[type=number]{-moz-appearance:textfield}:focus-within .input{caret-color:var(--_focus-caret-color)}.error:focus-within .input{caret-color:var(--_error-focus-caret-color)}.text-field:not(.disabled) .prefix{color:var(--_input-text-prefix-color)}.text-field:not(.disabled) .suffix{color:var(--_input-text-suffix-color)}.text-field:not(.disabled) .input::placeholder{color:var(--_input-text-placeholder-color)}.prefix,.suffix{text-wrap:nowrap;width:min-content}.prefix{padding-inline-end:var(--_input-text-prefix-trailing-space)}.suffix{padding-inline-start:var(--_input-text-suffix-leading-space)}
136
- `;let Jo=class extends Go{constructor(){super(...arguments),this.fieldTag=ao`md-outlined-field`}};Jo.styles=[Wo,uo],Jo=In([Tn("md-outlined-text-field")],Jo);class Qo extends Vi{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return Ei`<span class="shadow"></span>`}}const Xo=Cn`:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15}
137
- `;let Ko=class extends Qo{};Ko.styles=[Xo],Ko=In([Tn("md-elevation")],Ko);const Yo=Symbol("attachableController");let Zo;Zo=new MutationObserver((e=>{for(const t of e)t.target[Yo]?.hostConnected()}));class ea{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(e){null===e?this.host.removeAttribute("for"):this.host.setAttribute("for",e)}get control(){return this.host.hasAttribute("for")?this.htmlFor&&this.host.isConnected?this.host.getRootNode().querySelector(`#${this.htmlFor}`):null:this.currentControl||this.host.parentElement}set control(e){e?this.attach(e):this.detach()}constructor(e,t){this.host=e,this.onControlChange=t,this.currentControl=null,e.addController(this),e[Yo]=this,Zo?.observe(e,{attributeFilter:["for"]})}attach(e){e!==this.currentControl&&(this.setCurrentControl(e),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(e){this.onControlChange(this.currentControl,e),this.currentControl=e}}const ta=["focusin","focusout","pointerdown"];class ra extends Vi{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new ea(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(e){if(!e[na]){switch(e.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}e[na]=!0}}onControlChange(e,t){for(const r of ta)e?.removeEventListener(r,this),t?.addEventListener(r,this)}update(e){e.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(e)}}In([Kn({type:Boolean,reflect:!0})],ra.prototype,"visible",void 0),In([Kn({type:Boolean,reflect:!0})],ra.prototype,"inward",void 0);const na=Symbol("handledByFocusRing"),ia=Cn`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}
138
- `;let oa=class extends ra{};var aa;oa.styles=[ia],oa=In([Tn("md-focus-ring")],oa),function(e){e[e.INACTIVE=0]="INACTIVE",e[e.TOUCH_DELAY=1]="TOUCH_DELAY",e[e.HOLDING=2]="HOLDING",e[e.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"}(aa||(aa={}));const sa=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],la=window.matchMedia("(forced-colors: active)");class da extends Vi{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=aa.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new ea(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const e={hovered:this.hovered,pressed:this.pressed};return Ei`<div class="surface ${Qi(e)}"></div>`}update(e){e.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(e)}handlePointerenter(e){this.shouldReactToEvent(e)&&(this.hovered=!0)}handlePointerleave(e){this.shouldReactToEvent(e)&&(this.hovered=!1,this.state!==aa.INACTIVE&&this.endPressAnimation())}handlePointerup(e){if(this.shouldReactToEvent(e)){if(this.state!==aa.HOLDING)return this.state===aa.TOUCH_DELAY?(this.state=aa.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=aa.WAITING_FOR_CLICK}}async handlePointerdown(e){if(this.shouldReactToEvent(e)){if(this.rippleStartEvent=e,!this.isTouch(e))return this.state=aa.WAITING_FOR_CLICK,void this.startPressAnimation(e);this.checkBoundsAfterContextMenu&&!this.inBounds(e)||(this.checkBoundsAfterContextMenu=!1,this.state=aa.TOUCH_DELAY,await new Promise((e=>{setTimeout(e,150)})),this.state===aa.TOUCH_DELAY&&(this.state=aa.HOLDING,this.startPressAnimation(e)))}}handleClick(){this.disabled||(this.state!==aa.WAITING_FOR_CLICK?this.state===aa.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(e){this.shouldReactToEvent(e)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:e,width:t}=this.getBoundingClientRect(),r=Math.max(e,t),n=Math.max(.35*r,75),i=Math.floor(.2*r),o=Math.sqrt(t**2+e**2)+10;this.initialSize=i,this.rippleScale=""+(o+n)/i,this.rippleSize=`${i}px`}getNormalizedPointerEventCoords(e){const{scrollX:t,scrollY:r}=window,{left:n,top:i}=this.getBoundingClientRect(),o=t+n,a=r+i,{pageX:s,pageY:l}=e;return{x:s-o,y:l-a}}getTranslationCoordinates(e){const{height:t,width:r}=this.getBoundingClientRect(),n={x:(r-this.initialSize)/2,y:(t-this.initialSize)/2};let i;return i=e instanceof PointerEvent?this.getNormalizedPointerEventCoords(e):{x:r/2,y:t/2},i={x:i.x-this.initialSize/2,y:i.y-this.initialSize/2},{startPoint:i,endPoint:n}}startPressAnimation(e){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:t,endPoint:r}=this.getTranslationCoordinates(e),n=`${t.x}px, ${t.y}px`,i=`${r.x}px, ${r.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${n}) scale(1)`,`translate(${i}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:Xi,fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=aa.INACTIVE;const e=this.growAnimation;let t=1/0;"number"==typeof e?.currentTime?t=e.currentTime:e?.currentTime&&(t=e.currentTime.to("ms").value),t>=225?this.pressed=!1:(await new Promise((e=>{setTimeout(e,225-t)})),this.growAnimation===e&&(this.pressed=!1))}shouldReactToEvent(e){if(this.disabled||!e.isPrimary)return!1;if(this.rippleStartEvent&&this.rippleStartEvent.pointerId!==e.pointerId)return!1;if("pointerenter"===e.type||"pointerleave"===e.type)return!this.isTouch(e);const t=1===e.buttons;return this.isTouch(e)||t}inBounds({x:e,y:t}){const{top:r,left:n,bottom:i,right:o}=this.getBoundingClientRect();return e>=n&&e<=o&&t>=r&&t<=i}isTouch({pointerType:e}){return"touch"===e}async handleEvent(e){if(!la?.matches)switch(e.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(e);break;case"pointerdown":await this.handlePointerdown(e);break;case"pointerenter":this.handlePointerenter(e);break;case"pointerleave":this.handlePointerleave(e);break;case"pointerup":this.handlePointerup(e)}}onControlChange(e,t){for(const r of sa)e?.removeEventListener(r,this),t?.addEventListener(r,this)}}In([Kn({type:Boolean,reflect:!0})],da.prototype,"disabled",void 0),In([Yn()],da.prototype,"hovered",void 0),In([Yn()],da.prototype,"pressed",void 0),In([ei(".surface")],da.prototype,"mdRoot",void 0);const ca=Cn`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms}
139
- `;let ua=class extends da{};function ha(e){const t=new MouseEvent("click",{bubbles:!0});return e.dispatchEvent(t),t}function pa(e){return e.currentTarget===e.target&&e.composedPath()[0]===e.target&&!e.target.disabled&&!function(e){const t=fa;return t&&(e.preventDefault(),e.stopImmediatePropagation()),async function(){fa=!0,await null,fa=!1}(),t}(e)}ua.styles=[ca],ua=In([Tn("md-ripple")],ua);let fa=!1;const ga=Eo(Vi);class va extends ga{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[_o].form}constructor(){super(),this.disabled=!1,this.href="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",this.handleActivationClick=e=>{pa(e)&&this.buttonElement&&(this.focus(),ha(this.buttonElement))},this.addEventListener("click",this.handleActivationClick)}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){const e=this.disabled&&!this.href,t=this.href?this.renderLink():this.renderButton(),r=this.href?"link":"button";return Ei`
135
+ `}renderPrefix(){return this.renderAffix(this.prefixText,!1)}renderSuffix(){return this.renderAffix(this.suffixText,!0)}renderAffix(e,t){return e?Ti`<span class="${Ki({suffix:t,prefix:!t})}">${e}</span>`:Ci}getErrorText(){return this.error?this.errorText:this.nativeErrorText}handleFocusChange(){this.focused=this.inputOrTextarea?.matches(":focus")??!1}handleInput(e){this.dirty=!0,this.value=e.target.value}redispatchEvent(e){jo(this,e)}getInputOrTextarea(){return this.inputOrTextarea||(this.connectedCallback(),this.scheduleUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.inputOrTextarea}getInput(){return"textarea"===this.type?null:this.getInputOrTextarea()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0,this.hasTrailingIcon=this.trailingIcons.length>0}[Mo](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}focus(){this.getInputOrTextarea().focus()}[Ro](){return new Qo((()=>({state:this,renderedControl:this.inputOrTextarea})))}[Oo](){return this.inputOrTextarea}[qo](e){e?.preventDefault();const t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&this.field?.reannounceError()}}Yo.shadowRootOptions={...Wi.shadowRootOptions,delegatesFocus:!0},kn([Zn({type:Boolean,reflect:!0})],Yo.prototype,"error",void 0),kn([Zn({attribute:"error-text"})],Yo.prototype,"errorText",void 0),kn([Zn()],Yo.prototype,"label",void 0),kn([Zn({type:Boolean,attribute:"no-asterisk"})],Yo.prototype,"noAsterisk",void 0),kn([Zn({type:Boolean,reflect:!0})],Yo.prototype,"required",void 0),kn([Zn()],Yo.prototype,"value",void 0),kn([Zn({attribute:"prefix-text"})],Yo.prototype,"prefixText",void 0),kn([Zn({attribute:"suffix-text"})],Yo.prototype,"suffixText",void 0),kn([Zn({type:Boolean,attribute:"has-leading-icon"})],Yo.prototype,"hasLeadingIcon",void 0),kn([Zn({type:Boolean,attribute:"has-trailing-icon"})],Yo.prototype,"hasTrailingIcon",void 0),kn([Zn({attribute:"supporting-text"})],Yo.prototype,"supportingText",void 0),kn([Zn({attribute:"text-direction"})],Yo.prototype,"textDirection",void 0),kn([Zn({type:Number})],Yo.prototype,"rows",void 0),kn([Zn({type:Number})],Yo.prototype,"cols",void 0),kn([Zn({reflect:!0})],Yo.prototype,"inputMode",void 0),kn([Zn()],Yo.prototype,"max",void 0),kn([Zn({type:Number})],Yo.prototype,"maxLength",void 0),kn([Zn()],Yo.prototype,"min",void 0),kn([Zn({type:Number})],Yo.prototype,"minLength",void 0),kn([Zn({type:Boolean,attribute:"no-spinner"})],Yo.prototype,"noSpinner",void 0),kn([Zn()],Yo.prototype,"pattern",void 0),kn([Zn({reflect:!0,converter:{fromAttribute:e=>e??"",toAttribute:e=>e||null}})],Yo.prototype,"placeholder",void 0),kn([Zn({type:Boolean,reflect:!0})],Yo.prototype,"readOnly",void 0),kn([Zn({type:Boolean,reflect:!0})],Yo.prototype,"multiple",void 0),kn([Zn()],Yo.prototype,"step",void 0),kn([Zn({reflect:!0})],Yo.prototype,"type",void 0),kn([Zn({reflect:!0})],Yo.prototype,"autocomplete",void 0),kn([ei()],Yo.prototype,"dirty",void 0),kn([ei()],Yo.prototype,"focused",void 0),kn([ei()],Yo.prototype,"nativeError",void 0),kn([ei()],Yo.prototype,"nativeErrorText",void 0),kn([ri(".input")],Yo.prototype,"inputOrTextarea",void 0),kn([ri(".field")],Yo.prototype,"field",void 0),kn([ii({slot:"leading-icon"})],Yo.prototype,"leadingIcons",void 0),kn([ii({slot:"trailing-icon"})],Yo.prototype,"trailingIcons",void 0);class Zo extends Yo{constructor(){super(...arguments),this.fieldTag=lo`md-outlined-field`}}const ea=Ln`:host{display:inline-flex;outline:none;resize:both;text-align:start;-webkit-tap-highlight-color:rgba(0,0,0,0)}.text-field,.field{width:100%}.text-field{display:inline-flex}.field{cursor:text}.disabled .field{cursor:default}.text-field,.textarea .field{resize:inherit}.icon{color:currentColor;display:flex;align-items:center;justify-content:center;fill:currentColor;position:relative}.icon ::slotted(*){display:flex;position:absolute}[has-start] .icon.leading{font-size:var(--_leading-icon-size);height:var(--_leading-icon-size);width:var(--_leading-icon-size)}[has-end] .icon.trailing{font-size:var(--_trailing-icon-size);height:var(--_trailing-icon-size);width:var(--_trailing-icon-size)}.input-wrapper{display:flex}.input-wrapper>*{all:inherit;padding:0}.input{caret-color:var(--_caret-color);overflow-x:hidden;text-align:inherit}.input::placeholder{color:currentColor;opacity:1}.input::-webkit-calendar-picker-indicator{display:none}.input::-webkit-search-decoration,.input::-webkit-search-cancel-button{display:none}@media(forced-colors: active){.input{background:none}}.no-spinner .input::-webkit-inner-spin-button,.no-spinner .input::-webkit-outer-spin-button{display:none}.no-spinner .input[type=number]{-moz-appearance:textfield}:focus-within .input{caret-color:var(--_focus-caret-color)}.error:focus-within .input{caret-color:var(--_error-focus-caret-color)}.text-field:not(.disabled) .prefix{color:var(--_input-text-prefix-color)}.text-field:not(.disabled) .suffix{color:var(--_input-text-suffix-color)}.text-field:not(.disabled) .input::placeholder{color:var(--_input-text-placeholder-color)}.prefix,.suffix{text-wrap:nowrap;width:min-content}.prefix{padding-inline-end:var(--_input-text-prefix-trailing-space)}.suffix{padding-inline-start:var(--_input-text-suffix-leading-space)}
136
+ `;let ta=class extends Zo{constructor(){super(...arguments),this.fieldTag=lo`md-outlined-field`}};ta.styles=[ea,po],ta=kn([jn("md-outlined-text-field")],ta);class ra extends Wi{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return Ti`<span class="shadow"></span>`}}const na=Ln`:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15}
137
+ `;let ia=class extends ra{};ia.styles=[na],ia=kn([jn("md-elevation")],ia);const oa=Symbol("attachableController");let aa;aa=new MutationObserver((e=>{for(const t of e)t.target[oa]?.hostConnected()}));class sa{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(e){null===e?this.host.removeAttribute("for"):this.host.setAttribute("for",e)}get control(){return this.host.hasAttribute("for")?this.htmlFor&&this.host.isConnected?this.host.getRootNode().querySelector(`#${this.htmlFor}`):null:this.currentControl||this.host.parentElement}set control(e){e?this.attach(e):this.detach()}constructor(e,t){this.host=e,this.onControlChange=t,this.currentControl=null,e.addController(this),e[oa]=this,aa?.observe(e,{attributeFilter:["for"]})}attach(e){e!==this.currentControl&&(this.setCurrentControl(e),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(e){this.onControlChange(this.currentControl,e),this.currentControl=e}}const la=["focusin","focusout","pointerdown"];class da extends Wi{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new sa(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(e){if(!e[ca]){switch(e.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}e[ca]=!0}}onControlChange(e,t){for(const r of la)e?.removeEventListener(r,this),t?.addEventListener(r,this)}update(e){e.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(e)}}kn([Zn({type:Boolean,reflect:!0})],da.prototype,"visible",void 0),kn([Zn({type:Boolean,reflect:!0})],da.prototype,"inward",void 0);const ca=Symbol("handledByFocusRing"),ua=Ln`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}
138
+ `;let ha=class extends da{};var pa;ha.styles=[ua],ha=kn([jn("md-focus-ring")],ha),function(e){e[e.INACTIVE=0]="INACTIVE",e[e.TOUCH_DELAY=1]="TOUCH_DELAY",e[e.HOLDING=2]="HOLDING",e[e.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"}(pa||(pa={}));const fa=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],ga=window.matchMedia("(forced-colors: active)");class ma extends Wi{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=pa.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new sa(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const e={hovered:this.hovered,pressed:this.pressed};return Ti`<div class="surface ${Ki(e)}"></div>`}update(e){e.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(e)}handlePointerenter(e){this.shouldReactToEvent(e)&&(this.hovered=!0)}handlePointerleave(e){this.shouldReactToEvent(e)&&(this.hovered=!1,this.state!==pa.INACTIVE&&this.endPressAnimation())}handlePointerup(e){if(this.shouldReactToEvent(e)){if(this.state!==pa.HOLDING)return this.state===pa.TOUCH_DELAY?(this.state=pa.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=pa.WAITING_FOR_CLICK}}async handlePointerdown(e){if(this.shouldReactToEvent(e)){if(this.rippleStartEvent=e,!this.isTouch(e))return this.state=pa.WAITING_FOR_CLICK,void this.startPressAnimation(e);this.checkBoundsAfterContextMenu&&!this.inBounds(e)||(this.checkBoundsAfterContextMenu=!1,this.state=pa.TOUCH_DELAY,await new Promise((e=>{setTimeout(e,150)})),this.state===pa.TOUCH_DELAY&&(this.state=pa.HOLDING,this.startPressAnimation(e)))}}handleClick(){this.disabled||(this.state!==pa.WAITING_FOR_CLICK?this.state===pa.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(e){this.shouldReactToEvent(e)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:e,width:t}=this.getBoundingClientRect(),r=Math.max(e,t),n=Math.max(.35*r,75),i=Math.floor(.2*r),o=Math.sqrt(t**2+e**2)+10;this.initialSize=i,this.rippleScale=""+(o+n)/i,this.rippleSize=`${i}px`}getNormalizedPointerEventCoords(e){const{scrollX:t,scrollY:r}=window,{left:n,top:i}=this.getBoundingClientRect(),o=t+n,a=r+i,{pageX:s,pageY:l}=e;return{x:s-o,y:l-a}}getTranslationCoordinates(e){const{height:t,width:r}=this.getBoundingClientRect(),n={x:(r-this.initialSize)/2,y:(t-this.initialSize)/2};let i;return i=e instanceof PointerEvent?this.getNormalizedPointerEventCoords(e):{x:r/2,y:t/2},i={x:i.x-this.initialSize/2,y:i.y-this.initialSize/2},{startPoint:i,endPoint:n}}startPressAnimation(e){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:t,endPoint:r}=this.getTranslationCoordinates(e),n=`${t.x}px, ${t.y}px`,i=`${r.x}px, ${r.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${n}) scale(1)`,`translate(${i}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:Yi,fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=pa.INACTIVE;const e=this.growAnimation;let t=1/0;"number"==typeof e?.currentTime?t=e.currentTime:e?.currentTime&&(t=e.currentTime.to("ms").value),t>=225?this.pressed=!1:(await new Promise((e=>{setTimeout(e,225-t)})),this.growAnimation===e&&(this.pressed=!1))}shouldReactToEvent(e){if(this.disabled||!e.isPrimary)return!1;if(this.rippleStartEvent&&this.rippleStartEvent.pointerId!==e.pointerId)return!1;if("pointerenter"===e.type||"pointerleave"===e.type)return!this.isTouch(e);const t=1===e.buttons;return this.isTouch(e)||t}inBounds({x:e,y:t}){const{top:r,left:n,bottom:i,right:o}=this.getBoundingClientRect();return e>=n&&e<=o&&t>=r&&t<=i}isTouch({pointerType:e}){return"touch"===e}async handleEvent(e){if(!ga?.matches)switch(e.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(e);break;case"pointerdown":await this.handlePointerdown(e);break;case"pointerenter":this.handlePointerenter(e);break;case"pointerleave":this.handlePointerleave(e);break;case"pointerup":this.handlePointerup(e)}}onControlChange(e,t){for(const r of fa)e?.removeEventListener(r,this),t?.addEventListener(r,this)}}kn([Zn({type:Boolean,reflect:!0})],ma.prototype,"disabled",void 0),kn([ei()],ma.prototype,"hovered",void 0),kn([ei()],ma.prototype,"pressed",void 0),kn([ri(".surface")],ma.prototype,"mdRoot",void 0);const va=Ln`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms}
139
+ `;let ba=class extends ma{};function ya(e){const t=new MouseEvent("click",{bubbles:!0});return e.dispatchEvent(t),t}function xa(e){return e.currentTarget===e.target&&e.composedPath()[0]===e.target&&!e.target.disabled&&!function(e){const t=wa;return t&&(e.preventDefault(),e.stopImmediatePropagation()),async function(){wa=!0,await null,wa=!1}(),t}(e)}ba.styles=[va],ba=kn([jn("md-ripple")],ba);let wa=!1;const _a=Io(No(Wi));class Sa extends _a{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[Ao].form}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.href="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",this.addEventListener("click",this.handleClick.bind(this))}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){const e=!this.href&&(this.disabled||this.softDisabled),t=this.href?this.renderLink():this.renderButton(),r=this.href?"link":"button";return Ti`
140
140
  ${this.renderElevationOrOutline?.()}
141
141
  <div class="background"></div>
142
142
  <md-focus-ring part="focus-ring" for=${r}></md-focus-ring>
@@ -145,45 +145,46 @@ var e={5568:e=>{const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?
145
145
  for=${r}
146
146
  ?disabled="${e}"></md-ripple>
147
147
  ${t}
148
- `}renderButton(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return Ei`<button
148
+ `}renderButton(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return Ti`<button
149
149
  id="button"
150
150
  class="button"
151
151
  ?disabled=${this.disabled}
152
- aria-label="${e||ki}"
153
- aria-haspopup="${t||ki}"
154
- aria-expanded="${r||ki}">
152
+ aria-disabled=${this.softDisabled||Ci}
153
+ aria-label="${e||Ci}"
154
+ aria-haspopup="${t||Ci}"
155
+ aria-expanded="${r||Ci}">
155
156
  ${this.renderContent()}
156
- </button>`}renderLink(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return Ei`<a
157
+ </button>`}renderLink(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return Ti`<a
157
158
  id="link"
158
159
  class="button"
159
- aria-label="${e||ki}"
160
- aria-haspopup="${t||ki}"
161
- aria-expanded="${r||ki}"
160
+ aria-label="${e||Ci}"
161
+ aria-haspopup="${t||Ci}"
162
+ aria-expanded="${r||Ci}"
162
163
  href=${this.href}
163
- target=${this.target||ki}
164
+ target=${this.target||Ci}
164
165
  >${this.renderContent()}
165
- </a>`}renderContent(){const e=Ei`<slot
166
+ </a>`}renderContent(){const e=Ti`<slot
166
167
  name="icon"
167
- @slotchange="${this.handleSlotChange}"></slot>`;return Ei`
168
+ @slotchange="${this.handleSlotChange}"></slot>`;return Ti`
168
169
  <span class="touch"></span>
169
- ${this.trailingIcon?ki:e}
170
+ ${this.trailingIcon?Ci:e}
170
171
  <span class="label"><slot></slot></span>
171
- ${this.trailingIcon?e:ki}
172
- `}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}xo(va),va.addInitializer((e=>{const t=e;t.addEventListener("click",(async e=>{const{type:r,[_o]:n}=t,{form:i}=n;i&&"button"!==r&&(await new Promise((e=>{setTimeout(e)})),e.defaultPrevented||("reset"!==r?(i.addEventListener("submit",(e=>{Object.defineProperty(e,"submitter",{configurable:!0,enumerable:!0,get:()=>t})}),{capture:!0,once:!0}),n.setFormValue(t.value),i.requestSubmit()):i.reset()))}))})),va.formAssociated=!0,va.shadowRootOptions={mode:"open",delegatesFocus:!0},In([Kn({type:Boolean,reflect:!0})],va.prototype,"disabled",void 0),In([Kn()],va.prototype,"href",void 0),In([Kn()],va.prototype,"target",void 0),In([Kn({type:Boolean,attribute:"trailing-icon",reflect:!0})],va.prototype,"trailingIcon",void 0),In([Kn({type:Boolean,attribute:"has-icon",reflect:!0})],va.prototype,"hasIcon",void 0),In([Kn()],va.prototype,"type",void 0),In([Kn({reflect:!0})],va.prototype,"value",void 0),In([ei(".button")],va.prototype,"buttonElement",void 0),In([ri({slot:"icon",flatten:!0})],va.prototype,"assignedIcons",void 0);class ma extends va{renderElevationOrOutline(){return Ei`<md-elevation part="elevation"></md-elevation>`}}const ba=Cn`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)}
173
- `,ya=Cn`md-elevation{transition-duration:280ms}:host([disabled]) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host([disabled]) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)}
174
- `,xa=Cn`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host([disabled]){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host([disabled]) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host([disabled]) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host([disabled]){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host([disabled]) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none}
175
- `;let wa=class extends ma{};wa.styles=[xa,ya,ba],wa=In([Tn("md-filled-button")],wa);class _a extends va{renderElevationOrOutline(){return Ei`<div class="outline"></div>`}}const Sa=Cn`:host{--_container-height: var(--md-outlined-button-container-height, 40px);--_disabled-label-text-color: var(--md-outlined-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-button-disabled-label-text-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-button-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-button-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-outlined-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-outlined-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-outlined-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-outlined-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-outlined-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-outlined-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-outlined-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-outlined-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_outline-color: var(--md-outlined-button-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-button-outline-width, 1px);--_pressed-label-text-color: var(--md-outlined-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-outline-color: var(--md-outlined-button-pressed-outline-color, var(--md-sys-color-outline, #79747e));--_pressed-state-layer-color: var(--md-outlined-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-outlined-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-outlined-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-outlined-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-outlined-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-outlined-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-outlined-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-outlined-button-icon-size, 18px);--_pressed-icon-color: var(--md-outlined-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-outlined-button-container-shape-start-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-outlined-button-container-shape-start-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-outlined-button-container-shape-end-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-outlined-button-container-shape-end-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-outlined-button-leading-space, 24px);--_trailing-space: var(--md-outlined-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-outlined-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-outlined-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-outlined-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-outlined-button-with-trailing-icon-trailing-space, 16px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}.outline{inset:0;border-style:solid;position:absolute;box-sizing:border-box;border-color:var(--_outline-color);border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}:host(:active) .outline{border-color:var(--_pressed-outline-color)}:host([disabled]) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}@media(forced-colors: active){:host([disabled]) .background{border-color:GrayText}:host([disabled]) .outline{opacity:1}}.outline,md-ripple{border-width:var(--_outline-width)}md-ripple{inline-size:calc(100% - 2*var(--_outline-width));block-size:calc(100% - 2*var(--_outline-width));border-style:solid;border-color:rgba(0,0,0,0)}
176
- `;let Ea=class extends _a{};function Ia(e,t=Ca){const r=ka(e,t);return r&&(r.tabIndex=0,r.focus()),r}function Ta(e,t=Ca){const r=Na(e,t);return r&&(r.tabIndex=0,r.focus()),r}function ja(e,t=Ca){for(let r=0;r<e.length;r++){const n=e[r];if(0===n.tabIndex&&t(n))return{item:n,index:r}}return null}function ka(e,t=Ca){for(const r of e)if(t(r))return r;return null}function Na(e,t=Ca){for(let r=e.length-1;r>=0;r--){const n=e[r];if(t(n))return n}return null}function Aa(e,t,r=Ca,n=!0){if(t){const i=function(e,t,r=Ca,n=!0){for(let i=1;i<e.length;i++){const o=(i+t)%e.length;if(o<t&&!n)return null;const a=e[o];if(r(a))return a}return e[t]?e[t]:null}(e,t.index,r,n);return i&&(i.tabIndex=0,i.focus()),i}return Ia(e,r)}function Ra(e,t,r=Ca,n=!0){if(t){const i=function(e,t,r=Ca,n=!0){for(let i=1;i<e.length;i++){const o=(t-i+e.length)%e.length;if(o>t&&!n)return null;const a=e[o];if(r(a))return a}return e[t]?e[t]:null}(e,t.index,r,n);return i&&(i.tabIndex=0,i.focus()),i}return Ta(e,r)}function Ca(e){return!e.disabled}Ea.styles=[xa,Sa],Ea=In([Tn("md-outlined-button")],Ea);const Oa="ArrowDown",La="ArrowLeft",$a="ArrowUp",Da="ArrowRight",Pa="Home";class Ma{constructor(e){this.handleKeydown=e=>{const t=e.key;if(e.defaultPrevented||!this.isNavigableKey(t))return;const r=this.items;if(!r.length)return;const n=ja(r,this.isActivatable);e.preventDefault();const i=this.isRtl();let o=null;switch(t){case Oa:case i?La:Da:o=Aa(r,n,this.isActivatable,this.wrapNavigation());break;case $a:case i?Da:La:o=Ra(r,n,this.isActivatable,this.wrapNavigation());break;case Pa:o=Ia(r,this.isActivatable);break;case"End":o=Ta(r,this.isActivatable)}o&&n&&n.item!==o&&(n.item.tabIndex=-1)},this.onDeactivateItems=()=>{const e=this.items;for(const t of e)this.deactivateItem(t)},this.onRequestActivation=e=>{this.onDeactivateItems();const t=e.target;this.activateItem(t),t.focus()},this.onSlotchange=()=>{const e=this.items;let t=!1;for(const r of e)!r.disabled&&r.tabIndex>-1&&!t?(t=!0,r.tabIndex=0):r.tabIndex=-1;if(t)return;const r=ka(e,this.isActivatable);r&&(r.tabIndex=0)};const{isItem:t,getPossibleItems:r,isRtl:n,deactivateItem:i,activateItem:o,isNavigableKey:a,isActivatable:s,wrapNavigation:l}=e;this.isItem=t,this.getPossibleItems=r,this.isRtl=n,this.deactivateItem=i,this.activateItem=o,this.isNavigableKey=a,this.isActivatable=s,this.wrapNavigation=l??(()=>!0)}get items(){const e=this.getPossibleItems(),t=[];for(const r of e){if(this.isItem(r)){t.push(r);continue}const e=r.item;e&&this.isItem(e)&&t.push(e)}return t}activateNextItem(){const e=this.items,t=ja(e,this.isActivatable);return t&&(t.item.tabIndex=-1),Aa(e,t,this.isActivatable,this.wrapNavigation())}activatePreviousItem(){const e=this.items,t=ja(e,this.isActivatable);return t&&(t.item.tabIndex=-1),Ra(e,t,this.isActivatable,this.wrapNavigation())}}const Ba=function(e,t){return new CustomEvent("close-menu",{bubbles:!0,composed:!0,detail:{initiator:e,reason:t,itemPath:[e]}})},Fa={SPACE:"Space",ENTER:"Enter"},qa={ESCAPE:"Escape",SPACE:Fa.SPACE,ENTER:Fa.ENTER};function Ua(e){return Object.values(qa).some((t=>t===e))}function za(e,t){const r=new Event("md-contains",{bubbles:!0,composed:!0});let n=[];const i=e=>{n=e.composedPath()};return t.addEventListener("md-contains",i),e.dispatchEvent(r),t.removeEventListener("md-contains",i),n.length>0}const Ha="none",Va="first-item",Ga="last-item";class Wa{constructor(e,t){this.host=e,this.getProperties=t,this.surfaceStylesInternal={display:"none"},this.lastValues={isOpen:!1},this.host.addController(this)}get surfaceStyles(){return this.surfaceStylesInternal}async position(){const{surfaceEl:e,anchorEl:t,anchorCorner:r,surfaceCorner:n,positioning:i,xOffset:o,yOffset:a,repositionStrategy:s}=this.getProperties(),l=r.toLowerCase().trim(),d=n.toLowerCase().trim();if(!e||!t)return;const c=window.innerWidth,u=window.innerHeight,h=document.createElement("div");h.style.opacity="0",h.style.position="fixed",h.style.display="block",h.style.inset="0",document.body.appendChild(h);const p=h.getBoundingClientRect();h.remove();const f=window.innerHeight-p.bottom,g=window.innerWidth-p.right;this.surfaceStylesInternal={display:"block",opacity:"0"},this.host.requestUpdate(),await this.host.updateComplete,e.popover&&e.isConnected&&e.showPopover();const v=e.getSurfacePositionClientRect?e.getSurfacePositionClientRect():e.getBoundingClientRect(),m=t.getSurfacePositionClientRect?t.getSurfacePositionClientRect():t.getBoundingClientRect(),[b,y]=d.split("-"),[x,w]=l.split("-"),_="ltr"===getComputedStyle(e).direction;let{blockInset:S,blockOutOfBoundsCorrection:E,surfaceBlockProperty:I}=this.calculateBlock({surfaceRect:v,anchorRect:m,anchorBlock:x,surfaceBlock:b,yOffset:a,positioning:i,windowInnerHeight:u,blockScrollbarHeight:f});if(E){const e="start"===b?"end":"start",t="start"===x?"end":"start",r=this.calculateBlock({surfaceRect:v,anchorRect:m,anchorBlock:t,surfaceBlock:e,yOffset:a,positioning:i,windowInnerHeight:u,blockScrollbarHeight:f});E>r.blockOutOfBoundsCorrection&&(S=r.blockInset,E=r.blockOutOfBoundsCorrection,I=r.surfaceBlockProperty)}let{inlineInset:T,inlineOutOfBoundsCorrection:j,surfaceInlineProperty:k}=this.calculateInline({surfaceRect:v,anchorRect:m,anchorInline:w,surfaceInline:y,xOffset:o,positioning:i,isLTR:_,windowInnerWidth:c,inlineScrollbarWidth:g});if(j){const e="start"===y?"end":"start",t="start"===w?"end":"start",r=this.calculateInline({surfaceRect:v,anchorRect:m,anchorInline:t,surfaceInline:e,xOffset:o,positioning:i,isLTR:_,windowInnerWidth:c,inlineScrollbarWidth:g});Math.abs(j)>Math.abs(r.inlineOutOfBoundsCorrection)&&(T=r.inlineInset,j=r.inlineOutOfBoundsCorrection,k=r.surfaceInlineProperty)}"move"===s&&(S-=E,T-=j),this.surfaceStylesInternal={display:"block",opacity:"1",[I]:`${S}px`,[k]:`${T}px`},"resize"===s&&(E&&(this.surfaceStylesInternal.height=v.height-E+"px"),j&&(this.surfaceStylesInternal.width=v.width-j+"px")),this.host.requestUpdate()}calculateBlock(e){const{surfaceRect:t,anchorRect:r,anchorBlock:n,surfaceBlock:i,yOffset:o,positioning:a,windowInnerHeight:s,blockScrollbarHeight:l}=e,d="fixed"===a||"document"===a?1:0,c="document"===a?1:0,u="start"===i?1:0,h="end"===i?1:0,p=(n!==i?1:0)*r.height+o,f=u*r.top+h*(s-r.bottom-l);return{blockInset:d*f+c*(u*window.scrollY-h*window.scrollY)+p,blockOutOfBoundsCorrection:Math.abs(Math.min(0,s-f-p-t.height)),surfaceBlockProperty:"start"===i?"inset-block-start":"inset-block-end"}}calculateInline(e){const{isLTR:t,surfaceInline:r,anchorInline:n,anchorRect:i,surfaceRect:o,xOffset:a,positioning:s,windowInnerWidth:l,inlineScrollbarWidth:d}=e,c="fixed"===s||"document"===s?1:0,u="document"===s?1:0,h=t?1:0,p=t?0:1,f="start"===r?1:0,g="end"===r?1:0,v=(n!==r?1:0)*i.width+a,m=h*(f*i.left+g*(l-i.right-d))+p*(f*(l-i.right-d)+g*i.left);let b="start"===r?"inset-inline-start":"inset-inline-end";return"document"!==s&&"fixed"!==s||(b="start"===r&&t||"end"===r&&!t?"left":"right"),{inlineInset:c*m+v+u*(h*(f*window.scrollX-g*window.scrollX)+p*(g*window.scrollX-f*window.scrollX)),inlineOutOfBoundsCorrection:Math.abs(Math.min(0,l-m-v-o.width)),surfaceInlineProperty:b}}hostUpdate(){this.onUpdate()}hostUpdated(){this.onUpdate()}async onUpdate(){const e=this.getProperties();let t=!1;for(const[r,n]of Object.entries(e))if(t=t||n!==this.lastValues[r],t)break;const r=this.lastValues.isOpen!==e.isOpen,n=!!e.anchorEl,i=!!e.surfaceEl;t&&n&&i&&(this.lastValues.isOpen=e.isOpen,e.isOpen?(this.lastValues=e,await this.position(),e.onOpen()):r&&(await e.beforeClose(),this.close(),e.onClose()))}close(){this.surfaceStylesInternal={display:"none"},this.host.requestUpdate();const e=this.getProperties().surfaceEl;e?.popover&&e?.isConnected&&e.hidePopover()}}class Ja{constructor(e){this.getProperties=e,this.typeaheadRecords=[],this.typaheadBuffer="",this.cancelTypeaheadTimeout=0,this.isTypingAhead=!1,this.lastActiveRecord=null,this.onKeydown=e=>{this.isTypingAhead?this.typeahead(e):this.beginTypeahead(e)},this.endTypeahead=()=>{this.isTypingAhead=!1,this.typaheadBuffer="",this.typeaheadRecords=[]}}get items(){return this.getProperties().getItems()}get active(){return this.getProperties().active}beginTypeahead(e){this.active&&("Space"===e.code||"Enter"===e.code||e.code.startsWith("Arrow")||"Escape"===e.code||(this.isTypingAhead=!0,this.typeaheadRecords=this.items.map(((e,t)=>[t,e,e.typeaheadText.trim().toLowerCase()])),this.lastActiveRecord=this.typeaheadRecords.find((e=>0===e[1].tabIndex))??null,this.lastActiveRecord&&(this.lastActiveRecord[1].tabIndex=-1),this.typeahead(e)))}typeahead(e){if(e.defaultPrevented)return;if(clearTimeout(this.cancelTypeaheadTimeout),"Enter"===e.code||e.code.startsWith("Arrow")||"Escape"===e.code)return this.endTypeahead(),void(this.lastActiveRecord&&(this.lastActiveRecord[1].tabIndex=-1));"Space"===e.code&&e.preventDefault(),this.cancelTypeaheadTimeout=setTimeout(this.endTypeahead,this.getProperties().typeaheadBufferTime),this.typaheadBuffer+=e.key.toLowerCase();const t=this.lastActiveRecord?this.lastActiveRecord[0]:-1,r=this.typeaheadRecords.length,n=e=>(e[0]+r-t)%r,i=this.typeaheadRecords.filter((e=>!e[1].disabled&&e[2].startsWith(this.typaheadBuffer))).sort(((e,t)=>n(e)-n(t)));if(0===i.length)return clearTimeout(this.cancelTypeaheadTimeout),this.lastActiveRecord&&(this.lastActiveRecord[1].tabIndex=-1),void this.endTypeahead();const o=1===this.typaheadBuffer.length;let a;a=this.lastActiveRecord===i[0]&&o?i[1]??i[0]:i[0],this.lastActiveRecord&&(this.lastActiveRecord[1].tabIndex=-1),this.lastActiveRecord=a,a[1].tabIndex=0,a[1].focus()}}const Qa=new Set([Oa,$a,Pa,"End"]),Xa=new Set([La,Da,...Qa]);class Ka extends Vi{get openDirection(){return"start"===this.menuCorner.split("-")[0]?"DOWN":"UP"}get anchorElement(){return this.anchor?this.getRootNode().querySelector(`#${this.anchor}`):this.currentAnchorElement}set anchorElement(e){this.currentAnchorElement=e,this.requestUpdate("anchorElement")}constructor(){super(),this.anchor="",this.positioning="absolute",this.quick=!1,this.hasOverflow=!1,this.open=!1,this.xOffset=0,this.yOffset=0,this.typeaheadDelay=200,this.anchorCorner="end-start",this.menuCorner="start-start",this.stayOpenOnOutsideClick=!1,this.stayOpenOnFocusout=!1,this.skipRestoreFocus=!1,this.defaultFocus=Va,this.noNavigationWrap=!1,this.typeaheadActive=!0,this.isSubmenu=!1,this.pointerPath=[],this.isRepositioning=!1,this.openCloseAnimationSignal=function(){let e=null;return{start:()=>(e?.abort(),e=new AbortController,e.signal),finish(){e=null}}}(),this.listController=new Ma({isItem:e=>e.hasAttribute("md-menu-item"),getPossibleItems:()=>this.slotItems,isRtl:()=>"rtl"===getComputedStyle(this).direction,deactivateItem:e=>{e.selected=!1,e.tabIndex=-1},activateItem:e=>{e.selected=!0,e.tabIndex=0},isNavigableKey:e=>this.isSubmenu?e===("rtl"===getComputedStyle(this).direction?La:Da)||Qa.has(e):Xa.has(e),wrapNavigation:()=>!this.noNavigationWrap}),this.lastFocusedElement=null,this.typeaheadController=new Ja((()=>({getItems:()=>this.items,typeaheadBufferTime:this.typeaheadDelay,active:this.typeaheadActive}))),this.currentAnchorElement=null,this.internals=this.attachInternals(),this.menuPositionController=new Wa(this,(()=>({anchorCorner:this.anchorCorner,surfaceCorner:this.menuCorner,surfaceEl:this.surfaceEl,anchorEl:this.anchorElement,positioning:"popover"===this.positioning?"document":this.positioning,isOpen:this.open,xOffset:this.xOffset,yOffset:this.yOffset,onOpen:this.onOpened,beforeClose:this.beforeClose,onClose:this.onClosed,repositionStrategy:this.hasOverflow&&"popover"!==this.positioning?"move":"resize"}))),this.onWindowResize=()=>{this.isRepositioning||"document"!==this.positioning&&"fixed"!==this.positioning&&"popover"!==this.positioning||(this.isRepositioning=!0,this.reposition(),this.isRepositioning=!1)},this.handleFocusout=async e=>{const t=this.anchorElement;if(this.stayOpenOnFocusout||!this.open||this.pointerPath.includes(t))return;if(e.relatedTarget){if(za(e.relatedTarget,this)||0!==this.pointerPath.length&&za(e.relatedTarget,t))return}else if(this.pointerPath.includes(this))return;const r=this.skipRestoreFocus;this.skipRestoreFocus=!0,this.close(),await this.updateComplete,this.skipRestoreFocus=r},this.onOpened=async()=>{this.lastFocusedElement=function(e=document){let t=e.activeElement;for(;t&&t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}();const e=this.items,t=ja(e);t&&this.defaultFocus!==Ha&&(t.item.tabIndex=-1);let r=!this.quick;switch(this.quick?this.dispatchEvent(new Event("opening")):r=!!await this.animateOpen(),this.defaultFocus){case Va:const t=ka(e);t&&(t.tabIndex=0,t.focus(),await t.updateComplete);break;case Ga:const r=Na(e);r&&(r.tabIndex=0,r.focus(),await r.updateComplete);break;case"list-root":this.focus()}r||this.dispatchEvent(new Event("opened"))},this.beforeClose=async()=>{this.open=!1,this.skipRestoreFocus||this.lastFocusedElement?.focus?.(),this.quick||await this.animateClose()},this.onClosed=()=>{this.quick&&(this.dispatchEvent(new Event("closing")),this.dispatchEvent(new Event("closed")))},this.onWindowPointerdown=e=>{this.pointerPath=e.composedPath()},this.onDocumentClick=e=>{if(!this.open)return;const t=e.composedPath();this.stayOpenOnOutsideClick||t.includes(this)||t.includes(this.anchorElement)||(this.open=!1)},this.internals.role="menu",this.addEventListener("keydown",this.handleKeydown),this.addEventListener("keydown",this.captureKeydown,{capture:!0}),this.addEventListener("focusout",this.handleFocusout)}get items(){return this.listController.items}willUpdate(e){e.has("open")&&(this.open?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"))}update(e){e.has("open")&&(this.open?this.setUpGlobalEventListeners():this.cleanUpGlobalEventListeners()),e.has("positioning")&&"popover"===this.positioning&&!this.showPopover&&(this.positioning="fixed"),super.update(e)}connectedCallback(){super.connectedCallback(),this.open&&this.setUpGlobalEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.cleanUpGlobalEventListeners()}getBoundingClientRect(){return this.surfaceEl?this.surfaceEl.getBoundingClientRect():super.getBoundingClientRect()}getClientRects(){return this.surfaceEl?this.surfaceEl.getClientRects():super.getClientRects()}render(){return this.renderSurface()}renderSurface(){return Ei`
172
+ ${this.trailingIcon?e:Ci}
173
+ `}handleClick(e){if(!this.href&&this.softDisabled)return e.stopImmediatePropagation(),void e.preventDefault();xa(e)&&this.buttonElement&&(this.focus(),ya(this.buttonElement))}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}Sa.addInitializer((e=>{const t=e;t.addEventListener("click",(async e=>{const{type:r,[Ao]:n}=t,{form:i}=n;i&&"button"!==r&&(await new Promise((e=>{setTimeout(e)})),e.defaultPrevented||("reset"!==r?(i.addEventListener("submit",(e=>{Object.defineProperty(e,"submitter",{configurable:!0,enumerable:!0,get:()=>t})}),{capture:!0,once:!0}),n.setFormValue(t.value),i.requestSubmit()):i.reset()))}))})),Sa.formAssociated=!0,Sa.shadowRootOptions={mode:"open",delegatesFocus:!0},kn([Zn({type:Boolean,reflect:!0})],Sa.prototype,"disabled",void 0),kn([Zn({type:Boolean,attribute:"soft-disabled",reflect:!0})],Sa.prototype,"softDisabled",void 0),kn([Zn()],Sa.prototype,"href",void 0),kn([Zn()],Sa.prototype,"target",void 0),kn([Zn({type:Boolean,attribute:"trailing-icon",reflect:!0})],Sa.prototype,"trailingIcon",void 0),kn([Zn({type:Boolean,attribute:"has-icon",reflect:!0})],Sa.prototype,"hasIcon",void 0),kn([Zn()],Sa.prototype,"type",void 0),kn([Zn({reflect:!0})],Sa.prototype,"value",void 0),kn([ri(".button")],Sa.prototype,"buttonElement",void 0),kn([ii({slot:"icon",flatten:!0})],Sa.prototype,"assignedIcons",void 0);class Ea extends Sa{renderElevationOrOutline(){return Ti`<md-elevation part="elevation"></md-elevation>`}}const Ia=Ln`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)}
174
+ `,Ta=Ln`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-disabled])) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)}
175
+ `,ka=Ln`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none}
176
+ `;let ja=class extends Ea{};ja.styles=[ka,Ta,Ia],ja=kn([jn("md-filled-button")],ja);class Aa extends Sa{renderElevationOrOutline(){return Ti`<div class="outline"></div>`}}const Ca=Ln`:host{--_container-height: var(--md-outlined-button-container-height, 40px);--_disabled-label-text-color: var(--md-outlined-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-button-disabled-label-text-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-button-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-button-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-outlined-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-outlined-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-outlined-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-outlined-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-outlined-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-outlined-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-outlined-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-outlined-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_outline-color: var(--md-outlined-button-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-button-outline-width, 1px);--_pressed-label-text-color: var(--md-outlined-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-outline-color: var(--md-outlined-button-pressed-outline-color, var(--md-sys-color-outline, #79747e));--_pressed-state-layer-color: var(--md-outlined-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-outlined-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-outlined-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-outlined-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-outlined-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-outlined-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-outlined-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-outlined-button-icon-size, 18px);--_pressed-icon-color: var(--md-outlined-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-outlined-button-container-shape-start-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-outlined-button-container-shape-start-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-outlined-button-container-shape-end-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-outlined-button-container-shape-end-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-outlined-button-leading-space, 24px);--_trailing-space: var(--md-outlined-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-outlined-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-outlined-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-outlined-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-outlined-button-with-trailing-icon-trailing-space, 16px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}.outline{inset:0;border-style:solid;position:absolute;box-sizing:border-box;border-color:var(--_outline-color);border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}:host(:active) .outline{border-color:var(--_pressed-outline-color)}:host(:is([disabled],[soft-disabled])) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])) .background{border-color:GrayText}:host(:is([disabled],[soft-disabled])) .outline{opacity:1}}.outline,md-ripple{border-width:var(--_outline-width)}md-ripple{inline-size:calc(100% - 2*var(--_outline-width));block-size:calc(100% - 2*var(--_outline-width));border-style:solid;border-color:rgba(0,0,0,0)}
177
+ `;let Na=class extends Aa{};function Ra(e,t=Ba){const r=$a(e,t);return r&&(r.tabIndex=0,r.focus()),r}function Oa(e,t=Ba){const r=Da(e,t);return r&&(r.tabIndex=0,r.focus()),r}function La(e,t=Ba){for(let r=0;r<e.length;r++){const n=e[r];if(0===n.tabIndex&&t(n))return{item:n,index:r}}return null}function $a(e,t=Ba){for(const r of e)if(t(r))return r;return null}function Da(e,t=Ba){for(let r=e.length-1;r>=0;r--){const n=e[r];if(t(n))return n}return null}function Pa(e,t,r=Ba,n=!0){if(t){const i=function(e,t,r=Ba,n=!0){for(let i=1;i<e.length;i++){const o=(i+t)%e.length;if(o<t&&!n)return null;const a=e[o];if(r(a))return a}return e[t]?e[t]:null}(e,t.index,r,n);return i&&(i.tabIndex=0,i.focus()),i}return Ra(e,r)}function Ma(e,t,r=Ba,n=!0){if(t){const i=function(e,t,r=Ba,n=!0){for(let i=1;i<e.length;i++){const o=(t-i+e.length)%e.length;if(o>t&&!n)return null;const a=e[o];if(r(a))return a}return e[t]?e[t]:null}(e,t.index,r,n);return i&&(i.tabIndex=0,i.focus()),i}return Oa(e,r)}function Ba(e){return!e.disabled}Na.styles=[ka,Ca],Na=kn([jn("md-outlined-button")],Na);const Fa="ArrowDown",qa="ArrowLeft",Ua="ArrowUp",za="ArrowRight",Ha="Home";class Va{constructor(e){this.handleKeydown=e=>{const t=e.key;if(e.defaultPrevented||!this.isNavigableKey(t))return;const r=this.items;if(!r.length)return;const n=La(r,this.isActivatable);e.preventDefault();const i=this.isRtl();let o=null;switch(t){case Fa:case i?qa:za:o=Pa(r,n,this.isActivatable,this.wrapNavigation());break;case Ua:case i?za:qa:o=Ma(r,n,this.isActivatable,this.wrapNavigation());break;case Ha:o=Ra(r,this.isActivatable);break;case"End":o=Oa(r,this.isActivatable)}o&&n&&n.item!==o&&(n.item.tabIndex=-1)},this.onDeactivateItems=()=>{const e=this.items;for(const t of e)this.deactivateItem(t)},this.onRequestActivation=e=>{this.onDeactivateItems();const t=e.target;this.activateItem(t),t.focus()},this.onSlotchange=()=>{const e=this.items;let t=!1;for(const r of e)!r.disabled&&r.tabIndex>-1&&!t?(t=!0,r.tabIndex=0):r.tabIndex=-1;if(t)return;const r=$a(e,this.isActivatable);r&&(r.tabIndex=0)};const{isItem:t,getPossibleItems:r,isRtl:n,deactivateItem:i,activateItem:o,isNavigableKey:a,isActivatable:s,wrapNavigation:l}=e;this.isItem=t,this.getPossibleItems=r,this.isRtl=n,this.deactivateItem=i,this.activateItem=o,this.isNavigableKey=a,this.isActivatable=s,this.wrapNavigation=l??(()=>!0)}get items(){const e=this.getPossibleItems(),t=[];for(const r of e){if(this.isItem(r)){t.push(r);continue}const e=r.item;e&&this.isItem(e)&&t.push(e)}return t}activateNextItem(){const e=this.items,t=La(e,this.isActivatable);return t&&(t.item.tabIndex=-1),Pa(e,t,this.isActivatable,this.wrapNavigation())}activatePreviousItem(){const e=this.items,t=La(e,this.isActivatable);return t&&(t.item.tabIndex=-1),Ma(e,t,this.isActivatable,this.wrapNavigation())}}const Ga=function(e,t){return new CustomEvent("close-menu",{bubbles:!0,composed:!0,detail:{initiator:e,reason:t,itemPath:[e]}})},Wa={SPACE:"Space",ENTER:"Enter"},Ja={ESCAPE:"Escape",SPACE:Wa.SPACE,ENTER:Wa.ENTER};function Qa(e){return Object.values(Ja).some((t=>t===e))}function Xa(e,t){const r=new Event("md-contains",{bubbles:!0,composed:!0});let n=[];const i=e=>{n=e.composedPath()};return t.addEventListener("md-contains",i),e.dispatchEvent(r),t.removeEventListener("md-contains",i),n.length>0}const Ka="none",Ya="first-item",Za="last-item";class es{constructor(e,t){this.host=e,this.getProperties=t,this.surfaceStylesInternal={display:"none"},this.lastValues={isOpen:!1},this.host.addController(this)}get surfaceStyles(){return this.surfaceStylesInternal}async position(){const{surfaceEl:e,anchorEl:t,anchorCorner:r,surfaceCorner:n,positioning:i,xOffset:o,yOffset:a,disableBlockFlip:s,disableInlineFlip:l,repositionStrategy:d}=this.getProperties(),c=r.toLowerCase().trim(),u=n.toLowerCase().trim();if(!e||!t)return;const h=window.innerWidth,p=window.innerHeight,f=document.createElement("div");f.style.opacity="0",f.style.position="fixed",f.style.display="block",f.style.inset="0",document.body.appendChild(f);const g=f.getBoundingClientRect();f.remove();const m=window.innerHeight-g.bottom,v=window.innerWidth-g.right;this.surfaceStylesInternal={display:"block",opacity:"0"},this.host.requestUpdate(),await this.host.updateComplete,e.popover&&e.isConnected&&e.showPopover();const b=e.getSurfacePositionClientRect?e.getSurfacePositionClientRect():e.getBoundingClientRect(),y=t.getSurfacePositionClientRect?t.getSurfacePositionClientRect():t.getBoundingClientRect(),[x,w]=u.split("-"),[_,S]=c.split("-"),E="ltr"===getComputedStyle(e).direction;let{blockInset:I,blockOutOfBoundsCorrection:T,surfaceBlockProperty:k}=this.calculateBlock({surfaceRect:b,anchorRect:y,anchorBlock:_,surfaceBlock:x,yOffset:a,positioning:i,windowInnerHeight:p,blockScrollbarHeight:m});if(T&&!s){const e="start"===x?"end":"start",t="start"===_?"end":"start",r=this.calculateBlock({surfaceRect:b,anchorRect:y,anchorBlock:t,surfaceBlock:e,yOffset:a,positioning:i,windowInnerHeight:p,blockScrollbarHeight:m});T>r.blockOutOfBoundsCorrection&&(I=r.blockInset,T=r.blockOutOfBoundsCorrection,k=r.surfaceBlockProperty)}let{inlineInset:j,inlineOutOfBoundsCorrection:A,surfaceInlineProperty:C}=this.calculateInline({surfaceRect:b,anchorRect:y,anchorInline:S,surfaceInline:w,xOffset:o,positioning:i,isLTR:E,windowInnerWidth:h,inlineScrollbarWidth:v});if(A&&!l){const e="start"===w?"end":"start",t="start"===S?"end":"start",r=this.calculateInline({surfaceRect:b,anchorRect:y,anchorInline:t,surfaceInline:e,xOffset:o,positioning:i,isLTR:E,windowInnerWidth:h,inlineScrollbarWidth:v});Math.abs(A)>Math.abs(r.inlineOutOfBoundsCorrection)&&(j=r.inlineInset,A=r.inlineOutOfBoundsCorrection,C=r.surfaceInlineProperty)}"move"===d&&(I-=T,j-=A),this.surfaceStylesInternal={display:"block",opacity:"1",[k]:`${I}px`,[C]:`${j}px`},"resize"===d&&(T&&(this.surfaceStylesInternal.height=b.height-T+"px"),A&&(this.surfaceStylesInternal.width=b.width-A+"px")),this.host.requestUpdate()}calculateBlock(e){const{surfaceRect:t,anchorRect:r,anchorBlock:n,surfaceBlock:i,yOffset:o,positioning:a,windowInnerHeight:s,blockScrollbarHeight:l}=e,d="fixed"===a||"document"===a?1:0,c="document"===a?1:0,u="start"===i?1:0,h="end"===i?1:0,p=(n!==i?1:0)*r.height+o,f=u*r.top+h*(s-r.bottom-l);return{blockInset:d*f+c*(u*window.scrollY-h*window.scrollY)+p,blockOutOfBoundsCorrection:Math.abs(Math.min(0,s-f-p-t.height)),surfaceBlockProperty:"start"===i?"inset-block-start":"inset-block-end"}}calculateInline(e){const{isLTR:t,surfaceInline:r,anchorInline:n,anchorRect:i,surfaceRect:o,xOffset:a,positioning:s,windowInnerWidth:l,inlineScrollbarWidth:d}=e,c="fixed"===s||"document"===s?1:0,u="document"===s?1:0,h=t?1:0,p=t?0:1,f="start"===r?1:0,g="end"===r?1:0,m=(n!==r?1:0)*i.width+a,v=h*(f*i.left+g*(l-i.right-d))+p*(f*(l-i.right-d)+g*i.left);let b="start"===r?"inset-inline-start":"inset-inline-end";return"document"!==s&&"fixed"!==s||(b="start"===r&&t||"end"===r&&!t?"left":"right"),{inlineInset:c*v+m+u*(h*(f*window.scrollX-g*window.scrollX)+p*(g*window.scrollX-f*window.scrollX)),inlineOutOfBoundsCorrection:Math.abs(Math.min(0,l-v-m-o.width)),surfaceInlineProperty:b}}hostUpdate(){this.onUpdate()}hostUpdated(){this.onUpdate()}async onUpdate(){const e=this.getProperties();let t=!1;for(const[r,n]of Object.entries(e))if(t=t||n!==this.lastValues[r],t)break;const r=this.lastValues.isOpen!==e.isOpen,n=!!e.anchorEl,i=!!e.surfaceEl;t&&n&&i&&(this.lastValues.isOpen=e.isOpen,e.isOpen?(this.lastValues=e,await this.position(),e.onOpen()):r&&(await e.beforeClose(),this.close(),e.onClose()))}close(){this.surfaceStylesInternal={display:"none"},this.host.requestUpdate();const e=this.getProperties().surfaceEl;e?.popover&&e?.isConnected&&e.hidePopover()}}class ts{constructor(e){this.getProperties=e,this.typeaheadRecords=[],this.typaheadBuffer="",this.cancelTypeaheadTimeout=0,this.isTypingAhead=!1,this.lastActiveRecord=null,this.onKeydown=e=>{this.isTypingAhead?this.typeahead(e):this.beginTypeahead(e)},this.endTypeahead=()=>{this.isTypingAhead=!1,this.typaheadBuffer="",this.typeaheadRecords=[]}}get items(){return this.getProperties().getItems()}get active(){return this.getProperties().active}beginTypeahead(e){this.active&&("Space"===e.code||"Enter"===e.code||e.code.startsWith("Arrow")||"Escape"===e.code||(this.isTypingAhead=!0,this.typeaheadRecords=this.items.map(((e,t)=>[t,e,e.typeaheadText.trim().toLowerCase()])),this.lastActiveRecord=this.typeaheadRecords.find((e=>0===e[1].tabIndex))??null,this.lastActiveRecord&&(this.lastActiveRecord[1].tabIndex=-1),this.typeahead(e)))}typeahead(e){if(e.defaultPrevented)return;if(clearTimeout(this.cancelTypeaheadTimeout),"Enter"===e.code||e.code.startsWith("Arrow")||"Escape"===e.code)return this.endTypeahead(),void(this.lastActiveRecord&&(this.lastActiveRecord[1].tabIndex=-1));"Space"===e.code&&e.preventDefault(),this.cancelTypeaheadTimeout=setTimeout(this.endTypeahead,this.getProperties().typeaheadBufferTime),this.typaheadBuffer+=e.key.toLowerCase();const t=this.lastActiveRecord?this.lastActiveRecord[0]:-1,r=this.typeaheadRecords.length,n=e=>(e[0]+r-t)%r,i=this.typeaheadRecords.filter((e=>!e[1].disabled&&e[2].startsWith(this.typaheadBuffer))).sort(((e,t)=>n(e)-n(t)));if(0===i.length)return clearTimeout(this.cancelTypeaheadTimeout),this.lastActiveRecord&&(this.lastActiveRecord[1].tabIndex=-1),void this.endTypeahead();const o=1===this.typaheadBuffer.length;let a;a=this.lastActiveRecord===i[0]&&o?i[1]??i[0]:i[0],this.lastActiveRecord&&(this.lastActiveRecord[1].tabIndex=-1),this.lastActiveRecord=a,a[1].tabIndex=0,a[1].focus()}}const rs=new Set([Fa,Ua,Ha,"End"]),ns=new Set([qa,za,...rs]);class is extends Wi{get openDirection(){return"start"===this.menuCorner.split("-")[0]?"DOWN":"UP"}get anchorElement(){return this.anchor?this.getRootNode().querySelector(`#${this.anchor}`):this.currentAnchorElement}set anchorElement(e){this.currentAnchorElement=e,this.requestUpdate("anchorElement")}constructor(){super(),this.anchor="",this.positioning="absolute",this.quick=!1,this.hasOverflow=!1,this.open=!1,this.xOffset=0,this.yOffset=0,this.noHorizontalFlip=!1,this.noVerticalFlip=!1,this.typeaheadDelay=200,this.anchorCorner="end-start",this.menuCorner="start-start",this.stayOpenOnOutsideClick=!1,this.stayOpenOnFocusout=!1,this.skipRestoreFocus=!1,this.defaultFocus=Ya,this.noNavigationWrap=!1,this.typeaheadActive=!0,this.isSubmenu=!1,this.pointerPath=[],this.isRepositioning=!1,this.openCloseAnimationSignal=function(){let e=null;return{start:()=>(e?.abort(),e=new AbortController,e.signal),finish(){e=null}}}(),this.listController=new Va({isItem:e=>e.hasAttribute("md-menu-item"),getPossibleItems:()=>this.slotItems,isRtl:()=>"rtl"===getComputedStyle(this).direction,deactivateItem:e=>{e.selected=!1,e.tabIndex=-1},activateItem:e=>{e.selected=!0,e.tabIndex=0},isNavigableKey:e=>this.isSubmenu?e===("rtl"===getComputedStyle(this).direction?qa:za)||rs.has(e):ns.has(e),wrapNavigation:()=>!this.noNavigationWrap}),this.lastFocusedElement=null,this.typeaheadController=new ts((()=>({getItems:()=>this.items,typeaheadBufferTime:this.typeaheadDelay,active:this.typeaheadActive}))),this.currentAnchorElement=null,this.internals=this.attachInternals(),this.menuPositionController=new es(this,(()=>({anchorCorner:this.anchorCorner,surfaceCorner:this.menuCorner,surfaceEl:this.surfaceEl,anchorEl:this.anchorElement,positioning:"popover"===this.positioning?"document":this.positioning,isOpen:this.open,xOffset:this.xOffset,yOffset:this.yOffset,disableBlockFlip:this.noVerticalFlip,disableInlineFlip:this.noHorizontalFlip,onOpen:this.onOpened,beforeClose:this.beforeClose,onClose:this.onClosed,repositionStrategy:this.hasOverflow&&"popover"!==this.positioning?"move":"resize"}))),this.onWindowResize=()=>{this.isRepositioning||"document"!==this.positioning&&"fixed"!==this.positioning&&"popover"!==this.positioning||(this.isRepositioning=!0,this.reposition(),this.isRepositioning=!1)},this.handleFocusout=async e=>{const t=this.anchorElement;if(this.stayOpenOnFocusout||!this.open||this.pointerPath.includes(t))return;if(e.relatedTarget){if(Xa(e.relatedTarget,this)||0!==this.pointerPath.length&&Xa(e.relatedTarget,t))return}else if(this.pointerPath.includes(this))return;const r=this.skipRestoreFocus;this.skipRestoreFocus=!0,this.close(),await this.updateComplete,this.skipRestoreFocus=r},this.onOpened=async()=>{this.lastFocusedElement=function(e=document){let t=e.activeElement;for(;t&&t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}();const e=this.items,t=La(e);t&&this.defaultFocus!==Ka&&(t.item.tabIndex=-1);let r=!this.quick;switch(this.quick?this.dispatchEvent(new Event("opening")):r=!!await this.animateOpen(),this.defaultFocus){case Ya:const t=$a(e);t&&(t.tabIndex=0,t.focus(),await t.updateComplete);break;case Za:const r=Da(e);r&&(r.tabIndex=0,r.focus(),await r.updateComplete);break;case"list-root":this.focus()}r||this.dispatchEvent(new Event("opened"))},this.beforeClose=async()=>{this.open=!1,this.skipRestoreFocus||this.lastFocusedElement?.focus?.(),this.quick||await this.animateClose()},this.onClosed=()=>{this.quick&&(this.dispatchEvent(new Event("closing")),this.dispatchEvent(new Event("closed")))},this.onWindowPointerdown=e=>{this.pointerPath=e.composedPath()},this.onDocumentClick=e=>{if(!this.open)return;const t=e.composedPath();this.stayOpenOnOutsideClick||t.includes(this)||t.includes(this.anchorElement)||(this.open=!1)},this.internals.role="menu",this.addEventListener("keydown",this.handleKeydown),this.addEventListener("keydown",this.captureKeydown,{capture:!0}),this.addEventListener("focusout",this.handleFocusout)}get items(){return this.listController.items}willUpdate(e){e.has("open")&&(this.open?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"))}update(e){e.has("open")&&(this.open?this.setUpGlobalEventListeners():this.cleanUpGlobalEventListeners()),e.has("positioning")&&"popover"===this.positioning&&!this.showPopover&&(this.positioning="fixed"),super.update(e)}connectedCallback(){super.connectedCallback(),this.open&&this.setUpGlobalEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.cleanUpGlobalEventListeners()}getBoundingClientRect(){return this.surfaceEl?this.surfaceEl.getBoundingClientRect():super.getBoundingClientRect()}getClientRects(){return this.surfaceEl?this.surfaceEl.getClientRects():super.getClientRects()}render(){return this.renderSurface()}renderSurface(){return Ti`
177
178
  <div
178
- class="menu ${Qi(this.getSurfaceClasses())}"
179
- style=${mo(this.menuPositionController.surfaceStyles)}
180
- popover=${"popover"===this.positioning?"manual":ki}>
179
+ class="menu ${Ki(this.getSurfaceClasses())}"
180
+ style=${yo(this.menuPositionController.surfaceStyles)}
181
+ popover=${"popover"===this.positioning?"manual":Ci}>
181
182
  ${this.renderElevation()}
182
183
  <div class="items">
183
184
  <div class="item-padding"> ${this.renderMenuItems()} </div>
184
185
  </div>
185
186
  </div>
186
- `}renderMenuItems(){return Ei`<slot
187
+ `}renderMenuItems(){return Ti`<slot
187
188
  @close-menu=${this.onCloseMenu}
188
189
  @deactivate-items=${this.onDeactivateItems}
189
190
  @request-activation=${this.onRequestActivation}
@@ -191,21 +192,21 @@ var e={5568:e=>{const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?
191
192
  @activate-typeahead=${this.handleActivateTypeahead}
192
193
  @stay-open-on-focusout=${this.handleStayOpenOnFocusout}
193
194
  @close-on-focusout=${this.handleCloseOnFocusout}
194
- @slotchange=${this.listController.onSlotchange}></slot>`}renderElevation(){return Ei`<md-elevation part="elevation"></md-elevation>`}getSurfaceClasses(){return{open:this.open,fixed:"fixed"===this.positioning,"has-overflow":this.hasOverflow}}captureKeydown(e){e.target===this&&!e.defaultPrevented&&Ua(e.code)&&(e.preventDefault(),this.close()),this.typeaheadController.onKeydown(e)}async animateOpen(){const e=this.surfaceEl,t=this.slotEl;if(!e||!t)return!0;const r=this.openDirection;this.dispatchEvent(new Event("opening")),e.classList.toggle("animating",!0);const n=this.openCloseAnimationSignal.start(),i=e.offsetHeight,o="UP"===r,a=this.items,s=250/a.length,l=e.animate([{height:"0px"},{height:`${i}px`}],{duration:500,easing:Ki}),d=t.animate([{transform:o?`translateY(-${i}px)`:""},{transform:""}],{duration:500,easing:Ki}),c=e.animate([{opacity:0},{opacity:1}],50),u=[];for(let e=0;e<a.length;e++){const t=a[o?a.length-1-e:e],r=t.animate([{opacity:0},{opacity:1}],{duration:250,delay:s*e});t.classList.toggle("md-menu-hidden",!0),r.addEventListener("finish",(()=>{t.classList.toggle("md-menu-hidden",!1)})),u.push([t,r])}let h=e=>{};const p=new Promise((e=>{h=e}));return n.addEventListener("abort",(()=>{l.cancel(),d.cancel(),c.cancel(),u.forEach((([e,t])=>{e.classList.toggle("md-menu-hidden",!1),t.cancel()})),h(!0)})),l.addEventListener("finish",(()=>{e.classList.toggle("animating",!1),this.openCloseAnimationSignal.finish(),h(!1)})),await p}animateClose(){let e;const t=new Promise((t=>{e=t})),r=this.surfaceEl,n=this.slotEl;if(!r||!n)return e(!1),t;const i="UP"===this.openDirection;this.dispatchEvent(new Event("closing")),r.classList.toggle("animating",!0);const o=this.openCloseAnimationSignal.start(),a=r.offsetHeight,s=this.items,l=50/s.length,d=r.animate([{height:`${a}px`},{height:.35*a+"px"}],{duration:150,easing:Yi}),c=n.animate([{transform:""},{transform:i?`translateY(-${.65*a}px)`:""}],{duration:150,easing:Yi}),u=r.animate([{opacity:1},{opacity:0}],{duration:50,delay:100}),h=[];for(let e=0;e<s.length;e++){const t=s[i?e:s.length-1-e],r=t.animate([{opacity:1},{opacity:0}],{duration:50,delay:50+l*e});r.addEventListener("finish",(()=>{t.classList.toggle("md-menu-hidden",!0)})),h.push([t,r])}return o.addEventListener("abort",(()=>{d.cancel(),c.cancel(),u.cancel(),h.forEach((([e,t])=>{t.cancel(),e.classList.toggle("md-menu-hidden",!1)})),e(!1)})),d.addEventListener("finish",(()=>{r.classList.toggle("animating",!1),h.forEach((([e])=>{e.classList.toggle("md-menu-hidden",!1)})),this.openCloseAnimationSignal.finish(),this.dispatchEvent(new Event("closed")),e(!0)})),t}handleKeydown(e){this.pointerPath=[],this.listController.handleKeydown(e)}setUpGlobalEventListeners(){document.addEventListener("click",this.onDocumentClick,{capture:!0}),window.addEventListener("pointerdown",this.onWindowPointerdown),document.addEventListener("resize",this.onWindowResize,{passive:!0}),window.addEventListener("resize",this.onWindowResize,{passive:!0})}cleanUpGlobalEventListeners(){document.removeEventListener("click",this.onDocumentClick,{capture:!0}),window.removeEventListener("pointerdown",this.onWindowPointerdown),document.removeEventListener("resize",this.onWindowResize),window.removeEventListener("resize",this.onWindowResize)}onCloseMenu(){this.close()}onDeactivateItems(e){e.stopPropagation(),this.listController.onDeactivateItems()}onRequestActivation(e){e.stopPropagation(),this.listController.onRequestActivation(e)}handleDeactivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!1}handleActivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!0}handleStayOpenOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!0}handleCloseOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!1}close(){this.open=!1,this.slotItems.forEach((e=>{e.close?.()}))}show(){this.open=!0}activateNextItem(){return this.listController.activateNextItem()??null}activatePreviousItem(){return this.listController.activatePreviousItem()??null}reposition(){this.open&&this.menuPositionController.position()}}In([ei(".menu")],Ka.prototype,"surfaceEl",void 0),In([ei("slot")],Ka.prototype,"slotEl",void 0),In([Kn()],Ka.prototype,"anchor",void 0),In([Kn()],Ka.prototype,"positioning",void 0),In([Kn({type:Boolean})],Ka.prototype,"quick",void 0),In([Kn({type:Boolean,attribute:"has-overflow"})],Ka.prototype,"hasOverflow",void 0),In([Kn({type:Boolean,reflect:!0})],Ka.prototype,"open",void 0),In([Kn({type:Number,attribute:"x-offset"})],Ka.prototype,"xOffset",void 0),In([Kn({type:Number,attribute:"y-offset"})],Ka.prototype,"yOffset",void 0),In([Kn({type:Number,attribute:"typeahead-delay"})],Ka.prototype,"typeaheadDelay",void 0),In([Kn({attribute:"anchor-corner"})],Ka.prototype,"anchorCorner",void 0),In([Kn({attribute:"menu-corner"})],Ka.prototype,"menuCorner",void 0),In([Kn({type:Boolean,attribute:"stay-open-on-outside-click"})],Ka.prototype,"stayOpenOnOutsideClick",void 0),In([Kn({type:Boolean,attribute:"stay-open-on-focusout"})],Ka.prototype,"stayOpenOnFocusout",void 0),In([Kn({type:Boolean,attribute:"skip-restore-focus"})],Ka.prototype,"skipRestoreFocus",void 0),In([Kn({attribute:"default-focus"})],Ka.prototype,"defaultFocus",void 0),In([Kn({type:Boolean,attribute:"no-navigation-wrap"})],Ka.prototype,"noNavigationWrap",void 0),In([ri({flatten:!0})],Ka.prototype,"slotItems",void 0),In([Yn()],Ka.prototype,"typeaheadActive",void 0);const Ya=Cn`:host{--md-elevation-level: var(--md-menu-container-elevation, 2);--md-elevation-shadow-color: var(--md-menu-container-shadow-color, var(--md-sys-color-shadow, #000));min-width:112px;color:unset;display:contents}md-focus-ring{--md-focus-ring-shape: var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 4px))}.menu{border-radius:var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 4px));display:none;inset:auto;border:none;padding:0px;overflow:visible;background-color:rgba(0,0,0,0);color:inherit;opacity:0;z-index:20;position:absolute;user-select:none;max-height:inherit;height:inherit;min-width:inherit;max-width:inherit;scrollbar-width:inherit}.menu::backdrop{display:none}.fixed{position:fixed}.items{display:block;list-style-type:none;margin:0;outline:none;box-sizing:border-box;background-color:var(--md-menu-container-color, var(--md-sys-color-surface-container, #f3edf7));height:inherit;max-height:inherit;overflow:auto;min-width:inherit;max-width:inherit;border-radius:inherit;scrollbar-width:inherit}.item-padding{padding-block:8px}.has-overflow:not([popover]) .items{overflow:visible}.has-overflow.animating .items,.animating .items{overflow:hidden}.has-overflow.animating .items{pointer-events:none}.animating ::slotted(.md-menu-hidden){opacity:0}slot{display:block;height:inherit;max-height:inherit}::slotted(:is(md-divider,[role=separator])){margin:8px 0}@media(forced-colors: active){.menu{border-style:solid;border-color:CanvasText;border-width:1px}}
195
- `;let Za=class extends Ka{};Za.styles=[Ya],Za=In([Tn("md-menu")],Za);class es extends qo{computeValidity(e){return this.selectControl||(this.selectControl=document.createElement("select")),Hi(Ei`<option value=${e.value}></option>`,this.selectControl),this.selectControl.value=e.value,this.selectControl.required=e.required,{validity:this.selectControl.validity,validationMessage:this.selectControl.validationMessage}}equals(e,t){return e.value===t.value&&e.required===t.required}copy({value:e,required:t}){return{value:e,required:t}}}var ts;const rs=Symbol("value"),ns=Bo(Ao(Oo(Eo(Vi))));class is extends ns{get value(){return this[rs]}set value(e){this.lastUserSetValue=e,this.select(e)}get options(){return this.menu?.items??[]}get selectedIndex(){const[e,t]=(this.getSelectedOptions()??[])[0]??[];return t??-1}set selectedIndex(e){this.lastUserSetSelectedIndex=e,this.selectIndex(e)}get selectedOptions(){return(this.getSelectedOptions()??[]).map((([e])=>e))}get hasError(){return this.error||this.nativeError}constructor(){super(),this.quick=!1,this.required=!1,this.errorText="",this.label="",this.noAsterisk=!1,this.supportingText="",this.error=!1,this.menuPositioning="popover",this.clampMenuWidth=!1,this.typeaheadDelay=200,this.hasLeadingIcon=!1,this.displayText="",this.menuAlign="start",this[ts]="",this.lastUserSetValue=null,this.lastUserSetSelectedIndex=null,this.lastSelectedOption=null,this.lastSelectedOptionRecords=[],this.nativeError=!1,this.nativeErrorText="",this.focused=!1,this.open=!1,this.defaultFocus=Ha,this.prevOpen=this.open,this.selectWidth=0,this.addEventListener("focus",this.handleFocus.bind(this)),this.addEventListener("blur",this.handleBlur.bind(this))}select(e){const t=this.options.find((t=>t.value===e));t&&this.selectItem(t)}selectIndex(e){const t=this.options[e];t&&this.selectItem(t)}reset(){for(const e of this.options)e.selected=e.hasAttribute("selected");this.updateValueAndDisplayText(),this.nativeError=!1,this.nativeErrorText=""}[(ts=rs,Lo)](e){e?.preventDefault();const t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&this.field?.reannounceError()}update(e){if(this.hasUpdated||this.initUserSelection(),this.prevOpen!==this.open&&this.open){const e=this.getBoundingClientRect();this.selectWidth=e.width}this.prevOpen=this.open,super.update(e)}render(){return Ei`
195
+ @slotchange=${this.listController.onSlotchange}></slot>`}renderElevation(){return Ti`<md-elevation part="elevation"></md-elevation>`}getSurfaceClasses(){return{open:this.open,fixed:"fixed"===this.positioning,"has-overflow":this.hasOverflow}}captureKeydown(e){e.target===this&&!e.defaultPrevented&&Qa(e.code)&&(e.preventDefault(),this.close()),this.typeaheadController.onKeydown(e)}async animateOpen(){const e=this.surfaceEl,t=this.slotEl;if(!e||!t)return!0;const r=this.openDirection;this.dispatchEvent(new Event("opening")),e.classList.toggle("animating",!0);const n=this.openCloseAnimationSignal.start(),i=e.offsetHeight,o="UP"===r,a=this.items,s=250/a.length,l=e.animate([{height:"0px"},{height:`${i}px`}],{duration:500,easing:Zi}),d=t.animate([{transform:o?`translateY(-${i}px)`:""},{transform:""}],{duration:500,easing:Zi}),c=e.animate([{opacity:0},{opacity:1}],50),u=[];for(let e=0;e<a.length;e++){const t=a[o?a.length-1-e:e],r=t.animate([{opacity:0},{opacity:1}],{duration:250,delay:s*e});t.classList.toggle("md-menu-hidden",!0),r.addEventListener("finish",(()=>{t.classList.toggle("md-menu-hidden",!1)})),u.push([t,r])}let h=e=>{};const p=new Promise((e=>{h=e}));return n.addEventListener("abort",(()=>{l.cancel(),d.cancel(),c.cancel(),u.forEach((([e,t])=>{e.classList.toggle("md-menu-hidden",!1),t.cancel()})),h(!0)})),l.addEventListener("finish",(()=>{e.classList.toggle("animating",!1),this.openCloseAnimationSignal.finish(),h(!1)})),await p}animateClose(){let e;const t=new Promise((t=>{e=t})),r=this.surfaceEl,n=this.slotEl;if(!r||!n)return e(!1),t;const i="UP"===this.openDirection;this.dispatchEvent(new Event("closing")),r.classList.toggle("animating",!0);const o=this.openCloseAnimationSignal.start(),a=r.offsetHeight,s=this.items,l=50/s.length,d=r.animate([{height:`${a}px`},{height:.35*a+"px"}],{duration:150,easing:eo}),c=n.animate([{transform:""},{transform:i?`translateY(-${.65*a}px)`:""}],{duration:150,easing:eo}),u=r.animate([{opacity:1},{opacity:0}],{duration:50,delay:100}),h=[];for(let e=0;e<s.length;e++){const t=s[i?e:s.length-1-e],r=t.animate([{opacity:1},{opacity:0}],{duration:50,delay:50+l*e});r.addEventListener("finish",(()=>{t.classList.toggle("md-menu-hidden",!0)})),h.push([t,r])}return o.addEventListener("abort",(()=>{d.cancel(),c.cancel(),u.cancel(),h.forEach((([e,t])=>{t.cancel(),e.classList.toggle("md-menu-hidden",!1)})),e(!1)})),d.addEventListener("finish",(()=>{r.classList.toggle("animating",!1),h.forEach((([e])=>{e.classList.toggle("md-menu-hidden",!1)})),this.openCloseAnimationSignal.finish(),this.dispatchEvent(new Event("closed")),e(!0)})),t}handleKeydown(e){this.pointerPath=[],this.listController.handleKeydown(e)}setUpGlobalEventListeners(){document.addEventListener("click",this.onDocumentClick,{capture:!0}),window.addEventListener("pointerdown",this.onWindowPointerdown),document.addEventListener("resize",this.onWindowResize,{passive:!0}),window.addEventListener("resize",this.onWindowResize,{passive:!0})}cleanUpGlobalEventListeners(){document.removeEventListener("click",this.onDocumentClick,{capture:!0}),window.removeEventListener("pointerdown",this.onWindowPointerdown),document.removeEventListener("resize",this.onWindowResize),window.removeEventListener("resize",this.onWindowResize)}onCloseMenu(){this.close()}onDeactivateItems(e){e.stopPropagation(),this.listController.onDeactivateItems()}onRequestActivation(e){e.stopPropagation(),this.listController.onRequestActivation(e)}handleDeactivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!1}handleActivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!0}handleStayOpenOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!0}handleCloseOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!1}close(){this.open=!1,this.slotItems.forEach((e=>{e.close?.()}))}show(){this.open=!0}activateNextItem(){return this.listController.activateNextItem()??null}activatePreviousItem(){return this.listController.activatePreviousItem()??null}reposition(){this.open&&this.menuPositionController.position()}}kn([ri(".menu")],is.prototype,"surfaceEl",void 0),kn([ri("slot")],is.prototype,"slotEl",void 0),kn([Zn()],is.prototype,"anchor",void 0),kn([Zn()],is.prototype,"positioning",void 0),kn([Zn({type:Boolean})],is.prototype,"quick",void 0),kn([Zn({type:Boolean,attribute:"has-overflow"})],is.prototype,"hasOverflow",void 0),kn([Zn({type:Boolean,reflect:!0})],is.prototype,"open",void 0),kn([Zn({type:Number,attribute:"x-offset"})],is.prototype,"xOffset",void 0),kn([Zn({type:Number,attribute:"y-offset"})],is.prototype,"yOffset",void 0),kn([Zn({type:Boolean,attribute:"no-horizontal-flip"})],is.prototype,"noHorizontalFlip",void 0),kn([Zn({type:Boolean,attribute:"no-vertical-flip"})],is.prototype,"noVerticalFlip",void 0),kn([Zn({type:Number,attribute:"typeahead-delay"})],is.prototype,"typeaheadDelay",void 0),kn([Zn({attribute:"anchor-corner"})],is.prototype,"anchorCorner",void 0),kn([Zn({attribute:"menu-corner"})],is.prototype,"menuCorner",void 0),kn([Zn({type:Boolean,attribute:"stay-open-on-outside-click"})],is.prototype,"stayOpenOnOutsideClick",void 0),kn([Zn({type:Boolean,attribute:"stay-open-on-focusout"})],is.prototype,"stayOpenOnFocusout",void 0),kn([Zn({type:Boolean,attribute:"skip-restore-focus"})],is.prototype,"skipRestoreFocus",void 0),kn([Zn({attribute:"default-focus"})],is.prototype,"defaultFocus",void 0),kn([Zn({type:Boolean,attribute:"no-navigation-wrap"})],is.prototype,"noNavigationWrap",void 0),kn([ii({flatten:!0})],is.prototype,"slotItems",void 0),kn([ei()],is.prototype,"typeaheadActive",void 0);const os=Ln`:host{--md-elevation-level: var(--md-menu-container-elevation, 2);--md-elevation-shadow-color: var(--md-menu-container-shadow-color, var(--md-sys-color-shadow, #000));min-width:112px;color:unset;display:contents}md-focus-ring{--md-focus-ring-shape: var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 4px))}.menu{border-radius:var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 4px));display:none;inset:auto;border:none;padding:0px;overflow:visible;background-color:rgba(0,0,0,0);color:inherit;opacity:0;z-index:20;position:absolute;user-select:none;max-height:inherit;height:inherit;min-width:inherit;max-width:inherit;scrollbar-width:inherit}.menu::backdrop{display:none}.fixed{position:fixed}.items{display:block;list-style-type:none;margin:0;outline:none;box-sizing:border-box;background-color:var(--md-menu-container-color, var(--md-sys-color-surface-container, #f3edf7));height:inherit;max-height:inherit;overflow:auto;min-width:inherit;max-width:inherit;border-radius:inherit;scrollbar-width:inherit}.item-padding{padding-block:8px}.has-overflow:not([popover]) .items{overflow:visible}.has-overflow.animating .items,.animating .items{overflow:hidden}.has-overflow.animating .items{pointer-events:none}.animating ::slotted(.md-menu-hidden){opacity:0}slot{display:block;height:inherit;max-height:inherit}::slotted(:is(md-divider,[role=separator])){margin:8px 0}@media(forced-colors: active){.menu{border-style:solid;border-color:CanvasText;border-width:1px}}
196
+ `;let as=class extends is{};as.styles=[os],as=kn([jn("md-menu")],as);class ss extends Jo{computeValidity(e){return this.selectControl||(this.selectControl=document.createElement("select")),Gi(Ti`<option value=${e.value}></option>`,this.selectControl),this.selectControl.value=e.value,this.selectControl.required=e.required,{validity:this.selectControl.validity,validationMessage:this.selectControl.validationMessage}}equals(e,t){return e.value===t.value&&e.required===t.required}copy({value:e,required:t}){return{value:e,required:t}}}var ls;const ds=Symbol("value"),cs=Io(Go(Po(Fo(No(Wi)))));class us extends cs{get value(){return this[ds]}set value(e){this.lastUserSetValue=e,this.select(e)}get options(){return this.menu?.items??[]}get selectedIndex(){const[e,t]=(this.getSelectedOptions()??[])[0]??[];return t??-1}set selectedIndex(e){this.lastUserSetSelectedIndex=e,this.selectIndex(e)}get selectedOptions(){return(this.getSelectedOptions()??[]).map((([e])=>e))}get hasError(){return this.error||this.nativeError}constructor(){super(),this.quick=!1,this.required=!1,this.errorText="",this.label="",this.noAsterisk=!1,this.supportingText="",this.error=!1,this.menuPositioning="popover",this.clampMenuWidth=!1,this.typeaheadDelay=200,this.hasLeadingIcon=!1,this.displayText="",this.menuAlign="start",this[ls]="",this.lastUserSetValue=null,this.lastUserSetSelectedIndex=null,this.lastSelectedOption=null,this.lastSelectedOptionRecords=[],this.nativeError=!1,this.nativeErrorText="",this.focused=!1,this.open=!1,this.defaultFocus=Ka,this.prevOpen=this.open,this.selectWidth=0,this.addEventListener("focus",this.handleFocus.bind(this)),this.addEventListener("blur",this.handleBlur.bind(this))}select(e){const t=this.options.find((t=>t.value===e));t&&this.selectItem(t)}selectIndex(e){const t=this.options[e];t&&this.selectItem(t)}reset(){for(const e of this.options)e.selected=e.hasAttribute("selected");this.updateValueAndDisplayText(),this.nativeError=!1,this.nativeErrorText=""}[(ls=ds,qo)](e){e?.preventDefault();const t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&this.field?.reannounceError()}update(e){if(this.hasUpdated||this.initUserSelection(),this.prevOpen!==this.open&&this.open){const e=this.getBoundingClientRect();this.selectWidth=e.width}this.prevOpen=this.open,super.update(e)}render(){return Ti`
196
197
  <span
197
- class="select ${Qi(this.getRenderClasses())}"
198
+ class="select ${Ki(this.getRenderClasses())}"
198
199
  @focusout=${this.handleFocusout}>
199
200
  ${this.renderField()} ${this.renderMenu()}
200
201
  </span>
201
- `}async firstUpdated(e){await(this.menu?.updateComplete),this.lastSelectedOptionRecords.length||this.initUserSelection(),this.lastSelectedOptionRecords.length||this.options.length||setTimeout((()=>{this.updateValueAndDisplayText()})),super.firstUpdated(e)}getRenderClasses(){return{disabled:this.disabled,error:this.error,open:this.open}}renderField(){return co`
202
+ `}async firstUpdated(e){await(this.menu?.updateComplete),this.lastSelectedOptionRecords.length||this.initUserSelection(),this.lastSelectedOptionRecords.length||this.options.length||setTimeout((()=>{this.updateValueAndDisplayText()})),super.firstUpdated(e)}getRenderClasses(){return{disabled:this.disabled,error:this.error,open:this.open}}renderField(){return ho`
202
203
  <${this.fieldTag}
203
204
  aria-haspopup="listbox"
204
205
  role="combobox"
205
206
  part="field"
206
207
  id="field"
207
208
  tabindex=${this.disabled?"-1":"0"}
208
- aria-label=${this.ariaLabel||ki}
209
+ aria-label=${this.ariaLabel||Ci}
209
210
  aria-describedby="description"
210
211
  aria-expanded=${this.open?"true":"false"}
211
212
  aria-controls="listbox"
@@ -225,11 +226,11 @@ var e={5568:e=>{const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?
225
226
  @click=${this.handleClick}>
226
227
  ${this.renderFieldContent()}
227
228
  <div id="description" slot="aria-describedby"></div>
228
- </${this.fieldTag}>`}renderFieldContent(){return[this.renderLeadingIcon(),this.renderLabel(),this.renderTrailingIcon()]}renderLeadingIcon(){return Ei`
229
+ </${this.fieldTag}>`}renderFieldContent(){return[this.renderLeadingIcon(),this.renderLabel(),this.renderTrailingIcon()]}renderLeadingIcon(){return Ti`
229
230
  <span class="icon leading" slot="start">
230
231
  <slot name="leading-icon" @slotchange=${this.handleIconChange}></slot>
231
232
  </span>
232
- `}renderTrailingIcon(){return Ei`
233
+ `}renderTrailingIcon(){return Ti`
233
234
  <span class="icon trailing" slot="end">
234
235
  <slot name="trailing-icon" @slotchange=${this.handleIconChange}>
235
236
  <svg height="5" viewBox="7 10 10 5" focusable="false">
@@ -246,18 +247,18 @@ var e={5568:e=>{const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?
246
247
  </svg>
247
248
  </slot>
248
249
  </span>
249
- `}renderLabel(){return Ei`<div id="label">${this.displayText||Ei`&nbsp;`}</div>`}renderMenu(){const e=this.label||this.ariaLabel;return Ei`<div class="menu-wrapper">
250
+ `}renderLabel(){return Ti`<div id="label">${this.displayText||Ti`&nbsp;`}</div>`}renderMenu(){const e=this.label||this.ariaLabel;return Ti`<div class="menu-wrapper">
250
251
  <md-menu
251
252
  id="listbox"
252
253
  .defaultFocus=${this.defaultFocus}
253
254
  role="listbox"
254
255
  tabindex="-1"
255
- aria-label=${e||ki}
256
+ aria-label=${e||Ci}
256
257
  stay-open-on-focusout
257
258
  part="menu"
258
259
  exportparts="focus-ring: menu-focus-ring"
259
260
  anchor="field"
260
- style=${mo({"--__menu-min-width":`${this.selectWidth}px`,"--__menu-max-width":this.clampMenuWidth?`${this.selectWidth}px`:void 0})}
261
+ style=${yo({"--__menu-min-width":`${this.selectWidth}px`,"--__menu-max-width":this.clampMenuWidth?`${this.selectWidth}px`:void 0})}
261
262
  no-navigation-wrap
262
263
  .open=${this.open}
263
264
  .quick=${this.quick}
@@ -274,10 +275,10 @@ var e={5568:e=>{const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?
274
275
  @request-deselection=${this.handleRequestDeselection}>
275
276
  ${this.renderMenuContent()}
276
277
  </md-menu>
277
- </div>`}renderMenuContent(){return Ei`<slot></slot>`}handleKeydown(e){if(this.open||this.disabled||!this.menu)return;const t=this.menu.typeaheadController,r="Space"===e.code||"ArrowDown"===e.code||"ArrowUp"===e.code||"End"===e.code||"Home"===e.code||"Enter"===e.code;if(t.isTypingAhead||!r){if(1===e.key.length){t.onKeydown(e),e.preventDefault();const{lastActiveRecord:r}=t;if(!r)return;this.labelEl?.setAttribute?.("aria-live","polite"),this.selectItem(r[1])&&this.dispatchInteractionEvents()}}else switch(e.preventDefault(),this.open=!0,e.code){case"Space":case"ArrowDown":case"Enter":this.defaultFocus=Ha;break;case"End":this.defaultFocus=Ga;break;case"ArrowUp":case"Home":this.defaultFocus=Va}}handleClick(){this.open=!this.open}handleFocus(){this.focused=!0}handleBlur(){this.focused=!1}handleFocusout(e){e.relatedTarget&&za(e.relatedTarget,this)||(this.open=!1)}getSelectedOptions(){if(!this.menu)return this.lastSelectedOptionRecords=[],null;const e=this.menu.items;return this.lastSelectedOptionRecords=function(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];n.selected&&t.push([n,r])}return t}(e),this.lastSelectedOptionRecords}async getUpdateComplete(){return await(this.menu?.updateComplete),super.getUpdateComplete()}updateValueAndDisplayText(){const e=this.getSelectedOptions()??[];let t=!1;if(e.length){const[r]=e[0];t=this.lastSelectedOption!==r,this.lastSelectedOption=r,this[rs]=r.value,this.displayText=r.displayText}else t=null!==this.lastSelectedOption,this.lastSelectedOption=null,this[rs]="",this.displayText="";return t}async handleOpening(e){if(this.labelEl?.removeAttribute?.("aria-live"),this.redispatchEvent(e),this.defaultFocus!==Ha)return;const t=this.menu.items,r=ja(t)?.item;let[n]=this.lastSelectedOptionRecords[0]??[null];r&&r!==n&&(r.tabIndex=-1),n=n??t[0],n&&(n.tabIndex=0,n.focus())}redispatchEvent(e){wo(this,e)}handleClosed(e){this.open=!1,this.redispatchEvent(e)}handleCloseMenu(e){const t=e.detail.reason,r=e.detail.itemPath[0];this.open=!1;let n=!1;var i;"click-selection"===t.kind||"keydown"===t.kind&&(i=t.key,Object.values(Fa).some((e=>e===i)))?n=this.selectItem(r):(r.tabIndex=-1,r.blur()),n&&this.dispatchInteractionEvents()}selectItem(e){return(this.getSelectedOptions()??[]).forEach((([t])=>{e!==t&&(t.selected=!1)})),e.selected=!0,this.updateValueAndDisplayText()}handleRequestSelection(e){const t=e.target;this.lastSelectedOptionRecords.some((([e])=>e===t))||this.selectItem(t)}handleRequestDeselection(e){const t=e.target;this.lastSelectedOptionRecords.some((([e])=>e===t))&&this.updateValueAndDisplayText()}initUserSelection(){this.lastUserSetValue&&!this.lastSelectedOptionRecords.length?this.select(this.lastUserSetValue):null===this.lastUserSetSelectedIndex||this.lastSelectedOptionRecords.length?this.updateValueAndDisplayText():this.selectIndex(this.lastUserSetSelectedIndex)}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0}dispatchInteractionEvents(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0}))}getErrorText(){return this.error?this.errorText:this.nativeErrorText}[Ro](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}click(){this.field?.click()}[Io](){return new es((()=>this))}[To](){return this.field}}xo(is),is.shadowRootOptions={...Vi.shadowRootOptions,delegatesFocus:!0},In([Kn({type:Boolean})],is.prototype,"quick",void 0),In([Kn({type:Boolean})],is.prototype,"required",void 0),In([Kn({type:String,attribute:"error-text"})],is.prototype,"errorText",void 0),In([Kn()],is.prototype,"label",void 0),In([Kn({type:Boolean,attribute:"no-asterisk"})],is.prototype,"noAsterisk",void 0),In([Kn({type:String,attribute:"supporting-text"})],is.prototype,"supportingText",void 0),In([Kn({type:Boolean,reflect:!0})],is.prototype,"error",void 0),In([Kn({attribute:"menu-positioning"})],is.prototype,"menuPositioning",void 0),In([Kn({type:Boolean,attribute:"clamp-menu-width"})],is.prototype,"clampMenuWidth",void 0),In([Kn({type:Number,attribute:"typeahead-delay"})],is.prototype,"typeaheadDelay",void 0),In([Kn({type:Boolean,attribute:"has-leading-icon"})],is.prototype,"hasLeadingIcon",void 0),In([Kn({attribute:"display-text"})],is.prototype,"displayText",void 0),In([Kn({attribute:"menu-align"})],is.prototype,"menuAlign",void 0),In([Kn()],is.prototype,"value",null),In([Kn({type:Number,attribute:"selected-index"})],is.prototype,"selectedIndex",null),In([Yn()],is.prototype,"nativeError",void 0),In([Yn()],is.prototype,"nativeErrorText",void 0),In([Yn()],is.prototype,"focused",void 0),In([Yn()],is.prototype,"open",void 0),In([Yn()],is.prototype,"defaultFocus",void 0),In([ei(".field")],is.prototype,"field",void 0),In([ei("md-menu")],is.prototype,"menu",void 0),In([ei("#label")],is.prototype,"labelEl",void 0),In([ri({slot:"leading-icon",flatten:!0})],is.prototype,"leadingIcons",void 0);class os extends is{constructor(){super(...arguments),this.fieldTag=ao`md-outlined-field`}}const as=Cn`:host{--_text-field-disabled-input-text-color: var(--md-outlined-select-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-input-text-opacity: var(--md-outlined-select-text-field-disabled-input-text-opacity, 0.38);--_text-field-disabled-label-text-color: var(--md-outlined-select-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-label-text-opacity: var(--md-outlined-select-text-field-disabled-label-text-opacity, 0.38);--_text-field-disabled-leading-icon-color: var(--md-outlined-select-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-leading-icon-opacity: var(--md-outlined-select-text-field-disabled-leading-icon-opacity, 0.38);--_text-field-disabled-outline-color: var(--md-outlined-select-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-outline-opacity: var(--md-outlined-select-text-field-disabled-outline-opacity, 0.12);--_text-field-disabled-outline-width: var(--md-outlined-select-text-field-disabled-outline-width, 1px);--_text-field-disabled-supporting-text-color: var(--md-outlined-select-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-supporting-text-opacity: var(--md-outlined-select-text-field-disabled-supporting-text-opacity, 0.38);--_text-field-disabled-trailing-icon-color: var(--md-outlined-select-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-trailing-icon-opacity: var(--md-outlined-select-text-field-disabled-trailing-icon-opacity, 0.38);--_text-field-error-focus-input-text-color: var(--md-outlined-select-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-focus-label-text-color: var(--md-outlined-select-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-leading-icon-color: var(--md-outlined-select-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-focus-outline-color: var(--md-outlined-select-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-supporting-text-color: var(--md-outlined-select-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-trailing-icon-color: var(--md-outlined-select-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-input-text-color: var(--md-outlined-select-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-label-text-color: var(--md-outlined-select-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-leading-icon-color: var(--md-outlined-select-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-hover-outline-color: var(--md-outlined-select-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-supporting-text-color: var(--md-outlined-select-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-trailing-icon-color: var(--md-outlined-select-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-input-text-color: var(--md-outlined-select-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-label-text-color: var(--md-outlined-select-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-leading-icon-color: var(--md-outlined-select-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-outline-color: var(--md-outlined-select-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-supporting-text-color: var(--md-outlined-select-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-trailing-icon-color: var(--md-outlined-select-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-focus-input-text-color: var(--md-outlined-select-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-focus-label-text-color: var(--md-outlined-select-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-leading-icon-color: var(--md-outlined-select-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-outline-color: var(--md-outlined-select-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-outline-width: var(--md-outlined-select-text-field-focus-outline-width, 3px);--_text-field-focus-supporting-text-color: var(--md-outlined-select-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-trailing-icon-color: var(--md-outlined-select-text-field-focus-trailing-icon-color, var(--md-sys-color-primary, #6750a4));--_text-field-hover-input-text-color: var(--md-outlined-select-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-label-text-color: var(--md-outlined-select-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-leading-icon-color: var(--md-outlined-select-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-outline-color: var(--md-outlined-select-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-outline-width: var(--md-outlined-select-text-field-hover-outline-width, 1px);--_text-field-hover-supporting-text-color: var(--md-outlined-select-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-trailing-icon-color: var(--md-outlined-select-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-input-text-color: var(--md-outlined-select-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-input-text-font: var(--md-outlined-select-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-input-text-line-height: var(--md-outlined-select-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-input-text-size: var(--md-outlined-select-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-input-text-weight: var(--md-outlined-select-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-label-text-color: var(--md-outlined-select-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-label-text-font: var(--md-outlined-select-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-label-text-line-height: var(--md-outlined-select-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-label-text-populated-line-height: var(--md-outlined-select-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-label-text-populated-size: var(--md-outlined-select-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-label-text-size: var(--md-outlined-select-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-label-text-weight: var(--md-outlined-select-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-leading-icon-color: var(--md-outlined-select-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-leading-icon-size: var(--md-outlined-select-text-field-leading-icon-size, 24px);--_text-field-outline-color: var(--md-outlined-select-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_text-field-outline-width: var(--md-outlined-select-text-field-outline-width, 1px);--_text-field-supporting-text-color: var(--md-outlined-select-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-supporting-text-font: var(--md-outlined-select-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-supporting-text-line-height: var(--md-outlined-select-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-supporting-text-size: var(--md-outlined-select-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-supporting-text-weight: var(--md-outlined-select-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-trailing-icon-color: var(--md-outlined-select-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-trailing-icon-size: var(--md-outlined-select-text-field-trailing-icon-size, 24px);--_text-field-container-shape-start-start: var(--md-outlined-select-text-field-container-shape-start-start, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-start-end: var(--md-outlined-select-text-field-container-shape-start-end, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-end: var(--md-outlined-select-text-field-container-shape-end-end, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-start: var(--md-outlined-select-text-field-container-shape-end-start, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--md-outlined-field-container-shape-end-end: var(--_text-field-container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_text-field-container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_text-field-container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_text-field-container-shape-start-start);--md-outlined-field-content-color: var(--_text-field-input-text-color);--md-outlined-field-content-font: var(--_text-field-input-text-font);--md-outlined-field-content-line-height: var(--_text-field-input-text-line-height);--md-outlined-field-content-size: var(--_text-field-input-text-size);--md-outlined-field-content-weight: var(--_text-field-input-text-weight);--md-outlined-field-disabled-content-color: var(--_text-field-disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_text-field-disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_text-field-disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_text-field-disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_text-field-disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_text-field-disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_text-field-disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_text-field-disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_text-field-disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_text-field-disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_text-field-disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_text-field-disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_text-field-disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_text-field-error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_text-field-error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_text-field-error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_text-field-error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_text-field-error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_text-field-error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_text-field-error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_text-field-error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_text-field-error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_text-field-error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_text-field-error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_text-field-error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_text-field-error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_text-field-error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_text-field-error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_text-field-error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_text-field-error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_text-field-error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_text-field-focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_text-field-focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_text-field-focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_text-field-focus-outline-color);--md-outlined-field-focus-outline-width: var(--_text-field-focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_text-field-focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_text-field-focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_text-field-hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_text-field-hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_text-field-hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_text-field-hover-outline-color);--md-outlined-field-hover-outline-width: var(--_text-field-hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_text-field-hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_text-field-hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_text-field-label-text-color);--md-outlined-field-label-text-font: var(--_text-field-label-text-font);--md-outlined-field-label-text-line-height: var(--_text-field-label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_text-field-label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_text-field-label-text-populated-size);--md-outlined-field-label-text-size: var(--_text-field-label-text-size);--md-outlined-field-label-text-weight: var(--_text-field-label-text-weight);--md-outlined-field-leading-content-color: var(--_text-field-leading-icon-color);--md-outlined-field-outline-color: var(--_text-field-outline-color);--md-outlined-field-outline-width: var(--_text-field-outline-width);--md-outlined-field-supporting-text-color: var(--_text-field-supporting-text-color);--md-outlined-field-supporting-text-font: var(--_text-field-supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_text-field-supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_text-field-supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_text-field-supporting-text-weight);--md-outlined-field-trailing-content-color: var(--_text-field-trailing-icon-color)}[has-start] .icon.leading{font-size:var(--_text-field-leading-icon-size);height:var(--_text-field-leading-icon-size);width:var(--_text-field-leading-icon-size)}.icon.trailing{font-size:var(--_text-field-trailing-icon-size);height:var(--_text-field-trailing-icon-size);width:var(--_text-field-trailing-icon-size)}
278
- `,ss=Cn`:host{color:unset;min-width:210px;display:flex}.field{cursor:default;outline:none}.select{position:relative;flex-direction:column}.icon.trailing svg,.icon ::slotted(*){fill:currentColor}.icon ::slotted(*){width:inherit;height:inherit;font-size:inherit}.icon slot{display:flex;height:100%;width:100%;align-items:center;justify-content:center}.icon.trailing :is(.up,.down){opacity:0;transition:opacity 75ms linear 75ms}.select:not(.open) .down,.select.open .up{opacity:1}.field,.select,md-menu{min-width:inherit;width:inherit;max-width:inherit;display:flex}md-menu{min-width:var(--__menu-min-width);max-width:var(--__menu-max-width, inherit)}.menu-wrapper{width:0px;height:0px;max-width:inherit}md-menu ::slotted(:not[disabled]){cursor:pointer}.field,.select{width:100%}:host{display:inline-flex}:host([disabled]){pointer-events:none}
279
- `;let ls=class extends os{};ls.styles=[ss,as],ls=In([Tn("md-outlined-select")],ls);const ds=Cn`:host{display:flex;--md-ripple-hover-color: var(--md-menu-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-menu-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-menu-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-menu-item-pressed-state-layer-opacity, 0.12)}:host([disabled]){opacity:var(--md-menu-item-disabled-opacity, 0.3);pointer-events:none}md-focus-ring{z-index:1;--md-focus-ring-shape: 8px}a,button,li{background:none;border:none;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.list-item:not(.disabled){cursor:pointer}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;color:var(--md-menu-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));font-family:var(--md-menu-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-menu-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-menu-item-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));min-height:var(--md-menu-item-one-line-container-height, 56px);padding-top:var(--md-menu-item-top-space, 12px);padding-bottom:var(--md-menu-item-bottom-space, 12px);padding-inline-start:var(--md-menu-item-leading-space, 16px);padding-inline-end:var(--md-menu-item-trailing-space, 16px)}md-item[multiline]{min-height:var(--md-menu-item-two-line-container-height, 72px)}[slot=supporting-text]{color:var(--md-menu-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-menu-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-menu-item-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)))}[slot=trailing-supporting-text]{color:var(--md-menu-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));line-height:var(--md-menu-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-menu-item-trailing-supporting-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-menu-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}[slot=end]{color:var(--md-menu-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}.list-item{background-color:var(--md-menu-item-container-color, transparent)}.list-item.selected{background-color:var(--md-menu-item-selected-container-color, var(--md-sys-color-secondary-container, #e8def8))}.selected:not(.disabled) ::slotted(*){color:var(--md-menu-item-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b))}@media(forced-colors: active){:host([disabled]),:host([disabled]) slot{color:GrayText;opacity:1}.list-item{position:relative}.list-item.selected::before{content:"";position:absolute;inset:0;box-sizing:border-box;border-radius:inherit;pointer-events:none;border:3px double CanvasText}}
280
- `;class cs extends Vi{constructor(){super(...arguments),this.multiline=!1}render(){return Ei`
278
+ </div>`}renderMenuContent(){return Ti`<slot></slot>`}handleKeydown(e){if(this.open||this.disabled||!this.menu)return;const t=this.menu.typeaheadController,r="Space"===e.code||"ArrowDown"===e.code||"ArrowUp"===e.code||"End"===e.code||"Home"===e.code||"Enter"===e.code;if(t.isTypingAhead||!r){if(1===e.key.length){t.onKeydown(e),e.preventDefault();const{lastActiveRecord:r}=t;if(!r)return;this.labelEl?.setAttribute?.("aria-live","polite"),this.selectItem(r[1])&&this.dispatchInteractionEvents()}}else switch(e.preventDefault(),this.open=!0,e.code){case"Space":case"ArrowDown":case"Enter":this.defaultFocus=Ka;break;case"End":this.defaultFocus=Za;break;case"ArrowUp":case"Home":this.defaultFocus=Ya}}handleClick(){this.open=!this.open}handleFocus(){this.focused=!0}handleBlur(){this.focused=!1}handleFocusout(e){e.relatedTarget&&Xa(e.relatedTarget,this)||(this.open=!1)}getSelectedOptions(){if(!this.menu)return this.lastSelectedOptionRecords=[],null;const e=this.menu.items;return this.lastSelectedOptionRecords=function(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];n.selected&&t.push([n,r])}return t}(e),this.lastSelectedOptionRecords}async getUpdateComplete(){return await(this.menu?.updateComplete),super.getUpdateComplete()}updateValueAndDisplayText(){const e=this.getSelectedOptions()??[];let t=!1;if(e.length){const[r]=e[0];t=this.lastSelectedOption!==r,this.lastSelectedOption=r,this[ds]=r.value,this.displayText=r.displayText}else t=null!==this.lastSelectedOption,this.lastSelectedOption=null,this[ds]="",this.displayText="";return t}async handleOpening(e){if(this.labelEl?.removeAttribute?.("aria-live"),this.redispatchEvent(e),this.defaultFocus!==Ka)return;const t=this.menu.items,r=La(t)?.item;let[n]=this.lastSelectedOptionRecords[0]??[null];r&&r!==n&&(r.tabIndex=-1),n=n??t[0],n&&(n.tabIndex=0,n.focus())}redispatchEvent(e){jo(this,e)}handleClosed(e){this.open=!1,this.redispatchEvent(e)}handleCloseMenu(e){const t=e.detail.reason,r=e.detail.itemPath[0];this.open=!1;let n=!1;var i;"click-selection"===t.kind||"keydown"===t.kind&&(i=t.key,Object.values(Wa).some((e=>e===i)))?n=this.selectItem(r):(r.tabIndex=-1,r.blur()),n&&this.dispatchInteractionEvents()}selectItem(e){return(this.getSelectedOptions()??[]).forEach((([t])=>{e!==t&&(t.selected=!1)})),e.selected=!0,this.updateValueAndDisplayText()}handleRequestSelection(e){const t=e.target;this.lastSelectedOptionRecords.some((([e])=>e===t))||this.selectItem(t)}handleRequestDeselection(e){const t=e.target;this.lastSelectedOptionRecords.some((([e])=>e===t))&&this.updateValueAndDisplayText()}initUserSelection(){this.lastUserSetValue&&!this.lastSelectedOptionRecords.length?this.select(this.lastUserSetValue):null===this.lastUserSetSelectedIndex||this.lastSelectedOptionRecords.length?this.updateValueAndDisplayText():this.selectIndex(this.lastUserSetSelectedIndex)}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0}dispatchInteractionEvents(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0}))}getErrorText(){return this.error?this.errorText:this.nativeErrorText}[Mo](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}click(){this.field?.click()}[Ro](){return new ss((()=>this))}[Oo](){return this.field}}us.shadowRootOptions={...Wi.shadowRootOptions,delegatesFocus:!0},kn([Zn({type:Boolean})],us.prototype,"quick",void 0),kn([Zn({type:Boolean})],us.prototype,"required",void 0),kn([Zn({type:String,attribute:"error-text"})],us.prototype,"errorText",void 0),kn([Zn()],us.prototype,"label",void 0),kn([Zn({type:Boolean,attribute:"no-asterisk"})],us.prototype,"noAsterisk",void 0),kn([Zn({type:String,attribute:"supporting-text"})],us.prototype,"supportingText",void 0),kn([Zn({type:Boolean,reflect:!0})],us.prototype,"error",void 0),kn([Zn({attribute:"menu-positioning"})],us.prototype,"menuPositioning",void 0),kn([Zn({type:Boolean,attribute:"clamp-menu-width"})],us.prototype,"clampMenuWidth",void 0),kn([Zn({type:Number,attribute:"typeahead-delay"})],us.prototype,"typeaheadDelay",void 0),kn([Zn({type:Boolean,attribute:"has-leading-icon"})],us.prototype,"hasLeadingIcon",void 0),kn([Zn({attribute:"display-text"})],us.prototype,"displayText",void 0),kn([Zn({attribute:"menu-align"})],us.prototype,"menuAlign",void 0),kn([Zn()],us.prototype,"value",null),kn([Zn({type:Number,attribute:"selected-index"})],us.prototype,"selectedIndex",null),kn([ei()],us.prototype,"nativeError",void 0),kn([ei()],us.prototype,"nativeErrorText",void 0),kn([ei()],us.prototype,"focused",void 0),kn([ei()],us.prototype,"open",void 0),kn([ei()],us.prototype,"defaultFocus",void 0),kn([ri(".field")],us.prototype,"field",void 0),kn([ri("md-menu")],us.prototype,"menu",void 0),kn([ri("#label")],us.prototype,"labelEl",void 0),kn([ii({slot:"leading-icon",flatten:!0})],us.prototype,"leadingIcons",void 0);class hs extends us{constructor(){super(...arguments),this.fieldTag=lo`md-outlined-field`}}const ps=Ln`:host{--_text-field-disabled-input-text-color: var(--md-outlined-select-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-input-text-opacity: var(--md-outlined-select-text-field-disabled-input-text-opacity, 0.38);--_text-field-disabled-label-text-color: var(--md-outlined-select-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-label-text-opacity: var(--md-outlined-select-text-field-disabled-label-text-opacity, 0.38);--_text-field-disabled-leading-icon-color: var(--md-outlined-select-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-leading-icon-opacity: var(--md-outlined-select-text-field-disabled-leading-icon-opacity, 0.38);--_text-field-disabled-outline-color: var(--md-outlined-select-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-outline-opacity: var(--md-outlined-select-text-field-disabled-outline-opacity, 0.12);--_text-field-disabled-outline-width: var(--md-outlined-select-text-field-disabled-outline-width, 1px);--_text-field-disabled-supporting-text-color: var(--md-outlined-select-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-supporting-text-opacity: var(--md-outlined-select-text-field-disabled-supporting-text-opacity, 0.38);--_text-field-disabled-trailing-icon-color: var(--md-outlined-select-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-trailing-icon-opacity: var(--md-outlined-select-text-field-disabled-trailing-icon-opacity, 0.38);--_text-field-error-focus-input-text-color: var(--md-outlined-select-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-focus-label-text-color: var(--md-outlined-select-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-leading-icon-color: var(--md-outlined-select-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-focus-outline-color: var(--md-outlined-select-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-supporting-text-color: var(--md-outlined-select-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-trailing-icon-color: var(--md-outlined-select-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-input-text-color: var(--md-outlined-select-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-label-text-color: var(--md-outlined-select-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-leading-icon-color: var(--md-outlined-select-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-hover-outline-color: var(--md-outlined-select-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-supporting-text-color: var(--md-outlined-select-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-trailing-icon-color: var(--md-outlined-select-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-input-text-color: var(--md-outlined-select-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-label-text-color: var(--md-outlined-select-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-leading-icon-color: var(--md-outlined-select-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-outline-color: var(--md-outlined-select-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-supporting-text-color: var(--md-outlined-select-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-trailing-icon-color: var(--md-outlined-select-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-focus-input-text-color: var(--md-outlined-select-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-focus-label-text-color: var(--md-outlined-select-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-leading-icon-color: var(--md-outlined-select-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-outline-color: var(--md-outlined-select-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-outline-width: var(--md-outlined-select-text-field-focus-outline-width, 3px);--_text-field-focus-supporting-text-color: var(--md-outlined-select-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-trailing-icon-color: var(--md-outlined-select-text-field-focus-trailing-icon-color, var(--md-sys-color-primary, #6750a4));--_text-field-hover-input-text-color: var(--md-outlined-select-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-label-text-color: var(--md-outlined-select-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-leading-icon-color: var(--md-outlined-select-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-outline-color: var(--md-outlined-select-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-outline-width: var(--md-outlined-select-text-field-hover-outline-width, 1px);--_text-field-hover-supporting-text-color: var(--md-outlined-select-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-trailing-icon-color: var(--md-outlined-select-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-input-text-color: var(--md-outlined-select-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-input-text-font: var(--md-outlined-select-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-input-text-line-height: var(--md-outlined-select-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-input-text-size: var(--md-outlined-select-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-input-text-weight: var(--md-outlined-select-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-label-text-color: var(--md-outlined-select-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-label-text-font: var(--md-outlined-select-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-label-text-line-height: var(--md-outlined-select-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-label-text-populated-line-height: var(--md-outlined-select-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-label-text-populated-size: var(--md-outlined-select-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-label-text-size: var(--md-outlined-select-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-label-text-weight: var(--md-outlined-select-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-leading-icon-color: var(--md-outlined-select-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-leading-icon-size: var(--md-outlined-select-text-field-leading-icon-size, 24px);--_text-field-outline-color: var(--md-outlined-select-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_text-field-outline-width: var(--md-outlined-select-text-field-outline-width, 1px);--_text-field-supporting-text-color: var(--md-outlined-select-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-supporting-text-font: var(--md-outlined-select-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-supporting-text-line-height: var(--md-outlined-select-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-supporting-text-size: var(--md-outlined-select-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-supporting-text-weight: var(--md-outlined-select-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-trailing-icon-color: var(--md-outlined-select-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-trailing-icon-size: var(--md-outlined-select-text-field-trailing-icon-size, 24px);--_text-field-container-shape-start-start: var(--md-outlined-select-text-field-container-shape-start-start, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-start-end: var(--md-outlined-select-text-field-container-shape-start-end, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-end: var(--md-outlined-select-text-field-container-shape-end-end, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-start: var(--md-outlined-select-text-field-container-shape-end-start, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--md-outlined-field-container-shape-end-end: var(--_text-field-container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_text-field-container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_text-field-container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_text-field-container-shape-start-start);--md-outlined-field-content-color: var(--_text-field-input-text-color);--md-outlined-field-content-font: var(--_text-field-input-text-font);--md-outlined-field-content-line-height: var(--_text-field-input-text-line-height);--md-outlined-field-content-size: var(--_text-field-input-text-size);--md-outlined-field-content-weight: var(--_text-field-input-text-weight);--md-outlined-field-disabled-content-color: var(--_text-field-disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_text-field-disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_text-field-disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_text-field-disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_text-field-disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_text-field-disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_text-field-disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_text-field-disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_text-field-disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_text-field-disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_text-field-disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_text-field-disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_text-field-disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_text-field-error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_text-field-error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_text-field-error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_text-field-error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_text-field-error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_text-field-error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_text-field-error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_text-field-error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_text-field-error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_text-field-error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_text-field-error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_text-field-error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_text-field-error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_text-field-error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_text-field-error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_text-field-error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_text-field-error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_text-field-error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_text-field-focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_text-field-focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_text-field-focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_text-field-focus-outline-color);--md-outlined-field-focus-outline-width: var(--_text-field-focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_text-field-focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_text-field-focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_text-field-hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_text-field-hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_text-field-hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_text-field-hover-outline-color);--md-outlined-field-hover-outline-width: var(--_text-field-hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_text-field-hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_text-field-hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_text-field-label-text-color);--md-outlined-field-label-text-font: var(--_text-field-label-text-font);--md-outlined-field-label-text-line-height: var(--_text-field-label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_text-field-label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_text-field-label-text-populated-size);--md-outlined-field-label-text-size: var(--_text-field-label-text-size);--md-outlined-field-label-text-weight: var(--_text-field-label-text-weight);--md-outlined-field-leading-content-color: var(--_text-field-leading-icon-color);--md-outlined-field-outline-color: var(--_text-field-outline-color);--md-outlined-field-outline-width: var(--_text-field-outline-width);--md-outlined-field-supporting-text-color: var(--_text-field-supporting-text-color);--md-outlined-field-supporting-text-font: var(--_text-field-supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_text-field-supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_text-field-supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_text-field-supporting-text-weight);--md-outlined-field-trailing-content-color: var(--_text-field-trailing-icon-color)}[has-start] .icon.leading{font-size:var(--_text-field-leading-icon-size);height:var(--_text-field-leading-icon-size);width:var(--_text-field-leading-icon-size)}.icon.trailing{font-size:var(--_text-field-trailing-icon-size);height:var(--_text-field-trailing-icon-size);width:var(--_text-field-trailing-icon-size)}
279
+ `,fs=Ln`:host{color:unset;min-width:210px;display:flex}.field{cursor:default;outline:none}.select{position:relative;flex-direction:column}.icon.trailing svg,.icon ::slotted(*){fill:currentColor}.icon ::slotted(*){width:inherit;height:inherit;font-size:inherit}.icon slot{display:flex;height:100%;width:100%;align-items:center;justify-content:center}.icon.trailing :is(.up,.down){opacity:0;transition:opacity 75ms linear 75ms}.select:not(.open) .down,.select.open .up{opacity:1}.field,.select,md-menu{min-width:inherit;width:inherit;max-width:inherit;display:flex}md-menu{min-width:var(--__menu-min-width);max-width:var(--__menu-max-width, inherit)}.menu-wrapper{width:0px;height:0px;max-width:inherit}md-menu ::slotted(:not[disabled]){cursor:pointer}.field,.select{width:100%}:host{display:inline-flex}:host([disabled]){pointer-events:none}
280
+ `;let gs=class extends hs{};gs.styles=[fs,ps],gs=kn([jn("md-outlined-select")],gs);const ms=Ln`:host{display:flex;--md-ripple-hover-color: var(--md-menu-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-menu-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-menu-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-menu-item-pressed-state-layer-opacity, 0.12)}:host([disabled]){opacity:var(--md-menu-item-disabled-opacity, 0.3);pointer-events:none}md-focus-ring{z-index:1;--md-focus-ring-shape: 8px}a,button,li{background:none;border:none;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.list-item:not(.disabled){cursor:pointer}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;color:var(--md-menu-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));font-family:var(--md-menu-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-menu-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-menu-item-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));min-height:var(--md-menu-item-one-line-container-height, 56px);padding-top:var(--md-menu-item-top-space, 12px);padding-bottom:var(--md-menu-item-bottom-space, 12px);padding-inline-start:var(--md-menu-item-leading-space, 16px);padding-inline-end:var(--md-menu-item-trailing-space, 16px)}md-item[multiline]{min-height:var(--md-menu-item-two-line-container-height, 72px)}[slot=supporting-text]{color:var(--md-menu-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-menu-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-menu-item-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)))}[slot=trailing-supporting-text]{color:var(--md-menu-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));line-height:var(--md-menu-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-menu-item-trailing-supporting-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-menu-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}[slot=end]{color:var(--md-menu-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}.list-item{background-color:var(--md-menu-item-container-color, transparent)}.list-item.selected{background-color:var(--md-menu-item-selected-container-color, var(--md-sys-color-secondary-container, #e8def8))}.selected:not(.disabled) ::slotted(*){color:var(--md-menu-item-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b))}@media(forced-colors: active){:host([disabled]),:host([disabled]) slot{color:GrayText;opacity:1}.list-item{position:relative}.list-item.selected::before{content:"";position:absolute;inset:0;box-sizing:border-box;border-radius:inherit;pointer-events:none;border:3px double CanvasText}}
281
+ `;class vs extends Wi{constructor(){super(...arguments),this.multiline=!1}render(){return Ti`
281
282
  <slot name="container"></slot>
282
283
  <slot class="non-text" name="start"></slot>
283
284
  <div class="text">
@@ -292,8 +293,8 @@ var e={5568:e=>{const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?
292
293
  </div>
293
294
  <slot class="non-text" name="trailing-supporting-text"></slot>
294
295
  <slot class="non-text" name="end"></slot>
295
- `}handleTextSlotChange(){let e=!1,t=0;for(const r of this.textSlots)if(us(r)&&(t+=1),t>1){e=!0;break}this.multiline=e}}function us(e){for(const t of e.assignedNodes({flatten:!0})){const e=t.nodeType===Node.ELEMENT_NODE,r=t.nodeType===Node.TEXT_NODE&&t.textContent?.match(/\S/);if(e||r)return!0}return!1}In([Kn({type:Boolean,reflect:!0})],cs.prototype,"multiline",void 0),In([(e,t)=>Zn(e,t,{get(){return(this.renderRoot??(ti??=document.createDocumentFragment())).querySelectorAll(".text slot")}})],cs.prototype,"textSlots",void 0);const hs=Cn`:host{color:var(--md-sys-color-on-surface, #1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, 0.875rem);font-weight:var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}
296
- `;let ps=class extends cs{};ps.styles=[hs],ps=In([Tn("md-item")],ps);class fs{constructor(e,t){this.host=e,this.internalTypeaheadText=null,this.onClick=()=>{this.host.keepOpen||this.host.dispatchEvent(Ba(this.host,{kind:"click-selection"}))},this.onKeydown=e=>{if(this.host.href&&"Enter"===e.code){const e=this.getInteractiveElement();e instanceof HTMLAnchorElement&&e.click()}if(e.defaultPrevented)return;const t=e.code;this.host.keepOpen&&"Escape"!==t||Ua(t)&&(e.preventDefault(),this.host.dispatchEvent(Ba(this.host,{kind:"keydown",key:t})))},this.getHeadlineElements=t.getHeadlineElements,this.getSupportingTextElements=t.getSupportingTextElements,this.getDefaultElements=t.getDefaultElements,this.getInteractiveElement=t.getInteractiveElement,this.host.addController(this)}get typeaheadText(){if(null!==this.internalTypeaheadText)return this.internalTypeaheadText;const e=this.getHeadlineElements(),t=[];return e.forEach((e=>{e.textContent&&e.textContent.trim()&&t.push(e.textContent.trim())})),0===t.length&&this.getDefaultElements().forEach((e=>{e.textContent&&e.textContent.trim()&&t.push(e.textContent.trim())})),0===t.length&&this.getSupportingTextElements().forEach((e=>{e.textContent&&e.textContent.trim()&&t.push(e.textContent.trim())})),t.join(" ")}get tagName(){switch(this.host.type){case"link":return"a";case"button":return"button";default:return"li"}}get role(){return"option"===this.host.type?"option":"menuitem"}hostConnected(){this.host.toggleAttribute("md-menu-item",!0)}hostUpdate(){this.host.href&&(this.host.type="link")}setTypeaheadText(e){this.internalTypeaheadText=e}}class gs{get role(){return this.menuItemController.role}get typeaheadText(){return this.menuItemController.typeaheadText}setTypeaheadText(e){this.menuItemController.setTypeaheadText(e)}get displayText(){return null!==this.internalDisplayText?this.internalDisplayText:this.menuItemController.typeaheadText}setDisplayText(e){this.internalDisplayText=e}constructor(e,t){this.host=e,this.internalDisplayText=null,this.lastSelected=this.host.selected,this.firstUpdate=!0,this.onClick=()=>{this.menuItemController.onClick()},this.onKeydown=e=>{this.menuItemController.onKeydown(e)},this.menuItemController=new fs(e,t),e.addController(this)}hostUpdate(){this.lastSelected!==this.host.selected&&(this.host.ariaSelected=this.host.selected?"true":"false")}hostUpdated(){this.lastSelected===this.host.selected||this.firstUpdate||(this.host.selected?this.host.dispatchEvent(new Event("request-selection",{bubbles:!0,composed:!0})):this.host.dispatchEvent(new Event("request-deselection",{bubbles:!0,composed:!0}))),this.lastSelected=this.host.selected,this.firstUpdate=!1}}class vs extends Vi{constructor(){super(...arguments),this.disabled=!1,this.isMenuItem=!0,this.selected=!1,this.value="",this.type="option",this.selectOptionController=new gs(this,{getHeadlineElements:()=>this.headlineElements,getSupportingTextElements:()=>this.supportingTextElements,getDefaultElements:()=>this.defaultElements,getInteractiveElement:()=>this.listItemRoot})}get typeaheadText(){return this.selectOptionController.typeaheadText}set typeaheadText(e){this.selectOptionController.setTypeaheadText(e)}get displayText(){return this.selectOptionController.displayText}set displayText(e){this.selectOptionController.setDisplayText(e)}render(){return this.renderListItem(Ei`
296
+ `}handleTextSlotChange(){let e=!1,t=0;for(const r of this.textSlots)if(bs(r)&&(t+=1),t>1){e=!0;break}this.multiline=e}}function bs(e){for(const t of e.assignedNodes({flatten:!0})){const e=t.nodeType===Node.ELEMENT_NODE,r=t.nodeType===Node.TEXT_NODE&&t.textContent?.match(/\S/);if(e||r)return!0}return!1}kn([Zn({type:Boolean,reflect:!0})],vs.prototype,"multiline",void 0),kn([(e,t)=>ti(e,t,{get(){return(this.renderRoot??(ni??=document.createDocumentFragment())).querySelectorAll(".text slot")}})],vs.prototype,"textSlots",void 0);const ys=Ln`:host{color:var(--md-sys-color-on-surface, #1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, 0.875rem);font-weight:var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}
297
+ `;let xs=class extends vs{};xs.styles=[ys],xs=kn([jn("md-item")],xs);class ws{constructor(e,t){this.host=e,this.internalTypeaheadText=null,this.onClick=()=>{this.host.keepOpen||this.host.dispatchEvent(Ga(this.host,{kind:"click-selection"}))},this.onKeydown=e=>{if(this.host.href&&"Enter"===e.code){const e=this.getInteractiveElement();e instanceof HTMLAnchorElement&&e.click()}if(e.defaultPrevented)return;const t=e.code;this.host.keepOpen&&"Escape"!==t||Qa(t)&&(e.preventDefault(),this.host.dispatchEvent(Ga(this.host,{kind:"keydown",key:t})))},this.getHeadlineElements=t.getHeadlineElements,this.getSupportingTextElements=t.getSupportingTextElements,this.getDefaultElements=t.getDefaultElements,this.getInteractiveElement=t.getInteractiveElement,this.host.addController(this)}get typeaheadText(){if(null!==this.internalTypeaheadText)return this.internalTypeaheadText;const e=this.getHeadlineElements(),t=[];return e.forEach((e=>{e.textContent&&e.textContent.trim()&&t.push(e.textContent.trim())})),0===t.length&&this.getDefaultElements().forEach((e=>{e.textContent&&e.textContent.trim()&&t.push(e.textContent.trim())})),0===t.length&&this.getSupportingTextElements().forEach((e=>{e.textContent&&e.textContent.trim()&&t.push(e.textContent.trim())})),t.join(" ")}get tagName(){switch(this.host.type){case"link":return"a";case"button":return"button";default:return"li"}}get role(){return"option"===this.host.type?"option":"menuitem"}hostConnected(){this.host.toggleAttribute("md-menu-item",!0)}hostUpdate(){this.host.href&&(this.host.type="link")}setTypeaheadText(e){this.internalTypeaheadText=e}}class _s{get role(){return this.menuItemController.role}get typeaheadText(){return this.menuItemController.typeaheadText}setTypeaheadText(e){this.menuItemController.setTypeaheadText(e)}get displayText(){return null!==this.internalDisplayText?this.internalDisplayText:this.menuItemController.typeaheadText}setDisplayText(e){this.internalDisplayText=e}constructor(e,t){this.host=e,this.internalDisplayText=null,this.firstUpdate=!0,this.onClick=()=>{this.menuItemController.onClick()},this.onKeydown=e=>{this.menuItemController.onKeydown(e)},this.lastSelected=this.host.selected,this.menuItemController=new ws(e,t),e.addController(this)}hostUpdate(){this.lastSelected!==this.host.selected&&(this.host.ariaSelected=this.host.selected?"true":"false")}hostUpdated(){this.lastSelected===this.host.selected||this.firstUpdate||(this.host.selected?this.host.dispatchEvent(new Event("request-selection",{bubbles:!0,composed:!0})):this.host.dispatchEvent(new Event("request-deselection",{bubbles:!0,composed:!0}))),this.lastSelected=this.host.selected,this.firstUpdate=!1}}const Ss=Io(Wi);class Es extends Ss{constructor(){super(...arguments),this.disabled=!1,this.isMenuItem=!0,this.selected=!1,this.value="",this.type="option",this.selectOptionController=new _s(this,{getHeadlineElements:()=>this.headlineElements,getSupportingTextElements:()=>this.supportingTextElements,getDefaultElements:()=>this.defaultElements,getInteractiveElement:()=>this.listItemRoot})}get typeaheadText(){return this.selectOptionController.typeaheadText}set typeaheadText(e){this.selectOptionController.setTypeaheadText(e)}get displayText(){return this.selectOptionController.displayText}set displayText(e){this.selectOptionController.setDisplayText(e)}render(){return this.renderListItem(Ti`
297
298
  <md-item>
298
299
  <div slot="container">
299
300
  ${this.renderRipple()} ${this.renderFocusRing()}
@@ -302,28 +303,28 @@ var e={5568:e=>{const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?
302
303
  <slot name="end" slot="end"></slot>
303
304
  ${this.renderBody()}
304
305
  </md-item>
305
- `)}renderListItem(e){return Ei`
306
+ `)}renderListItem(e){return Ti`
306
307
  <li
307
308
  id="item"
308
309
  tabindex=${this.disabled?-1:0}
309
310
  role=${this.selectOptionController.role}
310
- aria-label=${this.ariaLabel||ki}
311
- aria-selected=${this.ariaSelected||ki}
312
- aria-checked=${this.ariaChecked||ki}
313
- aria-expanded=${this.ariaExpanded||ki}
314
- aria-haspopup=${this.ariaHasPopup||ki}
315
- class="list-item ${Qi(this.getRenderClasses())}"
311
+ aria-label=${this.ariaLabel||Ci}
312
+ aria-selected=${this.ariaSelected||Ci}
313
+ aria-checked=${this.ariaChecked||Ci}
314
+ aria-expanded=${this.ariaExpanded||Ci}
315
+ aria-haspopup=${this.ariaHasPopup||Ci}
316
+ class="list-item ${Ki(this.getRenderClasses())}"
316
317
  @click=${this.selectOptionController.onClick}
317
318
  @keydown=${this.selectOptionController.onKeydown}
318
319
  >${e}</li
319
320
  >
320
- `}renderRipple(){return Ei` <md-ripple
321
+ `}renderRipple(){return Ti` <md-ripple
321
322
  part="ripple"
322
323
  for="item"
323
- ?disabled=${this.disabled}></md-ripple>`}renderFocusRing(){return Ei` <md-focus-ring
324
+ ?disabled=${this.disabled}></md-ripple>`}renderFocusRing(){return Ti` <md-focus-ring
324
325
  part="focus-ring"
325
326
  for="item"
326
- inward></md-focus-ring>`}getRenderClasses(){return{disabled:this.disabled,selected:this.selected}}renderBody(){return Ei`
327
+ inward></md-focus-ring>`}getRenderClasses(){return{disabled:this.disabled,selected:this.selected}}renderBody(){return Ti`
327
328
  <slot></slot>
328
329
  <slot name="overline" slot="overline"></slot>
329
330
  <slot name="headline" slot="headline"></slot>
@@ -331,14 +332,14 @@ var e={5568:e=>{const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?
331
332
  <slot
332
333
  name="trailing-supporting-text"
333
334
  slot="trailing-supporting-text"></slot>
334
- `}focus(){this.listItemRoot?.focus()}}xo(vs),vs.shadowRootOptions={...Vi.shadowRootOptions,delegatesFocus:!0},In([Kn({type:Boolean,reflect:!0})],vs.prototype,"disabled",void 0),In([Kn({type:Boolean,attribute:"md-menu-item",reflect:!0})],vs.prototype,"isMenuItem",void 0),In([Kn({type:Boolean})],vs.prototype,"selected",void 0),In([Kn()],vs.prototype,"value",void 0),In([ei(".list-item")],vs.prototype,"listItemRoot",void 0),In([ri({slot:"headline"})],vs.prototype,"headlineElements",void 0),In([ri({slot:"supporting-text"})],vs.prototype,"supportingTextElements",void 0),In([function(e){return(t,r)=>{const{slot:n}=e??{},i="slot"+(n?`[name=${n}]`:":not([name])");return Zn(t,r,{get(){const t=this.renderRoot?.querySelector(i);return t?.assignedNodes(e)??[]}})}}({slot:""})],vs.prototype,"defaultElements",void 0),In([Kn({attribute:"typeahead-text"})],vs.prototype,"typeaheadText",null),In([Kn({attribute:"display-text"})],vs.prototype,"displayText",null);let ms=class extends vs{};ms.styles=[ds],ms=In([Tn("md-select-option")],ms);class bs extends qo{computeValidity(e){return this.checkboxControl||(this.checkboxControl=document.createElement("input"),this.checkboxControl.type="checkbox"),this.checkboxControl.checked=e.checked,this.checkboxControl.required=e.required,{validity:this.checkboxControl.validity,validationMessage:this.checkboxControl.validationMessage}}equals(e,t){return e.checked===t.checked&&e.required===t.required}copy({checked:e,required:t}){return{checked:e,required:t}}}const ys=Ao(Oo(Eo(Vi)));class xs extends ys{constructor(){super(),this.checked=!1,this.indeterminate=!1,this.required=!1,this.value="on",this.prevChecked=!1,this.prevDisabled=!1,this.prevIndeterminate=!1,this.addEventListener("click",(e=>{pa(e)&&this.input&&(this.focus(),ha(this.input))}))}update(e){(e.has("checked")||e.has("disabled")||e.has("indeterminate"))&&(this.prevChecked=e.get("checked")??this.checked,this.prevDisabled=e.get("disabled")??this.disabled,this.prevIndeterminate=e.get("indeterminate")??this.indeterminate),super.update(e)}render(){const e=!this.prevChecked&&!this.prevIndeterminate,t=this.prevChecked&&!this.prevIndeterminate,r=this.prevIndeterminate,n=this.checked&&!this.indeterminate,i=this.indeterminate,o=Qi({disabled:this.disabled,selected:n||i,unselected:!n&&!i,checked:n,indeterminate:i,"prev-unselected":e,"prev-checked":t,"prev-indeterminate":r,"prev-disabled":this.prevDisabled}),{ariaLabel:a,ariaInvalid:s}=this;return Ei`
335
+ `}focus(){this.listItemRoot?.focus()}}Es.shadowRootOptions={...Wi.shadowRootOptions,delegatesFocus:!0},kn([Zn({type:Boolean,reflect:!0})],Es.prototype,"disabled",void 0),kn([Zn({type:Boolean,attribute:"md-menu-item",reflect:!0})],Es.prototype,"isMenuItem",void 0),kn([Zn({type:Boolean})],Es.prototype,"selected",void 0),kn([Zn()],Es.prototype,"value",void 0),kn([ri(".list-item")],Es.prototype,"listItemRoot",void 0),kn([ii({slot:"headline"})],Es.prototype,"headlineElements",void 0),kn([ii({slot:"supporting-text"})],Es.prototype,"supportingTextElements",void 0),kn([function(e){return(t,r)=>{const{slot:n}=e??{},i="slot"+(n?`[name=${n}]`:":not([name])");return ti(t,r,{get(){const t=this.renderRoot?.querySelector(i);return t?.assignedNodes(e)??[]}})}}({slot:""})],Es.prototype,"defaultElements",void 0),kn([Zn({attribute:"typeahead-text"})],Es.prototype,"typeaheadText",null),kn([Zn({attribute:"display-text"})],Es.prototype,"displayText",null);let Is=class extends Es{};Is.styles=[ms],Is=kn([jn("md-select-option")],Is);class Ts extends Jo{computeValidity(e){return this.checkboxControl||(this.checkboxControl=document.createElement("input"),this.checkboxControl.type="checkbox"),this.checkboxControl.checked=e.checked,this.checkboxControl.required=e.required,{validity:this.checkboxControl.validity,validationMessage:this.checkboxControl.validationMessage}}equals(e,t){return e.checked===t.checked&&e.required===t.required}copy({checked:e,required:t}){return{checked:e,required:t}}}const ks=Io(Po(Fo(No(Wi))));class js extends ks{constructor(){super(),this.checked=!1,this.indeterminate=!1,this.required=!1,this.value="on",this.prevChecked=!1,this.prevDisabled=!1,this.prevIndeterminate=!1,this.addEventListener("click",(e=>{xa(e)&&this.input&&(this.focus(),ya(this.input))}))}update(e){(e.has("checked")||e.has("disabled")||e.has("indeterminate"))&&(this.prevChecked=e.get("checked")??this.checked,this.prevDisabled=e.get("disabled")??this.disabled,this.prevIndeterminate=e.get("indeterminate")??this.indeterminate),super.update(e)}render(){const e=!this.prevChecked&&!this.prevIndeterminate,t=this.prevChecked&&!this.prevIndeterminate,r=this.prevIndeterminate,n=this.checked&&!this.indeterminate,i=this.indeterminate,o=Ki({disabled:this.disabled,selected:n||i,unselected:!n&&!i,checked:n,indeterminate:i,"prev-unselected":e,"prev-checked":t,"prev-indeterminate":r,"prev-disabled":this.prevDisabled}),{ariaLabel:a,ariaInvalid:s}=this;return Ti`
335
336
  <div class="container ${o}">
336
337
  <input
337
338
  type="checkbox"
338
339
  id="input"
339
- aria-checked=${i?"mixed":ki}
340
- aria-label=${a||ki}
341
- aria-invalid=${s||ki}
340
+ aria-checked=${i?"mixed":Ci}
341
+ aria-label=${a||Ci}
342
+ aria-invalid=${s||Ci}
342
343
  ?disabled=${this.disabled}
343
344
  ?required=${this.required}
344
345
  .indeterminate=${this.indeterminate}
@@ -355,5 +356,5 @@ var e={5568:e=>{const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?
355
356
  <rect class="mark long" />
356
357
  </svg>
357
358
  </div>
358
- `}handleInput(e){const t=e.target;this.checked=t.checked,this.indeterminate=t.indeterminate}handleChange(e){wo(this,e)}[Ro](){return!this.checked||this.indeterminate?null:this.value}[Co](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked="true"===e}[Io](){return new bs((()=>this))}[To](){return this.input}}xo(xs),xs.shadowRootOptions={...Vi.shadowRootOptions,delegatesFocus:!0},In([Kn({type:Boolean})],xs.prototype,"checked",void 0),In([Kn({type:Boolean})],xs.prototype,"indeterminate",void 0),In([Kn({type:Boolean})],xs.prototype,"required",void 0),In([Kn()],xs.prototype,"value",void 0),In([Yn()],xs.prototype,"prevChecked",void 0),In([Yn()],xs.prototype,"prevDisabled",void 0),In([Yn()],xs.prototype,"prevIndeterminate",void 0),In([ei("input")],xs.prototype,"input",void 0);const ws=Cn`:host{border-start-start-radius:var(--md-checkbox-container-shape-start-start, var(--md-checkbox-container-shape, 2px));border-start-end-radius:var(--md-checkbox-container-shape-start-end, var(--md-checkbox-container-shape, 2px));border-end-end-radius:var(--md-checkbox-container-shape-end-end, var(--md-checkbox-container-shape, 2px));border-end-start-radius:var(--md-checkbox-container-shape-end-start, var(--md-checkbox-container-shape, 2px));display:inline-flex;height:var(--md-checkbox-container-size, 18px);position:relative;vertical-align:top;width:var(--md-checkbox-container-size, 18px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-checkbox-container-size, 18px))/2)}md-focus-ring{height:44px;inset:unset;width:44px}input{appearance:none;height:48px;margin:0;opacity:0;outline:none;position:absolute;width:48px;z-index:1;cursor:inherit}:host([touch-target=none]) input{height:100%;width:100%}.container{border-radius:inherit;display:flex;height:100%;place-content:center;place-items:center;position:relative;width:100%}.outline,.background,.icon{inset:0;position:absolute}.outline,.background{border-radius:inherit}.outline{border-color:var(--md-checkbox-outline-color, var(--md-sys-color-on-surface-variant, #49454f));border-style:solid;border-width:var(--md-checkbox-outline-width, 2px);box-sizing:border-box}.background{background-color:var(--md-checkbox-selected-container-color, var(--md-sys-color-primary, #6750a4))}.background,.icon{opacity:0;transition-duration:150ms,50ms;transition-property:transform,opacity;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15),linear;transform:scale(0.6)}:where(.selected) :is(.background,.icon){opacity:1;transition-duration:350ms,50ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1),linear;transform:scale(1)}md-ripple{border-radius:var(--md-checkbox-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-checkbox-state-layer-size, 40px);inset:unset;width:var(--md-checkbox-state-layer-size, 40px);--md-ripple-hover-color: var(--md-checkbox-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-checkbox-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-checkbox-pressed-state-layer-opacity, 0.12)}.selected md-ripple{--md-ripple-hover-color: var(--md-checkbox-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-checkbox-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-checkbox-selected-pressed-state-layer-opacity, 0.12)}.icon{fill:var(--md-checkbox-selected-icon-color, var(--md-sys-color-on-primary, #fff));height:var(--md-checkbox-icon-size, 18px);width:var(--md-checkbox-icon-size, 18px)}.mark.short{height:2px;transition-property:transform,height;width:2px}.mark.long{height:2px;transition-property:transform,width;width:10px}.mark{animation-duration:150ms;animation-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15);transition-duration:150ms;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15)}.selected .mark{animation-duration:350ms;animation-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1);transition-duration:350ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1)}.checked .mark,.prev-checked.unselected .mark{transform:scaleY(-1) translate(7px, -14px) rotate(45deg)}.checked .mark.short,.prev-checked.unselected .mark.short{height:5.6568542495px}.checked .mark.long,.prev-checked.unselected .mark.long{width:11.313708499px}.indeterminate .mark,.prev-indeterminate.unselected .mark{transform:scaleY(-1) translate(4px, -10px) rotate(0deg)}.prev-unselected .mark{transition-property:none}.prev-unselected.checked .mark.long{animation-name:prev-unselected-to-checked}@keyframes prev-unselected-to-checked{from{width:0}}:where(:hover) .outline{border-color:var(--md-checkbox-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-hover-outline-width, 2px)}:where(:hover) .background{background:var(--md-checkbox-selected-hover-container-color, var(--md-sys-color-primary, #6750a4))}:where(:hover) .icon{fill:var(--md-checkbox-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:focus-within) .outline{border-color:var(--md-checkbox-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-focus-outline-width, 2px)}:where(:focus-within) .background{background:var(--md-checkbox-selected-focus-container-color, var(--md-sys-color-primary, #6750a4))}:where(:focus-within) .icon{fill:var(--md-checkbox-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:active) .outline{border-color:var(--md-checkbox-pressed-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-pressed-outline-width, 2px)}:where(:active) .background{background:var(--md-checkbox-selected-pressed-container-color, var(--md-sys-color-primary, #6750a4))}:where(:active) .icon{fill:var(--md-checkbox-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff))}:where(.disabled,.prev-disabled) :is(.background,.icon,.mark){animation-duration:0s;transition-duration:0s}:where(.disabled) .outline{border-color:var(--md-checkbox-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-disabled-outline-width, 2px);opacity:var(--md-checkbox-disabled-container-opacity, 0.38)}:where(.selected.disabled) .outline{visibility:hidden}:where(.selected.disabled) .background{background:var(--md-checkbox-selected-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-checkbox-selected-disabled-container-opacity, 0.38)}:where(.disabled) .icon{fill:var(--md-checkbox-selected-disabled-icon-color, var(--md-sys-color-surface, #fef7ff))}@media(forced-colors: active){.background{background-color:CanvasText}.selected.disabled .background{background-color:GrayText;opacity:1}.outline{border-color:CanvasText}.disabled .outline{border-color:GrayText;opacity:1}.icon{fill:Canvas}}
359
- `;let _s=class extends xs{};_s.styles=[ws],_s=In([Tn("md-checkbox")],_s);class Ss extends K{constructor(){super("form {\n --md-sys-color-primary: var(--brand-color);\n}\nform.mode-edit { --label-width: 0em; }\n.property-instance { margin-bottom:14px; }\nlabel > md-checkbox { margin-right: 8px; }")}createDefaultTemplate(e,t,r,n,i){var o;n.classList.add("editor"),(null==i?void 0:i.datatype)&&(n.shaclDatatype=i.datatype),void 0!==(null==i?void 0:i.minCount)&&(n.dataset.minCount=String(i.minCount)),(null==i?void 0:i.class)&&(n.dataset.class=i.class.value),(null==i?void 0:i.nodeKind)&&(n.dataset.nodeKind=i.nodeKind.value),(null==i?void 0:i.hasValue)&&(n.disabled=!0),n.value=(null==t?void 0:t.value)||(null===(o=null==i?void 0:i.defaultValue)||void 0===o?void 0:o.value)||"";const a=(null==i?void 0:i.description)?i.description.value:(null==i?void 0:i.pattern)?i.pattern:null;a&&n.setAttribute("placeholder",a),r&&n.setAttribute("required","true");const s=document.createElement("div");if(e){const t=document.createElement("label");t.htmlFor=n.id,t.innerText=e,s.appendChild(t)}return s.appendChild(n),s}createTextEditor(e,t,r,n){var i;const o=new Jo;return o.label=e,o.supportingText=(null===(i=n.description)||void 0===i?void 0:i.value)||"",!1===n.singleLine?(o.type="textarea",o.rows=5):(o.type="text",n.pattern&&(o.pattern=n.pattern)),this.createDefaultTemplate("",t,r,o,n)}createNumberEditor(e,t,r,n){var i,o;const a=new Jo;a.type="number",a.label=e,a.supportingText=(null===(i=n.description)||void 0===i?void 0:i.value)||"";const s=void 0!==n.minInclusive?n.minInclusive:void 0!==n.minExclusive?n.minExclusive+1:void 0,l=void 0!==n.maxInclusive?n.maxInclusive:void 0!==n.maxExclusive?n.maxExclusive-1:void 0;return void 0!==s&&(a.min=String(s)),void 0!==l&&(a.max=String(l)),(null===(o=n.datatype)||void 0===o?void 0:o.value)!==I+"integer"&&(a.step="0.1"),this.createDefaultTemplate("",t,r,a,n)}createListEditor(e,t,r,n,i){var o;const a=new ls;a.label=e,a.supportingText=(null===(o=null==i?void 0:i.description)||void 0===o?void 0:o.value)||(null==i?void 0:i.label)||"";const s=this.createDefaultTemplate("",null,r,a,i);let l=!0;for(const e of n){const r=new ms,n="string"==typeof e.value?e.value:e.value.value,i=e.label?e.label:n;if(r.value=n,t&&t.value===n&&(r.selected=!0),""===n&&(l=!1,r.ariaLabel="blank"),i){const e=document.createElement("div");e.innerText=i,e.slot="headline",r.appendChild(e)}a.appendChild(r)}if(l){const e=new ms;e.ariaLabel="blank",a.prepend(e)}return t&&(a.value=t.value),s}createBooleanEditor(e,t,r,n){const i=new _s;i.setAttribute("type","checkbox");const o=this.createDefaultTemplate("",t,r,i,n);i.removeAttribute("required"),t instanceof m&&(i.checked="true"===t.value);const a=document.createElement("label");return a.appendChild(i),a.appendChild(document.createTextNode(e)),o.appendChild(a),o}createDateEditor(e,t,r,n){return this.createTextEditor(e,t,r,n)}createLangStringEditor(e,t,r,n){var i;const o=this.createTextEditor(e,t,r,n),a=o.querySelector(":scope .editor");let s;if(null===(i=n.languageIn)||void 0===i?void 0:i.length){s=document.createElement("select");for(const e of n.languageIn){const t=document.createElement("option");t.innerText=e.value,s.appendChild(t)}}else s=document.createElement("input"),s.maxLength=5,s.placeholder="lang?";return s.title="Language of the text",s.classList.add("lang-chooser"),s.addEventListener("change",(e=>{e.stopPropagation(),a&&(a.dataset.lang=s.value,a.dispatchEvent(new Event("change",{bubbles:!0})))})),t instanceof m&&(s.value=t.language),a.dataset.lang=s.value,a.after(s),o}createFileEditor(e,t,r,n){const i=document.createElement("input");return i.type="file",i.addEventListener("change",(e=>{var t;if(null===(t=i.files)||void 0===t?void 0:t.length){e.stopPropagation();const t=new FileReader;t.readAsDataURL(i.files[0]),t.onload=()=>{var e;i.binaryData=btoa(t.result),null===(e=i.parentElement)||void 0===e||e.dispatchEvent(new Event("change",{bubbles:!0}))}}else i.binaryData=void 0})),this.createDefaultTemplate(e,t,r,i,n)}createButton(e,t){let r;return t?(r=new wa,r.classList.add("primary")):(r=new Ea,r.classList.add("secondary")),r.innerHTML=e,r}}class Es extends En{constructor(){super(new Ss)}}window.customElements.define("shacl-form",Es);var Is=n.TS,Ts=n.aH,js=n.k_,ks=n.a6,Ns=n.nt,As=n.Sx,Rs=n.E7,Cs=n.F3;export{Is as Config,Ts as Loader,js as Plugin,ks as ShaclForm,Ns as ShaclPropertyTemplate,As as Theme,Rs as findLabel,Cs as registerPlugin};
359
+ `}handleInput(e){const t=e.target;this.checked=t.checked,this.indeterminate=t.indeterminate}handleChange(e){jo(this,e)}[Mo](){return!this.checked||this.indeterminate?null:this.value}[Bo](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked="true"===e}[Ro](){return new Ts((()=>this))}[Oo](){return this.input}}js.shadowRootOptions={...Wi.shadowRootOptions,delegatesFocus:!0},kn([Zn({type:Boolean})],js.prototype,"checked",void 0),kn([Zn({type:Boolean})],js.prototype,"indeterminate",void 0),kn([Zn({type:Boolean})],js.prototype,"required",void 0),kn([Zn()],js.prototype,"value",void 0),kn([ei()],js.prototype,"prevChecked",void 0),kn([ei()],js.prototype,"prevDisabled",void 0),kn([ei()],js.prototype,"prevIndeterminate",void 0),kn([ri("input")],js.prototype,"input",void 0);const As=Ln`:host{border-start-start-radius:var(--md-checkbox-container-shape-start-start, var(--md-checkbox-container-shape, 2px));border-start-end-radius:var(--md-checkbox-container-shape-start-end, var(--md-checkbox-container-shape, 2px));border-end-end-radius:var(--md-checkbox-container-shape-end-end, var(--md-checkbox-container-shape, 2px));border-end-start-radius:var(--md-checkbox-container-shape-end-start, var(--md-checkbox-container-shape, 2px));display:inline-flex;height:var(--md-checkbox-container-size, 18px);position:relative;vertical-align:top;width:var(--md-checkbox-container-size, 18px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-checkbox-container-size, 18px))/2)}md-focus-ring{height:44px;inset:unset;width:44px}input{appearance:none;height:48px;margin:0;opacity:0;outline:none;position:absolute;width:48px;z-index:1;cursor:inherit}:host([touch-target=none]) input{height:100%;width:100%}.container{border-radius:inherit;display:flex;height:100%;place-content:center;place-items:center;position:relative;width:100%}.outline,.background,.icon{inset:0;position:absolute}.outline,.background{border-radius:inherit}.outline{border-color:var(--md-checkbox-outline-color, var(--md-sys-color-on-surface-variant, #49454f));border-style:solid;border-width:var(--md-checkbox-outline-width, 2px);box-sizing:border-box}.background{background-color:var(--md-checkbox-selected-container-color, var(--md-sys-color-primary, #6750a4))}.background,.icon{opacity:0;transition-duration:150ms,50ms;transition-property:transform,opacity;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15),linear;transform:scale(0.6)}:where(.selected) :is(.background,.icon){opacity:1;transition-duration:350ms,50ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1),linear;transform:scale(1)}md-ripple{border-radius:var(--md-checkbox-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-checkbox-state-layer-size, 40px);inset:unset;width:var(--md-checkbox-state-layer-size, 40px);--md-ripple-hover-color: var(--md-checkbox-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-checkbox-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-checkbox-pressed-state-layer-opacity, 0.12)}.selected md-ripple{--md-ripple-hover-color: var(--md-checkbox-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-checkbox-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-checkbox-selected-pressed-state-layer-opacity, 0.12)}.icon{fill:var(--md-checkbox-selected-icon-color, var(--md-sys-color-on-primary, #fff));height:var(--md-checkbox-icon-size, 18px);width:var(--md-checkbox-icon-size, 18px)}.mark.short{height:2px;transition-property:transform,height;width:2px}.mark.long{height:2px;transition-property:transform,width;width:10px}.mark{animation-duration:150ms;animation-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15);transition-duration:150ms;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15)}.selected .mark{animation-duration:350ms;animation-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1);transition-duration:350ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1)}.checked .mark,.prev-checked.unselected .mark{transform:scaleY(-1) translate(7px, -14px) rotate(45deg)}.checked .mark.short,.prev-checked.unselected .mark.short{height:5.6568542495px}.checked .mark.long,.prev-checked.unselected .mark.long{width:11.313708499px}.indeterminate .mark,.prev-indeterminate.unselected .mark{transform:scaleY(-1) translate(4px, -10px) rotate(0deg)}.prev-unselected .mark{transition-property:none}.prev-unselected.checked .mark.long{animation-name:prev-unselected-to-checked}@keyframes prev-unselected-to-checked{from{width:0}}:where(:hover) .outline{border-color:var(--md-checkbox-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-hover-outline-width, 2px)}:where(:hover) .background{background:var(--md-checkbox-selected-hover-container-color, var(--md-sys-color-primary, #6750a4))}:where(:hover) .icon{fill:var(--md-checkbox-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:focus-within) .outline{border-color:var(--md-checkbox-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-focus-outline-width, 2px)}:where(:focus-within) .background{background:var(--md-checkbox-selected-focus-container-color, var(--md-sys-color-primary, #6750a4))}:where(:focus-within) .icon{fill:var(--md-checkbox-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:active) .outline{border-color:var(--md-checkbox-pressed-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-pressed-outline-width, 2px)}:where(:active) .background{background:var(--md-checkbox-selected-pressed-container-color, var(--md-sys-color-primary, #6750a4))}:where(:active) .icon{fill:var(--md-checkbox-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff))}:where(.disabled,.prev-disabled) :is(.background,.icon,.mark){animation-duration:0s;transition-duration:0s}:where(.disabled) .outline{border-color:var(--md-checkbox-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-disabled-outline-width, 2px);opacity:var(--md-checkbox-disabled-container-opacity, 0.38)}:where(.selected.disabled) .outline{visibility:hidden}:where(.selected.disabled) .background{background:var(--md-checkbox-selected-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-checkbox-selected-disabled-container-opacity, 0.38)}:where(.disabled) .icon{fill:var(--md-checkbox-selected-disabled-icon-color, var(--md-sys-color-surface, #fef7ff))}@media(forced-colors: active){.background{background-color:CanvasText}.selected.disabled .background{background-color:GrayText;opacity:1}.outline{border-color:CanvasText}.disabled .outline{border-color:GrayText;opacity:1}.icon{fill:Canvas}}
360
+ `;let Cs=class extends js{};Cs.styles=[As],Cs=kn([jn("md-checkbox")],Cs);class Ns extends Y{constructor(){super("form {\n --md-sys-color-primary: var(--brand-color);\n}\nform.mode-edit { --label-width: 0em; }\n.property-instance { margin-bottom:14px; }\nlabel > md-checkbox { margin-right: 8px; }")}createDefaultTemplate(e,t,r,n,i){var o;n.classList.add("editor"),(null==i?void 0:i.datatype)&&(n.shaclDatatype=i.datatype),void 0!==(null==i?void 0:i.minCount)&&(n.dataset.minCount=String(i.minCount)),(null==i?void 0:i.class)&&(n.dataset.class=i.class.value),(null==i?void 0:i.nodeKind)&&(n.dataset.nodeKind=i.nodeKind.value),(null==i?void 0:i.hasValue)&&(n.disabled=!0),n.value=(null==t?void 0:t.value)||(null===(o=null==i?void 0:i.defaultValue)||void 0===o?void 0:o.value)||"";const a=(null==i?void 0:i.description)?i.description.value:(null==i?void 0:i.pattern)?i.pattern:null;a&&n.setAttribute("placeholder",a),r&&n.setAttribute("required","true");const s=document.createElement("div");if(e){const t=document.createElement("label");t.htmlFor=n.id,t.innerText=e,s.appendChild(t)}return s.appendChild(n),s}createTextEditor(e,t,r,n){var i;const o=new ta;return o.label=e,o.supportingText=(null===(i=n.description)||void 0===i?void 0:i.value)||"",!1===n.singleLine?(o.type="textarea",o.rows=5):(o.type="text",n.pattern&&(o.pattern=n.pattern)),this.createDefaultTemplate("",t,r,o,n)}createNumberEditor(e,t,r,n){var i,o;const a=new ta;a.type="number",a.label=e,a.supportingText=(null===(i=n.description)||void 0===i?void 0:i.value)||"";const s=void 0!==n.minInclusive?n.minInclusive:void 0!==n.minExclusive?n.minExclusive+1:void 0,l=void 0!==n.maxInclusive?n.maxInclusive:void 0!==n.maxExclusive?n.maxExclusive-1:void 0;return void 0!==s&&(a.min=String(s)),void 0!==l&&(a.max=String(l)),(null===(o=n.datatype)||void 0===o?void 0:o.value)!==I+"integer"&&(a.step="0.1"),this.createDefaultTemplate("",t,r,a,n)}createListEditor(e,t,r,n,i){var o;const a=new gs;a.label=e,a.supportingText=(null===(o=null==i?void 0:i.description)||void 0===o?void 0:o.value)||(null==i?void 0:i.label)||"";const s=this.createDefaultTemplate("",null,r,a,i);let l=!0;for(const e of n){const r=new Is,n="string"==typeof e.value?e.value:e.value.value,i=e.label?e.label:n;if(r.value=n,t&&t.value===n&&(r.selected=!0),e.indent)for(let t=0;t<e.indent;t++)r.innerHTML="&#160;&#160;"+r.innerHTML;if(""===n&&(l=!1,r.ariaLabel="blank"),i){const e=document.createElement("div");e.innerText=i,e.slot="headline",r.appendChild(e)}a.appendChild(r)}if(l){const e=new Is;e.ariaLabel="blank",a.prepend(e)}return t&&(a.value=t.value),s}createBooleanEditor(e,t,r,n){const i=new Cs;i.setAttribute("type","checkbox");const o=this.createDefaultTemplate("",t,r,i,n);i.removeAttribute("required"),t instanceof v&&(i.checked="true"===t.value);const a=document.createElement("label");return a.appendChild(i),a.appendChild(document.createTextNode(e)),o.appendChild(a),o}createDateEditor(e,t,r,n){return this.createTextEditor(e,t,r,n)}createLangStringEditor(e,t,r,n){var i;const o=this.createTextEditor(e,t,r,n),a=o.querySelector(":scope .editor");let s;if(null===(i=n.languageIn)||void 0===i?void 0:i.length){s=document.createElement("select");for(const e of n.languageIn){const t=document.createElement("option");t.innerText=e.value,s.appendChild(t)}}else s=document.createElement("input"),s.maxLength=5,s.placeholder="lang?";return s.title="Language of the text",s.classList.add("lang-chooser"),s.addEventListener("change",(e=>{e.stopPropagation(),a&&(a.dataset.lang=s.value,a.dispatchEvent(new Event("change",{bubbles:!0})))})),t instanceof v&&(s.value=t.language),a.dataset.lang=s.value,a.after(s),o}createFileEditor(e,t,r,n){const i=document.createElement("input");return i.type="file",i.addEventListener("change",(e=>{var t;if(null===(t=i.files)||void 0===t?void 0:t.length){e.stopPropagation();const t=new FileReader;t.readAsDataURL(i.files[0]),t.onload=()=>{var e;i.binaryData=btoa(t.result),null===(e=i.parentElement)||void 0===e||e.dispatchEvent(new Event("change",{bubbles:!0}))}}else i.binaryData=void 0})),this.createDefaultTemplate(e,t,r,i,n)}createButton(e,t){let r;return t?(r=new ja,r.classList.add("primary")):(r=new Na,r.classList.add("secondary")),r.innerHTML=e,r}}class Rs extends Tn{constructor(){super(new Ns)}}window.customElements.define("shacl-form",Rs);var Os=n.TS,Ls=n.aH,$s=n.k_,Ds=n.a6,Ps=n.nt,Ms=n.Sx,Bs=n.E7,Fs=n.F3;export{Os as Config,Ls as Loader,$s as Plugin,Ds as ShaclForm,Ps as ShaclPropertyTemplate,Ms as Theme,Bs as findLabel,Fs as registerPlugin};