1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2066],{134:(e,t,r)=>{r.d(t,{I:()=>o});var n=r(27743),i=r(71810),s=Array.isArray;function o(e){return(0,i.T)(function(t){return s(t)?e.apply(void 0,(0,n.fX)([],(0,n.zs)(t))):e(t)})}},2214:(e,t,r)=>{r.d(t,{Ms:()=>v,vU:()=>p});var n=r(27743),i=r(48239),s=r(9840),o=r(61304),a=r(88550),u=r(51875),c=l("C",void 0,void 0);function l(e,t,r){return{kind:e,value:t,error:r}}var h=r(64838),d=r(7322),p=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,(0,s.Uv)(t)&&t.add(r)):r.destination=w,r}return(0,n.C6)(t,e),t.create=function(e,t,r){return new v(e,t,r)},t.prototype.next=function(e){this.isStopped?b(l("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?b(l("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?b(c,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(s.yU),f=Function.prototype.bind;function y(e,t){return f.call(e,t)}var g=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){m(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){m(e)}else m(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){m(e)}},e}(),v=function(e){function t(t,r,n){var s,a,u=e.call(this)||this;return(0,i.T)(t)||!t?s={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:u&&o.$.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return u.unsubscribe()},s={next:t.next&&y(t.next,a),error:t.error&&y(t.error,a),complete:t.complete&&y(t.complete,a)}):s=t,u.destination=new g(s),u}return(0,n.C6)(t,e),t}(p);function m(e){o.$.useDeprecatedSynchronousErrorHandling?(0,d.l)(e):(0,a.m)(e)}function b(e,t){var r=o.$.onStoppedNotification;r&&h.f.setTimeout(function(){return r(e,t)})}var w={closed:!0,next:u.l,error:function(e){throw e},complete:u.l}},2228:(e,t,r)=>{r.d(t,{C:()=>s,U:()=>o});var n=r(27743),i=r(48239);function s(e){return(0,n.AQ)(this,arguments,function(){var t,r,i;return(0,n.YH)(this,function(s){switch(s.label){case 0:t=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,(0,n.N3)(t.read())];case 3:if(i=(r=s.sent()).value,!r.done)return[3,5];return[4,(0,n.N3)(void 0)];case 4:return[2,s.sent()];case 5:return[4,(0,n.N3)(i)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function o(e){return(0,i.T)(null==e?void 0:e.getReader)}},7322:(e,t,r)=>{r.d(t,{Y:()=>s,l:()=>o});var n=r(61304),i=null;function s(e){if(n.$.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var r=i,s=r.errorThrown,o=r.error;if(i=null,s)throw o}}else e()}function o(e){n.$.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},7861:(e,t,r)=>{r.d(t,{Q:()=>o});var n=r(38155),i=r(57174),s=r(29642);function o(e,t){return void 0===t&&(t=0),(0,i.N)(function(r,i){r.subscribe((0,s._)(i,function(r){return(0,n.N)(i,e,function(){return i.next(r)},t)},function(){return(0,n.N)(i,e,function(){return i.complete()},t)},function(r){return(0,n.N)(i,e,function(){return i.error(r)},t)}))})}},9127:(e,t,r)=>{function n(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}r.d(t,{C:()=>a,Q:()=>l,u4:()=>n});var i={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},s={0:8203,1:8204,2:8205,3:65279},o=[,,,,].fill(String.fromCodePoint(s[0])).join("");function a(e,t,r="auto"){let n;return!0===r||"auto"===r&&(!(!Number.isNaN(Number(e))||/[a-z]/i.test(e)&&!/\d+(?:[-:\/]\d+){2}(?:T\d+(?:[-:\/]\d+){1,2}(\.\d+)?Z?)?/.test(e))&&Date.parse(e)||function(e){try{new URL(e,e.startsWith("/")?"https://acme.com":void 0)}catch{return!1}return!0}(e))?e:`${e}${n=JSON.stringify(t),`${o}${Array.from(n).map(e=>{let t=e.charCodeAt(0);if(t>255)throw Error(`Only ASCII edit info can be encoded. Error attempting to encode ${n} on character ${e} (${t})`);return Array.from(t.toString(4).padStart(4,"0")).map(e=>String.fromCodePoint(s[e])).join("")}).join("")}`}`}Object.fromEntries(Object.entries(s).map(e=>e.reverse())),Object.fromEntries(Object.entries(i).map(e=>e.reverse()));var u=`${Object.values(i).map(e=>`\\u{${e.toString(16)}}`).join("")}`,c=RegExp(`[${u}]{4,}`,"gu");function l(e){var t,r;return e&&JSON.parse({cleaned:(t=JSON.stringify(e)).replace(c,""),encoded:(null==(r=t.match(c))?void 0:r[0])||""}.cleaned)}},9840:(e,t,r)=>{r.d(t,{Kn:()=>u,yU:()=>a,Uv:()=>c});var n=r(27743),i=r(48239),s=(0,r(84661).L)(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}),o=r(96362),a=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,r,o,a,u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var c=(0,n.Ju)(u),h=c.next();!h.done;h=c.next())h.value.remove(this)}catch(t){e={error:t}}finally{try{h&&!h.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}else u.remove(this);var d=this.initialTeardown;
1if((0,i.T)(d))try{d()}catch(e){a=e instanceof s?e.errors:[e]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var f=(0,n.Ju)(p),y=f.next();!y.done;y=f.next()){var g=y.value;try{l(g)}catch(e){a=null!=a?a:[],e instanceof s?a=(0,n.fX)((0,n.fX)([],(0,n.zs)(a)),(0,n.zs)(e.errors)):a.push(e)}}}catch(e){r={error:e}}finally{try{y&&!y.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}}if(a)throw new s(a)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)l(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(r=this._finalizers)?r:[]).push(e)}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&(0,o.o)(t,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&(0,o.o)(r,e),e instanceof t&&e._removeParent(this)},(e=new t).closed=!0,t.EMPTY=e,t}(),u=a.EMPTY;function c(e){return e instanceof a||e&&"closed"in e&&(0,i.T)(e.remove)&&(0,i.T)(e.add)&&(0,i.T)(e.unsubscribe)}function l(e){(0,i.T)(e)?e():e.unsubscribe()}},13239:(e,t,r)=>{r.d(t,{F:()=>i,m:()=>s});var n=r(55989);function i(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s(e)}function s(e){return 0===e.length?n.D:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}},15011:(e,t,r)=>{r.d(t,{T:()=>i});var n=r(48239);function i(e){return Symbol.asyncIterator&&(0,n.T)(null==e?void 0:e[Symbol.asyncIterator])}},18726:(e,t,r)=>{r.d(t,{R0:()=>u,lI:()=>a,ms:()=>o});var n=r(48239),i=r(57960);function s(e){return e[e.length-1]}function o(e){return(0,n.T)(s(e))?e.pop():void 0}function a(e){return(0,i.m)(s(e))?e.pop():void 0}function u(e,t){return"number"==typeof s(e)?e.pop():t}},20884:(e,t,r)=>{r.d(t,{B:()=>c});var n=r(27743),i=r(72475),s=r(9840),o=(0,r(84661).L)(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),a=r(96362),u=r(7322),c=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,n.C6)(t,e),t.prototype.lift=function(e){var t=new l(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new o},t.prototype.next=function(e){var t=this;(0,u.Y)(function(){var r,i;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var s=(0,n.Ju)(t.currentObservers),o=s.next();!o.done;o=s.next())o.value.next(e)}catch(e){r={error:e}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}}})},t.prototype.error=function(e){var t=this;(0,u.Y)(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}})},t.prototype.complete=function(){var e=this;(0,u.Y)(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null==(e=this.observers)?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,i=this.observers;return r||n?s.Kn:(this.currentObservers=null,i.push(e),new s.yU(function(){t.currentObservers=null,(0,a.o)(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},t.prototype.asObservable=function(){var e=new i.c;return e.source=this,e},t.create=function(e,t){return new l(e,t)},t}(i.c),l=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return(0,n.C6)(t,e),t.prototype.next=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.next)||r.call(t,e)},t.prototype.error=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.error)||r.call(t,e)},t.prototype.complete=function(){var e,t;null==(t=null==(e=this.destination)?void 0:e.complete)||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!=(r=null==(t=this.source)?void 0:t.subscribe(e))?r:s.Kn},t}(c)},21471:(e,t,r)=>{r.d(t,{m:()=>
1o});var n=r(27743),i=r(20884),s=r(33125),o=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=s.U);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return(0,n.C6)(t,e),t.prototype.next=function(t){var r=this.isStopped,n=this._buffer,i=this._infiniteTimeWindow,s=this._timestampProvider,o=this._windowTime;!r&&(n.push(t),i||n.push(s.now()+o)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,i=(n?1:2)*e;if(e<1/0&&i<r.length&&r.splice(0,r.length-i),!n){for(var s=t.now(),o=0,a=1;a<r.length&&r[a]<=s;a+=2)o=a;o&&r.splice(0,o+1)}},t}(i.B)},21562:(e,t,r)=>{r.d(t,{K:()=>i});var n=Array.isArray;function i(e){return 1===e.length&&n(e[0])?e[0]:e}},22539:(e,t,r)=>{r.d(t,{U:()=>s});var n=r(66570),i=r(55989);function s(e){return void 0===e&&(e=1/0),(0,n.Z)(i.D,e)}},22936:(e,t,r)=>{r.d(t,{H:()=>s});var n=r(96010),i=r(94056);function s(e,t){return t?(0,n.c)(e,t):(0,i.Tg)(e)}},24048:(e,t,r)=>{r.d(t,{t:()=>s});var n=r(21471),i=r(89075);function s(e,t,r){var s,o,a,u,c=!1;return e&&"object"==typeof e?(u=void 0===(s=e.bufferSize)?1/0:s,t=void 0===(o=e.windowTime)?1/0:o,c=void 0!==(a=e.refCount)&&a,r=e.scheduler):u=null!=e?e:1/0,(0,i.u)({connector:function(){return new n.m(u,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:c})}},24736:(e,t,r)=>{r.d(t,{e:()=>n});function n(e,t){return e.reduce(function(e,r,n){return e[r]=t[n],e},{})}},25233:(e,t,r)=>{r.d(t,{l:()=>s});var n=r(62626),i=r(48239);function s(e){return(0,i.T)(e[n.s])}},29642:(e,t,r)=>{r.d(t,{H:()=>s,_:()=>i});var n=r(27743);function i(e,t,r,n,i){return new s(e,t,r,n,i)}var s=function(e){function t(t,r,n,i,s,o){var a=e.call(this,t)||this;return a.onFinalize=s,a.shouldUnsubscribe=o,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return(0,n.C6)(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),r||null==(t=this.onFinalize)||t.call(this)}},t}(r(2214).vU)},33125:(e,t,r)=>{r.d(t,{U:()=>n});var n={now:function(){return(n.delegate||Date).now()},delegate:void 0}},35045:(e,t,r)=>{r.d(t,{D:()=>a});var n=Array.isArray,i=Object.getPrototypeOf,s=Object.prototype,o=Object.keys;function a(e){if(1===e.length){var t,r=e[0];if(n(r))return{args:r,keys:null};if((t=r)&&"object"==typeof t&&i(t)===s){var a=o(r);return{args:a.map(function(e){return r[e]}),keys:a}}}return{args:e,keys:null}}},35097:(e,t,r)=>{r.d(t,{_:()=>s});var n=r(74170),i=r(2214);function s(e,t){var r="object"==typeof t;return new Promise(function(s,o){var a=new i.Ms({next:function(e){s(e),a.unsubscribe()},error:o,complete:function(){r?s(t.defaultValue):o(new n.G)}});e.subscribe(a)})}},35464:(e,t,r)=>{r.d(t,{A_:()=>g,C:()=>d,IM:()=>w,R8:()=>y,T4:()=>v,_S:()=>b,ct:()=>m,iz:()=>C});let n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/_key\s*==\s*['"](.*)['"]/,s=/^\d*:\d*$/;function o(e){return"number"==typeof e||"string"==typeof e&&/^\[\d+\]$/.test(e)}function a(e){return"string"==typeof e?i.test(e.trim()):"object"==typeof e&&"_key"in e}function u(e){if("string"==typeof e&&s.test(e))return!0;if(!Array.isArray(e)||2!==e.length)return!1;let[t,r]=e;return("number"==typeof t||""===t)&&("number"==typeof r||""===r)}function c(e){if(!Array.isArray(e))throw Error("Path is not an array");return e.reduce((e,t,r)=>{let n=typeof t;if("number"===n)return`${e}[${t}]`;if("string"===n)return`${e}${0===r?"":"."}${t}`;if(a(t)&&t._key)return`${e}[_key=="${t._key}"]`;if(Array.isArray(t)){let[r,n]=t;return`${e}[${r}:${n}]`}throw Error(`Unsupported path segment \`${JSON.stringify(t)}\``)},"")}function l(e){if("string"!=typeof e)throw Error("Path is not a string");let t=e.match(n);if(!t)throw Error("Invalid path string");return t.map(h)}function h(e){return o(e)?Number(e.replace(/[^\d]/g,"")):a(e)?{_key:e.match(i)[1]}:u(e)?function(e){let[t,r]=e.split(":").map(e=>""===e?e:Number(e));return[t,r]}(e):e}var d=Object.freeze({__proto__:null,fromString:l,get:function(e,t,r){let n="string"==typeof t?l(t):t;if(!Array.isArray(n))throw Error("Path must be an array or a string");let i=e;for(let e=0;e<n.length;e++){let t=n[e];if(o(t)){if(!Array.isArray(i))return r;i=i[t]}if(a(t)){if(!Array.isArray(i))return r;i=i.find(e=>e._key===t._key)}if("string"==typeof t&&(i="object"==typeof i&&null!==i?i[t]:void 0),typeof i>"u")return r}return i},isIndexSegment:o,isIndexTuple:u,isKeySegment:a,reKeySegment:i,toString:c});let p="drafts.",f="versions.";function y(e){return e.startsWith(p)}function g(e){return e.startsWith(f)}function v(e){return g(e)?p+w(e):y(e)?e:p+e}function m(e,t){if("drafts"===t||"published"===t)throw Error('Version can not be "published" or "drafts"');return`${f}${t}.${w(e)}`}function b(e){if(!g(e))return;let[t,r,...n]=e.split(".");return r}function w(e){return g(e)?e.split(".").slice(2).join("."):y(e)?e.slice(p.length):e}function C(e){let{baseUrl:t,workspace:r="default",tool:n="default",id:i,type:s,path:o,projectId:a,dataset:u}=e;if(!t)throw Error("baseUrl is required");if(!o)throw Error("path is required");if(!i)throw Error("id is required");if("/"!==t&&t.endsWith("/"))throw Error("baseUrl must not end with a slash");let l="default"===r?void 0:r,h="default"===n?void 0:n,d=w(i),p=Array.isArray(o)?c(o.map(e=>{if("string"==typeof e||"number"==typeof e)return e;if(""!==e._key)return{_key:e._key};if(-1!==e._index)return e._index;throw Error(`invalid segment:${JSON.stringify(e)}`)})):o,f=new URLSearchParams({baseUrl:t,id:d,type:s,path:p});if(l&&f.set("workspace",l),h&&f.set("tool",h),a&&f.set("projectId",a),u&&f.set("dataset",u),y(i)||g(i)){if(g(i)){let e=b(i);f.set("perspective",e)}}else f.set("perspective","published");let v=["/"===t?"":t];l&&v.push(l);let m=["mode=presentation",`id=${d}`,`type=${s}`,`path=${encodeURIComponent(p)}`];return h&&m.push(`tool=${h}`),v.push("intent","edit",`${m.join(";")}?${f}`),v.join("/")}},38155:(e,t,r)=>{r.d(t,{N:()=>n});function n(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var s=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(s),!i)return s}},38651:(e,t,r)=>{r.d(t,{W:()=>function e(t){return(0,s.N)(function(r,s){var o,a=null,u=!1;a=r.subscribe((0,i._)(s,void 0,void 0,function(i){o=(0,n.Tg)(t(i,e(t)(r))),a?(a.unsubscribe(),a=null,o.subscribe(s)):u=!0})),u&&(a.unsubscribe(),a=null,o.subscribe(s))})}});var n=r(94056),i=r(29642),s=r(57174)},42066:(e,t,r)=>{r.d(t,{Q6:()=>eZ,MZ:()=>eg,u_:()=>eE,gP:()=>ev,UU:()=>t7});let n=!(typeof navigator>"u")&&"ReactNative"===navigator.product,i={timeout:n?6e4:12e4},s=function(e){let t={...i,..."string"==typeof e?{url:e}:e};if(t.timeout=function e(t){if(!1===t||0===t)return!1;if(t.connect||t.socket)return t;let r=Number(t);return isNaN(r)?e(i.timeout):{connect:r,socket:r}}(t.timeout),t.query){let{url:e,searchParams:r}=function(e){let t=e.indexOf("?");if(-1===t)return{url:e,searchParams:new URLSearchParams};let r=e.slice(0,t),i=e.slice(t+1);if(!n)return{url:r,searchParams:new URLSearchParams(i)};if("function"!=typeof decodeURIComponent)throw Error("Broken `URLSearchParams` implementation, and `decodeURIComponent` is not defined");let s=new URLSearchParams;for(let e of i.split("&")){let[t,r]=e.split("=");t&&s.append(o(t),o(r||""))}return{url:r,searchParams:s}}(t.url);for(let[n,i]of Object.entries(t.query)){if(void 0!==i)if(Array.isArray(i))for(let e of i)r.append(n,e);else r.append(n,i);let s=r.toString();s&&(t.url=`${e}?${s}`)}}return t.method=t.body&&!t.method?"POST":(t.method||"GET").toUpperCase(),t};function 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"];
1var 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"),i=0;i<n.length;i++){var s,o=n[i],a=o.indexOf(":"),u=e(o.slice(0,a)).toLowerCase(),c=e(o.slice(a+1));typeof r[u]>"u"?r[u]=c:(s=r[u],"[object Array]"===Object.prototype.toString.call(s))?r[u].push(c):r[u]=[r[u],c]}return r}}());class f{onabort;onerror;onreadystatechange;ontimeout;readyState=0;response;responseText="";responseType="";status;statusText;withCredentials;#e;#t;#r;#n={};#i;#s={};#o;open(e,t,r){this.#e=e,this.#t=t,this.#r="",this.readyState=1,this.onreadystatechange?.(),this.#i=void 0}abort(){this.#i&&this.#i.abort()}getAllResponseHeaders(){return this.#r}setRequestHeader(e,t){this.#n[e]=t}setInit(e,t=!0){this.#s=e,this.#o=t}send(e){let t="arraybuffer"!==this.responseType,r={...this.#s,method:this.#e,headers:this.#n,body:e};"function"==typeof AbortController&&this.#o&&(this.#i=new AbortController,"u">typeof EventTarget&&this.#i.signal instanceof EventTarget&&(r.signal=this.#i.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 y="function"==typeof XMLHttpRequest?"xhr":"fetch",g="xhr"===y?XMLHttpRequest:f,v=(e,t)=>{let r=e.options,n=e.applyMiddleware("finalizeOptions",r),i={},s=e.applyMiddleware("interceptRequest",void 0,{adapter:y,context:e});if(s){let e=setTimeout(t,0,null,s);return{abort:()=>clearTimeout(e)}}let o=new g;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=>{m(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=>{m(Error(`Request timeout while attempting to reach ${n.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},o.onabort=()=>{v(!0),c=!0},o.onreadystatechange=function(){u&&(v(),i.socket=setTimeout(()=>d("ESOCKETTIMEDOUT"),u.socket)),!c&&o&&4===o.readyState&&0!==o.status&&function(){if(!(c||l||h)){if(0===o.status)return m(Error("Unknown XHR error"));v(),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:y,request:o,context:e}),o.send(n.body||null),u&&(i.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 v(e){(e||c||o&&o.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function m(e){if(l)return;v(!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)}};var m,b,w,C,E,R=r(55036),q=r(39660).hp,T={exports:{}};E||(E=1,function(e,t){let r;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))}),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch{}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!e&&"u">typeof R&&"env"in R&&(e=R.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+)/))&&
2("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{}}(),r=!1,t.destroy=()=>{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=(C?w:(C=1,w=function(e){function t(e){let n,i,s,o=null;function a(...e){if(!a.enabled)return;let r=Number(new Date);a.diff=r-(n||r),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:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){let n=t(this.namespace+(typeof r>"u"?":":r)+e);return n.log=this.log,n}function n(e,t){let r=0,n=0,i=-1,s=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(i=n,s=r):r++,n++;else{if(-1===i)return!1;n=i+1,r=++s}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){let e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){for(let r of(t.save(e),t.namespaces=e,t.names=[],t.skips=[],("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===r[0]?t.skips.push(r.slice(1)):t.names.push(r)},t.enabled=function(e){for(let r of t.skips)if(n(e,r))return!1;for(let r of t.names)if(n(e,r))return!0;return!1},t.humanize=function(){if(b)return m;b=1;function e(e,t,r,n){return Math.round(e/r)+" "+n+(t>=1.5*r?"s":"")}return m=function(t,r){r=r||{};var n,i,s=typeof t;if("string"===s&&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"===s&&isFinite(t))return r.long?(i=Math.abs(t))>=864e5?e(t,i,864e5,"day"):i>=36e5?e(t,i,36e5,"hour"):i>=6e4?e(t,i,6e4,"minute"):i>=1e3?e(t,i,1e3,"second"):t+" ms":(n=Math.abs(t))>=864e5?Math.round(t/864e5)+"d":n>=36e5?Math.round(t/36e5)+"h":n>=6e4?Math.round(t/6e4)+"m":n>=1e3?Math.round(t/1e3)+"s":t+"ms";throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}}(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(r=>{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t)|0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}))(t);let{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(T,T.exports)),T.exports,Object.prototype.hasOwnProperty;let $=typeof q>"u"?()=>!1:e=>q.isBuffer(e);function _(e){return"[object Object]"===Object.prototype.toString.call(e)}let x=["boolean","string","number"],I={};"u">typeof globalThis?I=globalThis:"u">typeof window?I=window:"u">typeof global?I=global:"u">typeof self&&(I=self);var O=I;let j=(e={})=>{let t=e.implementation||Promise;if(!t)throw Error("`Promise` is not available in global scope, and n
2o implementation was passed");return{onReturn:(r,n)=>new t((t,i)=>{let s=n.options.cancelToken;s&&s.promise.then(e=>{r.abort.publish(e),i(e)}),r.error.subscribe(i),r.response.subscribe(r=>{t(e.onlyBody?r.body:r)}),setTimeout(()=>{try{r.request.publish(n)}catch(e){i(e)}},0)})}};class S{__CANCEL__=!0;message;constructor(e){this.message=e}toString(){return"Cancel"+(this.message?`: ${this.message}`:"")}}class A{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 A(t=>{e=t}),cancel:e}}}j.Cancel=S,j.CancelToken=A,j.isCancel=e=>!(!e||!e?.__CANCEL__);var P=(e,t,r)=>("GET"===r.method||"HEAD"===r.method)&&(e.isNetworkError||!1);function D(e){return 100*Math.pow(2,e)+100*Math.random()}let k=(e={})=>(e=>{let t=e.maxRetries||5,r=e.retryDelay||D,n=e.shouldRetry;return{onError:(e,i)=>{var s;let o=i.options,a=o.maxRetries||t,u=o.retryDelay||r,c=o.shouldRetry||n,l=o.attemptNumber||0;if(null!==(s=o.body)&&"object"==typeof s&&"function"==typeof s.pipe||!c(e,l,o)||l>=a)return e;let h=Object.assign({},i,{options:Object.assign({},o,{attemptNumber:l+1})});return setTimeout(()=>i.channels.request.publish(h),u(l)),null}}})({shouldRetry:P,...e});k.shouldRetry=P;var F=r(72475),N=r(59036),U=r(87018),M=r(94097),z=r(66570),L=r(22936),V=r(89139),H=r(24048),B=r(38651),W=r(98348),J=r(46161),X=r(51170),Y=r(49441),G=r(79062),Q=r(89075),K=r(97012),Z=r(65853),ee=r(71810),et=r(35097),er=r(9127),en=r(27743),ei=r(51202),es=r(57174),eo=r(21562),ea=r(134),eu=r(13239),ec=r(18726);function el(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,ec.ms)(e);return r?(0,eu.F)(el.apply(void 0,(0,en.fX)([],(0,en.zs)(e))),(0,ea.I)(r)):(0,es.N)(function(t,r){(0,ei.P)((0,en.fX)([t],(0,en.zs)((0,eo.K)(e))))(r)})}var eh=r(95282),ed=r(35464),ep=r(77207);let ef=/\r\n|[\n\r\u2028\u2029]/;function ey(e,t){let r=0;for(let n=0;n<t.length;n++){let i=t[n].length+1;if(r+i>e)return{line:n+1,column:e-r};r+=i}return{line:t.length,column:t[t.length-1]?.length??0}}class eg extends Error{response;statusCode=400;responseBody;details;constructor(e,t){let r=em(e,t);super(r.message),Object.assign(this,r)}}class ev extends Error{response;statusCode=500;responseBody;details;constructor(e){let t=em(e);super(t.message),Object.assign(this,t)}}function em(e,t){var r,n,i;let s=e.body,o={response:e,statusCode:e.statusCode,responseBody:(r=s,-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(r,null,2):r),message:"",details:void 0};if(!(0,er.u4)(s))return o.message=eC(e,s),o;let a=s.error;if("string"==typeof a&&"string"==typeof s.message)return o.message=`${a} - ${s.message}`,o;if("object"!=typeof a||null===a)return"string"==typeof a?o.message=a:"string"==typeof s.message?o.message=s.message:o.message=eC(e,s),o;if("type"in(n=a)&&"mutationError"===n.type&&"description"in n&&"string"==typeof n.description||"type"in(i=a)&&"actionError"===i.type&&"description"in i&&"string"==typeof i.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=s.error,o}return eb(a)?(o.message=ew(a,t?.options?.query?.tag),o.details=s.error):"description"in a&&"string"==typeof a.description?(o.message=a.description,o.details=a):o.message=eC(e,s),o}function eb(e){return(0,er.u4)(e)&&"queryParseError"===e.type&&"string"==typeof e.query&&"number"==typeof e.start&&"number"==typeof e.end}function ew(e,t){let{query:r,start:n,end:i,description:s}=e;if(!r||typeof n>"u")return`GROQ query parse error: ${s}`;let o=t?` 6 7Tag: ${t}`:"";return`GROQ query parse error: 8${function(e,t,r){let n=e.split(ef),{start:i,end:s,markerLines:o}=function(e,t){let r={...e.start},n={...r,...e.end},i=r.line??-1,s=r.column??0,o=n.line,a=n.column,u=Math.max(i-3,0),c=Math.min(t.length,o+3);-1===i&&(u=0),-1===o&&(c=t.length);let l=o-i,h={};if(l)for(let e=0;e<=l;e++){let r=e+i;if(s)if(0===e){let e=t[r-1].length;h[r]=[s,e-s+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 s===a?s?h[i]=[s,0]:h[i]=!0:h[i]=[s,a-s];return{start:u,end:c,markerLines:h}}({start:ey(t.start,n),end:t.end?ey(t.end,n):void 0},n),a=`${s}`.length;return e.split(ef,s).slice(i,s).map((e,t)=>{let n=i+1+t,s=` ${` ${n}`.slice(-a)} |`,u=o[n],c=!o[n+1];if(!u)return` ${s}${e.length>0?` ${e}`:""}`;let l="";if(Array.isArray(u)){let t=e.slice(0,Math.max(u[0]-1,0)).replace(/[^\t]/g," "),n=u[1]||1;l=` 9 `+s.replace(/\d/g," ")+" "+t+"^".repeat(n),c&&r&&(l+=" "+r)}return">"+s+(e.length>0?` ${e}`:"")+l}).join(` 10`)}(r,{start:n,end:i},s)}${o}`}function eC(e,t){var r,n;let i="string"==typeof t?` (${n=100,(r=t).length>100?`${r.slice(0,n)}\u2026`:r})`:"",s=e.statusMessage?` ${e.statusMessage}`:"";return`${e.method}-request to ${e.url} resulted in HTTP ${e.statusCode}${s}${i}`}
10class eE 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 eR={onResponse:(e,t)=>{if(e.statusCode>=500)throw new ev(e);if(e.statusCode>=400)throw new eg(e,t);return e}};function eq(e,t={}){return((e=[],t=v)=>(function e(t,r){let n=[],i=l.reduce((e,t)=>(e[t]=e[t]||[],e),{processOptions:[s],validateOptions:[u]});function o(e){let t,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),{}),s=function(e,t,...r){let n="onError"===e,s=t;for(let t=0;t<i[e].length&&(s=(0,i[e][t])(s,...r),!n||s);t++);return s},o=s("processOptions",e);s("validateOptions",o);let a={options:o,channels:n,applyMiddleware:s},u=n.request.subscribe(e=>{t=r(e,(t,r)=>((e,t,r)=>{let i=e,o=t;if(!i)try{o=s("onResponse",t,r)}catch(e){o=null,i=e}(i=i&&s("onError",i,r))?n.error.publish(i):o&&n.response.publish(o)})(t,r,e))});n.abort.subscribe(()=>{u(),t&&t.abort()});let l=s("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&&i.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]&&i[t].push(e[t])}),n.push(e),o},o.clone=()=>e(n,r),t.forEach(o.use),o})(e,t))([k({shouldRetry:eT}),...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)||-1===x.indexOf(typeof t)&&!Array.isArray(t)&&!function(e){if(!1===_(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!1!==_(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"))}},eR,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:F.c})])}function eT(e,t,r){if(0===r.maxRetries)return!1;let n="GET"===r.method||"HEAD"===r.method,i=(r.uri||r.url).startsWith("/data/query"),s=e.response&&(429===e.response.statusCode||502===e.response.statusCode||503===e.response.statusCode);return(!!n||!!i)&&!!s||k.shouldRetry(e,t,r)}function e$(e){return"https://www.sanity.io/help/"+e}let e_=["image","file"],ex=["before","after","replace"],eI=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")},eO=(e,t)=>{if(null===t||"object"!=typeof t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},ej=(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`)},eS=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);ej(e,t._id)},eA=(e,t)=>
10{if(!t._type)throw Error(`\`${e}()\` requires that the document contains a type (\`_type\` property)`);((e,t)=>{if("string"!=typeof t)throw Error(`\`${e}()\`: \`${t}\` is not a valid document type`)})(e,t._type)},eP=e=>{if(!e.dataset)throw Error("`dataset` must be provided to perform queries");return e.dataset||""},eD=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},ek=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()}`)}},eF=(e,t)=>{if(t["~experimental_resource"])throw Error(`\`${e}\` does not support resource-based operations`)},eN=e=>(function(e){let t=!1,r;return(...n)=>(t||(r=e(...n),t=!0),r)})((...t)=>console.warn(e.join(" "),...t)),eU=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"]),eM=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."]),ez=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."]),eL=eN(["The `previewDrafts` perspective has been renamed to `drafts` and will be removed in a future API version"]),eV=eN(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${e$("js-client-browser-token")} for more information and how to hide this warning.`]),eH=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`."]),eB=eN(["Using the Sanity client without specifying an API version is deprecated.",`See ${e$("js-client-api-version")}`]),eW=(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."])),eJ={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}},eX=["localhost","127.0.0.1","0.0.0.0"];function eY(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 eG=(e,t)=>{let r,n={...t,...e,stega:{..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||eJ.stega,..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||{}}};n.apiVersion||eB();let i={...eJ,...n},s=i.useProjectHostname&&!i["~experimental_resource"];if(typeof Promise>"u"){let e=e$("js-client-promise-polyfill");throw Error(`No native Promise-implementation found, polyfill needed - see ${e}`)}if(s&&!i.projectId)throw Error("Configuration must contain `projectId`");if(i["~experimental_resource"]&&ek(i),"u">typeof i.perspective&&eY(i.perspective),"encodeSourceMap"in i)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 i)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMapAtPath' is not supported in '@sanity/client'. Did you mean 'stega.filter'?");if("boolean"!=typeof i.stega.enabled)throw Error(`stega.enabled must be a boolean, received ${i.stega.enabled}`);if(i.stega.enabled&&void 0===i.stega.studioUrl)throw Error("stega.studioUrl must be defined when stega.enabled is true");if(i.stega.enabled&&"string"!=typeof i.stega.studioUrl&&"function"!=typeof i.stega.studioUrl)throw Error(`stega.studioUrl must be a string or a function, received ${i.stega.studioUrl}`);let o="u">typeof window&&window.location&&window.location.hostname,a=o&&(r=window.location.hostname,-1!==eX.indexOf(r)),u=!!i.token;i.withCredentials&&u&&(eH(),i.withCredentials=!1),o&&a&&u&&!0!==i.ignoreBrowserTokenWarning?eV():typeof i.useCdn>"u"&&eM(),s&&(e=>{if(!/^[-a-z0-9]+$/i.test(e))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")})(i.projectId),i.dataset&&eI(i.dataset),"requestTagPrefix"in i&&(i.requestTagPrefix=i.requestTagPrefix?eD(i.requestTagPrefix).replace(/\.+$/,""):void 0),i.apiVersion=`${i.apiVersion}`.replace(/^v/,""),i.isDefaultApi=i.apiHost===eJ.apiHost,!0===i.useCdn&&i.withCredentials&&eU(),i.useCdn=!1!==i.useCdn&&!i.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`")}(i.apiVersion);let c=i.apiHost.split("://",2),l=c[0],h=c[1],d=i.isDefaultApi?"apicdn.sanity.io":h;return s?(i.url=`${l}://${i.projectId}.${h}/v${i.apiVersion}`,i.cdnUrl=`${l}://${i.projectId}.${d}/v${i.apiVersion}
10`):(i.url=`${i.apiHost}/v${i.apiVersion}`,i.cdnUrl=i.url),i};class eQ extends Error{name="ConnectionFailedError"}class eK extends Error{name="DisconnectError";reason;constructor(e,t,r={}){super(e,r),this.reason=t}}class eZ extends Error{name="ChannelError";data;constructor(e,t){super(e),this.data=t}}class e0 extends Error{name="MessageError";data;constructor(e,t,r={}){super(e,r),this.data=t}}class e1 extends Error{name="MessageParseError"}let e3=["channelError","disconnect"];function e2(e,t){return(0,N.v)(()=>{let t=e();return(0,U.A)(t)?t:(0,M.of)(t)}).pipe((0,z.Z)(e=>{var r,n;return r=e,n=t,new F.c(e=>{let t=n.includes("open"),i=n.includes("reconnect");function s(t){if("data"in t){let[r,n]=e6(t);e.error(r?new e1("Unable to parse EventSource error message",{cause:n}):new e0((n?.data).message,n));return}r.readyState===r.CLOSED?e.error(new eQ("EventSource connection failed")):i&&e.next({type:"reconnect"})}function o(){e.next({type:"open"})}function a(t){let[n,i]=e6(t);if(n)return void e.error(new e1("Unable to parse EventSource message",{cause:n}));if("channelError"===t.type){let t=new URL(r.url).searchParams.get("tag");e.error(new eZ(function(e,t){let r=e.error;return r?eb(r)?ew(r,t):r.description?r.description:"string"==typeof r?r:JSON.stringify(r,null,2):e.message||"Unknown listener error"}(i?.data,t),i.data));return}if("disconnect"===t.type)return void e.error(new eK(`Server disconnected client: ${i.data?.reason||"unknown error"}`));e.next({type:t.type,id:t.lastEventId,...i.data?{data:i.data}:{}})}r.addEventListener("error",s),t&&r.addEventListener("open",o);let u=[...new Set([...e3,...n])].filter(e=>"error"!==e&&"open"!==e&&"reconnect"!==e);return u.forEach(e=>r.addEventListener(e,a)),()=>{r.removeEventListener("error",s),t&&r.removeEventListener("open",o),u.forEach(e=>r.removeEventListener(e,a)),r.close()}})}))}function e6(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 e4(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 e9{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 eO("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 n="insert(at, selector, items)";if(-1===ex.indexOf(e)){let e=ex.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`)})(e,t,r),this._assign("insert",{[e]:t,items:r})}append(e,t){return this.insert("after",`${e}[-1]`,t)}prepend(e,t){return this.insert("before",`${e}[0]`,t)}splice(e,t,r,n){let i=t<0?t-1:t,s=typeof r>"u"||-1===r?-1:Math.max(0,t+r),o=`${e}[${i}:${i<0&&s>=0?"":s}]`;return this.insert("replace",o,n||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...e4(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,r=!0){return eO(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 e5 extends e9{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new e5(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 e7 extends e9{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new e7(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 e8={returnDocuments:!1};class te{operations;trxId;constructor(e=[],t){this.operations=e,this.trxId=t}create(e){return eO("create",e),this._add({create:e})}createIfNotExists(e){let t="createIfNotExists";return eO(t,e),eS(t,e),this._add({[t]:e})}createOrReplace(e){let t="createOrReplace";return eO(t,e),eS(t,e),this._add({[t]:e})}delete(e){return ej("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 tt extends te{#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new tt([...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},e8,e||{}))}patch(e,t){let r="function"==typeof t,n="string"!=typeof e&&e instanceof e7,i="object"==typeof e&&("query"in e||"id"in e);if(n)return this._add({patch:e.serialize()});if(r){let r=t(new e7(e,{},this.#a));if(!(r instanceof e7))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}if(i){let r=new e7(e,t||{},this.#a);return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}class tr extends te{#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},e8,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof e5)return this._add({patch:e.serialize()});if(r){let r=t(new e5(e,{},this.#a));if(!(r instanceof e5))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}let tn=({query:e,params:t={},options:r={}})=>{let n=new URLSearchParams,{tag:i,includeMutations:s,returnQuery:o,...a}=r;for(let[r,s]of(i&&n.append("tag",i),n.append("query",e),Object.entries(t)))void 0!==s&&n.append(`$${r}`,JSON.stringify(s));for(let[e,t]of Object.entries(a))t&&n.append(e,`${t}`);return!1===o&&n.append("returnQuery","false"),!1===s&&n.append("includeMutations","fal
13se"),`?${n}`},ti=e=>"response"===e.type,ts=e=>e.body;function to(e,t,n,i,s={},o={}){let a="stega"in o?{...n||{},..."boolean"==typeof o.stega?{enabled:o.stega}:o.stega||{}}:n,u=a.enabled?(0,er.Q)(s):s,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=tw(e,t,"query",{query:i,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 el.apply(void 0,(0,en.fX)([],(0,en.zs)(e)))}((0,L.H)(r.e(1961).then(r.bind(r,41961)).then(function(e){return e.stegaEncodeSourceMap$1}).then(({stegaEncodeSourceMap:e})=>e))),(0,ee.T)(([e,t])=>{let r=t(e.result,e.resultSourceMap,a);return c({...e,result:r})})):p.pipe((0,ee.T)(c))}function ta(e,t,r,n={}){let i={uri:t$(e,"doc",(()=>{if(!n.releaseId)return r;let e=(0,ed._S)(r);if(!e){if((0,ed.R8)(r))throw Error(`The document ID (\`${r}\`) is a draft, but \`options.releaseId\` is set as \`${n.releaseId}\``);return(0,ed.ct)(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};return tq(e,t,i).pipe((0,eh.p)(ti),(0,ee.T)(e=>e.body.documents&&e.body.documents[0]))}function tu(e,t,r,n={}){let i={uri:t$(e,"doc",r.join(",")),json:!0,tag:n.tag,signal:n.signal};return tq(e,t,i).pipe((0,eh.p)(ti),(0,ee.T)(e=>{let t,n,i=(t=e.body.documents||[],n=e=>e._id,t.reduce((e,t)=>(e[n(t)]=t,e),Object.create(null)));return r.map(e=>i[e]||null)}))}function tc(e,t,r,n={}){return tw(e,t,"query",{query:"*[sanity::partOfRelease($releaseId)]",params:{releaseId:r}},n)}function tl(e,t,r,n){return eS("createIfNotExists",r),tC(e,t,r,"createIfNotExists",n)}function th(e,t,r,n){return eS("createOrReplace",r),tC(e,t,r,"createOrReplace",n)}function td(e,t,r,n,i){return eS("createVersion",r),eA("createVersion",r),eW(),tb(e,t,{actionType:"sanity.action.document.version.create",publishedId:n,document:r},i)}function tp(e,t,r,n,i,s,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 ej("createVersion",n),ej("createVersion",r),tb(e,t,{actionType:"sanity.action.document.version.create",publishedId:r,baseId:n,versionId:i?(0,ed.ct)(r,i):(0,ed.T4)(r),ifBaseRevisionId:s},o)}function tf(e,t,r,n){return tw(e,t,"mutate",{mutations:[{delete:e4(r)}]},n)}function ty(e,t,r,n=!1,i){return tb(e,t,{actionType:"sanity.action.document.version.discard",versionId:r,purge:n},i)}function tg(e,t,r,n){return eS("replaceVersion",r),eA("replaceVersion",r),tb(e,t,{actionType:"sanity.action.document.version.replace",document:r},n)}function tv(e,t,r,n,i){return tb(e,t,{actionType:"sanity.action.document.version.unpublish",versionId:r,publishedId:n},i)}function tm(e,t,r,n){let i;return tw(e,t,"mutate",{mutations:Array.isArray(i=r instanceof e7||r instanceof e5?{patch:r.serialize()}:r instanceof tt||r instanceof tr?r.serialize():r)?i:[i],transactionId:n&&n.transactionId||void 0},n)}function tb(e,t,r,n){let i=Array.isArray(r)?r:[r],s=n&&n.transactionId||void 0;return tw(e,t,"actions",{actions:i,transactionId:s,skipCrossDatasetReferenceValidation:n&&n.skipCrossDatasetReferenceValidation||void 0,dryRun:n&&n.dryRun||void 0},n)}function tw(e,t,r,n,i={}){let s="mutate"===r,o="actions"===r,a=s||o?"":tn(n),u=!s&&!o&&a.length<11264,c=u?a:"",l=i.returnFirst,{timeout:h,token:d,tag:p,headers:f,returnQuery:y,lastLiveEventId:g,cacheMode:v}=i,m={method:u?"GET":"POST",uri:t$(e,r,c),json:!0,body:u?void 0:n,query:s&&((e={})=>{let t,r;return{dryRun:e.dryRun,returnIds:!0,returnDocuments:(t=e.returnDocuments,r=!0,!1===t?void 0:typeof t>"u"?r:t),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}})(i),timeout:h,headers:f,token:d,tag:p,returnQuery:y,perspective:i.perspective,resultSourceMap:i.resultSourceMap,lastLiveEventId:Array.isArray(g)?g[0]:g,cacheMode:v,canUseCdn:"query"===r,signal:i.signal,fetch:i.fetch,useAbortSignal:i.useAbortSignal,useCdn:i.useCdn};return tq(e,t,m).pipe((0,eh.p)(ti),(0,ee.T)(ts),(0,ee.T)(e=>{if(!s)return e;let t=e.results||[];if(i.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 tC(e,t,r,n,i={}){return tw(e,t,"mutate",{mutations:[{[n]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},i))}let tE=e=>void 0!==e.config().dataset&&void 0!==e.config().projectId||void 0!==e.config()["~experimental_resource"],tR=(e,t)=>tE(e)&&t.startsWith(t$(e,"query"));function tq(e,t,r){var n;let i=r.url||r.uri,s=e.config(),o=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&(i.startsWith("/data/")||tR(e,i)||tE(e)&&i.startsWith(t$(e,"mutate"))||tE(e)&&i.startsWith(t$(e,"doc",""))||tE(e)&&i.startsWith(t$(e,"listen"))||tE(e)&&i.startsWith(t$(e,"history",""))):r.canUseCdn,a=(r.useCdn??s.useCdn)&&o,u=r.tag&&s.requestTagPrefix?[s.requestTagPrefix,r.tag].join("."):r.tag||s.requestTagPrefix;if(u&&null!==r.tag&&(r.query={tag:eD(u),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&tR(e,i)){let e=r.resultSourceMap??s.resultSourceMap;void 0!==e&&!1!==e&&(r.query={resultSourceMap:e,...r.query});let t=r.perspective||s.perspective;"u">typeof t&&("previewDrafts"===t&&eL(),eY(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,ez())),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 i=!!(typeof t.withCredentials>"u"?e.withCredentials:t.withCredentials),s=typeof t.timeout>"u"?e.timeout:t.timeout;return Object.assign({},t,{headers:Object.assign({},r,t.headers||{}),timeout:typeof s>"u"?3e5:s,proxy:t.proxy||e.proxy,json:!0,withCredentials:i,fetch:"object"==typeof t.fetch&&"object"==typeof e.fetch?{...e.fetch,...t.fetch}:t.fetch||e.fetch})}(s,Object.assign({},r,{url:t_(e,i,a)})),l=new F.c(e=>t(c,s.requester).subscribe(e));return r.signal?l.pipe((n=r.signal,e=>new F.c(t=>{let r=()=>t.error(function(e){if(tx)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)return void r();let i=e.subscribe(t);return n.addEventListener("abort",r),()=>{n.removeEventListener("abort",r),i.unsubscribe()}}))):l}function tT(e,t,r){return tq(e,t,r).pipe((0,eh.p)(e=>"response"===e.type),(0,ee.T)(e=>e.body))}function t$(e,t,r){let n=e.config();if(n["~experimental_resource"]){ek(n);let e=tI(n),i=void 0!==r?`${t}/${r}`:t;return`${e}/${i}`.replace(/\/($|\?)/,"$1")}let i=eP(n),s=`/${t}/${i}`;return`/data${void 0!==r?`${s}/${r}`:s}`.replace(/\/($|\?)/,"$1")}function t_(e,t,r=!1){let{url:n,cdnUrl:i}=e.config();return`${r?i:n}/${t.replace(/^\//,"")}`}let tx=!!globalThis.DOMException,tI=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 tO(e,t,r){let n=eP(e.config());return tT(e,t,{method:"POST",uri:`/agent/action/generate/${n}`,body:r})}function tj(e,t,r){let n=eP(e.config());return tT(e,t,{method:"POST",uri:`/agent/action/transform/${n}`,body:r})}function tS(e,t,r){let n=eP(e.config());return tT(e,t,{method:"POST",uri:`/agent/action/translate/${n}`,body:r})}class tA{#a;#u;constructor(e,t){this.#a=e,this.#u=t}generate(e){return tO(this.#a,this.#u,e)}transform(e){return tj(this.#a,this.#u,e)}translate(e){return tS(this.#a,this.#u,e)}}class tP{#a;#u;constructor(e,t){this.#a=e,this.#u=t}generate(e){return(0,V.s)(tO(this.#a,this.#u,e))}transform(e){return(0,V.s)(tj(this.#a,this.#u,e))}translate(e){return(0,V.s)(tS(this.#a,this.#u,e))}prompt(e){return(0,V.s)(function(e,t,r){let n=eP(e.config());return tT(e,t,{method:"POST",uri:`/agent/action/prompt/${n}`,body:r})}(this.#a,this.#u,e))}patch(e){return(0,V.s)(function(e,t,r){let n=eP(e.config());return tT(e,t,{method:"POST",uri:`/agent/action/patch/${n}`,body:r})}(this.#a,this.#u,e))}}class tD{#a;#u;
13constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){return tF(this.#a,this.#u,e,t,r)}}class tk{#a;#u;constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){let n=tF(this.#a,this.#u,e,t,r);return(0,V.s)(n.pipe((0,eh.p)(e=>"response"===e.type),(0,ee.T)(e=>e.body.document)))}}function tF(e,t,r,n,i={}){var s,o;if(-1===e_.indexOf(r))throw Error(`Invalid asset type: ${r}. Must be one of ${e_.join(", ")}`);let a=i.extract||void 0;a&&!a.length&&(a=["none"]);let u=e.config(),c=(s=i,o=n,!(typeof File>"u")&&o instanceof File?Object.assign({filename:!1===s.preserveFilename?void 0:o.name,contentType:o.type},s):s),{tag:l,label:h,title:d,description:p,creditLine:f,filename:y,source:g}=c,v={label:h,title:d,description:p,filename:y,meta:a,creditLine:f};return g&&(v.sourceId=g.id,v.sourceName=g.name,v.sourceUrl=g.url),tq(e,t,{tag:l,method:"POST",timeout:c.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=eP(e);return`assets/${r}/${n}`}(u,r),headers:c.contentType?{"Content-Type":c.contentType}:{},query:v,body:n})}let tN=(0,N.v)(()=>r.e(6796).then(r.t.bind(r,36796,19))).pipe((0,ee.T)(({default:e})=>e),(0,H.t)(1));function tU(){return function(e){return e.pipe((0,B.W)((e,t)=>e instanceof eQ?(0,W.x)((0,M.of)({type:"reconnect"}),(0,J.O)(1e3).pipe((0,z.Z)(()=>t))):(0,X.$)(()=>e)))}}let tM=["includePreviousRevision","includeResult","includeMutations","includeAllVersions","visibility","effectFormat","tag"],tz={includeResult:!0};function tL(e,t,r={}){let{url:n,token:i,withCredentials:s,requestTagPrefix:o,headers:a}=this.config(),u=r.tag&&o?[o,r.tag].join("."):r.tag,c={...Object.keys(tz).concat(Object.keys(r)).reduce((e,t)=>(e[t]=typeof r[t]>"u"?tz[t]:r[t],e),{}),tag:u},l=tn({query:e,params:t,options:{tag:u,...tM.reduce((e,t)=>(typeof c[t]>"u"||(e[t]=c[t]),e),{})}}),h=`${n}${t$(this,"listen",l)}`;if(h.length>14800)return(0,X.$)(()=>Error("Query too large for listener"));let d=c.events?c.events:["mutation"],p={};return s&&(p.withCredentials=!0),(i||a)&&(p.headers={},i&&(p.headers.Authorization=`Bearer ${i}`),a&&Object.assign(p.headers,a)),e2(()=>(typeof EventSource>"u"||p.headers?tN:(0,M.of)(EventSource)).pipe((0,ee.T)(e=>new e(h,p))),d).pipe(tU(),(0,eh.p)(e=>d.includes(e.type)),(0,ee.T)(e=>({type:e.type,..."data"in e?e.data:{}})))}let tV="2021-03-25";class tH{#a;constructor(e){this.#a=e}events({includeDrafts:e=!1,tag:t}={}){var r,n,i,s;eF("live",this.#a.config());let{projectId:o,apiVersion:a,token:u,withCredentials:c,requestTagPrefix:l,headers:h}=this.#a.config(),d=a.replace(/^v/,"");if("X"!==d&&d<tV)throw Error(`The live events API requires API version ${tV} or later. The current API version is ${d}. Please update your API version to use this feature.`);if(e&&!u&&!c)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=t$(this.#a,"live/events"),f=new URL(this.#a.getUrl(p,!1)),y=t&&l?[l,t].join("."):t;y&&f.searchParams.set("tag",y),e&&f.searchParams.set("includeDrafts","true");let g={};e&&c&&(g.withCredentials=!0),(e&&u||h)&&(g.headers={},e&&u&&(g.headers.Authorization=`Bearer ${u}`),h&&Object.assign(g.headers,h));let v=`${f.href}::${JSON.stringify(g)}`,m=tB.get(v);if(m)return m;let b=e2(()=>(typeof EventSource>"u"||g.headers?tN:(0,M.of)(EventSource)).pipe((0,ee.T)(e=>new e(f.href,g))),["message","restart","welcome","reconnect","goaway"]).pipe(tU(),(0,ee.T)(e=>{if("message"===e.type){let{data:t,...r}=e;return{...r,tags:t.tags}}return e})),w=(n=f,i={method:"OPTIONS",mode:"cors",credentials:g.withCredentials?"include":"omit",headers:g.headers},new F.c(e=>{let t=new AbortController,r=t.signal;return fetch(n,{...i,signal:t.signal}).then(t=>{e.next(t),e.complete()},t=>{r.aborted||e.error(t)}),()=>t.abort()})).pipe((0,z.Z)(()=>Z.w),(0,B.W)(()=>{throw new eE({projectId:o})})),C=(0,W.x)(w,b).pipe((0,G.j)(()=>tB.delete(v)),(s="function"==typeof(r={predicate:e=>"welcome"===e.type})?{predicate:r,...void 0}:r,e=>{let t,r=!1,{predicate:n,...i}=s,o=e.pipe((0,Y.M)(e=>{s.predicate(e)&&(r=!0,t=e)}),(0,G.j)(()=>{r=!1,t=void 0}),(0,Q.u)(i)),a=new F.c(e=>{r&&e.next(t),e.complete()});return(0,K.h)(o,a)}));return tB.set(v,C),C}}let tB=new Map;class tW{#a;#u;constructor(e,t){this.#a=e,this.#u=t}create(e,t){return tX(this.#a,this.#u,"PUT",e,t)}edit(e,t){return tX(this.#a,this.#u,"PATCH",e,t)}delete(e){return tX(this.#a,this.#u,"DELETE",e)}list(){return tT(this.#a,this.#u,{uri:"/datasets",tag:null})}}class tJ{#a;#u;constructor(e,t){this.#a=e,this.#u=t}create(e,t){return eF("dataset",this.#a.config()),(0,V.s)(tX(this.#a,this.#u,"PUT",e,t))}edit(e,t){return eF("dataset",this.#a.config()),(0,V.s)(tX(this.#a,this.#u,"PATCH",e,t))}delete(e){return eF("dataset",this.#a.config()),(0,V.s)(tX(this.#a,this.#u,"DELETE",e))}list(){return eF("dataset",this.#a.config()),(0,V.s)(tT(this.#a,this.#u,{uri:"/datasets",tag:null}))}}function tX(e,t,r,n,i){return eF("dataset",e.config()),eI(n),tT(e,t,{method:r,uri:`/datasets/${n}`,body:i,tag:null})}class tY{#a;#u;constructor(e,t){this.#a=e,this.#u=t}list(e){eF("projects",this.#a.config());let t=e?.includeMembers===!1?"/projects?includeMembers=false":"/projects";return tT(this.#a,this.#u,{uri:t})}getById(e){return eF("projects",this.#a.config()),tT(this.#a,this.#u,{uri:`/projects/${e}`})}}class tG{#a;#u;constructor(e,t){this.#a=e,this.#u=t}list(e){eF("projects",this.#a.config());let t=e?.includeMembers===!1?"/projects?includeMembers=false":"/projects";return(0,V.s)(tT(this.#a,this.#u,{uri:t}))}getById(e){return eF("projects",this.#a.config()),(0,V.s)(tT(this.#a,this.#u,{uri:`/projects/${e}`}))}}let tQ=(0,ep.d_)("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",8),tK=(e,t)=>t?(0,ed.ct)(e,t):(0,ed.T4)(e);function tZ(e,{releaseId:t,publishedId:r,document:n}){if(r&&n._id){let e=tK(r,t);return((e,t)=>{if(t._id&&t._id!==e)throw Error(`The provided document ID (\`${t._id}
13\`) does not match the generated version ID (\`${e}\`)`)})(e,n),e}if(n._id){let r=(0,ed.R8)(n._id),i=(0,ed.A_)(n._id);if(!r&&!i)throw Error(`\`${e}()\` requires a document with an \`_id\` that is a version or draft ID`);if(t){if(r)throw Error(`\`${e}()\` was called with a document ID (\`${n._id}\`) that is a draft ID, but a release ID (\`${t}\`) was also provided.`);let i=(0,ed._S)(n._id);if(i!==t)throw Error(`\`${e}()\` was called with a document ID (\`${n._id}\`) that is a version ID, but the release ID (\`${t}\`) does not match the document's version ID (\`${i}\`).`)}return n._id}if(r)return tK(r,t);throw Error(`\`${e}()\` requires either a publishedId or a document with an \`_id\``)}let t0=(e,t)=>{let[r,n,i]=((e,t)=>{if("object"==typeof e&&null!==e&&("releaseId"in e||"metadata"in e)){let{releaseId:r=tQ(),metadata:n={}}=e;return[r,n,t]}return[tQ(),{},e]})(e,t);return{action:{actionType:"sanity.action.release.create",releaseId:r,metadata:{...n,releaseType:n.releaseType||"undecided"}},options:i}};class t1{#a;#u;constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return ta(this.#a,this.#u,`_.releases.${e}`,t)}create(e,t){let{action:r,options:n}=t0(e,t),{releaseId:i,metadata:s}=r;return tb(this.#a,this.#u,r,n).pipe((0,ee.T)(e=>({...e,releaseId:i,metadata:s})))}edit({releaseId:e,patch:t},r){return tb(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r)}publish({releaseId:e},t){return tb(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t)}archive({releaseId:e},t){return tb(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t)}unarchive({releaseId:e},t){return tb(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t)}schedule({releaseId:e,publishAt:t},r){return tb(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r)}unschedule({releaseId:e},t){return tb(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t)}delete({releaseId:e},t){return tb(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t)}fetchDocuments({releaseId:e},t){return tc(this.#a,this.#u,e,t)}}class t3{#a;#u;constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return(0,V.s)(ta(this.#a,this.#u,`_.releases.${e}`,t))}async create(e,t){let{action:r,options:n}=t0(e,t),{releaseId:i,metadata:s}=r;return{...await (0,V.s)(tb(this.#a,this.#u,r,n)),releaseId:i,metadata:s}}edit({releaseId:e,patch:t},r){return(0,V.s)(tb(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r))}publish({releaseId:e},t){return(0,V.s)(tb(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t))}archive({releaseId:e},t){return(0,V.s)(tb(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t))}unarchive({releaseId:e},t){return(0,V.s)(tb(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t))}schedule({releaseId:e,publishAt:t},r){return(0,V.s)(tb(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r))}unschedule({releaseId:e},t){return(0,V.s)(tb(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t))}delete({releaseId:e},t){return(0,V.s)(tb(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t))}fetchDocuments({releaseId:e},t){return(0,V.s)(tc(this.#a,this.#u,e,t))}}class t2{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getById(e){return tT(this.#a,this.#u,{uri:`/users/${e}`})}}class t6{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getById(e){return(0,V.s)(tT(this.#a,this.#u,{uri:`/users/${e}`}))}}class t4{assets;datasets;live;projects;users;agent;releases;#c;#u;listen=tL;constructor(e,t=eJ){this.config(t),this.#u=e,this.assets=new tD(this,this.#u),this.datasets=new tW(this,this.#u),this.live=new tH(this),this.projects=new tY(this,this.#u),this.users=new t2(this,this.#u),this.agent={action:new tA(this,this.#u)},this.releases=new t1(this,this.#u)}clone(){return new t4(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=eG(e,this.#c||{}),this}withConfig(e){let t=this.config();return new t4(this.#u,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return to(this,this.#u,this.#c.stega,e,t,r)}getDocument(e,t){return ta(this,this.#u,e,t)}getDocuments(e,t){return tu(this,this.#u,e,t)}create(e,t){return tC(this,this.#u,e,"create",t)}createIfNotExists(e,t){return tl(this,this.#u,e,t)}createOrReplace(e,t){return th(this,this.#u,e,t)}createVersion({document:e,publishedId:t,releaseId:r,baseId:n,ifBaseRevisionId:i},s){if(!e)return tp(this,this.#u,t,n,r,i,s);let o=tZ("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||(0,ed.IM)(e._id);return td(this,this.#u,a,u,s)}delete(e,t){return tf(this,this.#u,e,t)}discardVersion({releaseId:e,publishedId:t},r,n){let i=tK(t,e);return ty(this,this.#u,i,r,n)}replaceVersion({document:e,publishedId:t,releaseId:r},n){let i=tZ("replaceVersion",{document:e,publishedId:t,releaseId:r}),s={...e,_id:i};return tg(this,this.#u,s,n)}unpublishVersion({releaseId:e,publishedId:t},r){let n=(0,ed.ct)(t,e);return tv(this,this.#u,n,t,r)}mutate(e,t){return tm(this,this.#u,e,t)}patch(e,t){return new e5(e,t,this)}transaction(e){return new tr(e,this)}action(e,t){return tb(this,this.#u,e,t)}request(e){return tT(this,this.#u,e)}getUrl(e,t){return t_(this,e,t)}getDataUrl(e,t){return t$(this,e,t)}}class t9{assets;datasets;live;projects;users;agent;releases;observable;#c;#u;listen=tL;constructor(e,t=eJ){this.config(t),this.#u=e,this.assets=new tk(this,this.#u),this.datasets=new tJ(this,this.#u),this.live=new tH(this),this.projects=new tG(this,this.#u),this.users=new t6(this,this.#u),this.agent={action:new tP(this,this.#u)}
13,this.releases=new t3(this,this.#u),this.observable=new t4(e,t)}clone(){return new t9(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=eG(e,this.#c||{}),this}withConfig(e){let t=this.config();return new t9(this.#u,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return(0,V.s)(to(this,this.#u,this.#c.stega,e,t,r))}getDocument(e,t){return(0,V.s)(ta(this,this.#u,e,t))}getDocuments(e,t){return(0,V.s)(tu(this,this.#u,e,t))}create(e,t){return(0,V.s)(tC(this,this.#u,e,"create",t))}createIfNotExists(e,t){return(0,V.s)(tl(this,this.#u,e,t))}createOrReplace(e,t){return(0,V.s)(th(this,this.#u,e,t))}createVersion({document:e,publishedId:t,releaseId:r,baseId:n,ifBaseRevisionId:i},s){if(!e)return(0,et._)(tp(this,this.#u,t,n,r,i,s));let o=tZ("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||(0,ed.IM)(e._id);return(0,et._)(td(this,this.#u,a,u,s))}delete(e,t){return(0,V.s)(tf(this,this.#u,e,t))}discardVersion({releaseId:e,publishedId:t},r,n){let i=tK(t,e);return(0,V.s)(ty(this,this.#u,i,r,n))}replaceVersion({document:e,publishedId:t,releaseId:r},n){let i=tZ("replaceVersion",{document:e,publishedId:t,releaseId:r}),s={...e,_id:i};return(0,et._)(tg(this,this.#u,s,n))}unpublishVersion({releaseId:e,publishedId:t},r){let n=(0,ed.ct)(t,e);return(0,V.s)(tv(this,this.#u,n,t,r))}mutate(e,t){return(0,V.s)(tm(this,this.#u,e,t))}patch(e,t){return new e7(e,t,this)}transaction(e){return new tt(e,this)}action(e,t){return(0,V.s)(tb(this,this.#u,e,t))}request(e){return(0,V.s)(tT(this,this.#u,e))}dataRequest(e,t,r){return(0,V.s)(tw(this,this.#u,e,t,r))}getUrl(e,t){return t_(this,e,t)}getDataUrl(e,t){return t$(this,e,t)}}let t5=function(e,t){return{requester:eq(e),createClient:r=>{let n=eq(e,{ignoreWarnings:r.ignoreWarnings});return new t((e,t)=>(t||n)({maxRedirects:0,maxRetries:r.maxRetries,retryDelay:r.retryDelay,...e}),r)}}}([],t9),t7=(t5.requester,t5.createClient)},42119:(e,t,r)=>{r.d(t,{v:()=>n});function n(e){return e instanceof Date&&!isNaN(e)}},42609:(e,t,r)=>{r.d(t,{l:()=>n});var n="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},43521:(e,t,r)=>{r.d(t,{q:()=>o});var n=r(27743),i=r(33125),s=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=i.U.now,e}(),o=function(e){function t(t,r){void 0===r&&(r=s.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return(0,n.C6)(t,e),t.prototype.flush=function(e){var t,r=this.actions;if(this._active)return void r.push(e);this._active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}},t}(s)},46161:(e,t,r)=>{r.d(t,{O:()=>a});var n=r(72475),i=r(85404),s=r(57960),o=r(42119);function a(e,t,r){void 0===e&&(e=0),void 0===r&&(r=i.b);var a=-1;return null!=t&&((0,s.m)(t)?r=t:a=t),new n.c(function(t){var n=(0,o.v)(e)?e-r.now():e;n<0&&(n=0);var i=0;return r.schedule(function(){t.closed||(t.next(i++),0<=a?this.schedule(void 0,a):t.complete())},n)})}},48239:(e,t,r)=>{r.d(t,{T:()=>n});function n(e){return"function"==typeof e}},49441:(e,t,r)=>{r.d(t,{M:()=>a});var n=r(48239),i=r(57174),s=r(29642),o=r(55989);function a(e,t,r){var a=(0,n.T)(e)||t||r?{next:e,error:t,complete:r}:e;return a?(0,i.N)(function(e,t){null==(r=a.subscribe)||r.call(a);var r,n=!0;e.subscribe((0,s._)(t,function(e){var r;null==(r=a.next)||r.call(a,e),t.next(e)},function(){var e;n=!1,null==(e=a.complete)||e.call(a),t.complete()},function(e){var r;n=!1,null==(r=a.error)||r.call(a,e),t.error(e)},function(){var e,t;n&&(null==(e=a.unsubscribe)||e.call(a)),null==(t=a.finalize)||t.call(a)}))}):o.D}},50178:(e,t,r)=>{r.d(t,{h:()=>o});var n=r(94056),i=r(38155),s=r(29642);function o(e,t,r,o,a,u,c,l){var h=[],d=0,p=0,f=!1,y=function(){!f||h.length||d||t.complete()},g=function(e){return d<o?v(e):h.push(e)},v=function(e){u&&t.next(e),d++;var l=!1;(0,n.Tg)(r(e,p++)).subscribe((0,s._)(t,function(e){null==a||a(e),u?g(e):t.next(e)},function(){l=!0},void 0,function(){if(l)try{for(d--;h.length&&d<o;)!function(){var e=h.shift();c?(0,i.N)(t,c,function(){return v(e)}):v(e)}();y()}catch(e){t.error(e)}}))};return e.subscribe((0,s._)(t,g,function(){f=!0,y()})),function(){null==l||l()}}},51170:(e,t,r)=>{r.d(t,{$:()=>s});var n=r(72475),i=r(48239);function s(e,t){var r=(0,i.T)(e)?e:function(){return e}
13,s=function(e){return e.error(r())};return new n.c(t?function(e){return t.schedule(s,0,e)}:s)}},51202:(e,t,r)=>{r.d(t,{P:()=>p,z:()=>d});var n=r(72475),i=r(35045),s=r(22936),o=r(55989),a=r(134),u=r(18726),c=r(24736),l=r(29642),h=r(38155);function d(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,u.lI)(e),l=(0,u.ms)(e),h=(0,i.D)(e),d=h.args,f=h.keys;if(0===d.length)return(0,s.H)([],r);var y=new n.c(p(d,r,f?function(e){return(0,c.e)(f,e)}:o.D));return l?y.pipe((0,a.I)(l)):y}function p(e,t,r){return void 0===r&&(r=o.D),function(n){f(t,function(){for(var i=e.length,o=Array(i),a=i,u=i,c=function(i){f(t,function(){var c=(0,s.H)(e[i],t),h=!1;c.subscribe((0,l._)(n,function(e){o[i]=e,!h&&(h=!0,u--),u||n.next(r(o.slice()))},function(){--a||n.complete()}))},n)},h=0;h<i;h++)c(h)},n)}}function f(e,t,r){e?(0,h.N)(r,e,t):t()}},51875:(e,t,r)=>{r.d(t,{l:()=>n});function n(){}},54803:(e,t,r)=>{r.d(t,{L:()=>n});function n(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}},55989:(e,t,r)=>{r.d(t,{D:()=>n});function n(e){return e}},57174:(e,t,r)=>{r.d(t,{N:()=>s,S:()=>i});var n=r(48239);function i(e){return(0,n.T)(null==e?void 0:e.lift)}function s(e){return function(t){if(i(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}},57960:(e,t,r)=>{r.d(t,{m:()=>i});var n=r(48239);function i(e){return e&&(0,n.T)(e.schedule)}},59036:(e,t,r)=>{r.d(t,{v:()=>s});var n=r(72475),i=r(94056);function s(e){return new n.c(function(t){(0,i.Tg)(e()).subscribe(t)})}},61304:(e,t,r)=>{r.d(t,{$:()=>n});var n={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},62626:(e,t,r)=>{r.d(t,{s:()=>n});var n="function"==typeof Symbol&&Symbol.observable||"@@observable"},64838:(e,t,r)=>{r.d(t,{f:()=>i});var n=r(27743),i={setTimeout:function(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];var o=i.delegate;return(null==o?void 0:o.setTimeout)?o.setTimeout.apply(o,(0,n.fX)([e,t],(0,n.zs)(r))):setTimeout.apply(void 0,(0,n.fX)([e,t],(0,n.zs)(r)))},clearTimeout:function(e){var t=i.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0}},65853:(e,t,r)=>{r.d(t,{w:()=>n});var n=new(r(72475)).c(function(e){return e.complete()})},66570:(e,t,r)=>{r.d(t,{Z:()=>function e(t,r,u){return(void 0===u&&(u=1/0),(0,a.T)(r))?e(function(e,s){return(0,n.T)(function(t,n){return r(e,t,s,n)})((0,i.Tg)(t(e,s)))},u):("number"==typeof r&&(u=r),(0,s.N)(function(e,r){return(0,o.h)(e,r,t,u)}))}});var n=r(71810),i=r(94056),s=r(57174),o=r(50178),a=r(48239)},69491:(e,t,r)=>{r.d(t,{X:()=>n});var n=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},71810:(e,t,r)=>{r.d(t,{T:()=>s});var n=r(57174),i=r(29642);function s(e,t){return(0,n.N)(function(r,n){var s=0;r.subscribe((0,i._)(n,function(r){n.next(e.call(t,r,s++))}))})}},72475:(e,t,r)=>{r.d(t,{c:()=>l});var n=r(2214),i=r(9840),s=r(62626),o=r(13239),a=r(61304),u=r(48239),c=r(7322),l=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var s=this,o=!function(e){return e&&e instanceof n.vU||e&&(0,u.T)(e.next)&&(0,u.T)(e.error)&&(0,u.T)(e.complete)&&(0,i.Uv)(e)}(e)?new n.Ms(e,t,r):e;return(0,c.Y)(function(){var e=s.operator,t=s.source;o.add(e?e.call(o,t):t?s._subscribe(o):s._trySubscribe(o))}),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=h(t))(function(t,i){var s=new n.Ms({next:function(t){try{e(t)}catch(e){i(e),s.unsubscribe()}},error:i,complete:t});r.subscribe(s)})},e.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},e.prototype[s.s]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,o.m)(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=h(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function h(e){var t;return null!=(t=null!=e?e:a.$.Promise)?t:Promise}},74170:(e,t,r)=>{r.d(t,{G:()=>n});var n=(0,r(84661).L)(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})},77207:(e,t,r)=>{r.d(t,{Ak:()=>s,d_:()=>i});let n=e=>crypto.getRandomValues(new Uint8Array(e)),i=(e,t=21)=>((e,t,r)=>{let n=(2<<Math.log(e.length-1)/Math.LN2)-1,i=-~(1.6*n*t/e.length);return (s=t)=>{let o="";for(;;){let t=r(i),a=0|i;for(;a--;)if((o+=e[t[a]&n]||"").length===s)return o}}})(e,t,n),s=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((e,t)=>
13((t&=63)<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"")},79062:(e,t,r)=>{r.d(t,{j:()=>i});var n=r(57174);function i(e){return(0,n.N)(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}},84349:(e,t,r)=>{r.d(t,{R:()=>a});var n=r(27743),i=function(e){function t(t,r){return e.call(this)||this}return(0,n.C6)(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(9840).yU),s={setInterval:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var o=s.delegate;return(null==o?void 0:o.setInterval)?o.setInterval.apply(o,(0,n.fX)([e,t],(0,n.zs)(r))):setInterval.apply(void 0,(0,n.fX)([e,t],(0,n.zs)(r)))},clearInterval:function(e){var t=s.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},o=r(96362),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return(0,n.C6)(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r,n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!=(r=this.id)?r:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),s.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&s.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,(0,o.o)(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(i)},84661:(e,t,r)=>{r.d(t,{L:()=>n});function n(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}},85404:(e,t,r)=>{r.d(t,{E:()=>i,b:()=>s});var n=r(84349),i=new(r(43521)).q(n.R),s=i},87018:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(72475),i=r(48239);function s(e){return!!e&&(e instanceof n.c||(0,i.T)(e.lift)&&(0,i.T)(e.subscribe))}},87824:(e,t,r)=>{r.d(t,{y:()=>i});var n=r(48239);function i(e){return(0,n.T)(null==e?void 0:e.then)}},88550:(e,t,r)=>{r.d(t,{m:()=>s});var n=r(61304),i=r(64838);function s(e){i.f.setTimeout(function(){var t=n.$.onUnhandledError;if(t)t(e);else throw e})}},89075:(e,t,r)=>{r.d(t,{u:()=>u});var n=r(27743),i=r(94056),s=r(20884),o=r(2214),a=r(57174);function u(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new s.B}:t,n=e.resetOnError,u=void 0===n||n,l=e.resetOnComplete,h=void 0===l||l,d=e.resetOnRefCountZero,p=void 0===d||d;return function(e){var t,n,s,l=0,d=!1,f=!1,y=function(){null==n||n.unsubscribe(),n=void 0},g=function(){y(),t=s=void 0,d=f=!1},v=function(){var e=t;g(),null==e||e.unsubscribe()};return(0,a.N)(function(e,a){l++,f||d||y();var m=s=null!=s?s:r();a.add(function(){0!=--l||f||d||(n=c(v,p))}),m.subscribe(a),!t&&l>0&&(t=new o.Ms({next:function(e){return m.next(e)},error:function(e){f=!0,y(),n=c(g,u,e),m.error(e)},complete:function(){d=!0,y(),n=c(g,h),m.complete()}}),(0,i.Tg)(e).subscribe(t))})(e)}}function c(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(!0===t)return void e();if(!1!==t){var a=new o.Ms({next:function(){a.unsubscribe(),e()}});return(0,i.Tg)(t.apply(void 0,(0,n.fX)([],(0,n.zs)(r)))).subscribe(a)}}},89139:(e,t,r)=>{r.d(t,{s:()=>i});var n=r(74170);function i(e,t){var r="object"==typeof t;return new Promise(function(i,s){var o,a=!1;e.subscribe({next:function(e){o=e,a=!0},error:s,complete:function(){a?i(o):r?i(t.defaultValue):s(new n.G)}})})}},90643:(e,t,r)=>{r.d(t,{K:()=>i});var n=r(22539);function i(){return(0,n.U)(1)}},94056:(e,t,r)=>{r.d(t,{Tg:()=>y});var n=r(27743),i=r(69491),s=r(87824),o=r(72475),a=r(25233),u=r(15011),c=r(54803),l=r(99733),h=r(2228),d=r(48239),p=r(88550),f=r(62626);function y(e){if(e instanceof o.c)return e;if(null!=e){var t,r,y,v,m;if((0,a.l)(e)){return t=e,new o.c(function(e){var r=t[f.s]();if((0,d.T)(r.subscribe))return r.subscribe(e);throw TypeError("Provided object does not correctly implement Symbol.observable")})}if((0,i.X)(e)){return r=e,new o.c(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}if((0,s.y)(e)){return y=e,new o.c(function(e){y.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,p.m)})}if((0,u.T)(e))return g(e);if((0,l.x)(e)){return v=e,new o.c(function(e){var t,r;try{for(var i=(0,n.Ju)(v),s=i.next();!s.done;s=i.next()){var o=s.value;if(e.next(o),e.closed)return}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}e.complete()})}if((0,h.U)(e)){return m=e,g((0,h.C)(m))}}throw(0,c.L)(e)}function g(e){return new o.c(function(t){(function(e,t){var r,i,s,o;return(0,n.sH)(this,void 0,void 0,function(){var a;return(0,n.YH)(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),r=(0,n.xN)(e),u.label=1;case 1:return[4,r.next()];case 2:if((i=u.sent()).done)return[3,4];if(a=i.value,t.next(a),t.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s={error:u.sent()},[3,11];
13case 6:if(u.trys.push([6,,9,10]),!(i&&!i.done&&(o=r.return)))return[3,8];return[4,o.call(r)];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}},94097:(e,t,r)=>{r.d(t,{of:()=>s});var n=r(18726),i=r(22936);function s(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,n.lI)(e);return(0,i.H)(e,r)}},95282:(e,t,r)=>{r.d(t,{p:()=>s});var n=r(57174),i=r(29642);function s(e,t){return(0,n.N)(function(r,n){var s=0;r.subscribe((0,i._)(n,function(r){return e.call(t,r,s++)&&n.next(r)}))})}},96010:(e,t,r)=>{r.d(t,{c:()=>b});var n=r(94056),i=r(7861),s=r(57174);function o(e,t){return void 0===t&&(t=0),(0,s.N)(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}var a=r(72475),u=r(42609),c=r(48239),l=r(38155);function h(e,t){if(!e)throw Error("Iterable cannot be null");return new a.c(function(r){(0,l.N)(r,t,function(){var n=e[Symbol.asyncIterator]();(0,l.N)(r,t,function(){n.next().then(function(e){e.done?r.complete():r.next(e.value)})},0,!0)})})}var d=r(25233),p=r(87824),f=r(69491),y=r(99733),g=r(15011),v=r(54803),m=r(2228);function b(e,t){if(null!=e){if((0,d.l)(e))return(0,n.Tg)(e).pipe(o(t),(0,i.Q)(t));if((0,f.X)(e))return new a.c(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})});if((0,p.y)(e))return(0,n.Tg)(e).pipe(o(t),(0,i.Q)(t));if((0,g.T)(e))return h(e,t);if((0,y.x)(e))return new a.c(function(r){var n;return(0,l.N)(r,t,function(){n=e[u.l](),(0,l.N)(r,t,function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){r.error(e);return}i?r.complete():r.next(t)},0,!0)}),function(){return(0,c.T)(null==n?void 0:n.return)&&n.return()}});if((0,m.U)(e))return h((0,m.C)(e),t)}throw(0,v.L)(e)}},96362:(e,t,r)=>{r.d(t,{o:()=>n});function n(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}},97012:(e,t,r)=>{r.d(t,{h:()=>u});var n=r(22539),i=r(94056),s=r(65853),o=r(18726),a=r(22936);function u(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,o.lI)(e),u=(0,o.R0)(e,1/0);return e.length?1===e.length?(0,i.Tg)(e[0]):(0,n.U)(u)((0,a.H)(e,r)):s.w}},98348:(e,t,r)=>{r.d(t,{x:()=>o});var n=r(90643),i=r(18726),s=r(22936);function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,n.K)()((0,s.H)(e,(0,i.lI)(e)))}},99733:(e,t,r)=>{r.d(t,{x:()=>s});var n=r(42609),i=r(48239);function s(e){return(0,i.T)(null==e?void 0:e[n.l])}}}]);
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.