1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6529],{74048:function(e,t,n){"use strict";n.d(t,{do:function(){return W}});var r,o,i,a=[],l="ResizeObserver loop completed with undelivered notifications.",s=function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:l}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=l),window.dispatchEvent(e)};(r=o||(o={})).BORDER_BOX="border-box",r.CONTENT_BOX="content-box",r.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box";var u=function(e){return Object.freeze(e)},c=function(e,t){this.inlineSize=e,this.blockSize=t,u(this)},d=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,u(this)}return e.prototype.toJSON=function(){return{x:this.x,y:this.y,top:this.top,right:this.right,bottom:this.bottom,left:this.left,width:this.width,height:this.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),f=function(e){return e instanceof SVGElement&&"getBBox"in e},p=function(e){if(f(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e.offsetWidth,i=e.offsetHeight;return!(o||i||e.getClientRects().length)},h=function(e){if(e instanceof Element)return!0;var t,n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},g=function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},m="undefined"!=typeof window?window:{},y=new WeakMap,b=/auto|scroll/,v=/^tb|vertical/,w=/msie|trident/i.test(m.navigator&&m.navigator.userAgent),x=function(e){return parseFloat(e||"0")},k=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new c((n?t:e)||0,(n?e:t)||0)},S=u({devicePixelContentBoxSize:k(),borderBoxSize:k(),contentBoxSize:k(),contentRect:new d(0,0,0,0)}),E=function(e,t){if(void 0===t&&(t=!1),y.has(e)&&!t)return y.get(e);if(p(e))return y.set(e,S),S;var n=getComputedStyle(e),r=f(e)&&e.ownerSVGElement&&e.getBBox(),o=!w&&"border-box"===n.boxSizing,i=v.test(n.writingMode||""),a=!r&&b.test(n.overflowY||""),l=!r&&b.test(n.overflowX||""),s=r?0:x(n.paddingTop),c=r?0:x(n.paddingRight),h=r?0:x(n.paddingBottom),g=r?0:x(n.paddingLeft),m=r?0:x(n.borderTopWidth),E=r?0:x(n.borderRightWidth),_=r?0:x(n.borderBottomWidth),j=r?0:x(n.borderLeftWidth),C=g+c,I=s+h,R=j+E,$=m+_,O=l?e.offsetHeight-$-e.clientHeight:0,M=a?e.offsetWidth-R-e.clientWidth:0,A=r?r.width:x(n.width)-(o?C+R:0)-M,z=r?r.height:x(n.height)-(o?I+$:0)-O,N=A+C+M+R,T=z+I+O+$,P=u({devicePixelContentBoxSize:k(Math.round(A*devicePixelRatio),Math.round(z*devicePixelRatio),i),borderBoxSize:k(N,T,i),contentBoxSize:k(A,z,i),contentRect:new d(g,s,A,z)});return y.set(e,P),P},_=function(e,t,n){var r=E(e,n),i=r.borderBoxSize,a=r.contentBoxSize,l=r.devicePixelContentBoxSize;switch(t){case o.DEVICE_PIXEL_CONTENT_BOX:return l;case o.BORDER_BOX:return i;default:return a}},j=function(e){var t=E(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=u([t.borderBoxSize]),this.contentBoxSize=u([t.contentBoxSize]),this.devicePixelContentBoxSize=u([t.devicePixelContentBoxSize])},C=function(e){if(p(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},I=function(){var e=1/0,t=[];a.forEach(function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach(function(t){var n=new j(t.target),o=C(t.target);r.push(n),t.lastReportedSize=_(t.target,t.observedBox),o<e&&(e=o)}),t.push(function(){n.callback.call(n.observer,r,n.observer)}),n.activeTargets.splice(0,n.activeTargets.length)}});for(var n=0;n<t.length;n++)(0,t[n])();return e},R=function(e){a.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(C(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},$=function(){var e=0;for(R(0);a.some(function(e){return e.activeTargets.length>0});)R(e=I());return a.some(function(e){return e.skippedTargets.length>0})&&s(),e>0},O=[],M=function(e){if(!i){var t=0,n=document.createTextNode("");
1new MutationObserver(function(){return O.splice(0).forEach(function(e){return e()})}).observe(n,{characterData:!0}),i=function(){n.textContent="".concat(t?t--:t++)}}O.push(e),i()},A=function(e){M(function(){requestAnimationFrame(e)})},z=0,N={attributes:!0,characterData:!0,childList:!0,subtree:!0},T=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],P=function(e){return void 0===e&&(e=0),Date.now()+e},L=!1,D=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!L){L=!0;var n=P(e);A(function(){var r=!1;try{r=$()}finally{if(L=!1,e=n-P(),!z)return;r?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,N)};document.body?t():m.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),T.forEach(function(t){return m.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),T.forEach(function(t){return m.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},e}()),F=function(e){!z&&e>0&&D.start(),(z+=e)||D.stop()},B=function(){function e(e,t){this.target=e,this.observedBox=t||o.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=_(this.target,this.observedBox,!0);return f(e=this.target)||g(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),H=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},U=new WeakMap,V=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return -1},G=function(){function e(){}return e.connect=function(e,t){var n=new H(e,t);U.set(e,n)},e.observe=function(e,t,n){var r=U.get(e),o=0===r.observationTargets.length;0>V(r.observationTargets,t)&&(o&&a.push(r),r.observationTargets.push(new B(t,n&&n.box)),F(1),D.schedule())},e.unobserve=function(e,t){var n=U.get(e),r=V(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&a.splice(a.indexOf(n),1),n.observationTargets.splice(r,1),F(-1))},e.disconnect=function(e){var t=this,n=U.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),W=function(){function e(e){if(0==arguments.length)throw TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");G.connect(this,e)}return e.prototype.observe=function(e,t){if(0==arguments.length)throw TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!h(e))throw TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");G.observe(this,e,t)},e.prototype.unobserve=function(e){if(0==arguments.length)throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!h(e))throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");G.unobserve(this,e)},e.prototype.disconnect=function(){G.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}()},23129:function(e,t,n){"use strict";let r,o,i;var a,l,s=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,f=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,h=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of d(t))p.call(e,o)||o===n||u(e,o,{get:()=>t[o],enumerable:!(r=c(t,o))||r.enumerable});return e},g={};((e,t)=>
1{for(var n in t)u(e,n,{get:t[n],enumerable:!0})})(g,{$dispatcherGuard:()=>C,$makeReadOnly:()=>R,$reset:()=>I,$structuralCheck:()=>z,c:()=>k,clearRenderCounterRegistry:()=>O,renderCounterRegistry:()=>$,useRenderCounter:()=>M}),e.exports=h(u({},"__esModule",{value:!0}),g);var m=(i=null!=(r=n(2265))?s(f(r)):{},h(!o&&r&&r.__esModule?i:u(i,"default",{value:r,enumerable:!0}),r)),{useRef:y,useEffect:b,isValidElement:v}=m,w=null!=(a=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?a:m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.memo_cache_sentinel"),k="function"==typeof(null==(l=m.__COMPILER_RUNTIME)?void 0:l.c)?m.__COMPILER_RUNTIME.c:function(e){return m.useMemo(()=>{let t=Array(e);for(let n=0;n<e;n++)t[n]=x;return t[x]=!0,t},[])},S={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{S[e]=()=>{throw Error(`[React] Unexpected React hook call (${e}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var E=null;function _(e){return w.ReactCurrentDispatcher.current=e,w.ReactCurrentDispatcher.current}S.useMemoCache=e=>{if(null!=E)return E.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var j=[];function C(e){let t=w.ReactCurrentDispatcher.current;if(0===e){if(j.push(t),1===j.length&&(E=t),t===S)throw Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");_(S)}else if(1===e){let e=j.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===j.length&&(E=null),_(e)}else if(2===e)j.push(t),_(E);else if(3===e){let e=j.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");_(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function I(e){for(let t=0;t<e.length;t++)e[t]=x}function R(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var $=new Map;function O(){for(let e of $.values())e.forEach(e=>{e.count=0})}function M(e){let t=y(null);null!=t.current&&(t.current.count+=1),b(()=>{if(null==t.current){let n;let r={count:0};null==(n=$.get(e))&&(n=new Set,$.set(e,n)),n.add(r),t.current=r}return()=>{null!==t.current&&function(e,t){let n=$.get(e);null!=n&&n.delete(t)}(e,t.current)}})}var A=new Set;function z(e,t,n,r,o,i){function a(e,t,a,l){let s=`${r}:${i} [${o}] ${n}${a} changed from ${e} to ${t} at depth ${l}`;A.has(s)||(A.add(s),console.error(s))}!function e(t,n,r,o){if(!(o>2)&&t!==n){if(typeof t!=typeof n)a(`type ${typeof t}`,`type ${typeof n}`,r,o);else if("object"==typeof t){let i=Array.isArray(t),l=Array.isArray(n);if(null===t&&null!==n)a("null",`type ${typeof n}`,r,o);else if(null===n)a(`type ${typeof t}`,"null",r,o);else if(t instanceof Map){if(n instanceof Map){if(t.size!==n.size)a(`Map instance with size ${t.size}`,`Map instance with size ${n.size}`,r,o);else for(let[i,l]of t)n.has(i)?e(l,n.get(i),`${r}.get(${i})`,o+1):a(`Map instance with key ${i}`,`Map instance without key ${i}`,r,o)}else a("Map instance","other value",r,o)}else if(n instanceof Map)a("other value","Map instance",r,o);else if(t instanceof Set){if(n instanceof Set){if(t.size!==n.size)a(`Set instance with size ${t.size}`,`Set instance with size ${n.size}`,r,o);else for(let e of n)t.has(e)||a(`Set instance without element ${e}`,`Set instance with element ${e}`,r,o)}else a("Set instance","other value",r,o)}else if(n instanceof Set)a("other value","Set instance",r,o);else if(i||l){if(i!==l)a(`type ${i?"array":"object"}`,`type ${l?"array":"object"}`,r,o);else if(t.length!==n.length)a(`array with length ${t.length}`,`array with length ${n.length}`,r,o);else for(let i=0;i<t.length;i++)e(t[i],n[i],`${r}[${i}]`,o+1)}else if(v(t)||v(n))v(t)!==v(n)?a(`type ${v(t)?"React element":"object"}`,`type ${v(n)?"React element":"object"}`,r,o):t.type!==n.type?a(`React element of type ${t.type}`,`React element of type ${n.type}`,r,o):e(t.props,n.props,`[props of ${r}]`,o+1);else{for(let e in n)e in t||a(`object without key ${e}`,`object with key ${e}`,r,o);for(let i in t)i in n?e(t[i],n[i],`${r}.${i}`,o+1):a(`object with key ${i}`,`object without key ${i}`,r,o)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(n)?isNaN(t)!==isNaN(n)&&a(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(n)?"NaN":"non-NaN value"}`,r,o):t!==n&&a(t,n,r,o)}}}(e,t,"",0)}},98259:function(e,t,n){"use strict";let r,o,i;var a,l,s=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,f=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,h=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of d(t))p.call(e,o)||o===n||u(e,o,{get:()=>t[o],enumerable:!(r=c(t,o))||r.enumerable});return e},g={};((e,t)=>
1{for(var n in t)u(e,n,{get:t[n],enumerable:!0})})(g,{$dispatcherGuard:()=>C,$makeReadOnly:()=>R,$reset:()=>I,$structuralCheck:()=>z,c:()=>k,clearRenderCounterRegistry:()=>O,renderCounterRegistry:()=>$,useRenderCounter:()=>M}),e.exports=h(u({},"__esModule",{value:!0}),g);var m=(i=null!=(r=n(2265))?s(f(r)):{},h(!o&&r&&r.__esModule?i:u(i,"default",{value:r,enumerable:!0}),r)),{useRef:y,useEffect:b,isValidElement:v}=m,w=null!=(a=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?a:m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.memo_cache_sentinel"),k="function"==typeof(null==(l=m.__COMPILER_RUNTIME)?void 0:l.c)?m.__COMPILER_RUNTIME.c:function(e){return m.useMemo(()=>{let t=Array(e);for(let n=0;n<e;n++)t[n]=x;return t[x]=!0,t},[])},S={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{S[e]=()=>{throw Error(`[React] Unexpected React hook call (${e}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var E=null;function _(e){return w.ReactCurrentDispatcher.current=e,w.ReactCurrentDispatcher.current}S.useMemoCache=e=>{if(null!=E)return E.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var j=[];function C(e){let t=w.ReactCurrentDispatcher.current;if(0===e){if(j.push(t),1===j.length&&(E=t),t===S)throw Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");_(S)}else if(1===e){let e=j.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===j.length&&(E=null),_(e)}else if(2===e)j.push(t),_(E);else if(3===e){let e=j.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");_(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function I(e){for(let t=0;t<e.length;t++)e[t]=x}function R(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var $=new Map;function O(){for(let e of $.values())e.forEach(e=>{e.count=0})}function M(e){let t=y(null);null!=t.current&&(t.current.count+=1),b(()=>{if(null==t.current){let n;let r={count:0};null==(n=$.get(e))&&(n=new Set,$.set(e,n)),n.add(r),t.current=r}return()=>{null!==t.current&&function(e,t){let n=$.get(e);null!=n&&n.delete(t)}(e,t.current)}})}var A=new Set;function z(e,t,n,r,o,i){function a(e,t,a,l){let s=`${r}:${i} [${o}] ${n}${a} changed from ${e} to ${t} at depth ${l}`;A.has(s)||(A.add(s),console.error(s))}!function e(t,n,r,o){if(!(o>2)&&t!==n){if(typeof t!=typeof n)a(`type ${typeof t}`,`type ${typeof n}`,r,o);else if("object"==typeof t){let i=Array.isArray(t),l=Array.isArray(n);if(null===t&&null!==n)a("null",`type ${typeof n}`,r,o);else if(null===n)a(`type ${typeof t}`,"null",r,o);else if(t instanceof Map){if(n instanceof Map){if(t.size!==n.size)a(`Map instance with size ${t.size}`,`Map instance with size ${n.size}`,r,o);else for(let[i,l]of t)n.has(i)?e(l,n.get(i),`${r}.get(${i})`,o+1):a(`Map instance with key ${i}`,`Map instance without key ${i}`,r,o)}else a("Map instance","other value",r,o)}else if(n instanceof Map)a("other value","Map instance",r,o);else if(t instanceof Set){if(n instanceof Set){if(t.size!==n.size)a(`Set instance with size ${t.size}`,`Set instance with size ${n.size}`,r,o);else for(let e of n)t.has(e)||a(`Set instance without element ${e}`,`Set instance with element ${e}`,r,o)}else a("Set instance","other value",r,o)}else if(n instanceof Set)a("other value","Set instance",r,o);else if(i||l){if(i!==l)a(`type ${i?"array":"object"}`,`type ${l?"array":"object"}`,r,o);else if(t.length!==n.length)a(`array with length ${t.length}`,`array with length ${n.length}`,r,o);else for(let i=0;i<t.length;i++)e(t[i],n[i],`${r}[${i}]`,o+1)}else if(v(t)||v(n))v(t)!==v(n)?a(`type ${v(t)?"React element":"object"}`,`type ${v(n)?"React element":"object"}`,r,o):t.type!==n.type?a(`React element of type ${t.type}`,`React element of type ${n.type}`,r,o):e(t.props,n.props,`[props of ${r}]`,o+1);else{for(let e in n)e in t||a(`object without key ${e}`,`object with key ${e}`,r,o);for(let i in t)i in n?e(t[i],n[i],`${r}.${i}`,o+1):a(`object with key ${i}`,`object without key ${i}`,r,o)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(n)?isNaN(t)!==isNaN(n)&&a(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(n)?"NaN":"non-NaN value"}`,r,o):t!==n&&a(t,n,r,o)}}}(e,t,"",0)}},23910:function(e,t,n){var r=n(74288).Symbol;e.exports=r},73819:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},76378:function(e){e.exports=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}},53417:function(e){e.exports=function(e){return e.split("")}},59652:function(e){var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},54506:function(e,t,n){var r=n(23910),o=n(4479),i=n(80910),a=r?r.toStringTag:void 0;
1e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},98880:function(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},99558:function(e){e.exports=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}},65020:function(e,t,n){var r=n(23910),o=n(73819),i=n(25614),a=n(78371),l=1/0,s=r?r.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-l?"-0":n}},91684:function(e,t,n){var r=n(99558);e.exports=function(e,t,n){var o=e.length;return n=void 0===n?o:n,!t&&n>=o?e:r(e,t,n)}},80675:function(e,t,n){var r=n(91684),o=n(14503),i=n(88551),a=n(23415);e.exports=function(e){return function(t){var n=o(t=a(t))?i(t):void 0,l=n?n[0]:t.charAt(0),s=n?r(n,1).join(""):t.slice(1);return l[e]()+s}}},82638:function(e,t,n){var r=n(76378),o=n(42143),i=n(67512),a=RegExp("['â]","g");e.exports=function(e){return function(t){return r(i(o(t).replace(a,"")),e,"")}}},62167:function(e,t,n){var r=n(98880)({Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã
:"A",à :"a",á:"a",â:"a",ã:"a",ä:"a",Ã¥:"a",Ã:"C",ç:"c",Ã:"D",ð:"d",Ã:"E",Ã:"E",Ã:"E",Ã:"E",è:"e",é:"e",ê:"e",ë:"e",Ã:"I",Ã:"I",Ã:"I",Ã:"I",ì:"i",Ã:"i",î:"i",ï:"i",Ã:"N",ñ:"n",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ã:"U",Ã:"U",Ã:"U",Ã:"U",ù:"u",ú:"u",û:"u",ü:"u",Ã:"Y",ý:"y",ÿ:"y",Ã:"Ae",æ:"ae",Ã:"Th",þ:"th",Ã:"ss",Ä:"A",Ä:"A",Ä:"A",Ä:"a",Ä:"a",Ä
:"a",Ä:"C",Ä:"C",Ä:"C",Ä:"C",Ä:"c",Ä:"c",Ä:"c",Ä:"c",Ä:"D",Ä:"D",Ä:"d",Ä:"d",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"G",Ä:"G",Ä :"G",Ä¢:"G",Ä:"g",Ä:"g",Ä¡:"g",Ä£:"g",Ĥ:"H",Ħ:"H",Ä¥:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Ä®:"I",İ:"I",Ä©:"i",Ä«:"i",Ä:"i",į:"i",ı:"i",Ä´:"J",ĵ:"j",Ķ:"K",Ä·:"k",ĸ:"k",Ĺ:"L",Ä»:"L",Ľ:"L",Ä¿:"L",Å:"L",ĺ:"l",ļ:"l",ľ:"l",Å:"l",Å:"l",Å:"N",Å
:"N",Å:"N",Å:"N",Å:"n",Å:"n",Å:"n",Å:"n",Å:"O",Å:"O",Å:"O",Å:"o",Å:"o",Å:"o",Å:"R",Å:"R",Å:"R",Å:"r",Å:"r",Å:"r",Å:"S",Å:"S",Å:"S",Å :"S",Å:"s",Å:"s",Å:"s",Å¡:"s",Å¢:"T",Ť:"T",Ŧ:"T",Å£:"t",Å¥:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Å®:"U",Ű:"U",Ų:"U",Å©:"u",Å«:"u",Å:"u",ů:"u",ű:"u",ų:"u",Å´:"W",ŵ:"w",Ŷ:"Y",Å·:"y",Ÿ:"Y",Ź:"Z",Å»:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Å:"Oe",Å:"oe",Å:"'n",Å¿:"s"});e.exports=r},17071:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},4479:function(e,t,n){var r=n(23910),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[l]=n:delete e[l]),o}},14503:function(e){var t=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},27926:function(e){var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},80910:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},74288:function(e,t,n){var r=n(17071),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},88551:function(e,t,n){var r=n(53417),o=n(14503),i=n(26364);e.exports=function(e){return o(e)?i(e):r(e)}},26364:function(e){var t="\ud800-\udfff",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\ud83c[\udffb-\udfff]",o="[^"+t+"]",i="(?:\ud83c[\udde6-\uddff]){2}",a="[\ud800-\udbff][\udc00-\udfff]",l="(?:"+n+"|"+r+")?",s="[\\ufe0e\\ufe0f]?",u="(?:\\u200d(?:"+[o,i,a].join("|")+")"+s+l+")*",c=RegExp(r+"(?="+r+")|(?:"+[o+n+"?",n,i,a,"["+t+"]"].join("|")+")"+(s+l+u),"g");e.exports=function(e){return e.match(c)||[]}},79269:function(e){var t="\ud800-\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",o="A-Z\\xc0-\\xd6\\xd8-\\xde",i="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="['â]",l="["+i+"]",s="["+r+"]",u="[^"+t+i+"\\d+"+n+r+o+"]",c="(?:\ud83c[\udde6-\uddff]){2}",d="[\ud800-\udbff][\udc00-\udfff]",f="["+o+"]",p="(?:"+s+"|"+u+")",h="(?:"+a+"(?:d|ll|m|re|s|t|ve))?",g="(?:"+a+"(?:D|LL|M|RE|S|T|VE))?",m="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\ud83c[\udffb-\udfff])?",y="[\\ufe0e\\ufe0f]?",b="(?:\\u200d(?:"+["[^"+t+"]",c,d].join("|")+")"+y+m+")*",v="(?:"+["["+n+"]",c,d].join("|")+")"+(y+m+b),w=RegExp([f+"?"+s+"+"+h+"(?="+[l,f,"$"].join("|")+")","(?:"+f+"|"+u+")+"+g+"(?="+[l,f+p,"$"].join("|")+")",f+"?"+p+"+"+h,f+"+"+g,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",v].join("|"),"g");e.exports=function(e){return e.match(w)||[]}},42143:function(e,t,n){var r=n(62167),o=n(23415),i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
17f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=o(e))&&e.replace(i,r).replace(a,"")}},25614:function(e){var t=Array.isArray;e.exports=t},10303:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},78371:function(e,t,n){var r=n(54506),o=n(10303);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},57685:function(e,t,n){var r=n(82638),o=n(75551),i=r(function(e,t,n){return e+(n?" ":"")+o(t)});e.exports=i},23415:function(e,t,n){var r=n(65020);e.exports=function(e){return null==e?"":r(e)}},75551:function(e,t,n){var r=n(80675)("toUpperCase");e.exports=r},67512:function(e,t,n){var r=n(59652),o=n(27926),i=n(23415),a=n(79269);e.exports=function(e,t,n){return(e=i(e),void 0===(t=n?void 0:t))?o(e)?a(e):r(e):e.match(t)||[]}},83238:function(e,t,n){"use strict";let r,o,i;var a,l,s=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,f=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,h=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of d(t))p.call(e,o)||o===n||u(e,o,{get:()=>t[o],enumerable:!(r=c(t,o))||r.enumerable});return e},g={};((e,t)=>{for(var n in t)u(e,n,{get:t[n],enumerable:!0})}
1)(g,{$dispatcherGuard:()=>C,$makeReadOnly:()=>R,$reset:()=>I,$structuralCheck:()=>z,c:()=>k,clearRenderCounterRegistry:()=>O,renderCounterRegistry:()=>$,useRenderCounter:()=>M}),e.exports=h(u({},"__esModule",{value:!0}),g);var m=(i=null!=(r=n(2265))?s(f(r)):{},h(!o&&r&&r.__esModule?i:u(i,"default",{value:r,enumerable:!0}),r)),{useRef:y,useEffect:b,isValidElement:v}=m,w=null!=(a=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?a:m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.memo_cache_sentinel"),k="function"==typeof(null==(l=m.__COMPILER_RUNTIME)?void 0:l.c)?m.__COMPILER_RUNTIME.c:function(e){return m.useMemo(()=>{let t=Array(e);for(let n=0;n<e;n++)t[n]=x;return t[x]=!0,t},[])},S={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{S[e]=()=>{throw Error(`[React] Unexpected React hook call (${e}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var E=null;function _(e){return w.ReactCurrentDispatcher.current=e,w.ReactCurrentDispatcher.current}S.useMemoCache=e=>{if(null!=E)return E.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var j=[];function C(e){let t=w.ReactCurrentDispatcher.current;if(0===e){if(j.push(t),1===j.length&&(E=t),t===S)throw Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");_(S)}else if(1===e){let e=j.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===j.length&&(E=null),_(e)}else if(2===e)j.push(t),_(E);else if(3===e){let e=j.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");_(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function I(e){for(let t=0;t<e.length;t++)e[t]=x}function R(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var $=new Map;function O(){for(let e of $.values())e.forEach(e=>{e.count=0})}function M(e){let t=y(null);null!=t.current&&(t.current.count+=1),b(()=>{if(null==t.current){let n;let r={count:0};null==(n=$.get(e))&&(n=new Set,$.set(e,n)),n.add(r),t.current=r}return()=>{null!==t.current&&function(e,t){let n=$.get(e);null!=n&&n.delete(t)}(e,t.current)}})}var A=new Set;function z(e,t,n,r,o,i){function a(e,t,a,l){let s=`${r}:${i} [${o}] ${n}${a} changed from ${e} to ${t} at depth ${l}`;A.has(s)||(A.add(s),console.error(s))}!function e(t,n,r,o){if(!(o>2)&&t!==n){if(typeof t!=typeof n)a(`type ${typeof t}`,`type ${typeof n}`,r,o);else if("object"==typeof t){let i=Array.isArray(t),l=Array.isArray(n);if(null===t&&null!==n)a("null",`type ${typeof n}`,r,o);else if(null===n)a(`type ${typeof t}`,"null",r,o);else if(t instanceof Map){if(n instanceof Map){if(t.size!==n.size)a(`Map instance with size ${t.size}`,`Map instance with size ${n.size}`,r,o);else for(let[i,l]of t)n.has(i)?e(l,n.get(i),`${r}.get(${i})`,o+1):a(`Map instance with key ${i}`,`Map instance without key ${i}`,r,o)}else a("Map instance","other value",r,o)}else if(n instanceof Map)a("other value","Map instance",r,o);else if(t instanceof Set){if(n instanceof Set){if(t.size!==n.size)a(`Set instance with size ${t.size}`,`Set instance with size ${n.size}`,r,o);else for(let e of n)t.has(e)||a(`Set instance without element ${e}`,`Set instance with element ${e}`,r,o)}else a("Set instance","other value",r,o)}else if(n instanceof Set)a("other value","Set instance",r,o);else if(i||l){if(i!==l)a(`type ${i?"array":"object"}`,`type ${l?"array":"object"}`,r,o);else if(t.length!==n.length)a(`array with length ${t.length}`,`array with length ${n.length}`,r,o);else for(let i=0;i<t.length;i++)e(t[i],n[i],`${r}[${i}]`,o+1)}else if(v(t)||v(n))v(t)!==v(n)?a(`type ${v(t)?"React element":"object"}`,`type ${v(n)?"React element":"object"}`,r,o):t.type!==n.type?a(`React element of type ${t.type}`,`React element of type ${n.type}`,r,o):e(t.props,n.props,`[props of ${r}]`,o+1);else{for(let e in n)e in t||a(`object without key ${e}`,`object with key ${e}`,r,o);for(let i in t)i in n?e(t[i],n[i],`${r}.${i}`,o+1):a(`object with key ${i}`,`object without key ${i}`,r,o)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(n)?isNaN(t)!==isNaN(n)&&a(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(n)?"NaN":"non-NaN value"}`,r,o):t!==n&&a(t,n,r,o)}}}(e,t,"",0)}},59679:function(e,t){"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler");Symbol.for("react.provider");var l=Symbol.for("react.consumer"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");function m(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case a:case i:case c:case d:case h:return e;default:switch(e=e&&e.$$typeof){case s:case u:case p:case f:case l:return e;default:return t}}case r:return t}}}t.ContextConsumer=l,t.ContextProvider=s,t.Element=n,t.ForwardRef=u,t.Fragment=o,t.Lazy=p,t.Memo=f,t.Portal=r,t.Profiler=a,t.StrictMode=i,t.Suspense=c,t.SuspenseList=d,t.isContextConsumer=function(e){return m(e)===l},t.isContextProvider=function(e){return m(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return m(e)===u},t.isFragment=function(e){return m(e)===o},t.isLazy=function(e){return m(e)===p},t.isMemo=function(e){return m(e)===f},t.isPortal=function(e){return m(e)===r},t.isProfiler=function(e){return m(e)===a},t.isStrictMode=function(e){return m(e)===i},t.isSuspense=function(e){return m(e)===c},t.isSuspenseList=function(e){return m(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===a||e===i||e===c||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===s||e.$$typeof===l||e.$$typeof===u||e.$$typeof===g||void 0!==e.getModuleId)},t.typeOf=m},82558:function(e,t,n){"use strict";e.exports=n(59679)},79332:function(e){e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;
1if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(t),s=0;s<i.length;s++){var u=i[s];if(!l(u))return!1;var c=e[u],d=t[u];if(!1===(o=n?n.call(r,c,d,u):void 0)||void 0===o&&c!==d)return!1}return!0}},92840:function(e,t,n){"use strict";n.d(t,{f6:function(){return ta},iv:function(){return td},F4:function(){return th},zo:function(){return tp},Fg:function(){return ti}});var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function o(e,t,n){if(n||2==arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var i=n(2265),a=n(79332),l=n.n(a),s="-ms-",u="-moz-",c="-webkit-",d="comm",f="rule",p="decl",h="@ke
1yframes",g=Math.abs,m=String.fromCharCode,y=Object.assign;function b(e,t){return(e=t.exec(e))?e[0]:e}function v(e,t,n){return e.replace(t,n)}function w(e,t,n){return e.indexOf(t,n)}function x(e,t){return 0|e.charCodeAt(t)}function k(e,t,n){return e.slice(t,n)}function S(e){return e.length}function E(e,t){return t.push(e),e}function _(e,t){return e.filter(function(e){return!b(e,t)})}var j=1,C=1,I=0,R=0,$=0,O="";function M(e,t,n,r,o,i,a,l){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:j,column:C,length:a,return:"",siblings:l}}function A(e,t){return y(M("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function z(e){for(;e.root;)e=A(e.root,{children:[e]});E(e,e.siblings)}function N(){return $=R<I?x(O,R++):0,C++,10===$&&(C=1,j++),$}function T(){return x(O,R)}function P(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function L(e){var t,n;return(t=R-1,n=function e(t){for(;N();)switch($){case t:return R;case 34:case 39:34!==t&&39!==t&&e($);break;case 40:41===t&&e(t);break;case 92:N()}return R}(91===e?e+2:40===e?e+1:e),k(O,t,n)).trim()}function D(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function F(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case p:return e.return=e.return||e.value;case d:return"";case h:return e.return=e.value+"{"+D(e.children,r)+"}";case f:if(!S(e.value=e.props.join(",")))return""}return S(n=D(e.children,r))?e.return=e.value+"{"+n+"}":""}function B(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case p:e.return=function e(t,n,r){var o;switch(o=n,45^x(t,0)?(((o<<2^x(t,0))<<2^x(t,1))<<2^x(t,2))<<2^x(t,3):0){case 5103:return c+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return c+t+t;case 4789:return u+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return c+t+u+t+s+t+t;case 5936:switch(x(t,n+11)){case 114:return c+t+s+v(t,/[svh]\w+-[tblr]{2}/,"tb")+t;
vendor: 11,669 bytes, line 1
1case 108:return c+t+s+v(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return c+t+s+v(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return c+t+s+t+t;case 6165:return c+t+s+"flex-"+t+t;case 5187:return c+t+v(t,/(\w+).+(:[^]+)/,c+"box-$1$2"+s+"flex-$1$2")+t;case 5443:return c+t+s+"flex-item-"+v(t,/flex-|-self/g,"")+(b(t,/flex-|baseline/)?"":s+"grid-row-"+v(t,/flex-|-self/g,""))+t;case 4675:return c+t+s+"flex-line-pack"+v(t,/align-content|flex-|-self/g,"")+t;case 5548:return c+t+s+v(t,"shrink","negative")+t;case 5292:return c+t+s+v(t,"basis","preferred-size")+t;case 6060:return c+"box-"+v(t,"-grow","")+c+t+s+v(t,"grow","positive")+t;case 4554:return c+v(t,/([^-])(transform)/g,"$1"+c+"$2")+t;case 6187:return v(v(v(t,/(zoom-|grab)/,c+"$1"),/(image-set)/,c+"$1"),t,"")+t;case 5495:case 3959:return v(t,/(image-set\([^]*)/,c+"$1$`$1");case 4968:return v(v(t,/(.+:)(flex-)?(.*)/,c+"box-pack:$3"+s+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+c+t+t;case 4200:if(!b(t,/flex-|baseline/))return s+"grid-column-align"+k(t,n)+t;break;case 2592:case 3360:return s+v(t,"template-","")+t;case 4384:case 3616:if(r&&r.some(function(e,t){return n=t,b(e.props,/grid-\w+-end/)}))return~w(t+(r=r[n].value),"span",0)?t:s+v(t,"-start","")+t+s+"grid-row-span:"+(~w(r,"span",0)?b(r,/\d+/):+b(r,/\d+/)-+b(t,/\d+/))+";";return s+v(t,"-start","")+t;case 4896:case 4128:return r&&r.some(function(e){return b(e.props,/grid-\w+-start/)})?t:s+v(v(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return v(t,/(.+)-inline(.+)/,c+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(S(t)-1-n>6)switch(x(t,n+1)){case 109:if(45!==x(t,n+4))break;case 102:return v(t,/(.+:)(.+)-([^]+)/,"$1"+c+"$2-$3$1"+u+(108==x(t,n+3)?"$3":"$2-$3"))+t;case 115:return~w(t,"stretch",0)?e(v(t,"stretch","fill-available"),n,r)+t:t}break;case 5152:case 5920:return v(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(e,n,r,o,i,a,l){return s+n+":"+r+l+(o?s+n+"-span:"+(i?a:+a-+r)+l:"")+t});case 4949:if(121===x(t,n+6))return v(t,":",":"+c)+t;break;case 6444:switch(x(t,45===x(t,14)?18:11)){case 120:return v(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+c+(45===x(t,14)?"inline-":"")+"box$3$1"+c+"$2$3$1"+s+"$2box$3")+t;case 100:return v(t,":",":"+s)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return v(t,"scroll-","scroll-snap-")+t}return t}(e.value,e.length,n);return;case h:return D([A(e,{value:v(e.value,"@","@"+c)})],r);case f:if(e.length){var o,i;return o=n=e.props,i=function(t){switch(b(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":z(A(e,{props:[v(t,/:(read-\w+)/,":"+u+"$1")]})),z(A(e,{props:[t]})),y(e,{props:_(n,r)});break;case"::placeholder":z(A(e,{props:[v(t,/:(plac\w+)/,":"+c+"input-$1")]})),z(A(e,{props:[v(t,/:(plac\w+)/,":"+u+"$1")]})),z(A(e,{props:[v(t,/:(plac\w+)/,s+"input-$1")]})),z(A(e,{props:[t]})),y(e,{props:_(n,r)})}return""},o.map(i).join("")}}}function H(e,t,n,r,o,i,a,l,s,u,c,d){for(var p=o-1,h=0===o?i:[""],m=h.length,y=0,b=0,w=0;y<r;++y)for(var x=0,S=k(e,p+1,p=g(b=a[y])),E=e;x<m;++x)(E=(b>0?h[x]+" "+S:v(S,/&\f/g,h[x])).trim())&&(s[w++]=E);return M(e,t,n,0===o?f:l,s,u,c,d)}function U(e,t,n,r,o){return M(e,t,n,p,k(e,0,r),k(e,r+1,-1),r,o)}var V={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},G=n(25566),W=void 0!==G&&void 0!==G.env&&(G.env.REACT_APP_SC_ATTR||G.env.SC_ATTR)||"data-styled",q="active",Y="data-styled-version",Z="6.1.19",K="/*!sc*/\n",X="undefined"!=typeof window&&"undefined"!=typeof document,Q=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==G&&void 0!==G.env&&void 0!==G.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==G.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==G.env.REACT_APP_SC_DISABLE_SPEEDY&&G.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==G&&void 0!==G.env&&void 0!==G.env.SC_DISABLE_SPEEDY&&""!==G.env.SC_DISABLE_SPEEDY&&"false"!==G.env.SC_DISABLE_SPEEDY&&G.env.SC_DISABLE_SPEEDY),J=Object.freeze([]),ee=Object.freeze({}),et=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),en=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,er=/(^-|-$)/g;function eo(e){return e.replace(en,"-").replace(er,"")}var ei=/(a)(d)/gi,ea=function(e){return String.fromCharCode(e+(e>25?39:97))};function el(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=ea(t%52)+n;return(ea(t%52)+n).replace(ei,"$1-$2")}var es,eu=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},ec=function(e){return eu(5381,e)};function ed(e){return"string"==typeof e}var ef="function"==typeof Symbol&&Symbol.for,ep=ef?Symbol.for("react.memo"):60115,eh=ef?Symbol.for("react.forward_ref"):60112,eg={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},em={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ey={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},eb=((es={})[eh]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},es[ep]=ey,es);function ev(e){return("type"in e&&e.type.$$typeof)===ep?ey:"$$typeof"in e?eb[e.$$typeof]:eg}var ew=Object.defineProperty,ex=Object.getOwnPropertyNames,ek=Object.getOwnPropertySymbols,eS=Object.getOwnPropertyDescriptor,eE=Object.getPrototypeOf,e_=Object.prototype;function ej(e){return"function"==typeof e}function eC(e){return"object"==typeof e&&"styledComponentId"in e}function eI(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function eR(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function e$(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function eO(e,t){Object.defineProperty(e,"toString",{value:t})}function eM(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var eA=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw eM(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),l=(i=0,t.length);i<l;i++)this.tag.insertRule(a,t[i])&&(this.groupSizes[e]++,a++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i<o;i++)t+="".concat(this.tag.getRule(i)).concat(K);return t},e}(),ez=new Map,eN=new Map,eT=1,eP=function(e){if(ez.has(e))return ez.get(e);for(;eN.has(eT);)eT++;var t=eT++;return ez.set(e,t),eN.set(t,e),t},eL=function(e,t){eT=t+1,ez.set(e,t),eN.set(t,e)},eD="style[".concat(W,"][").concat(Y,'="').concat(Z,'"]'),eF=new RegExp("^".concat(W,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),eB=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i<a;i++)(r=o[i])&&e.registerName(t,r)},eH=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(K),o=[],i=0,a=r.length;i<a;i++){var l=r[i].trim();if(l){var s=l.match(eF);if(s){var u=0|parseInt(s[1],10),c=s[2];0!==u&&(eL(c,u),eB(e,c,s[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(l)}}},eU=function(e){for(var t=document.querySelectorAll(eD),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(W)!==q&&(eH(e,o),o.parentNode&&o.parentNode.removeChild(o))}},eV=function(e){var t,r=document.head,o=e||r,i=document.createElement("style"),a=(t=Array.from(o.querySelectorAll("style[".concat(W,"]"))))[t.length-1],l=void 0!==a?a.nextSibling:null;i.setAttribute(W,q),i.setAttribute(Y,Z);var s=n.nc;return s&&i.setAttribute("nonce",s),o.insertBefore(i,l),i},eG=function(){function e(e){this.element=eV(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw eM(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),eW=function(){function e(e){this.element=eV(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),eq=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),eY=X,eZ={isServer:!X,useCSSOMInjection:!Q},eK=function(){function e(e,t,n){void 0===e&&(e=ee),void 0===t&&(t={});var o=this;this.options=r(r({},eZ),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&X&&eY&&(eY=!1,eU(this)),eO(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++)(function(n){var o=eN.get(n);if(void 0!==o){var i=e.names.get(o),a=t.getGroup(n);if(void 0!==i&&i.size&&0!==a.length){var l="".concat(W,".g").concat(n,'[id="').concat(o,'"]'),s="";
1void 0!==i&&i.forEach(function(e){e.length>0&&(s+="".concat(e,","))}),r+="".concat(a).concat(l,'{content:"').concat(s,'"}').concat(K)}}})(o);return r}(o)})}return e.registerId=function(e){return eP(e)},e.prototype.rehydrate=function(){!this.server&&X&&eU(this)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(r(r({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){var e,t,n;return this.tag||(this.tag=(t=(e=this.options).useCSSOMInjection,n=e.target,new eA(e.isServer?new eq(n):t?new eG(n):new eW(n))))},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(eP(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(eP(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(eP(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),eX=/&/g,eQ=/^\s*\/\/.*$/gm;function eJ(e){var t,n,r,o=void 0===e?ee:e,i=o.options,a=void 0===i?ee:i,l=o.plugins,s=void 0===l?J:l,u=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},c=s.slice();c.push(function(e){e.type===f&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(eX,n).replace(r,u))}),a.prefix&&c.push(B),c.push(F);var p=function(e,o,i,l){void 0===o&&(o=""),void 0===i&&(i=""),void 0===l&&(l="&"),t=l,n=o,r=RegExp("\\".concat(n,"\\b"),"g");var s,u,f,p,h,y,b=e.replace(eQ,""),_=(h=function e(t,n,r,o,i,a,l,s,u){for(var c,f=0,p=0,h=l,y=0,b=0,_=0,I=1,A=1,z=1,D=0,F="",B=i,V=a,G=o,W=F;A;)switch(_=D,D=N()){case 40:if(108!=_&&58==x(W,h-1)){-1!=w(W+=v(L(D),"&","&\f"),"&\f",g(f?s[f-1]:0))&&(z=-1);break}case 34:case 39:case 91:W+=L(D);break;case 9:case 10:case 13:case 32:W+=function(e){for(;$=T();)if($<33)N();else break;return P(e)>2||P($)>3?"":" "}(_);break;case 92:W+=function(e,t){for(var n;--t&&N()&&!($<48)&&!($>102)&&(!($>57)||!($<65))&&(!($>70)||!($<97)););return n=R+(t<6&&32==T()&&32==N()),k(O,e,n)}(R-1,7);continue;case 47:switch(T()){case 42:case 47:E(M(c=function(e,t){for(;N();)if(e+$===57)break;else if(e+$===84&&47===T())break;return"/*"+k(O,t,R-1)+"*"+m(47===e?e:N())}(N(),R),n,r,d,m($),k(c,2,-2),0,u),u);break;default:W+="/"}break;case 123*I:s[f++]=S(W)*z;case 125*I:case 59:case 0:switch(D){case 0:case 125:A=0;case 59+p:-1==z&&(W=v(W,/\f/g,"")),b>0&&S(W)-h&&E(b>32?U(W+";",o,r,h-1,u):U(v(W," ","")+";",o,r,h-2,u),u);break;case 59:W+=";";default:if(E(G=H(W,n,r,f,p,i,s,F,B=[],V=[],h,a),a),123===D){if(0===p)e(W,n,G,G,B,a,h,s,V);else switch(99===y&&110===x(W,3)?100:y){case 100:case 108:case 109:case 115:e(t,G,G,o&&E(H(t,G,G,0,0,i,s,F,i,B=[],h,V),V),i,V,h,s,o?B:V);break;default:e(W,G,G,G,[""],V,0,s,V)}}}f=p=b=0,I=z=1,F=W="",h=l;break;case 58:h=1+S(W),b=_;default:if(I<1){if(123==D)--I;else if(125==D&&0==I++&&125==($=R>0?x(O,--R):0,C--,10===$&&(C=1,j--),$))continue}switch(W+=m(D),D*I){case 38:z=p>0?1:(W+="\f",-1);break;case 44:s[f++]=(S(W)-1)*z,z=1;break;case 64:45===T()&&(W+=L(N())),y=T(),p=h=S(F=W+=function(e){for(;!P(T());)N();return k(O,e,R)}(R)),D++;break;case 45:45===_&&2==S(W)&&(I=0)}}return a}("",null,null,null,[""],(p=f=i||o?"".concat(i," ").concat(o," { ").concat(b," }"):b,j=C=1,I=S(O=p),R=0,f=[]),0,[0],f),O="",h);a.namespace&&(_=function e(t,n){return t.map(function(t){return"rule"===t.type&&(t.value="".concat(n," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(n," ")),t.props=t.props.map(function(e){return"".concat(n," ").concat(e)})),Array.isArray(t.children)&&"@keyframes"!==t.type&&(t.children=e(t.children,n)),t})}(_,a.namespace));var A=[];return D(_,(u=(s=c.concat((y=function(e){return A.push(e)},function(e){!e.root&&(e=e.return)&&y(e)}))).length,function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=s[i](e,t,n,r)||"";return o})),A};return p.hash=s.length?s.reduce(function(e,t){return t.name||eM(15),eu(e,t.name)},5381).toString():"",p}var e0=new eK,e1=eJ(),e2=i.createContext({shouldForwardProp:void 0,styleSheet:e0,stylis:e1}),e5=(e2.Consumer,i.createContext(void 0));function e3(){return(0,i.useContext)(e2)}function e4(e){var t=(0,i.useState)(e.stylisPlugins),n=t[0],r=t[1],o=e3().styleSheet,a=(0,i.useMemo)(function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,o]),s=(0,i.useMemo)(function(){return eJ({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})},[e.enableVendorPrefixes,e.namespace,n]);(0,i.useEffect)(function(){l()(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]);var u=(0,i.useMemo)(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:a,stylis:s}},[e.shouldForwardProp,a,s]);return i.createElement(e2.Provider,{value:u},i.createElement(e5.Provider,{value:s},e.children))}var e6=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=e1);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,eO(this,function(){throw eM(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=e1),this.name+e.hash},e}();function e8(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;r>="A"&&r<="Z"?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var e9=function(e){return null==e||!1===e||""===e},e7=function(e){var t=[];for(var n in e){var r=e[n];e.hasOwnProperty(n)&&!e9(r)&&(Array.isArray(r)&&r.isCss||ej(r)?t.push("".concat(e8(n),":"),r,";"):e$(r)?t.push.apply(t,o(o(["".concat(n," {")],e7(r),!1),["}"],!1)):t.push("".concat(e8(n),": ").concat(null==r||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in V||n.startsWith("--")?String(r).trim():"".concat(r,"px"),";")))}return t};function te(e,t,n,r){return e9(e)?[]:eC(e)?[".".concat(e.styledComponentId)]:ej(e)?!ej(e)||e.prototype&&e.prototype.isReactComponent||!t?[e]:te(e(t),t,n,r):e instanceof e6?n?(e.inject(n,r),[e.getName(r)]):[e]:e$(e)?e7(e):Array.isArray(e)?Array.prototype.concat.apply(J,e.map(function(e){return te(e,t,n,r)})):[e.toString()]}function tt(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(ej(n)&&!eC(n))return!1}return!0}var tn=ec(Z),tr=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&tt(e),this.componentId=t,this.baseHash=eu(tn,t),this.baseStyle=n,eK.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n
1):"";if(this.isStatic&&!n.hash){if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=eI(r,this.staticRulesId);else{var o=eR(te(this.rules,e,t,n)),i=el(eu(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,i)){var a=n(o,".".concat(i),void 0,this.componentId);t.insertRules(this.componentId,i,a)}r=eI(r,i),this.staticRulesId=i}}else{for(var l=eu(this.baseHash,n.hash),s="",u=0;u<this.rules.length;u++){var c=this.rules[u];if("string"==typeof c)s+=c;else if(c){var d=eR(te(c,e,t,n));l=eu(l,d+u),s+=d}}if(s){var f=el(l>>>0);t.hasNameForId(this.componentId,f)||t.insertRules(this.componentId,f,n(s,".".concat(f),void 0,this.componentId)),r=eI(r,f)}}return r},e}(),to=i.createContext(void 0);function ti(){var e=(0,i.useContext)(to);if(!e)throw eM(18);return e}function ta(e){var t=i.useContext(to),n=(0,i.useMemo)(function(){return function(e,t){if(!e)throw eM(14);if(ej(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw eM(8);return t?r(r({},t),e):e}(e.theme,t)},[e.theme,t]);return e.children?i.createElement(to.Provider,{value:n},e.children):null}to.Consumer;var tl={};function ts(e,t,n){var o,a,l,s,u=eC(e),c=!ed(e),d=t.attrs,f=void 0===d?J:d,p=t.componentId,h=void 0===p?(o=t.displayName,a=t.parentComponentId,tl[l="string"!=typeof o?"sc":eo(o)]=(tl[l]||0)+1,s="".concat(l,"-").concat(el(ec(Z+l+tl[l])>>>0)),a?"".concat(a,"-").concat(s):s):p,g=t.displayName,m=void 0===g?ed(e)?"styled.".concat(e):"Styled(".concat(e.displayName||e.name||"Component",")"):g,y=t.displayName&&t.componentId?"".concat(eo(t.displayName),"-").concat(t.componentId):t.componentId||h,b=u&&e.attrs?e.attrs.concat(f).filter(Boolean):f,v=t.shouldForwardProp;if(u&&e.shouldForwardProp){var w=e.shouldForwardProp;if(t.shouldForwardProp){var x=t.shouldForwardProp;v=function(e,t){return w(e,t)&&x(e,t)}}else v=w}var k=new tr(n,y,u?e.componentStyle:void 0);function S(e,t){return function(e,t,n){var o,a,l=e.attrs,s=e.componentStyle,u=e.defaultProps,c=e.foldedComponentIds,d=e.styledComponentId,f=e.target,p=i.useContext(to),h=e3(),g=e.shouldForwardProp||h.shouldForwardProp,m=(void 0===(o=u)&&(o=ee),t.theme!==o.theme&&t.theme||p||o.theme||ee),y=function(e,t,n){for(var o,i=r(r({},t),{className:void 0,theme:n}),a=0;a<e.length;a+=1){var l=ej(o=e[a])?o(i):o;for(var s in l)i[s]="className"===s?eI(i[s],l[s]):"style"===s?r(r({},i[s]),l[s]):l[s]}return t.className&&(i.className=eI(i.className,t.className)),i}(l,t,m),b=y.as||f,v={};for(var w in y)void 0===y[w]||"$"===w[0]||"as"===w||"theme"===w&&y.theme===m||("forwardedAs"===w?v.as=y.forwardedAs:g&&!g(w,b)||(v[w]=y[w]));var x=(a=e3(),s.generateAndInjectStyles(y,a.styleSheet,a.stylis)),k=eI(c,d);return x&&(k+=" "+x),y.className&&(k+=" "+y.className),v[ed(b)&&!et.has(b)?"class":"className"]=k,n&&(v.ref=n),(0,i.createElement)(b,v)}(E,e,t)}S.displayName=m;var E=i.forwardRef(S);return E.attrs=b,E.componentStyle=k,E.displayName=m,E.shouldForwardProp=v,E.foldedComponentIds=u?eI(e.foldedComponentIds,e.styledComponentId):"",E.styledComponentId=y,E.target=u?e.target:e,Object.defineProperty(E,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=u?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++)(function e(t,n,r){if(void 0===r&&(r=!1),!r&&!e$(t)&&!Array.isArray(t))return n;if(Array.isArray(n))for(var o=0;o<n.length;o++)t[o]=e(t[o],n[o]);else if(e$(n))for(var o in n)t[o]=e(t[o],n[o]);return t})(e,t[r],!0);return e}({},e.defaultProps,t):t}}),eO(E,function(){return".".concat(E.styledComponentId)}),c&&function e(t,n,r){if("string"!=typeof n){if(e_){var o=eE(n);o&&o!==e_&&e(t,o,r)}var i=ex(n);ek&&(i=i.concat(ek(n)));for(var a=ev(t),l=ev(n),s=0;s<i.length;++s){var u=i[s];if(!(u in em||r&&r[u]||l&&u in l||a&&u in a)){var c=eS(n,u);try{ew(t,u,c)}catch(e){}}}}return t}(E,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),E}function tu(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var tc=function(e){return Object.assign(e,{isCss:!0})};function td(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return ej(e)||e$(e)?tc(te(tu(J,o([e],t,!0)))):0===t.length&&1===e.length&&"string"==typeof e[0]?te(e):tc(te(tu(e,t)))}var tf=function(e){return function e(t,n,i){if(void 0===i&&(i=ee),!n)throw eM(1,n);var a=function(e){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];return t(n,i,td.apply(void 0,o([e],r,!1)))};return a.attrs=function(o){return e(t,n,r(r({}
1,i),{attrs:Array.prototype.concat(i.attrs,o).filter(Boolean)}))},a.withConfig=function(o){return e(t,n,r(r({},i),o))},a}(ts,e)},tp=tf;function th(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=eR(td.apply(void 0,o([e],t,!1)));return new e6(el(ec(r)>>>0),r)}et.forEach(function(e){tp[e]=tf(e)}),function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=tt(e),eK.registerId(this.componentId+1)}e.prototype.createStyles=function(e,t,n,r){var o=r(eR(te(this.rules,t,n,r)),""),i=this.componentId+e;n.insertRules(i,i,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&eK.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}(),function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var r=n.nc,o=eR([r&&'nonce="'.concat(r,'"'),"".concat(W,'="true"'),"".concat(Y,'="').concat(Z,'"')].filter(Boolean)," ");return"<style ".concat(o,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw eM(2);return e._emitSheetCSS()}
1,this.getStyleElement=function(){if(e.sealed)throw eM(2);var t,o=e.instance.toString();if(!o)return[];var a=((t={})[W]="",t[Y]=Z,t.dangerouslySetInnerHTML={__html:o},t),l=n.nc;return l&&(a.nonce=l),[i.createElement("style",r({},a,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new eK({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw eM(2);return i.createElement(e4,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw eM(3)}}()},79824:function(e,t,n){"use strict";n.d(t,{fi:function(){return ec},BA:function(){return ef},aQ:function(){return g}});let r=["gray","blue","purple","magenta","red","orange","yellow","green","cyan"],o=["50","100","200","300","400","500","600","700","800","900","950"],i={black:{title:"Black",hex:"#0d0e12"},white:{title:"White",hex:"#ffffff"},gray:{50:{title:"Gray 50",hex:"#f6f6f8"},100:{title:"Gray 100",hex:"#eeeef1"},200:{title:"Gray 200",hex:"#e3e4e8"},300:{title:"Gray 300",hex:"#bbbdc9"},400:{title:"Gray 400",hex:"#9499ad"},500:{title:"Gray 500",hex:"#727892"},600:{title:"Gray 600",hex:"#515870"},700:{title:"Gray 700",hex:"#383d51"},800:{title:"Gray 800",hex:"#252837"},900:{title:"Gray 900",hex:"#1b1d27"},950:{title:"Gray 950",hex:"#13141b"}},blue:{50:{title:"Blue 50",hex:"#f5f8ff"},100:{title:"Blue 100",hex:"#e5edff"},200:{title:"Blue 200",hex:"#dbe5ff"},300:{title:"Blue 300",hex:"#a8bfff"},400:{title:"Blue 400",hex:"#7595ff"},500:{title:"Blue 500",hex:"#556bfc"},600:{title:"Blue 600",hex:"#4043e7"},700:{title:"Blue 700",hex:"#2927aa"},800:{title:"Blue 800",hex:"#192457"},900:{title:"Blue 900",hex:"#161a41"},950:{title:"Blue 950",hex:"#101228"}},purple:{50:{title:"Purple 50",hex:"#f8f5ff"},100:{title:"Purple 100",hex:"#f1ebff"},200:{title:"Purple 200",hex:"#ece1fe"},300:{title:"Purple 300",hex:"#ccb1fc"},400:{title:"Purple 400",hex:"#b087f7"},500:{title:"Purple 500",hex:"#8f57ef"},600:{title:"Purple 600",hex:"#721fe5"},700:{title:"Purple 700",hex:"#4c1a9e"},800:{title:"Purple 800",hex:"#2f1862"},900:{title:"Purple 900",hex:"#23173f"},950:{title:"Purple 950",hex:"#181128"}},magenta:{50:{title:"Magenta 50",hex:"#fef6f9"},100:{title:"Magenta 100",hex:"#fde8ef"},200:{title:"Magenta 200",hex:"#fcdee9"},300:{title:"Magenta 300",hex:"#f7abc5"},400:{title:"Magenta 400",hex:"#f0709b"},500:{title:"Magenta 500",hex:"#e72767"},600:{title:"Magenta 600",hex:"#b11651"},700:{title:"Magenta 700",hex:"#7c1342"},800:{title:"Magenta 800",hex:"#4b1130"},900:{title:"Magenta 900",hex:"#341325"},950:{title:"Magenta 950",hex:"#1f0f14"}},red:{50:{title:"Red 50",hex:"#fff6f5"},100:{title:"Red 100",hex:"#ffe7e5"},200:{title:"Red 200",hex:"#ffdedc"},300:{title:"Red 300",hex:"#fdada5"},400:{title:"Red 400",hex:"#f77769"},500:{title:"Red 500",hex:"#ef4434"},600:{title:"Red 600",hex:"#cc2819"},700:{title:"Red 700",hex:"#8b2018"},800:{title:"Red 800",hex:"#4d1714"},900:{title:"Red 900",hex:"#321615"},950:{title:"Red 950",hex:"#1e1011"}},orange:{50:{title:"Orange 50",hex:"#fff7f0"},100:{title:"Orange 100",hex:"#ffeadb"},200:{title:"Orange 200",hex:"#ffddc7"},300:{title:"Orange 300",hex:"#ffb685"},400:{title:"Orange 400",hex:"#ff8e42"},500:{title:"Orange 500",hex:"#fa6400"},600:{title:"Orange 600",hex:"#b14802"},700:{title:"Orange 700",hex:"#7c3404"},800:{title:"Orange 800",hex:"#461e07"},900:{title:"Orange 900",hex:"#32160b"},950:{title:"Orange 950",hex:"#21120d"}},yellow:{50:{title:"Yellow 50",hex:"#fefae1"},100:{title:"Yellow 100",hex:"#fcf3bb"},200:{title:"Yellow 200",hex:"#f9e994"},300:{title:"Yellow 300",hex:"#f7d455"},400:{title:"Yellow 400",hex:"#f9bc15"},500:{title:"Yellow 500",hex:"#d28a04"},600:{title:"Yellow 600",hex:"#965908"},700:{title:"Yellow 700",hex:"#653a0b"},800:{title:"Yellow 800",hex:"#3b220c"},900:{title:"Yellow 900",hex:"#271a11"},950:{title:"Yellow 950",hex:"#181410"}},green:{50:{title:"Green 50",hex:"#e7fef5"},100:{title:"Green 100",hex:"#c5fce8"},200:{title:"Green 200",hex:"#a9f9dc"},300:{title:"Green 300",hex:"#59f3ba"},400:{title:"Green 400",hex:"#0ff0a1"},500:{title:"Green 500",hex:"#04b97a"},600:{title:"Green 600",hex:"#01794f"},700:{title:"Green 700",hex:"#015133"},800:{title:"Green 800",hex:"#023120"},900:{title:"Green 900",hex:"#06231a"},950:{title:"Green 950",hex:"#071715"}},cyan:{50:{title:"Cyan 50",hex:"#e7fefe"},100:{title:"Cyan 100",hex:"#c5fcfc"},200:{title:"Cyan 200",hex:"#96f8f8"},300:{title:"Cyan 300",hex:"#62efef"},400:{title:"Cyan 400",hex:"#18e2e2"},500:{title:"Cyan 500",hex:"#04b8be"},600:{title:"Cyan 600",hex:"#037782"},700:{title:"Cyan 700",hex:"#024950"},800:{title:"Cyan 800",hex:"#042f34"},900:{title:"Cyan 900",hex:"#072227"},950:{title:"Cyan 950",hex:"#0d181c"}}},a={avatar:{sizes:[{distance:-4,size:19},{distance:-4,size:25},{distance:-8,size:33},{distance:-12,size:49}],focusRing:{offset:1,width:1}},button:{textWeight:"medium",border:{width:1},focusRing:{offset:-1,width:1}},card:{border:{width:1},focusRing:{offset:-1,width:1},shadow:{outline:.5}},container:[320,640,960,1280,1600,1920],media:[360,600,900,1200,1800,2400],layer:{dialog:{zOffset:600},popover:{zOffset:400},tooltip:{zOffset:200}},radius:[0,1,3,6,9,12,21],shadow:[null,{umbra:[0,0,0,0],penumbra:[0,0,0,0],ambient:[0,0,0,0]},{umbra:[0,3,5,-2],penumbra:[0,6,10,0],ambient:[0,1,18,1]},{umbra:[0,7,8,-4],penumbra:[0,12,17,2],ambient:[0,5,22,4]},{umbra:[0,9,11,-5],penumbra:[0,18,28,2],ambient:[0,7,34,6]},{umbra:[0,11,15,-7],penumbra:[0,24,38,3],ambient:[0,9,46,8]}],space:[0,4,8,12,20,32,52,84,136,220],input:{border:{width:1},checkbox:{size:17,focusRing:{offset:-1,width:1}}
1,radio:{size:17,markSize:9,focusRing:{offset:-1,width:1}},switch:{width:25,height:17,padding:5,transitionDurationMs:150,transitionTimingFunction:"ease-out",focusRing:{offset:1,width:1}},select:{focusRing:{offset:-1,width:1}},text:{focusRing:{offset:-1,width:1}}},style:{button:{root:{transition:"background-color 100ms,border-color 100ms,color 100ms"}}}},l={code:{family:"ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace",weights:{regular:400,medium:500,semibold:600,bold:700},sizes:[{ascenderHeight:4,descenderHeight:4,fontSize:10,iconSize:17,lineHeight:15,letterSpacing:0},{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:21,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:16,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:19,iconSize:29,lineHeight:27,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:22,iconSize:33,lineHeight:31,letterSpacing:0}]},heading:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',weights:{regular:700,medium:800,semibold:900,bold:900},sizes:[{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:17,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:16,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:21,iconSize:33,lineHeight:29,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:27,iconSize:41,lineHeight:35,letterSpacing:0},{ascenderHeight:9.5,descenderHeight:8.5,fontSize:33,iconSize:49,lineHeight:41,letterSpacing:0},{ascenderHeight:10.5,descenderHeight:9.5,fontSize:38,iconSize:53,lineHeight:47,letterSpacing:0}]},label:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", system-ui, sans-serif',weights:{regular:600,medium:700,semibold:800,bold:900},sizes:[{ascenderHeight:2,descenderHeight:2,fontSize:8.1,iconSize:13,lineHeight:10,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:9.5,iconSize:15,lineHeight:11,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:10.8,iconSize:17,lineHeight:12,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:12.25,iconSize:19,lineHeight:13,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:13.6,iconSize:21,lineHeight:14,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:15,iconSize:23,lineHeight:15,letterSpacing:.5}]},text:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',weights:{regular:400,medium:500,semibold:600,bold:700},sizes:[{ascenderHeight:4,descenderHeight:4,fontSize:10,iconSize:17,lineHeight:15,letterSpacing:0},{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:21,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:15,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:18,iconSize:29,lineHeight:27,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:21,iconSize:33,lineHeight:31,letterSpacing:0}]}},s=new WeakMap;function u(e){let t=s.get(e);if(t)return t;let n=d(e,e.card.enabled),r={_blend:e._blend||(e.dark?"screen":"multiply"),_dark:e.dark,accent:n.accent,avatar:n.avatar,backdrop:e.base.shadow.ambient,badge:n.badge,bg:e.base.bg,border:e.base.border,button:{default:c(e,e.button.default),ghost:c(e,e.button.ghost),bleed:c(e,e.button.bleed)},code:n.code,fg:e.base.fg,focusRing:e.base.focusRing,icon:n.muted.fg,input:{default:f(e.input.default),invalid:f(e.input.invalid)},kbd:n.kbd,link:n.link,muted:{...n.muted,bg:e.selectable?.default.enabled.bg2||e.base.bg},selectable:c(e,e.selectable||e.muted),shadow:e.base.shadow,skeleton:{from:e.skeleton?.from||e.base.border,to:e.skeleton?.to||e.base.border},syntax:e.syntax};return s.set(e,r),r}function c(e,t){return{default:{enabled:d(e,t.default.enabled),hovered:d(e,t.default.hovered),pressed:d(e,t.default.pressed),selected:d(e,t.default.selected),disabled:d(e,t.default.disabled)},neutral:{enabled:d(e,t.default.enabled),hovered:d(e,t.default.hovered),pressed:d(e,t.default.pressed),selected:d(e,t.default.selected),disabled:d(e,t.default.disabled)},primary:{enabled:d(e,t.primary.enabled),hovered:d(e,t.primary.hovered),pressed:d(e,t.primary.pressed),selected:d(e,t.primary.selected),disabled:d(e,t.primary.disabled)},suggest:{enabled:d(e,t.primary.enabled),hovered:d(e,t.primary.hovered),pressed:d(e,t.primary.pressed),selected:d(e,t.primary.selected),disabled:d(e,t.primary.disabled)},positive:{enabled:d(e,t.positive.enabled),hovered:d(e,t.positive.hovered),pressed:d(e,t.positive.pressed),selected:d(e,t.positive.selected),disabled:d(e,t.positive.disabled)},caution:{enabled:d(e,t.caution.enabled),hovered:d(e,t.caution.hovered),pressed:d(e,t.caution.pressed),selected:d(e,t.caution.selected),disabled:d(e,t.caution.disabled)},critical:{enabled:d(e,t.critical.enabled),hovered:d(e,t.critical.hovered),pressed:d(e,t.critical.pressed),selected:d(e,t.critical.selected),disabled:d(e,t.critical.disabled)}}}function d(e,t){return{...t,avatar:{gray:{bg:e.spot.gray,fg:e.base.bg},blue:{bg:e.spot.blue,fg:e.base.bg},purple:{bg:e.spot.purple,fg:e.base.bg},magenta:{bg:e.spot.magenta,fg:e.base.bg},red:{bg:e.spot.red,fg:e.base.bg},orange:{bg:e.spot.orange,fg:e.base.bg},yellow:{bg:e.spot.yellow,fg:e.base.bg},green:{bg:e.spot.green,fg:e.base.bg}
1,cyan:{bg:e.spot.cyan,fg:e.base.bg}},badge:{default:{bg:e.muted.default.enabled.bg,fg:e.muted.default.enabled.fg,dot:e.muted.default.enabled.muted.fg,icon:e.muted.default.enabled.muted.fg},neutral:{bg:e.muted.transparent.enabled.bg,fg:e.muted.transparent.enabled.fg,dot:e.muted.transparent.enabled.muted.fg,icon:e.muted.transparent.enabled.muted.fg},primary:{bg:e.muted.primary.enabled.bg,fg:e.muted.primary.enabled.fg,dot:e.muted.primary.enabled.muted.fg,icon:e.muted.primary.enabled.muted.fg},suggest:{bg:e.muted.primary.enabled.bg,fg:e.muted.primary.enabled.fg,dot:e.muted.primary.enabled.muted.fg,icon:e.muted.primary.enabled.muted.fg},positive:{bg:e.muted.positive.enabled.bg,fg:e.muted.positive.enabled.fg,dot:e.muted.positive.enabled.muted.fg,icon:e.muted.positive.enabled.muted.fg},caution:{bg:e.muted.caution.enabled.bg,fg:e.muted.caution.enabled.fg,dot:e.muted.caution.enabled.muted.fg,icon:e.muted.caution.enabled.muted.fg},critical:{bg:e.muted.critical.enabled.bg,fg:e.muted.critical.enabled.fg,dot:e.muted.critical.enabled.muted.fg,icon:e.muted.critical.enabled.muted.fg}},kbd:{bg:e.muted.default.enabled.bg,fg:e.muted.default.enabled.fg,border:e.muted.default.enabled.border},muted:{...e.muted.default.enabled.muted,bg:t.bg2||t.bg},skeleton:{from:t.skeleton?.from||t.border,to:t.skeleton?.to||t.border}}}function f(e){return{enabled:p(e.enabled),disabled:p(e.disabled),readOnly:p(e.readOnly),hovered:p(e.hovered)}}function p(e){return{bg:e.bg,border:e.border,fg:e.fg,muted:{bg:e.bg2},placeholder:e.placeholder}}let h=new WeakMap;function g(e){if(e.sanity.v2?._resolved)return e.sanity.v2;let t=h.get(e);if(t)return t;let n={_version:2,_resolved:!0,avatar:{...a.avatar,...e.sanity.avatar},button:{...a.button,...e.sanity.button},card:a.card,color:u(e.sanity.color),container:e.sanity.container,font:e.sanity.fonts,input:{...a.input,...e.sanity.input,checkbox:{...a.input.checkbox,...e.sanity.input.checkbox},radio:{...a.input.radio,...e.sanity.input.radio},switch:{...a.input.switch,...e.sanity.input.switch}},layer:e.sanity.layer??a.layer,media:e.sanity.media,radius:e.sanity.radius,shadow:e.sanity.shadows,space:e.sanity.space,style:e.sanity.styles};return h.set(e,n),n}function m(e){return 2===e._version}let y=new WeakMap,b=new WeakMap;function v(e){let t=b.get(e);if(t)return t;let{avatar:n,button:r,color:o,container:i,font:a,input:l,media:s,radius:u,shadow:c,space:d,style:f}=e;return{_version:0,avatar:n,button:r,container:i,color:{light:{transparent:w(o.light.transparent),default:w(o.light.default),primary:w(o.light.primary),positive:w(o.light.positive),caution:w(o.light.caution),critical:w(o.light.critical)},dark:{transparent:w(o.dark.transparent),default:w(o.dark.default),primary:w(o.dark.primary),positive:w(o.dark.positive),caution:w(o.dark.caution),critical:w(o.dark.critical)}},focusRing:l.text.focusRing,fonts:a,input:l,media:s,radius:u,shadows:c,space:d,styles:f,v2:e}}function w(e){return{base:{bg:e.bg,fg:e.fg,border:e.border,focusRing:e.focu
1sRing,shadow:e.shadow},button:e.button,card:e.selectable.default,dark:e._dark,input:{default:x(e.input.default),invalid:x(e.input.invalid)},muted:{...e.button.ghost,transparent:e.button.ghost.default},solid:{...e.button.default,transparent:e.button.default.default},selectable:e.selectable,spot:{gray:e.avatar.gray.bg,blue:e.avatar.blue.bg,purple:e.avatar.purple.bg,magenta:e.avatar.magenta.bg,red:e.avatar.red.bg,orange:e.avatar.orange.bg,yellow:e.avatar.yellow.bg,green:e.avatar.green.bg,cyan:e.avatar.cyan.bg},syntax:e.syntax}}function x(e){return{enabled:k(e.enabled),disabled:k(e.disabled),readOnly:k(e.readOnly),hovered:k(e.hovered)}}function k(e){return{bg:e.bg,bg2:e.muted.bg,border:e.border,fg:e.fg,placeholder:e.placeholder}}let S=["multiply","screen"],E=["transparent","default","neutral","primary","suggest","positive","caution","critical"],_=["default","neutral","primary","suggest","positive","caution","critical"],j=["enabled","hovered","pressed","selected","disabled"],C=["default","ghost","bleed"],I=["default","invalid"],R=["enabled","hovered","readOnly","disabled"];function $(e){return o.includes(e)}function O(e){return/^\d+%$/.test(e)}function M(e){let t=e.split("/"),n=t.shift()||"",[o,i]=n.split(" ");if($(o)){let e=t.shift()||"";return O(i)?{type:"color",tint:o,mix:Number(i.slice(0,-1))/100}:A(e)?{type:"color",tint:o,opacity:Number(e)}:{type:"color",tint:o}}if("black"===o||"white"===o){let e=t.shift()||"";return O(i)?{type:"color",key:o,mix:Number(i.slice(0,-1))/100}:A(e)?{type:"color",key:o,opacity:Number(e)}:{type:"color",key:o}}if(r.includes(o)){let[e,r]=(n=t.shift()||"").split(" ");if($(e)){let n=t.shift()||"";return O(r)?{type:"color",hue:o,tint:e,mix:Number(r.slice(0,-1))/100}:A(n)?{type:"color",hue:o,tint:e,opacity:Number(n)}:{type:"color",hue:o,tint:e}}return{type:"hue",value:o}}if(S.includes(o))return{type:"blendMode",value:o}}function A(e){return"0"===e||/^0\.[0-9]+$/.test(e)||"1"===e}[...r],[...E],[..._],[...j],[...I],[...R];let z=["500","500"];function N(e,t=z){var n;let r;let{hue:o,scheme:i}=e,a=M(t["light"===i?0:1]);if(!a||"color"!==a.type)throw Error(`Invalid color token: ${t[0]}`);return n={...a,hue:a.hue||o},r="",r="black"===n.key||"white"===n.key?n.key:`${n.hue}/${n.tint}`,void 0!==n.mix?`${r} ${100*n.mix}%`:(void 0!==n.opacity&&(r+=`/${n.opacity}`),r)}let T={base:{"*":{_blend:["multiply","screen"],accent:{fg:["purple/600","purple/400"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},backdrop:["gray/200/0.5","black/0.5"],badge:{"*":{bg:["100","900"],fg:["600","400"],icon:["500","500"],dot:["500","500"]},positive:{bg:["200 50%","900"],fg:["600","500"]},caution:{bg:["200 50%","900"],fg:["600","500"]}},bg:["50","950"],border:["200","800"],code:{bg:["50","950"],fg:["600","400"]},fg:["800","200"],focusRing:["blue/500","blue/500"],icon:["600","400"],kbd:{bg:["white","black"],fg:["600","400"],border:["200","800"]},link:{fg:["blue/600","blue/300"]},muted:{bg:["50","950"],fg:["700 75%","300 75%"]},shadow:{outline:["500/0.3","500/0.4"],umbra:["gray/500/0.1","black/0.2"],penumbra:["gray/500/0.07","black/0.14"],ambient:["gray/500/0.06","black/0.12"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},transparent:{bg:["50","black"]},default:{bg:["white","950"],fg:["800","200"],muted:{fg:["600","400"]}},primary:{_hue:"blue"},suggest:{_hue:"purple"},positive:{_hue:"green",shadow:{outline:["500/0.4","500/0.4"]}},caution:{_hue:"yellow",shadow:{outline:["600/0.3","500/0.4"]}},critical:{_hue:"red"}},button:{default:{"*":{"*":{_blend:["screen","multiply"],accent:{fg:["purple/300","purple/700"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["900","100"],fg:["400","600"],dot:["500","500"],icon:["500","500"]}},bg:["500","400"],border:["500/0","400/0"],code:{bg:["500 20%","400 20%"],fg:["200","600"]},fg:["white","black"],icon:["100 70%","900 70%"],kbd:{bg:["black","white"],fg:["200","600"],border:["800","200"]},link:{fg:["blue/200","blue/600"]},muted:{bg:["950","50"],fg:["100 70%","900 70%"]},skeleton:{from:["900","100"],to:["900 50%","100 50%"]}},hovered:{bg:["600","300"],border:["700/0","300/0"]},pressed:{bg:["700","300"]},selected:{bg:["700","300"]},disabled:{_hue:"gray",accent:{fg:["100 70%","900 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/500","gray/400"],fg:["white","black"]}},badge:{"*":{bg:["gray/700","gray/300"],fg:["white","black"],dot:["white","black"],icon:["white","black"]}},bg:["300","600"],code:{bg:["950","50"],fg:["300","600"]},fg:["300","600"],muted:{bg:["950","50"],fg:["300","600"]},kbd:{bg:["black","white"],fg:["white","black"],border:["700","300"]},link:{fg:["100 70%","900 70%"]}}},default:{"*":{avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},bg:["800","200"],muted:{bg:["950","50"],fg:["400","600"]}},hovered:{bg:["900","100"]},pressed:{bg:["black","white"]},selected:{bg:["black","white"]}}},ghost:{"*":{"*":{_blend:["multiply","screen"],accent:{fg:["purple/700 60%","purple/300 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["100","900"],fg:["600","400"],dot:["500","500"],icon:["500","500"]}},bg:["50","950"],border:["100","900"],code:{bg:["500 10%","400 10%"],fg:["700 60%","400 60%"]},fg:["600","400"],icon:["700 60%","300 60%"],kbd:{bg:["white","black"],fg:["600","400"],border:["200","800"]},link:{fg:["blue/700 60%","blue/300 60%"]},muted:{bg:["100","950"],fg:["700 60%","300 60%"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},hovered:{bg:["100","900"],fg:["700","300"]},pressed:{bg:["200","800"],fg:["800","200"]},selected:{bg:["200","800"],fg:["800","200"]},disabled:{_hue:"gray",accent:{fg:["200","800"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/100","gray/900"],fg:["white","black"]}}
1,badge:{"*":{_hue:"gray",bg:["50","950"],fg:["gray/200","gray/800"],dot:["gray/200","gray/800"],icon:["gray/200","gray/800"]}},border:["100","900"],code:{bg:["50","950"],fg:["200","800"]},fg:["400","600"],icon:["300","700"],muted:{fg:["300","700"]},kbd:{bg:["white","black"],fg:["200","800"],border:["100","900"]},link:{fg:["200","800"]}}},positive:{"*":{border:["600 20%","800"]}},caution:{"*":{border:["600 20%","800"]}}},bleed:{"*":{"*":{_blend:["multiply","screen"],accent:{fg:["purple/700 70%","purple/300 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["100","900"],fg:["600","400"],dot:["500","500"],icon:["500","500"]}},bg:["white","black"],border:["white/0","black/0"],code:{bg:["50","950"],fg:["700 75%","300 75%"]},fg:["700","300"],icon:["700 75%","300 75%"],kbd:{bg:["white","black"],fg:["700","300"],border:["200","800"]},link:{fg:["blue/700 70%","blue/300 70%"]},muted:{bg:["100","950"],fg:["700 75%","300 75%"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},hovered:{bg:["50","900"],fg:["800","200"],icon:["800 70%","300 70%"]},pressed:{bg:["100","800"],fg:["800","200"],icon:["800 70%","200 70%"]},selected:{bg:["100","900"],fg:["800","200"],icon:["800 60%","200 60%"]},disabled:{_hue:"gray",accent:{fg:["200","800"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/100","gray/900"],fg:["white","black"]}},badge:{"*":{_hue:"gray",bg:["50","950"],fg:["gray/200","gray/800"],dot:["gray/200","gray/800"],icon:["gray/200","gray/800"]}},code:{bg:["50","950"],fg:["200","800"]},fg:["400","600"],icon:["300","700"],muted:{fg:["400","600"]},kbd:{bg:["white","black"],fg:["200","800"],border:["100","900"]},link:{fg:["200","800"]}}}}},input:{"*":{"*":{_blend:["multiply","screen"],bg:["white","black"],border:["200","700"],fg:["black","200"],muted:{bg:["50","950"]},placeholder:["400","600"]},hovered:{border:["300","700"]},readOnly:{bg:["50","950"],border:["200","800"],fg:["800","200"]},disabled:{bg:["50","950"],fg:["400","600"],border:["100","900"],placeholder:["200","800 50%"]}},invalid:{"*":{_hue:"red",bg:["100","950"]}}},selectable:{"*":{"*":{_blend:["multiply","screen"],accent:{fg:["purple/700 70%","purple/300 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["100","900"],fg:["600","400"],dot:["500","500"],icon:["500","500"]}},bg:["white","black"],border:["200","800"],code:{bg:["50","950"],fg:["600","400"]},fg:["700","300"],icon:["700 75%","300 75%"],kbd:{bg:["white","black"],fg:["600","400"],border:["200","800"]},link:{fg:["blue/700 70%","blue/300 70%"]},muted:{bg:["50","950"],fg:["700 75%","300 75%"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},hovered:{bg:["50","950"]},pressed:{bg:["100","900"]},selected:{_blend:["screen","multiply"],accent:{fg:["purple/300","purple/700"]},avatar:{"*":{_blend:["multiply","screen"],bg:["white","black"],fg:["black","white"]}},badge:{"*":{bg:["900","100"],fg:["400","600"],dot:["500","500"],icon:["500","500"]}},bg:["500","400"],border:["500 20%","400 20%"],code:{bg:["500 20%","400 20%"],fg:["200","600"]},fg:["white","black"],icon:["100 70%","900 70%"],kbd:{bg:["black","white"],fg:["200","600"],border:["800","200"]},link:{fg:["blue/200","blue/600"]},muted:{bg:["500 10%","400 10%"],fg:["100 70%","900 70%"]},skeleton:{from:["900","100"],to:["900 50%","100 50%"]}},disabled:{_hue:"gray",accent:{fg:["200","800"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/100","gray/900"],fg:["white","black"]}},badge:{"*":{_hue:"gray",bg:["50","950"],fg:["gray/200","gray/800"],dot:["gray/200","gray/800"],icon:["gray/200","gray/800"]}},border:["100","900"],code:{bg:["50","950"],fg:["200","800"]},fg:["200","800"],icon:["200","800"],kbd:{bg:["white","black"],fg:["200","800"],border:["100","900"]},link:{fg:["200","800"]},muted:{bg:["50 50%","950 50%"],fg:["200","800"]}}},default:{selected:{_hue:"blue"}},critical:{disabled:{bg:["50 50%","950 50%"]}}},syntax:{atrule:["purple/600","purple/400"],attrName:["green/600","green/400"],attrValue:["yellow/600","yellow/400"],attribute:["yellow/600","yellow/400"],boolean:["purple/600","purple/400"],builtin:["purple/600","purple/400"],c
1data:["yellow/600","yellow/400"],char:["yellow/600","yellow/400"],class:["orange/600","orange/400"],className:["cyan/600","cyan/400"],comment:["gray/400","gray/600"],constant:["purple/600","purple/400"],deleted:["red/600","red/400"],entity:["red/600","red/400"],function:["green/600","green/400"],hexcode:["blue/600","blue/400"],id:["purple/600","purple/400"],important:["purple/600","purple/400"],inserted:["yellow/600","yellow/400"],keyword:["magenta/600","magenta/400"],number:["purple/600","purple/400"],operator:["magenta/600","magenta/400"],property:["blue/600","blue/400"],pseudoClass:["yellow/600","yellow/400"],pseudoElement:["yellow/600","yellow/400"],punctuation:["gray/600","gray/400"],regex:["blue/600","blue/400"],selector:["red/600","red/400"],string:["yellow/600","yellow/400"],symbol:["purple/600","purple/400"],tag:["red/600","red/400"],unit:["orange/600","orange/400"],url:["red/600","red/400"],variable:["red/600","red/400"]}};function P(e){return!!(e&&"object"==typeof e&&!Array.isArray(e))}function L(...e){let t=e.filter(Boolean);return 0===t.length?{}:t.reduce(D,{})}function D(e,t){for(let n of Object.keys(t)){let r=e[n],o=t[n];P(r)&&P(o)?e[n]=L(r,o):e[n]=o}return e}function F(e,t){let{scheme:n}=e,r={};for(let e of E)r[e]=function(e,t){let{scheme:n,tone:r}=e,o=t?.color?.base?.[r],i={hue:o?._hue||"gray",scheme:n};return{_blend:(o?._blend||["multiply","screen"])["light"===n?0:1],_dark:"dark"===n,accent:{fg:N(i,o?.accent?.fg)},avatar:B({scheme:n},o),backdrop:N(i,o?.backdrop),badge:U(o?.badge,{scheme:n},t),bg:N(i,o?.bg),border:N(i,o?.border),button:function(e,t){let{scheme:n,tone:r}=e,o={};for(let e of C)o[e]=function(e,t){let{cardTone:n,mode:r,scheme:o}=e,i={};for(let e of _)i[e]=function(e,t){let{cardTone:n,mode:r,scheme:o,tone:i}=e,a={};for(let e of j)a[e]=function(e,t){let{cardTone:n,mode:r,tone:o,scheme:i,state:a}=e,l=t?.color?.base?.[n],s=t?.color?.button?.[r]?.[o]?.[a],u=s?._hue||l?._hue||"gray",c=s?._blend||["screen","multiply"],d={hue:u,scheme:i};return{_blend:c["light"===i?0:1],accent:{fg:N(d,s?.accent?.fg)},avatar:B({scheme:i},s),badge:U(s?.badge,{scheme:i},t),bg:N(d,s?.bg),border:N(d,s?.border),code:{bg:N(d,s?.code?.bg),fg:N(d,s?.code?.fg)},fg:N(d,s?.fg),icon:N(d,s?.icon),muted:{bg:N(d,s?.muted?.bg),fg:N(d,s?.muted?.fg)},kbd:{bg:N(d,s?.kbd?.bg),fg:N(d,s?.kbd?.fg),border:N(d,s?.kbd?.border)},link:{fg:N(d,s?.link?.fg)},skeleton:{from:N(d,s?.skeleton?.from),to:N(d,s?.skeleton?.to)}}}({cardTone:n,mode:r,tone:i,scheme:o,state:e},t);return a}({cardTone:n,mode:r,scheme:o,tone:e},t);return i}({cardTone:r,scheme:n,mode:e},t);return o}({scheme:n,tone:r},t),code:{bg:N(i,o?.code?.bg),fg:N(i,o?.code?.fg)},fg:N(i,o?.fg),focusRing:N(i,o?.focusRing),icon:N(i,o?.icon),input:function(e,t){let{scheme:n,tone:r}=e;return{default:V({mode:"default",scheme:n,tone:r},t),invalid:V({mode:"invalid",scheme:n,tone:r},t)}}({scheme:n,tone:r},t),kbd:{bg:N(i,o?.kbd?.bg),fg:N(i,o?.kbd?.fg),border:N(i,o?.kbd?.border)},link:{fg:N(i,o?.link?.fg)},muted:{bg:N(i,o?.muted?.bg),fg:N(i,o?.muted?.fg)},selectable:function(e,t){let{scheme:n,tone:r}=e,o={};for(let e of _)o[e]=function(e,t){let{cardTone:n,scheme:r,tone:o}=e,i={};for(let e of j)i[e]=function(e,t){let{cardTone:n,scheme:r,state:o,tone:i}=e,a=t?.color?.base?.[n],l=t?.color?.selectable?.[i]?.[o],s=l?._hue||a?._hue||"gray",u=l?._blend||["screen","multiply"],c={hue:s,scheme:r};return{_blend:u["light"===r?0:1],accent:{fg:N(c,l?.accent?.fg)},avatar:B({scheme:r},l),badge:U(l?.badge,{scheme:r},t),bg:N(c,l?.bg),border:N(c,l?.border),code:{bg:N(c,l?.code?.bg),fg:N(c,l?.code?.fg)},fg:N(c,l?.fg),icon:N(c,l?.icon),muted:{bg:N(c,l?.muted?.bg),fg:N(c,l?.muted?.fg)},kbd:{bg:N(c,l?.kbd?.bg),fg:N(c,l?.kbd?.fg),border:N(c,l?.kbd?.border)},link:{fg:N(c,l?.link?.fg)},skeleton:{from:N(c,l?.skeleton?.from),to:N(c,l?.skeleton?.to)}}}({cardTone:n,tone:o,scheme:r,state:e},t);return i}({cardTone:r,scheme:n,tone:e},t);return o}({scheme:n,tone:r},t),shadow:function(e,t){let{scheme:n,tone:r}=e,o=t?.color?.base?.[r],i={hue:o?._hue||"gray",scheme:n};return{outline:N(i,o?.shadow?.outline),umbra:N(i,o?.shadow?.umbra),penumbra:N(i,o?.shadow?.penumbra),ambient:N(i,o?.shadow?.ambient)}}
1({scheme:n,tone:r},t),skeleton:{from:N(i,o?.skeleton?.from),to:N(i,o?.skeleton?.to)},syntax:function(e,t){let{scheme:n}=e,r=t?.color?.syntax,o={hue:"gray",scheme:n};return{atrule:N(o,r?.atrule),attrName:N(o,r?.attrName),attrValue:N(o,r?.attrValue),attribute:N(o,r?.attribute),boolean:N(o,r?.boolean),builtin:N(o,r?.builtin),cdata:N(o,r?.cdata),char:N(o,r?.char),class:N(o,r?.class),className:N(o,r?.className),comment:N(o,r?.comment),constant:N(o,r?.constant),deleted:N(o,r?.deleted),doctype:N(o,r?.doctype),entity:N(o,r?.entity),function:N(o,r?.function),hexcode:N(o,r?.hexcode),id:N(o,r?.id),important:N(o,r?.important),inserted:N(o,r?.inserted),keyword:N(o,r?.keyword),number:N(o,r?.number),operator:N(o,r?.operator),prolog:N(o,r?.prolog),property:N(o,r?.property),pseudoClass:N(o,r?.pseudoClass),pseudoElement:N(o,r?.pseudoElement),punctuation:N(o,r?.punctuation),regex:N(o,r?.regex),selector:N(o,r?.selector),string:N(o,r?.string),symbol:N(o,r?.symbol),tag:N(o,r?.tag),unit:N(o,r?.unit),url:N(o,r?.url),variable:N(o,r?.variable)}}({scheme:n},t)}}({scheme:n,tone:e},t);return r}function B(e,t){let{scheme:n}=e;return{gray:H({color:"gray",scheme:n},t),blue:H({color:"blue",scheme:n},t),purple:H({color:"purple",scheme:n},t),magenta:H({color:"magenta",scheme:n},t),red:H({color:"red",scheme:n},t),orange:H({color:"orange",scheme:n},t),yellow:H({color:"yellow",scheme:n},t),green:H({color:"green",scheme:n},t),cyan:H({color:"cyan",scheme:n},t)}}function H(e,t){let{color:n,scheme:r}=e,o=t?.avatar?.[n],i={hue:o?._hue||"gray",scheme:r};return{_blend:(o?._blend||["screen","multiply"])["light"===r?0:1],bg:N(i,o?.bg),fg:N(i,o?.fg)}}function U(e,t,n){let{scheme:r}=t,o={};for(let t of _)o[t]=function(e,t,n){let{scheme:r,tone:o}=t,i=e?.[o],a={hue:i?._hue||n?.color?.base?.[o]?._hue||"gray",scheme:r};return{bg:N(a,i?.bg),fg:N(a,i?.fg),dot:N(a,i?.dot),icon:N(a,i?.icon)}}(e,{scheme:r,tone:t},n);return o}function V(e,t){let{mode:n,scheme:r,tone:o}=e;return{enabled:G({mode:n,scheme:r,state:"enabled",cardTone:o},t),hovered:G({mode:n,scheme:r,state:"hovered",cardTone:o},t),readOnly:G({mode:n,scheme:r,state:"readOnly",cardTone:o},t),disabled:G({mode:n,scheme:r,state:"disabled",cardTone:o},t)}}function G(e,t){let{cardTone:n,mode:r,scheme:o,state:i}=e,a=t?.color?.base?.[n],l=t?.color?.input?.[r]?.[i],s=l?._hue||a?._hue||"gray",u=l?._blend||["screen","multiply"],c={hue:s,scheme:o};return{_blend:u["light"===o?0:1],bg:N(c,l?.bg),border:N(c,l?.border),fg:N(c,l?.fg),muted:{bg:N(c,l?.muted?.bg)},placeholder:N(c,l?.placeholder)}}function W(e,t=0,n=1){return Math.min(n,Math.max(t,e))}function q(e,t,n,r,o){var i;return n*(1-(i=W((o-e)/(t-e))))+r*i}function Y(e){return Math.round(e)}function Z(e){if(4===e.length){let t=e.slice(1,2),n=e.slice(2,3),r=e.slice(3,4);return{r:parseInt(t+t,16),g:parseInt(n+n,16),b:parseInt(r+r,16)}}return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}}function K(e){let t=Y(W(Math.round(e.r),0,255)),n=Y(W(Math.round(e.g),0,255)),r=Y(W(Math.round(e.b),0,255));return"a"in e?`rgba(${t},${n},${r},${e.a})`:"#"+(16777216+(t<<16)+(n<<8)+r).toString(16).slice(1)}let X=/hsl\(\s*(\d+)\s*,\s*((\d+(?:\.\d+)?)%)\s*,\s*((\d+(?:\.\d+)?)%)\s*\)/i;function Q(e){if(!e)return{r:0,g:0,b:0};if("string"!=typeof e)throw Error("parseColor: expected a string");if("#"===e[0]&&(4===e.length||7===e.length)&&function(e){for(let t of e)if(-1==="0123456789ABCDEFabcdef".indexOf(t))return!1;return!0}(e.slice(1)))return Z(e);if(e.startsWith("hsl("))return function(e){let t=e.s/100,n=e.l/100,r=(1-Math.abs(2*n-1))*t,o=r*(1-Math.abs(e.h/60%2-1)),i=n-r/2,a=0,l=0,s=0;return 0<=e.h&&e.h<60?(a=r,l=o,s=0):60<=e.h&&e.h<120?(a=o,l=r,s=0):120<=e.h&&e.h<180?(a=0,l=r,s=o):180<=e.h&&e.h<240?(a=0,l=o,s=r):240<=e.h&&e.h<300?(a=o,l=0,s=r):300<=e.h&&e.h<360&&(a=r,l=0,s=o),{r:Math.round((a+i)*255),g:Math.round((l+i)*255),b:Math.round((s+i)*255)}}(function(e){let t=X.exec(e);if(!t)throw Error(`parseHsl: string is not a HSL color: "${e}"`);return{h:parseInt(t[1]),s:parseFloat(t[3]),l:parseFloat(t[5])}}(e));if(e.startsWith("rgba("))return function(e){let t=e.replace(/rgba\(|\)/g,"").split(",");return{r:parseInt(t[0]),g:parseInt(t[1]),b:parseInt(t[2]),a:parseFloat(t[3])}}(e);throw Error(`parseColor: unexpected color format: "${e}"`)}let J=[0,255];function ee(e,t){let{bg:n,blendMode:r,colorPalette:o}=t;if("white"===n)throw Error("Cannot blend with white background");let i=M(e);if(!i||"color"!==i.type)throw Error(`Invalid color token value: ${e}`);let a="";if("black"===i.key&&(a=et(o.black)),"white"===i.key&&(a=et(o.white)),i.hue&&i.tint&&(a=et(o[i.hue][i.tint])),!a)throw Error(`Invalid color token value: ${e}`);let l=a,s={blendMode:r,bg:n,black:et(o.black),white:et(o.white)};try{if(a=function(e,t){var n,r,o,i,a,l,s,u,c;let{blendMode:d}=t,f=Q(e),p=Q(t.black),h=Q(t.white),g=t.bg?Q(t.bg):"multiply"===d?h:p,m={r:[p.r,h.r],g:[p.g,h.g],b:[p.b,h.b]},y={r:W(q(...m.r,...J,g.r),...J),g:W(q(...m.g,...J,g.g),...J),b:W(q(...m.b,...J,g.b),...J)},b={r:W(q(...m.r,...J,f.r),...J),g:W(q(...m.g,...J,f.g),...J),b:W(q(...m.b,...J,f.b),...J)},v="multiply"===d?{r:255*(n=y.r/255,b.r/255*n),g:255*(r=y.g/255,b.g/255*r),b:255*(o=y.b/255,b.b/255*o)}:{r:255*((i=y.r/255)+(a=b.r/255)-i*a),g:255*((l=y.g/255)+(s=b.g/255)-l*s),b:255*((u=y.b/255)+(c=b.b/255)-u*c)};return K({r:W(q(...J,...m.r,v.r),...m.r),g:W(q(...J,...m.g,v.g),...m.g),b:W(q(...J,...m.b,v.b),...m.b)})}(a,s),n&&void 0!==i.mix){var u,c,d,f,p,h,g;let e=Z(n),t=Z(a);a=K((u=i.mix,{r:(c=e.r,d=t.r,c+(d-c)*u),g:(f=e.g,p=t.g,f+(p-f)*u),b:(h=e.b,g=t.b,h+(g-h)*u)}))}}catch(e){throw console.warn("could not blend",a,s),e}
1return"#aN"===a&&(console.warn(`invalid color token value: ${e}`),a=l),void 0!==i.opacity&&(a=function(e,t){let n=Q(e);return`rgba(${n.r},${n.g},${n.b},${t})`}(a,i.opacity)),a}function et(e){return"string"==typeof e?e:e.hex}function en(e,t){let n=Object.entries(t),[,r]=n.find(([e])=>"transparent"===e),[,o]=n.find(([e])=>"default"===e),i=er(r,{colorPalette:e}),a=er(o,{colorPalette:e}),l=a.bg;if("white"===l)throw Error("Cannot blend with white background");return Object.fromEntries([["transparent",i],["default",a],...n.filter(([e])=>"default"!==e&&"transparent"!==e).map(([t,n])=>[t,er(n,{bg:l,colorPalette:e})])])}function er(e,t){var n,r,o,i;let{colorPalette:a,bg:l}=t,s=e._blend||"multiply",u=ee(e.bg,{colorPalette:a,bg:l,blendMode:s}),c={colorPalette:a,bg:u,blendMode:s},d=(n=e.button,r={baseBg:u,blendMode:s,colorPalette:a},{default:ea(n.default,r),ghost:ea(n.ghost,r),bleed:ea(n.bleed,r)}),f=function(e,t){let n={};for(let o of _){var r;n[o]={enabled:el((r=e[o]).enabled,t),hovered:el(r.hovered,t),pressed:el(r.pressed,t),selected:el(r.selected,t),disabled:el(r.disabled,t)}}return n}(e.selectable,{colorPalette:a,baseBg:u,blendMode:s}),p={outline:ee(e.shadow.outline,c),umbra:ee(e.shadow.umbra,{...c,bg:void 0,colorPalette:{...a,black:"#000000"}}),penumbra:ee(e.shadow.penumbra,{...c,bg:void 0,colorPalette:{...a,black:"#000000"}}),ambient:ee(e.shadow.ambient,{...c,bg:void 0,colorPalette:{...a,black:"#000000"}})};return{_blend:s,_dark:e._dark,accent:{fg:ee(e.accent.fg,c)},avatar:eo(e.avatar,{baseBg:u,colorPalette:a,blendMode:s}),backdrop:ee(e.backdrop,c),badge:ei(e.badge,{baseBg:u,colorPalette:a,blendMode:s}),bg:u,border:ee(e.border,c),button:d,code:{bg:ee(e.code.bg,c),fg:ee(e.code.fg,c)},fg:ee(e.fg,c),focusRing:ee(e.focusRing,c),icon:ee(e.icon,c),input:(o=e.input,i={baseBg:u,colorPalette:a,blendMode:s},{default:es(o.default,i),invalid:es(o.invalid,i)}),kbd:function(e,t){let{baseBg:n,blendMode:r,colorPalette:o}=t,i=ee(e.bg,{bg:n,blendMode:r,colorPalette:o}),a={bg:i,blendMode:r,colorPalette:o};return{bg:i,fg:ee(e.fg,a),border:ee(e.border,a)}}(e.kbd,{baseBg:u,colorPalette:a,blendMode:s}),link:{fg:ee(e.link.fg,c)},muted:{bg:ee(e.muted.bg,c),fg:ee(e.muted.fg,c)},shadow:p,skeleton:{from:ee(e.skeleton.from,c),to:ee(e.skeleton.to,c)},syntax:function(e,t){let{colorPalette:n,baseBg:r,blendMode:o}=t,i={colorPalette:n,bg:r,blendMode:o};return{atrule:ee(e.atrule,i),attrName:ee(e.attrName,i),attrValue:ee(e.attrValue,i),attribute:ee(e.attribute,i),boolean:ee(e.boolean,i),builtin:ee(e.builtin,i),cdata:ee(e.cdata,i),char:ee(e.char,i),class:ee(e.class,i),className:ee(e.className,i),comment:ee(e.comment,i),constant:ee(e.constant,i),deleted:ee(e.deleted,i),doctype:ee(e.doctype,i),entity:ee(e.entity,i),function:ee(e.function,i),hexcode:ee(e.hexcode,i),id:ee(e.id,i),important:ee(e.important,i),inserted:ee(e.inserted,i),keyword:ee(e.keyword,i),number:ee(e.number,i),operator:ee(e.operator,i),prolog:ee(e.prolog,i),property:ee(e.property,i),pseudoClass:ee(e.pseudoClass,i),pseudoElement:ee(e.pseudoElement,i),punctuation:ee(e.punctuation,i),regex:ee(e.regex,i),selector:ee(e.selector,i),string:ee(e.string,i),symbol:ee(e.symbol,i),tag:ee(e.tag,i),unit:ee(e.unit,i),url:ee(e.url,i),variable:ee(e.variable,i)}}(e.syntax,{baseBg:u,colorPalette:a,blendMode:s}),selectable:f}}function eo(e,t){let n={};for(let o of r)n[o]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:o}=t,i=e._blend||"multiply",a=ee(e.bg,{bg:n,blendMode:r,colorPalette:o});return{_blend:i,bg:a,fg:ee(e.fg,{bg:a,blendMode:i,colorPalette:o})}}(e[o],t);return n}function ei(e,t){let n={};for(let r of _)n[r]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:o}=t,i=ee(e.bg,{bg:n,blendMode:r,colorPalette:o}),a={bg:i,blendMode:r,colorPalette:o};return{bg:i,dot:ee(e.dot,a),fg:ee(e.fg,a),icon:ee(e.icon,a)}}(e[r],t);return n}function ea(e,t){let n={};for(let o of _){var r;n[o]={enabled:el((r=e[o]).enabled,t),hovered:el(r.hovered,t),pressed:el(r.pressed,t),selected:el(r.selected,t),disabled:el(r.disabled,t)}}return n}function el(e,t){let{baseBg:n,blendMode:r,colorPalette:o}=t,i=e._blend||"multiply",a=ee(e.bg,{bg:n,blendMode:r,colorPalette:o}),l={bg:a,blendMode:i,colorPalette:o};return{_blend:i,accent:{fg:ee(e.accent.fg,l)}
1,avatar:eo(e.avatar,{baseBg:a,colorPalette:o,blendMode:i}),badge:ei(e.badge,{baseBg:a,colorPalette:o,blendMode:i}),bg:a,border:ee(e.border,l),code:{bg:ee(e.code.bg,l),fg:ee(e.code.fg,l)},fg:ee(e.fg,l),icon:ee(e.icon,l),link:{fg:ee(e.link.fg,l)},muted:{bg:ee(e.muted.bg,l),fg:ee(e.muted.fg,l)},kbd:{bg:ee(e.kbd.bg,l),fg:ee(e.kbd.fg,l),border:ee(e.kbd.border,l)},skeleton:{from:ee(e.skeleton?.from,l),to:ee(e.skeleton?.to,l)}}}function es(e,t){return{enabled:eu(e.enabled,t),hovered:eu(e.hovered,t),readOnly:eu(e.readOnly,t),disabled:eu(e.disabled,t)}}function eu(e,t){let{baseBg:n,blendMode:r,colorPalette:o}=t,i=e._blend||"multiply",a=ee(e.bg,{colorPalette:o,bg:n,blendMode:r}),l={colorPalette:o,bg:a,blendMode:i};return{_blend:i,bg:a,border:ee(e.border,l),fg:ee(e.fg,l),muted:{bg:ee(e.muted.bg,l)},placeholder:ee(e.placeholder,l)}}function ec(e){let t=function(e){let t={color:function(e){let t=L(T,e);return{base:function(e){let t={};for(let n of E)t[n]=function(e,t){let n=L(e?.base?.["*"],e?.base?.[t]),o=n._hue||e?.base?.[t]?._hue||"gray";return{...n,_hue:o,avatar:r.reduce((e,t)=>({...e,[t]:L({_hue:t},n.avatar?.["*"],n.avatar?.[t])}),{}),badge:_.reduce((t,r)=>({...t,[r]:{_hue:e?.base?.[r]?._hue||o,...n.badge?.["*"],...n.badge?.[r]}}),{})}}(e,n);return t}(t),button:function(e){let t={};for(let n of C)t[n]=function(e,t){let n={};for(let o of _)n[o]=function(e,t,n){let o={};for(let i of j)o[i]=function(e,t,n,o){let i=L(e?.button?.[n]?.["*"]?.["*"],e?.button?.[n]?.[t]?.["*"],e?.button?.[n]?.["*"]?.[o],e?.button?.[n]?.[t]?.[o]),a=i._hue||e?.base?.[t]?._hue;return{...i,_hue:a,avatar:r.reduce((e,t)=>({...e,[t]:L({_hue:t},i.avatar?.["*"],i.avatar?.[t])}),{}),badge:_.reduce((t,n)=>({...t,[n]:{_hue:e?.base?.[n]?._hue||a,...i.badge?.["*"],...i.badge?.[n]}}),{})}}(e,n,t,i);return o}(e,t,o);return n}(e,n);return t}(t),input:function(e){let t={};for(let n of I)t[n]=function(e,t){let n={};for(let r of R)n[r]=function(e,t,n){let r=L(e?.input?.["*"]?.["*"],e?.
1input?.[t]?.["*"],e?.input?.["*"]?.[n],e?.input?.[t]?.[n]),o=r._hue||e?.input?.[t]?._hue;return{...r,_hue:o}}(e,t,r);return n}(e,n);return t}(t),selectable:function(e){let t={};for(let n of _)t[n]=function(e,t){let n={_hue:e?.selectable?.[t]?._hue||e?.base?.[t]?._hue};for(let o of j)n[o]=function(e,t,n){let o=L(e?.selectable?.["*"]?.["*"],e?.selectable?.[t]?.["*"],e?.selectable?.["*"]?.[n],e?.selectable?.[t]?.[n]),i=o._hue||e?.base?.[t]?._hue;return{...o,_hue:i,avatar:r.reduce((e,t)=>({...e,[t]:L({_hue:t},o.avatar?.["*"],o.avatar?.[t])}),{}),badge:_.reduce((t,n)=>({...t,[n]:{_hue:e?.base?.[n]?._hue||i,...o.badge?.["*"],...o.badge?.[n]}}),{})}}(e,t,o);return n}(e,n);return t}(t),syntax:t.syntax}}(e?.color)};return{light:F({scheme:"light"},t),dark:F({scheme:"dark"},t)}}(e);return v({_version:2,avatar:e?.avatar??a.avatar,button:e?.button??a.button,card:e?.card??a.card,color:function(e,t){let n=t?.palette??i;return{light:en(n,e.light),dark:en(n,e.dark)}}(t,e),container:e?.container??a.container,font:e?.font??l,input:e?.input??a.input,layer:e?.layer??a.layer,media:e?.media??a.media,radius:e?.radius??a.radius,shadow:e?.shadow??a.shadow,space:e?.space??a.space,style:e?.style??a.style})}let ed=new Map;function ef(e,t,n){var r;let o=function(e,t,n){let r=ed.get(t);if(!r)return;let o=r.get(n);if(o)return o.get(e)}(e,t,n);if(o)return o;let i=m(e)?v(e):e,l=m(e)?e:function(e){if(e.v2)return e.v2;let t=y.get(e);if(t)return t;let{avatar:n,button:r,color:o,container:i,fonts:l,input:s,layer:c,media:d,radius:f,shadows:p,space:h,styles:g}=e,m={_version:2,avatar:{...a.avatar,...n},button:{...a.button,...r},card:a.card,color:{light:{transparent:u(o.light.transparent),default:u(o.light.default),neutral:u(o.light.transparent),primary:u(o.light.primary),suggest:u(o.light.primary),positive:u(o.light.positive),caution:u(o.light.caution),critical:u(o.light.critical)},dark:{transparent:u(o.dark.transparent),default:u(o.dark.default),neutral:u(o.dark.transparent),primary:u(o.dark.primary),suggest:u(o.dark.primary),positive:u(o.dark.positive),caution:u(o.dark.caution),critical:u(o.dark.critical)}},container:i,font:l,input:{...a.input,...s,checkbox:{...a.input.checkbox,...s.checkbox},radio:{...a.input.radio,...s.radio},switch:{...a.input.switch,...s.switch}},layer:c??a.layer,media:d,radius:f,shadow:p,space:h,style:g};return y.set(e,m),m}(e),s=i.color[t]||i.color.light,c=s[n]||s.default,d=i.layer||a.layer,f=l.color[t]||l.color.light,p="neutral"in(r=f[n]||f.default).badge?r:{...r,badge:{...r.badge,neutral:r.badge.default,suggest:r.badge.primary},button:{bleed:{...r.button.bleed,neutral:r.button.bleed.default,suggest:r.button.bleed.primary},default:{...r.button.default,neutral:r.button.default.default,suggest:r.button.default.primary},ghost:{...r.button.ghost,neutral:r.button.ghost.default,suggest:r.button.ghost.primary}},selectable:{...r.selectable,neutral:r.selectable.default,suggest:r.selectable.primary}},h=l.layer||a.layer,g={sanity:{...i,color:c,layer:d,v2:{...l,_resolved:!0,color:p,layer:h}}};return function(e,t,n,r){ed.has(t)||ed.set(t,new Map);let o=ed.get(t);o.has(n)||o.set(n,new WeakMap),o.get(n).set(e,r)}(e,t,n,g),g}},48614:function(e,t,n){"use strict";n.d(t,{M:function(){return b}});var r=n(57437),o=n(2265),i=n(58881),a=n(53576),l=n(11534),s=n(64252),u=n(13537),c=n(45750);class d extends o.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=t.offsetParent,n=(0,u.R)(e)&&e.offsetWidth||0,r=this.props.sizeRef.current;r.height=t.offsetHeight||0,r.width=t.offsetWidth||0,r.top=t.offsetTop,r.left=t.offsetLeft,r.right=n-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}}function f(e){let{children:t,isPresent:n,anchorX:i,root:a}=e,l=(0,o.useId)(),s=(0,o.useRef)(null),u=(0,o.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:f}=(0,o.useContext)(c._);return(0,o.useInsertionEffect)(()=>{let{width:e,height:t,top:r,left:o,right:c}=u.current;if(n||!s.current||!e||!t)return;s.current.dataset.motionPopId=l;let d=document.createElement("style");f&&(d.nonce=f);let p=null!=a?a:document.head;return p.appendChild(d),d.sheet&&d.sheet.insertRule('\n [data-motion-pop-id="'.concat(l,'"] {\n position: absolute !important;\n width: ').concat(e,"px !important;\n height: ").concat(t,"px !important;\n ").concat("left"===i?"left: ".concat(o):"right: ".concat(c),"px !important;\n top: ").concat(r,"px !important;\n }\n ")),()=>{p.contains(d)&&p.removeChild(d)}},[n]),(0,r.jsx)(d,{isPresent:n,childRef:s,sizeRef:u,children:o.cloneElement(t,{ref:s})})}let p=e=>{let{children:t,initial:n,isPresent:i,onExitComplete:l,custom:u,presenceAffectsLayout:c,mode:d,anchorX:p,root:g}=e,m=(0,a.h)(h),y=(0,o.useId)(),b=!0,v=(0,o.useMemo)(()=>(b=!1,{id:y,initial:n,isPresent:i,custom:u,onExitComplete:e=>
1{for(let t of(m.set(e,!0),m.values()))if(!t)return;l&&l()},register:e=>(m.set(e,!1),()=>m.delete(e))}),[i,m,l]);return c&&b&&(v={...v}),(0,o.useMemo)(()=>{m.forEach((e,t)=>m.set(t,!1))},[i]),o.useEffect(()=>{i||m.size||!l||l()},[i]),"popLayout"===d&&(t=(0,r.jsx)(f,{isPresent:i,anchorX:p,root:g,children:t})),(0,r.jsx)(s.O.Provider,{value:v,children:t})};function h(){return new Map}var g=n(49637);let m=e=>e.key||"";function y(e){let t=[];return o.Children.forEach(e,e=>{(0,o.isValidElement)(e)&&t.push(e)}),t}let b=e=>{let{children:t,custom:n,initial:s=!0,onExitComplete:u,presenceAffectsLayout:c=!0,mode:d="sync",propagate:f=!1,anchorX:h="left",root:b}=e,[v,w]=(0,g.oO)(f),x=(0,o.useMemo)(()=>y(t),[t]),k=f&&!v?[]:x.map(m),S=(0,o.useRef)(!0),E=(0,o.useRef)(x),_=(0,a.h)(()=>new Map),[j,C]=(0,o.useState)(x),[I,R]=(0,o.useState)(x);(0,l.L)(()=>{S.current=!1,E.current=x;for(let e=0;e<I.length;e++){let t=m(I[e]);k.includes(t)?_.delete(t):!0!==_.get(t)&&_.set(t,!1)}},[I,k.length,k.join("-")]);let $=[];if(x!==j){let e=[...x];for(let t=0;t<I.length;t++){let n=I[t],r=m(n);k.includes(r)||(e.splice(t,0,n),$.push(n))}return"wait"===d&&$.length&&(e=$),R(y(e)),C(x),null}let{forceRender:O}=(0,o.useContext)(i.p);return(0,r.jsx)(r.Fragment,{children:I.map(e=>{let t=m(e),o=(!f||!!v)&&(x===I||k.includes(t));return(0,r.jsx)(p,{isPresent:o,initial:(!S.current||!!s)&&void 0,custom:n,presenceAffectsLayout:c,mode:d,root:b,onExitComplete:o?void 0:()=>{if(!_.has(t))return;_.set(t,!0);let e=!0;_.forEach(t=>{t||(e=!1)}),e&&(null==O||O(),R(E.current),f&&(null==w||w()),u&&u())},anchorX:h,children:e},t)})})}},15217:function(e,t,n){"use strict";let r,o;n.r(t),n.d(t,{default:function(){return lX}});var i,a,l,s,u,c,d,f,p,h=n(57437),g=n(98259),m=n(74951),y=n(2265),b=n(54887),v=n(50658),w=n(90535),x=n(92840);function k(e){return e.split(/[[.\]]/g).filter(Boolean).map(e=>e.includes("==")?function(e){let[t,n]=e.split("==");if("_key"!==t)throw Error(`Currently only "_key" is supported as path segment. Found ${t}`);if(typeof n>"u")throw Error('Invalid path segment, expected `key=="value"`');return{_key:n.replace(/^['"]/,"").replace(/['"]$/,"")}}(e):S.test(e)?Number(e):e)}let S=/^-?\d+$/,E=/^[a-z_$]+/;function _(e){return e.map((e,t)=>{var n;return n=0===t,Array.isArray(e)?`[${e[0]}:${e[1]||""}]`:"number"==typeof e?`[${e}]`:"object"==typeof e&&"_key"in e&&"string"==typeof e._key?`[_key==${JSON.stringify(e._key)}]`:"string"==typeof e&&E.test(e)?n?e:`.${e}`:`['${e}']`}).join("")}function j(e){if("createIfNotExists"in e)return{type:"createIfNotExists",document:e.createIfNotExists};if("createOrReplace"in e)return{type:"createOrReplace",document:e.createOrReplace};if("create"in e)return{type:"create",document:e.create};if("delete"in e)return{id:e.delete.id,type:"delete"};if("patch"in e){var t,n;return{type:"patch",id:e.patch.id,patches:[..."set"in(n=t=e.patch)?Object.keys(n.set).map(e=>({path:k(e),op:{type:"set",value:n.set[e]}})):[],..."setIfMissing"in t?Object.keys(t.setIfMissing).map(e=>({path:k(e),op:{type:"setIfMissing",value:t.setIfMissing[e]}})):[],..."unset"in t?t.unset.map(e=>({path:k(e),op:{type:"unset"}})):[],..."inc"in t?Object.keys(t.inc).map(e=>({path:k(e),op:{type:"inc",amount:t.inc[e]}})):[],..."inc"in t?Object.keys(t.dec).map(e=>({path:k(e),op:{type:"dec",amount:t.dec[e]}})):[],...function(e){if(!("insert"in e))return[];let t=function(e){let t=C.filter(t=>t in e);if(t.length>1)throw Error(`Insert patch is ambiguous. Should only contain one of: ${C.join(", ")}, instead found ${t.join(", ")}`);return t[0]}(e.insert);if(!t)throw Error("Insert patch missing position");let n=k(e.insert[t]),r=n.pop();return[{path:n,op:{type:"insert",position:t,referenceItem:r,items:e.insert.items}}]}(t)]}}throw Error(`Unknown mutation: ${JSON.stringify(e)}`)}let C=["before","replace","after"];function I(e){return $(e)}function R(e){return e.flatMap(I)}function $(e){if("create"===e.type||"createIfNotExists"===e.type||"createOrReplace"===e.type)return{[e.type]:e.document};if("delete"===e.type)return{delete:{id:e.id}};let t=e.options?.ifRevision;return e.patches.map(n=>({patch:{id:e.id,...t&&{ifRevisionID:t},...function(e){let{path:t,op:n}=e;if("unset"===n.type)return{unset:[_(t)]};if("insert"===n.type)return{insert:{[n.position]:_([...t,n.referenceItem]),items:n.items}};if("diffMatchPatch"===n.type)return{diffMatchPatch:{[_(t)]:n.value}};if("inc"===n.type)return{inc:{[_(t)]:n.amount}};if("dec"===n.type)return{dec:{[_(t)]:n.amount}};if("set"===n.type||"setIfMissing"===n.type)return{[n.type]:{[_(t)]:n.value}};if("truncate"===n.type){let e=[n.startIndex,"number"==typeof n.endIndex?n.endIndex:""].join(":");return{unset:[`${_(t)}
1[${e}]`]}}if("upsert"===n.type)return{unset:n.items.map(e=>_([...t,{_key:e._key}])),insert:{[n.position]:_([...t,n.referenceItem]),items:n.items}};if("assign"===n.type)return{set:Object.fromEntries(Object.keys(n.value).map(e=>[_(t.concat(e)),n.value[e]]))};if("unassign"===n.type)return{unset:n.keys.map(e=>_(t.concat(e)))};if("replace"===n.type)return{insert:{replace:_(t.concat(n.referenceItem)),items:n.items}};if("remove"===n.type)return{unset:[_(t.concat(n.referenceItem))]};throw Error(`Unknown operation type ${n.type}`)}(n)}}))}function O(e){return Array.isArray(e)?e:[e]}var M=Object.freeze({__proto__:null,decode:function(e){return j(e)},decodeAll:function(e){return e.map(j)},encode:I,encodeAll:R,encodeMutation:$,encodeTransaction:function(e){return{transactionId:e.id,mutations:R(e.mutations)}}});function A(e,t,n){return{type:"insert",referenceItem:n,position:t,items:O(e)}}function z(e,t){return{type:"truncate",startIndex:e,endIndex:t}}function N(e){return{type:"remove",referenceItem:e}}function T(e,t){return{path:"string"==typeof e?k(e):e,op:t}}var P=n(40211);let L=(0,P.ah)(),D=L,F=new Set,B=/_key\s*==\s*['"](.*)['"]/,H=/^\d*:\d*$/;function U(e){return"number"==typeof e||"string"==typeof e&&/^\[\d+\]$/.test(e)}function V(e){return"string"==typeof e?B.test(e.trim()):"object"==typeof e&&"_key"in e}let G=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,W=/_key\s*==\s*['"](.*)['"]/;function q(e,t,n){let r="string"==typeof t?function(e){if("string"!=typeof e)throw Error("Path is not a string");let t=e.match(G);if(!t)throw Error("Invalid path string");return t.map(Y)}(t):t;if(!Array.isArray(r))throw Error("Path must be an array or a string");let o=e;for(let e=0;e<r.length;e++){let t=r[e];if(U(t)){if(!Array.isArray(o))return n;o=o[t]}if(V(t)){if(!Array.isArray(o))return n;o=o.find(e=>e._key===t._key)}if("string"==typeof t&&(o="object"==typeof o&&null!==o?o[t]:void 0),typeof o>"u")return n}return o}function Y(e){return U(e)?Number(e.replace(/[^\d]/g,"")):V(e)?{_key:e.match(W)[1]}:!function(e){if("string"==typeof e&&H.test(e))return!0;if(!Array.isArray(e)||2!==e.length)return!1;let[t,n]=e;return("number"==typeof t||""===t)&&("number"==typeof n||""===n)}(e)?e:function(e){let[t,n]=e.split(":").map(e=>""===e?e:Number(e));return[t,n]}(e)}function Z(){return(0,y.useSyncExternalStore)(Q,X,K)}function K(){return L}function X(){return D}function Q(e){return F.add(e),()=>F.delete(e)}function J(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(e,r)},t)}}function ee(e,t){let n=(0,m.el)(),r=(0,m.Ax)();if(t===L||!n&&!r)throw Error("The `useDocuments` hook cannot be used in this context");let o=(0,v.qy)(e),i=(0,v.vs)(e),a=t.getSnapshot().context?.documents,l=a?.[o],s=a?.[i],u=l||s;if(!u)throw Error(`Document "${e}" not found`);let c=l.getSnapshot().context?.local||s.getSnapshot().context?.local,d=new Promise(e=>{if(c)e(c);else{let t=u.on("ready",n=>{let{snapshot:r}=n;e(r||null),t.unsubscribe()})}});return{draftDoc:l,draftId:o,getSnapshot:()=>d,publishedDoc:s,publishedId:i,get snapshot(){if(!c)throw Error(`Snapshot for document "${e}" not found`);return c}}}function et(){let e,t,n;let r=(0,g.c)(7),o=Z();r[0]!==o?(e=e=>({id:e,commit:()=>{let{draftDoc:t}=ee(e,o);t.send({type:"submit"})},get:t=>{let{snapshot:n}=ee(e,o);return t?q(n,t):n},getSnapshot:function(e,t){let{getSnapshot:n}=ee(e,t);return n}(e,o),patch:async(t,n)=>{let r=ee(e,o),{draftDoc:i,draftId:a,getSnapshot:l,publishedId:s}=r,{commit:u=!0}=n||{},c=await ("function"==typeof t?t({draftId:a,publishedId:s,get snapshot(){return r.snapshot},getSnapshot:l}):t),d=await l();if(!d)throw Error(`Snapshot for document "${e}" not found`);i.send({type:"mutate",mutations:[{type:"createIfNotExists",document:{...d,_id:a}},{type:"patch",id:a,patches:O(c)}]}),u&&("object"==typeof u&&"debounce"in u?J(()=>i.send({type:"submit"}),u.debounce)():i.send({type:"submit"}))}}),r[0]=o,r[1]=e):e=r[1];let i=e;r[2]!==o?(t=(e,t,n)=>{let{draftDoc:r}=ee(e,o),{commit:i}=n||{},a=void 0===i||i;r.send({type:"mutate",mutations:t}),a&&("object"==typeof a&&"debounce"in a?J(()=>r.send({type:"submit"}),a.debounce)():r.send({type:"submit"}))},r[2]=o,r[3]=t):t=r[3];let a=t;return r[4]!==i||r[5]!==a?(n={getDocument:i,mutateDocument:a},r[4]=i,r[5]=a,r[6]=n):n=r[6],n}let en=()=>
1{if(o)return o;o=[];for(let e=0;e<256;++e)o[e]=(e+256).toString(16).slice(1);return o};function er(e){let t=en();return(function(e=16){let t=new Uint8Array(e);return function(e){let t="undefined"!=typeof window&&"crypto"in window?window.crypto:globalThis.crypto;if(!t||!t.getRandomValues)throw Error("WebCrypto not available in this environment");t.getRandomValues(e)}(t),t})(e).reduce((e,n)=>e+t[n],"").slice(0,e)}function eo(e){let t,n;let r="string"==typeof e?e:e.path,o=r.lastIndexOf("."),i=r.substring(o+1,r.length);if(!i.indexOf("["))throw Error("Invalid path: not an array");let a=r.lastIndexOf("["),l=r.substring(0,a);if(i.includes("_key")){let e=i.indexOf('"')+1,r=i.indexOf('"',e);t=i.substring(e,r),n=!0}else{let e=i.indexOf("[")+1,r=i.indexOf("]",e);t=i.substring(e,r),n=!1}if(!l||!t)throw Error("Invalid path");return{path:l,key:t,hasExplicitKey:n}}async function ei(e,t,n){if(!e.type)throw Error("Node type is missing");let{path:r,key:o}=eo(e),i=await t.getSnapshot(),a=q(i,r),l=q(i,e.path),s=a.findIndex(e=>e._key===o),u=-1,c="before";if("first"===n){if(0===s)return[];u=0,c="before"}else if("last"===n){if(s===a.length-1)return[];u=-1,c="after"}else if("next"===n){if(s===a.length-1)return[];u=s,c="after"}else if("previous"===n){if(0===s)return[];u=s-1,c="before"}return[T(r,z(s,s+1)),T(r,A(l,c,u))]}var ea=n(78624);let el=(0,ea.zGw)((0,ea.Z_8)(),(0,ea.EiV)(1)),es=(0,ea.jtO)(el),eu=(0,ea.Ryn)({baseUrl:el,dataset:es,id:el,path:el,projectId:es,tool:es,type:es,workspace:es}),ec=/^([\w-]+):(0|[1-9][0-9]*)$/,ed=/^([\w-]+):([0-9]+),([0-9]+)$/,ef=/^([\w-]+):([\w-]+)$/,ep=(0,ea.zGw)((0,ea.Z_8)(),(0,ea.EiV)(1)),eh=(0,ea.Ryn)({origin:ep,href:ep,data:(0,ea.jtO)((0,ea.IMB)((0,ea.Z_8)(),(0,ea._4T)()))});function eg(e){let t=(0,ea.AsG)(eu,e);if(t.success)return t.output;let n=(0,ea.AsG)(eh,e);if(n.success)try{let e=new URL(n.output.href,typeof document>"u"?"https://example.com":location.origin);return e.searchParams.size>0?(0,ea.Qc3)(eu,Object.fromEntries(e.searchParams.entries())):n.output}catch(e){return console.error("Failed to parse sanity node",e),n.output}}var em={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},ey={0:8203,1:8204,2:8205,3:65279},eb=[,,,,].fill(String.fromCodePoint(ey[0])).join(""),ev=Object.fromEntries(Object.entries(ey).map(e=>e.reverse())),ew=Object.fromEntries(Object.entries(em).map(e=>e.reverse())),ex=`${Object.values(em).map(e=>`\\u{${e.toString(16)}}`).join("")}`,ek=RegExp(`[${ex}]{4,}`,"gu");let eS=[];for(let e=0;e<256;++e)eS.push((e+256).toString(16).slice(1));let eE=new Uint8Array(16);var e_={randomUUID:"u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ej(e,t,n){if(e_.randomUUID&&!e)return e_.randomUUID();let o=(e=e||{}).random??e.rng?.()??function(){if(!r){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(eE)}();if(o.length<16)throw Error("Random bytes length must be >= 16");return o[6]=15&o[6]|64,o[8]=63&o[8]|128,function(e,t=0){return(eS[e[t+0]]+eS[e[t+1]]+eS[e[t+2]]+eS[e[t+3]]+"-"+eS[e[t+4]]+eS[e[t+5]]+"-"+eS[e[t+6]]+eS[e[t+7]]+"-"+eS[e[t+8]]+eS[e[t+9]]+"-"+eS[e[t+10]]+eS[e[t+11]]+eS[e[t+12]]+eS[e[t+13]]+eS[e[t+14]]+eS[e[t+15]]).toLowerCase()}(o)}function eC(e){let t=e.getBoundingClientRect();return{x:t.x+scrollX,y:t.y+scrollY,w:t.width,h:t.height}}function eI(e,t,n){return"x"===n?{x:e.x+t,y:e.y,w:e.w-2*t,h:e.h}:{x:e.x,y:e.y+t,w:e.w,h:e.h-2*t}}function eR(e,t){return e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}function e$(e,t){let n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function eO(e,t,n){let r,o;let i={x:e.x1,y:e.y1};if(t.some(e=>(function(e,t){let n=e.x>=t.x&&e.x<=t.x+t.w,r=e.y>=t.y&&e.y<=t.y+t.h;return n&&r})(i,eI(e,Math.min(e.w,e.h)/10,"horizontal"===n?"x":"y"))))return null;for(let a of t){let t=function(e,t){let n=[{x1:t.x,y1:t.y,x2:t.x+t.w,y2:t.y},{x1:t.x+t.w,y1:t.y,x2:t.x+t.w,y2:t.y+t.h},{x1:t.x+t.w,y1:t.y+t.h,x2:t.x,y2:t.y+t.h},{x1:t.x,y1:t.y+t.h,x2:t.x,y2:t.y}],r=[];for(let t=0;t<n.length;t++){let o=function(e,t){let{x1:n,y1:r,x2:o,y2:i}=e,{x1:a,y1:l,x2:s,y2:u}=t;if(n===o&&r===i||a===s&&l===u)return!1;let c=(u-l)*(o-n)-(s-a)*(i-r);if(0===c)return!1;let d=((s-a)*(r-l)-(u-l)*(n-a))/c,f=((o-n)*(r-l)-(i-r)*(n-a))/c;return!(d<0)&&!(d>1)&&!(f<0)&&!(f>1)&&{x:n+d*(o-n),y:r+d*(i-r)}}(e,n[t]);if(o){let e=!1;for(let t=0;t<r.length;t++)r[t].x===o.x&&r[t].y===o.y&&(e=!0);e||r.push(o)}}return 0!==r.length&&r.sort((t,n)=>e$(t,{x:e.x1,y:e.y1})-e$(n,{x:e.x1,y:e.y1}))}(e,eI(a,Math.min(a.w,a.h)/10,"horizontal"===n?"x":"y"));if(t){let e=t[0];r?e$(i,e)<e$(i,r)&&(r=e,o=a):(r=e,o=a)}}return o||null}function eM(e,t,n){let{x:r,y:o,w:i,h:a}=e,{x:l,y:s}=n;return{x:l+(r-l)*t,y:s+(o-s)*t,w:i*t,h:a*t}}function eA(e){let t=Math.max(0,Math.min(...e.map(e=>e.y))),n=Math.min(document.body.scrollHeight,Math.max(...e.map(e=>e.y+e.h)));return{min:t,max:n,height:n-t}}function ez(e,t){return t.find(t=>eR(eC(t.elements.element),e))?.sanity}
1function eN(e,t,n){return Object.values(t).every(e=>null===e)?null:"horizontal"===n?{left:t.left?{rect:t.left,sanity:ez(t.left,e)}:null,right:t.right?{rect:t.right,sanity:ez(t.right,e)}:null}:{top:t.top?{rect:t.top,sanity:ez(t.top,e)}:null,bottom:t.bottom?{rect:t.bottom,sanity:ez(t.bottom,e)}:null}}function eT(e){let t=document.body.getBoundingClientRect();return{x:Math.max(t.x,Math.min(e.clientX,t.x+t.width)),y:e.clientY+window.scrollY}}function eP(e,t,n){let r=eC(t),o=[...t.querySelectorAll(":where(h1, h2, h3, h4, p, a, img, span, button):not(:has(*))")];e.x<=r.x&&(e.x=r.x),e.x>=r.x+r.w&&(e.x=r.x+r.w),e.y>=r.y+r.h&&(e.y=r.y+r.h),e.y<=r.y&&(e.y=r.y);let i=o.map(e=>{let t=eM(eC(e),n,{x:r.x,y:r.y});return{x:t.x-r.x,y:t.y-r.y,w:t.w,h:t.h,tagName:e.tagName}});return{offsetX:(r.x-e.x)*n,offsetY:(r.y-e.y)*n,w:r.w*n,h:r.h*n,maxWidth:r.w*n*.75,childRects:i}}async function eL(e,t,n,r,o){return new Promise(i=>{e.addEventListener("transitionend",()=>{setTimeout(()=>{r({type:"overlay/dragEndMinimapTransition"})},2*o),i()},{once:!0}),r({type:"overlay/dragStartMinimapTransition"}),r({type:"overlay/dragToggleMinimap",display:!0}),document.body.style.overflow="hidden",document.body.style.height="100%",document.documentElement.style.overflow="initial",document.documentElement.style.height="100%",setTimeout(()=>{e.style.transformOrigin="50% 0px",e.style.transition="transform 150ms ease",e.style.transform=`translate3d(0px, ${-n+scrollY}px, 0px) scale(${t})`},25)})}function eD(e){let t=function(e){let t=Math.max(0,Math.min(...e.map(e=>e.x))),n=Math.min(document.body.offsetWidth,Math.max(...e.map(e=>e.x+e.w)));return{min:t,max:n,width:n-t}}(e),n=eA(e),r=t.min>8&&t.min+t.width<=window.innerWidth-8,o=n.min>8&&n.min+n.height<=document.body.scrollHeight-8,i=r&&o;return{x:i?t.min-8:t.min,y:i?n.min-8:n.min,w:i?t.width+16:t.width,h:i?n.height+16:n.height}}async function eF(e,t,n,r,o,i){return new Promise(a=>{if(1===new DOMMatrix(window.getComputedStyle(t).transform).a)return;let l=n-window.innerHeight,s=scrollY;(e-=window.innerHeight/2)<0&&(e=0),t.addEventListener("transitionend",()=>{t.style.transition="none",t.style.transform="none",scrollTo({top:e,behavior:"instant"}),setTimeout(()=>{r({type:"overlay/dragEndMinimapTransition"}),r({type:"overlay/dragToggleMinimap",display:!1})},2*o),a()},{once:!0}),r({type:"overlay/dragStartMinimapTransition"}),t.style.transform=`translateY(${Math.max(s-e,-l+s)}px) scale(1)`,i&&(document.body.style.overflow=i.body.overflow,document.body.style.height=i.body.height,document.documentElement.style.overflow=i.documentElement.overflow,document.documentElement.style.height=i.documentElement.height)})}let eB=!1,eH={y:0},eU={x:0,y:0},eV=typeof document>"u"?0:document.documentElement.scrollHeight,eG=null,eW=e=>e instanceof HTMLElement||e instanceof SVGElement,eq=e=>e&&eW(e)?e.dataset?.sanityOverlayElement?e:eq(e.parentElement):null;function eY(e){return ek.lastIndex=0,ek.test(e)}function eZ(e,t=!1){return eY(e)?function(e,t=!1){try{let n=function(e){let t=e.match(ek);if(t)return function(e,t=!1){let n=Array.from(e);if(n.length%2==0){if(n.length%4||!e.startsWith(eb))return function(e,t){var n;let r=[];for(let t=.5*e.length;t--;){let n=`${ew[e[2*t].codePointAt(0)]}${ew[e[2*t+1].codePointAt(0)]}`;r.unshift(String.fromCharCode(parseInt(n,16)))}let o=[],i=[r.join("")],a=10;for(;i.length;){let e=i.shift();try{if(o.push(JSON.parse(e)),t)break}catch(r){if(!a--)throw r;let t=+(null==(n=r.message.match(/\sposition\s(\d+)$/))?void 0:n[1]);if(!t)throw r;i.unshift(e.substring(0,t),e.substring(t))}}return o}(n,t)}else throw Error("Encoded data has invalid length");let r=[];for(let e=.25*n.length;e--;){let t=n.slice(4*e,4*e+4).map(e=>ev[e.codePointAt(0)]).join("");r.unshift(String.fromCharCode(parseInt(t,4)))}if(t){r.shift();let e=r.indexOf("\0");return -1===e&&(e=r.length),[JSON.parse(r.slice(0,e).join(""))]}return r.join("").split("\0").filter(Boolean).map(e=>JSON.parse(e))}(t[0],!0)[0]}(e);return n&&"sanity.io"===n.origin?(t&&(n.href=n.href?.replace(".alt","")),n):null}catch(t){return console.error("Failed to decode stega for string: ",e,"with the original error: ",t),null}}(e,t):null}let eK=e=>e.nodeType===Node.ELEMENT_NODE,eX=e=>"IMG"===e.tagName,eQ=e=>"TIME"===e.tagName,eJ=e=>"SVG"===e.tagName.toUpperCase();function e0(e){return"path"in e}function e1(e){if(!e.length||!e.map(e=>e0(e)).every((e,t,n)=>e===n[0]))return;if(!e0(e[0]))return e[0];let t=e.filter(e0),n=e[0],r=["projectId","dataset","id","baseUrl","workspace","tool"];for(let e=1;e<t.length;e++){let o=t[e];if(r.some(e=>o[e]!==n?.[e])){n=void 0;break}n={...n,path:function(e,t){let n=e.split("."),r=t.split("."),o=Math.min(n.length,r.length);return n=n.slice(0,o).reverse(),r=r.slice(0,o).reverse(),n.reduce((e,t,n
1)=>t===r[n]?[...e,t]:[],[]).reverse().join(".")}(n.path,o.path)}}return n}function e2(e){let t=e.lastIndexOf(".");return e.substring(t,e.length).includes("[")}function e5(e){if(!e2(e))return null;let t=e.split(".");return t[t.length-1]=t[t.length-1].replace(/\[.*?\]/g,"[]"),t.join(".")}function e3(e,t){return!!(e2(e.path)&&e2(t.path))&&e5(e.path)===e5(t.path)}function e4(e,t,n,r){if(!e.getAttribute("data-sanity")||e.getAttribute("data-sanity-drag-disable")||!t||!e0(t)||!e2(t.path))return null;let o=e.getAttribute("data-sanity-drag-group"),i=[...n].reduce((e,n)=>{let i=r.get(n),a=n.getAttribute("data-sanity-drag-disable"),l=n.getAttribute("data-sanity-drag-group"),s=null!==n.getAttribute("data-sanity");return i?.sanity&&!a&&e0(i.sanity)&&e3(t,i.sanity)&&(null===o||o===l)&&s&&e.push(i),e},[]);return i.length<=1?null:i}let e6=(0,y.createContext)(null);var e8=n(23129),e9=n(71033),e7=n(57685),te=n(59679);function tt(e){let t=function e(t){return!!t&&("object"==typeof t||"function"==typeof t)&&("reference"===t.name||e(t.type))}(e)&&1===(e.to??[]).length?e.to[0].icon:void 0;return e.icon??e.type?.icon??t}function tn(e,t){return{query:"change query"===t.type?t.query:e.query,groups:"select group"===t.type?e.groups.map(e=>({...e,selected:t.name===e.name})):e.groups,views:"toggle view"===t.type?e.views.map(e=>({...e,selected:t.name===e.name})):e.views}}let tr="all-items",to={gridTemplateColumns:"repeat(auto-fill, minmax(118px, 1fr))"};function ti(e){let t,n,r,o,i,a,l,s,u,c,d,f,p,g,m,b;let v=(0,e8.c)(54),x=void 0===e.showIcons||e.showIcons,k=void 0===e.filter||"auto"===e.filter?e.schemaTypes.length>5:e.filter;v[0]!==e.groups||v[1]!==e.labels?(t=e.groups?[{name:tr,title:e.labels["insert-menu.filter.all-items"],selected:!0},...e.groups.map(ts)]:[],v[0]=e.groups,v[1]=e.labels,v[2]=t):t=v[2],v[3]!==e.views?(n=e.views??[{name:"list"}],v[3]=e.views,v[4]=n):n=v[4],v[5]!==n?(r=n.map(tl),v[5]=n,v[6]=r):r=v[6],v[7]!==t||v[8]!==r?(o={query:"",groups:t,views:r},v[7]=t,v[8]=r,v[9]=o):o=v[9];let[S,E]=(0,y.useReducer)(tn,o);if(v[10]!==e||v[11]!==k||v[12]!==x||v[13]!==S.groups||v[14]!==S.query||v[15]!==S.views){var _,j,C;let t,n,r;let o=(_=e.schemaTypes,j=S.query,C=S.groups,_.filter(e=>(function(e,t){let n=t.find(e=>e.selected);return!n||n.name===tr||n.of?.includes(e.name)})(e,C)&&function(e,t){let n=t.trim().toLowerCase();return e.title?e.title?.toLowerCase().includes(n):e.name.includes(n)}(e,j))),g=S.views.find(ta),m=k||S.views.length>1,y=S.groups&&S.groups.length>0,b=m||y;l=w.v2,p=0,a=w.kC,c="column",d="fill",v[25]!==b?(t=b?{style:{borderBottom:"1px solid var(--card-border-color)"},paddingBottom:1}:{},v[25]=b,v[26]=t):t=v[26],v[27]!==e.labels||v[28]!==k||v[29]!==m||v[30]!==S.query||v[31]!==S.views?(n=m?(0,h.jsxs)(w.kC,{flex:"none",align:"center",paddingTop:1,paddingX:1,gap:1,children:[k?(0,h.jsx)(w.xu,{flex:1,children:(0,h.jsx)(w.oi,{autoFocus:!0,border:!1,fontSize:1,icon:e9.W1M,onChange:e=>{E({type:"change query",query:e.target.value})},placeholder:e.labels["insert-menu.search.placeholder"],value:S.query})}):null,S.views.length>1?(0,h.jsx)(w.xu,{flex:"none",children:(0,h.jsx)(td,{views:S.views,onToggle:e=>{E({type:"toggle view",name:e})},labels:e.labels})}):null]}):null,v[27]=e.labels,v[28]=k,v[29]=m,v[30]=S.query,v[31]=S.views,v[32]=n):n=v[32],v[33]!==y||v[34]!==S.groups?(r=y?(0,h.jsx)(w.xu,{paddingTop:1,paddingX:1,children:(0,h.jsx)(w.td,{space:1,children:S.groups.map(e=>(0,h.jsx)(w.OK,{id:`${e.name}-tab`,"aria-controls":`${e.name}-panel`,label:e.title??e7(e.name),selected:e.selected,onClick:()=>{E({type:"select group",name:e.name})}},e.name))})}):null,v[33]=y,v[34]=S.groups,v[35]=r):r=v[35],v[36]!==t||v[37]!==n||v[38]!==r?(f=(0,h.jsxs)(w.xu,{...t,children:[n,r]}),v[36]=t,v[37]=n,v[38]=r,v[39]=f):f=v[39],i=w.xu,s=1,u=0===o.length?(0,h.jsx)(w.xu,{padding:2,children:(0,h.jsx)(w.xv,{muted:!0,size:1,children:e.labels["insert-menu.search.no-results"]})}):g?"grid"===g.name?(0,h.jsx)(w.rj,{autoRows:"auto",flex:1,gap:1,style:to,children:o.map(t=>(0,h.jsx)(tp,{icon:x?tt(t):void 0,onClick:()=>{e.onSelect(t)},previewImageUrl:g.previewImageUrl?.(t.name),schemaType:t}
1,t.name))}):(0,h.jsx)(w.Kq,{flex:1,space:1,children:o.map(t=>(0,h.jsx)(w.sN,{icon:x?tt(t):void 0,onClick:()=>{e.onSelect(t)},text:t.title??e7(t.name)},t.name))}):null,v[10]=e,v[11]=k,v[12]=x,v[13]=S.groups,v[14]=S.query,v[15]=S.views,v[16]=i,v[17]=a,v[18]=l,v[19]=s,v[20]=u,v[21]=c,v[22]=d,v[23]=f,v[24]=p}else i=v[16],a=v[17],l=v[18],s=v[19],u=v[20],c=v[21],d=v[22],f=v[23],p=v[24];return v[40]!==i||v[41]!==s||v[42]!==u?(g=(0,h.jsx)(i,{padding:s,children:u}),v[40]=i,v[41]=s,v[42]=u,v[43]=g):g=v[43],v[44]!==a||v[45]!==g||v[46]!==c||v[47]!==d||v[48]!==f?(m=(0,h.jsxs)(a,{direction:c,height:d,children:[f,g]}),v[44]=a,v[45]=g,v[46]=c,v[47]=d,v[48]=f,v[49]=m):m=v[49],v[50]!==l||v[51]!==m||v[52]!==p?(b=(0,h.jsx)(l,{padding:p,children:m}),v[50]=l,v[51]=m,v[52]=p,v[53]=b):b=v[53],b}function ta(e){return e.selected}function tl(e,t){return{...e,selected:0===t}}function ts(e){return{...e,selected:!1}}let tu={grid:e9.dd_,list:e9.AEM},tc={grid:"insert-menu.toggle-grid-view.tooltip",list:"insert-menu.toggle-list-view.tooltip"};function td(e){let t,n,r,o;let i=(0,e8.c)(11),a=e.views.findIndex(tf),l=e.views[a+1]??e.views[0],s=e.labels[tc[l.name]];i[0]!==s?(t=(0,h.jsx)(w.xv,{size:1,children:s}),i[0]=s,i[1]=t):t=i[1];let u=tu[l.name];return i[2]!==l.name||i[3]!==e?(n=()=>{e.onToggle(l.name)},i[2]=l.name,i[3]=e,i[4]=n):n=i[4],i[5]!==u||i[6]!==n?(r=(0,h.jsx)(w.zx,{mode:"bleed",icon:u,onClick:n}),i[5]=u,i[6]=n,i[7]=r):r=i[7],i[8]!==t||i[9]!==r?(o=(0,h.jsx)(w.u,{content:t,placement:"top",portal:!0,children:r}),i[8]=t,i[9]=r,i[10]=o):o=i[10],o}function tf(e){return e.selected}function tp(e){let t,n,r,o,i,a,l,s,u;let c=(0,e8.c)(19),[d,f]=(0,y.useState)(!1),p=e.icon;c[0]===Symbol.for("react.memo_cache_sentinel")?(t={overflow:"hidden"},c[0]=t):t=c[0],c[1]===Symbol.for("react.memo_cache_sentinel")?(n={backgroundColor:"var(--card-muted-bg-color)",paddingBottom:"66.6%",position:"relative"},c[1]=n):n=c[1],c[2]!==p?(r=(0,te.isValidElementType)(p)?(0,h.jsx)(w.kC,{align:"center",justify:"center",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,h.jsx)(w.xv,{size:1,children:(0,h.jsx)(p,{})})}):null,c[2]=p,c[3]=r):r=c[3],c[4]!==d||c[5]!==e.previewImageUrl?(o=!e.previewImageUrl||d?null:(0,h.jsx)("img",{src:e.previewImageUrl,style:{objectFit:"contain",width:"100%",height:"100%",position:"absolute",inset:0},onError:()=>{f(!0)}}),c[4]=d,c[5]=e.previewImageUrl,c[6]=o):o=c[6],c[7]===Symbol.for("react.memo_cache_sentinel")?(i=(0,h.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",boxShadow:"inset 0 0 0 0.5px var(--card-fg-color)",opacity:.1}}),c[7]=i):i=c[7],c[8]!==r||c[9]!==o?(a=(0,h.jsxs)(w.xu,{flex:"none",style:n,children:[r,o,i]}),c[8]=r,c[9]=o,c[10]=a):a=c[10];let g=e.schemaType.title??e.schemaType.name;return c[11]!==g?(l=(0,h.jsx)(w.xu,{flex:1,padding:2,children:(0,h.jsx)(w.xv,{size:1,weight:"medium",children:g})}),c[11]=g,c[12]=l):l=c[12],c[13]!==a||c[14]!==l?(s=(0,h.jsxs)(w.kC,{direction:"column",gap:1,padding:1,children:[a,l]}),c[13]=a,c[14]=l,c[15]=s):s=c[15],c[16]!==e.onClick||c[17]!==s?(u=(0,h.jsx)(w.sN,{padding:0,radius:2,onClick:e.onClick,style:t,children:s}),c[16]=e.onClick,c[17]=s,c[18]=u):u=c[18],u}function th(e){if(!e)return(0,h.jsx)(e9.FMB,{});if("string"===e.type)return(0,h.jsx)(e9.Rhe,{});if("number"===e.type)return(0,h.jsx)(e9.yEv,{});let{value:t}=e;if("icon"in e&&e.icon)return(0,h.jsx)("div",{dangerouslySetInnerHTML:{__html:e.icon}});let{type:n}=t;if("string"===n)return(0,h.jsx)(e9.Rhe,{});if("boolean"===n)return(0,h.jsx)(e9.nSX,{});if("number"===n)return(0,h.jsx)(e9.yEv,{});if("array"===n||"union"===n)return(Array.isArray(t.of)?t.of:[t.of]).some(e=>"name"in e&&"block"===e.name)?(0,h.jsx)(e9.aI,{}):(0,h.jsx)(e9.DZP,{});if("object"===n){if("image"===e.name)return(0,h.jsx)(e9.XBm,{});if("block"===e.name)return(0,h.jsx)(e9.Rhe,{})}return(0,h.jsx)(e9.FMB,{})}let tg=(0,x.iv)` 2 overflow-y: scroll; 3 overscroll-behavior: contain; 4 -ms-overflow-style: none; 5 scrollbar-width: none; 6 7 &:before { 8 content: ''; 9 display: block; 10 height: calc(100% + 1px); 11 position: absolute; 12 top: 0; 13 width: 100%; 14 z-index: -1; 15 } 16`,tm=x.zo.div` 17 height: 100%; 18 inset: 0; 19 pointer-events: all; 20 position: fixed; 21 width: 100%; 22 display: flex; 23 justify-content: center; 24 align-items: center; 25 26 ${e=>e.$blockScroll&&tg} 27`,ty=x.zo.div` 28 background: transparent; 29 height: 100%; 30 inset: 0; 31 position: absolute; 32 width: 100%; 33`,tb=e=>{let t;let n=(0,g.c)(2);return n[0]!==e?(t=(0,h.jsx)(w.h_,{children:(0,h.jsx)(tv,{...e})}),n[0]=e,n[1]=t):t=n[1],t},tv=e=>{let t,n;let r=(0,g.c)(7),{children:o,onDismiss:i,setBoundaryElement:a,blockScroll:l}=e,s=void 0===l||l;return r[0]!==i?(t=(0,h.jsx)(ty,{onMouseDownCapture:()=>{i?.()}}),r[0]=i,r[1]=t):t=r[1],r[2]!==s||r[3]!==o||r[4]!==a||r[5]!==t?(n=(0,h.jsxs)(tm,{"data-sanity-overlay-element":!0,ref:a,onClick:tw,$blockScroll:s,children:[t,o]}),r[2]=s,r[3]=o,r[4]=a,r[5]=t,r[6]=n):n=r[6],n};function tw(e){e.stopPropagation()}function tx(e){return{type:"log",name:e.name,version:e.version,description:e.description,maxSampleRate:e.maxSampleRate,schema:void 0}}let tk={"Visual Editing Drag Sequence Completed":tx({name:"Visual Editing Drag Sequence Completed",description:"An array is successfully reordered using drag and drop.",version:1}),"Visual Editing Drag Minimap Enabled":tx({name:"Visual Editing Drag Minimap Enabled",description:"The zoomed-out minimap view is enabled during a drag sequence.",version:1}),"Visual Editing Context Menu Item Removed":tx({name:"Visual Editing Context Menu Item Removed",description:"An item is removed using the Context Menu.",version:1}),"Visual Editing Context Menu Item Duplicated":tx({name:"Visual Editing Context Menu Item Duplicated",description:"An item is duplicated using the Context Menu.",version:1}),"Visual Editing Context Menu Item Moved":tx({name:"Visual Editing Context Menu Item Moved",description:"An item is moved using the Context Menu.",version:1}),"Visual Editing Context Menu Item Inserted":tx({name:"Visual Editing Context Menu Item Inserted",description:"An item is inserted using the Context Menu.",version:1}),"Visual Editing Insert Menu Item Inserted":tx({name:"Visual Editing Insert Menu Item Inserted",description:"An item is inserted using the Insert Menu.",version:1}),"Visual Editing Overlay Clicked":tx({name:"Visual Editing Overlay Clicked",description:"An Overlay is clicked.",version:1})},tS=(0,y.createContext)(void 0);function tE(){let e=(0,y.useContext)(tS);if(!e)throw Error("Telemetry context is missing");return e}let t_={"insert-menu.filter.all-items":"All","insert-menu.search.no-results":"No results","insert-menu.search.placeholder":"Filter typesâ¦","insert-menu.toggle-grid-view.tooltip":"Toggle grid view","insert-menu.toggle-list-view.tooltip":"Toggle list view"},tj=e=>{let t,n,r,o;let i=(0,g.c)(11),{node:a,onSelect:l}=e;i[0]!==a.options?.insertMenu?(t=a.options?.insertMenu||{},i[0]=a.options?.insertMenu,i[1]=t):t=i[1];let s=t;i[2]!==s.views?(n=s.views?.map(tC),i[2]=s.views,i[3]=n):n=i[3];let u=n;return i[4]!==a.of?(r=a.of.map(tI),i[4]=a.of,i[5]=r):r=i[5],i[6]!==s||i[7]!==l||i[8]!==r||i[9]!==u?(o=(0,h.jsx)(ti,{...s,labels:t_,schemaTypes:r,onSelect:l,views:u}
33),i[6]=s,i[7]=l,i[8]=r,i[9]=u,i[10]=o):o=i[10],o};function tC(e){return"grid"===e.name?{...e,previewImageUrl:t=>e.previewImageUrls?.[t]}:e}function tI(e){return{...e,icon:th(e)}}let tR=e=>{let t,n,r,o,i;let a=(0,g.c)(10);return a[0]!==e?({children:t,style:r,...n}=e,a[0]=e,a[1]=t,a[2]=n,a[3]=r):(t=a[1],n=a[2],r=a[3]),a[4]!==r?(o={...r,pointerEvents:"all"},a[4]=r,a[5]=o):o=a[5],a[6]!==t||a[7]!==n||a[8]!==o?(i=(0,h.jsx)("div",{style:o,"data-sanity-overlay-element":!0,...n,children:t}),a[6]=t,a[7]=n,a[8]=o,a[9]=i):i=a[9],i};var t$=n(83238),tO=n(79824),tM=n(65800);function tA(e){if(!(e.tabIndex>0||0===e.tabIndex&&null!==e.getAttribute("tabIndex")||((0,w.bg)(e)?!!e.href&&"ignore"!==e.rel:(0,w.LL)(e)?"hidden"!==e.type&&"file"!==e.type&&!e.disabled:!!((0,w.fe)(e)||(0,w.RV)(e)||(0,w.ZH)(e))&&!e.disabled)))return!1;try{e.focus()}catch{}return document.activeElement===e}function tz(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes[t];if((0,w.Re)(n)&&(tA(n)||tz(n)))return!0}return!1}n(48614);let tN=x.zo.div.withConfig({displayName:"StyledAutocomplete",componentId:"sc-1igauft-0"})`line-height:0;`,tT=(0,x.zo)(w.xu).withConfig({displayName:"ListBox",componentId:"sc-1igauft-1"})`& > ul{list-style:none;padding:0;margin:0;}`,tP=(0,x.F4)` 34 from { 35 transform: rotate(0deg); 36 } 37 38 to { 39 transform: rotate(360deg); 40 } 41`,tL=(0,x.zo)(e9.L4p).withConfig({displayName:"AnimatedSpinnerIcon",componentId:"sc-1igauft-2"})`animation:${tP} 500ms linear infinite;`;function tD(e){let t,n,r;let o=(0,t$.c)(11),{children:i,id:a,onSelect:l,selected:s,value:u}=e;o[0]!==l||o[1]!==u?(t=()=>{setTimeout(()=>{l(u)},0)},o[0]=l,o[1]=u,o[2]=t):t=o[2];let c=t;o[3]!==c?(n=e=>{"Enter"!==e.key||(0,w.Rm)(e.currentTarget)||c()},o[3]=c,o[4]=n):n=o[4];let d=n;return o[5]!==i||o[6]!==c||o[7]!==d||o[8]!==a||o[9]!==s?(r=(0,h.jsx)("li",{"aria-selected":s,"data-ui":"AutocompleteOption",id:a,role:"option",onClick:c,onKeyDown:d,children:i}),o[5]=i,o[6]=c,o[7]=d,o[8]=a,o[9]=s,o[10]=r):r=o[10],r}function tF(e,t){return"input/change"===t.type?{...e,activeValue:null,focused:!0,query:t.query}:"input/focus"===t.type?{...e,focused:!0}:"root/blur"===t.type?{...e,focused:!1,query:null}:"root/clear"===t.type?{...e,activeValue:null,query:null,value:null}:"root/escape"===t.type?{...e,focused:!1,query:null}:"root/open"===t.type?{...e,query:e.query||t.query}:"root/setActiveValue"===t.type?{...e,activeValue:t.value,listFocused:t.listFocused||e.listFocused}:"root/setListFocused"===t.type?{...e,listFocused:t.listFocused}:"value/change"===t.type?{...e,activeValue:t.value,query:null,value:t.value}:e}let tB=["Control","Shift","Alt","Enter","Home","End","PageUp","PageDown","Meta","Tab","CapsLock"],tH=["bottom-start","top-start"],tU=(e,t)=>t?t.value:e,tV=(e,t)=>t.value.toLowerCase().indexOf(e.toLowerCase())>-1;(0,y.forwardRef)(function(e,t){let{border:n=!0,customValidity:r,disabled:o,filterOption:i,fontSize:a=2,icon:l,id:s,listBox:u=w.bT,loading:c,onBlur:d,onChange:f,onFocus:p,onQueryChange:g,onSelect:m,openButton:b,openOnFocus:v,options:x,padding:k=3,popover:S=w.bT,prefix:E,radius:_=2,readOnly:j,relatedElements:C,renderOption:I,renderPopover:R,renderValue:$=tU,suffix:O,value:M,...A}=e,[z,N]=(0,y.useReducer)(tF,{activeValue:M||null,focused:!1,listFocused:!1,query:null,value:M||null}),{activeValue:T,focused:P,listFocused:L,query:D,value:F}=z,B=(0,y.useCallback)(({value:e})=>(0,h.jsx)(w.Zb,{"data-as":"button",padding:k,radius:2,tone:"inherit",children:(0,h.jsx)(w.xv,{size:a,textOverflow:"ellipsis",children:e})}),[a,k]),H="function"==typeof I?I:B,U="function"==typeof i?i:tV,V=(0,y.useRef)(null),G=(0,y.useRef)(null),W=(0,y.useRef)(null),q=(0,y.useRef)(null),Y=(0,y.useRef)(!1),Z=(0,y.useRef)(F),K=(0,y.useRef)(M),X=(0,y.useRef)(!1);(0,y.useImperativeHandle)(t,()=>W.current);let Q=`${s}-listbox`,J=Array.isArray(x)?x:w.LZ,ee=(0,w.Q5)(k),et=(0,y.useMemo)(()=>null!==F?J.find(e=>e.value===F):void 0,[J,F]),en=(0,y.useMemo)(()=>J.filter(e=>!D||U(D,e)),[U,J,D]),er=en.length,eo=T?`${s}-option-${T}`:void 0,ei=null!==D&&c||P&&null!==D,ea=(0,y.useCallback)(e=>{setTimeout(()=>{if(X.current)return;let t=(C||[]).concat(V.current?[V.current]:[],G.current?[G.current]:[]),n=!1;if(document.activeElement){for(let e of t)if(e===document.activeElement||e.contains(document.activeElement)){n=!0;break}}!1===n&&(N({type:"root/blur"}),X.current=!1,g&&g(null),d&&d(e))},0)},[d,g,C]),el=(0,y.useCallback)(e=>{let t=q.current,n=e.target instanceof HTMLElement?e.target:null,r=t?.contains(n)||!1;r!==Y.current&&(Y.current=r,N({type:"root/setListFocused",listFocused:r}))},[]),es=(0,y.useCallback)(e=>{N({type:"value/change",value:e}),X.current=!1,m&&m(e),Z.current=e,f&&f(e),g&&g(null),W.current?.focus()},[f,m,g]),eu=(0,y.useCallback)(e=>{if("ArrowDown"===e.key){if(e.preventDefault(),!er)return;let t=en.find(e=>e.value===T),n=t?en.indexOf(t):-1,r=en[(n+1)%er];r&&N({type:"root/setActiveValue",value:r.value,listFocused:!0});return}if("ArrowUp"===e.key){if(e.preventDefault(),!er)return;let t=en.find(e=>e.value===T),n=t?en.indexOf(t):-1,r=en[-1===n?er-1:(er+n-1)%er];r&&N({type:"root/setActiveValue",value:r.value,listFocused:!0});return}if("Escape"===e.key){N({type:"root/escape"}),X.current=!1,g&&g(null),W.current?.focus();return}let t=e.target,n=q.current;
41if((n===t||n?.contains(t))&&!tB.includes(e.key)){W.current?.focus();return}},[T,en,er,g]),ec=(0,y.useCallback)(e=>{let t=e.currentTarget.value;N({type:"input/change",query:t}),g&&g(t)},[g]),ed=(0,y.useCallback)(()=>{N({type:"root/open",query:F?$(F,et):""})},[et,$,F]),ef=(0,y.useCallback)(e=>{P||(N({type:"input/focus"}),p&&p(e),v&&ed())},[P,p,v,ed]),ep=(0,y.useCallback)(()=>{X.current=!0},[]),eh=(0,y.useCallback)(()=>{X.current=!1},[]),eg=(0,y.useCallback)(()=>{N({type:"root/clear"}),Z.current="",f&&f(""),g&&g(null),W.current?.focus()},[f,g]),em=(0,y.useCallback)(()=>{N({type:"input/focus"})},[]);(0,y.useEffect)(()=>{if(M!==K.current){K.current=M,void 0!==M&&(N({type:"value/change",value:M}),Z.current=M);return}M!==Z.current&&(Z.current=M||null,N({type:"value/change",value:M||null}))},[M]),(0,y.useEffect)(()=>{!P&&Z.current&&N({type:"root/setActiveValue",value:Z.current})},[P]),(0,y.useEffect)(()=>{let e=q.current;if(!e)return;let t=en.find(e=>e.value===T);if(t){let n=en.indexOf(t),r=e.childNodes[n];if(r){if(document.activeElement&&r.contains(document.activeElement))return;tz(r)}}},[T,en]);let ey=(0,y.useMemo)(()=>{if(!c&&!o&&F)return{"aria-label":"Clear",onFocus:em}},[o,em,c,F]),eb=(0,y.useMemo)(()=>ee.map(e=>0===e?0:1===e||2===e?1:e-2),[ee]),ev=(0,y.useMemo)(()=>ee.map(e=>Math.max(e-1,0)),[ee]),ew=(0,y.useMemo)(()=>"object"==typeof b?b:w.bT,[b]),ex=(0,y.useCallback)(e=>{ed(),ew.onClick&&ew.onClick(e),requestAnimationFrame(()=>W.current?.focus())},[ew,ed]),ek=(0,y.useMemo)(()=>o||j||!b?void 0:(0,h.jsx)(w.xu,{"aria-hidden":ei,padding:eb,children:(0,h.jsx)(w.zx,{"aria-label":"Open",disabled:ei,fontSize:a,icon:e9.v4q,mode:"bleed",padding:ev,...ew,onClick:ex})}),[o,ei,a,ex,b,eb,ev,ew,j]),eS=(0,y.useMemo)(()=>null===D?null!==F?$(F,et):"":D,[et,D,$,F]),eE=(0,h.jsx)(w.oi,{...A,"aria-activedescendant":eo,"aria-autocomplete":"list","aria-expanded":ei,"aria-owns":Q,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",border:n,clearButton:ey,customValidity:r,disabled:o,fontSize:a,icon:l,iconRight:c&&tL,id:s,inputMode:"search",onChange:ec,onClear:eg,onFocus:ef,padding:ee,prefix:E,radius:_,readOnly:j,ref:W,role:"combobox",spellCheck:!1,suffix:O||ek,value:eS}),e_=(0,y.useCallback)(e=>{"Tab"===e.key&&L&&W.current?.focus()},[L]),ej=(0,y.useMemo)(()=>0===en.length?null:(0,h.jsx)(tT,{"data-ui":"AutoComplete__results",onKeyDown:e_,padding:1,...u,tabIndex:-1,children:(0,h.jsx)(w.Kq,{as:"ul","aria-multiselectable":!1,"data-ui":"AutoComplete__resultsList",id:Q,ref:q,role:"listbox",space:1,children:en.map(e=>{let t=null!==T?e.value===T:et===e;return(0,h.jsx)(tD,{id:`${s}-option-${e.value}`,onSelect:es,selected:t,value:e.value,children:(0,y.cloneElement)(H(e),{disabled:c,selected:t,tabIndex:L&&t?0:-1})},e.value)})})}),[T,et,en,es,e_,s,u,Q,L,c,H]),eC=(0,y.useMemo)(()=>R?R({content:ej,hidden:!ei,inputElement:W.current,onMouseEnter:ep,onMouseLeave:eh},G):0===er?null:(0,h.jsx)(w.J2,{arrow:!1,constrainSize:!0,content:ej,fallbackPlacements:tH,matchReferenceWidth:!0,onMouseEnter:ep,onMouseLeave:eh,open:ei,overflow:"auto",placement:"bottom-start",portal:!0,radius:_,ref:G,referenceElement:W.current,...S}),[ej,ei,er,ep,eh,S,_,R]);return(0,h.jsxs)(tN,{"data-ui":"Autocomplete",onBlur:ea,onFocus:el,onKeyDown:eu,ref:V,children:[eE,eC]})}).displayName="ForwardRef(Autocomplete)";let tG=x.zo.ol.withConfig({displayName:"StyledBreadcrumbs",componentId:"sc-1es8h8q-0"})`margin:0;padding:0;display:flex;list-style:none;align-items:center;white-space:nowrap;line-height:0;`,tW=(0,x.zo)(w.zx).withConfig({displayName:"ExpandButton",componentId:"sc-1es8h8q-1"})`appearance:none;margin:-4px;`;(0,y.forwardRef)(function(e,t){let{children:n,maxLength:r,separator:o,space:i=2,...a}=e,l=(0,w.Q5)(i),[s,u]=(0,y.useState)(!1),c=(0,y.useRef)(null),d=(0,y.useRef)(null),f=(0,y.useCallback)(()=>u(!1),[]),p=(0,y.useCallback)(()=>u(!0),[]);(0,w.Of)(f,()=>[c.current,d.current]);let g=(0,y.useMemo)(()=>y.Children.toArray(n).filter(y.isValidElement),[n]),m=(0,y.useMemo)(()=>{let e=g.length;if(r&&e>r){let t=Math.ceil(r/2),n=Math.floor(r/2);return[...g.slice(0,t-1),(0,h.jsx)(w.J2,{constrainSize:!0,content:(0,h.jsx)(w.Kq,{as:"ol",overflow:"auto",padding:l,space:l,children:g.slice(t-1,e-n)}),open:s,placement:"top",portal:!0,ref:d,children:(0,h.jsx)(tW,{fontSize:1,mode:"bleed",onClick:s?f:p,padding:1,ref:c,selected:s,text:"â¦"})},"button"),...g.slice(e-n)]}return g},[f,p,r,s,g,l]);return(0,h.jsx)(tG,{"data-ui":"Breadcrumbs",...a,ref:t,children:m.map((e,t)=>(0,h.jsxs)(y.Fragment,{children:[t>0&&(0,h.jsx)(w.xu,{"aria-hidden":!0,as:"li",paddingX:l,children:o||(0,h.jsx)(w.xv,{muted:!0,children:"/"})}),(0,h.jsx)(w.xu,{as:"li",children:e})]},t))})}).displayName="ForwardRef(Breadcrumbs)";let tq=(0,w.tx)("@sanity/ui/context/dialog",{version:0});function tY(e,t,n){return!e||!t||(0,w.dG)(e,n)||(0,w.dG)(t,n)}let tZ=(0,x.zo)(w.mh).withConfig({displayName:"StyledDialog",componentId:"sc-4n4xb3-0"})(w.ZE,function({theme:e}){let{color:t}=(0,tO.aQ)(e);return{"&:not([hidden])":{display:"flex"},top:0,left:0,right:0,bottom:0,alignItems:"center",justifyContent:"center",outline:"none",background:t.backdrop}},function(e){let{media:t}=(0,tO.aQ)(e.theme);return(0,w.Lt)(t,e.$position,e=>({"&&":{position:e}}))},function(e){return e.$animate?(0,x.iv)` 42 @keyframes zoomIn { 43 from { 44 opacity: 0; 45 transform: scale(0.95); 46 } 47 to { 48 opacity: 1; 49 transform: scale(1); 50 } 51 }
52 @keyframes fadeIn { 53 from { 54 opacity: 0; 55 } 56 to { 57 opacity: 1; 58 } 59 } 60 61 animation: fadeIn 200ms ease-out; 62 // Animates the dialog card. 63 & > [data-ui='DialogCard'] { 64 animation: zoomIn 200ms ease-out; 65 } 66 `:(0,x.iv)``}),tK=(0,x.zo)(w.W2).withConfig({displayName:"DialogContainer",componentId:"sc-4n4xb3-1"})`&:not([hidden]){display:flex;}width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;`,tX=(0,x.zo)(w.Zb).withConfig({displayName:"DialogCardRoot",componentId:"sc-4n4xb3-2"})`&:not([hidden]){display:flex;}width:100%;min-height:0;max-height:100%;overflow:hidden;overflow:clip;`,tQ=(0,x.zo)(w.kC).withConfig({displayName:"DialogLayout",componentId:"sc-4n4xb3-3"})`flex:1;min-height:0;width:100%;`,tJ=(0,x.zo)(w.xu).withConfig({displayName:"DialogHeader",componentId:"sc-4n4xb3-4"})`position:relative;z-index:2;`,t0=(0,x.zo)(w.xu).withConfig({displayName:"DialogContent",componentId:"sc-4n4xb3-5"})`position:relative;z-index:1;overflow:auto;outline:none;`,t1=(0,x.zo)(w.xu).withConfig({displayName:"DialogFooter",componentId:"sc-4n4xb3-6"})`position:relative;z-index:3;`,t2=(0,y.forwardRef)(function(e,t){let n,r,o,i,a,l,s,u,c,d,f,p,g;let m=(0,t$.c)(38),{__unstable_autoFocus:b,__unstable_hideCloseButton:v,children:x,contentRef:k,footer:S,header:E,id:_,onClickOutside:j,onClose:C,portal:I,radius:R,scheme:$,shadow:O,width:M}=e,A=(0,w.vI)(),z=I?A.elements?.[I]||null:A.element,N=(0,w.sz)().element,T=(0,w.Q5)(R),P=(0,w.Q5)(O),L=(0,w.Q5)(M),D=(0,y.useRef)(null),F=(0,y.useRef)(null),{isTopLayer:B}=(0,w.sJ)(),H=`${_}_label`,U=!!C&&!1===v,V=!!E||U;return m[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>D.current,m[0]=n):n=m[0],(0,y.useImperativeHandle)(t,n),m[1]===Symbol.for("react.memo_cache_sentinel")?(r=()=>F.current,m[1]=r):r=m[1],(0,y.useImperativeHandle)(k,r),m[2]!==b?(o=()=>{b&&D.current&&tz(D.current)},i=[b,D],m[2]=b,m[3]=o,m[4]=i):(o=m[3],i=m[4]),(0,y.useEffect)(o,i),m[5]!==N||m[6]!==B||m[7]!==C||m[8]!==z?(a=e=>{if(!B||!C)return;let t=document.activeElement;t&&!tY(N,z,t)||"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),C())},m[5]=N,m[6]=B,m[7]=C,m[8]=z,m[9]=a):a=m[9],(0,w.qh)(a),m[10]!==N||m[11]!==B||m[12]!==j||m[13]!==z?(l=B&&j&&(e=>{let t=e.target;t&&!tY(N,z,t)||j()}),m[10]=N,m[11]=B,m[12]=j,m[13]=z,m[14]=l):l=m[14],m[15]===Symbol.for("react.memo_cache_sentinel")?(s=()=>[D.current],m[15]=s):s=m[15],(0,w.Of)(l,s),m[16]!==E||m[17]!==H||m[18]!==C||m[19]!==U||m[20]!==V?(u=V&&(0,h.jsx)(tJ,{children:(0,h.jsxs)(w.kC,{align:"flex-start",padding:3,children:[(0,h.jsx)(w.xu,{flex:1,padding:2,children:E&&(0,h.jsx)(w.xv,{id:H,size:1,weight:"semibold",children:E})}),U&&(0,h.jsx)(w.xu,{flex:"none",children:(0,h.jsx)(w.zx,{"aria-label":"Close dialog",disabled:!C,icon:e9.Two,mode:"bleed",onClick:C,padding:2})})]})}),m[16]=E,m[17]=H,m[18]=C,m[19]=U,m[20]=V,m[21]=u):u=m[21],m[22]!==x?(c=(0,h.jsx)(t0,{flex:1,ref:F,tabIndex:-1,children:x}),m[22]=x,m[23]=c):c=m[23],m[24]!==S?(d=S&&(0,h.jsx)(t1,{children:S}),m[24]=S,m[25]=d):d=m[25],m[26]!==u||m[27]!==c||m[28]!==d?(f=(0,h.jsxs)(tQ,{direction:"column",children:[u,c,d]}),m[26]=u,m[27]=c,m[28]=d,m[29]=f):f=m[29],m[30]!==T||m[31]!==$||m[32]!==P||m[33]!==f?(p=(0,h.jsx)(tX,{radius:T,ref:D,scheme:$,shadow:P,children:f}),m[30]=T,m[31]=$,m[32]=P,m[33]=f,m[34]=p):p=m[34],m[35]!==p||m[36]!==L?(g=(0,h.jsx)(tK,{"data-ui":"DialogCard",width:L,children:p}),m[35]=p,m[36]=L,m[37]=g):g=m[37],g});t2.displayName="ForwardRef(DialogCard)",(0,y.forwardRef)(function(e,t){let n,r,o,i,a,l,s,u,c,d,f,p,g,m,b,v,x,k,S,E,_,j,C,I,R,$,O,M;let A=(0,t$.c)(60),z=(0,y.useContext)(tq),{layer:N}=(0,w.g9)();A[0]!==e?({__unstable_autoFocus:b,__unstable_hideCloseButton:v,cardRadius:x,cardShadow:k,children:o,contentRef:i,footer:a,header:l,id:s,onActivate:u,onClickOutside:c,onClose:d,onFocus:f,padding:S,portal:p,position:n,scheme:m,width:E,zOffset:r,animate:_,...g}=e,A[0]=e,A[1]=n,A[2]=r,A[3]=o,A[4]=i,A[5]=a,A[6]=l,A[7]=s,A[8]=u,A[9]=c,A[10]=d,A[11]=f,A[12]=p,A[13]=g,A[14]=m,A[15]=b,A[16]=v,A[17]=x,A[18]=k,A[19]=S,A[20]=E,A[21]=_):(n=A[1],r=A[2],o=A[3],i=A[4],a=A[5],l=A[6],s=A[7],u=A[8],c=A[9],d=A[10],f=A[11],p=A[12],g=A[13],m=A[14],b=A[15],v=A[16],x=A[17],k=A[18],S=A[19],E=A[20],_=A[21]);let T=void 0===b||b,P=void 0!==v&&v,L=void 0===x?4:x,D=void 0===k?3:k,F=void 0===S?3:S,B=void 0===E?0:E,H=void 0!==_&&_,U=n??(z.position||"fixed"),V=r??(z.zOffset||N.dialog.zOffset),G=!(0,w.Tb)()&&H,W=(0,w.vI)(),q=p?W.elements?.[p]||null:W.element,Y=(0,w.sz)().element,Z=(0,w.Q5)(L),K=(0,w.Q5)(F),X=(0,w.Q5)(U),Q=(0,w.Q5)(B),J=(0,w.Q5)(V),ee=(0,y.useRef)(null),et=(0,y.useRef)(null),en=(0,y.useRef)(null),er=(0,y.useRef)(null);A[22]!==f?(j=e=>{f?.(e);let t=e.target,n=en.current;if(n&&t===ee.current){(function e(t){for(let n=t.childNodes.length-1;n>=0;n--){let r=t.childNodes[n];if((0,w.Re)(r)&&(tA(r)||e(r)))return!0}return!1})(n);return}if(n&&t===et.current){tz(n);return}(0,w.Re)(e.target)&&(er.current=e.target)},A[22]=f,A[23]=j):j=A[23];let eo=j,ei=`${s}_label`,ea=(0,y.useRef)(void 0);A[24]!==Y||A[25]!==q?(C=()=>{ea.current&&clearTimeout(ea.current),ea.current=setTimeout(()=>{let e=document.activeElement;if(e&&!tY(Y,q,e)){let e=er.current;if(!e||!document.body.contains(e)){let e=en.current;e&&tz(e);return}
66e.focus()}},0)},A[24]=Y,A[25]=q,A[26]=C):C=A[26];let el=C;return A[27]===Symbol.for("react.memo_cache_sentinel")?(I=(0,h.jsx)("div",{ref:ee,tabIndex:0}),A[27]=I):I=A[27],A[28]!==T||A[29]!==Z||A[30]!==D||A[31]!==o||A[32]!==i||A[33]!==a||A[34]!==l||A[35]!==P||A[36]!==s||A[37]!==c||A[38]!==d||A[39]!==p||A[40]!==m||A[41]!==Q?(R=(0,h.jsx)(t2,{__unstable_autoFocus:T,__unstable_hideCloseButton:P,contentRef:i,footer:a,header:l,id:s,onClickOutside:c,onClose:d,portal:p,radius:Z,ref:en,scheme:m,shadow:D,width:Q,children:o}),A[28]=T,A[29]=Z,A[30]=D,A[31]=o,A[32]=i,A[33]=a,A[34]=l,A[35]=P,A[36]=s,A[37]=c,A[38]=d,A[39]=p,A[40]=m,A[41]=Q,A[42]=R):R=A[42],A[43]===Symbol.for("react.memo_cache_sentinel")?($=(0,h.jsx)("div",{ref:et,tabIndex:0}),A[43]=$):$=A[43],A[44]!==G||A[45]!==eo||A[46]!==el||A[47]!==s||A[48]!==ei||A[49]!==u||A[50]!==K||A[51]!==X||A[52]!==t||A[53]!==g||A[54]!==R||A[55]!==J?(O=(0,h.jsxs)(tZ,{...g,$animate:G,$padding:K,$position:X,"aria-labelledby":ei,"aria-modal":!0,"data-ui":"Dialog",id:s,onActivate:u,onClick:el,onFocus:eo,ref:t,role:"dialog",zOffset:J,children:[I,R,$]}),A[44]=G,A[45]=eo,A[46]=el,A[47]=s,A[48]=ei,A[49]=u,A[50]=K,A[51]=X,A[52]=t,A[53]=g,A[54]=R,A[55]=J,A[56]=O):O=A[56],A[57]!==p||A[58]!==O?(M=(0,h.jsx)(w.h_,{__unstable_name:p,children:O}),A[57]=p,A[58]=O,A[59]=M):M=A[59],M}).displayName="ForwardRef(Dialog)";let t5=(0,y.forwardRef)(function(e,t){let n,r,o,i,a,l,s,u,c,d,f,p,g,m,b,v,x,k,S,E,_,j,C;let I=(0,t$.c)(62),{__unstable_disableRestoreFocusOnClose:R,boundaryElement:$,button:O,id:M,menu:A,onClose:z,onOpen:N,placement:T,popoverScheme:P,portal:L,popover:D,popoverRadius:F,preventOverflow:B}=e,H=void 0!==R&&R,U=void 0===L||L,[V,G]=(0,y.useState)(!1),[W,q]=(0,y.useState)(null),[Y,Z]=(0,y.useState)(null);I[0]===Symbol.for("react.memo_cache_sentinel")?(n=[],I[0]=n):n=I[0];let[K,X]=(0,y.useState)(n),Q=(0,y.useRef)(V);I[1]!==N||I[2]!==V?(r=()=>{N&&V&&!Q.current&&N()},o=[N,V],I[1]=N,I[2]=V,I[3]=r,I[4]=o):(r=I[3],o=I[4]),(0,y.useEffect)(r,o),I[5]!==z||I[6]!==V?(i=()=>{z&&!V&&Q.current&&z()},a=[z,V],I[5]=z,I[6]=V,I[7]=i,I[8]=a):(i=I[7],a=I[8]),(0,y.useEffect)(i,a),I[9]!==V?(l=()=>{Q.current=V},s=[V],I[9]=V,I[10]=l,I[11]=s):(l=I[10],s=I[11]),(0,y.useEffect)(l,s),I[12]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{G(t3),q(null)},I[12]=u):u=I[12];let J=u;I[13]!==V?(c=e=>{V&&e.preventDefault()},I[13]=V,I[14]=c):c=I[14];let ee=c;I[15]===Symbol.for("react.memo_cache_sentinel")?(d=e=>{if("ArrowDown"===e.key||"Enter"===e.key||" "===e.key){e.preventDefault(),G(!0),q("first");return}if("ArrowUp"===e.key){e.preventDefault(),G(!0),q("last");return}},I[15]=d):d=I[15];let et=d;I[16]!==Y||I[17]!==K?(f=e=>{let t=e.target;if(t instanceof Node&&!(Y&&(t===Y||Y.contains(t)))){for(let e of K)if(t===e||e.contains(t))return;G(!1)}},I[16]=Y,I[17]=K,I[18]=f):f=I[18];let en=f;I[19]!==Y||I[20]!==H?(p=()=>{G(!1),!H&&Y&&Y.focus()},I[19]=Y,I[20]=H,I[21]=p):p=I[21];let er=p;I[22]!==K?(g=e=>{let t=e.relatedTarget;if(t instanceof Node){for(let e of K)if(e===t||e.contains(t))return;G(!1)}},I[22]=K,I[23]=g):g=I[23];let eo=g;I[24]!==Y||I[25]!==H?(m=()=>{G(!1),!H&&Y&&Y.focus()},I[24]=Y,I[25]=H,I[26]=m):m=I[26];let ei=m;I[27]===Symbol.for("react.memo_cache_sentinel")?(b=e=>(X(t=>t.concat([e])),()=>X(t=>t.filter(t=>t!==e))),I[27]=b):b=I[27];let ea=b;I[28]!==Y||I[29]!==eo||I[30]!==ei||I[31]!==en||I[32]!==er||I[33]!==M||I[34]!==A||I[35]!==W?(v=A&&(0,y.cloneElement)(A,{"aria-labelledby":M,onBlurCapture:eo,onClickOutside:en,onEscape:er,onItemClick:ei,originElement:Y,registerElement:ea,shouldFocus:W}),I[28]=Y,I[29]=eo,I[30]=ei,I[31]=en,I[32]=er,I[33]=M,I[34]=A,I[35]=W,I[36]=v):v=I[36];let el=v;I[37]!==O||I[38]!==ee||I[39]!==M||I[40]!==V?(x=O&&(0,y.cloneElement)(O,{"data-ui":"MenuButton",id:M,onClick:J,onKeyDown:et,onMouseDown:ee,"aria-haspopup":!0,"aria-expanded":V,ref:Z,selected:O.props.selected??V}),I[37]=O,I[38]=ee,I[39]=M,I[40]=V,I[41]=x):x=I[41];let es=x;I[42]!==Y?(k=()=>Y,S=[Y],I[42]=Y,I[43]=k,I[44]=S):(k=I[43],S=I[44]),(0,y.useImperativeHandle)(t,k,S),I[45]!==D?(E=D||{},I[45]=D,I[46]=E):E=I[46],I[47]!==$||I[48]!==T||I[49]!==F||I[50]!==P||I[51]!==U||I[52]!==B||I[53]!==E?(_={boun
66daryElement:$,overflow:"auto",placement:T,portal:U,preventOverflow:B,radius:F,scheme:P,...E},I[47]=$,I[48]=T,I[49]=F,I[50]=P,I[51]=U,I[52]=B,I[53]=E,I[54]=_):_=I[54];let eu=_;return I[55]!==es?(j=es||(0,h.jsx)(h.Fragment,{}),I[55]=es,I[56]=j):j=I[56],I[57]!==el||I[58]!==V||I[59]!==eu||I[60]!==j?(C=(0,h.jsx)(w.J2,{"data-ui":"MenuButton__popover",...eu,content:el,open:V,children:j}),I[57]=el,I[58]=V,I[59]=eu,I[60]=j,I[61]=C):C=I[61],C});function t3(e){return!e}t5.displayName="ForwardRef(MenuButton)";let t4=(0,x.F4)` 67 0% { 68 background-position: 100%; 69 } 70 100% { 71 background-position: -100%; 72 } 73`,t6=(0,x.iv)` 74 background-image: linear-gradient( 75 to right, 76 var(--card-skeleton-color-from), 77 var(--card-skeleton-color-to), 78 var(--card-skeleton-color-from), 79 var(--card-skeleton-color-from), 80 var(--card-skeleton-color-from) 81 ); 82 background-position: 100%; 83 background-size: 200% 100%; 84 background-attachment: fixed; 85 animation-name: ${t4}; 86 animation-timing-function: ease-in-out; 87 animation-iteration-count: infinite; 88 animation-duration: 2000ms; 89`,t8=(0,x.iv)` 90 opacity: ${({$visible:e})=>e?1:0}; 91 transition: opacity 200ms ease-in; 92 93 @media screen and (prefers-reduced-motion: no-preference) { 94 ${({$animated:e})=>e?t6:(0,x.iv)` 95 background-color: var(--card-skeleton-color-from); 96 `} 97 } 98 99 @media screen and (prefers-reduced-motion: reduce) { 100 background-color: var(--card-skeleton-color-from); 101 } 102`,t9=(0,x.zo)(w.xu).withConfig({displayName:"StyledSkeleton",componentId:"sc-ebtpni-0"})(w.E5,t8),t7=(0,y.forwardRef)(function(e,t){let n,r,o,i,a,l,s;let u=(0,t$.c)(14);u[0]!==e?({animated:i,delay:n,radius:r,...o}=e,u[0]=e,u[1]=n,u[2]=r,u[3]=o,u[4]=i):(n=u[1],r=u[2],o=u[3],i=u[4]);let c=void 0!==i&&i,[d,f]=(0,y.useState)(!n);u[5]!==n?(a=()=>{if(!n)return f(!0);let e=setTimeout(()=>{f(!0)},n);return()=>{clearTimeout(e)}},l=[n],u[5]=n,u[6]=a,u[7]=l):(a=u[6],l=u[7]),(0,y.useEffect)(a,l);let p=(0,w.Q5)(r);return u[8]!==c||u[9]!==t||u[10]!==o||u[11]!==p||u[12]!==d?(s=(0,h.jsx)(t9,{...o,$animated:c,$radius:p,$visible:d,ref:t}),u[8]=c,u[9]=t,u[10]=o,u[11]=p,u[12]=d,u[13]=s):s=u[13],s});t7.displayName="ForwardRef(Skeleton)";let ne=(0,x.zo)(t7).withConfig({displayName:"StyledSkeleton",componentId:"sc-2p7a1v-0"})(e=>{let{$size:t,$style:n}=e,{font:r,media:o}=(0,tO.aQ)(e.theme),i=r[n];return(0,w.Lt)(o,t,e=>{let t=i.sizes[e];return{height:t.lineHeight-t.ascenderHeight-t.descenderHeight}})});(0,y.forwardRef)(function(e,t){let n,r,o;let i=(0,t$.c)(7);i[0]!==e?({size:r,...n}=e,i[0]=e,i[1]=n,i[2]=r):(n=i[1],r=i[2]);let a=(0,w.Q5)(void 0===r?2:r);return i[3]!==a||i[4]!==t||i[5]!==n?(o=(0,h.jsx)(ne,{...n,$size:a,ref:t,$style:"text"}),i[3]=a,i[4]=t,i[5]=n,i[6]=o):o=i[6],o}).displayName="ForwardRef(TextSkeleton)",(0,y.forwardRef)(function(e,t){let n,r,o;let i=(0,t$.c)(7);i[0]!==e?({size:r,...n}=e,i[0]=e,i[1]=n,i[2]=r):(n=i[1],r=i[2]);let a=(0,w.Q5)(void 0===r?2:r);return i[3]!==a||i[4]!==t||i[5]!==n?(o=(0,h.jsx)(ne,{...n,$size:a,ref:t,$style:"label"}),i[3]=a,i[4]=t,i[5]=n,i[6]=o):o=i[6],o}).displayName="ForwardRef(LabelSkeleton)",(0,y.forwardRef)(function(e,t){let n,r,o;let i=(0,t$.c)(7);i[0]!==e?({size:r,...n}=e,i[0]=e,i[1]=n,i[2]=r):(n=i[1],r=i[2]);let a=(0,w.Q5)(void 0===r?2:r);return i[3]!==a||i[4]!==t||i[5]!==n?(o=(0,h.jsx)(ne,{...n,$size:a,ref:t,$style:"heading"}),i[3]=a,i[4]=t,i[5]=n,i[6]=o):o=i[6],o}).displayName="ForwardRef(HeadingSkeleton)",(0,y.forwardRef)(function(e,t){let n,r,o;let i=(0,t$.c)(7);i[0]!==e?({size:r,...n}=e,i[0]=e,i[1]=n,i[2]=r):(n=i[1],r=i[2]);let a=(0,w.Q5)(void 0===r?2:r);return i[3]!==a||i[4]!==t||i[5]!==n?(o=(0,h.jsx)(ne,{...n,$size:a,ref:t,$style:"code"}),i[3]=a,i[4]=t,i[5]=n,i[6]=o):o=i[6],o}).displayName="ForwardRef(CodeSkeleton)",(0,y.forwardRef)(function(e,t){let n,r,o;let i=(0,t$.c)(9);i[0]!==e?({flex:n,...r}=e,i[0]=e,i[1]=n,i[2]=r):(n=i[1],r=i[2]);let a=void 0===e.tabIndex?0:e.tabIndex;return i[3]!==n||i[4]!==e.children||i[5]!==t||i[6]!==r||i[7]!==a?(o=(0,h.jsx)(w.xu,{"data-ui":"TabPanel",...r,flex:n,ref:t,role:"tabpanel",tabIndex:a,children:e.children}),i[3]=n,i[4]=e.children,i[5]=t,i[6]=r,i[7]=a,i[8]=o):o=i[8],o}).displayName="ForwardRef(TabPanel)";
102let nt={error:"critical",warning:"caution",success:"positive",info:"neutral"},nn={error:"critical",warning:"caution",success:"positive",info:"neutral"},nr=(0,x.zo)(w.kC).withConfig({displayName:"TextBox",componentId:"sc-1rr7rxo-0"})`overflow-x:auto;`,no=(0,x.zo)(w.Zb).withConfig({displayName:"StyledToast",componentId:"sc-1rr7rxo-1"})`pointer-events:all;width:100%;position:relative;overflow:hidden;overflow:clip;&[data-has-duration]{padding-bottom:calc(${2}px / 2);}`,ni=x.zo.div.withConfig({displayName:"LoadingBar",componentId:"sc-1rr7rxo-2"})`display:flex;position:absolute;bottom:0px;top:0px;left:0px;right:0px;pointer-events:none;z-index:-1;overflow:hidden;overflow:clip;background:transparent;align-items:flex-end;will-change:opacity;`,na=(0,x.zo)(w.Zb).withConfig({displayName:"LoadingBarMask",componentId:"sc-1rr7rxo-3"})`position:absolute;top:0;left:-${2}px;right:-${2}px;bottom:${2}px;z-index:1;`,nl=(0,x.zo)(w.Zb).withConfig({displayName:"LoadingBarProgress",componentId:"sc-1rr7rxo-4"})`display:block;height:100%;width:100%;transform-origin:0% 50%;background-color:${e=>{let{color:t}=(0,tO.aQ)(e.theme);return t.button.default[e.tone].enabled.bg}};`,ns={error:"alert",warning:"alert",success:"alert",info:"alert"},nu={initial:{y:32,scale:.5,zIndex:1},hidden:{opacity:0},visible:e=>e?{opacity:1,transition:{when:"beforeChildren",staggerChildren:e/3,duration:e/3}}:{opacity:1},slideIn:{y:0,scale:1},slideOut:{zIndex:0,scale:.75}},nc={initial:{willChange:"transform"},hidden:{opacity:0},visible:{opacity:1}},nd=tM.E.create(no),nf=tM.E.create(w.kC),np=tM.E.create(w.xv),nh=tM.E.create(ni),ng=tM.E.create(nl);function nm(e){if("treeitem"===e.getAttribute("role")&&e.focus(),"none"===e.getAttribute("role")){let t=e.firstChild;t&&t instanceof HTMLElement&&t.focus()}}(0,w.tx)("@sanity/ui/context/toast",null),(0,x.zo)(w.rj).withConfig({displayName:"StyledLayer",componentId:"sc-1tbwn58-0"})`box-sizing:border-box;position:fixed;right:0;bottom:0;list-style:none;pointer-events:none;max-width:420px;width:100%;`;let ny=(0,w.tx)("@sanity/ui/context/tree",null);function nb(){let e=(0,y.useContext)(ny);if(!e)throw Error("Tree: missing context value");return e}(0,y.memo)((0,y.forwardRef)(function(e,t){let n,r,o,i,a,l,s,u,c,d,f,p,g,m,b,v,x,k,S,E,_;let j=(0,t$.c)(37);j[0]!==e?({children:n,space:i,onFocus:r,...o}=e,j[0]=e,j[1]=n,j[2]=r,j[3]=o,j[4]=i):(n=j[1],r=j[2],o=j[3],i=j[4]);let C=void 0===i?1:i,I=(0,y.useRef)(null),[R,$]=(0,y.useState)(null),O=(0,y.useRef)(R);j[5]===Symbol.for("react.memo_cache_sentinel")?(a=[],j[5]=a):a=j[5];let M=a;j[6]===Symbol.for("react.memo_cache_sentinel")?(l=[],j[6]=l):l=j[6];let[A,z]=(0,y.useState)(l);j[7]===Symbol.for("react.memo_cache_sentinel")?(s={},j[7]=s):s=j[7];let[N,T]=(0,y.useState)(s),P=(0,y.useRef)(N);j[8]===Symbol.for("react.memo_cache_sentinel")?(u=()=>I.current,j[8]=u):u=j[8],(0,y.useImperativeHandle)(t,u),j[9]!==R?(c=()=>{O.current=R},d=[R],j[9]=R,j[10]=c,j[11]=d):(c=j[10],d=j[11]),(0,y.useEffect)(c,d),j[12]!==N?(f=()=>{P.current=N},p=[N],j[12]=N,j[13]=f,j[14]=p):(f=j[13],p=j[14]),(0,y.useEffect)(f,p),j[15]===Symbol.for("react.memo_cache_sentinel")?(g=(e,t,n,r)=>(T(r=>({...r,[t]:{element:e,expanded:n}})),r&&$(e),()=>{T(e=>{let n={...e};return delete n[t],n})}),j[15]=g):g=j[15];let L=g;j[16]===Symbol.for("react.memo_cache_sentinel")?(m=(e,t)=>{T(n=>{let r=n[e];return r?{...n,[e]:{...r,expanded:t}}:n})},j[16]=m):m=j[16];let D=m,F=R||A[0]||null;j[17]!==C||j[18]!==N||j[19]!==F?(b={version:0,focusedElement:F,level:0,path:M,registerItem:L,setExpanded:D,setFocusedElement:$,space:C,state:N},j[17]=C,j[18]=N,j[19]=F,j[20]=b):b=j[20];let B=b;j[21]!==A?(v=e=>{if(O.current){if("ArrowDown"===e.key){e.preventDefault();let t=function(e,t,n){let r=t.indexOf(n),o=t.slice(r),i=t.length;for(let t=1;t<i;t+=1){if(!o[t])continue;let n=o[t].getAttribute("data-tree-key");if(!n)continue;let r=n.split("/");r.pop();let i=[],a=!0;for(let t=0;t<r.length;t+=1){i.push(r[t]);let n=i.join("/");if(!e[n]?.expanded){a=!1;break}}if(a)return o[t]}return null}(P.current,A,O.current);t&&(nm(t),$(t));return}if("ArrowUp"===e.key){e.preventDefault();let t=function(e,t,n){let r=t.indexOf(n),o=t.slice(0,r),i=o.length;for(let t=i-1;t>=0;t-=1){let n=o[t].getAttribute("data-tree-key");if(!n)continue;let r=n.split("/");r.pop();let i=[],a=!0;for(let t=0;t<r.length;t+=1){i.push(r[t]);let n=i.join("/");if(!e[n]?.expanded){a=!1;break}}if(a)return o[t]}return null}(P.current,A,O.current);t&&(nm(t),$(t));return}if("ArrowLeft"===e.key){e.preventDefault();let t=O.current.getAttribute("data-tree-key");if(!t)return;let n=P.current[t];if(!n)return;if(n.expanded)T(e=>{let n=e[t];return n?{...e,[t]:{...n,expanded:!1}}:e});else{let e=t.split("/");e.pop();let n=e.join("/"),r=n&&P.current[n];r&&(r.element.focus(),$(r.element))}return}if("ArrowRight"===e.key){e.preventDefault();let t=O.current.getAttribute("data-tree-key");if(!t)return;P.current[t]?.expanded||T(e=>{let n=e[t];return n?{...e,[t]:{...n,expanded:!0}}:e});return}}},j[21]=A,j[22]=v):v=j[22];let H=v;j[23]!==r?(x=e=>{$(e.target),r?.(e)},j[23]=r,j[24]=x):x=j[24];let U=x;return j[25]===Symbol.for("react.memo_cache_sentinel")?(k=()=>{I.current&&z(Array.from(I.current.querySelectorAll('[data-ui="TreeItem"]')))},j[25]=k):k=j[25],j[26]!==n?(S=[n],j[26]=n,j[27]=S):S=j[27],(0,y.useEffect)(k,S),j[28]!==n||j[29]!==U||j[30]!==H||j[31]!==o||j[32]!==C?(E=(0,h.jsx)(w.Kq,{as:"ul","data-ui":"Tree",...o,onFocus:U,onKeyDown:H,ref:I,role:"tree",space:C,children:n}),j[28]=n,j[29]=U,j[30]=H,j[31]=o,j[32]=C,j[33]=E):E=j[33],j[34]!==B||j[35]!==E?(_=(0,h.jsx)(ny.Provider,{value:B,children:E}),j[34]=B,j[35]=E,j[36]=_):_=j[36],_})).displayName="Memo(ForwardRef(Tree))";let nv=(0,y.memo)(function(e){let t,n,r,o;let i=(0,t$.c)(9);i[0]!==e?({children:t,expanded:r,...n}=e,i[0]=e,i[1]=t,i[2]=n,i[3]=r):(t=i[1],n=i[2],r=i[3]);let a=void 0!==r&&r,l=nb(),s=!a;return i[4]!==t||i[5]!==n||i[6]!==s||i[7]!==l.space?(o=(0,h.jsx)(w.Kq,{as:"ul","data-ui":"TreeGroup",...n,hidden:s,marginTop:l.space,role:"group",space
102:l.space,children:t}),i[4]=t,i[5]=n,i[6]=s,i[7]=l.space,i[8]=o):o=i[8],o}),nw=(0,y.memo)(x.zo.li.withConfig({displayName:"StyledTreeItem",componentId:"sc-iiskig-0"})(function(){return(0,x.iv)` 103 &[role='none'] > [role='treeitem'] { 104 outline: none; 105 cursor: default; 106 border-radius: 3px; 107 108 background-color: var(--card-bg-color); 109 color: var(--treeitem-fg-color); 110 111 &:focus { 112 position: relative; 113 } 114 } 115 116 &[role='treeitem'] { 117 outline: none; 118 119 & > div { 120 cursor: default; 121 border-radius: 3px; 122 123 background-color: var(--card-bg-color); 124 color: var(--treeitem-fg-color); 125 } 126 127 &:focus > div { 128 position: relative; 129 } 130 } 131 `},function(e){let{color:t}=(0,tO.aQ)(e.theme),n=t.selectable.default;return(0,x.iv)` 132 &[role='none'] { 133 & > [role='treeitem'] { 134 ${(0,w.gG)(t,n.enabled)} 135 } 136 137 &[data-selected] > [role='treeitem'] { 138 ${(0,w.gG)(t,n.pressed)} 139 } 140 141 @media (hover: hover) { 142 &:not([data-selected]) > [role='treeitem']:not(:focus):hover { 143 ${(0,w.gG)(t,n.hovered)} 144 } 145 146 & > [role='treeitem']:focus { 147 ${(0,w.gG)(t,n.selected)} 148 } 149 } 150 } 151 152 &[role='treeitem'] { 153 & > [data-ui='TreeItem__box'] { 154 ${(0,w.gG)(t,n.enabled)} 155 } 156 157 &[data-selected] > [data-ui='TreeItem__box'] { 158 ${(0,w.gG)(t,n.pressed)} 159 } 160 161 @media (hover: hover) { 162 &:not([data-selected]):not(:focus) > [data-ui='TreeItem__box']:hover { 163 ${(0,w.gG)(t,n.hovered)} 164 } 165 166 &:focus > [data-ui='TreeItem__box'] { 167 ${(0,w.gG)(t,n.selected)} 168 } 169 } 170 } 171 `})),nx=(0,x.zo)(w.xu).attrs({forwardedAs:"a"}).withConfig({displayName:"TreeItemBox",componentId:"sc-iiskig-1"})(function(e){let{$level:t}=e,{space:n}=(0,tO.aQ)(e.theme);return(0,x.iv)` 172 padding-left: ${(0,w.hO)(n[2]*t)}; 173 174 &[data-as='a'] { 175 text-decoration: none; 176 } 177 `}),nk=(0,x.zo)(w.xv).withConfig({displayName:"ToggleArrowText",componentId:"sc-iiskig-2"})`& > svg{transition:transform 100ms;}`;(0,y.memo)(function(e){let{children:t,expanded:n=!1,fontSize:r=1,href:o,icon:i,id:a,linkAs:l,muted:s,onClick:u,padding:c=2,selected:d=!1,space:f=2,text:p,weight:g,...m}=e,b=(0,y.useRef)(null),v=(0,y.useRef)(null),x=nb(),{path:k,registerItem:S,setExpanded:E,setFocusedElement:_}=x,j=(0,y.useId)(),C=a||j,I=(0,y.useMemo)(()=>k.concat([C||""]),[C,k]),R=I.join("/"),$=x.state[R],O=x.focusedElement===b.current,M=$?.expanded===void 0?n:$?.expanded||!1,A=x.focusedElement&&x.focusedElement===b.current?0:-1,z=(0,y.useMemo)(()=>({...x,level:x.level+1,path:I}),[I,x]),N=(0,y.useCallback)(e=>{u&&u(e);let t=e.target;t instanceof HTMLElement&&("TreeItem"===t.getAttribute("data-ui")||t.closest('[data-ui="TreeItem__box"]'))&&(e.stopPropagation(),E(R,!M),_(b.current))},[M,R,u,E,_]),T=(0,y.useCallback)(e=>{O&&"Enter"===e.key&&(v.current||b.current)?.click()},[O]);(0,y.useEffect)(()=>{if(b.current)return S(b.current,I.join("/"),M,d)},[M,I,S,d]);let P=(0,h.jsxs)(w.kC,{padding:c,children:[(0,h.jsxs)(w.xu,{marginRight:f,style:{visibility:i||t?"visible":"hidden",pointerEvents:"none"},children:[i&&(0,h.jsx)(w.xv,{muted:s,size:r,weight:g,children:(0,h.jsx)(i,{})}),!i&&(0,h.jsx)(nk,{muted:s,size:r,weight:g,children:(0,h.jsx)(e9.tgp,{style:{transform:M?"rotate(90deg)":void 0}})})]}),(0,h.jsx)(w.xu,{flex:1,children:(0,h.jsx)(w.xv,{muted:s,size:r,textOverflow:"ellipsis",weight:g,children:p})})]});return o?(0,h.jsxs)(nw,{"data-selected":d?"":void 0,"data-tree-id":C,"data-tree-key":R,"data-ui":"TreeItem",...m,onClick:N,ref:b,role:"none",children:[(0,h.jsx)(nx,{$level:x.level,"aria-expanded":M,as:l,"data-ui":"TreeItem__box",href:o,ref:v,role:"treeitem",tabIndex:A,children:P}),(0,h.jsx)(ny.Provider,{value:z,children:t&&(0,h.jsx)(nv,{hidden:!M,children:t})})]}):(0,h.jsxs)(nw,{"data-selected":d?"":void 0,"data-ui":"TreeItem","data-tree-id":C,"data-tree-key":R,...m,"aria-expanded":M,onClick:N,onKeyDown:T,ref:b,role:"treeitem",tabIndex:A,children:[(0,h.jsx)(nx,{$level:x.level,as:"div","data-ui":"TreeItem__box",children:P}),(0,h.jsx)(ny.Provider,{value:z,children:t&&(0,h.jsx)(nv,{expanded:M,children:t})})]})}).displayName="Memo(TreeItem)";let nS=e=>"object"==typeof e&&null!=e&&1===e.nodeType,nE=(e,t)=>
177(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,n_=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return nE(n.overflowY,t)||nE(n.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},nj=(e,t,n,r,o,i,a,l)=>i<e&&a>t||i>e&&a<t?0:i<=e&&l<=n||a>=t&&l>=n?i-e-r:a>t&&l<n||i<e&&l>n?a-t+o:0,nC=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},nI=(e,t)=>{var n,r,o,i;if("undefined"==typeof document)return[];let{scrollMode:a,block:l,inline:s,boundary:u,skipOverflowHiddenElements:c}=t,d="function"==typeof u?u:e=>e!==u;if(!nS(e))throw TypeError("Invalid target");let f=document.scrollingElement||document.documentElement,p=[],h=e;for(;nS(h)&&d(h);){if((h=nC(h))===f){p.push(h);break}null!=h&&h===document.body&&n_(h)&&!n_(document.documentElement)||null!=h&&n_(h,c)&&p.push(h)}let g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,m=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:y,scrollY:b}=window,{height:v,width:w,top:x,right:k,bottom:S,left:E}=e.getBoundingClientRect(),{top:_,right:j,bottom:C,left:I}=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e),R="start"===l||"nearest"===l?x-_:"end"===l?S+C:x+v/2-_+C,$="center"===s?E+w/2-I+j:"end"===s?k+j:E-I,O=[];for(let e=0;e<p.length;e++){let t=p[e],{height:n,width:r,top:o,right:i,bottom:u,left:c}=t.getBoundingClientRect();if("if-needed"===a&&x>=0&&E>=0&&S<=m&&k<=g&&(t===f&&!n_(t)||x>=o&&S<=u&&E>=c&&k<=i))break;let d=getComputedStyle(t),h=parseInt(d.borderLeftWidth,10),_=parseInt(d.borderTopWidth,10),j=parseInt(d.borderRightWidth,10),C=parseInt(d.borderBottomWidth,10),I=0,M=0,A="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-j:0,z="offsetHeight"in t?t.offsetHeight-t.clientHeight-_-C:0,N="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,T="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)I="start"===l?R:"end"===l?R-m:"nearest"===l?nj(b,b+m,m,_,C,b+R,b+R+v,v):R-m/2,M="start"===s?$:"center"===s?$-g/2:"end"===s?$-g:nj(y,y+g,g,h,j,y+$,y+$+w,w),I=Math.max(0,I+b),M=Math.max(0,M+y);else{I="start"===l?R-o-_:"end"===l?R-u+C+z:"nearest"===l?nj(o,u,n,_,C+z,R,R+v,v):R-(o+n/2)+z/2,M="start"===s?$-c-h:"center"===s?$-(c+r/2)+A/2:"end"===s?$-i+j+A:nj(c,i,r,h,j+A,$,$+w,w);let{scrollLeft:e,scrollTop:a}=t;I=0===T?0:Math.max(0,Math.min(a+I/T,t.scrollHeight-n/T+z)),M=0===N?0:Math.max(0,Math.min(e+M/N,t.scrollWidth-r/N+A)),R+=a-I,$+=e-M}O.push({el:t,top:I,left:M})}return O},nR=e=>!1===e?{block:"end",inline:"nearest"}:e===Object(e)&&0!==Object.keys(e).length?e:{block:"start",inline:"nearest"};var n$=n(65069),nO=n(78224),nM=n(95978),nA=n(82863),nz=n(36381);function nN(e){let[t,n]=e;return[t,n]}function nT(e,t){let n=e,r=t,o=n.length,i=r.length;if(0===o||0===i)return 0;o>i?n=n.substring(o-i):o<i&&(r=r.substring(0,o));let a=Math.min(o,i);if(n===r)return a;let l=0,s=1;for(let e=0;-1!==e;){let t=n.substring(a-s);if(-1===(e=r.indexOf(t)))break;s+=e,(0===e||n.substring(a-s)===r.substring(0,s))&&(l=s,s++)}return l}function nP(e,t){if(!e||!t||e[0]!==t[0])return 0;let n=0,r=Math.min(e.length,t.length),o=r,i=0;for(;n<o;)e.substring(i,o)===t.substring(i,o)?i=n=o:r=o,o=Math.floor((r-n)/2+n);return o}function nL(e,t){if(!e||!t||e[e.length-1]!==t[t.length-1])return 0;let n=0,r=Math.min(e.length,t.length),o=r,i=0;for(;n<o;)e.substring(e.length-o,e.length-i)===t.substring(t.length-o,t.length-i)?i=n=o:r=o,o=Math.floor((r-n)/2+n);return o}function nD(e){let t=e.charCodeAt(0);return t>=56320&&t<=57343}function nF(e,t,n,r,o){let i=e.substring(0,n),a=t.substring(0,r),l=e.substring(n),s=t.substring(r),u=nZ(i,a,{checkLines:!1,deadline:o}),c=nZ(l,s,{checkLines:!1,deadline:o});return u.concat(c)}function nB(e,t,n){let r=e.slice(n,n+Math.floor(e.length/4)),o=-1,i="",a,l,s,u;for(;-1!==(o=t.indexOf(r,o+1));){let r=nP(e.slice(n),t.slice(o)),c=nL(e.slice(0,n),t.slice(0,o));i.length<c+r&&(i=t.slice(o-c,o)+t.slice(o,o+r),a=e.slice(0,n-c),l=e.slice(n+r),s=t.slice(0,o-c),u=t.slice(o+r))}return 2*i.length>=e.length?[a||"",l||"",s||"",u||"",i||""]:null}var nH=Object.defineProperty,nU=Object.getOwnPropertySymbols,nV=Object.prototype.hasOwnProperty,nG=Object.prototype.propertyIsEnumerable,nW=(e,t,n
177)=>t in e?nH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nq=(e,t)=>{for(var n in t||(t={}))nV.call(t,n)&&nW(e,n,t[n]);if(nU)for(var n of nU(t))nG.call(t,n)&&nW(e,n,t[n]);return e};function nY(e,t,n){var r,o;let i;if(null===e||null===t)throw Error("Null input. (diff)");let a=nZ(e,t,nq({checkLines:!0,deadline:(o=(r=n||{}).timeout||1,i=1,"u">typeof o&&(i=o<=0?Number.MAX_VALUE:o),Date.now()+1e3*i)},r));return function(e){for(let t=0;t<e.length;t++){let[n,r]=e[t];if(0===r.length)continue;let o=r[0];(function(e){let t=e.charCodeAt(0);return t>=55296&&t<=56319})(r[r.length-1])&&0===n&&nQ(e,t,1),nD(o)&&0===n&&nQ(e,t,-1)}for(let t=0;t<e.length;t++)0===e[t][1].length&&e.splice(t,1)}(a),a}function nZ(e,t,n){let r=e,o=t;if(r===o)return r?[[0,r]]:[];let i=nP(r,o),a=r.substring(0,i);i=nL(r=r.substring(i),o=o.substring(i));let l=r.substring(r.length-i),s=function(e,t,n){let r;if(!e)return[[1,t]];if(!t)return[[-1,e]];let o=e.length>t.length?e:t,i=e.length>t.length?t:e,a=o.indexOf(i);if(-1!==a)return r=[[1,o.substring(0,a)],[0,i],[1,o.substring(a+i.length)]],e.length>t.length&&(r[0][0]=-1,r[2][0]=-1),r;if(1===i.length)return[[-1,e],[1,t]];let l=function(e,t,n=1){let r,o,i,a,l;if(n<=0)return null;let s=e.length>t.length?e:t,u=e.length>t.length?t:e;if(s.length<4||2*u.length<s.length)return null;let c=nB(s,u,Math.ceil(s.length/4)),d=nB(s,u,Math.ceil(s.length/2));if(c&&d)r=c[4].length>d[4].length?c:d;else{if(!c&&!d)return null;d?c||(r=d):r=c}if(!r)throw Error("Unable to find a half match.");return e.length>t.length?(o=r[0],i=r[1],a=r[2],l=r[3]):(a=r[0],l=r[1],o=r[2],i=r[3]),[o,i,a,l,r[4]]}(e,t);if(l){let e=l[0],t=l[1],r=l[2],o=l[3],i=l[4],a=nZ(e,r,n),s=nZ(t,o,n);return a.concat([[0,i]],s)}return n.checkLines&&e.length>100&&t.length>100?function(e,t,n){let r=e,o=t,i=function(e,t){let n=[],r={};function o(e){let t="",o=0,a=-1,l=n.length;for(;a<e.length-1;){-1===(a=e.indexOf(` 178`,o))&&(a=e.length-1);let s=e.slice(o,a+1);(r.hasOwnProperty?r.hasOwnProperty(s):void 0!==r[s])?t+=String.fromCharCode(r[s]):(l===i&&(s=e.slice(o),a=e.length),t+=String.fromCharCode(l),r[s]=l,n[l++]=s),o=a+1}return t}n[0]="";let i=4e4,a=o(e);return i=65535,{chars1:a,chars2:o(t),lineArray:n}}(r,o);r=i.chars1,o=i.chars2;let a=i.lineArray,l=nZ(r,o,{checkLines:!1,deadline:n.deadline});(function(e,t){for(let n=0;n<e.length;n++){let r=e[n][1],o=[];for(let e=0;e<r.length;e++)o[e]=t[r.charCodeAt(e)];e[n][1]=o.join("")}})(l,a),(l=nJ(l)).push([0,""]);let s=0,u=0,c=0,d="",f="";for(;s<l.length;){switch(l[s][0]){case 1:c++,f+=l[s][1];break;case -1:u++,d+=l[s][1];break;case 0:if(u>=1&&c>=1){l.splice(s-u-c,u+c),s=s-u-c;let e=nZ(d,f,{checkLines:!1,deadline:n.deadline});for(let t=e.length-1;t>=0;t--)l.splice(s,0,e[t]);s+=e.length}c=0,u=0,d="",f="";break;default:throw Error("Unknown diff operation.")}s++}return l.pop(),l}(e,t,n):function(e,t,n){let r=e.length,o=t.length,i=Math.ceil((r+o)/2),a=2*i,l=Array(a),s=Array(a);for(let e=0;e<a;e++)l[e]=-1,s[e]=-1;l[i+1]=0,s[i+1]=0;let u=r-o,c=u%2!=0,d=0,f=0,p=0,h=0;for(let g=0;g<i&&!(Date.now()>n);g++){for(let p=-g+d;p<=g-f;p+=2){let h;let m=i+p,y=(h=p===-g||p!==g&&l[m-1]<l[m+1]?l[m+1]:l[m-1]+1)-p;for(;h<r&&y<o&&e.charAt(h)===t.charAt(y);)h++,y++;if(l[m]=h,h>r)f+=2;else if(y>o)d+=2;else if(c){let o=i+u-p;if(o>=0&&o<a&&-1!==s[o]&&h>=r-s[o])return nF(e,t,h,y,n)}}for(let d=-g+p;d<=g-h;d+=2){let f;let m=i+d,y=(f=d===-g||d!==g&&s[m-1]<s[m+1]?s[m+1]:s[m-1]+1)-d;for(;f<r&&y<o&&e.charAt(r-f-1)===t.charAt(o-y-1);)f++,y++;if(s[m]=f,f>r)h+=2;else if(y>o)p+=2;else if(!c){let o=i+u-d;if(o>=0&&o<a&&-1!==l[o]){let a=l[o],s=i+a-o;if(a>=(f=r-f))return nF(e,t,a,s,n)}}}}return[[-1,e],[1,t]]}(e,t,n.deadline)}(r=r.substring(0,r.length-i),o=o.substring(0,o.length-i),n);return a&&s.unshift([0,a]),l&&s.push([0,l]),s=n6(s)}function nK(e,t,n){return 1===n?e+t:t+e}function nX(e,t){return 1===t?[e.substring(0,e.length-1),e[e.length-1]]:[e.substring(1),e[0]]}function nQ(e,t,n){var r,o;let i=1===n?-1:1,a=null,l=null,s=t+n;for(;s>=0&&s<e.length&&(null===a||null===l);s+=n){let[r,o]=e[s];if(0!==o.length){if(1===r){null===a&&(a=s);continue}if(-1===r){null===l&&(l=s);continue}if(0===r){if(null===a&&null===l){let[r,o]=nX(e[t][1],n);e[t][1]=r,e[s][1]=nK(e[s][1],o,i);return}break}}}if(null!==a&&null!==l&&(r=a,o=l,1===n?e[r][1][e[r][1].length-1]===e[o][1][e[o][1].length-1]:e[r][1][0]===e[o][1][0])){let[r,o]=nX(e[a][1],i),[s]=nX(e[l][1],i);e[a][1]=r,e[l][1]=s,e[t][1]=nK(e[t][1],o,n);return}let[u,c]=nX(e[t][1],n);e[t][1]=u,null===a?(e.splice(s,0,[1,c]),null!==l&&l>=s&&l++):e[a][1]=nK(e[a][1],c,i),null===l?e.splice(s,0,[-1,c]):e[l][1]=nK(e[l][1],c,i)}function nJ(e){let t=e.map(e=>nN(e)),n=!1,r=[],o=0,i=null,a=0,l=0,s=0,u=0,c=0;for(;a<t.length;)0===t[a][0]?(r[o++]=a,l=u,s=c,u=0,c=0,i=t[a][1]):(1===t[a][0]?u+=t[a][1].length:c+=t[a][1].length,i&&i.length<=Math.max(l,s)&&i.length<=Math.max(u,c)&&(t.splice(r[o-1],0,[-1,i]),t[r[o-1]+1][0]=1,o--,a=--o>0?r[o-1]:-1,l=0,s=0,u=0,c=0,i=null,n=!0)),a++;for(n&&(t=n6(t)),t=n4(t),a=1;a<t.length;
178){if(-1===t[a-1][0]&&1===t[a][0]){let e=t[a-1][1],n=t[a][1],r=nT(e,n),o=nT(n,e);r>=o?(r>=e.length/2||r>=n.length/2)&&(t.splice(a,0,[0,n.substring(0,r)]),t[a-1][1]=e.substring(0,e.length-r),t[a+1][1]=n.substring(r),a++):(o>=e.length/2||o>=n.length/2)&&(t.splice(a,0,[0,e.substring(0,o)]),t[a-1][0]=1,t[a-1][1]=n.substring(0,n.length-o),t[a+1][0]=-1,t[a+1][1]=e.substring(o),a++),a++}a++}return t}let n0=/[^a-zA-Z0-9]/,n1=/\s/,n2=/[\r\n]/,n5=/\n\r?\n$/,n3=/^\r?\n\r?\n/;function n4(e){let t=e.map(e=>nN(e));function n(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),o=n.match(n0),i=r.match(n0),a=o&&n.match(n1),l=i&&r.match(n1),s=a&&n.match(n2),u=l&&r.match(n2),c=s&&e.match(n5),d=u&&t.match(n3);return c||d?5:s||u?4:o&&!a&&l?3:a||l?2:o||i?1:0}let r=1;for(;r<t.length-1;){if(0===t[r-1][0]&&0===t[r+1][0]){let e=t[r-1][1],o=t[r][1],i=t[r+1][1],a=nL(e,o);if(a){let t=o.substring(o.length-a);e=e.substring(0,e.length-a),o=t+o.substring(0,o.length-a),i=t+i}let l=e,s=o,u=i,c=n(e,o)+n(o,i);for(;o.charAt(0)===i.charAt(0);){e+=o.charAt(0),o=o.substring(1)+i.charAt(0),i=i.substring(1);let t=n(e,o)+n(o,i);t>=c&&(c=t,l=e,s=o,u=i)}t[r-1][1]!==l&&(l?t[r-1][1]=l:(t.splice(r-1,1),r--),t[r][1]=s,u?t[r+1][1]=u:(t.splice(r+1,1),r--))}r++}return t}function n6(e){let t=e.map(e=>nN(e));t.push([0,""]);let n=0,r=0,o=0,i="",a="",l;for(;n<t.length;)switch(t[n][0]){case 1:o++,a+=t[n][1],n++;break;case -1:r++,i+=t[n][1],n++;break;
178case 0:r+o>1?(0!==r&&0!==o&&(0!==(l=nP(a,i))&&(n-r-o>0&&0===t[n-r-o-1][0]?t[n-r-o-1][1]+=a.substring(0,l):(t.splice(0,0,[0,a.substring(0,l)]),n++),a=a.substring(l),i=i.substring(l)),0!==(l=nL(a,i))&&(t[n][1]=a.substring(a.length-l)+t[n][1],a=a.substring(0,a.length-l),i=i.substring(0,i.length-l))),n-=r+o,t.splice(n,r+o),i.length&&(t.splice(n,0,[-1,i]),n++),a.length&&(t.splice(n,0,[1,a]),n++),n++):0!==n&&0===t[n-1][0]?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,o=0,r=0,i="",a="";break;default:throw Error("Unknown diff operation")}""===t[t.length-1][1]&&t.pop();let s=!1;for(n=1;n<t.length-1;)0===t[n-1][0]&&0===t[n+1][0]&&(t[n][1].substring(t[n][1].length-t[n-1][1].length)===t[n-1][1]?(t[n][1]=t[n-1][1]+t[n][1].substring(0,t[n][1].length-t[n-1][1].length),t[n+1][1]=t[n-1][1]+t[n+1][1],t.splice(n-1,1),s=!0):t[n][1].substring(0,t[n+1][1].length)===t[n+1][1]&&(t[n-1][1]+=t[n+1][1],t[n][1]=t[n][1].substring(t[n+1][1].length)+t[n+1][1],t.splice(n+1,1),s=!0)),n++;return s&&(t=n6(t)),t}var n8=Object.defineProperty,n9=Object.getOwnPropertySymbols,n7=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,rt=(e,t,n)=>t in e?n8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rn=(e,t)=>{for(var n in t||(t={}))n7.call(t,n)&&rt(e,n,t[n]);if(n9)for(var n of n9(t))re.call(t,n)&&rt(e,n,t[n]);return e};let rr={threshold:.5,distance:1e3};function ro(e,t,n,r={}){if(null===e||null===t||null===n)throw Error("Null input. (match())");let o=Math.max(0,Math.min(n,e.length));return e===t?0:e.length?e.substring(o,o+t.length)===t?o:function(e,t,n,r={}){if(t.length>32)throw Error("Pattern too long for this browser.");let o=rn(rn({},rr),r),i=function(e){let t={};for(let n=0;n<e.length;n++)t[e.charAt(n)]=0;for(let n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t}(t);function a(e,r){let i=e/t.length,a=Math.abs(n-r);return o.distance?i+a/o.distance:a?1:i}let l=o.threshold,s=e.indexOf(t,n);-1!==s&&(l=Math.min(a(0,s),l),-1!==(s=e.lastIndexOf(t,n+t.length))&&(l=Math.min(a(0,s),l)));let u=1<<t.length-1;s=-1;let c,d,f=t.length+e.length,p=[];for(let r=0;r<t.length;r++){for(c=0,d=f;c<d;)a(r,n+d)<=l?c=d:f=d,d=Math.floor((f-c)/2+c);f=d;let o=Math.max(1,n-d+1),h=Math.min(n+d,e.length)+t.length,g=Array(h+2);g[h+1]=(1<<r)-1;for(let t=h;t>=o;t--){let c=i[e.charAt(t-1)];if(0===r?g[t]=(g[t+1]<<1|1)&c:g[t]=(g[t+1]<<1|1)&c|((p[t+1]|p[t])<<1|1)|p[t+1],g[t]&u){let e=a(r,t-1);if(e<=l){if(l=e,(s=t-1)>n)o=Math.max(1,2*n-s);else break}}}if(a(r+1,n)>l)break;p=g}return s}(e,t,o,r):-1}function ri(e){let t=[];for(let n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function ra(e){let t=[];for(let n=0;n<e.length;n++)-1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function rl(e,t){let n=0,r=0,o=0,i=0,a;for(a=0;a<e.length&&(1!==e[a][0]&&(n+=e[a][1].length),-1!==e[a][0]&&(r+=e[a][1].length),!(n>t));a++)o=n,i=r;return e.length!==a&&-1===e[a][0]?i:i+(t-o)}function rs(e){let t=0;for(let n=0;n<e.length;n++){let r=e.codePointAt(n);if(typeof r>"u")throw Error("Failed to get codepoint");t+=ru(r)}return t}function ru(e){return e<=127?1:e<=2047?2:e<=65535?3:4}function rc(e,t){return{diffs:[],start1:e,start2:t,utf8Start1:e,utf8Start2:t,length1:0,length2:0,utf8Length1:0,utf8Length2:0}}var rd=Object.defineProperty,rf=Object.getOwnPropertySymbols,rp=Object.prototype.hasOwnProperty,rh=Object.prototype.propertyIsEnumerable,rg=(e,t,n)=>t in e?rd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rm=(e,t)=>{for(var n in t||(t={}))rp.call(t,n)&&rg(e,n,t[n]);if(rf)for(var n of rf(t))rh.call(t,n)&&rg(e,n,t[n]);return e};let ry={margin:4};function rb(e={}){return rm(rm({},ry),e)}function rv(e,t,n){if(0===t.length)return[];let r=[],o=rc(0,0),i=0,a=0,l=0,s=0,u=0,c=e,d=e;for(let e=0;e<t.length;e++){let f=t[e],[p,h]=f,g=h.length,m=rs(h);switch(i||0===p||(o.start1=a,o.start2=l,o.utf8Start1=s,o.utf8Start2=u),p){case 1:o.diffs[i++]=f,o.length2+=g,o.utf8Length2+=m,d=d.substring(0,l)+h+d.substring(l);break;case -1:o.length1+=g,o.utf8Length1+=m,o.diffs[i++]=f,d=d.substring(0,l)+d.substring(l+g);break;case 0:g<=2*n.margin&&i&&t.length!==e+1?(o.diffs[i++]=f,o.length1+=g,o.length2+=g,o.utf8Length1+=m,o.utf8Length2+=m):g>=2*n.margin&&i&&(rw(o,c,n),r.push(o),o=rc(-1,-1),i=0,c=d,a=l,s=u);break;default:throw Error("Unknown diff type")}1!==p&&(a+=g,s+=m),-1!==p&&(l+=g,u+=m)}return i&&(rw(o,c,n),r.push(o)),r}function rw(e,t,n){if(0===t.length)return;let r=t.substring(e.start2,e.start2+e.length1),o=0;for(;t.indexOf(r)!==t.lastIndexOf(r)&&r.length<32-n.margin-n.margin;)o+=n.margin,r=t.substring(e.start2-o,e.start2+e.length1+o);o+=n.margin;let i=e.start2-o;i>=1&&nD(t[i])&&i--;let a=t.substring(i,e.start2);a&&e.diffs.unshift([0,a]);let l=a.length,s=rs(a),u=e.start2+e.length1+o;u<t.length&&nD(t[u])&&u++;let c=t.substring(e.start2+e.length1,u);c&&e.diffs.push([0,c]);let d=c.length,f=rs(c);e.start1-=l,e.start2-=l,e.utf8Start1-=s,e.utf8Start2-=s,e.length1+=l+d,e.length2+=l+d,e.utf8Length1+=s+f,e.utf8Length2+=s+f}let rx=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;function rk(e){return parseInt(e,10)}function rS(e){let t,n,r;let{utf8Length1:o,utf8Length2:i,utf8Start1:a,utf8Start2:l,diffs:s}=e;t=0===o?`${a},0`:1===o?`${a+1}`:`${a+1},${o}`,n=0===i?`${l},0`:1===i?`${l+1}`:`${l+1},${i}`;let u=[`@@ -${t} +${n} @@ 179`];for(let e=0;e<s.length;e++){switch(s[e][0]){case 1:r="+";break;case -1:r="-";break;case 0:r=" ";break;default:throw Error("Unknown patch operation.")}u[e+1]=`${r+encodeURI(s[e][1])} 180`}return u.join("").replace(/%20/g," ")}var rE="object"==typeof global&&global&&global.Object===Object&&global,r_="object"==typeof self&&self&&self.Object===Object&&self,rj=rE||r_||Function("return this")(),rC=rj.Symbol,rI=Object.prototype,rR=rI.hasOwnProperty,r$=rI.toString,rO=rC?rC.toStringTag:void 0,rM=function(e){var t=rR.call(e,rO),n=e[rO];try{e[rO]=void 0;var r=!0}catch(e){}var o=r$.call(e);return r&&(t?e[rO]=n:delete e[rO]),o},rA=Object.prototype.toString,rz=rC?rC.toStringTag:void 0,rN=function(e){return null==e?void 0===e?"[object Undef
180ined]":"[object Null]":rz&&rz in Object(e)?rM(e):rA.call(e)},rT=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},rP=function(e){if(!rT(e))return!1;var t=rN(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},rL=rj["__core-js_shared__"],rD=(i=/[^.]+$/.exec(rL&&rL.keys&&rL.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",rF=Function.prototype.toString,rB=function(e){if(null!=e){try{return rF.call(e)}catch(e){}try{return e+""}catch(e){}}return""},rH=/^\[object .+?Constructor\]$/,rU=Object.prototype,rV=Function.prototype.toString,rG=rU.hasOwnProperty,rW=RegExp("^"+rV.call(rG).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rq=function(e,t){var n,r=null==e?void 0:e[t];return rT(n=r)&&(!rD||!(rD in n))&&(rP(n)?rW:rH).test(rB(n))?r:void 0},rY=function(){try{var e=rq(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),rZ=function(e,t,n){"__proto__"==t&&rY?rY(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},rK=function(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r},rX=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var l=i[++r];if(!1===t(o[l],l,o))break}return e},rQ=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},rJ=function(e){return null!=e&&"object"==typeof e},r0=function(e){return rJ(e)&&"[object Arguments]"==rN(e)},r1=Object.prototype,r2=r1.hasOwnProperty,r5=r1.propertyIsEnumerable,r3=r0(function(){return arguments}())?r0:function(e){return rJ(e)&&r2.call(e,"callee")&&!r5.call(e,"callee")},r4=Array.isArray,r6="object"==typeof exports&&exports&&!exports.nodeType&&exports,r8=r6&&"object"==typeof module&&module&&!module.nodeType&&module,r9=r8&&r8.exports===r6?rj.Buffer:void 0,r7=(r9?r9.isBuffer:void 0)||function(){return!1},oe=/^(?:0|[1-9]\d*)$/,ot=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&oe.test(e))&&e>-1&&e%1==0&&e<t},on=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},or={};or["[object Float32Array]"]=or["[object Float64Array]"]=or["[object Int8Array]"]=or["[object Int16Array]"]=or["[object Int32Array]"]=or["[object Uint8Array]"]=or["[object Uint8ClampedArray]"]=or["[object Uint16Array]"]=or["[object Uint32Array]"]=!0,or["[object Arguments]"]=or["[object Array]"]=or["[object ArrayBuffer]"]=or["[object Boolean]"]=or["[object DataView]"]=or["[object Date]"]=or["[object Error]"]=or["[object Function]"]=or["[object Map]"]=or["[object Number]"]=or["[object Object]"]=or["[object RegExp]"]=or["[object Set]"]=or["[object String]"]=or["[object WeakMap]"]=!1;var oo="object"==typeof exports&&exports&&!exports.nodeType&&exports,oi=oo&&"object"==typeof module&&module&&!module.nodeType&&module,oa=oi&&oi.exports===oo&&rE.process,ol=function(){try{var e=oi&&oi.require&&oi.require("util").types;if(e)return e;return oa&&oa.binding&&oa.binding("util")}catch(e){}}(),os=ol&&ol.isTypedArray,ou=os?function(e){return os(e)}:function(e){return rJ(e)&&on(e.length)&&!!or[rN(e)]},oc=Object.prototype.hasOwnProperty,od=function(e,t){var n=r4(e),r=!n&&r3(e),o=!n&&!r&&r7(e),i=!n&&!r&&!o&&ou(e),a=n||r||o||i,l=a?rQ(e.length,String):[],s=l.length;for(var u in e)(t||oc.call(e,u))&&!(a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ot(u,s)))&&l.push(u);return l},of=Object.prototype,op=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||of)},oh=(a=Object.keys,l=Object,function(e){return a(l(e))}),og=Object.prototype.hasOwnProperty,om=function(e){if(!op(e))return oh(e);var t=[];for(var n in Object(e))og.call(e,n)&&"constructor"!=n&&t.push(n);return t},oy=function(e){return null!=e&&on(e.length)&&!rP(e)},ob=function(e){return oy(e)?od(e):om(e)},ov=(s=function(e,t){return e&&rX(e,t,ob)},function(e,t){if(null==e)return e;if(!oy(e))return s(e,t);for(var n=e.length,r=-1,o=Object(e);(u?r--:++r<n)&&!1!==t(o[r],r,o););return e}),ow=function(e,t){return e===t||e!=e&&t!=t},ox=function(e,t){for(var n=e.length;n--;)if(ow(e[n][0],t))return n;return -1},ok=Array.prototype.splice;function oS(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}oS.prototype.clear=function(){this.__data__=[],this.size=0},oS.prototype.delete=function(e){var t=this.__data__,n=ox(t,e);return!(n<0)&&(n==t.length-1?t.pop():ok.call(t,n,1),--this.size,!0)},oS.prototype.get=function(e){var t=this.__data__,n=ox(t,e);return n<0?void 0:t[n][1]},oS.prototype.has=function(e){return ox(this.__data__,e)>-1},oS.prototype.set=function(e,t){var n=this.__data__,r=ox(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var oE=rq(rj,"Map"),o_=rq(Object,"create"),oj=Object.prototype.hasOwnProperty,oC=Object.prototype.hasOwnProperty;function oI(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}oI.prototype.clear=function(){this.__data__=o_?o_(null):{},this.size=0},oI.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},oI.prototype.get=function(e){var t=this.__data__;if(o_){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return oj.call(t,e)?t[e]:void 0},oI.prototype.has=function(e){var t=this.__data__;return o_?void 0!==t[e]:oC.call(t,e)},oI.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=o_&&void 0===t?"__lodash_hash_undefined__":t,this};var oR=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},o$=function(e,t){var n=e.__data__;return oR(t)?n["string"==typeof t?"string":"hash"]:n.map};function oO(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function oM(e){var t=this.__data__=new oS(e);this.size=t.size}function oA(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new oO;++t<n;)this.add(e[t])}oO.prototype.clear=function(){this.size=0,this.__data__={hash:new oI,map:new(oE||oS),string:new oI}},oO.prototype.delete=function(e){var t=o$(this,e).delete(e);return this.size-=t?1:0,t},oO.prototype.get=function(e){return o$(this,e).get(e)},oO.prototype.has=function(e){return o$(this,e).has(e)},oO.prototype.set=function(e,t){var n=o$(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},oM.prototype.clear=function(){this.__data__=new oS,this.size=0},oM.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},oM.prototype.get=function(e){return this.__data__.get(e)},oM.prototype.has=function(e){return this.__data__.has(e)},oM.prototype.set=function(e,t){var n=this.__data__;if(n instanceof oS){var r=n.__data__;if(!oE||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new oO(r)}return n.set(e,t),this.size=n.size,this},oA.prototype.add=oA.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},oA.prototype.has=function(e){return this.__data__.has(e)};var oz=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}
180,oN=function(e,t,n,r,o,i){var a=1&n,l=e.length,s=t.length;if(l!=s&&!(a&&s>l))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=2&n?new oA:void 0;for(i.set(e,t),i.set(t,e);++d<l;){var h=e[d],g=t[d];if(r)var m=a?r(g,h,d,t,e,i):r(h,g,d,e,t,i);if(void 0!==m){if(m)continue;f=!1;break}if(p){if(!oz(t,function(e,t){if(!p.has(t)&&(h===e||o(h,e,n,r,i)))return p.push(t)})){f=!1;break}}else if(!(h===g||o(h,g,n,r,i))){f=!1;break}}return i.delete(e),i.delete(t),f},oT=rj.Uint8Array,oP=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n},oL=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},oD=rC?rC.prototype:void 0,oF=oD?oD.valueOf:void 0,oB=function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!i(new oT(e),new oT(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return ow(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=oP;case"[object Set]":var s=1&r;if(l||(l=oL),e.size!=t.size&&!s)break;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var c=oN(l(e),l(t),r,o,i,a);return a.delete(e),c;case"[object Symbol]":if(oF)return oF.call(e)==oF.call(t)}return!1},oH=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},oU=function(e,t,n){var r=t(e);return r4(e)?r:oH(r,n(e))},oV=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i},oG=Object.prototype.propertyIsEnumerable,oW=Object.getOwnPropertySymbols,oq=oW?function(e){return null==e?[]:oV(oW(e=Object(e)),function(t){return oG.call(e,t)})}:function(){return[]},oY=function(e){return oU(e,ob,oq)},oZ=Object.prototype.hasOwnProperty,oK=function(e,t,n,r,o,i){var a=1&n,l=oY(e),s=l.length;if(s!=oY(t).length&&!a)return!1;for(var u=s;u--;){var c=l[u];if(!(a?c in t:oZ.call(t,c)))return!1}var d=i.get(e),f=i.get(t);if(d&&f)return d==t&&f==e;var p=!0;i.set(e,t),i.set(t,e);for(var h=a;++u<s;){var g=e[c=l[u]],m=t[c];if(r)var y=a?r(m,g,c,t,e,i):r(g,m,c,e,t,i);if(!(void 0===y?g===m||o(g,m,n,r,i):y)){p=!1;break}h||(h="constructor"==c)}if(p&&!h){var b=e.constructor,v=t.constructor;b!=v&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof v&&v instanceof v)&&(p=!1)}return i.delete(e),i.delete(t),p},oX=rq(rj,"DataView"),oQ=rq(rj,"Promise"),oJ=rq(rj,"Set"),o0=rq(rj,"WeakMap"),o1="[object Map]",o2="[object Promise]",o5="[object Set]",o3="[object WeakMap]",o4="[object DataView]",o6=rB(oX),o8=rB(oE),o9=rB(oQ),o7=rB(oJ),ie=rB(o0),it=rN;(oX&&it(new oX(new ArrayBuffer(1)))!=o4||oE&&it(new oE)!=o1||oQ&&it(oQ.resolve())!=o2||oJ&&it(new oJ)!=o5||o0&&it(new o0)!=o3)&&(it=function(e){var t=rN(e),n="[object Object]"==t?e.constructor:void 0,r=n?rB(n):"";if(r)switch(r){case o6:return o4;case o8:return o1;case o9:return o2;case o7:return o5;case ie:return o3}return t});var ir=it,io="[object Arguments]",ii="[object Array]",ia="[object Object]",il=Object.prototype.hasOwnProperty,is=function(e,t,n,r,o,i){var a=r4(e),l=r4(t),s=a?ii:ir(e),u=l?ii:ir(t);s=s==io?ia:s,u=u==io?ia:u;var c=s==ia,d=u==ia,f=s==u;if(f&&r7(e)){if(!r7(t))return!1;a=!0,c=!1}if(f&&!c)return i||(i=new oM),a||ou(e)?oN(e,t,n,r,o,i):oB(e,t,s,n,r,o,i);if(!(1&n)){var p=c&&il.call(e,"__wrapped__"),h=d&&il.call(t,"__wrapped__");
180if(p||h){var g=p?e.value():e,m=h?t.value():t;return i||(i=new oM),o(g,m,n,r,i)}}return!!f&&(i||(i=new oM),oK(e,t,n,r,o,i))},iu=function e(t,n,r,o,i){return t===n||(null!=t&&null!=n&&(rJ(t)||rJ(n))?is(t,n,r,o,e,i):t!=t&&n!=n)},ic=function(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var l=n[o];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<i;){var s=(l=n[o])[0],u=e[s],c=l[1];if(a&&l[2]){if(void 0===u&&!(s in e))return!1}else{var d=new oM;if(r)var f=r(u,c,s,e,t,d);if(!(void 0===f?iu(c,u,3,r,d):f))return!1}}return!0},id=function(e){return e==e&&!rT(e)},ip=function(e){for(var t=ob(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,id(o)]}return t},ih=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},ig=function(e){var t=ip(e);return 1==t.length&&t[0][2]?ih(t[0][0],t[0][1]):function(n){return n===e||ic(n,e,t)}},im=function(e){return"symbol"==typeof e||rJ(e)&&"[object Symbol]"==rN(e)},iy=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ib=/^\w*$/,iv=function(e,t){if(r4(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||im(e))||ib.test(e)||!iy.test(e)||null!=t&&e in Object(t)};function iw(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(iw.Cache||oO),n}iw.Cache=oO;var ix=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ik=/\\(\\)?/g,iS=(d=(c=iw(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ix,function(e,n,r,o){t.push(r?o.replace(ik,"$1"):n||e)}),t},function(e){return 500===d.size&&d.clear(),e})).cache,c),iE=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},i_=1/0,ij=rC?rC.prototype:void 0,iC=ij?ij.toString:void 0,iI=function e(t){if("string"==typeof t)return t;if(r4(t))return iE(t,e)+"";if(im(t))return iC?iC.call(t):"";var n=t+"";return"0"==n&&1/t==-i_?"-0":n},iR=function(e,t){return r4(e)?e:iv(e,t)?[e]:iS(null==e?"":iI(e))},i$=1/0,iO=function(e){if("string"==typeof e||im(e))return e;var t=e+"";return"0"==t&&1/e==-i$?"-0":t},iM=function(e,t){t=iR(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[iO(t[n++])];return n&&n==r?e:void 0},iA=function(e,t,n){var r=null==e?void 0:iM(e,t);return void 0===r?n:r},iz=function(e,t){return null!=e&&t in Object(e)},iN=function(e,t,n){t=iR(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var a=iO(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&on(o)&&ot(a,o)&&(r4(e)||r3(e))},iT=function(e){return e},iP=function(e){var t;return iv(e)?(t=iO(e),function(e){return null==e?void 0:e[t]}):function(t){return iM(t,e)}},iL=function(e){if("function"==typeof e)return e;if(null==e)return iT;if("object"==typeof e){var t,n;return r4(e)?(t=e[0],n=e[1],iv(t)&&id(n)?ih(iO(t),n):function(e){var r=iA(e,t);return void 0===r&&r===n?null!=e&&iN(e,t,iz):iu(n,r,3)}):ig(e)}return iP(e)},iD=Object.prototype.hasOwnProperty,iF=(f=function(e,t,n){iD.call(e,n)?e[n].push(t):rZ(e,n,[t])},function(e,t){return(r4(e)?rK:function(e,t,n,r){return ov(e,function(e,o,i){t(r,e,n(e),i)}),r})(e,f,iL(t,2),{})});let iB=["Value","Copy","Blank","ReturnIntoArray","ReturnIntoObject","ReturnIntoObjectSameKey","PushField","PushElement","PushParent","Pop","PushFieldCopy","PushFieldBlank","PushElementCopy","PushElementBlank","ReturnIntoObjectPop","ReturnIntoObjectSameKeyPop","ReturnIntoArrayPop","ObjectSetFieldValue","ObjectCopyField","ObjectDeleteField","ArrayAppendValue","ArrayAppendSlice","StringAppendString","StringAppendSlice"];class iH{model;root;patch;i;inputStack;outputStack;constructor(e,t,n){this.model=e,this.root=t,this.patch=n,this.i=0,this.inputStack=[],this.outputStack=[]}read(){return this.patch[this.i++]}process(){for(this.inputStack.push({value:this.root}),this.outputStack.push({value:this.root});this.i<this.patch.length;){let e=this.read(),t=iB[e];if(!t)throw Error(`Unknown opcode: ${e}`);this[`process${t}`].apply(this)}let e=this.outputStack.pop();return this.finalizeOutput(e)}inputEntry(){return this.inputStack[this.inputStack.length-1]}inputKey(e,t){return e.keys||(e.keys=this.model.objectGetKeys(e.value).sort()),e.keys[t]}outputEntry(){return this.outputStack[this.outputStack.length-1]}outputArray(){let e=this.outputEntry();return e.writeValue||(e.writeValue=this.model.copyArray(e.value)),e.writeValue}outputObject(){let e=this.outputEntry();return e.writeValue||(e.writeValue=this.model.copyObject(e.value)),e.writeValue}outputString(){let e=this.outputEntry();return e.writeValue||(e.writeValue=this.model.copyString(e.value)),e.writeValue}finalizeOutput(e){return e.writeValue?this.model.finalize(e.writeValue):e.value}processValue(){let e=this.model.wrap(this.read());this.outputStack.push({value:e})}processCopy(){let e=this.inputEntry();this.outputStack.push({value:e.value})}processBlank(){this.outputStack.push({value:null})}processReturnIntoArray(){let e=this.outputStack.pop(),t=this.finalizeOutput(e),n=this.outputArray();this.model.arrayAppendValue(n,t)}processReturnIntoObject(){let e=this.read(),t=this.outputStack.pop(),n=this.finalizeOutput(t);n=this.model.markChanged(n);let r=this.outputObject();this.model.objectSetField(r,e,n)}processReturnIntoObjectSameKey(){let e=this.inputEntry(),t=this.outputStack.pop(),n=this.finalizeOutput(t),r=this.outputObject();this.model.objectSetField(r,e.key,n)}processPushField(){let e=this.read(),t=this.inputEntry(),n=this.inputKey(t,e),r=this.model.objectGetField(t.value,n);this.inputStack.push({value:r,key:n})}processPushElement(){let e=this.read(),t=this.inputEntry(),n=this.model.arrayGetElement(t.value,e);this.inputStack.push({value:n})}processPop(){this.inputStack.pop()}processPushFieldCopy(){this.processPushField(),this.processCopy()}processPushFieldBlank(){this.processPushField(),this.processBlank()}processPushElementCopy(){this.processPushElement(),this.processCopy()}processPushElementBlank(){this.processPushElement(),this.processBlank()}processReturnIntoObjectPop(){this.processReturnIntoObject(),this.processPop()}processReturnIntoObjectSameKeyPop(){this.processReturnIntoObjectSameKey(),this.processPop()}processReturnIntoArrayPop(){this.processReturnIntoArray(),this.processPop()}processObjectSetFieldValue(){this.processValue(),this.processReturnIntoObject()}processObjectCopyField(){this.processPushField(),this.processCopy(),this.processReturnIntoObjectSameKey(),this.processPop()}processObjectDeleteField(){let e=this.read(),t=this.inputEntry(),n=this.inputKey(t,e),r=this.outputObject();this.model.objectDeleteField(r,n)}processArrayAppendValue(){let e=this.model.wrap(this.read()),t=this.outputArray();this.model.arrayAppendValue(t,e)}processArrayAppendSlice(){let e=this.read(),t=this.read(),n=this.outputArray(),r=this.inputEntry().value;this.model.arrayAppendSlice(n,r,e,t)}processStringAppendString(){let e=this.model.wrap(this.read()),t=this.outputString();this.model.stringAppendValue(t,e)}processStringAppendSlice(){let e=this.read(),t=this.read(),n=this.outputString(),r=this.inputEntry().value;this.model.stringAppendSlice(n,r,e,t)}}function iU(e,t,n=0){let r=n,o=0;for(o=n;r<t;o++){var i;let t=(i=e.codePointAt(o))>>16?4:i>>11?3:i>>7?2:1;4===t&&o++,r+=t}return o}class iV{wrap(e){return e}finalize(e){return Array.isArray(e)?e:e.data}markChanged(e){return e}objectGetKeys(e){return Object.keys(e)}
180objectGetField(e,t){return e[t]}arrayGetElement(e,t){return e[t]}copyObject(e){let t={type:"object",data:{}};if(null!==e)for(let[n,r]of Object.entries(e))t.data[n]=r;return t}copyArray(e){return null===e?[]:e.slice()}copyString(e){return{type:"string",data:null===e?"":e}}objectSetField(e,t,n){e.data[t]=n}objectDeleteField(e,t){delete e.data[t]}arrayAppendValue(e,t){e.push(t)}arrayAppendSlice(e,t,n,r){e.push(...t.slice(n,r))}stringAppendSlice(e,t,n,r){let o=iU(t,n),i=iU(t,r,o);e.data+=t.slice(o,i)}stringAppendValue(e,t){e.data+=t}}var iG=n(71064),iW=n(44465),iq=n(89155),iY=n(68851),iZ=n(96987),iK=n(5853),iX=n(8150),iQ=1,iJ={};function i0(e){return e in iJ&&(delete iJ[e],!0)}var i1=function(e){var t=iQ++;return iJ[t]=!0,p||(p=Promise.resolve()),p.then(function(){return i0(t)&&e()}),t},i2=function(e){i0(e)},i5={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=i5.delegate;return((null==n?void 0:n.setImmediate)||i1).apply(void 0,(0,iK.ev)([],(0,iK.CR)(e)))},clearImmediate:function(e){var t=i5.delegate;return((null==t?void 0:t.clearImmediate)||i2)(e)},delegate:void 0},i3=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return(0,iK.ZT)(t,e),t.prototype.requestAsyncId=function(t,n,r){return(void 0===r&&(r=0),null!==r&&r>0)?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=i5.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!=r?r>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var o,i=t.actions;null!=n&&(null===(o=i[i.length-1])||void 0===o?void 0:o.id)!==n&&(i5.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(iX.o),i4=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,iK.ZT)(t,e),t.prototype.flush=function(e){this._active=!0;var t,n=this._scheduled;this._scheduled=void 0;var r=this.actions;e=e||r.shift();do if(t=e.execute(e.state,e.delay))break;while((e=r[0])&&e.id===n&&r.shift());if(this._active=!1,t){for(;(e=r[0])&&e.id===n&&r.shift();)e.unsubscribe();throw t}},t}(n(319).v))(i3),i6=n(48203),i8=n(67077),i9=n(66355);function i7(e){if("patch"===e.type)return e.id;if("create"===e.type)return e.document._id;if("delete"===e.type)return e.id;if("createIfNotExists"===e.type||"createOrReplace"===e.type)return e.document._id;throw Error("Invalid mutation type")}let ae=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};function at(e){return"string"==typeof e?._key}function an(e){return"object"==typeof e&&"_key"in e&&"string"==typeof e._key}function ar(e){return"number"==typeof e||an(e)}function ao(e,t){if(0===e.length)return t;let n=t;for(let t of e){if(ar(t)){if(!Array.isArray(n))return;if(an(t)){n=n.find(e=>e._key===t._key);continue}n=n[t];continue}n=n[t]}return n}let ai=/^[a-z_$]+/;function aa(e){return e.map((e,t)=>{var n;return n=0===t,Array.isArray(e)?`[${e[0]}:${e[1]||""}]`:"number"==typeof e?`[${e}]`:an(e)?`[_key==${JSON.stringify(e._key)}]`:"string"==typeof e&&ai.test(e)?n?e:`.${e}`:`['${e}']`}).join("")}function al(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function as(e,t){if("number"==typeof t)return function(e,t){if(0===e&&(-1===t||0===t))return 0;let n=t<0?e+t:t;return n>=e||n<0?null:n}(e.length,t);if(an(t)){let n=e.findIndex(e=>(null!==e&&"object"==typeof e&&"string"==typeof e._key&&e._key||null)===t._key);return -1===n?null:n}throw Error(`Expected path segment to be addressing a single array item either by numeric index or by '_key'. Instead saw ${JSON.stringify(t)}`)}function au(e,t,n,r){let o=e.slice();return o.splice(t,n,...r||[]),o}function ac(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "insert()" on non-array value');let n=as(t,e.referenceItem);if(null===n)throw Error(`Found no matching array element to insert ${e.position}`);return 0===t.length?e.items:au(t,"before"===e.position?n:n+1,0,e.items)}let ad=Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty);var af=Object.freeze({__proto__:null,assign:function(e,t){if(!al(t))throw TypeError('Cannot apply "assign()" on non-object value');return!function(e){for(let t in e)if(ad(e,t))return!1;return!0}(e.value)?{...t,...e.value}:t},dec:function(e,t){if("number"!=typeof t)throw TypeError('Cannot apply "dec()" on non-numeric value');return t-e.amount},diffMatchPatch:function(e,t){if("string"!=typeof t)throw TypeError('Cannot apply "diffMatchPatch()" on non-string value');return function(e,t,n={}){if("string"==typeof e)throw Error("Patches must be an array - pass the patch to `parsePatch()` first");let r=t;if(0===e.length)return[r,[]];let o=function(e,t,n={}){let r=0,o=0;function i(e){for(;r<e;){let e=t.codePointAt(o);if(typeof e>"u")return o;r+=ru(e),e>65535?o+=2:o+=1}if(!n.allowExceedingIndices&&r!==e)throw Error("Failed to determine byte offset");return o}let a=[];for(let t of e)a.push({diffs:t.diffs.map(e=>nN(e)),start1:i(t.start1),start2:i(t.start2),utf8Start1:t.utf8Start1,utf8Start2:t.utf8Start2,length1:t.length1,length2:t.length2,utf8Length1:t.utf8Length1,utf8Length2:t.utf8Length2});return a}(e,r,{allowExceedingIndices:n.allowExceedingIndices}),i=n.margin||4,a=n.deleteThreshold||.4,l=function(e,t=4){let n="";for(let e=1;e<=t;e++)n+=String.fromCharCode(e);for(let n of e)n.start1+=t,n.start2+=t,n.utf8Start1+=t,n.utf8Start2+=t;let r=e[0],o=r.diffs;if(0===o.length||0!==o[0][0])o.unshift([0,n]),r.start1-=t,r.start2-=t,r.utf8Start1-=t,r.utf8Start2-=t,r.length1+=t,r.length2+=t,r.utf8Length1+=t,r.utf8Length2+=t;else if(t>o[0][1].length){let e=o[0][1].length,i=t-e;o[0][1]=n.substring(e)+o[0][1],r.start1-=i,r.start2-=i,r.utf8Start1-=i,r.utf8Start2-=i,r.length1+=i,r.length2+=i,r.utf8Length1+=i,r.utf8Length2+=i}if(0===(o=(r=e[e.length-1]).diffs).length||0!==o[o.length-1][0])o.push([0,n]),r.length1+=t,r.length2+=t,r.utf8Length1+=t,r.utf8Length2+=t;else if(t>o[o.length-1][1].length){let e=t-o[o.length-1][1].length;o[o.length-1][1]+=n.substring(0,e),r.length1+=e,r.length2+=e,r.utf8Length1+=e,r.utf8Length2+=e}return n}(o,i);r=l+r+l,function(e,t=4){for(let n=0;n<e.length;n++){if(e[n].length1<=32)continue;let r=e[n];e.splice(n--,1);let o=r.start1,i=r.start2,a="";for(;0!==r.diffs.length;){let l=rc(o-a.length,i-a.length),s=!0;if(""!==a){let e=rs(a);l.length1=a.length,l.utf8Length1=e,l.length2=a.length,l.utf8Length2=e,l.diffs.push([0,a])}for(;0!==r.diffs.length&&l.length1<32-t;){let e=r.diffs[0][0],n=r.diffs[0][1],a=rs(n);if(1===e){l.length2+=n.length,l.utf8Length2+=a,i+=n.length;let e=r.diffs.shift();e&&l.diffs.push(e),s=!1}else -1===e&&1===l.diffs.length&&0===l.diffs[0][0]&&n.length>64?(l.length1+=n.length,l.utf8Length1+=a,o+=n.length,s=!1,l.diffs.push([e,n]),r.diffs.shift()):(a=rs(n=n.substring(0,32-l.length1-t)),l.length1+=n.length,l.utf8Length1+=a,o+=n.length,0===e?(l.length2+=n.length,l.utf8Length2+=a,i+=n.length):s=!1,l.diffs.push([e,n]),n===r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(n.length))}a=(a=ra(l.diffs)).substring(a.length-t);let u=ri(r.diffs).substring(0,t),c=rs(u);""!==u&&(l.length1+=u.length,l.length2+=u.length,l.utf8Length1+=c,l.utf8Length2+=c,0!==l.diffs.length&&0===l.diffs[l.diffs.length-1][0]?l.diffs[l.diffs.length-1][1]+=u:l.diffs.push([0,u])),s||e.splice(++n,0,l)}}}(o,i);let s=0,u=[];for(let e=0;e<o.length;
180e++){let t=o[e].start2+s,n=ri(o[e].diffs),i,l=-1;if(n.length>32?-1!==(i=ro(r,n.substring(0,32),t))&&(-1===(l=ro(r,n.substring(n.length-32),t+n.length-32))||i>=l)&&(i=-1):i=ro(r,n,t),-1===i)u[e]=!1,s-=o[e].length2-o[e].length1;else{let c;if(u[e]=!0,s=i-t,c=-1===l?r.substring(i,i+n.length):r.substring(i,l+32),n===c)r=r.substring(0,i)+ra(o[e].diffs)+r.substring(i+n.length);else{let t=nY(n,c,{checkLines:!1});if(n.length>32&&function(e){let t=0,n=0,r=0;for(let o=0;o<e.length;o++){let i=e[o][0],a=e[o][1];switch(i){case 1:n+=a.length;break;case -1:r+=a.length;break;case 0:t+=Math.max(n,r),n=0,r=0;break;default:throw Error("Unknown diff operation.")}}return t+Math.max(n,r)}(t)/n.length>a)u[e]=!1;else{t=n4(t);let n=0,a=0;for(let l=0;l<o[e].diffs.length;l++){let s=o[e].diffs[l];0!==s[0]&&(a=rl(t,n)),1===s[0]?r=r.substring(0,i+a)+s[1]+r.substring(i+a):-1===s[0]&&(r=r.substring(0,i+a)+r.substring(i+rl(t,n+s[1].length))),-1!==s[0]&&(n+=s[1].length)}}}}}return[r=r.substring(l.length,r.length-l.length),u]}(function(e){if(!e)return[];let t=[],n=e.split(` 181`),r=0;for(;r<n.length;){let e=n[r].match(rx);if(!e)throw Error(`Invalid patch string: ${n[r]}`);let o=rc(rk(e[1]),rk(e[3]));for(t.push(o),""===e[2]?(o.start1--,o.utf8Start1--,o.length1=1,o.utf8Length1=1):"0"===e[2]?(o.length1=0,o.utf8Length1=0):(o.start1--,o.utf8Start1--,o.utf8Length1=rk(e[2]),o.length1=o.utf8Length1),""===e[4]?(o.start2--,o.utf8Start2--,o.length2=1,o.utf8Length2=1):"0"===e[4]?(o.length2=0,o.utf8Length2=0):(o.start2--,o.utf8Start2--,o.utf8Length2=rk(e[4]),o.length2=o.utf8Length2),r++;r<n.length;){let e;let t=n[r],i=t.charAt(0);if("@"===i)break;if(""===i){r++;continue}try{e=decodeURI(t.slice(1))}catch(e){throw Error(`Illegal escape in parse: ${t}`)}let a=rs(e)-e.length;if("-"===i)o.diffs.push([-1,e]),o.length1-=a;else if("+"===i)o.diffs.push([1,e]),o.length2-=a;else if(" "===i)o.diffs.push([0,e]),o.length1-=a,o.length2-=a;else throw Error(`Invalid patch mode "${i}" in: ${e}`);r++}}return t}(e.value),t)[0]},inc:function(e,t){if("number"!=typeof t)throw TypeError('Cannot apply "inc()" on non-numeric value');return t+e.amount},insert:ac,remove:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "remove()" on non-array value');let n=as(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return au(t,n,1,[])},replace:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "replace()" on non-array value');let n=as(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return au(t,n,e.items.length,e.items)},set:function(e,t){return e.value},setIfMissing:function(e,t){return t??e.value},truncate:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "truncate()" on non-array value');return"number"==typeof e.endIndex?t.slice(0,e.startIndex).concat(t.slice(e.endIndex)):t.slice(0,e.startIndex)},unassign:function(e,t){if(!al(t))throw TypeError('Cannot apply "unassign()" on non-object value');return 0===e.keys.length?t:function(e,t){let n={...e};for(let e of t)delete n[e];return n}(t,e.keys)},unset:function(e){},upsert:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "upsert()" on non-array value');
181if(0===e.items.length)return t;let n=[],r=[];if(e.items.forEach((e,o)=>{let i=t.findIndex(t=>t?._key===e._key);i>=0?n[i]=o:r.push(e)}),0===n.length&&0==r.length)return t;let o=[...t];for(let t of n)o[t]=e.items[n[t]];return ac({type:"insert",items:r,referenceItem:e.referenceItem,position:e.position},o)}});function ap(e,t){return e.reduce((e,t)=>ah(t,e),t)}function ah(e,t){return function e(t,n,r){if(!(t.length>0))return function(e,t){if(!(e.type in af))throw Error(`Invalid operation type: "${e.type}"`);return af[e.type](e,t)}(n,r);let[o,...i]=t;if(ar(o)&&Array.isArray(r))return function(t,n,r,o){let i=as(o,t);if(null===i||-1===i)return o;let a=o[i],l=e(n,r,a);return l===a?o:au(o,i,1,[l])}(o,i,n,r);if("string"==typeof o&&al(r))return function(t,n,r,o){let i=o[t];if(void 0===i&&n.length>0)return o;let a=e(n,r,i);return a===i?o:{...o,[t]:a}}(o,i,n,r);throw Error(`Cannot apply operation of type "${n.type}" to path ${aa(t)} on ${typeof r} value`)}(e.path,e.op,t)}function ag(e){return"_id"in e}function am(e,t){return t.reduce((e,t)=>{let n=ay(e,t);if("error"===n.status)throw Error(n.message);return"noop"===n.status?e:n.after},e)}function ay(e,t){if("create"===t.type)return function(e,t){var n;if(e)return{status:"error",message:"Document already exist"};let r=ag(n=t.document)?n:{...n,_id:ae()};return{status:"created",id:r._id,after:r}}(e,t);if("createIfNotExists"===t.type)return ag(t.document)?e?{status:"noop"}:{status:"created",id:t.document._id,after:t.document}:{status:"error",message:"Cannot createIfNotExists on document without _id"};if("delete"===t.type)return e?t.id!==e._id?{status:"error",message:"Delete mutation targeted wrong document"}:{status:"deleted",id:t.id,before:e,after:void 0}:{status:"noop"};if("createOrReplace"===t.type)return ag(t.document)?e?{status:"updated",id:t.document._id,before:e,after:t.document}:{status:"created",id:t.document._id,after:t.document}:{status:"error",message:"Cannot createIfNotExists on document without _id"};if("patch"===t.type)return function(e,t){if(!e)return{status:"error",message:"Cannot apply patch on nonexistent document"};let n=function(e,t){if(e.options?.ifRevision&&t._rev!==e.options.ifRevision)throw Error("Revision mismatch");if(e.id!==t._id)throw Error(`Document id mismatch. Refusing to apply mutation for document with id="${e.id}" on the given document with id="${t._id}"`);return ap(e.patches,t)}(t,e);return e===n?{status:"noop"}:{status:"updated",id:t.id,before:e,after:n}}(e,t);throw Error(`Invalid mutation type: ${t.type}`)}function ab(e,t,n){let r=[];for(let n of e.slice().reverse()){if(t(n))return r;r.push(n)}return r.reverse()}function av(e,t){return aa(e)===aa(t)}function aw(e,t){let n=e;return t.reduce((e,t)=>{let r=n;if(n=ah(t,n),"set"===t.op.type&&"string"==typeof t.op.value){let n=ao(t.path,r);if("string"==typeof n){let r={...t,op:{type:"diffMatchPatch",value:(function(e,t,n){if("string"==typeof e&&"string"==typeof t){let n=nY(e,t,{checkLines:!0});return n.length>2&&(n=function(e,t=4){let n=e.map(e=>nN(e)),r=!1,o=[],i=0,a=null,l=0,s=!1,u=!1,c=!1,d=!1;for(;l<n.length;)0===n[l][0]?(n[l][1].length<t&&(c||d)?(o[i++]=l,s=c,u=d,a=n[l][1]):(i=0,a=null),c=!1,d=!1):(-1===n[l][0]?d=!0:c=!0,a&&(s&&u&&c&&d||a.length<t/2&&3===function(...e){return e.reduce((e,t)=>e+(t?1:0),0)}(s,u,c,d))&&(n.splice(o[i-1],0,[-1,a]),n[o[i-1]+1][0]=1,i--,a=null,s&&u?(c=!0,d=!0,i=0):(l=--i>0?o[i-1]:-1,c=!1,d=!1),r=!0)),l++;return r&&(n=n6(n)),n}(n=nJ(n))),rv(e,n,rb(void 0))}if(e&&Array.isArray(e)&&typeof t>"u")return rv(ri(e),e,rb(void 0));if("string"==typeof e&&t&&Array.isArray(t))return rv(e,t,rb(void 0));throw Error("Unknown call format to make()")})(n,t.op.value).map(rS).join("")}};return e.flatMap(e=>av(e.path,t.path)&&"diffMatchPatch"===e.op.type?[]:e).concat(r)}}return e.push(t),e},[])}function ax(e,t,n,r){let o=t,i=r.map(t=>{let n=t.mutations.flatMap(t=>{if(i7(t)!==e)return[];let n=o;return o=am(o,[t]),n&&"patch"===t.type?{type:"dmpified",mutation:{...t,dmpPatches:aw(n,t.patches),original:t.patches}}:t});return{...t,mutations:n}}),a=n;return i.map(t=>{let n=[];return t.mutations.forEach(t=>{if("dmpified"===t.type)try{a=ap(t.mutation.dmpPatches,a),n.push(t)}catch{console.warn("Failed to apply dmp patch, falling back to original");try{a=ap(t.mutation.original,a),n.push(t)}catch(t){throw Error(`Failed to apply patch for document "${e}": ${t.message}`)}}else a=am(a,[t])})}),[r.map(t=>({...t,mutations:t.mutations.map(t=>"patch"!==t.type||i7(t)!==e?t:{...t,patches:t.patches.map(e=>"set"!==e.op.type?e:{...e,op:{...e.op,value:ao(e.path,a)}})})})),a]}function ak(e){return function(e){if("create"===e.type||"createIfNotExists"===e.type||"createOrReplace"===e.type)return{[e.type]:e.document};if("delete"===e.type)return{delete:{id:e.id}};let t=e.options?.ifRevision;return e.patches.map(n=>({patch:{id:e.id,...t&&{ifRevisionID:t},...function(e){let{path:t,op:n}=e;if("unset"===n.type)return{unset:[aa(t)]};if("insert"===n.type)return{insert:{[n.position]:aa([...t,n.referenceItem]),items:n.items}};if("diffMatchPatch"===n.type)return{diffMatchPatch:{[aa(t)]:n.value}};if("inc"===n.type)return{inc:{[aa(t)]:n.amount}};if("dec"===n.type)return{dec:{[aa(t)]:n.amount}};if("set"===n.type||"setIfMissing"===n.type)return{[n.type]:{[aa(t)]:n.value}};if("truncate"===n.type){let e=[n.startIndex,"number"==typeof n.endIndex?n.endIndex:""].join(":");return{unset:[`${aa(t)}[${e}]`]}}if("upsert"===n.type)return{unset:n.items.map(e=>
181aa([...t,{_key:e._key}])),insert:{[n.position]:aa([...t,n.referenceItem]),items:n.items}};if("assign"===n.type)return{set:Object.fromEntries(Object.keys(n.value).map(e=>[aa(t.concat(e)),n.value[e]]))};if("unassign"===n.type)return{unset:n.keys.map(e=>aa(t.concat(e)))};if("replace"===n.type)return{insert:{replace:aa(t.concat(n.referenceItem)),items:n.items}};if("remove"===n.type)return{unset:[aa(t.concat(n.referenceItem))]};throw Error(`Unknown operation type ${n.type}`)}(n)}}))}(e)}function aS(e){let t=e.listen('*[!(_id in path("_.**"))]',{},{events:["welcome","mutation","reconnect"],includeResult:!1,includePreviousRevision:!1,visibility:"transaction",effectFormat:"mendoza",includeMutations:!1}).pipe((0,iG.B)({resetOnRefCountZero:!0})),n=t.pipe((0,iW.h)(e=>"reconnect"===e.type)),r=t.pipe((0,iW.h)(e=>"welcome"===e.type)),o=t.pipe((0,iW.h)(e=>"mutation"===e.type)),i=(0,nz.T)(r,n).pipe((0,iq.d)({bufferSize:1,refCount:!0})).pipe((0,iW.h)(e=>"welcome"===e.type));return(0,nz.T)(i,o,n)}let aE=(0,i6.cY)({types:{},actions:{"assign error to context":(0,i8.a)({error:({event:e})=>e}),"clear error from context":(0,i8.a)({error:void 0}),"connect to server-sent events":(0,nO.r)({type:"connect"}),"listen to server-sent events":(0,nO.h)("server-sent events",{id:"listener",input:({context:e})=>({listener:e.sharedListener||aS(e.client),id:e.id})}),"stop listening to server-sent events":(0,nO.k)("listener"),"buffer remote mutation events":(0,i8.a)({mutationEvents:({event:e,context:t})=>((0,i6.ZD)(e,"mutation"),[...t.mutationEvents,e])}),"restore stashed changes":(0,i8.a)({stagedChanges:({event:e,context:t})=>((0,i6.ZD)(e,"xstate.done.actor.submitTransactions"),t.stashedChanges),stashedChanges:[]}),"rebase fetched remote snapshot":(0,i9.a)(({enqueue:e})=>{e.assign(({event:e,context:t})=>{(0,i6.ZD)(e,"xstate.done.actor.getDocument");let n=t.remote,r=e.output,o=!1;for(let e of t.mutationEvents)e.effects?.apply&&(e.previousRev||"appear"===e.transition)&&(o||e.previousRev!==r?._rev||(o=!0),o&&(r=a_(r,e.effects.apply,e.resultRev)));t.cache&&(!t.cache.has(t.id)||t.cache.get(t.id)._rev!==r?._rev)&&t.cache.set(t.id,r);let[i,a]=ax(t.id,null===n?void 0:n,null===r?void 0:r,t.stagedChanges);return{remote:r,local:a,stagedChanges:i,mutationEvents:[]}}),e.sendParent(({context:e})=>({type:"rebased.remote",id:e.id,document:e.remote}))}),"apply mendoza patch":(0,i8.a)(({event:e,context:t})=>{(0,i6.ZD)(e,"mutation");let n=t.remote;if(e.transactionId===n?._rev)return{};let r=a_(n,e.effects.apply,e.resultRev);t.cache&&(!t.cache.has(t.id)||t.cache.get(t.id)._rev!==r?._rev)&&t.cache.set(t.id,r);let[o,i]=ax(t.id,null===n?void 0:n,null===r?void 0:r,t.stagedChanges);return{remote:r,local:i,stagedChanges:o}}),"increment fetch attempts":(0,i8.a)({fetchRemoteSnapshotAttempts:({context:e})=>e.fetchRemoteSnapshotAttempts+1}),"reset fetch attempts":(0,i8.a)({fetchRemoteSnapshotAttempts:0}),"increment submit attempts":(0,i8.a)({submitTransactionsAttempts:({context:e})=>e.submitTransactionsAttempts+1}),"reset submit attempts":(0,i8.a)({submitTransactionsAttempts:0}),"stage mutation":(0,i8.a)({stagedChanges:({event:e,context:t})=>((0,i6.ZD)(e,"mutate"),[...t.stagedChanges,{transaction:!1,mutations:e.mutations}])}),"stash mutation":(0,i8.a)({stashedChanges:({event:e,context:t})=>((0,i6.ZD)(e,"mutate"),[...t.stashedChanges,{transaction:!1,mutations:e.mutations}])}),"rebase local snapshot":(0,i9.a)(({enqueue:e})=>{e.assign({local:({event:e,context:t})=>{(0,i6.ZD)(e,"mutate");let n=new Map;return t.local&&n.set(t.id,t.local),function(e,t){e.forEach(e=>{("created"===e.status||"updated"===e.status)&&t.set(e.id,e.after),"deleted"===e.status&&t.delete(e.id)})}(function(e,t){let n=Object.create(null);for(let r of e){let e=i7(r);if(!e)throw Error("Unable to get document id from mutation");let o=n[e]?.after||t.get(e),i=ay(o,r);if("error"===i.status)throw Error(i.message);"noop"!==i.status&&("updated"===i.status||"created"===i.status||"deleted"===i.status)&&(e in n||(n[e]={before:o,after:void 0,muts:[]}),n[e].after=i.after)}return Object.entries(n).map(([e,{before:t,after:n,muts:r}])=>({id:e,status:n?t?"updated":"created":"deleted",mutations:r,before:t,after:n}))}(e.mutations,n),n),n.get(t.id)}}),e.sendParent(({context:e})=>({type:"rebased.local",id:e.id,document:e.local}))}),"send pristine event to parent":(0,i9.s)(({context:e})=>({type:"pristine",id:e.id})),"send sync event to parent":(0,i9.s)(({context:e})=>({type:"sync",id:e.id,document:e.remote})),"send mutation event to parent":(0,i9.s)(({context:e,event:t})=>((0,i6.ZD)(t,"mutation"),{type:"mutation",id:e.id,previousRev:t.previousRev,resultRev:t.resultRev,effects:t.effects}))},actors:{"server-sent events":(0,P.Y$)(({input:e})=>{let{listener:t,id:n}=e;return(0,iY.P)(()=>t).pipe((0,iW.h)(e=>"welcome"===e.type||"reconnect"===e.type||"mutation"===e.type&&e.documentId===n),(0,iZ.Q)(i4))}),"fetch remote snapshot":(0,P.p4)(async({input:e,signal:t})=>{let{client:n,id:r}=e;return await n.getDocument(r,{signal:t}).catch(e=>{if(!(e instanceof Error&&"AbortError"===e.name))throw e})}),"submit mutations as transactions":(0,P.p4)(async({input:e,signal:t})=>{let{client:n,transactions:r}=e;for(let e of r){if(t.aborted)return;await n.dataRequest("mutate",{transactionId:e.id,mutations:e.mutations.flatMap(ak)},{visibility:"async",returnDocuments:!1,signal:t}).catch(e=>{if(!(e instanceof Error&&"AbortError"===e.name))throw e})}})},delays:{fetchRemoteSnapshotTimeout:({context:e})=>1e3*Math.pow(2,e.fetchRemoteSnapshotAttempts),submitTransactionsTimeout:({context:e})=>1e3*Math.pow(2,e.submitTransactionsAttempts)}}).createMachine({id:"document-mutator",context:({input:e})=>({client:e.client.withConfig({allowReconfigure:!1}),sharedListener:e.sharedListener,id:e.id,remote:void 0,local:void 0,mutationEvents:[],stagedChanges:[],stashedChanges:[],error:void 0,fetchRemoteSnapshotAttempts:0,submitTransactionsAttempts:0,cache:e.cache}),entry:["connect to server-sent events"],on:{mutate:{actions:["rebase local snapshot","stage mutation"]}},initial:"disconnected",states:{disconnected:{on:{connect:{target:"connecting",actions:["listen to server-sent events"]}}},connecting:{on:{welcome:"connected",reconnect:"reconnecting",error:"connectFailure"},tags:["busy"]},connectFailure:{on:{connect:{target:"connecting",actions:["listen to server-sent events"]}},entry:["stop listening to server-sent events","assign error to context"],exit:["clear error from context"],tags:["error"]},reconnecting:{on:{welcome:{target:"connected"},error:{target:"connectFailure"}},tags:["busy","error"]},connected:{on:{mutation:{actions:["buffer remote mutation events"]},reconnect:"reconnecting"},entry:["clear error from context"],initial:"loading",states:{loading:{invoke:{src:"fetch remote snapshot",id:"getDocument",input:({context:e})=>({client:e.client,id:e.id}),onError:{target:"loadFailure"},onDone:{target:"loaded",actions:["rebase fetched remote snapshot","reset fetch attempts"]}},tags:["busy"]},loaded:{entry:["send sync event to parent"],on:{mutation:{actions:["apply mendoza patch","send mutation event to parent"]}},initial:"pristine",states:{pristine:{on:{mutate:{actions:["rebase local snapshot","stage mutation"],target:"dirty"}},tags:["ready"]},dirty:{on:{submit:"submitting"},tags:["ready"]},submitting:{on:{mutate:{actions:["rebase local snapshot","stash mutation"]}},invoke:{src:"submit mutations as transactions",id:"submitTransactions",input:({context:e})=>{let t=new Map;return t.set(e.id,e.remote),{client:e.client,transactions:(function(e,t){let n=[],r=[];
181return e.forEach(e=>{t(e)?r.push(e):(r.length>0&&n.push(r),r=[],n.push([e]))}),r.length>0&&n.push(r),n})(e.stagedChanges,e=>!e.transaction).flatMap(e=>({...e[0],mutations:e.flatMap(e=>e.mutations)})).map(e=>({...e,mutations:Object.values(iF(e.mutations,i7)).flatMap(e=>{var t;return(0===(t=0===e.length?e:e.reduce((e,t)=>"delete"===t.type?[t]:(e.push(t),e),[])).length?t:t.reduce((e,t)=>("createIfNotExists"!==t.type?e.push(t):ab(e,e=>"delete"===e.type).find(e=>"createIfNotExists"===e.type)||e.push(t),e),[])).flat().reduce((e,t)=>{let n=e[e.length-1];return n&&"patch"!==n.type||"patch"!==t.type?e.concat(t):e.slice(0,-1).concat({...t,patches:(n?.patches||[]).concat(t.patches)})},[])})})).map(e=>({...e,mutations:e.mutations.map(e=>"patch"!==e.type?e:{...e,patches:e.patches.reduce((e,t)=>{if("unset"!==t.op.type)return e.push(t),e;let n=e.filter(e=>{var n,r;return n=t.path,r=e.path,!(n.length<=r.length&&n.every((e,t)=>{var n;return n=function(e,t){if(t<0||t>=e.length)throw Error("Index out of bounds");return e[t]}(r,t),at(e)&&at(n)?e._key===n._key:"number"==typeof e?Number(e)===Number(n):e===n}))});return n.push(t),n},[]).reduceRight((e,t)=>(e.find(e=>{var n,r;return n=e.op,("set"===(r=t.op).type||"unset"===r.type)&&("set"===n.type||"unset"===n.type)&&av(e.path,t.path)})||e.unshift(t),e),[]).reduce((e,t)=>("setIfMissing"!==t.op.type?e.push(t):ab(e,e=>"unset"===e.op.type).find(e=>"setIfMissing"===e.op.type&&av(e.path,t.path))||e.push(t),e),[])})})).map(e=>({...e,mutations:e.mutations.map((e,n)=>{var r;return"patch"===e.type&&(r=t.get(e.id))?{...e,patches:aw(r,e.patches)}:e})})).map(e=>e.transaction&&void 0!==e.id?{id:e.id,mutations:e.mutations}:{mutations:e.mutations})}},onError:{target:"submitFailure"},onDone:{target:"pristine",actions:["restore stashed changes","reset submit attempts","send pristine event to parent"]}},tags:["busy","ready"]},submitFailure:{exit:["clear error from context"],after:{submitTransactionsTimeout:{actions:["increment submit attempts"],target:"submitting"}},on:{retry:"submitting"},tags:["error","ready"]}}},loadFailure:{exit:["clear error from context"],after:{fetchRemoteSnapshotTimeout:{actions:["increment fetch attempts"],target:"loading"}},on:{retry:"loading"},tags:["error"]}}}}});function a_(e,t,n){var r;let o=(r=function(e){if(!e)return null;let{_rev:t,...n}=e;return n}(e),new iH(new iV,r,t).process());return o?Object.assign(o,{_rev:n}):null}let aj=e=>{let t=(0,P.p4)(async({input:t,signal:n})=>{let{id:r}=t,{snapshot:o}=await e.fetch("visual-editing/fetch-snapshot",{documentId:r},{signal:n});return o}),n=(0,P.p4)(async({input:t})=>{let{transactions:n}=t;for(let t of n){let n=M.encodeTransaction(t);return e.post("visual-editing/mutate",n)}});return aE.provide({actions:{"send sync event to parent":(0,i9.a)(({enqueue:e})=>{e.sendParent(({context:e})=>({type:"sync",id:e.id,document:e.remote})),e.emit(({context:e})=>({type:"ready",snapshot:e.local}))})},actors:{"fetch remote snapshot":t,"submit mutations as transactions":n}})},aC=(0,i6.cY)({types:{},actions:{"emit sync event":(0,i9.e)(({event:e})=>((0,i6.ZD)(e,"sync"),e)),"emit mutation event":(0,i9.e)(({event:e})=>((0,i6.ZD)(e,"mutation"),e)),"emit rebased event":(0,i9.e)(({event:e})=>((0,i6.ZD)(e,["rebased.local","rebased.remote"]),e)),"emit pristine event":(0,i9.e)(({event:e})=>((0,i6.ZD)(e,["pristine"]),e)),"add document actor":(0,i8.a)({documents:({context:e,event:t,spawn:n})=>{(0,i6.ZD)(t,"observe");let r=t.documentId;return e.documents[r]?e.documents:{...e.documents,[r]:n("documentMutatorMachine",{input
181:{id:r,client:e.client,sharedListener:e.sharedListener||aS(e.client)},id:r})}}}),"stop remote snapshot":(0,nO.k)(({context:e,event:t})=>((0,i6.ZD)(t,"unobserve"),e.documents[t.documentId])),"remove remote snapshot from context":(0,i8.a)({documents:({context:e,event:t})=>{if((0,i6.ZD)(t,"unobserve"),!e.documents[t.documentId])return e.documents;let{[t.documentId]:n,...r}=e.documents;return r}})},actors:{documentMutatorMachine:aE}}).createMachine({id:"dataset-mutator",context:({input:e})=>({documents:{},client:e.client,sharedListener:e.sharedListener}),on:{sync:{actions:["emit sync event"]},mutation:{actions:["emit mutation event"]},"rebased.*":{actions:["emit rebased event"]},pristine:{actions:["emit pristine event"]},observe:{actions:["add document actor"]},unobserve:{actions:["stop remote snapshot","remove remote snapshot from context"]}},initial:"pristine",states:{pristine:{}}}),aI=e=>aC.provide({actors:{documentMutatorMachine:aj(e)}}),aR=e=>{let t,n,r,o;let i=(0,g.c)(8),{comlink:a,history:l}=e;return i[0]!==a||i[1]!==l?(t=()=>a?.on("presentation/navigate",e=>{l?.update(e)}),n=[a,l],i[0]=a,i[1]=l,i[2]=t,i[3]=n):(t=i[2],n=i[3]),(0,y.useEffect)(t,n),i[4]!==a||i[5]!==l?(r=()=>{if(l)return l.subscribe(e=>{e.title=e.title||document.title,a?.post("visual-editing/navigate",e)})},o=[a,l],i[4]=a,i[5]=l,i[6]=r,i[7]=o):(r=i[6],o=i[7]),(0,y.useEffect)(r,o),null},a$=e=>{let t,n;let r=(0,g.c)(3),{comlink:o}=e;return r[0]!==o?(t=()=>{let e=()=>{o.post("visual-editing/meta",{title:document.title})},t=new MutationObserver(t=>{let[n]=t;"TITLE"===n.target.nodeName&&e()});return t.observe(document.head,{subtree:!0,characterData:!0,childList:!0}),e(),()=>t.disconnect()},n=[o],r[0]=o,r[1]=t,r[2]=n):(t=r[1],n=r[2]),(0,y.useEffect)(t,n),null};function aO(e){let t=new CustomEvent("sanity/dragEnd",{detail:e,cancelable:!0});window.dispatchEvent(t)}let aM=(0,y.createContext)(null);function aA(){let e=(0,y.useContext)(aM);if(!e)throw Error("Schema context is missing");return e}function az(e,t,n,r){if(!e.type)throw Error("Node type is missing");return()=>t.patch(()=>(function(e,t,n){let{path:r,key:o}=eo(e);return[T(r,A([{_type:t,_key:er()}],n,{_key:o}))]})(e,n,r))}function aN(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Duplicate",icon:e9.TIy,action:function(e,t){if(!e.type)throw Error("Node type is missing");return()=>t.patch(async({getSnapshot:t})=>(function(e,t,n="after"){let{path:r,key:o}=eo(e);return[T(r,A({...q(t,e.path),_key:er()},n,{_key:o}))]})(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Duplicated"}]:[]}function aT(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Remove",icon:e9.HFL,action:function(e,t){if(!e.type)throw Error("Node type is missing");return()=>t.patch(async({getSnapshot:t})=>(function(e,t){let{path:n,key:r}=eo(e),o=q(t,n).findIndex(e=>e._key===r);return[T(n,z(o,o+1))]})(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Removed"}]:[]}async function aP(e,t=!0){let{node:n,doc:r}=e;if(!r)return[];let o=[],i=[],[a,l,s,u]=await Promise.all([ei(n,r,"previous"),ei(n,r,"next"),ei(n,r,"first"),ei(n,r,"last")]);return s.length&&i.push({type:"action",label:"To top",icon:e9.EI4,action:()=>r.patch(s),telemetryEvent:"Visual Editing Context Menu Item Moved"}),a.length&&i.push({type:"action",label:"Up",icon:e9.Hf3,action:()=>r.patch(a),telemetryEvent:"Visual Editing Context Menu Item Moved"}),l.length&&i.push({type:"action",label:"Down",icon:e9.veu,action:()=>r.patch(l),telemetryEvent:"Visual Editing Context Menu Item Moved"}),u.length&&i.push({type:"action",label:"To bottom",icon:e9.xEY,action:()=>r.patch(u),telemetryEvent:"Visual Editing Context Menu Item Moved"}),i.length&&(o.push({type:"group",label:"Move",icon:e9.fzI,items:i}),t&&o.push({type:"divider"})),o}async function aL(e){let{node:t,field:n,doc:r}=e,o=[];return o.push(...aN(e)),o.push(...aT(e)),o.push(...await aP(e)),o.push({type:"action",label:"Insert before",icon:e9.ySV,action:az(t,r,n.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),o.push({type:"action",label:"Insert after",icon:e9.oty,action:az(t,r,n.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),o}let aD=e=>{let t,n,r,o,i;let a=(0,g.c)(12),{label:l,parent:s,width:u,onSelect:c,boundaryElement:d}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=["left-start","right","left","right-end","left-end","bottom","top"],a[0]=t):t=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(n=[4,4,4,4],a[1]=n):n=a[1],a[2]!==d||a[3]!==u?(r={arrow:!1,constrainSize:!0,floatingBoundary:d,padding:0,placement:"right-start",fallbackPlacements:t,preventOverflow:!0,width:u,__unstable_margins:n},a[2]=d,a[3]=u,a[4]=r):r=a[4],a[5]!==c||a[6]!==s?(o=(0,h.jsx)(tj,{node:s,onSelect:c}
181),a[5]=c,a[6]=s,a[7]=o):o=a[7],a[8]!==l||a[9]!==r||a[10]!==o?(i=(0,h.jsx)(w.kS,{fontSize:1,icon:e9.oty,padding:2,popover:r,space:2,text:l,children:o}),a[8]=l,a[9]=r,a[10]=o,a[11]=i):i=a[11],i};async function aF(e){let{doc:t,node:n,parent:r}=e,o=[];if(o.push(...aN(e)),o.push(...aT(e)),o.push(...await aP(e)),r.options?.insertMenu){let e=(r.options.insertMenu||{}).views?.some(e=>"grid"===e.name)?0:void 0;o.push({type:"custom",component:({boundaryElement:o,sendTelemetry:i})=>(0,h.jsx)(aD,{label:"Insert before",onSelect:e=>{az(n,t,e.name,"before")(),i("Visual Editing Context Menu Item Inserted",null)},parent:r,width:e,boundaryElement:o})}),o.push({type:"custom",component:({boundaryElement:o,sendTelemetry:i})=>(0,h.jsx)(aD,{label:"Insert after",onSelect:e=>{az(n,t,e.name,"after")(),i("Visual Editing Context Menu Item Inserted",null)},parent:r,width:e,boundaryElement:o})})}else o.push({type:"group",label:"Insert before",icon:e9.ySV,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",icon:th(e),label:"block"===e.name?"Paragraph":e.title||e.name,action:az(n,t,e.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))}),o.push({type:"group",label:"Insert after",icon:e9.oty,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",label:"block"===e.name?"Paragraph":e.title||e.name,icon:th(e),action:az(n,t,e.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))});return o}let aB=[-4,4,-4,4];function aH(e){let t;let n=(0,g.c)(27),{node:r,onDismiss:o,boundaryElement:i}=e,a=tE();n[0]!==r||n[1]!==o||n[2]!==a?(t=()=>{"action"===r.type&&(r.action?.(),o?.(),r.telemetryEvent&&a(r.telemetryEvent,null))},n[0]=r,n[1]=o,n[2]=a,n[3]=t):t=n[3];let l=t;if("divider"===r.type){let e;return n[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,h.jsx)(w.R,{}),n[4]=e):e=n[4],e}if("action"===r.type){let e;let t=!r.action;return n[5]!==r.hotkeys||n[6]!==r.icon||n[7]!==r.label||n[8]!==l||n[9]!==t?(e=(0,h.jsx)(w.sN,{fontSize:1,hotkeys:r.hotkeys,icon:r.icon,padding:2,space:2,text:r.label,disabled:t,onClick:l}),n[5]=r.hotkeys,n[6]=r.icon,n[7]=r.label,n[8]=l,n[9]=t,n[10]=e):e=n[10],e}if("group"===r.type){let e,t,a;let l=r.icon;n[11]===Symbol.for("react.memo_cache_sentinel")?(e={arrow:!1,constrainSize:!0,placement:"right-start",fallbackPlacements:["left-start","right","left","right-end","left-end","bottom","top"],preventOverflow:!0,__unstable_margins:aB},n[11]=e):e=n[11];let s=r.label;if(n[12]!==i||n[13]!==r.items||n[14]!==o){let e;n[16]!==i||n[17]!==o?(e=(e,t)=>(0,h.jsx)(aH,{node:e,onDismiss:o,boundaryElement:i},t),n[16]=i,n[17]=o,n[18]=e):e=n[18],t=r.items.map(e),n[12]=i,n[13]=r.items,n[14]=o,n[15]=t}else t=n[15];return n[19]!==r.icon||n[20]!==r.label||n[21]!==t?(a=(0,h.jsx)(w.kS,{fontSize:1,icon:l,padding:2,popover:e,space:2,text:s,children:t}),n[19]=r.icon,n[20]=r.label,n[21]=t,n[22]=a):a=n[22],a}if("custom"===r.type){let e;let{component:t}=r;return n[23]!==t||n[24]!==i||n[25]!==a?(e=(0,h.jsx)(t,{boundaryElement:i,sendTelemetry:a}),n[23]=t,n[24]=i,n[25]=a,n[26]=e):e=n[26],e}return null}let aU=e=>{let t,n,r,o,i,a,l,s,u,c,d,f,p,m,b,v,x,k;let S=(0,g.c)(43),{node:E,onDismiss:_,position:j}=e,{x:C,y:I}=j,[R,$]=(0,y.useState)(null),{getField:O}=aA(),{getDocument:M}=et();S[0]!==O||S[1]!==E?(t=O(E),S[0]=O,S[1]=E,S[2]=t):t=S[2];let{field:A,parent:z}=t;n=A?.title||A?.name||"Unknown type";let[N,T]=(0,y.useState)(void 0);S[3]!==A||S[4]!==M||S[5]!==E||S[6]!==z?(r=()=>{(async()=>{let e=M(E.id);e&&T(await function(e){let{node:t,field:n,parent:r,doc:o}=e;return n?.type==="arrayItem"?aL({node:t,field:n,doc:o}):r?.type==="union"?aF({node:t,parent:r,doc:o}):Promise.resolve([])}({node:E,field:A,parent:z,doc:e}))})()},o=[A,E,z,M],S[3]=A,S[4]=M,S[5]=E,S[6]=z,S[7]=r,S[8]=o):(r=S[7],o=S[8]),(0,y.useEffect)(r,o),S[9]!==C||S[10]!==I?(a={getBoundingClientRect:()=>({bottom:I,left:C,right:C,top:I,width:0,height:0})},S[9]=C,S[10]=I,S[11]=a):a=S[11],i=a,S[12]!==A?(s=th(A),S[12]=A,S[13]=s):s=S[13],l=s,S[14]===Symbol.for("react.memo_cache_sentinel")?(u={minWidth:120,maxWidth:160},S[14]=u):u=S[14],S[15]!==l||S[16]!==N?(c=(0,h.jsx)(w.xu,{flex:"none",children:N?(0,h.jsx)(w.xv,{size:1,children:l}):(0,h.jsx)(w.$j,{size:1})}),S[15]=l,S[16]=N,S[17]=c):c=S[17];let P=N?n:"Loading...";S[18]!==P?(d=(0,h.jsx)(w.Kq,{flex:1,space:2,children:(0,h.jsx)(w.xv,{size:1,weight:"semibold",children:P})}),S[18]=P,S[19]=d):d=S[19],S[20]!==c||S[21]!==d?(f=(0,h.jsxs)(w.kC,{gap:2,padding:2,children:[c,d]}),S[20]=c,S[21]=d,S[22]=f):f=S[22],S[23]!==R||S[24]!==N||S[25]!==_?(p=N&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(w.R,{}),N.map((e,t)=>(0,h.jsx)(aH,{node:e,onDismiss:_,boundaryElement:R},t))]}),S[23]=R,S[24]=N,S[25]=_,S[26]=p):p=S[26],S[27]!==f||S[28]!==p?(m=(0,h.jsxs)(w.v2,{style:u,children:[f,p]}),S[27]=f,S[28]=p,S[29]=m):m=S[29];let L=`${C}-${I}`;return S[30]!==C||S[31]!==I?(b={position:"absolute",left:C,top:I},S[30]=C,S[31]=I,S[32]=b):b=S[32],S[33]!==L||S[34]!==b?(v=(0,h.jsx)("div",{style:b},L),S[33]=L,S[34]=b,S[35]=v):v=S[35],S[36]!==i||S[37]!==m||S[38]!==v?
181(x=(0,h.jsx)(w.J2,{__unstable_margins:aB,arrow:!1,open:!0,placement:"right-start",referenceElement:i,content:m,children:v}),S[36]=i,S[37]=m,S[38]=v,S[39]=x):x=S[39],S[40]!==_||S[41]!==x?(k=(0,h.jsx)(tb,{setBoundaryElement:$,onDismiss:_,children:x}),S[40]=_,S[41]=x,S[42]=k):k=S[42],k},aV=(0,y.createContext)(null),aG=e=>(0,y.isValidElement)(e),aW=(0,x.zo)(w.Zb)` 182 background-color: var(--overlay-bg); 183 border-radius: 3px; 184 pointer-events: none; 185 position: absolute; 186 will-change: transform; 187 box-shadow: var(--overlay-box-shadow); 188 transition: none; 189 190 --overlay-bg: transparent; 191 --overlay-box-shadow: inset 0 0 0 1px transparent; 192 193 [data-overlays] & { 194 --overlay-bg: color-mix(in srgb, transparent 95%, var(--card-focus-ring-color)); 195 --overlay-box-shadow: inset 0 0 0 2px 196 color-mix(in srgb, transparent 50%, var(--card-focus-ring-color)); 197 } 198 199 [data-fading-out] & { 200 transition: 201 box-shadow 1550ms, 202 background-color 1550ms; 203 204 --overlay-bg: rgba(0, 0, 255, 0); 205 --overlay-box-shadow: inset 0 0 0 1px transparent; 206 } 207 208 &[data-focused] { 209 --overlay-box-shadow: inset 0 0 0 1px var(--card-focus-ring-color); 210 } 211 212 &[data-hovered]:not([data-focused]) { 213 transition: none; 214 --overlay-box-shadow: inset 0 0 0 2px var(--card-focus-ring-color); 215 } 216 217 /* [data-unmounted] & { 218 --overlay-box-shadow: inset 0 0 0 1px var(--card-focus-ring-color); 219 } */ 220 221 :link { 222 text-decoration: none; 223 } 224`,aq=(0,x.zo)(w.kC)` 225 bottom: 100%; 226 cursor: pointer; 227 pointer-events: none; 228 position: absolute; 229 right: 0; 230 231 [data-hovered]:not([data-menu-open]) & { 232 pointer-events: all; 233 } 234 235 [data-flipped] & { 236 bottom: auto; 237 top: 100%; 238 } 239`,aY=(0,x.zo)(w.kC)` 240 top: 100%; 241 cursor: pointer; 242 pointer-events: none; 243 position: absolute; 244 left: 0; 245 246 gap: 4px; 247 padding: 4px 0; 248 flex-wrap: wrap; 249 250 [data-hovered]:not([data-menu-open]) & { 251 pointer-events: all; 252 } 253 254 [data-flipped] & { 255 top: calc(100% + 2rem); 256 } 257`,aZ=(0,x.zo)(w.kC)` 258 margin: -0.5rem; 259 260 [data-hovered]:not([data-menu-open]) & { 261 pointer-events: all; 262 } 263`,aK=(0,x.zo)(w.kC)` 264 bottom: 100%; 265 cursor: pointer; 266 pointer-events: none; 267 position: absolute; 268 left: 0; 269 270 [data-hovered]:not([data-menu-open]) & { 271 pointer-events: all; 272 } 273 274 [data-flipped] & { 275 bottom: auto; 276 top: 100%; 277 } 278`,aX=(0,x.zo)(w.Zb)` 279 cursor: pointer; 280 background-color: var(--card-focus-ring-color); 281 right: 0; 282 border-radius: 3px; 283 284 & [data-ui='Text'] { 285 color: #fff; 286 white-space: nowrap; 287 } 288`,aQ=(0,x.zo)(w.kC)` 289 display: flex; 290 align-items: center; 291 background-color: var(--card-focus-ring-color); 292 right: 0; 293 border-radius: 3px; 294 & [data-ui='Text'], 295 & [data-sanity-icon] { 296 color: #fff; 297 white-space: nowrap; 298 } 299`,aJ=x.zo.div` 300 position: absolute; 301 inset: 0; 302 pointer-events: all; 303`,a0=e=>{let t,n,r,o,i,a,l,s,u,c,d,f,p,m,b,x,k,S;let E=(0,g.c)(59),{id:_,element:j,focused:C,componentResolver:I,node:R,showActions:$,draggable:O,targets:M,elementType:A,comlink:z,onActivateExclusivePlugin:N,onMenuOpenChange:T}=e,{getField:P,getType:L}=aA();E[0]!==L||E[1]!==R?(t=L(R),E[0]=L,E[1]=R,E[2]=t):t=E[2];let D=t;E[3]!==R?(n="path"in R?function(e){let{id:t,type:n,path:r,baseUrl:o,tool:i,workspace:a}=e;return(0,v.tZ)({baseUrl:o,workspace:a,tool:i,type:n,id:t,path:r?function(e){let t="";for(let n of e){if("string"==typeof n){t&&(t+="."),t+=n;continue}if("number"==typeof n){t&&(t+=":"),t+=`${n}`;continue}if(null!==n&&Array.isArray(n)){t&&(t+=":"),t+=`${n.join(",")}}`;continue}if(n._key){t&&(t+=":"),t+=`${n._key}`;continue}}return t}(v.eT.fromString(r)):[]})}(R):R.href,E[3]=R,E[4]=n):n=E[4];let F=n,B=function(){let e=(0,y.useContext)(aV);if(!e)throw Error("Preview Snapshots context is missing");return e}();e:{let e;if(!("path"in R)){r=void 0;break e}E[5]!==R||E[6]!==B?(e=B.find(e=>e._id===R.id)?.title,E[5]=R,E[6]=B,E[7]=e):e=E[7],r=e}let H=r;E[8]!==j||E[9]!==C||E[10]!==P||E[11]!==L?(i=function(e,t){let n=L(e),{field:r,parent:o}=P(e);if(!("id"in e)||!r||!n)return;let i=r.value.type;return{document:n,element:j,targetElement:t||j,field:r,focused:!!C,node:e,parent:o,type:i}},E[8]=j,E[9]=C,E[10]=P,E[11]=L,E[12]=i):i=E[12];let U=i;if(E[13]!==A||E[14]!==U||E[15]!==R?(a="element"===A?U(R):void 0,E[13]=A,E[14]=U,E[15]=R,E[16]=a):a=E[16],E[17]!==U||E[18]!==M){let e;E[20]!==U?(e=e=>U(e.sanity,e.element),E[20]=U,E[21]=e):e=E[21],l=M.map(e).filter(a3),E[17]=U,E[18]=M,E[19]=l}else l=E[19];
303E[22]!==a||E[23]!==l?(s={legacyComponentContext:a,pluginContexts:l},E[22]=a,E[23]=l,E[24]=s):s=E[24];let V=function(e,t){let n;let r=(0,g.c)(4);e:{let o;if(!e){n=void 0;break e}if(r[0]!==e||r[1]!==t){let i=t?.(e);if(!i){n=void 0;break e}if(aG(i)){n=i;break e}o=(Array.isArray(i)?i:[i]).map(a2),r[0]=e,r[1]=t,r[2]=o,r[3]=n}else o=r[2],n=r[3];n=o}return n}((o=s).legacyComponentContext,I),G=function(e,t){let n;let r=(0,g.c)(5);if(r[0]!==e||r[1]!==t){let o;r[3]!==t?(o=e=>{let n={id:ej(),context:e,hud:[],exclusive:[]};return t?.forEach(t=>{t.guard?.(e)&&("hud"===t.type&&n.hud.push(t),"exclusive"===t.type&&n.exclusive.push(t))}),n},r[3]=t,r[4]=o):o=r[4],n=e.map(o),r[0]=e,r[1]=t,r[2]=n}else n=r[2];return n}(o.pluginContexts,e.plugins);E[25]!==D?(u=D?.icon?(0,h.jsx)("div",{dangerouslySetInnerHTML:{__html:D.icon}}):(0,h.jsx)(e9.$lS,{}),E[25]=D,E[26]=u):u=E[26];let W=u,q=(0,y.useId)();E[27]!==G?(c=G?.some(a4),E[27]=G,E[28]=c):c=E[28];let Y=c||G?.length>1;E[29]!==_?(d=()=>{window.dispatchEvent(new CustomEvent("sanity-overlay/label-click",{detail:{id:_}}))},E[29]=_,E[30]=d):d=E[30];let Z=d;return E[31]!==F||E[32]!==$?(f=$?(0,h.jsx)(aq,{gap:1,paddingY:1,children:(0,h.jsx)(a5,{href:F})}):null,E[31]=F,E[32]=$,E[33]=f):f=E[33],E[34]!==z||E[35]!==O||E[36]!==Z||E[37]!==W||E[38]!==q||E[39]!==G||E[40]!==N||E[41]!==T||E[42]!==Y||E[43]!==H?(p=(H||Y)&&(0,h.jsx)(aK,{gap:1,paddingY:1,onClick:Z,children:(0,h.jsxs)(aQ,{gap:2,padding:2,children:[O&&(0,h.jsx)(w.xu,{marginRight:1,children:(0,h.jsx)(w.xv,{className:"drag-handle",size:0,children:(0,h.jsx)(e9.VVU,{})})}),(0,h.jsx)(w.xv,{size:0,children:W}),H&&(0,h.jsx)(w.xv,{size:1,weight:"medium",children:H}),Y&&(0,h.jsx)(w.xu,{paddingLeft:2,onClick:a6,children:(0,h.jsx)(aZ,{children:(0,h.jsx)(t5,{id:q,popover:{animate:!0,placement:"bottom-start",constrainSize:!0,tone:"default"},onOpen:()=>{T?.(!0)},onClose:()=>{T?.(!1)},button:(0,h.jsx)(w.zx,{icon:e9.zGg,tone:"primary",padding:2}),menu:(0,h.jsx)(w.v2,{paddingY:0,children:(0,h.jsx)(tR,{children:G?.map((e,t)=>h.jsxs(y.Fragment,{children:[h.jsxs(w.Kq,{role:"group",paddingY:1,space:0,children:[h.jsx(w.sN,{paddingY:2,text:h.jsx(w.xu,{paddingY:2,children:h.jsx(w.xv,{muted:!0,size:1,style:{textTransform:"capitalize"},children:`${e.context.document.name}: ${e.context.field?.name}`})}),onClick:()=>{e.context.node&&z?.post("visual-editing/focus",e.context.node)}}),e.exclusive.map(t=>t.component?h.jsx(w.sN,{paddingY:2,icon:t.icon||h.jsx(e9.BWR,{}),text:h.jsx(w.xu,{paddingY:2,children:h.jsx(w.xv,{size:1,children:t.title||t.name})}),onClick:()=>N?.(t,e.context)},t.name):null)]}),t<G.length-1&&h.jsx(w.R,{})]},e.id))})})})})})]})}),E[34]=z,E[35]=O,E[36]=Z,E[37]=W,E[38]=q,E[39]=G,E[40]=N,E[41]=T,E[42]=Y,E[43]=H,E[44]=p):p=E[44],E[45]!==G?(m=G?.map(a8),E[45]=G,E[46]=m):m=E[46],E[47]!==m?(b=(0,h.jsx)(aY,{children:m}),E[47]=m,E[48]=b):b=E[48],E[49]!==f||E[50]!==p||E[51]!==b?(x=(0,h.jsxs)(tR,{children:[f,p,b]}),E[49]=f,E[50]=p,E[51]=b,E[52]=x):x=E[52],E[53]!==V||E[54]!==o.legacyComponentContext?(k=Array.isArray(V)?V.map((e,t)=>{let{component:n,props:r}=e;return(0,h.jsx)(n,{PointerEvents:tR,...o.legacyComponentContext,...r},t)}):V,E[53]=V,E[54]=o.legacyComponentContext,E[55]=k):k=E[55],E[56]!==x||E[57]!==k?(S=(0,h.jsxs)(h.Fragment,{children:[x,k]}),E[56]=x,E[57]=k,E[58]=S):S=E[58],S},a1=(0,y.memo)(function(e){let t,n,r,o,i,a,l,s,u,c,d,f,p,m;let b=(0,g.c)(38),{draggable:v,focused:w,hovered:x,rect:k,wasMaybeCollapsed:S,enableScrollIntoView:E}=e,_=(0,y.useRef)(null),j=(0,y.useRef)(!1),C=`${k.w}px`,I=`${k.h}px`,R=`translate(${k.x}px, ${k.y}px)`;b[0]!==C||b[1]!==I||b[2]!==R?(n={width:C,height:I,transform:R},b[0]=C,b[1]=I,b[2]=R,b[3]=n):n=b[3],t=n,b[4]!==E||b[5]!==w||b[6]!==S?(r=()=>{if(!j.current&&!S&&!0===w&&_.current&&E){let e=_.current;(function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let n=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||
3030,left:parseFloat(t.scrollMarginLeft)||0}})(e);if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(nI(e,t));let r="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:o,top:i,left:a}of nI(e,nR(t))){let e=i-n.top+n.bottom,t=a-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}})(_.current,{behavior:t=>{0!==t.length&&e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},scrollMode:"if-needed",block:"center",inline:"nearest"})}j.current=!0===w},o=[w,S,E],b[4]=E,b[5]=w,b[6]=S,b[7]=r,b[8]=o):(r=b[7],o=b[8]),(0,y.useEffect)(r,o);let[$,O]=(0,y.useState)(!1);b[9]!==x?(i=()=>{if(!_.current||!x)return;let e=new IntersectionObserver(e=>{let[t]=e;O(t.boundingClientRect.top<0)},{threshold:1});return e.observe(_.current),()=>e.disconnect()},b[9]=x,b[10]=i):i=b[10],b[11]!==x||b[12]!==$?(a=[x,$],b[11]=x,b[12]=$,b[13]=a):a=b[13],(0,y.useEffect)(i,a);let[M,A]=(0,y.useState)(null);b[14]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{A(null),window.dispatchEvent(new CustomEvent("sanity-overlay/exclusive-plugin-closed"))},b[14]=l):l=b[14];let z=l;b[15]===Symbol.for("react.memo_cache_sentinel")?(s=(e,t)=>{A({plugin:e,context:t})},b[15]=s):s=b[15];let N=s,T=M?.plugin.component,[P,L]=(0,y.useState)(!1);b[16]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{L(!1)},b[16]=u):u=b[16],b[17]!==x?(c=[x],b[17]=x,b[18]=c):c=b[18],(0,y.useEffect)(u,c),b[19]!==T||b[20]!==P?(d=P||T?(0,h.jsx)(tv,{onDismiss:z,blockScroll:P}):null,b[19]=T,b[20]=P,b[21]=d):d=b[21];let D=w?"":void 0,F=x?"":void 0,B=$?"":void 0,H=v?"":void 0,U=P?"":void 0;return b[22]!==T||b[23]!==M||b[24]!==x||b[25]!==e?(f=T?(0,h.jsx)(aJ,{"data-sanity-overlay-element":!0,onClick:a9,children:(0,h.jsx)(T,{...M.context,closeExclusiveView:z})}):x?(0,h.jsx)(a0,{...e,onActivateExclusivePlugin:N,onMenuOpenChange:L}):null,b[22]=T,b[23]=M,b[24]=x,b[25]=e,b[26]=f):f=b[26],b[27]!==t||b[28]!==D||b[29]!==F||b[30]!==B||b[31]!==H||b[32]!==U||b[33]!==f?(p=(0,h.jsx)(aW,{"data-focused":D,"data-hovered":F,"data-flipped":B,"data-draggable":H,"data-menu-open":U,ref:_,style:t,children:f}),b[27]=t,b[28]=D,b[29]=F,b[30]=B,b[31]=H,b[32]=U,b[33]=f,b[34]=p):p=b[34],b[35]!==d||b[36]!==p?(m=(0,h.jsxs)(h.Fragment,{children:[d,p]}),b[35]=d,b[36]=p,b[37]=m):m=b[37],m});function a2(e){return"object"==typeof e&&"component"in e?e:{component:e,props:{}}}let a5=(0,y.memo)(function(e){let t,n,r,o;let i=(0,g.c)(6),a=(0,y.useSyncExternalStore)(a7,le);return i[0]!==e.href||i[1]!==a?(n=function e(t,n){try{let r=new URL(t,typeof location>"u"?void 0:location.origin);if(r.hash){let t=new URL(e(r.hash.slice(1),n));return`${r.origin}${r.pathname}${r.search}#${t.pathname}${t.search}`}return r.searchParams.set("preview",n),r.toString()}catch{return t}}(e.href,a),i[0]=e.href,i[1]=a,i[2]=n):n=i[2],t=n,i[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,h.jsx)(aX,{padding:2,children:(0,h.jsx)(w.xv,{size:1,weight:"medium",children:"Open in Studio"})}),i[3]=r):r=i[3],i[4]!==t?(o=(0,h.jsx)(w.xu,{as:"a",href:t,target:"_blank",rel:"noopener noreferrer",children:r}),i[4]=t,i[5]=o):o=i[5],o});function a3(e){return void 0!==e}function a4(e){return e.exclusive.length>0}function a6(e){e.stopPropagation()}function a8(e){return(0,h.jsx)(y.Fragment,{children:e.hud.map(t=>{let n=t.component;return n?(0,h.jsx)(n,{...e.context},t.name):null})},e.id)}function a9(e){e.stopPropagation()}function a7(e){let t=()=>e();return window.addEventListener("popstate",t),()=>window.removeEventListener("popstate",t)}function le(){return window.location.href}let lt=e=>{let t;let n=(0,g.c)(5),{dragGroupRect:r}=e,o=`${r.y}px`,i=`${r.x}px`,a=`${r.w-1}px`,l=`${r.h-1}px`;return n[0]!==o||n[1]!==i||n[2]!==a||n[3]!==l?(t=(0,h.jsx)("div",{style:{position:"absolute",top:o,left:i,width:a,height:l,border:"1px dashed #f0709b",pointerEvents:"none"}}),n[0]=o,n[1]=i,n[2]=a,n[3]=l,n[4]=t):t=n[4],t},ln=e=>{let t;let n=(0,g.c)(4),{dragInsertPosition:r}=e;if(null===r)return;let o=r?.left||r?.right?"horizontal":"vertical",i=0,a=0,l=0,s=0;if("horizontal"===o){let{left:e,right:t}=r;if(l=6,t&&e){let n=e.rect.x+e.rect.w,r=t.rect.x,o=.0125*Math.min(t.rect.h,e.rect.h);i=.5*n+.5*r-3,a=e.rect.y+o,s=Math.min(t.rect.h,e.rect.h)-2*o}else if(t&&!e){let e=.0125*t.rect.h;i=t.rect.x-3,a=t.rect.y+e,s=t.rect.h-2*e}else if(e&&!t){let t=.0125*e.rect.h;i=e.rect.x+e.rect.w-3,a=e.rect.y+t,s=e.rect.h-2*t}}else{let{bottom:e,top:t}=r;if(e&&t){let n=Math.min(t.rect.x,e.rect.x),r=t.rect.y+t.rect.h,o=e.rect.y,u=.0125*Math.min(e.rect.w,t.rect.w);s=6,i=n+u,a=.5*r+.5*o-3,l=Math.max(e.rect.w,t.rect.w)-2*u}else if(e&&!t){let t=.0125*e.rect.w;i=e.rect.x+t,a=e.rect.y-3,l=e.rect.w-2*t,s=6}else if(t&&!e){let e=.0125*t.rect.w;i=t.rect.x+e,a=t.rect.y+t.rect.h-3,l=t.rect.w-2*e,s=6}}let u=`${l}px`,c=`${s}px`,d=`translate(${i}px, ${a}px)`;return n[0]!==u||n[1]!==c||n[2]!==d?(t=(0,h.jsx)("div",{style:{position:"absolute",width:u,height:c,transform:d,background:"#556bfc",border:"2px s
303olid white",borderRadius:"999px",zIndex:"999999"}}),n[0]=u,n[1]=c,n[2]=d,n[3]=t):t=n[3],t},lr=x.zo.div` 304 --drag-preview-opacity: 0.98; 305 --drag-preview-skeleton-stroke: #ffffff; 306 307 @media (prefers-color-scheme: dark) { 308 --drag-preview-skeleton-stroke: #383d51; 309 } 310 311 position: fixed; 312 display: grid; 313 transform: ${({$scaleFactor:e,$width:t,$height:n})=>`translate(calc(var(--drag-preview-x) - ${t/2}px), calc(var(--drag-preview-y) - ${n/2}px)) scale(${e})`}; 314 width: ${({$width:e})=>`${e}px`}; 315 height: ${({$height:e})=>`${e}px`}; 316 z-index: 9999999; 317 opacity: var(--drag-preview-opacity); 318 cursor: move; 319 320 .drag-preview-content-wrapper { 321 position: relative; 322 width: 100%; 323 height: 100%; 324 container-type: inline-size; 325 } 326 327 [data-ui='card'] { 328 position: relative; 329 width: 100%; 330 height: 100%; 331 } 332 333 .drag-preview-skeleton { 334 position: absolute; 335 inset: 0; 336 337 rect { 338 stroke: var(--drag-preview-skeleton-stroke); 339 } 340 } 341 342 .drag-preview-handle { 343 position: absolute; 344 top: 4cqmin; 345 left: 4cqmin; 346 width: 6cqmin; 347 fill: var(--drag-preview-handle-fill); 348 } 349`,lo=e=>{var t,n;let r,o,i,a,l,s,u,c,d,f,p,m,y,b,v,x,k,S,E,_,j;let C=(0,g.c)(50),{skeleton:I}=e,R=Math.min(I.maxWidth,window.innerWidth/2),$=I.w>R?R/I.w:1,O=I.offsetX*$,M=I.offsetY*$,A=(0,w.Bj)(),z=(0,w.g9)(),N=z.radius[~~((n=(I.w-0)*((t=z.radius.length-2)-1)/1920+1)<1?1:n>t?t:n)];if(C[0]!==O||C[1]!==M||C[2]!==A||C[3]!==N||C[4]!==$||C[5]!==I.childRects||C[6]!==I.h||C[7]!==I.w){let e=I.childRects.filter(li),t=I.childRects.filter(la);o=lr,a=I.w,l=I.h,s=O,u=M,c=$,r=w.Zb,m=N,y=4,b="hidden",v="transparent",x=A?"dark":"light",p="drag-preview-content-wrapper",d="drag-preview-skeleton",f=`0 0 ${I.w} ${I.h}`,i=[...e,...t],C[0]=O,C[1]=M,C[2]=A,C[3]=N,C[4]=$,C[5]=I.childRects,C[6]=I.h,C[7]=I.w,C[8]=r,C[9]=o,C[10]=i,C[11]=a,C[12]=l,C[13]=s,C[14]=u,C[15]=c,C[16]=d,C[17]=f,C[18]=p,C[19]=m,C[20]=y,C[21]=b,C[22]=v,C[23]=x}else r=C[8],o=C[9],i=C[10],a=C[11],l=C[12],s=C[13],u=C[14],c=C[15],d=C[16],f=C[17],p=C[18],m=C[19],y=C[20],b=C[21],v=C[22],x=C[23];return C[24]!==i||C[25]!==z.color?(k=i.map((e,t)=>(0,h.jsx)("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:z.color.skeleton.from},t)),C[24]=i,C[25]=z.color,C[26]=k):k=C[26],C[27]!==k||C[28]!==d||C[29]!==f?(S=(0,h.jsx)("svg",{className:d,viewBox:f,children:k}),C[27]=k,C[28]=d,C[29]=f,C[30]=S):S=C[30],C[31]!==S||C[32]!==p?(E=(0,h.jsx)("div",{className:p,children:S}),C[31]=S,C[32]=p,C[33]=E):E=C[33],C[34]!==r||C[35]!==E||C[36]!==m||C[37]!==y||C[38]!==b||C[39]!==v||C[40]!==x?(_=(0,h.jsx)(r,{radius:m,shadow:y,overflow:b,tone:v,scheme:x,children:E}),C[34]=r,C[35]=E,C[36]=m,C[37]=y,C[38]=b,C[39]=v,C[40]=x,C[41]=_):_=C[41],C[42]!==o||C[43]!==a||C[44]!==l||C[45]!==s||C[46]!==u||C[47]!==c||C[48]!==_?(j=(0,h.jsx)(o,{$width:a,$height:l,$offsetX:s,$offsetY:u,$scaleFactor:c,children:_}),C[42]=o,C[43]=a,C[44]=l,C[45]=s,C[46]=u,C[47]=c,C[48]=_,C[49]=j):j=C[49],j};function li(e){return"IMG"===e.tagName}function la(e){return"IMG"!==e.tagName}let ll=(0,x.zo)(w.Zb)` 350 position: fixed; 351 bottom: 2rem; 352 left: 2rem; 353`,ls=()=>{let e,t;let n=(0,g.c)(2);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e={zIndex:"999999"},n[0]=e):e=n[0],n[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,h.jsx)(ll,{padding:2,shadow:2,radius:2,style:e,children:(0,h.jsxs)(w.kC,{align:"center",gap:2,children:[(0,h.jsx)(w.SV,{keys:["Shift"]}),(0,h.jsx)(w.xv,{size:1,children:"Zoom Out"}),(0,h.jsx)(e9.Qq,{})]})}),n[1]=t):t=n[1],t},lu=(e,t)=>{let{type:n}=t;switch(n){case"element/register":return e.find(e=>e.id===t.id)?e:[...e,{id:t.id,activated:!1,element:t.element,focused:!1,hovered:!1,rect:t.rect,sanity:t.sanity,dragDisabled:t.dragDisabled,targets:t.targets,elementType:t.elementType}];case"element/activate":return e.map(e=>e.id===t.id?{...e,activated:!0}:e);case"element/update":return e.map(e=>e.id===t.id?{...e,sanity:t.sanity,rect:t.rect,targets:t.targets,elementType:t.elementType}:e);case"element/unregister":return e.filter(e=>e.id!==t.id);case"element/deactivate":return e.map(e=>e.id===t.id?{...e,activated:!1,hovered:!1}:e);case"element/mouseenter":return e.map(e=>e.id===t.id?{...e,rect:t.rect,hovered:!0}:{...e,hovered:!1});case"element/mouseleave":return e.map(e=>e.id===t.id?{...e,hovered:!1}:e);case"element/updateRect":return e.map(e=>e.id===t.id?{...e,rect:t.rect}:e);case"element/click":return e.map(e=>({...e,focused:e.id===t.id&&"clicked"}));case"overlay/reset-mouse-state":return e.map(e=>({...e,focused:!1,hovered:!1}));case"overlay/blur":return e.map(e=>({...e,focused:!1}));case"presentation/blur":return e.map(e=>({...e,focused:!1}));case"presentation/focus":{let n=e.find(e=>"clicked"===e.focused);return e.map(e=>
353{let r="path"in e.sanity&&e.sanity.id===t.data.id&&e.sanity.path===t.data.path;return n&&e===n&&r?e:{...e,focused:r&&n?"duplicate":r}})}default:return e}};function lc(e,t){let{type:n}=t,{contextMenu:r,focusPath:o,perspective:i,isDragging:a,dragInsertPosition:l,dragShowMinimap:s,dragShowMinimapPrompt:u,dragSkeleton:c,dragMinimapTransition:d,dragGroupRect:f}=e,p=!1;if("presentation/focus"===n){let n=e.focusPath;n!==(o=t.data.path)&&(p=n.slice(o.length).startsWith("["))}return"presentation/perspective"===n&&(i=t.data.perspective),"element/contextmenu"===n&&(r="sanity"in t?{node:t.sanity,position:t.position}:null),("element/click"===n||"element/mouseleave"===n||"overlay/blur"===n||"presentation/blur"===n||"presentation/focus"===n)&&(r=null),"overlay/dragUpdateInsertPosition"===n&&(l=t.insertPosition),"overlay/dragStart"===n&&(a=!0),"overlay/dragUpdateSkeleton"===t.type&&(c=t.skeleton),"overlay/dragEnd"===n&&(a=!1),"overlay/dragToggleMinimapPrompt"===t.type&&(u=t.display),"overlay/dragStartMinimapTransition"===n&&(d=!0),"overlay/dragEndMinimapTransition"===n&&(d=!1),"overlay/dragUpdateGroupRect"===n&&(f=t.groupRect),"overlay/dragToggleMinimap"===n&&(s=t.display),{...e,contextMenu:r,elements:lu(e.elements,t),dragInsertPosition:l,dragSkeleton:c,dragGroupRect:f,isDragging:a,focusPath:o,perspective:i,wasMaybeCollapsed:p,dragShowMinimap:s,dragShowMinimapPrompt:u,dragMinimapTransition:d}}let ld=function(e){let t,n,r,o,i,a,l;let s=(0,g.c)(13),{comlink:u,children:c}=e;s[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],s[0]=t):t=s[0];let[d,f]=(0,y.useState)(t);s[1]!==u?(n=async e=>{if(u)try{let t=await u.fetch("visual-editing/preview-snapshots",void 0,{signal:e,suppressWarnings:!0});f(t.snapshots)}catch{}},s[1]=u,s[2]=n):n=s[2];let p=n;return s[3]!==u||s[4]!==p?(r=()=>{if(!u)return;let e=new AbortController,t=u.onStatus(()=>{p(e.signal)},"connected");return()=>{e.abort(),t()}},o=[u,p],s[3]=u,s[4]=p,s[5]=r,s[6]=o):(r=s[5],o=s[6]),(0,y.useEffect)(r,o),s[7]!==u?(i=()=>u?.on("presentation/preview-snapshots",e=>{f(e.snapshots)}),a=[u],s[7]=u,s[8]=i,s[9]=a):(i=s[8],a=s[9]),(0,y.useEffect)(i,a),s[10]!==c||s[11]!==d?(l=(0,h.jsx)(aV.Provider,{value:d,children:c}),s[10]=c,s[11]=d,s[12]=l):l=s[12],l};function lf(e){return"document"===e.type}function lp(e){return"type"===e.type}let lh=function(e){let t,n,r,o,i,a,l,s,u,c,d,f;let p=(0,g.c)(22),{comlink:m,children:b,elements:v}=e;p[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Map,p[0]=t):t=p[0];let[w,x]=(0,y.useState)(t),[k,S]=(0,y.useState)(null);p[1]!==m?(n=()=>{if(!m)return;let e=async function(e){if(m)try{let t=await m.fetch("visual-editing/schema",void 0,{signal:e,suppressWarnings:!0});S(t.schema)}catch{}},t=new AbortController,n=m.onStatus(()=>{e(t.signal)},"connected");return()=>{t.abort(),n()}},r=[m],p[1]=m,p[2]=n,p[3]=r):(n=p[2],r=p[3]),(0,y.useEffect)(n,r),p[4]===Symbol.for("react.memo_cache_sentinel")?(o=[],p[4]=o):o=p[4];let E=(0,y.useRef)(o),_=(0,y.useDeferredValue)(v);p[5]!==_?(i=_.reduce((e,t)=>{let{sanity:n}=t;if(!("id"in n)||!n.path.includes("[_key=="))return e;let r=n.path.split(".").toReversed().reduce((e,t)=>e.length?[t,...e]:t.includes("[_key==")?[t]:[],[]).join(".");return e.find(e=>e.id===n.id&&e.path===r)||e.push({id:n.id,path:r}),e},[]),p[5]=_,p[6]=i):i=p[6];let j=i,C=(0,y.useRef)(null);p[7]!==m||p[8]!==j?(a=()=>{if(!j.length||!m)return;let e=async(e,t)=>{let n=E.current;try{E.current=e;let n=await m.fetch("visual-editing/schema-union-types",{paths:e},{signal:t,suppressWarnings:!0});if(t.aborted)return;x(n.types),C.current=null}catch{}t.aborted&&(E.current=n)};j.some(e=>!E.current.find(t=>{let{id:n,path:r}=t;return n===e.id&&r===e.path}))&&(C.current?.abort(),C.current=new AbortController,e(j,C.current.signal))},l=[m,j],p[7]=m,p[8]=j,p[9]=a,p[10]=l):(a=p[9],l=p[10]),(0,y.useEffect)(a,l),p[11]!==k?(s=(e,t)=>{if(!k||"string"!=typeof e&&(!("path"in e)||!Array.isArray(k)))return;let n="string"==typeof e?e:e.type;return k.filter("document"===(t||"document")?lf:lp).find(e=>e.name===n)},p[11]=k,p[12]=s):s=p[12];let I=s;p[13]!==I||p[14]!==w?(u=e=>{if(!("path"in e))return{field:void 0,parent:void 0};let t=I(e);if(!t)return{field:void 0,parent:void 0};let n=e.path.split(".").flatMap(lg);try{return function t(n,r,o,i){let a=void 0===i?[]:i;if(!n)return{field:void 0,parent:void 0};let[l,...s]=r;if("fields"in n){let e=n.fields[l];if(!e&&"rest"in n)return t(n.rest,r,n,a);if(!s.length)return{field:e,parent:o};if(!e)throw Error(`[@sanity/visual-editing] No field could be resolved at path: "${[...a,...r].join(".")}"`);return t(e.value,s,n,[...a,l])}if("array"===n.type)return t(n.of,r,n,a);if("arrayItem"===n.type)return s.length?t(n.value,s,n,[...a,l]):{field:n,parent:o};if("union"===n.type){let r=l.startsWith("[_key==")?w?.get(e.id)?.get([a.join("."),l].filter(
353Boolean).join("")):l;return t(n.of.find(e=>"unionOption"===e.type?e.name===r:e),s,n,[...a,l])}if("unionOption"===n.type)return l?t(n.value,r,n,a):{field:n,parent:o};if("inline"===n.type)return t(I(n.name,"type").value,r,n,a);throw Error(`[@sanity/visual-editing] No field could be resolved at path: "${[...a,...r].join(".")}"`)}(t,n,void 0)}catch(e){return e instanceof Error&&console.warn(e.message),{field:void 0,parent:void 0}}},p[13]=I,p[14]=w,p[15]=u):u=p[15];let R=u;return p[16]!==R||p[17]!==I?(d={getField:R,getType:I},p[16]=R,p[17]=I,p[18]=d):d=p[18],c=d,p[19]!==b||p[20]!==c?(f=(0,h.jsx)(aM.Provider,{value:c,children:b}),p[19]=b,p[20]=c,p[21]=f):f=p[21],f};function lg(e){return e.includes("[")?e.split(/(\[.+\])/,2):[e]}let lm=(e=>{let t=e,n=new Set;return{getState:()=>t,setState:e=>{t=e(t),n.forEach(e=>e())},subscribe:e=>(n.add(e),()=>n.delete(e))}})({}),ly=e=>{let t,n,r,o,i,a,l;let s=(0,g.c)(11),{comlink:u,children:c}=e;return s[0]!==u?(t=()=>u?.on("presentation/shared-state",lb),n=[u],s[0]=u,s[1]=t,s[2]=n):(t=s[1],n=s[2]),(0,y.useEffect)(t,n),s[3]!==u?(r=()=>{(async function(){let e=await u?.fetch("visual-editing/shared-state",void 0,{suppressWarnings:!0});e&&lm.setState(()=>e.state)})().catch(lv)},o=[u],s[3]=u,s[4]=r,s[5]=o):(r=s[4],o=s[5]),(0,y.useEffect)(r,o),s[6]!==u?(a={comlink:u,store:lm},s[6]=u,s[7]=a):a=s[7],i=a,s[8]!==c||s[9]!==i?(l=(0,h.jsx)(e6.Provider,{value:i,children:c}),s[8]=c,s[9]=i,s[10]=l):l=s[10],l};function lb(e){"value"in e?lm.setState(t=>({...t,[e.key]:e.value})):lm.setState(t=>Object.fromEntries(Object.entries(t).filter(t=>{let[n]=t;return n!==e.key})))}function lv(e){console.debug(e),console.warn("[@sanity/visual-editing]: Failed to fetch shared state. Check your version of `sanity` is up-to-date")}let lw=e=>{let t,n;let r=(0,g.c)(5),{children:o,comlink:i}=e;r[0]!==i?(t=(e,t)=>{if(!i)return;let n=tk[e];if(n)i.post("visual-editing/telemetry-log",{event:n,data:t});else throw Error(`Telemetry event: ${e} does not exist`)},r[0]=i,r[1]=t):t=r[1];let a=t;return r[2]!==o||r[3]!==a?(n=(0,h.jsx)(tS.Provider,{value:a,children:o}),r[2]=o,r[3]=a,r[4]=n):n=r[4],n};function lx(){}function lk(e){return e.id}function lS(e){return!!e}function lE(e){let{sanity:t}=e;return t&&"id"in t?t:null}let l_=x.zo.div` 354 background-color: transparent; 355 direction: ltr; 356 inset: 0; 357 pointer-events: none; 358 position: absolute; 359 width: 100%; 360 height: 100%; 361 z-index: ${({$zIndex:e})=>e??"9999999"}; 362`;function lj(e){let t,n;return t=requestAnimationFrame(()=>{n=requestAnimationFrame(e)}),()=>{void 0!==t&&cancelAnimationFrame(t),void 0!==n&&cancelAnimationFrame(n)}}let lC=e=>{let t,n,r,o,i;let a=(0,g.c)(8),{documentIds:l}=e;a[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],a[0]=t):t=a[0];let[s,u]=(0,y.useState)(t);a[1]!==l?(n=()=>{u(e=>{let t=Array.from(new Set(l));return e.length===t.length&&e.reduce(lM,t)?.length===0?e:t})},r=[l],a[1]=l,a[2]=n,a[3]=r):(n=a[2],r=a[3]),(0,y.useEffect)(n,r);let c=Z();return a[4]!==c||a[5]!==s?(o=()=>{for(let e of s)c.send({type:"observe",documentId:(0,v.qy)(e)}),c.send({type:"observe",documentId:(0,v.vs)(e)});return()=>{for(let e of s)c.send({type:"unobserve",documentId:(0,v.qy)(e)}),c.send({type:"unobserve",documentId:(0,v.vs)(e)})}},i=[c,s],a[4]=c,a[5]=s,a[6]=o,a[7]=i):(o=a[6],i=a[7]),(0,y.useEffect)(o,i),null},lI=e=>{let t,n,r;let o=(0,g.c)(12),{comlink:i,dispatch:a,inFrame:l,inPopUp:s,onDrag:u,overlayEnabled:c,rootElement:d}=e,{dispatchDragEndEvent:f}=function(){let e,t,n;let r=(0,g.c)(4),{getDocument:o}=et();return r[0]!==o?(e=()=>{let e=e=>{let{insertPosition:t,target:n,preventInsertDefault:r}=e.detail;if(r)return;let i=function(e){if(e){let{top:t,right:n,bottom:r,left:o}=e;if(o||t)return{node:(o??t).sanity,position:"after"};if(n||r)return{node:(n??r).sanity,position:"before"}}}(t);if(i){let e=o(n.id),{node:t,position:r}=i,{key:a,hasExplicitKey:l}=eo(n),{path:s,key:u}=eo(t);s&&u&&u!==a&&e.patch(async e=>{let{getSnapshot:t}=e,o=q(await t(),n.path);return l?[T(s,N({_key:a})),T(s,A(o,r,{_key:u}))]:[T(s,N(~~a)),T(s,A(o,r,u>a?~~u-1:~~u))]})}};return window.addEventListener("sanity/dragEnd",e),()=>{window.removeEventListener("sanity/dragEnd",e)}},t=[o],r[0]=o,r[1]=e,r[2]=t):(e=r[1],t=r[2]),(0,y.useEffect)(e,t),r[3]===Symbol.for("react.memo_cache_sentinel")?(n={dispatchDragEndEvent:aO},r[3]=n):n=r[3],n}(),p=tE();o[0]!==i||o[1]!==a||o[2]!==f||o[3]!==u||o[4]!==p?(t=e=>{if("element/click"===e.type){let{sanity:t}=e;i?.post("visual-editing/focus",t),p("Visual Editing Overlay Clicked",null)}else if("overlay/activate"===e.type)i?.post("visual-editing/toggle",{enabled:!0});else if("overlay/deactivate"===e.type)i?.post("visual-editing/toggle",{enabled:!1});else if("overlay/dragEnd"===e.type){let{insertPosition:t,target:n,dragGroup:r,flow:o,preventInsertDefault:i}=e;f({insertPosition:t,target:n,dragGroup:r,flow:o,preventInsertDefault:i}),t&&p("Visual Editing Drag Sequence Completed",null)}else if("overlay/dragUpdateCursorPosition"===e.type){u(e.x,e.y);return}else if("overlay/dragToggleMinimap"===e.type&&!0===e.display)p("Visual Editing Drag Minimap Enabled",null);else if("overlay/setCursor"===e.type){let{element:t,cursor:n}=e;n?t.style.cursor=n:t.style.removeProperty("cursor")}a(e)},o[0]=i,o[1]=a,o[2]=f,o[3]=u,o[4]=p,o[5]=t):t=o[5];let h=function(e,t,n,r){let o,i;let a=(0,g.c)(7),l=(0,y.useRef)(void 0),s=Z()!==L;return a[0]!==e||a[1]!==t||a[2]!==n||a[3]!==r||a[4]!==s?(o=()=>
362{if(e)return l.current=function({handler:e,overlayElement:t,inFrame:n,inPopUp:r,optimisticActorReady:o}){let i=!1,a=new Map,l=new WeakMap,s=new Set,u=new WeakMap,c=new WeakMap,d,f,p,h=!1,g=[],m=()=>g[g.length-1];function y(e,t){e.removeEventListener("click",t.click,{capture:!0}),e.removeEventListener("contextmenu",t.contextmenu,{capture:!0}),e.removeEventListener("mousemove",t.mousemove,{capture:!0}),e.removeEventListener("mousedown",t.mousedown,{capture:!0}),e.removeEventListener("mouseenter",t.mouseenter),e.removeEventListener("mouseleave",t.mouseleave)}function b({id:t,elements:n,handlers:r}){let{element:o,measureElement:i}=n;o.addEventListener("click",r.click,{capture:!0}),o.addEventListener("contextmenu",r.contextmenu,{capture:!0}),o.addEventListener("mousemove",r.mousemove,{once:!0,capture:!0}),o.addEventListener("mousedown",r.mousedown,{capture:!0}),d.observe(i),e({type:"element/activate",id:t})}function w({id:t,elements:n,handlers:r}){let{element:o,measureElement:i}=n;y(o,r),d.unobserve(i),g=g.filter(e=>e!==o),e({type:"element/deactivate",id:t})}function x(t){if(!(!n&&!r||!o))for(let n of g){if(t===n){let n=l.get(t)?.sanity;if(!n||!e0(n))return;if(e4(t,n,s,l)){let n=t.style.cursor;n&&c.set(t,n),e({type:"overlay/setCursor",element:t,cursor:"move"});continue}}k(n)}}function k(t){let n=c.get(t);e({type:"overlay/setCursor",element:t,cursor:n})}function S(c){for(let d of function e(t){let n=[];function r(e,t,n,r){let o=function(e){if("object"==typeof e&&null!==e)return eg(e);try{let t=JSON.parse(e);return eg(t)}catch{return function(e){let t=e.split(";").reduce((e,t)=>{let[n,r]=t.split("=");if(!n||t.includes("=")&&!r)return e;switch(n){case"id":e.id=r;break;case"type":e.type=r;break;case"path":e.path=v.eT.toString(function(e){let t=[];for(let n of e.split(".")){let e=ec.exec(n);if(e){t.push(e[1],Number(e[2]));continue}let r=ed.exec(n);if(r){t.push(r[1],[Number(r[2]),Number(r[3])]);continue}let o=ef.exec(n);if(o){t.push(o[1],{_key:o[2]});continue}t.push(n)}return t}(r));break;case"base":e.baseUrl=decodeURIComponent(r);break;case"tool":e.tool=r;break;case"workspace":e.workspace=r;break;case"projectId":e.projectId=r;break;case"dataset":e.dataset=r}return e},{});if((0,ea.is)(eu,t))return t}(e)}}(t);if(!o)return;let i=function e(t){let{display:n}=window.getComputedStyle(t);if("inline"!==n)return t;let r=t.parentElement;return r?e(r):null}(e);if(i)return{elements:{element:e,measureElement:i},sanity:o,reason:n,preventGrouping:r}}if(t)for(let o of t.childNodes)!function t(o,i){let a=function(t){let{nodeType:n,parentElement:o,textContent:i}=t;if(eK(t)&&t.dataset?.sanityEditTarget!==void 0){let n=e1(e(t).map(e=>"element"===e.type?e.commonSanity:void 0).filter(e=>void 0!==e));if(n)return{reason:"edit-target",elements:{element:t,measureElement:t},sanity:n}}else if(n===Node.TEXT_NODE&&o&&i){let e=eZ(i);return e?r(o,e,"stega-text",!0):void 0}else if(eK(t)){if("SCRIPT"===t.tagName||"SANITY-VISUAL-EDITING"===t.tagName)return;if(t.dataset?.sanity)return r(t,t.dataset.sanity,"data-attribute",!!(t.textContent&&eY(t.textContent)));if(t.dataset?.sanityEditInfo)return r(t,t.dataset.sanityEditInfo,"data-attribute",!!(t.textContent&&eY(t.textContent)));if(eX(t)){let e=eZ(t.alt,!0);return e?r(t,e,"stega-attribute"):void 0}if(eQ(t)){let e=eZ(t.dateTime,!0);return e?r(t,e,"stega-attribute"):void 0}if(eJ(t)){if(!t.ariaLabel)return;let e=eZ(t.ariaLabel,!0);return e?r(t,e,"stega-attribute"):void 0}}}(o),l=i;if(eK(o)&&o.dataset?.sanityEditGroup!==void 0&&(l={type:"group",elements:{element:o,measureElement:o},targets:[]},n.push(l)),a){let e={elements:a.elements,sanity:a.sanity,reason:a.reason};l&&!a.preventGrouping?l.targets.push(e):n.push({elements:a.elements,type:"element",targets:[e]})}if(eK(o)&&!eX(o)&&!("SCRIPT"===o.tagName||"SANITY-VISUAL-EDITING"===o.tagName))for(let e of o.childNodes)t(e,l)}(o,void 0);return n.map(e=>{if(0===e.targets.length&&"group"===e.type)return{...e,commonSanity:void 0};let t=1===e.targets.length?e.targets[0].sanity:e1(e.targets.map(({sanity:e})=>e).filter(e=>void 0!==e))||e.targets[0].sanity;return t?{...e,commonSanity:t}:null}).filter(e=>null!==e)}(c)){if("group"===d.type){for(let e of d.targets){let t=l.get(e.elements.element);t&&"element"===t.type&&E(e.elements.element)}0===d.targets.length&&E(d.elements.element)}if(!d.commonSanity)continue;let{element:c}=d.elements;l.has(c)?function(t){let{element:n}=t.elements,r=l.get(n);r&&(l.set(n,{...r,sanity:t.commonSanity}),e({type:"element/update",elementType:r.type,id:r.id,rect:eC(n),sanity:t.commonSanity,targets:t.targets.map(e=>({sanity:e.sanity,element:e.elements.element}))}))}(d):function({type:c,elements:d,commonSanity:p,targets:y}){let{element:v,measureElement:w}=d,S={click(t){let r=t.target;if(v===m()&&v.contains(r)){n&&(t.preventDefault(),t.stopPropagation());let r=l.get(v)?.sanity;r&&!h&&e({type:"element/click",id:E,sanity:r})}},contextmenu(t){if(!("path"in p)||!n&&!r||!o||!p.path.split(".").pop()?.includes("[_key=="))return;let i=t.target;v===m()&&v.contains(i)&&((n||r)&&(t.preventDefault(),t.stopPropagation()),e({type:"element/contextmenu",id:E,position:{x:t.clientX,y:t.clientY},sanity:p}))},mousedown(t){if(t.preventDefault(),t.currentTarget!==g.at(-1)||v.getAttribute("data-sanity-drag-disable")||!n&&!r||!o)return;let i=l.get(v)?.sanity;if(!i||!e0(i)||!e2(i.path))return;let a=e4(v,p,s,l);a&&function(e){var t;let{mouseEvent:n,element:r,overlayGroup:o,handler:i,target:a,onSequenceStart:l,onSequenceEnd:s}=e;if(0!==n.button)return;window.focus();let u=o.map(e=>eC(e.elements.element)),c=r.getAttribute("data-sanity-drag-flow")||((t=u).some(e=>t.filter(t=>!eR(e,t)).some(t=>e.y===t.y))?"horizontal":"vertical"),d=r.getAttribute("data-sanity-drag-group"),f=!!r.getAttribute("data-sanity-drag-minima
362p-disable"),p=!!r.getAttribute("data-sanity-drag-prevent-default"),h=r.getAttribute("data-unstable_sanity-drag-document-height"),g=r.getAttribute("data-unstable_sanity-drag-group-height"),m=null,y=eT(n),b=document.body,{minYScaled:v,scaleFactor:w}=function(e,t){let n=t||eA(e).height,r=(n+=200)>window.innerHeight?window.innerHeight/n:1,{min:o}=eA(e.map(e=>eM(e,r,{x:window.innerWidth/2,y:0})));return{scaleFactor:r,minYScaled:o-100*r}}(u,g?~~g:null),x=!1,k=!1,S=!0;eB||(eG={body:{overflow:window.getComputedStyle(document.body).overflow,height:window.getComputedStyle(document.body).height},documentElement:{overflow:window.getComputedStyle(document.documentElement).overflow,height:window.getComputedStyle(document.documentElement).height}},eV=h?~~h:document.documentElement.scrollHeight);let E=setInterval(()=>{u=o.map(e=>eC(e.elements.element))},150),_=()=>{w>=1||(i({type:"overlay/dragUpdateSkeleton",skeleton:eP(eU,r,w)}),i({type:"overlay/dragToggleMinimapPrompt",display:!1}),eL(b,w,v,i,150).then(()=>{setTimeout(()=>{i({type:"overlay/dragUpdateGroupRect",groupRect:eD(u)})},300)}))},j=e=>{Math.abs(e.deltaY)>=10&&w<1&&!eB&&!k&&!f&&S&&(i({type:"overlay/dragToggleMinimapPrompt",display:!0}),k=!0),!e.shiftKey||eB||f||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),eB=!0,setTimeout(()=>{_()},50))},C=e=>{if(e.preventDefault(),eH=function(e){let t=document.body,n=window.getComputedStyle(t).transform;if("none"===n)return{x:e.x,y:e.y};let r=new DOMMatrix(n).inverse(),o=new DOMPoint(e.x,e.y).matrixTransform(r);return{x:o.x,y:o.y}}(eU=eT(e)),4>Math.abs(e$(eU,y)))return;if(!x){let e=eD(u),t=eP(eU,r,1);i({type:"overlay/dragStart",flow:c}),i({type:"overlay/dragUpdateSkeleton",skeleton:t}),i({type:"overlay/dragUpdateGroupRect",groupRect:e}),x=!0,l()}i({type:"overlay/dragUpdateCursorPosition",x:eU.x,y:eU.y}),!e.shiftKey||eB||f||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),eB=!0,setTimeout(()=>{_()},50));let t=function(e,t,n){if("horizontal"===n){let r={x1:e.x,y1:e.y,x2:e.x-1e8,y2:e.y},o={x1:e.x,y1:e.y,x2:e.x+1e8,y2:e.y};return{left:eO(r,t,n),right:eO(o,t,n)}}{let r={x1:e.x,y1:e.y,x2:e.x,y2:e.y-1e8},o={x1:e.x,y1:e.y,x2:e.x,y2:e.y+1e8};return{top:eO(r,t,n),bottom:eO(o,t,n)}}}(eU,u,c);JSON.stringify(m)!==JSON.stringify(t)&&i({type:"overlay/dragUpdateInsertPosition",insertPosition:eN(o,m=t,c)})},I=()=>{S=!1,i({type:"overlay/dragEnd",target:a,insertPosition:m?eN(o,m,c):null,dragGroup:d,flow:c,preventInsertDefault:p}),k&&i({type:"overlay/dragToggleMinimapPrompt",display:!1}),eB||(clearInterval(E),s(),A(),M()),O()},R=e=>{"Shift"===e.key&&eB&&(eB=!1,i({type:"overlay/dragUpdateSkeleton",skeleton:eP(eU,r,1/w)}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{eF(eH.y,b,eV,i,150,eG)},50),i({type:"overlay/dragUpdateGroupRect",groupRect:null}),S||(clearInterval(E),O(),A(),M(),s()))},$=()=>{i({type:"overlay/dragUpdateGroupRect",groupRect:null}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{eF(eH.y,b,eV,i,150,eG).then(()=>{eB=!1})},50),clearInterval(E),O(),A(),M(),s()},O=()=>{window.removeEventListener("mousemove",C),window.removeEventListener("wheel",j),window.removeEventListener("mouseup",I)},M=()=>{window.removeEventListener("keyup",R)},A=()=>{window.removeEventListener("blur",$)};window.addEventListener("blur",$),window.addEventListener("keyup",R),window.addEventListener("wheel",j),window.addEventListener("mousemove",C),window.addEventListener("mouseup",I)}({element:v,handler:e,mouseEvent:t,overlayGroup:a,target:i,onSequenceStart:()=>{h=!0},onSequenceEnd:()=>{setTimeout(()=>{h=!1},250)}})},mousemove(e){S.mouseenter(e);let t=e.currentTarget;t&&(t.addEventListener("mouseenter",S.mouseenter),t.addEventListener("mouseleave",S.mouseleave))},mouseenter(){document.querySelector("vercel-live-feedback")&&v.closest("[data-vercel-edit-info]")||v.closest("[data-vercel-edit-target]")||(g.push(v),e({type:"element/mouseenter",id:E,rect:eC(v)}),x(v))},mouseleave(n){function r(){g.pop();let t=m();if(e({type:"element/mouseleave",id:E}),t){x(t);let n=l.get(t);n&&e({type:"element/mouseenter",id:n.id,rect:eC(t)})}k(v)}let{relatedTarget:o}=n,i=eq(o),a=t.contains(i);if(eW(i)&&a)return function e(t){let n=o=>{let{relatedTarget:i}=o;eq(i)?i&&eW(i)&&(t.removeEventListener("mouseleave",n),e(i)):(t.removeEventListener("mouseleave",n),r())};t.addEventListener("mouseleave",n)}(i);r()}},E=ej(),_={type:c,id:E,elements:d,sanity:p,handlers:S};s.add(v),u.set(w,v),a.set(E,v),l.set(v,_),f?.observe(v),e({type:"element/register",elementType:c,id:E,element:v,rect:eC(v),sanity:p,dragDisabled:!!v.getAttribute("data-sanity-drag-disable"),targets:y.map(e=>({sanity:e.sanity,element:e.elements.element}))}),i&&b(_)}(d)}}function E(t){let n=l.get(t);if(n){let{id:r,handlers:o}=n;y(t,o),d.unobserve(t),l.delete(t),s.delete(t),a.delete(r),e({type:"element/unregister",id:r})}}function _(t){let n=l.get(t);n&&e({type:"element/updateRect",id:n.id,rect:eC(t)})}function j(e){if(i)for(let t of e){let{target:e}=t,n=eW(e)&&l.get(e);n&&(t.isIntersecting?b(n):w(n))}}function C(t){let n=eq(t.target);if(n){"capture"===n.dataset.sanityOverlayElement&&(t.preventDefault(),t.stopPropagation());return}g=[],e({type:"overlay/blur"})}function I(){g=[],e({type:"overlay/reset-mouse-state"})}function R(){for(let e of s)_(e)}function $(t){"Escape"===t.key&&(g=[],e({type:"overlay/blur"}))}function O(e){let{target:t}=e;if(!(t===window.document||!eW(t)))for(let e of s)t.contains(e)&&_(e)}function M(){i||(f=new IntersectionObserver(j,{threshold:.3}
362),s.forEach(e=>f.observe(e)),e({type:"overlay/activate"}),i=!0)}function A(){i&&(f?.disconnect(),s.forEach(e=>{let t=l.get(e);t&&w(t)}),e({type:"overlay/deactivate"}),i=!1)}function z(t){let{id:n}=t.detail,r=a.get(n);if(!r)return;let o=l.get(r)?.sanity;o&&e({type:"element/click",id:n,sanity:o})}return window.document.fonts.ready.then(()=>{for(let e of s)_(e)}),window.addEventListener("click",C),window.addEventListener("contextmenu",C),window.addEventListener("sanity-overlay/exclusive-plugin-closed",I),window.addEventListener("sanity-overlay/label-click",z),window.addEventListener("keydown",$),window.addEventListener("resize",R),window.addEventListener("scroll",O,{capture:!0,passive:!0}),d=new ResizeObserver(function(e){for(let t of e){let e=t.target;if(eW(e)){let t=u.get(e);if(!t)return;_(t)}}}),(p=new MutationObserver(function(e){let n=!1;for(let r of e){let{target:e,type:o}=r,i="characterData"===o?e.parentElement:e;if(!(i===t||t.contains(i))&&(n=!0,eW(i))){let e=i.parentElement?.closest("[data-sanity-edit-group]")||null;S({childNodes:[eW(e)?e:i]})}}if(n)for(let e of s)e.isConnected||E(e),l.get(e)?.type!=="group"||e.hasAttribute("data-sanity-edit-group")||E(e)})).observe(document.body,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),S(document.body),M(),{activate:M,deactivate:A,destroy:function(){window.removeEventListener("click",C),window.removeEventListener("contextmenu",C),window.removeEventListener("sanity-overlay/exclusive-plugin-closed",I),window.removeEventListener("sanity-overlay/label-click",z),window.removeEventListener("keydown",$),window.removeEventListener("resize",R),window.removeEventListener("scroll",O),p.disconnect(),d.disconnect(),s.forEach(e=>{E(e)}),a.clear(),s.clear(),g=[],A()}}}({handler:t,overlayElement:e,inFrame:n,inPopUp:r,optimisticActorReady:s}),()=>{l.current?.destroy(),l.current=void 0}},i=[e,t,n,r,s],a[0]=e,a[1]=t,a[2]=n,a[3]=r,a[4]=s,a[5]=o,a[6]=i):(o=a[5],i=a[6]),(0,y.useEffect)(o,i),l}(d,t,l,s);return o[6]!==h.current||o[7]!==c?(n=()=>{c?h.current?.activate():h.current?.deactivate()},o[6]=h.current,o[7]=c,o[8]=n):n=o[8],o[9]!==h||o[10]!==c?(r=[h,c],o[9]=h,o[10]=c,o[11]=r):r=o[11],(0,y.useEffect)(n,r),null},lR=e=>{let t,n,r,o,i,a,l,s,u,c,d,f,p,m,b,v,x,k,S,E,_,j,C,I,R;let $=(0,g.c)(76),{comlink:O,comlinkStatus:M,componentResolver:A,inFrame:z,inPopUp:N,zIndex:T}=e,P=(0,w.Bj)();$[0]===Symbol.for("react.memo_cache_sentinel")?(t={contextMenu:null,dragInsertPosition:null,dragShowMinimap:!1,dragShowMinimapPrompt:!1,dragSkeleton:null,elements:[],focusPath:"",isDragging:!1,perspective:"published",wasMaybeCollapsed:!1,dragMinimapTransition:!1,dragGroupRect:null},$[0]=t):t=$[0];let[D,F]=(0,y.useReducer)(lc,t),{contextMenu:B,dragInsertPosition:H,dragShowMinimap:U,dragShowMinimapPrompt:V,dragSkeleton:G,elements:W,isDragging:q,perspective:Y,wasMaybeCollapsed:K,dragMinimapTransition:X,dragGroupRect:Q}=D,[J,ee]=(0,y.useState)(null),[et,en]=(0,y.useState)(!0);$[1]!==O?(n=()=>{let e=[O?.on("presentation/focus",e=>{F({type:"presentation/focus",data:e})}),O?.on("presentation/blur",e=>{F({type:"presentation/blur",data:e})}),O?.on("presentation/toggle-overlay",()=>{en(lA)})].filter(Boolean);return()=>e.forEach(lz)},r=[O],$[1]=O,$[2]=n,$[3]=r):(n=$[2],r=$[3]),(0,y.useEffect)(n,r),function(e,t){let n,r;let o=(0,g.c)(4);o[0]!==e||o[1]!==t?(n=()=>{let n=new AbortController;e?.fetch("visual-editing/fetch-perspective",void 0,{signal:n.signal,suppressWarnings:!0}).then(e=>{t({type:"presentation/perspective",data:e})}).catch(lx);let r=e?.on("presentation/perspective",e=>{t({type:"presentation/perspective",data:e})});return()=>{r?.(),n.abort()}},r=[e,t],o[0]=e,o[1]=t,o[2]=n,o[3]=r):(n=o[2],r=o[3]),(0,y.useEffect)(n,r)}(O,F),function(e,t,n){let r,o,i;let a=(0,g.c)(7),l=(0,y.useRef)(void 0);a[0]!==e?(r=(t,n)=>{e?.post("visual-editing/documents",{documents:t,perspective:n})},a[0]=e,a[1]=r):r=a[1];let s=r;a[2]!==t||a[3]!==n||a[4]!==s?(o=()=>{let e=t.map(lE).filter(lS),r=new Set(e.map(lk));if(!l.current||!function(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}(r,l.current.nodeIds)||n!==l.current.perspective){let t=Array.from(r).map(t=>{let{type:n,projectId:r,dataset:o}=e.find(e=>e.id===t);return r&&o?{_id:t,_type:n,_projectId:r,_dataset:o}:{_id:t,_type:n}});l.current={nodeIds:r,perspective:n}
362,s(t,n)}},i=[t,n,s],a[2]=t,a[3]=n,a[4]=s,a[5]=o,a[6]=i):(o=a[5],i=a[6]),(0,y.useEffect)(o,i)}(O,W,Y),$[4]!==J?(o=(e,t)=>{J&&(J.style.setProperty("--drag-preview-x",`${e}px`),J.style.setProperty("--drag-preview-y",`${t-window.scrollY}px`))},$[4]=J,$[5]=o):o=$[5];let er=o;$[6]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{let e=e=>{lO(e)&&en(lT)},t=e=>{lO(e)&&en(lP),["mod","\\"].every(t=>l$[t]?e[l$[t]]:e.key===t.toUpperCase())&&en(lL)};return window.addEventListener("click",lN),window.addEventListener("keydown",t),window.addEventListener("keyup",e),()=>{window.removeEventListener("click",lN),window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}},a=[en],$[6]=i,$[7]=a):(i=$[6],a=$[7]),(0,y.useEffect)(i,a);let[eo,ei]=(0,y.useState)(!1),[ea,el]=(0,y.useState)(!1),es=(0,y.useRef)(void 0);$[8]!==et?(l=()=>{if(et)return lj(()=>{ei(!0),lj(()=>{el(!0),es.current=setTimeout(()=>{el(!1),ei(!1)},1500)})});es.current&&(clearTimeout(es.current),ei(!1),el(!1))},s=[et],$[8]=et,$[9]=l,$[10]=s):(l=$[9],s=$[10]),(0,y.useEffect)(l,s),$[11]!==W?(c=W.flatMap(lD),$[11]=W,$[12]=c):c=$[12],u=c,$[13]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{F({type:"overlay/blur"})},$[13]=d):d=$[13];let eu=d,ec=Z()!==L;f=ec?A:void 0;e:{let t;if((z||N)&&"connected"!==M||q){let e;$[14]===Symbol.for("react.memo_cache_sentinel")?(e=[],$[14]=e):e=$[14],p=e;break e}$[15]!==O||$[16]!==f||$[17]!==X||$[18]!==U||$[19]!==W||$[20]!==z||$[21]!==q||$[22]!==ec||$[23]!==e.plugins||$[24]!==K?(t=W.filter(lF).map(t=>{let{id:n,element:r,focused:o,hovered:i,rect:a,sanity:l,dragDisabled:s,targets:u,elementType:c}=t,d=!s&&!!r.getAttribute("data-sanity")&&ec&&W.some(e=>"id"in e.sanity&&"id"in l&&e3(e.sanity,l)&&e.sanity.path!==l.path);return(0,h.jsx)(a1,{comlink:O,componentResolver:f,plugins:e.plugins,element:r,enableScrollIntoView:!q&&!X&&!U,id:n,focused:o,hovered:i,node:l,rect:a,showActions:!z,draggable:d,isDragging:q||X,wasMaybeCollapsed:o&&K,targets:u,elementType:c},n)}),$[15]=O,$[16]=f,$[17]=X,$[18]=U,$[19]=W,$[20]=z,$[21]=q,$[22]=ec,$[23]=e.plugins,$[24]=K,$[25]=t):t=$[25],p=t}let ed=p,ef=P?"dark":"light",ep=ea?"":void 0,eh=eo?"":void 0;return $[26]!==u||$[27]!==Y?(m=(0,h.jsx)(lC,{documentIds:u,perspective:Y}),$[26]=u,$[27]=Y,$[28]=m):m=$[28],$[29]!==O||$[30]!==z||$[31]!==N||$[32]!==et||$[33]!==J||$[34]!==er?(b=(0,h.jsx)(lI,{comlink:O,dispatch:F,inFrame:z,inPopUp:N,onDrag:er,overlayEnabled:et,rootElement:J}),$[29]=O,$[30]=z,$[31]=N,$[32]=et,$[33]=J,$[34]=er,$[35]=b):b=$[35],$[36]!==B?(v=B&&(0,h.jsx)(aU,{...B,onDismiss:eu}),$[36]=B,$[37]=v):v=$[37],$[38]!==Q||$[39]!==H||$[40]!==X||$[41]!==V||$[42]!==q?(x=q&&!X&&(0,h.jsxs)(h.Fragment,{children:[H&&(0,h.jsx)(ln,{dragInsertPosition:H}),V&&(0,h.jsx)(ls,{}),Q&&(0,h.jsx)(lt,{dragGroupRect:Q})]}),$[38]=Q,$[39]=H,$[40]=X,$[41]=V,$[42]=q,$[43]=x):x=$[43],$[44]!==G||$[45]!==q?(k=q&&G&&(0,h.jsx)(lo,{skeleton:G}),$[44]=G,$[45]=q,$[46]=k):k=$[46],$[47]!==ed||$[48]!==ep||$[49]!==eh||$[50]!==m||$[51]!==b||$[52]!==v||$[53]!==x||$[54]!==k||$[55]!==T?(S=(0,h.jsxs)(l_,{"data-fading-out":ep,"data-overlays":eh,ref:ee,$zIndex:T,children:[m,b,v,ed,x,k]}),$[47]=ed,$[48]=ep,$[49]=eh,$[50]=m,$[51]=b,$[52]=v,$[53]=x,$[54]=k,$[55]=T,$[56]=S):S=$[56],$[57]!==O||$[58]!==S?(E=(0,h.jsx)(ly,{comlink:O,children:S}),$[57]=O,$[58]=S,$[59]=E):E=$[59],$[60]!==O||$[61]!==E?(_=(0,h.jsx)(ld,{comlink:O,children:E}),$[60]=O,$[61]=E,$[62]=_):_=$[62],$[63]!==O||$[64]!==W||$[65]!==_?(j=(0,h.jsx)(lh,{comlink:O,elements:W,children:_}),$[63]=O,$[64]=W,$[65]=_,$[66]=j):j=$[66],$[67]!==J||$[68]!==j?(C=(0,h.jsx)(w.li,{children:(0,h.jsx)(w.Xp,{element:J,children:j})}),$[67]=J,$[68]=j,$[69]=C):C=$[69],$[70]!==ef||$[71]!==C?(I=(0,h.jsx)(w.f6,{scheme:ef,theme:w.Lg,tone:"transparent",children:C}),$[70]=ef,$[71]=C,$[72]=I):I=$[72],$[73]!==O||$[74]!==I?(R=(0,h.jsx)(lw,{comlink:O,children:I}),$[73]=O,$[74]=I,$[75]=R):R=$[75],R},l$={alt:"altKey",ctrl:"ctrlKey",mod:"u">typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform)?"metaKey":"ctrlKey",shift:"shiftKey"};function lO(e){return"Alt"===e.key}function lM(e,t){return e.filter(e=>e!==t)}function lA(e){return!e}function lz(e){return e()}function lN(e){let t=e.target;if(((0,w.bg)(t)||(0,w.Re)(t)&&t.closest("a"))&&e.altKey){e.preventDefault(),e.stopPropagation();let t=new MouseEvent(e.type,{...e,altKey:!1,bubbles:!0,cancelable:!0});e.target?.dispatchEvent(t)}}function lT(e){return!e}function lP(e){return!e}function lL(e){return!e}function lD(e){return"id"in e.sanity?[e.sanity.id]:[]}function lF(e){return e.activated||e.focused}let lB=e=>{let t,n;let r=(0,g.c)(4),{comlink:o,refresh:i}=e,a=(0,y.useRef)(0),l=(0,y.useRef)(0);return r[0]!==o||r[1]!==i?(t=()=>o.on("presentation/refresh",e=>{if("manual"===e.source){clearTimeout(a.current);let t=i(e);if(!1===t)return;o.post("visual-editing/refreshing",e);let n=!1;a.current=window.setTimeout(()=>{o.post("visual-editing/refreshed",e),n=!0},3e3),t?.finally?.(()=>{n||(clearTimeout(a.current),o.post("visual-editing/refreshed",e))})}else if("mutation"===e.source){clearTimeout(l.current);let t=i(e);if(!1===t)return;o.post("visual-editing/refreshing",e),l.current=window.setTimeout(()=>{let t=i(e);!1!==t&&(o.post("visual-editing/refreshing",e),t?.finally?.(()=>{o.post("visual-editing/refreshed",e)})||o.post("visual-editing/refreshed",e))},1e3),t?.finally?.(()=>{o.post("visual-editing/refreshed",e)})||o.post("visual-editing/refreshed",e)}}),n=[o,i],r[0]=o,r[1]=i,r[2]=t,r[3]=n):(t=r[2],n=r[3]),(0,y.useEffect)(t,n),null};function lH(e){let{data:t,origin:n}=e;t&&"object"==typeof t&&"domain"in t&&"sanity/channels"===t.domain&&"from"in t&&"presentation"===t.from&&"type"in t&&"presentation/status"===t.type&&window.parent.postMessage({domain:"sanity/channels",type:"visual-editing/status",data:{origin:location.origin}},n)}function lU(){console.warn("[@sanity/visual-editing] Package version mismatch detected: Please update your Sanity studio to prevent potential compatibility issues.")}function lV(){}let lG=e=>{let t,n,r,o,i,a,l,s;let u=(0,g.c)(23),{components:c,plugins:d,history:f,portal:p,refresh:v,zIndex:w}=e,x=void 0===p||p,[k,S]=(0,y.useState)(null),[E,_]=(0,y.useState)(null);u[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{S((0,m.el)()),_((0,m.Ax)())},n=[],u[0]=t,u[1]=n):(t=u[0],n=u[1]),(0,y.useEffect)(t,n);let[j,C]=(0,y.useState)(null);u[2]!==x?(r=()=>{if(!1===x)return;let e=document.createElement("sanity-visual-editing");return document.documentElement.appendChild(e),C(e),()=>{C(null),document.documentElement.contains(e)&&document.documentElement.removeChild(e)}},o=[x],u[2]=x,u[3]=r,u[4]=o):(r=u[3],o=u[4]),(0,y.useEffect)(r,o);let[I,R]=function(e){let t,n,r,o,i;let a=(0,g.c)(9),l=void 0===e||e,[s,u]=(0,y.useState)(),[c,d]=(0,y.useState)("idle");return a[0]!==l?(t=()=>{if(!l)return;let e=(0,n$.dS)({name:"visual-editing",connectTo:"presentation"},(0,n$.zB)().provide({actors:(0,m.XP)()})),t=e.onStatus(()=>d("connected"),"connected");u(e);let n=e.start();return()=>{t(),n(),u(void 0)}},n=[l],a[0]=l,a[1]=t,a[2]=n):(t=a[1],n=a[2]),(0,y.useEffect)(t,n),a[3]!==c?(r=()=>{if("connected"===c)return;let e=new AbortController;return window.addEventListener("message",lH,{signal:e.signal}),()=>{e.abort()}},o=[c],a[3]=c,a[4]=r,a[5]=o):(r=a[4],o=a[5]),(0,y.useEffect)(r,o),a[6]!==s||a[7]!==c?(i=[s,c],a[6]=s,a[7]=c,a[8]=i):i=a[8],i}(!0===k||!0===E);!function(e){let t,n;let r=(0,g.c)(3);r[0]!==e?(t=()=>{if(!e)return;let t=function(e){let t=new nM.t(1),n=new nA.x;return e.fetch("visual-editing/snapshot-welcome",void 0,{suppressWarnings:!0}).then(e=>{t.next(e.event)}).catch(()=>{}
362),e.on("presentation/snapshot-event",e=>{"reconnect"===e.event.type&&t.next(e.event),"mutation"===e.event.type&&n.next(e.event)}),(0,nz.T)(t,n)}(e),n=aI(e),r=(0,nO.c)(n,{input:{client:{withConfig:lV},sharedListener:t}});r.start();let o=new AbortController;return e.fetch("visual-editing/features",void 0,{signal:o.signal,suppressWarnings:!0}).then(e=>{e.features.optimistic&&function(e){for(let t of(D=e,F))t()}(r)}).catch(lU),()=>{r.stop(),o.abort()}},n=[e],r[0]=e,r[1]=t,r[2]=n):(t=r[1],n=r[2]),(0,y.useEffect)(t,n)}("connected"===R?I:void 0),u[5]!==I||u[6]!==R||u[7]!==c||u[8]!==k||u[9]!==E||u[10]!==d||u[11]!==w?(i=null!==k&&null!==E&&(0,h.jsx)(lR,{comlink:I,comlinkStatus:R,componentResolver:c,plugins:d,inFrame:k,inPopUp:E,zIndex:w}),u[5]=I,u[6]=R,u[7]=c,u[8]=k,u[9]=E,u[10]=d,u[11]=w,u[12]=i):i=u[12],u[13]!==I||u[14]!==f||u[15]!==v?(a=I&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(aR,{comlink:I,history:f}),(0,h.jsx)(a$,{comlink:I}),v&&(0,h.jsx)(lB,{comlink:I,refresh:v})]}),u[13]=I,u[14]=f,u[15]=v,u[16]=a):a=u[16],u[17]!==i||u[18]!==a?(l=(0,h.jsxs)(h.Fragment,{children:[i,a]}),u[17]=i,u[18]=a,u[19]=l):l=u[19];let $=l;return!1!==x&&j?(u[20]!==$||u[21]!==j?(s=(0,b.createPortal)($,j),u[20]=$,u[21]=j,u[22]=s):s=u[22],s):$};lG.displayName="VisualEditing";var lW=n(99376);n(83079);var lq=(0,n(12119).$)("77ef1e4b8a1e122d5b22cc4e02c0ac32ae04d3a1");function lY(e){let t=e.indexOf("#"),n=e.indexOf("?"),r=n>-1&&(t<0||n<t);return r||t>-1?{pathname:e.substring(0,r?n:t),query:r?e.substring(n,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}function lZ(e,t){if(!function(e,t){if("string"!=typeof e)return!1;let{pathname:n}=lY(e);return n===t||n.startsWith(`${t}/`)}(e,t))return e;let n=e.slice(t.length);return n.startsWith("/")?n:`/${n}`}let lK=(e,t)=>{let{pathname:n,query:r,hash:o}=lY(e);return t?n.endsWith("/")?`${n}${r}${o}`:`${n}/${r}${o}`:`${n.replace(/\/$/,"")||"/"}${r}${o}`};function lX(e){let{basePath:t="",plugins:n,components:r,refresh:o,trailingSlash:i=!1,zIndex:a}=e,l=(0,lW.useRouter)(),s=(0,y.useRef)(l),[u,c]=(0,y.useState)();(0,y.useEffect)(()=>{s.current=l},[l]);let d=(0,y.useMemo)(()=>({subscribe:e=>(c(()=>e),()=>c(void 0)),update:e=>{switch(e.type){case"push":return s.current.push(lZ(e.url,t));case"pop":return s.current.back();case"replace":return s.current.replace(lZ(e.url,t));default:throw Error(`Unknown update type: ${e.type}`)}}}),[t]),f=(0,lW.usePathname)(),p=(0,lW.useSearchParams)();(0,y.useEffect)(()=>{u&&u({type:"push",url:lK(function(e,t){if(!e.startsWith("/")||!t)return e;if("/"===e&&t)return t;let{pathname:n,query:r,hash:o}=lY(e);return`${t}${n}${r}${o}`}(`${f}${p?.size?`?${p}`:""}`,t),i)})},[t,u,f,p,i]);let g=(0,y.useCallback)(e=>{if(o)return o(e);switch(e.source){case"manual":return e.livePreviewEnabled?(console.debug("Live preview is setup, calling router.refresh() to refresh the server components without refetching cached data"),s.current.refresh(),Promise.resolve()):(console.debug("No loaders in live mode detected, or preview kit setup, revalidating root layout"),lq());case"mutation":return e.livePreviewEnabled?(console.debug("Live preview is setup, mutation is skipped assuming its handled by the live preview"),!1):(console.debug("No loaders in live mode detected, or preview kit setup, revalidating root layout"),lq());default:throw Error("Unknown refresh source",{cause:e})}},[o]);return(0,h.jsx)(lG,{plugins:n,components:r,history:d,portal:!0,refresh:g,zIndex:a})}}}]);
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.