PageSourceSearch

https://geeffektivt.se/_next/static/chunks/0b759dcf4856ed98.js

js geeffektivt.se collected 2026-09-25 14:08:11 UTC 65,236 bytes, 15 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,25180,e=>{"use strict";var t,r=e.i(50461);let s=!(typeof navigator>"u")&&"ReactNative"===navigator.product,n={timeout:s?6e4:12e4},i=function(e){let t={...n,..."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(n.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),n=e.slice(t+1);if(!s)return{url:r,searchParams:new URLSearchParams(n)};if("function"!=typeof decodeURIComponent)throw Error("Broken `URLSearchParams` implementation, and `decodeURIComponent` is not defined");let i=new URLSearchParams;for(let e of n.split("&")){let[t,r]=e.split("=");t&&i.append(o(t),o(r||""))}return{url:r,searchParams:i}}(t.url);for(let[s,n]of Object.entries(t.query)){if(void 0!==n)if(Array.isArray(n))for(let e of n)r.append(s,e);else r.append(s,n);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`)},l=["request","response","progress","error","abort"],c=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];var h,d,p,f=(h=function(){if(p)return d;p=1;var e=function(e){return e.replace(/^\s+|\s+$/g,"")};return d=function(t){if(!t)return{};for(var r=Object.create(null),s=e(t).split("\n"),n=0;n<s.length;n++){var i,o=s[n],a=o.indexOf(":"),u=e(o.slice(0,a)).toLowerCase(),l=e(o.slice(a+1));typeof r[u]>"u"?r[u]=l:(i=r[u],"[object Array]"===Object.prototype.toString.call(i))?r[u].push(l):r[u]=[r[u],l]}return r}}())&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h;class g{onabort;onerror;onreadystatechange;ontimeout;readyState=0;response;responseText="";responseType="";status;statusText;withCredentials;#e;#t;#r;#s={};#n;#i={};#o;open(e,t,r){this.#e=e,this.#t=t,this.#r="",this.readyState=1,this.onreadystatechange?.(),this.#n=void 0}abort(){this.#n&&this.#n.abort()}getAllResponseHeaders(){return this.#r}setRequestHeader(e,t){this.#s[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.#s,body:e};"function"==typeof AbortController&&this.#o&&(this.#n=new AbortController,"u">typeof EventTarget&&this.#n.signal instanceof EventTarget&&(r.signal=this.#n.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 m="function"==typeof XMLHttpRequest?"xhr":"fetch",y="xhr"===m?XMLHttpRequest:g,b=(e,t)=>{let r=e.options,s=e.applyMiddleware("finalizeOptions",r),n={},i=e.applyMiddleware("interceptRequest",void 0,{adapter:m,context:e});if(i){let e=setTimeout(t,0,null,i);return{abort:()=>clearTimeout(e)}}let o=new y;o instanceof g&&"object"==typeof s.fetch&&o.setInit(s.fetch,s.useAbortSignal??!0);let a=s.headers,u=s.timeout,l=!1,c=!1,h=!1;if(o.onerror=e=>{b(o instanceof g?e instanceof Error?e:Error(`Request error while attempting to reach is ${s.url}`,{cause:e}):Error(`Request error while attempting to reach is ${s.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},o.ontimeout=e=>{b(Error(`Request timeout while attempting to reach ${s.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},o.onabort=()=>{p(!0),l=!0},o.onreadystatechange=function(){u&&(p(),n.socket=setTimeout(()=>
2d("ESOCKETTIMEDOUT"),u.socket)),!l&&o&&4===o.readyState&&0!==o.status&&function(){if(!(l||c||h)){if(0===o.status)return b(Error("Unknown XHR error"));p(),c=!0,t(null,{body:o.response||(""===o.responseType||"text"===o.responseType?o.responseText:""),url:s.url,method:s.method,headers:f(o.getAllResponseHeaders()),statusCode:o.status,statusMessage:o.statusText})}}()},o.open(s.method,s.url,!0),o.withCredentials=!!s.withCredentials,a&&o.setRequestHeader)for(let e in a)a.hasOwnProperty(e)&&o.setRequestHeader(e,a[e]);return s.rawBody&&(o.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:s,adapter:m,request:o,context:e}),o.send(s.body||null),u&&(n.connect=setTimeout(()=>d("ETIMEDOUT"),u.connect)),{abort:function(){l=!0,o&&o.abort()}};function d(t){h=!0,o.abort();let r=Error("ESOCKETTIMEDOUT"===t?`Socket timed out on request to ${s.url}`:`Connection timed out on request to ${s.url}`);r.code=t,e.channels.error.publish(r)}function p(e){(e||l||o&&o.readyState>=2&&n.connect)&&clearTimeout(n.connect),n.socket&&clearTimeout(n.socket)}function b(e){if(c)return;p(!0),c=!0,o=null;let r=e||Error(`Network error while attempting to reach ${s.url}`);r.isNetworkError=!0,r.request=s,t(r)}};var w,v,C,R,q,E=e.i(21168),$={exports:{}};q||(q=1,function(e,t){let s;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 s=0,n=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(s++,"%c"===e&&(n=s))}),t.splice(n,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 r.default&&"env"in r.default&&(e=r.default.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{}}(),s=!1,t.destroy=()=>{s||(s=!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=(R?C:(R=1,C=function(e){function t(e){let s,n,i,o=null;function a(...e){if(!a.enabled)return;let r=Number(new Date);a.diff=r-(s||r),a.prev=s,a.curr=r,s=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let n=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,s)=>{if("%%"===r)return"%";n++;let i=t.formatters[s];if("function"==typeof i){let t=e[n];r=i.call(a,t),e.splice(n,1),n--}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:(n!==t.namespaces&&(n=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 s=t(this.namespace+(typeof r>"u"?":":r)+e);return s.log=this.log,s}function s(e,t){let r=0,s=0,n=-1,i=0;for(;r<e.length;)if(s<t.length&&(t[s]===e[r]||"*"===t[s]))"*"===t[s]?(n=s,i=r):r++,s++;else{if(-1===n)return!1;s=n+1,r=++i}for(;s<t.length&&"*"===t[s];)s++;return s===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){let e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){for(let r of(t.save(e),t.namespaces=e,t.names=[],t.skips=[],("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===r[0]?t.skips.push(r.slice(1)):t.names.push(r)},t.enabled=function(e){for(let r of t.skips)if(s(e,r))return!1;for(let r of t.names)if(s(e,r))return!0;return!1},t.humanize=function(){if(v)return w;v=1;function e(e,t,r,s){return Math.round(e/r)+" "+s+(t>=1.5*r?"s":"")}return w=function(t,r){r=r||{};var s,n,i=typeof t;if("string"===i&&t.length>0){var o=t;if(!((o=String(o)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(a){var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*u;case"weeks":case"week":case"w":return 6048e5*u;case"days":case"day":case"d":return 864e5*u;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*u;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*u;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u}}}return}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":(s=Math.abs(t))>=864e5?Math.round(t/864e5)+"d":s>=36e5?Math.round(t/36e5)+"h":s>=6e4?Math.round(t/6e4)+"m":s>=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}}}($,$.exports)),$.exports,Object.prototype.hasOwnProperty;let I=typeof E.Buffer>"u"?()=>!1:e=>E.Buffer.isBuffer(e);function F(e){return"[object Object]"===Object.prototype.toString.call(e)}let T=["boolean","string","number"];var O="u">typeof globalThis?globalThis:"u">typeof window?window:e.g;let j=(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,s)=>new t((t,n)=>{let i=s.options.cancelToken;i&&i.promise.then(e=>{r.abort.publish(e),n(e)}),r.error.subscribe(n),r.response.subscribe(r=>{t(e.onlyBody?r.body:r)}),setTimeout(()=>{try{r.request.publish(s)}catch(e){n(e)}},0)})}};class A{__CANCEL__=!0;message;constructor(e){this.message=e}toString(){return"Cancel"+(this.message?`: ${this.message}`:"")}}class x{promise;reason;constructor(e){if("function"!=typeof e)throw TypeError("executor must be a function.");let t=null;this.promise=new Promise(e=>{t=e}),e(e=>{this.reason||(this.reason=new A(e),t(this.reason))})}static source=()=>{let e;return{token:new x(t=>{e=t}),cancel:e}}}j.Cancel=A,j.CancelToken=x,j.isCancel=e=>!(!e||!e?.__CANCEL__);var S=(e,t,r)=>("GET"===r.method||"HEAD"===r.method)&&(e.isNetworkError||!1);function V(e){return 100*Math.pow(2,e)+100*Math.random()}let P=(e={})=>{var t;let r,s,n;return r=(t={shouldRetry:S,...e}).maxRetries||5,s=t.retryDelay||V,n=t.shouldRetry,{onError:(e,t)=>
2{var i;let o=t.options,a=o.maxRetries||r,u=o.retryDelay||s,l=o.shouldRetry||n,c=o.attemptNumber||0;if(null!==(i=o.body)&&"object"==typeof i&&"function"==typeof i.pipe||!l(e,c,o)||c>=a)return e;let h=Object.assign({},t,{options:Object.assign({},o,{attemptNumber:c+1})});return setTimeout(()=>t.channels.request.publish(h),u(c)),null}}};P.shouldRetry=S;var D=e.i(78538),_=e.i(63853),M=e.i(17104),k=e.i(49363),U=e.i(55735),L=e.i(72700),N=e.i(87068),z=e.i(33628),H=e.i(48531),B=e.i(99657),G=e.i(81288);function W(e){return(0,G.operate)(function(t,r){var s,n=null,i=!1;n=t.subscribe((0,B.createOperatorSubscriber)(r,void 0,void 0,function(o){s=(0,H.innerFrom)(e(o,W(e)(t))),n?(n.unsubscribe(),n=null,s.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,s.subscribe(r))})}var J=e.i(78979),Q=e.i(48194);function Y(e,t){var r=(0,k.isFunction)(e)?e:function(){return e},s=function(e){return e.error(r())};return new D.Observable(t?function(e){return t.schedule(s,0,e)}:s)}var K=e.i(63326),X=e.i(32082),Z=e.i(866),ee=e.i(93853),et=e.i(65658),er=e.i(57283),es=e.i(42204),en=e.i(13616);function ei(e,t){var r="object"==typeof t;return new Promise(function(s,n){var i=new en.SafeSubscriber({next:function(e){s(e),i.unsubscribe()},error:n,complete:function(){r?s(t.defaultValue):n(new es.EmptyError)}});e.subscribe(i)})}var eo=e.i(6803),ea=e.i(89280),eu=e.i(64045),el=e.i(95065);function ec(e,t,r){e?(0,el.executeSchedule)(r,e,t):t()}var eh=Array.isArray,ed=e.i(22452),ep=e.i(23056);function ef(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,Q.popResultSelector)(e);return r?(0,ep.pipe)(ef.apply(void 0,(0,ea.__spreadArray)([],(0,ea.__read)(e))),(0,ed.mapOneOrManyArgs)(r)):(0,G.operate)(function(t,r){var s,n;(s=(0,ea.__spreadArray)([t],(0,ea.__read)(1===e.length&&eh(e[0])?e[0]:e)),void 0===n&&(n=eu.identity),function(e){ec(void 0,function(){for(var t=s.length,r=Array(t),i=t,o=t,a=function(t){ec(void 0,function(){var a=(0,L.from)(s[t],void 0),u=!1;a.subscribe((0,B.createOperatorSubscriber)(e,function(s){r[t]=s,!u&&(u=!0,o--),o||e.next(n(r.slice()))},function(){--i||e.complete()}))},e)},u=0;u<t;u++)a(u)},e)})(r)})}var eg=e.i(75557),em=e.i(84499);let ey=e=>crypto.getRandomValues(new Uint8Array(e)),eb=/\r\n|[\n\r\u2028\u2029]/;function ew(e,t){let r=0;for(let s=0;s<t.length;s++){let n=t[s].length+1;if(r+n>e)return{line:s+1,column:e-r};r+=n}return{line:t.length,column:t[t.length-1]?.length??0}}class ev extends Error{response;statusCode=400;responseBody;details;constructor(e,t){const r=eR(e,t);super(r.message),Object.assign(this,r)}}class eC extends Error{response;statusCode=500;responseBody;details;constructor(e){const t=eR(e);super(t.message),Object.assign(this,t)}}function eR(e,t){var r,s,n;let i=e.body,o={response:e,statusCode:e.statusCode,responseBody:(r=i,-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(r,null,2):r),message:"",details:void 0};if(!(0,eo.isRecord)(i))return o.message=e$(e,i),o;let a=i.error;if("string"==typeof a&&"string"==typeof i.message)return o.message=`${a} - ${i.message}`,o;if("object"!=typeof a||null===a)return"string"==typeof a?o.message=a:"string"==typeof i.message?o.message=i.message:o.message=e$(e,i),o;if("type"in(s=a)&&"mutationError"===s.type&&"description"in s&&"string"==typeof s.description||"type"in(n=a)&&"actionError"===n.type&&"description"in n&&"string"==typeof n.description){let e=a.items||[],t=e.slice(0,5).map(e=>e.error?.description).filter(Boolean),r=t.length?`:
3- ${t.join(`
4- `)}`:"";return e.length>5&&(r+=`
5...and ${e.length-5} more`),o.message=`${a.description}${r}`,o.details=i.error,o}return eq(a)?(o.message=eE(a,t?.options?.query?.tag),o.details=i.error):"description"in a&&"string"==typeof a.description?(o.message=a.description,o.details=a):o.message=e$(e,i),o}function eq(e){return(0,eo.isRecord)(e)&&"queryParseError"===e.type&&"string"==typeof e.query&&"number"==typeof e.start&&"number"==typeof e.end}function eE(e,t){let{query:r,start:s,end:n,description:i}=e;if(!r||typeof s>"u")return`GROQ query parse error: ${i}`;let o=t?`
6
7Tag: ${t}`:"";return`GROQ query parse error:
8${function(e,t,r){let s=e.split(eb),{start:n,end:i,markerLines:o}=function(e,t){let r={...e.start},s={...r,...e.end},n=r.line??-1,i=r.column??0,o=s.line,a=s.column,u=Math.max(n-3,0),l=Math.min(t.length,o+3);-1===n&&(u=0),-1===o&&(l=t.length);let c=o-n,h={};if(c)for(let e=0;e<=c;e++){let r=e+n;if(i)if(0===e){let e=t[r-1].length;h[r]=[i,e-i+1]}else if(e===c)h[r]=[0,a];else{let s=t[r-e].length;h[r]=[0,s]}else h[r]=!0}else i===a?i?h[n]=[i,0]:h[n]=!0:h[n]=[i,a-i];return{start:u,end:l,markerLines:h}}({start:ew(t.start,s),end:t.end?ew(t.end,s):void 0},s),a=`${i}`.length;return e.split(eb,i).slice(n,i).map((e,t)=>{let s=n+1+t,i=` ${` ${s}`.slice(-a)} |`,u=o[s],l=!o[s+1];if(!u)return` ${i}${e.length>0?` ${e}`:""}`;let c="";if(Array.isArray(u)){let t=e.slice(0,Math.max(u[0]-1,0)).replace(/[^\t]/g," "),s=u[1]||1;c=`
9 `+i.replace(/\d/g," ")+" "+t+"^".repeat(s),l&&r&&(c+=" "+r)}return">"+i+(e.length>0?` ${e}`:"")+c}).join(`
10`)}(r,{start:s,end:n},i)}${o}`}function e$(e,t){var r;let s="string"==typeof t?` (${(r=t).length>100?`${r.slice(0,100)}\u2026`:r})`:"",n=e.statusMessage?` ${e.statusMessage}`:"";return`${e.method}-request to ${e.url} resulted in HTTP ${e.statusCode}${n}${s}`}
10class eI extends Error{projectId;addOriginUrl;constructor({projectId:e}){super("CorsOriginError"),this.name="CorsOriginError",this.projectId=e;const t=new URL(`https://sanity.io/manage/project/${e}/api`);if("u">typeof location){const{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 eF={onResponse:(e,t)=>{if(e.statusCode>=500)throw new eC(e);if(e.statusCode>=400)throw new ev(e,t);return e}};function eT(e,t={}){return((e=[],t=b)=>(function e(t,r){let s=[],n=c.reduce((e,t)=>(e[t]=e[t]||[],e),{processOptions:[i],validateOptions:[u]});function o(e){let t,s=l.reduce((e,t)=>{let r,s;return e[t]=(r=Object.create(null),s=0,{publish:function(e){for(let t in r)r[t](e)},subscribe:function(e){let t=s++;return r[t]=e,function(){delete r[t]}}}),e},{}),i=function(e,t,...r){let s="onError"===e,i=t;for(let t=0;t<n[e].length&&(i=(0,n[e][t])(i,...r),!s||i);t++);return i},o=i("processOptions",e);i("validateOptions",o);let a={options:o,channels:s,applyMiddleware:i},u=s.request.subscribe(e=>{t=r(e,(t,r)=>((e,t,r)=>{let n=e,o=t;if(!n)try{o=i("onResponse",t,r)}catch(e){o=null,n=e}(n=n&&i("onError",n,r))?s.error.publish(n):o&&s.response.publish(o)})(t,r,e))});s.abort.subscribe(()=>{u(),t&&t.abort()});let c=i("onReturn",s,a);return c===s&&s.request.publish(a),c}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&&n.onReturn.length>0)throw Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return c.forEach(t=>{e[t]&&n[t].push(e[t])}),s.push(e),o},o.clone=()=>e(s,r),t.forEach(o.use),o})(e,t))([P({shouldRetry:eO}),...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 s=e.headers["x-sanity-warning"];for(let e of Array.isArray(s)?s:[s])!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||I(t)||-1===T.indexOf(typeof t)&&!Array.isArray(t)&&!function(e){if(!1===F(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!1!==F(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 s(e){return t=>{let s=t.lengthComputable?t.loaded/t.total*100:-1;r.channels.progress.publish({stage:e,percent:s,total:t.total,loaded:t.loaded,lengthComputable:t.lengthComputable})}}"upload"in t&&"onprogress"in t.upload&&(t.upload.onprogress=s("upload")),"onprogress"in t&&(t.onprogress=s("download"))}},eF,function(e={}){let t=e.implementation||O.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:D.Observable})])}function eO(e,t,r){if(0===r.maxRetries)return!1;let s="GET"===r.method||"HEAD"===r.method,n=(r.uri||r.url).startsWith("/data/query"),i=e.response&&(429===e.response.statusCode||502===e.response.statusCode||503===e.response.statusCode);return(!!s||!!n)&&!!i||P.shouldRetry(e,t,r)}function ej(e){return"https://www.sanity.io/help/"+e}let eA=["image","file"],ex=["before","after","replace"],eS=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")},eV=(e,t)=>{if(null===t||"object"!=typeof t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},eP=(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`)},eD=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);eP(e,t._id)},e_=(e,t)=>
10{if(!t._type)throw Error(`\`${e}()\` requires that the document contains a type (\`_type\` property)`);var r=t._type;if("string"!=typeof r)throw Error(`\`${e}()\`: \`${r}\` is not a valid document type`)},eM=e=>{if(e.dataset)return e.dataset;let t=e.resource;if(t&&"dataset"===t.type){let e=t.id.split(".");if(2!==e.length)throw Error('Dataset resource ID must be in the format "project.dataset"');return e[1]}throw Error("`dataset` must be provided to perform queries")},ek=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},eU=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:s}=t;switch(r){case"dataset":if(2!==s.split(".").length)throw Error('Dataset resource ID must be in the format "project.dataset"');return;case"dashboard":case"media-library":case"canvas":return;default:throw Error(`Unsupported resource type: ${r.toString()}`)}},eL=(e,t)=>{if(t.resource)throw Error(`\`${e}\` does not support resource-based operations`)},eN=e=>{var t;let r,s;return t=(...t)=>console.warn(e.join(" "),...t),r=!1,(...e)=>(r||(s=t(...e),r=!0),s)},ez=eN(["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"]),eH=eN(["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."]),eB=eN(["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."]),eG=eN(["The `previewDrafts` perspective has been renamed to  `drafts` and will be removed in a future API version"]),eW=eN(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${ej("js-client-browser-token")} for more information and how to hide this warning.`]),eJ=eN(["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`."]),eQ=eN(["Using the Sanity client without specifying an API version is deprecated.",`See ${ej("js-client-api-version")}`]),eY=(eN(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),eN(["You have called `createVersion()` with a defined `document`. The recommended approach is to provide a `baseId` and `releaseId` instead."])),eK=eN(["The `~experimental_resource` configuration property has been renamed to `resource`.","Please update your client configuration to use `resource` instead. Support for `~experimental_resource` will be removed in a future version."]),eX={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}},eZ=["localhost","127.0.0.1","0.0.0.0"];function e0(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 e1=(e,t)=>{let r,s={...t,...e,stega:{..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||eX.stega,..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||{}}};s.apiVersion||eQ();let n={...eX,...s};n["~experimental_resource"]&&!n.resource&&(eK(),n.resource=n["~experimental_resource"]);let i=n.resource,o=n.useProjectHostname&&!i;if(typeof Promise>"u"){let e=ej("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(i&&eU(n),"u">typeof n.perspective&&e0(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 a="u">typeof window&&window.location&&window.location.hostname,u=a&&(r=window.location.hostname,-1!==eZ.indexOf(r)),l=!!n.token;n.withCredentials&&l&&(eJ(),n.withCredentials=!1),a&&u&&l&&!0!==n.ignoreBrowserTokenWarning?eW():typeof n.useCdn>"u"&&eH(),o&&(e=>{if(!/^[-a-z0-9]+$/i.test(e))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")})(n.projectId),n.dataset&&eS(n.dataset),"requestTagPrefix"in n&&(n.requestTagPrefix=n.requestTagPrefix?ek(n.requestTagPrefix).replace(/\.+$/,""):void 0),n.apiVersion=`${n.apiVersion}`.replace(/^v/,""),n.isDefaultApi=n.apiHost===eX.apiHost,!0===n.useCdn&&n.withCredentials&&ez(),n.useCdn=!1!==n.useCdn&&!n.withCredentials,function(e){if("1"===e||"X"===e)return;let t=new Date(e);if(!(/^\d{4}-\d{2}-\d{2}$/.test(e)&&t instanceof Date&&t.getTime()>0))throw Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}(n.apiVersion);let c=n.apiHost.split("://",2),h=c[0],d=c[1],p=n.isDefaultApi?"apicdn.sanity.io":d;return o?(n.url=`${h}://${n.projectId}.${d}/v${n.apiVersion}`,n.cdnUrl=`${h}://${n.projectId}.${p}/v${n.apiVersion}`):(n.url=`${n.apiHost}/v${n.apiVersion}`,n.cdnUrl=n.url),n};class e3 extends Error{name="ConnectionFailedError"}class e6 extends Error{name="DisconnectError";reason;constructor(e,t,r={}){super(e,r),this.reason=t}}class e9 extends Error{name="ChannelError";data;constructor(e,t){super(e),this.data=t}}class e5 extends Error{name="MessageError";data;constructor(e,t,r={}){super(e,r),this.data=t}}class e2 extends Error{name="MessageParseError"}let e4=["channelError","disconnect"];function e8(e,t){return(0,_.defer)(()=>{let t=e();return t&&(t instanceof D.Observable||(0,k.isFunction)(t.lift)&&(0,k.isFunction)(t.subscribe))?t:(0,M.of)(t)}).pipe((0,U.mergeMap)(e=>{var r,s;return r=e,s=t,new D.Observable(e=>{let t=s.includes("open"),n=s.includes("reconnect");function i(t){if("data"in t){let[r,s]=e7(t);e.error(r?new e2("Unable to parse EventSource error message",{cause:s}):new e5((s?.data).message,s));return}r.readyState===r.CLOSED?e.error(new e3("EventSource connection failed")):n&&e.next({type:"reconnect"})}function o(){e.next({type:"open"})}function a(t){let[s,n]=e7(t);if(s)return void e.error(new e2("Unable to parse EventSource message",{cause:s}));if("channelError"===t.type){var i,o;let t,s=new URL(r.url).searchParams.get("tag");e.error(new e9((i=n?.data,o=s,(t=i.error)?eq(t)?eE(t,o):t.description?t.description:"string"==typeof t?t:JSON.stringify(t,null,2):i.message||"Unknown listener error"),n.data));return}"disconnect"===t.type?e.error(new e6(`Server disconnected client: ${n.data?.reason||"unknown error"}`)):e.next({type:t.type,id:t.lastEventId,...n.data?{data:n.data}:{}})}r.addEventListener("error",i),t&&r.addEventListener("open",o);let u=[...new Set([...e4,...s])].filter(e=>"error"!==e&&"open"!==e&&"reconnect"!==e);return u.forEach(e=>r.addEventListener(e,a)),()=>{r.removeEventListener("error",i),t&&r.removeEventListener("open",o),u.forEach(e=>r.removeEventListener(e,a)),r.close()}})}))}function e7(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 te(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 tt{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 eV("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((e,t,r)=>{let s="insert(at, selector, items)";if(-1===ex.indexOf(e)){let e=ex.map(e=>`"${e}"`).join(", ");throw Error(`${s} takes an "at"-argument which is one of: ${e}`)}if("string"!=typeof t)throw Error(`${s} takes a "selector"-argument which must be a string`);if(!Array.isArray(r))throw Error(`${s} takes an "items"-argument which must be an array`)})(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,s){let n=t<0?t-1:t,i=typeof r>"u"||-1===r?-1:Math.max(0,t+r),o=`${e}[${n}:${n<0&&i>=0?"":i}]`;return this.insert("replace",o,s||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...te(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,r=!0){return eV(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 tr extends tt{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new tr(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 ts extends tt{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new ts(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 tn={returnDocuments:!1};class ti{operations;trxId;constructor(e=[],t){this.operations=e,this.trxId=t}create(e){return eV("create",e),this._add({create:e})}createIfNotExists(e){let t="createIfNotExists";return eV(t,e),eD(t,e),this._add({[t]:e})}createOrReplace(e){let t="createOrReplace";return eV(t,e),eD(t,e),this._add({[t]:e})}delete(e){return eP("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 to extends ti{#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new to([...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},tn,e||{}))}patch(e,t){let r="function"==typeof t,s="string"!=typeof e&&e instanceof ts,n="object"==typeof e&&("query"in e||"id"in e);if(s)return this._add({patch:e.serialize()});if(r){let r=t(new ts(e,{},this.#a));if(!(r instanceof ts))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}if(n){let r=new ts(e,t||{},this.#a);return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}class ta extends ti{#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new ta([...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},tn,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof tr)return this._add({patch:e.serialize()});if(r){let r=t(new tr(e,{},this.#a));if(!(r instanceof tr))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}let tu=({query:e,params:t={},options:r={}})=>{let s=new URLSearchParams,{tag:n,includeMutations:i,returnQuery:o,...a}=r;for(let[r,i]of(n&&s.append("tag",n),s.append("query",e),Object.entries(t)))void 0!==i&&s.append(`$${r}`,JSON.stringify(i));for(let[e,t]of Object.entries(a))t&&s.append(e,`${t}`);return!1===o&&s.append("returnQuery","false"),!1===i&&s.append("includeMutations","fal
13se"),`?${s}`},tl=e=>"response"===e.type,tc=e=>e.body;function th(t,r,s,n,i={},o={}){let a="stega"in o?{...s||{},..."boolean"==typeof o.stega?{enabled:o.stega}:o.stega||{}}:s,u=a.enabled?(0,eo.stegaClean)(i):i,l=!1===o.filterResponse?e=>e:e=>e.result,{cache:c,next:h,...d}={useAbortSignal:"u">typeof o.signal,resultSourceMap:a.enabled?"withKeyArraySelector":o.resultSourceMap,...o,returnQuery:!1===o.filterResponse&&!1!==o.returnQuery},p=t$(t,r,"query",{query:n,params:u},"u">typeof c||"u">typeof h?{...d,fetch:{cache:c,next:h}}:d);return a.enabled?p.pipe(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ef.apply(void 0,(0,ea.__spreadArray)([],(0,ea.__read)(e)))}((0,L.from)(e.A(12247).then(function(e){return e.stegaEncodeSourceMap$1}).then(({stegaEncodeSourceMap:e})=>e))),(0,er.map)(([e,t])=>{let r=t(e.result,e.resultSourceMap,a);return l({...e,result:r})})):p.pipe((0,er.map)(l))}function td(e,t,r,s={}){let n={uri:tA(e,"doc",(()=>{if(!s.releaseId)return r;let e=(0,em.getVersionFromId)(r);if(!e){if((0,em.isDraftId)(r))throw Error(`The document ID (\`${r}\`) is a draft, but \`options.releaseId\` is set as \`${s.releaseId}\``);return(0,em.getVersionId)(r,s.releaseId)}if(e!==s.releaseId)throw Error(`The document ID (\`${r}\`) is already a version of \`${e}\` release, but this does not match the provided \`options.releaseId\` (\`${s.releaseId}\`)`);return r})()),json:!0,tag:s.tag,signal:s.signal,query:void 0!==s.includeAllVersions?{includeAllVersions:s.includeAllVersions}:void 0};return tO(e,t,n).pipe((0,eg.filter)(tl),(0,er.map)(e=>{let t=e.body.documents;return t?s.includeAllVersions?t:t[0]:s.includeAllVersions?[]:void 0}))}function tp(e,t,r,s={}){let n={uri:tA(e,"doc",r.join(",")),json:!0,tag:s.tag,signal:s.signal};return tO(e,t,n).pipe((0,eg.filter)(tl),(0,er.map)(e=>{let t,s,n=(t=e.body.documents||[],s=e=>e._id,t.reduce((e,t)=>(e[s(t)]=t,e),Object.create(null)));return r.map(e=>n[e]||null)}))}function tf(e,t,r,s={}){return t$(e,t,"query",{query:"*[sanity::partOfRelease($releaseId)]",params:{releaseId:r}},s)}function tg(e,t,r,s){return eD("createIfNotExists",r),tI(e,t,r,"createIfNotExists",s)}function tm(e,t,r,s){return eD("createOrReplace",r),tI(e,t,r,"createOrReplace",s)}function ty(e,t,r,s,n){return eD("createVersion",r),e_("createVersion",r),eY(),tE(e,t,{actionType:"sanity.action.document.version.create",publishedId:s,document:r},n)}function tb(e,t,r,s,n,i,o){if(!s)throw Error("`createVersion()` requires `baseId` when no `document` is provided");if(!r)throw Error("`createVersion()` requires `publishedId` when `baseId` is provided");return eP("createVersion",s),eP("createVersion",r),tE(e,t,{actionType:"sanity.action.document.version.create",publishedId:r,baseId:s,versionId:n?(0,em.getVersionId)(r,n):(0,em.getDraftId)(r),ifBaseRevisionId:i},o)}function tw(e,t,r,s){return t$(e,t,"mutate",{mutations:[{delete:te(r)}]},s)}function tv(e,t,r,s=!1,n){return tE(e,t,{actionType:"sanity.action.document.version.discard",versionId:r,purge:s},n)}function tC(e,t,r,s){return eD("replaceVersion",r),e_("replaceVersion",r),tE(e,t,{actionType:"sanity.action.document.version.replace",document:r},s)}function tR(e,t,r,s,n){return tE(e,t,{actionType:"sanity.action.document.version.unpublish",versionId:r,publishedId:s},n)}function tq(e,t,r,s){let n;return t$(e,t,"mutate",{mutations:Array.isArray(n=r instanceof ts||r instanceof tr?{patch:r.serialize()}:r instanceof to||r instanceof ta?r.serialize():r)?n:[n],transactionId:s&&s.transactionId||void 0},s)}function tE(e,t,r,s){let n=Array.isArray(r)?r:[r],i=s&&s.transactionId||void 0;return t$(e,t,"actions",{actions:n,transactionId:i,skipCrossDatasetReferenceValidation:s&&s.skipCrossDatasetReferenceValidation||void 0,dryRun:s&&s.dryRun||void 0},s)}function t$(e,t,r,s,n={}){let i="mutate"===r,o="actions"===r,a=i||o?"":tu(s),u=!i&&!o&&a.length<11264,l=u?a:"",c=n.returnFirst,{timeout:h,token:d,tag:p,headers:f,returnQuery:g,lastLiveEventId:m,cacheMode:y}=n,b={method:u?"GET":"POST",uri:tA(e,r,l),json:!0,body:u?void 0:s,query:i&&((e={})=>{let t;return{dryRun:e.dryRun,returnIds:!0,returnDocuments:(t=e.returnDocuments,!1===t?void 0:!!(typeof t>"u")||t),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}})(n),timeout:h,headers:f,token:d,tag:p,returnQuery:g,perspective:n.perspective,resultSourceMap:n.resultSourceMap,lastLiveEventId:Array.isArray(m)?m[0]:m,cacheMode:y,canUseCdn:"query"===r,signal:n.signal,fetch:n.fetch,useAbortSignal:n.useAbortSignal,useCdn:n.useCdn};return tO(e,t,b).pipe((0,eg.filter)(tl),(0,er.map)(tc),(0,er.map)(e
13=>{if(!i)return e;let t=e.results||[];if(n.returnDocuments)return c?t[0]&&t[0].document:t.map(e=>e.document);let r=c?t[0]&&t[0].id:t.map(e=>e.id);return{transactionId:e.transactionId,results:t,[c?"documentId":"documentIds"]:r}}))}function tI(e,t,r,s,n={}){return t$(e,t,"mutate",{mutations:[{[s]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},n))}let tF=e=>{let t=e.config();return void 0!==t.dataset&&void 0!==t.projectId||void 0!==t.resource},tT=(e,t)=>tF(e)&&t.startsWith(tA(e,"query"));function tO(e,t,r){var s;let n=r.url||r.uri,i=e.config(),o=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&(n.startsWith("/data/")||tT(e,n)||tF(e)&&n.startsWith(tA(e,"mutate"))||tF(e)&&n.startsWith(tA(e,"doc",""))||tF(e)&&n.startsWith(tA(e,"listen"))||tF(e)&&n.startsWith(tA(e,"history",""))):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:ek(u),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&tT(e,n)){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&&eG(),e0(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,eB())),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 l=function(e,t={}){let r={};e.headers&&Object.assign(r,e.headers);let s=t.token||e.token;s&&(r.Authorization=`Bearer ${s}`),t.useGlobalApi||e.useProjectHostname||!e.projectId||(r["X-Sanity-Project-ID"]=e.projectId);let n=!!(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:n,fetch:"object"==typeof t.fetch&&"object"==typeof e.fetch?{...e.fetch,...t.fetch}:t.fetch||e.fetch})}(i,Object.assign({},r,{url:tx(e,n,a)})),c=new D.Observable(e=>t(l,i.requester).subscribe(e));return r.signal?c.pipe((s=r.signal,e=>new D.Observable(t=>{let r=()=>t.error(function(e){if(tS)return new DOMException(e?.reason??"The operation was aborted.","AbortError");let t=Error(e?.reason??"The operation was aborted.");return t.name="AbortError",t}(s));if(s&&s.aborted)return void r();let n=e.subscribe(t);return s.addEventListener("abort",r),()=>{s.removeEventListener("abort",r),n.unsubscribe()}}))):c}function tj(e,t,r){return tO(e,t,r).pipe((0,eg.filter)(e=>"response"===e.type),(0,er.map)(e=>e.body))}function tA(e,t,r){let s=e.config();if(s.resource){eU(s);let e=tV(s),n=void 0!==r?`${t}/${r}`:t;return`${e}/${n}`.replace(/\/($|\?)/,"$1")}let n=eM(s),i=`/${t}/${n}`;return`/data${void 0!==r?`${i}/${r}`:i}`.replace(/\/($|\?)/,"$1")}function tx(e,t,r=!1){let{url:s,cdnUrl:n}=e.config();return`${r?n:s}/${t.replace(/^\//,"")}`}let tS=!!globalThis.DOMException,tV=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:s}=t;switch(r){case"dataset":{let e=s.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/${s}`;case"media-library":return`/media-libraries/${s}`;case"dashboard":return`/dashboards/${s}`;default:throw Error(`Unsupported resource type: ${r.toString()}`)}};function tP(e,t,r){let s=eM(e.config());return tj(e,t,{method:"POST",uri:`/agent/action/generate/${s}`,body:r})}function tD(e,t,r){let s=eM(e.config());return tj(e,t,{method:"POST",uri:`/agent/action/transform/${s}`,body:r})}function t_(e,t,r){let s=eM(e.config());return tj(e,t,{method:"POST",uri:`/agent/action/translate/${s}`,body:r})}class tM{#a;#u;constructor(e,t){this.#a=e,this.#u=t}generate(e){return tP(this.#a,this.#u,e)}transform(e){return tD(this.#a,this.#u,e)}translate(e){return t_(this.#a,this.#u,e)}}class tk{#a;#u;
13constructor(e,t){this.#a=e,this.#u=t}generate(e){return(0,N.lastValueFrom)(tP(this.#a,this.#u,e))}transform(e){return(0,N.lastValueFrom)(tD(this.#a,this.#u,e))}translate(e){return(0,N.lastValueFrom)(t_(this.#a,this.#u,e))}prompt(e){var t,r;let s;return(0,N.lastValueFrom)((t=this.#a,r=this.#u,s=eM(t.config()),tj(t,r,{method:"POST",uri:`/agent/action/prompt/${s}`,body:e})))}patch(e){var t,r;let s;return(0,N.lastValueFrom)((t=this.#a,r=this.#u,s=eM(t.config()),tj(t,r,{method:"POST",uri:`/agent/action/patch/${s}`,body:e})))}}class tU{#a;#u;constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){return tN(this.#a,this.#u,e,t,r)}}class tL{#a;#u;constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){let s=tN(this.#a,this.#u,e,t,r);return(0,N.lastValueFrom)(s.pipe((0,eg.filter)(e=>"response"===e.type),(0,er.map)(e=>e.body.document)))}}function tN(e,t,r,s,n={}){var i,o;if(-1===eA.indexOf(r))throw Error(`Invalid asset type: ${r}. Must be one of ${eA.join(", ")}`);let a=n.extract||void 0;a&&!a.length&&(a=["none"]);let u=e.config(),l=(i=n,o=s,!(typeof File>"u")&&o instanceof File?Object.assign({filename:!1===i.preserveFilename?void 0:o.name,contentType:o.type},i):i),{tag:c,label:h,title:d,description:p,creditLine:f,filename:g,source:m}=l,y=u.resource?.type==="media-library",b=y?{title:d,filename:g}:{label:h,title:d,description:p,filename:g,meta:a,creditLine:f};return m&&!y&&(b.sourceId=m.id,b.sourceName=m.name,b.sourceUrl=m.url),tO(e,t,{tag:c,method:"POST",timeout:l.timeout||0,uri:function(e,t){let r="image"===t?"images":"files",s=e.resource;if(s){let{type:e,id:t}=s;switch(e){case"dataset":throw Error("Assets are not supported for dataset resources, yet. Configure the client with `{projectId: <projectId>, dataset: <datasetId>}` instead.");case"canvas":return`/canvases/${t}/assets/${r}`;case"media-library":return`/media-libraries/${t}/upload`;case"dashboard":return`/dashboards/${t}/assets/${r}`;default:throw Error(`Unsupported resource type: ${e.toString()}`)}}let n=eM(e);return`assets/${r}/${n}`}(u,r),headers:l.contentType?{"Content-Type":l.contentType}:{},query:b,body:s})}let tz=(0,_.defer)(()=>e.A(34942)).pipe((0,er.map)(({default:e})=>e),(0,z.shareReplay)(1));function tH(){return function(e){return e.pipe(W((e,t)=>e instanceof e3?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,J.mergeAll)(1)((0,L.from)(e,(0,Q.popScheduler)(e)))}((0,M.of)({type:"reconnect"}),(0,K.timer)(1e3).pipe((0,U.mergeMap)(()=>t))):Y(()=>e)))}}let tB=["includePreviousRevision","includeResult","includeMutations","includeAllVersions","visibility","effectFormat","enableResume","tag"],tG={includeResult:!0};function tW(e,t,r={}){let{url:s,token:n,withCredentials:i,requestTagPrefix:o,headers:a}=this.config(),u=r.tag&&o?[o,r.tag].join("."):r.tag,l={...Object.keys(tG).concat(Object.keys(r)).reduce((e,t)=>(e[t]=typeof r[t]>"u"?tG[t]:r[t],e),{}),tag:u},c=tu({query:e,params:t,options:{tag:u,...tB.reduce((e,t)=>(typeof l[t]>"u"||(e[t]=l[t]),e),{})}}),h=`${s}${tA(this,"listen",c)}`;if(h.length>14800)return Y(()=>Error("Query too large for listener"));let d=l.events?l.events:["mutation"],p={};return i&&(p.withCredentials=!0),(n||a)&&(p.headers={},n&&(p.headers.Authorization=`Bearer ${n}`),a&&Object.assign(p.headers,a)),e8(()=>(typeof EventSource>"u"||p.headers?tz:(0,M.of)(EventSource)).pipe((0,er.map)(e=>new e(h,p))),d).pipe(tH(),(0,eg.filter)(e=>d.includes(e.type)),(0,er.map)(e=>({type:e.type,..."data"in e?e.data:{}})))}let tJ="2021-03-25";class tQ{#a;constructor(e){this.#a=e}events({includeDrafts:e=!1,tag:t}={}){var r,s,n,i;let{projectId:o,apiVersion:a,token:u,withCredentials:l,requestTagPrefix:c,headers:h}=this.#a.config(),d=a.replace(/^v/,"");if("X"!==d&&d<tJ)throw Error(`The live events API requires API version ${tJ} or later. The current API version is ${d}. Please update your API version to use this feature.`);if(e&&!u&&!l)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 p=tA(this.#a,"live/events"),f=new URL(this.#a.getUrl(p,!1)),g=t&&c?[c,t].join("."):t;g&&f.searchParams.set("tag",g),e&&f.searchParams.set("includeDrafts","true");let m={};e&&l&&(m.withCredentials=!0),(e&&u||h)&&(m.headers={},e&&u&&(m.headers.Authorization=`Bearer ${u}`),h&&Object.assign(m.headers,h));let y=`${f.href}::${JSON.stringify(m)}`,b=tY.get(y);if(b)return b;let w=e8(()=>(typeof EventSource>
13"u"||m.headers?tz:(0,M.of)(EventSource)).pipe((0,er.map)(e=>new e(f.href,m))),["message","restart","welcome","reconnect","goaway"]),v=(s=f,n={method:"OPTIONS",mode:"cors",credentials:m.withCredentials?"include":"omit",headers:m.headers},new D.Observable(e=>{let t=new AbortController,r=t.signal;return fetch(s,{...n,signal:t.signal}).then(t=>{e.next(t),e.complete()},t=>{r.aborted||e.error(t)}),()=>t.abort()})).pipe(W(()=>{throw new eI({projectId:o})})),C=w.pipe(tH(),(0,U.mergeMap)(e=>"reconnect"===e.type?v.pipe((0,U.mergeMap)(()=>(0,M.of)(e))):(0,M.of)(e)),W(e=>v.pipe((0,U.mergeMap)(()=>{throw e}))),(0,er.map)(e=>{if("message"===e.type){let{data:t,...r}=e;return{...r,tags:t.tags}}return e})).pipe((0,Z.finalize)(()=>tY.delete(y)),(i="function"==typeof(r={predicate:e=>"welcome"===e.type})?{predicate:r,...void 0}:r,e=>{let t,r=!1,{predicate:s,...n}=i,o=e.pipe((0,X.tap)(e=>{i.predicate(e)&&(r=!0,t=e)}),(0,Z.finalize)(()=>{r=!1,t=void 0}),(0,ee.share)(n)),a=new D.Observable(e=>{r&&e.next(t),e.complete()});return(0,et.merge)(o,a)}));return tY.set(y,C),C}}let tY=new Map;class tK{#a;#u;constructor(e,t){this.#a=e,this.#u=t}create(e,t){return t0(this.#a,this.#u,"PUT",e,t)}edit(e,t){return t0(this.#a,this.#u,"PATCH",e,t)}delete(e){return t0(this.#a,this.#u,"DELETE",e)}list(){eL("dataset",this.#a.config());let e=this.#a.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),tj(this.#a,this.#u,{uri:r,tag:null})}getEmbeddingsSettings(e){return eL("dataset",this.#a.config()),eS(e),tj(this.#a,this.#u,{uri:tZ(this.#a,e),tag:null})}editEmbeddingsSettings(e,t){return eL("dataset",this.#a.config()),eS(e),tj(this.#a,this.#u,{method:"PUT",uri:tZ(this.#a,e),body:t,tag:null})}}class tX{#a;#u;constructor(e,t){this.#a=e,this.#u=t}create(e,t){return eL("dataset",this.#a.config()),(0,N.lastValueFrom)(t0(this.#a,this.#u,"PUT",e,t))}edit(e,t){return eL("dataset",this.#a.config()),(0,N.lastValueFrom)(t0(this.#a,this.#u,"PATCH",e,t))}delete(e){return eL("dataset",this.#a.config()),(0,N.lastValueFrom)(t0(this.#a,this.#u,"DELETE",e))}list(){eL("dataset",this.#a.config());let e=this.#a.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),(0,N.lastValueFrom)(tj(this.#a,this.#u,{uri:r,tag:null}))}getEmbeddingsSettings(e){return eL("dataset",this.#a.config()),eS(e),(0,N.lastValueFrom)(tj(this.#a,this.#u,{uri:tZ(this.#a,e),tag:null}))}editEmbeddingsSettings(e,t){return eL("dataset",this.#a.config()),eS(e),(0,N.lastValueFrom)(tj(this.#a,this.#u,{method:"PUT",uri:tZ(this.#a,e),body:t,tag:null}))}}function tZ(e,t){let r=e.config();return!1===r.useProjectHostname?`/projects/${r.projectId}/datasets/${t}/settings/embeddings`:`/datasets/${t}/settings/embeddings`}function t0(e,t,r,s,n){return eL("dataset",e.config()),eS(s),tj(e,t,{method:r,uri:`/datasets/${s}`,body:n,tag:null})}class t1{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getPlaybackInfo(e,t={}){var r,s;let n=this.#a.config(),i=(n.resource||n["~experimental_resource"])?.id,{instanceId:o,libraryId:a}=function(e){let t="object"==typeof e&&"_ref"in e?e._ref:e,r=t6.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),u=a||i;if(!u)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 l=(r=o,s=u,`/media-libraries/${s}/video/${r}/playback-info`),c=function(e){let t={};if(e.transformations){let{thumbnail:r,animated:s,storyboard:n}=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)),s&&(s.width&&(t.animatedWidth=s.width),s.height&&(t.animatedHeight=s.height),void 0!==s.start&&(t.animatedStart=s.start),void 0!==s.end&&(t.animatedEnd=s.end),s.fps&&(t.animatedFps=s.fps),s.format&&(t.animatedFormat=s.format)),n&&n.format&&(t.storyboardFormat=n.format)}return e.expiration&&(t.expiration=e.expiration),t}(t);return tj(this.#a,this.#u,{method:"GET",uri:l,query:c})}}class t3{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getPlaybackInfo(e,t={}){return(0,N.lastValueFrom)(new t1(this.#a.observable,this.#u).getPlaybackInfo(e,t))}}let t6=/^media-library:(ml[^:]+):([^:]+)$/;class t9{#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),tj(this.#a,this.#u,{uri:"/projects",query:t})}getById(e){return tj(this.#a,this.#u,{uri:`/projects/${e}`})}}class t5{#a;#u;
13constructor(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),(0,N.lastValueFrom)(tj(this.#a,this.#u,{uri:"/projects",query:t}))}getById(e){return(0,N.lastValueFrom)(tj(this.#a,this.#u,{uri:`/projects/${e}`}))}}let t2=((e,t=21)=>{var r;let s,n;return r=t,n=-~(1.6*(s=(2<<Math.log(e.length-1)/Math.LN2)-1)*r/e.length),(t=r)=>{let i="";for(;;){let r=ey(n),o=0|n;for(;o--;)if((i+=e[r[o]&s]||"").length===t)return i}}})("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",8),t4=(e,t)=>t?(0,em.getVersionId)(e,t):(0,em.getDraftId)(e);function t8(e,{releaseId:t,publishedId:r,document:s}){if(r&&s._id){let e=t4(r,t);return((e,t)=>{if(t._id&&t._id!==e)throw Error(`The provided document ID (\`${t._id}\`) does not match the generated version ID (\`${e}\`)`)})(e,s),e}if(s._id){let r=(0,em.isDraftId)(s._id),n=(0,em.isVersionId)(s._id);if(!r&&!n)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 (\`${s._id}\`) that is a draft ID, but a release ID (\`${t}\`) was also provided.`);let n=(0,em.getVersionFromId)(s._id);if(n!==t)throw Error(`\`${e}()\` was called with a document ID (\`${s._id}\`) that is a version ID, but the release ID (\`${t}\`) does not match the document's version ID (\`${n}\`).`)}return s._id}if(r)return t4(r,t);throw Error(`\`${e}()\` requires either a publishedId or a document with an \`_id\``)}let t7=(e,t)=>{let[r,s,n]=((e,t)=>{if("object"==typeof e&&null!==e&&("releaseId"in e||"metadata"in e)){let{releaseId:r=t2(),metadata:s={}}=e;return[r,s,t]}return[t2(),{},e]})(e,t);return{action:{actionType:"sanity.action.release.create",releaseId:r,metadata:{...s,releaseType:s.releaseType||"undecided"}},options:n}};class re{#a;#u;constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return td(this.#a,this.#u,`_.releases.${e}`,t)}create(e,t){let{action:r,options:s}=t7(e,t),{releaseId:n,metadata:i}=r;return tE(this.#a,this.#u,r,s).pipe((0,er.map)(e=>({...e,releaseId:n,metadata:i})))}edit({releaseId:e,patch:t},r){return tE(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r)}publish({releaseId:e},t){return tE(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t)}archive({releaseId:e},t){return tE(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t)}unarchive({releaseId:e},t){return tE(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t)}schedule({releaseId:e,publishAt:t},r){return tE(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r)}unschedule({releaseId:e},t){return tE(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t)}delete({releaseId:e},t){return tE(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t)}fetchDocuments({releaseId:e},t){return tf(this.#a,this.#u,e,t)}}class rt{#a;#u;constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return(0,N.lastValueFrom)(td(this.#a,this.#u,`_.releases.${e}`,t))}async create(e,t){let{action:r,options:s}=t7(e,t),{releaseId:n,metadata:i}=r;return{...await (0,N.lastValueFrom)(tE(this.#a,this.#u,r,s)),releaseId:n,metadata:i}}edit({releaseId:e,patch:t},r){return(0,N.lastValueFrom)(tE(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r))}publish({releaseId:e},t){return(0,N.lastValueFrom)(tE(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t))}archive({releaseId:e},t){return(0,N.lastValueFrom)(tE(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t))}unarchive({releaseId:e},t){return(0,N.lastValueFrom)(tE(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t))}schedule({releaseId:e,publishAt:t},r){return(0,N.lastValueFrom)(tE(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r))}unschedule({releaseId:e},t){return(0,N.lastValueFrom)(tE(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t))}delete({releaseId:e},t){return(0,N.lastValueFrom)(tE(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t))}fetchDocuments({releaseId:e},t){return(0,N.lastValueFrom)(tf(this.#a,this.#u,e,t))}}class rr{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getById(e){return tj(this.#a,this.#u,{uri:`/users/${e}`})}}class rs{#a;#u;
13constructor(e,t){this.#a=e,this.#u=t}getById(e){return(0,N.lastValueFrom)(tj(this.#a,this.#u,{uri:`/users/${e}`}))}}class rn{assets;datasets;live;mediaLibrary;projects;users;agent;releases;#l;#u;listen=tW;constructor(e,t=eX){this.config(t),this.#u=e,this.assets=new tU(this,this.#u),this.datasets=new tK(this,this.#u),this.live=new tQ(this),this.mediaLibrary={video:new t1(this,this.#u)},this.projects=new t9(this,this.#u),this.users=new rr(this,this.#u),this.agent={action:new tM(this,this.#u)},this.releases=new re(this,this.#u)}clone(){return new rn(this.#u,this.config())}config(e){if(void 0===e)return{...this.#l};if(this.#l&&!1===this.#l.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.#l=e1(e,this.#l||{}),this}withConfig(e){let t=this.config();return new rn(this.#u,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return th(this,this.#u,this.#l.stega,e,t,r)}getDocument(e,t){if(t?.includeAllVersions===!0)return td(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 td(this,this.#u,e,r)}getDocuments(e,t){return tp(this,this.#u,e,t)}create(e,t){return tI(this,this.#u,e,"create",t)}createIfNotExists(e,t){return tg(this,this.#u,e,t)}createOrReplace(e,t){return tm(this,this.#u,e,t)}createVersion({document:e,publishedId:t,releaseId:r,baseId:s,ifBaseRevisionId:n},i){if(!e)return tb(this,this.#u,t,s,r,n,i);let o=t8("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||(0,em.getPublishedId)(e._id);return ty(this,this.#u,a,u,i)}delete(e,t){return tw(this,this.#u,e,t)}discardVersion({releaseId:e,publishedId:t},r,s){let n=t4(t,e);return tv(this,this.#u,n,r,s)}replaceVersion({document:e,publishedId:t,releaseId:r},s){let n=t8("replaceVersion",{document:e,publishedId:t,releaseId:r}),i={...e,_id:n};return tC(this,this.#u,i,s)}unpublishVersion({releaseId:e,publishedId:t},r){let s=(0,em.getVersionId)(t,e);return tR(this,this.#u,s,t,r)}mutate(e,t){return tq(this,this.#u,e,t)}patch(e,t){return new tr(e,t,this)}transaction(e){return new ta(e,this)}action(e,t){return tE(this,this.#u,e,t)}request(e){return tj(this,this.#u,e)}getUrl(e,t){return tx(this,e,t)}getDataUrl(e,t){return tA(this,e,t)}}class ri{assets;datasets;live;mediaLibrary;projects;users;agent;releases;observable;#l;#u;listen=tW;constructor(e,t=eX){this.config(t),this.#u=e,this.assets=new tL(this,this.#u),this.datasets=new tX(this,this.#u),this.live=new tQ(this),this.mediaLibrary={video:new t3(this,this.#u)},this.projects=new t5(this,this.#u),this.users=new rs(this,this.#u),this.agent={action:new tk(this,this.#u)},this.releases=new rt(this,this.#u),this.observable=new rn(e,t)}clone(){return new ri(this.#u,this.config())}config(e){if(void 0===e)return{...this.#l};if(this.#l&&!1===this.#l.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.#l=e1(e,this.#l||{}),this}withConfig(e){let t=this.config();return new ri(this.#u,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return(0,N.lastValueFrom)(th(this,this.#u,this.#l.stega,e,t,r))}getDocument(e,t){if(t?.includeAllVersions===!0)return(0,N.lastValueFrom)(td(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(0,N.lastValueFrom)(td(this,this.#u,e,r))}getDocuments(e,t){return(0,N.lastValueFrom)(tp(this,this.#u,e,t))}create(e,t){return(0,N.lastValueFrom)(tI(this,this.#u,e,"create",t))}createIfNotExists(e,t){return(0,N.lastValueFrom)(tg(this,this.#u,e,t))}createOrReplace(e,t){return(0,N.lastValueFrom)(tm(this,this.#u,e,t))}createVersion({document:e,publishedId:t,releaseId:r,baseId:s,ifBaseRevisionId:n},i){if(!e)return ei(tb(this,this.#u,t,s,r,n,i));let o=t8("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||(0,em.getPublishedId)(e._id);return ei(ty(this,this.#u,a,u,i))}delete(e,t){return(0,N.lastValueFrom)(tw(this,this.#u,e,t))}discardVersion({releaseId:e,publishedId:t},r,s){let n=t4(t,e);return(0,N.lastValueFrom)(tv(this,this.#u,n,r,s))}replaceVersion({document:e,publishedId:t,releaseId:r},s){let n=t8("replaceVersion",{document:e,publishedId:t,releaseId:r}),i={...e,_id:n};
13return ei(tC(this,this.#u,i,s))}unpublishVersion({releaseId:e,publishedId:t},r){let s=(0,em.getVersionId)(t,e);return(0,N.lastValueFrom)(tR(this,this.#u,s,t,r))}mutate(e,t){return(0,N.lastValueFrom)(tq(this,this.#u,e,t))}patch(e,t){return new ts(e,t,this)}transaction(e){return new to(e,this)}action(e,t){return(0,N.lastValueFrom)(tE(this,this.#u,e,t))}request(e){return(0,N.lastValueFrom)(tj(this,this.#u,e))}dataRequest(e,t,r){return(0,N.lastValueFrom)(t$(this,this.#u,e,t,r))}getUrl(e,t){return tx(this,e,t)}getDataUrl(e,t){return tA(this,e,t)}}let ro={requester:eT(t=[]),createClient:e=>{let r=eT(t,{ignoreWarnings:e.ignoreWarnings});return new ri((t,s)=>(s||r)({maxRedirects:0,maxRetries:e.maxRetries,retryDelay:e.retryDelay,lineage:e.lineage,...t}),e)}},ra=(ro.requester,ro.createClient),ru={dataset:"production",projectId:"9reyurp9",apiVersion:"2024-05-05"},rl=new Map,rc="1"===r.default.env.CI;function rh(e){let t=ra({...ru,useCdn:!e,perspective:e?"previewDrafts":"published",stega:{enabled:!!e,studioUrl:"http://localhost:3333"},token:e}),r=t.fetch.bind(t);return t.fetch=async function(e,t,s){if(rc){let r=e+JSON.stringify(t||{})+JSON.stringify(s||{}),n=await rd(r,"SHA-256");if(rl.has(n))return rl.get(n)}try{let n=await r(e,t,s);if(rc){let r=e+JSON.stringify(t||{})+JSON.stringify(s||{}),i=await rd(r,"SHA-256");rl.set(i,n)}return n}catch(e){throw e}},t}async function rd(t,r="SHA-256"){if(void 0===globalThis.crypto?.subtle)try{let{createHash:s}=await e.A(1765),n=r.toLowerCase().replace("-","");return s(n).update(t).digest("hex")}catch(e){throw Error("Crypto API not available in this environment")}let s=new TextEncoder().encode(t);return Array.from(new Uint8Array(await crypto.subtle.digest(r,s))).map(e=>e.toString(16).padStart(2,"0")).join("")}e.s(["getClient",()=>rh],25180)}]);
14
15//# sourceMappingURL=be8ffdd4f4e09627.js.map

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.