1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[475],{66537:function(e,t){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,s=u(e),a=s[0],o=s[1],c=new i((a+o)*3/4-o),l=0,d=o>0?a-4:a;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===o&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===o&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s=[],a=0,o=n-i;a<o;a+=16383)s.push(function(e,t,n){for(var i,s=[],a=t;a<n;a+=3)s.push(r[(i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]))>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}(e,a,a+16383>o?o:a+16383));return 1===i?s.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&s.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),s.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,o=s.length;a<o;++a)r[a]=s[a],n[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},73452:function(e,t,r){"use strict";var n=r(66537),i=r(19814),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return l(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!o.isEncoding(t))throw TypeError("Unknown encoding: "+t);var r=0|p(e,t),n=a(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(I(e,Uint8Array)){var t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(I(e,ArrayBuffer)||e&&I(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(I(e,SharedArrayBuffer)||e&&I(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);var i=function(e){if(o.isBuffer(e)){var t,r=0|f(e.length),n=a(r);return 0===n.length||e.copy(n,0,0,r),n}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?a(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw 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 TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return c(e),a(e<0?0:0|f(e))}function d(e){for(var t=e.length<0?0:0|f(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),o.prototype),n}function f(e){if(e>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||I(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return T(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return O(e).length;default:if(i)return n?-1:T(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){var i,s,a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=t;s<r;++s)i+=j[e[s]];return i}(this,t,r);case"utf8":case"utf-8":return b(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":return i=t,s=r,0===i&&s===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(i,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),i="",s=0;s<n.length-1;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}(this,t,r);default:if(a)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){var s;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(s=r=+r)!=s&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}
vendor: 14,466 bytes, line 1
1else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var s,a=1,o=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;a=2,o/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(s=r;s<o;s++)if(c(e,s)===c(t,-1===l?0:s-l)){if(-1===l&&(l=s),s-l+1===u)return l*a}else -1!==l&&(s-=s-l),l=-1}else for(r+u>o&&(r=o-u),s=r;s>=0;s--){for(var d=!0,h=0;h<u;h++)if(c(e,s+h)!==c(t,h)){d=!1;break}if(d)return s}return -1}function b(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var s,a,o,u,c=e[i],l=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=r)switch(d){case 1:c<128&&(l=c);break;case 2:(192&(s=e[i+1]))==128&&(u=(31&c)<<6|63&s)>127&&(l=u);break;case 3:s=e[i+1],a=e[i+2],(192&s)==128&&(192&a)==128&&(u=(15&c)<<12|(63&s)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:s=e[i+1],a=e[i+2],o=e[i+3],(192&s)==128&&(192&a)==128&&(192&o)==128&&(u=(15&c)<<18|(63&s)<<12|(63&a)<<6|63&o)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}function w(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function _(e,t,r,n,i,s){if(!o.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function x(e,t,r,n,i,s){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function E(e,t,r,n,s){return t=+t,r>>>=0,s||x(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function C(e,t,r,n,s){return t=+t,r>>>=0,s||x(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.lW=o,t.h2=50,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),o.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(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),o.poolSize=8192,o.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array),o.alloc=function(e,t,r){return(c(e),e<=0)?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)},o.allocUnsafe=function(e){return l(e)},o.allocUnsafeSlow=function(e){return l(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(I(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),I(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},o.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}},o.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(I(s,Uint8Array))i+s.length>n.length?o.from(s).copy(n,i):Uint8Array.prototype.set.call(n,s,i);else if(o.isBuffer(s))s.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=s.length}return n},o.byteLength=p,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var 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},o.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?b(this,0,e):y.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",r=t.h2;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s&&(o.prototype[s]=o.prototype.inspect),o.prototype.compare=function(e,t,r,n,i){if(I(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw 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 RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var s=i-n,a=r-t,u=Math.min(s,a),c=this.slice(n,i),l=e.slice(t,r),d=0;d<u;++d)if(c[d]!==l[d]){s=c[d],a=l[d];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},o.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))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,s,a,o,u,c,l,d,h=this.length-t;if((void 0===r||r>h)&&(r=h),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var f=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=t.length;n>s/2&&(n=s/2);for(var a=0;a<n;++a){var o=parseInt(t.substr(2*a,2),16);if(o!=o)break;e[r+a]=o}return a}(this,e,t,r);case"utf8":case"utf-8":return i=t,s=r,R(T(e,this.length-i),this,i,s);case"ascii":case"latin1":case"binary":return a=t,o=r,R(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(e),this,a,o);case"base64":return u=t,c=r,R(O(e),this,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=t,d=r,R(function(e,t){for(var r,n,i=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i.push(r%256),i.push(n);return i}(e,this.length-l),this,l,d);default:if(f)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,o.prototype),n},o.prototype.readUintLE=o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n},o.prototype.readUintBE=o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},o.prototype.readInt8=function(e,t){return(e>>>=0,t||w(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var s=1,a=0;for(this[t]=255&e;++a<r&&(s*=256);)this[t+a]=e/s&255;return t+r},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var s=r-1,a=1;for(this[t+s]=255&e;--s>=0&&(a*=256);)this[t+s]=e/a&255;return t+r},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(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},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(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},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var s=0,a=1,o=0;for(this[t]=255&e;++s<r&&(a*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var s=r-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(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},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(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},o.prototype.writeFloatLE=function(e,t,r){return E(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return E(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return C(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return C(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw 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||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var 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},o.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 TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,s=e.charCodeAt(0);("utf8"===n&&s<128||"latin1"===n)&&(e=s)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;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{var a=o.isBuffer(e)?e:o.from(e,n),u=a.length;
1if(0===u)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=a[i%u]}return this};var k=/[^+/0-9A-Za-z-_]/g;function T(e,t){t=t||1/0;for(var r,n=e.length,i=null,s=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319||a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return s}function O(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(k,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function R(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function I(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var j=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},19814:function(e,t){t.read=function(e,t,r,n,i){var s,a,o=8*i-n-1,u=(1<<o)-1,c=u>>1,l=-7,d=r?i-1:0,h=r?-1:1,f=e[t+d];for(d+=h,s=f&(1<<-l)-1,f>>=-l,l+=o;l>0;s=256*s+e[t+d],d+=h,l-=8);for(a=s&(1<<-l)-1,s>>=-l,l+=n;l>0;a=256*a+e[t+d],d+=h,l-=8);if(0===s)s=1-c;else{if(s===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),s-=c}return(f?-1:1)*a*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var a,o,u,c=8*s-i-1,l=(1<<c)-1,d=l>>1,h=23===i?5960464477539062e-23:0,f=n?0:s-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(o=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+d>=1?t+=h/u:t+=h*Math.pow(2,1-d),t*u>=2&&(a++,u/=2),a+d>=l?(o=0,a=l):a+d>=1?(o=(t*u-1)*Math.pow(2,i),a+=d):(o=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&o,f+=p,o/=256,i-=8);for(a=a<<i|o,c+=i;c>0;e[r+f]=255&a,f+=p,a/=256,c-=8);e[r+f-p]|=128*y}},65689:function(e,t,r){"use strict";r.d(t,{y:function(){return l}});var n=r(16146),i=r(64443),s=r(76251),a=r(7906),o=r(23142),u=r(86913),c=r(70231),l=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var s,a=this,o=(s=e)&&s instanceof n.Lv||s&&(0,u.m)(s.next)&&(0,u.m)(s.error)&&(0,u.m)(s.complete)&&(0,i.Nn)(s)?e:new n.Hp(e,t,r);return(0,c.x)(function(){var e=a.operator,t=a.source;o.add(e?e.call(o,t):t?a._subscribe(o):a._trySubscribe(o))}),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=d(t))(function(t,i){var s=new n.Hp({next:function(t){try{e(t)}catch(e){i(e),s.unsubscribe()}},error:i,complete:t});r.subscribe(s)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[s.L]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,a.U)(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=d(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function d(e){var t;return null!==(t=null!=e?e:o.v.Promise)&&void 0!==t?t:Promise}},77105:function(e,t,r){"use strict";r.d(t,{t:function(){return a}});var n=r(97040),i=r(50587),s=r(50918),a=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=s.l);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return(0,n.ZT)(t,e),t.prototype.next=function(t){var r=this.isStopped,n=this._buffer,i=this._infiniteTimeWindow,s=this._timestampProvider,a=this._windowTime;!r&&(n.push(t),i||n.push(s.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,i=(n?1:2)*e;if(e<1/0&&i<r.length&&r.splice(0,r.length-i),!n){for(var s=t.now(),a=0,o=1;o<r.length&&r[o]<=s;o+=2)a=o;a&&r.splice(0,a+1)}},t}(i.x)},50587:function(e,t,r){"use strict";r.d(t,{x:function(){return c}});var n=r(97040),i=r(65689),s=r(64443),a=(0,r(80163).d)(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),o=r(8371),u=r(70231),c=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,n.ZT)(t,e),t.prototype.lift=function(e){var t=new l(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new a},t.prototype.next=function(e){var t=this;(0,u.x)(function(){var r,i;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var s=(0,n.XA)(t.currentObservers),a=s.next();!a.done;a=s.next())a.value.next(e)}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}}})},t.prototype.error=function(e){var t=this;(0,u.x)(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}})},t.prototype.complete=function(){var e=this;(0,u.x)(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0}
1,enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,i=this.observers;return r||n?s.Lc:(this.currentObservers=null,i.push(e),new s.w0(function(){t.currentObservers=null,(0,o.P)(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},t.prototype.asObservable=function(){var e=new i.y;return e.source=this,e},t.create=function(e,t){return new l(e,t)},t}(i.y),l=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return(0,n.ZT)(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:s.Lc},t}(c)},16146:function(e,t,r){"use strict";r.d(t,{Hp:function(){return g},Lv:function(){return f}});var n=r(97040),i=r(86913),s=r(64443),a=r(23142),o=r(2567),u=r(64992),c=l("C",void 0,void 0);function l(e,t,r){return{kind:e,value:t,error:r}}var d=r(38571),h=r(70231),f=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,(0,s.Nn)(t)&&t.add(r)):r.destination=w,r}return(0,n.ZT)(t,e),t.create=function(e,t,r){return new g(e,t,r)},t.prototype.next=function(e){this.isStopped?b(l("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?b(l("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?b(c,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(s.w0),p=Function.prototype.bind;function y(e,t){return p.call(e,t)}var m=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){v(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){v(e)}else v(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){v(e)}},e}(),g=function(e){function t(t,r,n){var s,o,u=e.call(this)||this;return(0,i.m)(t)||!t?s={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:u&&a.v.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return u.unsubscribe()},s={next:t.next&&y(t.next,o),error:t.error&&y(t.error,o),complete:t.complete&&y(t.complete,o)}):s=t,u.destination=new m(s),u}return(0,n.ZT)(t,e),t}(f);function v(e){a.v.useDeprecatedSynchronousErrorHandling?(0,h.O)(e):(0,o.h)(e)}function b(e,t){var r=a.v.onStoppedNotification;r&&d.z.setTimeout(function(){return r(e,t)})}var w={closed:!0,next:u.Z,error:function(e){throw e},complete:u.Z}},64443:function(e,t,r){"use strict";r.d(t,{Lc:function(){return u},w0:function(){return o},Nn:function(){return c}});var n=r(97040),i=r(86913),s=(0,r(80163).d)(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}),a=r(8371),o=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,r,a,o,u=this._parentage;if(u){if(this._parentage=null,Array.isArray(u))try{for(var c=(0,n.XA)(u),d=c.next();!d.done;d=c.next())d.value.remove(this)}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}else u.remove(this)}var h=this.initialTeardown;
1if((0,i.m)(h))try{h()}catch(e){o=e instanceof s?e.errors:[e]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var p=(0,n.XA)(f),y=p.next();!y.done;y=p.next()){var m=y.value;try{l(m)}catch(e){o=null!=o?o:[],e instanceof s?o=(0,n.ev)((0,n.ev)([],(0,n.CR)(o)),(0,n.CR)(e.errors)):o.push(e)}}}catch(e){r={error:e}}finally{try{y&&!y.done&&(a=p.return)&&a.call(p)}finally{if(r)throw r.error}}}if(o)throw new s(o)}},t.prototype.add=function(e){var r;if(e&&e!==this){if(this.closed)l(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(e)}}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&(0,a.P)(t,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&(0,a.P)(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),u=o.EMPTY;function c(e){return e instanceof o||e&&"closed"in e&&(0,i.m)(e.remove)&&(0,i.m)(e.add)&&(0,i.m)(e.unsubscribe)}function l(e){(0,i.m)(e)?e():e.unsubscribe()}},23142:function(e,t,r){"use strict";r.d(t,{v:function(){return n}});var n={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},54726:function(e,t,r){"use strict";r.d(t,{z:function(){return s}});var n=r(7950),i=r(16146);function s(e,t){var r="object"==typeof t;return new Promise(function(s,a){var o=new i.Hp({next:function(e){s(e),o.unsubscribe()},error:a,complete:function(){r?s(t.defaultValue):a(new n.K)}});e.subscribe(o)})}},76910:function(e,t,r){"use strict";r.d(t,{n:function(){return i}});var n=r(7950);function i(e,t){var r="object"==typeof t;return new Promise(function(i,s){var a,o=!1;e.subscribe({next:function(e){a=e,o=!0},error:s,complete:function(){o?i(a):r?i(t.defaultValue):s(new n.K)}})})}},22416:function(e,t,r){"use strict";r.d(t,{a:function(){return h},l:function(){return f}});var n=r(65689),i=r(94595),s=r(88666),a=r(46883),o=r(15471),u=r(94912),c=r(23198),l=r(90890),d=r(68993);function h(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,u.yG)(e),l=(0,u.jO)(e),d=(0,i.D)(e),h=d.args,p=d.keys;if(0===h.length)return(0,s.D)([],r);var y=new n.y(f(h,r,p?function(e){return(0,c.n)(p,e)}:a.y));return l?y.pipe((0,o.Z)(l)):y}function f(e,t,r){return void 0===r&&(r=a.y),function(n){p(t,function(){for(var i=e.length,a=Array(i),o=i,u=i,c=function(i){p(t,function(){var c=(0,s.D)(e[i],t),d=!1;c.subscribe((0,l.x)(n,function(e){a[i]=e,!d&&(d=!0,u--),u||n.next(r(a.slice()))},function(){--o||n.complete()}))},n)},d=0;d<i;d++)c(d)},n)}}function p(e,t,r){e?(0,d.f)(r,e,t):t()}},65733:function(e,t,r){"use strict";r.d(t,{z:function(){return a}});var n=r(76204),i=r(94912),s=r(88666);function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,n.u)()((0,s.D)(e,(0,i.yG)(e)))}},77665:function(e,t,r){"use strict";r.d(t,{P:function(){return s}});var n=r(65689),i=r(90173);function s(e){return new n.y(function(t){(0,i.Xf)(e()).subscribe(t)})}},91425:function(e,t,r){"use strict";r.d(t,{E:function(){return n}});var n=new(r(65689)).y(function(e){return e.complete()})},88666:function(e,t,r){"use strict";r.d(t,{D:function(){return s}});var n=r(78680),i=r(90173);function s(e,t){return t?(0,n.x)(e,t):(0,i.Xf)(e)}},90173:function(e,t,r){"use strict";r.d(t,{Xf:function(){return y}});var n=r(97040),i=r(65532),s=r(46578),a=r(65689),o=r(65333),u=r(24451),c=r(35367),l=r(63309),d=r(28690),h=r(86913),f=r(2567),p=r(76251);function y(e){if(e instanceof a.y)return e;if(null!=e){if((0,o.c)(e))return new a.y(function(t){var r=e[p.L]();if((0,h.m)(r.subscribe))return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")});if((0,i.z)(e))return new a.y(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()});if((0,s.t)(e))return new a.y(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,f.h)});if((0,u.D)(e))return m(e);
1if((0,l.T)(e))return new a.y(function(t){var r,i;try{for(var s=(0,n.XA)(e),a=s.next();!a.done;a=s.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}t.complete()});if((0,d.L)(e))return m((0,d.Q)(e))}throw(0,c.z)(e)}function m(e){return new a.y(function(t){(function(e,t){var r,i,s,a;return(0,n.mG)(this,void 0,void 0,function(){var o;return(0,n.Jh)(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),r=(0,n.KL)(e),u.label=1;case 1:return[4,r.next()];case 2:if((i=u.sent()).done)return[3,4];if(o=i.value,t.next(o),t.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s={error:u.sent()},[3,11];case 6:if(u.trys.push([6,,9,10]),!(i&&!i.done&&(a=r.return)))return[3,8];return[4,a.call(r)];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}},21110:function(e,t,r){"use strict";r.d(t,{T:function(){return u}});var n=r(97688),i=r(90173),s=r(91425),a=r(94912),o=r(88666);function u(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,a.yG)(e),u=(0,a._6)(e,1/0);return e.length?1===e.length?(0,i.Xf)(e[0]):(0,n.J)(u)((0,o.D)(e,r)):s.E}},6097:function(e,t,r){"use strict";r.d(t,{of:function(){return s}});var n=r(94912),i=r(88666);function s(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,n.yG)(e);return(0,i.D)(e,r)}},26535:function(e,t,r){"use strict";r.d(t,{_:function(){return s}});var n=r(65689),i=r(86913);function s(e,t){var r=(0,i.m)(e)?e:function(){return e},s=function(e){return e.error(r())};return new n.y(t?function(e){return t.schedule(s,0,e)}:s)}},21025:function(e,t,r){"use strict";r.d(t,{H:function(){return o}});var n=r(65689),i=r(12344),s=r(59957),a=r(56129);function o(e,t,r){void 0===e&&(e=0),void 0===r&&(r=i.P);var o=-1;return null!=t&&((0,s.K)(t)?r=t:o=t),new n.y(function(t){var n=(0,a.q)(e)?+e-r.now():e;n<0&&(n=0);var i=0;return r.schedule(function(){t.closed||(t.next(i++),0<=o?this.schedule(void 0,o):t.complete())},n)})}},90890:function(e,t,r){"use strict";r.d(t,{Q:function(){return s},x:function(){return i}});var n=r(97040);function i(e,t,r,n,i){return new s(e,t,r,n,i)}var s=function(e){function t(t,r,n,i,s,a){var o=e.call(this,t)||this;return o.onFinalize=s,o.shouldUnsubscribe=a,o._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,o._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,o._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,o}return(0,n.ZT)(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),r||null===(t=this.onFinalize)||void 0===t||t.call(this)}},t}(r(16146).Lv)},15648:function(e,t,r){"use strict";r.d(t,{K:function(){return function e(t){return(0,s.e)(function(r,s){var a,o=null,u=!1;o=r.subscribe((0,i.x)(s,void 0,void 0,function(i){a=(0,n.Xf)(t(i,e(t)(r))),o?(o.unsubscribe(),o=null,a.subscribe(s)):u=!0})),u&&(o.unsubscribe(),o=null,a.subscribe(s))})}}});var n=r(90173),i=r(90890),s=r(67882)},94345:function(e,t,r){"use strict";r.d(t,{V:function(){return d}});var n=r(97040),i=r(22416),s=r(67882),a=r(952),o=r(15471),u=r(7906),c=r(94912);function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,c.jO)(e);return r?(0,u.z)(l.apply(void 0,(0,n.ev)([],(0,n.CR)(e))),(0,o.Z)(r)):(0,s.e)(function(t,r){(0,i.l)((0,n.ev)([t],(0,n.CR)((0,a.k)(e))))(r)})}function d(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return l.apply(void 0,(0,n.ev)([],(0,n.CR)(e)))}},76204:function(e,t,r){"use strict";r.d(t,{u:function(){return i}});var n=r(97688);function i(){return(0,n.J)(1)}},45689:function(e,t,r){"use strict";r.d(t,{h:function(){return s}});var n=r(67882),i=r(90890);function s(e,t){return(0,n.e)(function(r,n){var s=0;r.subscribe((0,i.x)(n,function(r){return e.call(t,r,s++)&&n.next(r)}))})}},87379:function(e,t,r){"use strict";r.d(t,{x:function(){return i}});var n=r(67882);function i(e){return(0,n.e)(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}},74645:function(e,t,r){"use strict";r.d(t,{U:function(){return s}});var n=r(67882),i=r(90890);function s(e,t){return(0,n.e)(function(r,n){var s=0;r.subscribe((0,i.x)(n,function(r){n.next(e.call(t,r,s++))}))})}},97688:function(e,t,r){"use strict";r.d(t,{J:function(){return s}});var n=r(24985),i=r(46883);function s(e){return void 0===e&&(e=1/0),(0,n.z)(i.y,e)}},6805:function(e,t,r){"use strict";r.d(t,{p:function(){return a}});var n=r(90173),i=r(68993),s=r(90890);function a(e,t,r,a,o,u,c,l){var d=[],h=0,f=0,p=!1,y=function(){!p||d.length||h||t.complete()},m=function(e){return h<a?g(e):d.push(e)},g=function(e){u&&t.next(e),h++;var l=!1;(0,n.Xf)(r(e,f++)).subscribe((0,s.x)(t,function(e){null==o||o(e),u?m(e):t.next(e)},function(){l=!0},void 0,function(){if(l)try{for(h--;d.length&&h<a;)!function(){var e=d.shift();c?(0,i.f)(t,c,function(){return g(e)}):g(e)}();y()}catch(e){t.error(e)}}))};return e.subscribe((0,s.x)(t,m,function(){p=!0,y()})),function(){null==l||l()}}},24985:function(e,t,r){"use strict";r.d(t,{z:function(){return function e(t,r,u){return(void 0===u&&(u=1/0),(0,o.m)(r))?e(function(e,s){return(0,n.U)(function(t,n){return r(e,t,s,n)})((0,i.Xf)(t(e,s)))},u):("number"==typeof r&&(u=r),(0,s.e)(function(e,r){return(0,a.p)(e,r,t,u)}))}}});var n=r(74645),i=r(90173),s=r(67882),a=r(6805),o=r(86913)},25882:function(e,t,r){"use strict";r.d(t,{B:function(){return u}});var n=r(97040),i=r(90173),s=r(50587),a=r(16146),o=r(67882);function u(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new s.x}:t,n=e.resetOnError,u=void 0===n||n,l=e.resetOnComplete,d=void 0===l||l,h=e.resetOnRefCountZero,f=void 0===h||h;return function(e){var t,n,s,l=0,h=!1,p=!1,y=function(){null==n||n.unsubscribe(),n=void 0},m=function(){y(),t=s=void 0,h=p=!1},g=function(){var e=t;m(),null==e||e.unsubscribe()};return(0,o.e)(function(e,o){l++,p||h||y();var v=s=null!=s?s:r();o.add(function(){0!=--l||p||h||(n=c(g,f))}),v.subscribe(o),!t&&l>0&&(t=new a.Hp({next:function(e){return v.next(e)},error:function(e){p=!0,y(),n=c(m,u,e),v.error(e)},complete:function(){h=!0,y(),n=c(m,d),v.complete()}}),(0,i.Xf)(e).subscribe(t))})(e)}}function c(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(!0===t){e();return}if(!1!==t){var o=new a.Hp({next:function(){o.unsubscribe(),e()}});return(0,i.Xf)(t.apply(void 0,(0,n.ev)([],(0,n.CR)(r)))).subscribe(o)}}},88072:function(e,t,r){"use strict";r.d(t,{d:function(){return s}});var n=r(77105),i=r(25882);function s(e,t,r){var s,a,o,u,c=!1;return e&&"object"==typeof e?(u=void 0===(s=e.bufferSize)?1/0:s,t=void 0===(a=e.windowTime)?1/0:a,c=void 0!==(o=e.refCount)&&o,r=e.scheduler):u=null!=e?e:1/0,(0,i.B)({connector:function(){return new n.t(u,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:c})}},90256:function(e,t,r){"use strict";r.d(t,{b:function(){return o}});var n=r(86913),i=r(67882),s=r(90890),a=r(46883);function o(e,t,r){var o=(0,n.m)(e)||t||r?{next:e,error:t,complete:r}:e;return o?(0,i.e)(function(e,t){null===(r=o.subscribe)||void 0===r||r.call(o);var r,n=!0;e.subscribe((0,s.x)(t,function(e){var r;null===(r=o.next)||void 0===r||r.call(o,e),t.next(e)},function(){var e;n=!1,null===(e=o.complete)||void 0===e||e.call(o),t.complete()},function(e){var r;n=!1,null===(r=o.error)||void 0===r||r.call(o,e),t.error(e)},function(){var e,t;n&&(null===(e=o.unsubscribe)||void 0===e||e.call(o)),null===(t=o.finalize)||void 0===t||t.call(o)}
1))}):a.y}},78680:function(e,t,r){"use strict";r.d(t,{x:function(){return w}});var n=r(90173),i=r(68993),s=r(67882),a=r(90890);function o(e,t){return void 0===t&&(t=0),(0,s.e)(function(r,n){r.subscribe((0,a.x)(n,function(r){return(0,i.f)(n,e,function(){return n.next(r)},t)},function(){return(0,i.f)(n,e,function(){return n.complete()},t)},function(r){return(0,i.f)(n,e,function(){return n.error(r)},t)}))})}function u(e,t){return void 0===t&&(t=0),(0,s.e)(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}var c=r(65689),l=r(43574),d=r(86913);function h(e,t){if(!e)throw Error("Iterable cannot be null");return new c.y(function(r){(0,i.f)(r,t,function(){var n=e[Symbol.asyncIterator]();(0,i.f)(r,t,function(){n.next().then(function(e){e.done?r.complete():r.next(e.value)})},0,!0)})})}var f=r(65333),p=r(46578),y=r(65532),m=r(63309),g=r(24451),v=r(35367),b=r(28690);function w(e,t){if(null!=e){if((0,f.c)(e))return(0,n.Xf)(e).pipe(u(t),o(t));if((0,y.z)(e))return new c.y(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})});if((0,p.t)(e))return(0,n.Xf)(e).pipe(u(t),o(t));if((0,g.D)(e))return h(e,t);if((0,m.T)(e))return new c.y(function(r){var n;return(0,i.f)(r,t,function(){n=e[l.h](),(0,i.f)(r,t,function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){r.error(e);return}i?r.complete():r.next(t)},0,!0)}),function(){return(0,d.m)(null==n?void 0:n.return)&&n.return()}});if((0,b.L)(e))return h((0,b.Q)(e),t)}throw(0,v.z)(e)}},94344:function(e,t,r){"use strict";r.d(t,{o:function(){return o}});var n=r(97040),i=function(e){function t(t,r){return e.call(this)||this}return(0,n.ZT)(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(64443).w0),s={setInterval:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var a=s.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,(0,n.ev)([e,t],(0,n.CR)(r))):setInterval.apply(void 0,(0,n.ev)([e,t],(0,n.CR)(r)))},clearInterval:function(e){var t=s.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},a=r(8371),o=function(e){function t(t,r){var n=e.call(this,t,r)||this;
1return n.scheduler=t,n.work=r,n.pending=!1,n}return(0,n.ZT)(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r,n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),s.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&s.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,(0,a.P)(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(i)},59826:function(e,t,r){"use strict";r.d(t,{v:function(){return a}});var n=r(97040),i=r(50918),s=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=i.l.now,e}(),a=function(e){function t(t,r){void 0===r&&(r=s.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return(0,n.ZT)(t,e),t.prototype.flush=function(e){var t,r=this.actions;if(this._active){r.push(e);return}this._active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}},t}(s)},12344:function(e,t,r){"use strict";r.d(t,{P:function(){return s},z:function(){return i}});var n=r(94344),i=new(r(59826)).v(n.o),s=i},50918:function(e,t,r){"use strict";r.d(t,{l:function(){return n}});var n={now:function(){return(n.delegate||Date).now()},delegate:void 0}},38571:function(e,t,r){"use strict";r.d(t,{z:function(){return i}});var n=r(97040),i={setTimeout:function(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];var a=i.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,(0,n.ev)([e,t],(0,n.CR)(r))):setTimeout.apply(void 0,(0,n.ev)([e,t],(0,n.CR)(r)))},clearTimeout:function(e){var t=i.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0}},43574:function(e,t,r){"use strict";r.d(t,{h:function(){return n}});var n="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},76251:function(e,t,r){"use strict";r.d(t,{L:function(){return n}});var n="function"==typeof Symbol&&Symbol.observable||"@@observable"},7950:function(e,t,r){"use strict";r.d(t,{K:function(){return n}});var n=(0,r(80163).d)(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})},94912:function(e,t,r){"use strict";r.d(t,{_6:function(){return u},jO:function(){return a},yG:function(){return o}});var n=r(86913),i=r(59957);function s(e){return e[e.length-1]}function a(e){return(0,n.m)(s(e))?e.pop():void 0}function o(e){return(0,i.K)(s(e))?e.pop():void 0}function u(e,t){return"number"==typeof s(e)?e.pop():t}},94595:function(e,t,r){"use strict";r.d(t,{D:function(){return o}});var n=Array.isArray,i=Object.getPrototypeOf,s=Object.prototype,a=Object.keys;function o(e){if(1===e.length){var t=e[0];if(n(t))return{args:t,keys:null};if(t&&"object"==typeof t&&i(t)===s){var r=a(t);return{args:r.map(function(e){return t[e]}),keys:r}}}return{args:e,keys:null}}},952:function(e,t,r){"use strict";r.d(t,{k:function(){return i}});var n=Array.isArray;function i(e){return 1===e.length&&n(e[0])?e[0]:e}},8371:function(e,t,r){"use strict";function n(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}r.d(t,{P:function(){return n}})},80163:function(e,t,r){"use strict";function n(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}r.d(t,{d:function(){return n}})},23198:function(e,t,r){"use strict";function n(e,t){return e.reduce(function(e,r,n){return e[r]=t[n],e},{})}r.d(t,{n:function(){return n}})},70231:function(e,t,r){"use strict";r.d(t,{O:function(){return a},x:function(){return s}});var n=r(23142),i=null;function s(e){if(n.v.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var r=i,s=r.errorThrown,a=r.error;if(i=null,s)throw a}}else e()}function a(e){n.v.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},68993:function(e,t,r){"use strict";function n(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var s=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(s),!i)return s}r.d(t,{f:function(){return n}})},46883:function(e,t,r){"use strict";function n(e){return e}r.d(t,{y:function(){return n}})},65532:function(e,t,r){"use strict";r.d(t,{z:function(){return n}});var n=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},24451:function(e,t,r){"use strict";r.d(t,{D:function(){return i}});var n=r(86913);function i(e){return Symbol.asyncIterator&&(0,n.m)(null==e?void 0:e[Symbol.asyncIterator])}},56129:function(e,t,r){"use strict";function n(e){return e instanceof Date&&!isNaN(e)}r.d(t,{q:function(){return n}})},86913:function(e,t,r){"use strict";function n(e){return"function"==typeof e}r.d(t,{m:function(){return n}})},65333:function(e,t,r){"use strict";r.d(t,{c:function(){return s}});var n=r(76251),i=r(86913);function s(e){return(0,i.m)(e[n.L])}},63309:function(e,t,r){"use strict";r.d(t,{T:function(){return s}});var n=r(43574),i=r(86913);function s(e){return(0,i.m)(null==e?void 0:e[n.h])}},94491:function(e,t,r){"use strict";r.d(t,{b:function(){return s}});var n=r(65689),i=r(86913);function s(e){return!!e&&(e instanceof n.y||(0,i.m)(e.lift)&&(0,i.m)(e.subscribe))}},46578:function(e,t,r){"use strict";r.d(t,{t:function(){return i}});var n=r(86913);function i(e){return(0,n.m)(null==e?void 0:e.then)}},28690:function(e,t,r){"use strict";r.d(t,{L:function(){return a},Q:function(){return s}});var n=r(97040),i=r(86913);function s(e){return(0,n.FC)(this,arguments,function(){var t,r,i;return(0,n.Jh)(this,function(s){switch(s.label){case 0:t=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,(0,n.qq)(t.read())];case 3:if(i=(r=s.sent()).value,!r.done)return[3,5];return[4,(0,n.qq)(void 0)];case 4:return[2,s.sent()];case 5:return[4,(0,n.qq)(i)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function a(e){return(0,i.m)(null==e?void 0:e.getReader)}},59957:function(e,t,r){"use strict";r.d(t,{K:function(){return i}});var n=r(86913);function i(e){return e&&(0,n.m)(e.schedule)}},67882:function(e,t,r){"use strict";r.d(t,{A:function(){return i},e:function(){return s}});var n=r(86913);function i(e){return(0,n.m)(null==e?void 0:e.lift)}function s(e){return function(t){if(i(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}},15471:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(97040),i=r(74645),s=Array.isArray;function a(e){return(0,i.U)(function(t){return s(t)?e.apply(void 0,(0,n.ev)([],(0,n.CR)(t))):e(t)})}},64992:function(e,t,r){"use strict";function n(){}r.d(t,{Z:function(){return n}})},7906:function(e,t,r){"use strict";r.d(t,{U:function(){return s},z:function(){return i}});var n=r(46883);function i(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s(e)}function s(e){return 0===e.length?n.y:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}},2567:function(e,t,r){"use strict";r.d(t,{h:function(){return s}});var n=r(23142),i=r(38571);function s(e){i.z.setTimeout(function(){var t=n.v.onUnhandledError;if(t)t(e);else throw e})}},35367:function(e,t,r){"use strict";function n(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invali
1d object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}r.d(t,{z:function(){return n}})},61208:function(e,t,r){"use strict";function n(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}r.d(t,{NG:function(){return u},Uy:function(){return n}});var i={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},s={0:8203,1:8204,2:8205,3:65279};[,,,,].fill(String.fromCodePoint(s[0])).join(""),Object.fromEntries(Object.entries(s).map(e=>e.reverse())),Object.fromEntries(Object.entries(i).map(e=>e.reverse()));var a=`${Object.values(i).map(e=>`\\u{${e.toString(16)}}`).join("")}`,o=RegExp(`[${a}]{4,}`,"gu");function u(e){var t,r;return e&&JSON.parse({cleaned:(t=JSON.stringify(e)).replace(o,""),encoded:(null==(r=t.match(o))?void 0:r[0])||""}.cleaned)}},91113:function(e,t,r){"use strict";r.d(t,{eI:function(){return tX}});var n,i=r(46415),s=r(68313),a=r(65689),o=r(77665),u=r(94491),c=r(6097),l=r(24985),d=r(88666),h=r(76910),f=r(88072),p=r(15648),y=r(65733),m=r(21025),g=r(26535),v=r(90256),b=r(87379),w=r(25882),_=r(21110),x=r(74645),E=r(54726),C=r(61208),k=r(94345),T=r(45689);let O="drafts.",R="versions.";function I(e){return e.startsWith(O)}function j(e){return e.startsWith(R)}function A(e){return j(e)?O+$(e):I(e)?e:O+e}function q(e,t){if("drafts"===t||"published"===t)throw Error('Version can not be "published" or "drafts"');return`${R}${t}.${$(e)}`}function S(e){if(!j(e))return;let[t,r,...n]=e.split(".");return r}function $(e){return j(e)?e.split(".").slice(2).join("."):I(e)?e.slice(O.length):e}var P=r(54833);let Z=/\r\n|[\n\r\u2028\u2029]/;function z(e,t){let r=0;for(let n=0;n<t.length;n++){let i=t[n].length+1;if(r+i>e)return{line:n+1,column:e-r};r+=i}return{line:t.length,column:t[t.length-1]?.length??0}}class N extends Error{response;statusCode=400;responseBody;details;constructor(e,t){let r=D(e,t);super(r.message),Object.assign(this,r)}}class U extends Error{response;statusCode=500;responseBody;details;constructor(e){let t=D(e);super(t.message),Object.assign(this,t)}}function D(e,t){let r=e.body,n={response:e,statusCode:e.statusCode,responseBody:-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(r,null,2):r,message:"",details:void 0};if(!(0,C.Uy)(r))return n.message=B(e,r),n;let i=r.error;if("string"==typeof i&&"string"==typeof r.message)return n.message=`${i} - ${r.message}`,n;if("object"!=typeof i||null===i)return"string"==typeof i?n.message=i:"string"==typeof r.message?n.message=r.message:n.message=B(e,r),n;if("type"in i&&"mutationError"===i.type&&"description"in i&&"string"==typeof i.description||"type"in i&&"actionError"===i.type&&"description"in i&&"string"==typeof i.description){let e=i.items||[],t=e.slice(0,5).map(e=>e.error?.description).filter(Boolean),s=t.length?`: 2- ${t.join(` 3- `)}`:"";return e.length>5&&(s+=` 4...and ${e.length-5} more`),n.message=`${i.description}${s}`,n.details=r.error,n}if(L(i)){let e=t?.options?.query?.tag;return n.message=M(i,e),n.details=r.error,n}return"description"in i&&"string"==typeof i.description?(n.message=i.description,n.details=i):n.message=B(e,r),n}function L(e){return(0,C.Uy)(e)&&"queryParseError"===e.type&&"string"==typeof e.query&&"number"==typeof e.start&&"number"==typeof e.end}function M(e,t){let{query:r,start:n,end:i,description:s}=e;if(!r||typeof n>"u")return`GROQ query parse error: ${s}`;let a=t?` 5 6Tag: ${t}`:"";return`GROQ query parse error: 7${function(e,t,r){let n=e.split(Z),{start:i,end:s,markerLines:a}=function(e,t){let r={...e.start},n={...r,...e.end},i=r.line??-1,s=r.column??0,a=n.line,o=n.column,u=Math.max(i-3,0),c=Math.min(t.length,a+3);-1===i&&(u=0),-1===a&&(c=t.length);let l=a-i,d={};if(l)for(let e=0;e<=l;e++){let r=e+i;if(s){if(0===e){let e=t[r-1].length;d[r]=[s,e-s+1]}else if(e===l)d[r]=[0,o];else{let n=t[r-e].length;d[r]=[0,n]}}else d[r]=!0}else s===o?s?d[i]=[s,0]:d[i]=!0:d[i]=[s,o-s];return{start:u,end:c,markerLines:d}}({start:z(t.start,n),end:t.end?z(t.end,n):void 0},n),o=`${s}`.length;return e.split(Z,s).slice(i,s).map((e,t)=>{let n=i+1+t,s=` ${` ${n}`.slice(-o)} |`,u=a[n],c=!a[n+1];if(!u)return` ${s}${e.length>0?` ${e}`:""}`;let l="";if(Array.isArray(u)){let t=e.slice(0,Math.max(u[0]-1,0)).replace(/[^\t]/g," "),n=u[1]||1;l=[` 8 `,s.replace(/\d/g," ")," ",t,"^".repeat(n)].join(""),c&&r&&(l+=" "+r)}return[">",s,e.length>0?` ${e}`:"",l].join("")}).join(` 9`)}(r,{start:n,end:i},s)}${a}`}function B(e,t){let r="string"==typeof t?` (${t.length>100?`${t.slice(0,100)}\u2026`:t})`:"",n=e.statusMessage?` ${e.statusMessage}`:"";return`${e.method}-request to ${e.url} resulted in HTTP ${e.statusCode}${n}${r}`}
9class F extends Error{projectId;addOriginUrl;constructor({projectId:e}){super("CorsOriginError"),this.name="CorsOriginError",this.projectId=e;let t=new URL(`https://sanity.io/manage/project/${e}/api`);if("u">typeof location){let{origin:e}=location;t.searchParams.set("cors","add"),t.searchParams.set("origin",e),this.addOriginUrl=t,this.message=`The current origin is not allowed to connect to the Live Content API. Add it here: ${t}`}else this.message=`The current origin is not allowed to connect to the Live Content API. Change your configuration here: ${t}`}}let V={onResponse:(e,t)=>{if(e.statusCode>=500)throw new U(e);if(e.statusCode>=400)throw new N(e,t);return e}};function W(e,t={}){return(0,i.xl)([(0,s.XD)({shouldRetry:H}),...e,function(e={}){let t={},r=t=>void 0!==e.ignoreWarnings&&(Array.isArray(e.ignoreWarnings)?e.ignoreWarnings:[e.ignoreWarnings]).some(e=>"string"==typeof e?t.includes(e):e instanceof RegExp&&e.test(t));return{onResponse:e=>{let n=e.headers["x-sanity-warning"];for(let e of Array.isArray(n)?n:[n])!e||t[e]||r(e)||(t[e]=!0,console.warn(e));return e}}}(t),(0,s.ll)(),(0,s.wE)(),(0,s.YD)(),V,(0,s.LO)({implementation:a.y})])}function H(e,t,r){if(0===r.maxRetries)return!1;let n="GET"===r.method||"HEAD"===r.method,i=(r.uri||r.url).startsWith("/data/query"),a=e.response&&(429===e.response.statusCode||502===e.response.statusCode||503===e.response.statusCode);return(!!n||!!i)&&!!a||s.XD.shouldRetry(e,t,r)}function K(e){return"https://www.sanity.io/help/"+e}let G=["image","file"],J=["before","after","replace"],X=e=>{if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(e))throw Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")},Y=e=>{if(!/^[-a-z0-9]+$/i.test(e))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")},Q=e=>{if(-1===G.indexOf(e))throw Error(`Invalid asset type: ${e}. Must be one of ${G.join(", ")}`)},ee=(e,t)=>{if(null===t||"object"!=typeof t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},et=(e,t)=>{if("string"!=typeof t||!/^[a-z0-9_][a-z0-9_.-]{0,127}$/i.test(t)||t.includes(".."))throw Error(`${e}(): "${t}" is not a valid document ID`)},er=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);et(e,t._id)},en=(e,t)=>{if("string"!=typeof t)throw Error(`\`${e}()\`: \`${t}\` is not a valid document type`)},ei=(e,t)=>{if(!t._type)throw Error(`\`${e}()\` requires that the document contains a type (\`_type\` property)`);en(e,t._type)},es=(e,t)=>{if(t._id&&t._id!==e)throw Error(`The provided document ID (\`${t._id}\`) does not match the generated version ID (\`${e}\`)`)},ea=(e,t,r)=>{let n="insert(at, selector, items)";if(-1===J.indexOf(e)){let e=J.map(e=>`"${e}"`).join(", ");throw Error(`${n} takes an "at"-argument which is one of: ${e}`)}if("string"!=typeof t)throw Error(`${n} takes a "selector"-argument which must be a string`);if(!Array.isArray(r))throw Error(`${n} takes an "items"-argument which must be an array`)},eo=e=>{if(e.dataset)return e.dataset;let t=e.resource;if(t&&"dataset"===t.type){let e=t.id.split(".");if(2!==e.length)throw Error('Dataset resource ID must be in the format "project.dataset"');return e[1]}throw Error("`dataset` must be provided to perform queries")},eu=e=>{if("string"!=typeof e||!/^[a-z0-9._-]{1,75}$/i.test(e))throw Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return e},ec=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:n}=t;switch(r){case"dataset":if(2!==n.split(".").length)throw Error('Dataset resource ID must be in the format "project.dataset"');return;case"dashboard":case"media-library":case"canvas":return;default:throw Error(`Unsupported resource type: ${r.toString()}`)}},el=(e,t)=>{if(t.resource)throw Error(`\`${e}\` does not support resource-based operations`)},ed=e=>{var t;let r,n;return t=(...t)=>console.warn(e.join(" "),...t),r=!1,(...e)=>(r||(n=t(...e),r=!0),n)},eh=ed(["Because you set `withCredentials` to true, we will override your `useCdn`","setting to be false since (cookie-based) credentials are never set on the CDN"]),ef=ed(["Since you haven't set a value for `useCdn`, we will deliver content using our","global, edge-cached API-CDN. If you wish to have content delivered faster, set","`useCdn: false` to use the Live API. Note: You may incur higher costs using the live API."]),ep=ed(["The Sanity client is configured with the `perspective` set to `drafts` or `previewDrafts`, which doesn't support the API-CDN.","The Live API will be used instead. Set `useCdn: false` in your configuration to hide this warning."]),ey=ed(["The `previewDrafts` perspective has been renamed to `drafts` and will be removed in a future API version"]),em=ed(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${K("js-client-browser-token")} for more information and how to hide this warning.`]),eg=ed(["You have configured Sanity client to use a token, but also provided `withCredentials: true`.","This is no longer supported - only token will be used - remove `withCredentials: true`."]),ev=ed(["Using the Sanity client without specifying an API version is deprecated.",`See ${K("js-client-api-version")}`]),eb=(ed(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),ed(["You have called `createVersion()` with a defined `document`. The recommended approach is to provide a `baseId` and `releaseId` instead."])),ew=ed(["The `~experimental_resource` configuration property has been renamed to `resource`.","Please update your client configuration to use `resource` instead. Support for `~experimental_resource` will be removed in a future version."]),e_={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}},ex=["localhost","127.0.0.1","0.0.0.0"],eE=e=>-1!==ex.indexOf(e);function eC(e){if(Array.isArray(e)&&e.length>1&&e.includes("raw"))throw TypeError('Invalid API perspective value: "raw". The raw-perspective can not be combined with other perspectives')}let ek=(e,t)=>{let r={...t,...e,stega:{..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||e_.stega,..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||{}}};r.apiVersion||ev();let n={...e_,...r};n["~experimental_resource"]&&!n.resource&&(ew(),n.resource=n["~experimental_resource"]);let i=n.resource,s=n.useProjectHostname&&!i;if(typeof Promise>
9"u"){let e=K("js-client-promise-polyfill");throw Error(`No native Promise-implementation found, polyfill needed - see ${e}`)}if(s&&!n.projectId)throw Error("Configuration must contain `projectId`");if(i&&ec(n),"u">typeof n.perspective&&eC(n.perspective),"encodeSourceMap"in n)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMap' is not supported in '@sanity/client'. Did you mean 'stega.enabled'?");if("encodeSourceMapAtPath"in n)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMapAtPath' is not supported in '@sanity/client'. Did you mean 'stega.filter'?");if("boolean"!=typeof n.stega.enabled)throw Error(`stega.enabled must be a boolean, received ${n.stega.enabled}`);if(n.stega.enabled&&void 0===n.stega.studioUrl)throw Error("stega.studioUrl must be defined when stega.enabled is true");if(n.stega.enabled&&"string"!=typeof n.stega.studioUrl&&"function"!=typeof n.stega.studioUrl)throw Error(`stega.studioUrl must be a string or a function, received ${n.stega.studioUrl}`);let a="u">typeof window&&window.location&&window.location.hostname,o=a&&eE(window.location.hostname),u=!!n.token;n.withCredentials&&u&&(eg(),n.withCredentials=!1),a&&o&&u&&!0!==n.ignoreBrowserTokenWarning?em():typeof n.useCdn>"u"&&ef(),s&&Y(n.projectId),n.dataset&&X(n.dataset),"requestTagPrefix"in n&&(n.requestTagPrefix=n.requestTagPrefix?eu(n.requestTagPrefix).replace(/\.+$/,""):void 0),n.apiVersion=`${n.apiVersion}`.replace(/^v/,""),n.isDefaultApi=n.apiHost===e_.apiHost,!0===n.useCdn&&n.withCredentials&&eh(),n.useCdn=!1!==n.useCdn&&!n.withCredentials,function(e){if("1"===e||"X"===e)return;let t=new Date(e);if(!(/^\d{4}-\d{2}-\d{2}$/.test(e)&&t instanceof Date&&t.getTime()>0))throw Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}(n.apiVersion);let c=n.apiHost.split("://",2),l=c[0],d=c[1],h=n.isDefaultApi?"apicdn.sanity.io":d;return s?(n.url=`${l}://${n.projectId}.${d}/v${n.apiVersion}`,n.cdnUrl=`${l}://${n.projectId}.${h}/v${n.apiVersion}`):(n.url=`${n.apiHost}/v${n.apiVersion}`,n.cdnUrl=n.url),n};class eT extends Error{name="ConnectionFailedError"}class eO extends Error{name="DisconnectError";reason;constructor(e,t,r={}){super(e,r),this.reason=t}}
9class eR extends Error{name="ChannelError";data;constructor(e,t){super(e),this.data=t}}class eI extends Error{name="MessageError";data;constructor(e,t,r={}){super(e,r),this.data=t}}class ej extends Error{name="MessageParseError"}let eA=["channelError","disconnect"];function eq(e,t){return(0,o.P)(()=>{let t=e();return(0,u.b)(t)?t:(0,c.of)(t)}).pipe((0,l.z)(e=>new a.y(r=>{let n=t.includes("open"),i=t.includes("reconnect");function s(t){if("data"in t){let[e,n]=eS(t);r.error(e?new ej("Unable to parse EventSource error message",{cause:n}):new eI((n?.data).message,n));return}e.readyState===e.CLOSED?r.error(new eT("EventSource connection failed")):i&&r.next({type:"reconnect"})}function a(){r.next({type:"open"})}function o(t){let[n,i]=eS(t);if(n){r.error(new ej("Unable to parse EventSource message",{cause:n}));return}if("channelError"===t.type){let t=new URL(e.url).searchParams.get("tag");r.error(new eR(function(e,t){let r=e.error;return r?L(r)?M(r,t):r.description?r.description:"string"==typeof r?r:JSON.stringify(r,null,2):e.message||"Unknown listener error"}(i?.data,t),i.data));return}if("disconnect"===t.type){r.error(new eO(`Server disconnected client: ${i.data?.reason||"unknown error"}`));return}r.next({type:t.type,id:t.lastEventId,...i.data?{data:i.data}:{}})}e.addEventListener("error",s),n&&e.addEventListener("open",a);let u=[...new Set([...eA,...t])].filter(e=>"error"!==e&&"open"!==e&&"reconnect"!==e);return u.forEach(t=>e.addEventListener(t,o)),()=>{e.removeEventListener("error",s),n&&e.removeEventListener("open",a),u.forEach(t=>e.removeEventListener(t,o)),e.close()}})))}function eS(e){try{let t="string"==typeof e.data&&JSON.parse(e.data);return[null,{type:e.type,id:e.lastEventId,...!function(e){for(let t in e)return!1;return!0}(t)?{data:t}:{}}]}catch(e){return[e,null]}}function e$(e){if("string"==typeof e)return{id:e};if(Array.isArray(e))return{query:"*[_id in $ids]",params:{ids:e}};if("object"==typeof e&&null!==e&&"query"in e&&"string"==typeof e.query)return"params"in e&&"object"==typeof e.params&&null!==e.params?{query:e.query,params:e.params}:{query:e.query};let t=["* Document ID (<docId>)","* Array of document IDs","* Object containing `query`"].join(` 10`);throw Error(`Unknown selection - must be one of: 11 12${t}`)}class eP{selection;operations;constructor(e,t={}){this.selection=e,this.operations=t}set(e){return this._assign("set",e)}setIfMissing(e){return this._assign("setIfMissing",e)}diffMatchPatch(e){return ee("diffMatchPatch",e),this._assign("diffMatchPatch",e)}unset(e){if(!Array.isArray(e))throw Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=Object.assign({},this.operations,{unset:e}),this}inc(e){return this._assign("inc",e)}dec(e){return this._assign("dec",e)}insert(e,t,r){return ea(e,t,r),this._assign("insert",{[e]:t,items:r})}append(e,t){return this.insert("after",`${e}[-1]`,t)}prepend(e,t){return this.insert("before",`${e}[0]`,t)}splice(e,t,r,n){let i=t<0?t-1:t,s=typeof r>"u"||-1===r?-1:Math.max(0,t+r),a=`${e}[${i}:${i<0&&s>=0?"":s}]`;return this.insert("replace",a,n||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...e$(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,r=!0){return ee(e,t),this.operations=Object.assign({},this.operations,{[e]:Object.assign({},r&&this.operations[e]||{},t)}),this}_set(e,t){return this._assign(e,t,!1)}}class eZ extends eP{#e;constructor(e,t,r){super(e,t),this.#e=r}clone(){return new eZ(this.selection,{...this.operations},this.#e)}commit(e){if(!this.#e)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},e);return this.#e.mutate({patch:this.serialize()},t)}}class ez extends eP{#e;constructor(e,t,r){super(e,t),this.#e=r}clone(){return new ez(this.selection,{...this.operations},this.#e)}commit(e){if(!this.#e)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},e);return this.#e.mutate({patch:this.serialize()},t)}}let eN={returnDocuments:!1};class eU{operations;trxId;constructor(e=[],t){this.operations=e,this.trxId=t}create(e){return ee("create",e),this._add({create:e})}createIfNotExists(e){let t="createIfNotExists";return ee(t,e),er(t,e),this._add({[t]:e})}createOrReplace(e){let t="createOrReplace";return ee(t,e),er(t,e),this._add({[t]:e})}delete(e){return et("delete",e),this._add({delete:{id:e}})}transactionId(e){return e?(this.trxId=e,this):this.trxId}serialize(){return[...this.operations]}toJSON(){return this.serialize()}reset(){return this.operations=[],this}_add(e){return this.operations.push(e),this}}class eD extends eU{#e;constructor(e,t,r){super(e,r),this.#e=t}clone(){return new eD([...this.operations],this.#e,this.trxId)}commit(e){if(!this.#e)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#e.mutate(this.serialize(),Object.assign({transactionId:this.trxId},eN,e||{}))}patch(e,t){let r="function"==typeof t,n="string"!=typeof e&&e instanceof ez,i="object"==typeof e&&("query"in e||"id"in e);if(n)return this._add({patch:e.serialize()});if(r){let r=t(new ez(e,{},this.#e));if(!(r instanceof ez))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}if(i){let r=new ez(e,t||{},this.#e);return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}class eL extends eU{#e;constructor(e,t,r){super(e,r),this.#e=t}clone(){return new eL([...this.operations],this.#e,this.trxId)}commit(e){if(!this.#e)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#e.mutate(this.serialize(),Object.assign({transactionId:this.trxId},eN,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof eZ)return this._add({patch:e.serialize()});if(r){let r=t(new eZ(e,{},this.#e));if(!(r instanceof eZ))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}let eM=({query:e,params:t={},options:r={}})=>{let n=new URLSearchParams,{tag:i,includeMutations:s,returnQuery:a,...o}=r;for(let[r,s]of(i&&n.append("tag",i),n.append("query",e),Object.entries(t)))void 0!==s&&n.append(`$${r}`,JSON.stringify(s));for(let[e,t]of Object.entries(o))t&&n.append(e,`${t}`);return!1===a&&n.append("returnQuery","false"),!1===s&&n.append("includeMutations","fal
12se"),`?${n}`},eB=(e,t)=>!1===e?void 0:typeof e>"u"?t:e,eF=(e={})=>({dryRun:e.dryRun,returnIds:!0,returnDocuments:eB(e.returnDocuments,!0),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}),eV=e=>"response"===e.type,eW=e=>e.body,eH=(e,t)=>e.reduce((e,r)=>(e[t(r)]=r,e),Object.create(null));function eK(e,t,n,i,s={},a={}){let o="stega"in a?{...n||{},..."boolean"==typeof a.stega?{enabled:a.stega}:a.stega||{}}:n,u=o.enabled?(0,C.NG)(s):s,c=!1===a.filterResponse?e=>e:e=>e.result,{cache:l,next:h,...f}={useAbortSignal:"u">typeof a.signal,resultSourceMap:o.enabled?"withKeyArraySelector":a.resultSourceMap,...a,returnQuery:!1===a.filterResponse&&!1!==a.returnQuery},p=e4(e,t,"query",{query:i,params:u},"u">typeof l||"u">typeof h?{...f,fetch:{cache:l,next:h}}:f);return o.enabled?p.pipe((0,k.V)((0,d.D)(r.e(9577).then(r.bind(r,49577)).then(function(e){return e.stegaEncodeSourceMap$1}).then(({stegaEncodeSourceMap:e})=>e))),(0,x.U)(([e,t])=>{let r=t(e.result,e.resultSourceMap,o);return c({...e,result:r})})):p.pipe((0,x.U)(c))}function eG(e,t,r,n={}){let i={uri:tc(e,"doc",(()=>{if(!n.releaseId)return r;let e=S(r);if(!e){if(I(r))throw Error(`The document ID (\`${r}\`) is a draft, but \`options.releaseId\` is set as \`${n.releaseId}\``);return q(r,n.releaseId)}if(e!==n.releaseId)throw Error(`The document ID (\`${r}\`) is already a version of \`${e}\` release, but this does not match the provided \`options.releaseId\` (\`${n.releaseId}\`)`);return r})()),json:!0,tag:n.tag,signal:n.signal,query:void 0!==n.includeAllVersions?{includeAllVersions:n.includeAllVersions}:void 0};return to(e,t,i).pipe((0,T.h)(eV),(0,x.U)(e=>{let t=e.body.documents;return t?n.includeAllVersions?t:t[0]:n.includeAllVersions?[]:void 0}))}function eJ(e,t,r,n={}){let i={uri:tc(e,"doc",r.join(",")),json:!0,tag:n.tag,signal:n.signal};return to(e,t,i).pipe((0,T.h)(eV),(0,x.U)(e=>{let t=eH(e.body.documents||[],e=>e._id);return r.map(e=>t[e]||null)}))}function eX(e,t,r,n={}){return e4(e,t,"query",{query:"*[sanity::partOfRelease($releaseId)]",params:{releaseId:r}},n)}function eY(e,t,r,n){return er("createIfNotExists",r),e7(e,t,r,"createIfNotExists",n)}function eQ(e,t,r,n){return er("createOrReplace",r),e7(e,t,r,"createOrReplace",n)}function e0(e,t,r,n,i){return er("createVersion",r),ei("createVersion",r),eb(),e5(e,t,{actionType:"sanity.action.document.version.create",publishedId:n,document:r},i)}function e1(e,t,r,n,i,s,a){if(!n)throw Error("`createVersion()` requires `baseId` when no `document` is provided");if(!r)throw Error("`createVersion()` requires `publishedId` when `baseId` is provided");return et("createVersion",n),et("createVersion",r),e5(e,t,{actionType:"sanity.action.document.version.create",publishedId:r,baseId:n,versionId:i?q(r,i):A(r),ifBaseRevisionId:s},a)}function e2(e,t,r,n){return e4(e,t,"mutate",{mutations:[{delete:e$(r)}]},n)}function e6(e,t,r,n=!1,i){return e5(e,t,{actionType:"sanity.action.document.version.discard",versionId:r,purge:n},i)}function e3(e,t,r,n){return er("replaceVersion",r),ei("replaceVersion",r),e5(e,t,{actionType:"sanity.action.document.version.replace",document:r},n)}function e8(e,t,r,n,i){return e5(e,t,{actionType:"sanity.action.document.version.unpublish",versionId:r,publishedId:n},i)}function e9(e,t,r,n){let i;return e4(e,t,"mutate",{mutations:Array.isArray(i=r instanceof ez||r instanceof eZ?{patch:r.serialize()}:r instanceof eD||r instanceof eL?r.serialize():r)?i:[i],transactionId:n&&n.transactionId||void 0},n)}function e5(e,t,r,n){let i=Array.isArray(r)?r:[r];return e4(e,t,"actions",{actions:i,transactionId:n&&n.transactionId||void 0,skipCrossDatasetReferenceValidation:n&&n.skipCrossDatasetReferenceValidation||void 0,dryRun:n&&n.dryRun||void 0},n)}function e4(e,t,r,n,i={}){let s="mutate"===r,a="actions"===r,o=s||a?"":eM(n),u=!s&&!a&&o.length<11264,c=i.returnFirst,{timeout:l,token:d,tag:h,headers:f,returnQuery:p,lastLiveEventId:y,cacheMode:m}=i,g=tc(e,r,u?o:"");return to(e,t,{method:u?"GET":"POST",uri:g,json:!0,body:u?void 0:n,query:s&&eF(i),timeout:l,headers:f,token:d,tag:h,returnQuery:p,perspective:i.perspective,resultSourceMap:i.resultSourceMap,lastLiveEventId:Array.isArray(y)?y[0]:y,cacheMode:m,canUseCdn:"query"===r,signal:i.signal,fetch:i.fetch,useAbortSignal:i.useAbortSignal,useCdn:i.useCdn}).pipe((0,T.h)(eV),(0,x.U)(eW),(0,x.U)(e=>{if(!s)return e;let t=e.results||[];if(i.returnDocuments)return c?t[0]&&t[0].document:t.map(e=>e.document);let r=c?t[0]&&t[0].id:t.map(e=>e.id);return{transactionId:e.transactionId,results:t,[c?"documentId":"documentIds"]:r}}))}function e7(e,t,r,n,i={}){return e4(e,t,"mutate",{mutations:[{[n]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},i))}let te=e=>{let t=e.config();return void 0!==t.dataset&&void 0!==t.projectId||void 0!==t.resource},tt=(e,t)=>te(e)&&t.startsWith(tc(e,"query")),tr=(e,t)=>te(e)&&t.startsWith(tc(e,"mutate")),tn=(e,t)=>te(e)&&t.startsWith(tc(e,"doc","")),ti=(e,t)=>te(e)&&t.startsWith(tc(e,"listen")),ts=(e,t)=>te(e)&&t.startsWith(tc(e,"history","")),ta=(e,t)=>t.startsWith("/data/")||tt(e,t)||tr(e,t)||tn(e,t)||ti(e,t)||ts(e,t);function to(e,t,r){var n;let i=r.url||r.uri,s=e.config(),o=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&ta(e,i):r.canUseCdn,u=(r.useCdn??s.useCdn)&&o,c=r.tag&&s.requestTagPrefix?[s.requestTagPrefix,r.tag].join("."):r.tag||s.requestTagPrefix;if(c&&null!==r.tag&&(r.query={tag:eu(c),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&tt(e,i)){let e=r.resultSourceMap??s.resultSourceMap;void 0!==e&&!1!==e&&(r.query={resultSourceMap:e,...r.query});let t=r.perspective||s.perspective;"u">typeof t&&("previewDrafts"===t&&ey(),eC(t),r.query={perspective:Array.isArray(t)?t.join(","):t,...r.query},(Array.isArray(t)&&t.length>0||"previewDrafts"===t||"drafts"===t)&&u&&(u=!1,ep())),r.lastLiveEventId&&(r.query={...r.query,lastLiveEventId:r.lastLiveEventId}),!1===r.returnQuery&&(r.query={returnQuery:"false",...r.query}),u&&"noStale"==r.cacheMode&&(r.query={cacheMode:"noStale",...r.query})}let l=function(e,t={}){let r={};e.headers&&Object.assign(r,e.headers);let n=t.token||e.token;n&&(r.Authorization=`Bearer ${n}`),t.useGlobalApi||e.useProjectHostname||!e.projectId||(r["X-Sanity-Project-ID"]=e.projectId);let i=!!(typeof t.withCredentials>"u"?e.withCredentials:t.withCredentials),s=typeof t.timeout>"u"?e.timeout:t.timeout;return Object.assign({},t,{headers:Object.assign({},r,t.headers||{}),timeout:typeof s>"u"?3e5:s,proxy:t.proxy||e.proxy,json:!0,withCredentials:i,fetch:"object"==typeof t.fetch&&"object"==typeof e.fetch?{...e.fetch,...t.fetch}:t.fetch||e.fetch})}(s,Object.assign({},r,{url:tl(e,i,u)})),d=new a.y(e=>t(l,s.requester).subscribe(e));return r.signal?d.pipe((n=r.signal,e=>new a.y(t=>{let r=()=>t.error(function(e){if(td)return new DOMException(e?.reason??"The operation was aborted.","AbortError");let t=Error(e?.reason??"The operation was aborted.");return t.name="AbortError",t}(n));if(n&&n.aborted){r();return}let i=e.subscribe(t);return n.addEventListener("abort",r),()=>{n.removeEventListener("abort",r),i.unsubscribe()}}))):d}function tu(e,t,r){return to(e,t,r).pipe((0,T.h)(e=>"response"===e.type),(0,x.U)(e=>e.body))}function tc(e,t,r){let n=e.config();if(n.resource){ec(n);let e=th(n),i=void 0!==r?`${t}/${r}`:t;return`${e}/${i}`.replace(/\/($|\?)/,"$1")}let i=eo(n),s=`/${t}/${i}`;return`/data${void 0!==r?`${s}/${r}`:s}`.replace(/\/($|\?)/,"$1")}function tl(e,t,r=!1){let{url:n,cdnUrl:i}=e.config();return`${r?i:n}/${t.replace(/^\//,"")}`}let td=!!globalThis.DOMException,th=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:n}=t;switch(r){case"dataset":{let e=n.split(".");if(2!==e.length)throw Error('Dataset ID must be in the format "project.dataset"');return`/projects/${e[0]}/datasets/${e[1]}`}case"canvas":return`/canvases/${n}`;case"media-library":return`/media-libraries/${n}`;case"dashboard":return`/dashboards/${n}`;default:throw Error(`Unsupported resource type: ${r.toString()}`)}};function tf(e,t,r){let n=eo(e.config());return tu(e,t,{method:"POST",uri:`/agent/action/generate/${n}`,body:r})}function tp(e,t,r){let n=eo(e.config());return tu(e,t,{method:"POST",uri:`/agent/action/transform/${n}`,body:r})}function ty(e,t,r){let n=eo(e.config());return tu(e,t,{method:"POST",uri:`/agent/action/translate/${n}`,body:r})}class tm{#e;#t;constructor(e,t){this.#e=e,this.#t=t}generate(e){return tf(this.#e,this.#t,e)}transform(e){return tp(this.#e,this.#t,e)}translate(e){return ty(this.#e,this.#t,e)}}class tg{#e;#t;constructor(e,t){this.#e=e,this.#t=t}generate(e){return(0,h.n)(tf(this.#e,this.#t,e))}transform(e){return(0,h.n)(tp(this.#e,this.#t,e))}translate(e){return(0,h.n)(ty(this.#e,this.#t,e))}prompt(e){return(0,h.n)(function(e,t,r){let n=eo(e.config());return tu(e,t,{method:"POST",uri:`/agent/action/prompt/${n}`,body:r})}(this.#e,this.#t,e))}patch(e){return(0,h.n)(function(e,t,r){let n=eo(e.config());return tu(e,t,{method:"POST",uri:`/agent/action/patch/${n}`,body:r})}(this.#e,this.#t,e))}}class tv{#e;#t;constructor(e,t){this.#e=e,this.#t=t}upload(e,t,r){return tw(this.#e,this.#t,e,t,r)}}class tb{#e;#t;constructor(e,t){this.#e=e,this.#t=t}upload(e,t,r){let n=tw(this.#e,this.#t,e,t,r);return(0,h.n)(n.pipe((0,T.h)(e=>"response"===e.type),(0,x.U)(e=>e.body.document)))}}function tw(e,t,r,n,i={}){Q(r);let s=i.extract||void 0;s&&!s.length&&(s=["none"]);let a=e.config(),o=!(typeof File>"u")&&n instanceof File?Object.assign({filename:!1===i.preserveFilename?void 0:n.name,contentType:n.type},i):i,{tag:u,label:c,title:l,description:d,creditLine:h,filename:f,source:p}=o,y=a.resource?.type==="media-library",m=y?{title:l,filename:f}:{label:c,title:l,description:d,filename:f,meta:s,creditLine:h};return p&&!y&&(m.sourceId=p.id,m.sourceName=p.name,m.sourceUrl=p.url),to(e,t,{tag:u,method:"POST",timeout:o.timeout||0,uri:function(e,t){let r="image"===t?"images":"files",n=e.resource;if(n){let{type:e,id:t}=n;switch(e){case"dataset":throw Error("Assets are not supported for dataset resources, yet. Configure the client with `{projectId: <projectId>, dataset: <datasetId>}` instead.");case"canvas":return`/canvases/${t}/assets/${r}`;case"media-library":return`/media-libraries/${t}/upload`;case"dashboard":return`/dashboards/${t}/assets/${r}`;default:throw Error(`Unsupported resource type: ${e.toString()}`)}}let i=eo(e);return`assets/${r}/${i}`}(a,r),headers:o.contentType?{"Content-Type":o.contentType}:{},query:m,body:n})}var t_=(e,t)=>
12Object.keys(t).concat(Object.keys(e)).reduce((r,n)=>(r[n]=typeof e[n]>"u"?t[n]:e[n],r),{});let tx=(e,t)=>t.reduce((t,r)=>(typeof e[r]>"u"||(t[r]=e[r]),t),{}),tE=(0,o.P)(()=>r.e(3003).then(r.t.bind(r,23003,19))).pipe((0,x.U)(({default:e})=>e),(0,f.d)(1));function tC(){return function(e){return e.pipe((0,p.K)((e,t)=>e instanceof eT?(0,y.z)((0,c.of)({type:"reconnect"}),(0,m.H)(1e3).pipe((0,l.z)(()=>t))):(0,g._)(()=>e)))}}let tk=["includePreviousRevision","includeResult","includeMutations","includeAllVersions","visibility","effectFormat","tag"],tT={includeResult:!0};function tO(e,t,r={}){let{url:n,token:i,withCredentials:s,requestTagPrefix:a,headers:o}=this.config(),u=r.tag&&a?[a,r.tag].join("."):r.tag,l={...t_(r,tT),tag:u},d=eM({query:e,params:t,options:{tag:u,...tx(l,tk)}}),h=`${n}${tc(this,"listen",d)}`;if(h.length>14800)return(0,g._)(()=>Error("Query too large for listener"));let f=l.events?l.events:["mutation"],p={};return s&&(p.withCredentials=!0),(i||o)&&(p.headers={},i&&(p.headers.Authorization=`Bearer ${i}`),o&&Object.assign(p.headers,o)),eq(()=>(typeof EventSource>"u"||p.headers?tE:(0,c.of)(EventSource)).pipe((0,x.U)(e=>new e(h,p))),f).pipe(tC(),(0,T.h)(e=>f.includes(e.type)),(0,x.U)(e=>({type:e.type,..."data"in e?e.data:{}})))}let tR="2021-03-25";class tI{#e;constructor(e){this.#e=e}events({includeDrafts:e=!1,tag:t}={}){var r,n,i;el("live",this.#e.config());let{projectId:s,apiVersion:o,token:u,withCredentials:d,requestTagPrefix:h,headers:f}=this.#e.config(),y=o.replace(/^v/,"");if("X"!==y&&y<tR)throw Error(`The live events API requires API version ${tR} or later. The current API version is ${y}. Please update your API version to use this feature.`);if(e&&!u&&!d)throw Error("The live events API requires a token or withCredentials when 'includeDrafts: true'. Please update your client configuration. The token should have the lowest possible access role.");let m=tc(this.#e,"live/events"),g=new URL(this.#e.getUrl(m,!1)),E=t&&h?[h,t].join("."):t;E&&g.searchParams.set("tag",E),e&&g.searchParams.set("includeDrafts","true");let C={};e&&d&&(C.withCredentials=!0),(e&&u||f)&&(C.headers={},e&&u&&(C.headers.Authorization=`Bearer ${u}`),f&&Object.assign(C.headers,f));let k=`${g.href}::${JSON.stringify(C)}`,T=tj.get(k);if(T)return T;let O=eq(()=>(typeof EventSource>"u"||C.headers?tE:(0,c.of)(EventSource)).pipe((0,x.U)(e=>new e(g.href,C))),["message","restart","welcome","reconnect","goaway"]),R=(n={method:"OPTIONS",mode:"cors",credentials:C.withCredentials?"include":"omit",headers:C.headers},new a.y(e=>{let t=new AbortController,r=t.signal;return fetch(g,{...n,signal:t.signal}).then(t=>{e.next(t),e.complete()},t=>{r.aborted||e.error(t)}),()=>t.abort()})).pipe((0,p.K)(()=>{throw new F({projectId:s})})),I=O.pipe(tC(),(0,l.z)(e=>"reconnect"===e.type?R.pipe((0,l.z)(()=>(0,c.of)(e))):(0,c.of)(e)),(0,p.K)(e=>R.pipe((0,l.z)(()=>{throw e}))),(0,x.U)(e=>{if("message"===e.type){let{data:t,...r}=e;return{...r,tags:t.tags}}return e})).pipe((0,b.x)(()=>tj.delete(k)),(i="function"==typeof(r={predicate:e=>"welcome"===e.type})?{predicate:r}:r,e=>{let t,r=!1,{predicate:n,...s}=i,o=e.pipe((0,v.b)(e=>{i.predicate(e)&&(r=!0,t=e)}),(0,b.x)(()=>{r=!1,t=void 0}),(0,w.B)(s)),u=new a.y(e=>{r&&e.next(t),e.complete()});return(0,_.T)(o,u)}));return tj.set(k,I),I}}let tj=new Map;class tA{#e;#t;constructor(e,t){this.#e=e,this.#t=t}create(e,t){return tS(this.#e,this.#t,"PUT",e,t)}edit(e,t){return tS(this.#e,this.#t,"PATCH",e,t)}delete(e){return tS(this.#e,this.#t,"DELETE",e)}list(){el("dataset",this.#e.config());let e=this.#e.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),tu(this.#e,this.#t,{uri:r,tag:null})}}class tq{#e;#t;constructor(e,t){this.#e=e,this.#t=t}create(e,t){return el("dataset",this.#e.config()),(0,h.n)(tS(this.#e,this.#t,"PUT",e,t))}edit(e,t){return el("dataset",this.#e.config()),(0,h.n)(tS(this.#e,this.#t,"PATCH",e,t))}delete(e){return el("dataset",this.#e.config()),(0,h.n)(tS(this.#e,this.#t,"DELETE",e))}list(){el("dataset",this.#e.config());let e=this.#e.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),(0,h.n)(tu(this.#e,this.#t,{uri:r,tag:null}))}}function tS(e,t,r,n,i){return el("dataset",e.config()),X(n),tu(e,t,{method:r,uri:`/datasets/${n}`,body:i,tag:null})}class t${#e;#t;constructor(e,t){this.#e=e,this.#t=t}getPlaybackInfo(e,t={}){let r=this.#e.config(),n=(r.resource||r["~experimental_resource"])?.id,{instanceId:i,library
12Id:s}=function(e){let t="object"==typeof e&&"_ref"in e?e._ref:e,r=tZ.exec(t);if(r){let[,e,t]=r;return{libraryId:e,instanceId:t}}if("string"==typeof e&&e.startsWith("video-"))return{instanceId:e};throw Error(`Invalid video asset instance identifier "${t}": must be a valid video instance id or a Global Dataset Reference (GDR) to the video asset in the Media Library`)}(e),a=s||n;if(!a)throw Error("Could not determine Media Library ID - you need to provide a valid Media Library ID in the client config or a Media Library GDR");let o=`/media-libraries/${a}/video/${i}/playback-info`,u=function(e){let t={};if(e.transformations){let{thumbnail:r,animated:n,storyboard:i}=e.transformations;r&&(r.width&&(t.thumbnailWidth=r.width),r.height&&(t.thumbnailHeight=r.height),void 0!==r.time&&(t.thumbnailTime=r.time),r.fit&&(t.thumbnailFit=r.fit),r.format&&(t.thumbnailFormat=r.format)),n&&(n.width&&(t.animatedWidth=n.width),n.height&&(t.animatedHeight=n.height),void 0!==n.start&&(t.animatedStart=n.start),void 0!==n.end&&(t.animatedEnd=n.end),n.fps&&(t.animatedFps=n.fps),n.format&&(t.animatedFormat=n.format)),i&&i.format&&(t.storyboardFormat=i.format)}return e.expiration&&(t.expiration=e.expiration),t}(t);return tu(this.#e,this.#t,{method:"GET",uri:o,query:u})}}class tP{#e;#t;constructor(e,t){this.#e=e,this.#t=t}getPlaybackInfo(e,t={}){return(0,h.n)(new t$(this.#e.observable,this.#t).getPlaybackInfo(e,t))}}let tZ=/^media-library:(ml[^:]+):([^:]+)$/;class tz{#e;#t;constructor(e,t){this.#e=e,this.#t=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.organizationId&&(t.organizationId=e.organizationId),tu(this.#e,this.#t,{uri:"/projects",query:t})}getById(e){return tu(this.#e,this.#t,{uri:`/projects/${e}`})}}class tN{#e;#t;constructor(e,t){this.#e=e,this.#t=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.organizationId&&(t.organizationId=e.organizationId),(0,h.n)(tu(this.#e,this.#t,{uri:"/projects",query:t}))}getById(e){return(0,h.n)(tu(this.#e,this.#t,{uri:`/projects/${e}`}))}}let tU=(0,P.kP)("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",8),tD=(e,t)=>t?q(e,t):A(e);function tL(e,{releaseId:t,publishedId:r,document:n}){if(r&&n._id){let e=tD(r,t);return es(e,n),e}if(n._id){let r=I(n._id),i=j(n._id);if(!r&&!i)throw Error(`\`${e}()\` requires a document with an \`_id\` that is a version or draft ID`);if(t){if(r)throw Error(`\`${e}()\` was called with a document ID (\`${n._id}\`) that is a draft ID, but a release ID (\`${t}\`) was also provided.`);let i=S(n._id);if(i!==t)throw Error(`\`${e}()\` was called with a document ID (\`${n._id}\`) that is a version ID, but the release ID (\`${t}\`) does not match the document's version ID (\`${i}\`).`)}return n._id}if(r)return tD(r,t);throw Error(`\`${e}()\` requires either a publishedId or a document with an \`_id\``)}let tM=(e,t)=>{if("object"==typeof e&&null!==e&&("releaseId"in e||"metadata"in e)){let{releaseId:r=tU(),metadata:n={}}=e;return[r,n,t]}return[tU(),{},e]},tB=(e,t)=>{let[r,n,i]=tM(e,t);return{action:{actionType:"sanity.action.release.create",releaseId:r,metadata:{...n,releaseType:n.releaseType||"undecided"}},options:i}};class tF{#e;#t;constructor(e,t){this.#e=e,this.#t=t}get({releaseId:e},t){return eG(this.#e,this.#t,`_.releases.${e}`,t)}create(e,t){let{action:r,options:n}=tB(e,t),{releaseId:i,metadata:s}=r;return e5(this.#e,this.#t,r,n).pipe((0,x.U)(e=>({...e,releaseId:i,metadata:s})))}edit({releaseId:e,patch:t},r){return e5(this.#e,this.#t,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r)}publish({releaseId:e},t){return e5(this.#e,this.#t,{actionType:"sanity.action.release.publish",releaseId:e},t)}archive({releaseId:e},t){return e5(this.#e,this.#t,{actionType:"sanity.action.release.archive",releaseId:e},t)}unarchive({releaseId:e},t){return e5(this.#e,this.#t,{actionType:"sanity.action.release.unarchive",releaseId:e},t)}schedule({releaseId:e,publishAt:t},r){return e5(this.#e,this.#t,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r)}unschedule({releaseId:e},t){return e5(this.#e,this.#t,{actionType:"sanity.action.release.unschedule",releaseId:e},t)}delete({releaseId:e},t){return e5(this.#e,this.#t,{actionType:"sanity.action.release.delete",releaseId:e},t)}fetchDocuments({releaseId:e},t){return eX(this.#e,this.#t,e,t)}}class tV{#e;#t;constructor(e,t){this.#e=e,this.#t=t}get({releaseId:e},t){return(0,h.n)(eG(this.#e,this.#t,`_.releases.${e}`,t))}async create(e,t){let{action:r,options:n}=tB(e,t),{releaseId:i,metadata:s}=r;return{...await (0,h.n)(e5(this.#e,this.#t,r,n)),releaseId:i,metadata:s}}edit({releaseId:e,patch:t},r){return(0,h.n)(e5(this.#e,this.#t,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r))}publish({releaseId:e},t){return(0,h.n)(e5(this.#e,this.#t,{actionType:"sanity.action.release.publish",releaseId:e},t))}archive({releaseId:e},t){return(0,h.n)(e5(this.#e,this.#t,{actionType:"sanity.action.release.archive",releaseId:e},t))}unarchive({releaseId:e},t){return(0,h.n)(e5(this.#e,this.#t,{actionType:"sanity.action.release.unarchive",releaseId:e},t))}schedule({releaseId:e,publishAt:t},r){return(0,h.n)(e5(this.#e,this.#t,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r))}unschedule({releaseId:e},t){return(0,h.n)(e5(this.#e,this.#t,{actionType:"sanity.action.release.unschedule",releaseId:e},t))}delete({releaseId:e},t){return(0,h.n)(e5(this.#e,this.#t,{actionType:"sanity.action.release.delete",releaseId:e},t))}fetchDocuments({releaseId:e},t){return(0,h.n)(eX(this.#e,this.#t,e,t))}}class tW{#e;#t;constructor(e,t){this.#e=e,this.#t=t}getById(e){return tu(this.#e,this.#t,{uri:`/users/${e}`})}}class tH{#e;#t;constructor(e,t){this.#e=e,this.#t=t}getById(e){return(0,h.n)(tu(this.#e,this.#t,{uri:`/users/${e}`}))}}class tK{assets;datasets;live;mediaLibrary;projects;users;agent;releases;#r;#t;listen=tO;constructor(e,t=e_){this.config(t),this.#t=e,this.assets=new tv(this,this.#t),this.datasets=new tA(this,this.#t),this.live=new tI(this),this.mediaLibrary={video:new t$(this,this.#t)},this.projects=new tz(this,this.#t),this.users=new tW(this,this.#t),this.agent={action:new tm(this,this.#t)},this.releases=new tF(this,this.#t)}clone(){return new tK(this.#t,this.config())}config(e){if(void 0===e)return{...this.#r};if(this.#r&&!1===this.#r.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.#r=ek(e,this.#r||{}),this}withConfig(e){let t=this.config();return new tK(this.#t,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return eK(this,this.#t,this.#r.stega,e,t,r)}getDocument(e,t){if(t?.includeAllVersions===!0)return eG(this,this.#t,e,{...t,includeAllVersions:!0});let r={signal:t?.signal,tag:t?.tag,releaseId:t?.releaseId,...t&&"includeAllVersions"in t?{includeAllVersions:!1}:{}};return eG(this,this.#t,e,r)}getDocuments(e,t){return eJ(this,this.#t,e,t)}create(e,t){return e7(this,this.#t,e,"create",t)}createIfNotExists(e,t){return eY(this,this.#t,e,t)}createOrReplace(e,t){return eQ(this,this.#t,e,t)}createVersion({document:e,publishedId:t,releaseId:r,baseId:n,ifBaseRevisionId:i},s){if(!e)return e1(this,this.#t,t,n,r,i,s);let a=tL("createVersion",{document:e,publishedId:t,releaseId:r}),o={...e,_id:a},u=t||$(e._id);return e0(this,this.#t,o,u,s)}delete(e,t){return e2(this,this.#t,e,t)}discardVersion({releaseId:e,publishedId:t},r,n){let i=tD(t,e);return e6(this,this.#t,i,r,n)}replaceVersion({document:e,publishedId:t,releaseId:r},n){let i=tL("replaceVersion",{document:e,publishedId:t,releaseId:r}),s={...e,_id:i};return e3(this,this.#t,s,n)}unpublishVersion({releaseId:e,publishedId:t},r){let n=q(t,e);return e8(this,this.#t,n,t,r)}mutate(e,t){return e9(this,this.#t,e,t)}patch(e,t){return new eZ(e,t,this)}transaction(e){return new eL(e,this)}action(e,t){return e5(this,this.#t,e,t)}request(e){return tu(this,this.#t,e)}getUrl(e,t){return tl(this,e,t)}getDataUrl(e,t){return tc(this,e,t)}}class tG{assets;datasets;live;mediaLibrary;projects;users;agent;releases;observable;#r;#t;listen=tO;constructor(e,t=e_){this.config(t),this.#t=e,this.assets=new tb(this,this.#t),this.datasets=new tq(this,this.#t),this.live=new tI(this),this.mediaLibrary={video:new tP(this,this.#t)},this.projects=new tN(this,this.#t),this.users=new tH(this,this.#t),this.agent={action:new tg(this,this.#t)},this.releases=new tV(this,this.#t),this.observable=new tK(e,t)}clone(){return new tG(this.#t,this.config())}config(e){if(void 0===e)return{...this.#r};if(this.#r&&!1===this.#r.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.observable&&this.observable.config(e),this.#r=ek(e,this.#r||{}),this}withConfig(e){let t=this.config();return new tG(this.#t,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return(0,h.n)(eK(this,this.#t,this.#r.stega,e,t,r))}getDocument(e,t){if(t?.includeAllVersions===!0)return(0,h.n)(eG(this,this.#t,e,{...t,includeAllVersions:!0}));let r={signal:t?.signal,tag:t?.tag,releaseId:t?.releaseId,...t&&"includeAllVersions"in t?{includeAllVersions:!1}:{}};return(0,h.n)(eG(this,this.#t,e,r))}getDocuments(e,t){return(0,h.n)(eJ(this,this.#t,e,t))}create(e,t){return(0,h.n)(e7(this,this.#t,e,"create",t))}createIfNotExists(e,t){return(0,h.n)(eY(this,this.#t,e,t))}createOrReplace(e,t){return(0,h.n)(eQ(this,this.#t,e,t))}createVersion({document:e,publishedId:t,releaseId:r,baseId:n,ifBaseRevisionId:i},s){if(!e)return(0,E.z)(e1(this,this.#t,t,n,r,i,s));let a=tL("createVersion",{document:e,publishedId:t,releaseId:r}),o={...e,_id:a},u=t||$(e._id);return(0,E.z)(e0(this,this.#t,o,u,s))}delete(e,t){return(0,h.n)(e2(this,this.#t,e,t))}discardVersion({releaseId:e,publishedId:t},r,n){let i=tD(t,e);return(0,h.n)(e6(this,this.#t,i,r,n))}replaceVersion({document:e,publishedId:t,releaseId:r},n){let i=tL("replaceVersion",{document:e,publishedId:t,releaseId:r}),s={...e,_id:i};return(0,E.z)(e3(this,this.#t,s,n))}unpublishVersion({releaseId:e,publishedId:t},r){let n=q(t,e);return(0,h.n)(e8(this,this.#t,n,t,r))}mutate(e,t){return(0,h.n)(e9(this,this.#t,e,t))}patch(e,t){return new ez(e,t,this)}transaction(e){return new eD(e,this)}action(e,t){return(0,h.n)(e5(this,this.#t,e,t))}request(e){return(0,h.n)(tu(this,this.#t,e))}dataRequest(e,t,r){return(0,h.n)(e4(this,this.#t,e,t,r))}getUrl(e,t){return tl(this,e,t)}getDataUrl(e,t){return tc(this,e,t)}}let tJ={requester:W(n=[]),createClient:e=>{let t=W(n,{ignoreWarnings:e.ignoreWarnings});return new tG((r,n)=>(n||t)({maxRedirects:0,maxRetries:e.maxRetries,retryDelay:e.retryDelay,lineage:e.lineage,...r}),e)}},tX=(tJ.requester,tJ.createClient)},40639:function(e,t,r){"use strict";r.d(t,{g:function(){return c},p:function(){return s},v:function(){return u}});let n=!(typeof navigator>"u")&&"ReactNative"===navigator.product,i={timeout:n?6e4:12e4},s=function(e){let t={...i,..."string"==typeof e?{url:e}:e};if(t.timeout=function e(t){if(!1===t||0===t)return!1;if(t.connect||t.socket)return t;let r=Number(t);return isNaN(r)?e(i.timeout):{connect:r,socket:r}}(t.timeout),t.query){let{url:e,searchParams:r}=function(e){let t=e.indexOf("?");if(-1===t)return{url:e,searchParams:new URLSearchParams};let r=e.slice(0,t),i=e.slice(t+1);if(!n)return{url:r,searchParams:new URLSearchParams(i)};if("function"!=typeof decodeURIComponent)throw Error("Broken `URLSearchParams` implementation, and `decodeURIComponent` is not defined");let s=new URLSearchParams;for(let e of i.split("&")){let[t,r]=e.split("=");t&&s.append(a(t),a(r||""))}return{url:r,searchParams:s}}(t.url);for(let[n,i]of Object.entries(t.query)){if(void 0!==i){if(Array.isArray(i))for(let e of i)r.append(n,e);else r.append(n,i)}let s=r.toString();s&&(t.url=`${e}?${s}`)}}return t.method=t.body&&!t.method?"POST":(t.method||"GET").toUpperCase(),t};function a(e){return decodeURIComponent(e.replace(/\+/g," "))}let o=/^https?:\/\//i,u=function(e){if(!o.test(e.url))throw Error(`"${e.url}" is not a valid URL`)};
12function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},46415:function(e,t,r){"use strict";r.d(t,{xl:function(){return f}});var n=r(40639);let i=["request","response","progress","error","abort"],s=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];var a,o,u=(0,n.g)(function(){if(o)return a;o=1;var e=function(e){return e.replace(/^\s+|\s+$/g,"")};return a=function(t){if(!t)return{};for(var r=Object.create(null),n=e(t).split("\n"),i=0;i<n.length;i++){var s,a=n[i],o=a.indexOf(":"),u=e(a.slice(0,o)).toLowerCase(),c=e(a.slice(o+1));typeof r[u]>"u"?r[u]=c:(s=r[u],"[object Array]"===Object.prototype.toString.call(s))?r[u].push(c):r[u]=[r[u],c]}return r}}());class c{onabort;onerror;onreadystatechange;ontimeout;readyState=0;response;responseText="";responseType="";status;statusText;withCredentials;#n;#i;#s;#a={};#o;#u={};#c;open(e,t,r){this.#n=e,this.#i=t,this.#s="",this.readyState=1,this.onreadystatechange?.(),this.#o=void 0}abort(){this.#o&&this.#o.abort()}getAllResponseHeaders(){return this.#s}setRequestHeader(e,t){this.#a[e]=t}setInit(e,t=!0){this.#u=e,this.#c=t}send(e){let t="arraybuffer"!==this.responseType,r={...this.#u,method:this.#n,headers:this.#a,body:e};"function"==typeof AbortController&&this.#c&&(this.#o=new AbortController,"u">typeof EventTarget&&this.#o.signal instanceof EventTarget&&(r.signal=this.#o.signal)),"u">typeof document&&(r.credentials=this.withCredentials?"include":"omit"),fetch(this.#i,r).then(e=>(e.headers.forEach((e,t)=>{this.#s+=`${t}: ${e}\r 13`}),this.status=e.status,this.statusText=e.statusText,this.readyState=3,this.onreadystatechange?.(),t?e.text():e.arrayBuffer())).then(e=>{"string"==typeof e?this.responseText=e:this.response=e,this.readyState=4,this.onreadystatechange?.()}).catch(e=>{"AbortError"!==e.name?this.onerror?.(e):this.onabort?.()})}}let l="function"==typeof XMLHttpRequest?"xhr":"fetch",d="xhr"===l?XMLHttpRequest:c,h=(e,t)=>{let r=e.options,n=e.applyMiddleware("finalizeOptions",r),i={},s=e.applyMiddleware("interceptRequest",void 0,{adapter:l,context:e});if(s){let e=setTimeout(t,0,null,s);return{abort:()=>clearTimeout(e)}}let a=new d;a instanceof c&&"object"==typeof n.fetch&&a.setInit(n.fetch,n.useAbortSignal??!0);let o=n.headers,h=n.timeout,f=!1,p=!1,y=!1;if(a.onerror=e=>{v(a instanceof c?e instanceof Error?e:Error(`Request error while attempting to reach is ${n.url}`,{cause:e}):Error(`Request error while attempting to reach is ${n.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},a.ontimeout=e=>{v(Error(`Request timeout while attempting to reach ${n.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},a.onabort=()=>{g(!0),f=!0},a.onreadystatechange=function(){h&&(g(),i.socket=setTimeout(()=>m("ESOCKETTIMEDOUT"),h.socket)),!f&&a&&4===a.readyState&&0!==a.status&&function(){if(!(f||p||y)){if(0===a.status)return void v(Error("Unknown XHR error"));g(),p=!0,t(null,{body:a.response||(""===a.responseType||"text"===a.responseType?a.responseText:""),url:n.url,method:n.method,headers:u(a.getAllResponseHeaders()),statusCode:a.status,statusMessage:a.statusText})}}()},a.open(n.method,n.url,!0),a.withCredentials=!!n.withCredentials,o&&a.setRequestHeader)for(let e in o)o.hasOwnProperty(e)&&a.setRequestHeader(e,o[e]);return n.rawBody&&(a.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:n,adapter:l,request:a,context:e}),a.send(n.body||null),h&&(i.connect=setTimeout(()=>m("ETIMEDOUT"),h.connect)),{abort:function(){f=!0,a&&a.abort()}};function m(t){y=!0,a.abort();let r=Error("ESOCKETTIMEDOUT"===t?`Socket timed out on request to ${n.url}`:`Connection timed out on request to ${n.url}`);r.code=t,e.channels.error.publish(r)}function g(e){(e||f||a&&a.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function v(e){if(p)return;g(!0),p=!0,a=null;let r=e||Error(`Network error while attempting to reach ${n.url}`);r.isNetworkError=!0,r.request=n,t(r)}},f=(e=[],t=h)=>(function e(t,r){let a=[],o=s.reduce((e,t)=>
13(e[t]=e[t]||[],e),{processOptions:[n.p],validateOptions:[n.v]});function u(e){let t;let n=i.reduce((e,t)=>(e[t]=function(){let e=Object.create(null),t=0;return{publish:function(t){for(let r in e)e[r](t)},subscribe:function(r){let n=t++;return e[n]=r,function(){delete e[n]}}}}(),e),{}),s=function(e,t,...r){let n="onError"===e,i=t;for(let t=0;t<o[e].length&&(i=(0,o[e][t])(i,...r),!n||i);t++);return i},a=s("processOptions",e);s("validateOptions",a);let u={options:a,channels:n,applyMiddleware:s},c=n.request.subscribe(e=>{t=r(e,(t,r)=>((e,t,r)=>{let i=e,a=t;if(!i)try{a=s("onResponse",t,r)}catch(e){a=null,i=e}(i=i&&s("onError",i,r))?n.error.publish(i):a&&n.response.publish(a)})(t,r,e))});n.abort.subscribe(()=>{c(),t&&t.abort()});let l=s("onReturn",n,u);return l===n&&n.request.publish(u),l}return u.use=function(e){if(!e)throw Error("Tried to add middleware that resolved to falsey value");if("function"==typeof e)throw Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(e.onReturn&&o.onReturn.length>0)throw Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return s.forEach(t=>{e[t]&&o[t].push(e[t])}),a.push(e),u},u.clone=()=>e(a,r),t.forEach(u.use),u})(e,t)},68313:function(e,t,r){"use strict";r.d(t,{LO:function(){return v},XD:function(){return k},YD:function(){return b},ll:function(){return p},wE:function(){return y}}),r(40639);var n,i,s,a,o,u=r(32608),c=r(73452).lW,l={exports:{}};o||(o=1,function(e,t){let r;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))}),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch{}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!e&&"u">typeof u&&"env"in u&&(e=u.env.DEBUG),e},t.useColors=function(){let e;return"u">typeof window&&!!window.process&&("renderer"===window.process.type||!!window.process.__nwjs)||!("u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"u">typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch{}}(),t.destroy=(r=!1,()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=(a?s:(a=1,s=function(e){function t(e){let n,i,s,a=null;function o(...e){if(!o.enabled)return;let r=Number(new Date),i=r-(n||r);o.diff=i,o.prev=n,o.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,n)=>{if("%%"===r)return"%";s++;let i=t.formatters[n];if("function"==typeof i){let t=e[s];r=i.call(o,t),e.splice(s,1),s--}return r}),t.formatArgs.call(o,e),(o.log||t.log).apply(o,e)}return o.namespace=e,o.useColors=t.useColors(),o.color=t.selectColor(e),o.extend=r,o.destroy=t.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set
13:e=>{a=e}}),"function"==typeof t.init&&t.init(o),o}function r(e,r){let n=t(this.namespace+(typeof r>"u"?":":r)+e);return n.log=this.log,n}function s(e,t){let r=0,n=0,i=-1,s=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(i=n,s=r):r++,n++;else{if(-1===i)return!1;n=i+1,r=++s}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){let e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){for(let r of(t.save(e),t.namespaces=e,t.names=[],t.skips=[],("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===r[0]?t.skips.push(r.slice(1)):t.names.push(r)},t.enabled=function(e){for(let r of t.skips)if(s(e,r))return!1;for(let r of t.names)if(s(e,r))return!0;return!1},t.humanize=function(){if(i)return n;function e(e,t,r,n){return Math.round(e/r)+" "+n+(t>=1.5*r?"s":"")}return i=1,n=function(t,r){r=r||{};var n,i,s=typeof t;if("string"===s&&t.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return 864e5*r;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*r;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*r;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}(t);if("number"===s&&isFinite(t))return r.long?(i=Math.abs(t))>=864e5?e(t,i,864e5,"day"):i>=36e5?e(t,i,36e5,"hour"):i>=6e4?e(t,i,6e4,"minute"):i>=1e3?e(t,i,1e3,"second"):t+" ms":(n=Math.abs(t))>=864e5?Math.round(t/864e5)+"d":n>=36e5?Math.round(t/36e5)+"h":n>=6e4?Math.round(t/6e4)+"m":n>=1e3?Math.round(t/1e3)+"s":t+"ms";throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}}(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(r=>{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t)|0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}))(t);let{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(l,l.exports)),l.exports,Object.prototype.hasOwnProperty;let d=typeof c>"u"?()=>!1:e=>c.isBuffer(e);function h(e){return"[object Object]"===Object.prototype.toString.call(e)}let f=["boolean","string","number"];function p(){return{processOptions:e=>{let t=e.body;return!t||"function"==typeof t.pipe||d(t)||-1===f.indexOf(typeof t)&&!Array.isArray(t)&&!function(e){if(!1===h(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!(!1===h(r)||!1===r.hasOwnProperty("isPrototypeOf"))}(t)?e:Object.assign({},e,{body:JSON.stringify(e.body),headers:Object.assign({},e.headers,{"Content-Type":"application/json"})})}}}function y(e){return{onResponse:t=>{let r=t.headers["content-type"]||"",n=e&&e.force||-1!==r.indexOf("application/json");return t.body&&r&&n?Object.assign({},t,{body:function(e){try{return JSON.parse(e)}catch(e){throw e.message=`Failed to parsed response body as JSON: ${e.message}`,e}}(t.body)}):t},processOptions:e=>Object.assign({},e,{headers:Object.assign({Accept:"application/json"},e.headers)})}}let m={};"u">typeof globalThis?m=globalThis:"u">typeof window?m=window:"u">typeof global?m=global:"u">typeof self&&(m=self);var g=m;function v(e={}){let t=e.implementation||g.Observable;if(!t)throw Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:(e,r)=>new t(t=>(e.error.subscribe(e=>t.error(e)),e.progress.subscribe(e=>t.next(Object.assign({type:"progress"},e))),e.response.subscribe(e=>{t.next(Object.assign({type:"response"},e)),t.complete()}),e.request.publish(r),()=>e.abort.publish()))}}function b(){return{onRequest:e=>{if("xhr"!==e.adapter)return;let t=e.request,r=e.context;function n(e){return t=>{let n=t.lengthComputable?t.loaded/t.total*100:-1;r.channels.progress.publish({stage:e,percent:n,total:t.total,loaded:t.loaded,lengthComputable:t.lengthComputable})}}"upload"in t&&"onprogress"in t.upload&&(t.upload.onprogress=n("upload")),"onprogress"in t&&(t.onprogress=n("download"))}}}let w=(e={})=>{let t=e.implementation||Promise;if(!t)throw Error("`Promise` is not available in global scope, and n
13o implementation was passed");return{onReturn:(r,n)=>new t((t,i)=>{let s=n.options.cancelToken;s&&s.promise.then(e=>{r.abort.publish(e),i(e)}),r.error.subscribe(i),r.response.subscribe(r=>{t(e.onlyBody?r.body:r)}),setTimeout(()=>{try{r.request.publish(n)}catch(e){i(e)}},0)})}};class _{__CANCEL__=!0;message;constructor(e){this.message=e}toString(){return"Cancel"+(this.message?`: ${this.message}`:"")}}class x{promise;reason;constructor(e){if("function"!=typeof e)throw TypeError("executor must be a function.");let t=null;this.promise=new Promise(e=>{t=e}),e(e=>{this.reason||(this.reason=new _(e),t(this.reason))})}static source=()=>{let e;return{token:new x(t=>{e=t}),cancel:e}}}w.Cancel=_,w.CancelToken=x,w.isCancel=e=>!(!e||!e?.__CANCEL__);var E=(e,t,r)=>("GET"===r.method||"HEAD"===r.method)&&(e.isNetworkError||!1);function C(e){return 100*Math.pow(2,e)+100*Math.random()}let k=(e={})=>(e=>{let t=e.maxRetries||5,r=e.retryDelay||C,n=e.shouldRetry;return{onError:(e,i)=>{var s;let a=i.options,o=a.maxRetries||t,u=a.retryDelay||r,c=a.shouldRetry||n,l=a.attemptNumber||0;if(null!==(s=a.body)&&"object"==typeof s&&"function"==typeof s.pipe||!c(e,l,a)||l>=o)return e;let d=Object.assign({},i,{options:Object.assign({},a,{attemptNumber:l+1})});return setTimeout(()=>i.channels.request.publish(d),u(l)),null}}})({shouldRetry:E,...e});k.shouldRetry=E},5984:function(e,t,r){"use strict";r.d(t,{kZ:function(){return K},q:function(){return X}});var n,i=r(39622),s=Object.defineProperty,a=Object.defineProperties,o=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,d=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))c.call(t,r)&&d(e,r,t[r]);if(u)for(var r of u(t))l.call(t,r)&&d(e,r,t[r]);return e},f=(e,t)=>a(e,o(t)),p=(e,t)=>{var r={};for(var n in e)c.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&u)for(var n of u(e))0>t.indexOf(n)&&l.call(e,n)&&(r[n]=e[n]);return r},y=class{constructor({query:e,schema:t}){this.query=e,this.schema=t}value(){return{schema:this.schema,query:this.query}}nullable(){return new m({query:this.query,schema:this.schema.nullable()})}},m=class extends y{constructor({schema:e,query:t}){super({schema:e.nullable(),query:t})}};function g(e){return e instanceof y}function v(e){return Array.isArray(e)}function b(e){return Object.entries(e).reduce((e,[t,r])=>{let n="";return(n=g(r)?`"${t}": ${r.query}`:v(r)?`"${t}": ${r[0]}`:t)&&e.push(n),e},[])}function w(e){return i.z.object(Object.entries(e).reduce((e,[t,r])=>(g(r)?e[t]=r.schema:v(r)?e[t]=r[1]:r instanceof i.z.ZodType&&(e[t]=r),e),{}))}var _=(e,t,r,n)=>{let s=b(r);if(n){let e=Object.entries(n).reduce((e,[t,r])=>(e.push(`${t} => { ${b(r).join(", ")} }`),e),[]);s.push(`...select(${e.join(", ")})`)}let a=(()=>{let e=Object.values(n||{}),s=w(r),a=[...e.map(e=>s.merge(w(e))),s],o=a.length>1?i.z.union([a[0],a[1],...a.slice(2)]):a[0];return t instanceof i.z.ZodArray?i.z.array(o):o})();return a instanceof i.z.ZodArray?new I({query:e+`{${s.join(", ")}}`,schema:a}):new O({query:e+`{${s.join(", ")}}`,schema:a})},x=e=>{let t=e=>g(e)?e.query:v(e)?e[0]:`{ ${b(e).join(", ")} }`,{default:r}=e,n=Object.entries(p(e,["default"])).reduce((e,[r,n])=>(e.push(`${r} => ${t(n)}`),e),[]);return r&&n.push(t(r)),new y({query:`select(${n.join(", ")})`,schema:(()=>{let t=Object.values(e).map(e=>g(e)?e.schema:v(e)?e[1]:w(e));return e.default?i.z.union(t):i.z.union([i.z.null(),...t])})()})};function E(e){let t=e.options.map(e=>"shape"in e?e:"options"in e?E(e):i.z.record(i.z.string(),i.z.never()));return i.z.union(t)}i.z.record(i.z.string(),i.z.never());var C=e=>(0,i.dj)(e=>null===e?void 0:e,e);function k(e){return e instanceof i.z.ZodType?C(e):Object.entries(e).reduce((e,[t,r])=>(r instanceof i.z.ZodType?e[t]=C(r):Array.isArray(r)?e[t]=[r[0],C(r[1])]:e[t]=r,e),{})}function T(e){return e?Object.entries(e).reduce((e,[t,r])=>(e[t]=k(r),e),{}):e}var O=class extends y{constructor(e){super(e)}filter(e=""){return this.query+=`[${e}]`,new I({query:this.query,schema:i.z.array(this.schema)})}select(e){let t=g(e)?e:x(e);return new O({query:this.query+`{...${t.query}}`,schema:E(t.schema)})}grab(e,t){return _(this.query,this.schema,e,t)}grab$(e,t){return _(this.query,this.schema,k(e),t?T(t):t)}grabOne(e,t){return new O({query:this.query+`.${e}`,schema:t||i.z.unknown()})}grabOne$(e,t){return new O({query:this.query+`.${e}`,schema:k(t||i.z.unknown())})}deref(){return new R(f(h({},this.value()),{query:this.query+"->"}))}},R=class extends O{constructor(e){super(f(h({},e),{schema:i.z.unknown()}))}filter(e=""){return this.query+=`[${e}]`,new j(h({},this.value()))}filterByType(e){return this.filter(`_type == '${e}'`)}},I=class extends y{constructor(e){super(e)}select(e){let t=g(e)?e:x(e);return new I({query:this.query+`{...${t.query}}`,schema:i.z.array(E(t.schema))})}filter(e=""){return new I(f(h({},this.value()),{query:this.query+`[${e}]`}))}filterByType(e){return this.filter(`_type == '${e}'`)}grab(e,t){return _(this.query,this.schema,e,t)}grab$(e,t){return _(this.query,this.schema,k(e),t?T(t):t)}grabOne(e,t){return new I({query:this.query+`.${e}`,schema:i.z.array(t||i.z.unknown())})}grabOne$(e,t){return new I({query:this.query+`.${e}`,schema:i.z.array(k(t||i.z.unknown()))})}order(...e){return new I(f(h({},this.value()),{query:this.query+`|order(${e.join(", ")})`}))}score(...e){return new I(f(h({},this.value()),{query:this.query+`|score(${e.join(", ")})`}))}slice(e,t){return(this.query+=`[${e}${"number"==typeof t?`..${t}`:""}]`,void 0===t)?new O(f(h({},this.value()),{schema:this.schema.element})):this}},j=class extends I{constructor(e){super(f(h({},e),{schema:i.z.array(i.z.unknown())}))}deref(){return this.query+="->",this}};function A(e){return i.z.object({_type:i.z.string(),_key:i.z.string().optional(),children:i.z.array(i.z.object({_key:i.z.string(),_type:i.z.string(),text:i.z.string(),marks:i.z.array(i.z.string()).optional().default([])})),markDefs:i.z.array(e).optional(),style:i.z.string().optional(),listItem:i.z.string().optional(),level:i.z.number().optional()})}var q=i.z.object({_type:i.z.string(),_key:i.z.string()}).catchall(i.z.unknown()),S={string:i.z.string,number:i.z.number,boolean:i.z.boolean,unknown:i.z.unknown,null:i.z.null,undefined:i.z.undefined,date:()=>i.z.preprocess(e=>{if("string"==typeof e||e instanceof Date)return new Date(e)},i.z.date()),literal:i.z.literal,union:i.z.union,array:i.z.array,object:i.z.object,slug:e=>[`${e}.current`,i.z.string()],contentBlock:function({markDefs:e}={}){return A(e||q)},contentBlocks:function({markDefs:e}={}){return i.z.array(A(e||q))}},$={_ref:S.string(),_type:S.literal("reference")},P={crop:S.object({top:S.number(),bottom:S.number(),left:S.number(),right:S.number()}).nullable()},Z={hotspot:S.object({x:S.number(),y:S.number(),height:S.number(),width:S.number()}).nullable()},z={_key:S.string().nullable(),_type:S.string()},N={_id:S.string(),_type:S.union([S.literal("sanity.imageAsset"),S.literal("sanity.fileAsset")]),_rev:S.string(),extension:S.string(),mimeType:S.string(),originalFilename:S.string(),path:S.string(),sha1hash:S.string(),size:S.number(),url:S.string(),_updatedAt:S.string().nullable()},U={_type:S.literal("sanity.imagePaletteSwatch"),background:S.string().optional().nullable(),foreground:S.string().optional().nullable(),population:S.number().optional().nullable(),title:S.string().optional().nullable()},D={dimensions:S.object({_type:S.literal("sanity.imageDimensions").optional(),aspectRatio:S.number(),height:S.number(),width:S.number()}).nullable()},L={location:S.object({_type:S.literal("geopoint"),lat:S.number(),lng:S.number()}).nullable()},M={lqip:S.string()},B={isOpaque:S.boolean().nullable()},F={hasAlpha:S.boolean().nullable()},V={blurHash:S.string().nullable()},W=()=>S.object(U).nullable(),H={palette:S.object({darkMuted:W(),darkVibrant:W(),dominant:W(),lightMuted:W(),lightVibrant:W(),muted:W(),vibrant:W()})},K=e=>({query:t,schema:r}
13,...n)=>e(t,...n).then(e=>{try{return r.parse(e)}catch(t){if(t instanceof i.z.ZodError)throw new G(t,e);throw t}}),G=class extends Error{constructor(e,t){super(`Error parsing: 14${e.errors.map(e=>` \`result${e.path.reduce((e,t)=>"string"==typeof t?`${e}.${t}`:`${e}[${t}]`,"")}\`: ${e.message}`).join("\n")}`),this.err=e,this.zodError=e,this.rawResponse=t}};function J(e,{isArray:t=!1}={}){return t?new j({query:e}):new R({query:e})}J.sanityImage=(n=function(e,t){let{withCrop:r,withHotspot:n,additionalFields:i,isList:s,withAsset:a}=t||{},o=new R({query:"asset"});a&&(o=o.deref());let u=e=>"function"==typeof(null==a?void 0:a.includes)&&a.includes(e),c=Object.assign({},u("dimensions")&&D,u("location")&&L,u("lqip")&&M,u("palette")&&H,u("isOpaque")&&B,u("hasAlpha")&&F,u("blurHash")&&V),l=Object.assign({},!a&&$,u("base")&&N,Object.keys(c).length>0&&{metadata:new R({query:"metadata"}).grab(c)}),d=Object.assign({},z,{asset:o.grab(l)},!0===r?P:{},!0===n?Z:{},i||{});return!0===s?new R({query:e}).filter().grab(d):new R({query:e}).grab(d)},function(...e){return console.warn("`q.sanityImage` has been deprecated in favor of importing `sanityImage` directly from `groqd`. `q.sanityImage` will be removed in future versions."),n(...e)}),J.select=x,Object.assign(J,S);var X=J},54833:function(e,t,r){"use strict";r.d(t,{kP:function(){return s},x0:function(){return a}});let n=e=>crypto.getRandomValues(new Uint8Array(e)),i=(e,t,r)=>{let n=(2<<Math.log(e.length-1)/Math.LN2)-1,i=-~(1.6*n*t/e.length);return (s=t)=>{let a="";for(;;){let t=r(i),o=0|i;for(;o--;)if((a+=e[t[o]&n]||"").length===s)return a}}},s=(e,t=21)=>i(e,t,n),a=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((e,t)=>((t&=63)<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"")},39622:function(e,t,r){"use strict";let n;r.d(t,{dj:function(){return eY},z:function(){return e5}}),(e0=e6||(e6={})).assertEqual=e=>e,e0.assertIs=function(e){},e0.assertNever=function(e){throw Error()},e0.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},e0.getValidEnumValues=e=>{let t=e0.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),r={};for(let n of t)r[n]=e[n];return e0.objectValues(r)},e0.objectValues=e=>e0.objectKeys(e).map(function(t){return e[t]}),e0.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e0.find=(e,t)=>{for(let r of e)if(t(r))return r},e0.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e0.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e0.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(e3||(e3={})).mergeShapes=(e,t)=>({...e,...t});let i=e6.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),s=e=>{switch(typeof e){case"undefined":return i.undefined;case"string":return i.string;case"number":return isNaN(e)?i.nan:i.number;case"boolean":return i.boolean;case"function":return i.function;case"bigint":return i.bigint;case"symbol":return i.symbol;case"object":if(Array.isArray(e))return i.array;if(null===e)return i.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return i.promise;if("undefined"!=typeof Map&&e instanceof Map)return i.map;if("undefined"!=typeof Set&&e instanceof Set)return i.set;if("undefined"!=typeof Date&&e instanceof Date)return i.date;return i.object;default:return i.unknown}}
14,a=e6.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class o extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(n);else if("invalid_return_type"===i.code)n(i.returnTypeError);else if("invalid_arguments"===i.code)n(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,n=0;for(;n<i.path.length;){let r=i.path[n];n===i.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(i))):e[r]=e[r]||{_errors:[]},e=e[r],n++}}};return n(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,e6.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},r=[];for(let n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}o.create=e=>new o(e);let u=(e,t)=>{let r;switch(e.code){case a.invalid_type:r=e.received===i.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case a.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,e6.jsonStringifyReplacer)}`;break;case a.unrecognized_keys:r=`Unrecognized key(s) in object: ${e6.joinValues(e.keys,", ")}`;break;case a.invalid_union:r="Invalid input";break;case a.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${e6.joinValues(e.options)}`;break;case a.invalid_enum_value:r=`Invalid enum value. Expected ${e6.joinValues(e.options)}, received '${e.received}'`;break;case a.invalid_arguments:r="Invalid function arguments";break;case a.invalid_return_type:r="Invalid function return type";break;case a.invalid_date:r="Invalid date";break;case a.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:e6.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case a.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case a.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case a.custom:r="Invalid input";break;case a.invalid_intersection_types:r="Intersection results could not be merged";break;case a.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case a.not_finite:r="Number must be finite";break;default:r=t.defaultError,e6.assertNever(e)}return{message:r}},c=u;function l(){return c}let d=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,s=[...r,...i.path||[]],a={...i,path:s},o="";for(let e of n.filter(e=>!!e).slice().reverse())o=e(a,{data:t,defaultError:o}).message;return{...i,path:s,message:i.message||o}};function h(e,t){let r=d({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,l(),u].filter(e=>!!e)});e.common.issues.push(r)}class f{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let n of t){if("aborted"===n.status)return p;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t)r.push({key:await e.key,value:await e.value});return f.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:t,value:i}=n;if("aborted"===t.status||"aborted"===i.status)return p;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||n.alwaysSet)&&(r[t.value]=i.value)}return{status:e.value,value:r}}}let p=Object.freeze({status:"aborted"}),y=e=>({status:"dirty",value:e}),m=e=>
14({status:"valid",value:e}),g=e=>"aborted"===e.status,v=e=>"dirty"===e.status,b=e=>"valid"===e.status,w=e=>"undefined"!=typeof Promise&&e instanceof Promise;(e1=e8||(e8={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},e1.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class _{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let x=(e,t)=>{if(b(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new o(e.common.issues);return this._error=t,this._error}}};function E(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=n?n:t.defaultError}:{message:null!=r?r:t.defaultError},description:i}}class C{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return s(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:s(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new f,ctx:{common:e.parent.common,data:e.data,parsedType:s(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(w(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;let n={common:{issues:[],async:null!==(r=null==t?void 0:t.async)&&void 0!==r&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:s(e)},i=this._parseSync({data:e,path:n.path,parent:n});return x(n,i)}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:s(e)},n=this._parse({data:e,path:r.path,parent:r});return x(r,await (w(n)?n:Promise.resolve(n)))}refine(e,t){let r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,n)=>{let i=e(t),s=()=>n.addIssue({code:a.custom,...r(t)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(s(),!1)):!!i||(s(),!1)})}refinement(e,t){return this._refinement((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1))}_refinement(e){return new eu({schema:this,typeName:e9.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ec.create(this,this._def)}nullable(){return el.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return V.create(this,this._def)}promise(){return eo.create(this,this._def)}or(e){return H.create([this,e],this._def)}and(e){return J.create(this,e,this._def)}transform(e){return new eu({...E(this._def),schema:this,typeName:e9.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new ed({...E(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:e9.ZodDefault})}brand(){return new ey({typeName:e9.ZodBranded,type:this,...E(this._def)})}catch(e){return new eh({...E(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:e9.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return em.create(this,e)}readonly(){return eg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let k=/^c[^\s-]{8,}
14$/i,T=/^[a-z][a-z0-9]*$/,O=/^[0-9A-HJKMNP-TV-Z]{26}$/,R=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,I=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,j=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,A=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,q=e=>e.precision?e.offset?RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):0===e.precision?e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");class S extends C{_parse(e){let t;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==i.string){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.string,received:t.parsedType}),p}let r=new f;for(let i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(h(t=this._getOrReturnCtx(e,t),{code:a.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if("max"===i.kind)e.data.length>i.value&&(h(t=this._getOrReturnCtx(e,t),{code:a.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if("length"===i.kind){let n=e.data.length>i.value,s=e.data.length<i.value;(n||s)&&(t=this._getOrReturnCtx(e,t),n?h(t,{code:a.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&h(t,{code:a.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if("email"===i.kind)I.test(e.data)||(h(t=this._getOrReturnCtx(e,t),{validation:"email",code:a.invalid_string,message:i.message}),r.dirty());else if("emoji"===i.kind)n||(n=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),n.test(e.data)||(h(t=this._getOrReturnCtx(e,t),{validation:"emoji",code:a.invalid_string,message:i.message}),r.dirty());else if("uuid"===i.kind)R.test(e.data)||(h(t=this._getOrReturnCtx(e,t),{validation:"uuid",code:a.invalid_string,message:i.message}),r.dirty());else if("cuid"===i.kind)k.test(e.data)||(h(t=this._getOrReturnCtx(e,t),{validation:"cuid",code:a.invalid_string,message:i.message}),r.dirty());else if("cuid2"===i.kind)T.test(e.data)||(h(t=this._getOrReturnCtx(e,t),{validation:"cuid2",code:a.invalid_string,message:i.message}),r.dirty());else if("ulid"===i.kind)O.test(e.data)||(h(t=this._getOrReturnCtx(e,t),{validation:"ulid",code:a.invalid_string,message:i.message}),r.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(n){h(t=this._getOrReturnCtx(e,t),{validation:"url",code:a.invalid_string,message:i.message}),r.dirty()}else if("regex"===i.kind)i.regex.lastIndex=0,i.regex.test(e.data)||(h(t=this._getOrReturnCtx(e,t),{validation:"regex",code:a.invalid_string,message:i.message}),r.dirty());else if("trim"===i.kind)e.data=e.data.trim();else if("includes"===i.kind)e.data.includes(i.value,i.position)||(h(t=this._getOrReturnCtx(e,t),{code:a.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty());else if("toLowerCase"===i.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===i.kind)e.data=e.data.toUpperCase();else if("startsWith"===i.kind)e.data.startsWith(i.value)||(h(t=this._getOrReturnCtx(e,t),{code:a.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty());else if("endsWith"===i.kind)e.data.endsWith(i.value)||(h(t=this._getOrReturnCtx(e,t),{code:a.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty());else if("datetime"===i.kind)q(i).test(e.data)||(h(t=this._getOrReturnCtx(e,t),{code:a.invalid_string,validation:"datetime",message:i.message}),r.dirty());else if("ip"===i.kind){var s,o;s=e.data,("v4"===(o=i.version)||!o)&&j.test(s)||("v6"===o||!o)&&A.test(s)||(h(t=this._getOrReturnCtx(e,t),{validation:"ip",code:a.invalid_string,message:i.message}),r.dirty())}else e6.assertNever(i);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:a.invalid_string,...e8.errToObj(r)})}_addCheck(e){return new S({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...e8.errToObj(e)})}url(e){return this._addCheck({kind:"url",...e8.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...e8.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...e8.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...e8.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...e8.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...e8.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...e8.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...e8.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...e8.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...e8.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...e8.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...e8.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...e8.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...e8.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...e8.errToObj(t)})}nonempty(e){return this.min(1,e8.errToObj(e))}trim(){return new S({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new S({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new S({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}
14get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}S.create=e=>{var t;return new S({checks:[],typeName:e9.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...E(e)})};class $ extends C{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==i.number){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.number,received:t.parsedType}),p}let r=new f;for(let n of this._def.checks)"int"===n.kind?e6.isInteger(e.data)||(h(t=this._getOrReturnCtx(e,t),{code:a.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty()):"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(h(t=this._getOrReturnCtx(e,t),{code:a.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(h(t=this._getOrReturnCtx(e,t),{code:a.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"multipleOf"===n.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}(e.data,n.value)&&(h(t=this._getOrReturnCtx(e,t),{code:a.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(h(t=this._getOrReturnCtx(e,t),{code:a.not_finite,message:n.message}),r.dirty()):e6.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,e8.toString(t))}gt(e,t){return this.setLimit("min",e,!1,e8.toString(t))}lte(e,t){return this.setLimit("max",e,!0,e8.toString(t))}lt(e,t){return this.setLimit("max",e,!1,e8.toString(t))}setLimit(e,t,r,n){return new $({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:e8.toString(n)}]})}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:e8.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:e8.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:e8.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:e8.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:e8.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:e8.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:e8.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:e8.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:e8.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&e6.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}$.create=e=>new $({checks:[],typeName:e9.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...E(e)});class P extends C{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==i.bigint){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.bigint,received:t.parsedType}),p}let r=new f;for(let n of this._def.checks)"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(h(t=this._getOrReturnCtx(e,t),{code:a.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(h(t=this._getOrReturnCtx(e,t),{code:a.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(h(t=this._getOrReturnCtx(e,t),{code:a.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):e6.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,e8.toString(t))}gt(e,t){return this.setLimit("min",e,!1,e8.toString(t))}lte(e,t){return this.setLimit("max",e,!0,e8.toString(t))}lt(e,t){return this.setLimit("max",e,!1,e8.toString(t))}setLimit(e,t,r,n){return new P({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:e8.toString(n)}]})}_addCheck(e){return new P({...this._def,checks:[...this._def.checks,e]})}
14positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:e8.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:e8.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:e8.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:e8.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:e8.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}P.create=e=>{var t;return new P({checks:[],typeName:e9.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...E(e)})};class Z extends C{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==i.boolean){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.boolean,received:t.parsedType}),p}return m(e.data)}}Z.create=e=>new Z({typeName:e9.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...E(e)});class z extends C{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==i.date){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.date,received:t.parsedType}),p}if(isNaN(e.data.getTime()))return h(this._getOrReturnCtx(e),{code:a.invalid_date}),p;let r=new f;for(let n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(h(t=this._getOrReturnCtx(e,t),{code:a.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(h(t=this._getOrReturnCtx(e,t),{code:a.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):e6.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new z({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:e8.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:e8.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}z.create=e=>new z({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:e9.ZodDate,...E(e)});class N extends C{_parse(e){if(this._getType(e)!==i.symbol){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.symbol,received:t.parsedType}),p}return m(e.data)}}N.create=e=>new N({typeName:e9.ZodSymbol,...E(e)});class U extends C{_parse(e){if(this._getType(e)!==i.undefined){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.undefined,received:t.parsedType}),p}return m(e.data)}}U.create=e=>new U({typeName:e9.ZodUndefined,...E(e)});class D extends C{_parse(e){if(this._getType(e)!==i.null){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.null,received:t.parsedType}),p}return m(e.data)}}D.create=e=>new D({typeName:e9.ZodNull,...E(e)});class L extends C{constructor(){super(...arguments),this._any=!0}_parse(e){return m(e.data)}}L.create=e=>new L({typeName:e9.ZodAny,...E(e)});class M extends C{constructor(){super(...arguments),this._unknown=!0}_parse(e){return m(e.data)}}M.create=e=>new M({typeName:e9.ZodUnknown,...E(e)});class B extends C{_parse(e){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.never,received:t.parsedType}),p}}B.create=e=>new B({typeName:e9.ZodNever,...E(e)});class F extends C{_parse(e){if(this._getType(e)!==i.undefined){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.void,received:t.parsedType}),p}return m(e.data)}}F.create=e=>new F({typeName:e9.ZodVoid,...E(e)});class V extends C{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==i.array)return h(t,{code:a.invalid_type,expected:i.array,received:t.parsedType}),p;if(null!==n.exactLength){let e=t.data.length>n.exactLength.value,i=t.data.length<n.exactLength.value;(e||i)&&(h(t,{code:e?a.too_big:a.too_small,minimum:i?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(h(t,{code:a.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(h(t,{code:a.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>n.type._parseAsync(new _(t,e,t.path,r)))).then(e=>f.mergeArray(r,e));let s=[...t.data].map((e,r)=>n.type._parseSync(new _(t,e,t.path,r)));return f.mergeArray(r,s)}
14get element(){return this._def.type}min(e,t){return new V({...this._def,minLength:{value:e,message:e8.toString(t)}})}max(e,t){return new V({...this._def,maxLength:{value:e,message:e8.toString(t)}})}length(e,t){return new V({...this._def,exactLength:{value:e,message:e8.toString(t)}})}nonempty(e){return this.min(1,e)}}V.create=(e,t)=>new V({type:e,minLength:null,maxLength:null,exactLength:null,typeName:e9.ZodArray,...E(t)});class W extends C{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=e6.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==i.object){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.object,received:t.parsedType}),p}let{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof B&&"strip"===this._def.unknownKeys))for(let e in r.data)s.includes(e)||o.push(e);let u=[];for(let e of s){let t=n[e],i=r.data[e];u.push({key:{status:"valid",value:e},value:t._parse(new _(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof B){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of o)u.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)o.length>0&&(h(r,{code:a.unrecognized_keys,keys:o}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of o){let n=r.data[t];u.push({key:{status:"valid",value:t},value:e._parse(new _(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of u){let r=await t.key;e.push({key:r,value:await t.value,alwaysSet:t.alwaysSet})}return e}).then(e=>f.mergeObjectSync(t,e)):f.mergeObjectSync(t,u)}get shape(){return this._def.shape()}strict(e){return e8.errToObj,new W({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{var n,i,s,a;let o=null!==(s=null===(i=(n=this._def).errorMap)||void 0===i?void 0:i.call(n,t,r).message)&&void 0!==s?s:r.defaultError;return"unrecognized_keys"===t.code?{message:null!==(a=e8.errToObj(e).message)&&void 0!==a?a:o}:{message:o}}}:{}})}strip(){return new W({...this._def,unknownKeys:"strip"})}passthrough(){return new W({...this._def,unknownKeys:"passthrough"})}extend(e){return new W({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new W({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:e9.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new W({...this._def,catchall:e})}pick(e){let t={};return e6.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(t[r]=this.shape[r])}),new W({...this._def,shape:()=>t})}omit(e){let t={};return e6.objectKeys(this.shape).forEach(r=>{e[r]||(t[r]=this.shape[r])}),new W({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof W){let r={};for(let n in t.shape){let i=t.shape[n];r[n]=ec.create(e(i))}return new W({...t._def,shape:()=>r})}return t instanceof V?new V({...t._def,type:e(t.element)}):t instanceof ec?ec.create(e(t.unwrap())):t instanceof el?el.create(e(t.unwrap())):t instanceof X?X.create(t.items.map(t=>e(t))):t}(this)}partial(e){let t={};return e6.objectKeys(this.shape).forEach(r=>{let n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}),new W({...this._def,shape:()=>t})}required(e){let t={};return e6.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof ec;)e=e._def.innerType;t[r]=e}}),new W({...this._def,shape:()=>t})}keyof(){return ei(e6.objectKeys(this.shape))}}W.create=(e,t)=>new W({shape:()=>e,unknownKeys:"strip",catchall:B.create(),typeName:e9.ZodObject,...E(t)}),W.strictCreate=(e,t)=>new W({shape:()=>e,unknownKeys:"strict",catchall:B.create(),typeName:e9.ZodObject,...E(t)}),W.lazycreate=(e,t)=>new W({shape:e,unknownKeys:"strip",catchall:B.create(),typeName:e9.ZodObject,...E(t)});class H extends C{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new o(e.ctx.common.issues));return h(t,{code:a.invalid_union,unionErrors:r}),p});{let e;let n=[];for(let i of r){let r={...t,common:{...t.common,issues:[]},parent:null},s=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=n.map(e=>new o(e));return h(t,{code:a.invalid_union,unionErrors:i}),p}}get options(){return this._def.options}}H.create=(e,t)=>
14new H({options:e,typeName:e9.ZodUnion,...E(t)});let K=e=>{if(e instanceof er)return K(e.schema);if(e instanceof eu)return K(e.innerType());if(e instanceof en)return[e.value];if(e instanceof es)return e.options;if(e instanceof ea)return Object.keys(e.enum);if(e instanceof ed)return K(e._def.innerType);if(e instanceof U)return[void 0];else if(e instanceof D)return[null];else return null};class G extends C{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.object)return h(t,{code:a.invalid_type,expected:i.object,received:t.parsedType}),p;let r=this.discriminator,n=t.data[r],s=this.optionsMap.get(n);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):(h(t,{code:a.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),p)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let r of t){let t=K(r.shape[e]);if(!t)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(n.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);n.set(i,r)}}return new G({typeName:e9.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...E(r)})}}class J extends C{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if(g(e)||g(n))return p;let o=function e(t,r){let n=s(t),a=s(r);if(t===r)return{valid:!0,data:t};if(n===i.object&&a===i.object){let n=e6.objectKeys(r),i=e6.objectKeys(t).filter(e=>-1!==n.indexOf(e)),s={...t,...r};for(let n of i){let i=e(t[n],r[n]);if(!i.valid)return{valid:!1};s[n]=i.data}return{valid:!0,data:s}}if(n===i.array&&a===i.array){if(t.length!==r.length)return{valid:!1};let n=[];for(let i=0;i<t.length;i++){let s=e(t[i],r[i]);if(!s.valid)return{valid:!1};n.push(s.data)}return{valid:!0,data:n}}return n===i.date&&a===i.date&&+t==+r?{valid:!0,data:t}:{valid:!1}}(e.value,n.value);return o.valid?((v(e)||v(n))&&t.dirty(),{status:t.value,value:o.data}):(h(r,{code:a.invalid_intersection_types}),p)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>n(e,t)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}J.create=(e,t,r)=>new J({left:e,right:t,typeName:e9.ZodIntersection,...E(r)});class X extends C{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.array)return h(r,{code:a.invalid_type,expected:i.array,received:r.parsedType}),p;if(r.data.length<this._def.items.length)return h(r,{code:a.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p;!this._def.rest&&r.data.length>this._def.items.length&&(h(r,{code:a.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let n=[...r.data].map((e,t)=>{let n=this._def.items[t]||this._def.rest;return n?n._parse(new _(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(n).then(e=>f.mergeArray(t,e)):f.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new X({...this._def,rest:e})}}X.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new X({items:e,typeName:e9.ZodTuple,rest:null,...E(t)})};class Y extends C{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.object)return h(r,{code:a.invalid_type,expected:i.object,received:r.parsedType}),p;let n=[],s=this._def.keyType,o=this._def.valueType;for(let e in r.data)n.push({key:s._parse(new _(r,e,r.path,e)),value:o._parse(new _(r,r.data[e],r.path,e))});return r.common.async?f.mergeObjectAsync(t,n):f.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return new Y(t instanceof C?{keyType:e,valueType:t,typeName:e9.ZodRecord,...E(r)}:{keyType:S.create(),valueType:e,typeName:e9.ZodRecord,...E(t)})}}class Q extends C{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.map)return h(r,{code:a.invalid_type,expected:i.map,received:r.parsedType}),p;let n=this._def.keyType,s=this._def.valueType,o=[...r.data.entries()].map(([e,t],i)=>({key:n._parse(new _(r,e,r.path,[i,"key"])),value:s._parse(new _(r,t,r.path,[i,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of o){let n=await r.key,i=await r.value;if("aborted"===n.status||"aborted"===i.status)return p;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of o){let n=r.key,i=r.value;if("aborted"===n.status||"aborted"===i.status)return p;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}}}Q.create=(e,t,r)=>new Q({valueType:t,keyType:e,typeName:e9.ZodMap,...E(r)});class ee extends C{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.set)return h(r,{code:a.invalid_type,expected:i.set,received:r.parsedType}),p;let n=this._def;null!==n.minSize&&r.data.size<n.minSize.value&&(h(r,{code:a.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&r.data.size>n.maxSize.value&&(h(r,{code:a.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let s=this._def.valueType;function o(e){let r=new Set;for(let n of e){if("aborted"===n.status)return p;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}let u=[...r.data.values()].map((e,t)=>s._parse(new _(r,e,r.path,t)));return r.common.async?Promise.all(u).then(e=>o(e)):o(u)}min(e,t){return new ee({...this._def,minSize:{value:e,message:e8.toString(t)}})}max(e,t){return new ee({...this._def,maxSize:{value:e,message:e8.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ee.create=(e,t)=>
14new ee({valueType:e,minSize:null,maxSize:null,typeName:e9.ZodSet,...E(t)});class et extends C{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.function)return h(t,{code:a.invalid_type,expected:i.function,received:t.parsedType}),p;function r(e,r){return d({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l(),u].filter(e=>!!e),issueData:{code:a.invalid_arguments,argumentsError:r}})}function n(e,r){return d({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l(),u].filter(e=>!!e),issueData:{code:a.invalid_return_type,returnTypeError:r}})}let s={errorMap:t.common.contextualErrorMap},c=t.data;if(this._def.returns instanceof eo){let e=this;return m(async function(...t){let i=new o([]),a=await e._def.args.parseAsync(t,s).catch(e=>{throw i.addIssue(r(t,e)),i}),u=await Reflect.apply(c,this,a);return await e._def.returns._def.type.parseAsync(u,s).catch(e=>{throw i.addIssue(n(u,e)),i})})}{let e=this;return m(function(...t){let i=e._def.args.safeParse(t,s);if(!i.success)throw new o([r(t,i.error)]);let a=Reflect.apply(c,this,i.data),u=e._def.returns.safeParse(a,s);if(!u.success)throw new o([n(a,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new et({...this._def,args:X.create(e).rest(M.create())})}returns(e){return new et({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new et({args:e||X.create([]).rest(M.create()),returns:t||M.create(),typeName:e9.ZodFunction,...E(r)})}}class er extends C{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}er.create=(e,t)=>new er({getter:e,typeName:e9.ZodLazy,...E(t)});class en extends C{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return h(t,{received:t.data,code:a.invalid_literal,expected:this._def.value}),p}return{status:"valid",value:e.data}}get value(){return this._def.value}}function ei(e,t){return new es({values:e,typeName:e9.ZodEnum,...E(t)})}en.create=(e,t)=>new en({value:e,typeName:e9.ZodLiteral,...E(t)});class es extends C{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return h(t,{expected:e6.joinValues(r),received:t.parsedType,code:a.invalid_type}),p}if(-1===this._def.values.indexOf(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return h(t,{received:t.data,code:a.invalid_enum_value,options:r}),p}return m(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e){return es.create(e)}exclude(e){return es.create(this.options.filter(t=>!e.includes(t)))}}es.create=ei;class ea extends C{_parse(e){let t=e6.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==i.string&&r.parsedType!==i.number){let e=e6.objectValues(t);return h(r,{expected:e6.joinValues(e),received:r.parsedType,code:a.invalid_type}),p}if(-1===t.indexOf(e.data)){let e=e6.objectValues(t);return h(r,{received:r.data,code:a.invalid_enum_value,options:e}),p}return m(e.data)}get enum(){return this._def.values}}ea.create=(e,t)=>new ea({values:e,typeName:e9.ZodNativeEnum,...E(t)});class eo extends C{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==i.promise&&!1===t.common.async?(h(t,{code:a.invalid_type,expected:i.promise,received:t.parsedType}),p):m((t.parsedType===i.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eo.create=(e,t)=>new eo({type:e,typeName:e9.ZodPromise,...E(t)});class eu extends C{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===e9.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:e=>{h(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===n.type){let e=n.transform(r.data,i);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(e).then(e=>this._def.schema._parseAsync({data:e,path:r.path,parent:r})):this._def.schema._parseSync({data:e,path:r.path,parent:r})}if("refinement"===n.type){let e=e=>{let t=n.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?p:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?p:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}}if("transform"===n.type){if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>b(e)?Promise.resolve(n.transform(e.value,i)).then(e=>({status:t.value,value:e})):e);{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!b(e))return e;let s=n.transform(e.value,i);if(s instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}}e6.assertNever(n)}}eu.create=(e,t,r)=>new eu({schema:e,typeName:e9.ZodEffects,effect:t,...E(r)}),eu.createWithPreprocess=(e,t,r)=>new eu({schema:t,effect:{type:"preprocess",transform:e},typeName:e9.ZodEffects,...E(r)});class ec extends C{_parse(e){return this._getType(e)===i.undefined?m(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ec.create=(e,t)=>
14new ec({innerType:e,typeName:e9.ZodOptional,...E(t)});class el extends C{_parse(e){return this._getType(e)===i.null?m(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}el.create=(e,t)=>new el({innerType:e,typeName:e9.ZodNullable,...E(t)});class ed extends C{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===i.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ed.create=(e,t)=>new ed({innerType:e,typeName:e9.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...E(t)});class eh extends C{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return w(n)?n.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new o(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new o(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}eh.create=(e,t)=>new eh({innerType:e,typeName:e9.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...E(t)});class ef extends C{_parse(e){if(this._getType(e)!==i.nan){let t=this._getOrReturnCtx(e);return h(t,{code:a.invalid_type,expected:i.nan,received:t.parsedType}),p}return{status:"valid",value:e.data}}}ef.create=e=>new ef({typeName:e9.ZodNaN,...E(e)});let ep=Symbol("zod_brand");class ey extends C{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class em extends C{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?p:"dirty"===e.status?(t.dirty(),y(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?p:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new em({in:e,out:t,typeName:e9.ZodPipeline})}}class eg extends C{_parse(e){let t=this._def.innerType._parse(e);return b(t)&&(t.value=Object.freeze(t.value)),t}}eg.create=(e,t)=>new eg({innerType:e,typeName:e9.ZodReadonly,...E(t)});let ev=(e,t={},r)=>e?L.create().superRefine((n,i)=>{var s,a;if(!e(n)){let e="function"==typeof t?t(n):"string"==typeof t?{message:t}:t,o=null===(a=null!==(s=e.fatal)&&void 0!==s?s:r)||void 0===a||a;i.addIssue({code:"custom",..."string"==typeof e?{message:e}:e,fatal:o})}}):L.create(),eb={object:W.lazycreate};(e2=e9||(e9={})).ZodString="ZodString",e2.ZodNumber="ZodNumber",e2.ZodNaN="ZodNaN",e2.ZodBigInt="ZodBigInt",e2.ZodBoolean="ZodBoolean",e2.ZodDate="ZodDate",e2.ZodSymbol="ZodSymbol",e2.ZodUndefined="ZodUndefined",e2.ZodNull="ZodNull",e2.ZodAny="ZodAny",e2.ZodUnknown="ZodUnknown",e2.ZodNever="ZodNever",e2.ZodVoid="ZodVoid",e2.ZodArray="ZodArray",e2.ZodObject="ZodObject",e2.ZodUnion="ZodUnion",e2.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e2.ZodIntersection="ZodIntersection",e2.ZodTuple="ZodTuple",e2.ZodRecord="ZodRecord",e2.ZodMap="ZodMap",e2.ZodSet="ZodSet",e2.ZodFunction="ZodFunction",e2.ZodLazy="ZodLazy",e2.ZodLiteral="ZodLiteral",e2.ZodEnum="ZodEnum",e2.ZodEffects="ZodEffects",e2.ZodNativeEnum="ZodNativeEnum",e2.ZodOptional="ZodOptional",e2.ZodNullable="ZodNullable",e2.ZodDefault="ZodDefault",e2.ZodCatch="ZodCatch",e2.ZodPromise="ZodPromise",e2.ZodBranded="ZodBranded",e2.ZodPipeline="ZodPipeline",e2.ZodReadonly="ZodReadonly";let ew=S.create,e_=$.create,ex=ef.create,eE=P.create,eC=Z.create,ek=z.create,eT=N.create,eO=U.create,eR=D.create,eI=L.create,ej=M.create,eA=B.create,eq=F.create,eS=V.create,e$=W.create,eP=W.strictCreate,eZ=H.create,ez=G.create,eN=J.create,eU=X.create,eD=Y.create,eL=Q.create,eM=ee.create,eB=et.create,eF=er.create,eV=en.create,eW=es.create,eH=ea.create,eK=eo.create,eG=eu.create,eJ=ec.create,eX=el.create,eY=eu.createWithPreprocess,eQ=em.create;var e0,e1,e2,e6,e3,e8,e9,e5=Object.freeze({__proto__:null,defaultErrorMap:u,setErrorMap:function(e){c=e},getErrorMap:l,makeIssue:d,EMPTY_PATH:[],addIssueToContext:h,ParseStatus:f,INVALID:p,DIRTY:y,OK:m,isAborted:g,isDirty:v,isValid:b,isAsync:w,get util(){return e6},get objectUtil(){return e3},ZodParsedType:i,getParsedType:s,ZodType:C,ZodString:S,ZodNumber:$,ZodBigInt:P,ZodBoolean:Z,ZodDate:z,ZodSymbol:N,ZodUndefined:U,ZodNull:D,ZodAny:L,ZodUnknown:M,ZodNever:B,ZodVoid:F,ZodArray:V,ZodObject:W,ZodUnion:H,ZodDiscriminatedUnion:G,ZodIntersection:J,ZodTuple:X,ZodRecord:Y,ZodMap:Q,ZodSet:ee,ZodFunction:et,ZodLazy:er,ZodLiteral:en,ZodEnum:es,ZodNativeEnum:ea,ZodPromise:eo,ZodEffects:eu,ZodTransformer:eu,ZodOptional:ec,ZodNullable:el,ZodDefault:ed,ZodCatch:eh,ZodNaN:ef,BRAND:ep,ZodBranded:ey,ZodPipeline:em,ZodReadonly:eg,custom:ev,Schema:C,ZodSchema:C,late:eb,get ZodFirstPartyTypeKind(){return e9},coerce:{string:e=>S.create({...e,coerce:!0}),number:e=>$.create({...e,coerce:!0}),boolean:e=>Z.create({...e,coerce:!0}),bigint:e=>P.create({...e,coerce:!0}),date:e=>z.create({...e,coerce:!0})},any:eI,array:eS,bigint:eE,boolean:eC,date:ek,discriminatedUnion:ez,effect:eG,enum:eW,function:eB,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>ev(t=>t instanceof e,t),intersection:eN,lazy:eF,literal:eV,map:eL,nan:ex,nativeEnum:eH,never:eA,null:eR,nullable:eX,number:e_,object:e$,oboolean:()=>eC().optional(),onumber:()=>e_().optional(),optional:eJ,ostring:()=>ew().optional(),pipeline:eQ,preprocess:eY,promise:eK,record:eD,set:eM,strictObject:eP,string:ew,symbol:eT,transformer:eG,tuple:eU,undefined:eO,union:eZ,unknown:ej,void:eq,NEVER:p,ZodIssueCode:a,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:o})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.