"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4582],{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 S(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return A(e).length;default:if(o)return n?-1:S(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 x(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 O(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 x(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return x(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return O(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return O(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 A(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(T,"")).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)}},34582:function(e,t,r){r.d(t,{eI:function(){return nm}});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,O=Object.defineProperty,T=(e,t,r)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t,r)=>(T(e,"symbol"!=typeof t?t+"":t,r),r),A=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},j=(e,t,r)=>(A(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)=>(A(e,t,"write to private field"),t.set(e,r),r);class ${constructor(){S(this,"onabort"),S(this,"onerror"),S(this,"onreadystatechange"),S(this,"ontimeout"),S(this,"readyState",0),S(this,"response"),S(this,"responseText",""),S(this,"responseType",""),S(this,"status"),S(this,"statusText"),S(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 U="function"==typeof XMLHttpRequest?"xhr":"fetch",R="xhr"===U?XMLHttpRequest:$,P=(e,t)=>{var r;let n=e.options,o=e.applyMiddleware("finalizeOptions",n),i={},s=e.applyMiddleware("interceptRequest",void 0,{adapter:U,context:e});if(s){let e=setTimeout(t,0,null,s);return{abort:()=>clearTimeout(e)}}let a=new R;a instanceof $&&"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 $?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:x(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:U,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)}},_=(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 M,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 F=1,M=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 B&&"env"in B&&(e=B.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 Q=(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 K{constructor(e){V(this,"__CANCEL__",!0),V(this,"message"),this.message=e}toString(){return`Cancel${this.message?`: ${this.message}`:""}`}}let X=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 K(e),t(this.reason))})}};V(X,"source",()=>{let e;return{token:new X(t=>{e=t}),cancel:e}}),Q.Cancel=K,Q.CancelToken=X,Q.isCancel=e=>!!(e&&null!=e&&e.__CANCEL__);var Z=(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:Z,...e});en.shouldRetry=Z;var eo=function(e,t){return(eo=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function ei(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}eo(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function es(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(u){return function(a){if(r)throw TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function eu(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function ec(e,t,r){if(r||2==arguments.length)for(var n,o=0,i=t.length;o1||a(e,t)})})}function a(e,t){try{var r;(r=o[e](t)).value instanceof el?Promise.resolve(r.value.v).then(u,c):l(i[0][2],r)}catch(e){l(i[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}(this,arguments,function(){var t,r,n;return es(this,function(o){switch(o.label){case 0:t=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,el(t.read())];case 3:if(n=(r=o.sent()).value,!r.done)return[3,5];return[4,el(void 0)];case 4:return[2,o.sent()];case 5:return[4,el(n)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function eH(e){return ef(null==e?void 0:e.getReader)}function eJ(e){if(e instanceof eM)return e;if(null!=e){if(ef(e[eR]))return new eM(function(t){var r=e[eR]();if(ef(r.subscribe))return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")});if(eB(e))return new eM(function(t){for(var r=0;rt in e?te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tr=(e,t,r)=>(tt(e,"symbol"!=typeof t?t+"":t,r),r);class tn extends Error{constructor(e){let t=ti(e);super(t.message),tr(this,"response"),tr(this,"statusCode",400),tr(this,"responseBody"),tr(this,"details"),Object.assign(this,t)}}class to extends Error{constructor(e){let t=ti(e);super(t.message),tr(this,"response"),tr(this,"statusCode",500),tr(this,"responseBody"),tr(this,"details"),Object.assign(this,t)}}function ti(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(ts(t)&&ts(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 ts(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let ta={onResponse:e=>{if(e.statusCode>=500)throw new to(e);if(e.statusCode>=400)throw new tn(e);return e}},tu={onResponse:e=>{let t=e.headers["x-sanity-warning"];return(Array.isArray(t)?t:[t]).filter(Boolean).forEach(e=>console.warn(e)),e}};function tc(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 tl(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 tf=["image","file"],th=["before","after","replace"],tp=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")},td=e=>{if(!/^[-a-z0-9]+$/i.test(e))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")},ty=e=>{if(-1===tf.indexOf(e))throw Error(`Invalid asset type: ${e}. Must be one of ${tf.join(", ")}`)},tg=(e,t)=>{if(null===t||"object"!=typeof t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},tm=(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`)},tb=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);tm(e,t._id)},tv=(e,t,r)=>{let n="insert(at, selector, items)";if(-1===th.indexOf(e)){let e=th.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`)},tw=e=>{if(!e.dataset)throw Error("`dataset` must be provided to perform queries");return e.dataset||""},tE=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 tC=Object.defineProperty,tx=(e,t,r)=>t in e?tC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tO=(e,t,r)=>(tx(e,"symbol"!=typeof t?t+"":t,r),r),tT=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},tS=(e,t,r)=>(tT(e,t,"read from private field"),r?r.call(e):t.get(e)),tA=(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)},tj=(e,t,r,n)=>(tT(e,t,"write to private field"),t.set(e,r),r);class tI{constructor(e,t={}){tO(this,"selection"),tO(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 tg("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 tv(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{...tl(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,r=!0){return tg(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 tk=class e extends tI{constructor(e,t,r){super(e,t),tA(this,rl,void 0),tj(this,rl,r)}clone(){return new e(this.selection,{...this.operations},tS(this,rl))}commit(e){if(!tS(this,rl))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 tS(this,rl).mutate({patch:this.serialize()},t)}};rl=new WeakMap;let t$=class e extends tI{constructor(e,t,r){super(e,t),tA(this,rf,void 0),tj(this,rf,r)}clone(){return new e(this.selection,{...this.operations},tS(this,rf))}commit(e){if(!tS(this,rf))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 tS(this,rf).mutate({patch:this.serialize()},t)}};rf=new WeakMap;var tU=Object.defineProperty,tR=(e,t,r)=>t in e?tU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tP=(e,t,r)=>(tR(e,"symbol"!=typeof t?t+"":t,r),r),t_=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},tM=(e,t,r)=>(t_(e,t,"read from private field"),r?r.call(e):t.get(e)),tF=(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)},tB=(e,t,r,n)=>(t_(e,t,"write to private field"),t.set(e,r),r);let tL={returnDocuments:!1};class tq{constructor(e=[],t){tP(this,"operations"),tP(this,"trxId"),this.operations=e,this.trxId=t}create(e){return tg("create",e),this._add({create:e})}createIfNotExists(e){let t="createIfNotExists";return tg(t,e),tb(t,e),this._add({[t]:e})}createOrReplace(e){let t="createOrReplace";return tg(t,e),tb(t,e),this._add({[t]:e})}delete(e){return tm("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 tD=class e extends tq{constructor(e,t,r){super(e,r),tF(this,rh,void 0),tB(this,rh,t)}clone(){return new e([...this.operations],tM(this,rh),this.trxId)}commit(e){if(!tM(this,rh))throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return tM(this,rh).mutate(this.serialize(),Object.assign({transactionId:this.trxId},tL,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof t$)return this._add({patch:e.serialize()});if(r){let r=t(new t$(e,{},tM(this,rh)));if(!(r instanceof t$))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}};rh=new WeakMap;let tN=class e extends tq{constructor(e,t,r){super(e,r),tF(this,rp,void 0),tB(this,rp,t)}clone(){return new e([...this.operations],tM(this,rp),this.trxId)}commit(e){if(!tM(this,rp))throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return tM(this,rp).mutate(this.serialize(),Object.assign({transactionId:this.trxId},tL,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof tk)return this._add({patch:e.serialize()});if(r){let r=t(new tk(e,{},tM(this,rp)));if(!(r instanceof tk))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}};function tW(e){return"https://www.sanity.io/help/"+e}rp=new WeakMap;let tz=e=>{var t;let r,n;return t=(...t)=>console.warn(e.join(" "),...t),r=!1,(...e)=>(r||(n=t(...e),r=!0),n)},tH=tz(["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."]),tJ=tz(["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."]),tY=tz(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${tW("js-client-browser-token")} for more information and how to hide this warning.`]),tG=tz(["Using the Sanity client without specifying an API version is deprecated.",`See ${tW("js-client-api-version")}`]),tV=(tz(["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}}),tQ=["localhost","127.0.0.1","0.0.0.0"],tK=e=>-1!==tQ.indexOf(e),tX=function(e){switch(e){case"previewDrafts":case"published":case"raw":return;default:throw TypeError("Invalid API perspective string, expected `published`, `previewDrafts` or `raw`")}},tZ=(e,t)=>{let r={...t,...e,stega:{..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||tV.stega,..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||{}}};r.apiVersion||tG();let n={...tV,...r},o=n.useProjectHostname;if(typeof Promise>"u"){let e=tW("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&&tX(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&&tK(window.location.hostname);i&&s&&n.token&&!0!==n.ignoreBrowserTokenWarning?tY():typeof n.useCdn>"u"&&tH(),o&&td(n.projectId),n.dataset&&tp(n.dataset),"requestTagPrefix"in n&&(n.requestTagPrefix=n.requestTagPrefix?tE(n.requestTagPrefix).replace(/\.+$/,""):void 0),n.apiVersion=`${n.apiVersion}`.replace(/^v/,""),n.isDefaultApi=n.apiHost===tV.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},t0=({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}`},t1=(e,t)=>!1===e?void 0:typeof e>"u"?t:e,t2=(e={})=>({dryRun:e.dryRun,returnIds:!0,returnDocuments:t1(e.returnDocuments,!0),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}),t3=e=>"response"===e.type,t6=e=>e.body,t5=(e,t)=>e.reduce((e,r)=>(e[t(r)]=r,e),Object.create(null));function t8(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,e7.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=rn(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))),e5(([e,t])=>{let r=t(e.result,e.resultSourceMap,a);return c({...e,result:r})})):p.pipe(e5(c))}function t4(e,t,r,n={}){let o={uri:ra(e,"doc",r),json:!0,tag:n.tag};return ri(e,t,o).pipe(e9(t3),e5(e=>e.body.documents&&e.body.documents[0]))}function t9(e,t,r,n={}){let o={uri:ra(e,"doc",r.join(",")),json:!0,tag:n.tag};return ri(e,t,o).pipe(e9(t3),e5(e=>{let t=t5(e.body.documents||[],e=>e._id);return r.map(e=>t[e]||null)}))}function t7(e,t,r,n){return tb("createIfNotExists",r),ro(e,t,r,"createIfNotExists",n)}function re(e,t,r,n){return tb("createOrReplace",r),ro(e,t,r,"createOrReplace",n)}function rt(e,t,r,n){return rn(e,t,"mutate",{mutations:[{delete:tl(r)}]},n)}function rr(e,t,r,n){let o;return rn(e,t,"mutate",{mutations:Array.isArray(o=r instanceof t$||r instanceof tk?{patch:r.serialize()}:r instanceof tD||r instanceof tN?r.serialize():r)?o:[o],transactionId:n&&n.transactionId||void 0},n)}function rn(e,t,r,n,o={}){let i="mutate"===r,s=i?"":t0(n),a=!i&&s.length<11264,u=o.returnFirst,{timeout:c,token:l,tag:f,headers:h,returnQuery:p,lastLiveEventId:d}=o,y=ra(e,r,a?s:"");return ri(e,t,{method:a?"GET":"POST",uri:y,json:!0,body:a?void 0:n,query:i&&t2(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(e9(t3),e5(t6),e5(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 ro(e,t,r,n,o={}){return rn(e,t,"mutate",{mutations:[{[n]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},o))}function ri(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:tE(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&&(tX(t),r.query={perspective:t,...r.query},"previewDrafts"===t&&c&&(c=!1,tJ())),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:ru(e,s,c)})),h=new eM(e=>t(f,a.requester).subscribe(e));return r.signal?h.pipe((i=r.signal,e=>new eM(t=>{let r=()=>t.error(function(e){var t,r;if(rc)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 rs(e,t,r){return ri(e,t,r).pipe(e9(e=>"response"===e.type),e5(e=>e.body))}function ra(e,t,r){let n=tw(e.config()),o=`/${t}/${n}`;return`/data${r?`${o}/${r}`:o}`.replace(/\/($|\?)/,"$1")}function ru(e,t,r=!1){let{url:n,cdnUrl:o}=e.config();return`${r?o:n}/${t.replace(/^\//,"")}`}let rc=!!globalThis.DOMException;var rl,rf,rh,rp,rd,ry,rg=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},rm=(e,t,r)=>(rg(e,t,"read from private field"),r?r.call(e):t.get(e)),rb=(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)},rv=(e,t,r,n)=>(rg(e,t,"write to private field"),t.set(e,r),r);class rw{constructor(e,t){rb(this,rd,void 0),rb(this,ry,void 0),rv(this,rd,e),rv(this,ry,t)}upload(e,t,r){return rC(rm(this,rd),rm(this,ry),e,t,r)}}rd=new WeakMap,ry=new WeakMap;class rE{constructor(e,t){rb(this,rI,void 0),rb(this,rk,void 0),rv(this,rI,e),rv(this,rk,t)}upload(e,t,r){return e3(rC(rm(this,rI),rm(this,rk),e,t,r).pipe(e9(e=>"response"===e.type),e5(e=>e.body.document)))}}function rC(e,t,r,n,o={}){ty(r);let i=o.extract||void 0;i&&!i.length&&(i=["none"]);let s=tw(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),ri(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})}rI=new WeakMap,rk=new WeakMap;var rx=(e,t)=>Object.keys(t).concat(Object.keys(e)).reduce((r,n)=>(r[n]=typeof e[n]>"u"?t[n]:e[n],r),{});let rO=(e,t)=>t.reduce((t,r)=>(typeof e[r]>"u"||(t[r]=e[r]),t),{}),rT=["includePreviousRevision","includeResult","visibility","effectFormat","tag"],rS={includeResult:!0};function rA(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={...rx(n,rS),tag:u},l=t0({query:e,params:t,options:{tag:u,...rO(c,rT)}}),f=`${o}${ra(this,"listen",l)}`;if(f.length>14800)return new eM(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 eM(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=rj(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=rj(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 rj(e){try{let t=e.data&&JSON.parse(e.data)||{};return Object.assign({type:e.type},t)}catch(e){return e}}var rI,rk,r$,rU=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},rR=(e,t,r)=>(rU(e,t,"read from private field"),r?r.call(e):t.get(e)),rP=(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)},r_=(e,t,r,n)=>(rU(e,t,"write to private field"),t.set(e,r),r);class rM{constructor(e){rP(this,r$,void 0),r_(this,r$,e)}events(){let e=ra(rR(this,r$),"live/events"),t=new URL(rR(this,r$).getUrl(e,!1)),n=["restart","message"];return new eM(e=>{let o,i,s=!1,a=!1;function u(t){if(!s){if("data"in t){let r=rF(t);e.error(Error(r.message,{cause:r}))}o.readyState===o.CLOSED&&(l(),clearTimeout(i),i=setTimeout(h,100))}}function c(t){let r=rF(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 rF(e){try{let t=e.data&&JSON.parse(e.data)||{};return{type:e.type,id:e.lastEventId,...t}}catch(e){return e}}r$=new WeakMap;var rB,rL,rq=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},rD=(e,t,r)=>(rq(e,t,"read from private field"),r?r.call(e):t.get(e)),rN=(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)},rW=(e,t,r,n)=>(rq(e,t,"write to private field"),t.set(e,r),r);class rz{constructor(e,t){rN(this,rB,void 0),rN(this,rL,void 0),rW(this,rB,e),rW(this,rL,t)}create(e,t){return rJ(rD(this,rB),rD(this,rL),"PUT",e,t)}edit(e,t){return rJ(rD(this,rB),rD(this,rL),"PATCH",e,t)}delete(e){return rJ(rD(this,rB),rD(this,rL),"DELETE",e)}list(){return rs(rD(this,rB),rD(this,rL),{uri:"/datasets",tag:null})}}rB=new WeakMap,rL=new WeakMap;class rH{constructor(e,t){rN(this,rY,void 0),rN(this,rG,void 0),rW(this,rY,e),rW(this,rG,t)}create(e,t){return e3(rJ(rD(this,rY),rD(this,rG),"PUT",e,t))}edit(e,t){return e3(rJ(rD(this,rY),rD(this,rG),"PATCH",e,t))}delete(e){return e3(rJ(rD(this,rY),rD(this,rG),"DELETE",e))}list(){return e3(rs(rD(this,rY),rD(this,rG),{uri:"/datasets",tag:null}))}}function rJ(e,t,r,n,o){return tp(n),rs(e,t,{method:r,uri:`/datasets/${n}`,body:o,tag:null})}rY=new WeakMap,rG=new WeakMap;var rY,rG,rV,rQ,rK=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},rX=(e,t,r)=>(rK(e,t,"read from private field"),r?r.call(e):t.get(e)),rZ=(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)},r0=(e,t,r,n)=>(rK(e,t,"write to private field"),t.set(e,r),r);class r1{constructor(e,t){rZ(this,rV,void 0),rZ(this,rQ,void 0),r0(this,rV,e),r0(this,rQ,t)}list(e){let t=(null==e?void 0:e.includeMembers)===!1?"/projects?includeMembers=false":"/projects";return rs(rX(this,rV),rX(this,rQ),{uri:t})}getById(e){return rs(rX(this,rV),rX(this,rQ),{uri:`/projects/${e}`})}}rV=new WeakMap,rQ=new WeakMap;class r2{constructor(e,t){rZ(this,r3,void 0),rZ(this,r6,void 0),r0(this,r3,e),r0(this,r6,t)}list(e){let t=(null==e?void 0:e.includeMembers)===!1?"/projects?includeMembers=false":"/projects";return e3(rs(rX(this,r3),rX(this,r6),{uri:t}))}getById(e){return e3(rs(rX(this,r3),rX(this,r6),{uri:`/projects/${e}`}))}}r3=new WeakMap,r6=new WeakMap;var r3,r6,r5,r8,r4=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},r9=(e,t,r)=>(r4(e,t,"read from private field"),r?r.call(e):t.get(e)),r7=(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)},ne=(e,t,r,n)=>(r4(e,t,"write to private field"),t.set(e,r),r);class nt{constructor(e,t){r7(this,r5,void 0),r7(this,r8,void 0),ne(this,r5,e),ne(this,r8,t)}getById(e){return rs(r9(this,r5),r9(this,r8),{uri:`/users/${e}`})}}r5=new WeakMap,r8=new WeakMap;class nr{constructor(e,t){r7(this,nn,void 0),r7(this,no,void 0),ne(this,nn,e),ne(this,no,t)}getById(e){return e3(rs(r9(this,nn),r9(this,no),{uri:`/users/${e}`}))}}nn=new WeakMap,no=new WeakMap;var nn,no,ni,ns,na=Object.defineProperty,nu=(e,t,r)=>t in e?na(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nc=(e,t,r)=>(nu(e,"symbol"!=typeof t?t+"":t,r),r),nl=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},nf=(e,t,r)=>(nl(e,t,"read from private field"),r?r.call(e):t.get(e)),nh=(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)},np=(e,t,r,n)=>(nl(e,t,"write to private field"),t.set(e,r),r);let nd=class e{constructor(e,t=tV){nc(this,"assets"),nc(this,"datasets"),nc(this,"live"),nc(this,"projects"),nc(this,"users"),nh(this,ni,void 0),nh(this,ns,void 0),nc(this,"listen",rA),this.config(t),np(this,ns,e),this.assets=new rw(this,nf(this,ns)),this.datasets=new rz(this,nf(this,ns)),this.live=new rM(this),this.projects=new r1(this,nf(this,ns)),this.users=new nt(this,nf(this,ns))}clone(){return new e(nf(this,ns),this.config())}config(e){if(void 0===e)return{...nf(this,ni)};if(nf(this,ni)&&!1===nf(this,ni).allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return np(this,ni,tZ(e,nf(this,ni)||{})),this}withConfig(t){let r=this.config();return new e(nf(this,ns),{...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 t8(this,nf(this,ns),nf(this,ni).stega,e,t,r)}getDocument(e,t){return t4(this,nf(this,ns),e,t)}getDocuments(e,t){return t9(this,nf(this,ns),e,t)}create(e,t){return ro(this,nf(this,ns),e,"create",t)}createIfNotExists(e,t){return t7(this,nf(this,ns),e,t)}createOrReplace(e,t){return re(this,nf(this,ns),e,t)}delete(e,t){return rt(this,nf(this,ns),e,t)}mutate(e,t){return rr(this,nf(this,ns),e,t)}patch(e,t){return new tk(e,t,this)}transaction(e){return new tN(e,this)}request(e){return rs(this,nf(this,ns),e)}getUrl(e,t){return ru(this,e,t)}getDataUrl(e,t){return ra(this,e,t)}};ni=new WeakMap,ns=new WeakMap;let ny=class e{constructor(e,t=tV){nc(this,"assets"),nc(this,"datasets"),nc(this,"live"),nc(this,"projects"),nc(this,"users"),nc(this,"observable"),nh(this,p,void 0),nh(this,d,void 0),nc(this,"listen",rA),this.config(t),np(this,d,e),this.assets=new rE(this,nf(this,d)),this.datasets=new rH(this,nf(this,d)),this.live=new rM(this),this.projects=new r2(this,nf(this,d)),this.users=new nr(this,nf(this,d)),this.observable=new nd(e,t)}clone(){return new e(nf(this,d),this.config())}config(e){if(void 0===e)return{...nf(this,p)};if(nf(this,p)&&!1===nf(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),np(this,p,tZ(e,nf(this,p)||{})),this}withConfig(t){let r=this.config();return new e(nf(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 e3(t8(this,nf(this,d),nf(this,p).stega,e,t,r))}getDocument(e,t){return e3(t4(this,nf(this,d),e,t))}getDocuments(e,t){return e3(t9(this,nf(this,d),e,t))}create(e,t){return e3(ro(this,nf(this,d),e,"create",t))}createIfNotExists(e,t){return e3(t7(this,nf(this,d),e,t))}createOrReplace(e,t){return e3(re(this,nf(this,d),e,t))}delete(e,t){return e3(rt(this,nf(this,d),e,t))}mutate(e,t){return e3(rr(this,nf(this,d),e,t))}patch(e,t){return new t$(e,t,this)}transaction(e){return new tD(e,this)}request(e){return e3(rs(this,nf(this,d),e))}dataRequest(e,t,r){return e3(rn(this,nf(this,d),e,t,r))}getUrl(e,t){return ru(this,e,t)}getDataUrl(e,t){return ra(this,e,t)}};p=new WeakMap,d=new WeakMap;let ng=function(e,t){let r=_([en({shouldRetry:tc}),...e,tu,{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"))}},ta,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:eM})]);return{requester:r,createClient:e=>new t((t,n)=>(n||r)({maxRedirects:0,maxRetries:e.maxRetries,retryDelay:e.retryDelay,...t}),e)}}([],ny),nm=(ng.requester,ng.createClient)}}]);