1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9967],{67321:(e,t,r)=>{r.d(t,{q2:()=>n});let n=(0,r(96540).lazy)(()=>Promise.all([r.e(5548),r.e(6375)]).then(r.bind(r,36375)))},50519:(e,t,r)=>{function n(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}r.d(t,{Q:()=>u,u4:()=>n});var s={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},i={0:8203,1:8204,2:8205,3:65279};[,,,,].fill(String.fromCodePoint(i[0])).join(""),Object.fromEntries(Object.entries(i).map(e=>e.reverse())),Object.fromEntries(Object.entries(s).map(e=>e.reverse()));var o=`${Object.values(s).map(e=>`\\u{${e.toString(16)}}`).join("")}`,a=RegExp(`[${o}]{4,}`,"gu");function u(e){var t,r;return e&&JSON.parse({cleaned:(t=JSON.stringify(e)).replace(a,""),encoded:(null==(r=t.match(a))?void 0:r[0])||""}.cleaned)}},56871:(e,t,r)=>{r.d(t,{UU:()=>rD});let n=!(typeof navigator>"u")&&"ReactNative"===navigator.product,s={timeout:n?6e4:12e4},i=function(e){let t={...s,..."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(s.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),s=e.slice(t+1);if(!n)return{url:r,searchParams:new URLSearchParams(s)};if("function"!=typeof decodeURIComponent)throw Error("Broken `URLSearchParams` implementation, and `decodeURIComponent` is not defined");let i=new URLSearchParams;for(let e of s.split("&")){let[t,r]=e.split("=");t&&i.append(o(t),o(r||""))}return{url:r,searchParams:i}}(t.url);for(let[n,s]of Object.entries(t.query)){if(void 0!==s){if(Array.isArray(s))for(let e of s)r.append(n,e);else r.append(n,s)}let i=r.toString();i&&(t.url=`${e}?${i}`)}}return t.method=t.body&&!t.method?"POST":(t.method||"GET").toUpperCase(),t};function o(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=["request","response","progress","error","abort"],l=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];var h,d,p=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(function(){if(d)return h;d=1;var e=function(e){return e.replace(/^\s+|\s+$/g,"")};return h=function(t){if(!t)return{};for(var r=Object.create(null),n=e(t).split("\n"),s=0;s<n.length;s++){var i,o=n[s],a=o.indexOf(":"),u=e(o.slice(0,a)).toLowerCase(),c=e(o.slice(a+1));typeof r[u]>"u"?r[u]=c:(i=r[u],"[object Array]"===Object.prototype.toString.call(i))?r[u].push(c):r[u]=[r[u],c]}return r}}());class f{onabort;onerror;onreadystatechange;ontimeout;readyState=0;response;responseText="";responseType="";status;statusText;withCredentials;#e;#t;#r;#n={};#s;#i={};#o;open(e,t,r){this.#e=e,this.#t=t,this.#r="",this.readyState=1,this.onreadystatechange?.(),this.#s=void 0}abort(){this.#s&&this.#s.abort()}getAllResponseHeaders(){return this.#r}setRequestHeader(e,t){this.#n[e]=t}setInit(e,t=!0){this.#i=e,this.#o=t}send(e){let t="arraybuffer"!==this.responseType,r={...this.#i,method:this.#e,headers:this.#n,body:e};"function"==typeof AbortController&&this.#o&&(this.#s=new AbortController,"u">typeof EventTarget&&this.#s.signal instanceof EventTarget&&(r.signal=this.#s.signal)),"u">typeof document&&(r.credentials=this.withCredentials?"include":"omit"),fetch(this.#t,r).then(e=>(e.headers.forEach((e,t)=>{this.#r+=`${t}: ${e}\r 2`}),this.status=e.status,this.statusText=e.statusText,this.readyState=3,this.onreadystatechange?.(),t?e.text():e.arrayBuffer())).then(e=>{"string"==typeof e?this.responseText=e:this.response=e,this.readyState=4,this.onreadystatechange?.()}).catch(e=>{"AbortError"!==e.name?this.onerror?.(e):this.onabort?.()})}}let g="function"==typeof XMLHttpRequest?"xhr":"fetch",y="xhr"===g?XMLHttpRequest:f,m=(e,t)=>{let r=e.options,n=e.applyMiddleware("finalizeOptions",r),s={},i=e.applyMiddleware("interceptRequest",void 0,{adapter:g,context:e});if(i){let e=setTimeout(t,0,null,i);return{abort:()=>clearTimeout(e)}}let o=new y;o instanceof f&&"object"==typeof n.fetch&&o.setInit(n.fetch,n.useAbortSignal??!0);let a=n.headers,u=n.timeout,c=!1,l=!1,h=!1;if(o.onerror=e=>{b(o instanceof f?e instanceof Error?e:Error(`Request error while attempting to reach is ${n.url}`,{cause:e}):Error(`Request error while attempting to reach is ${n.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},o.ontimeout=e=>{b(Error(`Request timeout while attempting to reach ${n.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},o.onabort=()=>{m(!0),c=!0},o.onreadystatechange=function(){u&&(m(),s.socket=setTimeout(()=>d("ESOCKETTIMEDOUT"),u.socket)),!c&&o&&4===o.readyState&&0!==o.status&&function(){if(!(c||l||h)){if(0===o.status)return void b(Error("Unknown XHR error"));m(),l=!0,t(null,{body:o.response||(""===o.responseType||"text"===o.responseType?o.responseText:""),url:n.url,method:n.method,headers:p(o.getAllResponseHeaders()),statusCode:o.status,statusMessage:o.statusText})}}()},o.open(n.method,n.url,!0),o.withCredentials=!!n.withCredentials,a&&o.setRequestHeader)for(let e in a)a.hasOwnProperty(e)&&o.setRequestHeader(e,a[e]);return n.rawBody&&(o.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:n,adapter:g,request:o,context:e}),o.send(n.body||null),u&&(s.connect=setTimeout(()=>d("ETIMEDOUT"),u.connect)),{abort:function(){c=!0,o&&o.abort()}};function d(t){h=!0,o.abort();let r=Error("ESOCKETTIMEDOUT"===t?`Socket timed out on request to ${n.url}`:`Connection timed out on request to ${n.url}`);r.code=t,e.channels.error.publish(r)}function m(e){(e||c||o&&o.readyState>=2&&s.connect)&&clearTimeout(s.connect),s.socket&&clearTimeout(s.socket)}function b(e){if(l)return;m(!0),l=!0,o=null;let r=e||Error(`Network error while attempting to reach ${n.url}`);r.isNetworkError=!0,r.request=n,t(r)}},b=(e=[],t=m)=>(function e(t,r){let n=[],s=l.reduce((e,t)=>
2(e[t]=e[t]||[],e),{processOptions:[i],validateOptions:[u]});function o(e){let t;let n=c.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),{}),i=function(e,t,...r){let n="onError"===e,i=t;for(let t=0;t<s[e].length&&(i=(0,s[e][t])(i,...r),!n||i);t++);return i},o=i("processOptions",e);i("validateOptions",o);let a={options:o,channels:n,applyMiddleware:i},u=n.request.subscribe(e=>{t=r(e,(t,r)=>((e,t,r)=>{let s=e,o=t;if(!s)try{o=i("onResponse",t,r)}catch(e){o=null,s=e}(s=s&&i("onError",s,r))?n.error.publish(s):o&&n.response.publish(o)})(t,r,e))});n.abort.subscribe(()=>{u(),t&&t.abort()});let l=i("onReturn",n,a);return l===n&&n.request.publish(a),l}return o.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&&s.onReturn.length>0)throw Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return l.forEach(t=>{e[t]&&s[t].push(e[t])}),n.push(e),o},o.clone=()=>e(n,r),t.forEach(o.use),o})(e,t);var w,v,C,q,R,E=r(65606),$=r(48287).hp,I={exports:{}};R||(R=1,function(e,t){let r;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,s=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(s=n))}),t.splice(s,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch{}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!e&&"u">typeof E&&"env"in E&&(e=E.env.DEBUG),e},t.useColors=function(){let e;return"u">typeof window&&!!window.process&&("renderer"===window.process.type||!!window.process.__nwjs)||!("u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"u">typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch{}}(),t.destroy=(r=!1,()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=(q?C:(q=1,C=function(e){function t(e){let n,s,i,o=null;function a(...e){if(!a.enabled)return;let r=Number(new Date),s=r-(n||r);a.diff=s,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 s=t.formatters[n];if("function"==typeof s){let t=e[i];r=s.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:(s!==t.namespaces&&(s=t.namespaces,i=t.enabled(e)),i),set
2: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,t){let r=0,n=0,s=-1,i=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(s=n,i=r):r++,n++;else{if(-1===s)return!1;n=s+1,r=++i}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){let e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){for(let r of(t.save(e),t.namespaces=e,t.names=[],t.skips=[],("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===r[0]?t.skips.push(r.slice(1)):t.names.push(r)},t.enabled=function(e){for(let r of t.skips)if(n(e,r))return!1;for(let r of t.names)if(n(e,r))return!0;return!1},t.humanize=function(){if(v)return w;function e(e,t,r,n){return Math.round(e/r)+" "+n+(t>=1.5*r?"s":"")}return v=1,w=function(t,r){r=r||{};var n,s,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?(s=Math.abs(t))>=864e5?e(t,s,864e5,"day"):s>=36e5?e(t,s,36e5,"hour"):s>=6e4?e(t,s,6e4,"minute"):s>=1e3?e(t,s,1e3,"second"):t+" ms":(n=Math.abs(t))>=864e5?Math.round(t/864e5)+"d":n>=36e5?Math.round(t/36e5)+"h":n>=6e4?Math.round(t/6e4)+"m":n>=1e3?Math.round(t/1e3)+"s":t+"ms";throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}}(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(r=>{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t)|0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}))(t);let{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(I,I.exports)),I.exports,Object.prototype.hasOwnProperty;let T=typeof $>"u"?()=>!1:e=>$.isBuffer(e);function j(e){return"[object Object]"===Object.prototype.toString.call(e)}let x=["boolean","string","number"],O={};"u">typeof globalThis?O=globalThis:"u">typeof window?O=window:"u">typeof global?O=global:"u">typeof self&&(O=self);var A=O;let F=(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,s)=>{let i=n.options.cancelToken;i&&i.promise.then(e=>{r.abort.publish(e),s(e)}),r.error.subscribe(s),r.response.subscribe(r=>{t(e.onlyBody?r.body:r)}),setTimeout(()=>{try{r.request.publish(n)}catch(e){s(e)}},0)})}};class S{__CANCEL__=!0;message;constructor(e){this.message=e}toString(){return"Cancel"+(this.message?`: ${this.message}`:"")}}class D{promise;reason;constructor(e){if("function"!=typeof e)throw TypeError("executor must be a function.");let t=null;this.promise=new Promise(e=>{t=e}),e(e=>{this.reason||(this.reason=new S(e),t(this.reason))})}static source=()=>{let e;return{token:new D(t=>{e=t}),cancel:e}}}F.Cancel=S,F.CancelToken=D,F.isCancel=e=>!(!e||!e?.__CANCEL__);var P=(e,t,r)=>("GET"===r.method||"HEAD"===r.method)&&(e.isNetworkError||!1);function _(e){return 100*Math.pow(2,e)+100*Math.random()}let k=(e={})=>(e=>{let t=e.maxRetries||5,r=e.retryDelay||_,n=e.shouldRetry;return{onError:(e,s)=>{var i;let o=s.options,a=o.maxRetries||t,u=o.retryDelay||r,c=o.shouldRetry||n,l=o.attemptNumber||0;if(null!==(i=o.body)&&"object"==typeof i&&"function"==typeof i.pipe||!c(e,l,o)||l>=a)return e;let h=Object.assign({},s,{options:Object.assign({},o,{attemptNumber:l+1})});return setTimeout(()=>s.channels.request.publish(h),u(l)),null}}})({shouldRetry:P,...e});k.shouldRetry=P;var M=r(16660),U=r(37859),N=r(72672),V=r(12109),L=r(16772);function z(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,V.lI)(e);return(0,L.H)(e,r)}var H=r(91779),B=(0,r(36314).L)(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function W(e,t){var r="object"==typeof t;return new Promise(function(n,s){var i,o=!1;e.subscribe({next:function(e){i=e,o=!0},error:s,complete:function(){o?n(i):r?n(t.defaultValue):s(new B)}})})}var G=r(68091),J=r(61935),Q=r(76841),X=r(19877);function Y(e){return(0,X.N)(function(t,r){var n,s=null,i=!1;s=t.subscribe((0,Q._)(r,void 0,void 0,function(o){n=(0,J.Tg)(e(o,Y
2(e)(t))),s?(s.unsubscribe(),s=null,n.subscribe(r)):i=!0})),i&&(s.unsubscribe(),s=null,n.subscribe(r))})}var Z=r(5972),K=r(1197),ee=new(r(54527)).q(K.R);function et(e,t){var r=(0,N.T)(e)?e:function(){return e},n=function(e){return e.error(r())};return new M.c(t?function(e){return t.schedule(n,0,e)}:n)}r(35103);var er=r(73466);function en(e){return(0,X.N)(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}var es=r(36992),ei=r(44563),eo=r(529),ea=r(34839);function eu(e,t){var r="object"==typeof t;return new Promise(function(n,s){var i=new ea.Ms({next:function(e){n(e),i.unsubscribe()},error:s,complete:function(){r?n(t.defaultValue):s(new B)}});e.subscribe(i)})}var ec=r(50519),el=r(31635),eh=r(6452);function ed(e,t,r){e?(0,eh.N)(r,e,t):t()}var ep=Array.isArray,ef=r(82041),eg=r(95224);function ey(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,V.ms)(e);return r?(0,eg.F)(ey.apply(void 0,(0,el.fX)([],(0,el.zs)(e))),(0,ef.I)(r)):(0,X.N)(function(t,r){var n,s,i;(n=(0,el.fX)([t],(0,el.zs)(1===e.length&&ep(e[0])?e[0]:e)),void 0===i&&(i=er.D),function(e){ed(void 0,function(){for(var t=n.length,r=Array(t),o=t,a=t,u=function(t){ed(s,function(){var u=(0,L.H)(n[t],s),c=!1;u.subscribe((0,Q._)(e,function(n){r[t]=n,!c&&(c=!0,a--),a||e.next(i(r.slice()))},function(){--o||e.complete()}))},e)},c=0;c<t;c++)u(c)},e)})(r)})}var em=r(75797);let eb=/_key\s*==\s*['"](.*)['"]/,ew=/^\d*:\d*$/,ev="drafts.",eC="versions.";function eq(e){return e.startsWith(ev)}function eR(e){return e.startsWith(eC)}function eE(e){return eR(e)?ev+eT(e):eq(e)?e:ev+e}function e$(e,t){if("drafts"===t||"published"===t)throw Error('Version can not be "published" or "drafts"');return`${eC}${t}.${eT(e)}`}function eI(e){if(!eR(e))return;let[t,r,...n]=e.split(".");return r}function eT(e){return eR(e)?e.split(".").slice(2).join("."):eq(e)?e.slice(ev.length):e}let ej=e=>crypto.getRandomValues(new Uint8Array(e)),ex=(e,t,r)=>{let n=(2<<Math.log(e.length-1)/Math.LN2)-1,s=-~(1.6*n*t/e.length);return (i=t)=>{let o="";for(;;){let t=r(s),a=0|s;for(;a--;)if((o+=e[t[a]&n]||"").length===i)return o}}},eO=/\r\n|[\n\r\u2028\u2029]/;function eA(e,t){let r=0;for(let n=0;n<t.length;n++){let s=t[n].length+1;if(r+s>e)return{line:n+1,column:e-r};r+=s}return{line:t.length,column:t[t.length-1]?.length??0}}class eF extends Error{response;statusCode=400;responseBody;details;constructor(e,t){let r=eD(e,t);super(r.message),Object.assign(this,r)}}class eS extends Error{response;statusCode=500;responseBody;details;constructor(e){let t=eD(e);super(t.message),Object.assign(this,t)}}function eD(e,t){let r=e.body,n={response:e,statusCode:e.statusCode,responseBody:-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(r,null,2):r,message:"",details:void 0};if(!(0,ec.u4)(r))return n.message=ek(e,r),n;let s=r.error;if("string"==typeof s&&"string"==typeof r.message)return n.message=`${s} - ${r.message}`,n;if("object"!=typeof s||null===s)return"string"==typeof s?n.message=s:"string"==typeof r.message?n.message=r.message:n.message=ek(e,r),n;if("type"in s&&"mutationError"===s.type&&"description"in s&&"string"==typeof s.description||"type"in s&&"actionError"===s.type&&"description"in s&&"string"==typeof s.description){let e=s.items||[],t=e.slice(0,5).map(e=>e.error?.description).filter(Boolean),i=t.length?`: 3- ${t.join(` 4- `)}`:"";return e.length>5&&(i+=` 5...and ${e.length-5} more`),n.message=`${s.description}${i}`,n.details=r.error,n}if(eP(s)){let e=t?.options?.query?.tag;return n.message=e_(s,e),n.details=r.error,n}return"description"in s&&"string"==typeof s.description?(n.message=s.description,n.details=s):n.message=ek(e,r),n}function eP(e){return(0,ec.u4)(e)&&"queryParseError"===e.type&&"string"==typeof e.query&&"number"==typeof e.start&&"number"==typeof e.end}function e_(e,t){let{query:r,start:n,end:s,description:i}=e;if(!r||typeof n>"u")return`GROQ query parse error: ${i}`;let o=t?` 6 7Tag: ${t}`:"";return`GROQ query parse error: 8${function(e,t,r){let n=e.split(eO),{start:s,end:i,markerLines:o}=function(e,t){let r={...e.start},n={...r,...e.end},s=r.line??-1,i=r.column??0,o=n.line,a=n.column,u=Math.max(s-3,0),c=Math.min(t.length,o+3);-1===s&&(u=0),-1===o&&(c=t.length);let l=o-s,h={};if(l)for(let e=0;e<=l;e++){let r=e+s;if(i){if(0===e){let e=t[r-1].length;h[r]=[i,e-i+1]}else if(e===l)h[r]=[0,a];else{let n=t[r-e].length;h[r]=[0,n]}}else h[r]=!0}else i===a?i?h[s]=[i,0]:h[s]=!0:h[s]=[i,a-i];return{start:u,end:c,markerLines:h}}({start:eA(t.start,n),end:t.end?eA(t.end,n):void 0},n),a=`${i}`.length;return e.split(eO,i).slice(s,i).map((e,t)=>{let n=s+1+t,i=` ${` ${n}`.slice(-a)} |`,u=o[n],c=!o[n+1];if(!u)return` ${i}${e.length>0?` ${e}`:""}`;let l="";if(Array.isArray(u)){let t=e.slice(0,Math.max(u[0]-1,0)).replace(/[^\t]/g," "),n=u[1]||1;l=[` 9 `,i.replace(/\d/g," ")," ",t,"^".repeat(n)].join(""),c&&r&&(l+=" "+r)}return[">",i,e.length>0?` ${e}`:"",l].join("")}).join(` 10`)}(r,{start:n,end:s},i)}${o}`}function ek(e,t){let r="string"==typeof t?` (${t.length>100?`${t.slice(0,100)}\u2026`:t})`:"",n=e.statusMessage?` ${e.statusMessage}`:"";return`${e.method}-request to ${e.url} resulted in HTTP ${e.statusCode}${n}${r}`}
10class eM extends Error{projectId;addOriginUrl;constructor({projectId:e}){super("CorsOriginError"),this.name="CorsOriginError",this.projectId=e;let t=new URL(`https://sanity.io/manage/project/${e}/api`);if("u">typeof location){let{origin:e}=location;t.searchParams.set("cors","add"),t.searchParams.set("origin",e),this.addOriginUrl=t,this.message=`The current origin is not allowed to connect to the Live Content API. Add it here: ${t}`}else this.message=`The current origin is not allowed to connect to the Live Content API. Change your configuration here: ${t}`}}let eU={onResponse:(e,t)=>{if(e.statusCode>=500)throw new eS(e);if(e.statusCode>=400)throw new eF(e,t);return e}};function eN(e,t={}){return b([k({shouldRetry:eV}),...e,function(e={}){let t={},r=t=>void 0!==e.ignoreWarnings&&(Array.isArray(e.ignoreWarnings)?e.ignoreWarnings:[e.ignoreWarnings]).some(e=>"string"==typeof e?t.includes(e):e instanceof RegExp&&e.test(t));return{onResponse:e=>{let n=e.headers["x-sanity-warning"];for(let e of Array.isArray(n)?n:[n])!e||t[e]||r(e)||(t[e]=!0,console.warn(e));return e}}}(t),{processOptions:e=>{let t=e.body;return!t||"function"==typeof t.pipe||T(t)||-1===x.indexOf(typeof t)&&!Array.isArray(t)&&!function(e){if(!1===j(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!(!1===j(r)||!1===r.hasOwnProperty("isPrototypeOf"))}(t)?e:Object.assign({},e,{body:JSON.stringify(e.body),headers:Object.assign({},e.headers,{"Content-Type":"application/json"})})}},{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"))}},eU,function(e={}){let t=e.implementation||A.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:M.c})])}function eV(e,t,r){if(0===r.maxRetries)return!1;let n="GET"===r.method||"HEAD"===r.method,s=(r.uri||r.url).startsWith("/data/query"),i=e.response&&(429===e.response.statusCode||502===e.response.statusCode||503===e.response.statusCode);return(!!n||!!s)&&!!i||k.shouldRetry(e,t,r)}function eL(e){return"https://www.sanity.io/help/"+e}let ez=["image","file"],eH=["before","after","replace"],eB=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")},eW=e=>{if(!/^[-a-z0-9]+$/i.test(e))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")},eG=e=>{if(-1===ez.indexOf(e))throw Error(`Invalid asset type: ${e}. Must be one of ${ez.join(", ")}`)},eJ=(e,t)=>{if(null===t||"object"!=typeof t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},eQ=(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`)},eX=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);eQ(e,t._id)},eY=(e,t)=>{if("string"!=typeof t)throw Error(`\`${e}()\`: \`${t}\` is not a valid document type`)},eZ=(e,t)=>{if(!t._type)throw Error(`\`${e}()\` requires that the document contains a type (\`_type\` property)`);eY(e,t._type)},eK=(e,t)=>{if(t._id&&t._id!==e)throw Error(`The provided document ID (\`${t._id}
10\`) does not match the generated version ID (\`${e}\`)`)},e0=(e,t,r)=>{let n="insert(at, selector, items)";if(-1===eH.indexOf(e)){let e=eH.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`)},e1=e=>{if(!e.dataset)throw Error("`dataset` must be provided to perform queries");return e.dataset||""},e3=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},e6=e=>{if(!e["~experimental_resource"])throw Error("`resource` must be provided to perform resource queries");let{type:t,id:r}=e["~experimental_resource"];switch(t){case"dataset":if(2!==r.split(".").length)throw Error('Dataset resource ID must be in the format "project.dataset"');return;case"dashboard":case"media-library":case"canvas":return;default:throw Error(`Unsupported resource type: ${t.toString()}`)}},e9=(e,t)=>{if(t["~experimental_resource"])throw Error(`\`${e}\` does not support resource-based operations`)},e5=e=>(function(e){let t=!1,r;return(...n)=>(t||(r=e(...n),t=!0),r)})((...t)=>console.warn(e.join(" "),...t)),e2=e5(["Because you set `withCredentials` to true, we will override your `useCdn`","setting to be false since (cookie-based) credentials are never set on the CDN"]),e4=e5(["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."]),e8=e5(["The Sanity client is configured with the `perspective` set to `drafts` or `previewDrafts`, which doesn't support the API-CDN.","The Live API will be used instead. Set `useCdn: false` in your configuration to hide this warning."]),e7=e5(["The `previewDrafts` perspective has been renamed to `drafts` and will be removed in a future API version"]),te=e5(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${eL("js-client-browser-token")} for more information and how to hide this warning.`]),tt=e5(["You have configured Sanity client to use a token, but also provided `withCredentials: true`.","This is no longer supported - only token will be used - remove `withCredentials: true`."]),tr=e5(["Using the Sanity client without specifying an API version is deprecated.",`See ${eL("js-client-api-version")}`]),tn=(e5(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),e5(["You have called `createVersion()` with a defined `document`. The recommended approach is to provide a `baseId` and `releaseId` instead."])),ts={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}},ti=["localhost","127.0.0.1","0.0.0.0"],to=e=>-1!==ti.indexOf(e);function ta(e){if(Array.isArray(e)&&e.length>1&&e.includes("raw"))throw TypeError('Invalid API perspective value: "raw". The raw-perspective can not be combined with other perspectives')}let tu=(e,t)=>{let r={...t,...e,stega:{..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||ts.stega,..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||{}}};r.apiVersion||tr();let n={...ts,...r},s=n.useProjectHostname&&!n["~experimental_resource"];if(typeof Promise>"u"){let e=eL("js-client-promise-polyfill");throw Error(`No native Promise-implementation found, polyfill needed - see ${e}`)}if(s&&!n.projectId)throw Error("Configuration must contain `projectId`");if(n["~experimental_resource"]&&e6(n),"u">typeof n.perspective&&ta(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'?");
10if("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,o=i&&to(window.location.hostname),a=!!n.token;n.withCredentials&&a&&(tt(),n.withCredentials=!1),i&&o&&a&&!0!==n.ignoreBrowserTokenWarning?te():typeof n.useCdn>"u"&&e4(),s&&eW(n.projectId),n.dataset&&eB(n.dataset),"requestTagPrefix"in n&&(n.requestTagPrefix=n.requestTagPrefix?e3(n.requestTagPrefix).replace(/\.+$/,""):void 0),n.apiVersion=`${n.apiVersion}`.replace(/^v/,""),n.isDefaultApi=n.apiHost===ts.apiHost,!0===n.useCdn&&n.withCredentials&&e2(),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 u=n.apiHost.split("://",2),c=u[0],l=u[1],h=n.isDefaultApi?"apicdn.sanity.io":l;return s?(n.url=`${c}://${n.projectId}.${l}/v${n.apiVersion}`,n.cdnUrl=`${c}://${n.projectId}.${h}/v${n.apiVersion}`):(n.url=`${n.apiHost}/v${n.apiVersion}`,n.cdnUrl=n.url),n};class tc extends Error{name="ConnectionFailedError"}class tl extends Error{name="DisconnectError";reason;constructor(e,t,r={}){super(e,r),this.reason=t}}
10class th extends Error{name="ChannelError";data;constructor(e,t){super(e),this.data=t}}class td extends Error{name="MessageError";data;constructor(e,t,r={}){super(e,r),this.data=t}}class tp extends Error{name="MessageParseError"}let tf=["channelError","disconnect"];function tg(e,t){return(0,U.v)(()=>{let t=e();return t&&(t instanceof M.c||(0,N.T)(t.lift)&&(0,N.T)(t.subscribe))?t:z(t)}).pipe((0,H.Z)(e=>new M.c(r=>{let n=t.includes("open"),s=t.includes("reconnect");function i(t){if("data"in t){let[e,n]=ty(t);r.error(e?new tp("Unable to parse EventSource error message",{cause:n}):new td((n?.data).message,n));return}e.readyState===e.CLOSED?r.error(new tc("EventSource connection failed")):s&&r.next({type:"reconnect"})}function o(){r.next({type:"open"})}function a(t){let[n,s]=ty(t);if(n){r.error(new tp("Unable to parse EventSource message",{cause:n}));return}if("channelError"===t.type){let t=new URL(e.url).searchParams.get("tag");r.error(new th(function(e,t){let r=e.error;return r?eP(r)?e_(r,t):r.description?r.description:"string"==typeof r?r:JSON.stringify(r,null,2):e.message||"Unknown listener error"}(s?.data,t),s.data));return}if("disconnect"===t.type){r.error(new tl(`Server disconnected client: ${s.data?.reason||"unknown error"}`));return}r.next({type:t.type,id:t.lastEventId,...s.data?{data:s.data}:{}})}e.addEventListener("error",i),n&&e.addEventListener("open",o);let u=[...new Set([...tf,...t])].filter(e=>"error"!==e&&"open"!==e&&"reconnect"!==e);return u.forEach(t=>e.addEventListener(t,a)),()=>{e.removeEventListener("error",i),n&&e.removeEventListener("open",o),u.forEach(t=>e.removeEventListener(t,a)),e.close()}})))}function ty(e){try{let t="string"==typeof e.data&&JSON.parse(e.data);return[null,{type:e.type,id:e.lastEventId,...!function(e){for(let t in e)return!1;return!0}(t)?{data:t}:{}}]}catch(e){return[e,null]}}function tm(e){if("string"==typeof e)return{id:e};if(Array.isArray(e))return{query:"*[_id in $ids]",params:{ids:e}};if("object"==typeof e&&null!==e&&"query"in e&&"string"==typeof e.query)return"params"in e&&"object"==typeof e.params&&null!==e.params?{query:e.query,params:e.params}:{query:e.query};let t=["* Document ID (<docId>)","* Array of document IDs","* Object containing `query`"].join(` 11`);throw Error(`Unknown selection - must be one of: 12 13${t}`)}class tb{selection;operations;constructor(e,t={}){this.selection=e,this.operations=t}set(e){return this._assign("set",e)}setIfMissing(e){return this._assign("setIfMissing",e)}diffMatchPatch(e){return eJ("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 e0(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 s=t<0?t-1:t,i=typeof r>"u"||-1===r?-1:Math.max(0,t+r),o=`${e}[${s}:${s<0&&i>=0?"":i}]`;return this.insert("replace",o,n||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...tm(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,r=!0){return eJ(e,t),this.operations=Object.assign({},this.operations,{[e]:Object.assign({},r&&this.operations[e]||{},t)}),this}_set(e,t){return this._assign(e,t,!1)}}class tw extends tb{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new tw(this.selection,{...this.operations},this.#a)}commit(e){if(!this.#a)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},e);return this.#a.mutate({patch:this.serialize()},t)}}class tv extends tb{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new tv(this.selection,{...this.operations},this.#a)}commit(e){if(!this.#a)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},e);return this.#a.mutate({patch:this.serialize()},t)}}let tC={returnDocuments:!1};class tq{operations;trxId;constructor(e=[],t){this.operations=e,this.trxId=t}create(e){return eJ("create",e),this._add({create:e})}createIfNotExists(e){let t="createIfNotExists";return eJ(t,e),eX(t,e),this._add({[t]:e})}createOrReplace(e){let t="createOrReplace";return eJ(t,e),eX(t,e),this._add({[t]:e})}delete(e){return eQ("delete",e),this._add({delete:{id:e}})}transactionId(e){return e?(this.trxId=e,this):this.trxId}serialize(){return[...this.operations]}toJSON(){return this.serialize()}reset(){return this.operations=[],this}_add(e){return this.operations.push(e),this}}class tR extends tq{#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new tR([...this.operations],this.#a,this.trxId)}commit(e){if(!this.#a)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#a.mutate(this.serialize(),Object.assign({transactionId:this.trxId},tC,e||{}))}patch(e,t){let r="function"==typeof t,n="string"!=typeof e&&e instanceof tv,s="object"==typeof e&&("query"in e||"id"in e);if(n)return this._add({patch:e.serialize()});if(r){let r=t(new tv(e,{},this.#a));if(!(r instanceof tv))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}if(s){let r=new tv(e,t||{},this.#a);return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}class tE extends tq{#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new tE([...this.operations],this.#a,this.trxId)}commit(e){if(!this.#a)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#a.mutate(this.serialize(),Object.assign({transactionId:this.trxId},tC,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof tw)return this._add({patch:e.serialize()});if(r){let r=t(new tw(e,{},this.#a));if(!(r instanceof tw))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}
13let t$=({query:e,params:t={},options:r={}})=>{let n=new URLSearchParams,{tag:s,includeMutations:i,returnQuery:o,...a}=r;for(let[r,i]of(s&&n.append("tag",s),n.append("query",e),Object.entries(t)))void 0!==i&&n.append(`$${r}`,JSON.stringify(i));for(let[e,t]of Object.entries(a))t&&n.append(e,`${t}`);return!1===o&&n.append("returnQuery","false"),!1===i&&n.append("includeMutations","false"),`?${n}`},tI=(e,t)=>!1===e?void 0:typeof e>"u"?t:e,tT=(e={})=>({dryRun:e.dryRun,returnIds:!0,returnDocuments:tI(e.returnDocuments,!0),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}),tj=e=>"response"===e.type,tx=e=>e.body,tO=(e,t)=>e.reduce((e,r)=>(e[t(r)]=r,e),Object.create(null));function tA(e,t,n,s,i={},o={}){let a="stega"in o?{...n||{},..."boolean"==typeof o.stega?{enabled:o.stega}:o.stega||{}}:n,u=a.enabled?(0,ec.Q)(i):i,c=!1===o.filterResponse?e=>e:e=>e.result,{cache:l,next:h,...d}={useAbortSignal:"u">typeof o.signal,resultSourceMap:a.enabled?"withKeyArraySelector":o.resultSourceMap,...o,returnQuery:!1===o.filterResponse&&!1!==o.returnQuery},p=tB(e,t,"query",{query:s,params:u},"u">typeof l||"u">typeof h?{...d,fetch:{cache:l,next:h}}:d);return a.enabled?p.pipe(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ey.apply(void 0,(0,el.fX)([],(0,el.zs)(e)))}((0,L.H)(r.e(5941).then(r.bind(r,25941)).then(function(e){return e.stegaEncodeSourceMap$1}).then(({stegaEncodeSourceMap:e})=>e))),(0,eo.T)(([e,t])=>{let r=t(e.result,e.resultSourceMap,a);return c({...e,result:r})})):p.pipe((0,eo.T)(c))}function tF(e,t,r,n={}){let s={uri:t3(e,"doc",(()=>{if(!n.releaseId)return r;let e=eI(r);if(!e){if(eq(r))throw Error(`The document ID (\`${r}\`) is a draft, but \`options.releaseId\` is set as \`${n.releaseId}\``);return e$(r,n.releaseId)}if(e!==n.releaseId)throw Error(`The document ID (\`${r}\`) is already a version of \`${e}\` release, but this does not match the provided \`options.releaseId\` (\`${n.releaseId}\`)`);return r})()),json:!0,tag:n.tag,signal:n.signal,query:void 0!==n.includeAllVersions?{includeAllVersions:n.includeAllVersions}:void 0};return t0(e,t,s).pipe((0,em.p)(tj),(0,eo.T)(e=>{let t=e.body.documents;return t?n.includeAllVersions?t:t[0]:n.includeAllVersions?[]:void 0}))}function tS(e,t,r,n={}){let s={uri:t3(e,"doc",r.join(",")),json:!0,tag:n.tag,signal:n.signal};return t0(e,t,s).pipe((0,em.p)(tj),(0,eo.T)(e=>{let t=tO(e.body.documents||[],e=>e._id);return r.map(e=>t[e]||null)}))}function tD(e,t,r,n={}){return tB(e,t,"query",{query:"*[sanity::partOfRelease($releaseId)]",params:{releaseId:r}},n)}function tP(e,t,r,n){return eX("createIfNotExists",r),tW(e,t,r,"createIfNotExists",n)}function t_(e,t,r,n){return eX("createOrReplace",r),tW(e,t,r,"createOrReplace",n)}function tk(e,t,r,n,s){return eX("createVersion",r),eZ("createVersion",r),tn(),tH(e,t,{actionType:"sanity.action.document.version.create",publishedId:n,document:r},s)}function tM(e,t,r,n,s,i,o){if(!n)throw Error("`createVersion()` requires `baseId` when no `document` is provided");if(!r)throw Error("`createVersion()` requires `publishedId` when `baseId` is provided");return eQ("createVersion",n),eQ("createVersion",r),tH(e,t,{actionType:"sanity.action.document.version.create",publishedId:r,baseId:n,versionId:s?e$(r,s):eE(r),ifBaseRevisionId:i},o)}function tU(e,t,r,n){return tB(e,t,"mutate",{mutations:[{delete:tm(r)}]},n)}function tN(e,t,r,n=!1,s){return tH(e,t,{actionType:"sanity.action.document.version.discard",versionId:r,purge:n},s)}function tV(e,t,r,n){return eX("replaceVersion",r),eZ("replaceVersion",r),tH(e,t,{actionType:"sanity.action.document.version.replace",document:r},n)}function tL(e,t,r,n,s){return tH(e,t,{actionType:"sanity.action.document.version.unpublish",versionId:r,publishedId:n},s)}function tz(e,t,r,n){let s;return tB(e,t,"mutate",{mutations:Array.isArray(s=r instanceof tv||r instanceof tw?{patch:r.serialize()}:r instanceof tR||r instanceof tE?r.serialize():r)?s:[s],transactionId:n&&n.transactionId||void 0},n)}function tH(e,t,r,n){let s=Array.isArray(r)?r:[r];return tB(e,t,"actions",{actions:s,transactionId:n&&n.transactionId||void 0,skipCrossDatasetReferenceValidation:n&&n.skipCrossDatasetReferenceValidation||void 0,dryRun:n&&n.dryRun||void 0},n)}function tB(e,t,r,n,s={}){let i="mutate"===r,o="actions"===r,a=i||o?"":t$(n),u=!i&&!o&&a.length<11264,c=u?a:"",l=s.returnFirst,{timeout:h,token:d,tag:p,headers:f,returnQuery:g,lastLiveEventId:y,cacheMode:m}=s,b={method:u?"GET":"POST",uri:t3(e,r,c),json:!0,body:u?void 0:n,query:i&&tT(s),timeout:h,headers:f,token:d,tag:p,returnQuery:g,perspective:s.perspective,resultSourceMap:s.resultSourceMap,lastLiveEventId:Array.isArray(y)?y[0]:y,cacheMode:m,canUseCdn:"query"===r,signal:s.signal,fetch:s.fetch,useAbortSignal:s.useAbortSignal,useCdn:s.useCdn};return t0(e,t,b).pipe((0,em.p)(tj),(0,eo.T)(tx),(0,eo.T)(e=>{if(!i)return e;let t=e.results||[];if(s.returnDocuments)return l?t[0]&&t[0].document:t.map(e=>e.document);let r=l?t[0]&&t[0].id:t.map(e=>e.id);return{transactionId:e.transactionId,results:t,[l?"documentId":"documentIds"]:r}}))}function tW(e,t,r,n,s={}){return tB(e,t,"mutate",{mutations:[{[n]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},s))}
13let tG=e=>void 0!==e.config().dataset&&void 0!==e.config().projectId||void 0!==e.config()["~experimental_resource"],tJ=(e,t)=>tG(e)&&t.startsWith(t3(e,"query")),tQ=(e,t)=>tG(e)&&t.startsWith(t3(e,"mutate")),tX=(e,t)=>tG(e)&&t.startsWith(t3(e,"doc","")),tY=(e,t)=>tG(e)&&t.startsWith(t3(e,"listen")),tZ=(e,t)=>tG(e)&&t.startsWith(t3(e,"history","")),tK=(e,t)=>t.startsWith("/data/")||tJ(e,t)||tQ(e,t)||tX(e,t)||tY(e,t)||tZ(e,t);function t0(e,t,r){var n;let s=r.url||r.uri,i=e.config(),o=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&tK(e,s):r.canUseCdn,a=(r.useCdn??i.useCdn)&&o,u=r.tag&&i.requestTagPrefix?[i.requestTagPrefix,r.tag].join("."):r.tag||i.requestTagPrefix;if(u&&null!==r.tag&&(r.query={tag:e3(u),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&tJ(e,s)){let e=r.resultSourceMap??i.resultSourceMap;void 0!==e&&!1!==e&&(r.query={resultSourceMap:e,...r.query});let t=r.perspective||i.perspective;"u">typeof t&&("previewDrafts"===t&&e7(),ta(t),r.query={perspective:Array.isArray(t)?t.join(","):t,...r.query},(Array.isArray(t)&&t.length>0||"previewDrafts"===t||"drafts"===t)&&a&&(a=!1,e8())),r.lastLiveEventId&&(r.query={...r.query,lastLiveEventId:r.lastLiveEventId}),!1===r.returnQuery&&(r.query={returnQuery:"false",...r.query}),a&&"noStale"==r.cacheMode&&(r.query={cacheMode:"noStale",...r.query})}let c=function(e,t={}){let r={};e.headers&&Object.assign(r,e.headers);let n=t.token||e.token;n&&(r.Authorization=`Bearer ${n}`),t.useGlobalApi||e.useProjectHostname||!e.projectId||(r["X-Sanity-Project-ID"]=e.projectId);let s=!!(typeof t.withCredentials>"u"?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:s,fetch:"object"==typeof t.fetch&&"object"==typeof e.fetch?{...e.fetch,...t.fetch}:t.fetch||e.fetch})}(i,Object.assign({},r,{url:t6(e,s,a)})),l=new M.c(e=>t(c,i.requester).subscribe(e));return r.signal?l.pipe((n=r.signal,e=>new M.c(t=>{let r=()=>t.error(function(e){if(t9)return new DOMException(e?.reason??"The operation was aborted.","AbortError");let t=Error(e?.reason??"The operation was aborted.");return t.name="AbortError",t}(n));if(n&&n.aborted){r();return}let s=e.subscribe(t);return n.addEventListener("abort",r),()=>{n.removeEventListener("abort",r),s.unsubscribe()}}))):l}function t1(e,t,r){return t0(e,t,r).pipe((0,em.p)(e=>"response"===e.type),(0,eo.T)(e=>e.body))}function t3(e,t,r){let n=e.config();if(n["~experimental_resource"]){e6(n);let e=t5(n),s=void 0!==r?`${t}/${r}`:t;return`${e}/${s}`.replace(/\/($|\?)/,"$1")}let s=e1(n),i=`/${t}/${s}`;return`/data${void 0!==r?`${i}/${r}`:i}`.replace(/\/($|\?)/,"$1")}function t6(e,t,r=!1){let{url:n,cdnUrl:s}=e.config();return`${r?s:n}/${t.replace(/^\//,"")}`}let t9=!!globalThis.DOMException,t5=e=>{if(!e["~experimental_resource"])throw Error("`resource` must be provided to perform resource queries");let{type:t,id:r}=e["~experimental_resource"];switch(t){case"dataset":{let e=r.split(".");if(2!==e.length)throw Error('Dataset ID must be in the format "project.dataset"');return`/projects/${e[0]}/datasets/${e[1]}`}case"canvas":return`/canvases/${r}`;case"media-library":return`/media-libraries/${r}`;case"dashboard":return`/dashboards/${r}`;default:throw Error(`Unsupported resource type: ${t.toString()}`)}};function t2(e,t,r){let n=e1(e.config());return t1(e,t,{method:"POST",uri:`/agent/action/generate/${n}`,body:r})}function t4(e,t,r){let n=e1(e.config());return t1(e,t,{method:"POST",uri:`/agent/action/transform/${n}`,body:r})}function t8(e,t,r){let n=e1(e.config());return t1(e,t,{method:"POST",uri:`/agent/action/translate/${n}`,body:r})}class t7{#a;#u;constructor(e,t){this.#a=e,this.#u=t}generate(e){return t2(this.#a,this.#u,e)}transform(e){return t4(this.#a,this.#u,e)}translate(e){return t8(this.#a,this.#u,e)}}class re{#a;#u;constructor(e,t){this.#a=e,this.#u=t}generate(e){return W(t2(this.#a,this.#u,e))}transform(e){return W(t4(this.#a,this.#u,e))}translate(e){return W(t8(this.#a,this.#u,e))}prompt(e){return W(function(e,t,r){let n=e1(e.config());return t1(e,t,{method:"POST",uri:`/agent/action/prompt/${n}`,body:r})}(this.#a,this.#u,e))}patch(e){return W(function(e,t,r){let n=e1(e.config());return t1(e,t,{method:"POST",uri:`/agent/action/patch/${n}`,body:r})}(this.#a,this.#u,e))}}class rt{#a;#u;constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){return rn(this.#a,this.#u,e,t,r)}}class rr{#a;#u;constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){return W(rn(this.#a,this.#u,e,t,r).pipe((0,em.p)(e=>"response"===e.type),(0,eo.T)(e=>e.body.document)))}}function rn(e,t,r,n,s={}){eG(r);let i=s.extract||void 0;i&&!i.length&&(i=["none"]);let o=e.config(),a=!(typeof File>"u")&&n instanceof File?Object.assign({filename:!1===s.preserveFilename?void 0:n.name,contentType:n.type},s):s,{tag:u,label:c,title:l,description:h,creditLine:d,filename:p,source:f}=a,g={label:c,title:l,description:h,filename:p,meta:i,creditLine:d};return f&&(g.sourceId=f.id,g.sourceName=f.name,g.sourceUrl=f.url),t0(e,t,{tag:u,method:"POST",timeout:a.timeout||0,uri:function(e,t){let r="image"===t?"images":"files";if(e["~experimental_resource"]){let{type:t,id:n}=e["~experimental_resource"];switch(t){case"dataset":throw Error("Assets are not supported for dataset resources, yet. Configure the client with `{projectId: <projectId>, dataset: <datasetId>}` instead.");case"canvas":return`/canvases/${n}/assets/${r}`;case"media-library":return`/media-libraries/${n}/upload`;case"dashboard":return`/dashboards/${n}/assets/${r}`;default:throw Error(`Unsupported resource type: ${t.toString()}`)}}let n=e1(e);return`assets/${r}/${n}`}(o,r),headers:a.contentType?{"Content-Type":a.contentType}:{},query:g,body:n})}
13var rs=(e,t)=>Object.keys(t).concat(Object.keys(e)).reduce((r,n)=>(r[n]=typeof e[n]>"u"?t[n]:e[n],r),{});let ri=(e,t)=>t.reduce((t,r)=>(typeof e[r]>"u"||(t[r]=e[r]),t),{}),ro=(0,U.v)(()=>r.e(7058).then(r.t.bind(r,7058,19))).pipe((0,eo.T)(({default:e})=>e),(0,G.t)(1));function ra(){return function(e){return e.pipe(Y((e,t)=>{var r;return e instanceof tc?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,Z.U)(1)((0,L.H)(e,(0,V.lI)(e)))}(z({type:"reconnect"}),(void 0===r&&(r=ee),new M.c(function(e){var t=1e3,n=0;return r.schedule(function(){e.closed||(e.next(n++),e.complete())},t)})).pipe((0,H.Z)(()=>t))):et(()=>e)}))}}let ru=["includePreviousRevision","includeResult","includeMutations","includeAllVersions","visibility","effectFormat","tag"],rc={includeResult:!0};function rl(e,t,r={}){let{url:n,token:s,withCredentials:i,requestTagPrefix:o,headers:a}=this.config(),u=r.tag&&o?[o,r.tag].join("."):r.tag,c={...rs(r,rc),tag:u},l=t$({query:e,params:t,options:{tag:u,...ri(c,ru)}}),h=`${n}${t3(this,"listen",l)}`;if(h.length>14800)return et(()=>Error("Query too large for listener"));let d=c.events?c.events:["mutation"],p={};return i&&(p.withCredentials=!0),(s||a)&&(p.headers={},s&&(p.headers.Authorization=`Bearer ${s}`),a&&Object.assign(p.headers,a)),tg(()=>(typeof EventSource>"u"||p.headers?ro:z(EventSource)).pipe((0,eo.T)(e=>new e(h,p))),d).pipe(ra(),(0,em.p)(e=>d.includes(e.type)),(0,eo.T)(e=>({type:e.type,..."data"in e?e.data:{}})))}let rh="2021-03-25";class rd{#a;constructor(e){this.#a=e}events({includeDrafts:e=!1,tag:t}={}){var r,n,s;e9("live",this.#a.config());let{projectId:i,apiVersion:o,token:a,withCredentials:u,requestTagPrefix:c,headers:l}=this.#a.config(),h=o.replace(/^v/,"");if("X"!==h&&h<rh)throw Error(`The live events API requires API version ${rh} or later. The current API version is ${h}. Please update your API version to use this feature.`);if(e&&!a&&!u)throw Error("The live events API requires a token or withCredentials when 'includeDrafts: true'. Please update your client configuration. The token should have the lowest possible access role.");let d=t3(this.#a,"live/events"),p=new URL(this.#a.getUrl(d,!1)),f=t&&c?[c,t].join("."):t;f&&p.searchParams.set("tag",f),e&&p.searchParams.set("includeDrafts","true");let g={};e&&u&&(g.withCredentials=!0),(e&&a||l)&&(g.headers={},e&&a&&(g.headers.Authorization=`Bearer ${a}`),l&&Object.assign(g.headers,l));let y=`${p.href}::${JSON.stringify(g)}`,m=rp.get(y);if(m)return m;let b=tg(()=>(typeof EventSource>"u"||g.headers?ro:z(EventSource)).pipe((0,eo.T)(e=>new e(p.href,g))),["message","restart","welcome","reconnect","goaway"]),w=(n={method:"OPTIONS",mode:"cors",credentials:g.withCredentials?"include":"omit",headers:g.headers},new M.c(e=>{let t=new AbortController,r=t.signal;return fetch(p,{...n,signal:t.signal}).then(t=>{e.next(t),e.complete()},t=>{r.aborted||e.error(t)}),()=>t.abort()})).pipe(Y(()=>{throw new eM({projectId:i})})),v=b.pipe(ra(),(0,H.Z)(e=>"reconnect"===e.type?w.pipe((0,H.Z)(()=>z(e))):z(e)),Y(e=>w.pipe((0,H.Z)(()=>{throw e}))),(0,eo.T)(e=>{if("message"===e.type){let{data:t,...r}=e;return{...r,tags:t.tags}}return e})).pipe(en(()=>rp.delete(y)),(s="function"==typeof(r={predicate:e=>"welcome"===e.type})?{predicate:r}:r,e=>{var t,r,n,i;let o,a=!1,{predicate:u,...c}=s,l=e.pipe((t=e=>{s.predicate(e)&&(a=!0,o=e)},(i=(0,N.T)(t)?{next:t,error:r,complete:n}:t)?(0,X.N)(function(e,t){null===(r=i.subscribe)||void 0===r||r.call(i);var r,n=!0;e.subscribe((0,Q._)(t,function(e){var r;null===(r=i.next)||void 0===r||r.call(i,e),t.next(e)},function(){var e;n=!1,null===(e=i.complete)||void 0===e||e.call(i),t.complete()},function(e){var r;n=!1,null===(r=i.error)||void 0===r||r.call(i,e),t.error(e)},function(){var e,t;n&&(null===(e=i.unsubscribe)||void 0===e||e.call(i)),null===(t=i.finalize)||void 0===t||t.call(i)}))}):er.D),en(()=>{a=!1,o=void 0}),(0,es.u)(c)),h=new M.c(e=>{a&&e.next(o),e.complete()});return(0,ei.h)(l,h)}));return rp.set(y,v),v}}let rp=new Map;class rf{#a;#u;constructor(e,t){this.#a=e,this.#u=t}create(e,t){return ry(this.#a,this.#u,"PUT",e,t)}edit(e,t){return ry(this.#a,this.#u,"PATCH",e,t)}delete(e){return ry(this.#a,this.#u,"DELETE",e)}list(){e9("dataset",this.#a.config());let e=this.#a.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),t1(this.#a,this.#u,{uri:r,tag:null})}}class rg{#a;#u;constructor(e,t){this.#a=e,this.#u=t}create(e,t){return e9("dataset",this.#a.config()),W(ry(this.#a,this.#u,"PUT",e,t))}edit(e,t){return e9("dataset",this.#a.config()),W(ry(this.#a,this.#u,"PATCH",e,t))}delete(e){return e9("dataset",this.#a.config()),W(ry(this.#a,this.#u,"DELETE",e))}list(){e9("dataset",this.#a.config());let e=this.#a.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),W(t1(this.#a,this.#u,{uri:r,tag:null}))}}function ry(e,t,r,n,s){return e9("dataset",e.config()),eB(n),t1(e,t,{method:r,uri:`/datasets/${n}`,body:s,tag:null})}class rm{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getPlaybackInfo(e,t={}){let r=this.#a.config()["~experimental_resource"]?.id,{instanceId:n,library
13Id:s}=function(e){let t="object"==typeof e&&"_ref"in e?e._ref:e,r=rw.exec(t);if(r){let[,e,t]=r;return{libraryId:e,instanceId:t}}if("string"==typeof e&&e.startsWith("video-"))return{instanceId:e};throw Error(`Invalid video asset instance identifier "${t}": must be a valid video instance id or a Global Dataset Reference (GDR) to the video asset in the Media Library`)}(e),i=s||r;if(!i)throw Error("Could not determine Media Library ID - you need to provide a valid Media Library ID in the client config or a Media Library GDR");let o=`/media-libraries/${i}/video/${n}/playback-info`,a=function(e){let t={};if(e.transformations){let{thumbnail:r,animated:n,storyboard:s}=e.transformations;r&&(r.width&&(t.thumbnailWidth=r.width),r.height&&(t.thumbnailHeight=r.height),void 0!==r.time&&(t.thumbnailTime=r.time),r.fit&&(t.thumbnailFit=r.fit),r.format&&(t.thumbnailFormat=r.format)),n&&(n.width&&(t.animatedWidth=n.width),n.height&&(t.animatedHeight=n.height),void 0!==n.start&&(t.animatedStart=n.start),void 0!==n.end&&(t.animatedEnd=n.end),n.fps&&(t.animatedFps=n.fps),n.format&&(t.animatedFormat=n.format)),s&&s.format&&(t.storyboardFormat=s.format)}return e.expiration&&(t.expiration=e.expiration),t}(t);return t1(this.#a,this.#u,{method:"GET",uri:o,query:a})}}class rb{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getPlaybackInfo(e,t={}){return W(new rm(this.#a.observable,this.#u).getPlaybackInfo(e,t))}}let rw=/^media-library:(ml[^:]+):([^:]+)$/;class rv{#a;#u;constructor(e,t){this.#a=e,this.#u=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.organizationId&&(t.organizationId=e.organizationId),t1(this.#a,this.#u,{uri:"/projects",query:t})}getById(e){return t1(this.#a,this.#u,{uri:`/projects/${e}`})}}class rC{#a;#u;constructor(e,t){this.#a=e,this.#u=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.organizationId&&(t.organizationId=e.organizationId),W(t1(this.#a,this.#u,{uri:"/projects",query:t}))}getById(e){return W(t1(this.#a,this.#u,{uri:`/projects/${e}`}))}}let rq=((e,t=21)=>ex(e,t,ej))("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",8),rR=(e,t)=>t?e$(e,t):eE(e);function rE(e,{releaseId:t,publishedId:r,document:n}){if(r&&n._id){let e=rR(r,t);return eK(e,n),e}if(n._id){let r=eq(n._id),s=eR(n._id);if(!r&&!s)throw Error(`\`${e}()\` requires a document with an \`_id\` that is a version or draft ID`);if(t){if(r)throw Error(`\`${e}()\` was called with a document ID (\`${n._id}\`) that is a draft ID, but a release ID (\`${t}\`) was also provided.`);let s=eI(n._id);if(s!==t)throw Error(`\`${e}()\` was called with a document ID (\`${n._id}\`) that is a version ID, but the release ID (\`${t}\`) does not match the document's version ID (\`${s}\`).`)}return n._id}if(r)return rR(r,t);throw Error(`\`${e}()\` requires either a publishedId or a document with an \`_id\``)}let r$=(e,t)=>{if("object"==typeof e&&null!==e&&("releaseId"in e||"metadata"in e)){let{releaseId:r=rq(),metadata:n={}}=e;return[r,n,t]}return[rq(),{},e]},rI=(e,t)=>{let[r,n,s]=r$(e,t);return{action:{actionType:"sanity.action.release.create",releaseId:r,metadata:{...n,releaseType:n.releaseType||"undecided"}},options:s}};class rT{#a;#u;constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return tF(this.#a,this.#u,`_.releases.${e}`,t)}create(e,t){let{action:r,options:n}=rI(e,t),{releaseId:s,metadata:i}=r;return tH(this.#a,this.#u,r,n).pipe((0,eo.T)(e=>({...e,releaseId:s,metadata:i})))}edit({releaseId:e,patch:t},r){return tH(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r)}publish({releaseId:e},t){return tH(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t)}archive({releaseId:e},t){return tH(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t)}unarchive({releaseId:e},t){return tH(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t)}schedule({releaseId:e,publishAt:t},r){return tH(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r)}unschedule({releaseId:e},t){return tH(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t)}delete({releaseId:e},t){return tH(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t)}fetchDocuments({releaseId:e},t){return tD(this.#a,this.#u,e,t)}}class rj{#a;#u;
13constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return W(tF(this.#a,this.#u,`_.releases.${e}`,t))}async create(e,t){let{action:r,options:n}=rI(e,t),{releaseId:s,metadata:i}=r;return{...await W(tH(this.#a,this.#u,r,n)),releaseId:s,metadata:i}}edit({releaseId:e,patch:t},r){return W(tH(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r))}publish({releaseId:e},t){return W(tH(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t))}archive({releaseId:e},t){return W(tH(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t))}unarchive({releaseId:e},t){return W(tH(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t))}schedule({releaseId:e,publishAt:t},r){return W(tH(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r))}unschedule({releaseId:e},t){return W(tH(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t))}delete({releaseId:e},t){return W(tH(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t))}fetchDocuments({releaseId:e},t){return W(tD(this.#a,this.#u,e,t))}}class rx{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getById(e){return t1(this.#a,this.#u,{uri:`/users/${e}`})}}class rO{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getById(e){return W(t1(this.#a,this.#u,{uri:`/users/${e}`}))}}class rA{assets;datasets;live;mediaLibrary;projects;users;agent;releases;#c;#u;listen=rl;constructor(e,t=ts){this.config(t),this.#u=e,this.assets=new rt(this,this.#u),this.datasets=new rf(this,this.#u),this.live=new rd(this),this.mediaLibrary={video:new rm(this,this.#u)},this.projects=new rv(this,this.#u),this.users=new rx(this,this.#u),this.agent={action:new t7(this,this.#u)},this.releases=new rT(this,this.#u)}clone(){return new rA(this.#u,this.config())}config(e){if(void 0===e)return{...this.#c};if(this.#c&&!1===this.#c.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.#c=tu(e,this.#c||{}),this}withConfig(e){let t=this.config();return new rA(this.#u,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return tA(this,this.#u,this.#c.stega,e,t,r)}getDocument(e,t){if(t?.includeAllVersions===!0)return tF(this,this.#u,e,{...t,includeAllVersions:!0});let r={signal:t?.signal,tag:t?.tag,releaseId:t?.releaseId,...t&&"includeAllVersions"in t?{includeAllVersions:!1}:{}};return tF(this,this.#u,e,r)}getDocuments(e,t){return tS(this,this.#u,e,t)}create(e,t){return tW(this,this.#u,e,"create",t)}createIfNotExists(e,t){return tP(this,this.#u,e,t)}createOrReplace(e,t){return t_(this,this.#u,e,t)}createVersion({document:e,publishedId:t,releaseId:r,baseId:n,ifBaseRevisionId:s},i){if(!e)return tM(this,this.#u,t,n,r,s,i);let o=rE("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||eT(e._id);return tk(this,this.#u,a,u,i)}delete(e,t){return tU(this,this.#u,e,t)}discardVersion({releaseId:e,publishedId:t},r,n){let s=rR(t,e);return tN(this,this.#u,s,r,n)}replaceVersion({document:e,publishedId:t,releaseId:r},n){let s=rE("replaceVersion",{document:e,publishedId:t,releaseId:r}),i={...e,_id:s};return tV(this,this.#u,i,n)}unpublishVersion({releaseId:e,publishedId:t},r){let n=e$(t,e);return tL(this,this.#u,n,t,r)}mutate(e,t){return tz(this,this.#u,e,t)}patch(e,t){return new tw(e,t,this)}transaction(e){return new tE(e,this)}action(e,t){return tH(this,this.#u,e,t)}request(e){return t1(this,this.#u,e)}getUrl(e,t){return t6(this,e,t)}getDataUrl(e,t){return t3(this,e,t)}}class rF{assets;datasets;live;mediaLibrary;projects;users;agent;releases;observable;#c;#u;listen=rl;constructor(e,t=ts){this.config(t),this.#u=e,this.assets=new rr(this,this.#u),this.datasets=new rg(this,this.#u),this.live=new rd(this),this.mediaLibrary={video:new rb(this,this.#u)},this.projects=new rC(this,this.#u),this.users=new rO(this,this.#u),this.agent={action:new re(this,this.#u)},this.releases=new rj(this,this.#u),this.observable=new rA(e,t)}clone(){return new rF(this.#u,this.config())}config(e){if(void 0===e)return{...this.#c};if(this.#c&&!1===this.#c.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.observable&&this.observable.config(e),this.#c=tu(e,this.#c||{}),this}withConfig(e){let t=this.config();return new rF(this.#u,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return W(tA(this,this.#u,this.#c.stega,e,t,r))}getDocument(e,t){if(t?.includeAllVersions===!0)return W(tF(this,this.#u,e,{...t,includeAllVersions:!0}));let r={signal:t?.signal,tag:t?.tag,releaseId:t?.releaseId,...t&&"includeAllVersions"in t?{includeAllVersions:!1}:{}};return W(tF(this,this.#u,e,r))}getDocuments(e,t){return W(tS(this,this.#u,e,t))}create(e,t){return W(tW(this,this.#u,e,"create",t))}createIfNotExists(e,t){return W(tP(this,this.#u,e,t))}createOrReplace(e,t){return W(t_(this,this.#u,e,t))}createVersion({document:e,publishedId:t,releaseId:r,baseId:n,ifBaseRevisionId:s},i){if(!e)return eu(tM(this,this.#u,t,n,r,s,i));let o=rE("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||eT(e._id);return eu(tk(this,this.#u,a,u,i))}delete(e,t){return W(tU(this,this.#u,e,t))}discardVersion({releaseId:e,publishedId:t},r,n){let s=rR(t,e);return W(tN(this,this.#u,s,r,n))}replaceVersion({document:e,publishedId:t,releaseId:r},n){let s=rE("replaceVersion",{document:e,publishedId:t,releaseId:r}),i={...e,_id:s};return eu(tV(this,this.#u,i,n))}unpublishVersion({releaseId:e,publishedId:t},r){let n=e$(t,e);return W(tL(this,this.#u,n,t,r))}mutate(e,t){return W(tz(this,this.#u,e,t))}patch(e,t){return new tv(e,t,this)}transaction(e){return new tR(e,this)}action(e,t){return W(tH(this,this.#u,e,t))}request(e){return W(t1(this,this.#u,e))}dataRequest(e,t,r){return W(tB(this,this.#u,e,t,r))}getUrl(e,t){return t6(this,e,t)}getDataUrl(e,t){return t3(this,e,t)}}let rS=function(e,t){return{requester:eN(e),createClient:r=>{let n=eN(e,{ignoreWarnings:r.ignoreWarnings});return new t((e,t)=>
13(t||n)({maxRedirects:0,maxRetries:r.maxRetries,retryDelay:r.retryDelay,lineage:r.lineage,...e}),r)}}}([],rF),rD=(rS.requester,rS.createClient)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.