"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7436],{48764:function(e,t,r){var n=r(79742),o=r(80645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(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"),!a.isEncoding(t))throw TypeError("Unknown encoding: "+t);var r=0|d(e,t),n=s(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),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 f(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 a.from(n,t,r);var o=function(e){if(a.isBuffer(e)){var t,r=0|p(e.length),n=s(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?s(0):f(e):"Buffer"===e.type&&Array.isArray(e.data)?f(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.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),s(e<0?0:0|p(e))}function f(e){for(var t=e.length<0?0:0|p(e.length),r=s(t),n=0;n=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function d(e,t){if(a.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 o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return A(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return S(e).length;default:if(o)return n?-1:A(e).length;t=(""+t).toLowerCase(),o=!0}}function y(e,t,r){var o,i,s=!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 o="",i=t;i2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(i=r=+r)!=i&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return -1;r=e.length-1}else if(r<0){if(!o)return -1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,o);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,o);throw TypeError("val must be string, number or Buffer")}function b(e,t,r,n,o){var i,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(i=r;ia&&(r=a-u),i=r;i>=0;i--){for(var f=!0,h=0;h239?4:c>223?3:c>191?2:1;if(o+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:(192&(i=e[o+1]))==128&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],s=e[o+2],(192&i)==128&&(192&s)==128&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],(192&i)==128&&(192&s)==128&&(192&a)==128&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;nr)throw RangeError("Trying to access beyond buffer length")}function E(e,t,r,n,o,i){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw RangeError("Index out of range")}function C(e,t,r,n,o,i){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function T(e,t,r,n,i){return t=+t,r>>>=0,i||C(e,t,r,4,34028234663852886e22,-34028234663852886e22),o.write(e,t,r,n,23,4),r+4}function x(e,t,r,n,i){return t=+t,r>>>=0,i||C(e,t,r,8,17976931348623157e292,-17976931348623157e292),o.write(e,t,r,n,52,8),r+8}t.lW=a,t.h2=50,a.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}}(),a.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(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return(c(e),e<=0)?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)},a.allocUnsafe=function(e){return l(e)},a.allocUnsafeSlow=function(e){return l(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(I(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),I(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.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,o=0,i=Math.min(r,n);on.length?a.from(i).copy(n,o):Uint8Array.prototype.set.call(n,i,o);else if(a.isBuffer(i))i.copy(n,o);else throw TypeError('"list" argument must be an Array of Buffers');o+=i.length}return n},a.byteLength=d,a.prototype._isBuffer=!0,a.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;tr&&(e+=" ... "),""},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,o){if(I(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.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===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;for(var i=o-n,s=r-t,u=Math.min(i,s),c=this.slice(n,o),l=e.slice(t,r),f=0;f>>=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 o,i,s,a,u,c,l,f,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 p=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var s=0;s>8,o.push(r%256),o.push(n);return o}(e,this.length-l),this,l,f);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.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>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],o=1,i=0;++i>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.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]},a.prototype.readUint32BE=a.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])},a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},a.prototype.readInt8=function(e,t){return(e>>>=0,t||w(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},a.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},a.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},a.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},a.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]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||w(e,4,this.length),o.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||w(e,4,this.length),o.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||w(e,8,this.length),o.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||w(e,8,this.length),o.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;E(this,e,t,r,o,0)}var i=1,s=0;for(this[t]=255&e;++s>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;E(this,e,t,r,o,0)}var i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||E(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||E(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||E(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||E(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},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||E(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},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);E(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);E(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||E(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||E(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||E(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||E(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},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||E(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},a.prototype.writeFloatLE=function(e,t,r){return T(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return T(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return x(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return x(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.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=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>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!o){if(r>56319||s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return i}function S(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(O,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,t,r,n){for(var o=0;o=t.length)&&!(o>=e.length);++o)t[o+r]=e[o];return o}function I(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var k=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)t[n+o]=e[r]+e[o];return t}()},23259:function(e,t,r){r.d(t,{C:function(){return s},N:function(){return c}});var n={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},o={0:8203,1:8204,2:8205,3:65279},i=[,,,,].fill(String.fromCodePoint(o[0])).join("");function s(e,t,r="auto"){let n;return!0===r||"auto"===r&&(!(!Number.isNaN(Number(e))||/[a-z]/i.test(e)&&!/\d+(?:[-:\/]\d+){2}(?:T\d+(?:[-:\/]\d+){1,2}(\.\d+)?Z?)?/.test(e))&&Date.parse(e)||function(e){try{new URL(e,e.startsWith("/")?"https://acme.com":void 0)}catch{return!1}return!0}(e))?e:`${e}${n=JSON.stringify(t),`${i}${Array.from(n).map(e=>{let t=e.charCodeAt(0);if(t>255)throw Error(`Only ASCII edit info can be encoded. Error attempting to encode ${n} on character ${e} (${t})`);return Array.from(t.toString(4).padStart(4,"0")).map(e=>String.fromCodePoint(o[e])).join("")}).join("")}`}`}Object.fromEntries(Object.entries(o).map(e=>e.reverse())),Object.fromEntries(Object.entries(n).map(e=>e.reverse()));var a=`${Object.values(n).map(e=>`\\u{${e.toString(16)}}`).join("")}`,u=RegExp(`[${a}]{4,}`,"gu");function c(e){var t,r;return e&&JSON.parse({cleaned:(t=JSON.stringify(e)).replace(u,""),encoded:(null==(r=t.match(u))?void 0:r[0])||""}.cleaned)}},77436:function(e,t,r){r.d(t,{eI:function(){return nf}});let n=!(typeof navigator>"u")&&"ReactNative"===navigator.product,o={timeout:n?6e4:12e4},i=function(e){let t={...o,..."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(o.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),o=e.slice(t+1);if(!n)return{url:r,searchParams:new URLSearchParams(o)};if("function"!=typeof decodeURIComponent)throw Error("Broken `URLSearchParams` implementation, and `decodeURIComponent` is not defined");let i=new URLSearchParams;for(let e of o.split("&")){let[t,r]=e.split("=");t&&i.append(s(t),s(r||""))}return{url:r,searchParams:i}}(t.url);for(let[n,o]of Object.entries(t.query)){if(void 0!==o){if(Array.isArray(o))for(let e of o)r.append(n,e);else r.append(n,o)}let i=r.toString();i&&(t.url=`${e}?${i}`)}}return t.method=t.body&&!t.method?"POST":(t.method||"GET").toUpperCase(),t};function s(e){return decodeURIComponent(e.replace(/\+/g," "))}let a=/^https?:\/\//i,u=function(e){if(!a.test(e.url))throw Error(`"${e.url}" is not a valid URL`)},c=e=>function(t,r,...n){let o="onError"===t,i=r;for(let r=0;r"u"?t[a]=u:(o=t[a],"[object Array]"===Object.prototype.toString.call(o))?t[a].push(u):t[a]=[t[a],u]}return t}).__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h,x=Object.defineProperty,O=(e,t,r)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t,r)=>(O(e,"symbol"!=typeof t?t+"":t,r),r),S=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},j=(e,t,r)=>(S(e,t,"read from private field"),r?r.call(e):t.get(e)),I=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},k=(e,t,r,n)=>(S(e,t,"write to private field"),t.set(e,r),r);class R{constructor(){A(this,"onabort"),A(this,"onerror"),A(this,"onreadystatechange"),A(this,"ontimeout"),A(this,"readyState",0),A(this,"response"),A(this,"responseText",""),A(this,"responseType",""),A(this,"status"),A(this,"statusText"),A(this,"withCredentials"),I(this,y,void 0),I(this,g,void 0),I(this,m,void 0),I(this,b,{}),I(this,v,void 0),I(this,w,{}),I(this,E,void 0)}open(e,t,r){var n;k(this,y,e),k(this,g,t),k(this,m,""),this.readyState=1,null==(n=this.onreadystatechange)||n.call(this),k(this,v,void 0)}abort(){j(this,v)&&j(this,v).abort()}getAllResponseHeaders(){return j(this,m)}setRequestHeader(e,t){j(this,b)[e]=t}setInit(e,t=!0){k(this,w,e),k(this,E,t)}send(e){let t="arraybuffer"!==this.responseType,r={...j(this,w),method:j(this,y),headers:j(this,b),body:e};"function"==typeof AbortController&&j(this,E)&&(k(this,v,new AbortController),"u">typeof EventTarget&&j(this,v).signal instanceof EventTarget&&(r.signal=j(this,v).signal)),"u">typeof document&&(r.credentials=this.withCredentials?"include":"omit"),fetch(j(this,g),r).then(e=>(e.headers.forEach((e,t)=>{k(this,m,j(this,m)+`${t}: ${e}\r `)}),this.status=e.status,this.statusText=e.statusText,this.readyState=3,t?e.text():e.arrayBuffer())).then(e=>{var t;"string"==typeof e?this.responseText=e:this.response=e,this.readyState=4,null==(t=this.onreadystatechange)||t.call(this)}).catch(e=>{var t,r;if("AbortError"===e.name){null==(t=this.onabort)||t.call(this);return}null==(r=this.onerror)||r.call(this,e)})}}y=new WeakMap,g=new WeakMap,m=new WeakMap,b=new WeakMap,v=new WeakMap,w=new WeakMap,E=new WeakMap;let $="function"==typeof XMLHttpRequest?"xhr":"fetch",U="xhr"===$?XMLHttpRequest:R,P=(e,t)=>{var r;let n=e.options,o=e.applyMiddleware("finalizeOptions",n),i={},s=e.applyMiddleware("interceptRequest",void 0,{adapter:$,context:e});if(s){let e=setTimeout(t,0,null,s);return{abort:()=>clearTimeout(e)}}let a=new U;a instanceof R&&"object"==typeof o.fetch&&a.setInit(o.fetch,null==(r=o.useAbortSignal)||r);let u=o.headers,c=o.timeout,l=!1,f=!1,h=!1;if(a.onerror=e=>{a instanceof R?y(e instanceof Error?e:Error(`Request error while attempting to reach is ${o.url}`,{cause:e})):y(Error(`Request error while attempting to reach is ${o.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},a.ontimeout=e=>{y(Error(`Request timeout while attempting to reach ${o.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},a.onabort=()=>{d(!0),l=!0},a.onreadystatechange=()=>{c&&(d(),i.socket=setTimeout(()=>p("ESOCKETTIMEDOUT"),c.socket)),l||4!==a.readyState||0===a.status||function(){if(!(l||f||h)){if(0===a.status){y(Error("Unknown XHR error"));return}d(),f=!0,t(null,{body:a.response||(""===a.responseType||"text"===a.responseType?a.responseText:""),url:o.url,method:o.method,headers:T(a.getAllResponseHeaders()),statusCode:a.status,statusMessage:a.statusText})}}()},a.open(o.method,o.url,!0),a.withCredentials=!!o.withCredentials,u&&a.setRequestHeader)for(let e in u)u.hasOwnProperty(e)&&a.setRequestHeader(e,u[e]);return o.rawBody&&(a.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:o,adapter:$,request:a,context:e}),a.send(o.body||null),c&&(i.connect=setTimeout(()=>p("ETIMEDOUT"),c.connect)),{abort:function(){l=!0,a&&a.abort()}};function p(t){h=!0,a.abort();let r=Error("ESOCKETTIMEDOUT"===t?`Socket timed out on request to ${o.url}`:`Connection timed out on request to ${o.url}`);r.code=t,e.channels.error.publish(r)}function d(e){(e||l||a.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function y(e){if(f)return;d(!0),f=!0,a=null;let r=e||Error(`Network error while attempting to reach ${o.url}`);r.isNetworkError=!0,r.request=o,t(r)}},M=(e=[],t=P)=>(function e(t,r){let n=[],o=f.reduce((e,t)=>(e[t]=e[t]||[],e),{processOptions:[i],validateOptions:[u]});function s(e){let t;let n=(e,t,r)=>{let n=e,o=t;if(!n)try{o=s("onResponse",t,r)}catch(e){o=null,n=e}(n=n&&s("onError",n,r))?i.error.publish(n):o&&i.response.publish(o)},i=l.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=c(o),a=s("processOptions",e);s("validateOptions",a);let u={options:a,channels:i,applyMiddleware:s},f=i.request.subscribe(e=>{t=r(e,(t,r)=>n(t,r,e))});i.abort.subscribe(()=>{f(),t&&t.abort()});let h=s("onReturn",i,u);return h===i&&i.request.publish(u),h}return s.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 f.forEach(t=>{e[t]&&o[t].push(e[t])}),n.push(e),s},s.clone=()=>e(n,r),t.forEach(s.use),s})(e,t);var F,B,_=r(83454),L=r(48764).lW,q={exports:{}},D=function(e){function t(e){let n,o=null,i,s;function a(...e){if(!a.enabled)return;let r=Number(new Date),o=r-(n||r);a.diff=o,a.prev=n,a.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,n)=>{if("%%"===r)return"%";i++;let o=t.formatters[n];if("function"==typeof o){let t=e[i];r=o.call(a,t),e.splice(i,1),i--}return r}),t.formatArgs.call(a,e),(a.log||t.log).apply(a,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){let n=t(this.namespace+(typeof r>"u"?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}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.map(n),...t.skips.map(n).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];let n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r=1.5*r?"s":"")}return B=1,F=function(t,r){r=r||{};var n,o,i=typeof t;if("string"===i&&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"===i&&isFinite(t))return r.long?(n=Math.abs(t))>=864e5?e(t,n,864e5,"day"):n>=36e5?e(t,n,36e5,"hour"):n>=6e4?e(t,n,6e4,"minute"):n>=1e3?e(t,n,1e3,"second"):t+" ms":(o=Math.abs(t))>=864e5?Math.round(t/864e5)+"d":o>=36e5?Math.round(t/36e5)+"h":o>=6e4?Math.round(t/6e4)+"m":o>=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&&(n++,"%c"===e&&(o=n))}),t.splice(o,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")}catch{}return!e&&"u">typeof _&&"env"in _&&(e=_.env.DEBUG),e},t.useColors=function(){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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$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=D(t);let{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(q,q.exports),q.exports,Object.prototype.hasOwnProperty;let N=typeof L>"u"?()=>!1:e=>L.isBuffer(e);function W(e){return"[object Object]"===Object.prototype.toString.call(e)}let z=["boolean","string","number"],H={};"u">typeof globalThis?H=globalThis:"u">typeof window?H=window:"u">typeof global?H=global:"u">typeof self&&(H=self);var J=H,Y=Object.defineProperty,G=(e,t,r)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,V=(e,t,r)=>(G(e,"symbol"!=typeof t?t+"":t,r),r);let X=(e={})=>{let t=e.implementation||Promise;if(!t)throw Error("`Promise` is not available in global scope, and no implementation was passed");return{onReturn:(r,n)=>new t((t,o)=>{let i=n.options.cancelToken;i&&i.promise.then(e=>{r.abort.publish(e),o(e)}),r.error.subscribe(o),r.response.subscribe(r=>{t(e.onlyBody?r.body:r)}),setTimeout(()=>{try{r.request.publish(n)}catch(e){o(e)}},0)})}};class Z{constructor(e){V(this,"__CANCEL__",!0),V(this,"message"),this.message=e}toString(){return`Cancel${this.message?`: ${this.message}`:""}`}}let K=class{constructor(e){if(V(this,"promise"),V(this,"reason"),"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 Z(e),t(this.reason))})}};V(K,"source",()=>{let e;return{token:new K(t=>{e=t}),cancel:e}}),X.Cancel=Z,X.CancelToken=K,X.isCancel=e=>!!(e&&null!=e&&e.__CANCEL__);var Q=(e,t,r)=>("GET"===r.method||"HEAD"===r.method)&&(e.isNetworkError||!1);let ee=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;var et=e=>{let t=e.maxRetries||5,r=e.retryDelay||er,n=e.shouldRetry;return{onError:(e,o)=>{let i=o.options,s=i.maxRetries||t,a=i.retryDelay||r,u=i.shouldRetry||n,c=i.attemptNumber||0;if(ee(i.body)||!u(e,c,i)||c>=s)return e;let l=Object.assign({},o,{options:Object.assign({},i,{attemptNumber:c+1})});return setTimeout(()=>o.channels.request.publish(l),a(c)),null}}};function er(e){return 100*Math.pow(2,e)+100*Math.random()}let en=(e={})=>et({shouldRetry:Q,...e});en.shouldRetry=Q;var eo=r(70655);function ei(e){return"function"==typeof e}function es(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}var ea=es(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}});function eu(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var ec=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,n,o,i=this._parentage;if(i){if(this._parentage=null,Array.isArray(i))try{for(var s=(0,eo.XA)(i),a=s.next();!a.done;a=s.next())a.value.remove(this)}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else i.remove(this)}var u=this.initialTeardown;if(ei(u))try{u()}catch(e){o=e instanceof ea?e.errors:[e]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var l=(0,eo.XA)(c),f=l.next();!f.done;f=l.next()){var h=f.value;try{ef(h)}catch(e){o=null!=o?o:[],e instanceof ea?o=(0,eo.ev)((0,eo.ev)([],(0,eo.CR)(o)),(0,eo.CR)(e.errors)):o.push(e)}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}if(o)throw new ea(o)}},t.prototype.add=function(e){var r;if(e&&e!==this){if(this.closed)ef(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)&&eu(t,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&eu(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}();function el(e){return e instanceof ec||e&&"closed"in e&&ei(e.remove)&&ei(e.add)&&ei(e.unsubscribe)}function ef(e){ei(e)?e():e.unsubscribe()}ec.EMPTY;var eh={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ep={setTimeout:function(e,t){for(var r=[],n=2;nt in e?e6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,e8=(e,t,r)=>(e5(e,"symbol"!=typeof t?t+"":t,r),r);class e4 extends Error{constructor(e){let t=e7(e);super(t.message),e8(this,"response"),e8(this,"statusCode",400),e8(this,"responseBody"),e8(this,"details"),Object.assign(this,t)}}class e9 extends Error{constructor(e){let t=e7(e);super(t.message),e8(this,"response"),e8(this,"statusCode",500),e8(this,"responseBody"),e8(this,"details"),Object.assign(this,t)}}function e7(e){let t=e.body,r={response:e,statusCode:e.statusCode,responseBody:-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(t,null,2):t,message:"",details:void 0};if(t.error&&t.message)return r.message=`${t.error} - ${t.message}`,r;if(te(t)&&te(t.error)&&"mutationError"===t.error.type&&"string"==typeof t.error.description){let e=t.error.items||[],n=e.slice(0,5).map(e=>{var t;return null==(t=e.error)?void 0:t.description}).filter(Boolean),o=n.length?`: - ${n.join(` - `)}`:"";return e.length>5&&(o+=` ...and ${e.length-5} more`),r.message=`${t.error.description}${o}`,r.details=t.error,r}return t.error&&t.error.description?(r.message=t.error.description,r.details=t.error):r.message=t.error||t.message||function(e){let t=e.statusMessage?` ${e.statusMessage}`:"";return`${e.method}-request to ${e.url} resulted in HTTP ${e.statusCode}${t}`}(e),r}function te(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let tt={onResponse:e=>{if(e.statusCode>=500)throw new e9(e);if(e.statusCode>=400)throw new e4(e);return e}},tr={onResponse:e=>{let t=e.headers["x-sanity-warning"];return(Array.isArray(t)?t:[t]).filter(Boolean).forEach(e=>console.warn(e)),e}};function tn(e,t,r){if(0===r.maxRetries)return!1;let n="GET"===r.method||"HEAD"===r.method,o=(r.uri||r.url).startsWith("/data/query"),i=e.response&&(429===e.response.statusCode||502===e.response.statusCode||503===e.response.statusCode);return(!!n||!!o)&&!!i||en.shouldRetry(e,t,r)}function to(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 ()","* Array of document IDs","* Object containing `query`"].join(` `);throw Error(`Unknown selection - must be one of: ${t}`)}let ti=["image","file"],ts=["before","after","replace"],ta=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")},tu=e=>{if(!/^[-a-z0-9]+$/i.test(e))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")},tc=e=>{if(-1===ti.indexOf(e))throw Error(`Invalid asset type: ${e}. Must be one of ${ti.join(", ")}`)},tl=(e,t)=>{if(null===t||"object"!=typeof t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},tf=(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`)},th=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);tf(e,t._id)},tp=(e,t,r)=>{let n="insert(at, selector, items)";if(-1===ts.indexOf(e)){let e=ts.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`)},td=e=>{if(!e.dataset)throw Error("`dataset` must be provided to perform queries");return e.dataset||""},ty=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};var tg=Object.defineProperty,tm=(e,t,r)=>t in e?tg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tb=(e,t,r)=>(tm(e,"symbol"!=typeof t?t+"":t,r),r),tv=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},tw=(e,t,r)=>(tv(e,t,"read from private field"),r?r.call(e):t.get(e)),tE=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},tC=(e,t,r,n)=>(tv(e,t,"write to private field"),t.set(e,r),r);class tT{constructor(e,t={}){tb(this,"selection"),tb(this,"operations"),this.selection=e,this.operations=t}set(e){return this._assign("set",e)}setIfMissing(e){return this._assign("setIfMissing",e)}diffMatchPatch(e){return tl("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 tp(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 o=t<0?t-1:t,i=typeof r>"u"||-1===r?-1:Math.max(0,t+r),s=`${e}[${o}:${o<0&&i>=0?"":i}]`;return this.insert("replace",s,n||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...to(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,r=!0){return tl(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)}}let tx=class e extends tT{constructor(e,t,r){super(e,t),tE(this,ro,void 0),tC(this,ro,r)}clone(){return new e(this.selection,{...this.operations},tw(this,ro))}commit(e){if(!tw(this,ro))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 tw(this,ro).mutate({patch:this.serialize()},t)}};ro=new WeakMap;let tO=class e extends tT{constructor(e,t,r){super(e,t),tE(this,ri,void 0),tC(this,ri,r)}clone(){return new e(this.selection,{...this.operations},tw(this,ri))}commit(e){if(!tw(this,ri))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 tw(this,ri).mutate({patch:this.serialize()},t)}};ri=new WeakMap;var tA=Object.defineProperty,tS=(e,t,r)=>t in e?tA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tj=(e,t,r)=>(tS(e,"symbol"!=typeof t?t+"":t,r),r),tI=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},tk=(e,t,r)=>(tI(e,t,"read from private field"),r?r.call(e):t.get(e)),tR=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},t$=(e,t,r,n)=>(tI(e,t,"write to private field"),t.set(e,r),r);let tU={returnDocuments:!1};class tP{constructor(e=[],t){tj(this,"operations"),tj(this,"trxId"),this.operations=e,this.trxId=t}create(e){return tl("create",e),this._add({create:e})}createIfNotExists(e){let t="createIfNotExists";return tl(t,e),th(t,e),this._add({[t]:e})}createOrReplace(e){let t="createOrReplace";return tl(t,e),th(t,e),this._add({[t]:e})}delete(e){return tf("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}}let tM=class e extends tP{constructor(e,t,r){super(e,r),tR(this,rs,void 0),t$(this,rs,t)}clone(){return new e([...this.operations],tk(this,rs),this.trxId)}commit(e){if(!tk(this,rs))throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return tk(this,rs).mutate(this.serialize(),Object.assign({transactionId:this.trxId},tU,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof tO)return this._add({patch:e.serialize()});if(r){let r=t(new tO(e,{},tk(this,rs)));if(!(r instanceof tO))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}};rs=new WeakMap;let tF=class e extends tP{constructor(e,t,r){super(e,r),tR(this,ra,void 0),t$(this,ra,t)}clone(){return new e([...this.operations],tk(this,ra),this.trxId)}commit(e){if(!tk(this,ra))throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return tk(this,ra).mutate(this.serialize(),Object.assign({transactionId:this.trxId},tU,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof tx)return this._add({patch:e.serialize()});if(r){let r=t(new tx(e,{},tk(this,ra)));if(!(r instanceof tx))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}};function tB(e){return"https://www.sanity.io/help/"+e}ra=new WeakMap;let t_=e=>{var t;let r,n;return t=(...t)=>console.warn(e.join(" "),...t),r=!1,(...e)=>(r||(n=t(...e),r=!0),n)},tL=t_(["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."]),tq=t_(["The Sanity client is configured with the `perspective` set to `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."]),tD=t_(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${tB("js-client-browser-token")} for more information and how to hide this warning.`]),tN=t_(["Using the Sanity client without specifying an API version is deprecated.",`See ${tB("js-client-api-version")}`]),tW=(t_(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),{apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}}),tz=["localhost","127.0.0.1","0.0.0.0"],tH=e=>-1!==tz.indexOf(e),tJ=function(e){switch(e){case"previewDrafts":case"published":case"raw":return;default:throw TypeError("Invalid API perspective string, expected `published`, `previewDrafts` or `raw`")}},tY=(e,t)=>{let r={...t,...e,stega:{..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||tW.stega,..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||{}}};r.apiVersion||tN();let n={...tW,...r},o=n.useProjectHostname;if(typeof Promise>"u"){let e=tB("js-client-promise-polyfill");throw Error(`No native Promise-implementation found, polyfill needed - see ${e}`)}if(o&&!n.projectId)throw Error("Configuration must contain `projectId`");if("string"==typeof n.perspective&&tJ(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 i="u">typeof window&&window.location&&window.location.hostname,s=i&&tH(window.location.hostname);i&&s&&n.token&&!0!==n.ignoreBrowserTokenWarning?tD():typeof n.useCdn>"u"&&tL(),o&&tu(n.projectId),n.dataset&&ta(n.dataset),"requestTagPrefix"in n&&(n.requestTagPrefix=n.requestTagPrefix?ty(n.requestTagPrefix).replace(/\.+$/,""):void 0),n.apiVersion=`${n.apiVersion}`.replace(/^v/,""),n.isDefaultApi=n.apiHost===tW.apiHost,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 a=n.apiHost.split("://",2),u=a[0],c=a[1],l=n.isDefaultApi?"apicdn.sanity.io":c;return n.useProjectHostname?(n.url=`${u}://${n.projectId}.${c}/v${n.apiVersion}`,n.cdnUrl=`${u}://${n.projectId}.${l}/v${n.apiVersion}`):(n.url=`${n.apiHost}/v${n.apiVersion}`,n.cdnUrl=n.url),n},tG=({query:e,params:t={},options:r={}})=>{let n=new URLSearchParams,{tag:o,returnQuery:i,...s}=r;for(let[r,i]of(o&&n.append("tag",o),n.append("query",e),Object.entries(t)))n.append(`$${r}`,JSON.stringify(i));for(let[e,t]of Object.entries(s))t&&n.append(e,`${t}`);return!1===i&&n.append("returnQuery","false"),`?${n}`},tV=(e,t)=>!1===e?void 0:typeof e>"u"?t:e,tX=(e={})=>({dryRun:e.dryRun,returnIds:!0,returnDocuments:tV(e.returnDocuments,!0),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}),tZ=e=>"response"===e.type,tK=e=>e.body,tQ=(e,t)=>e.reduce((e,r)=>(e[t(r)]=r,e),Object.create(null));function t0(e,t,n,o,i={},s={}){let a="stega"in s?{...n||{},..."boolean"==typeof s.stega?{enabled:s.stega}:s.stega||{}}:n,u=a.enabled?(0,e3.N)(i):i,c=!1===s.filterResponse?e=>e:e=>e.result,{cache:l,next:f,...h}={useAbortSignal:"u">typeof s.signal,resultSourceMap:a.enabled?"withKeyArraySelector":s.resultSourceMap,...s,returnQuery:!1===s.filterResponse&&!1!==s.returnQuery},p=t4(e,t,"query",{query:o,params:u},"u">typeof l||"u">typeof f?{...h,fetch:{cache:l,next:f}}:h);return a.enabled?p.pipe(function(){for(var e=[],t=0;te))),eQ(([e,t])=>{let r=t(e.result,e.resultSourceMap,a);return c({...e,result:r})})):p.pipe(eQ(c))}function t1(e,t,r,n={}){let o={uri:rt(e,"doc",r),json:!0,tag:n.tag};return t7(e,t,o).pipe(e2(tZ),eQ(e=>e.body.documents&&e.body.documents[0]))}function t2(e,t,r,n={}){let o={uri:rt(e,"doc",r.join(",")),json:!0,tag:n.tag};return t7(e,t,o).pipe(e2(tZ),eQ(e=>{let t=tQ(e.body.documents||[],e=>e._id);return r.map(e=>t[e]||null)}))}function t3(e,t,r,n){return th("createIfNotExists",r),t9(e,t,r,"createIfNotExists",n)}function t6(e,t,r,n){return th("createOrReplace",r),t9(e,t,r,"createOrReplace",n)}function t5(e,t,r,n){return t4(e,t,"mutate",{mutations:[{delete:to(r)}]},n)}function t8(e,t,r,n){let o;return t4(e,t,"mutate",{mutations:Array.isArray(o=r instanceof tO||r instanceof tx?{patch:r.serialize()}:r instanceof tM||r instanceof tF?r.serialize():r)?o:[o],transactionId:n&&n.transactionId||void 0},n)}function t4(e,t,r,n,o={}){let i="mutate"===r,s=i?"":tG(n),a=!i&&s.length<11264,u=o.returnFirst,{timeout:c,token:l,tag:f,headers:h,returnQuery:p,lastLiveEventId:d}=o,y=rt(e,r,a?s:"");return t7(e,t,{method:a?"GET":"POST",uri:y,json:!0,body:a?void 0:n,query:i&&tX(o),timeout:c,headers:h,token:l,tag:f,returnQuery:p,perspective:o.perspective,resultSourceMap:o.resultSourceMap,lastLiveEventId:Array.isArray(d)?d[0]:d,canUseCdn:"query"===r,signal:o.signal,fetch:o.fetch,useAbortSignal:o.useAbortSignal,useCdn:o.useCdn}).pipe(e2(tZ),eQ(tK),eQ(e=>{if(!i)return e;let t=e.results||[];if(o.returnDocuments)return u?t[0]&&t[0].document:t.map(e=>e.document);let r=u?t[0]&&t[0].id:t.map(e=>e.id);return{transactionId:e.transactionId,results:t,[u?"documentId":"documentIds"]:r}}))}function t9(e,t,r,n,o={}){return t4(e,t,"mutate",{mutations:[{[n]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},o))}function t7(e,t,r){var n,o,i;let s=r.url||r.uri,a=e.config(),u=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&0===s.indexOf("/data/"):r.canUseCdn,c=(null!=(n=r.useCdn)?n:a.useCdn)&&u,l=r.tag&&a.requestTagPrefix?[a.requestTagPrefix,r.tag].join("."):r.tag||a.requestTagPrefix;if(l&&null!==r.tag&&(r.query={tag:ty(l),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&0===s.indexOf("/data/query/")){let e=null!=(o=r.resultSourceMap)?o:a.resultSourceMap;void 0!==e&&!1!==e&&(r.query={resultSourceMap:e,...r.query});let t=r.perspective||a.perspective;"string"==typeof t&&"raw"!==t&&(tJ(t),r.query={perspective:t,...r.query},"previewDrafts"===t&&c&&(c=!1,tq())),r.lastLiveEventId&&(r.query={...r.query,lastLiveEventId:r.lastLiveEventId}),!1===r.returnQuery&&(r.query={returnQuery:"false",...r.query})}let f=function(e,t={}){let r={},n=t.token||e.token;n&&(r.Authorization=`Bearer ${n}`),t.useGlobalApi||e.useProjectHostname||!e.projectId||(r["X-Sanity-Project-ID"]=e.projectId);let o=!!(typeof t.withCredentials>"u"?e.token||e.withCredentials:t.withCredentials),i=typeof t.timeout>"u"?e.timeout:t.timeout;return Object.assign({},t,{headers:Object.assign({},r,t.headers||{}),timeout:typeof i>"u"?3e5:i,proxy:t.proxy||e.proxy,json:!0,withCredentials:o,fetch:"object"==typeof t.fetch&&"object"==typeof e.fetch?{...e.fetch,...t.fetch}:t.fetch||e.fetch})}(a,Object.assign({},r,{url:rr(e,s,c)})),h=new ek(e=>t(f,a.requester).subscribe(e));return r.signal?h.pipe((i=r.signal,e=>new ek(t=>{let r=()=>t.error(function(e){var t,r;if(rn)return new DOMException(null!=(t=null==e?void 0:e.reason)?t:"The operation was aborted.","AbortError");let n=Error(null!=(r=null==e?void 0:e.reason)?r:"The operation was aborted.");return n.name="AbortError",n}(i));if(i&&i.aborted){r();return}let n=e.subscribe(t);return i.addEventListener("abort",r),()=>{i.removeEventListener("abort",r),n.unsubscribe()}}))):h}function re(e,t,r){return t7(e,t,r).pipe(e2(e=>"response"===e.type),eQ(e=>e.body))}function rt(e,t,r){let n=td(e.config()),o=`/${t}/${n}`;return`/data${r?`${o}/${r}`:o}`.replace(/\/($|\?)/,"$1")}function rr(e,t,r=!1){let{url:n,cdnUrl:o}=e.config();return`${r?o:n}/${t.replace(/^\//,"")}`}let rn=!!globalThis.DOMException;var ro,ri,rs,ra,ru,rc,rl=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},rf=(e,t,r)=>(rl(e,t,"read from private field"),r?r.call(e):t.get(e)),rh=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},rp=(e,t,r,n)=>(rl(e,t,"write to private field"),t.set(e,r),r);class rd{constructor(e,t){rh(this,ru,void 0),rh(this,rc,void 0),rp(this,ru,e),rp(this,rc,t)}upload(e,t,r){return rg(rf(this,ru),rf(this,rc),e,t,r)}}ru=new WeakMap,rc=new WeakMap;class ry{constructor(e,t){rh(this,rT,void 0),rh(this,rx,void 0),rp(this,rT,e),rp(this,rx,t)}upload(e,t,r){return eZ(rg(rf(this,rT),rf(this,rx),e,t,r).pipe(e2(e=>"response"===e.type),eQ(e=>e.body.document)))}}function rg(e,t,r,n,o={}){tc(r);let i=o.extract||void 0;i&&!i.length&&(i=["none"]);let s=td(e.config()),a="image"===r?"images":"files",u=!(typeof File>"u")&&n instanceof File?Object.assign({filename:!1===o.preserveFilename?void 0:n.name,contentType:n.type},o):o,{tag:c,label:l,title:f,description:h,creditLine:p,filename:d,source:y}=u,g={label:l,title:f,description:h,filename:d,meta:i,creditLine:p};return y&&(g.sourceId=y.id,g.sourceName=y.name,g.sourceUrl=y.url),t7(e,t,{tag:c,method:"POST",timeout:u.timeout||0,uri:`/assets/${a}/${s}`,headers:u.contentType?{"Content-Type":u.contentType}:{},query:g,body:n})}rT=new WeakMap,rx=new WeakMap;var rm=(e,t)=>Object.keys(t).concat(Object.keys(e)).reduce((r,n)=>(r[n]=typeof e[n]>"u"?t[n]:e[n],r),{});let rb=(e,t)=>t.reduce((t,r)=>(typeof e[r]>"u"||(t[r]=e[r]),t),{}),rv=["includePreviousRevision","includeResult","visibility","effectFormat","tag"],rw={includeResult:!0};function rE(e,t,n={}){let{url:o,token:i,withCredentials:s,requestTagPrefix:a}=this.config(),u=n.tag&&a?[a,n.tag].join("."):n.tag,c={...rm(n,rw),tag:u},l=tG({query:e,params:t,options:{tag:u,...rb(c,rv)}}),f=`${o}${rt(this,"listen",l)}`;if(f.length>14800)return new ek(e=>e.error(Error("Query too large for listener")));let h=c.events?c.events:["mutation"],p=-1!==h.indexOf("reconnect"),d={};return(i||s)&&(d.withCredentials=!0),i&&(d.headers={Authorization:`Bearer ${i}`}),new ek(e=>{let t,n,o=!1,i=!1;function s(){o||(p&&e.next({type:"reconnect"}),o||t.readyState!==t.CLOSED||(l(),clearTimeout(n),n=setTimeout(g,100)))}function a(t){e.error(function(e){if(e instanceof Error)return e;let t=rC(e);return t instanceof Error?t:Error(t.error?t.error.description?t.error.description:"string"==typeof t.error?t.error:JSON.stringify(t.error,null,2):t.message||"Unknown listener error")}(t))}function u(t){let r=rC(t);return r instanceof Error?e.error(r):e.next(r)}function c(){o=!0,l(),e.complete()}function l(){t&&(t.removeEventListener("error",s),t.removeEventListener("channelError",a),t.removeEventListener("disconnect",c),h.forEach(e=>t.removeEventListener(e,u)),t.close())}async function y(){let{default:e}=await r.e(3699).then(r.t.bind(r,33699,19));if(i)return;let t=new e(f,d);return t.addEventListener("error",s),t.addEventListener("channelError",a),t.addEventListener("disconnect",c),h.forEach(e=>t.addEventListener(e,u)),t}function g(){y().then(e=>{e&&(t=e,i&&l())}).catch(t=>{e.error(t),m()})}function m(){o=!0,l(),i=!0}return g(),m})}function rC(e){try{let t=e.data&&JSON.parse(e.data)||{};return Object.assign({type:e.type},t)}catch(e){return e}}var rT,rx,rO,rA=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},rS=(e,t,r)=>(rA(e,t,"read from private field"),r?r.call(e):t.get(e)),rj=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},rI=(e,t,r,n)=>(rA(e,t,"write to private field"),t.set(e,r),r);class rk{constructor(e){rj(this,rO,void 0),rI(this,rO,e)}events(){let e=rt(rS(this,rO),"live/events"),t=new URL(rS(this,rO).getUrl(e,!1)),n=["restart","message"];return new ek(e=>{let o,i,s=!1,a=!1;function u(t){if(!s){if("data"in t){let r=rR(t);e.error(Error(r.message,{cause:r}))}o.readyState===o.CLOSED&&(l(),clearTimeout(i),i=setTimeout(h,100))}}function c(t){let r=rR(t);return r instanceof Error?e.error(r):e.next(r)}function l(){if(o){for(let e of(o.removeEventListener("error",u),n))o.removeEventListener(e,c);o.close()}}async function f(){let e=typeof EventSource>"u"?(await r.e(3699).then(r.t.bind(r,33699,19))).default:EventSource;if(a)return;let o=new e(t.toString());for(let e of(o.addEventListener("error",u),n))o.addEventListener(e,c);return o}function h(){f().then(e=>{e&&(o=e,a&&l())}).catch(t=>{e.error(t),p()})}function p(){s=!0,l(),a=!0}return h(),p})}}function rR(e){try{let t=e.data&&JSON.parse(e.data)||{};return{type:e.type,id:e.lastEventId,...t}}catch(e){return e}}rO=new WeakMap;var r$,rU,rP=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},rM=(e,t,r)=>(rP(e,t,"read from private field"),r?r.call(e):t.get(e)),rF=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},rB=(e,t,r,n)=>(rP(e,t,"write to private field"),t.set(e,r),r);class r_{constructor(e,t){rF(this,r$,void 0),rF(this,rU,void 0),rB(this,r$,e),rB(this,rU,t)}create(e,t){return rq(rM(this,r$),rM(this,rU),"PUT",e,t)}edit(e,t){return rq(rM(this,r$),rM(this,rU),"PATCH",e,t)}delete(e){return rq(rM(this,r$),rM(this,rU),"DELETE",e)}list(){return re(rM(this,r$),rM(this,rU),{uri:"/datasets",tag:null})}}r$=new WeakMap,rU=new WeakMap;class rL{constructor(e,t){rF(this,rD,void 0),rF(this,rN,void 0),rB(this,rD,e),rB(this,rN,t)}create(e,t){return eZ(rq(rM(this,rD),rM(this,rN),"PUT",e,t))}edit(e,t){return eZ(rq(rM(this,rD),rM(this,rN),"PATCH",e,t))}delete(e){return eZ(rq(rM(this,rD),rM(this,rN),"DELETE",e))}list(){return eZ(re(rM(this,rD),rM(this,rN),{uri:"/datasets",tag:null}))}}function rq(e,t,r,n,o){return ta(n),re(e,t,{method:r,uri:`/datasets/${n}`,body:o,tag:null})}rD=new WeakMap,rN=new WeakMap;var rD,rN,rW,rz,rH=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},rJ=(e,t,r)=>(rH(e,t,"read from private field"),r?r.call(e):t.get(e)),rY=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},rG=(e,t,r,n)=>(rH(e,t,"write to private field"),t.set(e,r),r);class rV{constructor(e,t){rY(this,rW,void 0),rY(this,rz,void 0),rG(this,rW,e),rG(this,rz,t)}list(e){let t=(null==e?void 0:e.includeMembers)===!1?"/projects?includeMembers=false":"/projects";return re(rJ(this,rW),rJ(this,rz),{uri:t})}getById(e){return re(rJ(this,rW),rJ(this,rz),{uri:`/projects/${e}`})}}rW=new WeakMap,rz=new WeakMap;class rX{constructor(e,t){rY(this,rZ,void 0),rY(this,rK,void 0),rG(this,rZ,e),rG(this,rK,t)}list(e){let t=(null==e?void 0:e.includeMembers)===!1?"/projects?includeMembers=false":"/projects";return eZ(re(rJ(this,rZ),rJ(this,rK),{uri:t}))}getById(e){return eZ(re(rJ(this,rZ),rJ(this,rK),{uri:`/projects/${e}`}))}}rZ=new WeakMap,rK=new WeakMap;var rZ,rK,rQ,r0,r1=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},r2=(e,t,r)=>(r1(e,t,"read from private field"),r?r.call(e):t.get(e)),r3=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},r6=(e,t,r,n)=>(r1(e,t,"write to private field"),t.set(e,r),r);class r5{constructor(e,t){r3(this,rQ,void 0),r3(this,r0,void 0),r6(this,rQ,e),r6(this,r0,t)}getById(e){return re(r2(this,rQ),r2(this,r0),{uri:`/users/${e}`})}}rQ=new WeakMap,r0=new WeakMap;class r8{constructor(e,t){r3(this,r4,void 0),r3(this,r9,void 0),r6(this,r4,e),r6(this,r9,t)}getById(e){return eZ(re(r2(this,r4),r2(this,r9),{uri:`/users/${e}`}))}}r4=new WeakMap,r9=new WeakMap;var r4,r9,r7,ne,nt=Object.defineProperty,nr=(e,t,r)=>t in e?nt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nn=(e,t,r)=>(nr(e,"symbol"!=typeof t?t+"":t,r),r),no=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},ni=(e,t,r)=>(no(e,t,"read from private field"),r?r.call(e):t.get(e)),ns=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},na=(e,t,r,n)=>(no(e,t,"write to private field"),t.set(e,r),r);let nu=class e{constructor(e,t=tW){nn(this,"assets"),nn(this,"datasets"),nn(this,"live"),nn(this,"projects"),nn(this,"users"),ns(this,r7,void 0),ns(this,ne,void 0),nn(this,"listen",rE),this.config(t),na(this,ne,e),this.assets=new rd(this,ni(this,ne)),this.datasets=new r_(this,ni(this,ne)),this.live=new rk(this),this.projects=new rV(this,ni(this,ne)),this.users=new r5(this,ni(this,ne))}clone(){return new e(ni(this,ne),this.config())}config(e){if(void 0===e)return{...ni(this,r7)};if(ni(this,r7)&&!1===ni(this,r7).allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return na(this,r7,tY(e,ni(this,r7)||{})),this}withConfig(t){let r=this.config();return new e(ni(this,ne),{...r,...t,stega:{...r.stega||{},..."boolean"==typeof(null==t?void 0:t.stega)?{enabled:t.stega}:(null==t?void 0:t.stega)||{}}})}fetch(e,t,r){return t0(this,ni(this,ne),ni(this,r7).stega,e,t,r)}getDocument(e,t){return t1(this,ni(this,ne),e,t)}getDocuments(e,t){return t2(this,ni(this,ne),e,t)}create(e,t){return t9(this,ni(this,ne),e,"create",t)}createIfNotExists(e,t){return t3(this,ni(this,ne),e,t)}createOrReplace(e,t){return t6(this,ni(this,ne),e,t)}delete(e,t){return t5(this,ni(this,ne),e,t)}mutate(e,t){return t8(this,ni(this,ne),e,t)}patch(e,t){return new tx(e,t,this)}transaction(e){return new tF(e,this)}request(e){return re(this,ni(this,ne),e)}getUrl(e,t){return rr(this,e,t)}getDataUrl(e,t){return rt(this,e,t)}};r7=new WeakMap,ne=new WeakMap;let nc=class e{constructor(e,t=tW){nn(this,"assets"),nn(this,"datasets"),nn(this,"live"),nn(this,"projects"),nn(this,"users"),nn(this,"observable"),ns(this,p,void 0),ns(this,d,void 0),nn(this,"listen",rE),this.config(t),na(this,d,e),this.assets=new ry(this,ni(this,d)),this.datasets=new rL(this,ni(this,d)),this.live=new rk(this),this.projects=new rX(this,ni(this,d)),this.users=new r8(this,ni(this,d)),this.observable=new nu(e,t)}clone(){return new e(ni(this,d),this.config())}config(e){if(void 0===e)return{...ni(this,p)};if(ni(this,p)&&!1===ni(this,p).allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.observable&&this.observable.config(e),na(this,p,tY(e,ni(this,p)||{})),this}withConfig(t){let r=this.config();return new e(ni(this,d),{...r,...t,stega:{...r.stega||{},..."boolean"==typeof(null==t?void 0:t.stega)?{enabled:t.stega}:(null==t?void 0:t.stega)||{}}})}fetch(e,t,r){return eZ(t0(this,ni(this,d),ni(this,p).stega,e,t,r))}getDocument(e,t){return eZ(t1(this,ni(this,d),e,t))}getDocuments(e,t){return eZ(t2(this,ni(this,d),e,t))}create(e,t){return eZ(t9(this,ni(this,d),e,"create",t))}createIfNotExists(e,t){return eZ(t3(this,ni(this,d),e,t))}createOrReplace(e,t){return eZ(t6(this,ni(this,d),e,t))}delete(e,t){return eZ(t5(this,ni(this,d),e,t))}mutate(e,t){return eZ(t8(this,ni(this,d),e,t))}patch(e,t){return new tO(e,t,this)}transaction(e){return new tM(e,this)}request(e){return eZ(re(this,ni(this,d),e))}dataRequest(e,t,r){return eZ(t4(this,ni(this,d),e,t,r))}getUrl(e,t){return rr(this,e,t)}getDataUrl(e,t){return rt(this,e,t)}};p=new WeakMap,d=new WeakMap;let nl=function(e,t){let r=M([en({shouldRetry:tn}),...e,tr,{processOptions:e=>{let t=e.body;return t&&"function"!=typeof t.pipe&&!N(t)&&(-1!==z.indexOf(typeof t)||Array.isArray(t)||function(e){if(!1===W(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!(!1===W(r)||!1===r.hasOwnProperty("isPrototypeOf"))}(t))?Object.assign({},e,{body:JSON.stringify(e.body),headers:Object.assign({},e.headers,{"Content-Type":"application/json"})}):e}},{onResponse:e=>{let t=e.headers["content-type"]||"",r=-1!==t.indexOf("application/json");return e.body&&t&&r?Object.assign({},e,{body:function(e){try{return JSON.parse(e)}catch(e){throw e.message=`Failed to parsed response body as JSON: ${e.message}`,e}}(e.body)}):e},processOptions:e=>Object.assign({},e,{headers:Object.assign({Accept:"application/json"},e.headers)})},{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"))}},tt,function(e={}){let t=e.implementation||J.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()))}}({implementation:ek})]);return{requester:r,createClient:e=>new t((t,n)=>(n||r)({maxRedirects:0,maxRetries:e.maxRetries,retryDelay:e.retryDelay,...t}),e)}}([],nc),nf=(nl.requester,nl.createClient)}}]);